arekui 1.0.2 → 2.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/CHANGELOG.md +49 -0
- package/README.md +16 -188
- package/arekui.css +3018 -367
- package/arekui.d.ts +47 -47
- package/arekui.js +402 -35
- package/assets/img/grunge-wall-texture-freepick-kues1.webp +0 -0
- package/assets/img/logo.png +0 -0
- package/dist/css/arekui.base.min.css +1 -0
- package/dist/css/arekui.broadsheet.min.css +1 -0
- package/dist/css/arekui.brutalist.min.css +1 -0
- package/dist/css/arekui.default.min.css +1 -0
- package/dist/css/arekui.full.min.css +1 -0
- package/dist/css/arekui.min.css +1 -0
- package/dist/css/arekui.neo.min.css +1 -0
- package/dist/css/arekui.pixel.min.css +1 -0
- package/dist/js/arekui.min.js +2 -0
- package/package.json +14 -9
- package/scripts/build-css.js +95 -0
- package/scripts/build-custom.js +65 -96
- package/scripts/build-js.js +68 -0
- package/scripts/clean.js +13 -0
- package/scripts/dev.js +97 -0
- package/scripts/imports.js +18 -0
- package/scripts/split.js +256 -0
- package/src/arekui.base.css +63 -0
- package/src/arekui.broadsheet.css +6 -0
- package/src/arekui.brutalist.css +8 -0
- package/src/arekui.core.css +64 -0
- package/src/arekui.css +73 -56
- package/src/arekui.default.css +6 -0
- package/src/arekui.neo.css +8 -0
- package/src/arekui.pixel.css +8 -0
- package/src/base/brutalist-overrides.css +254 -0
- package/src/base/neo-overrides.css +46 -31
- package/src/base/pixel-overrides.css +336 -0
- package/src/base/reset.css +118 -4
- package/src/base/theme-brutalist.css +111 -0
- package/src/base/theme-default.css +184 -0
- package/src/base/theme-neo.css +108 -0
- package/src/base/theme-pixel.css +111 -0
- package/src/base/tokens.css +10 -253
- package/src/components/accordion.css +1 -2
- package/src/components/alert.css +1 -2
- package/src/components/badge.css +1 -2
- package/src/components/breadcrumb.css +2 -3
- package/src/components/broadsheet.css +264 -0
- package/src/components/button.css +3 -2
- package/src/components/card.css +1 -2
- package/src/components/carousel.css +37 -1
- package/src/components/chat.css +5 -4
- package/src/components/description-list.css +34 -0
- package/src/components/docs.css +252 -0
- package/src/components/empty.css +36 -0
- package/src/components/file-upload.css +2 -3
- package/src/components/footer.css +16 -1
- package/src/components/forms.css +1 -2
- package/src/components/heading.css +27 -0
- package/src/components/hero.css +1 -2
- package/src/components/join.css +1 -2
- package/src/components/kbd.css +15 -0
- package/src/components/link.css +2 -3
- package/src/components/loading.css +109 -0
- package/src/components/menu.css +51 -1
- package/src/components/misc.css +40 -1
- package/src/components/modal.css +1 -2
- package/src/components/navbar.css +131 -1
- package/src/components/pagination.css +7 -2
- package/src/components/popover.css +5 -6
- package/src/components/progress.css +1 -2
- package/src/components/prose.css +2 -2
- package/src/components/rating.css +1 -2
- package/src/components/scroll-top.css +2 -2
- package/src/components/segmented.css +44 -0
- package/src/components/sidebar.css +377 -0
- package/src/components/skeleton.css +2 -2
- package/src/components/spinner.css +36 -0
- package/src/components/swap.css +2 -2
- package/src/components/table.css +1 -2
- package/src/components/tabs.css +2 -3
- package/src/components/tag.css +10 -10
- package/src/components/textured.css +22 -2
- package/src/components/timeline.css +1 -2
- package/src/components/toast.css +2 -2
- package/src/components/tooltip.css +1 -2
- package/src/utilities/borders.css +2 -2
- package/src/utilities/brutalist-utilities.css +49 -0
- package/src/utilities/colors.css +11 -3
- package/src/utilities/hover.css +2 -2
- package/src/utilities/layout.css +2 -2
- package/src/utilities/neo-utilities.css +2 -9
- package/src/utilities/pixel-utilities.css +88 -0
- package/src/utilities/responsive.css +7 -2
- package/src/utilities/sizing.css +16 -7
- package/src/utilities/spacing.css +5 -2
- package/src/utilities/typography.css +5 -2
- package/dist/arekui.min.css +0 -1
- package/dist/arekui.min.js +0 -2
- package/src/components/drawer.css +0 -53
package/arekui.d.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* ArekUI v2.0.0
|
|
3
3
|
* A standalone CSS framework by Andika Rekatias.
|
|
4
4
|
*
|
|
5
5
|
* @example
|
|
6
6
|
* ```html
|
|
7
|
-
* <link rel="stylesheet" href="
|
|
8
|
-
* <script src="
|
|
7
|
+
* <link rel="stylesheet" href="arekui.css">
|
|
8
|
+
* <script src="arekui.js"></script>
|
|
9
9
|
* ```
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
* ```typescript
|
|
13
13
|
* // Set theme
|
|
14
|
-
*
|
|
14
|
+
* ArekUI.setTheme("dark");
|
|
15
15
|
*
|
|
16
16
|
* // Show toast
|
|
17
|
-
*
|
|
17
|
+
* ArekUI.toast("Saved!", { type: "success", duration: 4000 });
|
|
18
18
|
*
|
|
19
19
|
* // Get rating
|
|
20
|
-
* const rating =
|
|
20
|
+
* const rating = ArekUI.getRating(document.querySelector("[data-ar-rating]"));
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
/** Available theme names */
|
|
25
|
-
export type ThemeName = "light" | "dark" | "neo";
|
|
25
|
+
export type ThemeName = "light" | "dark" | "neo" | "pixel" | "brutalist";
|
|
26
26
|
|
|
27
27
|
/** Toast notification type */
|
|
28
28
|
export type ToastType = "info" | "success" | "warning" | "error";
|
|
@@ -38,7 +38,7 @@ export type ToastPosition =
|
|
|
38
38
|
|
|
39
39
|
/** Options for toast notifications */
|
|
40
40
|
export interface ToastOptions {
|
|
41
|
-
/** Toast type for styling */
|
|
41
|
+
/** Toast type for styling (default: "info") */
|
|
42
42
|
type?: ToastType;
|
|
43
43
|
|
|
44
44
|
/** Auto-dismiss duration in milliseconds (0 = no auto-dismiss, default: 4000) */
|
|
@@ -98,7 +98,7 @@ export interface FileChangeEvent extends CustomEvent<FileChangeDetail> {
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
|
-
*
|
|
101
|
+
* ArekUI public API
|
|
102
102
|
*
|
|
103
103
|
* @description Provides theme management, toast notifications,
|
|
104
104
|
* rating controls, popover management, and initialization.
|
|
@@ -107,23 +107,23 @@ export interface FileChangeEvent extends CustomEvent<FileChangeDetail> {
|
|
|
107
107
|
* ```html
|
|
108
108
|
* <script>
|
|
109
109
|
* // Theme management
|
|
110
|
-
*
|
|
111
|
-
* console.log(
|
|
110
|
+
* ArekUI.setTheme("neo");
|
|
111
|
+
* console.log(ArekUI.getTheme()); // "neo"
|
|
112
112
|
*
|
|
113
113
|
* // Toast notifications
|
|
114
|
-
*
|
|
114
|
+
* ArekUI.toast("Item saved!", { type: "success" });
|
|
115
115
|
*
|
|
116
116
|
* // Rating
|
|
117
117
|
* const container = document.querySelector("[data-ar-rating]");
|
|
118
|
-
*
|
|
119
|
-
* console.log(
|
|
118
|
+
* ArekUI.setRating(container, 4);
|
|
119
|
+
* console.log(ArekUI.getRating(container)); // 4
|
|
120
120
|
*
|
|
121
121
|
* // Popover
|
|
122
|
-
*
|
|
122
|
+
* ArekUI.openPopover("my-popover");
|
|
123
123
|
* </script>
|
|
124
124
|
* ```
|
|
125
125
|
*/
|
|
126
|
-
export interface
|
|
126
|
+
export interface ArekUIStatic {
|
|
127
127
|
/**
|
|
128
128
|
* Set the active theme
|
|
129
129
|
*
|
|
@@ -131,8 +131,8 @@ export interface ARStyleStatic {
|
|
|
131
131
|
*
|
|
132
132
|
* @example
|
|
133
133
|
* ```typescript
|
|
134
|
-
*
|
|
135
|
-
*
|
|
134
|
+
* ArekUI.setTheme("dark");
|
|
135
|
+
* ArekUI.setTheme("neo");
|
|
136
136
|
* ```
|
|
137
137
|
*/
|
|
138
138
|
setTheme(theme: ThemeName): void;
|
|
@@ -144,7 +144,7 @@ export interface ARStyleStatic {
|
|
|
144
144
|
*
|
|
145
145
|
* @example
|
|
146
146
|
* ```typescript
|
|
147
|
-
* const current =
|
|
147
|
+
* const current = ArekUI.getTheme();
|
|
148
148
|
* if (current === "dark") {
|
|
149
149
|
* // Dark theme is active
|
|
150
150
|
* }
|
|
@@ -161,22 +161,22 @@ export interface ARStyleStatic {
|
|
|
161
161
|
* @example
|
|
162
162
|
* ```typescript
|
|
163
163
|
* // Usually called automatically, but can be called manually
|
|
164
|
-
*
|
|
164
|
+
* ArekUI.initTheme();
|
|
165
165
|
* ```
|
|
166
166
|
*/
|
|
167
167
|
initTheme(): void;
|
|
168
168
|
|
|
169
169
|
/**
|
|
170
|
-
* Initialize all
|
|
170
|
+
* Initialize all ArekUI behaviors
|
|
171
171
|
*
|
|
172
|
-
* @description Sets up event listeners for theme toggle, modals,
|
|
172
|
+
* @description Sets up event listeners for theme toggle, modals, sidebars,
|
|
173
173
|
* tabs, dropdowns, accordion, ratings, popovers, file uploads, and scroll-to-top
|
|
174
174
|
*
|
|
175
175
|
* @example
|
|
176
176
|
* ```typescript
|
|
177
177
|
* // Called automatically on DOMContentLoaded
|
|
178
178
|
* // Call manually if adding elements dynamically
|
|
179
|
-
*
|
|
179
|
+
* ArekUI.init();
|
|
180
180
|
* ```
|
|
181
181
|
*/
|
|
182
182
|
init(): void;
|
|
@@ -191,19 +191,19 @@ export interface ARStyleStatic {
|
|
|
191
191
|
* @example
|
|
192
192
|
* ```typescript
|
|
193
193
|
* // Basic toast
|
|
194
|
-
*
|
|
194
|
+
* ArekUI.toast("Hello world!");
|
|
195
195
|
*
|
|
196
196
|
* // Success toast with custom duration
|
|
197
|
-
*
|
|
197
|
+
* ArekUI.toast("Saved successfully!", {
|
|
198
198
|
* type: "success",
|
|
199
199
|
* duration: 5000
|
|
200
200
|
* });
|
|
201
201
|
*
|
|
202
202
|
* // Persistent toast (no auto-dismiss)
|
|
203
|
-
* const loading =
|
|
203
|
+
* const loading = ArekUI.toast("Loading...", { duration: 0 });
|
|
204
204
|
*
|
|
205
205
|
* // Dismiss programmatically
|
|
206
|
-
*
|
|
206
|
+
* ArekUI.dismissToast(loading);
|
|
207
207
|
* ```
|
|
208
208
|
*/
|
|
209
209
|
toast(message: string, options?: ToastOptions): HTMLElement;
|
|
@@ -215,9 +215,9 @@ export interface ARStyleStatic {
|
|
|
215
215
|
*
|
|
216
216
|
* @example
|
|
217
217
|
* ```typescript
|
|
218
|
-
* const toast =
|
|
218
|
+
* const toast = ArekUI.toast("Processing...");
|
|
219
219
|
* // ... later
|
|
220
|
-
*
|
|
220
|
+
* ArekUI.dismissToast(toast);
|
|
221
221
|
* ```
|
|
222
222
|
*/
|
|
223
223
|
dismissToast(el: HTMLElement): void;
|
|
@@ -231,7 +231,7 @@ export interface ARStyleStatic {
|
|
|
231
231
|
* @example
|
|
232
232
|
* ```typescript
|
|
233
233
|
* const container = document.querySelector("[data-ar-rating]");
|
|
234
|
-
* const rating =
|
|
234
|
+
* const rating = ArekUI.getRating(container);
|
|
235
235
|
* console.log(`Selected rating: ${rating}`);
|
|
236
236
|
* ```
|
|
237
237
|
*/
|
|
@@ -246,7 +246,7 @@ export interface ARStyleStatic {
|
|
|
246
246
|
* @example
|
|
247
247
|
* ```typescript
|
|
248
248
|
* const container = document.querySelector("[data-ar-rating]");
|
|
249
|
-
*
|
|
249
|
+
* ArekUI.setRating(container, 4); // Select 4 stars
|
|
250
250
|
* ```
|
|
251
251
|
*/
|
|
252
252
|
setRating(container: HTMLElement, value: number): void;
|
|
@@ -267,7 +267,7 @@ export interface ARStyleStatic {
|
|
|
267
267
|
* ```
|
|
268
268
|
*
|
|
269
269
|
* ```typescript
|
|
270
|
-
*
|
|
270
|
+
* ArekUI.openPopover("my-popover");
|
|
271
271
|
* ```
|
|
272
272
|
*/
|
|
273
273
|
openPopover(id: string): void;
|
|
@@ -279,50 +279,50 @@ export interface ARStyleStatic {
|
|
|
279
279
|
*
|
|
280
280
|
* @example
|
|
281
281
|
* ```typescript
|
|
282
|
-
*
|
|
282
|
+
* ArekUI.closePopover("my-popover");
|
|
283
283
|
* ```
|
|
284
284
|
*/
|
|
285
285
|
closePopover(id: string): void;
|
|
286
286
|
}
|
|
287
287
|
|
|
288
288
|
/**
|
|
289
|
-
*
|
|
289
|
+
* ArekUI global namespace
|
|
290
290
|
*
|
|
291
|
-
* @description Provides access to all
|
|
291
|
+
* @description Provides access to all ArekUI public methods
|
|
292
292
|
* when using the script tag approach (no module system)
|
|
293
293
|
*
|
|
294
|
-
* @see {@link
|
|
294
|
+
* @see {@link ArekUIStatic} for method signatures and examples
|
|
295
295
|
*/
|
|
296
296
|
declare global {
|
|
297
297
|
interface Window {
|
|
298
298
|
/**
|
|
299
|
-
*
|
|
299
|
+
* ArekUI global API
|
|
300
300
|
*
|
|
301
301
|
* @example
|
|
302
302
|
* ```html
|
|
303
|
-
* <script src="
|
|
303
|
+
* <script src="arekui.js"></script>
|
|
304
304
|
* <script>
|
|
305
|
-
*
|
|
306
|
-
*
|
|
305
|
+
* ArekUI.setTheme("dark");
|
|
306
|
+
* ArekUI.toast("Hello!");
|
|
307
307
|
* </script>
|
|
308
308
|
* ```
|
|
309
309
|
*/
|
|
310
|
-
|
|
310
|
+
ArekUI: ArekUIStatic;
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
|
|
314
314
|
/**
|
|
315
|
-
*
|
|
315
|
+
* ArekUI module export
|
|
316
316
|
*
|
|
317
317
|
* @example
|
|
318
318
|
* ```typescript
|
|
319
319
|
* // ES Module import
|
|
320
|
-
* import
|
|
320
|
+
* import ArekUI from "arekui";
|
|
321
321
|
*
|
|
322
|
-
*
|
|
322
|
+
* ArekUI.setTheme("neo");
|
|
323
323
|
* ```
|
|
324
324
|
*/
|
|
325
|
-
declare const
|
|
325
|
+
declare const ArekUI: ArekUIStatic;
|
|
326
326
|
|
|
327
|
-
export default
|
|
328
|
-
export {
|
|
327
|
+
export default ArekUI;
|
|
328
|
+
export { ArekUI, ArekUIStatic };
|