@ledgerhq/lumen-ui-rnative 0.0.80 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/.storybook/docs/style-system/lx/Typographies/Typographies.mdx +34 -0
  2. package/.storybook/docs/style-system/lx/Typographies/TypographyTable.tsx +47 -0
  3. package/ai-rules/RULES.md +9 -17
  4. package/dist/package.json +1 -1
  5. package/dist/src/lib/Components/TabBar/TabBar.d.ts +1 -1
  6. package/dist/src/lib/Components/TabBar/TabBar.d.ts.map +1 -1
  7. package/dist/src/lib/Components/TabBar/TabBar.js +2 -2
  8. package/dist/src/lib/Components/TabBar/types.d.ts +2 -1
  9. package/dist/src/lib/Components/TabBar/types.d.ts.map +1 -1
  10. package/dist/src/styles/theme/createStylesheetTheme.d.ts +0 -5
  11. package/dist/src/styles/theme/createStylesheetTheme.d.ts.map +1 -1
  12. package/dist/src/styles/theme/createStylesheetTheme.js +5 -12
  13. package/dist/src/styles/theme/index.d.ts +1 -1
  14. package/dist/src/styles/theme/index.d.ts.map +1 -1
  15. package/dist/src/styles/theme/index.js +1 -1
  16. package/dist/src/styles/theme/resolvers/resolveFontWeights.d.ts +14 -0
  17. package/dist/src/styles/theme/resolvers/resolveFontWeights.d.ts.map +1 -0
  18. package/dist/src/styles/theme/resolvers/resolveFontWeights.js +30 -0
  19. package/dist/src/styles/theme/resolvers/resolveNegativeSpacing.d.ts +4 -0
  20. package/dist/src/styles/theme/resolvers/resolveNegativeSpacing.d.ts.map +1 -0
  21. package/dist/src/styles/theme/resolvers/resolveNegativeSpacing.js +6 -0
  22. package/package.json +1 -1
  23. package/src/lib/Components/TabBar/TabBar.tsx +4 -1
  24. package/src/lib/Components/TabBar/types.ts +2 -1
  25. package/src/styles/theme/createStylesheetTheme.test.ts +4 -21
  26. package/src/styles/theme/createStylesheetTheme.ts +5 -21
  27. package/src/styles/theme/index.ts +1 -4
  28. package/src/styles/theme/resolvers/resolveFontWeights.test.ts +71 -0
  29. package/src/styles/theme/resolvers/resolveFontWeights.ts +40 -0
  30. package/src/styles/theme/resolvers/resolveNegativeSpacing.test.ts +29 -0
  31. package/src/styles/theme/resolvers/resolveNegativeSpacing.ts +16 -0
  32. package/dist/src/lib/StyleSystem/index.d.ts +0 -2
  33. package/dist/src/lib/StyleSystem/index.d.ts.map +0 -1
  34. package/dist/src/lib/StyleSystem/index.js +0 -1
  35. package/dist/src/lib/StyleSystem/lx/BorderRadius/BorderRadiusTable.d.ts +0 -2
  36. package/dist/src/lib/StyleSystem/lx/BorderRadius/BorderRadiusTable.d.ts.map +0 -1
  37. package/dist/src/lib/StyleSystem/lx/BorderRadius/BorderRadiusTable.js +0 -17
  38. package/dist/src/lib/StyleSystem/lx/BorderRadius/index.d.ts +0 -2
  39. package/dist/src/lib/StyleSystem/lx/BorderRadius/index.d.ts.map +0 -1
  40. package/dist/src/lib/StyleSystem/lx/BorderRadius/index.js +0 -1
  41. package/dist/src/lib/StyleSystem/lx/BorderWidth/BorderWidthTable.d.ts +0 -2
  42. package/dist/src/lib/StyleSystem/lx/BorderWidth/BorderWidthTable.d.ts.map +0 -1
  43. package/dist/src/lib/StyleSystem/lx/BorderWidth/BorderWidthTable.js +0 -19
  44. package/dist/src/lib/StyleSystem/lx/BorderWidth/index.d.ts +0 -2
  45. package/dist/src/lib/StyleSystem/lx/BorderWidth/index.d.ts.map +0 -1
  46. package/dist/src/lib/StyleSystem/lx/BorderWidth/index.js +0 -1
  47. package/dist/src/lib/StyleSystem/lx/Colors/ColorTable.d.ts +0 -6
  48. package/dist/src/lib/StyleSystem/lx/Colors/ColorTable.d.ts.map +0 -1
  49. package/dist/src/lib/StyleSystem/lx/Colors/ColorTable.js +0 -65
  50. package/dist/src/lib/StyleSystem/lx/Colors/index.d.ts +0 -2
  51. package/dist/src/lib/StyleSystem/lx/Colors/index.d.ts.map +0 -1
  52. package/dist/src/lib/StyleSystem/lx/Colors/index.js +0 -1
  53. package/dist/src/lib/StyleSystem/lx/Shadows/ShadowTable.d.ts +0 -2
  54. package/dist/src/lib/StyleSystem/lx/Shadows/ShadowTable.d.ts.map +0 -1
  55. package/dist/src/lib/StyleSystem/lx/Shadows/ShadowTable.js +0 -29
  56. package/dist/src/lib/StyleSystem/lx/Shadows/index.d.ts +0 -2
  57. package/dist/src/lib/StyleSystem/lx/Shadows/index.d.ts.map +0 -1
  58. package/dist/src/lib/StyleSystem/lx/Shadows/index.js +0 -1
  59. package/dist/src/lib/StyleSystem/lx/Sizes/SizeTable.d.ts +0 -2
  60. package/dist/src/lib/StyleSystem/lx/Sizes/SizeTable.d.ts.map +0 -1
  61. package/dist/src/lib/StyleSystem/lx/Sizes/SizeTable.js +0 -24
  62. package/dist/src/lib/StyleSystem/lx/Sizes/index.d.ts +0 -2
  63. package/dist/src/lib/StyleSystem/lx/Sizes/index.d.ts.map +0 -1
  64. package/dist/src/lib/StyleSystem/lx/Sizes/index.js +0 -1
  65. package/dist/src/lib/StyleSystem/lx/Spacings/SpacingTable.d.ts +0 -2
  66. package/dist/src/lib/StyleSystem/lx/Spacings/SpacingTable.d.ts.map +0 -1
  67. package/dist/src/lib/StyleSystem/lx/Spacings/SpacingTable.js +0 -17
  68. package/dist/src/lib/StyleSystem/lx/Spacings/index.d.ts +0 -2
  69. package/dist/src/lib/StyleSystem/lx/Spacings/index.d.ts.map +0 -1
  70. package/dist/src/lib/StyleSystem/lx/Spacings/index.js +0 -1
  71. package/dist/src/lib/StyleSystem/lx/index.d.ts +0 -9549
  72. package/dist/src/lib/StyleSystem/lx/index.d.ts.map +0 -1
  73. package/dist/src/lib/StyleSystem/lx/index.js +0 -17
  74. package/src/lib/StyleSystem/index.ts +0 -1
  75. /package/{src/lib/StyleSystem → .storybook/docs/style-system}/lx/BorderRadius/BorderRadius.mdx +0 -0
  76. /package/{src/lib/StyleSystem → .storybook/docs/style-system}/lx/BorderRadius/BorderRadiusTable.tsx +0 -0
  77. /package/{src/lib/StyleSystem → .storybook/docs/style-system}/lx/BorderRadius/index.ts +0 -0
  78. /package/{src/lib/StyleSystem → .storybook/docs/style-system}/lx/BorderWidth/BorderWidth.mdx +0 -0
  79. /package/{src/lib/StyleSystem → .storybook/docs/style-system}/lx/BorderWidth/BorderWidthTable.tsx +0 -0
  80. /package/{src/lib/StyleSystem → .storybook/docs/style-system}/lx/BorderWidth/index.ts +0 -0
  81. /package/{src/lib/StyleSystem → .storybook/docs/style-system}/lx/Colors/ColorTable.tsx +0 -0
  82. /package/{src/lib/StyleSystem → .storybook/docs/style-system}/lx/Colors/Colors.mdx +0 -0
  83. /package/{src/lib/StyleSystem → .storybook/docs/style-system}/lx/Colors/index.ts +0 -0
  84. /package/{src/lib/StyleSystem → .storybook/docs/style-system}/lx/Shadows/ShadowTable.tsx +0 -0
  85. /package/{src/lib/StyleSystem → .storybook/docs/style-system}/lx/Shadows/Shadows.mdx +0 -0
  86. /package/{src/lib/StyleSystem → .storybook/docs/style-system}/lx/Shadows/index.ts +0 -0
  87. /package/{src/lib/StyleSystem → .storybook/docs/style-system}/lx/Sizes/SizeTable.tsx +0 -0
  88. /package/{src/lib/StyleSystem → .storybook/docs/style-system}/lx/Sizes/Sizes.mdx +0 -0
  89. /package/{src/lib/StyleSystem → .storybook/docs/style-system}/lx/Sizes/index.ts +0 -0
  90. /package/{src/lib/StyleSystem → .storybook/docs/style-system}/lx/Spacings/SpacingTable.tsx +0 -0
  91. /package/{src/lib/StyleSystem → .storybook/docs/style-system}/lx/Spacings/Spacings.mdx +0 -0
  92. /package/{src/lib/StyleSystem → .storybook/docs/style-system}/lx/Spacings/index.ts +0 -0
  93. /package/{src/lib/StyleSystem → .storybook/docs/style-system}/lx/index.ts +0 -0
