@geckoui/geckoui 1.3.0 → 1.3.2

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,152 @@
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
+ ## Install react-hook-form for form components
24
+
25
+ ```bash
26
+ npm install react-hook-form
27
+
28
+ # or
29
+ pnpm add react-hook-form
30
+
31
+ # or
32
+ yarn add react-hook-form
33
+ ```
34
+
35
+ ## Quick Start
36
+
37
+ ### 1. Import Styles
38
+
39
+ Import the component styles in your app:
40
+
41
+ ```tsx
42
+ import "@geckoui/geckoui/styles.css";
43
+ ```
44
+
45
+ > If you use `tailwindcss`, make sure to import the css inside `layer` directive to correctly override the styles:
46
+
47
+ ```css title="src/global.css"
48
+ @import "tailwindcss";
49
+
50
+ @layer components {
51
+ @import "@geckoui/geckoui/styles.css";
52
+ }
53
+ ```
54
+
55
+ ### 2. Use Components
56
+
57
+ ```tsx
58
+ import { Alert, Button, Input } from "@geckoui/geckoui";
59
+
60
+ function App() {
61
+ return (
62
+ <div>
63
+ <Button variant="contained" color="primary">
64
+ Click me
65
+ </Button>
66
+
67
+ <Input placeholder="Enter your name" />
68
+
69
+ <Alert variant="success" title="Operation completed successfully!" />
70
+ </div>
71
+ );
72
+ }
73
+ ```
74
+
75
+ ## Theming
76
+
77
+ GeckoUI uses [OKLCH](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/oklch) color values with CSS custom properties (`--color-*`) powered by Tailwind CSS v4. You can override colors using **any CSS color format** — oklch, hex, rgb, hsl, etc.
78
+
79
+ ### Dark Mode
80
+
81
+ Add the `.dark` class to your root element:
82
+
83
+ ```tsx
84
+ <div className="dark">
85
+ <App />
86
+ </div>
87
+ ```
88
+
89
+ ### Customizing Colors
90
+
91
+ Override CSS variables to match your brand:
92
+
93
+ ```css
94
+ :root {
95
+ --color-primary-500: oklch(0.65 0.24 330);
96
+ --color-primary-600: oklch(0.55 0.22 330);
97
+
98
+ /* hex works too */
99
+ --color-primary-700: #6d28d9;
100
+ }
101
+ ```
102
+
103
+ Import after the base styles:
104
+
105
+ ```tsx
106
+ import "@geckoui/geckoui/styles.css";
107
+
108
+ import "./my-theme.css";
109
+ ```
110
+
111
+ ## Advanced Usage
112
+
113
+ ### Custom Styling with Data Attributes
114
+
115
+ Components use `data-*` attributes for variant/state styling:
116
+
117
+ ```css
118
+ /* Target specific variants */
119
+ .GeckoUIButton[data-variant="filled"][data-color="primary"] {
120
+ /* Your custom styles */
121
+ }
122
+
123
+ .GeckoUIInput__input {
124
+ /* Style the inner input element */
125
+ }
126
+ ```
127
+
128
+ ## TypeScript
129
+
130
+ All components are fully typed. Import types as needed:
131
+
132
+ ```tsx
133
+ import type { ButtonProps, InputProps } from "@geckoui/geckoui";
134
+ ```
135
+
136
+ ## AI Skills
137
+
138
+ Install the GeckoUI skill to help AI assistants (Claude Code, etc.) generate accurate component code and themes:
139
+
140
+ ```
141
+ npx skills add GeckoUI/skills
142
+ ```
143
+
144
+ The skill provides component API references, theming variables, and class name mappings so AI agents can generate correct GeckoUI code without hallucination.
145
+
146
+ ## License
147
+
148
+ This project is licensed under the MIT License.
149
+
150
+ ## Support
151
+
152
+ For issues and feature requests, please visit our [@geckoui/geckoui](https://github.com/geckoui/geckoui).
package/dist/index.d.mts CHANGED
@@ -3636,11 +3636,6 @@ declare const Menu: {
3636
3636
  };
3637
3637
 
3638
3638
  interface MenuItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onClick"> {
3639
- /**
3640
- * Text label for the menu item.
3641
- * Used as the default rendered content if no `children` is provided.
3642
- */
3643
- label: string;
3644
3639
  /**
3645
3640
  * Whether the menu item is disabled
3646
3641
  */
@@ -3654,15 +3649,10 @@ interface MenuItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onCl
3654
3649
  * The menu will close automatically after the callback.
3655
3650
  */
3656
3651
  onClick?: () => void;
3657
- /**
3658
- * Custom content for the menu item.
3659
- * If not provided, `label` is rendered as text.
3660
- */
3661
- children?: ReactNode;
3662
3652
  }
3663
3653
 
3664
3654
  declare const MenuItem: {
3665
- ({ label, disabled, className, onClick, children, ...rest }: MenuItemProps): react_jsx_runtime.JSX.Element;
3655
+ ({ disabled, className, onClick, children, ...rest }: MenuItemProps): react_jsx_runtime.JSX.Element;
3666
3656
  displayName: string;
3667
3657
  };
