@geckoui/geckoui 0.0.1-beta0

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 ADDED
@@ -0,0 +1,145 @@
1
+ <p align="center">
2
+ <img src="https://github.com/geckoui/geckoui/raw/develop/GeckoUI.png" alt="Gecko UI" width="120" />
3
+ </p>
4
+
5
+ <h1 align="center">Gecko UI</h1>
6
+
7
+ <p align="center">
8
+ The only thing our Gecko 🦎 eats is bugs! 🐛<br />
9
+ </p>
10
+
11
+ 📚 **Documentation**: [Gecko](https://gecko.productionbug.com)
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ npm install @geckoui/geckoui
17
+ # or
18
+ pnpm add @geckoui/geckoui
19
+ # or
20
+ yarn add @geckoui/geckoui
21
+ ```
22
+
23
+ ## Quick Start
24
+
25
+ ### 1. Import Styles
26
+
27
+ Import the component styles in your app:
28
+
29
+ ```tsx
30
+ import "@geckoui/geckoui/styles.css";
31
+ ```
32
+
33
+ > If you use `tailwindcss`, make sure to import the css inside `layer` directive to correctly override the styles:
34
+
35
+ ```css title="src/global.css"
36
+ @import "tailwindcss";
37
+
38
+ @layer components {
39
+ @import "@geckoui/geckoui/styles.css";
40
+ }
41
+ ```
42
+
43
+ ### 2. Use Components
44
+
45
+ ```tsx
46
+ import { Alert, Button, Input } from "@geckoui/geckoui";
47
+
48
+ function App() {
49
+ return (
50
+ <div>
51
+ <Button variant="contained" color="primary">
52
+ Click me
53
+ </Button>
54
+
55
+ <Input placeholder="Enter your name" />
56
+
57
+ <Alert variant="success" title="Operation completed successfully!" />
58
+ </div>
59
+ );
60
+ }
61
+ ```
62
+
63
+ ## Theming
64
+
65
+ GeckoUI uses a powerful CSS variable-based theming system that automatically adapts all components when you change the theme class.
66
+
67
+ ### Applying Themes
68
+
69
+ Simply add a theme class to your root element:
70
+
71
+ ```tsx
72
+ // Light theme (default)
73
+ <div className="light">
74
+ <App />
75
+ </div>
76
+
77
+ // Dark theme
78
+ <div className="dark">
79
+ <App />
80
+ </div>
81
+
82
+ // Custom theme
83
+ <div className="neon">
84
+ <App />
85
+ </div>
86
+ ```
87
+
88
+ ### Built-in Themes
89
+
90
+ - **Light** (default) - Clean, bright interface
91
+ - **Dark** - Easy on the eyes
92
+
93
+ ### Creating Custom Themes
94
+
95
+ Create a CSS file with your theme:
96
+
97
+ ```css
98
+ /* my-theme.css */
99
+ .my-theme {
100
+ /* Override any other CSS variables as needed */
101
+ }
102
+ ```
103
+
104
+ Import it and use it:
105
+
106
+ ```tsx
107
+ import "./my-theme.css";
108
+
109
+ <div className="my-theme">
110
+ <App />
111
+ </div>;
112
+ ```
113
+
114
+ ## Advanced Usage
115
+
116
+ ### Custom Styling with BEM
117
+
118
+ All components use BEM (Block Element Modifier) naming for easy customization:
119
+
120
+ ```css
121
+ /* Target specific component parts */
122
+ .GeckoUIButton--contained-primary {
123
+ /* Your custom styles */
124
+ }
125
+
126
+ .GeckoUIInput__input {
127
+ /* Style the inner input element */
128
+ }
129
+ ```
130
+
131
+ ## TypeScript
132
+
133
+ All components are fully typed. Import types as needed:
134
+
135
+ ```tsx
136
+ import type { ButtonProps, InputProps } from "@geckoui/geckoui";
137
+ ```
138
+
139
+ ## License
140
+
141
+ This project is licensed under the MIT License.
142
+
143
+ ## Support
144
+
145
+ For issues and feature requests, please visit our [@geckoui/geckoui](https://github.com/geckoui/geckoui).
@@ -0,0 +1,138 @@
1
+ /* src/components/Markdown/Markdown.scss */
2
+ .GeckoUIMarkdown h1 {
3
+ font-size: 36px;
4
+ font-weight: 700;
5
+ line-height: 1.2;
6
+ margin-top: 16px;
7
+ margin-bottom: 8px;
8
+ }
9
+ .GeckoUIMarkdown h2 {
10
+ font-size: 30px;
11
+ font-weight: 600;
12
+ line-height: 1.25;
13
+ margin-top: 16px;
14
+ margin-bottom: 8px;
15
+ }
16
+ .GeckoUIMarkdown h3 {
17
+ font-size: 24px;
18
+ font-weight: 600;
19
+ line-height: 1.25;
20
+ margin-top: 16px;
21
+ margin-bottom: 8px;
22
+ }
23
+ .GeckoUIMarkdown h4 {
24
+ font-size: 20px;
25
+ font-weight: 600;
26
+ margin-top: 16px;
27
+ margin-bottom: 8px;
28
+ }
29
+ .GeckoUIMarkdown h5 {
30
+ font-size: 16px;
31
+ font-weight: 600;
32
+ margin-top: 16px;
33
+ margin-bottom: 8px;
34
+ }
35
+ .GeckoUIMarkdown h6 {
36
+ font-size: 14px;
37
+ font-weight: 600;
38
+ margin-top: 16px;
39
+ margin-bottom: 8px;
40
+ }
41
+ .GeckoUIMarkdown p {
42
+ font-size: 16px;
43
+ line-height: 1.5;
44
+ margin-top: 8px;
45
+ margin-bottom: 8px;
46
+ }
47
+ .GeckoUIMarkdown a {
48
+ --tw-text-opacity: 1;
49
+ color: rgb(var(--gecko-ui-primary-600) / var(--tw-text-opacity, 1));
50
+ text-decoration: underline;
51
+ }
52
+ .GeckoUIMarkdown ul {
53
+ list-style-position: inside;
54
+ padding-left: 8px;
55
+ }
56
+ .GeckoUIMarkdown ol {
57
+ list-style-position: inside;
58
+ padding-left: 8px;
59
+ }
60
+ .GeckoUIMarkdown ul {
61
+ list-style-type: disc;
62
+ }
63
+ .GeckoUIMarkdown ol {
64
+ list-style-type: decimal;
65
+ }
66
+ .GeckoUIMarkdown li {
67
+ line-height: 1.5;
68
+ padding-left: 2px;
69
+ margin-left: 8px;
70
+ list-style-position: outside;
71
+ }
72
+ .GeckoUIMarkdown blockquote {
73
+ border-left-width: 4px;
74
+ --tw-border-opacity: 1;
75
+ border-color: rgb(var(--gecko-ui-border-primary) / var(--tw-border-opacity, 1));
76
+ padding-left: 1rem;
77
+ --tw-text-opacity: 1;
78
+ color: rgb(var(--gecko-ui-text-muted) / var(--tw-text-opacity, 1));
79
+ margin-top: 16px;
80
+ margin-bottom: 16px;
81
+ font-style: italic;
82
+ }
83
+ .GeckoUIMarkdown table {
84
+ width: 100%;
85
+ border-collapse: collapse;
86
+ margin-top: 16px;
87
+ margin-bottom: 16px;
88
+ }
89
+ .GeckoUIMarkdown th {
90
+ border-width: 1px;
91
+ --tw-border-opacity: 1;
92
+ border-color: rgb(var(--gecko-ui-border-primary) / var(--tw-border-opacity, 1));
93
+ padding: 12px;
94
+ text-align: left;
95
+ }
96
+ .GeckoUIMarkdown td {
97
+ border-width: 1px;
98
+ --tw-border-opacity: 1;
99
+ border-color: rgb(var(--gecko-ui-border-primary) / var(--tw-border-opacity, 1));
100
+ padding: 12px;
101
+ text-align: left;
102
+ }
103
+ .GeckoUIMarkdown img {
104
+ max-width: 100%;
105
+ height: auto;
106
+ }
107
+ .GeckoUIMarkdown hr {
108
+ border: 0;
109
+ border-top-width: 1px;
110
+ --tw-border-opacity: 1;
111
+ border-color: rgb(var(--gecko-ui-border-primary) / var(--tw-border-opacity, 1));
112
+ margin: 16px 0;
113
+ }
114
+ .GeckoUIMarkdown pre {
115
+ font-family: monospace;
116
+ --tw-bg-opacity: 1;
117
+ background-color: rgb(var(--gecko-ui-surface-tertiary) / var(--tw-bg-opacity, 1));
118
+ padding: 16px;
119
+ border-radius: 8px;
120
+ overflow-x: auto;
121
+ }
122
+ .GeckoUIMarkdown code {
123
+ display: inline-block;
124
+ font-family: monospace;
125
+ --tw-bg-opacity: 1;
126
+ background-color: rgb(var(--gecko-ui-surface-tertiary) / var(--tw-bg-opacity, 1));
127
+ padding: 3.2px 6.4px;
128
+ border-radius: 4px;
129
+ }
130
+ .GeckoUIMarkdown pre code {
131
+ background: transparent;
132
+ }
133
+ .GeckoUIMarkdown p:first-child {
134
+ margin-top: 0;
135
+ }
136
+ .GeckoUIMarkdown li > p:first-of-type {
137
+ display: inline;
138
+ }