@@ -1,17 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { View } from 'react-native';
3
- import { resolveTheme, getSampleAccentColor } from '../';
4
- export const BorderRadiusTable = () => {
5
- const borderRadius = resolveTheme().borderRadius;
6
- const cells = Object.entries(borderRadius);
7
- const accentColor = getSampleAccentColor();
8
- const formatCSSToken = (key) => {
9
- return `--border-radius-${key}`;
10
- };
11
- return (_jsxs("table", { style: { width: '100%' }, children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { children: "Name" }), _jsx("th", { children: "Theme object" }), _jsx("th", { children: "Value" }), _jsx("th", { children: "Sample" })] }) }), _jsx("tbody", { children: cells.map(([key, value], i) => (_jsxs("tr", { children: [_jsx("td", { children: _jsx("code", { children: formatCSSToken(key) }) }), _jsx("td", { children: _jsx("code", { children: `theme.borderRadius.${key}` }) }), _jsx("td", { children: _jsx("code", { children: `${value}px` }) }), _jsx("td", { children: _jsx(View, { style: { paddingVertical: 12 }, children: _jsx(View, { style: {
12
- width: 64,
13
- height: 64,
14
- backgroundColor: accentColor,
15
- borderRadius: value,
16
- } }) }) })] }, i))) })] }));
17
- };
@@ -1,2 +0,0 @@
1
- export { BorderRadiusTable } from './BorderRadiusTable';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/StyleSystem/lx/BorderRadius/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1 +0,0 @@
1
- export { BorderRadiusTable } from './BorderRadiusTable';
@@ -1,2 +0,0 @@
1
- export declare const BorderWidthTable: () => import("react/jsx-runtime").JSX.Element;
2
- //# sourceMappingURL=BorderWidthTable.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BorderWidthTable.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/StyleSystem/lx/BorderWidth/BorderWidthTable.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,+CAgD5B,CAAC"}
@@ -1,19 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { View } from 'react-native';
3
- import { resolveTheme, getSampleAccentColor } from '../';
4
- export const BorderWidthTable = () => {
5
- const borderWidth = resolveTheme().borderWidth;
6
- const cells = Object.entries(borderWidth);
7
- const accentColor = getSampleAccentColor();
8
- const formatCSSToken = (key) => {
9
- return `--stroke-${key}`;
10
- };
11
- return (_jsxs("table", { style: { width: '100%' }, children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { children: "Name" }), _jsx("th", { children: "Theme object" }), _jsx("th", { children: "Value" }), _jsx("th", { children: "Sample" })] }) }), _jsx("tbody", { children: cells.map(([key, value], i) => (_jsxs("tr", { children: [_jsx("td", { children: _jsx("code", { children: formatCSSToken(key) }) }), _jsx("td", { children: _jsx("code", { children: `theme.borderWidth.${key}` }) }), _jsx("td", { children: _jsx("code", { children: `${value}px` }) }), _jsx("td", { children: _jsx(View, { style: {
12
- width: 36,
13
- height: 36,
14
- borderWidth: value,
15
- borderColor: accentColor,
16
- borderRadius: 8,
17
- backgroundColor: 'transparent',
18
- } }) })] }, i))) })] }));
19
- };
@@ -1,2 +0,0 @@
1
- export { BorderWidthTable } from './BorderWidthTable';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/StyleSystem/lx/BorderWidth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1 +0,0 @@
1
- export { BorderWidthTable } from './BorderWidthTable';
@@ -1,6 +0,0 @@
1
- type ColorTableProps = {
2
- category: 'bg' | 'text' | 'border' | 'crypto' | 'discover';
3
- };
4
- export declare const ColorTable: ({ category }: ColorTableProps) => import("react/jsx-runtime").JSX.Element;
5
- export {};
6
- //# sourceMappingURL=ColorTable.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ColorTable.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/StyleSystem/lx/Colors/ColorTable.tsx"],"names":[],"mappings":"AAGA,KAAK,eAAe,GAAG;IACrB,QAAQ,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;CAC5D,CAAC;AAEF,eAAO,MAAM,UAAU,iBAAkB,eAAe,4CA8GvD,CAAC"}
@@ -1,65 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Text, View } from 'react-native';
3
- import { resolveTheme } from '../';
4
- export const ColorTable = ({ category }) => {
5
- const colors = resolveTheme().colors[category];
6
- const cells = Object.entries(colors).filter(([, v]) => {
7
- return !(category === 'crypto' && v.endsWith('00')); // filter out "[crypto] 0" tokens
8
- });
9
- const renderSample = (value) => {
10
- if (category === 'text') {
11
- return (_jsx(Text, { style: {
12
- color: value,
13
- fontWeight: 'bold',
14
- paddingHorizontal: 4,
15
- ...(isCloseToWhite(value) && {
16
- backgroundColor: 'black',
17
- borderRadius: 6,
18
- }),
19
- }, children: "Aa" }));
20
- }
21
- if (category === 'border') {
22
- return (_jsx(View, { style: {
23
- width: 24,
24
- height: 24,
25
- borderWidth: 2,
26
- borderColor: value,
27
- borderRadius: 8,
28
- } }));
29
- }
30
- return (_jsx(View, { style: {
31
- backgroundColor: value,
32
- width: 24,
33
- height: 24,
34
- borderRadius: 8,
35
- ...(isCloseToWhite(value) && {
36
- borderWidth: 1,
37
- borderColor: 'lightgrey',
38
- }),
39
- } }));
40
- };
41
- /**
42
- * Compute the background color of the sample cell based on how close
43
- * the sample is to white.
44
- * @param hex
45
- */
46
- const isCloseToWhite = (hex, threshold = 230) => {
47
- // treat full transparency as white
48
- if (parseInt(hex.slice(7, 9)) === 0) {
49
- return true;
50
- }
51
- const r = parseInt(hex.slice(1, 3), 16);
52
- const g = parseInt(hex.slice(3, 5), 16);
53
- const b = parseInt(hex.slice(5, 7), 16);
54
- return (r + g + b) / 3 >= threshold;
55
- };
56
- const formatCSSToken = (key, category) => {
57
- const prefix = category === 'bg'
58
- ? 'background'
59
- : category === 'text'
60
- ? 'text'
61
- : category;
62
- return `--color-${prefix}-${key.replace(/([A-Z])/g, '-$1').toLowerCase()}`;
63
- };
64
- return (_jsxs("table", { style: { width: '100%' }, children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { children: "Name" }), _jsx("th", { children: "Theme object" }), _jsx("th", { children: "Hex" }), _jsx("th", { children: "Sample" })] }) }), _jsx("tbody", { children: cells.map(([key, value], i) => (_jsxs("tr", { children: [_jsx("td", { children: _jsx("code", { children: formatCSSToken(key, category) }) }), _jsx("td", { children: _jsx("code", { children: `theme.colors.${category}.${key}` }) }), _jsx("td", { children: _jsx("code", { children: value }) }), _jsx("td", { children: renderSample(value) })] }, i))) })] }));
65
- };
@@ -1,2 +0,0 @@
1
- export { ColorTable } from './ColorTable';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/StyleSystem/lx/Colors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
@@ -1 +0,0 @@
1
- export { ColorTable } from './ColorTable';
@@ -1,2 +0,0 @@
1
- export declare const ShadowTable: () => import("react/jsx-runtime").JSX.Element;
2
- //# sourceMappingURL=ShadowTable.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ShadowTable.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/StyleSystem/lx/Shadows/ShadowTable.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,+CAiEvB,CAAC"}
@@ -1,29 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { View } from 'react-native';
3
- import { resolveTheme } from '../';
4
- export const ShadowTable = () => {
5
- const shadows = resolveTheme().shadows;
6
- const cells = Object.entries(shadows);
7
- const formatShadow = (shadowArray) => {
8
- return shadowArray
9
- .map((shadow) => `${shadow.offsetX}px ${shadow.offsetY}px ${shadow.blurRadius}px ${shadow.spreadDistance}px ${shadow.color}`)
10
- .join(', ');
11
- };
12
- const formatCSSToken = (key) => {
13
- return `--shadow-${key}`;
14
- };
15
- return (_jsxs("table", { style: { width: '100%' }, children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { children: "Name" }), _jsx("th", { children: "Theme object" }), _jsx("th", { children: "Value" }), _jsx("th", { children: "Sample" })] }) }), _jsx("tbody", { children: cells.map(([key, value], i) => (_jsxs("tr", { children: [_jsx("td", { children: _jsx("code", { children: formatCSSToken(key) }) }), _jsx("td", { children: _jsx("code", { children: `theme.shadows.${key}` }) }), _jsx("td", { children: _jsx("code", { style: { fontSize: '11px' }, children: formatShadow(value) }) }), _jsx("td", { children: _jsx(View, { style: { paddingVertical: 12 }, children: _jsx(View, { style: {
16
- width: 64,
17
- height: 64,
18
- backgroundColor: '#fff',
19
- borderRadius: 8,
20
- shadowColor: value[0].color,
21
- shadowOffset: {
22
- width: value[0].offsetX,
23
- height: value[0].offsetY,
24
- },
25
- shadowOpacity: 1,
26
- shadowRadius: value[0].blurRadius,
27
- elevation: 8,
28
- } }) }) })] }, i))) })] }));
29
- };
@@ -1,2 +0,0 @@
1
- export { ShadowTable } from './ShadowTable';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/StyleSystem/lx/Shadows/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
@@ -1 +0,0 @@
1
- export { ShadowTable } from './ShadowTable';
@@ -1,2 +0,0 @@
1
- export declare const SizeTable: () => import("react/jsx-runtime").JSX.Element;
2
- //# sourceMappingURL=SizeTable.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SizeTable.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/StyleSystem/lx/Sizes/SizeTable.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS,+CA0DrB,CAAC"}
@@ -1,24 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Text, View } from 'react-native';
3
- import { resolveTheme, getSampleAccentColor } from '../';
4
- export const SizeTable = () => {
5
- const sizes = resolveTheme().sizes;
6
- const cells = Object.entries(sizes);
7
- const accentColor = getSampleAccentColor();
8
- const formatCSSToken = (key) => {
9
- return `--size-${key.replace('s', '')}`;
10
- };
11
- const renderSample = (value) => {
12
- const numericValue = value === '100%' ? 100 : Number(value);
13
- if (numericValue >= 100) {
14
- return (_jsx(Text, { style: { fontSize: 10, color: 'grey' }, children: "Too large to show!" }));
15
- }
16
- return (_jsx(View, { style: {
17
- width: numericValue,
18
- height: numericValue,
19
- backgroundColor: accentColor,
20
- borderRadius: 4,
21
- } }));
22
- };
23
- return (_jsxs("table", { style: { width: '100%' }, children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { children: "Name" }), _jsx("th", { children: "Theme object" }), _jsx("th", { children: "Value" }), _jsx("th", { children: "Sample" })] }) }), _jsx("tbody", { children: cells.map(([key, value], i) => (_jsxs("tr", { children: [_jsx("td", { children: _jsx("code", { children: formatCSSToken(key) }) }), _jsx("td", { children: _jsx("code", { children: `theme.sizes.${key}` }) }), _jsx("td", { children: _jsx("code", { children: key === 'full' ? '100%' : `${value}px` }) }), _jsx("td", { children: renderSample(value) })] }, i))) })] }));
24
- };
@@ -1,2 +0,0 @@
1
- export { SizeTable } from './SizeTable';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/StyleSystem/lx/Sizes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -1 +0,0 @@
1
- export { SizeTable } from './SizeTable';
@@ -1,2 +0,0 @@
1
- export declare const SpacingTable: () => import("react/jsx-runtime").JSX.Element;
2
- //# sourceMappingURL=SpacingTable.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SpacingTable.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/StyleSystem/lx/Spacings/SpacingTable.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,+CA8CxB,CAAC"}
@@ -1,17 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { View } from 'react-native';
3
- import { resolveTheme, getSampleAccentColor } from '../';
4
- export const SpacingTable = () => {
5
- const spacings = resolveTheme().spacings;
6
- const cells = Object.entries(spacings);
7
- const accentColor = getSampleAccentColor();
8
- const formatCSSToken = (key) => {
9
- return `--spacing-${key.replace('s', '')}`;
10
- };
11
- return (_jsxs("table", { style: { width: '100%' }, children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { children: "Name" }), _jsx("th", { children: "Theme object" }), _jsx("th", { children: "Value" }), _jsx("th", { children: "Sample" })] }) }), _jsx("tbody", { children: cells.map(([key, value], i) => (_jsxs("tr", { children: [_jsx("td", { children: _jsx("code", { children: formatCSSToken(key) }) }), _jsx("td", { children: _jsx("code", { children: `theme.spacings.${key}` }) }), _jsx("td", { children: _jsx("code", { children: `${value}px` }) }), _jsx("td", { children: _jsx(View, { style: {
12
- width: value,
13
- height: 16,
14
- backgroundColor: accentColor,
15
- borderRadius: 2,
16
- } }) })] }, i))) })] }));
17
- };
@@ -1,2 +0,0 @@
1
- export { SpacingTable } from './SpacingTable';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/StyleSystem/lx/Spacings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1 +0,0 @@
1
- export { SpacingTable } from './SpacingTable';