akku-kit 1.0.0-alpha.6 → 1.0.0-alpha.8
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 +10 -53
- package/dist/components/DatePicker/DatePicker.d.ts +22 -0
- package/dist/components/DatePicker/DatePicker.types.d.ts +31 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +9 -0
- package/dist/components/DateRangePicker/DateRangePicker.types.d.ts +15 -0
- package/dist/components/Form/PhoneInput/PhoneInput.d.ts +2 -2
- package/dist/components/Form/PhoneInput/PhoneInput.types.d.ts +1 -2
- package/dist/components/Modal/Modal.d.ts +13 -0
- package/dist/components/Modal/Modal.index.d.ts +2 -0
- package/dist/components/Toast/Toast.d.ts +7 -0
- package/dist/components/Toast/Toast.types.d.ts +34 -5
- package/dist/components/Typography/Label/Label.types.d.ts +1 -0
- package/dist/index.cjs.js +7 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.esm.js +7 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/styles/index.css +886 -0
- package/package.json +4 -4
package/README.md
CHANGED
@@ -1,6 +1,9 @@
|
|
1
|
-
# ⚡️
|
1
|
+
# ⚡️ Akku-UI-Kit
|
2
2
|
|
3
|
-
|
3
|
+
Akku-UI-Kit is a modern, TypeScript-based UI framework built specifically for Akku projects. It includes a growing collection of reusable, accessible, and customizable components.
|
4
|
+
|
5
|
+
## Akku-UI-Kit [Demo]
|
6
|
+
[Akku-UI-Kit](https://akku-kit.vercel.app/)
|
4
7
|
|
5
8
|
## ✨ Features
|
6
9
|
|
@@ -24,11 +27,7 @@ akku-kit is a modern, TypeScript-based UI framework built specifically for Akku
|
|
24
27
|
- `Tabs`
|
25
28
|
- `Card`
|
26
29
|
- `Switch`
|
27
|
-
- `Textarea`
|
28
30
|
- `Loader`
|
29
|
-
- `Alert`
|
30
|
-
- `Breadcrumb`
|
31
|
-
- `Pagination`
|
32
31
|
|
33
32
|
> More components coming in future releases.
|
34
33
|
|
@@ -56,57 +55,15 @@ npm start
|
|
56
55
|
npm run storybook
|
57
56
|
```
|
58
57
|
|
59
|
-
## 🔖 Versioning Workflow
|
60
|
-
|
61
|
-
- `1.0.0-alpha.0`: First alpha build
|
62
|
-
- `1.0.0-alpha.1`: Second alpha build
|
63
|
-
- `1.0.0-beta.0`: First beta build
|
64
|
-
- `1.0.0-rc.0`: First release candidate
|
65
|
-
- `1.0.0`: Final stable release
|
66
|
-
|
67
|
-
## 🚚 Prerelease Workflow
|
68
58
|
|
69
|
-
|
59
|
+
## 🤝 Contributing
|
70
60
|
|
71
|
-
|
72
|
-
npm version premajor --preid alpha
|
73
|
-
npm run build
|
74
|
-
npm publish --tag alpha
|
75
|
-
```
|
61
|
+
Contributions are always welcome to the **Akku UI Framework (`Akku-UI-Kit`)** and the main project **`akku`**!
|
76
62
|
|
77
|
-
|
78
|
-
|
79
|
-
```bash
|
80
|
-
npm version prerelease
|
81
|
-
npm run build
|
82
|
-
npm publish --tag alpha
|
83
|
-
npm dist-tag add akku-kit@1.0.0-alpha.2 latest # akku-kit@1.0.0-alpha.2 change to updated version as per package json
|
84
|
-
|
85
|
-
```
|
86
|
-
|
87
|
-
Promote to beta:
|
88
|
-
|
89
|
-
```bash
|
90
|
-
npm version prerelease --preid beta
|
91
|
-
npm run build
|
92
|
-
npm publish --tag beta
|
93
|
-
```
|
94
|
-
|
95
|
-
Stable release:
|
96
|
-
|
97
|
-
```bash
|
98
|
-
npm version 2.0.0
|
99
|
-
npm run build
|
100
|
-
npm publish
|
101
|
-
```
|
63
|
+
Whether you're fixing bugs, building components, improving styles, or refining documentation—every contribution helps.
|
102
64
|
|
103
|
-
|
65
|
+
To get started, please read the [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines and best practices.
|
104
66
|
|
105
|
-
1. Clone the repo
|
106
|
-
2. Run `npm install`
|
107
|
-
3. Develop with `npm start`
|
108
|
-
4. Submit a PR!
|
109
67
|
|
110
|
-
---
|
111
68
|
|
112
|
-
License: MIT © 2025
|
69
|
+
License: MIT © 2025 Akku-UI-Kit Team
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import React, { InputHTMLAttributes } from "react";
|
2
|
+
import "./DatePicker.scss";
|
3
|
+
interface DayjsLike {
|
4
|
+
_date: Date;
|
5
|
+
isValid: () => boolean;
|
6
|
+
format: (fmt: string) => string;
|
7
|
+
toDate: () => Date;
|
8
|
+
valueOf: () => number;
|
9
|
+
isBefore: (other: DayjsLike | Date) => boolean;
|
10
|
+
isAfter: (other: DayjsLike | Date) => boolean;
|
11
|
+
isSame: (other: DayjsLike | Date) => boolean;
|
12
|
+
}
|
13
|
+
interface DatePickerProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "onChange"> {
|
14
|
+
value?: DayjsLike | Date | null;
|
15
|
+
onChange?: (date: DayjsLike | null) => void;
|
16
|
+
format?: string;
|
17
|
+
allowClear?: boolean;
|
18
|
+
disabledDate?: (date: DayjsLike) => boolean;
|
19
|
+
suffixIcon?: React.ReactNode;
|
20
|
+
}
|
21
|
+
declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLInputElement>>;
|
22
|
+
export default DatePicker;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { FocusEventHandler, ReactNode } from "react";
|
2
|
+
export interface DatePickerProps {
|
3
|
+
/** Selected date value */
|
4
|
+
value?: Date | null;
|
5
|
+
/** Callback when date changes */
|
6
|
+
onChange?: (date: Date | null) => void;
|
7
|
+
/** Minimum selectable date */
|
8
|
+
minDate?: Date;
|
9
|
+
/** Maximum selectable date */
|
10
|
+
maxDate?: Date;
|
11
|
+
/** Disable the date picker */
|
12
|
+
disabled?: boolean;
|
13
|
+
/** Placeholder text */
|
14
|
+
placeholder?: string;
|
15
|
+
/** Format string for display, e.g. 'MM/dd/yyyy' */
|
16
|
+
dateFormat?: string;
|
17
|
+
/** Whether the input is clearable */
|
18
|
+
isClearable?: boolean;
|
19
|
+
/** Optional CSS class */
|
20
|
+
className?: string;
|
21
|
+
/** Called on input focus */
|
22
|
+
onFocus?: FocusEventHandler<HTMLInputElement>;
|
23
|
+
/** Called on input blur */
|
24
|
+
onBlur?: FocusEventHandler<HTMLInputElement>;
|
25
|
+
/** Custom render for input element */
|
26
|
+
renderInput?: (props: React.HTMLProps<HTMLInputElement>) => ReactNode;
|
27
|
+
/** Name of the input */
|
28
|
+
name?: string;
|
29
|
+
/** Additional props */
|
30
|
+
[key: string]: any;
|
31
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import "./DateRangePicker.scss";
|
3
|
+
interface DateRangePickerProps {
|
4
|
+
startDate?: Date | null;
|
5
|
+
endDate?: Date | null;
|
6
|
+
onChange: (start: Date | null, end: Date | null) => void;
|
7
|
+
}
|
8
|
+
declare const DateRangePicker: React.FC<DateRangePickerProps>;
|
9
|
+
export default DateRangePicker;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
export interface DateRangePickerProps {
|
2
|
+
/**
|
3
|
+
* The currently selected start date. Can be null if no start date is selected.
|
4
|
+
*/
|
5
|
+
startDate?: Date | null;
|
6
|
+
/**
|
7
|
+
* The currently selected end date. Can be null if no end date is selected.
|
8
|
+
*/
|
9
|
+
endDate?: Date | null;
|
10
|
+
/**
|
11
|
+
* Callback function triggered when the date range changes.
|
12
|
+
* It receives the new start and end dates as arguments.
|
13
|
+
*/
|
14
|
+
onChange: (start: Date | null, end: Date | null) => void;
|
15
|
+
}
|
@@ -1,12 +1,11 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
export interface PhoneInputProps {
|
3
|
-
id: string;
|
4
3
|
name: string;
|
5
4
|
label: string;
|
6
5
|
value: string;
|
7
6
|
className?: string;
|
8
7
|
countryCode?: string;
|
9
|
-
onChange
|
8
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
10
9
|
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
11
10
|
placeholder?: string;
|
12
11
|
error?: string;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import "./Modal.scss";
|
3
|
+
export interface ModalProps {
|
4
|
+
isOpen: boolean;
|
5
|
+
handleClose: () => void;
|
6
|
+
destroyOnClose?: boolean;
|
7
|
+
centered?: boolean;
|
8
|
+
maskClosable?: boolean;
|
9
|
+
className?: string;
|
10
|
+
children: React.ReactNode;
|
11
|
+
}
|
12
|
+
declare const Modal: React.FC<ModalProps>;
|
13
|
+
export default Modal;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import "./Toast.scss";
|
2
|
+
import { ToastVariant, ToastPlacement, ToastOptions } from "./Toast.types";
|
3
|
+
export declare const triggerNotification: (variant: ToastVariant, title: string, message?: string, placement?: ToastPlacement, options?: Partial<Pick<ToastOptions, "duration" | "closeOnClick" | "pauseOnHover">>) => void;
|
4
|
+
export declare const clearAllToasts: () => void;
|
5
|
+
export declare const clearToastsByPlacement: (placement: ToastPlacement) => void;
|
6
|
+
export declare const destroyToastSystem: () => void;
|
7
|
+
export { ToastVariant, ToastPlacement, ToastOptions };
|
@@ -1,10 +1,39 @@
|
|
1
|
-
export type
|
1
|
+
export type ToastVariant = "info" | "success" | "warning" | "error";
|
2
|
+
export type ToastPlacement = "topLeft" | "topCenter" | "topRight" | "bottomLeft" | "bottomCenter" | "bottomRight";
|
3
|
+
/**
|
4
|
+
* Props for triggering a toast notification.
|
5
|
+
*/
|
2
6
|
export interface ToastOptions {
|
3
|
-
|
4
|
-
|
7
|
+
/**
|
8
|
+
* The visual style/type of the toast.
|
9
|
+
*/
|
10
|
+
variant: ToastVariant;
|
11
|
+
/**
|
12
|
+
* The main title of the toast notification.
|
13
|
+
*/
|
14
|
+
title: string;
|
15
|
+
/**
|
16
|
+
* Optional longer message content for the toast.
|
17
|
+
*/
|
18
|
+
message?: string;
|
19
|
+
/**
|
20
|
+
* The position where the toast will appear on the screen.
|
21
|
+
* @default "topRight"
|
22
|
+
*/
|
23
|
+
placement?: ToastPlacement;
|
24
|
+
/**
|
25
|
+
* How long the toast should remain visible in milliseconds. Set to 0 for infinite duration.
|
26
|
+
* @default 4000 (4 seconds)
|
27
|
+
*/
|
5
28
|
duration?: number;
|
29
|
+
/**
|
30
|
+
* If true, the toast will close when clicked.
|
31
|
+
* @default true
|
32
|
+
*/
|
6
33
|
closeOnClick?: boolean;
|
34
|
+
/**
|
35
|
+
* If true, the toast timer will pause when the mouse hovers over it.
|
36
|
+
* @default true
|
37
|
+
*/
|
7
38
|
pauseOnHover?: boolean;
|
8
|
-
showIcon?: boolean;
|
9
|
-
position?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
|
10
39
|
}
|
@@ -7,5 +7,6 @@ export interface LabelProps {
|
|
7
7
|
className?: string;
|
8
8
|
color?: LabelColor;
|
9
9
|
as?: React.ElementType;
|
10
|
+
htmlFor?: string;
|
10
11
|
}
|
11
12
|
export type LabelVariant = "xs-regular" | "xs-medium" | "xs-semibold" | "sm-regular" | "sm-medium" | "sm-semibold" | "md-regular" | "md-semibold" | "lg-semibold" | "lg-bold" | "xl-semibold";
|