this.gui 1.0.14 → 1.0.16
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/README.md +0 -39
- package/dist/style.css +1 -1
- package/dist/this-gui.es.js +3751 -1882
- package/dist/this-gui.umd.js +34 -22
- package/package.json +14 -12
- package/src/App.jsx +50 -21
- package/src/SiteBuilder.jsx +39 -0
- package/src/index.mdx +10 -0
- package/src/main.jsx +11 -14
- package/src/scripts/postinstall.js +28 -31
- package/src/scripts/verifyLayouts.js +175 -0
- package/src/scripts/verifyTemplates.js +154 -0
- package/src/stories/Atoms/Alert/Alert.css +196 -14
- package/src/stories/Atoms/Alert/Alert.jsx +43 -28
- package/src/stories/Atoms/Alert/Alert.stories.jsx +154 -28
- package/src/stories/Atoms/Audio/Audio.css +246 -16
- package/src/stories/Atoms/Audio/Audio.jsx +204 -29
- package/src/stories/Atoms/Audio/Audio.stories.jsx +178 -28
- package/src/stories/Atoms/Badge/Badge.css +234 -15
- package/src/stories/Atoms/Badge/Badge.jsx +44 -31
- package/src/stories/Atoms/Badge/Badge.stories.jsx +108 -29
- package/src/stories/Atoms/Button/Button.css +106 -45
- package/src/stories/Atoms/Button/Button.jsx +31 -82
- package/src/stories/Atoms/Button/Button.stories.jsx +170 -40
- package/src/stories/Atoms/Caption/Caption.css +156 -16
- package/src/stories/Atoms/Caption/Caption.jsx +62 -31
- package/src/stories/Atoms/Caption/Caption.stories.jsx +194 -28
- package/src/stories/Atoms/Checkbox/Checkbox.css +168 -15
- package/src/stories/Atoms/Checkbox/Checkbox.jsx +73 -31
- package/src/stories/Atoms/Checkbox/Checkbox.stories.jsx +98 -27
- package/src/stories/Atoms/Container/Container.css +75 -15
- package/src/stories/Atoms/Container/Container.jsx +41 -28
- package/src/stories/Atoms/Container/Container.stories.jsx +92 -29
- package/src/stories/Atoms/Divider/Divider.css +131 -13
- package/src/stories/Atoms/Divider/Divider.jsx +54 -33
- package/src/stories/Atoms/Divider/Divider.stories.jsx +93 -29
- package/src/stories/Atoms/Heading/Heading.css +99 -16
- package/src/stories/Atoms/Heading/Heading.jsx +57 -29
- package/src/stories/Atoms/Heading/Heading.stories.jsx +117 -28
- package/src/stories/Atoms/Icon/Icon.css +219 -27
- package/src/stories/Atoms/Icon/Icon.jsx +67 -38
- package/src/stories/Atoms/Icon/Icon.stories.jsx +156 -51
- package/src/stories/Atoms/Image/Image.css +231 -15
- package/src/stories/Atoms/Image/Image.jsx +166 -32
- package/src/stories/Atoms/Image/Image.stories.jsx +319 -28
- package/src/stories/Atoms/Label/Label.css +158 -16
- package/src/stories/Atoms/Label/Label.jsx +61 -31
- package/src/stories/Atoms/Label/Label.stories.jsx +167 -28
- package/src/stories/Atoms/Link/Link.css +58 -16
- package/src/stories/Atoms/Link/Link.jsx +73 -32
- package/src/stories/Atoms/Link/Link.stories.jsx +141 -29
- package/src/stories/Atoms/Loader/Loader.css +93 -16
- package/src/stories/Atoms/Loader/Loader.jsx +47 -30
- package/src/stories/Atoms/Loader/Loader.stories.jsx +86 -28
- package/src/stories/Atoms/Logo/Logo.css +94 -0
- package/src/stories/Atoms/Logo/Logo.jsx +53 -0
- package/src/stories/Atoms/Logo/Logo.stories.jsx +120 -0
- package/src/stories/Atoms/Paragraph/Paragraph.css +167 -16
- package/src/stories/Atoms/Paragraph/Paragraph.jsx +67 -31
- package/src/stories/Atoms/Paragraph/Paragraph.stories.jsx +130 -28
- package/src/stories/Atoms/ProgressBar/ProgressBar.css +115 -17
- package/src/stories/Atoms/ProgressBar/ProgressBar.jsx +30 -31
- package/src/stories/Atoms/ProgressBar/ProgressBar.stories.jsx +72 -27
- package/src/stories/Atoms/RadioButton/RadioButton.css +118 -17
- package/src/stories/Atoms/RadioButton/RadioButton.jsx +77 -31
- package/src/stories/Atoms/RadioButton/RadioButton.stories.jsx +99 -27
- package/src/stories/Atoms/Range/Range.css +169 -0
- package/src/stories/Atoms/Range/Range.jsx +87 -0
- package/src/stories/Atoms/Range/Range.stories.jsx +110 -0
- package/src/stories/Atoms/Select/Select.css +74 -16
- package/src/stories/Atoms/Select/Select.jsx +62 -30
- package/src/stories/Atoms/Select/Select.stories.jsx +95 -27
- package/src/stories/Atoms/Slider/Slider.css +77 -16
- package/src/stories/Atoms/Slider/Slider.jsx +119 -31
- package/src/stories/Atoms/Slider/Slider.stories.jsx +77 -28
- package/src/stories/Atoms/Snackbar/Snackbar.css +297 -13
- package/src/stories/Atoms/Snackbar/Snackbar.jsx +62 -31
- package/src/stories/Atoms/Snackbar/Snackbar.stories.jsx +63 -26
- package/src/stories/Atoms/Spacer/Spacer.css +101 -16
- package/src/stories/Atoms/Spacer/Spacer.jsx +26 -32
- package/src/stories/Atoms/Spacer/Spacer.stories.jsx +50 -30
- package/src/stories/Atoms/Spinner/Spinner.css +97 -16
- package/src/stories/Atoms/Spinner/Spinner.jsx +50 -26
- package/src/stories/Atoms/Spinner/Spinner.stories.jsx +47 -30
- package/src/stories/Atoms/Tag/Tag.css +97 -14
- package/src/stories/Atoms/Tag/Tag.jsx +58 -24
- package/src/stories/Atoms/Tag/Tag.stories.jsx +55 -29
- package/src/stories/Atoms/TextArea/TextArea.css +84 -15
- package/src/stories/Atoms/TextArea/TextArea.jsx +107 -31
- package/src/stories/Atoms/TextArea/TextArea.stories.jsx +24 -30
- package/src/stories/Atoms/TextInput/TextInput.css +89 -17
- package/src/stories/Atoms/TextInput/TextInput.jsx +118 -27
- package/src/stories/Atoms/TextInput/TextInput.stories.jsx +52 -25
- package/src/stories/Atoms/Toggle/Toggle.css +105 -17
- package/src/stories/Atoms/Toggle/Toggle.jsx +55 -28
- package/src/stories/Atoms/Toggle/Toggle.stories.jsx +23 -30
- package/src/stories/Atoms/Tooltip/Tooltip.css +367 -14
- package/src/stories/Atoms/Tooltip/Tooltip.jsx +32 -28
- package/src/stories/Atoms/Tooltip/Tooltip.stories.jsx +41 -31
- package/src/stories/Atoms/Video/Video.css +27 -18
- package/src/stories/Atoms/Video/Video.jsx +65 -29
- package/src/stories/Atoms/Video/Video.stories.jsx +29 -30
- package/src/stories/Atoms/index.js +5 -2
- package/src/stories/Atoms/meta_Atoms.js +3 -1
- package/src/stories/Layouts/Accordion/Accordion.css +16 -0
- package/src/stories/Layouts/Accordion/Accordion.jsx +31 -0
- package/src/stories/Layouts/Accordion/Accordion.stories.jsx +28 -0
- package/src/stories/Layouts/DropdownMenu/DropdownMenu.css +16 -0
- package/src/stories/Layouts/DropdownMenu/DropdownMenu.jsx +31 -0
- package/src/stories/Layouts/DropdownMenu/DropdownMenu.stories.jsx +28 -0
- package/src/stories/Layouts/Flexbox/Flexbox.css +16 -0
- package/src/stories/Layouts/Flexbox/Flexbox.jsx +11 -0
- package/src/stories/Layouts/Flexbox/Flexbox.stories.jsx +28 -0
- package/src/stories/Layouts/Footer/Footer.css +16 -0
- package/src/stories/Layouts/Footer/Footer.jsx +31 -0
- package/src/stories/Layouts/Footer/Footer.stories.jsx +28 -0
- package/src/stories/Layouts/Grid/Grid.jsx +2 -4
- package/src/stories/Layouts/Grid/Grid.stories.jsx +20 -18
- package/src/stories/Layouts/Header/Header.css +16 -0
- package/src/stories/Layouts/Header/Header.jsx +31 -0
- package/src/stories/Layouts/Header/Header.stories.jsx +28 -0
- package/src/stories/Layouts/HeroBanner/HeroBanner.css +16 -0
- package/src/stories/Layouts/HeroBanner/HeroBanner.jsx +31 -0
- package/src/stories/Layouts/HeroBanner/HeroBanner.stories.jsx +28 -0
- package/src/stories/Layouts/HeroImageVideo/HeroImageVideo.css +16 -0
- package/src/stories/Layouts/HeroImageVideo/HeroImageVideo.jsx +31 -0
- package/src/stories/Layouts/HeroImageVideo/HeroImageVideo.stories.jsx +28 -0
- package/src/stories/Layouts/Pagination/Pagination.css +16 -0
- package/src/stories/Layouts/Pagination/Pagination.jsx +31 -0
- package/src/stories/Layouts/Pagination/Pagination.stories.jsx +28 -0
- package/src/stories/Layouts/Section/Section.css +16 -0
- package/src/stories/Layouts/Section/Section.jsx +31 -0
- package/src/stories/Layouts/Section/Section.stories.jsx +28 -0
- package/src/stories/Layouts/Sidebar/Sidebar.css +16 -0
- package/src/stories/Layouts/Sidebar/Sidebar.jsx +71 -0
- package/src/stories/Layouts/Sidebar/Sidebar.stories.jsx +28 -0
- package/src/stories/Layouts/Tabs/Tabs.css +16 -0
- package/src/stories/Layouts/Tabs/Tabs.jsx +31 -0
- package/src/stories/Layouts/Tabs/Tabs.stories.jsx +28 -0
- package/src/stories/Layouts/index.js +31 -0
- package/src/stories/Layouts/meta_Layouts.js +31 -0
- package/src/stories/Molecules/Navbar/Navbar.css +63 -59
- package/src/stories/Molecules/Navbar/Navbar.jsx +43 -48
- package/src/stories/Molecules/Navbar/Navbar.stories.jsx +58 -8
- package/src/stories/Molecules/SearchBar/SearchBar.css +66 -1
- package/src/stories/Molecules/SearchBar/SearchBar.jsx +59 -11
- package/src/stories/Molecules/SearchBar/SearchBar.stories.jsx +16 -7
- package/src/stories/Molecules/SelectTheme/SelectTheme.jsx +16 -38
- package/src/stories/Molecules/SelectTheme/SelectTheme.stories.jsx +1 -2
- package/src/stories/Molecules/Sidebar/Sidebar.css +65 -2
- package/src/stories/Molecules/Sidebar/Sidebar.jsx +66 -11
- package/src/stories/Molecules/Sidebar/Sidebar.stories.jsx +20 -5
- package/src/stories/Templates/AdminDashboard/AdminDashboard.css +7 -0
- package/src/stories/Templates/AdminDashboard/AdminDashboard.jsx +24 -0
- package/src/stories/Templates/AdminDashboard/AdminDashboard.stories.jsx +20 -0
- package/src/stories/Templates/CallToAction/CallToAction.css +7 -0
- package/src/stories/Templates/CallToAction/CallToAction.jsx +24 -0
- package/src/stories/Templates/CallToAction/CallToAction.stories.jsx +20 -0
- package/src/stories/Templates/FeaturesList/FeaturesList.css +7 -0
- package/src/stories/Templates/FeaturesList/FeaturesList.jsx +24 -0
- package/src/stories/Templates/FeaturesList/FeaturesList.stories.jsx +20 -0
- package/src/stories/Templates/FormSection/FormSection.css +7 -0
- package/src/stories/Templates/FormSection/FormSection.jsx +24 -0
- package/src/stories/Templates/FormSection/FormSection.stories.jsx +20 -0
- package/src/stories/Templates/HeroSection/HeroSection.css +7 -0
- package/src/stories/Templates/HeroSection/HeroSection.jsx +24 -0
- package/src/stories/Templates/HeroSection/HeroSection.stories.jsx +20 -0
- package/src/stories/Templates/LocationInfo/LocationInfo.css +7 -0
- package/src/stories/Templates/LocationInfo/LocationInfo.jsx +24 -0
- package/src/stories/Templates/LocationInfo/LocationInfo.stories.jsx +20 -0
- package/src/stories/Templates/ProductPage/ProductPage.css +7 -0
- package/src/stories/Templates/ProductPage/ProductPage.jsx +24 -0
- package/src/stories/Templates/ProductPage/ProductPage.stories.jsx +20 -0
- package/src/stories/Templates/RegistrationPage/RegistrationPage.css +7 -0
- package/src/stories/Templates/RegistrationPage/RegistrationPage.jsx +24 -0
- package/src/stories/Templates/RegistrationPage/RegistrationPage.stories.jsx +20 -0
- package/src/stories/Templates/ShoppingCart/ShoppingCart.css +7 -0
- package/src/stories/Templates/ShoppingCart/ShoppingCart.jsx +24 -0
- package/src/stories/Templates/ShoppingCart/ShoppingCart.stories.jsx +20 -0
- package/src/stories/Templates/SidebarTopNav/SidebarTopNav.css +7 -0
- package/src/stories/Templates/SidebarTopNav/SidebarTopNav.jsx +24 -0
- package/src/stories/Templates/SidebarTopNav/SidebarTopNav.stories.jsx +20 -0
- package/src/stories/Templates/SignInPage/SignInPage.css +7 -0
- package/src/stories/Templates/SignInPage/SignInPage.jsx +24 -0
- package/src/stories/Templates/SignInPage/SignInPage.stories.jsx +20 -0
- package/src/stories/Templates/SocialMediaLinks/SocialMediaLinks.css +7 -0
- package/src/stories/Templates/SocialMediaLinks/SocialMediaLinks.jsx +24 -0
- package/src/stories/Templates/SocialMediaLinks/SocialMediaLinks.stories.jsx +20 -0
- package/src/stories/Templates/Testimonials/Testimonials.css +7 -0
- package/src/stories/Templates/Testimonials/Testimonials.jsx +24 -0
- package/src/stories/Templates/Testimonials/Testimonials.stories.jsx +20 -0
- package/src/stories/Templates/index.js +33 -0
- package/src/stories/Templates/{Templates.js → meta_Templates.js} +3 -1
- package/src/stories/assets/logo.png +0 -0
- package/src/stories/assets/logo.svg +106 -0
- package/src/stories/assets/test.svg +3 -0
- package/src/themes/README.md +301 -0
- package/src/themes/ThemeProvider.jsx +47 -22
- package/src/themes/styles/dracula/dark.css +0 -0
- package/src/themes/styles/dracula/light.css +0 -0
- package/src/themes/styles/github/dark.css +0 -0
- package/src/themes/styles/github/light.css +0 -0
- package/src/themes/styles/neurons/dark.css +247 -0
- package/src/themes/styles/neurons/light.css +280 -0
- package/dist/github-3688a83a.js +0 -5
- package/dist/gothic-94a7ecd6.js +0 -5
- package/dist/newsprint-32bf94d9.js +0 -5
- package/dist/night-4a954853.js +0 -5
- package/dist/pixyll-94de4610.js +0 -5
- package/dist/whitey-db68723e.js +0 -5
- package/src/MDXEditor.jsx +0 -32
- package/src/stories/Atoms/RangeInput/RangeInput.css +0 -29
- package/src/stories/Atoms/RangeInput/RangeInput.jsx +0 -41
- package/src/stories/Atoms/RangeInput/RangeInput.stories.jsx +0 -41
- package/src/stories/Components.md +0 -189
- package/src/stories/Layouts/Layout.js +0 -28
- package/src/styles/Header.modules.css +0 -32
- package/src/styles/global.css +0 -59
- package/src/themes/Themes.js +0 -44
- package/src/themes/dark.js +0 -22
- package/src/themes/light.js +0 -22
- package/src/themes/typ/Readme.md +0 -4
- package/src/themes/typ/github/open-sans-v17-latin-ext_latin-700.woff2 +0 -0
- package/src/themes/typ/github/open-sans-v17-latin-ext_latin-700italic.woff2 +0 -0
- package/src/themes/typ/github/open-sans-v17-latin-ext_latin-italic.woff2 +0 -0
- package/src/themes/typ/github/open-sans-v17-latin-ext_latin-regular.woff2 +0 -0
- package/src/themes/typ/github.css +0 -416
- package/src/themes/typ/gothic/GUST e-foundry License.txt +0 -29
- package/src/themes/typ/gothic/didact-gothic-c-ext.woff2 +0 -0
- package/src/themes/typ/gothic/didact-gothic-c.woff2 +0 -0
- package/src/themes/typ/gothic/texgyreadventor-bold.woff +0 -0
- package/src/themes/typ/gothic/texgyreadventor-bolditalic.woff +0 -0
- package/src/themes/typ/gothic/texgyreadventor-italic.woff +0 -0
- package/src/themes/typ/gothic/texgyreadventor-regular.woff +0 -0
- package/src/themes/typ/gothic.css +0 -410
- package/src/themes/typ/newsprint/pt-serif-v11-latin-700.woff2 +0 -0
- package/src/themes/typ/newsprint/pt-serif-v11-latin-700italic.woff2 +0 -0
- package/src/themes/typ/newsprint/pt-serif-v11-latin-italic.woff2 +0 -0
- package/src/themes/typ/newsprint/pt-serif-v11-latin-regular.woff2 +0 -0
- package/src/themes/typ/newsprint.css +0 -622
- package/src/themes/typ/night/codeblock.dark.css +0 -113
- package/src/themes/typ/night/credit.html +0 -1
- package/src/themes/typ/night/cursor.png +0 -0
- package/src/themes/typ/night/cursor@2x.png +0 -0
- package/src/themes/typ/night/mermaid.dark.css +0 -7
- package/src/themes/typ/night/sourcemode.dark.css +0 -38
- package/src/themes/typ/night.css +0 -1032
- package/src/themes/typ/pixyll/lato-v14-latin-300.woff +0 -0
- package/src/themes/typ/pixyll/lato-v14-latin-300italic.woff +0 -0
- package/src/themes/typ/pixyll/lato-v14-latin-900.woff +0 -0
- package/src/themes/typ/pixyll/lato-v14-latin-900italic.woff +0 -0
- package/src/themes/typ/pixyll/merriweather-v19-latin-300.woff +0 -0
- package/src/themes/typ/pixyll/merriweather-v19-latin-300italic.woff +0 -0
- package/src/themes/typ/pixyll/merriweather-v19-latin-700.woff +0 -0
- package/src/themes/typ/pixyll/merriweather-v19-latin-700italic.woff +0 -0
- package/src/themes/typ/pixyll.css +0 -528
- package/src/themes/typ/whitey.css +0 -299
- /package/src/stories/Molecules/{Molecules.js → meta_Molecules.js} +0 -0
- /package/src/stories/Organisms/{Organisms.js → meta_Organisms.js} +0 -0
|
@@ -1,48 +1,240 @@
|
|
|
1
|
-
/* src/stories/
|
|
1
|
+
/* src/stories/Atoms/Icon/Icon.css */
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
.icon-container {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.icon-container--background {
|
|
10
|
+
background-color: var(--color-var);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.icon-container--shape-rounded {
|
|
14
|
+
border-radius: 50%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.icon-container--shape-square {
|
|
18
|
+
border-radius: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.icon-container--size-small {
|
|
22
|
+
width: var(--font-size-small);
|
|
23
|
+
height: var(--font-size-small);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.icon-container--size-normal {
|
|
27
|
+
width: var(--font-size-base);
|
|
28
|
+
height: var(--font-size-base);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.icon-container--size-big {
|
|
32
|
+
width: var(--font-size-large);
|
|
33
|
+
height: var(--font-size-large);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.icon-container--align-left {
|
|
37
|
+
justify-content: flex-start;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.icon-container--align-center {
|
|
41
|
+
justify-content: center;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.icon-container--align-right {
|
|
45
|
+
justify-content: flex-end;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Background Color Classes */
|
|
49
|
+
.icon-container--color-info {
|
|
50
|
+
background-color: var(--info-color);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.icon-container--color-warning {
|
|
54
|
+
background-color: var(--warning-color);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.icon-container--color-alert {
|
|
58
|
+
background-color: var(--alert-color);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.icon-container--color-success {
|
|
62
|
+
background-color: var(--success-color);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.icon-container--color-neutral {
|
|
66
|
+
background-color: var(--neutral-color);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.icon-container--color-dark {
|
|
70
|
+
background-color: var(--dark-color);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.icon-container--color-classy-color-1 {
|
|
74
|
+
background-color: var(--classy-color-1);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.icon-container--color-classy-color-2 {
|
|
78
|
+
background-color: var(--classy-color-2);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.icon-container--color-classy-color-3 {
|
|
82
|
+
background-color: var(--classy-color-3);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.icon-container--color-classy-color-4 {
|
|
86
|
+
background-color: var(--classy-color-4);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.icon-container--color-classy-color-5 {
|
|
90
|
+
background-color: var(--classy-color-5);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.icon-container--color-small-switch-color-1 {
|
|
94
|
+
background-color: var(--small-switch-color-1);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.icon-container--color-small-switch-color-2 {
|
|
98
|
+
background-color: var(--small-switch-color-2);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.icon-container--color-natural-color-1 {
|
|
102
|
+
background-color: var(--natural-color-1);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.icon-container--color-natural-color-2 {
|
|
106
|
+
background-color: var(--natural-color-2);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.icon-container--color-natural-color-3 {
|
|
110
|
+
background-color: var(--natural-color-3);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.icon-container--color-grey-friend-1 {
|
|
114
|
+
background-color: var(--grey-friend-1);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.icon-container--color-grey-friend-2 {
|
|
118
|
+
background-color: var(--grey-friend-2);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.icon-container--color-shade-1 {
|
|
122
|
+
background-color: var(--shade-1);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.icon-container--color-shade-2 {
|
|
126
|
+
background-color: var(--shade-2);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.icon-container--color-shade-3 {
|
|
130
|
+
background-color: var(--shade-3);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.icon-container--color-shade-4 {
|
|
134
|
+
background-color: var(--shade-4);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* Icon Styles */
|
|
4
138
|
.icon {
|
|
5
139
|
display: inline-block;
|
|
6
|
-
vertical-align: middle;
|
|
7
140
|
}
|
|
8
141
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
142
|
+
.icon--color-info {
|
|
143
|
+
color: var(--info-color);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.icon--color-warning {
|
|
147
|
+
color: var(--warning-color);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.icon--color-alert {
|
|
151
|
+
color: var(--alert-color);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.icon--color-success {
|
|
155
|
+
color: var(--success-color);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.icon--color-neutral {
|
|
159
|
+
color: var(--neutral-color);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.icon--color-dark {
|
|
163
|
+
color: var(--dark-color);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.icon--color-classy-color-1 {
|
|
167
|
+
color: var(--classy-color-1);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.icon--color-classy-color-2 {
|
|
171
|
+
color: var(--classy-color-2);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.icon--color-classy-color-3 {
|
|
175
|
+
color: var(--classy-color-3);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.icon--color-classy-color-4 {
|
|
179
|
+
color: var(--classy-color-4);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.icon--color-classy-color-5 {
|
|
183
|
+
color: var(--classy-color-5);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.icon--color-small-switch-color-1 {
|
|
187
|
+
color: var(--small-switch-color-1);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.icon--color-small-switch-color-2 {
|
|
191
|
+
color: var(--small-switch-color-2);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.icon--color-natural-color-1 {
|
|
195
|
+
color: var(--natural-color-1);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.icon--color-natural-color-2 {
|
|
199
|
+
color: var(--natural-color-2);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.icon--color-natural-color-3 {
|
|
203
|
+
color: var(--natural-color-3);
|
|
13
204
|
}
|
|
14
205
|
|
|
15
|
-
.icon--
|
|
16
|
-
|
|
17
|
-
height: 24px;
|
|
206
|
+
.icon--color-grey-friend-1 {
|
|
207
|
+
color: var(--grey-friend-1);
|
|
18
208
|
}
|
|
19
209
|
|
|
20
|
-
.icon--
|
|
21
|
-
|
|
22
|
-
height: 32px;
|
|
210
|
+
.icon--color-grey-friend-2 {
|
|
211
|
+
color: var(--grey-friend-2);
|
|
23
212
|
}
|
|
24
213
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
fill: #1e88e5;
|
|
214
|
+
.icon--color-shade-1 {
|
|
215
|
+
color: var(--shade-1);
|
|
28
216
|
}
|
|
29
217
|
|
|
30
|
-
.icon--
|
|
31
|
-
|
|
218
|
+
.icon--color-shade-2 {
|
|
219
|
+
color: var(--shade-2);
|
|
32
220
|
}
|
|
33
221
|
|
|
34
|
-
.icon--
|
|
35
|
-
|
|
222
|
+
.icon--color-shade-3 {
|
|
223
|
+
color: var(--shade-3);
|
|
36
224
|
}
|
|
37
225
|
|
|
38
|
-
.icon--
|
|
39
|
-
|
|
226
|
+
.icon--color-shade-4 {
|
|
227
|
+
color: var(--shade-4);
|
|
40
228
|
}
|
|
41
229
|
|
|
42
|
-
.icon--
|
|
43
|
-
|
|
230
|
+
.icon--size-small {
|
|
231
|
+
font-size: var(--font-size-small);
|
|
44
232
|
}
|
|
45
233
|
|
|
46
|
-
.icon--
|
|
47
|
-
|
|
48
|
-
}
|
|
234
|
+
.icon--size-normal {
|
|
235
|
+
font-size: var(--font-size-base);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.icon--size-big {
|
|
239
|
+
font-size: var(--font-size-large);
|
|
240
|
+
}
|
|
@@ -1,51 +1,80 @@
|
|
|
1
|
-
// src/stories/
|
|
2
|
-
|
|
1
|
+
// src/stories/Atoms/Icon/Icon.jsx
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import PropTypes from 'prop-types';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
5
|
import './Icon.css';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
export const Icon = ({
|
|
8
|
+
icon: IconComponent,
|
|
9
|
+
background = false,
|
|
10
|
+
color = 'neutral',
|
|
11
|
+
shape = 'square',
|
|
12
|
+
size = 'normal',
|
|
13
|
+
align = 'left',
|
|
14
|
+
className = '',
|
|
15
|
+
style = {},
|
|
16
|
+
...props
|
|
17
|
+
}) => {
|
|
18
|
+
const containerClasses = classNames('icon-container', className, {
|
|
19
|
+
'icon-container--background': background,
|
|
20
|
+
[`icon-container--shape-${shape}`]: shape,
|
|
21
|
+
[`icon-container--size-${size}`]: size,
|
|
22
|
+
[`icon-container--align-${align}`]: align,
|
|
23
|
+
[`icon-container--color-${color}`]: background,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const iconClasses = classNames('icon', {
|
|
27
|
+
[`icon--color-${color}`]: !background,
|
|
28
|
+
[`icon--size-${size}`]: size,
|
|
29
|
+
});
|
|
13
30
|
|
|
14
|
-
return (
|
|
15
|
-
<
|
|
16
|
-
className={
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
</svg>
|
|
31
|
+
return background ? (
|
|
32
|
+
<div className={containerClasses} style={style} {...props}>
|
|
33
|
+
<IconComponent className={iconClasses} />
|
|
34
|
+
</div>
|
|
35
|
+
) : (
|
|
36
|
+
<IconComponent className={iconClasses} style={style} {...props} />
|
|
21
37
|
);
|
|
22
38
|
};
|
|
23
39
|
|
|
24
40
|
Icon.propTypes = {
|
|
25
|
-
/**
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Size of the icon
|
|
31
|
-
*/
|
|
32
|
-
size: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
33
|
-
/**
|
|
34
|
-
* Color variant of the icon
|
|
35
|
-
*/
|
|
41
|
+
/** Icon component from react-icons or similar library */
|
|
42
|
+
icon: PropTypes.elementType.isRequired,
|
|
43
|
+
/** Whether to display a background behind the icon */
|
|
44
|
+
background: PropTypes.bool,
|
|
45
|
+
/** Color of the icon or background */
|
|
36
46
|
color: PropTypes.oneOf([
|
|
37
|
-
'primary',
|
|
38
|
-
'secondary',
|
|
39
|
-
'success',
|
|
40
|
-
'danger',
|
|
41
|
-
'warning',
|
|
42
47
|
'info',
|
|
48
|
+
'warning',
|
|
49
|
+
'alert',
|
|
50
|
+
'success',
|
|
51
|
+
'neutral',
|
|
52
|
+
'dark',
|
|
53
|
+
'classy-color-1',
|
|
54
|
+
'classy-color-2',
|
|
55
|
+
'classy-color-3',
|
|
56
|
+
'classy-color-4',
|
|
57
|
+
'classy-color-5',
|
|
58
|
+
'small-switch-color-1',
|
|
59
|
+
'small-switch-color-2',
|
|
60
|
+
'natural-color-1',
|
|
61
|
+
'natural-color-2',
|
|
62
|
+
'natural-color-3',
|
|
63
|
+
'grey-friend-1',
|
|
64
|
+
'grey-friend-2',
|
|
65
|
+
'shade-1',
|
|
66
|
+
'shade-2',
|
|
67
|
+
'shade-3',
|
|
68
|
+
'shade-4',
|
|
43
69
|
]),
|
|
70
|
+
/** Shape of the background */
|
|
71
|
+
shape: PropTypes.oneOf(['rounded', 'square']),
|
|
72
|
+
/** Size of the icon */
|
|
73
|
+
size: PropTypes.oneOf(['small', 'normal', 'big']),
|
|
74
|
+
/** Alignment of the icon within its container */
|
|
75
|
+
align: PropTypes.oneOf(['left', 'center', 'right']),
|
|
76
|
+
/** Additional CSS classes */
|
|
77
|
+
className: PropTypes.string,
|
|
78
|
+
/** Inline styles */
|
|
79
|
+
style: PropTypes.object,
|
|
44
80
|
};
|
|
45
|
-
|
|
46
|
-
Icon.defaultProps = {
|
|
47
|
-
size: 'medium',
|
|
48
|
-
color: 'primary',
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export default Icon;
|
|
@@ -1,72 +1,177 @@
|
|
|
1
|
-
// src/stories/
|
|
2
|
-
|
|
1
|
+
// src/stories/Atoms/Icon/Icon.stories.jsx
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import { Icon } from './Icon';
|
|
4
|
+
import { FaBeer, FaCoffee, FaApple, FaAndroid, FaReact, FaCheck, FaTimes, FaInfoCircle, FaExclamationTriangle, FaQuestionCircle } from 'react-icons/fa';
|
|
5
|
+
import './Icon.css';
|
|
5
6
|
|
|
6
7
|
export default {
|
|
7
8
|
title: 'Atoms/Media/Icon',
|
|
8
9
|
component: Icon,
|
|
9
|
-
parameters: {
|
|
10
|
-
layout: 'centered',
|
|
11
|
-
},
|
|
12
10
|
argTypes: {
|
|
13
|
-
|
|
14
|
-
control: '
|
|
15
|
-
description: '
|
|
11
|
+
icon: {
|
|
12
|
+
control: 'object',
|
|
13
|
+
description: 'Icon component from react-icons or similar library.',
|
|
14
|
+
},
|
|
15
|
+
background: {
|
|
16
|
+
control: 'boolean',
|
|
17
|
+
description: 'Whether to display a background behind the icon.',
|
|
18
|
+
},
|
|
19
|
+
color: {
|
|
20
|
+
control: {
|
|
21
|
+
type: 'select',
|
|
22
|
+
options: [
|
|
23
|
+
'info',
|
|
24
|
+
'warning',
|
|
25
|
+
'alert',
|
|
26
|
+
'success',
|
|
27
|
+
'neutral',
|
|
28
|
+
'dark',
|
|
29
|
+
'classy-color-1',
|
|
30
|
+
'classy-color-2',
|
|
31
|
+
'classy-color-3',
|
|
32
|
+
'classy-color-4',
|
|
33
|
+
'classy-color-5',
|
|
34
|
+
'small-switch-color-1',
|
|
35
|
+
'small-switch-color-2',
|
|
36
|
+
'natural-color-1',
|
|
37
|
+
'natural-color-2',
|
|
38
|
+
'natural-color-3',
|
|
39
|
+
'grey-friend-1',
|
|
40
|
+
'grey-friend-2',
|
|
41
|
+
'shade-1',
|
|
42
|
+
'shade-2',
|
|
43
|
+
'shade-3',
|
|
44
|
+
'shade-4',
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
description: 'Color of the icon or background.',
|
|
48
|
+
},
|
|
49
|
+
shape: {
|
|
50
|
+
control: {
|
|
51
|
+
type: 'select',
|
|
52
|
+
options: ['rounded', 'square'],
|
|
53
|
+
},
|
|
54
|
+
description: 'Shape of the icon background.',
|
|
16
55
|
},
|
|
17
56
|
size: {
|
|
18
|
-
control:
|
|
19
|
-
|
|
57
|
+
control: {
|
|
58
|
+
type: 'select',
|
|
59
|
+
options: ['small', 'normal', 'big'],
|
|
60
|
+
},
|
|
20
61
|
description: 'Size of the icon.',
|
|
21
62
|
},
|
|
22
|
-
|
|
23
|
-
control:
|
|
24
|
-
|
|
25
|
-
|
|
63
|
+
align: {
|
|
64
|
+
control: {
|
|
65
|
+
type: 'select',
|
|
66
|
+
options: ['left', 'center', 'right'],
|
|
67
|
+
},
|
|
68
|
+
description: 'Alignment of the icon within its container.',
|
|
69
|
+
},
|
|
70
|
+
className: {
|
|
71
|
+
control: 'text',
|
|
72
|
+
description: 'Additional CSS classes.',
|
|
73
|
+
},
|
|
74
|
+
style: {
|
|
75
|
+
control: 'object',
|
|
76
|
+
description: 'Inline styles.',
|
|
26
77
|
},
|
|
27
78
|
},
|
|
28
79
|
};
|
|
29
80
|
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
81
|
+
const icons = {
|
|
82
|
+
FaBeer: FaBeer,
|
|
83
|
+
FaCoffee: FaCoffee,
|
|
84
|
+
FaApple: FaApple,
|
|
85
|
+
FaAndroid: FaAndroid,
|
|
86
|
+
FaReact: FaReact,
|
|
87
|
+
FaCheck: FaCheck,
|
|
88
|
+
FaTimes: FaTimes,
|
|
89
|
+
FaInfoCircle: FaInfoCircle,
|
|
90
|
+
FaExclamationTriangle: FaExclamationTriangle,
|
|
91
|
+
FaQuestionCircle: FaQuestionCircle,
|
|
37
92
|
};
|
|
38
93
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
94
|
+
/**
|
|
95
|
+
* All Icons Collection
|
|
96
|
+
*/
|
|
97
|
+
export const AllIcons = () => (
|
|
98
|
+
<div className="icon-collection">
|
|
99
|
+
{Object.entries(icons).map(([name, IconComponent]) => (
|
|
100
|
+
<div key={name} className="icon-item">
|
|
101
|
+
<Icon
|
|
102
|
+
icon={IconComponent}
|
|
103
|
+
background={false}
|
|
104
|
+
color="neutral"
|
|
105
|
+
shape="square"
|
|
106
|
+
size="normal"
|
|
107
|
+
/>
|
|
108
|
+
<p>{name}</p>
|
|
109
|
+
</div>
|
|
110
|
+
))}
|
|
111
|
+
</div>
|
|
112
|
+
);
|
|
45
113
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
114
|
+
/**
|
|
115
|
+
* Icon with Background
|
|
116
|
+
*/
|
|
117
|
+
export const IconWithBackground = () => (
|
|
118
|
+
<Icon
|
|
119
|
+
icon={FaBeer}
|
|
120
|
+
background
|
|
121
|
+
color="success"
|
|
122
|
+
shape="rounded"
|
|
123
|
+
size="big"
|
|
124
|
+
align="center"
|
|
125
|
+
/>
|
|
126
|
+
);
|
|
52
127
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
128
|
+
/**
|
|
129
|
+
* Icon without Background
|
|
130
|
+
*/
|
|
131
|
+
export const IconWithoutBackground = () => (
|
|
132
|
+
<Icon
|
|
133
|
+
icon={FaCoffee}
|
|
134
|
+
background={false}
|
|
135
|
+
color="warning"
|
|
136
|
+
size="normal"
|
|
137
|
+
align="left"
|
|
138
|
+
/>
|
|
139
|
+
);
|
|
59
140
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
141
|
+
/**
|
|
142
|
+
* Rounded Icon with Different Colors
|
|
143
|
+
*/
|
|
144
|
+
export const RoundedIcons = () => (
|
|
145
|
+
<div className="icon-story">
|
|
146
|
+
<Icon icon={FaApple} background color="info" shape="rounded" size="small" />
|
|
147
|
+
<Icon icon={FaAndroid} background color="alert" shape="rounded" size="normal" />
|
|
148
|
+
<Icon icon={FaReact} background color="shade-3" shape="rounded" size="big" />
|
|
149
|
+
</div>
|
|
150
|
+
);
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Square Icon with Different Colors
|
|
154
|
+
*/
|
|
155
|
+
export const SquareIcons = () => (
|
|
156
|
+
<div className="icon-story">
|
|
157
|
+
<Icon icon={FaBeer} background color="neutral" shape="square" size="small" />
|
|
158
|
+
<Icon icon={FaCoffee} background color="dark" shape="square" size="normal" />
|
|
159
|
+
<Icon icon={FaApple} background color="classy-color-2" shape="square" size="big" />
|
|
160
|
+
</div>
|
|
161
|
+
);
|
|
66
162
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
};
|
|
163
|
+
/**
|
|
164
|
+
* Interactive Icon
|
|
165
|
+
*/
|
|
166
|
+
const Template = (args) => <Icon {...args} />;
|
|
167
|
+
|
|
168
|
+
export const InteractiveIcon = Template.bind({});
|
|
169
|
+
InteractiveIcon.args = {
|
|
170
|
+
icon: FaReact,
|
|
171
|
+
background: false,
|
|
172
|
+
color: 'info',
|
|
173
|
+
shape: 'rounded',
|
|
174
|
+
size: 'normal',
|
|
175
|
+
align: 'center',
|
|
176
|
+
};
|
|
177
|
+
InteractiveIcon.storyName = 'Interactive Icon';
|