@eleven-labs/design-system 0.22.0 → 0.24.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 (61) hide show
  1. package/dist/components/Atoms/Button/Button.d.ts +3 -3
  2. package/dist/components/Atoms/Typography/Heading/Heading.d.ts +1 -1
  3. package/dist/components/Layout/Flex/Flex.d.ts +2 -2
  4. package/dist/components/Molecules/Blocks/CategoryEndingBlock/CategoryEndingBlock.d.ts +2 -2
  5. package/dist/components/Molecules/Blocks/CategoryIntroBlock/CategoryIntroBlock.d.ts +2 -2
  6. package/dist/components/Molecules/Blocks/HomeIntroBlock/HomeIntroBlock.d.ts +3 -3
  7. package/dist/components/Molecules/Cards/AuthorCard/AuthorCard.d.ts +1 -1
  8. package/dist/components/Molecules/Cards/ContactCard/ContactCard.d.ts +2 -3
  9. package/dist/components/Molecules/Cards/NewsletterCard/NewsletterCard.d.ts +2 -2
  10. package/dist/components/Molecules/Link/Link.d.ts +1 -1
  11. package/dist/components/Organisms/Autocomplete/AutocompleteResult/AutocompleteResult.d.ts +2 -2
  12. package/dist/components/Organisms/Blocks/LastArticlesBlock/LastArticlesBlock.d.ts +1 -1
  13. package/dist/components/Organisms/Blocks/LastTutorialsBlock/LastTutorialsBlock.d.ts +2 -2
  14. package/dist/constants/systemProps/flexItemSystemProps.d.ts +2 -0
  15. package/dist/constants/systemProps/flexOrGridItemSystemProps.d.ts +2 -0
  16. package/dist/constants/systemProps/flexOrGridSystemProps.d.ts +2 -0
  17. package/dist/constants/systemProps/flexSystemProps.d.ts +2 -0
  18. package/dist/constants/systemProps/index.d.ts +4 -2
  19. package/dist/constants/tokenVariables.d.ts +40 -80
  20. package/dist/helpers/systemPropsHelper/flexItemSystemClassName.d.ts +2 -0
  21. package/dist/helpers/systemPropsHelper/flexOrGridItemSystemClassName.d.ts +2 -0
  22. package/dist/helpers/systemPropsHelper/flexOrGridSystemClassName.d.ts +2 -0
  23. package/dist/helpers/systemPropsHelper/flexSystemClassName.d.ts +2 -0
  24. package/dist/helpers/systemPropsHelper/index.d.ts +4 -2
  25. package/dist/index.es.js +1631 -1678
  26. package/dist/index.umd.cjs +15 -15
  27. package/dist/pages/AuthorPage/AuthorPage.d.ts +3 -17
  28. package/dist/pages/AuthorPage/AuthorPageContent.d.ts +19 -0
  29. package/dist/pages/AuthorPage/index.d.ts +1 -0
  30. package/dist/pages/CategoryPage/CategoryPage.d.ts +4 -6
  31. package/dist/pages/CategoryPage/CategoryPageContent.d.ts +8 -0
  32. package/dist/pages/CategoryPage/index.d.ts +1 -0
  33. package/dist/pages/PostPage/PostPage.d.ts +3 -21
  34. package/dist/pages/PostPage/PostPageContent.d.ts +24 -0
  35. package/dist/pages/PostPage/index.d.ts +1 -0
  36. package/dist/pages/SearchPage/SearchPage.d.ts +4 -10
  37. package/dist/pages/SearchPage/SearchPageContent.d.ts +10 -0
  38. package/dist/pages/SearchPage/index.d.ts +1 -0
  39. package/dist/scss/abstracts/mixins/_component.scss +14 -0
  40. package/dist/scss/abstracts/mixins/_index.scss +2 -0
  41. package/dist/scss/abstracts/mixins/_system_classes.scss +14 -0
  42. package/dist/scss/abstracts/mixins/_utility-classes.scss +10 -4
  43. package/dist/scss/abstracts/variables/_token-variables.scss +25 -49
  44. package/dist/scss/abstracts/variables/_variables.scss +14 -14
  45. package/dist/style.css +1 -1
  46. package/dist/templates/index.d.ts +1 -0
  47. package/dist/types/SystemProps/FlexItemSystemProps.d.ts +11 -0
  48. package/dist/types/SystemProps/FlexOrGridItemSystemProps.d.ts +8 -0
  49. package/dist/types/SystemProps/FlexOrGridSystemProps.d.ts +27 -0
  50. package/dist/types/SystemProps/FlexSystemProps.d.ts +12 -0
  51. package/dist/types/SystemProps/LayoutSystemProps.d.ts +5 -13
  52. package/dist/types/SystemProps/SystemProps.d.ts +3 -3
  53. package/dist/types/SystemProps/index.d.ts +4 -2
  54. package/dist/types/tokenTypes.d.ts +2 -2
  55. package/package.json +1 -1
  56. package/dist/constants/systemProps/flexBoxSystemProps.d.ts +0 -2
  57. package/dist/constants/systemProps/hiddenSystemProps.d.ts +0 -2
  58. package/dist/helpers/systemPropsHelper/flexBoxSystemClassName.d.ts +0 -2
  59. package/dist/helpers/systemPropsHelper/hiddenSystemClassName.d.ts +0 -2
  60. package/dist/types/SystemProps/FlexBoxSystemProps.d.ts +0 -48
  61. package/dist/types/SystemProps/HiddenSystemProps.d.ts +0 -11
