stargazer-ui 1.5.23 → 1.5.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/.babelrc.json +9 -9
  2. package/.eslintrc.cjs +17 -17
  3. package/.gitattributes +2 -2
  4. package/.github/workflows/npm-publish.yml +24 -0
  5. package/LICENSE +21 -21
  6. package/dev/index.html +15 -15
  7. package/dev/index.jsx +46 -46
  8. package/dev/index.scss +74 -74
  9. package/dev/pages/ButtonPage.jsx +43 -43
  10. package/dev/pages/CardPage.jsx +80 -80
  11. package/dev/pages/DropdownPage.jsx +31 -31
  12. package/dev/pages/FormPage.jsx +162 -162
  13. package/dev/pages/ListPage.jsx +51 -51
  14. package/dev/pages/ModalPage.jsx +37 -37
  15. package/dev/pages/OverlayPage.jsx +38 -38
  16. package/dev/pages/components.jsx +19 -19
  17. package/dev/test.jsx +86 -86
  18. package/package.json +3 -2
  19. package/rollup.config.js +139 -139
  20. package/scripts/writePackageJsons.js +41 -41
  21. package/src/Bar/Bar.type.ts +8 -8
  22. package/src/Button/Button.tsx +20 -20
  23. package/src/Button/Button.types.ts +7 -7
  24. package/src/Button/index.ts +2 -2
  25. package/src/ButtonGroup/ButtonGroup.tsx +13 -13
  26. package/src/ButtonGroup/ButtonGroup.types.ts +7 -7
  27. package/src/ButtonGroup/index.ts +2 -2
  28. package/src/Card/Card.tsx +69 -69
  29. package/src/Card/Card.types.ts +32 -32
  30. package/src/Card/index.ts +2 -2
  31. package/src/CloseButton/CloseButton.tsx +13 -13
  32. package/src/CloseButton/CloseButton.types.ts +5 -5
  33. package/src/CloseButton/index.ts +2 -2
  34. package/src/Dropdown/Dropdown.tsx +440 -440
  35. package/src/Dropdown/Dropdown.types.ts +59 -59
  36. package/src/Dropdown/index.ts +3 -3
  37. package/src/FileUploadButton/FileUploadButton.tsx +26 -26
  38. package/src/FileUploadButton/FileUploadButton.types.ts +8 -8
  39. package/src/FileUploadButton/index.ts +2 -2
  40. package/src/FloatingLabel/FloatingLabel.tsx +21 -21
  41. package/src/FloatingLabel/FloatingLabel.types.ts +10 -10
  42. package/src/FloatingLabel/index.ts +2 -2
  43. package/src/Form/Form.tsx +398 -398
  44. package/src/Form/Form.types.ts +168 -168
  45. package/src/Form/FormSelect.tsx +619 -619
  46. package/src/Form/index.ts +3 -3
  47. package/src/InputGroup/InputGroup.tsx +45 -45
  48. package/src/InputGroup/InputGroup.types.ts +21 -21
  49. package/src/InputGroup/index.ts +3 -3
  50. package/src/List/List.tsx +112 -112
  51. package/src/List/List.types.ts +33 -33
  52. package/src/List/index.ts +3 -3
  53. package/src/Modal/Modal.tsx +228 -228
  54. package/src/Modal/Modal.types.ts +48 -48
  55. package/src/Modal/index.ts +3 -3
  56. package/src/Nav/Nav.tsx +42 -42
  57. package/src/Nav/Nav.types.ts +20 -20
  58. package/src/Nav/index.ts +3 -3
  59. package/src/NavBar/Navbar.tsx +56 -56
  60. package/src/NavBar/Navbar.types.ts +23 -23
  61. package/src/NavBar/index.ts +3 -3
  62. package/src/NavDropdown/NavDropdown.tsx +92 -92
  63. package/src/NavDropdown/NavDropdown.types.ts +6 -6
  64. package/src/NavDropdown/index.ts +2 -2
  65. package/src/Overlay/Overlay.tsx +305 -305
  66. package/src/Overlay/Overlay.types.ts +23 -23
  67. package/src/Overlay/index.ts +2 -2
  68. package/src/Popout/Popout.tsx +155 -155
  69. package/src/Popout/Popout.types.ts +41 -41
  70. package/src/Popout/index.ts +2 -2
  71. package/src/Spinner/Spinner.tsx +14 -14
  72. package/src/Spinner/Spinner.types.ts +6 -6
  73. package/src/Spinner/index.ts +2 -2
  74. package/src/Table/Table.tsx +15 -15
  75. package/src/Table/Table.types.ts +8 -8
  76. package/src/Table/index.ts +2 -2
  77. package/src/Tabs/Tabs.tsx +232 -232
  78. package/src/Tabs/Tabs.types.ts +51 -51
  79. package/src/Tabs/index.ts +2 -2
  80. package/src/ToggleButton/ToggleButton.tsx +20 -20
  81. package/src/ToggleButton/ToggleButton.types.ts +7 -7
  82. package/src/ToggleButton/index.ts +2 -2
  83. package/src/assets/tooltip-pointer.svg +2 -2
  84. package/src/assets/warning.svg +38 -38
  85. package/src/hooks/index.ts +6 -6
  86. package/src/hooks/useClassname.ts +4 -4
  87. package/src/hooks/useDraggable.ts +185 -185
  88. package/src/hooks/useKeepElementFocused.ts +36 -36
  89. package/src/hooks/useQueryParams.ts +11 -11
  90. package/src/hooks/useScreenSize.ts +23 -23
  91. package/src/index.ts +20 -20
  92. package/src/styles/_Card.scss +165 -165
  93. package/src/styles/_CloseButton.scss +50 -50
  94. package/src/styles/_CustomButton.scss +134 -134
  95. package/src/styles/_Dropdown.scss +126 -126
  96. package/src/styles/_FloatingLabel.scss +55 -55
  97. package/src/styles/_Forms.scss +6 -6
  98. package/src/styles/_Grid.scss +177 -177
  99. package/src/styles/_InputGroup.scss +71 -71
  100. package/src/styles/_List.scss +61 -61
  101. package/src/styles/_Modal.scss +234 -233
  102. package/src/styles/_ModalOld.scss +241 -241
  103. package/src/styles/_Nav.scss +35 -35
  104. package/src/styles/_NavBar.scss +115 -115
  105. package/src/styles/_NavDropdown.scss +33 -33
  106. package/src/styles/_OffCanvas.scss +259 -259
  107. package/src/styles/_OverLay.scss +78 -78
  108. package/src/styles/_Popout.scss +74 -74
  109. package/src/styles/_Resizable.scss +63 -63
  110. package/src/styles/_Spinner.scss +18 -18
  111. package/src/styles/_Table.scss +33 -33
  112. package/src/styles/_Tabs.scss +128 -128
  113. package/src/styles/_colors.scss +510 -510
  114. package/src/styles/_components.scss +40 -40
  115. package/src/styles/_functions.scss +133 -133
  116. package/src/styles/_mixins.scss +26 -26
  117. package/src/styles/_reset.scss +238 -238
  118. package/src/styles/_utilities.scss +2479 -2479
  119. package/src/styles/_variables.scss +164 -164
  120. package/src/styles/forms/_FormCheck.scss +269 -269
  121. package/src/styles/forms/_FormControl.scss +135 -135
  122. package/src/styles/forms/_FormGroup.scss +26 -26
  123. package/src/styles/forms/_FormLabel.scss +2 -2
  124. package/src/styles/forms/_FormSelect.scss +221 -221
  125. package/src/styles/forms/_FormSlider.scss +115 -115
  126. package/src/styles/forms/_FormText.scss +5 -5
  127. package/src/utils/BaseTypes.ts +31 -31
  128. package/src/utils/ContrastingColor.ts +24 -24
  129. package/src/utils/CreateSyntheticEvent.ts +29 -29
  130. package/src/utils/FileImportExport.js +49 -49
  131. package/src/utils/IsInputKey.ts +17 -17
  132. package/src/utils/MergeClassnames.ts +4 -4
  133. package/src/utils/MergeRefs.ts +11 -11
  134. package/src/utils/createFastContext.tsx +119 -118
  135. package/src/utils/index.ts +3 -3
  136. package/tsconfig-build.json +3 -3
  137. package/tsconfig.node.json +9 -9
  138. package/vite.config.js +56 -56
