@progress/kendo-angular-typography 17.0.0-develop.8 → 17.0.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.
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-typography',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1729170387,
13
- version: '17.0.0-develop.8',
12
+ publishDate: 1731414205,
13
+ version: '17.0.0',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
15
15
  };
@@ -5,8 +5,6 @@
5
5
  import { Directive, Input, ElementRef, Renderer2 } from '@angular/core';
6
6
  import { typographyFontSizeOptions } from './models/font-size';
7
7
  import { typographyFontWeightOptions } from './models/font-weight';
8
- import { typographyMarginOptions } from './models/margin';
9
- import { marginSides } from './models/margin-sides';
10
8
  import { typographyTextAlignOptions } from './models/text-align';
11
9
  import { typographyTextTransformOptions } from './models/text-transform';
12
10
  import { typographyVariantOptions } from './models/variant';
@@ -24,11 +22,38 @@ import * as i0 from "@angular/core";
24
22
  * ```
25
23
  */
26
24
  export class TypographyDirective {
25
+ elementWrapper;
26
+ renderer;
27
+ element;
28
+ /**
29
+ * Specifies the element variant class that will be applied.
30
+ */
31
+ variant;
32
+ /**
33
+ * Sets the element `font-size` style.
34
+ */
35
+ fontSize;
36
+ /**
37
+ * Sets the element `font-weight` style.
38
+ */
39
+ fontWeight;
40
+ /**
41
+ * Sets the element text-align style.
42
+ */
43
+ textAlign;
44
+ /**
45
+ * Sets the element text-transform style.
46
+ */
47
+ textTransform;
48
+ /**
49
+ * Applies the theme color to the element.
50
+ */
51
+ themeColor;
52
+ typographyClasses = [];
27
53
  constructor(elementWrapper, renderer, element) {
28
54
  this.elementWrapper = elementWrapper;
29
55
  this.renderer = renderer;
30
56
  this.element = element;
31
- this.typographyClasses = [];
32
57
  validatePackage(packageMetadata);
33
58
  }
34
59
  ngOnChanges() {
@@ -52,26 +77,6 @@ export class TypographyDirective {
52
77
  textTransformClass() {
53
78
  return typographyTextTransformOptions[this.textTransform];
54
79
  }
55
- setMarginClassPerSide(marginSide, value) {
56
- return `${marginSides[marginSide]}${value}`;
57
- }
58
- marginClasses() {
59
- if (typeof (this.margin) === 'string') {
60
- return [typographyMarginOptions[this.margin]];
61
- }
62
- if (typeof (this.margin) === 'number') {
63
- return [`k-m-${this.margin}`];
64
- }
65
- if (typeof (this.margin) === 'object') {
66
- const marginClasses = [];
67
- Object.keys(this.margin).forEach(key => {
68
- if (isPresent(this.margin[key])) {
69
- marginClasses.push(this.setMarginClassPerSide(key, this.margin[key]));
70
- }
71
- });
72
- return marginClasses;
73
- }
74
- }
75
80
  setTypographyClasses() {
76
81
  const element = this.element.nativeElement;
77
82
  this.typographyClasses.forEach((className) => {
@@ -85,21 +90,16 @@ export class TypographyDirective {
85
90
  this.textAlignClass(),
86
91
  this.themeColorClass()
87
92
  ];
88
- if (this.margin) {
89
- this.marginClasses().forEach(className => {
90
- this.typographyClasses.push(className);
91
- });
92
- }
93
93
  this.typographyClasses.forEach((className) => {
94
94
  if (isPresent(className)) {
95
95
  this.renderer.addClass(element, className);
96
96
  }
97
97
  });
98
98
  }
99
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TypographyDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
100
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TypographyDirective, isStandalone: true, selector: "[kendoTypography]", inputs: { variant: "variant", fontSize: "fontSize", fontWeight: "fontWeight", textAlign: "textAlign", textTransform: "textTransform", themeColor: "themeColor" }, exportAs: ["kendoTypography"], usesOnChanges: true, ngImport: i0 });
99
101
  }
100
- TypographyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TypographyDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
101
- TypographyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: TypographyDirective, isStandalone: true, selector: "[kendoTypography]", inputs: { variant: "variant", fontSize: "fontSize", fontWeight: "fontWeight", textAlign: "textAlign", textTransform: "textTransform", themeColor: "themeColor", margin: "margin" }, exportAs: ["kendoTypography"], usesOnChanges: true, ngImport: i0 });
102
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TypographyDirective, decorators: [{
102
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TypographyDirective, decorators: [{
103
103
  type: Directive,
104
104
  args: [{
105
105
  selector: '[kendoTypography]',
@@ -118,6 +118,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
118
118
  type: Input
119
119
  }], themeColor: [{
120
120
  type: Input
121
- }], margin: [{
122
- type: Input
123
121
  }] } });
@@ -39,11 +39,11 @@ import * as i1 from "./typography.directive";
39
39
  * ```
40
40
  */
41
41
  export class TypographyModule {
42
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TypographyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
43
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TypographyModule, imports: [i1.TypographyDirective], exports: [i1.TypographyDirective] });
44
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TypographyModule });
42
45
  }
