@lidofinance/lido-app-ui 1.14.0 → 1.15.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 (142) hide show
  1. package/README.md +22 -1
  2. package/dist/README.md +22 -1
  3. package/dist/cjs/breadcrumbs/Breadcrumbs.cjs +10 -3
  4. package/dist/cjs/breadcrumbs/Breadcrumbs.cjs.map +1 -1
  5. package/dist/cjs/button/Button.cjs +7 -7
  6. package/dist/cjs/button/Button.cjs.map +1 -1
  7. package/dist/cjs/button/ButtonContent.cjs +0 -2
  8. package/dist/cjs/button/ButtonContent.cjs.map +1 -1
  9. package/dist/cjs/button/LinkButton.cjs +6 -35
  10. package/dist/cjs/button/LinkButton.cjs.map +1 -1
  11. package/dist/cjs/counter/Counter.module.css.cjs +1 -1
  12. package/dist/cjs/disclaimer/Disclaimer.cjs +0 -1
  13. package/dist/cjs/disclaimer/Disclaimer.cjs.map +1 -1
  14. package/dist/cjs/icon-button/CloseButton.cjs.map +1 -1
  15. package/dist/cjs/icon-button/IconButton.cjs +7 -7
  16. package/dist/cjs/icon-button/IconButton.cjs.map +1 -1
  17. package/dist/cjs/index.cjs +3 -0
  18. package/dist/cjs/index.cjs.map +1 -1
  19. package/dist/cjs/index.css +10 -4
  20. package/dist/cjs/info-tooltip/InfoTooltip.cjs +4 -4
  21. package/dist/cjs/info-tooltip/InfoTooltip.cjs.map +1 -1
  22. package/dist/cjs/info-tooltip/InfoTooltip.module.css.cjs +1 -1
  23. package/dist/cjs/link-provider/Anchor.cjs +19 -6
  24. package/dist/cjs/link-provider/Anchor.cjs.map +1 -1
  25. package/dist/cjs/link-provider/LinkProvider.cjs +1 -1
  26. package/dist/cjs/link-provider/LinkProvider.cjs.map +1 -1
  27. package/dist/cjs/logo/Logo.cjs.map +1 -1
  28. package/dist/cjs/nav-link/NavLink.cjs +7 -3
  29. package/dist/cjs/nav-link/NavLink.cjs.map +1 -1
  30. package/dist/cjs/rich-input/RichInput.cjs +23 -3
  31. package/dist/cjs/rich-input/RichInput.cjs.map +1 -1
  32. package/dist/cjs/rich-input/RichInput.module.css.cjs +1 -1
  33. package/dist/cjs/sidebar/SidebarToggle.cjs.map +1 -1
  34. package/dist/cjs/small-card/SmallCard.cjs.map +1 -1
  35. package/dist/cjs/tag/Tag.cjs.map +1 -1
  36. package/dist/cjs/tag/Tag.module.css.cjs +1 -1
  37. package/dist/cjs/text-link/TextLink.cjs +1 -3
  38. package/dist/cjs/text-link/TextLink.cjs.map +1 -1
  39. package/dist/cjs/theme-switcher/ThemeSwitcher.cjs.map +1 -1
  40. package/dist/cjs/typography/Typography.cjs +21 -8
  41. package/dist/cjs/typography/Typography.cjs.map +1 -1
  42. package/dist/cjs/typography/Typography.module.css.cjs +1 -1
  43. package/dist/cjs/utils/ActionElement.cjs +1 -1
  44. package/dist/cjs/utils/ActionElement.cjs.map +1 -1
  45. package/dist/cjs/utils/joinAriaLabel.cjs +8 -0
  46. package/dist/cjs/utils/joinAriaLabel.cjs.map +1 -0
  47. package/dist/esm/breadcrumbs/Breadcrumbs.mjs +10 -3
  48. package/dist/esm/breadcrumbs/Breadcrumbs.mjs.map +1 -1
  49. package/dist/esm/button/Button.mjs +7 -7
  50. package/dist/esm/button/Button.mjs.map +1 -1
  51. package/dist/esm/button/ButtonContent.mjs +1 -2
  52. package/dist/esm/button/ButtonContent.mjs.map +1 -1
  53. package/dist/esm/button/LinkButton.mjs +6 -35
  54. package/dist/esm/button/LinkButton.mjs.map +1 -1
  55. package/dist/esm/counter/Counter.module.css.mjs +1 -1
  56. package/dist/esm/disclaimer/Disclaimer.mjs +0 -1
  57. package/dist/esm/disclaimer/Disclaimer.mjs.map +1 -1
  58. package/dist/esm/icon-button/CloseButton.mjs.map +1 -1
  59. package/dist/esm/icon-button/IconButton.mjs +7 -7
  60. package/dist/esm/icon-button/IconButton.mjs.map +1 -1
  61. package/dist/esm/index.css +10 -4
  62. package/dist/esm/index.mjs +1 -1
  63. package/dist/esm/info-tooltip/InfoTooltip.mjs +4 -4
  64. package/dist/esm/info-tooltip/InfoTooltip.mjs.map +1 -1
  65. package/dist/esm/info-tooltip/InfoTooltip.module.css.mjs +1 -1
  66. package/dist/esm/link-provider/Anchor.mjs +19 -7
  67. package/dist/esm/link-provider/Anchor.mjs.map +1 -1
  68. package/dist/esm/link-provider/LinkProvider.mjs +1 -1
  69. package/dist/esm/link-provider/LinkProvider.mjs.map +1 -1
  70. package/dist/esm/logo/Logo.mjs.map +1 -1
  71. package/dist/esm/nav-link/NavLink.mjs +8 -4
  72. package/dist/esm/nav-link/NavLink.mjs.map +1 -1
  73. package/dist/esm/rich-input/RichInput.mjs +23 -3
  74. package/dist/esm/rich-input/RichInput.mjs.map +1 -1
  75. package/dist/esm/rich-input/RichInput.module.css.mjs +1 -1
  76. package/dist/esm/sidebar/SidebarToggle.mjs.map +1 -1
  77. package/dist/esm/small-card/SmallCard.mjs.map +1 -1
  78. package/dist/esm/tag/Tag.mjs.map +1 -1
  79. package/dist/esm/tag/Tag.module.css.mjs +1 -1
  80. package/dist/esm/text-link/TextLink.mjs +1 -3
  81. package/dist/esm/text-link/TextLink.mjs.map +1 -1
  82. package/dist/esm/theme-switcher/ThemeSwitcher.mjs.map +1 -1
  83. package/dist/esm/typography/Typography.mjs +19 -9
  84. package/dist/esm/typography/Typography.mjs.map +1 -1
  85. package/dist/esm/typography/Typography.module.css.mjs +1 -1
  86. package/dist/esm/utils/ActionElement.mjs +1 -1
  87. package/dist/esm/utils/ActionElement.mjs.map +1 -1
  88. package/dist/esm/utils/joinAriaLabel.mjs +4 -0
  89. package/dist/esm/utils/joinAriaLabel.mjs.map +1 -0
  90. package/dist/index.css +10 -4
  91. package/dist/styles/typography-mixins.css +14 -4
  92. package/dist/types/breadcrumbs/Breadcrumbs.d.ts +2 -2
  93. package/dist/types/breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  94. package/dist/types/button/Button.d.ts +4 -10
  95. package/dist/types/button/Button.d.ts.map +1 -1
  96. package/dist/types/button/ButtonContent.d.ts +0 -1
  97. package/dist/types/button/ButtonContent.d.ts.map +1 -1
  98. package/dist/types/button/LinkButton.d.ts +9 -8
  99. package/dist/types/button/LinkButton.d.ts.map +1 -1
  100. package/dist/types/button/index.d.ts +1 -1
  101. package/dist/types/button/index.d.ts.map +1 -1
  102. package/dist/types/button/types.d.ts +4 -0
  103. package/dist/types/button/types.d.ts.map +1 -1
  104. package/dist/types/icon-button/CloseButton.d.ts +3 -3
  105. package/dist/types/icon-button/CloseButton.d.ts.map +1 -1
  106. package/dist/types/icon-button/IconButton.d.ts +4 -38
  107. package/dist/types/icon-button/IconButton.d.ts.map +1 -1
  108. package/dist/types/icon-button/index.d.ts +1 -1
  109. package/dist/types/icon-button/index.d.ts.map +1 -1
  110. package/dist/types/icon-button/types.d.ts +26 -0
  111. package/dist/types/icon-button/types.d.ts.map +1 -0
  112. package/dist/types/info-tooltip/InfoTooltip.d.ts +4 -1
  113. package/dist/types/info-tooltip/InfoTooltip.d.ts.map +1 -1
  114. package/dist/types/link-provider/Anchor.d.ts +3 -2
  115. package/dist/types/link-provider/Anchor.d.ts.map +1 -1
  116. package/dist/types/link-provider/LinkProvider.d.ts +1 -1
  117. package/dist/types/link-provider/LinkProvider.d.ts.map +1 -1
  118. package/dist/types/logo/Logo.d.ts +3 -6
  119. package/dist/types/logo/Logo.d.ts.map +1 -1
  120. package/dist/types/nav-link/NavLink.d.ts +2 -2
  121. package/dist/types/nav-link/NavLink.d.ts.map +1 -1
  122. package/dist/types/rich-input/RichInput.d.ts +7 -2
  123. package/dist/types/rich-input/RichInput.d.ts.map +1 -1
  124. package/dist/types/sidebar/SidebarToggle.d.ts +3 -3
  125. package/dist/types/sidebar/SidebarToggle.d.ts.map +1 -1
  126. package/dist/types/small-card/SmallCard.d.ts +2 -8
  127. package/dist/types/small-card/SmallCard.d.ts.map +1 -1
  128. package/dist/types/tag/Tag.d.ts +3 -1
  129. package/dist/types/tag/Tag.d.ts.map +1 -1
  130. package/dist/types/text-link/TextLink.d.ts +3 -9
  131. package/dist/types/text-link/TextLink.d.ts.map +1 -1
  132. package/dist/types/theme-switcher/ThemeSwitcher.d.ts +3 -3
  133. package/dist/types/theme-switcher/ThemeSwitcher.d.ts.map +1 -1
  134. package/dist/types/typography/Typography.d.ts +15 -6
  135. package/dist/types/typography/Typography.d.ts.map +1 -1
  136. package/dist/types/utils/ActionElement.d.ts +11 -1
  137. package/dist/types/utils/ActionElement.d.ts.map +1 -1
  138. package/dist/types/utils/index.d.ts +2 -1
  139. package/dist/types/utils/index.d.ts.map +1 -1
  140. package/dist/types/utils/joinAriaLabel.d.ts +2 -0
  141. package/dist/types/utils/joinAriaLabel.d.ts.map +1 -0
  142. package/package.json +1 -1
