@@ -52,7 +37,7 @@ const Page = () => {
- {/* Insert Components here */}
+ {/* Button */}
Input
@@ -109,110 +94,32 @@ const Page = () => {
Button
- {['primary', 'secondary', 'tertiary', 'danger'].map(
- (variant, index) => (
-
- {['lg', 'md', 'sm', 'xs', 'disabled'].map((size) => (
-
}
- rightIcon={
}
- variant={variant as ButtonOrLinkProps['variant']}
- size={
- size !== 'disabled'
- ? (size as ButtonOrLinkProps['size'])
- : 'md'
- }
- key={`${variant}-${size}`}
- disabled={size === 'disabled'}
- >
- Button
-
- ))}
-
- ),
- )}
- {[
- 'primary',
- 'secondary',
- 'tertiary',
- 'ghost',
- 'danger',
- 'danger-ghost',
- ].map((variant, index) => (
-
- {['lg', 'md', 'sm', 'xs', 'disabled'].map((size) => (
-
- ))}
-
- ))}
+ {renderButtons()}
+ {renderButtonIcons()}
+ {/* Badge */}
Badge
-
- {['primary', 'secondary', 'tertiary', 'inset'].map(
- (variant, index) => (
-
- {['sm', 'xs'].map((size) => (
-
- 1
-
- ))}
-
- ),
- )}
-
+
{renderBadges()}
+ {/* Checkbox */}
Checkbox
+
{renderCheckbox()}
- {Array.from({ length: 5 }).map((_, index) => (
-
- ))}
-
-
- {Array.from({ length: 2 }).map((_, index) => (
-
- ))}
+ {renderCheckboxWithDescription()}
+ {/* Calendar */}
Calendar
@@ -239,18 +146,31 @@ const Page = () => {
/>
+
-
+
- {/* Avatar */}
-
-
Avatar
-
- {avatars}
- {avatarsFallback}
-
+ {/* Avatar */}
+
+
Avatar
+
+ {avatars}
+ {avatarsFallback}
+
+
+
+ {/* Tabs */}
+
+
Tabs
+
+ {renderTabs()}
+ {renderTabWithBadges()}
+
+
Vertical Tabs
+ {renderVerticalTabs()}
+
diff --git a/packages/frontend/src/pages/components/renders/avatar.tsx b/packages/frontend/src/pages/components/renders/avatar.tsx
new file mode 100644
index 00000000..9ebaa03f
--- /dev/null
+++ b/packages/frontend/src/pages/components/renders/avatar.tsx
@@ -0,0 +1,19 @@
+import React from 'react';
+import { Avatar, AvatarVariants } from 'components/shared/Avatar';
+
+const avatarSizes: AvatarVariants['size'][] = [18, 20, 24, 28, 32, 36, 40, 44];
+const avatarVariants: AvatarVariants['type'][] = ['gray', 'orange', 'blue'];
+
+export const avatars = avatarSizes.map((size) => {
+ return (
+
+ );
+});
+
+export const avatarsFallback = avatarVariants.map((color) => {
+ return avatarSizes.map((size) => {
+ return (
+
+ );
+ });
+});
diff --git a/packages/frontend/src/pages/components/renders/badge.tsx b/packages/frontend/src/pages/components/renders/badge.tsx
new file mode 100644
index 00000000..e4eb3114
--- /dev/null
+++ b/packages/frontend/src/pages/components/renders/badge.tsx
@@ -0,0 +1,20 @@
+import React from 'react';
+
+import { Badge } from 'components/shared/Badge';
+import { BadgeTheme } from 'components/shared/Badge/Badge.theme';
+
+export const renderBadges = () => {
+ return ['primary', 'secondary', 'tertiary', 'inset'].map((variant, index) => (
+
+ {['sm', 'xs'].map((size) => (
+
+ 1
+
+ ))}
+
+ ));
+};
diff --git a/packages/frontend/src/pages/components/renders/button.tsx b/packages/frontend/src/pages/components/renders/button.tsx
new file mode 100644
index 00000000..c1c69c48
--- /dev/null
+++ b/packages/frontend/src/pages/components/renders/button.tsx
@@ -0,0 +1,49 @@
+import { Button, ButtonTheme } from 'components/shared/Button';
+import { PlusIcon } from 'components/shared/CustomIcon';
+import React from 'react';
+
+export const renderButtons = () => {
+ return ['primary', 'secondary', 'tertiary', 'danger'].map(
+ (variant, index) => (
+
+ {['lg', 'md', 'sm', 'xs', 'disabled'].map((size) => (
+
}
+ rightIcon={
}
+ variant={variant as ButtonTheme['variant']}
+ size={size !== 'disabled' ? (size as ButtonTheme['size']) : 'md'}
+ key={`${variant}-${size}`}
+ disabled={size === 'disabled'}
+ >
+ Button
+
+ ))}
+
+ ),
+ );
+};
+
+export const renderButtonIcons = () => {
+ return [
+ 'primary',
+ 'secondary',
+ 'tertiary',
+ 'ghost',
+ 'danger',
+ 'danger-ghost',
+ ].map((variant, index) => (
+
+ {['lg', 'md', 'sm', 'xs', 'disabled'].map((size) => (
+
+ ))}
+
+ ));
+};
diff --git a/packages/frontend/src/pages/components/renders/checkbox.tsx b/packages/frontend/src/pages/components/renders/checkbox.tsx
new file mode 100644
index 00000000..66c9eef5
--- /dev/null
+++ b/packages/frontend/src/pages/components/renders/checkbox.tsx
@@ -0,0 +1,27 @@
+import React from 'react';
+import { Checkbox } from 'components/shared/Checkbox';
+
+export const renderCheckbox = () => {
+ return Array.from({ length: 5 }).map((_, index) => (
+
+ ));
+};
+
+export const renderCheckboxWithDescription = () => {
+ return Array.from({ length: 2 }).map((_, index) => (
+
+ ));
+};
diff --git a/packages/frontend/src/pages/components/renders/tabs.tsx b/packages/frontend/src/pages/components/renders/tabs.tsx
new file mode 100644
index 00000000..d344317e
--- /dev/null
+++ b/packages/frontend/src/pages/components/renders/tabs.tsx
@@ -0,0 +1,56 @@
+import React from 'react';
+import { Tabs } from 'components/shared/Tabs';
+import { Badge } from 'components/shared/Badge';
+import { GlobeIcon } from 'components/shared/CustomIcon';
+
+const tabs = Array.from({ length: 8 });
+
+export const renderTabs = () => {
+ return (
+
+
+ {tabs.map((_, index) => (
+
+ Tab item {index}
+
+ ))}
+
+
+ );
+};
+
+export const renderTabWithBadges = () => {
+ return (
+
+
+ {tabs.map((_, index) => (
+ {index}}
+ >
+ Tab item
+
+ ))}
+
+
+ );
+};
+
+export const renderVerticalTabs = () => {
+ return (
+
+
+ {tabs.slice(0, 4).map((_, index) => (
+ }
+ value={index.toString()}
+ >
+ Tab item {index}
+
+ ))}
+
+
+ );
+};
diff --git a/yarn.lock b/yarn.lock
index d451b22d..c8881430 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3310,6 +3310,17 @@
"@radix-ui/react-use-previous" "1.0.1"
"@radix-ui/react-use-size" "1.0.1"
+"@radix-ui/react-collection@1.0.3":
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/@radix-ui/react-collection/-/react-collection-1.0.3.tgz#9595a66e09026187524a36c6e7e9c7d286469159"
+ integrity sha512-3SzW+0PW7yBBoQlT8wNcGtaxaD0XSu0uLUFgrtHY08Acx05TaHaOmVLR73c0j/cqpDy53KBMO7s0dx2wmOIDIA==
+ dependencies:
+ "@babel/runtime" "^7.13.10"
+ "@radix-ui/react-compose-refs" "1.0.1"
+ "@radix-ui/react-context" "1.0.1"
+ "@radix-ui/react-primitive" "1.0.3"
+ "@radix-ui/react-slot" "1.0.2"
+
"@radix-ui/react-compose-refs@1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.1.tgz#7ed868b66946aa6030e580b1ffca386dd4d21989"
@@ -3324,6 +3335,21 @@
dependencies:
"@babel/runtime" "^7.13.10"
+"@radix-ui/react-direction@1.0.1":
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/@radix-ui/react-direction/-/react-direction-1.0.1.tgz#9cb61bf2ccf568f3421422d182637b7f47596c9b"
+ integrity sha512-RXcvnXgyvYvBEOhCBuddKecVkoMiI10Jcm5cTI7abJRAHYfFxeu+FBQs/DvdxSYucxR5mna0dNsL6QFlds5TMA==
+ dependencies:
+ "@babel/runtime" "^7.13.10"
+
+"@radix-ui/react-id@1.0.1":
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/@radix-ui/react-id/-/react-id-1.0.1.tgz#73cdc181f650e4df24f0b6a5b7aa426b912c88c0"
+ integrity sha512-tI7sT/kqYp8p96yGWY1OAnLHrqDgzHefRBKQ2YAkBS5ja7QLcZ9Z/uY7bEjPUatf8RomoXM8/1sMj1IJaE5UzQ==
+ dependencies:
+ "@babel/runtime" "^7.13.10"
+ "@radix-ui/react-use-layout-effect" "1.0.1"
+
"@radix-ui/react-presence@1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@radix-ui/react-presence/-/react-presence-1.0.1.tgz#491990ba913b8e2a5db1b06b203cb24b5cdef9ba"
@@ -3341,6 +3367,22 @@
"@babel/runtime" "^7.13.10"
"@radix-ui/react-slot" "1.0.2"
+"@radix-ui/react-roving-focus@1.0.4":
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/@radix-ui/react-roving-focus/-/react-roving-focus-1.0.4.tgz#e90c4a6a5f6ac09d3b8c1f5b5e81aab2f0db1974"
+ integrity sha512-2mUg5Mgcu001VkGy+FfzZyzbmuUWzgWkj3rvv4yu+mLw03+mTzbxZHvfcGyFp2b8EkQeMkpRQ5FiA2Vr2O6TeQ==
+ dependencies:
+ "@babel/runtime" "^7.13.10"
+ "@radix-ui/primitive" "1.0.1"
+ "@radix-ui/react-collection" "1.0.3"
+ "@radix-ui/react-compose-refs" "1.0.1"
+ "@radix-ui/react-context" "1.0.1"
+ "@radix-ui/react-direction" "1.0.1"
+ "@radix-ui/react-id" "1.0.1"
+ "@radix-ui/react-primitive" "1.0.3"
+ "@radix-ui/react-use-callback-ref" "1.0.1"
+ "@radix-ui/react-use-controllable-state" "1.0.1"
+
"@radix-ui/react-slot@1.0.2":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@radix-ui/react-slot/-/react-slot-1.0.2.tgz#a9ff4423eade67f501ffb32ec22064bc9d3099ab"
@@ -3349,6 +3391,21 @@
"@babel/runtime" "^7.13.10"
"@radix-ui/react-compose-refs" "1.0.1"
+"@radix-ui/react-tabs@^1.0.4":
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/@radix-ui/react-tabs/-/react-tabs-1.0.4.tgz#993608eec55a5d1deddd446fa9978d2bc1053da2"
+ integrity sha512-egZfYY/+wRNCflXNHx+dePvnz9FbmssDTJBtgRfDY7e8SE5oIo3Py2eCB1ckAbh1Q7cQ/6yJZThJ++sgbxibog==
+ dependencies:
+ "@babel/runtime" "^7.13.10"
+ "@radix-ui/primitive" "1.0.1"
+ "@radix-ui/react-context" "1.0.1"
+ "@radix-ui/react-direction" "1.0.1"
+ "@radix-ui/react-id" "1.0.1"
+ "@radix-ui/react-presence" "1.0.1"
+ "@radix-ui/react-primitive" "1.0.3"
+ "@radix-ui/react-roving-focus" "1.0.4"
+ "@radix-ui/react-use-controllable-state" "1.0.1"
+
"@radix-ui/react-use-callback-ref@1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.1.tgz#f4bb1f27f2023c984e6534317ebc411fc181107a"
@@ -15195,7 +15252,7 @@ tailwind-variants@^0.2.0:
dependencies:
tailwind-merge "^2.2.0"
-tailwindcss@^3.0.2, tailwindcss@^3.3.6:
+tailwindcss@^3.0.2:
version "3.3.6"
resolved "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.6.tgz"
integrity sha512-AKjF7qbbLvLaPieoKeTjG1+FyNZT6KaJMJPFeQyLfIp7l82ggH1fbHJSsYIvnbTFQOlkh+gBYpyby5GT1LIdLw==
@@ -15223,6 +15280,34 @@ tailwindcss@^3.0.2, tailwindcss@^3.3.6:
resolve "^1.22.2"
sucrase "^3.32.0"
+tailwindcss@^3.4.1:
+ version "3.4.1"
+ resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.4.1.tgz#f512ca5d1dd4c9503c7d3d28a968f1ad8f5c839d"
+ integrity sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==
+ dependencies:
+ "@alloc/quick-lru" "^5.2.0"
+ arg "^5.0.2"
+ chokidar "^3.5.3"
+ didyoumean "^1.2.2"
+ dlv "^1.1.3"
+ fast-glob "^3.3.0"
+ glob-parent "^6.0.2"
+ is-glob "^4.0.3"
+ jiti "^1.19.1"
+ lilconfig "^2.1.0"
+ micromatch "^4.0.5"
+ normalize-path "^3.0.0"
+ object-hash "^3.0.0"
+ picocolors "^1.0.0"
+ postcss "^8.4.23"
+ postcss-import "^15.1.0"
+ postcss-js "^4.0.1"
+ postcss-load-config "^4.0.1"
+ postcss-nested "^6.0.1"
+ postcss-selector-parser "^6.0.11"
+ resolve "^1.22.2"
+ sucrase "^3.32.0"
+
tapable@^1.0.0:
version "1.1.3"
resolved "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz"