reke-ui 0.1.0

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 (80) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +159 -0
  3. package/custom-elements.json +3536 -0
  4. package/dist/components/reke-alert/reke-alert.d.ts +31 -0
  5. package/dist/components/reke-alert/reke-alert.d.ts.map +1 -0
  6. package/dist/components/reke-alert/reke-alert.styles.d.ts +2 -0
  7. package/dist/components/reke-alert/reke-alert.styles.d.ts.map +1 -0
  8. package/dist/components/reke-badge/reke-badge.d.ts +29 -0
  9. package/dist/components/reke-badge/reke-badge.d.ts.map +1 -0
  10. package/dist/components/reke-badge/reke-badge.styles.d.ts +2 -0
  11. package/dist/components/reke-badge/reke-badge.styles.d.ts.map +1 -0
  12. package/dist/components/reke-button/reke-button.d.ts +39 -0
  13. package/dist/components/reke-button/reke-button.d.ts.map +1 -0
  14. package/dist/components/reke-button/reke-button.styles.d.ts +2 -0
  15. package/dist/components/reke-button/reke-button.styles.d.ts.map +1 -0
  16. package/dist/components/reke-card/reke-card.d.ts +31 -0
  17. package/dist/components/reke-card/reke-card.d.ts.map +1 -0
  18. package/dist/components/reke-card/reke-card.styles.d.ts +2 -0
  19. package/dist/components/reke-card/reke-card.styles.d.ts.map +1 -0
  20. package/dist/components/reke-checkbox/reke-checkbox.d.ts +32 -0
  21. package/dist/components/reke-checkbox/reke-checkbox.d.ts.map +1 -0
  22. package/dist/components/reke-checkbox/reke-checkbox.styles.d.ts +2 -0
  23. package/dist/components/reke-checkbox/reke-checkbox.styles.d.ts.map +1 -0
  24. package/dist/components/reke-chip/reke-chip.d.ts +41 -0
  25. package/dist/components/reke-chip/reke-chip.d.ts.map +1 -0
  26. package/dist/components/reke-chip/reke-chip.styles.d.ts +2 -0
  27. package/dist/components/reke-chip/reke-chip.styles.d.ts.map +1 -0
  28. package/dist/components/reke-date-range/reke-date-range.d.ts +71 -0
  29. package/dist/components/reke-date-range/reke-date-range.d.ts.map +1 -0
  30. package/dist/components/reke-date-range/reke-date-range.styles.d.ts +2 -0
  31. package/dist/components/reke-date-range/reke-date-range.styles.d.ts.map +1 -0
  32. package/dist/components/reke-dialog/reke-dialog.d.ts +39 -0
  33. package/dist/components/reke-dialog/reke-dialog.d.ts.map +1 -0
  34. package/dist/components/reke-dialog/reke-dialog.styles.d.ts +2 -0
  35. package/dist/components/reke-dialog/reke-dialog.styles.d.ts.map +1 -0
  36. package/dist/components/reke-file-upload/reke-file-upload.d.ts +45 -0
  37. package/dist/components/reke-file-upload/reke-file-upload.d.ts.map +1 -0
  38. package/dist/components/reke-file-upload/reke-file-upload.styles.d.ts +2 -0
  39. package/dist/components/reke-file-upload/reke-file-upload.styles.d.ts.map +1 -0
  40. package/dist/components/reke-input/reke-input.d.ts +37 -0
  41. package/dist/components/reke-input/reke-input.d.ts.map +1 -0
  42. package/dist/components/reke-input/reke-input.styles.d.ts +2 -0
  43. package/dist/components/reke-input/reke-input.styles.d.ts.map +1 -0
  44. package/dist/components/reke-select/reke-select.d.ts +51 -0
  45. package/dist/components/reke-select/reke-select.d.ts.map +1 -0
  46. package/dist/components/reke-select/reke-select.styles.d.ts +2 -0
  47. package/dist/components/reke-select/reke-select.styles.d.ts.map +1 -0
  48. package/dist/components/reke-table/reke-table.d.ts +76 -0
  49. package/dist/components/reke-table/reke-table.d.ts.map +1 -0
  50. package/dist/components/reke-table/reke-table.styles.d.ts +2 -0
  51. package/dist/components/reke-table/reke-table.styles.d.ts.map +1 -0
  52. package/dist/components/reke-textarea/reke-textarea.d.ts +37 -0
  53. package/dist/components/reke-textarea/reke-textarea.d.ts.map +1 -0
  54. package/dist/components/reke-textarea/reke-textarea.styles.d.ts +2 -0
  55. package/dist/components/reke-textarea/reke-textarea.styles.d.ts.map +1 -0
  56. package/dist/components/reke-toast/reke-toast.d.ts +44 -0
  57. package/dist/components/reke-toast/reke-toast.d.ts.map +1 -0
  58. package/dist/components/reke-toast/reke-toast.styles.d.ts +2 -0
  59. package/dist/components/reke-toast/reke-toast.styles.d.ts.map +1 -0
  60. package/dist/components/reke-toggle/reke-toggle.d.ts +33 -0
  61. package/dist/components/reke-toggle/reke-toggle.d.ts.map +1 -0
  62. package/dist/components/reke-toggle/reke-toggle.styles.d.ts +2 -0
  63. package/dist/components/reke-toggle/reke-toggle.styles.d.ts.map +1 -0
  64. package/dist/components/reke-tooltip/reke-tooltip.d.ts +32 -0
  65. package/dist/components/reke-tooltip/reke-tooltip.d.ts.map +1 -0
  66. package/dist/components/reke-tooltip/reke-tooltip.styles.d.ts +2 -0
  67. package/dist/components/reke-tooltip/reke-tooltip.styles.d.ts.map +1 -0
  68. package/dist/index.d.ts +31 -0
  69. package/dist/index.d.ts.map +1 -0
  70. package/dist/react.d.ts +101 -0
  71. package/dist/react.d.ts.map +1 -0
  72. package/dist/react.js +133 -0
  73. package/dist/reke-chip-Xb0Y_Cqo.js +3358 -0
  74. package/dist/reke-ui.js +20 -0
  75. package/dist/shared/base-element.d.ts +5 -0
  76. package/dist/shared/base-element.d.ts.map +1 -0
  77. package/dist/shared/tailwind-styles.d.ts +2 -0
  78. package/dist/shared/tailwind-styles.d.ts.map +1 -0
  79. package/dist/tokens/reke-tokens.css +107 -0
  80. package/package.json +149 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Jesús Requena Pérez
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/README.md ADDED
@@ -0,0 +1,159 @@
1
+ # reke-ui
2
+
3
+ A Web Component library built with [Lit 3](https://lit.dev). Ships with dark and light themes. Framework-agnostic — works with Vue, React, Angular, Svelte, or vanilla JS.
4
+
5
+ ## Components
6
+
7
+ | Component | Tag | Description |
8
+ |-----------|-----|-------------|
9
+ | Button | `<reke-button>` | Buttons with variants: primary, secondary, danger, ghost, outline |
10
+ | Input | `<reke-input>` | Text input with label, helper text, and validation |
11
+ | Textarea | `<reke-textarea>` | Multi-line text input |
12
+ | Checkbox | `<reke-checkbox>` | Checkbox with label |
13
+ | Toggle | `<reke-toggle>` | On/off toggle switch |
14
+ | Select | `<reke-select>` | Dropdown select |
15
+ | Date Range | `<reke-date-range>` | Date range picker with presets |
16
+ | File Upload | `<reke-file-upload>` | Drag & drop file upload |
17
+ | Table | `<reke-table>` | Data table with sorting and expandable rows |
18
+ | Dialog | `<reke-dialog>` | Modal dialog |
19
+ | Card | `<reke-card>` | Content card container |
20
+ | Badge | `<reke-badge>` | Status badge |
21
+ | Chip | `<reke-chip>` | Dismissible chip/tag |
22
+ | Tooltip | `<reke-tooltip>` | Tooltip on hover |
23
+ | Alert | `<reke-alert>` | Inline alert message |
24
+ | Toast | `<reke-toast>` | Toast notification |
25
+
26
+ ## Quick Start
27
+
28
+ ### Install
29
+
30
+ ```bash
31
+ npm install reke-ui
32
+ ```
33
+
34
+ ### Import tokens (optional but recommended)
35
+
36
+ ```css
37
+ @import 'reke-ui/tokens/css';
38
+ ```
39
+
40
+ ### Use a component
41
+
42
+ ```html
43
+ <script type="module">
44
+ import 'reke-ui/button';
45
+ </script>
46
+
47
+ <reke-button variant="primary">Click me</reke-button>
48
+ ```
49
+
50
+ Or import everything:
51
+
52
+ ```ts
53
+ import 'reke-ui';
54
+ ```
55
+
56
+ ## Framework Usage
57
+
58
+ ### Vue
59
+
60
+ Vue supports Web Components natively. Just import and use:
61
+
62
+ ```vue
63
+ <script setup>
64
+ import 'reke-ui/button';
65
+ import 'reke-ui/input';
66
+ </script>
67
+
68
+ <template>
69
+ <reke-button variant="primary" @reke-click="handleClick">
70
+ Submit
71
+ </reke-button>
72
+ <reke-input label="Name" @reke-change="handleChange" />
73
+ </template>
74
+ ```
75
+
76
+ > **Vue config:** Tell Vue to skip resolving `reke-*` tags as Vue components:
77
+ > ```ts
78
+ > // vite.config.ts
79
+ > vue({
80
+ > template: {
81
+ > compilerOptions: {
82
+ > isCustomElement: (tag) => tag.startsWith('reke-'),
83
+ > },
84
+ > },
85
+ > })
86
+ > ```
87
+
88
+ ### React
89
+
90
+ React needs wrappers for proper event handling. Use the built-in React bindings:
91
+
92
+ ```tsx
93
+ import { Button, Input } from 'reke-ui/react';
94
+
95
+ function App() {
96
+ return (
97
+ <>
98
+ <Button variant="primary" onRekeClick={() => console.log('clicked')}>
99
+ Submit
100
+ </Button>
101
+ <Input label="Name" onRekeChange={(e) => console.log(e.detail.value)} />
102
+ </>
103
+ );
104
+ }
105
+ ```
106
+
107
+ ### Vanilla JS
108
+
109
+ ```html
110
+ <link rel="stylesheet" href="node_modules/reke-ui/dist/tokens/reke-tokens.css" />
111
+ <script type="module" src="node_modules/reke-ui/dist/reke-ui.js"></script>
112
+
113
+ <reke-button variant="primary">Click me</reke-button>
114
+
115
+ <script>
116
+ document.querySelector('reke-button')
117
+ .addEventListener('reke-click', () => console.log('clicked'));
118
+ </script>
119
+ ```
120
+
121
+ ## Theming
122
+
123
+ reke-ui ships with **dark** (default) and **light** themes, plus an **auto** mode that follows OS preference.
124
+
125
+ ```html
126
+ <html> <!-- Dark (default) -->
127
+ <html data-reke-theme="dark"> <!-- Dark (explicit) -->
128
+ <html data-reke-theme="light"> <!-- Light -->
129
+ <html data-reke-theme="auto"> <!-- Follows OS preference -->
130
+ ```
131
+
132
+ ### Customizing tokens
133
+
134
+ Override any CSS custom property to match your brand:
135
+
136
+ ```css
137
+ :root {
138
+ --reke-color-primary: #8B5CF6;
139
+ --reke-color-secondary: #EC4899;
140
+ --reke-radius: 8px;
141
+ --reke-font-mono: 'Fira Code', monospace;
142
+ }
143
+ ```
144
+
145
+ See all available tokens in [`src/tokens/reke-tokens.css`](src/tokens/reke-tokens.css).
146
+
147
+ ## Development
148
+
149
+ ```bash
150
+ npm install # Install dependencies
151
+ npm run dev # Start Storybook on port 6006
152
+ npm run test:run # Run all tests
153
+ npm run build # Build for production
154
+ npm run lint # Type-check
155
+ ```
156
+
157
+ ## License
158
+
159
+ MIT