@@ -2,32 +2,39 @@ import cn from 'classnames';
2
2
  import styles from './Typography.module.css.mjs';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
5
+ const typographyColors = ['default', 'secondary', 'tertiary', 'neutral', 'active', 'success', 'warning', 'error', 'info', 'inverse', 'disabled'];
6
+ const typographyWeights = ['thin', 'regular', 'medium', 'semibold', 'bold'];
7
+
8
+ /** @deprecated `richInput` → `amount`, `groupName` → `caption` */
9
+
10
+ const resolveVariant = variant => variant === 'richInput' ? 'amount' : variant === 'groupName' ? 'caption' : variant;
5
11
  const variantTag = {
6
12
  h1: 'h1',
7
13
  h2: 'h2',
8
14
  h3: 'h3',
9
- richInput: 'p',
15
+ amount: 'p',
10
16
  bodyLarge: 'p',
11
17
  body: 'p',
12
18
  description: 'p',
13
- groupName: 'p'
19
+ caption: 'p'
14
20
  };
15
- const isBodyVariant = variant => variant === 'bodyLarge' || variant === 'body' || variant === 'description';
16
21
 
17
22
  /** Typed text in Manrope; use the shortcuts (`H1`, `Body`, ...) in app code and `Typography` when the variant is dynamic. The same styles ship as PostCSS mixins from `@lidofinance/lido-app-ui/styles`. */
