anicca-ui 1.0.0 → 1.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.
- package/dist/anicca-ui.css +1 -1
- package/dist/anicca-ui.es.js +2637 -603
- package/dist/anicca-ui.umd.js +30 -1
- package/dist/auth/AuthModal/AuthModal.d.ts +92 -0
- package/dist/auth/AuthModal/index.d.ts +1 -0
- package/dist/auth/index.d.ts +1 -0
- package/dist/dashboard/components/ActivityFeed/ActivityFeed.d.ts +1 -10
- package/dist/dashboard/components/Breadcrumb/Breadcrumb.d.ts +1 -9
- package/dist/dashboard/components/ChartWrapper/ChartWrapper.d.ts +1 -15
- package/dist/dashboard/components/DataTable/DataTable.d.ts +3 -10
- package/dist/dashboard/components/Modal/Modal.d.ts +1 -9
- package/dist/dashboard/components/Navbar/Navbar.d.ts +1 -9
- package/dist/dashboard/components/ProgressCard/ProgressCard.d.ts +1 -14
- package/dist/dashboard/components/Sidebar/Sidebar.d.ts +2 -11
- package/dist/dashboard/components/StatCard/StatCard.d.ts +2 -12
- package/dist/dashboard/components/Tabs/Tabs.d.ts +1 -2
- package/dist/data/Avatar/Avatar.d.ts +31 -0
- package/dist/data/Avatar/index.d.ts +1 -0
- package/dist/data/Badge/Badge.d.ts +16 -0
- package/dist/data/Badge/index.d.ts +1 -0
- package/dist/data/Pagination/Pagination.d.ts +27 -0
- package/dist/data/Pagination/index.d.ts +1 -0
- package/dist/data/Skeleton/Skeleton.d.ts +18 -0
- package/dist/data/Skeleton/index.d.ts +1 -0
- package/dist/data/Spinner/Spinner.d.ts +16 -0
- package/dist/data/Spinner/index.d.ts +1 -0
- package/dist/data/index.d.ts +5 -0
- package/dist/demo/App.d.ts +1 -0
- package/dist/demo/data.d.ts +153 -0
- package/dist/demo/nav.d.ts +5 -0
- package/dist/demo/pages/AdminPage.d.ts +1 -0
- package/dist/demo/pages/DashboardPage.d.ts +1 -0
- package/dist/demo/pages/FormElementPage.d.ts +1 -0
- package/dist/demo/pages/FormValidationPage.d.ts +1 -0
- package/dist/demo/pages/FormWizardPage.d.ts +1 -0
- package/dist/demo/pages/Placeholder.d.ts +4 -0
- package/dist/demo/pages/ProfilePage.d.ts +1 -0
- package/dist/demo/pages/RtlPage.d.ts +1 -0
- package/dist/demo/pages/Settings2Page.d.ts +1 -0
- package/dist/demo/pages/SettingsPage.d.ts +1 -0
- package/dist/demo/pages/TableBasicPage.d.ts +1 -0
- package/dist/demo/pages/TableDataPage.d.ts +1 -0
- package/dist/demo/pages/auth.d.ts +5 -0
- package/dist/demo/pages/dashLayouts.d.ts +10 -0
- package/dist/demo/pages/errors.d.ts +3 -0
- package/dist/demo/pages/extra.d.ts +2 -0
- package/dist/demo/pages/icons.d.ts +3 -0
- package/dist/demo/pages/landing.d.ts +9 -0
- package/dist/demo/pages/maps.d.ts +3 -0
- package/dist/demo/pages/parts.d.ts +45 -0
- package/dist/demo/pages/plugins.d.ts +6 -0
- package/dist/demo/pages/special.d.ts +5 -0
- package/dist/demo/pages/users.d.ts +5 -0
- package/dist/demo/pages/widgets.d.ts +3 -0
- package/dist/demo/theme-init.d.ts +0 -0
- package/dist/demo/theme.d.ts +33 -0
- package/dist/demo/ui/AuthLayout.d.ts +9 -0
- package/dist/demo/ui/HeaderMenus.d.ts +2 -0
- package/dist/demo/ui/LandingLayout.d.ts +7 -0
- package/dist/demo/ui/Modal.d.ts +20 -0
- package/dist/demo/ui/Toast.d.ts +8 -0
- package/dist/demo/ui/UserMenu.d.ts +9 -0
- package/dist/demo/ui/charts.d.ts +29 -0
- package/dist/demo/ui/form.d.ts +54 -0
- package/dist/demo/ui/primitives.d.ts +32 -0
- package/dist/demo.d.ts +1 -0
- package/dist/feedback/Alert/Alert.d.ts +21 -0
- package/dist/feedback/Alert/index.d.ts +1 -0
- package/dist/feedback/Popover/Popover.d.ts +22 -0
- package/dist/feedback/Popover/index.d.ts +1 -0
- package/dist/feedback/Popup/Popup.d.ts +40 -0
- package/dist/feedback/Popup/index.d.ts +1 -0
- package/dist/feedback/Toast/Toast.d.ts +46 -0
- package/dist/feedback/Toast/index.d.ts +1 -0
- package/dist/feedback/Tooltip/Tooltip.d.ts +20 -0
- package/dist/feedback/Tooltip/index.d.ts +1 -0
- package/dist/feedback/index.d.ts +5 -0
- package/dist/index.d.ts +6 -0
- package/dist/layout/Card/Card.d.ts +21 -0
- package/dist/layout/Card/index.d.ts +1 -0
- package/dist/layout/Divider/Divider.d.ts +15 -0
- package/dist/layout/Divider/index.d.ts +1 -0
- package/dist/layout/Grid/Grid.d.ts +23 -0
- package/dist/layout/Grid/index.d.ts +1 -0
- package/dist/layout/Stack/Stack.d.ts +22 -0
- package/dist/layout/Stack/index.d.ts +1 -0
- package/dist/layout/index.d.ts +4 -0
- package/dist/overlay/Combobox/Combobox.d.ts +39 -0
- package/dist/overlay/Combobox/index.d.ts +1 -0
- package/dist/overlay/Drawer/Drawer.d.ts +26 -0
- package/dist/overlay/Drawer/index.d.ts +1 -0
- package/dist/overlay/Dropdown/Dropdown.d.ts +20 -0
- package/dist/overlay/Dropdown/index.d.ts +1 -0
- package/dist/overlay/Menu/Menu.d.ts +22 -0
- package/dist/overlay/Menu/index.d.ts +1 -0
- package/dist/overlay/index.d.ts +4 -0
- package/dist/primitives/Button/Button.d.ts +20 -0
- package/dist/primitives/Button/index.d.ts +1 -0
- package/dist/primitives/Checkbox/Checkbox.d.ts +14 -0
- package/dist/primitives/Checkbox/index.d.ts +1 -0
- package/dist/primitives/Input/Input.d.ts +24 -0
- package/dist/primitives/Input/index.d.ts +1 -0
- package/dist/primitives/Radio/Radio.d.ts +29 -0
- package/dist/primitives/Radio/index.d.ts +1 -0
- package/dist/primitives/Select/Select.d.ts +23 -0
- package/dist/primitives/Select/index.d.ts +1 -0
- package/dist/primitives/Switch/Switch.d.ts +15 -0
- package/dist/primitives/Switch/index.d.ts +1 -0
- package/dist/primitives/Textarea/Textarea.d.ts +18 -0
- package/dist/primitives/Textarea/index.d.ts +1 -0
- package/dist/primitives/index.d.ts +7 -0
- package/dist/theme/AniccaThemeProvider.d.ts +2 -1
- package/dist/theme/types.d.ts +29 -30
- package/package.json +3 -6
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type AniccaButtonVariant = 'primary' | 'secondary' | 'ghost' | 'outline' | 'danger' | 'link';
|
|
4
|
+
export type AniccaButtonSize = 'sm' | 'md' | 'lg' | 'icon';
|
|
5
|
+
export interface AniccaButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
6
|
+
variant?: AniccaButtonVariant;
|
|
7
|
+
size?: AniccaButtonSize;
|
|
8
|
+
/** Show loading spinner and disable interaction. */
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
/** Icon rendered before children. */
|
|
11
|
+
leftIcon?: React.ReactNode;
|
|
12
|
+
/** Icon rendered after children. */
|
|
13
|
+
rightIcon?: React.ReactNode;
|
|
14
|
+
/** Make button stretch full width. */
|
|
15
|
+
fullWidth?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* AniccaButton — Polymorphic button with variants, sizes, loading state, and icon slots.
|
|
19
|
+
*/
|
|
20
|
+
export declare const AniccaButton: React.ForwardRefExoticComponent<AniccaButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Button';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface AniccaCheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
4
|
+
label?: React.ReactNode;
|
|
5
|
+
description?: string;
|
|
6
|
+
error?: string;
|
|
7
|
+
/** Tri-state for parent/select-all UX. Visual only; doesn't change checked. */
|
|
8
|
+
indeterminate?: boolean;
|
|
9
|
+
wrapperClassName?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* AniccaCheckbox — Custom-styled checkbox with label, indeterminate state, focus ring.
|
|
13
|
+
*/
|
|
14
|
+
export declare const AniccaCheckbox: React.ForwardRefExoticComponent<AniccaCheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Checkbox';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type AniccaInputSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export interface AniccaInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
5
|
+
/** Visible label rendered above the input. */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** Helper text below input. */
|
|
8
|
+
helper?: string;
|
|
9
|
+
/** Error message; replaces helper and sets invalid styling. */
|
|
10
|
+
error?: string;
|
|
11
|
+
/** Required indicator. */
|
|
12
|
+
required?: boolean;
|
|
13
|
+
/** Element rendered inside on the leading side (icon, prefix). */
|
|
14
|
+
leftAddon?: React.ReactNode;
|
|
15
|
+
/** Element rendered inside on the trailing side. */
|
|
16
|
+
rightAddon?: React.ReactNode;
|
|
17
|
+
inputSize?: AniccaInputSize;
|
|
18
|
+
/** Apply class to root wrapper, not input element. */
|
|
19
|
+
wrapperClassName?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* AniccaInput — Text input with label, helper/error states, and inline addons.
|
|
23
|
+
*/
|
|
24
|
+
export declare const AniccaInput: React.ForwardRefExoticComponent<AniccaInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Input';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface AniccaRadioGroupProps {
|
|
4
|
+
name: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
defaultValue?: string;
|
|
7
|
+
onChange?: (value: string) => void;
|
|
8
|
+
/** Layout direction. */
|
|
9
|
+
orientation?: 'vertical' | 'horizontal';
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
label?: string;
|
|
12
|
+
error?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* AniccaRadioGroup — Wraps AniccaRadio items; manages name + selection state.
|
|
18
|
+
*/
|
|
19
|
+
export declare function AniccaRadioGroup({ name, value, defaultValue, onChange, orientation, disabled, label, error, className, children, }: AniccaRadioGroupProps): React.ReactElement;
|
|
20
|
+
export interface AniccaRadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
21
|
+
value: string;
|
|
22
|
+
label?: React.ReactNode;
|
|
23
|
+
description?: string;
|
|
24
|
+
wrapperClassName?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* AniccaRadio — Single radio option. Use inside AniccaRadioGroup, or standalone with `name`.
|
|
28
|
+
*/
|
|
29
|
+
export declare const AniccaRadio: React.ForwardRefExoticComponent<AniccaRadioProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Radio';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface AniccaSelectOption {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface AniccaSelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
|
|
9
|
+
label?: string;
|
|
10
|
+
helper?: string;
|
|
11
|
+
error?: string;
|
|
12
|
+
/** Options to render. If `children` is provided, takes precedence. */
|
|
13
|
+
options?: AniccaSelectOption[];
|
|
14
|
+
/** Placeholder shown when value is empty. Rendered as disabled hidden option. */
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
selectSize?: 'sm' | 'md' | 'lg';
|
|
17
|
+
wrapperClassName?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* AniccaSelect — Native select with label, helper/error, custom caret.
|
|
21
|
+
* Uses native `<select>` for full a11y + mobile keyboard support.
|
|
22
|
+
*/
|
|
23
|
+
export declare const AniccaSelect: React.ForwardRefExoticComponent<AniccaSelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Select';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type AniccaSwitchSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export interface AniccaSwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
5
|
+
label?: React.ReactNode;
|
|
6
|
+
description?: string;
|
|
7
|
+
switchSize?: AniccaSwitchSize;
|
|
8
|
+
/** Position of the label relative to switch. */
|
|
9
|
+
labelPosition?: 'left' | 'right';
|
|
10
|
+
wrapperClassName?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* AniccaSwitch — Toggle switch with smooth thumb animation.
|
|
14
|
+
*/
|
|
15
|
+
export declare const AniccaSwitch: React.ForwardRefExoticComponent<AniccaSwitchProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Switch';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface AniccaTextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
4
|
+
label?: string;
|
|
5
|
+
helper?: string;
|
|
6
|
+
error?: string;
|
|
7
|
+
/** Auto-grow height to fit content. */
|
|
8
|
+
autoResize?: boolean;
|
|
9
|
+
/** Maximum height (px) when autoResize is on. */
|
|
10
|
+
maxHeight?: number;
|
|
11
|
+
/** Show character count below; works best with maxLength. */
|
|
12
|
+
showCount?: boolean;
|
|
13
|
+
wrapperClassName?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* AniccaTextarea — Multi-line input with label, helper/error, auto-resize, and char counter.
|
|
17
|
+
*/
|
|
18
|
+
export declare const AniccaTextarea: React.ForwardRefExoticComponent<AniccaTextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Textarea';
|
|
@@ -19,7 +19,8 @@ export interface AniccaThemeProviderProps {
|
|
|
19
19
|
*
|
|
20
20
|
* @example
|
|
21
21
|
* ```tsx
|
|
22
|
-
*
|
|
22
|
+
* // Purple primary theme (RGB channels format)
|
|
23
|
+
* <AniccaThemeProvider theme={{ primary: '124 58 237' }}>
|
|
23
24
|
* <AniccaStatCard title="Sales" value={42} />
|
|
24
25
|
* </AniccaThemeProvider>
|
|
25
26
|
* ```
|
package/dist/theme/types.d.ts
CHANGED
|
@@ -1,39 +1,38 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* AniccaTheme — Token overrides for the AniccaUI design system.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Values must be space-separated RGB channels (no rgb() wrapper)
|
|
5
|
+
* to support Tailwind opacity modifiers.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <AniccaThemeProvider theme={{ primary: '124 58 237' }}>
|
|
10
|
+
* <App />
|
|
11
|
+
* </AniccaThemeProvider>
|
|
12
|
+
* ```
|
|
6
13
|
*/
|
|
7
14
|
export interface AniccaTheme {
|
|
8
15
|
primary?: string;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
warningBg?: string;
|
|
17
|
-
info?: string;
|
|
18
|
-
infoBg?: string;
|
|
16
|
+
'on-primary'?: string;
|
|
17
|
+
'primary-container'?: string;
|
|
18
|
+
secondary?: string;
|
|
19
|
+
'secondary-container'?: string;
|
|
20
|
+
'on-secondary-container'?: string;
|
|
21
|
+
tertiary?: string;
|
|
22
|
+
error?: string;
|
|
19
23
|
surface?: string;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
radiusSm?: string;
|
|
34
|
-
radiusLg?: string;
|
|
35
|
-
shadowSm?: string;
|
|
36
|
-
shadowMd?: string;
|
|
37
|
-
shadowLg?: string;
|
|
24
|
+
'surface-container-lowest'?: string;
|
|
25
|
+
'surface-container-low'?: string;
|
|
26
|
+
'surface-container'?: string;
|
|
27
|
+
'surface-container-high'?: string;
|
|
28
|
+
'surface-container-highest'?: string;
|
|
29
|
+
'on-surface'?: string;
|
|
30
|
+
'on-surface-variant'?: string;
|
|
31
|
+
outline?: string;
|
|
32
|
+
'outline-variant'?: string;
|
|
33
|
+
background?: string;
|
|
34
|
+
'sidebar-bg'?: string;
|
|
35
|
+
violet?: string;
|
|
36
|
+
amber?: string;
|
|
38
37
|
}
|
|
39
38
|
export declare const ANICCA_THEME_CSS_VAR_MAP: Record<keyof AniccaTheme, string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anicca-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A production-ready React utility library with dashboard components, form validation, date manipulation, and general utilities",
|
|
6
6
|
"main": "dist/anicca-ui.umd.js",
|
|
@@ -24,10 +24,9 @@
|
|
|
24
24
|
"**/*.css"
|
|
25
25
|
],
|
|
26
26
|
"scripts": {
|
|
27
|
+
"dev": "vite",
|
|
27
28
|
"prebuild": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
28
29
|
"build": "tsc --noEmit && vite build",
|
|
29
|
-
"storybook": "storybook dev -p 6006",
|
|
30
|
-
"build-storybook": "storybook build",
|
|
31
30
|
"prepublishOnly": "npm run build"
|
|
32
31
|
},
|
|
33
32
|
"peerDependencies": {
|
|
@@ -35,16 +34,14 @@
|
|
|
35
34
|
"react-dom": ">=18.0.0"
|
|
36
35
|
},
|
|
37
36
|
"devDependencies": {
|
|
38
|
-
"@storybook/addon-essentials": "^8.6.14",
|
|
39
|
-
"@storybook/react-vite": "^8.6.18",
|
|
40
37
|
"@types/react": "^18.2.0",
|
|
41
38
|
"@types/react-dom": "^18.2.0",
|
|
42
39
|
"@vitejs/plugin-react": "^4.0.0",
|
|
43
40
|
"autoprefixer": "^10.4.20",
|
|
41
|
+
"maplibre-gl": "^4.7.1",
|
|
44
42
|
"postcss": "^8.4.49",
|
|
45
43
|
"react": "^19.2.6",
|
|
46
44
|
"react-dom": "^19.2.6",
|
|
47
|
-
"storybook": "^8.6.18",
|
|
48
45
|
"tailwindcss": "^3.4.17",
|
|
49
46
|
"typescript": "^5.0.0",
|
|
50
47
|
"vite": "^5.0.0",
|