magneto365.ui 2.70.4 → 2.71.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 (66) hide show
  1. package/dist/cjs/css/magneto.ui.lib.min.css +1 -1
  2. package/dist/cjs/index.js +27 -35
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/types/components/UI/atoms/Typography/Typography.component.d.ts +4 -4
  5. package/dist/cjs/types/components/UI/atoms/Typography/Typography.interface.d.ts +17 -39
  6. package/dist/cjs/types/components/UI/atoms/Typography/children/TypographyLink/TypographyLink.component.d.ts +4 -2
  7. package/dist/cjs/types/components/UI/atoms/Typography/children/TypographyParagraph/TypographyParagraph.component.d.ts +4 -2
  8. package/dist/cjs/types/components/UI/atoms/Typography/children/TypographyText/TypographyText.component.d.ts +4 -2
  9. package/dist/cjs/types/components/UI/atoms/Typography/children/TypographyTitle/TypographyTitle.component.d.ts +4 -1
  10. package/dist/cjs/types/components/docs/DesignSystem/DesignSystem.component.d.ts +2 -0
  11. package/dist/cjs/types/components/docs/DesignSystem/DesignSystem.constant.d.ts +3 -0
  12. package/dist/cjs/types/components/docs/DesignSystem/children/DesignSystemBorder/DesignSystemBorder.component.d.ts +2 -0
  13. package/dist/cjs/types/components/docs/DesignSystem/children/DesignSystemColor/DesignSystemColor.component.d.ts +2 -0
  14. package/dist/cjs/types/components/docs/DesignSystem/children/DesignSystemGap/DesignSystemGap.component.d.ts +2 -0
  15. package/dist/cjs/types/components/docs/DesignSystem/children/DesignSystemMargin/DesignSystemMargin.component.d.ts +2 -0
  16. package/dist/cjs/types/components/docs/DesignSystem/children/DesignSystemOpacity/DesignSystemOpacity.component.d.ts +2 -0
  17. package/dist/cjs/types/components/docs/DesignSystem/children/DesignSystemPadding/DesignSystemPadding.component.d.ts +2 -0
  18. package/dist/cjs/types/components/docs/DesignSystem/children/DesignSystemRadius/DesignSystemRadius.component.d.ts +2 -0
  19. package/dist/cjs/types/components/docs/DesignSystem/children/DesignSystemScale/DesignSystemScale.component.d.ts +2 -0
  20. package/dist/cjs/types/components/docs/DesignSystem/children/DesignSystemScreen/DesignSystemScreen.component.d.ts +2 -0
  21. package/dist/cjs/types/components/docs/DesignSystem/children/DesignSystemShadow/DesignSystemShadow.component.d.ts +2 -0
  22. package/dist/cjs/types/components/docs/DesignSystem/children/DesignSystemText/DesignSystemText.component.d.ts +2 -0
  23. package/dist/cjs/types/components/docs/DesignSystem/children/DesignSystemUtilityClass/DesignSystemUtilityClass.component.d.ts +2 -0
  24. package/dist/cjs/types/components/docs/DesignSystem/children/index.d.ts +12 -0
  25. package/dist/cjs/types/index.d.ts +1 -0
  26. package/dist/cjs/types/shared/tokens/index.d.ts +124 -0
  27. package/dist/esm/css/magneto.ui.lib.min.css +1 -1
  28. package/dist/esm/index.js +29 -37
  29. package/dist/esm/index.js.map +1 -1
  30. package/dist/esm/types/components/UI/atoms/Typography/Typography.component.d.ts +4 -4
  31. package/dist/esm/types/components/UI/atoms/Typography/Typography.interface.d.ts +17 -39
  32. package/dist/esm/types/components/UI/atoms/Typography/children/TypographyLink/TypographyLink.component.d.ts +4 -2
  33. package/dist/esm/types/components/UI/atoms/Typography/children/TypographyParagraph/TypographyParagraph.component.d.ts +4 -2
  34. package/dist/esm/types/components/UI/atoms/Typography/children/TypographyText/TypographyText.component.d.ts +4 -2
  35. package/dist/esm/types/components/UI/atoms/Typography/children/TypographyTitle/TypographyTitle.component.d.ts +4 -1
  36. package/dist/esm/types/components/docs/DesignSystem/DesignSystem.component.d.ts +2 -0
  37. package/dist/esm/types/components/docs/DesignSystem/DesignSystem.constant.d.ts +3 -0
  38. package/dist/esm/types/components/docs/DesignSystem/children/DesignSystemBorder/DesignSystemBorder.component.d.ts +2 -0
  39. package/dist/esm/types/components/docs/DesignSystem/children/DesignSystemColor/DesignSystemColor.component.d.ts +2 -0
  40. package/dist/esm/types/components/docs/DesignSystem/children/DesignSystemGap/DesignSystemGap.component.d.ts +2 -0
  41. package/dist/esm/types/components/docs/DesignSystem/children/DesignSystemMargin/DesignSystemMargin.component.d.ts +2 -0
  42. package/dist/esm/types/components/docs/DesignSystem/children/DesignSystemOpacity/DesignSystemOpacity.component.d.ts +2 -0
  43. package/dist/esm/types/components/docs/DesignSystem/children/DesignSystemPadding/DesignSystemPadding.component.d.ts +2 -0
  44. package/dist/esm/types/components/docs/DesignSystem/children/DesignSystemRadius/DesignSystemRadius.component.d.ts +2 -0
  45. package/dist/esm/types/components/docs/DesignSystem/children/DesignSystemScale/DesignSystemScale.component.d.ts +2 -0
  46. package/dist/esm/types/components/docs/DesignSystem/children/DesignSystemScreen/DesignSystemScreen.component.d.ts +2 -0
  47. package/dist/esm/types/components/docs/DesignSystem/children/DesignSystemShadow/DesignSystemShadow.component.d.ts +2 -0
  48. package/dist/esm/types/components/docs/DesignSystem/children/DesignSystemText/DesignSystemText.component.d.ts +2 -0
  49. package/dist/esm/types/components/docs/DesignSystem/children/DesignSystemUtilityClass/DesignSystemUtilityClass.component.d.ts +2 -0
  50. package/dist/esm/types/components/docs/DesignSystem/children/index.d.ts +12 -0
  51. package/dist/esm/types/index.d.ts +1 -0
  52. package/dist/esm/types/shared/tokens/index.d.ts +124 -0
  53. package/dist/index.d.ts +148 -45
  54. package/dist/tokens/_border.scss +14 -0
  55. package/dist/tokens/_color.scss +570 -0
  56. package/dist/tokens/_gap.scss +28 -0
  57. package/dist/tokens/_index.scss +12 -0
  58. package/dist/tokens/_margin.scss +32 -0
  59. package/dist/tokens/_opacity.scss +32 -0
  60. package/dist/tokens/_padding.scss +28 -0
  61. package/dist/tokens/_radius.scss +28 -0
  62. package/dist/tokens/_scale.scss +466 -0
  63. package/dist/tokens/_screen.scss +22 -0
  64. package/dist/tokens/_shadow.scss +18 -0
  65. package/dist/tokens/_text.scss +20 -0
  66. package/package.json +7 -5