18
23
  const Typography = _ref => {
19
24
  let {
20
- variant,
25
+ variant = 'body',
21
26
  weight,
27
+ color,
22
28
  as,
23
29
  className,
24
30
  children,
25
31
  dataTestId,
26
32
  ...rest
27
33
  } = _ref;
28
- const Component = as ?? variantTag[variant];
34
+ const resolved = resolveVariant(variant);
35
+ const Component = as ?? variantTag[resolved];
29
36
  return /*#__PURE__*/jsx(Component, {
30
- className: cn(styles.root, styles[variant], weight === 'semibold' && isBodyVariant(variant) && styles.semibold, className),
37
+ className: cn(styles.root, styles[resolved], color && styles[`color-${color}`], weight && styles[`weight-${weight}`], className),
31
38
  "data-testid": dataTestId?.root,
32
39
  ...rest,
33
40
  children: children
@@ -57,10 +64,13 @@ const Description = props => /*#__PURE__*/jsx(Typography, {
57
64
  ...props,
58
65
  variant: "description"
59
66
  });
60
- const GroupName = props => /*#__PURE__*/jsx(Typography, {
67
+ const Caption = props => /*#__PURE__*/jsx(Typography, {
61
68
  ...props,
62
- variant: "groupName"
69
+ variant: "caption"
63
70
  });
64
71
 
65
- export { Body, BodyLarge, Description, GroupName, H1, H2, H3, Typography };
72
+ /** @deprecated use Caption */
73
+ const GroupName = Caption;
74
+
75
+ export { Body, BodyLarge, Caption, Description, GroupName, H1, H2, H3, Typography, typographyColors, typographyWeights };
66
76
  //# sourceMappingURL=Typography.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Typography.mjs","sources":["../../../src/typography/Typography.tsx"],"sourcesContent":["import type { ElementType, HTMLAttributes } from 'react'\n\nimport cn from 'classnames'\n\nimport styles from './Typography.module.css'\n\nexport type TypographyVariant =\n | 'h1'\n | 'h2'\n | 'h3'\n | 'richInput'\n | 'bodyLarge'\n | 'body'\n | 'description'\n | 'groupName'\n\n// Weight only applies to bodyLarge/body/description; headings are single-weight by design.\nexport type TypographyWeight = 'regular' | 'semibold'\n\nexport type TypographyDataTestId = {\n root?: string\n}\n\nexport type TypographyProps = HTMLAttributes<HTMLElement> & {\n /** Type style; also decides the default tag. */\n variant: TypographyVariant\n /** Only `bodyLarge`, `body` and `description` have two weights. */\n weight?: TypographyWeight\n /** Overrides the rendered tag without changing the style. */\n as?: ElementType\n dataTestId?: TypographyDataTestId\n}\n\nconst variantTag: Record<TypographyVariant, ElementType> = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n richInput: 'p',\n bodyLarge: 'p',\n body: 'p',\n description: 'p',\n groupName: 'p',\n}\n\nconst isBodyVariant = (variant: TypographyVariant): boolean =>\n variant === 'bodyLarge' || variant === 'body' || variant === 'description'\n\n/** Typed text in Manrope; use the shortcuts (`H1`, `Body`, ...) in app code and `Typography` when the variant is dynamic. The same styles ship as PostCSS mixins from `@lidofinance/lido-app-ui/styles`. */\nexport const Typography = ({\n variant,\n weight,\n as,\n className,\n children,\n dataTestId,\n ...rest\n}: TypographyProps) => {\n const Component = as ?? variantTag[variant]\n\n return (\n <Component\n className={cn(\n styles.root,\n styles[variant],\n weight === 'semibold' && isBodyVariant(variant) && styles.semibold,\n className,\n )}\n data-testid={dataTestId?.root}\n {...rest}\n >\n {children}\n </Component>\n )\n}\n\ntype ShorthandProps = Omit<TypographyProps, 'variant'>\n\nexport const H1 = (props: ShorthandProps) => (\n <Typography {...props} variant='h1' />\n)\n\nexport const H2 = (props: ShorthandProps) => (\n <Typography {...props} variant='h2' />\n)\n\nexport const H3 = (props: ShorthandProps) => (\n <Typography {...props} variant='h3' />\n)\n\nexport const BodyLarge = (props: ShorthandProps) => (\n <Typography {...props} variant='bodyLarge' />\n)\n\nexport const Body = (props: ShorthandProps) => (\n <Typography {...props} variant='body' />\n)\n\nexport const Description = (props: ShorthandProps) => (\n <Typography {...props} variant='description' />\n)\n\nexport const GroupName = (props: ShorthandProps) => (\n <Typography {...props} variant='groupName' />\n)\n"],"names":["variantTag","h1","h2","h3","richInput","bodyLarge","body","description","groupName","isBodyVariant","variant","Typography","_ref","weight","as","className","children","dataTestId","rest","Component","_jsx","cn","styles","root","semibold","H1","props","H2","H3","BodyLarge","Body","Description","GroupName"],"mappings":";;;;AAiCA,MAAMA,UAAkD,GAAG;AACzDC,EAAAA,EAAE,EAAE,IAA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AAE,EACtC;MAEYkB,EAAE,GAAIF,KAAqB,iBACtCN,GAAA,CAACT,UAAU,EAAA;AAAA,EAAA,GAAKe,KAAK;AAAEhB,EAAAA,OAAO,EAAC,IAAA;AAAI,CAAE,EACtC;MAEYmB,SAAS,GAAIH,KAAqB,iBAC7CN,GAAA,CAACT,UAAU,EAAA;AAAA,EAAA,GAAKe,KAAK;AAAEhB,EAAAA,OAAO,EAAC,WAAA;AAAW,CAAE,EAC7C;MAEYoB,IAAI,GAAIJ,KAAqB,iBACxCN,GAAA,CAACT,UAAU,EAAA;AAAA,EAAA,GAAKe,KAAK;AAAEhB,EAAAA,OAAO,EAAC,MAAA;AAAM,CAAE,EACxC;MAEYqB,WAAW,GAAIL,KAAqB,iBAC/CN,GAAA,CAACT,UAAU,EAAA;AAAA,EAAA,GAAKe,KAAK;AAAEhB,EAAAA,OAAO,EAAC,aAAA;AAAa,CAAE,EAC/C;MAEYsB,SAAS,GAAIN,KAAqB,iBAC7CN,GAAA,CAACT,UAAU,EAAA;AAAA,EAAA,GAAKe,KAAK;AAAEhB,EAAAA,OAAO,EAAC,WAAA;AAAW,CAAE;;;;"}
1
+ {"version":3,"file":"Typography.mjs","sources":["../../../src/typography/Typography.tsx"],"sourcesContent":["import type { ElementType, HTMLAttributes } from 'react'\n\nimport cn from 'classnames'\n\nimport styles from './Typography.module.css'\n\nexport const typographyColors = [\n 'default',\n 'secondary',\n 'tertiary',\n 'neutral',\n 'active',\n 'success',\n 'warning',\n 'error',\n 'info',\n 'inverse',\n 'disabled',\n] as const\n\nexport type TypographyColor = (typeof typographyColors)[number]\n\nexport const typographyWeights = [\n 'thin',\n 'regular',\n 'medium',\n 'semibold',\n 'bold',\n] as const\n\nexport type TypographyWeight = (typeof typographyWeights)[number]\n\nexport type TypographyVariant =\n | 'h1'\n | 'h2'\n | 'h3'\n | 'amount'\n | 'bodyLarge'\n | 'body'\n | 'description'\n | 'caption'\n\n/** @deprecated `richInput` → `amount`, `groupName` → `caption` */\ntype DeprecatedTypographyVariant = 'richInput' | 'groupName'\n\nexport type TypographyDataTestId = {\n root?: string\n}\n\nexport type TypographyProps = Omit<HTMLAttributes<HTMLElement>, 'color'> & {\n /** Type style; also decides the default tag. */\n variant?: TypographyVariant | DeprecatedTypographyVariant\n /** Overrides the variant's font weight. */\n weight?: TypographyWeight\n /** Text color token; omit to inherit. */\n color?: TypographyColor\n /** Overrides the rendered tag without changing the style. */\n as?: ElementType\n dataTestId?: TypographyDataTestId\n}\n\nconst resolveVariant = (\n variant: TypographyVariant | DeprecatedTypographyVariant,\n): TypographyVariant =>\n variant === 'richInput'\n ? 'amount'\n : variant === 'groupName'\n ? 'caption'\n : variant\n\nconst variantTag: Record<TypographyVariant, ElementType> = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n amount: 'p',\n bodyLarge: 'p',\n body: 'p',\n description: 'p',\n caption: 'p',\n}\n\n/** Typed text in Manrope; use the shortcuts (`H1`, `Body`, ...) in app code and `Typography` when the variant is dynamic. The same styles ship as PostCSS mixins from `@lidofinance/lido-app-ui/styles`. */\nexport const Typography = ({\n variant = 'body',\n weight,\n color,\n as,\n className,\n children,\n dataTestId,\n ...rest\n}: TypographyProps) => {\n const resolved = resolveVariant(variant)\n const Component = as ?? variantTag[resolved]\n\n return (\n <Component\n className={cn(\n styles.root,\n styles[resolved],\n color && styles[`color-${color}`],\n weight && styles[`weight-${weight}`],\n className,\n )}\n data-testid={dataTestId?.root}\n {...rest}\n >\n {children}\n </Component>\n )\n}\n\ntype ShorthandProps = Omit<TypographyProps, 'variant'>\n\nexport const H1 = (props: ShorthandProps) => (\n <Typography {...props} variant='h1' />\n)\n\nexport const H2 = (props: ShorthandProps) => (\n <Typography {...props} variant='h2' />\n)\n\nexport const H3 = (props: ShorthandProps) => (\n <Typography {...props} variant='h3' />\n)\n\nexport const BodyLarge = (props: ShorthandProps) => (\n <Typography {...props} variant='bodyLarge' />\n)\n\nexport const Body = (props: ShorthandProps) => (\n <Typography {...props} variant='body' />\n)\n\nexport const Description = (props: ShorthandProps) => (\n <Typography {...props} variant='description' />\n)\n\nexport const Caption = (props: ShorthandProps) => (\n <Typography {...props} variant='caption' />\n)\n\n/** @deprecated use Caption */\nexport const GroupName = Caption\n"],"names":["typographyColors","typographyWeights","resolveVariant","variant","variantTag","h1","h2","h3","amount","bodyLarge","body","description","caption","Typography","_ref","weight","color","as","className","children","dataTestId","rest","resolved","Component","_jsx","cn","styles","root","H1","props","H2","H3","BodyLarge","Body","Description","Caption","GroupName"],"mappings":";;;;AAMO,MAAMA,gBAAgB,GAAG,CAC9B,SAAS,EACT,WAAW,EACX,UAAU,EACV,SAAS,EACT,QAAQ,EACR,SAAS,EACT,SAAS,EACT,OAAO,EACP,MAAM,EACN,SAAS,EACT,UAAU,EACF;AAIGC,MAAAA,iBAAiB,GAAG,CAC/B,MAAM,EACN,SAAS,EACT,QAAQ,EACR,UAAU,EACV,MAAM,EACE;;AAcV;;AAmBA,MAAMC,cAAc,GAClBC,OAAwD,IAExDA,OAAO,KAAK,WAAW,GACnB,QAAQ,GACRA,OAAO,KAAK,WAAW,GACrB,SAAS,GACTA,OAAO,CAAA;AAEf,MAAMC,UAAkD,GAAG;AACzDC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,MAAM,EAAE,GAAG;AACXC,EAAAA,SAAS,EAAE,GAAG;AACdC,EAAAA,IAAI,EAAE,GAAG;AACTC,EAAAA,WAAW,EAAE,GAAG;AAChBC,EAAAA,OAAO,EAAE,GAAA;AACX,CAAC,CAAA;;AAED;AACaC,MAAAA,UAAU,GAAGC,IAAA,IASH;EAAA,IATI;AACzBX,IAAAA,OAAO,GAAG,MAAM;IAChBY,MAAM;IACNC,KAAK;IACLC,EAAE;IACFC,SAAS;IACTC,QAAQ;IACRC,UAAU;IACV,GAAGC,IAAAA;AACY,GAAC,GAAAP,IAAA,CAAA;AAChB,EAAA,MA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,EAAC,MAAA;AAAM,CAAE,EACxC;MAEY+B,WAAW,GAAIL,KAAqB,iBAC/CL,GAAA,CAACX,UAAU,EAAA;AAAA,EAAA,GAAKgB,KAAK;AAAE1B,EAAAA,OAAO,EAAC,aAAA;AAAa,CAAE,EAC/C;MAEYgC,OAAO,GAAIN,KAAqB,iBAC3CL,GAAA,CAACX,UAAU,EAAA;AAAA,EAAA,GAAKgB,KAAK;AAAE1B,EAAAA,OAAO,EAAC,SAAA;AAAS,CAAE,EAC3C;;AAED;AACO,MAAMiC,SAAS,GAAGD;;;;"}
@@ -1,4 +1,4 @@
1
- const styles = {"root":"Typography-module_root__2cRgG","h1":"Typography-module_h1__Owx3Q","h2":"Typography-module_h2__PGKur","h3":"Typography-module_h3__SyRpZ","richInput":"Typography-module_richInput__QDHSm","bodyLarge":"Typography-module_bodyLarge__ziLsk","body":"Typography-module_body__fowlB","description":"Typography-module_description__5mtlx","groupName":"Typography-module_groupName__DNolh","semibold":"Typography-module_semibold__pf-6N"};
1
+ const styles = {"root":"Typography-module_root__2cRgG","h1":"Typography-module_h1__Owx3Q","h2":"Typography-module_h2__PGKur","h3":"Typography-module_h3__SyRpZ","amount":"Typography-module_amount__drtq0","bodyLarge":"Typography-module_bodyLarge__ziLsk","body":"Typography-module_body__fowlB","description":"Typography-module_description__5mtlx","caption":"Typography-module_caption__ftWKE","weight-thin":"Typography-module_weight-thin__55oL6","weight-regular":"Typography-module_weight-regular__m5NNo","weight-medium":"Typography-module_weight-medium__CQ2Eb","weight-semibold":"Typography-module_weight-semibold__n7eLX","weight-bold":"Typography-module_weight-bold__CeKLl","color-default":"Typography-module_color-default__7FQuh","color-secondary":"Typography-module_color-secondary__HtGK2","color-tertiary":"Typography-module_color-tertiary__c-6R5","color-neutral":"Typography-module_color-neutral__VDBOX","color-active":"Typography-module_color-active__PcBdi","color-success":"Typography-module_color-success__j7XIf","color-warning":"Typography-module_color-warning__q1VU-","color-error":"Typography-module_color-error__ABRrW","color-info":"Typography-module_color-info__BzlBj","color-inverse":"Typography-module_color-inverse__9urcs","color-disabled":"Typography-module_color-disabled__1XM9m"};
2
2
 
3
3
  export { styles as default };
4
4
  //# sourceMappingURL=Typography.module.css.mjs.map
@@ -2,7 +2,7 @@ import { forwardRef } from 'react';
2
2
  import { Anchor } from '../link-provider/Anchor.mjs';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
5
- /** Internal, not exported from the package. Renders `Anchor` when `href` is set (see `AnchorProps` for `disabled` and `external`), otherwise `<button type='button'>`. */
5
+ /** Internal, not exported from the package. Renders `Anchor` when `href` is set (see `AnchorProps` for `disabled`), otherwise `<button type='button'>`. */
6
6
  const ActionElement = /*#__PURE__*/forwardRef((props, ref) => {
7
7
  if (props.href !== undefined) {
8
8
  return /*#__PURE__*/jsx(Anchor, {
@@ -1 +1 @@
1
- {"version":3,"file":"ActionElement.mjs","sources":["../../../src/utils/ActionElement.tsx"],"sourcesContent":["import { forwardRef, type ButtonHTMLAttributes, type ForwardedRef } from 'react'\n\nimport { Anchor, type AnchorProps } from '../link-provider/Anchor'\n\nexport type ActionElementProps =\n | (AnchorProps & { href: string })\n | (ButtonHTMLAttributes<HTMLButtonElement> & { href?: undefined })\n\n/** Internal, not exported from the package. Renders `Anchor` when `href` is set (see `AnchorProps` for `disabled` and `external`), otherwise `<button type='button'>`. */\nexport const ActionElement = forwardRef<\n HTMLAnchorElement | HTMLButtonElement,\n ActionElementProps\n>((props, ref) => {\n if (props.href !== undefined) {\n return <Anchor ref={ref as ForwardedRef<HTMLAnchorElement>} {...props} />\n }\n\n const { type = 'button', ...rest } = props\n return (\n <button\n ref={ref as ForwardedRef<HTMLButtonElement>}\n type={type}\n {...rest}\n />\n )\n})\n\nActionElement.displayName = 'ActionElement'\n"],"names":["ActionElement","forwardRef","props","ref","href","undefined","_jsx","Anchor","type","rest","displayName"],"mappings":";;;;AAQA;AACO,MAAMA,aAAa,gBAAGC,UAAU,CAGrC,CAACC,KAAK,EAAEC,GAAG,KAAK;AAChB,EAAA,IAAID,KAAK,CAACE,IAAI,KAAKC,SAAS,EAAE;IAC5B,oBAAOC,GAAA,CAACC,MAAM,EAAA;AAACJ,MAAAA,GAAG,EAAEA,GAAuC;MAAA,GAAKD,KAAAA;AAAK,KAAG,CAAC,CAAA;AAC3E,GAAA;EAEA,MAAM;AAAEM,IAAAA,IAAI,GAAG,QAAQ;IAAE,GAAGC,IAAAA;AAAK,GAAC,GAAGP,KAAK,CAAA;AAC1C,EAAA,oBACEI,GAAA,CAAA,QAAA,EAAA;AACEH,IAAAA,GAAG,EAAEA,GAAuC;AAC5CK,IAAAA,IAAI,EAAEA,IAAK;IAAA,GACPC,IAAAA;AAAI,GACT,CAAC,CAAA;AAEN,CAAC,EAAC;AAEFT,aAAa,CAACU,WAAW,GAAG,eAAe;;;;"}
1
+ {"version":3,"file":"ActionElement.mjs","sources":["../../../src/utils/ActionElement.tsx"],"sourcesContent":["import { forwardRef, type ButtonHTMLAttributes, type ForwardedRef } from 'react'\n\nimport { Anchor, type AnchorProps } from '../link-provider/Anchor'\n\nexport type ActionElementProps =\n | (AnchorProps & { href: string })\n | (ButtonHTMLAttributes<HTMLButtonElement> & { href?: undefined })\n\nexport type ActionAsButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {\n href?: never\n linkProps?: never\n loading?: boolean\n}\n\nexport type ActionAsLinkProps = Omit<AnchorProps, 'href' | 'external'> & {\n href: string\n loading?: never\n type?: never\n}\n\n/** Internal, not exported from the package. Renders `Anchor` when `href` is set (see `AnchorProps` for `disabled`), otherwise `<button type='button'>`. */\nexport const ActionElement = forwardRef<\n HTMLAnchorElement | HTMLButtonElement,\n ActionElementProps\n>((props, ref) => {\n if (props.href !== undefined) {\n return <Anchor ref={ref as ForwardedRef<HTMLAnchorElement>} {...props} />\n }\n\n const { type = 'button', ...rest } = props\n return (\n <button\n ref={ref as ForwardedRef<HTMLButtonElement>}\n type={type}\n {...rest}\n />\n )\n})\n\nActionElement.displayName = 'ActionElement'\n"],"names":["ActionElement","forwardRef","props","ref","href","undefined","_jsx","Anchor","type","rest","displayName"],"mappings":";;;;AAoBA;AACO,MAAMA,aAAa,gBAAGC,UAAU,CAGrC,CAACC,KAAK,EAAEC,GAAG,KAAK;AAChB,EAAA,IAAID,KAAK,CAACE,IAAI,KAAKC,SAAS,EAAE;IAC5B,oBAAOC,GAAA,CAACC,MAAM,EAAA;AAACJ,MAAAA,GAAG,EAAEA,GAAuC;MAAA,GAAKD,KAAAA;AAAK,KAAG,CAAC,CAAA;AAC3E,GAAA;EAEA,MAAM;AAAEM,IAAAA,IAAI,GAAG,QAAQ;IAAE,GAAGC,IAAAA;AAAK,GAAC,GAAGP,KAAK,CAAA;AAC1C,EAAA,oBACEI,GAAA,CAAA,QAAA,EAAA;AACEH,IAAAA,GAAG,EAAEA,GAAuC;AAC5CK,IAAAA,IAAI,EAAEA,IAAK;IAAA,GACPC,IAAAA;AAAI,GACT,CAAC,CAAA;AAEN,CAAC,EAAC;AAEFT,aAAa,CAACU,WAAW,GAAG,eAAe;;;;"}
@@ -0,0 +1,4 @@
1
+ const joinAriaLabel = (ariaLabel, counterLabel) => ariaLabel && counterLabel ? `${ariaLabel}, ${counterLabel}` : ariaLabel;
2
+
3
+ export { joinAriaLabel };
4
+ //# sourceMappingURL=joinAriaLabel.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"joinAriaLabel.mjs","sources":["../../../src/utils/joinAriaLabel.ts"],"sourcesContent":["export const joinAriaLabel = (\n ariaLabel: string | undefined,\n counterLabel: string | undefined,\n) => (ariaLabel && counterLabel ? `${ariaLabel}, ${counterLabel}` : ariaLabel)\n"],"names":["joinAriaLabel","ariaLabel","counterLabel"],"mappings":"MAAaA,aAAa,GAAGA,CAC3BC,SAA6B,EAC7BC,YAAgC,KAC5BD,SAAS,IAAIC,YAAY,GAAG,CAAGD,EAAAA,SAAS,KAAKC,YAAY,CAAA,CAAE,GAAGD;;;;"}