@grandbazar/ui-baza 1.0.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.
- package/LICENSE +21 -0
- package/README.md +134 -0
- package/dist/index.cjs +20 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +16 -0
- package/dist/style.css +229 -0
- package/package.json +88 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Grandbazar.io
|
|
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,134 @@
|
|
|
1
|
+
# UI Baza
|
|
2
|
+
|
|
3
|
+
A lightweight and modular UI kit for building modern, accessible web interfaces. Designed for flexibility, scalability, and developer happiness.
|
|
4
|
+
|
|
5
|
+
## 📦 Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install ui-baza
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
yarn add ui-baza
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pnpm add ui-baza
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 🔧 Usage
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import { Button } from 'ui-baza';
|
|
23
|
+
|
|
24
|
+
function App() {
|
|
25
|
+
return (
|
|
26
|
+
<Button onClick={() => alert('Hello!')}>
|
|
27
|
+
Click me
|
|
28
|
+
</Button>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### CSS Import
|
|
34
|
+
|
|
35
|
+
**Important:** UI Baza uses CSS cascade layers for proper style isolation. Import the styles with the lowest priority to allow your local variables to override library defaults:
|
|
36
|
+
|
|
37
|
+
```css
|
|
38
|
+
@layer ui_baza_reset, ui_baza_tokens, base, theme, components, utilities;
|
|
39
|
+
|
|
40
|
+
@import 'ui-baza/css';
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Customizing Design Tokens
|
|
44
|
+
|
|
45
|
+
You can override the default design tokens by defining your own CSS variables after importing the library:
|
|
46
|
+
|
|
47
|
+
```css
|
|
48
|
+
:root {
|
|
49
|
+
/* Override color tokens */
|
|
50
|
+
--color-neutral: #1a1a1a;
|
|
51
|
+
--color-accent: #0066ff;
|
|
52
|
+
|
|
53
|
+
/* Override radius tokens */
|
|
54
|
+
--radius-xs: 4px;
|
|
55
|
+
--radius-sm: 6px;
|
|
56
|
+
--radius-md: 8px;
|
|
57
|
+
--radius-lg: 10px;
|
|
58
|
+
--radius-xl: 12px;
|
|
59
|
+
--radius-2xl: 14px;
|
|
60
|
+
--radius-3xl: 16px;
|
|
61
|
+
--radius-4xl: 24px;
|
|
62
|
+
--radius-5xl: 32px;
|
|
63
|
+
--radius-tooltip: 10px;
|
|
64
|
+
--radius-content-xl: 24px;
|
|
65
|
+
--radius-content-lg: 18px;
|
|
66
|
+
--radius-content-md: 16px;
|
|
67
|
+
--radius-content-sm: 14px;
|
|
68
|
+
--radius-content-xs: 12px;
|
|
69
|
+
--radius-image-xl: 18px;
|
|
70
|
+
--radius-image-lg: 16px;
|
|
71
|
+
--radius-image-md: 14px;
|
|
72
|
+
--radius-image-sm: 12px;
|
|
73
|
+
--radius-image-xs: 10px;
|
|
74
|
+
--radius-image-2xs: 8px;
|
|
75
|
+
--radius-image-3xs: 6px;
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## 🛠️ Development
|
|
80
|
+
|
|
81
|
+
### Prerequisites
|
|
82
|
+
|
|
83
|
+
- Node.js 22+
|
|
84
|
+
- npm/yarn/pnpm
|
|
85
|
+
|
|
86
|
+
### Getting Started
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Clone the repository
|
|
90
|
+
git clone https://gitlab.itglobal.com/itgold/gb/ui-baza.git
|
|
91
|
+
|
|
92
|
+
# Install dependencies
|
|
93
|
+
npm install
|
|
94
|
+
|
|
95
|
+
# Start Storybook for development
|
|
96
|
+
npm run dev
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Available Scripts
|
|
100
|
+
|
|
101
|
+
- `npm run dev` - Start Storybook development server
|
|
102
|
+
- `npm run build:lib` - Build the library
|
|
103
|
+
- `npm run build:storybook` - Build Storybook for production
|
|
104
|
+
- `npm run lint` - Run ESLint
|
|
105
|
+
- `npm run format` - Format code with Prettier
|
|
106
|
+
- `npm run prepare` - Setup Husky git hooks
|
|
107
|
+
- `npm run version:patch` - Build and bump patch version
|
|
108
|
+
- `npm run version:minor` - Build and bump minor version
|
|
109
|
+
- `npm run version:major` - Build and bump major version
|
|
110
|
+
- `npm run publish` - Build and publish to npm
|
|
111
|
+
|
|
112
|
+
### Building
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
npm run build:lib
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## 📚 Components
|
|
119
|
+
|
|
120
|
+
Currently available components:
|
|
121
|
+
|
|
122
|
+
- **Button** - Flexible button component with various styles and states
|
|
123
|
+
|
|
124
|
+
More components coming soon! 🎉
|
|
125
|
+
|
|
126
|
+
## 🔗 Links
|
|
127
|
+
|
|
128
|
+
- [Homepage](https://grandbazar.io/ui-baza)
|
|
129
|
+
- [Repository](https://gitlab.itglobal.com/itgold/gb/ui-baza)
|
|
130
|
+
- [Grandbazar](https://grandbazar.io)
|
|
131
|
+
|
|
132
|
+
## 📄 License
|
|
133
|
+
|
|
134
|
+
MIT © [Grandbazar](https://grandbazar.io)
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
function classNames(...classes) {
|
|
8
|
+
return classes.filter(Boolean).join(" ");
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const button = "_button_e0z64_1";
|
|
12
|
+
const styles = {
|
|
13
|
+
button: button
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
function Button({ children, className, ...props }) {
|
|
17
|
+
return /* @__PURE__ */ jsxRuntime.jsx("button", { className: classNames(styles.button, className), ...props, children });
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
exports.Button = Button;
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
function classNames(...classes) {
|
|
4
|
+
return classes.filter(Boolean).join(" ");
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
const button = "_button_e0z64_1";
|
|
8
|
+
const styles = {
|
|
9
|
+
button: button
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
function Button({ children, className, ...props }) {
|
|
13
|
+
return /* @__PURE__ */ jsx("button", { className: classNames(styles.button, className), ...props, children });
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { Button };
|
package/dist/style.css
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
@layer ui_baza_reset, ui_baza_tokens;
|
|
2
|
+
|
|
3
|
+
@layer ui_baza_reset{
|
|
4
|
+
|
|
5
|
+
*,
|
|
6
|
+
*::before,
|
|
7
|
+
*::after {
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: 0;
|
|
11
|
+
border: 0;
|
|
12
|
+
outline: none;
|
|
13
|
+
background: transparent;
|
|
14
|
+
color: inherit;
|
|
15
|
+
font: inherit;
|
|
16
|
+
font-size: 100%;
|
|
17
|
+
text-decoration: none;
|
|
18
|
+
vertical-align: baseline;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
html,
|
|
22
|
+
body,
|
|
23
|
+
div,
|
|
24
|
+
span,
|
|
25
|
+
applet,
|
|
26
|
+
object,
|
|
27
|
+
iframe,
|
|
28
|
+
h1,
|
|
29
|
+
h2,
|
|
30
|
+
h3,
|
|
31
|
+
h4,
|
|
32
|
+
h5,
|
|
33
|
+
h6,
|
|
34
|
+
p,
|
|
35
|
+
blockquote,
|
|
36
|
+
pre,
|
|
37
|
+
a,
|
|
38
|
+
abbr,
|
|
39
|
+
acronym,
|
|
40
|
+
address,
|
|
41
|
+
big,
|
|
42
|
+
cite,
|
|
43
|
+
code,
|
|
44
|
+
del,
|
|
45
|
+
dfn,
|
|
46
|
+
em,
|
|
47
|
+
font,
|
|
48
|
+
img,
|
|
49
|
+
ins,
|
|
50
|
+
kbd,
|
|
51
|
+
q,
|
|
52
|
+
s,
|
|
53
|
+
samp,
|
|
54
|
+
small,
|
|
55
|
+
strike,
|
|
56
|
+
strong,
|
|
57
|
+
sub,
|
|
58
|
+
sup,
|
|
59
|
+
tt,
|
|
60
|
+
var,
|
|
61
|
+
b,
|
|
62
|
+
u,
|
|
63
|
+
i,
|
|
64
|
+
center,
|
|
65
|
+
dl,
|
|
66
|
+
dt,
|
|
67
|
+
dd,
|
|
68
|
+
ol,
|
|
69
|
+
ul,
|
|
70
|
+
li,
|
|
71
|
+
fieldset,
|
|
72
|
+
form,
|
|
73
|
+
label,
|
|
74
|
+
legend,
|
|
75
|
+
table,
|
|
76
|
+
caption,
|
|
77
|
+
tbody,
|
|
78
|
+
tfoot,
|
|
79
|
+
thead,
|
|
80
|
+
tr,
|
|
81
|
+
th,
|
|
82
|
+
td,
|
|
83
|
+
article,
|
|
84
|
+
aside,
|
|
85
|
+
canvas,
|
|
86
|
+
details,
|
|
87
|
+
embed,
|
|
88
|
+
figure,
|
|
89
|
+
figcaption,
|
|
90
|
+
footer,
|
|
91
|
+
header,
|
|
92
|
+
hgroup,
|
|
93
|
+
menu,
|
|
94
|
+
nav,
|
|
95
|
+
output,
|
|
96
|
+
ruby,
|
|
97
|
+
section,
|
|
98
|
+
summary,
|
|
99
|
+
time,
|
|
100
|
+
mark,
|
|
101
|
+
audio,
|
|
102
|
+
video {
|
|
103
|
+
margin: 0;
|
|
104
|
+
padding: 0;
|
|
105
|
+
border: 0;
|
|
106
|
+
background: transparent;
|
|
107
|
+
color: inherit;
|
|
108
|
+
font: inherit;
|
|
109
|
+
font-size: 100%;
|
|
110
|
+
vertical-align: baseline;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
ol,
|
|
114
|
+
ul {
|
|
115
|
+
list-style: none;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
blockquote,
|
|
119
|
+
q {
|
|
120
|
+
quotes: none;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
blockquote:before,
|
|
124
|
+
blockquote:after,
|
|
125
|
+
q:before,
|
|
126
|
+
q:after {
|
|
127
|
+
content: '';
|
|
128
|
+
content: none;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
table {
|
|
132
|
+
border-collapse: collapse;
|
|
133
|
+
border-spacing: 0;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
button {
|
|
137
|
+
margin: 0;
|
|
138
|
+
padding: 0;
|
|
139
|
+
border: none;
|
|
140
|
+
background: none;
|
|
141
|
+
color: inherit;
|
|
142
|
+
font: inherit;
|
|
143
|
+
cursor: pointer;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
input,
|
|
147
|
+
textarea,
|
|
148
|
+
select {
|
|
149
|
+
margin: 0;
|
|
150
|
+
padding: 0;
|
|
151
|
+
border: none;
|
|
152
|
+
outline: none;
|
|
153
|
+
background: none;
|
|
154
|
+
color: inherit;
|
|
155
|
+
font: inherit;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
*:focus {
|
|
159
|
+
outline: none;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
* {
|
|
163
|
+
-webkit-tap-highlight-color: transparent;
|
|
164
|
+
-webkit-appearance: none;
|
|
165
|
+
-moz-appearance: none;
|
|
166
|
+
appearance: none;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
*:disabled {
|
|
170
|
+
pointer-events: none;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
@layer ui_baza_tokens {
|
|
175
|
+
:root {
|
|
176
|
+
--color-white: #ffffff;
|
|
177
|
+
|
|
178
|
+
--color-neutral: #111217;
|
|
179
|
+
--color-neutral-340: color-mix(in srgb, var(--color-neutral) 34%, var(--color-white) 66%);
|
|
180
|
+
--color-neutral-alpha-60: color-mix(in srgb, var(--color-neutral) 6%, transparent);
|
|
181
|
+
|
|
182
|
+
--color-accent: #195eff;
|
|
183
|
+
--color-accent-900: color-mix(in srgb, var(--color-accent) 94.8%, var(--color-white) 5.2%);
|
|
184
|
+
--color-accent-800: color-mix(in srgb, var(--color-accent) 90%, var(--color-white) 10%);
|
|
185
|
+
|
|
186
|
+
--radius-xs: 4px;
|
|
187
|
+
--radius-sm: 6px;
|
|
188
|
+
--radius-md: 8px;
|
|
189
|
+
--radius-lg: 10px;
|
|
190
|
+
--radius-xl: 12px;
|
|
191
|
+
--radius-2xl: 14px;
|
|
192
|
+
--radius-3xl: 16px;
|
|
193
|
+
--radius-4xl: 24px;
|
|
194
|
+
--radius-5xl: 32px;
|
|
195
|
+
--radius-tooltip: 10px;
|
|
196
|
+
--radius-content-xl: 24px;
|
|
197
|
+
--radius-content-lg: 18px;
|
|
198
|
+
--radius-content-md: 16px;
|
|
199
|
+
--radius-content-sm: 14px;
|
|
200
|
+
--radius-content-xs: 12px;
|
|
201
|
+
--radius-image-xl: 18px;
|
|
202
|
+
--radius-image-lg: 16px;
|
|
203
|
+
--radius-image-md: 14px;
|
|
204
|
+
--radius-image-sm: 12px;
|
|
205
|
+
--radius-image-xs: 10px;
|
|
206
|
+
--radius-image-2xs: 8px;
|
|
207
|
+
--radius-image-3xs: 6px;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
._button_e0z64_1 {
|
|
211
|
+
display: inline-flex;
|
|
212
|
+
align-items: center;
|
|
213
|
+
padding: 16px;
|
|
214
|
+
border-radius: var(--radius-xl);
|
|
215
|
+
background-color: var(--color-accent);
|
|
216
|
+
color: var(--color-white);
|
|
217
|
+
|
|
218
|
+
&:hover {
|
|
219
|
+
background-color: var(--color-accent-900);
|
|
220
|
+
}
|
|
221
|
+
&:active {
|
|
222
|
+
background-color: var(--color-accent-800);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
&:disabled {
|
|
226
|
+
background-color: var(--color-neutral-alpha-60);
|
|
227
|
+
color: var(--color-neutral-340);
|
|
228
|
+
}
|
|
229
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@grandbazar/ui-baza",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A lightweight and modular UI kit for building modern, accessible web interfaces. Designed for flexibility, scalability, and developer happiness.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://gitlab.itglobal.com/itgold/gb/ui-baza"
|
|
8
|
+
},
|
|
9
|
+
"author": "grandbazar <https://grandbazar.io>",
|
|
10
|
+
"homepage": "https://grandbazar.io/ui-baza",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"React",
|
|
13
|
+
"Typescript",
|
|
14
|
+
"Storybook",
|
|
15
|
+
"UI",
|
|
16
|
+
"UI Baza",
|
|
17
|
+
"Grandbazar",
|
|
18
|
+
"UI kit",
|
|
19
|
+
"UI library"
|
|
20
|
+
],
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"type": "module",
|
|
23
|
+
"files": [
|
|
24
|
+
"dist"
|
|
25
|
+
],
|
|
26
|
+
"sideEffects": [
|
|
27
|
+
"**/*.css"
|
|
28
|
+
],
|
|
29
|
+
"main": "./dist/index.cjs",
|
|
30
|
+
"module": "./dist/index.js",
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"import": {
|
|
35
|
+
"types": "./dist/index.d.ts",
|
|
36
|
+
"default": "./dist/index.js"
|
|
37
|
+
},
|
|
38
|
+
"require": {
|
|
39
|
+
"types": "./dist/index.d.ts",
|
|
40
|
+
"default": "./dist/index.cjs"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"./css": "./dist/style.css"
|
|
44
|
+
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"dev": "storybook dev -p 6006",
|
|
47
|
+
"build:storybook": "storybook build",
|
|
48
|
+
"build:lib": "tsc && vite build",
|
|
49
|
+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
50
|
+
"format": "prettier . --write --ignore-unknown",
|
|
51
|
+
"prepare": "husky",
|
|
52
|
+
"version:patch": "npm run build:lib && npm version patch",
|
|
53
|
+
"version:minor": "npm run build:lib && npm version minor",
|
|
54
|
+
"version:major": "npm run build:lib && npm version major",
|
|
55
|
+
"publish": "npm run build:lib && npm publish"
|
|
56
|
+
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"react": "^19",
|
|
59
|
+
"react-dom": "^19"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@eslint/compat": "^1.3.2",
|
|
63
|
+
"@eslint/js": "^9.34.0",
|
|
64
|
+
"@storybook/addon-docs": "^9.1.4",
|
|
65
|
+
"@storybook/react-vite": "^9.1.4",
|
|
66
|
+
"@types/node": "^24.3.0",
|
|
67
|
+
"@types/react": "^19",
|
|
68
|
+
"@types/react-dom": "^19",
|
|
69
|
+
"@vitejs/plugin-react": "^5.0.2",
|
|
70
|
+
"eslint": "^9.34.0",
|
|
71
|
+
"eslint-config-prettier": "^10.1.8",
|
|
72
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
73
|
+
"eslint-plugin-import": "^2.32.0",
|
|
74
|
+
"eslint-plugin-react": "^7.37.5",
|
|
75
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
76
|
+
"eslint-plugin-react-refresh": "^0.4.20",
|
|
77
|
+
"eslint-plugin-storybook": "^9.1.4",
|
|
78
|
+
"globals": "^16.3.0",
|
|
79
|
+
"husky": "^9.1.7",
|
|
80
|
+
"prettier": "^3.6.2",
|
|
81
|
+
"prettier-plugin-css-order": "^2.1.2",
|
|
82
|
+
"storybook": "^9.1.4",
|
|
83
|
+
"typescript": "^5.9.2",
|
|
84
|
+
"typescript-eslint": "^8.42.0",
|
|
85
|
+
"vite": "^7.1.4",
|
|
86
|
+
"vite-plugin-dts": "^4.5.4"
|
|
87
|
+
}
|
|
88
|
+
}
|