@@ -1,21 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { NewsletterCardProps } from '../../components/Molecules/Cards/NewsletterCard';
3
- export type SocialNetworkName = 'github' | 'twitter' | 'linkedin';
4
- export type AuthorPageProps = {
5
- author: {
6
- username: string;
7
- name: string;
8
- avatarImageUrl?: string;
9
- content: string;
10
- socialNetworks?: {
11
- name: SocialNetworkName;
12
- url: string;
13
- username: string;
14
- }[];
15
- };
16
- emptyAvatarImageUrl: string;
17
- title: React.ReactNode;
18
- postCardList: React.ReactNode;
3
+ import type { AuthorPageContentProps } from './AuthorPageContent';
4
+ export interface AuthorPageProps extends AuthorPageContentProps {
19
5
  newsletterCard: NewsletterCardProps;
20
- };
6
+ }
21
7
  export declare const AuthorPage: React.FC<AuthorPageProps>;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ export type SocialNetworkName = 'github' | 'twitter' | 'linkedin';
3
+ export type AuthorPageContentProps = {
4
+ author: {
5
+ username: string;
6
+ name: string;
7
+ avatarImageUrl?: string;
8
+ content: React.ReactNode;
9
+ socialNetworks?: {
10
+ name: SocialNetworkName;
11
+ url: string;
12
+ username: string;
13
+ }[];
14
+ };
15
+ emptyAvatarImageUrl: string;
16
+ title: React.ReactNode;
17
+ postCardList: React.ReactNode;
18
+ };
19
+ export declare const AuthorPageContent: React.FC<AuthorPageContentProps>;
@@ -1 +1,2 @@
1
1
  export * from './AuthorPage';
2
+ export * from './AuthorPageContent';
@@ -1,11 +1,9 @@
1
1
  import React from 'react';
2
- import type { CategoryEndingBlockProps, CategoryIntroBlockProps } from '../../components';
2
+ import type { CategoryIntroBlockProps } from '../../components';
3
3
  import type { NewsletterCardProps } from '../../components/Molecules/Cards/NewsletterCard';
4
- export type CategoryPageProps = {
4
+ import type { CategoryPageContentProps } from './CategoryPageContent';
5
+ export interface CategoryPageProps extends CategoryPageContentProps {
5
6
  categoryIntroBlock: CategoryIntroBlockProps;
6
- categoryEndingBlock: CategoryEndingBlockProps;
7
- title: React.ReactNode;
8
- postCardList: React.ReactNode;
9
7
  newsletterCard: NewsletterCardProps;
10
- };
8
+ }
11
9
  export declare const CategoryPage: React.FC<CategoryPageProps>;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { CategoryEndingBlockProps } from '../../components';
3
+ export type CategoryPageContentProps = {
4
+ categoryEndingBlock?: CategoryEndingBlockProps;
5
+ title: React.ReactNode;
6
+ postCardList: React.ReactNode;
7
+ };
8
+ export declare const CategoryPageContent: React.FC<CategoryPageContentProps>;
@@ -1 +1,2 @@
1
1
  export * from './CategoryPage';
2
+ export * from './CategoryPageContent';
@@ -1,25 +1,7 @@
1
1
  import React from 'react';