@@ -3,8 +3,8 @@
3
3
  * Atom UI of typography. It includes titles, paragraphs, texts and links.
4
4
  */
5
5
  export declare const Typography: {
6
- Link: import("react").FC<import("./children").ITypographyLink>;
7
- Paragraph: import("react").FC<import("./children").TTypographyParagraph>;
8
- Text: import("react").FC<import("./children").ITypographyText>;
9
- Title: import("react").FC<import("./children").ITypographyTitle>;
6
+ Link: import("react").ForwardRefExoticComponent<import("./Typography.interface").ITypographyBase & import("react").AnchorHTMLAttributes<HTMLAnchorElement> & import("react").RefAttributes<HTMLAnchorElement>>;
7
+ Paragraph: import("react").ForwardRefExoticComponent<import("./Typography.interface").ITypographyBase & import("react").HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLParagraphElement>>;
8
+ Text: import("react").ForwardRefExoticComponent<import("./Typography.interface").ITypographyBase & import("react").HTMLAttributes<HTMLSpanElement> & import("react").RefAttributes<HTMLSpanElement>>;
9
+ Title: import("react").ForwardRefExoticComponent<import("./children").ITypographyTitle & import("react").RefAttributes<HTMLHeadingElement>>;
10
10
  };
@@ -1,15 +1,17 @@
1
1
  /// <reference types="react" />
