@ramme-io/ui 1.0.4 → 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/blocks/iot/DeviceCard.d.ts +57 -0
- package/dist/{charts → components/data-display}/ChartWithTable.d.ts +1 -1
- package/dist/{charts → components/data-display}/LineChart.d.ts +2 -0
- package/dist/{form → components/forms}/FormTemplate.d.ts +21 -1
- package/dist/{form → components/forms}/Input.d.ts +2 -3
- package/dist/{layout → components/layout}/Sidebar.d.ts +1 -0
- package/dist/components/ui/Button.d.ts +44 -0
- package/dist/data/mockData.d.ts +9 -2
- package/dist/index.d.ts +55 -54
- package/dist/index.es.js +133799 -133985
- package/dist/index.umd.js +2013 -2027
- package/dist/style.css +1 -1
- package/package.json +4 -1
- package/dist/ui/Button.d.ts +0 -16
- /package/dist/{ai → blocks/ai}/Actions.d.ts +0 -0
- /package/dist/{ui → blocks/ai}/ChatFAB.d.ts +0 -0
- /package/dist/{ai → blocks/ai}/Conversation.d.ts +0 -0
- /package/dist/{ai → blocks/ai}/Loader.d.ts +0 -0
- /package/dist/{ai → blocks/ai}/Message.d.ts +0 -0
- /package/dist/{ai → blocks/ai}/PromptInput.d.ts +0 -0
- /package/dist/{templates-patterns → components/data-display}/ActivityFeed.d.ts +0 -0
- /package/dist/{charts → components/data-display}/BarChart.d.ts +0 -0
- /package/dist/{ui → components/data-display}/CodeBlock.d.ts +0 -0
- /package/dist/{data-display → components/data-display}/DataTable.d.ts +0 -0
- /package/dist/{charts → components/data-display}/PieChart.d.ts +0 -0
- /package/dist/{templates-patterns → components/data-display}/StatCard.d.ts +0 -0
- /package/dist/{data-display → components/data-display}/Table.d.ts +0 -0
- /package/dist/{feedback → components/feedback}/Alert.d.ts +0 -0
- /package/dist/{feedback → components/feedback}/EmptyState.d.ts +0 -0
- /package/dist/{feedback → components/feedback}/TippyTooltip.d.ts +0 -0
- /package/dist/{feedback → components/feedback}/Toast.d.ts +0 -0
- /package/dist/{feedback → components/feedback}/ToastProvider.d.ts +0 -0
- /package/dist/{form → components/forms}/ButtonGroup.d.ts +0 -0
- /package/dist/{form → components/forms}/Checkbox.d.ts +0 -0
- /package/dist/{form → components/forms}/ComboBox.d.ts +0 -0
- /package/dist/{form → components/forms}/DatePicker.d.ts +0 -0
- /package/dist/{form → components/forms}/FileUpload.d.ts +0 -0
- /package/dist/{form → components/forms}/MultiSelect.d.ts +0 -0
- /package/dist/{form → components/forms}/Radio.d.ts +0 -0
- /package/dist/{form → components/forms}/SearchInput.d.ts +0 -0
- /package/dist/{form → components/forms}/Select.d.ts +0 -0
- /package/dist/{form → components/forms}/Textarea.d.ts +0 -0
- /package/dist/{form → components/forms}/ToggleSwitch.d.ts +0 -0
- /package/dist/{layout → components/layout}/Accordion.d.ts +0 -0
- /package/dist/{templates-patterns → components/layout}/ActionBar.d.ts +0 -0
- /package/dist/{layout → components/layout}/Card.d.ts +0 -0
- /package/dist/{layout → components/layout}/Drawer.d.ts +0 -0
- /package/dist/{layout → components/layout}/List.d.ts +0 -0
- /package/dist/{layout → components/layout}/Modal.d.ts +0 -0
- /package/dist/{templates-patterns → components/layout}/PageHeader.d.ts +0 -0
- /package/dist/{templates-patterns → components/layout}/SectionHeader.d.ts +0 -0
- /package/dist/{layout → components/layout}/StorySidebarContent.d.ts +0 -0
- /package/dist/{navigation → components/navigation}/Breadcrumbs.d.ts +0 -0
- /package/dist/{navigation → components/navigation}/Menu.d.ts +0 -0
- /package/dist/{navigation → components/navigation}/Pagination.d.ts +0 -0
- /package/dist/{navigation → components/navigation}/Stepper.d.ts +0 -0
- /package/dist/{navigation → components/navigation}/Tabs.d.ts +0 -0
- /package/dist/{ui → components/ui}/Avatar.d.ts +0 -0
- /package/dist/{ui → components/ui}/Badge.d.ts +0 -0
- /package/dist/{ui → components/ui}/Icon.d.ts +0 -0
- /package/dist/{ui → components/ui}/icon-loader.d.ts +0 -0
- /package/dist/{hooks → lib/hooks}/useChartTheme.d.ts +0 -0
- /package/dist/{hooks → lib/hooks}/useDataFetch.d.ts +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IconName } from '../../components/ui/Icon';
|
|
3
|
+
|
|
4
|
+
declare const statusColorMap: {
|
|
5
|
+
readonly online: "success";
|
|
6
|
+
readonly offline: "secondary";
|
|
7
|
+
readonly error: "danger";
|
|
8
|
+
readonly warning: "outline";
|
|
9
|
+
readonly active: "primary";
|
|
10
|
+
};
|
|
11
|
+
export type DeviceStatus = keyof typeof statusColorMap;
|
|
12
|
+
/**
|
|
13
|
+
* @wizard
|
|
14
|
+
* @name DeviceCard
|
|
15
|
+
* @description A specialized card designed to represent a physical device or a digital entity with live state. Features slots for status, live values, and interactive controls.
|
|
16
|
+
* @tags layout, iot, device, card, dashboard
|
|
17
|
+
* @category layout
|
|
18
|
+
* @props
|
|
19
|
+
* - name: title
|
|
20
|
+
* type: string
|
|
21
|
+
* description: The name of the device or entity (e.g., "Living Room Thermostat").
|
|
22
|
+
* - name: description
|
|
23
|
+
* type: string
|
|
24
|
+
* description: A subtitle, often used for location or ID (e.g., "Floor 2 • ID: #442").
|
|
25
|
+
* - name: icon
|
|
26
|
+
* type: IconName
|
|
27
|
+
* description: The icon representing the device type.
|
|
28
|
+
* - name: status
|
|
29
|
+
* type: 'online' | 'offline' | 'error' | 'warning' | 'active'
|
|
30
|
+
* description: The current operational state of the device. Changes the badge color.
|
|
31
|
+
* default: 'offline'
|
|
32
|
+
* - name: value
|
|
33
|
+
* type: string | number
|
|
34
|
+
* description: The primary "live" metric to display (e.g., "72°", "1,240 rpm").
|
|
35
|
+
* - name: trend
|
|
36
|
+
* type: string
|
|
37
|
+
* description: Optional secondary metric to show change (e.g., "+2%").
|
|
38
|
+
* - name: children
|
|
39
|
+
* type: React.ReactNode
|
|
40
|
+
* description: Interactive controls to place at the bottom of the card (e.g., a ToggleSwitch or Button).
|
|
41
|
+
* - name: className
|
|
42
|
+
* type: string
|
|
43
|
+
* description: Optional additional CSS classes.
|
|
44
|
+
*/
|
|
45
|
+
export interface DeviceCardProps {
|
|
46
|
+
title: string;
|
|
47
|
+
description?: string;
|
|
48
|
+
icon?: IconName;
|
|
49
|
+
status?: DeviceStatus;
|
|
50
|
+
value?: string | number;
|
|
51
|
+
trend?: string;
|
|
52
|
+
children?: React.ReactNode;
|
|
53
|
+
className?: string;
|
|
54
|
+
onClick?: () => void;
|
|
55
|
+
}
|
|
56
|
+
export declare const DeviceCard: React.FC<DeviceCardProps>;
|
|
57
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { MultiSelectOption } from '../
|
|
2
|
+
import { MultiSelectOption } from '../forms/MultiSelect';
|
|
3
3
|
|
|
4
4
|
interface FormFieldBase {
|
|
5
5
|
name: string;
|
|
@@ -65,5 +65,25 @@ export interface FormTemplateProps {
|
|
|
65
65
|
className?: string;
|
|
66
66
|
children?: React.ReactNode;
|
|
67
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* @wizard
|
|
70
|
+
* @name FormTemplate
|
|
71
|
+
* @description A data-driven form builder that renders a grid of input fields from a configuration array, handling internal state and submission.
|
|
72
|
+
* @category form
|
|
73
|
+
* @tags form, template, builder, input, layout
|
|
74
|
+
* @props
|
|
75
|
+
* - name: fields
|
|
76
|
+
* type: FormField[]
|
|
77
|
+
* description: An array of field definition objects (name, label, type, etc.) that determine the form structure.
|
|
78
|
+
* - name: onSubmit
|
|
79
|
+
* type: (formData: Record<string, any>) => void
|
|
80
|
+
* description: Callback function triggered when the form is submitted, receiving the collected data.
|
|
81
|
+
* - name: className
|
|
82
|
+
* type: string
|
|
83
|
+
* description: Optional additional CSS classes for the form container.
|
|
84
|
+
* - name: children
|
|
85
|
+
* type: React.ReactNode
|
|
86
|
+
* description: Content to render at the bottom of the form, typically used for action buttons like "Save" or "Cancel".
|
|
87
|
+
*/
|
|
68
88
|
export declare const FormTemplate: React.FC<FormTemplateProps>;
|
|
69
89
|
export {};
|
|
@@ -13,8 +13,9 @@ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>
|
|
|
13
13
|
/**
|
|
14
14
|
* @wizard
|
|
15
15
|
* @name Input
|
|
16
|
-
* @description A theme-aware text input component with support for labels, icons, helper text, and validation states.
|
|
16
|
+
* @description A theme-aware text input component with support for labels, icons, helper text, and validation states. Supports all standard HTML input attributes.
|
|
17
17
|
* @tags form, input, ui, text
|
|
18
|
+
* @category form
|
|
18
19
|
* @props
|
|
19
20
|
* - name: label
|
|
20
21
|
* type: string
|
|
@@ -40,7 +41,5 @@ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>
|
|
|
40
41
|
* - name: containerClassName
|
|
41
42
|
* type: string
|
|
42
43
|
* description: Optional additional CSS classes for the container.
|
|
43
|
-
* - name: All other standard HTML input attributes are also supported.
|
|
44
|
-
* @category form
|
|
45
44
|
*/
|
|
46
45
|
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -11,6 +11,7 @@ export declare const SidebarProvider: ({ children }: {
|
|
|
11
11
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
/**
|
|
13
13
|
* @wizard
|
|
14
|
+
* @name Sidebar
|
|
14
15
|
* @description A collapsible, responsive sidebar component.
|
|
15
16
|
* @props
|
|
16
17
|
* @prop {React.ReactNode} children - The content of the sidebar.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { IconName } from './Icon';
|
|
4
|
+
|
|
5
|
+
/** @wizard
|
|
6
|
+
* @name Button
|
|
7
|
+
* @description The primary interactive element. Supports polymorphism (rendering as a link) via the 'asChild' prop.
|
|
8
|
+
* @category Input
|
|
9
|
+
* @props
|
|
10
|
+
* - name: variant
|
|
11
|
+
* type: 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger' | 'link'
|
|
12
|
+
* description: The visual style of the button.
|
|
13
|
+
* default: 'primary'
|
|
14
|
+
* - name: size
|
|
15
|
+
* type: 'sm' | 'md' | 'lg' | 'icon'
|
|
16
|
+
* description: The size of the button.
|
|
17
|
+
* default: 'md'
|
|
18
|
+
* - name: loading
|
|
19
|
+
* type: boolean
|
|
20
|
+
* description: If true, replaces content with a spinner.
|
|
21
|
+
* default: false
|
|
22
|
+
* - name: iconLeft
|
|
23
|
+
* type: IconName
|
|
24
|
+
* description: Optional icon to display before the text.
|
|
25
|
+
* - name: asChild
|
|
26
|
+
* type: boolean
|
|
27
|
+
* description: If true, delegates rendering to the child element (e.g. for Links).
|
|
28
|
+
* default: false
|
|
29
|
+
* - name: onClick
|
|
30
|
+
* type: () => void
|
|
31
|
+
* description: Callback fired when the button is clicked.
|
|
32
|
+
*/
|
|
33
|
+
declare const buttonVariants: (props?: ({
|
|
34
|
+
variant?: "link" | "ghost" | "primary" | "danger" | "outline" | "secondary" | "accent" | null | undefined;
|
|
35
|
+
size?: "sm" | "md" | "lg" | "icon" | null | undefined;
|
|
36
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
37
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
38
|
+
asChild?: boolean;
|
|
39
|
+
loading?: boolean;
|
|
40
|
+
iconLeft?: IconName;
|
|
41
|
+
iconRight?: IconName;
|
|
42
|
+
}
|
|
43
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
44
|
+
export { Button, buttonVariants };
|
package/dist/data/mockData.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @wizard
|
|
3
|
-
* @name
|
|
4
|
-
* @description Pre-defined datasets for prototyping
|
|
3
|
+
* @name mockChartData
|
|
4
|
+
* @description Pre-defined datasets for prototyping charts and other data-driven components.
|
|
5
5
|
* @tags data, mock, example
|
|
6
6
|
* @category data
|
|
7
7
|
*/
|
|
@@ -10,6 +10,13 @@ export declare const mockChartData: {
|
|
|
10
10
|
uv: number;
|
|
11
11
|
pv: number;
|
|
12
12
|
}[];
|
|
13
|
+
/**
|
|
14
|
+
* @wizard
|
|
15
|
+
* @name mockTableData
|
|
16
|
+
* @description Pre-defined datasets for prototyping tables and other data-driven components.
|
|
17
|
+
* @tags data, mock, example
|
|
18
|
+
* @category data
|
|
19
|
+
*/
|
|
13
20
|
export declare const mockTableData: {
|
|
14
21
|
make: string;
|
|
15
22
|
model: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,59 +1,60 @@
|
|
|
1
1
|
|
|
2
|
-
export type * from './types/wizard
|
|
2
|
+
export type * from './lib/types/wizard';
|
|
3
3
|
export type { ThemeName } from './contexts/ThemeContext';
|
|
4
|
-
export type { MultiSelectOption } from './
|
|
4
|
+
export type { MultiSelectOption } from './components/forms/MultiSelect';
|
|
5
5
|
export type { ColDef, ColGroupDef, GridOptions, GridApi, ColumnApi, ValueFormatterParams, ValueGetterParams, ICellRendererParams, CellClickedEvent, RowSelectedEvent, IHeaderParams, } from 'ag-grid-community';
|
|
6
6
|
export * from './data/mockData';
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './
|
|
7
|
+
export * from './blocks/ai/Loader';
|
|
8
|
+
export * from './blocks/ai/Actions';
|
|
9
|
+
export * from './blocks/ai/PromptInput';
|
|
10
|
+
export * from './blocks/ai/Message';
|
|
11
|
+
export * from './blocks/ai/Conversation';
|
|
12
|
+
export * from './blocks/ai/ChatFAB';
|
|
11
13
|
export * from './contexts/ThemeContext';
|
|
12
|
-
export * from './data-display/
|
|
13
|
-
export * from './data-display/
|
|
14
|
-
export * from './
|
|
15
|
-
export * from './
|
|
16
|
-
export * from './
|
|
17
|
-
export * from './
|
|
18
|
-
export * from './
|
|
19
|
-
export * from './
|
|
20
|
-
export * from './
|
|
21
|
-
export * from './
|
|
22
|
-
export * from './
|
|
23
|
-
export * from './
|
|
24
|
-
export * from './
|
|
25
|
-
export * from './
|
|
26
|
-
export * from './
|
|
27
|
-
export * from './
|
|
28
|
-
export * from './
|
|
29
|
-
export * from './
|
|
30
|
-
export * from './
|
|
31
|
-
export * from './
|
|
32
|
-
export * from './
|
|
33
|
-
export * from './
|
|
34
|
-
export * from './
|
|
35
|
-
export * from './
|
|
36
|
-
export * from './
|
|
37
|
-
export * from './
|
|
38
|
-
export * from './
|
|
39
|
-
export * from './
|
|
40
|
-
export * from './
|
|
41
|
-
export * from './
|
|
42
|
-
export * from './
|
|
43
|
-
export * from './
|
|
44
|
-
export * from './
|
|
45
|
-
export * from './
|
|
46
|
-
export * from './
|
|
47
|
-
export * from './
|
|
48
|
-
export * from './
|
|
49
|
-
export * from './
|
|
50
|
-
export * from './
|
|
51
|
-
export * from './
|
|
52
|
-
export * from './
|
|
53
|
-
export * from './
|
|
54
|
-
export * from './
|
|
55
|
-
export * from './
|
|
56
|
-
export * from './
|
|
57
|
-
export * from './
|
|
58
|
-
export * from './
|
|
59
|
-
export * from './ai/Conversation';
|
|
14
|
+
export * from './components/data-display/ActivityFeed';
|
|
15
|
+
export * from './components/data-display/DataTable';
|
|
16
|
+
export * from './components/data-display/Table';
|
|
17
|
+
export * from './components/data-display/BarChart';
|
|
18
|
+
export * from './components/data-display/ChartWithTable';
|
|
19
|
+
export * from './components/data-display/LineChart';
|
|
20
|
+
export * from './components/data-display/PieChart';
|
|
21
|
+
export * from './components/data-display/CodeBlock';
|
|
22
|
+
export * from './components/data-display/StatCard';
|
|
23
|
+
export * from './components/feedback/Alert';
|
|
24
|
+
export * from './components/feedback/EmptyState';
|
|
25
|
+
export * from './components/feedback/TippyTooltip';
|
|
26
|
+
export * from './components/feedback/Toast';
|
|
27
|
+
export * from './components/feedback/ToastProvider';
|
|
28
|
+
export * from './components/forms/ButtonGroup';
|
|
29
|
+
export * from './components/forms/Checkbox';
|
|
30
|
+
export * from './components/forms/ComboBox';
|
|
31
|
+
export * from './components/forms/DatePicker';
|
|
32
|
+
export * from './components/forms/FileUpload';
|
|
33
|
+
export * from './components/forms/FormTemplate';
|
|
34
|
+
export * from './components/forms/Input';
|
|
35
|
+
export * from './components/forms/MultiSelect';
|
|
36
|
+
export * from './components/forms/Radio';
|
|
37
|
+
export * from './components/forms/SearchInput';
|
|
38
|
+
export * from './components/forms/Select';
|
|
39
|
+
export * from './components/forms/Textarea';
|
|
40
|
+
export * from './components/forms/ToggleSwitch';
|
|
41
|
+
export * from './lib/hooks/useDataFetch';
|
|
42
|
+
export * from './blocks/iot/DeviceCard';
|
|
43
|
+
export * from './components/layout/Accordion';
|
|
44
|
+
export * from './components/layout/Card';
|
|
45
|
+
export * from './components/layout/Drawer';
|
|
46
|
+
export * from './components/layout/List';
|
|
47
|
+
export * from './components/layout/Modal';
|
|
48
|
+
export * from './components/layout/Sidebar';
|
|
49
|
+
export * from './components/layout/ActionBar';
|
|
50
|
+
export * from './components/layout/PageHeader';
|
|
51
|
+
export * from './components/layout/SectionHeader';
|
|
52
|
+
export * from './components/navigation/Breadcrumbs';
|
|
53
|
+
export * from './components/navigation/Menu';
|
|
54
|
+
export * from './components/navigation/Pagination';
|
|
55
|
+
export * from './components/navigation/Stepper';
|
|
56
|
+
export * from './components/navigation/Tabs';
|
|
57
|
+
export * from './components/ui/Avatar';
|
|
58
|
+
export * from './components/ui/Badge';
|
|
59
|
+
export * from './components/ui/Button';
|
|
60
|
+
export * from './components/ui/Icon';
|