3668
3658
 
package/dist/index.d.ts CHANGED
@@ -3636,11 +3636,6 @@ declare const Menu: {
3636
3636
  };
3637
3637
 
3638
3638
  interface MenuItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onClick"> {
3639
- /**
3640
- * Text label for the menu item.
3641
- * Used as the default rendered content if no `children` is provided.
3642
- */
3643
- label: string;
3644
3639
  /**
3645
3640
  * Whether the menu item is disabled
3646
3641
  */
@@ -3654,15 +3649,10 @@ interface MenuItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onCl
3654
3649
  * The menu will close automatically after the callback.
3655
3650
  */
3656
3651
  onClick?: () => void;
3657
- /**
3658
- * Custom content for the menu item.
3659
- * If not provided, `label` is rendered as text.
3660
- */
3661
- children?: ReactNode;
3662
3652
  }
3663
3653
 
3664
3654
  declare const MenuItem: {
3665
- ({ label, disabled, className, onClick, children, ...rest }: MenuItemProps): react_jsx_runtime.JSX.Element;
3655
+ ({ disabled, className, onClick, children, ...rest }: MenuItemProps): react_jsx_runtime.JSX.Element;
3666
3656
  displayName: string;
3667
3657
  };
3668
3658
 
package/dist/index.js CHANGED
@@ -5083,8 +5083,8 @@ function ConfirmDialogContent({
5083
5083
  }
5084
5084
  var show2 = (options) => {
5085
5085
  Dialog_default.show(__spreadProps(__spreadValues({
5086
- dismissOnEsc: false,
5087
- dismissOnOutsideClick: false
5086
+ dismissOnEsc: true,
5087
+ dismissOnOutsideClick: true
5088
5088
  }, options), {
5089
5089
  className: classNames("GeckoUIConfirmDialog__dialog", options.className),
5090
5090
  content: ({ dismiss: dismiss2 }) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ConfirmDialogContent, __spreadProps(__spreadValues({}, options), { dismiss: dismiss2 }))
@@ -5389,7 +5389,7 @@ var Menu_default = Menu;
5389
5389
  // src/components/Menu/MenuItem/MenuItem.tsx
5390
5390
  var import_jsx_runtime62 = require("react/jsx-runtime");
5391
5391
  var MenuItem = (_a) => {
5392
- var _b = _a, { label, disabled, className, onClick, children } = _b, rest = __objRest(_b, ["label", "disabled", "className", "onClick", "children"]);
5392
+ var _b = _a, { disabled, className, onClick, children } = _b, rest = __objRest(_b, ["disabled", "className", "onClick", "children"]);
5393
5393
  const { closeMenu } = useMenu();
5394
5394
  const handleClick = () => {
5395
5395
  if (disabled) return;
@@ -5413,7 +5413,7 @@ var MenuItem = (_a) => {
5413
5413
  onClick: disabled ? void 0 : handleClick,
5414
5414
  onKeyDown: handleKeyDown
5415
5415
  }, rest), {
5416
- children: children != null ? children : label
5416
+ children
5417
5417
  })
5418
5418
  );
5419
5419
  };
package/dist/index.mjs CHANGED
@@ -4995,8 +4995,8 @@ function ConfirmDialogContent({
4995
4995
  }
4996
4996
  var show2 = (options) => {
4997
4997
  Dialog_default.show(__spreadProps(__spreadValues({
4998
- dismissOnEsc: false,
4999
- dismissOnOutsideClick: false
4998
+ dismissOnEsc: true,
4999
+ dismissOnOutsideClick: true
5000
5000
  }, options), {
5001
5001
  className: classNames("GeckoUIConfirmDialog__dialog", options.className),
5002
5002
  content: ({ dismiss: dismiss2 }) => /* @__PURE__ */ jsx55(ConfirmDialogContent, __spreadProps(__spreadValues({}, options), { dismiss: dismiss2 }))
@@ -5301,7 +5301,7 @@ var Menu_default = Menu;
5301
5301
  // src/components/Menu/MenuItem/MenuItem.tsx
5302
5302
  import { jsx as jsx62 } from "react/jsx-runtime";
5303
5303
  var MenuItem = (_a) => {
5304
- var _b = _a, { label, disabled, className, onClick, children } = _b, rest = __objRest(_b, ["label", "disabled", "className", "onClick", "children"]);
5304
+ var _b = _a, { disabled, className, onClick, children } = _b, rest = __objRest(_b, ["disabled", "className", "onClick", "children"]);
5305
5305
  const { closeMenu } = useMenu();
5306
5306
  const handleClick = () => {
5307
5307
  if (disabled) return;
@@ -5325,7 +5325,7 @@ var MenuItem = (_a) => {
5325
5325
  onClick: disabled ? void 0 : handleClick,
5326
5326
  onKeyDown: handleKeyDown
5327
5327
  }, rest), {
5328
- children: children != null ? children : label
5328
+ children
5329
5329
  })
5330
5330
  );
5331
5331
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geckoui/geckoui",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "license": "MIT",
5
5
  "description": "The only thing our Gecko eats is bugs!",
6
6
  "keywords": [