@lazhus/kg-ui 0.2.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 +128 -0
- package/custom-elements.json +3815 -0
- package/dist/components/kg-accordion-item.js +117 -0
- package/dist/components/kg-accordion.js +32 -0
- package/dist/components/kg-button.js +241 -0
- package/dist/components/kg-card.js +129 -0
- package/dist/components/kg-checkbox.js +147 -0
- package/dist/components/kg-colorpicker.js +240 -0
- package/dist/components/kg-column.js +48 -0
- package/dist/components/kg-datagrid.js +428 -0
- package/dist/components/kg-datepicker.js +650 -0
- package/dist/components/kg-divider.js +118 -0
- package/dist/components/kg-drawer.js +178 -0
- package/dist/components/kg-file-upload.js +274 -0
- package/dist/components/kg-grid.js +46 -0
- package/dist/components/kg-image.js +100 -0
- package/dist/components/kg-input.js +318 -0
- package/dist/components/kg-loader.js +175 -0
- package/dist/components/kg-modal.js +165 -0
- package/dist/components/kg-progress.js +82 -0
- package/dist/components/kg-radio-group.js +75 -0
- package/dist/components/kg-radio.js +121 -0
- package/dist/components/kg-row.js +42 -0
- package/dist/components/kg-select.js +331 -0
- package/dist/components/kg-skeleton.js +108 -0
- package/dist/components/kg-slider.js +196 -0
- package/dist/components/kg-spinner.js +79 -0
- package/dist/components/kg-stepper.js +214 -0
- package/dist/components/kg-switch.js +106 -0
- package/dist/components/kg-tab-panel.js +35 -0
- package/dist/components/kg-tabs.js +158 -0
- package/dist/components/kg-text.js +141 -0
- package/dist/components/kg-textarea.js +162 -0
- package/dist/components/kg-toast.js +200 -0
- package/dist/index.js +68 -0
- package/dist/kg-ui.css +1 -0
- package/package.json +57 -0
- package/types/components/kg-accordion-item.d.ts +25 -0
- package/types/components/kg-accordion.d.ts +22 -0
- package/types/components/kg-button.d.ts +34 -0
- package/types/components/kg-card.d.ts +31 -0
- package/types/components/kg-checkbox.d.ts +28 -0
- package/types/components/kg-colorpicker.d.ts +28 -0
- package/types/components/kg-column.d.ts +20 -0
- package/types/components/kg-datagrid.d.ts +55 -0
- package/types/components/kg-datepicker.d.ts +43 -0
- package/types/components/kg-divider.d.ts +34 -0
- package/types/components/kg-drawer.d.ts +31 -0
- package/types/components/kg-file-upload.d.ts +40 -0
- package/types/components/kg-grid.d.ts +20 -0
- package/types/components/kg-image.d.ts +40 -0
- package/types/components/kg-input.d.ts +34 -0
- package/types/components/kg-loader.d.ts +31 -0
- package/types/components/kg-modal.d.ts +31 -0
- package/types/components/kg-progress.d.ts +37 -0
- package/types/components/kg-radio-group.d.ts +25 -0
- package/types/components/kg-radio.d.ts +25 -0
- package/types/components/kg-row.d.ts +20 -0
- package/types/components/kg-select.d.ts +37 -0
- package/types/components/kg-skeleton.d.ts +34 -0
- package/types/components/kg-slider.d.ts +40 -0
- package/types/components/kg-spinner.d.ts +28 -0
- package/types/components/kg-stepper.d.ts +31 -0
- package/types/components/kg-switch.d.ts +28 -0
- package/types/components/kg-tab-panel.d.ts +28 -0
- package/types/components/kg-tabs.d.ts +25 -0
- package/types/components/kg-text.d.ts +31 -0
- package/types/components/kg-textarea.d.ts +43 -0
- package/types/components/kg-toast.d.ts +28 -0
- package/types/index.d.ts +335 -0
package/README.md
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# KG UI
|
|
2
|
+
|
|
3
|
+
Modern, lightweight UI component library built with LitElement.
|
|
4
|
+
|
|
5
|
+
## 🚀 Features
|
|
6
|
+
|
|
7
|
+
- ✨ **22+ Modern Components** - Button, Input, Modal, Drawer, and more
|
|
8
|
+
- 🎨 **Customizable Theming** - CSS variables for easy customization
|
|
9
|
+
- 🌓 **Dark Mode Support** - Built-in dark theme
|
|
10
|
+
- 📱 **Responsive** - Mobile-first design
|
|
11
|
+
- ⚡ **Lightweight** - Built with LitElement
|
|
12
|
+
- 🎯 **TypeScript Ready** - Full type support
|
|
13
|
+
- ♿ **Accessible** - ARIA compliant components
|
|
14
|
+
|
|
15
|
+
## 📦 Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @kolaygelsin2/ui
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## 🎯 Quick Start
|
|
22
|
+
|
|
23
|
+
### 1. Import Components
|
|
24
|
+
|
|
25
|
+
```javascript
|
|
26
|
+
// Import the components you need
|
|
27
|
+
import '@kg/ui/components/kg-button.js';
|
|
28
|
+
import '@kg/ui/components/kg-input.js';
|
|
29
|
+
import '@kg/ui/components/kg-card.js';
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### 2. Import Styles
|
|
33
|
+
|
|
34
|
+
```html
|
|
35
|
+
<link rel="stylesheet" href="node_modules/@kg/ui/dist/index.css">
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Or in your JavaScript:
|
|
39
|
+
|
|
40
|
+
```javascript
|
|
41
|
+
import '@kg/ui/styles';
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 3. Use in HTML
|
|
45
|
+
|
|
46
|
+
```html
|
|
47
|
+
<kg-button color="primary">Click Me</kg-button>
|
|
48
|
+
<kg-input label="Username" placeholder="Enter your name"></kg-input>
|
|
49
|
+
<kg-card>
|
|
50
|
+
<span slot="header">Card Title</span>
|
|
51
|
+
<p>Card content goes here</p>
|
|
52
|
+
</kg-card>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## 🎨 Theming
|
|
56
|
+
|
|
57
|
+
KG UI uses CSS variables for easy theming:
|
|
58
|
+
|
|
59
|
+
```css
|
|
60
|
+
:root {
|
|
61
|
+
--kg-primary: #41ab34;
|
|
62
|
+
--kg-secondary: #1367FF;
|
|
63
|
+
--kg-tertiary: #FBB140;
|
|
64
|
+
--kg-bg: #ffffff;
|
|
65
|
+
--kg-text: #1a1a1a;
|
|
66
|
+
/* ... more variables */
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Dark Mode
|
|
71
|
+
|
|
72
|
+
Enable dark mode by adding the `data-theme` attribute:
|
|
73
|
+
|
|
74
|
+
```javascript
|
|
75
|
+
document.documentElement.setAttribute('data-theme', 'dark');
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## 📚 Components
|
|
79
|
+
|
|
80
|
+
### Form Components
|
|
81
|
+
- `kg-button` - Customizable button
|
|
82
|
+
- `kg-input` - Text input with validation
|
|
83
|
+
- `kg-textarea` - Multi-line text input
|
|
84
|
+
- `kg-select` - Dropdown select
|
|
85
|
+
- `kg-checkbox` - Checkbox input
|
|
86
|
+
- `kg-radio` - Radio button
|
|
87
|
+
- `kg-switch` - Toggle switch
|
|
88
|
+
- `kg-slider` - Range slider
|
|
89
|
+
- `kg-file-upload` - File upload
|
|
90
|
+
- `kg-datepicker` - Date picker
|
|
91
|
+
- `kg-colorpicker` - Color picker
|
|
92
|
+
|
|
93
|
+
### Layout Components
|
|
94
|
+
- `kg-card` - Content card
|
|
95
|
+
- `kg-grid` - Responsive grid system
|
|
96
|
+
- `kg-divider` - Visual separator
|
|
97
|
+
- `kg-accordion` - Collapsible sections
|
|
98
|
+
- `kg-tabs` - Tabbed interface
|
|
99
|
+
- `kg-stepper` - Step indicator
|
|
100
|
+
|
|
101
|
+
### Overlay Components
|
|
102
|
+
- `kg-modal` - Modal dialog
|
|
103
|
+
- `kg-drawer` - Side panel
|
|
104
|
+
- `kg-toast` - Notification
|
|
105
|
+
|
|
106
|
+
### Feedback Components
|
|
107
|
+
- `kg-skeleton` - Loading placeholder
|
|
108
|
+
|
|
109
|
+
### Typography
|
|
110
|
+
- `kg-text` - Text component with variants
|
|
111
|
+
|
|
112
|
+
## 📖 Documentation
|
|
113
|
+
|
|
114
|
+
Visit our [documentation site](https://your-docs-url.com) for detailed component APIs and examples.
|
|
115
|
+
|
|
116
|
+
## 🤝 Contributing
|
|
117
|
+
|
|
118
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
119
|
+
|
|
120
|
+
## 📄 License
|
|
121
|
+
|
|
122
|
+
MIT © KG Team
|
|
123
|
+
|
|
124
|
+
## 🔗 Links
|
|
125
|
+
|
|
126
|
+
- [Documentation](https://your-docs-url.com)
|
|
127
|
+
- [GitHub](https://github.com/yourusername/kg-ui)
|
|
128
|
+
- [npm](https://www.npmjs.com/package/@kg/ui)
|