2
+ import { MagnetoUIColor, MagnetoUIText } from 'magneto-ui';
2
3
  export interface ITypographyBase extends Pick<React.HTMLAttributes<HTMLElement>, 'className' | 'style'> {
3
4
  /** If `true`, the text is rendered in a monospaced font like code. */
4
5
  code?: boolean;
5
6
  /**
6
- * Text color. This is in beta and might change in the future.
7
+ * Text color.
7
8
  *
8
- * @beta
9
9
  * @default "black"
10
- * @example "gray" | "black" | "white" | "green" | "blue"
10
+ * @example "transparent" | "green-50" | "grey-200" | "red-100"
11
+ * @see MagnetoUIColor
12
+ * @inheritdoc
11
13
  */
12
- color?: TTypographyFontColor;
14
+ color?: MagnetoUIColor;
13
15
  /** If `true`, the text is displayed with a strikethrough. */
14
16
  delete?: boolean;
15
17
  /** If `true`, the text is displayed in italics. */
@@ -21,21 +23,19 @@ export interface ITypographyBase extends Pick<React.HTMLAttributes<HTMLElement>,
21
23
  /**
22
24
  * Font size. When a number is provided, the unit is `px` and line height is calculated automatically adding 4px.
23
25
  *
24
- * @default "md"
26
+ * @default "lg"
25
27
  * @example
26
- * - `"xs"` → `10px`
27
- * - `"sm"` → `12px`
28
- * - `"md"` → `14px`
29
- * - `"lg"` → `16px`
30
- * - `"xl"` → `18px`
31
- * - `"xl-2"` → `20px`
32
- * - `"xl-3"` → `22px`
33
- * - `"xl-4"` → `24px`
34
- * - `"xl-5"` → `26px`
35
- * - `"xl-6"` → `28px`
36
- * - `"xl-7"` → `30px`
28
+ * - `"sm"` → `0.5rem`
29
+ * - `"md"` → `0.75rem`
30
+ * - `"lg"` → `1rem`
31
+ * - `"xl"` → `1.25rem`
32
+ * - `"2xl"` → `1.5rem`
33
+ * - `"3xl"` → `1.75rem`
34
+ * - `"4xl"` → `2rem`
35
+ * @see MagnetoUIText
36
+ * @inheritdoc
37
37
  */
38
- size?: ITypographyFontSize | number;
38
+ size?: MagnetoUIText | number;
39
39
  /** If `true`, the text is displayed in bold. */
40
40
  strong?: boolean;
41
41
  /** If `true`, the text is underlined. */
@@ -63,20 +63,6 @@ export interface ITypographyEllipsis {
63
63
  /** Number of lines before applying ellipsis. */
64
64
  rows?: number;
65
65
  }
66
- export declare enum ETypographyFontSize {
67
- XS = "xs",
68
- SM = "sm",
69
- MD = "md",
70
- LG = "lg",
71
- XL = "xl",
72
- XL2 = "xl-2",
73
- XL3 = "xl-3",
74
- XL4 = "xl-4",
75
- XL5 = "xl-5",
76
- XL6 = "xl-6",
77
- XL7 = "xl-7"
78
- }
79
- export declare type ITypographyFontSize = `${ETypographyFontSize}`;
80
66
  export declare enum ETypographyFontWeight {
81
67
  THIN = "thin",
82
68
  EXTRA_LIGHT = "extra-light",
@@ -89,11 +75,3 @@ export declare enum ETypographyFontWeight {
89
75
  BLACK = "black"
90
76
  }
91
77
  export declare type TTypographyFontWeight = `${ETypographyFontWeight}`;
92
- export declare enum ETypographyFontColor {
93
- GRAY = "gray",
94
- BLACK = "black",
95
- WHITE = "white",
96
- GREEN = "green",
97
- BLUE = "blue"
98
- }
99
- export declare type TTypographyFontColor = `${ETypographyFontColor}`;
@@ -1,3 +1,5 @@
1
1
  import React from 'react';
2
- import { ITypographyLink } from './TypographyLink.interface';
3
- export declare const TypographyLink: React.FC<ITypographyLink>;
2
+ /**
3
+ * Atom UI child component of Typography
4
+ */
5
+ export declare const TypographyLink: React.ForwardRefExoticComponent<import("../..").ITypographyBase & React.AnchorHTMLAttributes<HTMLAnchorElement> & React.RefAttributes<HTMLAnchorElement>>;
@@ -1,3 +1,5 @@
1
1
  import React from 'react';
2
- import { TTypographyParagraph } from './TypographyParagraph.interface';
3
- export declare const TypographyParagraph: React.FC<TTypographyParagraph>;
2
+ /**
3
+ * Atom UI child component of Typography
4
+ */
5
+ export declare const TypographyParagraph: React.ForwardRefExoticComponent<import("../..").ITypographyBase & React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
@@ -1,3 +1,5 @@
1
1
  import React from 'react';
2
- import { ITypographyText } from './TypographyText.interface';
3
- export declare const TypographyText: React.FC<ITypographyText>;
2
+ /**
3
+ * Atom UI child component of Typography
4
+ */
5
+ export declare const TypographyText: React.ForwardRefExoticComponent<import("../..").ITypographyBase & React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
@@ -1,3 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ITypographyTitle } from './TypographyTitle.interface';
3
- export declare const TypographyTitle: React.FC<ITypographyTitle>;
3
+ /**
4
+ * Atom UI child component of Typography
5
+ */
6
+ export declare const TypographyTitle: React.ForwardRefExoticComponent<ITypographyTitle & React.RefAttributes<HTMLHeadingElement>>;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DesignSystem: React.FC<{}>;
@@ -0,0 +1,3 @@
1
+ export declare const flattenTokens: (obj: Record<string, any>, prefix?: string[]) => [string, string][];
2
+ export declare const evaluateCalc: (value: string) => string;
3
+ export declare const resolveValue: (input: string) => string;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DesignSystemBorder: React.FC<{}>;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DesignSystemColor: React.FC<{}>;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DesignSystemGap: React.FC<{}>;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DesignSystemMargin: React.FC<{}>;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DesignSystemOpacity: React.FC<{}>;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DesignSystemPadding: React.FC<{}>;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DesignSystemRadius: React.FC<{}>;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DesignSystemScale: React.FC<{}>;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DesignSystemScreen: React.FC<{}>;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DesignSystemShadow: React.FC<{}>;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DesignSystemText: React.FC<{}>;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DesignSystemUtilityClass: React.FC<{}>;
@@ -0,0 +1,12 @@
1
+ export { DesignSystemBorder } from './DesignSystemBorder/DesignSystemBorder.component';
2
+ export { DesignSystemColor } from './DesignSystemColor/DesignSystemColor.component';
3
+ export { DesignSystemGap } from './DesignSystemGap/DesignSystemGap.component';
4
+ export { DesignSystemMargin } from './DesignSystemMargin/DesignSystemMargin.component';
5
+ export { DesignSystemOpacity } from './DesignSystemOpacity/DesignSystemOpacity.component';
6
+ export { DesignSystemPadding } from './DesignSystemPadding/DesignSystemPadding.component';
7
+ export { DesignSystemRadius } from './DesignSystemRadius/DesignSystemRadius.component';
8
+ export { DesignSystemScale } from './DesignSystemScale/DesignSystemScale.component';
9
+ export { DesignSystemScreen } from './DesignSystemScreen/DesignSystemScreen.component';
10
+ export { DesignSystemShadow } from './DesignSystemShadow/DesignSystemShadow.component';
11
+ export { DesignSystemText } from './DesignSystemText/DesignSystemText.component';
12
+ export { DesignSystemUtilityClass } from './DesignSystemUtilityClass/DesignSystemUtilityClass.component';
@@ -6,3 +6,4 @@ export * from './components/UI/organism';
6
6
  export * from './components/UI/page';
7
7
  export * from './components/UI/template';
8
8
  export * from './components/hoc';
9
+ export * from './shared/tokens';
@@ -0,0 +1,124 @@
1
+ /**
2
+ * @description Border SCSS vars used to define border width consistently across components.
3
+ * @example ```scss
4
+ * .card {
5
+ * border: $border-1 solid $color-grey-50;
6
+ * }
7
+ * ```
8
+ * @category visual
9
+ * @tags border, style, width, outline, visual
10
+ */
11
+ export declare type MagnetoUIBorder = '1' | '2' | 'inherit' | 'min';
12
+ /**
13
+ * @description Color SCC vars used to maintain brand and accessibility standards across the UI.
14
+ * @example ```scss
15
+ * .button {
16
+ * background-color: $color-red-300;
17
+ * color: $color-grey-50;
18
+ * }
19
+ * ```
20
+ * @category theme
21
+ * @tags color, theme, palette, branding, accessibility
22
+ */
23
+ export declare type MagnetoUIColor = 'transparent' | 'inherit' | 'current' | 'blue-dark-50' | 'blue-dark-100' | 'blue-dark-200' | 'blue-dark-300' | 'blue-dark-400' | 'blue-dark-500' | 'blue-light-50' | 'blue-light-100' | 'blue-light-200' | 'blue-light-300' | 'blue-light-400' | 'blue-light-500' | 'green-50' | 'green-100' | 'green-200' | 'green-300' | 'green-400' | 'green-500' | 'green-600' | 'grey-50' | 'grey-100' | 'grey-200' | 'grey-300' | 'grey-400' | 'grey-500' | 'grey-600' | 'grey-700' | 'grey-800' | 'grey-900' | 'red-50' | 'red-100' | 'red-200' | 'red-300' | 'yellow-50' | 'yellow-100' | 'yellow-200' | 'yellow-300';
24
+ /**
25
+ * @description Spacing SCC vars for CSS `gap` properties. Useful in layout systems based on grid or flexbox.
26
+ * @example ```scss
27
+ * .container {
28
+ * gap: $gap-md;
29
+ * }
30
+ * ```
31
+ * @category layout
32
+ * @tags spacing, gap, layout, grid, flexbox
33
+ */
34
+ export declare type MagnetoUIGap = 'inherit' | 'min' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | 'full';
35
+ /**
36
+ * @description Spacing SCCS vars used for setting margin around elements for consistent layout spacing.
37
+ * @example ```scss
38
+ * .card {
39
+ * margin: $margin-sm;
40
+ * }
41
+ * ```
42
+ * @category spacing
43
+ * @tags spacing, margin, layout, spacing-system
44
+ */
45
+ export declare type MagnetoUIMargin = 'inherit' | 'none' | 'auto' | 'min' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | 'full';
46
+ /**
47
+ * @description Opacity SCC vars used to define transparency levels for elements and UI states.
48
+ * @example ```scss
49
+ * .overlay {
50
+ * opacity: $opacity-70;
51
+ * }
52
+ * ```
53
+ * @category visual
54
+ * @tags opacity, transparency, visibility, visual
55
+ */
56
+ export declare type MagnetoUIOpacity = '10' | '12' | '20' | '30' | '40' | '50' | '60' | '70' | '80' | '90' | 'inherit' | 'min' | 'full';
57
+ /**
58
+ * @description Spacing SCCS vars used for internal spacing (padding) inside elements.
59
+ * @example ```scss
60
+ * .card {
61
+ * padding: $padding-lg;
62
+ * }
63
+ * ```
64
+ * @category spacing
65
+ * @tags spacing, padding, layout, box-model
66
+ */
67
+ export declare type MagnetoUIPadding = 'inherit' | 'min' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | 'full';
68
+ /**
69
+ * @description Radius SCSS vars used to define consistent border-radius values across components.
70
+ * @example ```scss
71
+ * .button {
72
+ * border-radius: $radius-md;
73
+ * }
74
+ * ```
75
+ * @category visual
76
+ * @tags radius, border-radius, rounding, shape, visual
77
+ */
78
+ export declare type MagnetoUIRadius = 'inherit' | 'min' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | 'full';
79
+ /**
80
+ * @description Scale SCSS vars for handling responsive designs.
81
+ * @example ```scss
82
+ * .icon:hover {
83
+ * transform: scale($scale-rem-md);
84
+ * }
85
+ * ```
86
+ * @category motion
87
+ * @tags scale, transform, animation, motion
88
+ */
89
+ export declare type MagnetoUIScale = 'inherit' | 'none' | 'auto' | 'full' | 'min' | 'px-base' | 'px-2xs' | 'px-xs' | 'px-sm' | 'px-md' | 'px-lg' | 'px-xl' | 'px-2xl' | 'px-3xl' | 'px-4xl' | 'px-container-2xs' | 'px-container-xs' | 'px-container-sm' | 'px-container-md' | 'px-container-lg' | 'px-container-xl' | 'px-container-2xl' | 'px-container-3xl' | 'rem-2xs' | 'rem-xs' | 'rem-sm' | 'rem-md' | 'rem-lg' | 'rem-xl' | 'rem-2xl' | 'rem-3xl' | 'rem-4xl' | 'rem-container-2xs' | 'rem-container-xs' | 'rem-container-sm' | 'rem-container-md' | 'rem-container-lg' | 'rem-container-xl' | 'rem-container-2xl' | 'rem-container-3xl';
90
+ /**
91
+ * @description Breakpoint SCSS vars used for media queries and responsive layout control.
92
+ * @example ```scss
93
+ * @media screen and (min-width: $screen-md) {
94
+ * .sidebar {
95
+ * display: block;
96
+ * }
97
+ * }
98
+ * ```
99
+ * @category responsive
100
+ * @tags breakpoint, media query, responsive, screen
101
+ */
102
+ export declare type MagnetoUIScreen = '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
103
+ /**
104
+ * @description Shadow SCSS vars for consistent elevation and depth effects in components.
105
+ * @example ```scss
106
+ * .card {
107
+ * box-shadow: $shadow-10;
108
+ * }
109
+ * ```
110
+ * @category visual
111
+ * @tags shadow, elevation, depth, box-shadow
112
+ */
113
+ export declare type MagnetoUIShadow = '10' | '20' | '30' | 'inherit' | 'none';
114
+ /**
115
+ * @description Text SCSS vars for consistent font sizes.
116
+ * @example ```scss
117
+ * .title {
118
+ * font-size: $text-xl;
119
+ * }
120
+ * ```
121
+ * @category typography
122
+ * @tags text, typography, font, size, weight, line-height
123
+ */
124
+ export declare type MagnetoUIText = 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl';