@ledgerhq/react-ui 0.48.0 → 0.49.0-nightly.20260317030141

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 (34) hide show
  1. package/lib/cjs/components/index.js +10 -33
  2. package/lib/cjs/components/index.js.map +1 -1
  3. package/lib/cjs/components/message/Tooltip/Tooltip.stories.js +10 -33
  4. package/lib/cjs/components/message/Tooltip/Tooltip.stories.js.map +1 -1
  5. package/lib/cjs/components/message/Tooltip/index.js +8 -31
  6. package/lib/cjs/components/message/Tooltip/index.js.map +1 -1
  7. package/lib/cjs/components/message/index.js +10 -33
  8. package/lib/cjs/components/message/index.js.map +1 -1
  9. package/lib/cjs/index.js +10 -33
  10. package/lib/cjs/index.js.map +1 -1
  11. package/lib/cjs/pre-ldls/components/index.js +18 -38
  12. package/lib/cjs/pre-ldls/components/index.js.map +1 -1
  13. package/lib/cjs/pre-ldls/index.js +18 -39
  14. package/lib/cjs/pre-ldls/index.js.map +1 -1
  15. package/lib/components/message/Tooltip/index.d.ts.map +1 -1
  16. package/lib/components/message/Tooltip/index.js +5 -25
  17. package/lib/components/message/Tooltip/index.js.map +1 -1
  18. package/lib/pre-ldls/components/index.d.ts +0 -1
  19. package/lib/pre-ldls/components/index.d.ts.map +1 -1
  20. package/lib/pre-ldls/components/index.js +0 -1
  21. package/lib/pre-ldls/components/index.js.map +1 -1
  22. package/package.json +13 -3
  23. package/lib/cjs/pre-ldls/components/ApyIndicator/ApyIndicator.js +0 -1776
  24. package/lib/cjs/pre-ldls/components/ApyIndicator/ApyIndicator.js.map +0 -1
  25. package/lib/cjs/pre-ldls/components/ApyIndicator/ApyIndicator.stories.js +0 -1835
  26. package/lib/cjs/pre-ldls/components/ApyIndicator/ApyIndicator.stories.js.map +0 -1
  27. package/lib/pre-ldls/components/ApyIndicator/ApyIndicator.d.ts +0 -6
  28. package/lib/pre-ldls/components/ApyIndicator/ApyIndicator.d.ts.map +0 -1
  29. package/lib/pre-ldls/components/ApyIndicator/ApyIndicator.js +0 -6
  30. package/lib/pre-ldls/components/ApyIndicator/ApyIndicator.js.map +0 -1
  31. package/lib/pre-ldls/components/ApyIndicator/ApyIndicator.stories.d.ts +0 -10
  32. package/lib/pre-ldls/components/ApyIndicator/ApyIndicator.stories.d.ts.map +0 -1
  33. package/lib/pre-ldls/components/ApyIndicator/ApyIndicator.stories.js +0 -20
  34. package/lib/pre-ldls/components/ApyIndicator/ApyIndicator.stories.js.map +0 -1
@@ -204,7 +204,7 @@ const FlexBox = _styled__rspack_import_0["default"].div.attrs({
204
204
 
205
205
 
206
206
  },
207
- 7441(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
207
+ 5845(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
208
208
 
209
209
  // EXPORTS
210
210
  __webpack_require__.d(__webpack_exports__, {
@@ -214,8 +214,6 @@ __webpack_require__.d(__webpack_exports__, {
214
214
  // EXTERNAL MODULE: external "react"
215
215
  var external_react_ = __webpack_require__(2015);
216
216
  var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
217
- ;// CONCATENATED MODULE: external "react-is"
218
- const external_react_is_namespaceObject = require("react-is");
219
217
  ;// CONCATENATED MODULE: external "@tippyjs/react"
220
218
  const react_namespaceObject = require("@tippyjs/react");
221
219
  var react_default = /*#__PURE__*/__webpack_require__.n(react_namespaceObject);
@@ -225,44 +223,23 @@ var Text = __webpack_require__(348);
225
223
 
226
224
 
227
225
 
228
-
229
- // Tippyjs need the ref to be forwarded to the DOM element wrapping the children.
230
- // This component has been created to add a wrapping span and use its ref when needed.
231
- // See: https://github.com/atomiks/tippyjs-react#component-children
232
- const Wrapper = /*#__PURE__*/ (0,external_react_.forwardRef)((props, ref)=>{
233
- const childrenCount = external_react_default().Children.count(props.children);
234
- try {
235
- const child = external_react_default().Children.only(props.children);
236
- const isValidElement = /*#__PURE__*/ external_react_default().isValidElement(child);
237
- const isForwardingRef = (0,external_react_is_namespaceObject.isForwardRef)(child);
238
- const isDomElement = isValidElement && typeof child.type === "string";
239
- if (isForwardingRef || isDomElement) {
240
- return /*#__PURE__*/ external_react_default().cloneElement(child, {
241
- ref
242
- });
243
- } else {
244
- return /*#__PURE__*/ external_react_default().createElement("span", {
245
- ref: ref
246
- }, props.children);
247
- }
248
- } catch {
249
- return childrenCount < 1 ? null : /*#__PURE__*/ external_react_default().createElement("span", {
250
- ref: ref
251
- }, props.children);
252
- }
253
- });
254
226
  function Tooltip(props) {
255
227
  const { content, placement = "auto", children, ...rest } = props;
256
- return /*#__PURE__*/ external_react_default().createElement((react_default()), {
228
+ const triggerRef = (0,external_react_.useRef)(null);
229
+ return /*#__PURE__*/ external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/ external_react_default().createElement("span", {
230
+ ref: triggerRef,
231
+ style: {
232
+ display: "inline-flex"
233
+ }
234
+ }, children), /*#__PURE__*/ external_react_default().createElement((react_default()), {
257
235
  ...rest,
236
+ reference: triggerRef,
258
237
  placement: placement,
259
238
  content: /*#__PURE__*/ external_react_default().createElement(Text["default"], {
260
239
  fontWeight: "medium",
261
240
  variant: "paragraph",
262
241
  color: "neutral.c00"
263
242
  }, content)
264
- }, /*#__PURE__*/ external_react_default().createElement(Wrapper, {
265
- children: children
266
243
  }));
267
244
  }
268
245
 
@@ -742,7 +719,7 @@ __webpack_require__.d(__webpack_exports__, {
742
719
  /* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
743
720
  /* import */ var _asorted_Text__rspack_import_3 = __webpack_require__(348);
744
721
  /* import */ var _layout_Flex__rspack_import_2 = __webpack_require__(3696);
745
- /* import */ var _index__rspack_import_1 = __webpack_require__(7441);
722
+ /* import */ var _index__rspack_import_1 = __webpack_require__(5845);
746
723
 
747
724
 
748
725
 
@@ -1 +1 @@
1
- {"version":3,"file":"components/message/Tooltip/Tooltip.stories.js","sources":["webpack://@ledgerhq/react-ui/./src/components/asorted/Text/index.tsx","webpack://@ledgerhq/react-ui/./src/components/asorted/Text/styles.ts","webpack://@ledgerhq/react-ui/./src/components/layout/Flex/index.ts","webpack://@ledgerhq/react-ui/./src/components/message/Tooltip/index.tsx","webpack://@ledgerhq/react-ui/./src/components/styled.ts","webpack://@ledgerhq/react-ui/./src/styles/helpers.ts","webpack://@ledgerhq/react-ui/./src/styles/styled/fontFamily.ts","webpack://@ledgerhq/react-ui/./src/styles/system/gaps.ts","webpack://@ledgerhq/react-ui/./src/styles/theme.ts","webpack://@ledgerhq/react-ui/webpack/runtime/compat_get_default_export","webpack://@ledgerhq/react-ui/webpack/runtime/define_property_getters","webpack://@ledgerhq/react-ui/webpack/runtime/has_own_property","webpack://@ledgerhq/react-ui/webpack/runtime/make_namespace_object","webpack://@ledgerhq/react-ui/./src/components/message/Tooltip/Tooltip.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport baseStyled, { BaseStyledProps } from \"../../styled\";\nimport {\n compose,\n fontSize,\n fontWeight,\n textAlign,\n lineHeight,\n letterSpacing,\n system,\n} from \"styled-system\";\nimport fontFamily from \"../../../styles/styled/fontFamily\";\nimport { TextVariants } from \"../../../styles/theme\";\nimport { textVariantStyle } from \"./styles\";\n\nconst uppercase = system({\n uppercase: {\n property: \"textTransform\",\n transform: value => (value ? \"uppercase\" : \"none\"),\n },\n});\n\ntype FontFamilies =\n | \"Inter|ExtraLight\"\n | \"Inter|Light\"\n | \"Inter|Regular\"\n | \"Inter|Medium\"\n | \"Inter|SemiBold\"\n | \"Inter|Bold\"\n | \"Inter|ExtraBold\"\n | \"Alpha|Medium\";\n\ntype WhiteSpace = \"normal\" | \"nowrap\" | \"pre\" | \"pre-line\" | \"pre-wrap\";\n\nexport interface TextProps extends BaseStyledProps {\n fontFamily?: string;\n ff?: FontFamilies;\n fontSize?: number | string | TextVariants;\n variant?: TextVariants;\n textAlign?: string;\n fontWeight?: string;\n lineHeight?: string;\n textTransform?: string;\n textOverflow?: string;\n uppercase?: boolean;\n whiteSpace?: WhiteSpace;\n children?: React.ReactNode;\n}\n\nconst Text = baseStyled.span.attrs<TextProps, TextProps>(\n ({ variant = \"body\", fontSize, color }) => ({\n fontSize: fontSize ? fontSize : variant,\n color: color || \"neutral.c100\",\n }),\n)`\n font-weight: 500;\n white-space: ${props => props.whiteSpace ?? \"normal\"};\n ${(p: TextProps) => textVariantStyle[p.variant || \"body\"]}\n ${compose(\n uppercase,\n lineHeight,\n fontFamily,\n fontSize,\n textAlign,\n fontWeight,\n letterSpacing,\n system({\n textOverflow: true,\n }),\n )}\n ${p => (p.textTransform ? `text-transform: ${p.textTransform};` : \"\")}\n`;\n\nexport default Text;\n","import { GlobalStyleProps } from \"../../../styles/global\";\nimport { css } from \"styled-components\";\nimport { TextVariants } from \"../../../styles/theme\";\n\nconst getFontSource = (name: string) => (props: GlobalStyleProps) => {\n const fontsPath = props.fontsPath ?? \"assets/fonts\";\n const fontName = (props.fontMappings && props.fontMappings(name)) || `${name}.woff2`;\n return `url(\"${fontsPath}/${fontName}\") format(\"woff2\")`;\n};\n\nexport const fontStyles = css`\n @font-face {\n font-family: \"Inter\";\n src: ${getFontSource(\"Inter-ExtraLight-BETA\")};\n font-weight: 100;\n font-style: normal;\n }\n\n @font-face {\n font-family: \"Inter\";\n src: ${getFontSource(\"Inter-Light-BETA\")};\n font-weight: 300;\n font-style: normal;\n }\n\n @font-face {\n font-family: \"Inter\";\n src: ${getFontSource(\"Inter-Regular\")};\n font-weight: 400;\n font-style: normal;\n }\n\n @font-face {\n font-family: \"Inter\";\n src: ${getFontSource(\"Inter-Medium\")};\n font-weight: 500;\n font-style: normal;\n }\n\n @font-face {\n font-family: \"Inter\";\n src: ${getFontSource(\"Inter-SemiBold\")};\n font-weight: 600;\n font-style: normal;\n }\n\n @font-face {\n font-family: \"Inter\";\n src: ${getFontSource(\"Inter-ExtraBold\")};\n font-weight: 900;\n font-style: normal;\n }\n\n @font-face {\n font-family: \"Alpha\";\n src: ${getFontSource(\"HMAlphaMono-Medium\")};\n font-weight: 500;\n font-style: normal;\n }\n`;\n\nexport const textVariantStyle: Record<\n TextVariants,\n {\n fontFamily: string;\n lineHeight?: string | number;\n fontWeight?: number;\n \"text-transform\"?: string;\n }\n> = {\n h1: {\n fontFamily: \"Alpha, Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h1Inter: {\n fontFamily: \"Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h2: {\n fontFamily: \"Alpha, Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h2Inter: {\n fontFamily: \"Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h3: {\n fontFamily: \"Alpha, Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h3Inter: {\n fontFamily: \"Inter, Sans\",\n fontWeight: 500,\n },\n h4: {\n fontFamily: \"Alpha, Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h4Inter: {\n fontFamily: \"Inter, Sans\",\n fontWeight: 600,\n },\n h5: {\n fontFamily: \"Alpha, Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h5Inter: {\n fontFamily: \"Inter, Sans\",\n fontWeight: 500,\n },\n large: {\n fontFamily: \"Inter, Sans\",\n },\n largeLineHeight: {\n fontFamily: \"Inter, Sans\",\n lineHeight: 1.7,\n },\n body: {\n fontFamily: \"Inter, Sans\",\n },\n bodyLineHeight: {\n fontFamily: \"Inter, Sans\",\n lineHeight: 1.7,\n },\n paragraph: {\n fontFamily: \"Inter, Sans\",\n },\n paragraphLineHeight: {\n fontFamily: \"Inter, Sans\",\n lineHeight: 1.7,\n },\n small: {\n fontFamily: \"Inter, Sans\",\n },\n extraSmall: {\n fontFamily: \"Inter, Sans\",\n },\n tiny: {\n fontFamily: \"Inter, Sans\",\n },\n micro: {\n fontFamily: \"Inter, Sans\",\n },\n subtitle: {\n fontFamily: \"Inter, Sans\",\n fontWeight: 600,\n \"text-transform\": \"uppercase\",\n },\n};\n","import baseStyled, { BaseStyledProps } from \"../../styled\";\n\nconst FlexBox = baseStyled.div.attrs<BaseStyledProps, BaseStyledProps>({ display: \"flex\" })``;\nexport type FlexBoxProps = BaseStyledProps & React.HTMLAttributes<HTMLDivElement>;\n\nexport default FlexBox;\n","import React, { forwardRef } from \"react\";\nimport { isForwardRef } from \"react-is\";\nimport Tippy, { TippyProps } from \"@tippyjs/react\";\nimport Text from \"../../asorted/Text\";\n\ntype Placement =\n | \"top\"\n | \"top-start\"\n | \"top-end\"\n | \"right\"\n | \"right-start\"\n | \"right-end\"\n | \"bottom\"\n | \"bottom-start\"\n | \"bottom-end\"\n | \"left\"\n | \"left-start\"\n | \"left-end\"\n | \"auto\"\n | \"auto-start\"\n | \"auto-end\";\n\n// Add more props later on if needed.\n// See https://atomiks.github.io/tippyjs/v6/all-props for the full list.\nexport interface Props extends TippyProps {\n /** The preferred placement of the tippy. */\n placement?: Placement;\n}\n\n// Tippyjs need the ref to be forwarded to the DOM element wrapping the children.\n// This component has been created to add a wrapping span and use its ref when needed.\n// See: https://github.com/atomiks/tippyjs-react#component-children\nconst Wrapper: React.ComponentType<React.PropsWithChildren<unknown>> = forwardRef(\n (props, ref: React.LegacyRef<HTMLElement>) => {\n const childrenCount = React.Children.count(props.children);\n\n try {\n const child = React.Children.only(props.children);\n const isValidElement = React.isValidElement(child);\n const isForwardingRef = isForwardRef(child);\n const isDomElement = isValidElement && typeof child.type === \"string\";\n\n if (isForwardingRef || isDomElement) {\n return React.cloneElement(child, { ref } as React.Attributes & {\n ref?: React.Ref<HTMLElement>;\n });\n } else {\n return <span ref={ref}>{props.children}</span>;\n }\n } catch {\n return childrenCount < 1 ? null : <span ref={ref}>{props.children}</span>;\n }\n },\n);\n\nexport default function Tooltip(props: Readonly<Props>): React.JSX.Element | null {\n const { content, placement = \"auto\", children, ...rest } = props;\n return (\n <Tippy\n {...rest}\n placement={placement}\n content={\n <Text fontWeight=\"medium\" variant={\"paragraph\"} color=\"neutral.c00\">\n {content}\n </Text>\n }\n >\n <Wrapper children={children} />\n </Tippy>\n );\n}\n","import React from \"react\";\nimport gaps from \"../styles/system/gaps\";\nimport styled, { StyledInterface, InterpolationFunction } from \"styled-components\";\nimport {\n compose,\n flexbox,\n FlexboxProps,\n space,\n SpaceProps,\n position,\n PositionProps,\n color,\n ColorProps,\n layout,\n LayoutProps,\n overflow,\n OverflowProps,\n border,\n BorderProps,\n} from \"styled-system\";\n\nexport type BaseStyledProps = SpaceProps &\n FlexboxProps &\n PositionProps &\n ColorProps &\n LayoutProps &\n BorderProps &\n OverflowProps & {\n /**\n * The columnGap CSS property sets the size of the gap (gutter) between an element's grid columns.\n */\n columnGap?: string | number;\n /**\n * The rowGap CSS property sets the size of the gap (gutter) between an element's grid rows.\n */\n rowGap?: string | number;\n color?: string;\n children?: React.ReactNode;\n };\n\nexport const baseStyles: InterpolationFunction<unknown> = compose(\n flexbox,\n space,\n position,\n color,\n layout,\n overflow,\n gaps,\n border,\n);\n\nconst proxyStyled = new Proxy(styled, {\n apply(target: typeof styled, thisArg, argumentsList: Parameters<typeof styled>) {\n return styled(target.apply(thisArg, argumentsList)(baseStyles));\n },\n get(target, property: keyof typeof styled) {\n if (typeof target[property] === \"function\") {\n return styled(target[property].apply(styled, [baseStyles]));\n }\n return target[property];\n },\n});\n\nexport default <StyledInterface>proxyStyled;\n","import Color from \"color\";\n\nimport { fontFamilies } from \"./theme\";\n\nexport const rgba = (c: string, a: number): string => Color(c).alpha(a).rgb().toString();\n\nexport const darken = (c: string, a: number): string => Color(c).darken(a).toString();\n\nexport const lighten = (c: string, a: number): string => Color(c).lighten(a).toString();\n\nexport const mix = (c: string, b: string, a: number): string =>\n Color(c).mix(Color(b), a).toString();\n\nexport const ff = (v: string) => {\n const [font, type = \"Regular\"] = v.split(\"|\");\n // @ts-expect-error FIXME\n const { style, weight } = fontFamilies[font][type];\n // @ts-expect-error FIXME\n const fallback: string = fontFamilies[font].fallback ?? \"Arial\";\n\n return {\n fontFamily: `${font}, ${fallback}`,\n fontWeight: weight,\n fontStyle: style,\n };\n};\n\nexport const ensureContrast = (color1: string, color2: string) => {\n const colorL1 = Color(color1).luminosity() + 0.05;\n const colorL2 = Color(color2).luminosity() + 0.05;\n\n const lRatio = colorL1 > colorL2 ? colorL1 / colorL2 : colorL2 / colorL1;\n\n if (lRatio < 1.5) {\n return Color(color1).rotate(180).negate().string();\n }\n return color1;\n};\n","import { ff } from \"../helpers\";\n\nexport default (props: { ff?: string }) => {\n const prop = props.ff;\n\n if (prop == null) {\n return null;\n }\n\n return ff(prop);\n};\n","import { system } from \"styled-system\";\n\nconst gaps = system({\n rowGap: { property: \"rowGap\", scale: \"space\" },\n columnGap: { property: \"columnGap\", scale: \"space\" },\n});\n\nexport default gaps;\n","import { keyframes, css, Font } from \"styled-components\";\nimport { palettes, ColorPalette } from \"@ledgerhq/ui-shared\";\n\nexport type screensBreakpoints = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"xxl\";\n\nexport const breakpoints = {\n sm: \"640px\",\n md: \"768px\",\n lg: \"1024px\",\n xl: \"1280px\",\n xxl: \"1536px\",\n} as Record<screensBreakpoints, string>;\n\nexport const space = [\n /* space indexes:\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 */\n 0, 2, 4, 8, 10, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76,\n];\n\nexport type TextVariants =\n | \"h1\"\n | \"h1Inter\"\n | \"h2\"\n | \"h2Inter\"\n | \"h3\"\n | \"h3Inter\"\n | \"h4\"\n | \"h4Inter\"\n | \"h5\"\n | \"h5Inter\"\n | \"large\"\n | \"largeLineHeight\"\n | \"body\"\n | \"bodyLineHeight\"\n | \"paragraph\"\n | \"paragraphLineHeight\"\n | \"small\"\n | \"extraSmall\"\n | \"tiny\"\n | \"micro\"\n | \"subtitle\";\n\nexport type ThemeScale<Type, Aliases extends string> = Array<Type> & Record<Aliases, Type>;\n\nexport const fontSizes = [8, 10, 11, 12, 13, 14, 16, 20, 24, 28, 32, 36] as ThemeScale<\n number,\n TextVariants\n>;\n\n[\n fontSizes.micro,\n fontSizes.tiny,\n fontSizes.extraSmall,\n fontSizes.small,\n fontSizes.paragraph,\n fontSizes.body,\n fontSizes.large,\n fontSizes.h5,\n fontSizes.h4,\n fontSizes.h3,\n fontSizes.h2,\n fontSizes.h1,\n] = fontSizes;\nfontSizes.largeLineHeight = fontSizes.large;\nfontSizes.bodyLineHeight = fontSizes.body;\nfontSizes.paragraphLineHeight = fontSizes.paragraph;\nfontSizes.subtitle = fontSizes.extraSmall;\nfontSizes.h1Inter = fontSizes.h1;\nfontSizes.h2Inter = fontSizes.h2;\nfontSizes.h3Inter = fontSizes.h3;\nfontSizes.h4Inter = fontSizes.h4;\nfontSizes.h5Inter = fontSizes.h5;\n\nconst fontWeights = {\n extraLight: \"100\",\n light: \"300\",\n regular: \"400\",\n medium: \"500\",\n semiBold: \"600\",\n bold: \"700\",\n extraBold: \"800\",\n};\n\nexport const radii = [0, 4, 8, 12, 16, 20];\nexport const shadows = [\"0 4px 8px 0 rgba(0, 0, 0, 0.03)\"];\nexport const zIndexes = [-1, 0, 1, 9, 10, 90, 100, 900, 1000];\n\n// Those fonts are now defined in global.css, this is just a mapping for styled-system\nexport const fontFamilies = {\n Inter: {\n ExtraLight: {\n weight: 100,\n style: \"normal\",\n },\n Light: {\n weight: 300,\n style: \"normal\",\n },\n Regular: {\n weight: 400,\n style: \"normal\",\n },\n Medium: {\n weight: 500,\n style: \"normal\",\n },\n SemiBold: {\n weight: 600,\n style: \"normal\",\n },\n Bold: {\n weight: 700,\n style: \"normal\",\n },\n ExtraBold: {\n weight: 800,\n style: \"normal\",\n },\n },\n Alpha: {\n Medium: {\n weight: 500,\n style: \"normal\",\n },\n },\n};\n\nconst animationDuration = \"0.33s\";\nconst easings = {\n outQuadratic: \"cubic-bezier(0.25, 0.46, 0.45, 0.94)\",\n};\n\nconst transition = (\n properties = [\"all\"],\n duration = animationDuration,\n easing = easings.outQuadratic,\n) => css`\n transition-property: ${properties.join(\",\")};\n transition-duration: ${duration};\n transition-timing-function: ${easing};\n`;\n\nconst fadeIn = keyframes`\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n `;\nconst fadeOut = keyframes`\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n `;\nconst fadeInGrowX = keyframes`\n 0% {\n opacity: 0;\n transform: scaleX(0);\n }\n 100% {\n opacity: 1;\n transform: scaleX(1);\n }\n`;\nconst fadeInUp = keyframes`\n 0% {\n opacity: 0;\n transform: translateY(66%);\n }\n 100% {\n opacity: 1;\n transform: translateY(0%);\n }\n `;\nconst animations = {\n fadeIn: () => css`\n ${fadeIn} ${animationDuration} ${easings.outQuadratic} forwards\n `,\n fadeOut: () => css`\n ${fadeOut} ${animationDuration} ${easings.outQuadratic} forwards\n `,\n fadeInGrowX: () => css`\n ${fadeInGrowX} 0.6s ${easings.outQuadratic} forwards\n `,\n fadeInUp: () => css`\n ${fadeInUp} ${animationDuration} ${easings.outQuadratic} forwards\n `,\n};\nconst overflow = {\n x: css`\n overflow-y: hidden;\n overflow-x: scroll;\n will-change: transform;\n &:hover {\n --track-color: ${p => p.theme.colors.neutral.c30};\n }\n `,\n y: css`\n overflow-x: hidden;\n overflow-y: scroll;\n will-change: transform;\n &:hover {\n --track-color: ${p => p.theme.colors.neutral.c30};\n }\n `,\n yAuto: css`\n overflow-x: hidden;\n overflow-y: auto;\n will-change: transform;\n &:hover {\n --track-color: ${p => p.theme.colors.neutral.c30};\n }\n `,\n xy: css`\n overflow: scroll;\n will-change: transform;\n &:hover {\n --track-color: ${p => p.theme.colors.neutral.c30};\n }\n `,\n trackSize: 12,\n};\n\ninterface DefaultTheme {\n theme: \"dark\" | \"light\";\n animations: typeof animations;\n transition: typeof transition;\n overflow: typeof overflow;\n sizes: {\n topBarHeight: number;\n sideBarWidth: number;\n drawer: {\n side: {\n big: {\n width: number;\n };\n small: {\n width: number;\n };\n };\n popin: {\n min: {\n height: number;\n width: number;\n };\n max: {\n height: number;\n width: number;\n };\n };\n };\n };\n radii: number[];\n fontFamilies: Record<string, Record<string, Font>>;\n fontSizes: number[];\n space: number[];\n shadows: string[];\n colors: ColorPalette;\n fontWeights: Record<string, string>;\n breakpoints: Record<screensBreakpoints, string>;\n zIndexes: number[];\n}\n\nconst theme: DefaultTheme = {\n theme: \"light\",\n sizes: {\n drawer: {\n side: {\n big: {\n width: 580,\n },\n small: {\n width: 420,\n },\n },\n popin: {\n min: {\n height: 158,\n width: 462,\n },\n max: {\n height: 522,\n width: 622,\n },\n },\n },\n topBarHeight: 58,\n sideBarWidth: 230,\n },\n radii,\n fontFamilies,\n fontSizes,\n fontWeights,\n space,\n shadows,\n colors: palettes.light,\n animations,\n overflow,\n transition,\n zIndexes,\n breakpoints,\n};\n\nexport default theme;\nexport type Theme = DefaultTheme;\n","// getDefaultExport function for compatibility with non-ESM modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import React from \"react\";\nimport { StoryTemplate } from \"src/components/helpers\";\n\nimport Text from \"../../asorted/Text\";\nimport FlexBox from \"../../layout/Flex\";\nimport TooltipComponent, { Props } from \"./index\";\n\nconst description = `\n### Tooltips display informative text when users hover over an element.\n\nThis component is based on [tippyjs](https://atomiks.github.io/tippyjs/) which is powerful library.\nPlease check [the documentation](https://github.com/atomiks/tippyjs-react#-props) for the full props list and usage.\n\n## Usage\n\n\\`\\`\\`js\n\nimport { Tooltip } from \"@ledgerhq/react-ui\"\n\n\\`\\`\\`\n\nWrap some jsx that will make the tooltip visible on mouse over.<br/>\n_**Note:** this jsx will automatically be wrapped inside a \\`span\\` element if the ref cannot be forwarded. \\\nSee [here](https://github.com/atomiks/tippyjs-react#component-children) for a detailed explanation._\n\nTo set the tooltip inner contents, use the \\`content\\` prop.\n\n\\`\\`\\`js\n<Tooltip content=\"Hello!\" {...props}>\n <div>Hover me</div>\n</Tooltip>\n\\`\\`\\`\n\n## Sandbox\n\nPlacement, style and content can be customized using props as demonstrated in the following example.\n`;\n\nexport default {\n title: \"Messages/Tooltip\",\n component: TooltipComponent,\n parameters: {\n docs: {\n description: {\n component: description,\n },\n },\n },\n argTypes: {\n content: { type: \"string\" },\n visible: { options: [true, false, undefined] },\n disabled: { type: \"boolean\" },\n placement: {\n control: { type: \"radio\" },\n options: [\n \"top\",\n \"top-start\",\n \"top-end\",\n \"right\",\n \"right-start\",\n \"right-end\",\n \"bottom\",\n \"bottom-start\",\n \"bottom-end\",\n \"left\",\n \"left-start\",\n \"left-end\",\n \"auto\",\n \"auto-start\",\n \"auto-end\",\n ],\n },\n },\n args: {\n content: \"Hello World!\",\n },\n};\n\nexport const Tooltip: StoryTemplate<Props> = args => (\n <FlexBox alignItems=\"center\" justifyContent=\"center\">\n <TooltipComponent {...args}>\n <div style={{ margin: \"50px\" }}>\n <Text\n as=\"div\"\n fontWeight=\"semiBold\"\n color=\"neutral.c100\"\n style={{ border: \"2px solid #AAA\", borderRadius: \"5px\" }}\n p={10}\n textAlign=\"center\"\n >\n Hover\n <br />\n me\n </Text>\n </div>\n </TooltipComponent>\n </FlexBox>\n);\n"],"names":["React","baseStyled","compose","fontSize","fontWeight","textAlign","lineHeight","letterSpacing","system","fontFamily","textVariantStyle","uppercase","value","Text","variant","color","props","p","css","getFontSource","name","fontsPath","fontName","fontStyles","FlexBox","forwardRef","isForwardRef","Tippy","Wrapper","ref","childrenCount","child","isValidElement","isForwardingRef","isDomElement","Tooltip","content","placement","children","rest","gaps","styled","flexbox","space","position","layout","overflow","border","baseStyles","proxyStyled","Proxy","target","thisArg","argumentsList","property","Color","fontFamilies","rgba","c","a","darken","lighten","mix","b","ff","v","font","type","style","weight","fallback","ensureContrast","color1","color2","colorL1","colorL2","lRatio","prop","keyframes","palettes","breakpoints","fontSizes","fontWeights","radii","shadows","zIndexes","animationDuration","easings","transition","properties","duration","easing","fadeIn","fadeOut","fadeInGrowX","fadeInUp","animations","theme","TooltipComponent","description","undefined","args"],"mappings":";;;;;;;;;;;;;;AAA0B;AACiC;AASpC;AACoC;AAEf;AAE5C,MAAMW,YAAYH,yCAAMA,CAAC;IACvB,WAAW;QACT,UAAU;QACV,WAAWI,CAAAA,QAAUA,QAAQ,cAAc;IAC7C;AACF;AA6BA,MAAMC,OAAOZ,8CAAqB,CAChC,CAAC,EAAEa,UAAU,MAAM,EAAEX,QAAQ,EAAEY,KAAK,EAAE,GAAM;QAC1C,UAAUZ,WAAWA,WAAWW;QAChC,OAAOC,SAAS;IAClB,GACD,CAAC;;eAEa,EAAEC,CAAAA,QAASA,MAAM,UAAU,IAAI,SAAS;EACrD,EAAE,CAACC,IAAiBP,yCAAgB,CAACO,EAAE,OAAO,IAAI,OAAO,CAAC;EAC1D,EAAEf,0CAAOA,CACPS,WACAL,yCAAUA,EACVG,qDAAUA,EACVN,uCAAQA,EACRE,wCAASA,EACTD,yCAAUA,EACVG,4CAAaA,EACbC,yCAAMA,CAAC;IACL,cAAc;AAChB,IACA;EACF,EAAES,CAAAA,IAAMA,EAAE,aAAa,GAAG,CAAC,gBAAgB,EAAEA,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,GAAI;AACxE,CAAC;AAED,sDAAeJ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kCAAgBA;IAC3B,YAAY;QACV,MAAM;YACJ,aAAa;gBACX,WAAWC;YACb;QACF;IACF;IACA,UAAU;QACR,SAAS;YAAE,MAAM;QAAS;QAC1B,SAAS;YAAE,SAAS;gBAAC;gBAAM;gBAAOC;aAAU;QAAC;QAC7C,UAAU;YAAE,MAAM;QAAU;QAC5B,WAAW;YACT,SAAS;gBAAE,MAAM;YAAQ;YACzB,SAAS;gBACP;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;aACD;QACH;IACF;IACA,MAAM;QACJ,SAAS;IACX;AACF,CAAC,EAAC;AAEK,MAAMjE,UAAgCkE,CAAAA,qBAC3C,+CAAC7E,wCAAOA;QAAC,YAAW;QAAS,gBAAe;qBAC1C,+CAAC0E,kCAAgBA,EAAKG,oBACpB,+CAAC;QAAI,OAAO;YAAE,QAAQ;QAAO;qBAC3B,+CAACxF,yCAAIA;QACH,IAAG;QACH,YAAW;QACX,OAAM;QACN,OAAO;YAAE,QAAQ;YAAkB,cAAc;QAAM;QACvD,GAAG;QACH,WAAU;OACX,uBAEC,+CAAC,aAAK,SAMd"}
1
+ {"version":3,"file":"components/message/Tooltip/Tooltip.stories.js","sources":["webpack://@ledgerhq/react-ui/./src/components/asorted/Text/index.tsx","webpack://@ledgerhq/react-ui/./src/components/asorted/Text/styles.ts","webpack://@ledgerhq/react-ui/./src/components/layout/Flex/index.ts","webpack://@ledgerhq/react-ui/./src/components/message/Tooltip/index.tsx","webpack://@ledgerhq/react-ui/./src/components/styled.ts","webpack://@ledgerhq/react-ui/./src/styles/helpers.ts","webpack://@ledgerhq/react-ui/./src/styles/styled/fontFamily.ts","webpack://@ledgerhq/react-ui/./src/styles/system/gaps.ts","webpack://@ledgerhq/react-ui/./src/styles/theme.ts","webpack://@ledgerhq/react-ui/webpack/runtime/compat_get_default_export","webpack://@ledgerhq/react-ui/webpack/runtime/define_property_getters","webpack://@ledgerhq/react-ui/webpack/runtime/has_own_property","webpack://@ledgerhq/react-ui/webpack/runtime/make_namespace_object","webpack://@ledgerhq/react-ui/./src/components/message/Tooltip/Tooltip.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport baseStyled, { BaseStyledProps } from \"../../styled\";\nimport {\n compose,\n fontSize,\n fontWeight,\n textAlign,\n lineHeight,\n letterSpacing,\n system,\n} from \"styled-system\";\nimport fontFamily from \"../../../styles/styled/fontFamily\";\nimport { TextVariants } from \"../../../styles/theme\";\nimport { textVariantStyle } from \"./styles\";\n\nconst uppercase = system({\n uppercase: {\n property: \"textTransform\",\n transform: value => (value ? \"uppercase\" : \"none\"),\n },\n});\n\ntype FontFamilies =\n | \"Inter|ExtraLight\"\n | \"Inter|Light\"\n | \"Inter|Regular\"\n | \"Inter|Medium\"\n | \"Inter|SemiBold\"\n | \"Inter|Bold\"\n | \"Inter|ExtraBold\"\n | \"Alpha|Medium\";\n\ntype WhiteSpace = \"normal\" | \"nowrap\" | \"pre\" | \"pre-line\" | \"pre-wrap\";\n\nexport interface TextProps extends BaseStyledProps {\n fontFamily?: string;\n ff?: FontFamilies;\n fontSize?: number | string | TextVariants;\n variant?: TextVariants;\n textAlign?: string;\n fontWeight?: string;\n lineHeight?: string;\n textTransform?: string;\n textOverflow?: string;\n uppercase?: boolean;\n whiteSpace?: WhiteSpace;\n children?: React.ReactNode;\n}\n\nconst Text = baseStyled.span.attrs<TextProps, TextProps>(\n ({ variant = \"body\", fontSize, color }) => ({\n fontSize: fontSize ? fontSize : variant,\n color: color || \"neutral.c100\",\n }),\n)`\n font-weight: 500;\n white-space: ${props => props.whiteSpace ?? \"normal\"};\n ${(p: TextProps) => textVariantStyle[p.variant || \"body\"]}\n ${compose(\n uppercase,\n lineHeight,\n fontFamily,\n fontSize,\n textAlign,\n fontWeight,\n letterSpacing,\n system({\n textOverflow: true,\n }),\n )}\n ${p => (p.textTransform ? `text-transform: ${p.textTransform};` : \"\")}\n`;\n\nexport default Text;\n","import { GlobalStyleProps } from \"../../../styles/global\";\nimport { css } from \"styled-components\";\nimport { TextVariants } from \"../../../styles/theme\";\n\nconst getFontSource = (name: string) => (props: GlobalStyleProps) => {\n const fontsPath = props.fontsPath ?? \"assets/fonts\";\n const fontName = (props.fontMappings && props.fontMappings(name)) || `${name}.woff2`;\n return `url(\"${fontsPath}/${fontName}\") format(\"woff2\")`;\n};\n\nexport const fontStyles = css`\n @font-face {\n font-family: \"Inter\";\n src: ${getFontSource(\"Inter-ExtraLight-BETA\")};\n font-weight: 100;\n font-style: normal;\n }\n\n @font-face {\n font-family: \"Inter\";\n src: ${getFontSource(\"Inter-Light-BETA\")};\n font-weight: 300;\n font-style: normal;\n }\n\n @font-face {\n font-family: \"Inter\";\n src: ${getFontSource(\"Inter-Regular\")};\n font-weight: 400;\n font-style: normal;\n }\n\n @font-face {\n font-family: \"Inter\";\n src: ${getFontSource(\"Inter-Medium\")};\n font-weight: 500;\n font-style: normal;\n }\n\n @font-face {\n font-family: \"Inter\";\n src: ${getFontSource(\"Inter-SemiBold\")};\n font-weight: 600;\n font-style: normal;\n }\n\n @font-face {\n font-family: \"Inter\";\n src: ${getFontSource(\"Inter-ExtraBold\")};\n font-weight: 900;\n font-style: normal;\n }\n\n @font-face {\n font-family: \"Alpha\";\n src: ${getFontSource(\"HMAlphaMono-Medium\")};\n font-weight: 500;\n font-style: normal;\n }\n`;\n\nexport const textVariantStyle: Record<\n TextVariants,\n {\n fontFamily: string;\n lineHeight?: string | number;\n fontWeight?: number;\n \"text-transform\"?: string;\n }\n> = {\n h1: {\n fontFamily: \"Alpha, Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h1Inter: {\n fontFamily: \"Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h2: {\n fontFamily: \"Alpha, Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h2Inter: {\n fontFamily: \"Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h3: {\n fontFamily: \"Alpha, Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h3Inter: {\n fontFamily: \"Inter, Sans\",\n fontWeight: 500,\n },\n h4: {\n fontFamily: \"Alpha, Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h4Inter: {\n fontFamily: \"Inter, Sans\",\n fontWeight: 600,\n },\n h5: {\n fontFamily: \"Alpha, Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h5Inter: {\n fontFamily: \"Inter, Sans\",\n fontWeight: 500,\n },\n large: {\n fontFamily: \"Inter, Sans\",\n },\n largeLineHeight: {\n fontFamily: \"Inter, Sans\",\n lineHeight: 1.7,\n },\n body: {\n fontFamily: \"Inter, Sans\",\n },\n bodyLineHeight: {\n fontFamily: \"Inter, Sans\",\n lineHeight: 1.7,\n },\n paragraph: {\n fontFamily: \"Inter, Sans\",\n },\n paragraphLineHeight: {\n fontFamily: \"Inter, Sans\",\n lineHeight: 1.7,\n },\n small: {\n fontFamily: \"Inter, Sans\",\n },\n extraSmall: {\n fontFamily: \"Inter, Sans\",\n },\n tiny: {\n fontFamily: \"Inter, Sans\",\n },\n micro: {\n fontFamily: \"Inter, Sans\",\n },\n subtitle: {\n fontFamily: \"Inter, Sans\",\n fontWeight: 600,\n \"text-transform\": \"uppercase\",\n },\n};\n","import baseStyled, { BaseStyledProps } from \"../../styled\";\n\nconst FlexBox = baseStyled.div.attrs<BaseStyledProps, BaseStyledProps>({ display: \"flex\" })``;\nexport type FlexBoxProps = BaseStyledProps & React.HTMLAttributes<HTMLDivElement>;\n\nexport default FlexBox;\n","import React, { useRef } from \"react\";\nimport Tippy, { TippyProps } from \"@tippyjs/react\";\nimport Text from \"../../asorted/Text\";\n\ntype Placement =\n | \"top\"\n | \"top-start\"\n | \"top-end\"\n | \"right\"\n | \"right-start\"\n | \"right-end\"\n | \"bottom\"\n | \"bottom-start\"\n | \"bottom-end\"\n | \"left\"\n | \"left-start\"\n | \"left-end\"\n | \"auto\"\n | \"auto-start\"\n | \"auto-end\";\n\n// Add more props later on if needed.\n// See https://atomiks.github.io/tippyjs/v6/all-props for the full list.\nexport interface Props extends TippyProps {\n /** The preferred placement of the tippy. */\n placement?: Placement;\n}\n\nexport default function Tooltip(props: Readonly<Props>): React.JSX.Element | null {\n const { content, placement = \"auto\", children, ...rest } = props;\n const triggerRef = useRef<HTMLSpanElement>(null);\n return (\n <>\n <span ref={triggerRef} style={{ display: \"inline-flex\" }}>\n {children}\n </span>\n <Tippy\n {...rest}\n reference={triggerRef as React.RefObject<Element>}\n placement={placement}\n content={\n <Text fontWeight=\"medium\" variant={\"paragraph\"} color=\"neutral.c00\">\n {content}\n </Text>\n }\n />\n </>\n );\n}\n","import React from \"react\";\nimport gaps from \"../styles/system/gaps\";\nimport styled, { StyledInterface, InterpolationFunction } from \"styled-components\";\nimport {\n compose,\n flexbox,\n FlexboxProps,\n space,\n SpaceProps,\n position,\n PositionProps,\n color,\n ColorProps,\n layout,\n LayoutProps,\n overflow,\n OverflowProps,\n border,\n BorderProps,\n} from \"styled-system\";\n\nexport type BaseStyledProps = SpaceProps &\n FlexboxProps &\n PositionProps &\n ColorProps &\n LayoutProps &\n BorderProps &\n OverflowProps & {\n /**\n * The columnGap CSS property sets the size of the gap (gutter) between an element's grid columns.\n */\n columnGap?: string | number;\n /**\n * The rowGap CSS property sets the size of the gap (gutter) between an element's grid rows.\n */\n rowGap?: string | number;\n color?: string;\n children?: React.ReactNode;\n };\n\nexport const baseStyles: InterpolationFunction<unknown> = compose(\n flexbox,\n space,\n position,\n color,\n layout,\n overflow,\n gaps,\n border,\n);\n\nconst proxyStyled = new Proxy(styled, {\n apply(target: typeof styled, thisArg, argumentsList: Parameters<typeof styled>) {\n return styled(target.apply(thisArg, argumentsList)(baseStyles));\n },\n get(target, property: keyof typeof styled) {\n if (typeof target[property] === \"function\") {\n return styled(target[property].apply(styled, [baseStyles]));\n }\n return target[property];\n },\n});\n\nexport default <StyledInterface>proxyStyled;\n","import Color from \"color\";\n\nimport { fontFamilies } from \"./theme\";\n\nexport const rgba = (c: string, a: number): string => Color(c).alpha(a).rgb().toString();\n\nexport const darken = (c: string, a: number): string => Color(c).darken(a).toString();\n\nexport const lighten = (c: string, a: number): string => Color(c).lighten(a).toString();\n\nexport const mix = (c: string, b: string, a: number): string =>\n Color(c).mix(Color(b), a).toString();\n\nexport const ff = (v: string) => {\n const [font, type = \"Regular\"] = v.split(\"|\");\n // @ts-expect-error FIXME\n const { style, weight } = fontFamilies[font][type];\n // @ts-expect-error FIXME\n const fallback: string = fontFamilies[font].fallback ?? \"Arial\";\n\n return {\n fontFamily: `${font}, ${fallback}`,\n fontWeight: weight,\n fontStyle: style,\n };\n};\n\nexport const ensureContrast = (color1: string, color2: string) => {\n const colorL1 = Color(color1).luminosity() + 0.05;\n const colorL2 = Color(color2).luminosity() + 0.05;\n\n const lRatio = colorL1 > colorL2 ? colorL1 / colorL2 : colorL2 / colorL1;\n\n if (lRatio < 1.5) {\n return Color(color1).rotate(180).negate().string();\n }\n return color1;\n};\n","import { ff } from \"../helpers\";\n\nexport default (props: { ff?: string }) => {\n const prop = props.ff;\n\n if (prop == null) {\n return null;\n }\n\n return ff(prop);\n};\n","import { system } from \"styled-system\";\n\nconst gaps = system({\n rowGap: { property: \"rowGap\", scale: \"space\" },\n columnGap: { property: \"columnGap\", scale: \"space\" },\n});\n\nexport default gaps;\n","import { keyframes, css, Font } from \"styled-components\";\nimport { palettes, ColorPalette } from \"@ledgerhq/ui-shared\";\n\nexport type screensBreakpoints = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"xxl\";\n\nexport const breakpoints = {\n sm: \"640px\",\n md: \"768px\",\n lg: \"1024px\",\n xl: \"1280px\",\n xxl: \"1536px\",\n} as Record<screensBreakpoints, string>;\n\nexport const space = [\n /* space indexes:\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 */\n 0, 2, 4, 8, 10, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76,\n];\n\nexport type TextVariants =\n | \"h1\"\n | \"h1Inter\"\n | \"h2\"\n | \"h2Inter\"\n | \"h3\"\n | \"h3Inter\"\n | \"h4\"\n | \"h4Inter\"\n | \"h5\"\n | \"h5Inter\"\n | \"large\"\n | \"largeLineHeight\"\n | \"body\"\n | \"bodyLineHeight\"\n | \"paragraph\"\n | \"paragraphLineHeight\"\n | \"small\"\n | \"extraSmall\"\n | \"tiny\"\n | \"micro\"\n | \"subtitle\";\n\nexport type ThemeScale<Type, Aliases extends string> = Array<Type> & Record<Aliases, Type>;\n\nexport const fontSizes = [8, 10, 11, 12, 13, 14, 16, 20, 24, 28, 32, 36] as ThemeScale<\n number,\n TextVariants\n>;\n\n[\n fontSizes.micro,\n fontSizes.tiny,\n fontSizes.extraSmall,\n fontSizes.small,\n fontSizes.paragraph,\n fontSizes.body,\n fontSizes.large,\n fontSizes.h5,\n fontSizes.h4,\n fontSizes.h3,\n fontSizes.h2,\n fontSizes.h1,\n] = fontSizes;\nfontSizes.largeLineHeight = fontSizes.large;\nfontSizes.bodyLineHeight = fontSizes.body;\nfontSizes.paragraphLineHeight = fontSizes.paragraph;\nfontSizes.subtitle = fontSizes.extraSmall;\nfontSizes.h1Inter = fontSizes.h1;\nfontSizes.h2Inter = fontSizes.h2;\nfontSizes.h3Inter = fontSizes.h3;\nfontSizes.h4Inter = fontSizes.h4;\nfontSizes.h5Inter = fontSizes.h5;\n\nconst fontWeights = {\n extraLight: \"100\",\n light: \"300\",\n regular: \"400\",\n medium: \"500\",\n semiBold: \"600\",\n bold: \"700\",\n extraBold: \"800\",\n};\n\nexport const radii = [0, 4, 8, 12, 16, 20];\nexport const shadows = [\"0 4px 8px 0 rgba(0, 0, 0, 0.03)\"];\nexport const zIndexes = [-1, 0, 1, 9, 10, 90, 100, 900, 1000];\n\n// Those fonts are now defined in global.css, this is just a mapping for styled-system\nexport const fontFamilies = {\n Inter: {\n ExtraLight: {\n weight: 100,\n style: \"normal\",\n },\n Light: {\n weight: 300,\n style: \"normal\",\n },\n Regular: {\n weight: 400,\n style: \"normal\",\n },\n Medium: {\n weight: 500,\n style: \"normal\",\n },\n SemiBold: {\n weight: 600,\n style: \"normal\",\n },\n Bold: {\n weight: 700,\n style: \"normal\",\n },\n ExtraBold: {\n weight: 800,\n style: \"normal\",\n },\n },\n Alpha: {\n Medium: {\n weight: 500,\n style: \"normal\",\n },\n },\n};\n\nconst animationDuration = \"0.33s\";\nconst easings = {\n outQuadratic: \"cubic-bezier(0.25, 0.46, 0.45, 0.94)\",\n};\n\nconst transition = (\n properties = [\"all\"],\n duration = animationDuration,\n easing = easings.outQuadratic,\n) => css`\n transition-property: ${properties.join(\",\")};\n transition-duration: ${duration};\n transition-timing-function: ${easing};\n`;\n\nconst fadeIn = keyframes`\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n `;\nconst fadeOut = keyframes`\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n `;\nconst fadeInGrowX = keyframes`\n 0% {\n opacity: 0;\n transform: scaleX(0);\n }\n 100% {\n opacity: 1;\n transform: scaleX(1);\n }\n`;\nconst fadeInUp = keyframes`\n 0% {\n opacity: 0;\n transform: translateY(66%);\n }\n 100% {\n opacity: 1;\n transform: translateY(0%);\n }\n `;\nconst animations = {\n fadeIn: () => css`\n ${fadeIn} ${animationDuration} ${easings.outQuadratic} forwards\n `,\n fadeOut: () => css`\n ${fadeOut} ${animationDuration} ${easings.outQuadratic} forwards\n `,\n fadeInGrowX: () => css`\n ${fadeInGrowX} 0.6s ${easings.outQuadratic} forwards\n `,\n fadeInUp: () => css`\n ${fadeInUp} ${animationDuration} ${easings.outQuadratic} forwards\n `,\n};\nconst overflow = {\n x: css`\n overflow-y: hidden;\n overflow-x: scroll;\n will-change: transform;\n &:hover {\n --track-color: ${p => p.theme.colors.neutral.c30};\n }\n `,\n y: css`\n overflow-x: hidden;\n overflow-y: scroll;\n will-change: transform;\n &:hover {\n --track-color: ${p => p.theme.colors.neutral.c30};\n }\n `,\n yAuto: css`\n overflow-x: hidden;\n overflow-y: auto;\n will-change: transform;\n &:hover {\n --track-color: ${p => p.theme.colors.neutral.c30};\n }\n `,\n xy: css`\n overflow: scroll;\n will-change: transform;\n &:hover {\n --track-color: ${p => p.theme.colors.neutral.c30};\n }\n `,\n trackSize: 12,\n};\n\ninterface DefaultTheme {\n theme: \"dark\" | \"light\";\n animations: typeof animations;\n transition: typeof transition;\n overflow: typeof overflow;\n sizes: {\n topBarHeight: number;\n sideBarWidth: number;\n drawer: {\n side: {\n big: {\n width: number;\n };\n small: {\n width: number;\n };\n };\n popin: {\n min: {\n height: number;\n width: number;\n };\n max: {\n height: number;\n width: number;\n };\n };\n };\n };\n radii: number[];\n fontFamilies: Record<string, Record<string, Font>>;\n fontSizes: number[];\n space: number[];\n shadows: string[];\n colors: ColorPalette;\n fontWeights: Record<string, string>;\n breakpoints: Record<screensBreakpoints, string>;\n zIndexes: number[];\n}\n\nconst theme: DefaultTheme = {\n theme: \"light\",\n sizes: {\n drawer: {\n side: {\n big: {\n width: 580,\n },\n small: {\n width: 420,\n },\n },\n popin: {\n min: {\n height: 158,\n width: 462,\n },\n max: {\n height: 522,\n width: 622,\n },\n },\n },\n topBarHeight: 58,\n sideBarWidth: 230,\n },\n radii,\n fontFamilies,\n fontSizes,\n fontWeights,\n space,\n shadows,\n colors: palettes.light,\n animations,\n overflow,\n transition,\n zIndexes,\n breakpoints,\n};\n\nexport default theme;\nexport type Theme = DefaultTheme;\n","// getDefaultExport function for compatibility with non-ESM modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import React from \"react\";\nimport { StoryTemplate } from \"src/components/helpers\";\n\nimport Text from \"../../asorted/Text\";\nimport FlexBox from \"../../layout/Flex\";\nimport TooltipComponent, { Props } from \"./index\";\n\nconst description = `\n### Tooltips display informative text when users hover over an element.\n\nThis component is based on [tippyjs](https://atomiks.github.io/tippyjs/) which is powerful library.\nPlease check [the documentation](https://github.com/atomiks/tippyjs-react#-props) for the full props list and usage.\n\n## Usage\n\n\\`\\`\\`js\n\nimport { Tooltip } from \"@ledgerhq/react-ui\"\n\n\\`\\`\\`\n\nWrap some jsx that will make the tooltip visible on mouse over.<br/>\n_**Note:** this jsx will automatically be wrapped inside a \\`span\\` element if the ref cannot be forwarded. \\\nSee [here](https://github.com/atomiks/tippyjs-react#component-children) for a detailed explanation._\n\nTo set the tooltip inner contents, use the \\`content\\` prop.\n\n\\`\\`\\`js\n<Tooltip content=\"Hello!\" {...props}>\n <div>Hover me</div>\n</Tooltip>\n\\`\\`\\`\n\n## Sandbox\n\nPlacement, style and content can be customized using props as demonstrated in the following example.\n`;\n\nexport default {\n title: \"Messages/Tooltip\",\n component: TooltipComponent,\n parameters: {\n docs: {\n description: {\n component: description,\n },\n },\n },\n argTypes: {\n content: { type: \"string\" },\n visible: { options: [true, false, undefined] },\n disabled: { type: \"boolean\" },\n placement: {\n control: { type: \"radio\" },\n options: [\n \"top\",\n \"top-start\",\n \"top-end\",\n \"right\",\n \"right-start\",\n \"right-end\",\n \"bottom\",\n \"bottom-start\",\n \"bottom-end\",\n \"left\",\n \"left-start\",\n \"left-end\",\n \"auto\",\n \"auto-start\",\n \"auto-end\",\n ],\n },\n },\n args: {\n content: \"Hello World!\",\n },\n};\n\nexport const Tooltip: StoryTemplate<Props> = args => (\n <FlexBox alignItems=\"center\" justifyContent=\"center\">\n <TooltipComponent {...args}>\n <div style={{ margin: \"50px\" }}>\n <Text\n as=\"div\"\n fontWeight=\"semiBold\"\n color=\"neutral.c100\"\n style={{ border: \"2px solid #AAA\", borderRadius: \"5px\" }}\n p={10}\n textAlign=\"center\"\n >\n Hover\n <br />\n me\n </Text>\n </div>\n </TooltipComponent>\n </FlexBox>\n);\n"],"names":["React","baseStyled","compose","fontSize","fontWeight","textAlign","lineHeight","letterSpacing","system","fontFamily","textVariantStyle","uppercase","value","Text","variant","color","props","p","css","getFontSource","name","fontsPath","fontName","fontStyles","FlexBox","useRef","Tippy","Tooltip","content","placement","children","rest","triggerRef","gaps","styled","flexbox","space","position","layout","overflow","border","baseStyles","proxyStyled","Proxy","target","thisArg","argumentsList","property","Color","fontFamilies","rgba","c","a","darken","lighten","mix","b","ff","v","font","type","style","weight","fallback","ensureContrast","color1","color2","colorL1","colorL2","lRatio","prop","keyframes","palettes","breakpoints","fontSizes","fontWeights","radii","shadows","zIndexes","animationDuration","easings","transition","properties","duration","easing","fadeIn","fadeOut","fadeInGrowX","fadeInUp","animations","theme","TooltipComponent","description","undefined","args"],"mappings":";;;;;;;;;;;;;;AAA0B;AACiC;AASpC;AACoC;AAEf;AAE5C,MAAMW,YAAYH,yCAAMA,CAAC;IACvB,WAAW;QACT,UAAU;QACV,WAAWI,CAAAA,QAAUA,QAAQ,cAAc;IAC7C;AACF;AA6BA,MAAMC,OAAOZ,8CAAqB,CAChC,CAAC,EAAEa,UAAU,MAAM,EAAEX,QAAQ,EAAEY,KAAK,EAAE,GAAM;QAC1C,UAAUZ,WAAWA,WAAWW;QAChC,OAAOC,SAAS;IAClB,GACD,CAAC;;eAEa,EAAEC,CAAAA,QAASA,MAAM,UAAU,IAAI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OC;aAAU;QAAC;QAC7C,UAAU;YAAE,MAAM;QAAU;QAC5B,WAAW;YACT,SAAS;gBAAE,MAAM;YAAQ;YACzB,SAAS;gBACP;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;aACD;QACH;IACF;IACA,MAAM;QACJ,SAAS;IACX;AACF,CAAC,EAAC;AAEK,MAAMlE,UAAgCmE,CAAAA,qBAC3C,+CAACtE,wCAAOA;QAAC,YAAW;QAAS,gBAAe;qBAC1C,+CAACmE,kCAAgBA,EAAKG,oBACpB,+CAAC;QAAI,OAAO;YAAE,QAAQ;QAAO;qBAC3B,+CAACjF,yCAAIA;QACH,IAAG;QACH,YAAW;QACX,OAAM;QACN,OAAO;YAAE,QAAQ;YAAkB,cAAc;QAAM;QACvD,GAAG;QACH,WAAU;OACX,uBAEC,+CAAC,aAAK,SAMd"}
@@ -667,8 +667,6 @@ __webpack_require__.d(__webpack_exports__, {
667
667
  // EXTERNAL MODULE: external "react"
668
668
  var external_react_ = __webpack_require__(2015);
669
669
  var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
670
- ;// CONCATENATED MODULE: external "react-is"
671
- const external_react_is_namespaceObject = require("react-is");
672
670
  ;// CONCATENATED MODULE: external "@tippyjs/react"
673
671
  const react_namespaceObject = require("@tippyjs/react");
674
672
  var react_default = /*#__PURE__*/__webpack_require__.n(react_namespaceObject);
@@ -678,44 +676,23 @@ var Text = __webpack_require__(348);
678
676
 
679
677
 
680
678
 
681
-
682
- // Tippyjs need the ref to be forwarded to the DOM element wrapping the children.
683
- // This component has been created to add a wrapping span and use its ref when needed.
684
- // See: https://github.com/atomiks/tippyjs-react#component-children
685
- const Wrapper = /*#__PURE__*/ (0,external_react_.forwardRef)((props, ref)=>{
686
- const childrenCount = external_react_default().Children.count(props.children);
687
- try {
688
- const child = external_react_default().Children.only(props.children);
689
- const isValidElement = /*#__PURE__*/ external_react_default().isValidElement(child);
690
- const isForwardingRef = (0,external_react_is_namespaceObject.isForwardRef)(child);
691
- const isDomElement = isValidElement && typeof child.type === "string";
692
- if (isForwardingRef || isDomElement) {
693
- return /*#__PURE__*/ external_react_default().cloneElement(child, {
694
- ref
695
- });
696
- } else {
697
- return /*#__PURE__*/ external_react_default().createElement("span", {
698
- ref: ref
699
- }, props.children);
700
- }
701
- } catch {
702
- return childrenCount < 1 ? null : /*#__PURE__*/ external_react_default().createElement("span", {
703
- ref: ref
704
- }, props.children);
705
- }
706
- });
707
679
  function Tooltip(props) {
708
680
  const { content, placement = "auto", children, ...rest } = props;
709
- return /*#__PURE__*/ external_react_default().createElement((react_default()), {
681
+ const triggerRef = (0,external_react_.useRef)(null);
682
+ return /*#__PURE__*/ external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/ external_react_default().createElement("span", {
683
+ ref: triggerRef,
684
+ style: {
685
+ display: "inline-flex"
686
+ }
687
+ }, children), /*#__PURE__*/ external_react_default().createElement((react_default()), {
710
688
  ...rest,
689
+ reference: triggerRef,
711
690
  placement: placement,
712
691
  content: /*#__PURE__*/ external_react_default().createElement(Text["default"], {
713
692
  fontWeight: "medium",
714
693
  variant: "paragraph",
715
694
  color: "neutral.c00"
716
695
  }, content)
717
- }, /*#__PURE__*/ external_react_default().createElement(Wrapper, {
718
- children: children
719
696
  }));
720
697
  }
721
698
 
@@ -1 +1 @@
1
- {"version":3,"file":"components/message/Tooltip/index.js","sources":["webpack://@ledgerhq/react-ui/./src/components/asorted/Text/index.tsx","webpack://@ledgerhq/react-ui/./src/components/asorted/Text/styles.ts","webpack://@ledgerhq/react-ui/./src/components/styled.ts","webpack://@ledgerhq/react-ui/./src/styles/helpers.ts","webpack://@ledgerhq/react-ui/./src/styles/styled/fontFamily.ts","webpack://@ledgerhq/react-ui/./src/styles/system/gaps.ts","webpack://@ledgerhq/react-ui/./src/styles/theme.ts","webpack://@ledgerhq/react-ui/webpack/runtime/compat_get_default_export","webpack://@ledgerhq/react-ui/webpack/runtime/define_property_getters","webpack://@ledgerhq/react-ui/webpack/runtime/has_own_property","webpack://@ledgerhq/react-ui/webpack/runtime/make_namespace_object","webpack://@ledgerhq/react-ui/./src/components/message/Tooltip/index.tsx"],"sourcesContent":["import React from \"react\";\nimport baseStyled, { BaseStyledProps } from \"../../styled\";\nimport {\n compose,\n fontSize,\n fontWeight,\n textAlign,\n lineHeight,\n letterSpacing,\n system,\n} from \"styled-system\";\nimport fontFamily from \"../../../styles/styled/fontFamily\";\nimport { TextVariants } from \"../../../styles/theme\";\nimport { textVariantStyle } from \"./styles\";\n\nconst uppercase = system({\n uppercase: {\n property: \"textTransform\",\n transform: value => (value ? \"uppercase\" : \"none\"),\n },\n});\n\ntype FontFamilies =\n | \"Inter|ExtraLight\"\n | \"Inter|Light\"\n | \"Inter|Regular\"\n | \"Inter|Medium\"\n | \"Inter|SemiBold\"\n | \"Inter|Bold\"\n | \"Inter|ExtraBold\"\n | \"Alpha|Medium\";\n\ntype WhiteSpace = \"normal\" | \"nowrap\" | \"pre\" | \"pre-line\" | \"pre-wrap\";\n\nexport interface TextProps extends BaseStyledProps {\n fontFamily?: string;\n ff?: FontFamilies;\n fontSize?: number | string | TextVariants;\n variant?: TextVariants;\n textAlign?: string;\n fontWeight?: string;\n lineHeight?: string;\n textTransform?: string;\n textOverflow?: string;\n uppercase?: boolean;\n whiteSpace?: WhiteSpace;\n children?: React.ReactNode;\n}\n\nconst Text = baseStyled.span.attrs<TextProps, TextProps>(\n ({ variant = \"body\", fontSize, color }) => ({\n fontSize: fontSize ? fontSize : variant,\n color: color || \"neutral.c100\",\n }),\n)`\n font-weight: 500;\n white-space: ${props => props.whiteSpace ?? \"normal\"};\n ${(p: TextProps) => textVariantStyle[p.variant || \"body\"]}\n ${compose(\n uppercase,\n lineHeight,\n fontFamily,\n fontSize,\n textAlign,\n fontWeight,\n letterSpacing,\n system({\n textOverflow: true,\n }),\n )}\n ${p => (p.textTransform ? `text-transform: ${p.textTransform};` : \"\")}\n`;\n\nexport default Text;\n","import { GlobalStyleProps } from \"../../../styles/global\";\nimport { css } from \"styled-components\";\nimport { TextVariants } from \"../../../styles/theme\";\n\nconst getFontSource = (name: string) => (props: GlobalStyleProps) => {\n const fontsPath = props.fontsPath ?? \"assets/fonts\";\n const fontName = (props.fontMappings && props.fontMappings(name)) || `${name}.woff2`;\n return `url(\"${fontsPath}/${fontName}\") format(\"woff2\")`;\n};\n\nexport const fontStyles = css`\n @font-face {\n font-family: \"Inter\";\n src: ${getFontSource(\"Inter-ExtraLight-BETA\")};\n font-weight: 100;\n font-style: normal;\n }\n\n @font-face {\n font-family: \"Inter\";\n src: ${getFontSource(\"Inter-Light-BETA\")};\n font-weight: 300;\n font-style: normal;\n }\n\n @font-face {\n font-family: \"Inter\";\n src: ${getFontSource(\"Inter-Regular\")};\n font-weight: 400;\n font-style: normal;\n }\n\n @font-face {\n font-family: \"Inter\";\n src: ${getFontSource(\"Inter-Medium\")};\n font-weight: 500;\n font-style: normal;\n }\n\n @font-face {\n font-family: \"Inter\";\n src: ${getFontSource(\"Inter-SemiBold\")};\n font-weight: 600;\n font-style: normal;\n }\n\n @font-face {\n font-family: \"Inter\";\n src: ${getFontSource(\"Inter-ExtraBold\")};\n font-weight: 900;\n font-style: normal;\n }\n\n @font-face {\n font-family: \"Alpha\";\n src: ${getFontSource(\"HMAlphaMono-Medium\")};\n font-weight: 500;\n font-style: normal;\n }\n`;\n\nexport const textVariantStyle: Record<\n TextVariants,\n {\n fontFamily: string;\n lineHeight?: string | number;\n fontWeight?: number;\n \"text-transform\"?: string;\n }\n> = {\n h1: {\n fontFamily: \"Alpha, Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h1Inter: {\n fontFamily: \"Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h2: {\n fontFamily: \"Alpha, Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h2Inter: {\n fontFamily: \"Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h3: {\n fontFamily: \"Alpha, Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h3Inter: {\n fontFamily: \"Inter, Sans\",\n fontWeight: 500,\n },\n h4: {\n fontFamily: \"Alpha, Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h4Inter: {\n fontFamily: \"Inter, Sans\",\n fontWeight: 600,\n },\n h5: {\n fontFamily: \"Alpha, Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h5Inter: {\n fontFamily: \"Inter, Sans\",\n fontWeight: 500,\n },\n large: {\n fontFamily: \"Inter, Sans\",\n },\n largeLineHeight: {\n fontFamily: \"Inter, Sans\",\n lineHeight: 1.7,\n },\n body: {\n fontFamily: \"Inter, Sans\",\n },\n bodyLineHeight: {\n fontFamily: \"Inter, Sans\",\n lineHeight: 1.7,\n },\n paragraph: {\n fontFamily: \"Inter, Sans\",\n },\n paragraphLineHeight: {\n fontFamily: \"Inter, Sans\",\n lineHeight: 1.7,\n },\n small: {\n fontFamily: \"Inter, Sans\",\n },\n extraSmall: {\n fontFamily: \"Inter, Sans\",\n },\n tiny: {\n fontFamily: \"Inter, Sans\",\n },\n micro: {\n fontFamily: \"Inter, Sans\",\n },\n subtitle: {\n fontFamily: \"Inter, Sans\",\n fontWeight: 600,\n \"text-transform\": \"uppercase\",\n },\n};\n","import React from \"react\";\nimport gaps from \"../styles/system/gaps\";\nimport styled, { StyledInterface, InterpolationFunction } from \"styled-components\";\nimport {\n compose,\n flexbox,\n FlexboxProps,\n space,\n SpaceProps,\n position,\n PositionProps,\n color,\n ColorProps,\n layout,\n LayoutProps,\n overflow,\n OverflowProps,\n border,\n BorderProps,\n} from \"styled-system\";\n\nexport type BaseStyledProps = SpaceProps &\n FlexboxProps &\n PositionProps &\n ColorProps &\n LayoutProps &\n BorderProps &\n OverflowProps & {\n /**\n * The columnGap CSS property sets the size of the gap (gutter) between an element's grid columns.\n */\n columnGap?: string | number;\n /**\n * The rowGap CSS property sets the size of the gap (gutter) between an element's grid rows.\n */\n rowGap?: string | number;\n color?: string;\n children?: React.ReactNode;\n };\n\nexport const baseStyles: InterpolationFunction<unknown> = compose(\n flexbox,\n space,\n position,\n color,\n layout,\n overflow,\n gaps,\n border,\n);\n\nconst proxyStyled = new Proxy(styled, {\n apply(target: typeof styled, thisArg, argumentsList: Parameters<typeof styled>) {\n return styled(target.apply(thisArg, argumentsList)(baseStyles));\n },\n get(target, property: keyof typeof styled) {\n if (typeof target[property] === \"function\") {\n return styled(target[property].apply(styled, [baseStyles]));\n }\n return target[property];\n },\n});\n\nexport default <StyledInterface>proxyStyled;\n","import Color from \"color\";\n\nimport { fontFamilies } from \"./theme\";\n\nexport const rgba = (c: string, a: number): string => Color(c).alpha(a).rgb().toString();\n\nexport const darken = (c: string, a: number): string => Color(c).darken(a).toString();\n\nexport const lighten = (c: string, a: number): string => Color(c).lighten(a).toString();\n\nexport const mix = (c: string, b: string, a: number): string =>\n Color(c).mix(Color(b), a).toString();\n\nexport const ff = (v: string) => {\n const [font, type = \"Regular\"] = v.split(\"|\");\n // @ts-expect-error FIXME\n const { style, weight } = fontFamilies[font][type];\n // @ts-expect-error FIXME\n const fallback: string = fontFamilies[font].fallback ?? \"Arial\";\n\n return {\n fontFamily: `${font}, ${fallback}`,\n fontWeight: weight,\n fontStyle: style,\n };\n};\n\nexport const ensureContrast = (color1: string, color2: string) => {\n const colorL1 = Color(color1).luminosity() + 0.05;\n const colorL2 = Color(color2).luminosity() + 0.05;\n\n const lRatio = colorL1 > colorL2 ? colorL1 / colorL2 : colorL2 / colorL1;\n\n if (lRatio < 1.5) {\n return Color(color1).rotate(180).negate().string();\n }\n return color1;\n};\n","import { ff } from \"../helpers\";\n\nexport default (props: { ff?: string }) => {\n const prop = props.ff;\n\n if (prop == null) {\n return null;\n }\n\n return ff(prop);\n};\n","import { system } from \"styled-system\";\n\nconst gaps = system({\n rowGap: { property: \"rowGap\", scale: \"space\" },\n columnGap: { property: \"columnGap\", scale: \"space\" },\n});\n\nexport default gaps;\n","import { keyframes, css, Font } from \"styled-components\";\nimport { palettes, ColorPalette } from \"@ledgerhq/ui-shared\";\n\nexport type screensBreakpoints = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"xxl\";\n\nexport const breakpoints = {\n sm: \"640px\",\n md: \"768px\",\n lg: \"1024px\",\n xl: \"1280px\",\n xxl: \"1536px\",\n} as Record<screensBreakpoints, string>;\n\nexport const space = [\n /* space indexes:\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 */\n 0, 2, 4, 8, 10, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76,\n];\n\nexport type TextVariants =\n | \"h1\"\n | \"h1Inter\"\n | \"h2\"\n | \"h2Inter\"\n | \"h3\"\n | \"h3Inter\"\n | \"h4\"\n | \"h4Inter\"\n | \"h5\"\n | \"h5Inter\"\n | \"large\"\n | \"largeLineHeight\"\n | \"body\"\n | \"bodyLineHeight\"\n | \"paragraph\"\n | \"paragraphLineHeight\"\n | \"small\"\n | \"extraSmall\"\n | \"tiny\"\n | \"micro\"\n | \"subtitle\";\n\nexport type ThemeScale<Type, Aliases extends string> = Array<Type> & Record<Aliases, Type>;\n\nexport const fontSizes = [8, 10, 11, 12, 13, 14, 16, 20, 24, 28, 32, 36] as ThemeScale<\n number,\n TextVariants\n>;\n\n[\n fontSizes.micro,\n fontSizes.tiny,\n fontSizes.extraSmall,\n fontSizes.small,\n fontSizes.paragraph,\n fontSizes.body,\n fontSizes.large,\n fontSizes.h5,\n fontSizes.h4,\n fontSizes.h3,\n fontSizes.h2,\n fontSizes.h1,\n] = fontSizes;\nfontSizes.largeLineHeight = fontSizes.large;\nfontSizes.bodyLineHeight = fontSizes.body;\nfontSizes.paragraphLineHeight = fontSizes.paragraph;\nfontSizes.subtitle = fontSizes.extraSmall;\nfontSizes.h1Inter = fontSizes.h1;\nfontSizes.h2Inter = fontSizes.h2;\nfontSizes.h3Inter = fontSizes.h3;\nfontSizes.h4Inter = fontSizes.h4;\nfontSizes.h5Inter = fontSizes.h5;\n\nconst fontWeights = {\n extraLight: \"100\",\n light: \"300\",\n regular: \"400\",\n medium: \"500\",\n semiBold: \"600\",\n bold: \"700\",\n extraBold: \"800\",\n};\n\nexport const radii = [0, 4, 8, 12, 16, 20];\nexport const shadows = [\"0 4px 8px 0 rgba(0, 0, 0, 0.03)\"];\nexport const zIndexes = [-1, 0, 1, 9, 10, 90, 100, 900, 1000];\n\n// Those fonts are now defined in global.css, this is just a mapping for styled-system\nexport const fontFamilies = {\n Inter: {\n ExtraLight: {\n weight: 100,\n style: \"normal\",\n },\n Light: {\n weight: 300,\n style: \"normal\",\n },\n Regular: {\n weight: 400,\n style: \"normal\",\n },\n Medium: {\n weight: 500,\n style: \"normal\",\n },\n SemiBold: {\n weight: 600,\n style: \"normal\",\n },\n Bold: {\n weight: 700,\n style: \"normal\",\n },\n ExtraBold: {\n weight: 800,\n style: \"normal\",\n },\n },\n Alpha: {\n Medium: {\n weight: 500,\n style: \"normal\",\n },\n },\n};\n\nconst animationDuration = \"0.33s\";\nconst easings = {\n outQuadratic: \"cubic-bezier(0.25, 0.46, 0.45, 0.94)\",\n};\n\nconst transition = (\n properties = [\"all\"],\n duration = animationDuration,\n easing = easings.outQuadratic,\n) => css`\n transition-property: ${properties.join(\",\")};\n transition-duration: ${duration};\n transition-timing-function: ${easing};\n`;\n\nconst fadeIn = keyframes`\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n `;\nconst fadeOut = keyframes`\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n `;\nconst fadeInGrowX = keyframes`\n 0% {\n opacity: 0;\n transform: scaleX(0);\n }\n 100% {\n opacity: 1;\n transform: scaleX(1);\n }\n`;\nconst fadeInUp = keyframes`\n 0% {\n opacity: 0;\n transform: translateY(66%);\n }\n 100% {\n opacity: 1;\n transform: translateY(0%);\n }\n `;\nconst animations = {\n fadeIn: () => css`\n ${fadeIn} ${animationDuration} ${easings.outQuadratic} forwards\n `,\n fadeOut: () => css`\n ${fadeOut} ${animationDuration} ${easings.outQuadratic} forwards\n `,\n fadeInGrowX: () => css`\n ${fadeInGrowX} 0.6s ${easings.outQuadratic} forwards\n `,\n fadeInUp: () => css`\n ${fadeInUp} ${animationDuration} ${easings.outQuadratic} forwards\n `,\n};\nconst overflow = {\n x: css`\n overflow-y: hidden;\n overflow-x: scroll;\n will-change: transform;\n &:hover {\n --track-color: ${p => p.theme.colors.neutral.c30};\n }\n `,\n y: css`\n overflow-x: hidden;\n overflow-y: scroll;\n will-change: transform;\n &:hover {\n --track-color: ${p => p.theme.colors.neutral.c30};\n }\n `,\n yAuto: css`\n overflow-x: hidden;\n overflow-y: auto;\n will-change: transform;\n &:hover {\n --track-color: ${p => p.theme.colors.neutral.c30};\n }\n `,\n xy: css`\n overflow: scroll;\n will-change: transform;\n &:hover {\n --track-color: ${p => p.theme.colors.neutral.c30};\n }\n `,\n trackSize: 12,\n};\n\ninterface DefaultTheme {\n theme: \"dark\" | \"light\";\n animations: typeof animations;\n transition: typeof transition;\n overflow: typeof overflow;\n sizes: {\n topBarHeight: number;\n sideBarWidth: number;\n drawer: {\n side: {\n big: {\n width: number;\n };\n small: {\n width: number;\n };\n };\n popin: {\n min: {\n height: number;\n width: number;\n };\n max: {\n height: number;\n width: number;\n };\n };\n };\n };\n radii: number[];\n fontFamilies: Record<string, Record<string, Font>>;\n fontSizes: number[];\n space: number[];\n shadows: string[];\n colors: ColorPalette;\n fontWeights: Record<string, string>;\n breakpoints: Record<screensBreakpoints, string>;\n zIndexes: number[];\n}\n\nconst theme: DefaultTheme = {\n theme: \"light\",\n sizes: {\n drawer: {\n side: {\n big: {\n width: 580,\n },\n small: {\n width: 420,\n },\n },\n popin: {\n min: {\n height: 158,\n width: 462,\n },\n max: {\n height: 522,\n width: 622,\n },\n },\n },\n topBarHeight: 58,\n sideBarWidth: 230,\n },\n radii,\n fontFamilies,\n fontSizes,\n fontWeights,\n space,\n shadows,\n colors: palettes.light,\n animations,\n overflow,\n transition,\n zIndexes,\n breakpoints,\n};\n\nexport default theme;\nexport type Theme = DefaultTheme;\n","// getDefaultExport function for compatibility with non-ESM modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import React, { forwardRef } from \"react\";\nimport { isForwardRef } from \"react-is\";\nimport Tippy, { TippyProps } from \"@tippyjs/react\";\nimport Text from \"../../asorted/Text\";\n\ntype Placement =\n | \"top\"\n | \"top-start\"\n | \"top-end\"\n | \"right\"\n | \"right-start\"\n | \"right-end\"\n | \"bottom\"\n | \"bottom-start\"\n | \"bottom-end\"\n | \"left\"\n | \"left-start\"\n | \"left-end\"\n | \"auto\"\n | \"auto-start\"\n | \"auto-end\";\n\n// Add more props later on if needed.\n// See https://atomiks.github.io/tippyjs/v6/all-props for the full list.\nexport interface Props extends TippyProps {\n /** The preferred placement of the tippy. */\n placement?: Placement;\n}\n\n// Tippyjs need the ref to be forwarded to the DOM element wrapping the children.\n// This component has been created to add a wrapping span and use its ref when needed.\n// See: https://github.com/atomiks/tippyjs-react#component-children\nconst Wrapper: React.ComponentType<React.PropsWithChildren<unknown>> = forwardRef(\n (props, ref: React.LegacyRef<HTMLElement>) => {\n const childrenCount = React.Children.count(props.children);\n\n try {\n const child = React.Children.only(props.children);\n const isValidElement = React.isValidElement(child);\n const isForwardingRef = isForwardRef(child);\n const isDomElement = isValidElement && typeof child.type === \"string\";\n\n if (isForwardingRef || isDomElement) {\n return React.cloneElement(child, { ref } as React.Attributes & {\n ref?: React.Ref<HTMLElement>;\n });\n } else {\n return <span ref={ref}>{props.children}</span>;\n }\n } catch {\n return childrenCount < 1 ? null : <span ref={ref}>{props.children}</span>;\n }\n },\n);\n\nexport default function Tooltip(props: Readonly<Props>): React.JSX.Element | null {\n const { content, placement = \"auto\", children, ...rest } = props;\n return (\n <Tippy\n {...rest}\n placement={placement}\n content={\n <Text fontWeight=\"medium\" variant={\"paragraph\"} color=\"neutral.c00\">\n {content}\n </Text>\n }\n >\n <Wrapper children={children} />\n </Tippy>\n );\n}\n"],"names":["React","baseStyled","compose","fontSize","fontWeight","textAlign","lineHeight","letterSpacing","system","fontFamily","textVariantStyle","uppercase","value","Text","variant","color","props","p","css","getFontSource","name","fontsPath","fontName","fontStyles","gaps","styled","flexbox","space","position","layout","overflow","border","baseStyles","proxyStyled","Proxy","target","thisArg","argumentsList","property","Color","fontFamilies","rgba","c","a","darken","lighten","mix","b","ff","v","font","type","style","weight","fallback","ensureContrast","color1","color2","colorL1","colorL2","lRatio","prop","keyframes","palettes","breakpoints","fontSizes","fontWeights","radii","shadows","zIndexes","animationDuration","easings","transition","properties","duration","easing","fadeIn","fadeOut","fadeInGrowX","fadeInUp","animations","theme","forwardRef","isForwardRef","Tippy","Wrapper","ref","childrenCount","child","isValidElement","isForwardingRef","isDomElement","Tooltip","content","placement","children","rest"],"mappings":";;;;;;;;;;;;;;AAA0B;AACiC;AASpC;AACoC;AAEf;AAE5C,MAAMW,YAAYH,yCAAMA,CAAC;IACvB,WAAW;QACT,UAAU;QACV,WAAWI,CAAAA,QAAUA,QAAQ,cAAc;IAC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AAKD;WAAMtE,MAAM,QAAQ;IACnE;AACF;AAGa,SAAS4E,QAAQ5E,KAAsB;IACpD,MAAM,EAAE6E,OAAO,EAAEC,YAAY,MAAM,EAAEC,QAAQ,EAAE,GAAGC,MAAM,GAAGhF;IAC3D,qBACE,uCAACoE,iBAAKA;QACH,GAAGY,IAAI;QACR,WAAWF;QACX,uBACE,uCAACjF,eAAIA;YAAC,YAAW;YAAS,SAAS;YAAa,OAAM;WACnDgF;qBAIL,uCAACR;QAAQ,UAAUU;;AAGzB"}
1
+ {"version":3,"file":"components/message/Tooltip/index.js","sources":["webpack://@ledgerhq/react-ui/./src/components/asorted/Text/index.tsx","webpack://@ledgerhq/react-ui/./src/components/asorted/Text/styles.ts","webpack://@ledgerhq/react-ui/./src/components/styled.ts","webpack://@ledgerhq/react-ui/./src/styles/helpers.ts","webpack://@ledgerhq/react-ui/./src/styles/styled/fontFamily.ts","webpack://@ledgerhq/react-ui/./src/styles/system/gaps.ts","webpack://@ledgerhq/react-ui/./src/styles/theme.ts","webpack://@ledgerhq/react-ui/webpack/runtime/compat_get_default_export","webpack://@ledgerhq/react-ui/webpack/runtime/define_property_getters","webpack://@ledgerhq/react-ui/webpack/runtime/has_own_property","webpack://@ledgerhq/react-ui/webpack/runtime/make_namespace_object","webpack://@ledgerhq/react-ui/./src/components/message/Tooltip/index.tsx"],"sourcesContent":["import React from \"react\";\nimport baseStyled, { BaseStyledProps } from \"../../styled\";\nimport {\n compose,\n fontSize,\n fontWeight,\n textAlign,\n lineHeight,\n letterSpacing,\n system,\n} from \"styled-system\";\nimport fontFamily from \"../../../styles/styled/fontFamily\";\nimport { TextVariants } from \"../../../styles/theme\";\nimport { textVariantStyle } from \"./styles\";\n\nconst uppercase = system({\n uppercase: {\n property: \"textTransform\",\n transform: value => (value ? \"uppercase\" : \"none\"),\n },\n});\n\ntype FontFamilies =\n | \"Inter|ExtraLight\"\n | \"Inter|Light\"\n | \"Inter|Regular\"\n | \"Inter|Medium\"\n | \"Inter|SemiBold\"\n | \"Inter|Bold\"\n | \"Inter|ExtraBold\"\n | \"Alpha|Medium\";\n\ntype WhiteSpace = \"normal\" | \"nowrap\" | \"pre\" | \"pre-line\" | \"pre-wrap\";\n\nexport interface TextProps extends BaseStyledProps {\n fontFamily?: string;\n ff?: FontFamilies;\n fontSize?: number | string | TextVariants;\n variant?: TextVariants;\n textAlign?: string;\n fontWeight?: string;\n lineHeight?: string;\n textTransform?: string;\n textOverflow?: string;\n uppercase?: boolean;\n whiteSpace?: WhiteSpace;\n children?: React.ReactNode;\n}\n\nconst Text = baseStyled.span.attrs<TextProps, TextProps>(\n ({ variant = \"body\", fontSize, color }) => ({\n fontSize: fontSize ? fontSize : variant,\n color: color || \"neutral.c100\",\n }),\n)`\n font-weight: 500;\n white-space: ${props => props.whiteSpace ?? \"normal\"};\n ${(p: TextProps) => textVariantStyle[p.variant || \"body\"]}\n ${compose(\n uppercase,\n lineHeight,\n fontFamily,\n fontSize,\n textAlign,\n fontWeight,\n letterSpacing,\n system({\n textOverflow: true,\n }),\n )}\n ${p => (p.textTransform ? `text-transform: ${p.textTransform};` : \"\")}\n`;\n\nexport default Text;\n","import { GlobalStyleProps } from \"../../../styles/global\";\nimport { css } from \"styled-components\";\nimport { TextVariants } from \"../../../styles/theme\";\n\nconst getFontSource = (name: string) => (props: GlobalStyleProps) => {\n const fontsPath = props.fontsPath ?? \"assets/fonts\";\n const fontName = (props.fontMappings && props.fontMappings(name)) || `${name}.woff2`;\n return `url(\"${fontsPath}/${fontName}\") format(\"woff2\")`;\n};\n\nexport const fontStyles = css`\n @font-face {\n font-family: \"Inter\";\n src: ${getFontSource(\"Inter-ExtraLight-BETA\")};\n font-weight: 100;\n font-style: normal;\n }\n\n @font-face {\n font-family: \"Inter\";\n src: ${getFontSource(\"Inter-Light-BETA\")};\n font-weight: 300;\n font-style: normal;\n }\n\n @font-face {\n font-family: \"Inter\";\n src: ${getFontSource(\"Inter-Regular\")};\n font-weight: 400;\n font-style: normal;\n }\n\n @font-face {\n font-family: \"Inter\";\n src: ${getFontSource(\"Inter-Medium\")};\n font-weight: 500;\n font-style: normal;\n }\n\n @font-face {\n font-family: \"Inter\";\n src: ${getFontSource(\"Inter-SemiBold\")};\n font-weight: 600;\n font-style: normal;\n }\n\n @font-face {\n font-family: \"Inter\";\n src: ${getFontSource(\"Inter-ExtraBold\")};\n font-weight: 900;\n font-style: normal;\n }\n\n @font-face {\n font-family: \"Alpha\";\n src: ${getFontSource(\"HMAlphaMono-Medium\")};\n font-weight: 500;\n font-style: normal;\n }\n`;\n\nexport const textVariantStyle: Record<\n TextVariants,\n {\n fontFamily: string;\n lineHeight?: string | number;\n fontWeight?: number;\n \"text-transform\"?: string;\n }\n> = {\n h1: {\n fontFamily: \"Alpha, Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h1Inter: {\n fontFamily: \"Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h2: {\n fontFamily: \"Alpha, Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h2Inter: {\n fontFamily: \"Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h3: {\n fontFamily: \"Alpha, Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h3Inter: {\n fontFamily: \"Inter, Sans\",\n fontWeight: 500,\n },\n h4: {\n fontFamily: \"Alpha, Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h4Inter: {\n fontFamily: \"Inter, Sans\",\n fontWeight: 600,\n },\n h5: {\n fontFamily: \"Alpha, Inter, Sans\",\n fontWeight: 500,\n \"text-transform\": \"uppercase\",\n },\n h5Inter: {\n fontFamily: \"Inter, Sans\",\n fontWeight: 500,\n },\n large: {\n fontFamily: \"Inter, Sans\",\n },\n largeLineHeight: {\n fontFamily: \"Inter, Sans\",\n lineHeight: 1.7,\n },\n body: {\n fontFamily: \"Inter, Sans\",\n },\n bodyLineHeight: {\n fontFamily: \"Inter, Sans\",\n lineHeight: 1.7,\n },\n paragraph: {\n fontFamily: \"Inter, Sans\",\n },\n paragraphLineHeight: {\n fontFamily: \"Inter, Sans\",\n lineHeight: 1.7,\n },\n small: {\n fontFamily: \"Inter, Sans\",\n },\n extraSmall: {\n fontFamily: \"Inter, Sans\",\n },\n tiny: {\n fontFamily: \"Inter, Sans\",\n },\n micro: {\n fontFamily: \"Inter, Sans\",\n },\n subtitle: {\n fontFamily: \"Inter, Sans\",\n fontWeight: 600,\n \"text-transform\": \"uppercase\",\n },\n};\n","import React from \"react\";\nimport gaps from \"../styles/system/gaps\";\nimport styled, { StyledInterface, InterpolationFunction } from \"styled-components\";\nimport {\n compose,\n flexbox,\n FlexboxProps,\n space,\n SpaceProps,\n position,\n PositionProps,\n color,\n ColorProps,\n layout,\n LayoutProps,\n overflow,\n OverflowProps,\n border,\n BorderProps,\n} from \"styled-system\";\n\nexport type BaseStyledProps = SpaceProps &\n FlexboxProps &\n PositionProps &\n ColorProps &\n LayoutProps &\n BorderProps &\n OverflowProps & {\n /**\n * The columnGap CSS property sets the size of the gap (gutter) between an element's grid columns.\n */\n columnGap?: string | number;\n /**\n * The rowGap CSS property sets the size of the gap (gutter) between an element's grid rows.\n */\n rowGap?: string | number;\n color?: string;\n children?: React.ReactNode;\n };\n\nexport const baseStyles: InterpolationFunction<unknown> = compose(\n flexbox,\n space,\n position,\n color,\n layout,\n overflow,\n gaps,\n border,\n);\n\nconst proxyStyled = new Proxy(styled, {\n apply(target: typeof styled, thisArg, argumentsList: Parameters<typeof styled>) {\n return styled(target.apply(thisArg, argumentsList)(baseStyles));\n },\n get(target, property: keyof typeof styled) {\n if (typeof target[property] === \"function\") {\n return styled(target[property].apply(styled, [baseStyles]));\n }\n return target[property];\n },\n});\n\nexport default <StyledInterface>proxyStyled;\n","import Color from \"color\";\n\nimport { fontFamilies } from \"./theme\";\n\nexport const rgba = (c: string, a: number): string => Color(c).alpha(a).rgb().toString();\n\nexport const darken = (c: string, a: number): string => Color(c).darken(a).toString();\n\nexport const lighten = (c: string, a: number): string => Color(c).lighten(a).toString();\n\nexport const mix = (c: string, b: string, a: number): string =>\n Color(c).mix(Color(b), a).toString();\n\nexport const ff = (v: string) => {\n const [font, type = \"Regular\"] = v.split(\"|\");\n // @ts-expect-error FIXME\n const { style, weight } = fontFamilies[font][type];\n // @ts-expect-error FIXME\n const fallback: string = fontFamilies[font].fallback ?? \"Arial\";\n\n return {\n fontFamily: `${font}, ${fallback}`,\n fontWeight: weight,\n fontStyle: style,\n };\n};\n\nexport const ensureContrast = (color1: string, color2: string) => {\n const colorL1 = Color(color1).luminosity() + 0.05;\n const colorL2 = Color(color2).luminosity() + 0.05;\n\n const lRatio = colorL1 > colorL2 ? colorL1 / colorL2 : colorL2 / colorL1;\n\n if (lRatio < 1.5) {\n return Color(color1).rotate(180).negate().string();\n }\n return color1;\n};\n","import { ff } from \"../helpers\";\n\nexport default (props: { ff?: string }) => {\n const prop = props.ff;\n\n if (prop == null) {\n return null;\n }\n\n return ff(prop);\n};\n","import { system } from \"styled-system\";\n\nconst gaps = system({\n rowGap: { property: \"rowGap\", scale: \"space\" },\n columnGap: { property: \"columnGap\", scale: \"space\" },\n});\n\nexport default gaps;\n","import { keyframes, css, Font } from \"styled-components\";\nimport { palettes, ColorPalette } from \"@ledgerhq/ui-shared\";\n\nexport type screensBreakpoints = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"xxl\";\n\nexport const breakpoints = {\n sm: \"640px\",\n md: \"768px\",\n lg: \"1024px\",\n xl: \"1280px\",\n xxl: \"1536px\",\n} as Record<screensBreakpoints, string>;\n\nexport const space = [\n /* space indexes:\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 */\n 0, 2, 4, 8, 10, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76,\n];\n\nexport type TextVariants =\n | \"h1\"\n | \"h1Inter\"\n | \"h2\"\n | \"h2Inter\"\n | \"h3\"\n | \"h3Inter\"\n | \"h4\"\n | \"h4Inter\"\n | \"h5\"\n | \"h5Inter\"\n | \"large\"\n | \"largeLineHeight\"\n | \"body\"\n | \"bodyLineHeight\"\n | \"paragraph\"\n | \"paragraphLineHeight\"\n | \"small\"\n | \"extraSmall\"\n | \"tiny\"\n | \"micro\"\n | \"subtitle\";\n\nexport type ThemeScale<Type, Aliases extends string> = Array<Type> & Record<Aliases, Type>;\n\nexport const fontSizes = [8, 10, 11, 12, 13, 14, 16, 20, 24, 28, 32, 36] as ThemeScale<\n number,\n TextVariants\n>;\n\n[\n fontSizes.micro,\n fontSizes.tiny,\n fontSizes.extraSmall,\n fontSizes.small,\n fontSizes.paragraph,\n fontSizes.body,\n fontSizes.large,\n fontSizes.h5,\n fontSizes.h4,\n fontSizes.h3,\n fontSizes.h2,\n fontSizes.h1,\n] = fontSizes;\nfontSizes.largeLineHeight = fontSizes.large;\nfontSizes.bodyLineHeight = fontSizes.body;\nfontSizes.paragraphLineHeight = fontSizes.paragraph;\nfontSizes.subtitle = fontSizes.extraSmall;\nfontSizes.h1Inter = fontSizes.h1;\nfontSizes.h2Inter = fontSizes.h2;\nfontSizes.h3Inter = fontSizes.h3;\nfontSizes.h4Inter = fontSizes.h4;\nfontSizes.h5Inter = fontSizes.h5;\n\nconst fontWeights = {\n extraLight: \"100\",\n light: \"300\",\n regular: \"400\",\n medium: \"500\",\n semiBold: \"600\",\n bold: \"700\",\n extraBold: \"800\",\n};\n\nexport const radii = [0, 4, 8, 12, 16, 20];\nexport const shadows = [\"0 4px 8px 0 rgba(0, 0, 0, 0.03)\"];\nexport const zIndexes = [-1, 0, 1, 9, 10, 90, 100, 900, 1000];\n\n// Those fonts are now defined in global.css, this is just a mapping for styled-system\nexport const fontFamilies = {\n Inter: {\n ExtraLight: {\n weight: 100,\n style: \"normal\",\n },\n Light: {\n weight: 300,\n style: \"normal\",\n },\n Regular: {\n weight: 400,\n style: \"normal\",\n },\n Medium: {\n weight: 500,\n style: \"normal\",\n },\n SemiBold: {\n weight: 600,\n style: \"normal\",\n },\n Bold: {\n weight: 700,\n style: \"normal\",\n },\n ExtraBold: {\n weight: 800,\n style: \"normal\",\n },\n },\n Alpha: {\n Medium: {\n weight: 500,\n style: \"normal\",\n },\n },\n};\n\nconst animationDuration = \"0.33s\";\nconst easings = {\n outQuadratic: \"cubic-bezier(0.25, 0.46, 0.45, 0.94)\",\n};\n\nconst transition = (\n properties = [\"all\"],\n duration = animationDuration,\n easing = easings.outQuadratic,\n) => css`\n transition-property: ${properties.join(\",\")};\n transition-duration: ${duration};\n transition-timing-function: ${easing};\n`;\n\nconst fadeIn = keyframes`\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n `;\nconst fadeOut = keyframes`\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n `;\nconst fadeInGrowX = keyframes`\n 0% {\n opacity: 0;\n transform: scaleX(0);\n }\n 100% {\n opacity: 1;\n transform: scaleX(1);\n }\n`;\nconst fadeInUp = keyframes`\n 0% {\n opacity: 0;\n transform: translateY(66%);\n }\n 100% {\n opacity: 1;\n transform: translateY(0%);\n }\n `;\nconst animations = {\n fadeIn: () => css`\n ${fadeIn} ${animationDuration} ${easings.outQuadratic} forwards\n `,\n fadeOut: () => css`\n ${fadeOut} ${animationDuration} ${easings.outQuadratic} forwards\n `,\n fadeInGrowX: () => css`\n ${fadeInGrowX} 0.6s ${easings.outQuadratic} forwards\n `,\n fadeInUp: () => css`\n ${fadeInUp} ${animationDuration} ${easings.outQuadratic} forwards\n `,\n};\nconst overflow = {\n x: css`\n overflow-y: hidden;\n overflow-x: scroll;\n will-change: transform;\n &:hover {\n --track-color: ${p => p.theme.colors.neutral.c30};\n }\n `,\n y: css`\n overflow-x: hidden;\n overflow-y: scroll;\n will-change: transform;\n &:hover {\n --track-color: ${p => p.theme.colors.neutral.c30};\n }\n `,\n yAuto: css`\n overflow-x: hidden;\n overflow-y: auto;\n will-change: transform;\n &:hover {\n --track-color: ${p => p.theme.colors.neutral.c30};\n }\n `,\n xy: css`\n overflow: scroll;\n will-change: transform;\n &:hover {\n --track-color: ${p => p.theme.colors.neutral.c30};\n }\n `,\n trackSize: 12,\n};\n\ninterface DefaultTheme {\n theme: \"dark\" | \"light\";\n animations: typeof animations;\n transition: typeof transition;\n overflow: typeof overflow;\n sizes: {\n topBarHeight: number;\n sideBarWidth: number;\n drawer: {\n side: {\n big: {\n width: number;\n };\n small: {\n width: number;\n };\n };\n popin: {\n min: {\n height: number;\n width: number;\n };\n max: {\n height: number;\n width: number;\n };\n };\n };\n };\n radii: number[];\n fontFamilies: Record<string, Record<string, Font>>;\n fontSizes: number[];\n space: number[];\n shadows: string[];\n colors: ColorPalette;\n fontWeights: Record<string, string>;\n breakpoints: Record<screensBreakpoints, string>;\n zIndexes: number[];\n}\n\nconst theme: DefaultTheme = {\n theme: \"light\",\n sizes: {\n drawer: {\n side: {\n big: {\n width: 580,\n },\n small: {\n width: 420,\n },\n },\n popin: {\n min: {\n height: 158,\n width: 462,\n },\n max: {\n height: 522,\n width: 622,\n },\n },\n },\n topBarHeight: 58,\n sideBarWidth: 230,\n },\n radii,\n fontFamilies,\n fontSizes,\n fontWeights,\n space,\n shadows,\n colors: palettes.light,\n animations,\n overflow,\n transition,\n zIndexes,\n breakpoints,\n};\n\nexport default theme;\nexport type Theme = DefaultTheme;\n","// getDefaultExport function for compatibility with non-ESM modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import React, { useRef } from \"react\";\nimport Tippy, { TippyProps } from \"@tippyjs/react\";\nimport Text from \"../../asorted/Text\";\n\ntype Placement =\n | \"top\"\n | \"top-start\"\n | \"top-end\"\n | \"right\"\n | \"right-start\"\n | \"right-end\"\n | \"bottom\"\n | \"bottom-start\"\n | \"bottom-end\"\n | \"left\"\n | \"left-start\"\n | \"left-end\"\n | \"auto\"\n | \"auto-start\"\n | \"auto-end\";\n\n// Add more props later on if needed.\n// See https://atomiks.github.io/tippyjs/v6/all-props for the full list.\nexport interface Props extends TippyProps {\n /** The preferred placement of the tippy. */\n placement?: Placement;\n}\n\nexport default function Tooltip(props: Readonly<Props>): React.JSX.Element | null {\n const { content, placement = \"auto\", children, ...rest } = props;\n const triggerRef = useRef<HTMLSpanElement>(null);\n return (\n <>\n <span ref={triggerRef} style={{ display: \"inline-flex\" }}>\n {children}\n </span>\n <Tippy\n {...rest}\n reference={triggerRef as React.RefObject<Element>}\n placement={placement}\n content={\n <Text fontWeight=\"medium\" variant={\"paragraph\"} color=\"neutral.c00\">\n {content}\n </Text>\n }\n />\n </>\n );\n}\n"],"names":["React","baseStyled","compose","fontSize","fontWeight","textAlign","lineHeight","letterSpacing","system","fontFamily","textVariantStyle","uppercase","value","Text","variant","color","props","p","css","getFontSource","name","fontsPath","fontName","fontStyles","gaps","styled","flexbox","space","position","layout","overflow","border","baseStyles","proxyStyled","Proxy","target","thisArg","argumentsList","property","Color","fontFamilies","rgba","c","a","darken","lighten","mix","b","ff","v","font","type","style","weight","fallback","ensureContrast","color1","color2","colorL1","colorL2","lRatio","prop","keyframes","palettes","breakpoints","fontSizes","fontWeights","radii","shadows","zIndexes","animationDuration","easings","transition","properties","duration","easing","fadeIn","fadeOut","fadeInGrowX","fadeInUp","animations","theme","useRef","Tippy","Tooltip","content","placement","children","rest","triggerRef"],"mappings":";;;;;;;;;;;;;;AAA0B;AACiC;AASpC;AACoC;AAEf;AAE5C,MAAMW,YAAYH,yCAAMA,CAAC;IACvB,WAAW;QACT,UAAU;QACV,WAAWI,CAAAA,QAAUA,QAAQ,cAAc;IAC7C;AACF;AA6BA,MAAMC,OAAOZ,8CAAqB,CAChC,CAAC,EAAEa,UAAU,MAAM,EAAEX,QAAQ,EAAEY,KAAK,EAAE,GAAM;QAC1C,UAAUZ,WAAWA,WAAWW;QAChC,OAAOC,SAAS;IAClB,GACD,CAAC;;eAEa,EAAEC,CAAAA,QAASA,MAAM,UAAU,IAAI,SAAS;EACrD,EAAE,CAACC,IAAiBP,yCAAgB,CAACO,EAAE,OAAO,IAAI,OAAO,CAAC;EAC1D,EAAEf,0CAAOA,CACPS,WACAL,yCAAUA,EACVG,qDAAUA,EACVN,uCAAQA,EACRE,wCAASA,EACTD,yCAAUA,EACVG,4CAAaA,EACbC,yCAAMA,CAAC;IACL,cAAc;AAChB,IACA;EACF,EAAES,CAAAA,IAAMA,EAAE,aAAa,GAAG,CAAC,gBAAgB,EAAEA,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,GAAI;AACxE,CAAC;AAED,sDAAeJ,IAAIA,EAAC;;;;;;;;;;ACxEoB;AAGxC,MAAMM,gBAAgB,CAACC,OAAiB,CAACJ;QACvC,MAAMK,YAAYL,MAAM,SAAS,IAAI;QACrC,MAAMM,WAAYN,MAAM,YAAY,IAAIA,MAAM,YAAY,CAACI,SAAU,GAAGA,KAAK,MAAM,CAAC;QACpF,OAAO,CAAC,KAAK,EAAEC,UAAU,CAAC,EAAEC,SAAS,kBAAkB,CAAC;IAC1D;AAEO,MAAMC,aAAaL,0CAAG,CAAC;;;SAGrB,EAAEC,cAAc,yBAAyB;;;;;;;SAOzC,EAAEA,cAAc,oBAAoB;;;;;;;SAOpC,EAAEA,cAAc,iBAAiB;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a,OAAM;WACnDwE;;AAMb"}
@@ -880,7 +880,7 @@ function Tip({ type, label }) {
880
880
 
881
881
 
882
882
  },
883
- 7441(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
883
+ 5845(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
884
884
 
885
885
  // EXPORTS
886
886
  __webpack_require__.d(__webpack_exports__, {
@@ -890,8 +890,6 @@ __webpack_require__.d(__webpack_exports__, {
890
890
  // EXTERNAL MODULE: external "react"
891
891
  var external_react_ = __webpack_require__(2015);
892
892
  var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
893
- ;// CONCATENATED MODULE: external "react-is"
894
- const external_react_is_namespaceObject = require("react-is");
895
893
  ;// CONCATENATED MODULE: external "@tippyjs/react"
896
894
  const react_namespaceObject = require("@tippyjs/react");
897
895
  var react_default = /*#__PURE__*/__webpack_require__.n(react_namespaceObject);
@@ -901,44 +899,23 @@ var Text = __webpack_require__(348);
901
899
 
902
900
 
903
901
 
904
-
905
- // Tippyjs need the ref to be forwarded to the DOM element wrapping the children.
906
- // This component has been created to add a wrapping span and use its ref when needed.
907
- // See: https://github.com/atomiks/tippyjs-react#component-children
908
- const Wrapper = /*#__PURE__*/ (0,external_react_.forwardRef)((props, ref)=>{
909
- const childrenCount = external_react_default().Children.count(props.children);
910
- try {
911
- const child = external_react_default().Children.only(props.children);
912
- const isValidElement = /*#__PURE__*/ external_react_default().isValidElement(child);
913
- const isForwardingRef = (0,external_react_is_namespaceObject.isForwardRef)(child);
914
- const isDomElement = isValidElement && typeof child.type === "string";
915
- if (isForwardingRef || isDomElement) {
916
- return /*#__PURE__*/ external_react_default().cloneElement(child, {
917
- ref
918
- });
919
- } else {
920
- return /*#__PURE__*/ external_react_default().createElement("span", {
921
- ref: ref
922
- }, props.children);
923
- }
924
- } catch {
925
- return childrenCount < 1 ? null : /*#__PURE__*/ external_react_default().createElement("span", {
926
- ref: ref
927
- }, props.children);
928
- }
929
- });
930
902
  function Tooltip(props) {
931
903
  const { content, placement = "auto", children, ...rest } = props;
932
- return /*#__PURE__*/ external_react_default().createElement((react_default()), {
904
+ const triggerRef = (0,external_react_.useRef)(null);
905
+ return /*#__PURE__*/ external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/ external_react_default().createElement("span", {
906
+ ref: triggerRef,
907
+ style: {
908
+ display: "inline-flex"
909
+ }
910
+ }, children), /*#__PURE__*/ external_react_default().createElement((react_default()), {
933
911
  ...rest,
912
+ reference: triggerRef,
934
913
  placement: placement,
935
914
  content: /*#__PURE__*/ external_react_default().createElement(Text["default"], {
936
915
  fontWeight: "medium",
937
916
  variant: "paragraph",
938
917
  color: "neutral.c00"
939
918
  }, content)
940
- }, /*#__PURE__*/ external_react_default().createElement(Wrapper, {
941
- children: children
942
919
  }));
943
920
  }
944
921
 
@@ -1429,7 +1406,7 @@ __webpack_require__.d(__webpack_exports__, {
1429
1406
  /* import */ var _Log__rspack_import_2 = __webpack_require__(7518);
1430
1407
  /* import */ var _Notification__rspack_import_3 = __webpack_require__(3341);
1431
1408
  /* import */ var _Notification_Badge__rspack_import_4 = __webpack_require__(3424);
1432
- /* import */ var _Tooltip__rspack_import_5 = __webpack_require__(7441);
1409
+ /* import */ var _Tooltip__rspack_import_5 = __webpack_require__(5845);
1433
1410
  /* import */ var _Tip__rspack_import_6 = __webpack_require__(5083);
1434
1411
  /* import */ var _StatusNotification__rspack_import_7 = __webpack_require__(1931);
1435
1412