@mich8060/unified-design-system 0.2.7 → 0.2.9
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 +3 -0
- package/dist/design-system/components/Accordion/Accordion.d.ts +2 -9
- package/dist/design-system/components/Accordion/Accordion.types.d.ts +11 -2
- package/dist/design-system/components/Avatar/Avatar.d.ts +7 -1
- package/dist/design-system/components/Avatar/Avatar.types.d.ts +9 -5
- package/dist/design-system/components/Code/Code.d.ts +9 -0
- package/dist/design-system/components/Code/Code.types.d.ts +6 -0
- package/dist/design-system/components/Code/index.d.ts +3 -0
- package/dist/design-system/components/Toggle/Toggle.d.ts +1 -2
- package/dist/design-system/components/Toggle/Toggle.types.d.ts +0 -1
- package/dist/design-system/index.d.ts +1 -0
- package/dist/index.cjs +31 -23
- package/dist/index.js +4369 -2774
- package/dist/unified-design-system.css +1 -1
- package/package.json +7 -6
package/README.md
CHANGED
|
@@ -31,6 +31,9 @@ npm run dev
|
|
|
31
31
|
See `/docs` for the full methodology and governance model.
|
|
32
32
|
|
|
33
33
|
- [Claude Rules](docs/claude-rules.md) – conventions and constraints for AI-assisted development in this repo
|
|
34
|
+
- [AI Implementation Learnings](docs/08-ai-implementation-learnings.md) – validated integration guidance and corrected component API assumptions
|
|
35
|
+
- [Project Learnings Log](docs/09-project-learnings-log.md) – living, prompt-by-prompt implementation constraints and guardrails
|
|
36
|
+
- [Consumer Project Setup](docs/10-consumer-project-setup.md) – copy-paste setup guide for integrating UDS in a new app
|
|
34
37
|
|
|
35
38
|
## NPM package quick start
|
|
36
39
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./_accordion.scss";
|
|
2
|
-
import type { AccordionProps } from "./Accordion.types";
|
|
2
|
+
import type { AccordionItemProps, AccordionProps } from "./Accordion.types";
|
|
3
3
|
/**
|
|
4
4
|
* AccordionItem component - individual accordion item
|
|
5
5
|
* @param {string} label - The label text for the accordion item
|
|
@@ -9,14 +9,7 @@ import type { AccordionProps } from "./Accordion.types";
|
|
|
9
9
|
* @param {function} onToggle - Callback when item is toggled (receives new expanded state)
|
|
10
10
|
* @param {object} props - Additional props to pass to the accordion item
|
|
11
11
|
*/
|
|
12
|
-
export declare function AccordionItem({ label, defaultExpanded, children, className, onToggle, ...props }:
|
|
13
|
-
[x: string]: any;
|
|
14
|
-
label: any;
|
|
15
|
-
defaultExpanded?: boolean | undefined;
|
|
16
|
-
children: any;
|
|
17
|
-
className?: string | undefined;
|
|
18
|
-
onToggle: any;
|
|
19
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function AccordionItem({ label, defaultExpanded, children, className, onToggle, id, ...props }: AccordionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
20
13
|
/**
|
|
21
14
|
* Accordion component - container for accordion items
|
|
22
15
|
* @param {React.ReactNode} children - AccordionItem components
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export type AccordionVariant = "default" | "secondary";
|
|
3
|
+
export interface AccordionProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
4
|
children?: ReactNode;
|
|
4
5
|
className?: string;
|
|
6
|
+
variant?: AccordionVariant;
|
|
7
|
+
}
|
|
8
|
+
export interface AccordionItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
label: string;
|
|
10
|
+
defaultExpanded?: boolean;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
onToggle?: (expanded: boolean) => void;
|
|
5
14
|
}
|
|
@@ -6,8 +6,14 @@ import type { AvatarProps } from "./Avatar.types";
|
|
|
6
6
|
* @param {string} initials - Initials to display (e.g., "EB", "JD")
|
|
7
7
|
* @param {boolean} status - Whether to show the status indicator (green dot)
|
|
8
8
|
* @param {string} size - Size of the avatar: 'small', 'default', 'large' (default: 'default')
|
|
9
|
+
* - small: 36x36
|
|
10
|
+
* - default: 48x48
|
|
11
|
+
* - large: 64x64
|
|
9
12
|
* @param {string} className - Additional CSS classes
|
|
10
13
|
* @param {string} alt - Alt text for the image
|
|
14
|
+
* @param {boolean} showCameraButton - Whether to show the camera action button overlay
|
|
15
|
+
* @param {string} cameraButtonAriaLabel - Accessible label for camera action button
|
|
16
|
+
* @param {function} onCameraClick - Callback for camera action button click
|
|
11
17
|
* @param {object} props - Additional props to pass to the avatar container
|
|
12
18
|
*/
|
|
13
|
-
export default function Avatar({ src, initials, status, size, className, alt, ...props }: AvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export default function Avatar({ src, initials, status, size, showCameraButton, cameraButtonAriaLabel, onCameraClick, className, alt, name, ...props }: AvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface AvatarProps extends
|
|
3
|
-
src?:
|
|
4
|
-
initials?:
|
|
1
|
+
import type { HTMLAttributes, MouseEvent } from "react";
|
|
2
|
+
export interface AvatarProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
src?: string;
|
|
4
|
+
initials?: string;
|
|
5
|
+
name?: string;
|
|
5
6
|
status?: boolean;
|
|
6
|
-
size?:
|
|
7
|
+
size?: "small" | "default" | "large";
|
|
8
|
+
showCameraButton?: boolean;
|
|
9
|
+
cameraButtonAriaLabel?: string;
|
|
10
|
+
onCameraClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
7
11
|
className?: string;
|
|
8
12
|
alt?: string;
|
|
9
13
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "prismjs/components/prism-bash";
|
|
2
|
+
import "prismjs/components/prism-json";
|
|
3
|
+
import "prismjs/components/prism-sql";
|
|
4
|
+
import "prismjs/components/prism-typescript";
|
|
5
|
+
import "prismjs/components/prism-jsx";
|
|
6
|
+
import "prismjs/components/prism-tsx";
|
|
7
|
+
import "./_code.scss";
|
|
8
|
+
import type { CodeProps } from "./Code.types";
|
|
9
|
+
export default function Code({ code, language, inline, className, ...rest }: CodeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,11 +5,10 @@ import type { ToggleProps } from "./Toggle.types";
|
|
|
5
5
|
* @param {boolean} checked - Whether the toggle is checked (on/off)
|
|
6
6
|
* @param {string} state - Toggle state: 'off', 'on', or 'indeterminate' (default: 'off')
|
|
7
7
|
* @param {string} size - Toggle size: 'large' or 'small' (default: 'large')
|
|
8
|
-
* @param {boolean} bordered - Whether to show border (default: false)
|
|
9
8
|
* @param {function} onChange - Callback function when toggle state changes
|
|
10
9
|
* @param {boolean} disabled - Whether the toggle is disabled
|
|
11
10
|
* @param {string} id - Unique identifier for the toggle input
|
|
12
11
|
* @param {string} className - Additional CSS classes
|
|
13
12
|
* @param {object} props - Additional props to pass to the toggle
|
|
14
13
|
*/
|
|
15
|
-
export default function Toggle({ checked, state, size,
|
|
14
|
+
export default function Toggle({ checked, state, size, onChange, disabled, id, className, ...props }: ToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,6 @@ export interface ToggleProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
3
3
|
checked?: boolean;
|
|
4
4
|
state?: "off" | "on" | "indeterminate";
|
|
5
5
|
size?: "large" | "small";
|
|
6
|
-
bordered?: boolean;
|
|
7
6
|
onChange?: (checked: boolean) => void;
|
|
8
7
|
disabled?: boolean;
|
|
9
8
|
id?: string;
|
|
@@ -10,6 +10,7 @@ export * from "./components/Calendar";
|
|
|
10
10
|
export * from "./components/Card";
|
|
11
11
|
export * from "./components/Checkbox";
|
|
12
12
|
export * from "./components/Chip";
|
|
13
|
+
export * from "./components/Code";
|
|
13
14
|
export * from "./components/Datepicker";
|
|
14
15
|
export * from "./components/Dialog";
|
|
15
16
|
export * from "./components/Divider";
|