2
- import type { BreadcrumbProps, ContactCardProps, SummaryCardProps } from '../../components';
3
- import type { ComponentPropsWithoutRef } from '../../types';
4
- import type { PostFooterProps } from './PostFooter';
5
- import type { PostHeaderProps } from './PostHeader';
6
- import type { RelatedPostListProps } from './RelatedPostList';
7
- export declare const postPageVariant: readonly ["article", "tutorial"];
8
- export type PostPageVariantType = (typeof postPageVariant)[number];
9
- export interface PostPageProps {
10
- variant: PostPageVariantType;
11
- breadcrumb: BreadcrumbProps;
12
- header: Omit<PostHeaderProps, 'contentType'>;
13
- children: React.ReactNode;
14
- footer: PostFooterProps;
15
- contactCard: ContactCardProps;
16
- relatedPostList: RelatedPostListProps;
2
+ import type { SummaryCardProps } from '../../components';
3
+ import type { PostPageContentProps } from './PostPageContent';
4
+ export interface PostPageProps extends PostPageContentProps {
17
5
  summary: SummaryCardProps;
18
- previousLink?: {
19
- label: string;
20
- } & ComponentPropsWithoutRef<'a'>;
21
- nextLink?: {
22
- label: string;
23
- } & ComponentPropsWithoutRef<'a'>;
24
6
  }
25
7
  export declare const PostPage: React.FC<PostPageProps>;
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import type { BreadcrumbProps, ContactCardProps } from '../../components';
3
+ import type { ComponentPropsWithoutRef } from '../../types';
4
+ import type { PostFooterProps } from './PostFooter';
5
+ import type { PostHeaderProps } from './PostHeader';
6
+ import type { RelatedPostListProps } from './RelatedPostList';
7
+ export declare const postPageVariant: readonly ["article", "tutorial"];
8
+ export type PostPageVariantType = (typeof postPageVariant)[number];
9
+ export interface PostPageContentProps {
10
+ variant: PostPageVariantType;
11
+ breadcrumb: BreadcrumbProps;
12
+ header: Omit<PostHeaderProps, 'contentType'>;
13
+ children: React.ReactNode;
14
+ footer: PostFooterProps;
15
+ contactCard: ContactCardProps;
16
+ relatedPostList: RelatedPostListProps;
17
+ previousLink?: {
18
+ label: string;
19
+ } & ComponentPropsWithoutRef<'a'>;
20
+ nextLink?: {
21
+ label: string;
22
+ } & ComponentPropsWithoutRef<'a'>;
23
+ }
24
+ export declare const PostPageContent: React.FC<PostPageContentProps>;
@@ -1 +1,2 @@
1
1
  export * from './PostPage';
2
+ export * from './PostPageContent';
@@ -1,12 +1,6 @@
1
1
  import React from 'react';
2
- import type { NotFoundBlockProps } from '../../components';
3
- import { type NewsletterCardProps } from '../../components/Molecules/Cards/NewsletterCard';
4
- export type SearchPageProps = {
5
- title: React.ReactNode;
6
- description: React.ReactNode;
7
- postCardList: React.ReactNode;
8
- newsletterCard: NewsletterCardProps;
9
- searchNotFound?: NotFoundBlockProps;
10
- isLoading?: boolean;
11
- };
2
+ import type { SearchPageContentProps } from './SearchPageContent';
3
+ export interface SearchPageProps extends SearchPageContentProps {
4
+ sidebar: React.ReactNode;
5
+ }
12
6
  export declare const SearchPage: React.FC<SearchPageProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { NotFoundBlockProps } from '../../components';
3
+ export type SearchPageContentProps = {
4
+ title: React.ReactNode;
5
+ description: React.ReactNode;
6
+ postCardList: React.ReactNode;
7
+ searchNotFound?: NotFoundBlockProps;
8
+ isLoading?: boolean;
9
+ };
10
+ export declare const SearchPageContent: React.FC<SearchPageContentProps>;
@@ -1 +1,2 @@
1
1
  export * from './SearchPage';
2
+ export * from './SearchPageContent';
@@ -0,0 +1,14 @@
1
+ @use 'sass:map';
2
+ @use '../variables' as *;
3
+
4
+ @mixin component($component-name, $config) {
5
+ @each $component-variant-name, $properties in $config {
6
+ @if $component-variant-name != 'base' {
7
+ .#{$component-name}-#{$component-variant-name} {
8
+ @each $property-name, $property-value in map.merge(map.get($config, 'base'), $properties) {
9
+ #{$property-name}: #{$property-value};
10
+ }
11
+ }
12
+ }
13
+ }
14
+ }
@@ -1,2 +1,4 @@
1
1
  @forward 'create-media-queries';