package/.babelrc.json CHANGED
@@ -1,10 +1,10 @@
1
- {
2
- "presets": [
3
- ["@babel/preset-env", { "modules": "umd" }],
4
- "@babel/preset-react"
5
- ],
6
- "plugins": [
7
- "@babel/plugin-proposal-class-properties",
8
- "@babel/plugin-proposal-nullish-coalescing-operator"
9
- ]
1
+ {
2
+ "presets": [
3
+ ["@babel/preset-env", { "modules": "umd" }],
4
+ "@babel/preset-react"
5
+ ],
6
+ "plugins": [
7
+ "@babel/plugin-proposal-class-properties",
8
+ "@babel/plugin-proposal-nullish-coalescing-operator"
9
+ ]
10
10
  }
package/.eslintrc.cjs CHANGED
@@ -1,18 +1,18 @@
1
- module.exports = {
2
- root: true,
3
- env: { browser: true, es2020: true },
4
- extends: [
5
- 'eslint:recommended',
6
- 'plugin:@typescript-eslint/recommended',
7
- 'plugin:react-hooks/recommended',
8
- ],
9
- ignorePatterns: ['dist', '.eslintrc.cjs'],
10
- parser: '@typescript-eslint/parser',
11
- plugins: ['react-refresh'],
12
- rules: {
13
- 'react-refresh/only-export-components': [
14
- 'warn',
15
- { allowConstantExport: true },
16
- ],
17
- },
1
+ module.exports = {
2
+ root: true,
3
+ env: { browser: true, es2020: true },
4
+ extends: [
5
+ 'eslint:recommended',
6
+ 'plugin:@typescript-eslint/recommended',
7
+ 'plugin:react-hooks/recommended',
8
+ ],
9
+ ignorePatterns: ['dist', '.eslintrc.cjs'],
10
+ parser: '@typescript-eslint/parser',
11
+ plugins: ['react-refresh'],
12
+ rules: {
13
+ 'react-refresh/only-export-components': [
14
+ 'warn',
15
+ { allowConstantExport: true },
16
+ ],
17
+ },
18
18
  }
package/.gitattributes CHANGED
@@ -1,2 +1,2 @@
1
- # Auto detect text files and perform LF normalization
2
- * text=auto
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
@@ -0,0 +1,24 @@
1
+ name: Publish Package to npmjs
2
+ on:
3
+ push:
4
+ branches: ['main']
5
+ workflow_dispatch:
6
+ jobs:
7
+ build:
8
+ runs-on: ubuntu-latest
9
+ permissions:
10
+ contents: read
11
+ id-token: write
12
+ steps:
13
+ - uses: actions/checkout@v5
14
+ # Setup .npmrc file to publish to npm
15
+ - uses: actions/setup-node@v4
16
+ with:
17
+ node-version: '20.x'
18
+ registry-url: 'https://registry.npmjs.org'
19
+ - run: npm install
20
+ - run: npm run rollup
21
+ - run: cd dist
22
+ - run: npm publish --provenance --access public
23
+ env:
24
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 Xoror
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Xoror
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dev/index.html CHANGED
@@ -1,16 +1,16 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <script
5
- crossOrigin="anonymous"
6
- src="//unpkg.com/react-scan/dist/auto.global.js"
7
- ></script>
8
- <meta charset="UTF-8">
9
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
10
- <title>Stargazer UI Test</title>
11
- </head>
12
- <body style="margin: 0">
13
- <div id="root"></div>
14
- <script type="module" src="/index.jsx"></script>
15
- </body>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <script
5
+ crossOrigin="anonymous"
6
+ src="//unpkg.com/react-scan/dist/auto.global.js"
7
+ ></script>
8
+ <meta charset="UTF-8">
9
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
10
+ <title>Stargazer UI Test</title>
11
+ </head>
12
+ <body style="margin: 0">
13
+ <div id="root"></div>
14
+ <script type="module" src="/index.jsx"></script>
15
+ </body>
16
16
  </html>
package/dev/index.jsx CHANGED
@@ -1,46 +1,46 @@
1
- import React from 'react'
2
- import ReactDOM from 'react-dom/client'
3
-
4
- //import "../dist/styles/stargazerui.css"
5
- import "../src/styles/_components.scss"
6
- import "./index.scss"
7
-
8
- import Dropdown from '../src/Dropdown'
9
- import Nav from "../src/Nav"
10
- import Navbar from '../src/NavBar'
11
-
12
- import { Component } from './test'
13
-
14
- const App = () => {
15
- return(
16
- <>
17
- <Navbar>
18
- <Nav>
19
- <Nav.Item>
20
- <Nav.Link href="#">Home</Nav.Link>
21
- </Nav.Item>
22
- <Nav.Item>
23
- <Nav.Link href="#">Test 2</Nav.Link>
24
- </Nav.Item>
25
- </Nav>
26
- <Navbar.Brand className={"navigation-link"}>
27
- Testing
28
- </Navbar.Brand >
29
- <Dropdown navDropdown={true} align='end' controlId='test-navdropdown' style={{marginLeft:"auto"}}>
30
- <Dropdown.Item id="test-1">Test 1</Dropdown.Item>
31
- <Dropdown.Item id="test-2">Test 2</Dropdown.Item>
32
- <Dropdown.Item id="test-3">Test 3</Dropdown.Item>
33
- <Dropdown.Item id="test-4">Test 4</Dropdown.Item>
34
- </Dropdown>
35
- </Navbar>
36
- <Component />
37
- </>
38
- )
39
- };
40
-
41
- ReactDOM.createRoot(document.getElementById('root')).render(
42
- <React.StrictMode>
43
- <App />
44
- </React.StrictMode>,
45
- )
46
-
1
+ import React from 'react'
2
+ import ReactDOM from 'react-dom/client'
3
+
4
+ //import "../dist/styles/stargazerui.css"
5
+ import "../src/styles/_components.scss"
6
+ import "./index.scss"
7
+
8
+ import Dropdown from '../src/Dropdown'
9
+ import Nav from "../src/Nav"
10
+ import Navbar from '../src/NavBar'
11
+
12
+ import { Component } from './test'
13
+
14
+ const App = () => {
15
+ return(
16
+ <>
17
+ <Navbar>
18
+ <Nav>
19
+ <Nav.Item>
20
+ <Nav.Link href="#">Home</Nav.Link>
21
+ </Nav.Item>
22
+ <Nav.Item>
23
+ <Nav.Link href="#">Test 2</Nav.Link>
24
+ </Nav.Item>
25
+ </Nav>
26
+ <Navbar.Brand className={"navigation-link"}>
27
+ Testing
28
+ </Navbar.Brand >
29
+ <Dropdown navDropdown={true} align='end' controlId='test-navdropdown' style={{marginLeft:"auto"}}>
30
+ <Dropdown.Item id="test-1">Test 1</Dropdown.Item>
31
+ <Dropdown.Item id="test-2">Test 2</Dropdown.Item>
32
+ <Dropdown.Item id="test-3">Test 3</Dropdown.Item>
33
+ <Dropdown.Item id="test-4">Test 4</Dropdown.Item>
34
+ </Dropdown>
35
+ </Navbar>
36
+ <Component />
37
+ </>
38
+ )
39
+ };
40
+
41
+ ReactDOM.createRoot(document.getElementById('root')).render(
42
+ <React.StrictMode>
43
+ <App />
44
+ </React.StrictMode>,
45
+ )
46
+
package/dev/index.scss CHANGED
@@ -1,74 +1,74 @@
1
- .sg-tabs-content {
2
- h4 {
3
- margin: 0;
4
- padding-inline: 1.5rem;
5
- padding-block: 1rem;
6
- &:first-child {
7
- padding-top: 0;
8
- }
9
- }
10
- pre {
11
- margin: 0;
12
- padding: 0.5rem;
13
- font-size: 0.75rem;
14
- border: 1px solid white;
15
- //max-width: 360px;
16
- }
17
- }
18
- .code-block {
19
- display: grid;
20
- grid-template-columns: auto 1fr;
21
- gap: 1rem;
22
- }
23
- .description-container {
24
- padding-inline: 2rem;
25
- margin-bottom: 1rem;
26
- }
27
- .container {
28
- width: 100%;
29
- display: grid;
30
- row-gap: 1rem;
31
- //place-items: center;
32
- //grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr;
33
- //grid-template-rows: 1fr 1fr;
34
- padding-inline: 2rem;
35
- }
36
- .flex-display {
37
- display: flex;
38
- flex-direction: row;
39
- flex-wrap: wrap;
40
- row-gap: 1rem;
41
- justify-content: space-around;
42
- }
43
-
44
- .dropdown-container {
45
- display: flex;
46
- flex-direction: row;
47
- flex-wrap: wrap;
48
- margin-inline: auto;
49
- gap: 5rem;
50
- }
51
-
52
- .overlay-container {
53
- margin-inline: auto;
54
- }
55
-
56
- .list-container {
57
- display: grid;
58
- place-items: center;
59
- }
60
-
61
- .fixed-navbar {
62
- --_width: calc(100dvh*(16/9));
63
- position: relative;
64
- border: unset;
65
- border-inline: 1px solid white;
66
- background: unset;
67
- background-color: unset;
68
- width: var(--_width);
69
- top: max(-100px, -1px * var(--scroll));
70
- left: unset;
71
- right: max(0px, (100vw - var(--_width)) / 2);
72
- padding-right: 1rem;
73
- background-color: transparent;
74
- }
1
+ .sg-tabs-content {
2
+ h4 {
3
+ margin: 0;
4
+ padding-inline: 1.5rem;
5
+ padding-block: 1rem;
6
+ &:first-child {
7
+ padding-top: 0;
8
+ }
9
+ }
10
+ pre {
11
+ margin: 0;
12
+ padding: 0.5rem;
13
+ font-size: 0.75rem;
14
+ border: 1px solid white;
15
+ //max-width: 360px;
16
+ }
17
+ }
18
+ .code-block {
19
+ display: grid;
20
+ grid-template-columns: auto 1fr;
21
+ gap: 1rem;
22
+ }
23
+ .description-container {
24
+ padding-inline: 2rem;
25
+ margin-bottom: 1rem;
26
+ }
27
+ .container {
28
+ width: 100%;
29
+ display: grid;
30
+ row-gap: 1rem;
31
+ //place-items: center;
32
+ //grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr;
33
+ //grid-template-rows: 1fr 1fr;
34
+ padding-inline: 2rem;
35
+ }
36
+ .flex-display {
37
+ display: flex;
38
+ flex-direction: row;
39
+ flex-wrap: wrap;
40
+ row-gap: 1rem;
41
+ justify-content: space-around;
42
+ }
43
+
44
+ .dropdown-container {
45
+ display: flex;
46
+ flex-direction: row;
47
+ flex-wrap: wrap;
48
+ margin-inline: auto;
49
+ gap: 5rem;
50
+ }
51
+
52
+ .overlay-container {
53
+ margin-inline: auto;
54
+ }
55
+
56
+ .list-container {
57
+ display: grid;
58
+ place-items: center;
59
+ }
60
+
61
+ .fixed-navbar {
62
+ --_width: calc(100dvh*(16/9));
63
+ position: relative;
64
+ border: unset;
65
+ border-inline: 1px solid white;
66
+ background: unset;
67
+ background-color: unset;
68
+ width: var(--_width);
69
+ top: max(-100px, -1px * var(--scroll));
70
+ left: unset;
71
+ right: max(0px, (100vw - var(--_width)) / 2);
72
+ padding-right: 1rem;
73
+ background-color: transparent;
74
+ }
@@ -1,44 +1,44 @@
1
- import Button from "../../src/Button"
2
- import ButtonGroup from "../../src/ButtonGroup"
3
-
4
- import { CodeBlock } from "./components"
5
-
6
- const CardPage = () => {
7
- const code = `<ButtonGroup vertical={"boolean"}>
8
- <Button variant={"variant 1"}>
9
- Variant 1
10
- </Button>
11
- <Button variant={"variant 2"}>
12
- Variant 2
13
- </Button>
14
- <Button variant={"variant 3"}>
15
- Variant 3
16
- </Button>
17
- </ButtonGroup>`
18
- return (
19
- <>
20
- <h4>Regular Buttons</h4>
21
- <section className="container">
22
- <CodeBlock code={code}>
23
- <li>
24
- Variants: string as "primary" (default), "secondary", "success", "info", "warning", "danger", "dark", "light"
25
- </li>
26
- </CodeBlock>
27
- <div className="flex-display">
28
- {["primary", "secondary", "success", "info", "warning", "danger", "dark", "light", "custom"].map((color, index) =>
29
- <Button key={color} variant={color}>{color}</Button>
30
- )}
31
- </div>
32
- <div className="flex-display">
33
- <ButtonGroup>
34
- {["primary", "secondary", "success", "info", "warning", "danger", "dark", "light"].map((color, index) =>
35
- <Button key={color} variant={color}>{color}</Button>
36
- )}
37
- </ButtonGroup>
38
- </div>
39
- </section>
40
- </>
41
- )
42
- }
43
-
1
+ import Button from "../../src/Button"
2
+ import ButtonGroup from "../../src/ButtonGroup"
3
+
4
+ import { CodeBlock } from "./components"
5
+
6
+ const CardPage = () => {
7
+ const code = `<ButtonGroup vertical={"boolean"}>
8
+ <Button variant={"variant 1"}>
9
+ Variant 1
10
+ </Button>
11
+ <Button variant={"variant 2"}>
12
+ Variant 2
13
+ </Button>
14
+ <Button variant={"variant 3"}>
15
+ Variant 3
16
+ </Button>
17
+ </ButtonGroup>`
18
+ return (
19
+ <>
20
+ <h4>Regular Buttons</h4>
21
+ <section className="container">
22
+ <CodeBlock code={code}>
23
+ <li>
24
+ Variants: string as "primary" (default), "secondary", "success", "info", "warning", "danger", "dark", "light"
25
+ </li>
26
+ </CodeBlock>
27
+ <div className="flex-display">
28
+ {["primary", "secondary", "success", "info", "warning", "danger", "dark", "light", "custom"].map((color, index) =>
29
+ <Button key={color} variant={color}>{color}</Button>
30
+ )}
31
+ </div>
32
+ <div className="flex-display">
33
+ <ButtonGroup>
34
+ {["primary", "secondary", "success", "info", "warning", "danger", "dark", "light"].map((color, index) =>
35
+ <Button key={color} variant={color}>{color}</Button>
36
+ )}
37
+ </ButtonGroup>
38
+ </div>
39
+ </section>
40
+ </>
41
+ )
42
+ }
43
+
44
44
  export default CardPage
@@ -1,81 +1,81 @@
1
- import Card from "../../src/Card"
2
- import { CodeBlock } from "./components"
3
-
4
- const CardPage = () => {
5
- const code = `<Card variant={string} inverted={boolean}>
6
- <Card.Header>
7
- <Card.Title>
8
- Card
9
- </Card.Title>
10
- </Card.Header>
11
- <Card.Body>
12
- <Card.Text>
13
- Testing the card text
14
- </Card.Text>
15
- </Card.Body>
16
- <Card.Footer>
17
- <Card.Text>
18
- Test Footer
19
- </Card.Text>
20
- </Card.Footer>
21
- </Card>`
22
- return (
23
- <>
24
- <h4>Regular Cards</h4>
25
- <section className="container">
26
- <CodeBlock code={code}>
27
- <li>
28
- Variants: string as "primary" (default), "secondary", "success", "info", "warning", "danger", "dark", "light"
29
- </li>
30
- <li>
31
- Inverted: boolean, makes them solid color (with a little gradient)
32
- </li>
33
- </CodeBlock>
34
- <div className="flex-display">
35
- {["primary", "secondary", "success", "info", "warning", "danger", "dark", "light"].map((color, index) =>
36
- <Card key={color} variant={color}>
37
- <Card.Header>
38
- <Card.Title>
39
- Card {color}
40
- </Card.Title>
41
- </Card.Header>
42
- <Card.Body>
43
- <Card.Text>
44
- Testing the card text
45
- </Card.Text>
46
- </Card.Body>
47
- <Card.Footer>
48
- <Card.Text>
49
- Test Footer
50
- </Card.Text>
51
- </Card.Footer>
52
- </Card>
53
- )}
54
- </div>
55
- <div className="flex-display">
56
- {["primary", "secondary", "success", "info", "warning", "danger", "dark", "light"].map((color, index) =>
57
- <Card key={color} variant={color} inverted={true}>
58
- <Card.Header>
59
- <Card.Title>
60
- Inverted Card {color}
61
- </Card.Title>
62
- </Card.Header>
63
- <Card.Body>
64
- <Card.Text>
65
- Testing the inverted card text
66
- </Card.Text>
67
- </Card.Body>
68
- <Card.Footer>
69
- <Card.Text>
70
- Test Footer
71
- </Card.Text>
72
- </Card.Footer>
73
- </Card>
74
- )}
75
- </div>
76
- </section>
77
- </>
78
- )
79
- }
80
-
1
+ import Card from "../../src/Card"
2
+ import { CodeBlock } from "./components"
3
+
4
+ const CardPage = () => {
5
+ const code = `<Card variant={string} inverted={boolean}>
6
+ <Card.Header>
7
+ <Card.Title>
8
+ Card
9
+ </Card.Title>
10
+ </Card.Header>
11
+ <Card.Body>
12
+ <Card.Text>
13
+ Testing the card text
14
+ </Card.Text>
15
+ </Card.Body>
16
+ <Card.Footer>
17
+ <Card.Text>
18
+ Test Footer
19
+ </Card.Text>
20
+ </Card.Footer>
21
+ </Card>`
22
+ return (
23
+ <>
24
+ <h4>Regular Cards</h4>
25
+ <section className="container">
26
+ <CodeBlock code={code}>
27
+ <li>
28
+ Variants: string as "primary" (default), "secondary", "success", "info", "warning", "danger", "dark", "light"
29
+ </li>
30
+ <li>
31
+ Inverted: boolean, makes them solid color (with a little gradient)
32
+ </li>
33
+ </CodeBlock>
34
+ <div className="flex-display">
35
+ {["primary", "secondary", "success", "info", "warning", "danger", "dark", "light"].map((color, index) =>
36
+ <Card key={color} variant={color}>
37
+ <Card.Header>
38
+ <Card.Title>
39
+ Card {color}
40
+ </Card.Title>
41
+ </Card.Header>
42
+ <Card.Body>
43
+ <Card.Text>
44
+ Testing the card text
45
+ </Card.Text>
46
+ </Card.Body>
47
+ <Card.Footer>
48
+ <Card.Text>
49
+ Test Footer
50
+ </Card.Text>
51
+ </Card.Footer>
52
+ </Card>
53
+ )}
54
+ </div>
55
+ <div className="flex-display">
56
+ {["primary", "secondary", "success", "info", "warning", "danger", "dark", "light"].map((color, index) =>
57
+ <Card key={color} variant={color} inverted={true}>
58
+ <Card.Header>
59
+ <Card.Title>
60
+ Inverted Card {color}
61
+ </Card.Title>
62
+ </Card.Header>
63
+ <Card.Body>
64
+ <Card.Text>
65
+ Testing the inverted card text
66
+ </Card.Text>
67
+ </Card.Body>
68
+ <Card.Footer>
69
+ <Card.Text>
70
+ Test Footer
71
+ </Card.Text>
72
+ </Card.Footer>
73
+ </Card>
74
+ )}
75
+ </div>
76
+ </section>
77
+ </>
78
+ )
79
+ }
80
+
81
81
  export default CardPage