@chayns-components/core 5.0.2 → 5.0.4

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 (21) hide show
  1. package/lib/cjs/components/color-scheme-provider/ColorSchemeProvider.styles.js +6 -0
  2. package/lib/cjs/components/color-scheme-provider/ColorSchemeProvider.styles.js.map +1 -1
  3. package/lib/cjs/components/color-scheme-provider/hooks/useChaynsTheme.js +4 -1
  4. package/lib/cjs/components/color-scheme-provider/hooks/useChaynsTheme.js.map +1 -1
  5. package/lib/cjs/components/multi-action-button/action-button/ActionButton.js +1 -4
  6. package/lib/cjs/components/multi-action-button/action-button/ActionButton.js.map +1 -1
  7. package/lib/cjs/components/verification-badge/VerificationBadge.js +2 -2
  8. package/lib/cjs/components/verification-badge/VerificationBadge.js.map +1 -1
  9. package/lib/cjs/components/verification-badge/VerificationBadge.styles.js +37 -1
  10. package/lib/cjs/components/verification-badge/VerificationBadge.styles.js.map +1 -1
  11. package/lib/esm/components/color-scheme-provider/ColorSchemeProvider.styles.js +6 -0
  12. package/lib/esm/components/color-scheme-provider/ColorSchemeProvider.styles.js.map +1 -1
  13. package/lib/esm/components/color-scheme-provider/hooks/useChaynsTheme.js +4 -1
  14. package/lib/esm/components/color-scheme-provider/hooks/useChaynsTheme.js.map +1 -1
  15. package/lib/esm/components/multi-action-button/action-button/ActionButton.js +1 -4
  16. package/lib/esm/components/multi-action-button/action-button/ActionButton.js.map +1 -1
  17. package/lib/esm/components/verification-badge/VerificationBadge.js +2 -2
  18. package/lib/esm/components/verification-badge/VerificationBadge.js.map +1 -1
  19. package/lib/esm/components/verification-badge/VerificationBadge.styles.js +37 -1
  20. package/lib/esm/components/verification-badge/VerificationBadge.styles.js.map +1 -1
  21. package/package.json +2 -2
@@ -17,6 +17,12 @@ const StyledColorSchemeProvider = exports.StyledColorSchemeProvider = _styledCom
17
17
  return [`--chayns-color--${colorName}: ${theme[colorName]};`, `--chayns-color-rgb--${colorName}: ${theme[colorNameRgb]};`];
18
18
  })}
19
19
 
20
+ ${({
21
+ theme
22
+ }) => `
23
+ --chayns-color--header-bar: ${theme['header-bar'] ?? theme.primary};
24
+ `}
25
+
20
26
  // ToDo: Remove .h1...