2
2
  @forward 'utility-classes';
3
+ @forward 'system_classes';
4
+ @forward 'component';
@@ -0,0 +1,14 @@
1
+ @use '../functions/map-get-strict' as *;
2
+ @use './utility-classes' as *;
3
+
4
+ @mixin system-classes($prop-list) {
5
+ @each $prop-name, $options in $prop-list {
6
+ @include utility-classes(map-get-strict($options, 'property-css'), map-get-strict($options, 'value-list'), map-get-strict($options, 'prefix-class-name'));
7
+ }
8
+ }
9
+
10
+ @mixin system-classes-with-breakpoints($prop-list) {
11
+ @each $prop-name, $options in $prop-list {
12
+ @include utility-classes-with-breakpoints(map-get-strict($options, 'property-css'), map-get-strict($options, 'value-list'), map-get-strict($options, 'prefix-class-name'));
13
+ }
14
+ }
@@ -2,10 +2,11 @@
2
2
  @use './create-media-queries' as *;
3
3
  @use '../variables' as *;
4
4
 
5
- @mixin utility-classes($prefix-class-name, $property-css, $list) {
5
+ @mixin utility-classes($property-css, $list, $prefix-class-name: null) {
6
6
  @each $name, $value in $list {
7
+ $class-name: if($prefix-class-name, #{$prefix-class-name}-#{$name}, #{$name});
7
8
  .#{$prefix-class-name}-#{$name} {
8
- @if type-of($property-css) == 'list' {
9
+ @if type-of($property-css) == 'list' {
9
10
  @each $current-property-css in $property-css {
10
11
  #{$current-property-css}: #{$value};
11
12
  }
@@ -16,11 +17,16 @@
16
17
  }
17
18
  }
18
19
 
19
- @mixin utility-classes-with-modifiers($prefix-class-name, $property-css, $list) {
20
+ @mixin utility-classes-with-breakpoints($property-css, $list, $prefix-class-name: null) {
20
21
  @each $breakpoint-name, $breakpoint-value in map.get($token-variables, 'breakpoint') {
21
22
  @include create-media-queries($breakpoint-name) {
22
23
  @each $name, $value in $list {
23
- .#{$prefix-class-name}-#{$name}\@#{$breakpoint-name} {
24
+ $class-name: if(
25
+ $prefix-class-name,
26
+ #{$prefix-class-name}-#{$name}\@#{$breakpoint-name},
27
+ #{$name}\@#{$breakpoint-name}
28
+ );
29
+ .#{$class-name} {
24
30
  @if type-of($property-css) == 'list' {
25
31
  @each $current-property-css in $property-css {
26
32
  #{$current-property-css}: #{$value};
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Wed, 17 Jan 2024 08:04:41 GMT
3
+ * Generated on Fri, 19 Jan 2024 17:00:47 GMT
4
4
  */
5
5
 
6
6
  $token-variables: (
@@ -9,17 +9,6 @@ $token-variables: (
9
9
  'heading': var(--font-family-heading),
10
10
  'blockquote': var(--font-family-blockquote)
11
11
  ),
12
- 'font-size': (
13
- 'xxs': var(--font-size-xxs),
14
- 'xs': var(--font-size-xs),
15
- 's': var(--font-size-s),
16
- 'm': var(--font-size-m),
17
- 'l': var(--font-size-l),
18
- 'xl': var(--font-size-xl),
19
- 'xxl': var(--font-size-xxl),
20
- 'xxl-2': var(--font-size-xxl-2),
21
- 'xxl-3': var(--font-size-xxl-3)
22
- ),
23
12
  'font-weight': (
24
13
  'regular': var(--font-weight-regular),
25
14
  'medium': var(--font-weight-medium),
@@ -30,11 +19,24 @@ $token-variables: (
30
19
  'heading': (
31
20
  'base': (
32
21
  'font-family': var(--typography-heading-base-font-family),
33
- 'line-height': var(--typography-heading-base-line-height),
34
- 'font-weight': var(--typography-heading-base-font-weight)
22
+ 'line-height': var(--typography-heading-base-line-height)
23
+ ),
24
+ 's': (
25
+ 'font-size': var(--typography-heading-s-font-size),
26
+ 'font-weight': var(--typography-heading-s-font-weight),
27
+ 'text-transform': var(--typography-heading-s-text-transform)
28
+ ),
29
+ 'm': (
30
+ 'font-size': var(--typography-heading-m-font-size),
31
+ 'font-weight': var(--typography-heading-m-font-weight)
32
+ ),
33
+ 'l': (
34
+ 'font-size': var(--typography-heading-l-font-size)
35
35
  ),
36
36
  'xl': (
37
- 'font-weight': var(--typography-heading-xl-font-weight)
37
+ 'font-size': var(--typography-heading-xl-font-size),
38
+ 'font-weight': var(--typography-heading-xl-font-weight),
39
+ 'text-transform': var(--typography-heading-xl-text-transform)
38
40
  )
39
41
  ),
40
42
  'text': (
@@ -42,42 +44,16 @@ $token-variables: (
42
44
  'line-height': var(--typography-text-base-line-height)
43
45
  ),
44
46
  'xs': (
45
- 'line-height': var(--typography-text-xs-line-height)
47
+ 'font-size': var(--typography-text-xs-font-size),
48
+ 'icon-size': var(--typography-text-xs-icon-size)
46
49
  ),
47
- 'm': (
48
- 'line-height': var(--typography-text-m-line-height)
49
- )
50
- )
51
- ),
52
- 'mobile': (
53
- 'typography': (
54
- 'heading': (
55
- 's': (
56
- 'font-size': var(--mobile-typography-heading-s-font-size)
57
- ),
58
- 'm': (
59
- 'font-size': var(--mobile-typography-heading-m-font-size)
60
- ),
61
- 'l': (
62
- 'font-size': var(--mobile-typography-heading-l-font-size)
63
- ),
64
- 'xl': (
65
- 'font-size': var(--mobile-typography-heading-xl-font-size)
66
- )
50
+ 's': (
51
+ 'font-size': var(--typography-text-s-font-size),
52
+ 'icon-size': var(--typography-text-s-icon-size)
67
53
  ),
68
- 'text': (
69
- 'xs': (
70
- 'font-size': var(--mobile-typography-text-xs-font-size),
71
- 'icon-size': var(--mobile-typography-text-xs-icon-size)
72
- ),
73
- 's': (
74
- 'font-size': var(--mobile-typography-text-s-font-size),
75
- 'icon-size': var(--mobile-typography-text-s-icon-size)
76
- ),
77
- 'm': (
78
- 'font-size': var(--mobile-typography-text-m-font-size),
79
- 'icon-size': var(--mobile-typography-text-m-icon-size)
80
- )
54
+ 'm': (
55
+ 'font-size': var(--typography-text-m-font-size),
56
+ 'icon-size': var(--typography-text-m-icon-size)
81
57
  )
82
58
  )
83
59
  ),
@@ -1,23 +1,23 @@
1
1
 
2
2
  /**
3
3
  * Do not edit directly
4
- * Generated on Wed, 17 Jan 2024 08:04:41 GMT
4
+ * Generated on Fri, 19 Jan 2024 17:00:47 GMT
5
5
  */
6
6
 
7
- $white: #FFF !default;
8
- $black: #000 !default;
9
- $ultra-dark-grey: #333333 !default;
10
- $dark-grey: #757575 !default;
11
- $grey: #9B9B9B !default;
12
- $light-grey: #C4C4C4 !default;
13
- $ultra-light-grey: #EDEDED !default;
14
- $accent: #F8FA9B !default; // A distinct accent color for content.
15
- $info: #DD3156 !default; // Used to provide additional information to the user without conveying any particular level of importance.
16
- $secondary-dark: #C5D3E9 !default;
17
- $secondary: #E9F1F8 !default;
18
- $primary-very-dark: #093670 !default;
19
- $primary-dark: #194180 !default;
20
7
  $primary: #0A4084 !default;
8
+ $primary-dark: #194180 !default;
9
+ $primary-very-dark: #093670 !default;
10
+ $secondary: #E9F1F8 !default;
11
+ $secondary-dark: #C5D3E9 !default;
12
+ $info: #DD3156 !default; // Used to provide additional information to the user without conveying any particular level of importance.
13
+ $accent: #F8FA9B !default; // A distinct accent color for content.
14
+ $ultra-light-grey: #EDEDED !default;
15
+ $light-grey: #C4C4C4 !default;
16
+ $grey: #9B9B9B !default;
17
+ $dark-grey: #757575 !default;
18
+ $ultra-dark-grey: #333333 !default;
19
+ $black: #000 !default;
20
+ $white: #FFF !default;
21
21
 
22
22
  $variables: (
23
23
  'color': (