@ledgerhq/react-ui 0.14.14-next.0 → 0.14.15-new-wc-test.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.
- package/lib/cjs/components/asorted/Icon/CryptoIcons.stories.js +2 -4
- package/lib/cjs/components/asorted/Icon/CryptoIcons.stories.js.map +2 -2
- package/lib/cjs/components/asorted/Icon/Icons.stories.js +2 -48
- package/lib/cjs/components/asorted/Icon/Icons.stories.js.map +2 -2
- package/lib/cjs/components/index.js +0 -1
- package/lib/cjs/components/index.js.map +2 -2
- package/lib/cjs/components/layout/Carousel/Carousel.stories.js +78 -0
- package/lib/cjs/components/layout/Carousel/Carousel.stories.js.map +7 -0
- package/lib/cjs/components/layout/Carousel/Footer/Pagination/bullets.js +76 -0
- package/lib/cjs/components/layout/Carousel/Footer/Pagination/bullets.js.map +7 -0
- package/lib/cjs/components/{cards/Carousel/Slide.js → layout/Carousel/Footer/Pagination/index.js} +13 -20
- package/lib/cjs/components/layout/Carousel/Footer/Pagination/index.js.map +7 -0
- package/lib/cjs/components/layout/Carousel/Footer/Pagination/types.js +31 -0
- package/lib/cjs/components/layout/Carousel/Footer/Pagination/types.js.map +7 -0
- package/lib/cjs/components/layout/Carousel/Footer/Pagination/utils.js +38 -0
- package/lib/cjs/components/layout/Carousel/Footer/Pagination/utils.js.map +7 -0
- package/lib/cjs/components/{cards → layout/Carousel/Footer}/index.js +16 -5
- package/lib/cjs/components/layout/Carousel/Footer/index.js.map +7 -0
- package/lib/cjs/components/layout/Carousel/Footer/variantContentCard.js +69 -0
- package/lib/cjs/components/layout/Carousel/Footer/variantContentCard.js.map +7 -0
- package/lib/cjs/components/layout/Carousel/Footer/variantDefault.js +47 -0
- package/lib/cjs/components/layout/Carousel/Footer/variantDefault.js.map +7 -0
- package/lib/cjs/components/layout/Carousel/index.js +76 -0
- package/lib/cjs/components/layout/Carousel/index.js.map +7 -0
- package/lib/cjs/components/layout/Carousel/types.js +17 -0
- package/lib/cjs/components/layout/Carousel/types.js.map +7 -0
- package/lib/cjs/components/layout/index.js +2 -0
- package/lib/cjs/components/layout/index.js.map +2 -2
- package/lib/components/index.d.ts +0 -1
- package/lib/components/index.js +0 -1
- package/lib/components/index.js.map +1 -1
- package/lib/components/layout/Carousel/Footer/Pagination/bullets.d.ts +6 -0
- package/lib/components/layout/Carousel/Footer/Pagination/bullets.js +25 -0
- package/lib/components/layout/Carousel/Footer/Pagination/bullets.js.map +1 -0
- package/lib/components/layout/Carousel/Footer/Pagination/index.d.ts +4 -0
- package/lib/components/layout/Carousel/Footer/Pagination/index.js +13 -0
- package/lib/components/layout/Carousel/Footer/Pagination/index.js.map +1 -0
- package/lib/components/layout/Carousel/Footer/Pagination/types.d.ts +6 -0
- package/lib/components/layout/Carousel/Footer/Pagination/types.js +8 -0
- package/lib/components/layout/Carousel/Footer/Pagination/types.js.map +1 -0
- package/lib/components/layout/Carousel/Footer/Pagination/utils.d.ts +5 -0
- package/lib/components/layout/Carousel/Footer/Pagination/utils.js +18 -0
- package/lib/components/layout/Carousel/Footer/Pagination/utils.js.map +1 -0
- package/lib/components/layout/Carousel/Footer/index.d.ts +4 -0
- package/lib/components/layout/Carousel/Footer/index.js +13 -0
- package/lib/components/layout/Carousel/Footer/index.js.map +1 -0
- package/lib/components/layout/Carousel/Footer/variantContentCard.d.ts +4 -0
- package/lib/components/layout/Carousel/Footer/variantContentCard.js +34 -0
- package/lib/components/layout/Carousel/Footer/variantContentCard.js.map +1 -0
- package/lib/components/layout/Carousel/Footer/variantDefault.d.ts +4 -0
- package/lib/components/layout/Carousel/Footer/variantDefault.js +15 -0
- package/lib/components/layout/Carousel/Footer/variantDefault.js.map +1 -0
- package/lib/components/layout/Carousel/index.d.ts +7 -0
- package/lib/components/layout/Carousel/index.js +44 -0
- package/lib/components/layout/Carousel/index.js.map +1 -0
- package/lib/components/layout/Carousel/types.d.ts +14 -0
- package/lib/components/layout/Carousel/types.js +2 -0
- package/lib/components/layout/Carousel/types.js.map +1 -0
- package/lib/components/layout/index.d.ts +1 -0
- package/lib/components/layout/index.js +1 -0
- package/lib/components/layout/index.js.map +1 -1
- package/package.json +8 -3
- package/lib/cjs/components/cards/Carousel/Carousel.stories.js +0 -106
- package/lib/cjs/components/cards/Carousel/Carousel.stories.js.map +0 -7
- package/lib/cjs/components/cards/Carousel/Slide.js.map +0 -7
- package/lib/cjs/components/cards/Carousel/index.js +0 -187
- package/lib/cjs/components/cards/Carousel/index.js.map +0 -7
- package/lib/cjs/components/cards/index.js.map +0 -7
- package/lib/components/cards/Carousel/Slide.d.ts +0 -9
- package/lib/components/cards/Carousel/Slide.js +0 -22
- package/lib/components/cards/Carousel/Slide.js.map +0 -1
- package/lib/components/cards/Carousel/index.d.ts +0 -13
- package/lib/components/cards/Carousel/index.js +0 -144
- package/lib/components/cards/Carousel/index.js.map +0 -1
- package/lib/components/cards/index.d.ts +0 -1
- package/lib/components/cards/index.js +0 -2
- package/lib/components/cards/index.js.map +0 -1
|
@@ -96,11 +96,9 @@ const Story = {
|
|
|
96
96
|
name: {
|
|
97
97
|
type: "enum",
|
|
98
98
|
description: "[Only for single icon], Icon name",
|
|
99
|
+
options: Object.keys(cryptoIcons),
|
|
99
100
|
control: {
|
|
100
|
-
|
|
101
|
-
control: {
|
|
102
|
-
type: "select"
|
|
103
|
-
}
|
|
101
|
+
type: "select"
|
|
104
102
|
}
|
|
105
103
|
},
|
|
106
104
|
circleIcon: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/components/asorted/Icon/CryptoIcons.stories.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, { useState } from \"react\";\nimport styled from \"styled-components\";\nimport { Text, SearchInput, Flex, Grid, CryptoIcon } from \"../../..\";\nimport * as cryptoIcons from \"@ledgerhq/crypto-icons-ui/react\";\n\nconst description = `\n### A customizable crypto-icon component.\n\n### Props\n\n\\`\\`\\`tsx\ntype Props = {\n name: string;\n size?: number;\n color?: string;\n backgroundColor?: string; // overrides background color to ensure contrast with icon color\n circleIcon?: boolean; // if icon is in a circle or not\n tokenIcon?: string; // ref to the token icon to show as a sub icon\n disabled?: boolean;\n fallback?: JSX.Element; // fallback element if no icon found - defaults to an icon with first letter of icon name\n};\n\\`\\`\\`\n`;\n\ntype CryptoIconsProps = {\n name: keyof typeof cryptoIcons;\n size?: number;\n color?: string;\n circleIcon?: boolean;\n disabled?: boolean;\n tokenIcon?: string;\n};\n\nconst ScrollArea = styled(Grid)`\n flex: 1;\n height: auto;\n ${p => p.theme.overflow.y};\n`;\n\nconst Container = styled(Flex).attrs({\n flex: 1,\n flexDirection: \"column\",\n p: 4,\n})`\n overflow: hidden;\n height: calc(100vh - 4em);\n`;\n\nconst IconContainer = styled(Flex).attrs<{ active?: boolean }>({\n flexDirection: \"column\",\n justifyContent: \"flex-end\",\n alignItems: \"center\",\n p: 4,\n})<{ active?: boolean }>`\n ${p => (p.active ? `background-color: ${p.theme.colors.neutral.c20};` : ``)}\n border-radius: 4px;\n height: 100px;\n`;\n\nconst Bold = styled.b`\n color: ${p => p.theme.colors.primary.c80};\n`;\n\nconst Story = {\n title: \"Asorted/CryptoIcons\",\n argTypes: {\n size: {\n type: \"number\",\n description: \"Icon size for preview\",\n },\n color: {\n type: \"string\",\n description: \"Color\",\n control: { control: \"color\" },\n },\n name: {\n type: \"enum\",\n description: \"[Only for single icon], Icon name\",\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAgC;AAChC,+BAAmB;AACnB,eAA0D;AAC1D,kBAA6B;AAE7B,MAAM,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA4BpB,MAAM,iBAAa,yBAAAA,SAAO,aAAI;AAAA;AAAA;AAAA,IAG1B,OAAK,EAAE,MAAM,SAAS,CAAC;AAAA;AAG3B,MAAM,gBAAY,yBAAAA,SAAO,aAAI,EAAE,MAAM;AAAA,EACnC,MAAM;AAAA,EACN,eAAe;AAAA,EACf,GAAG;AACL,CAAC;AAAA;AAAA;AAAA;AAKD,MAAM,oBAAgB,yBAAAA,SAAO,aAAI,EAAE,MAA4B;AAAA,EAC7D,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,GAAG;AACL,CAAC;AAAA,IACG,OAAM,EAAE,SAAS,qBAAqB,EAAE,MAAM,OAAO,QAAQ,GAAG,MAAM,EAAG;AAAA;AAAA;AAAA;AAK7E,MAAM,OAAO,yBAAAA,QAAO;AAAA,WACT,OAAK,EAAE,MAAM,OAAO,QAAQ,GAAG;AAAA;AAG1C,MAAM,QAAQ;AAAA,EACZ,OAAO;AAAA,EACP,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS,EAAE,SAAS,QAAQ;AAAA,IAC9B;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS
|
|
4
|
+
"sourcesContent": ["import React, { useState } from \"react\";\nimport styled from \"styled-components\";\nimport { Text, SearchInput, Flex, Grid, CryptoIcon } from \"../../..\";\nimport * as cryptoIcons from \"@ledgerhq/crypto-icons-ui/react\";\n\nconst description = `\n### A customizable crypto-icon component.\n\n### Props\n\n\\`\\`\\`tsx\ntype Props = {\n name: string;\n size?: number;\n color?: string;\n backgroundColor?: string; // overrides background color to ensure contrast with icon color\n circleIcon?: boolean; // if icon is in a circle or not\n tokenIcon?: string; // ref to the token icon to show as a sub icon\n disabled?: boolean;\n fallback?: JSX.Element; // fallback element if no icon found - defaults to an icon with first letter of icon name\n};\n\\`\\`\\`\n`;\n\ntype CryptoIconsProps = {\n name: keyof typeof cryptoIcons;\n size?: number;\n color?: string;\n circleIcon?: boolean;\n disabled?: boolean;\n tokenIcon?: string;\n};\n\nconst ScrollArea = styled(Grid)`\n flex: 1;\n height: auto;\n ${p => p.theme.overflow.y};\n`;\n\nconst Container = styled(Flex).attrs({\n flex: 1,\n flexDirection: \"column\",\n p: 4,\n})`\n overflow: hidden;\n height: calc(100vh - 4em);\n`;\n\nconst IconContainer = styled(Flex).attrs<{ active?: boolean }>({\n flexDirection: \"column\",\n justifyContent: \"flex-end\",\n alignItems: \"center\",\n p: 4,\n})<{ active?: boolean }>`\n ${p => (p.active ? `background-color: ${p.theme.colors.neutral.c20};` : ``)}\n border-radius: 4px;\n height: 100px;\n`;\n\nconst Bold = styled.b`\n color: ${p => p.theme.colors.primary.c80};\n`;\n\nconst Story = {\n title: \"Asorted/CryptoIcons\",\n argTypes: {\n size: {\n type: \"number\",\n description: \"Icon size for preview\",\n },\n color: {\n type: \"string\",\n description: \"Color\",\n control: { control: \"color\" },\n },\n name: {\n type: \"enum\",\n description: \"[Only for single icon], Icon name\",\n options: Object.keys(cryptoIcons),\n control: {\n type: \"select\",\n },\n },\n circleIcon: {\n type: \"boolean\",\n description: \"if icon is in a circle or not\",\n },\n disabled: {\n type: \"boolean\",\n description: \"if icon is in a disabled or not\",\n },\n tokenIcon: {\n type: \"string\",\n description: \"ref to the token icon to show as a sub icon\",\n },\n },\n args: {\n size: 32,\n name: \"BTC\",\n circleIcon: false,\n disabled: false,\n tokenIcon: \"\",\n },\n parameters: {\n docs: {\n description: {\n component: description,\n },\n },\n },\n};\nexport default Story;\n\nconst ListTemplate = (args: CryptoIconsProps) => {\n const color = args.color || undefined;\n const [search, setSearch] = useState(\"\");\n const s = search.toLowerCase();\n const regexp = new RegExp(s, \"i\");\n\n const { tokenIcon, disabled, circleIcon, size } = args;\n\n return (\n <Container>\n <SearchInput value={search} onChange={setSearch} />\n <ScrollArea\n gridTemplateColumns=\"repeat(auto-fill, 100px);\"\n gridTemplateRows=\"repeat(auto-fill, 100px);\"\n gridGap={4}\n mt={4}\n >\n {Object.keys(cryptoIcons)\n .sort((a, b) => {\n return s ? b.toLowerCase().indexOf(s) - a.toLowerCase().indexOf(s) : a.localeCompare(b);\n })\n // @ts-expect-error FIXME I don't know how to make you happy ts\n .map((name: keyof typeof cryptoIcons) => {\n const match = name.match(regexp);\n const active = s && match;\n const index = match?.index ?? 0;\n return (\n <IconContainer active={!!active}>\n <Flex flex={1} justifyContent=\"center\" alignItems=\"center\">\n <CryptoIcon\n key={name}\n name={name}\n size={size}\n color={color}\n disabled={disabled}\n circleIcon={circleIcon}\n tokenIcon={tokenIcon}\n />\n </Flex>\n <Text variant=\"extraSmall\">\n {active ? (\n <>\n {name.substr(0, index)}\n <Bold>{name.substr(index, s.length)}</Bold>\n {name.substr(index + s.length)}\n </>\n ) : (\n name\n )}\n </Text>\n </IconContainer>\n );\n })}\n </ScrollArea>\n </Container>\n );\n};\nconst IconTemplate = (args: CryptoIconsProps) => {\n const color = args.color || undefined;\n\n return <CryptoIcon {...args} color={color} />;\n};\n\nexport const ListCryptoIcons = ListTemplate.bind({});\nexport const SingleCryptoIcon = IconTemplate.bind({});\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": ["styled", "React"]
|
|
7
7
|
}
|
|
@@ -70,58 +70,12 @@ IconGrid.args = {
|
|
|
70
70
|
};
|
|
71
71
|
IconGrid.argTypes = {
|
|
72
72
|
size: {
|
|
73
|
+
options: ["XS", "S", "M", "L", "XL"],
|
|
73
74
|
control: {
|
|
74
|
-
type: "select"
|
|
75
|
-
options: ["XS", "S", "M", "L", "XL"]
|
|
75
|
+
type: "select"
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
color: { control: "color" },
|
|
79
79
|
style: { control: "object" }
|
|
80
80
|
};
|
|
81
|
-
IconGrid.parameters = {
|
|
82
|
-
docs: {
|
|
83
|
-
description: {
|
|
84
|
-
component: `
|
|
85
|
-
### Adding New Icons to @ledgerHQ/icons-ui Package
|
|
86
|
-
|
|
87
|
-
1. **Access Figma Core File:**
|
|
88
|
-
- Navigate to the [Figma Core Library](https://www.figma.com/file/lbUZsVWtBdZpuHSv6lTY9U/%E2%9A%9B%EF%B8%8F-Core-Library?type=design&node-id=12801-12882&mode=design&t=jx0X8jco5kW0wHSP-0).
|
|
89
|
-
|
|
90
|
-
2. **Export Medium-sized Icons as SVG:**
|
|
91
|
-
- In Figma, open the medium-sized icons.
|
|
92
|
-
- Select all the icons you want to export.
|
|
93
|
-
- Right-click and choose **Export**.
|
|
94
|
-
- Ensure that the export parameters are already set as needed (no modifications required).
|
|
95
|
-
- Export the selected icons as SVG files.
|
|
96
|
-
|
|
97
|
-
3. **Drop Exported SVGs to icons Package:**
|
|
98
|
-
- Move all the exported SVG files to the \`libs/ui/packages/icons/src/svg\` directory in your project.
|
|
99
|
-
|
|
100
|
-
4. **Build @ledgerHQ/icons-ui Package:**
|
|
101
|
-
- Run the command to build the \`@ledgerHQ/icons-ui\` package:
|
|
102
|
-
\`\`\`
|
|
103
|
-
cd libs/ui/packages/icons && pnpm build
|
|
104
|
-
\`\`\`
|
|
105
|
-
- Alternatively, you can build app dependencies using:
|
|
106
|
-
\`\`\`
|
|
107
|
-
pnpm build:llm:deps
|
|
108
|
-
\`\`\`
|
|
109
|
-
- This step ensures that the updated icons are built into the \`@ledgerHQ/icons-ui\` package.
|
|
110
|
-
|
|
111
|
-
5. **Verify Changes Locally:**
|
|
112
|
-
- Start your local Storybook to ensure the new icons are rendering correctly:
|
|
113
|
-
\`\`\`
|
|
114
|
-
cd libs/ui/packages/react && pnpm storybook
|
|
115
|
-
\`\`\`
|
|
116
|
-
- Open your browser and navigate to [http://localhost:6006](http://localhost:6006).
|
|
117
|
-
- Check that the new icons are visible and functional in the Storybook UI.
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
### Reference
|
|
123
|
-
`
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
81
|
//# sourceMappingURL=Icons.stories.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/components/asorted/Icon/Icons.stories.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from \"react\";\nimport { Story, Meta } from \"@storybook/react\";\nimport * as Icons from \"@ledgerhq/icons-ui/react\";\nimport styled from \"styled-components\";\nimport { Flex, Text } from \"../../..\";\nimport { useTheme } from \"styled-components\";\n\ninterface SizeData {\n size: number;\n stroke: number;\n}\n\ninterface AvailableSizes {\n XS: SizeData;\n S: SizeData;\n M: SizeData;\n L: SizeData;\n XL: SizeData;\n}\n\nexport default {\n title: \"asorted/Icons\",\n component: null, // Since we're rendering multiple icons, we don't have a single component to import\n} as Meta;\n\ninterface IconProps {\n size?: keyof AvailableSizes;\n color?: string;\n style?: React.CSSProperties;\n}\n\nconst IconContainer = styled(Flex).attrs<{ active?: boolean }>({\n flexDirection: \"column\",\n justifyContent: \"flex-end\",\n alignItems: \"center\",\n p: 4,\n fill: \"black\",\n})<{ active?: boolean }>`\n ${p => (p.active ? `background-color: ${p.theme.colors.neutral.c20};` : ``)}\n border-radius: 4px;\n height: 100px;\n`;\n\nconst IconGridTemplate: React.FC<IconProps> = ({ size, color, style }) => {\n const iconNames = Object.keys(Icons) as (keyof typeof Icons)[];\n\n const theme = useTheme();\n const selectedColor = color || theme.colors.neutral.c100;\n\n return (\n <div style={{ display: \"grid\", gridTemplateColumns: \"repeat(4, 1fr)\", gap: \"10px\" }}>\n {iconNames.map(iconName => {\n const IconComponent = Icons[iconName];\n return (\n <IconContainer key={iconName}>\n <IconComponent size={size} color={selectedColor} style={style} />\n <Text pt={6}>{iconName}</Text>\n </IconContainer>\n );\n })}\n </div>\n );\n};\n\nexport const IconGrid: Story<IconProps> = (args: IconProps) => <IconGridTemplate {...args} />;\n\nIconGrid.args = {\n size: \"M\",\n color: \"\",\n style: {},\n};\n\nIconGrid.argTypes = {\n size: {\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAElB,YAAuB;AACvB,+BAAmB;AACnB,eAA2B;AAC3B,IAAAA,4BAAyB;AAezB,IAAO,wBAAQ;AAAA,EACb,OAAO;AAAA,EACP,WAAW;AAAA;AACb;AAQA,MAAM,oBAAgB,yBAAAC,SAAO,aAAI,EAAE,MAA4B;AAAA,EAC7D,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,GAAG;AAAA,EACH,MAAM;AACR,CAAC;AAAA,IACG,OAAM,EAAE,SAAS,qBAAqB,EAAE,MAAM,OAAO,QAAQ,GAAG,MAAM,EAAG;AAAA;AAAA;AAAA;AAK7E,MAAM,mBAAwC,CAAC,EAAE,MAAM,OAAO,MAAM,MAAM;AACxE,QAAM,YAAY,OAAO,KAAK,KAAK;AAEnC,QAAM,YAAQ,oCAAS;AACvB,QAAM,gBAAgB,SAAS,MAAM,OAAO,QAAQ;AAEpD,SACE,6BAAAC,QAAA,cAAC,SAAI,OAAO,EAAE,SAAS,QAAQ,qBAAqB,kBAAkB,KAAK,OAAO,KAC/E,UAAU,IAAI,cAAY;AACzB,UAAM,gBAAgB,MAAM,QAAQ;AACpC,WACE,6BAAAA,QAAA,cAAC,iBAAc,KAAK,YAClB,6BAAAA,QAAA,cAAC,iBAAc,MAAY,OAAO,eAAe,OAAc,GAC/D,6BAAAA,QAAA,cAAC,iBAAK,IAAI,KAAI,QAAS,CACzB;AAAA,EAEJ,CAAC,CACH;AAEJ;AAEO,MAAM,WAA6B,CAAC,SAAoB,6BAAAA,QAAA,cAAC,oBAAkB,GAAG,MAAM;AAE3F,SAAS,OAAO;AAAA,EACd,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO,CAAC;AACV;AAEA,SAAS,WAAW;AAAA,EAClB,MAAM;AAAA,IACJ,SAAS
|
|
4
|
+
"sourcesContent": ["import React from \"react\";\nimport { Story, Meta } from \"@storybook/react\";\nimport * as Icons from \"@ledgerhq/icons-ui/react\";\nimport styled from \"styled-components\";\nimport { Flex, Text } from \"../../..\";\nimport { useTheme } from \"styled-components\";\n\ninterface SizeData {\n size: number;\n stroke: number;\n}\n\ninterface AvailableSizes {\n XS: SizeData;\n S: SizeData;\n M: SizeData;\n L: SizeData;\n XL: SizeData;\n}\n\nexport default {\n title: \"asorted/Icons\",\n component: null, // Since we're rendering multiple icons, we don't have a single component to import\n} as Meta;\n\ninterface IconProps {\n size?: keyof AvailableSizes;\n color?: string;\n style?: React.CSSProperties;\n}\n\nconst IconContainer = styled(Flex).attrs<{ active?: boolean }>({\n flexDirection: \"column\",\n justifyContent: \"flex-end\",\n alignItems: \"center\",\n p: 4,\n fill: \"black\",\n})<{ active?: boolean }>`\n ${p => (p.active ? `background-color: ${p.theme.colors.neutral.c20};` : ``)}\n border-radius: 4px;\n height: 100px;\n`;\n\nconst IconGridTemplate: React.FC<IconProps> = ({ size, color, style }) => {\n const iconNames = Object.keys(Icons) as (keyof typeof Icons)[];\n\n const theme = useTheme();\n const selectedColor = color || theme.colors.neutral.c100;\n\n return (\n <div style={{ display: \"grid\", gridTemplateColumns: \"repeat(4, 1fr)\", gap: \"10px\" }}>\n {iconNames.map(iconName => {\n const IconComponent = Icons[iconName];\n return (\n <IconContainer key={iconName}>\n <IconComponent size={size} color={selectedColor} style={style} />\n <Text pt={6}>{iconName}</Text>\n </IconContainer>\n );\n })}\n </div>\n );\n};\n\nexport const IconGrid: Story<IconProps> = (args: IconProps) => <IconGridTemplate {...args} />;\n\nIconGrid.args = {\n size: \"M\",\n color: \"\",\n style: {},\n};\n\nIconGrid.argTypes = {\n size: {\n options: [\"XS\", \"S\", \"M\", \"L\", \"XL\"],\n control: {\n type: \"select\",\n },\n },\n color: { control: \"color\" },\n style: { control: \"object\" },\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAElB,YAAuB;AACvB,+BAAmB;AACnB,eAA2B;AAC3B,IAAAA,4BAAyB;AAezB,IAAO,wBAAQ;AAAA,EACb,OAAO;AAAA,EACP,WAAW;AAAA;AACb;AAQA,MAAM,oBAAgB,yBAAAC,SAAO,aAAI,EAAE,MAA4B;AAAA,EAC7D,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,GAAG;AAAA,EACH,MAAM;AACR,CAAC;AAAA,IACG,OAAM,EAAE,SAAS,qBAAqB,EAAE,MAAM,OAAO,QAAQ,GAAG,MAAM,EAAG;AAAA;AAAA;AAAA;AAK7E,MAAM,mBAAwC,CAAC,EAAE,MAAM,OAAO,MAAM,MAAM;AACxE,QAAM,YAAY,OAAO,KAAK,KAAK;AAEnC,QAAM,YAAQ,oCAAS;AACvB,QAAM,gBAAgB,SAAS,MAAM,OAAO,QAAQ;AAEpD,SACE,6BAAAC,QAAA,cAAC,SAAI,OAAO,EAAE,SAAS,QAAQ,qBAAqB,kBAAkB,KAAK,OAAO,KAC/E,UAAU,IAAI,cAAY;AACzB,UAAM,gBAAgB,MAAM,QAAQ;AACpC,WACE,6BAAAA,QAAA,cAAC,iBAAc,KAAK,YAClB,6BAAAA,QAAA,cAAC,iBAAc,MAAY,OAAO,eAAe,OAAc,GAC/D,6BAAAA,QAAA,cAAC,iBAAK,IAAI,KAAI,QAAS,CACzB;AAAA,EAEJ,CAAC,CACH;AAEJ;AAEO,MAAM,WAA6B,CAAC,SAAoB,6BAAAA,QAAA,cAAC,oBAAkB,GAAG,MAAM;AAE3F,SAAS,OAAO;AAAA,EACd,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO,CAAC;AACV;AAEA,SAAS,WAAW;AAAA,EAClB,MAAM;AAAA,IACJ,SAAS,CAAC,MAAM,KAAK,KAAK,KAAK,IAAI;AAAA,IACnC,SAAS;AAAA,MACP,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,OAAO,EAAE,SAAS,QAAQ;AAAA,EAC1B,OAAO,EAAE,SAAS,SAAS;AAC7B;",
|
|
6
6
|
"names": ["import_styled_components", "styled", "React"]
|
|
7
7
|
}
|
|
@@ -35,7 +35,6 @@ __export(components_exports, {
|
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(components_exports);
|
|
37
37
|
__reExport(components_exports, require("./asorted"), module.exports);
|
|
38
|
-
__reExport(components_exports, require("./cards"), module.exports);
|
|
39
38
|
var import_Chart = __toESM(require("./Chart"));
|
|
40
39
|
__reExport(components_exports, require("./cta"), module.exports);
|
|
41
40
|
__reExport(components_exports, require("./form"), module.exports);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/index.ts"],
|
|
4
|
-
"sourcesContent": ["export * from \"./asorted\";\nexport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+BAAc,sBAAd;AACA
|
|
4
|
+
"sourcesContent": ["export * from \"./asorted\";\nexport { default as Chart } from \"./Chart\";\nexport * from \"./cta\";\nexport * from \"./form\";\nexport * from \"./layout\";\nexport * from \"./loaders\";\nexport * from \"./message\";\nexport * from \"./navigation\";\nexport { default as Table } from \"./Table\";\nexport * from \"./tabs\";\nexport { default as Tag } from \"./Tag\";\nexport * from \"./transitions\";\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+BAAc,sBAAd;AACA,mBAAiC;AACjC,+BAAc,kBAFd;AAGA,+BAAc,mBAHd;AAIA,+BAAc,qBAJd;AAKA,+BAAc,sBALd;AAMA,+BAAc,sBANd;AAOA,+BAAc,yBAPd;AAQA,mBAAiC;AACjC,+BAAc,mBATd;AAUA,iBAA+B;AAC/B,+BAAc,0BAXd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var Carousel_stories_exports = {};
|
|
30
|
+
__export(Carousel_stories_exports, {
|
|
31
|
+
Default: () => Default,
|
|
32
|
+
default: () => Carousel_stories_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Carousel_stories_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import__ = __toESM(require("./"));
|
|
37
|
+
const CarouselStory = (args) => {
|
|
38
|
+
const slides = [...Array(5)].map((_, index) => /* @__PURE__ */ import_react.default.createElement(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
key: index,
|
|
42
|
+
style: {
|
|
43
|
+
backgroundColor: "hsl(" + Math.random() * 360 + ", 100%, 75%)",
|
|
44
|
+
padding: "15px",
|
|
45
|
+
borderRadius: "5px"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"Slide ",
|
|
49
|
+
index
|
|
50
|
+
));
|
|
51
|
+
return /* @__PURE__ */ import_react.default.createElement(import__.default, { variant: args.variant, children: slides });
|
|
52
|
+
};
|
|
53
|
+
var Carousel_stories_default = {
|
|
54
|
+
title: "Layout/Carousel",
|
|
55
|
+
argTypes: {
|
|
56
|
+
children: {
|
|
57
|
+
description: "The elements to be displayed."
|
|
58
|
+
},
|
|
59
|
+
variant: {
|
|
60
|
+
description: "Variant for the carousel.",
|
|
61
|
+
options: ["default", "content-card"],
|
|
62
|
+
defaultValue: "default",
|
|
63
|
+
control: { type: "select" }
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
args: {
|
|
67
|
+
variant: "default"
|
|
68
|
+
},
|
|
69
|
+
parameters: {
|
|
70
|
+
docs: {
|
|
71
|
+
description: {
|
|
72
|
+
component: "A simple Carousel component."
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
const Default = CarouselStory.bind({});
|
|
78
|
+
//# sourceMappingURL=Carousel.stories.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/components/layout/Carousel/Carousel.stories.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from \"react\";\nimport Carousel from \"./\";\nimport { Props } from \"./types\";\n\nconst CarouselStory = (args: Props) => {\n const slides = [...Array(5)].map((_, index) => (\n <div\n key={index}\n style={{\n backgroundColor: \"hsl(\" + Math.random() * 360 + \", 100%, 75%)\",\n padding: \"15px\",\n borderRadius: \"5px\",\n }}\n >\n Slide {index}\n </div>\n ));\n\n return <Carousel variant={args.variant} children={slides} />;\n};\n\nexport default {\n title: \"Layout/Carousel\",\n argTypes: {\n children: {\n description: \"The elements to be displayed.\",\n },\n variant: {\n description: \"Variant for the carousel.\",\n options: [\"default\", \"content-card\"],\n defaultValue: \"default\",\n control: { type: \"select\" },\n },\n },\n args: {\n variant: \"default\",\n },\n parameters: {\n docs: {\n description: {\n component: \"A simple Carousel component.\",\n },\n },\n },\n};\n\nexport const Default = CarouselStory.bind({});\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,eAAqB;AAGrB,MAAM,gBAAgB,CAAC,SAAgB;AACrC,QAAM,SAAS,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,UACnC,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,MACL,OAAO;AAAA,QACL,iBAAiB,SAAS,KAAK,OAAO,IAAI,MAAM;AAAA,QAChD,SAAS;AAAA,QACT,cAAc;AAAA,MAChB;AAAA;AAAA,IACD;AAAA,IACQ;AAAA,EACT,CACD;AAED,SAAO,6BAAAA,QAAA,cAAC,SAAAC,SAAA,EAAS,SAAS,KAAK,SAAS,UAAU,QAAQ;AAC5D;AAEA,IAAO,2BAAQ;AAAA,EACb,OAAO;AAAA,EACP,UAAU;AAAA,IACR,UAAU;AAAA,MACR,aAAa;AAAA,IACf;AAAA,IACA,SAAS;AAAA,MACP,aAAa;AAAA,MACb,SAAS,CAAC,WAAW,cAAc;AAAA,MACnC,cAAc;AAAA,MACd,SAAS,EAAE,MAAM,SAAS;AAAA,IAC5B;AAAA,EACF;AAAA,EACA,MAAM;AAAA,IACJ,SAAS;AAAA,EACX;AAAA,EACA,YAAY;AAAA,IACV,MAAM;AAAA,MACJ,aAAa;AAAA,QACX,WAAW;AAAA,MACb;AAAA,IACF;AAAA,EACF;AACF;AAEO,MAAM,UAAU,cAAc,KAAK,CAAC,CAAC;",
|
|
6
|
+
"names": ["React", "Carousel"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var bullets_exports = {};
|
|
30
|
+
__export(bullets_exports, {
|
|
31
|
+
default: () => bullets_default
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(bullets_exports);
|
|
34
|
+
var import_react = __toESM(require("react"));
|
|
35
|
+
var import_react_spring = require("react-spring");
|
|
36
|
+
var import_styled_components = require("styled-components");
|
|
37
|
+
var import_types = require("./types");
|
|
38
|
+
const defaultBulletStyle = {
|
|
39
|
+
height: "6px",
|
|
40
|
+
borderRadius: "1000px",
|
|
41
|
+
marginRight: "4px",
|
|
42
|
+
opacity: 1
|
|
43
|
+
};
|
|
44
|
+
const useBulletStyles = () => {
|
|
45
|
+
const { colors } = (0, import_styled_components.useTheme)();
|
|
46
|
+
const BulletStyle = {
|
|
47
|
+
[import_types.ItemStatus.active]: {
|
|
48
|
+
...defaultBulletStyle,
|
|
49
|
+
width: "16px",
|
|
50
|
+
backgroundColor: colors.opacityDefault.c80
|
|
51
|
+
},
|
|
52
|
+
[import_types.ItemStatus.nearby]: {
|
|
53
|
+
...defaultBulletStyle,
|
|
54
|
+
width: "8px",
|
|
55
|
+
backgroundColor: colors.opacityDefault.c30
|
|
56
|
+
},
|
|
57
|
+
[import_types.ItemStatus.far]: {
|
|
58
|
+
...defaultBulletStyle,
|
|
59
|
+
width: "4px",
|
|
60
|
+
backgroundColor: colors.opacityDefault.c10
|
|
61
|
+
},
|
|
62
|
+
[import_types.ItemStatus.none]: {
|
|
63
|
+
...defaultBulletStyle,
|
|
64
|
+
width: "0px",
|
|
65
|
+
opacity: 0,
|
|
66
|
+
backgroundColor: colors.opacityDefault.c10,
|
|
67
|
+
marginRight: "0px"
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
return BulletStyle;
|
|
71
|
+
};
|
|
72
|
+
const Bullet = ({ type }) => {
|
|
73
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react_spring.animated.div, { style: (0, import_react_spring.useSpring)(useBulletStyles()[type]) });
|
|
74
|
+
};
|
|
75
|
+
var bullets_default = Bullet;
|
|
76
|
+
//# sourceMappingURL=bullets.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../src/components/layout/Carousel/Footer/Pagination/bullets.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from \"react\";\nimport { animated, useSpring } from \"react-spring\";\nimport { useTheme } from \"styled-components\";\nimport { ItemStatus } from \"./types\";\n\nconst defaultBulletStyle = {\n height: \"6px\",\n borderRadius: \"1000px\",\n marginRight: \"4px\",\n opacity: 1,\n};\n\nconst useBulletStyles = () => {\n const { colors } = useTheme();\n\n const BulletStyle: {\n [key in ItemStatus]: {\n width: string;\n height: string;\n backgroundColor: string;\n borderRadius: string;\n opacity?: number;\n marginRight: string;\n };\n } = {\n [ItemStatus.active]: {\n ...defaultBulletStyle,\n width: \"16px\",\n backgroundColor: colors.opacityDefault.c80,\n },\n [ItemStatus.nearby]: {\n ...defaultBulletStyle,\n width: \"8px\",\n backgroundColor: colors.opacityDefault.c30,\n },\n [ItemStatus.far]: {\n ...defaultBulletStyle,\n width: \"4px\",\n backgroundColor: colors.opacityDefault.c10,\n },\n [ItemStatus.none]: {\n ...defaultBulletStyle,\n width: \"0px\",\n opacity: 0,\n backgroundColor: colors.opacityDefault.c10,\n marginRight: \"0px\",\n },\n };\n\n return BulletStyle;\n};\n\nconst Bullet = ({ type }: { type: ItemStatus }) => {\n return <animated.div style={useSpring(useBulletStyles()[type])} />;\n};\n\nexport default Bullet;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,0BAAoC;AACpC,+BAAyB;AACzB,mBAA2B;AAE3B,MAAM,qBAAqB;AAAA,EACzB,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,aAAa;AAAA,EACb,SAAS;AACX;AAEA,MAAM,kBAAkB,MAAM;AAC5B,QAAM,EAAE,OAAO,QAAI,mCAAS;AAE5B,QAAM,cASF;AAAA,IACF,CAAC,wBAAW,MAAM,GAAG;AAAA,MACnB,GAAG;AAAA,MACH,OAAO;AAAA,MACP,iBAAiB,OAAO,eAAe;AAAA,IACzC;AAAA,IACA,CAAC,wBAAW,MAAM,GAAG;AAAA,MACnB,GAAG;AAAA,MACH,OAAO;AAAA,MACP,iBAAiB,OAAO,eAAe;AAAA,IACzC;AAAA,IACA,CAAC,wBAAW,GAAG,GAAG;AAAA,MAChB,GAAG;AAAA,MACH,OAAO;AAAA,MACP,iBAAiB,OAAO,eAAe;AAAA,IACzC;AAAA,IACA,CAAC,wBAAW,IAAI,GAAG;AAAA,MACjB,GAAG;AAAA,MACH,OAAO;AAAA,MACP,SAAS;AAAA,MACT,iBAAiB,OAAO,eAAe;AAAA,MACvC,aAAa;AAAA,IACf;AAAA,EACF;AAEA,SAAO;AACT;AAEA,MAAM,SAAS,CAAC,EAAE,KAAK,MAA4B;AACjD,SAAO,6BAAAA,QAAA,cAAC,6BAAS,KAAT,EAAa,WAAO,+BAAU,gBAAgB,EAAE,IAAI,CAAC,GAAG;AAClE;AAEA,IAAO,kBAAQ;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
package/lib/cjs/components/{cards/Carousel/Slide.js → layout/Carousel/Footer/Pagination/index.js}
RENAMED
|
@@ -26,28 +26,21 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
31
|
-
default: () =>
|
|
29
|
+
var Pagination_exports = {};
|
|
30
|
+
__export(Pagination_exports, {
|
|
31
|
+
default: () => Pagination_default
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(Pagination_exports);
|
|
34
34
|
var import_react = __toESM(require("react"));
|
|
35
35
|
var import_styled_components = __toESM(require("styled-components"));
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
flex-direction: column;
|
|
42
|
-
padding: ${(p) => p.theme.space[8]}px ${(p) => p.theme.space[10]}px;
|
|
43
|
-
padding-right: 280px; /* Nb gives air to not overlap the illustration */
|
|
44
|
-
z-index: ${(p) => p.theme.zIndexes[8]};
|
|
45
|
-
background: url(${(p) => p.image}) no-repeat ${(p) => p.theme.colors.neutral.c100};
|
|
46
|
-
background-size: contain;
|
|
47
|
-
background-position: right 60px bottom;
|
|
36
|
+
var import_bullets = __toESM(require("./bullets"));
|
|
37
|
+
var import_utils = require("./utils");
|
|
38
|
+
const FooterCarouselBullets = import_styled_components.default.div`
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
48
41
|
`;
|
|
49
|
-
const
|
|
50
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
42
|
+
const Pagination = ({ children, currentIndex }) => {
|
|
43
|
+
return /* @__PURE__ */ import_react.default.createElement(FooterCarouselBullets, null, children.map((child, index) => /* @__PURE__ */ import_react.default.createElement(import_bullets.default, { key: child.key, type: (0, import_utils.getItemStatus)(index, currentIndex) })));
|
|
51
44
|
};
|
|
52
|
-
var
|
|
53
|
-
//# sourceMappingURL=
|
|
45
|
+
var Pagination_default = Pagination;
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../src/components/layout/Carousel/Footer/Pagination/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from \"react\";\nimport styled from \"styled-components\";\nimport { SubProps } from \"../../types\";\nimport Bullet from \"./bullets\";\nimport { getItemStatus } from \"./utils\";\n\nconst FooterCarouselBullets = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst Pagination = ({ children, currentIndex }: SubProps) => {\n return (\n <FooterCarouselBullets>\n {children.map((child, index) => (\n <Bullet key={child.key} type={getItemStatus(index, currentIndex)} />\n ))}\n </FooterCarouselBullets>\n );\n};\n\nexport default Pagination;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,+BAAmB;AAEnB,qBAAmB;AACnB,mBAA8B;AAE9B,MAAM,wBAAwB,yBAAAA,QAAO;AAAA;AAAA;AAAA;AAKrC,MAAM,aAAa,CAAC,EAAE,UAAU,aAAa,MAAgB;AAC3D,SACE,6BAAAC,QAAA,cAAC,6BACE,SAAS,IAAI,CAAC,OAAO,UACpB,6BAAAA,QAAA,cAAC,eAAAC,SAAA,EAAO,KAAK,MAAM,KAAK,UAAM,4BAAc,OAAO,YAAY,GAAG,CACnE,CACH;AAEJ;AAEA,IAAO,qBAAQ;",
|
|
6
|
+
"names": ["styled", "React", "Bullet"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var types_exports = {};
|
|
20
|
+
__export(types_exports, {
|
|
21
|
+
ItemStatus: () => ItemStatus
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(types_exports);
|
|
24
|
+
var ItemStatus = /* @__PURE__ */ ((ItemStatus2) => {
|
|
25
|
+
ItemStatus2[ItemStatus2["active"] = 0] = "active";
|
|
26
|
+
ItemStatus2[ItemStatus2["nearby"] = 1] = "nearby";
|
|
27
|
+
ItemStatus2[ItemStatus2["far"] = 2] = "far";
|
|
28
|
+
ItemStatus2[ItemStatus2["none"] = 3] = "none";
|
|
29
|
+
return ItemStatus2;
|
|
30
|
+
})(ItemStatus || {});
|
|
31
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../src/components/layout/Carousel/Footer/Pagination/types.ts"],
|
|
4
|
+
"sourcesContent": ["export enum ItemStatus {\n \"active\",\n \"nearby\",\n \"far\",\n \"none\",\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAK,aAAL,kBAAKA,gBAAL;AACL,EAAAA,wBAAA;AACA,EAAAA,wBAAA;AACA,EAAAA,wBAAA;AACA,EAAAA,wBAAA;AAJU,SAAAA;AAAA,GAAA;",
|
|
6
|
+
"names": ["ItemStatus"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var utils_exports = {};
|
|
20
|
+
__export(utils_exports, {
|
|
21
|
+
getItemStatus: () => getItemStatus
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(utils_exports);
|
|
24
|
+
var import_types = require("./types");
|
|
25
|
+
const getItemStatus = (itemIndex, activeIndex) => {
|
|
26
|
+
const itemDistanceFromActiveIndex = Math.abs(itemIndex - activeIndex);
|
|
27
|
+
switch (itemDistanceFromActiveIndex) {
|
|
28
|
+
case 0:
|
|
29
|
+
return import_types.ItemStatus.active;
|
|
30
|
+
case 1:
|
|
31
|
+
return import_types.ItemStatus.nearby;
|
|
32
|
+
case 2:
|
|
33
|
+
return import_types.ItemStatus.far;
|
|
34
|
+
default:
|
|
35
|
+
return import_types.ItemStatus.none;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../src/components/layout/Carousel/Footer/Pagination/utils.ts"],
|
|
4
|
+
"sourcesContent": ["import { ItemStatus } from \"./types\";\n\n/**\n * Returns the status of an indexed item from the carousel index.\n */\nexport const getItemStatus = (itemIndex: number, activeIndex: number) => {\n const itemDistanceFromActiveIndex = Math.abs(itemIndex - activeIndex);\n\n switch (itemDistanceFromActiveIndex) {\n case 0:\n return ItemStatus.active;\n case 1:\n return ItemStatus.nearby;\n case 2:\n return ItemStatus.far;\n default:\n return ItemStatus.none;\n }\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA2B;AAKpB,MAAM,gBAAgB,CAAC,WAAmB,gBAAwB;AACvE,QAAM,8BAA8B,KAAK,IAAI,YAAY,WAAW;AAEpE,UAAQ,6BAA6B;AAAA,IACnC,KAAK;AACH,aAAO,wBAAW;AAAA,IACpB,KAAK;AACH,aAAO,wBAAW;AAAA,IACpB,KAAK;AACH,aAAO,wBAAW;AAAA,IACpB;AACE,aAAO,wBAAW;AAAA,EACtB;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -26,10 +26,21 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
31
|
-
|
|
29
|
+
var Footer_exports = {};
|
|
30
|
+
__export(Footer_exports, {
|
|
31
|
+
default: () => Footer_default
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var
|
|
33
|
+
module.exports = __toCommonJS(Footer_exports);
|
|
34
|
+
var import_react = __toESM(require("react"));
|
|
35
|
+
var import_variantContentCard = __toESM(require("./variantContentCard"));
|
|
36
|
+
var import_variantDefault = __toESM(require("./variantDefault"));
|
|
37
|
+
const Footers = {
|
|
38
|
+
"content-card": import_variantContentCard.default,
|
|
39
|
+
default: import_variantDefault.default
|
|
40
|
+
};
|
|
41
|
+
const Footer = (props) => {
|
|
42
|
+
const Component = Footers[props.variant];
|
|
43
|
+
return /* @__PURE__ */ import_react.default.createElement(Component, { ...props });
|
|
44
|
+
};
|
|
45
|
+
var Footer_default = Footer;
|
|
35
46
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/components/layout/Carousel/Footer/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import React, { FC } from \"react\";\nimport { SubProps, Variant } from \"../types\";\nimport FooterContentCard from \"./variantContentCard\";\nimport FooterDefault from \"./variantDefault\";\n\nconst Footers: { [key in Variant]: FC<SubProps> } = {\n \"content-card\": FooterContentCard,\n default: FooterDefault,\n};\n\nconst Footer = (props: SubProps) => {\n const Component = Footers[props.variant];\n return <Component {...props} />;\n};\n\nexport default Footer;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0B;AAE1B,gCAA8B;AAC9B,4BAA0B;AAE1B,MAAM,UAA8C;AAAA,EAClD,gBAAgB,0BAAAA;AAAA,EAChB,SAAS,sBAAAC;AACX;AAEA,MAAM,SAAS,CAAC,UAAoB;AAClC,QAAM,YAAY,QAAQ,MAAM,OAAO;AACvC,SAAO,6BAAAC,QAAA,cAAC,aAAW,GAAG,OAAO;AAC/B;AAEA,IAAO,iBAAQ;",
|
|
6
|
+
"names": ["FooterContentCard", "FooterDefault", "React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var variantContentCard_exports = {};
|
|
30
|
+
__export(variantContentCard_exports, {
|
|
31
|
+
default: () => variantContentCard_default
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(variantContentCard_exports);
|
|
34
|
+
var import_react = require("@ledgerhq/icons-ui/react");
|
|
35
|
+
var import_react2 = __toESM(require("react"));
|
|
36
|
+
var import_styled_components = __toESM(require("styled-components"));
|
|
37
|
+
var import_Pagination = __toESM(require("./Pagination"));
|
|
38
|
+
const FooterContainer = import_styled_components.default.div`
|
|
39
|
+
height: 32px;
|
|
40
|
+
border-top: 1px solid ${(p) => p.theme.colors.opacityDefault.c10};
|
|
41
|
+
display: flex;
|
|
42
|
+
justify-content: space-between;
|
|
43
|
+
padding: 6px 16px 6px 16px;
|
|
44
|
+
`;
|
|
45
|
+
const FooterArrowsContainer = import_styled_components.default.div`
|
|
46
|
+
display: flex;
|
|
47
|
+
gap: 8px;
|
|
48
|
+
align-items: center;
|
|
49
|
+
`;
|
|
50
|
+
const FooterArrowContainer = import_styled_components.default.div`
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
`;
|
|
55
|
+
const FooterContentCard = ({ children, emblaApi, currentIndex, variant }) => {
|
|
56
|
+
if (children.length === 1)
|
|
57
|
+
return null;
|
|
58
|
+
return /* @__PURE__ */ import_react2.default.createElement(FooterContainer, null, /* @__PURE__ */ import_react2.default.createElement(
|
|
59
|
+
import_Pagination.default,
|
|
60
|
+
{
|
|
61
|
+
variant,
|
|
62
|
+
children,
|
|
63
|
+
emblaApi,
|
|
64
|
+
currentIndex
|
|
65
|
+
}
|
|
66
|
+
), /* @__PURE__ */ import_react2.default.createElement(FooterArrowsContainer, null, /* @__PURE__ */ import_react2.default.createElement(FooterArrowContainer, { onClick: () => emblaApi == null ? void 0 : emblaApi.scrollPrev() }, /* @__PURE__ */ import_react2.default.createElement(import_react.ArrowLeft, { size: "S" })), /* @__PURE__ */ import_react2.default.createElement(FooterArrowContainer, { onClick: () => emblaApi == null ? void 0 : emblaApi.scrollNext() }, /* @__PURE__ */ import_react2.default.createElement(import_react.ArrowRight, { size: "S" }))));
|
|
67
|
+
};
|
|
68
|
+
var variantContentCard_default = FooterContentCard;
|
|
69
|
+
//# sourceMappingURL=variantContentCard.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/components/layout/Carousel/Footer/variantContentCard.tsx"],
|
|
4
|
+
"sourcesContent": ["import { ArrowLeft, ArrowRight } from \"@ledgerhq/icons-ui/react\";\nimport React from \"react\";\nimport styled from \"styled-components\";\nimport Pagination from \"./Pagination\";\nimport { SubProps } from \"../types\";\n\nconst FooterContainer = styled.div`\n height: 32px;\n border-top: 1px solid ${p => p.theme.colors.opacityDefault.c10};\n display: flex;\n justify-content: space-between;\n padding: 6px 16px 6px 16px;\n`;\n\nconst FooterArrowsContainer = styled.div`\n display: flex;\n gap: 8px;\n align-items: center;\n`;\n\nconst FooterArrowContainer = styled.div`\n display: flex;\n align-items: center;\n cursor: pointer;\n`;\n\nconst FooterContentCard = ({ children, emblaApi, currentIndex, variant }: SubProps) => {\n if (children.length === 1) return null;\n\n return (\n <FooterContainer>\n <Pagination\n variant={variant}\n children={children}\n emblaApi={emblaApi}\n currentIndex={currentIndex}\n />\n\n <FooterArrowsContainer>\n <FooterArrowContainer onClick={() => emblaApi?.scrollPrev()}>\n <ArrowLeft size=\"S\" />\n </FooterArrowContainer>\n <FooterArrowContainer onClick={() => emblaApi?.scrollNext()}>\n <ArrowRight size=\"S\" />\n </FooterArrowContainer>\n </FooterArrowsContainer>\n </FooterContainer>\n );\n};\n\nexport default FooterContentCard;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAsC;AACtC,IAAAA,gBAAkB;AAClB,+BAAmB;AACnB,wBAAuB;AAGvB,MAAM,kBAAkB,yBAAAC,QAAO;AAAA;AAAA,0BAEL,OAAK,EAAE,MAAM,OAAO,eAAe,GAAG;AAAA;AAAA;AAAA;AAAA;AAMhE,MAAM,wBAAwB,yBAAAA,QAAO;AAAA;AAAA;AAAA;AAAA;AAMrC,MAAM,uBAAuB,yBAAAA,QAAO;AAAA;AAAA;AAAA;AAAA;AAMpC,MAAM,oBAAoB,CAAC,EAAE,UAAU,UAAU,cAAc,QAAQ,MAAgB;AACrF,MAAI,SAAS,WAAW;AAAG,WAAO;AAElC,SACE,8BAAAC,QAAA,cAAC,uBACC,8BAAAA,QAAA;AAAA,IAAC,kBAAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACF,GAEA,8BAAAD,QAAA,cAAC,6BACC,8BAAAA,QAAA,cAAC,wBAAqB,SAAS,MAAM,qCAAU,gBAC7C,8BAAAA,QAAA,cAAC,0BAAU,MAAK,KAAI,CACtB,GACA,8BAAAA,QAAA,cAAC,wBAAqB,SAAS,MAAM,qCAAU,gBAC7C,8BAAAA,QAAA,cAAC,2BAAW,MAAK,KAAI,CACvB,CACF,CACF;AAEJ;AAEA,IAAO,6BAAQ;",
|
|
6
|
+
"names": ["import_react", "styled", "React", "Pagination"]
|
|
7
|
+
}
|