21
27
  .color-scheme-provider :is(h1,.h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6):first-child {
22
28
  margin-top: 0;
@@ -1 +1 @@
1
- {"version":3,"file":"ColorSchemeProvider.styles.js","names":["_colors","require","_styledComponents","StyledColorSchemeProvider","exports","styled","div","theme","getAvailableColorList","map","colorName","colorNameRgb"],"sources":["../../../../src/components/color-scheme-provider/ColorSchemeProvider.styles.ts"],"sourcesContent":["import { getAvailableColorList } from '@chayns/colors';\nimport { styled } from 'styled-components';\nimport type { WithTheme } from './ColorSchemeProvider';\n\ntype ColorSchemeProviderProps = WithTheme<unknown>;\n\n// noinspection CssUnresolvedCustomProperty\nexport const StyledColorSchemeProvider = styled.div<ColorSchemeProviderProps>`\n color: var(--chayns-color--text);\n\n ${({ theme }: ColorSchemeProviderProps) =>\n getAvailableColorList().map((colorName: string) => {\n const colorNameRgb = `${colorName}-rgb`;\n return [\n `--chayns-color--${colorName}: ${theme[colorName]};`,\n `--chayns-color-rgb--${colorName}: ${theme[colorNameRgb]};`,\n ];\n })}\n\n // ToDo: Remove .h1...\n .color-scheme-provider :is(h1,.h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6):first-child {\n margin-top: 0;\n }\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAKA;AACO,MAAME,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAGE,wBAAM,CAACC,GAA6B;AAC7E;AACA;AACA,MAAM,CAAC;EAAEC;AAAgC,CAAC,KAClC,IAAAC,6BAAqB,EAAC,CAAC,CAACC,GAAG,CAAEC,SAAiB,IAAK;EAC/C,MAAMC,YAAY,GAAG,GAAGD,SAAS,MAAM;EACvC,OAAO,CACH,mBAAmBA,SAAS,KAAKH,KAAK,CAACG,SAAS,CAAC,GAAG,EACpD,uBAAuBA,SAAS,KAAKH,KAAK,CAACI,YAAY,CAAC,GAAG,CAC9D;AACL,CAAC,CAAC;AACV;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"ColorSchemeProvider.styles.js","names":["_colors","require","_styledComponents","StyledColorSchemeProvider","exports","styled","div","theme","getAvailableColorList","map","colorName","colorNameRgb","primary"],"sources":["../../../../src/components/color-scheme-provider/ColorSchemeProvider.styles.ts"],"sourcesContent":["import { getAvailableColorList } from '@chayns/colors';\nimport { styled } from 'styled-components';\nimport type { WithTheme } from './ColorSchemeProvider';\n\ntype ColorSchemeProviderProps = WithTheme<unknown>;\n\n// noinspection CssUnresolvedCustomProperty\nexport const StyledColorSchemeProvider = styled.div<ColorSchemeProviderProps>`\n color: var(--chayns-color--text);\n\n ${({ theme }: ColorSchemeProviderProps) =>\n getAvailableColorList().map((colorName: string) => {\n const colorNameRgb = `${colorName}-rgb`;\n return [\n `--chayns-color--${colorName}: ${theme[colorName]};`,\n `--chayns-color-rgb--${colorName}: ${theme[colorNameRgb]};`,\n ];\n })}\n\n ${({ theme }: ColorSchemeProviderProps) =>\n `\n --chayns-color--header-bar: ${theme['header-bar'] ?? theme.primary};\n `}\n\n // ToDo: Remove .h1...\n .color-scheme-provider :is(h1,.h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6):first-child {\n margin-top: 0;\n }\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAKA;AACO,MAAME,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAGE,wBAAM,CAACC,GAA6B;AAC7E;AACA;AACA,MAAM,CAAC;EAAEC;AAAgC,CAAC,KAClC,IAAAC,6BAAqB,EAAC,CAAC,CAACC,GAAG,CAAEC,SAAiB,IAAK;EAC/C,MAAMC,YAAY,GAAG,GAAGD,SAAS,MAAM;EACvC,OAAO,CACH,mBAAmBA,SAAS,KAAKH,KAAK,CAACG,SAAS,CAAC,GAAG,EACpD,uBAAuBA,SAAS,KAAKH,KAAK,CAACI,YAAY,CAAC,GAAG,CAC9D;AACL,CAAC,CAAC;AACV;AACA,MAAM,CAAC;EAAEJ;AAAgC,CAAC,KAClC;AACR,sCAAsCA,KAAK,CAAC,YAAY,CAAC,IAAIA,KAAK,CAACK,OAAO;AAC1E,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
@@ -10,6 +10,9 @@ var _react = require("react");
10
10
  var _font = require("../../../utils/font");
11
11
  var _useDesignSettings = require("./useDesignSettings");
12
12
  var _useParagraphFormat = require("./useParagraphFormat");
13
+ const DesignSettingsKeyMap = {
14
+ headerBarColor: 'header-bar'
15
+ };
13
16
  const createTheme = ({
14
17
  colors,
15
18
  colorMode,
@@ -53,7 +56,7 @@ const createTheme = ({
53
56
  result[key] = (0, _font.convertIconStyle)(designSettings.iconStyle);
54
57
  return;
55
58
  }
56
- result[key] = designSettings[key];
59
+ result[DesignSettingsKeyMap[key] || key] = designSettings[key];
57
60
  });
58
61
  }
59
62
  if (paragraphFormat) {
@@ -1 +1 @@
1
- {"version":3,"file":"useChaynsTheme.js","names":["_colors","require","_chaynsApi","_react","_font","_useDesignSettings","_useParagraphFormat","createTheme","colors","colorMode","color","secondaryColor","designSettings","paragraphFormat","theme","iconColor","customVariables","result","Object","keys","forEach","key","availableColors","getAvailableColorList","colorName","hexColor","getColorFromPalette","rgbColor","hexToRgb255","r","g","b","convertIconStyle","iconStyle","themeResult","getHeadlineColorSelector","ColorMode","Light","Dark","fontSize","fontSizePx","useChaynsTheme","designSettingsProp","paragraphFormatProp","siteId","useDesignSettings","useParagraphFormat","isMountedRef","useRef","internalTheme","setInternalTheme","useState","useEffect","current","useMemo","exports"],"sources":["../../../../../src/components/color-scheme-provider/hooks/useChaynsTheme.ts"],"sourcesContent":["import { getAvailableColorList, getColorFromPalette, hexToRgb255 } from '@chayns/colors';\nimport { ChaynsDesignSettings, ChaynsParagraphFormat, ColorMode } from 'chayns-api';\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport { convertIconStyle, getHeadlineColorSelector } from '../../../utils/font';\nimport type { Theme } from '../ColorSchemeProvider';\nimport { useDesignSettings } from './useDesignSettings';\nimport { useParagraphFormat } from './useParagraphFormat';\n\nexport type ThemeOptions = {\n colors?: Theme;\n colorMode: ColorMode;\n iconColor?: string;\n color: string;\n secondaryColor?: string;\n designSettings?: ChaynsDesignSettings & { fontSizePx?: number };\n paragraphFormat?: ChaynsParagraphFormat[];\n siteId?: string;\n theme?: Theme;\n customVariables?: Record<string, string>;\n};\n\nconst createTheme = ({\n colors,\n colorMode,\n color,\n secondaryColor,\n designSettings,\n paragraphFormat,\n theme,\n iconColor,\n customVariables,\n}: Omit<ThemeOptions, 'siteId'>) => {\n if (theme) {\n return theme;\n }\n\n const result: Theme = {};\n\n if (customVariables) {\n Object.keys(customVariables).forEach((key) => {\n result[key] = customVariables[key] as string;\n });\n }\n\n const availableColors = getAvailableColorList();\n\n if (!colors) {\n availableColors.forEach((colorName: string) => {\n const hexColor = getColorFromPalette(colorName, {\n color,\n colorMode,\n secondaryColor,\n });\n\n if (hexColor) {\n const rgbColor = hexToRgb255(hexColor);\n\n result[colorName] = hexColor;\n\n if (rgbColor) {\n result[`${colorName}-rgb`] = `${rgbColor.r}, ${rgbColor.g}, ${rgbColor.b}`;\n }\n }\n });\n }\n\n if (designSettings) {\n Object.keys(designSettings).forEach((key) => {\n if (key === 'iconStyle') {\n result[key] = convertIconStyle(designSettings.iconStyle);\n\n return;\n }\n result[key] = designSettings[key as keyof ChaynsDesignSettings] as string;\n });\n }\n\n if (paragraphFormat) {\n const { themeResult } = getHeadlineColorSelector(paragraphFormat);\n\n // Update Theme\n Object.keys(themeResult).forEach((key) => {\n result[key] = themeResult[key] as string;\n });\n }\n\n switch (colorMode) {\n case ColorMode.Light:\n result.colorMode = 'light';\n break;\n case ColorMode.Dark:\n result.colorMode = 'dark';\n break;\n default:\n result.colorMode = 'classic';\n break;\n }\n\n if (iconColor) {\n result.iconColor = iconColor;\n }\n\n result.fontSize = (designSettings?.fontSizePx || 15) as unknown as string;\n\n return result;\n};\n\nexport const useChaynsTheme = ({\n colors,\n colorMode,\n color,\n secondaryColor,\n designSettings: designSettingsProp,\n paragraphFormat: paragraphFormatProp,\n siteId,\n iconColor,\n theme,\n customVariables,\n}: ThemeOptions) => {\n const designSettings = useDesignSettings({\n color,\n colorMode,\n designSettings: designSettingsProp,\n siteId,\n });\n\n const paragraphFormat = useParagraphFormat(siteId, paragraphFormatProp);\n const isMountedRef = useRef<boolean>(false);\n\n const [internalTheme, setInternalTheme] = useState<Theme>(() =>\n createTheme({\n colors,\n colorMode,\n color,\n secondaryColor,\n designSettings,\n paragraphFormat,\n theme,\n iconColor,\n customVariables,\n }),\n );\n\n useEffect(() => {\n if (!isMountedRef.current) {\n isMountedRef.current = true;\n return;\n }\n setInternalTheme(\n createTheme({\n colors,\n colorMode,\n color,\n secondaryColor,\n designSettings,\n paragraphFormat,\n theme,\n iconColor,\n customVariables,\n }),\n );\n }, [\n color,\n colorMode,\n colors,\n designSettings,\n paragraphFormat,\n secondaryColor,\n theme,\n customVariables,\n iconColor,\n ]);\n\n return useMemo(\n () => ({\n theme: internalTheme,\n designSettings,\n paragraphFormat,\n }),\n [internalTheme, designSettings, paragraphFormat],\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAEA,IAAAI,kBAAA,GAAAJ,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAAA;AAeA,MAAMM,WAAW,GAAGA,CAAC;EACjBC,MAAM;EACNC,SAAS;EACTC,KAAK;EACLC,cAAc;EACd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G,IAAAC,eAAQ,EAAQ,MACtD5C,WAAW,CAAC;IACRC,MAAM;IACNC,SAAS;IACTC,KAAK;IACLC,cAAc;IACdC,cAAc;IACdC,eAAe;IACfC,KAAK;IACLC,SAAS;IACTC;EACJ,CAAC,CACL,CAAC;EAED,IAAAoC,gBAAS,EAAC,MAAM;IACZ,IAAI,CAACL,YAAY,CAACM,OAAO,EAAE;MACvBN,YAAY,CAACM,OAAO,GAAG,IAAI;MAC3B;IACJ;IACAH,gBAAgB,CACZ3C,WAAW,CAAC;MACRC,MAAM;MACNC,SAAS;MACTC,KAAK;MACLC,cAAc;MACdC,cAAc;MACdC,eAAe;MACfC,KAAK;MACLC,SAAS;MACTC;IACJ,CAAC,CACL,CAAC;EACL,CAAC,EAAE,CACCN,KAAK,EACLD,SAAS,EACTD,MAAM,EACNI,cAAc,EACdC,eAAe,EACfF,cAAc,EACdG,KAAK,EACLE,eAAe,EACfD,SAAS,CACZ,CAAC;EAEF,OAAO,IAAAuC,cAAO,EACV,OAAO;IACHxC,KAAK,EAAEmC,aAAa;IACpBrC,cAAc;IACdC;EACJ,CAAC,CAAC,EACF,CAACoC,aAAa,EAAErC,cAAc,EAAEC,eAAe,CACnD,CAAC;AACL,CAAC;AAAC0C,OAAA,CAAAd,cAAA,GAAAA,cAAA","ignoreList":[]}
1
+ {"version":3,"file":"useChaynsTheme.js","names":["_colors","require","_chaynsApi","_react","_font","_useDesignSettings","_useParagraphFormat","DesignSettingsKeyMap","headerBarColor","createTheme","colors","colorMode","color","secondaryColor","designSettings","paragraphFormat","theme","iconColor","customVariables","result","Object","keys","forEach","key","availableColors","getAvailableColorList","colorName","hexColor","getColorFromPalette","rgbColor","hexToRgb255","r","g","b","convertIconStyle","iconStyle","themeResult","getHeadlineColorSelector","ColorMode","Light","Dark","fontSize","fontSizePx","useChaynsTheme","designSettingsProp","paragraphFormatProp","siteId","useDesignSettings","useParagraphFormat","isMountedRef","useRef","internalTheme","setInternalTheme","useState","useEffect","current","useMemo","exports"],"sources":["../../../../../src/components/color-scheme-provider/hooks/useChaynsTheme.ts"],"sourcesContent":["import { getAvailableColorList, getColorFromPalette, hexToRgb255 } from '@chayns/colors';\nimport { ChaynsDesignSettings, ChaynsParagraphFormat, ColorMode } from 'chayns-api';\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport { convertIconStyle, getHeadlineColorSelector } from '../../../utils/font';\nimport type { Theme } from '../ColorSchemeProvider';\nimport { useDesignSettings } from './useDesignSettings';\nimport { useParagraphFormat } from './useParagraphFormat';\n\nexport type ThemeOptions = {\n colors?: Theme;\n colorMode: ColorMode;\n iconColor?: string;\n color: string;\n secondaryColor?: string;\n designSettings?: ChaynsDesignSettings & { fontSizePx?: number };\n paragraphFormat?: ChaynsParagraphFormat[];\n siteId?: string;\n theme?: Theme;\n customVariables?: Record<string, string>;\n};\n\nconst DesignSettingsKeyMap: Partial<Record<keyof ChaynsDesignSettings, string>> = {\n headerBarColor: 'header-bar',\n};\n\nconst createTheme = ({\n colors,\n colorMode,\n color,\n secondaryColor,\n designSettings,\n paragraphFormat,\n theme,\n iconColor,\n customVariables,\n}: Omit<ThemeOptions, 'siteId'>) => {\n if (theme) {\n return theme;\n }\n\n const result: Theme = {};\n\n if (customVariables) {\n Object.keys(customVariables).forEach((key) => {\n result[key] = customVariables[key] as string;\n });\n }\n\n const availableColors = getAvailableColorList();\n\n if (!colors) {\n availableColors.forEach((colorName: string) => {\n const hexColor = getColorFromPalette(colorName, {\n color,\n colorMode,\n secondaryColor,\n });\n\n if (hexColor) {\n const rgbColor = hexToRgb255(hexColor);\n\n result[colorName] = hexColor;\n\n if (rgbColor) {\n result[`${colorName}-rgb`] = `${rgbColor.r}, ${rgbColor.g}, ${rgbColor.b}`;\n }\n }\n });\n }\n\n if (designSettings) {\n Object.keys(designSettings).forEach((key) => {\n if (key === 'iconStyle') {\n result[key] = convertIconStyle(designSettings.iconStyle);\n\n return;\n }\n result[DesignSettingsKeyMap[key as keyof ChaynsDesignSettings] || key] = designSettings[\n key as keyof ChaynsDesignSettings\n ] as string;\n });\n }\n\n if (paragraphFormat) {\n const { themeResult } = getHeadlineColorSelector(paragraphFormat);\n\n // Update Theme\n Object.keys(themeResult).forEach((key) => {\n result[key] = themeResult[key] as string;\n });\n }\n\n switch (colorMode) {\n case ColorMode.Light:\n result.colorMode = 'light';\n break;\n case ColorMode.Dark:\n result.colorMode = 'dark';\n break;\n default:\n result.colorMode = 'classic';\n break;\n }\n\n if (iconColor) {\n result.iconColor = iconColor;\n }\n\n result.fontSize = (designSettings?.fontSizePx || 15) as unknown as string;\n\n return result;\n};\n\nexport const useChaynsTheme = ({\n colors,\n colorMode,\n color,\n secondaryColor,\n designSettings: designSettingsProp,\n paragraphFormat: paragraphFormatProp,\n siteId,\n iconColor,\n theme,\n customVariables,\n}: ThemeOptions) => {\n const designSettings = useDesignSettings({\n color,\n colorMode,\n designSettings: designSettingsProp,\n siteId,\n });\n\n const paragraphFormat = useParagraphFormat(siteId, paragraphFormatProp);\n const isMountedRef = useRef<boolean>(false);\n\n const [internalTheme, setInternalTheme] = useState<Theme>(() =>\n createTheme({\n colors,\n colorMode,\n color,\n secondaryColor,\n designSettings,\n paragraphFormat,\n theme,\n iconColor,\n customVariables,\n }),\n );\n\n useEffect(() => {\n if (!isMountedRef.current) {\n isMountedRef.current = true;\n return;\n }\n setInternalTheme(\n createTheme({\n colors,\n colorMode,\n color,\n secondaryColor,\n designSettings,\n paragraphFormat,\n theme,\n iconColor,\n customVariables,\n }),\n );\n }, [\n color,\n colorMode,\n colors,\n designSettings,\n paragraphFormat,\n secondaryColor,\n theme,\n customVariables,\n iconColor,\n ]);\n\n return useMemo(\n () => ({\n theme: internalTheme,\n designSettings,\n paragraphFormat,\n }),\n [internalTheme, designSettings, paragraphFormat],\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,KAA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rCnC,KAAK;IACLD,SAAS;IACTG,cAAc,EAAE8B,kBAAkB;IAClCE;EACJ,CAAC,CAAC;EAEF,MAAM/B,eAAe,GAAG,IAAAiC,sCAAkB,EAACF,MAAM,EAAED,mBAAmB,CAAC;EACvE,MAAMI,YAAY,GAAG,IAAAC,aAAM,EAAU,KAAK,CAAC;EAE3C,MAAM,CAACC,aAAa,EAAEC,gBAAgB,CAAC,GAAG,IAAAC,eAAQ,EAAQ,MACtD5C,WAAW,CAAC;IACRC,MAAM;IACNC,SAAS;IACTC,KAAK;IACLC,cAAc;IACdC,cAAc;IACdC,eAAe;IACfC,KAAK;IACLC,SAAS;IACTC;EACJ,CAAC,CACL,CAAC;EAED,IAAAoC,gBAAS,EAAC,MAAM;IACZ,IAAI,CAACL,YAAY,CAACM,OAAO,EAAE;MACvBN,YAAY,CAACM,OAAO,GAAG,IAAI;MAC3B;IACJ;IACAH,gBAAgB,CACZ3C,WAAW,CAAC;MACRC,MAAM;MACNC,SAAS;MACTC,KAAK;MACLC,cAAc;MACdC,cAAc;MACdC,eAAe;MACfC,KAAK;MACLC,SAAS;MACTC;IACJ,CAAC,CACL,CAAC;EACL,CAAC,EAAE,CACCN,KAAK,EACLD,SAAS,EACTD,MAAM,EACNI,cAAc,EACdC,eAAe,EACfF,cAAc,EACdG,KAAK,EACLE,eAAe,EACfD,SAAS,CACZ,CAAC;EAEF,OAAO,IAAAuC,cAAO,EACV,OAAO;IACHxC,KAAK,EAAEmC,aAAa;IACpBrC,cAAc;IACdC;EACJ,CAAC,CAAC,EACF,CAACoC,aAAa,EAAErC,cAAc,EAAEC,eAAe,CACnD,CAAC;AACL,CAAC;AAAC0C,OAAA,CAAAd,cAAA,GAAAA,cAAA","ignoreList":[]}
@@ -38,7 +38,6 @@ const ActionButton = ({
38
38
  const isPrimary = actionType === 'primary';
39
39
  const isSecondary = actionType === 'secondary';
40
40
  const actionColor = action.color ?? '#FFFFFF';
41
- const labelKey = typeof action.label === 'string' || typeof action.label === 'number' ? action.label : actionType;
42
41
  return /*#__PURE__*/_react2.default.createElement(_ActionButton.StyledActionButton, {
43
42
  disabled: isDisabled || action.isDisabled,
44
43
  $backgroundColor: backgroundColor,
@@ -64,10 +63,8 @@ const ActionButton = ({
64
63
  color: actionColor,
65
64
  size: height - 24
66
65
  }) : action.icon), /*#__PURE__*/_react2.default.createElement(_react.AnimatePresence, {
67
- initial: false,
68
- mode: "wait"
66
+ initial: false
69
67
  }, showLabel && /*#__PURE__*/_react2.default.createElement(_ActionButton.StyledLabelWrapper, {
70
- key: labelKey,
71
68
  animate: {
72
69
  opacity: 1,
73
70
  width: 'auto',
@@ -1 +1 @@
1
- {"version":3,"file":"ActionButton.js","names":["_react","require","_react2","_interopRequireDefault","_Icon","_ActionButton","e","__esModule","default","LABEL_GAP","LABEL_TRANSITION","duration","ActionButton","action","actionType","backgroundColor","isCollapsed","isDisabled","isExpanded","isHidden","isShrunk","isSolo","onClick","onMouseEnter","onMouseLeave","showLabel","shouldUseContentWidth","height","_action$status","_action$status2","isPrimary","isSecondary","actionColor","color","labelKey","label","createElement","StyledActionButton","disabled","$backgroundColor","$isCollapsed","$isExpanded","undefined","$isHidden","$isPrimary","$isSecondary","$isShrunk","$isSolo","$pulseColors","status","pulseColors","$height","$statusType","type","$shouldUseContentWidth","StyledActionContent","StyledIconSlot","icon","icons","size","AnimatePresence","initial","mode","StyledLabelWrapper","key","animate","opacity","width","marginLeft","exit","transition","StyledSecondaryLabel","style","displayName","_default","exports"],"sources":["../../../../../src/components/multi-action-button/action-button/ActionButton.tsx"],"sourcesContent":["import { AnimatePresence } from 'motion/react';\nimport React, { FC, MouseEvent } from 'react';\nimport Icon from '../../icon/Icon';\nimport {\n StyledActionButton,\n StyledActionContent,\n StyledIconSlot,\n StyledLabelWrapper,\n StyledSecondaryLabel,\n} from './ActionButton.styles';\nimport type { MultiActionButtonAction } from '../MultiActionButton.types';\n\nconst LABEL_GAP = 6;\nconst LABEL_TRANSITION = { duration: 0.3 };\n\nexport type ActionButtonProps = {\n action: MultiActionButtonAction;\n actionType: 'primary' | 'secondary';\n backgroundColor?: string;\n isCollapsed: boolean;\n isDisabled: boolean;\n isExpanded?: boolean;\n isHidden?: boolean;\n isShrunk?: boolean;\n isSolo?: boolean;\n onClick?: (event: MouseEvent<HTMLButtonElement>) => void;\n onMouseEnter?: () => void;\n onMouseLeave?: () => void;\n showLabel: boolean;\n shouldUseContentWidth: boolean;\n height: number;\n};\n\n/**\n * Shared action button UI used by both primary and secondary actions.\n * Keeps layout and animations consistent while isolating styling details.\n */\nconst ActionButton: FC<ActionButtonProps> = ({\n action,\n actionType,\n backgroundColor,\n isCollapsed,\n isDisabled,\n isExpanded,\n isHidden,\n isShrunk,\n isSolo,\n onClick,\n onMouseEnter,\n onMouseLeave,\n showLabel,\n shouldUseContentWidth,\n height,\n}) => {\n const isPrimary = actionType === 'primary';\n const isSecondary = actionType === 'secondary';\n const actionColor = action.color ?? '#FFFFFF';\n \n const labelKey =\n typeof action.label === 'string' || typeof action.label === 'number'\n ? action.label\n : actionType;\n\n return (\n <StyledActionButton\n disabled={isDisabled || action.isDisabled}\n $backgroundColor={backgroundColor}\n $isCollapsed={isCollapsed}\n $isExpanded={isSecondary ? isExpanded : undefined}\n $isHidden={isSecondary ? isHidden : undefined}\n $isPrimary={isPrimary}\n $isSecondary={isSecondary}\n $isShrunk={isPrimary ? isShrunk : undefined}\n $isSolo={isPrimary ? isSolo : undefined}\n $pulseColors={action.status?.pulseColors}\n $height={height}\n $statusType={action.status?.type}\n $shouldUseContentWidth={shouldUseContentWidth}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n type=\"button\"\n >\n <StyledActionContent>\n <StyledIconSlot $height={height}>\n {typeof action.icon === 'string' ? (\n <Icon icons={[action.icon]} color={actionColor} size={height - 24} />\n ) : (\n action.icon\n )}\n </StyledIconSlot>\n <AnimatePresence initial={false} mode=\"wait\">\n {/* Animate width and margin to avoid layout jumps when labels mount/unmount. */}\n {showLabel && (\n <StyledLabelWrapper\n key={labelKey}\n animate={{ opacity: 1, width: 'auto', marginLeft: LABEL_GAP }}\n exit={{ opacity: 0, width: 0, marginLeft: 0 }}\n initial={{ opacity: 0, width: 0, marginLeft: 0 }}\n transition={LABEL_TRANSITION}\n >\n <StyledSecondaryLabel style={{ color: actionColor }}>\n {action.label}\n </StyledSecondaryLabel>\n </StyledLabelWrapper>\n )}\n </AnimatePresence>\n </StyledActionContent>\n </StyledActionButton>\n );\n};\n\nActionButton.displayName = 'ActionButton';\n\nexport default ActionButton;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAM+B,SAAAE,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAG/B,MAAMG,SAAS,GAAG,CAAC;AACnB,MAAMC,gBAAgB,GAAG;EAAEC,QAAQ,EAAE;AAAI,CAAC;AAoB1C;AACA;AACA;AACA;AACA,MAAMC,YAAmC,GAAGA,CAAC;EACzCC,MAAM;EACNC,UAAU;EACVC,eAAe;EACfC,WAAW;EACXC,UAAU;EACVC,UAAU;EACVC,QAAQ;EACRC,QAAQ;EACRC,MAAM;EACNC,OAAO;EACPC,YAAY;EACZC,YAAY;EACZC,SAAS;EACTC,qBAAqB;EACrBC;AACJ,CAAC,KAAK;EAAA,IAAAC,cAAA,EAAAC,eAAA;EACF,MAAMC,SAAS,GAAGhB,UAAU,KAAK,SAAS;EAC1C,MAAMiB,WAAW,GAAGjB,UAAU,KAAK,WAAW;EAC9C,MAAMkB,WAAW,GAAGnB,MAAM,CAACoB,KAAK,IAAI,SAAS;EAE7C,MAAMC,QAAQ,GACV,OAAOrB,MAAM,CAACsB,KAAK,KAAK,QAAQ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,EAAE,CAAC7C,MAAM,CAAC4C,IAAI,CAAE;IAACxB,KAAK,EAAED,WAAY;IAAC2B,IAAI,EAAEhC,MAAM,GAAG;EAAG,CAAE,CAAC,GAErEd,MAAM,CAAC4C,IAEC,CAAC,eACjBvD,OAAA,CAAAM,OAAA,CAAA4B,aAAA,CAACpC,MAAA,CAAA4D,eAAe;IAACC,OAAO,EAAE,KAAM;IAACC,IAAI,EAAC;EAAM,GAEvCrC,SAAS,iBACNvB,OAAA,CAAAM,OAAA,CAAA4B,aAAA,CAAC/B,aAAA,CAAA0D,kBAAkB;IACfC,GAAG,EAAE9B,QAAS;IACd+B,OAAO,EAAE;MAAEC,OAAO,EAAE,CAAC;MAAEC,KAAK,EAAE,MAAM;MAAEC,UAAU,EAAE3D;IAAU,CAAE;IAC9D4D,IAAI,EAAE;MAAEH,OAAO,EAAE,CAAC;MAAEC,KAAK,EAAE,CAAC;MAAEC,UAAU,EAAE;IAAE,CAAE;IAC9CP,OAAO,EAAE;MAAEK,OAAO,EAAE,CAAC;MAAEC,KAAK,EAAE,CAAC;MAAEC,UAAU,EAAE;IAAE,CAAE;IACjDE,UAAU,EAAE5D;EAAiB,gBAE7BR,OAAA,CAAAM,OAAA,CAAA4B,aAAA,CAAC/B,aAAA,CAAAkE,oBAAoB;IAACC,KAAK,EAAE;MAAEvC,KAAK,EAAED;IAAY;EAAE,GAC/CnB,MAAM,CAACsB,KACU,CACN,CAEX,CACA,CACL,CAAC;AAE7B,CAAC;AAEDvB,YAAY,CAAC6D,WAAW,GAAG,cAAc;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAnE,OAAA,GAE3BI,YAAY","ignoreList":[]}
1
+ {"version":3,"file":"ActionButton.js","names":["_react","require","_react2","_interopRequireDefault","_Icon","_ActionButton","e","__esModule","default","LABEL_GAP","LABEL_TRANSITION","duration","ActionButton","action","actionType","backgroundColor","isCollapsed","isDisabled","isExpanded","isHidden","isShrunk","isSolo","onClick","onMouseEnter","onMouseLeave","showLabel","shouldUseContentWidth","height","_action$status","_action$status2","isPrimary","isSecondary","actionColor","color","createElement","StyledActionButton","disabled","$backgroundColor","$isCollapsed","$isExpanded","undefined","$isHidden","$isPrimary","$isSecondary","$isShrunk","$isSolo","$pulseColors","status","pulseColors","$height","$statusType","type","$shouldUseContentWidth","StyledActionContent","StyledIconSlot","icon","icons","size","AnimatePresence","initial","StyledLabelWrapper","animate","opacity","width","marginLeft","exit","transition","StyledSecondaryLabel","style","label","displayName","_default","exports"],"sources":["../../../../../src/components/multi-action-button/action-button/ActionButton.tsx"],"sourcesContent":["import { AnimatePresence } from 'motion/react';\nimport React, { FC, MouseEvent } from 'react';\nimport Icon from '../../icon/Icon';\nimport {\n StyledActionButton,\n StyledActionContent,\n StyledIconSlot,\n StyledLabelWrapper,\n StyledSecondaryLabel,\n} from './ActionButton.styles';\nimport type { MultiActionButtonAction } from '../MultiActionButton.types';\n\nconst LABEL_GAP = 6;\nconst LABEL_TRANSITION = { duration: 0.3 };\n\nexport type ActionButtonProps = {\n action: MultiActionButtonAction;\n actionType: 'primary' | 'secondary';\n backgroundColor?: string;\n isCollapsed: boolean;\n isDisabled: boolean;\n isExpanded?: boolean;\n isHidden?: boolean;\n isShrunk?: boolean;\n isSolo?: boolean;\n onClick?: (event: MouseEvent<HTMLButtonElement>) => void;\n onMouseEnter?: () => void;\n onMouseLeave?: () => void;\n showLabel: boolean;\n shouldUseContentWidth: boolean;\n height: number;\n};\n\n/**\n * Shared action button UI used by both primary and secondary actions.\n * Keeps layout and animations consistent while isolating styling details.\n */\nconst ActionButton: FC<ActionButtonProps> = ({\n action,\n actionType,\n backgroundColor,\n isCollapsed,\n isDisabled,\n isExpanded,\n isHidden,\n isShrunk,\n isSolo,\n onClick,\n onMouseEnter,\n onMouseLeave,\n showLabel,\n shouldUseContentWidth,\n height,\n}) => {\n const isPrimary = actionType === 'primary';\n const isSecondary = actionType === 'secondary';\n const actionColor = action.color ?? '#FFFFFF';\n\n return (\n <StyledActionButton\n disabled={isDisabled || action.isDisabled}\n $backgroundColor={backgroundColor}\n $isCollapsed={isCollapsed}\n $isExpanded={isSecondary ? isExpanded : undefined}\n $isHidden={isSecondary ? isHidden : undefined}\n $isPrimary={isPrimary}\n $isSecondary={isSecondary}\n $isShrunk={isPrimary ? isShrunk : undefined}\n $isSolo={isPrimary ? isSolo : undefined}\n $pulseColors={action.status?.pulseColors}\n $height={height}\n $statusType={action.status?.type}\n $shouldUseContentWidth={shouldUseContentWidth}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n type=\"button\"\n >\n <StyledActionContent>\n <StyledIconSlot $height={height}>\n {typeof action.icon === 'string' ? (\n <Icon icons={[action.icon]} color={actionColor} size={height - 24} />\n ) : (\n action.icon\n )}\n </StyledIconSlot>\n <AnimatePresence initial={false}>\n {/* Animate width and margin to avoid layout jumps when labels mount/unmount. */}\n {showLabel && (\n <StyledLabelWrapper\n animate={{ opacity: 1, width: 'auto', marginLeft: LABEL_GAP }}\n exit={{ opacity: 0, width: 0, marginLeft: 0 }}\n initial={{ opacity: 0, width: 0, marginLeft: 0 }}\n transition={LABEL_TRANSITION}\n >\n <StyledSecondaryLabel style={{ color: actionColor }}>\n {action.label}\n </StyledSecondaryLabel>\n </StyledLabelWrapper>\n )}\n </AnimatePresence>\n </StyledActionContent>\n </StyledActionButton>\n );\n};\n\nActionButton.displayName = 'ActionButton';\n\nexport default ActionButton;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAM+B,SAAAE,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAG/B,MAAMG,SAAS,GAAG,CAAC;AACnB,MAAMC,gBAAgB,GAAG;EAA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ACL,CAAC;AAE7B,CAAC;AAEDzD,YAAY,CAAC0D,WAAW,GAAG,cAAc;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAhE,OAAA,GAE3BI,YAAY","ignoreList":[]}
@@ -8,8 +8,8 @@ var _react = _interopRequireDefault(require("react"));
8
8
  var _VerificationBadge = require("./VerificationBadge.styles");
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
10
  const VerificationBadge = () => /*#__PURE__*/_react.default.createElement(_VerificationBadge.StyledVerificationBadge, {
11
- className: "vcid-check--blue"
12
- }, /*#__PURE__*/_react.default.createElement("span", null), /*#__PURE__*/_react.default.createElement("span", null), /*#__PURE__*/_react.default.createElement("span", null));
11
+ className: "beta-chayns-verification-badge"
12
+ }, /*#__PURE__*/_react.default.createElement("span", null, '\ue903'), /*#__PURE__*/_react.default.createElement("span", null, '\ue904'), /*#__PURE__*/_react.default.createElement("span", null, '\ue905'));
13
13
  VerificationBadge.displayName = 'VerificationBadge';
14
14
  var _default = exports.default = VerificationBadge;
15
15
  //# sourceMappingURL=VerificationBadge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VerificationBadge.js","names":["_react","_interopRequireDefault","require","_VerificationBadge","e","__esModule","default","VerificationBadge","createElement","StyledVerificationBadge","className","displayName","_default","exports"],"sources":["../../../../src/components/verification-badge/VerificationBadge.tsx"],"sourcesContent":["import React from 'react';\nimport { StyledVerificationBadge } from './VerificationBadge.styles';\n\nconst VerificationBadge = () => (\n <StyledVerificationBadge className=\"vcid-check--blue\">\n <span />\n <span />\n <span />\n </StyledVerificationBadge>\n);\n\nVerificationBadge.displayName = 'VerificationBadge';\n\nexport default VerificationBadge;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AAAqE,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAErE,MAAMG,iBAAiB,GAAGA,CAAA,kBACtBP,MAAA,CAAAM,OAAA,CAAAE,aAAA,CAACL,kBAAA,CAAAM,uBAAuB;EAACC,SAAS,EAAC;AAAkB,gBACjDV,MAAA,CAAAM,OAAA,CAAAE,aAAA,aAAO,CAAC,eACRR,MAAA,CAAAM,OAAA,CAAAE,aAAA,aAAO,CAAC,eACRR,MAAA,CAAAM,OAAA,CAAAE,aAAA,aAAO,CACc,CAC5B;AAEDD,iBAAiB,CAACI,WAAW,GAAG,mBAAmB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAP,OAAA,GAErCC,iBAAiB","ignoreList":[]}
1
+ {"version":3,"file":"VerificationBadge.js","names":["_react","_interopRequireDefault","require","_VerificationBadge","e","__esModule","default","VerificationBadge","createElement","StyledVerificationBadge","className","displayName","_default","exports"],"sources":["../../../../src/components/verification-badge/VerificationBadge.tsx"],"sourcesContent":["import React from 'react';\nimport { StyledVerificationBadge } from './VerificationBadge.styles';\n\nconst VerificationBadge = () => (\n <StyledVerificationBadge className=\"beta-chayns-verification-badge\">\n <span>{'\\ue903'}</span>\n <span>{'\\ue904'}</span>\n <span>{'\\ue905'}</span>\n </StyledVerificationBadge>\n);\n\nVerificationBadge.displayName = 'VerificationBadge';\n\nexport default VerificationBadge;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AAAqE,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAErE,MAAMG,iBAAiB,GAAGA,CAAA,kBACtBP,MAAA,CAAAM,OAAA,CAAAE,aAAA,CAACL,kBAAA,CAAAM,uBAAuB;EAACC,SAAS,EAAC;AAAgC,gBAC/DV,MAAA,CAAAM,OAAA,CAAAE,aAAA,eAAO,QAAe,CAAC,eACvBR,MAAA,CAAAM,OAAA,CAAAE,aAAA,eAAO,QAAe,CAAC,eACvBR,MAAA,CAAAM,OAAA,CAAAE,aAAA,eAAO,QAAe,CACD,CAC5B;AAEDD,iBAAiB,CAACI,WAAW,GAAG,mBAAmB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAP,OAAA,GAErCC,iBAAiB","ignoreList":[]}
@@ -6,5 +6,41 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.StyledVerificationBadge = void 0;
7
7
  var _styledComponents = _interopRequireDefault(require("styled-components"));
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
- const StyledVerificationBadge = exports.StyledVerificationBadge = _styledComponents.default.span``;
9
+ const StyledVerificationBadge = exports.StyledVerificationBadge = _styledComponents.default.span`
10
+ @font-face {
11
+ font-family: 'Verified-chaynsID';
12
+ src:
13
+ url(https://api.chayns-static.space/font-vcid/Verified-chaynsID.woff2) format('woff2'),
14
+ url(https://api.chayns-static.space/font-vcid/Verified-chaynsID.woff2) format('woff'),
15
+ url(https://api.chayns-static.space/font-vcid/Verified-chaynsID.woff2) format('woff'),
16
+ url(https://api.chayns-static.space/font-vcid/Verified-chaynsID.ttf) format('truetype'),
17
+ url(https://api.chayns-static.space/font-vcid/Verified-chaynsID.svg) format('svg');
18
+ font-weight: normal;
19
+ font-style: normal;
20
+ font-display: block;
21
+ }
22
+
23
+ /*noinspection CssNoGenericFontName*/
24
+ font-family: 'Verified-chaynsID' !important;
25
+ font-style: normal;
26
+ font-weight: normal;
27
+ font-variant: normal;
28
+ text-transform: none;
29
+ line-height: 1;
30
+ font-size: 0.8em;
31
+ -webkit-font-smoothing: antialiased;
32
+ -moz-osx-font-smoothing: grayscale;
33
+
34
+ margin-left: 0.2em;
35
+
36
+ & > :first-child {
37
+ color: #5890ff;
38
+ }
39
+
40
+ & > :nth-child(2),
41
+ & > :nth-child(3) {
42
+ margin-left: -1em;
43
+ color: #fff;
44
+ }
45
+ `;
10
46
  //# sourceMappingURL=VerificationBadge.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VerificationBadge.styles.js","names":["_styledComponents","_interopRequireDefault","require","e","__esModule","default","StyledVerificationBadge","exports","styled","span"],"sources":["../../../../src/components/verification-badge/VerificationBadge.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledVerificationBadge = styled.span``;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAuC,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhC,MAAMG,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAGE,yBAAM,CAACC,IAAI,EAAE","ignoreList":[]}
1
+ {"version":3,"file":"VerificationBadge.styles.js","names":["_styledComponents","_interopRequireDefault","require","e","__esModule","default","StyledVerificationBadge","exports","styled","span"],"sources":["../../../../src/components/verification-badge/VerificationBadge.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledVerificationBadge = styled.span`\n @font-face {\n font-family: 'Verified-chaynsID';\n src:\n url(https://api.chayns-static.space/font-vcid/Verified-chaynsID.woff2) format('woff2'),\n url(https://api.chayns-static.space/font-vcid/Verified-chaynsID.woff2) format('woff'),\n url(https://api.chayns-static.space/font-vcid/Verified-chaynsID.woff2) format('woff'),\n url(https://api.chayns-static.space/font-vcid/Verified-chaynsID.ttf) format('truetype'),\n url(https://api.chayns-static.space/font-vcid/Verified-chaynsID.svg) format('svg');\n font-weight: normal;\n font-style: normal;\n font-display: block;\n }\n\n /*noinspection CssNoGenericFontName*/\n font-family: 'Verified-chaynsID' !important;\n font-style: normal;\n font-weight: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n font-size: 0.8em;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n\n margin-left: 0.2em;\n\n & > :first-child {\n color: #5890ff;\n }\n\n & > :nth-child(2),\n & > :nth-child(3) {\n margin-left: -1em;\n color: #fff;\n }\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAuC,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhC,MAAMG,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAGE,yBAAM,CAACC,IAAI;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
@@ -11,6 +11,12 @@ export const StyledColorSchemeProvider = styled.div`
11
11
  return [`--chayns-color--${colorName}: ${theme[colorName]};`, `--chayns-color-rgb--${colorName}: ${theme[colorNameRgb]};`];
12
12
  })}
13
13
 
14
+ ${({
15
+ theme
16
+ }) => `
17
+ --chayns-color--header-bar: ${theme['header-bar'] ?? theme.primary};
18
+ `}
19
+
14
20
  // ToDo: Remove .h1...
15
21
  .color-scheme-provider :is(h1,.h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6):first-child {
16
22
  margin-top: 0;
@@ -1 +1 @@
1
- {"version":3,"file":"ColorSchemeProvider.styles.js","names":["getAvailableColorList","styled","StyledColorSchemeProvider","div","theme","map","colorName","colorNameRgb"],"sources":["../../../../src/components/color-scheme-provider/ColorSchemeProvider.styles.ts"],"sourcesContent":["import { getAvailableColorList } from '@chayns/colors';\nimport { styled } from 'styled-components';\nimport type { WithTheme } from './ColorSchemeProvider';\n\ntype ColorSchemeProviderProps = WithTheme<unknown>;\n\n// noinspection CssUnresolvedCustomProperty\nexport const StyledColorSchemeProvider = styled.div<ColorSchemeProviderProps>`\n color: var(--chayns-color--text);\n\n ${({ theme }: ColorSchemeProviderProps) =>\n getAvailableColorList().map((colorName: string) => {\n const colorNameRgb = `${colorName}-rgb`;\n return [\n `--chayns-color--${colorName}: ${theme[colorName]};`,\n `--chayns-color-rgb--${colorName}: ${theme[colorNameRgb]};`,\n ];\n })}\n\n // ToDo: Remove .h1...\n .color-scheme-provider :is(h1,.h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6):first-child {\n margin-top: 0;\n }\n`;\n"],"mappings":"AAAA,SAASA,qBAAqB,QAAQ,gBAAgB;AACtD,SAASC,MAAM,QAAQ,mBAAmB;AAK1C;AACA,OAAO,MAAMC,yBAAyB,GAAGD,MAAM,CAACE,GAA6B;AAC7E;AACA;AACA,MAAM,CAAC;EAAEC;AAAgC,CAAC,KAClCJ,qBAAqB,CAAC,CAAC,CAACK,GAAG,CAAEC,SAAiB,IAAK;EAC/C,MAAMC,YAAY,GAAG,GAAGD,SAAS,MAAM;EACvC,OAAO,CACH,mBAAmBA,SAAS,KAAKF,KAAK,CAACE,SAAS,CAAC,GAAG,EACpD,uBAAuBA,SAAS,KAAKF,KAAK,CAACG,YAAY,CAAC,GAAG,CAC9D;AACL,CAAC,CAAC;AACV;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"ColorSchemeProvider.styles.js","names":["getAvailableColorList","styled","StyledColorSchemeProvider","div","theme","map","colorName","colorNameRgb","primary"],"sources":["../../../../src/components/color-scheme-provider/ColorSchemeProvider.styles.ts"],"sourcesContent":["import { getAvailableColorList } from '@chayns/colors';\nimport { styled } from 'styled-components';\nimport type { WithTheme } from './ColorSchemeProvider';\n\ntype ColorSchemeProviderProps = WithTheme<unknown>;\n\n// noinspection CssUnresolvedCustomProperty\nexport const StyledColorSchemeProvider = styled.div<ColorSchemeProviderProps>`\n color: var(--chayns-color--text);\n\n ${({ theme }: ColorSchemeProviderProps) =>\n getAvailableColorList().map((colorName: string) => {\n const colorNameRgb = `${colorName}-rgb`;\n return [\n `--chayns-color--${colorName}: ${theme[colorName]};`,\n `--chayns-color-rgb--${colorName}: ${theme[colorNameRgb]};`,\n ];\n })}\n\n ${({ theme }: ColorSchemeProviderProps) =>\n `\n --chayns-color--header-bar: ${theme['header-bar'] ?? theme.primary};\n `}\n\n // ToDo: Remove .h1...\n .color-scheme-provider :is(h1,.h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6):first-child {\n margin-top: 0;\n }\n`;\n"],"mappings":"AAAA,SAASA,qBAAqB,QAAQ,gBAAgB;AACtD,SAASC,MAAM,QAAQ,mBAAmB;AAK1C;AACA,OAAO,MAAMC,yBAAyB,GAAGD,MAAM,CAACE,GAA6B;AAC7E;AACA;AACA,MAAM,CAAC;EAAEC;AAAgC,CAAC,KAClCJ,qBAAqB,CAAC,CAAC,CAACK,GAAG,CAAEC,SAAiB,IAAK;EAC/C,MAAMC,YAAY,GAAG,GAAGD,SAAS,MAAM;EACvC,OAAO,CACH,mBAAmBA,SAAS,KAAKF,KAAK,CAACE,SAAS,CAAC,GAAG,EACpD,uBAAuBA,SAAS,KAAKF,KAAK,CAACG,YAAY,CAAC,GAAG,CAC9D;AACL,CAAC,CAAC;AACV;AACA,MAAM,CAAC;EAAEH;AAAgC,CAAC,KAClC;AACR,sCAAsCA,KAAK,CAAC,YAAY,CAAC,IAAIA,KAAK,CAACI,OAAO;AAC1E,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
@@ -4,6 +4,9 @@ import { useEffect, useMemo, useRef, useState } from 'react';
4
4
  import { convertIconStyle, getHeadlineColorSelector } from '../../../utils/font';
5
5
  import { useDesignSettings } from './useDesignSettings';
6
6
  import { useParagraphFormat } from './useParagraphFormat';
7
+ const DesignSettingsKeyMap = {
8
+ headerBarColor: 'header-bar'
9
+ };
7
10
  const createTheme = ({
8
11
  colors,
9
12
  colorMode,
@@ -47,7 +50,7 @@ const createTheme = ({
47
50
  result[key] = convertIconStyle(designSettings.iconStyle);
48
51
  return;
49
52
  }
50
- result[key] = designSettings[key];
53
+ result[DesignSettingsKeyMap[key] || key] = designSettings[key];
51
54
  });
52
55
  }
53
56
  if (paragraphFormat) {
@@ -1 +1 @@
1
- {"version":3,"file":"useChaynsTheme.js","names":["getAvailableColorList","getColorFromPalette","hexToRgb255","ColorMode","useEffect","useMemo","useRef","useState","convertIconStyle","getHeadlineColorSelector","useDesignSettings","useParagraphFormat","createTheme","colors","colorMode","color","secondaryColor","designSettings","paragraphFormat","theme","iconColor","customVariables","result","Object","keys","forEach","key","availableColors","colorName","hexColor","rgbColor","r","g","b","iconStyle","themeResult","Light","Dark","fontSize","fontSizePx","useChaynsTheme","designSettingsProp","paragraphFormatProp","siteId","isMountedRef","internalTheme","setInternalTheme","current"],"sources":["../../../../../src/components/color-scheme-provider/hooks/useChaynsTheme.ts"],"sourcesContent":["import { getAvailableColorList, getColorFromPalette, hexToRgb255 } from '@chayns/colors';\nimport { ChaynsDesignSettings, ChaynsParagraphFormat, ColorMode } from 'chayns-api';\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport { convertIconStyle, getHeadlineColorSelector } from '../../../utils/font';\nimport type { Theme } from '../ColorSchemeProvider';\nimport { useDesignSettings } from './useDesignSettings';\nimport { useParagraphFormat } from './useParagraphFormat';\n\nexport type ThemeOptions = {\n colors?: Theme;\n colorMode: ColorMode;\n iconColor?: string;\n color: string;\n secondaryColor?: string;\n designSettings?: ChaynsDesignSettings & { fontSizePx?: number };\n paragraphFormat?: ChaynsParagraphFormat[];\n siteId?: string;\n theme?: Theme;\n customVariables?: Record<string, string>;\n};\n\nconst createTheme = ({\n colors,\n colorMode,\n color,\n secondaryColor,\n designSettings,\n paragraphFormat,\n theme,\n iconColor,\n customVariables,\n}: Omit<ThemeOptions, 'siteId'>) => {\n if (theme) {\n return theme;\n }\n\n const result: Theme = {};\n\n if (customVariables) {\n Object.keys(customVariables).forEach((key) => {\n result[key] = customVariables[key] as string;\n });\n }\n\n const availableColors = getAvailableColorList();\n\n if (!colors) {\n availableColors.forEach((colorName: string) => {\n const hexColor = getColorFromPalette(colorName, {\n color,\n colorMode,\n secondaryColor,\n });\n\n if (hexColor) {\n const rgbColor = hexToRgb255(hexColor);\n\n result[colorName] = hexColor;\n\n if (rgbColor) {\n result[`${colorName}-rgb`] = `${rgbColor.r}, ${rgbColor.g}, ${rgbColor.b}`;\n }\n }\n });\n }\n\n if (designSettings) {\n Object.keys(designSettings).forEach((key) => {\n if (key === 'iconStyle') {\n result[key] = convertIconStyle(designSettings.iconStyle);\n\n return;\n }\n result[key] = designSettings[key as keyof ChaynsDesignSettings] as string;\n });\n }\n\n if (paragraphFormat) {\n const { themeResult } = getHeadlineColorSelector(paragraphFormat);\n\n // Update Theme\n Object.keys(themeResult).forEach((key) => {\n result[key] = themeResult[key] as string;\n });\n }\n\n switch (colorMode) {\n case ColorMode.Light:\n result.colorMode = 'light';\n break;\n case ColorMode.Dark:\n result.colorMode = 'dark';\n break;\n default:\n result.colorMode = 'classic';\n break;\n }\n\n if (iconColor) {\n result.iconColor = iconColor;\n }\n\n result.fontSize = (designSettings?.fontSizePx || 15) as unknown as string;\n\n return result;\n};\n\nexport const useChaynsTheme = ({\n colors,\n colorMode,\n color,\n secondaryColor,\n designSettings: designSettingsProp,\n paragraphFormat: paragraphFormatProp,\n siteId,\n iconColor,\n theme,\n customVariables,\n}: ThemeOptions) => {\n const designSettings = useDesignSettings({\n color,\n colorMode,\n designSettings: designSettingsProp,\n siteId,\n });\n\n const paragraphFormat = useParagraphFormat(siteId, paragraphFormatProp);\n const isMountedRef = useRef<boolean>(false);\n\n const [internalTheme, setInternalTheme] = useState<Theme>(() =>\n createTheme({\n colors,\n colorMode,\n color,\n secondaryColor,\n designSettings,\n paragraphFormat,\n theme,\n iconColor,\n customVariables,\n }),\n );\n\n useEffect(() => {\n if (!isMountedRef.current) {\n isMountedRef.current = true;\n return;\n }\n setInternalTheme(\n createTheme({\n colors,\n colorMode,\n color,\n secondaryColor,\n designSettings,\n paragraphFormat,\n theme,\n iconColor,\n customVariables,\n }),\n );\n }, [\n color,\n colorMode,\n colors,\n designSettings,\n paragraphFormat,\n secondaryColor,\n theme,\n customVariables,\n iconColor,\n ]);\n\n return useMemo(\n () => ({\n theme: internalTheme,\n designSettings,\n paragraphFormat,\n }),\n [internalTheme, designSettings, paragraphFormat],\n );\n};\n"],"mappings":"AAAA,SAASA,qBAAqB,EAAEC,mBAAmB,EAAEC,WAAW,QAAQ,gBAAgB;AACxF,SAAsDC,SAAS,QAAQ,YAAY;AACnF,SAASC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC5D,SAASC,gBAAgB,EAAEC,wBAAwB,QAAQ,qBAAqB;AAEhF,SAASC,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,kBAAkB,QAAQ,sBAAsB;AAezD,MAAMC,WAAW,GAAGA,CAAC;EACjBC,MAAM;EACNC,SAAS;EACTC,KAAK;EACLC,cAAc;EACdC,cAAc;EACdC,eAAe;EACfC,KAAK;EACLC,SAAS;EACTC;AAC0B,CAAC,KAAK;EAChC,IAAIF,KAAK,EAAE;IACP,OAAOA,KAAK;EAChB;EAEA,MAAMG,MAAa,GAAG,CAAC,CAAC;EAExB,IAAID,eAAe,EAAE;IACjBE,MAAM,CAACC,IAAI,CAACH,eAAe,CAAC,CAACI,OAAO,CAAEC,GAAG,IAAK;MAC1CJ,MAAM,CAACI,GAAG,CAAC,GAAGL,eAAe,CAACK,GAAG,CAAW;IAChD,CAAC,CAAC;EACN;EAEA,MAAMC,eAAe,GAAG3B,qBAAqB,CAAC,CAAC;EAE/C,IAAI,CAACa,MAAM,EAAE;IACTc,eAAe,CAACF,OAAO,CAAEG,SAAiB,IAAK;MAC3C,MAAMC,QAAQ,GAAG5B,mBAAmB,CAAC2B,SAAS,EAAE;QAC5Cb,KAAK;QACLD,SAAS;QACTE;MACJ,CAAC,CAAC;MAEF,IAAIa,QAAQ,EAAE;QACV,MAAMC,QAAQ,GAAG5B,WAAW,CAAC2B,QAAQ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D,CAAC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"useChaynsTheme.js","names":["getAvailableColorList","getColorFromPalette","hexToRgb255","ColorMode","useEffect","useMemo","useRef","useState","convertIconStyle","getHeadlineColorSelector","useDesignSettings","useParagraphFormat","DesignSettingsKeyMap","headerBarColor","createTheme","colors","colorMode","color","secondaryColor","designSettings","paragraphFormat","theme","iconColor","customVariables","result","Object","keys","forEach","key","availableColors","colorName","hexColor","rgbColor","r","g","b","iconStyle","themeResult","Light","Dark","fontSize","fontSizePx","useChaynsTheme","designSettingsProp","paragraphFormatProp","siteId","isMountedRef","internalTheme","setInternalTheme","current"],"sources":["../../../../../src/components/color-scheme-provider/hooks/useChaynsTheme.ts"],"sourcesContent":["import { getAvailableColorList, getColorFromPalette, hexToRgb255 } from '@chayns/colors';\nimport { ChaynsDesignSettings, ChaynsParagraphFormat, ColorMode } from 'chayns-api';\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport { convertIconStyle, getHeadlineColorSelector } from '../../../utils/font';\nimport type { Theme } from '../ColorSchemeProvider';\nimport { useDesignSettings } from './useDesignSettings';\nimport { useParagraphFormat } from './useParagraphFormat';\n\nexport type ThemeOptions = {\n colors?: Theme;\n colorMode: ColorMode;\n iconColor?: string;\n color: string;\n secondaryColor?: string;\n designSettings?: ChaynsDesignSettings & { fontSizePx?: number };\n paragraphFormat?: ChaynsParagraphFormat[];\n siteId?: string;\n theme?: Theme;\n customVariables?: Record<string, string>;\n};\n\nconst DesignSettingsKeyMap: Partial<Record<keyof ChaynsDesignSettings, string>> = {\n headerBarColor: 'header-bar',\n};\n\nconst createTheme = ({\n colors,\n colorMode,\n color,\n secondaryColor,\n designSettings,\n paragraphFormat,\n theme,\n iconColor,\n customVariables,\n}: Omit<ThemeOptions, 'siteId'>) => {\n if (theme) {\n return theme;\n }\n\n const result: Theme = {};\n\n if (customVariables) {\n Object.keys(customVariables).forEach((key) => {\n result[key] = customVariables[key] as string;\n });\n }\n\n const availableColors = getAvailableColorList();\n\n if (!colors) {\n availableColors.forEach((colorName: string) => {\n const hexColor = getColorFromPalette(colorName, {\n color,\n colorMode,\n secondaryColor,\n });\n\n if (hexColor) {\n const rgbColor = hexToRgb255(hexColor);\n\n result[colorName] = hexColor;\n\n if (rgbColor) {\n result[`${colorName}-rgb`] = `${rgbColor.r}, ${rgbColor.g}, ${rgbColor.b}`;\n }\n }\n });\n }\n\n if (designSettings) {\n Object.keys(designSettings).forEach((key) => {\n if (key === 'iconStyle') {\n result[key] = convertIconStyle(designSettings.iconStyle);\n\n return;\n }\n result[DesignSettingsKeyMap[key as keyof ChaynsDesignSettings] || key] = designSettings[\n key as keyof ChaynsDesignSettings\n ] as string;\n });\n }\n\n if (paragraphFormat) {\n const { themeResult } = getHeadlineColorSelector(paragraphFormat);\n\n // Update Theme\n Object.keys(themeResult).forEach((key) => {\n result[key] = themeResult[key] as string;\n });\n }\n\n switch (colorMode) {\n case ColorMode.Light:\n result.colorMode = 'light';\n break;\n case ColorMode.Dark:\n result.colorMode = 'dark';\n break;\n default:\n result.colorMode = 'classic';\n break;\n }\n\n if (iconColor) {\n result.iconColor = iconColor;\n }\n\n result.fontSize = (designSettings?.fontSizePx || 15) as unknown as string;\n\n return result;\n};\n\nexport const useChaynsTheme = ({\n colors,\n colorMode,\n color,\n secondaryColor,\n designSettings: designSettingsProp,\n paragraphFormat: paragraphFormatProp,\n siteId,\n iconColor,\n theme,\n customVariables,\n}: ThemeOptions) => {\n const designSettings = useDesignSettings({\n color,\n colorMode,\n designSettings: designSettingsProp,\n siteId,\n });\n\n const paragraphFormat = useParagraphFormat(siteId, paragraphFormatProp);\n const isMountedRef = useRef<boolean>(false);\n\n const [internalTheme, setInternalTheme] = useState<Theme>(() =>\n createTheme({\n colors,\n colorMode,\n color,\n secondaryColor,\n designSettings,\n paragraphFormat,\n theme,\n iconColor,\n customVariables,\n }),\n );\n\n useEffect(() => {\n if (!isMountedRef.current) {\n isMountedRef.current = true;\n return;\n }\n setInternalTheme(\n createTheme({\n colors,\n colorMode,\n color,\n secondaryColor,\n designSettings,\n paragraphFormat,\n theme,\n iconColor,\n customVariables,\n }),\n );\n }, [\n color,\n colorMode,\n colors,\n designSettings,\n paragraphFormat,\n secondaryColor,\n theme,\n customVariables,\n iconColor,\n ]);\n\n return useMemo(\n () => ({\n theme: internalTheme,\n designSettings,\n paragraphFormat,\n }),\n [internalTheme, designSettings, paragraphFormat],\n );\n};\n"],"mappings":"AAAA,SAASA,qBAAqB,EAAEC,mBAAmB,EAAEC,WAAW,QAAQ,gBAAgB;AACxF,SAAsDC,SAAS,QAAQ,YAAY;AACnF,SAASC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC5D,SAASC,gBAAgB,EAAEC,wBAAwB,QAAQ,qBAAqB;AAEhF,SAASC,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,kBAAkB,QAAQ,sBAAsB;AAezD,MAAMC,oBAAyE,GAAG;EAC9EC,cAAc,EAAE;AACpB,CAAC;AAED,MAAMC,WAAW,GAAGA,CAAC;EACjBC,MAAM;EACNC,SAAS;EACTC,KAAK;EACLC,cAAc;EACdC,cAAc;EACdC,eAAe;EACfC,KAAK;EACLC,SAAS;EACTC;AAC0B,CAAC,KAAK;EAChC,IAAIF,KAAK,EAAE;IACP,OAAOA,KAAK;EAChB;EAEA,MAAMG,MAAa,GAAG,CAAC,CAAC;EAExB,IAAID,eAAe,EAAE;IACjBE,MAAM,CAACC,IAAI,CAACH,eAAe,CAAC,CAACI,OAAO,CAAEC,GAAG,IAAK;MAC1CJ,MAAM,CAACI,GAAG,CAAC,GAAGL,eAAe,CAACK,GAAG,CAAW;IAChD,CAAC,CAAC;EACN;EAEA,MAAMC,eAAe,GAAG7B,qBAAqB,CAAC,CAAC;EAE/C,IAAI,CAACe,MAAM,EAAE;IACTc,eAAe,CAACF,OAAO,CAAEG,SAAiB,IAAK;MAC3C,MAAMC,QAAQ,GAAG9B,mBAAmB,CAAC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eAAe,EACfD,SAAS,CACZ,CAAC;EAEF,OAAOjB,OAAO,CACV,OAAO;IACHgB,KAAK,EAAE0B,aAAa;IACpB5B,cAAc;IACdC;EACJ,CAAC,CAAC,EACF,CAAC2B,aAAa,EAAE5B,cAAc,EAAEC,eAAe,CACnD,CAAC;AACL,CAAC","ignoreList":[]}
@@ -30,7 +30,6 @@ const ActionButton = ({
30
30
  const isPrimary = actionType === 'primary';
31
31
  const isSecondary = actionType === 'secondary';
32
32
  const actionColor = action.color ?? '#FFFFFF';
33
- const labelKey = typeof action.label === 'string' || typeof action.label === 'number' ? action.label : actionType;
34
33
  return /*#__PURE__*/React.createElement(StyledActionButton, {
35
34
  disabled: isDisabled || action.isDisabled,
36
35
  $backgroundColor: backgroundColor,
@@ -56,10 +55,8 @@ const ActionButton = ({
56
55
  color: actionColor,
57
56
  size: height - 24
58
57
  }) : action.icon), /*#__PURE__*/React.createElement(AnimatePresence, {
59
- initial: false,
60
- mode: "wait"
58
+ initial: false
61
59
  }, showLabel && /*#__PURE__*/React.createElement(StyledLabelWrapper, {
62
- key: labelKey,
63
60
  animate: {
64
61
  opacity: 1,
65
62
  width: 'auto',
@@ -1 +1 @@
1
- {"version":3,"file":"ActionButton.js","names":["AnimatePresence","React","Icon","StyledActionButton","StyledActionContent","StyledIconSlot","StyledLabelWrapper","StyledSecondaryLabel","LABEL_GAP","LABEL_TRANSITION","duration","ActionButton","action","actionType","backgroundColor","isCollapsed","isDisabled","isExpanded","isHidden","isShrunk","isSolo","onClick","onMouseEnter","onMouseLeave","showLabel","shouldUseContentWidth","height","isPrimary","isSecondary","actionColor","color","labelKey","label","createElement","disabled","$backgroundColor","$isCollapsed","$isExpanded","undefined","$isHidden","$isPrimary","$isSecondary","$isShrunk","$isSolo","$pulseColors","status","pulseColors","$height","$statusType","type","$shouldUseContentWidth","icon","icons","size","initial","mode","key","animate","opacity","width","marginLeft","exit","transition","style","displayName"],"sources":["../../../../../src/components/multi-action-button/action-button/ActionButton.tsx"],"sourcesContent":["import { AnimatePresence } from 'motion/react';\nimport React, { FC, MouseEvent } from 'react';\nimport Icon from '../../icon/Icon';\nimport {\n StyledActionButton,\n StyledActionContent,\n StyledIconSlot,\n StyledLabelWrapper,\n StyledSecondaryLabel,\n} from './ActionButton.styles';\nimport type { MultiActionButtonAction } from '../MultiActionButton.types';\n\nconst LABEL_GAP = 6;\nconst LABEL_TRANSITION = { duration: 0.3 };\n\nexport type ActionButtonProps = {\n action: MultiActionButtonAction;\n actionType: 'primary' | 'secondary';\n backgroundColor?: string;\n isCollapsed: boolean;\n isDisabled: boolean;\n isExpanded?: boolean;\n isHidden?: boolean;\n isShrunk?: boolean;\n isSolo?: boolean;\n onClick?: (event: MouseEvent<HTMLButtonElement>) => void;\n onMouseEnter?: () => void;\n onMouseLeave?: () => void;\n showLabel: boolean;\n shouldUseContentWidth: boolean;\n height: number;\n};\n\n/**\n * Shared action button UI used by both primary and secondary actions.\n * Keeps layout and animations consistent while isolating styling details.\n */\nconst ActionButton: FC<ActionButtonProps> = ({\n action,\n actionType,\n backgroundColor,\n isCollapsed,\n isDisabled,\n isExpanded,\n isHidden,\n isShrunk,\n isSolo,\n onClick,\n onMouseEnter,\n onMouseLeave,\n showLabel,\n shouldUseContentWidth,\n height,\n}) => {\n const isPrimary = actionType === 'primary';\n const isSecondary = actionType === 'secondary';\n const actionColor = action.color ?? '#FFFFFF';\n \n const labelKey =\n typeof action.label === 'string' || typeof action.label === 'number'\n ? action.label\n : actionType;\n\n return (\n <StyledActionButton\n disabled={isDisabled || action.isDisabled}\n $backgroundColor={backgroundColor}\n $isCollapsed={isCollapsed}\n $isExpanded={isSecondary ? isExpanded : undefined}\n $isHidden={isSecondary ? isHidden : undefined}\n $isPrimary={isPrimary}\n $isSecondary={isSecondary}\n $isShrunk={isPrimary ? isShrunk : undefined}\n $isSolo={isPrimary ? isSolo : undefined}\n $pulseColors={action.status?.pulseColors}\n $height={height}\n $statusType={action.status?.type}\n $shouldUseContentWidth={shouldUseContentWidth}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n type=\"button\"\n >\n <StyledActionContent>\n <StyledIconSlot $height={height}>\n {typeof action.icon === 'string' ? (\n <Icon icons={[action.icon]} color={actionColor} size={height - 24} />\n ) : (\n action.icon\n )}\n </StyledIconSlot>\n <AnimatePresence initial={false} mode=\"wait\">\n {/* Animate width and margin to avoid layout jumps when labels mount/unmount. */}\n {showLabel && (\n <StyledLabelWrapper\n key={labelKey}\n animate={{ opacity: 1, width: 'auto', marginLeft: LABEL_GAP }}\n exit={{ opacity: 0, width: 0, marginLeft: 0 }}\n initial={{ opacity: 0, width: 0, marginLeft: 0 }}\n transition={LABEL_TRANSITION}\n >\n <StyledSecondaryLabel style={{ color: actionColor }}>\n {action.label}\n </StyledSecondaryLabel>\n </StyledLabelWrapper>\n )}\n </AnimatePresence>\n </StyledActionContent>\n </StyledActionButton>\n );\n};\n\nActionButton.displayName = 'ActionButton';\n\nexport default ActionButton;\n"],"mappings":"AAAA,SAASA,eAAe,QAAQ,cAAc;AAC9C,OAAOC,KAAK,MAA0B,OAAO;AAC7C,OAAOC,IAAI,MAAM,iBAAiB;AAClC,SACIC,kBAAkB,EAClBC,mBAAmB,EACnBC,cAAc,EACdC,kBAAkB,EAClBC,oBAAoB,QACjB,uBAAuB;AAG9B,MAAMC,SAAS,GAAG,CAAC;AACnB,MAAMC,gBAAgB,GAAG;EAAEC,QAAQ,EAAE;AAAI,CAAC;AAoB1C;AACA;AACA;AACA;AACA,MAAMC,YAAmC,GAAGA,CAAC;EACzCC,MAAM;EACNC,UAAU;EACVC,eAAe;EACfC,WAAW;EACXC,UAAU;EACVC,UAAU;EACVC,QAAQ;EACRC,QAAQ;EACRC,MAAM;EACNC,OAAO;EACPC,YAAY;EACZC,YAAY;EACZC,SAAS;EACTC,qBAAqB;EACrBC;AACJ,CAAC,KAAK;EACF,MAAMC,SAAS,GAAGd,UAAU,KAAK,SAAS;EAC1C,MAAMe,WAA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AE;IAACrB,KAAK,EAAED,WAAY;IAACwB,IAAI,EAAE3B,MAAM,GAAG;EAAG,CAAE,CAAC,GAErEd,MAAM,CAACuC,IAEC,CAAC,eACjBlD,KAAA,CAAAgC,aAAA,CAACjC,eAAe;IAACsD,OAAO,EAAE,KAAM;IAACC,IAAI,EAAC;EAAM,GAEvC/B,SAAS,iBACNvB,KAAA,CAAAgC,aAAA,CAAC3B,kBAAkB;IACfkD,GAAG,EAAEzB,QAAS;IACd0B,OAAO,EAAE;MAAEC,OAAO,EAAE,CAAC;MAAEC,KAAK,EAAE,MAAM;MAAEC,UAAU,EAAEpD;IAAU,CAAE;IAC9DqD,IAAI,EAAE;MAAEH,OAAO,EAAE,CAAC;MAAEC,KAAK,EAAE,CAAC;MAAEC,UAAU,EAAE;IAAE,CAAE;IAC9CN,OAAO,EAAE;MAAEI,OAAO,EAAE,CAAC;MAAEC,KAAK,EAAE,CAAC;MAAEC,UAAU,EAAE;IAAE,CAAE;IACjDE,UAAU,EAAErD;EAAiB,gBAE7BR,KAAA,CAAAgC,aAAA,CAAC1B,oBAAoB;IAACwD,KAAK,EAAE;MAAEjC,KAAK,EAAED;IAAY;EAAE,GAC/CjB,MAAM,CAACoB,KACU,CACN,CAEX,CACA,CACL,CAAC;AAE7B,CAAC;AAEDrB,YAAY,CAACqD,WAAW,GAAG,cAAc;AAEzC,eAAerD,YAAY","ignoreList":[]}
1
+ {"version":3,"file":"ActionButton.js","names":["AnimatePresence","React","Icon","StyledActionButton","StyledActionContent","StyledIconSlot","StyledLabelWrapper","StyledSecondaryLabel","LABEL_GAP","LABEL_TRANSITION","duration","ActionButton","action","actionType","backgroundColor","isCollapsed","isDisabled","isExpanded","isHidden","isShrunk","isSolo","onClick","onMouseEnter","onMouseLeave","showLabel","shouldUseContentWidth","height","isPrimary","isSecondary","actionColor","color","createElement","disabled","$backgroundColor","$isCollapsed","$isExpanded","undefined","$isHidden","$isPrimary","$isSecondary","$isShrunk","$isSolo","$pulseColors","status","pulseColors","$height","$statusType","type","$shouldUseContentWidth","icon","icons","size","initial","animate","opacity","width","marginLeft","exit","transition","style","label","displayName"],"sources":["../../../../../src/components/multi-action-button/action-button/ActionButton.tsx"],"sourcesContent":["import { AnimatePresence } from 'motion/react';\nimport React, { FC, MouseEvent } from 'react';\nimport Icon from '../../icon/Icon';\nimport {\n StyledActionButton,\n StyledActionContent,\n StyledIconSlot,\n StyledLabelWrapper,\n StyledSecondaryLabel,\n} from './ActionButton.styles';\nimport type { MultiActionButtonAction } from '../MultiActionButton.types';\n\nconst LABEL_GAP = 6;\nconst LABEL_TRANSITION = { duration: 0.3 };\n\nexport type ActionButtonProps = {\n action: MultiActionButtonAction;\n actionType: 'primary' | 'secondary';\n backgroundColor?: string;\n isCollapsed: boolean;\n isDisabled: boolean;\n isExpanded?: boolean;\n isHidden?: boolean;\n isShrunk?: boolean;\n isSolo?: boolean;\n onClick?: (event: MouseEvent<HTMLButtonElement>) => void;\n onMouseEnter?: () => void;\n onMouseLeave?: () => void;\n showLabel: boolean;\n shouldUseContentWidth: boolean;\n height: number;\n};\n\n/**\n * Shared action button UI used by both primary and secondary actions.\n * Keeps layout and animations consistent while isolating styling details.\n */\nconst ActionButton: FC<ActionButtonProps> = ({\n action,\n actionType,\n backgroundColor,\n isCollapsed,\n isDisabled,\n isExpanded,\n isHidden,\n isShrunk,\n isSolo,\n onClick,\n onMouseEnter,\n onMouseLeave,\n showLabel,\n shouldUseContentWidth,\n height,\n}) => {\n const isPrimary = actionType === 'primary';\n const isSecondary = actionType === 'secondary';\n const actionColor = action.color ?? '#FFFFFF';\n\n return (\n <StyledActionButton\n disabled={isDisabled || action.isDisabled}\n $backgroundColor={backgroundColor}\n $isCollapsed={isCollapsed}\n $isExpanded={isSecondary ? isExpanded : undefined}\n $isHidden={isSecondary ? isHidden : undefined}\n $isPrimary={isPrimary}\n $isSecondary={isSecondary}\n $isShrunk={isPrimary ? isShrunk : undefined}\n $isSolo={isPrimary ? isSolo : undefined}\n $pulseColors={action.status?.pulseColors}\n $height={height}\n $statusType={action.status?.type}\n $shouldUseContentWidth={shouldUseContentWidth}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n type=\"button\"\n >\n <StyledActionContent>\n <StyledIconSlot $height={height}>\n {typeof action.icon === 'string' ? (\n <Icon icons={[action.icon]} color={actionColor} size={height - 24} />\n ) : (\n action.icon\n )}\n </StyledIconSlot>\n <AnimatePresence initial={false}>\n {/* Animate width and margin to avoid layout jumps when labels mount/unmount. */}\n {showLabel && (\n <StyledLabelWrapper\n animate={{ opacity: 1, width: 'auto', marginLeft: LABEL_GAP }}\n exit={{ opacity: 0, width: 0, marginLeft: 0 }}\n initial={{ opacity: 0, width: 0, marginLeft: 0 }}\n transition={LABEL_TRANSITION}\n >\n <StyledSecondaryLabel style={{ color: actionColor }}>\n {action.label}\n </StyledSecondaryLabel>\n </StyledLabelWrapper>\n )}\n </AnimatePresence>\n </StyledActionContent>\n </StyledActionButton>\n );\n};\n\nActionButton.displayName = 'ActionButton';\n\nexport default ActionButton;\n"],"mappings":"AAAA,SAASA,eAAe,QAAQ,cAAc;AAC9C,OAAOC,KAAK,MAA0B,OAAO;AAC7C,OAAOC,IAAI,MAAM,iBAAiB;AAClC,SACIC,kBAAkB,EAClBC,mBAAmB,EACnBC,cAAc,EACdC,kBAAkB,EAClBC,oBAAoB,QACjB,uBAAuB;AAG9B,MAAMC,SAAS,GAAG,CAAC;AACnB,MAAMC,gBAAgB,GAAG;EAAEC,QAAQ,EAAE;AAAI,CAAC;AAoB1C;AACA;AACA;AACA;AACA,MAAMC,YAAmC,GAAGA,CAAC;EACzCC,MAAM;EACNC,UAAU;EACVC,eAAe;EACfC,WAAW;EACXC,UAAU;EACVC,UAAU;EACVC,QAAQ;EACRC,QAAQ;EACRC,MAAM;EACNC,OAAO;EACPC,YAAY;EACZC,YAAY;EACZC,SAAS;EACTC,qBAAqB;EACrBC;AACJ,CAAC,KAAK;EACF,MAAMC,SAAS,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AC,eACjBhD,KAAA,CAAA8B,aAAA,CAAC/B,eAAe;IAACoD,OAAO,EAAE;EAAM,GAE3B5B,SAAS,iBACNvB,KAAA,CAAA8B,aAAA,CAACzB,kBAAkB;IACf+C,OAAO,EAAE;MAAEC,OAAO,EAAE,CAAC;MAAEC,KAAK,EAAE,MAAM;MAAEC,UAAU,EAAEhD;IAAU,CAAE;IAC9DiD,IAAI,EAAE;MAAEH,OAAO,EAAE,CAAC;MAAEC,KAAK,EAAE,CAAC;MAAEC,UAAU,EAAE;IAAE,CAAE;IAC9CJ,OAAO,EAAE;MAAEE,OAAO,EAAE,CAAC;MAAEC,KAAK,EAAE,CAAC;MAAEC,UAAU,EAAE;IAAE,CAAE;IACjDE,UAAU,EAAEjD;EAAiB,gBAE7BR,KAAA,CAAA8B,aAAA,CAACxB,oBAAoB;IAACoD,KAAK,EAAE;MAAE7B,KAAK,EAAED;IAAY;EAAE,GAC/CjB,MAAM,CAACgD,KACU,CACN,CAEX,CACA,CACL,CAAC;AAE7B,CAAC;AAEDjD,YAAY,CAACkD,WAAW,GAAG,cAAc;AAEzC,eAAelD,YAAY","ignoreList":[]}
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { StyledVerificationBadge } from './VerificationBadge.styles';
3
3
  const VerificationBadge = () => /*#__PURE__*/React.createElement(StyledVerificationBadge, {
4
- className: "vcid-check--blue"
5
- }, /*#__PURE__*/React.createElement("span", null), /*#__PURE__*/React.createElement("span", null), /*#__PURE__*/React.createElement("span", null));
4
+ className: "beta-chayns-verification-badge"
5
+ }, /*#__PURE__*/React.createElement("span", null, '\ue903'), /*#__PURE__*/React.createElement("span", null, '\ue904'), /*#__PURE__*/React.createElement("span", null, '\ue905'));
6
6
  VerificationBadge.displayName = 'VerificationBadge';
7
7
  export default VerificationBadge;
8
8
  //# sourceMappingURL=VerificationBadge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VerificationBadge.js","names":["React","StyledVerificationBadge","VerificationBadge","createElement","className","displayName"],"sources":["../../../../src/components/verification-badge/VerificationBadge.tsx"],"sourcesContent":["import React from 'react';\nimport { StyledVerificationBadge } from './VerificationBadge.styles';\n\nconst VerificationBadge = () => (\n <StyledVerificationBadge className=\"vcid-check--blue\">\n <span />\n <span />\n <span />\n </StyledVerificationBadge>\n);\n\nVerificationBadge.displayName = 'VerificationBadge';\n\nexport default VerificationBadge;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,uBAAuB,QAAQ,4BAA4B;AAEpE,MAAMC,iBAAiB,GAAGA,CAAA,kBACtBF,KAAA,CAAAG,aAAA,CAACF,uBAAuB;EAACG,SAAS,EAAC;AAAkB,gBACjDJ,KAAA,CAAAG,aAAA,aAAO,CAAC,eACRH,KAAA,CAAAG,aAAA,aAAO,CAAC,eACRH,KAAA,CAAAG,aAAA,aAAO,CACc,CAC5B;AAEDD,iBAAiB,CAACG,WAAW,GAAG,mBAAmB;AAEnD,eAAeH,iBAAiB","ignoreList":[]}
1
+ {"version":3,"file":"VerificationBadge.js","names":["React","StyledVerificationBadge","VerificationBadge","createElement","className","displayName"],"sources":["../../../../src/components/verification-badge/VerificationBadge.tsx"],"sourcesContent":["import React from 'react';\nimport { StyledVerificationBadge } from './VerificationBadge.styles';\n\nconst VerificationBadge = () => (\n <StyledVerificationBadge className=\"beta-chayns-verification-badge\">\n <span>{'\\ue903'}</span>\n <span>{'\\ue904'}</span>\n <span>{'\\ue905'}</span>\n </StyledVerificationBadge>\n);\n\nVerificationBadge.displayName = 'VerificationBadge';\n\nexport default VerificationBadge;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,uBAAuB,QAAQ,4BAA4B;AAEpE,MAAMC,iBAAiB,GAAGA,CAAA,kBACtBF,KAAA,CAAAG,aAAA,CAACF,uBAAuB;EAACG,SAAS,EAAC;AAAgC,gBAC/DJ,KAAA,CAAAG,aAAA,eAAO,QAAe,CAAC,eACvBH,KAAA,CAAAG,aAAA,eAAO,QAAe,CAAC,eACvBH,KAAA,CAAAG,aAAA,eAAO,QAAe,CACD,CAC5B;AAEDD,iBAAiB,CAACG,WAAW,GAAG,mBAAmB;AAEnD,eAAeH,iBAAiB","ignoreList":[]}
@@ -1,3 +1,39 @@
1
1
  import styled from 'styled-components';
2
- export const StyledVerificationBadge = styled.span``;
2
+ export const StyledVerificationBadge = styled.span`
3
+ @font-face {
4
+ font-family: 'Verified-chaynsID';
5
+ src:
6
+ url(https://api.chayns-static.space/font-vcid/Verified-chaynsID.woff2) format('woff2'),
7
+ url(https://api.chayns-static.space/font-vcid/Verified-chaynsID.woff2) format('woff'),
8
+ url(https://api.chayns-static.space/font-vcid/Verified-chaynsID.woff2) format('woff'),
9
+ url(https://api.chayns-static.space/font-vcid/Verified-chaynsID.ttf) format('truetype'),
10
+ url(https://api.chayns-static.space/font-vcid/Verified-chaynsID.svg) format('svg');
11
+ font-weight: normal;
12
+ font-style: normal;
13
+ font-display: block;
14
+ }
15
+
16
+ /*noinspection CssNoGenericFontName*/
17
+ font-family: 'Verified-chaynsID' !important;
18
+ font-style: normal;
19
+ font-weight: normal;
20
+ font-variant: normal;
21
+ text-transform: none;
22
+ line-height: 1;
23
+ font-size: 0.8em;
24
+ -webkit-font-smoothing: antialiased;
25
+ -moz-osx-font-smoothing: grayscale;
26
+
27
+ margin-left: 0.2em;
28
+
29
+ & > :first-child {
30
+ color: #5890ff;
31
+ }
32
+
33
+ & > :nth-child(2),
34
+ & > :nth-child(3) {
35
+ margin-left: -1em;
36
+ color: #fff;
37
+ }
38
+ `;
3
39
  //# sourceMappingURL=VerificationBadge.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VerificationBadge.styles.js","names":["styled","StyledVerificationBadge","span"],"sources":["../../../../src/components/verification-badge/VerificationBadge.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledVerificationBadge = styled.span``;\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AAEtC,OAAO,MAAMC,uBAAuB,GAAGD,MAAM,CAACE,IAAI,EAAE","ignoreList":[]}
1
+ {"version":3,"file":"VerificationBadge.styles.js","names":["styled","StyledVerificationBadge","span"],"sources":["../../../../src/components/verification-badge/VerificationBadge.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledVerificationBadge = styled.span`\n @font-face {\n font-family: 'Verified-chaynsID';\n src:\n url(https://api.chayns-static.space/font-vcid/Verified-chaynsID.woff2) format('woff2'),\n url(https://api.chayns-static.space/font-vcid/Verified-chaynsID.woff2) format('woff'),\n url(https://api.chayns-static.space/font-vcid/Verified-chaynsID.woff2) format('woff'),\n url(https://api.chayns-static.space/font-vcid/Verified-chaynsID.ttf) format('truetype'),\n url(https://api.chayns-static.space/font-vcid/Verified-chaynsID.svg) format('svg');\n font-weight: normal;\n font-style: normal;\n font-display: block;\n }\n\n /*noinspection CssNoGenericFontName*/\n font-family: 'Verified-chaynsID' !important;\n font-style: normal;\n font-weight: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n font-size: 0.8em;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n\n margin-left: 0.2em;\n\n & > :first-child {\n color: #5890ff;\n }\n\n & > :nth-child(2),\n & > :nth-child(3) {\n margin-left: -1em;\n color: #fff;\n }\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AAEtC,OAAO,MAAMC,uBAAuB,GAAGD,MAAM,CAACE,IAAI;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chayns-components/core",
3
- "version": "5.0.2",
3
+ "version": "5.0.4",
4
4
  "description": "A set of beautiful React components for developing your own applications with chayns.",
5
5
  "sideEffects": false,
6
6
  "browserslist": [
@@ -86,5 +86,5 @@
86
86
  "publishConfig": {
87
87
  "access": "public"
88
88
  },
89
- "gitHead": "871adcebe1361aea7ce6d0583dc915c013e28451"
89
+ "gitHead": "dbf6a9280e3bb587e0518278e4302c500205e2dc"
90
90
  }