43
- TypographyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TypographyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
44
- TypographyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: TypographyModule, imports: [i1.TypographyDirective], exports: [i1.TypographyDirective] });
45
- TypographyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TypographyModule });
46
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TypographyModule, decorators: [{
46
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TypographyModule, decorators: [{
47
47
  type: NgModule,
48
48
  args: [{
49
49
  imports: [...KENDO_TYPOGRAPHY],
@@ -26,88 +26,6 @@ const typographyFontWeightOptions = {
26
26
  'bold': 'k-font-weight-bold'
27
27
  };
28
28
 
29
- /**
30
- * Specifies the applied margin to the element.
31
- *
32
- * Passing a [TypographyMarginOption]({% slug api_typography_typographymarginoption %}) will set any of the built - in Kendo classes, which provide default margin in pixels.
33
- *
34
- * When using the Default or Material themes, passing a number will apply a margin of 4 times the passed number in pixels.
35
- * When using the Bootstrap theme the applied margin will be equal to the passed number divided by 4 in rem units.
36
- * The minimum number value is 0 and the maximum is 24.
37
- *
38
- * Passing a [Margin]({% slug api_typography_margin %}) object allows setting the margins for each side.
39
- */
40
- /**
41
- * @hidden
42
- */
43
- const typographyMarginOptions = {
44
- 'xs': 'k-m-xs',
45
- 'sm': 'k-m-sm',
46
- 'md': 'k-m-md',
47
- 'lg': 'k-m-lg',
48
- 'xl': 'k-m-xl',
49
- 'thin': 'k-m-thin',
50
- 'hair': 'k-m-hair'
51
- };
52
- /**
53
- * @hidden
54
- */
55
- const typographyMarginTopOptions = {
56
- 'xs': 'k-mt-xs',
57
- 'sm': 'k-mt-sm',
58
- 'md': 'k-mt-md',
59
- 'lg': 'k-mt-lg',
60
- 'xl': 'k-mt-xl',
61
- 'thin': 'k-mt-thin',
62
- 'hair': 'k-mt-hair'
63
- };
64
- /**
65
- * @hidden
66
- */
67
- const typographyMarginBottomOptions = {
68
- 'xs': 'k-mb-xs',
69
- 'sm': 'k-mb-sm',
70
- 'md': 'k-mb-md',
71
- 'lg': 'k-mb-lg',
72
- 'xl': 'k-mb-xl',
73
- 'thin': 'k-mb-thin',
74
- 'hair': 'k-mb-hair'
75
- };
76
- /**
77
- * @hidden
78
- */
79
- const typographyMarginLeftOptions = {
80
- 'xs': 'k-ml-xs',
81
- 'sm': 'k-ml-sm',
82
- 'md': 'k-ml-md',
83
- 'lg': 'k-ml-lg',
84
- 'xl': 'k-ml-xl',
85
- 'thin': 'k-ml-thin',
86
- 'hair': 'k-ml-hair'
87
- };
88
- /**
89
- * @hidden
90
- */
91
- const typographyMarginRightOptions = {
92
- 'xs': 'k-mr-xs',
93
- 'sm': 'k-mr-sm',
94
- 'md': 'k-mr-md',
95
- 'lg': 'k-mr-lg',
96
- 'xl': 'k-mr-xl',
97
- 'thin': 'k-mr-thin',
98
- 'hair': 'k-mr-hair'
99
- };
100
-
101
- /**
102
- * @hidden
103
- */
104
- const marginSides = {
105
- 'top': 'k-mt-',
106
- 'right': 'k-mr-',
107
- 'bottom': 'k-mb-',
108
- 'left': 'k-ml-'
109
- };
110
-
111
29
  /**
112
30
  * @hidden
113
31
  */
@@ -154,8 +72,8 @@ const packageMetadata = {
154
72
  name: '@progress/kendo-angular-typography',
155
73
  productName: 'Kendo UI for Angular',
156
74
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
157
- publishDate: 1729170387,
158
- version: '17.0.0-develop.8',
75
+ publishDate: 1731414205,
76
+ version: '17.0.0',
159
77
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
160
78
  };
161
79
 
@@ -169,11 +87,38 @@ const packageMetadata = {
169
87
  * ```
170
88
  */
171
89
  class TypographyDirective {
90
+ elementWrapper;
91
+ renderer;
92
+ element;
93
+ /**
94
+ * Specifies the element variant class that will be applied.
95
+ */
96
+ variant;
97
+ /**
98
+ * Sets the element `font-size` style.
99
+ */
100
+ fontSize;
101
+ /**
102
+ * Sets the element `font-weight` style.
103
+ */
104
+ fontWeight;
105
+ /**
106
+ * Sets the element text-align style.
107
+ */
108
+ textAlign;
109
+ /**
110
+ * Sets the element text-transform style.
111
+ */
112
+ textTransform;
113
+ /**
114
+ * Applies the theme color to the element.
115
+ */
116
+ themeColor;
117
+ typographyClasses = [];
172
118
  constructor(elementWrapper, renderer, element) {
173
119
  this.elementWrapper = elementWrapper;
174
120
  this.renderer = renderer;
175
121
  this.element = element;
176
- this.typographyClasses = [];
177
122
  validatePackage(packageMetadata);
178
123
  }
179
124
  ngOnChanges() {
@@ -197,26 +142,6 @@ class TypographyDirective {
197
142
  textTransformClass() {
198
143
  return typographyTextTransformOptions[this.textTransform];
199
144
  }
200
- setMarginClassPerSide(marginSide, value) {
201
- return `${marginSides[marginSide]}${value}`;
202
- }
203
- marginClasses() {
204
- if (typeof (this.margin) === 'string') {
205
- return [typographyMarginOptions[this.margin]];
206
- }
207
- if (typeof (this.margin) === 'number') {
208
- return [`k-m-${this.margin}`];
209
- }
210
- if (typeof (this.margin) === 'object') {
211
- const marginClasses = [];
212
- Object.keys(this.margin).forEach(key => {
213
- if (isPresent(this.margin[key])) {
214
- marginClasses.push(this.setMarginClassPerSide(key, this.margin[key]));
215
- }
216
- });
217
- return marginClasses;
218
- }
219
- }
220
145
  setTypographyClasses() {
221
146
  const element = this.element.nativeElement;
222
147
  this.typographyClasses.forEach((className) => {
@@ -230,21 +155,16 @@ class TypographyDirective {
230
155
  this.textAlignClass(),
231
156
  this.themeColorClass()
232
157
  ];
233
- if (this.margin) {
234
- this.marginClasses().forEach(className => {
235
- this.typographyClasses.push(className);
236
- });
237
- }
238
158
  this.typographyClasses.forEach((className) => {
239
159
  if (isPresent(className)) {
240
160
  this.renderer.addClass(element, className);
241
161
  }
242
162
  });
243
163
  }
164
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TypographyDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
165
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TypographyDirective, isStandalone: true, selector: "[kendoTypography]", inputs: { variant: "variant", fontSize: "fontSize", fontWeight: "fontWeight", textAlign: "textAlign", textTransform: "textTransform", themeColor: "themeColor" }, exportAs: ["kendoTypography"], usesOnChanges: true, ngImport: i0 });
244
166
  }
245
- TypographyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TypographyDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
246
- TypographyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: TypographyDirective, isStandalone: true, selector: "[kendoTypography]", inputs: { variant: "variant", fontSize: "fontSize", fontWeight: "fontWeight", textAlign: "textAlign", textTransform: "textTransform", themeColor: "themeColor", margin: "margin" }, exportAs: ["kendoTypography"], usesOnChanges: true, ngImport: i0 });
247
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TypographyDirective, decorators: [{
167
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TypographyDirective, decorators: [{
248
168
  type: Directive,
249
169
  args: [{
250
170
  selector: '[kendoTypography]',
@@ -263,8 +183,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
263
183
  type: Input
264
184
  }], themeColor: [{
265
185
  type: Input
266
- }], margin: [{
267
- type: Input
268
186
  }] } });
269
187
 
270
188
  /**
@@ -307,11 +225,11 @@ const KENDO_TYPOGRAPHY = [
307
225
  * ```
308
226
  */
309
227
  class TypographyModule {
228
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TypographyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
229
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TypographyModule, imports: [TypographyDirective], exports: [TypographyDirective] });
230
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TypographyModule });
310
231
  }
311
- TypographyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TypographyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
312
- TypographyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: TypographyModule, imports: [TypographyDirective], exports: [TypographyDirective] });
313
- TypographyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TypographyModule });
314
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TypographyModule, decorators: [{
232
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TypographyModule, decorators: [{
315
233
  type: NgModule,
316
234
  args: [{
317
235
  imports: [...KENDO_TYPOGRAPHY],
package/index.d.ts CHANGED
@@ -10,5 +10,4 @@ export { TypographyTextAlign } from './models/text-align';
10
10
  export { TypographyTextTransform } from './models/text-transform';
11
11
  export { TypographyVariant } from './models/variant';
12
12
  export { TypographyThemeColor } from './models/theme-color';
13
- export { TypographyMargin } from './models/margin';
14
13
  export * from './directives';
@@ -32,7 +32,7 @@
32
32
  * * `lg`—font-size: 16px
33
33
  * * `xl`—font-size: 20px
34
34
  */
35
- export declare type TypographyFontSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
35
+ export type TypographyFontSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
36
36
  /**
37
37
  * @hidden
38
38
  */
@@ -10,7 +10,7 @@
10
10
  * * `normal`—font-weight: 400
11
11
  * * `bold` For Default and Bootstrap themes—font-weight: 700. For Material theme—font-weight: 500.
12
12
  */
13
- export declare type TypographyFontWeight = 'light' | 'normal' | 'bold';
13
+ export type TypographyFontWeight = 'light' | 'normal' | 'bold';
14
14
  /**
15
15
  * @hidden
16
16
  */
@@ -12,7 +12,7 @@
12
12
  * * `justify`—text-align: justify
13
13
  *
14
14
  */
15
- export declare type TypographyTextAlign = 'left' | 'right' | 'center' | 'justify';
15
+ export type TypographyTextAlign = 'left' | 'right' | 'center' | 'justify';
16
16
  /**
17
17
  * @hidden
18
18
  */
@@ -11,7 +11,7 @@
11
11
  * * `capitalize`—text-transform: capitalize
12
12
  *
13
13
  */
14
- export declare type TypographyTextTransform = 'lowercase' | 'uppercase' | 'capitalize';
14
+ export type TypographyTextTransform = 'lowercase' | 'uppercase' | 'capitalize';
15
15
  /**
16
16
  * @hidden
17
17
  */
@@ -19,4 +19,4 @@
19
19
  * * `inverse`— Applies coloring based on inverse theme color.
20
20
  *
21
21
  */
22
- export declare type TypographyThemeColor = 'inherit' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'error' | 'dark' | 'light' | 'inverse';
22
+ export type TypographyThemeColor = 'inherit' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'error' | 'dark' | 'light' | 'inverse';
@@ -26,7 +26,7 @@
26
26
  * * `code`— `k-code`
27
27
  * * `pre`— `k-pre`
28
28
  */
29
- export declare type TypographyVariant = 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'code' | 'pre';
29
+ export type TypographyVariant = 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'code' | 'pre';
30
30
  /**
31
31
  * @hidden
32
32
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-typography",
3
- "version": "17.0.0-develop.8",
3
+ "version": "17.0.0",
4
4
  "description": "Kendo UI Angular Typography",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -18,24 +18,20 @@
18
18
  "friendlyName": "Typography"
19
19
  },
20
20
  "peerDependencies": {
21
- "@angular/animations": "15 - 18",
22
- "@angular/common": "15 - 18",
23
- "@angular/core": "15 - 18",
24
- "@angular/platform-browser": "15 - 18",
21
+ "@angular/animations": "16 - 18",
22
+ "@angular/common": "16 - 18",
23
+ "@angular/core": "16 - 18",
24
+ "@angular/platform-browser": "16 - 18",
25
25
  "@progress/kendo-licensing": "^1.0.2",
26
- "@progress/kendo-angular-common": "17.0.0-develop.8",
26
+ "@progress/kendo-angular-common": "17.0.0",
27
27
  "rxjs": "^6.5.3 || ^7.0.0"
28
28
  },
29
29
  "dependencies": {
30
30
  "tslib": "^2.3.1",
31
- "@progress/kendo-angular-schematics": "17.0.0-develop.8"
31
+ "@progress/kendo-angular-schematics": "17.0.0"
32
32
  },
33
33
  "schematics": "./schematics/collection.json",
34
- "module": "fesm2015/progress-kendo-angular-typography.mjs",
35
- "es2020": "fesm2020/progress-kendo-angular-typography.mjs",
36
- "esm2020": "esm2020/progress-kendo-angular-typography.mjs",
37
- "fesm2020": "fesm2020/progress-kendo-angular-typography.mjs",
38
- "fesm2015": "fesm2015/progress-kendo-angular-typography.mjs",
34
+ "module": "fesm2022/progress-kendo-angular-typography.mjs",
39
35
  "typings": "index.d.ts",
40
36
  "exports": {
41
37
  "./package.json": {
@@ -43,11 +39,9 @@
43
39
  },
44
40
  ".": {
45
41
  "types": "./index.d.ts",
46
- "esm2020": "./esm2020/progress-kendo-angular-typography.mjs",
47
- "es2020": "./fesm2020/progress-kendo-angular-typography.mjs",
48
- "es2015": "./fesm2015/progress-kendo-angular-typography.mjs",
49
- "node": "./fesm2015/progress-kendo-angular-typography.mjs",
50
- "default": "./fesm2020/progress-kendo-angular-typography.mjs"
42
+ "esm2022": "./esm2022/progress-kendo-angular-typography.mjs",
43
+ "esm": "./esm2022/progress-kendo-angular-typography.mjs",
44
+ "default": "./fesm2022/progress-kendo-angular-typography.mjs"
51
45
  }
52
46
  },
53
47
  "sideEffects": false
@@ -5,7 +5,6 @@
5
5
  import { ElementRef, Renderer2, OnChanges } from '@angular/core';
6
6
  import { TypographyFontSize } from './models/font-size';
7
7
  import { TypographyFontWeight } from './models/font-weight';
8
- import { TypographyMargin } from './models/margin';
9
8
  import { TypographyTextAlign } from './models/text-align';
10
9
  import { TypographyTextTransform } from './models/text-transform';
11
10
  import { TypographyThemeColor } from './models/theme-color';
@@ -48,10 +47,6 @@ export declare class TypographyDirective implements OnChanges {
48
47
  * Applies the theme color to the element.
49
48
  */
50
49
  themeColor: TypographyThemeColor;
51
- /**
52
- * Applies the margin sizes to the element.
53
- */
54
- margin: TypographyMargin;
55
50
  private typographyClasses;
56
51
  constructor(elementWrapper: ElementRef, renderer: Renderer2, element: ElementRef);
57
52
  ngOnChanges(): void;
@@ -61,9 +56,7 @@ export declare class TypographyDirective implements OnChanges {
61
56
  private fontWeightClass;
62
57
  private fontSizeClass;
63
58
  private textTransformClass;
64
- private setMarginClassPerSide;
65
- private marginClasses;
66
59
  private setTypographyClasses;
67
60
  static ɵfac: i0.ɵɵFactoryDeclaration<TypographyDirective, never>;
68
- static ɵdir: i0.ɵɵDirectiveDeclaration<TypographyDirective, "[kendoTypography]", ["kendoTypography"], { "variant": "variant"; "fontSize": "fontSize"; "fontWeight": "fontWeight"; "textAlign": "textAlign"; "textTransform": "textTransform"; "themeColor": "themeColor"; "margin": "margin"; }, {}, never, never, true, never>;
61
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TypographyDirective, "[kendoTypography]", ["kendoTypography"], { "variant": { "alias": "variant"; "required": false; }; "fontSize": { "alias": "fontSize"; "required": false; }; "fontWeight": { "alias": "fontWeight"; "required": false; }; "textAlign": { "alias": "textAlign"; "required": false; }; "textTransform": { "alias": "textTransform"; "required": false; }; "themeColor": { "alias": "themeColor"; "required": false; }; }, {}, never, never, true, never>;
69
62
  }
@@ -1,13 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * @hidden
7
- */
8
- export const marginSides = {
9
- 'top': 'k-mt-',
10
- 'right': 'k-mr-',
11
- 'bottom': 'k-mb-',
12
- 'left': 'k-ml-'
13
- };
@@ -1,75 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * Specifies the applied margin to the element.
7
- *
8
- * Passing a [TypographyMarginOption]({% slug api_typography_typographymarginoption %}) will set any of the built - in Kendo classes, which provide default margin in pixels.
9
- *
10
- * When using the Default or Material themes, passing a number will apply a margin of 4 times the passed number in pixels.
11
- * When using the Bootstrap theme the applied margin will be equal to the passed number divided by 4 in rem units.
12
- * The minimum number value is 0 and the maximum is 24.
13
- *
14
- * Passing a [Margin]({% slug api_typography_margin %}) object allows setting the margins for each side.
15
- */
16
- /**
17
- * @hidden
18
- */
19
- export const typographyMarginOptions = {
20
- 'xs': 'k-m-xs',
21
- 'sm': 'k-m-sm',
22
- 'md': 'k-m-md',
23
- 'lg': 'k-m-lg',
24
- 'xl': 'k-m-xl',
25
- 'thin': 'k-m-thin',
26
- 'hair': 'k-m-hair'
27
- };
28
- /**
29
- * @hidden
30
- */
31
- export const typographyMarginTopOptions = {
32
- 'xs': 'k-mt-xs',
33
- 'sm': 'k-mt-sm',
34
- 'md': 'k-mt-md',
35
- 'lg': 'k-mt-lg',
36
- 'xl': 'k-mt-xl',
37
- 'thin': 'k-mt-thin',
38
- 'hair': 'k-mt-hair'
39
- };
40
- /**
41
- * @hidden
42
- */
43
- export const typographyMarginBottomOptions = {
44
- 'xs': 'k-mb-xs',
45
- 'sm': 'k-mb-sm',
46
- 'md': 'k-mb-md',
47
- 'lg': 'k-mb-lg',
48
- 'xl': 'k-mb-xl',
49
- 'thin': 'k-mb-thin',
50
- 'hair': 'k-mb-hair'
51
- };
52
- /**
53
- * @hidden
54
- */
55
- export const typographyMarginLeftOptions = {
56
- 'xs': 'k-ml-xs',
57
- 'sm': 'k-ml-sm',
58
- 'md': 'k-ml-md',
59
- 'lg': 'k-ml-lg',
60
- 'xl': 'k-ml-xl',
61
- 'thin': 'k-ml-thin',
62
- 'hair': 'k-ml-hair'
63
- };
64
- /**
65
- * @hidden
66
- */
67
- export const typographyMarginRightOptions = {
68
- 'xs': 'k-mr-xs',
69
- 'sm': 'k-mr-sm',
70
- 'md': 'k-mr-md',
71
- 'lg': 'k-mr-lg',
72
- 'xl': 'k-mr-xl',
73
- 'thin': 'k-mr-thin',
74
- 'hair': 'k-mr-hair'
75
- };
@@ -1,327 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as i0 from '@angular/core';
6
- import { Directive, Input, NgModule } from '@angular/core';
7
- import { validatePackage } from '@progress/kendo-licensing';
8
-
9
- /**
10
- * @hidden
11
- */
12
- const typographyFontSizeOptions = {
13
- 'xs': 'k-fs-xs',
14
- 'sm': 'k-fs-sm',
15
- 'md': 'k-fs-md',
16
- 'lg': 'k-fs-lg',
17
- 'xl': 'k-fs-xl'
18
- };
19
-
20
- /**
21
- * @hidden
22
- */
23
- const typographyFontWeightOptions = {
24
- 'light': 'k-font-weight-light',
25
- 'normal': 'k-font-weight-normal',
26
- 'bold': 'k-font-weight-bold'
27
- };
28
-
29
- /**
30
- * Specifies the applied margin to the element.
31
- *
32
- * Passing a [TypographyMarginOption]({% slug api_typography_typographymarginoption %}) will set any of the built - in Kendo classes, which provide default margin in pixels.
33
- *
34
- * When using the Default or Material themes, passing a number will apply a margin of 4 times the passed number in pixels.
35
- * When using the Bootstrap theme the applied margin will be equal to the passed number divided by 4 in rem units.
36
- * The minimum number value is 0 and the maximum is 24.
37
- *
38
- * Passing a [Margin]({% slug api_typography_margin %}) object allows setting the margins for each side.
39
- */
40
- /**
41
- * @hidden
42
- */
43
- const typographyMarginOptions = {
44
- 'xs': 'k-m-xs',
45
- 'sm': 'k-m-sm',
46
- 'md': 'k-m-md',
47
- 'lg': 'k-m-lg',
48
- 'xl': 'k-m-xl',
49
- 'thin': 'k-m-thin',
50
- 'hair': 'k-m-hair'
51
- };
52
- /**
53
- * @hidden
54
- */
55
- const typographyMarginTopOptions = {
56
- 'xs': 'k-mt-xs',
57
- 'sm': 'k-mt-sm',
58
- 'md': 'k-mt-md',
59
- 'lg': 'k-mt-lg',
60
- 'xl': 'k-mt-xl',
61
- 'thin': 'k-mt-thin',
62
- 'hair': 'k-mt-hair'
63
- };
64
- /**
65
- * @hidden
66
- */
67
- const typographyMarginBottomOptions = {
68
- 'xs': 'k-mb-xs',
69
- 'sm': 'k-mb-sm',
70
- 'md': 'k-mb-md',
71
- 'lg': 'k-mb-lg',
72
- 'xl': 'k-mb-xl',
73
- 'thin': 'k-mb-thin',
74
- 'hair': 'k-mb-hair'
75
- };
76
- /**
77
- * @hidden
78
- */
79
- const typographyMarginLeftOptions = {
80
- 'xs': 'k-ml-xs',
81
- 'sm': 'k-ml-sm',
82
- 'md': 'k-ml-md',
83
- 'lg': 'k-ml-lg',
84
- 'xl': 'k-ml-xl',
85
- 'thin': 'k-ml-thin',
86
- 'hair': 'k-ml-hair'
87
- };
88
- /**
89
- * @hidden
90
- */
91
- const typographyMarginRightOptions = {
92
- 'xs': 'k-mr-xs',
93
- 'sm': 'k-mr-sm',
94
- 'md': 'k-mr-md',
95
- 'lg': 'k-mr-lg',
96
- 'xl': 'k-mr-xl',
97
- 'thin': 'k-mr-thin',
98
- 'hair': 'k-mr-hair'
99
- };
100
-
101
- /**
102
- * @hidden
103
- */
104
- const marginSides = {
105
- 'top': 'k-mt-',
106
- 'right': 'k-mr-',
107
- 'bottom': 'k-mb-',
108
- 'left': 'k-ml-'
109
- };
110
-
111
- /**
112
- * @hidden
113
- */
114
- const typographyTextAlignOptions = {
115
- 'left': 'k-text-left',
116
- 'right': 'k-text-right',
117
- 'center': 'k-text-center',
118
- 'justify': 'k-text-justify'
119
- };
120
-
121
- /**
122
- * @hidden
123
- */
124
- const typographyTextTransformOptions = {
125
- 'lowercase': 'k-text-lowercase',
126
- 'uppercase': 'k-text-uppercase',
127
- 'capitalize': 'k-text-capitalize'
128
- };
129
-
130
- /**
131
- * @hidden
132
- */
133
- const typographyVariantOptions = {
134
- 'p': 'k-paragraph',
135
- 'h1': 'k-h1',
136
- 'h2': 'k-h2',
137
- 'h3': 'k-h3',
138
- 'h4': 'k-h4',
139
- 'h5': 'k-h5',
140
- 'h6': 'k-h6',
141
- 'code': 'k-code',
142
- 'pre': 'k-pre'
143
- };
144
-
145
- /**
146
- * @hidden
147
- */
148
- const isPresent = (value) => value !== null && value !== undefined;
149
-
150
- /**
151
- * @hidden
152
- */
153
- const packageMetadata = {
154
- name: '@progress/kendo-angular-typography',
155
- productName: 'Kendo UI for Angular',
156
- productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
157
- publishDate: 1729170387,
158
- version: '17.0.0-develop.8',
159
- licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
160
- };
161
-
162
- /**
163
- * Represents the [Kendo UI Typography directive for Angular]({% slug overview_typography %}).
164
- * Used to represent element types in a uniform way by relying on the predefined Kendo theme classes.
165
- *
166
- * @example
167
- * ```ts-no-run
168
- * <div kendoTypography variant="k-h1"></div>
169
- * ```
170
- */
171
- class TypographyDirective {
172
- constructor(elementWrapper, renderer, element) {
173
- this.elementWrapper = elementWrapper;
174
- this.renderer = renderer;
175
- this.element = element;
176
- this.typographyClasses = [];
177
- validatePackage(packageMetadata);
178
- }
179
- ngOnChanges() {
180
- this.setTypographyClasses();
181
- }
182
- variantClass() {
183
- return typographyVariantOptions[this.variant];
184
- }
185
- themeColorClass() {
186
- return isPresent(this.themeColor) ? `k-color-${this.themeColor}` : null;
187
- }
188
- textAlignClass() {
189
- return typographyTextAlignOptions[this.textAlign];
190
- }
191
- fontWeightClass() {
192
- return typographyFontWeightOptions[this.fontWeight];
193
- }
194
- fontSizeClass() {
195
- return typographyFontSizeOptions[this.fontSize];
196
- }
197
- textTransformClass() {
198
- return typographyTextTransformOptions[this.textTransform];
199
- }
200
- setMarginClassPerSide(marginSide, value) {
201
- return `${marginSides[marginSide]}${value}`;
202
- }
203
- marginClasses() {
204
- if (typeof (this.margin) === 'string') {
205
- return [typographyMarginOptions[this.margin]];
206
- }
207
- if (typeof (this.margin) === 'number') {
208
- return [`k-m-${this.margin}`];
209
- }
210
- if (typeof (this.margin) === 'object') {
211
- const marginClasses = [];
212
- Object.keys(this.margin).forEach(key => {
213
- if (isPresent(this.margin[key])) {
214
- marginClasses.push(this.setMarginClassPerSide(key, this.margin[key]));
215
- }
216
- });
217
- return marginClasses;
218
- }
219
- }
220
- setTypographyClasses() {
221
- const element = this.element.nativeElement;
222
- this.typographyClasses.forEach((className) => {
223
- this.renderer.removeClass(element, className);
224
- });
225
- this.typographyClasses = [
226
- this.variantClass(),
227
- this.fontSizeClass(),
228
- this.fontWeightClass(),
229
- this.textTransformClass(),
230
- this.textAlignClass(),
231
- this.themeColorClass()
232
- ];
233
- if (this.margin) {
234
- this.marginClasses().forEach(className => {
235
- this.typographyClasses.push(className);
236
- });
237
- }
238
- this.typographyClasses.forEach((className) => {
239
- if (isPresent(className)) {
240
- this.renderer.addClass(element, className);
241
- }
242
- });
243
- }
244
- }
245
- TypographyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TypographyDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
246
- TypographyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: TypographyDirective, isStandalone: true, selector: "[kendoTypography]", inputs: { variant: "variant", fontSize: "fontSize", fontWeight: "fontWeight", textAlign: "textAlign", textTransform: "textTransform", themeColor: "themeColor", margin: "margin" }, exportAs: ["kendoTypography"], usesOnChanges: true, ngImport: i0 });
247
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TypographyDirective, decorators: [{
248
- type: Directive,
249
- args: [{
250
- selector: '[kendoTypography]',
251
- exportAs: 'kendoTypography',
252
- standalone: true
253
- }]
254
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { variant: [{
255
- type: Input
256
- }], fontSize: [{
257
- type: Input
258
- }], fontWeight: [{
259
- type: Input
260
- }], textAlign: [{
261
- type: Input
262
- }], textTransform: [{
263
- type: Input
264
- }], themeColor: [{
265
- type: Input
266
- }], margin: [{
267
- type: Input
268
- }] } });
269
-
270
- /**
271
- * Utility array that contains all `@progress/kendo-angular-typography` related components and directives
272
- */
273
- const KENDO_TYPOGRAPHY = [
274
- TypographyDirective
275
- ];
276
-
277
- //IMPORTANT: NgModule export kept for backwards compatibility
278
- /**
279
- * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
280
- * definition for the Typography component.
281
- *
282
- * @example
283
- *
284
- * ```ts-no-run
285
- * // Import the Typography module
286
- * import { TypographyModule } from '@progress/kendo-angular-typography';
287
- *
288
- * // The browser platform with a compiler
289
- * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
290
- *
291
- * import { NgModule } from '@angular/core';
292
- *
293
- * // Import the app component
294
- * import { AppComponent } from './app.component';
295
- *
296
- * // Define the app module
297
- * _@NgModule({
298
- * declarations: [AppComponent], // declare app component
299
- * imports: [BrowserModule, TypographyModule], // import Typography module
300
- * bootstrap: [AppComponent]
301
- * })
302
- * export class AppModule { }
303
- *
304
- * // Compile and launch the module
305
- * platformBrowserDynamic().bootstrapModule(AppModule);
306
- *
307
- * ```
308
- */
309
- class TypographyModule {
310
- }
311
- TypographyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TypographyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
312
- TypographyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: TypographyModule, imports: [TypographyDirective], exports: [TypographyDirective] });
313
- TypographyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TypographyModule });
314
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TypographyModule, decorators: [{
315
- type: NgModule,
316
- args: [{
317
- imports: [...KENDO_TYPOGRAPHY],
318
- exports: [...KENDO_TYPOGRAPHY]
319
- }]
320
- }] });
321
-
322
- /**
323
- * Generated bundle index. Do not edit.
324
- */
325
-
326
- export { KENDO_TYPOGRAPHY, TypographyDirective, TypographyModule };
327
-
@@ -1,13 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * @hidden
7
- */
8
- export declare const marginSides: {
9
- top: string;
10
- right: string;
11
- bottom: string;
12
- left: string;
13
- };
@@ -1,123 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * Specifies the applied margin to the element.
7
- *
8
- * Passing a [TypographyMarginOption]({% slug api_typography_typographymarginoption %}) will set any of the built - in Kendo classes, which provide default margin in pixels.
9
- *
10
- * When using the Default or Material themes, passing a number will apply a margin of 4 times the passed number in pixels.
11
- * When using the Bootstrap theme the applied margin will be equal to the passed number divided by 4 in rem units.
12
- * The minimum number value is 0 and the maximum is 24.
13
- *
14
- * Passing a [Margin]({% slug api_typography_margin %}) object allows setting the margins for each side.
15
- */
16
- export declare type TypographyMargin = TypographyMarginOption | Margin;
17
- /**
18
- * The possible values for the Default and Material themes are:
19
- * * `xs` &mdash;Applies 4px margin.
20
- * * `sm` &mdash;Applies 8px margin.
21
- * * `md` &mdash;Applies 12px margin.
22
- * * `lg` &mdash;Applies 16px margin.
23
- * * `xl` &mdash;Applies 24px margin.
24
- * * `thin` &mdash;Applies 2px margin.
25
- * * `hair` &mdash;Applies 1px margin.
26
- * * Passing a number will apply a margin of 4 times the passed number in pixels. The minimum number value is 0 and the maximum is 24.
27
- *
28
- * The possible values for the Bootstrap theme are:
29
- * * `xs` &mdash;Applies 0.25rem margin.
30
- * * `sm` &mdash;Applies 0.5rem margin.
31
- * * `md` &mdash;Applies 0.75rem margin.
32
- * * `lg` &mdash;Applies 1rem margin.
33
- * * `xl` &mdash;Applies 1.25rem margin.
34
- * * `thin` &mdash;Applies 0.125rem margin.
35
- * * `hair` &mdash;Applies 0.0625rem margin.
36
- * * Passing a number will apply a margin equal to the passed number divided by 4 in rem units. The minimum number value is 0 and the maximum is 24.
37
- */
38
- export declare type TypographyMarginOption = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'thin' | 'hair' | number;
39
- /**
40
- * @hidden
41
- */
42
- export declare const typographyMarginOptions: {
43
- xs: string;
44
- sm: string;
45
- md: string;
46
- lg: string;
47
- xl: string;
48
- thin: string;
49
- hair: string;
50
- };
51
- /**
52
- * @hidden
53
- */
54
- export declare const typographyMarginTopOptions: {
55
- xs: string;
56
- sm: string;
57
- md: string;
58
- lg: string;
59
- xl: string;
60
- thin: string;
61
- hair: string;
62
- };
63
- /**
64
- * @hidden
65
- */
66
- export declare const typographyMarginBottomOptions: {
67
- xs: string;
68
- sm: string;
69
- md: string;
70
- lg: string;
71
- xl: string;
72
- thin: string;
73
- hair: string;
74
- };
75
- /**
76
- * @hidden
77
- */
78
- export declare const typographyMarginLeftOptions: {
79
- xs: string;
80
- sm: string;
81
- md: string;
82
- lg: string;
83
- xl: string;
84
- thin: string;
85
- hair: string;
86
- };
87
- /**
88
- * @hidden
89
- */
90
- export declare const typographyMarginRightOptions: {
91
- xs: string;
92
- sm: string;
93
- md: string;
94
- lg: string;
95
- xl: string;
96
- thin: string;
97
- hair: string;
98
- };
99
- /**
100
- * The margin configuration for each side.
101
- * Passing a [TypographyMarginOption]({% slug api_typography_typographymarginoption %}) will set any of the built - in Kendo classes, which provide default margins in pixels or rems depending on the used theme.
102
- * Passing a number will apply a margin of 4 times the passed number in pixels, when using the Default or Material themes.
103
- * When using the Bootstrap theme, passing a number will apply a margin equal to the passed number divided by 4 in rem units.
104
- * The minimum number value is 0 and the maximum is 24.
105
- */
106
- export interface Margin {
107
- /**
108
- * The top margin.
109
- */
110
- top?: TypographyMarginOption | number;
111
- /**
112
- * The right margin.
113
- */
114
- right?: TypographyMarginOption | number;
115
- /**
116
- * The bottom margin.
117
- */
118
- bottom?: TypographyMarginOption | number;
119
- /**
120
- * The left margin.
121
- */
122
- left?: TypographyMarginOption | number;
123
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes