@sudobility/workflow-components 1.1.0 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sudobility/workflow-components",
3
- "version": "1.1.0",
3
+ "version": "2.0.0",
4
4
  "description": "Business workflow components for checklists, status tracking, and process management",
5
5
  "main": "./dist/index.umd.js",
6
6
  "module": "./dist/index.esm.js",
package/src/index.ts CHANGED
@@ -6,15 +6,10 @@
6
6
  * @package @sudobility/workflow-components
7
7
  */
8
8
 
9
- export * from './blockquote';
10
9
  export * from './checklist-progress';
11
- export * from './form-builder';
12
- export * from './form-template';
13
- export * from './form-validator';
14
10
  export * from './network-status';
15
11
  export * from './process-diagram';
16
12
  export * from './quote-generator';
17
13
  export * from './safety-checklist';
18
- export * from './status-badge';
19
14
  export * from './sticky-note';
20
15
  export * from './system-status';
@@ -1,35 +0,0 @@
1
- import { default as React } from 'react';
2
- export interface BlockquoteProps {
3
- /** Quote content */
4
- children: React.ReactNode;
5
- /** Citation/author */
6
- cite?: string;
7
- /** Variant style */
8
- variant?: 'default' | 'bordered' | 'accent';
9
- /** Size variant */
10
- size?: 'sm' | 'md' | 'lg';
11
- /** Additional className */
12
- className?: string;
13
- }
14
- /**
15
- * Blockquote Component
16
- *
17
- * Displays quoted text with optional citation and various styling options.
18
- * Uses semantic HTML for proper document structure.
19
- *
20
- * @example
21
- * ```tsx
22
- * <Blockquote cite="John Doe">
23
- * This is a great quote about something important.
24
- * </Blockquote>
25
- * ```
26
- *
27
- * @example
28
- * ```tsx
29
- * <Blockquote variant="accent" size="lg">
30
- * Innovation distinguishes between a leader and a follower.
31
- * </Blockquote>
32
- * ```
33
- */
34
- export declare const Blockquote: React.FC<BlockquoteProps>;
35
- //# sourceMappingURL=blockquote.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"blockquote.d.ts","sourceRoot":"","sources":["../src/blockquote.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,eAAe;IAC9B,oBAAoB;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,sBAAsB;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oBAAoB;IACpB,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;IAC5C,mBAAmB;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAoDhD,CAAC"}
@@ -1,33 +0,0 @@
1
- /**
2
- * UformUbuilder Component
3
- *
4
- * A reusable UformUbuilder component with full dark mode support.
5
- * Optimized for accessibility and AI-assisted development.
6
- *
7
- * @component
8
- * @example
9
- * ```tsx
10
- * <UformUbuilder className="custom-class" />
11
- * ```
12
- *
13
- * @remarks
14
- * This component supports:
15
- * - Light and dark themes automatically
16
- * - Responsive design
17
- * - Accessibility features
18
- * - TypeScript type safety
19
- *
20
- * @see {@link https://docs.example.com/components/form-builder}
21
- */
22
- export interface UformUbuilderProps {
23
- /** Additional CSS classes */
24
- className?: string;
25
- /** Component children */
26
- children?: React.ReactNode;
27
- /** Disabled state */
28
- disabled?: boolean;
29
- /** Callback when component is interacted with */
30
- onClick?: () => void;
31
- }
32
- export declare const UformUbuilder: ({ className, children, disabled, onClick, }: UformUbuilderProps) => import("react/jsx-runtime").JSX.Element;
33
- //# sourceMappingURL=form-builder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"form-builder.d.ts","sourceRoot":"","sources":["../src/form-builder.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,WAAW,kBAAkB;IACjC,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,aAAa,GAAI,6CAK3B,kBAAkB,4CAmBpB,CAAC"}
@@ -1,33 +0,0 @@
1
- /**
2
- * UformUtemplate Component
3
- *
4
- * A reusable UformUtemplate component with full dark mode support.
5
- * Optimized for accessibility and AI-assisted development.
6
- *
7
- * @component
8
- * @example
9
- * ```tsx
10
- * <UformUtemplate className="custom-class" />
11
- * ```
12
- *
13
- * @remarks
14
- * This component supports:
15
- * - Light and dark themes automatically
16
- * - Responsive design
17
- * - Accessibility features
18
- * - TypeScript type safety
19
- *
20
- * @see {@link https://docs.example.com/components/form-template}
21
- */
22
- export interface UformUtemplateProps {
23
- /** Additional CSS classes */
24
- className?: string;
25
- /** Component children */
26
- children?: React.ReactNode;
27
- /** Disabled state */
28
- disabled?: boolean;
29
- /** Callback when component is interacted with */
30
- onClick?: () => void;
31
- }
32
- export declare const UformUtemplate: ({ className, children, disabled, onClick, }: UformUtemplateProps) => import("react/jsx-runtime").JSX.Element;
33
- //# sourceMappingURL=form-template.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"form-template.d.ts","sourceRoot":"","sources":["../src/form-template.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,WAAW,mBAAmB;IAClC,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,cAAc,GAAI,6CAK5B,mBAAmB,4CAmBrB,CAAC"}
@@ -1,33 +0,0 @@
1
- /**
2
- * UformUvalidator Component
3
- *
4
- * A reusable UformUvalidator component with full dark mode support.
5
- * Optimized for accessibility and AI-assisted development.
6
- *
7
- * @component
8
- * @example
9
- * ```tsx
10
- * <UformUvalidator className="custom-class" />
11
- * ```
12
- *
13
- * @remarks
14
- * This component supports:
15
- * - Light and dark themes automatically
16
- * - Responsive design
17
- * - Accessibility features
18
- * - TypeScript type safety
19
- *
20
- * @see {@link https://docs.example.com/components/form-validator}
21
- */
22
- export interface UformUvalidatorProps {
23
- /** Additional CSS classes */
24
- className?: string;
25
- /** Component children */
26
- children?: React.ReactNode;
27
- /** Disabled state */
28
- disabled?: boolean;
29
- /** Callback when component is interacted with */
30
- onClick?: () => void;
31
- }
32
- export declare const UformUvalidator: ({ className, children, disabled, onClick, }: UformUvalidatorProps) => import("react/jsx-runtime").JSX.Element;
33
- //# sourceMappingURL=form-validator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"form-validator.d.ts","sourceRoot":"","sources":["../src/form-validator.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,WAAW,oBAAoB;IACnC,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,eAAe,GAAI,6CAK7B,oBAAoB,4CAmBtB,CAAC"}
@@ -1,16 +0,0 @@
1
- import { default as React } from 'react';
2
- export type StatusType = 'verified' | 'connected' | 'disconnected' | 'pending' | 'error' | 'success' | 'warning';
3
- export type ChainType = 'evm' | 'solana' | 'unknown';
4
- export interface StatusBadgeProps {
5
- status: StatusType;
6
- label?: string;
7
- showDot?: boolean;
8
- size?: 'sm' | 'md' | 'lg';
9
- }
10
- export interface ChainBadgeProps {
11
- chainType: ChainType;
12
- size?: 'sm' | 'md' | 'lg';
13
- }
14
- export declare const StatusBadge: React.FC<StatusBadgeProps>;
15
- export declare const ChainBadge: React.FC<ChainBadgeProps>;
16
- //# sourceMappingURL=status-badge.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"status-badge.d.ts","sourceRoot":"","sources":["../src/status-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,UAAU,GAClB,UAAU,GACV,WAAW,GACX,cAAc,GACd,SAAS,GACT,OAAO,GACP,SAAS,GACT,SAAS,CAAC;AAGd,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAC;AAErD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B;AAiCD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA0DlD,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAqBhD,CAAC"}
@@ -1,89 +0,0 @@
1
- import React from 'react';
2
- import { cn } from '@sudobility/components';
3
-
4
- export interface BlockquoteProps {
5
- /** Quote content */
6
- children: React.ReactNode;
7
- /** Citation/author */
8
- cite?: string;
9
- /** Variant style */
10
- variant?: 'default' | 'bordered' | 'accent';
11
- /** Size variant */
12
- size?: 'sm' | 'md' | 'lg';
13
- /** Additional className */
14
- className?: string;
15
- }
16
-
17
- /**
18
- * Blockquote Component
19
- *
20
- * Displays quoted text with optional citation and various styling options.
21
- * Uses semantic HTML for proper document structure.
22
- *
23
- * @example
24
- * ```tsx
25
- * <Blockquote cite="John Doe">
26
- * This is a great quote about something important.
27
- * </Blockquote>
28
- * ```
29
- *
30
- * @example
31
- * ```tsx
32
- * <Blockquote variant="accent" size="lg">
33
- * Innovation distinguishes between a leader and a follower.
34
- * </Blockquote>
35
- * ```
36
- */
37
- export const Blockquote: React.FC<BlockquoteProps> = ({
38
- children,
39
- cite,
40
- variant = 'default',
41
- size = 'md',
42
- className,
43
- }) => {
44
- // Size configurations
45
- const sizeClasses = {
46
- sm: 'text-sm p-3',
47
- md: 'text-base p-4',
48
- lg: 'text-lg p-6',
49
- };
50
-
51
- const citeSize = {
52
- sm: 'text-xs',
53
- md: 'text-sm',
54
- lg: 'text-base',
55
- };
56
-
57
- // Variant configurations
58
- const variantClasses = {
59
- default:
60
- 'border-l-4 border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800/50',
61
- bordered:
62
- 'border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800',
63
- accent:
64
- 'border-l-4 border-blue-500 dark:border-blue-400 bg-blue-50 dark:bg-blue-900/20',
65
- };
66
-
67
- return (
68
- <blockquote
69
- className={cn(
70
- 'rounded-r-lg',
71
- sizeClasses[size],
72
- variantClasses[variant],
73
- className
74
- )}
75
- >
76
- <p className='text-gray-800 dark:text-gray-200 italic'>{children}</p>
77
- {cite && (
78
- <footer
79
- className={cn(
80
- 'mt-2 text-gray-600 dark:text-gray-400',
81
- citeSize[size]
82
- )}
83
- >
84
- — <cite className='not-italic font-medium'>{cite}</cite>
85
- </footer>
86
- )}
87
- </blockquote>
88
- );
89
- };
@@ -1,60 +0,0 @@
1
- import { cn } from '@sudobility/components';
2
-
3
- /**
4
- * UformUbuilder Component
5
- *
6
- * A reusable UformUbuilder component with full dark mode support.
7
- * Optimized for accessibility and AI-assisted development.
8
- *
9
- * @component
10
- * @example
11
- * ```tsx
12
- * <UformUbuilder className="custom-class" />
13
- * ```
14
- *
15
- * @remarks
16
- * This component supports:
17
- * - Light and dark themes automatically
18
- * - Responsive design
19
- * - Accessibility features
20
- * - TypeScript type safety
21
- *
22
- * @see {@link https://docs.example.com/components/form-builder}
23
- */
24
-
25
- export interface UformUbuilderProps {
26
- /** Additional CSS classes */
27
- className?: string;
28
- /** Component children */
29
- children?: React.ReactNode;
30
- /** Disabled state */
31
- disabled?: boolean;
32
- /** Callback when component is interacted with */
33
- onClick?: () => void;
34
- }
35
-
36
- export const UformUbuilder = ({
37
- className,
38
- children,
39
- disabled = false,
40
- onClick,
41
- }: UformUbuilderProps) => {
42
- return (
43
- <div
44
- className={cn(
45
- 'p-4 rounded-lg border transition-colors',
46
- 'bg-white dark:bg-gray-900',
47
- 'border-gray-200 dark:border-gray-700',
48
- 'text-gray-900 dark:text-white',
49
- disabled && 'opacity-50 cursor-not-allowed',
50
- 'hover:bg-gray-50 dark:hover:bg-gray-800',
51
- className
52
- )}
53
- onClick={disabled ? undefined : onClick}
54
- role='region'
55
- aria-label='UformUbuilder'
56
- >
57
- {children || 'UformUbuilder Component'}
58
- </div>
59
- );
60
- };
@@ -1,60 +0,0 @@
1
- import { cn } from '@sudobility/components';
2
-
3
- /**
4
- * UformUtemplate Component
5
- *
6
- * A reusable UformUtemplate component with full dark mode support.
7
- * Optimized for accessibility and AI-assisted development.
8
- *
9
- * @component
10
- * @example
11
- * ```tsx
12
- * <UformUtemplate className="custom-class" />
13
- * ```
14
- *
15
- * @remarks
16
- * This component supports:
17
- * - Light and dark themes automatically
18
- * - Responsive design
19
- * - Accessibility features
20
- * - TypeScript type safety
21
- *
22
- * @see {@link https://docs.example.com/components/form-template}
23
- */
24
-
25
- export interface UformUtemplateProps {
26
- /** Additional CSS classes */
27
- className?: string;
28
- /** Component children */
29
- children?: React.ReactNode;
30
- /** Disabled state */
31
- disabled?: boolean;
32
- /** Callback when component is interacted with */
33
- onClick?: () => void;
34
- }
35
-
36
- export const UformUtemplate = ({
37
- className,
38
- children,
39
- disabled = false,
40
- onClick,
41
- }: UformUtemplateProps) => {
42
- return (
43
- <div
44
- className={cn(
45
- 'p-4 rounded-lg border transition-colors',
46
- 'bg-white dark:bg-gray-900',
47
- 'border-gray-200 dark:border-gray-700',
48
- 'text-gray-900 dark:text-white',
49
- disabled && 'opacity-50 cursor-not-allowed',
50
- 'hover:bg-gray-50 dark:hover:bg-gray-800',
51
- className
52
- )}
53
- onClick={disabled ? undefined : onClick}
54
- role='region'
55
- aria-label='UformUtemplate'
56
- >
57
- {children || 'UformUtemplate Component'}
58
- </div>
59
- );
60
- };
@@ -1,60 +0,0 @@
1
- import { cn } from '@sudobility/components';
2
-
3
- /**
4
- * UformUvalidator Component
5
- *
6
- * A reusable UformUvalidator component with full dark mode support.
7
- * Optimized for accessibility and AI-assisted development.
8
- *
9
- * @component
10
- * @example
11
- * ```tsx
12
- * <UformUvalidator className="custom-class" />
13
- * ```
14
- *
15
- * @remarks
16
- * This component supports:
17
- * - Light and dark themes automatically
18
- * - Responsive design
19
- * - Accessibility features
20
- * - TypeScript type safety
21
- *
22
- * @see {@link https://docs.example.com/components/form-validator}
23
- */
24
-
25
- export interface UformUvalidatorProps {
26
- /** Additional CSS classes */
27
- className?: string;
28
- /** Component children */
29
- children?: React.ReactNode;
30
- /** Disabled state */
31
- disabled?: boolean;
32
- /** Callback when component is interacted with */
33
- onClick?: () => void;
34
- }
35
-
36
- export const UformUvalidator = ({
37
- className,
38
- children,
39
- disabled = false,
40
- onClick,
41
- }: UformUvalidatorProps) => {
42
- return (
43
- <div
44
- className={cn(
45
- 'p-4 rounded-lg border transition-colors',
46
- 'bg-white dark:bg-gray-900',
47
- 'border-gray-200 dark:border-gray-700',
48
- 'text-gray-900 dark:text-white',
49
- disabled && 'opacity-50 cursor-not-allowed',
50
- 'hover:bg-gray-50 dark:hover:bg-gray-800',
51
- className
52
- )}
53
- onClick={disabled ? undefined : onClick}
54
- role='region'
55
- aria-label='UformUvalidator'
56
- >
57
- {children || 'UformUvalidator Component'}
58
- </div>
59
- );
60
- };
@@ -1,140 +0,0 @@
1
- import React from 'react';
2
- import { variants, getStatusIndicatorColor } from '@sudobility/design';
3
-
4
- export type StatusType =
5
- | 'verified'
6
- | 'connected'
7
- | 'disconnected'
8
- | 'pending'
9
- | 'error'
10
- | 'success'
11
- | 'warning';
12
-
13
- // Local ChainType enum to avoid @johnqh/lib dependency
14
- export type ChainType = 'evm' | 'solana' | 'unknown';
15
-
16
- export interface StatusBadgeProps {
17
- status: StatusType;
18
- label?: string;
19
- showDot?: boolean;
20
- size?: 'sm' | 'md' | 'lg';
21
- }
22
-
23
- export interface ChainBadgeProps {
24
- chainType: ChainType;
25
- size?: 'sm' | 'md' | 'lg';
26
- }
27
-
28
- // Map StatusType to design system status indicator types
29
- const getStatusDotColor = (status: StatusType) => {
30
- switch (status) {
31
- case 'verified':
32
- case 'success':
33
- return getStatusIndicatorColor('success');
34
- case 'connected':
35
- case 'warning':
36
- return getStatusIndicatorColor('warning');
37
- case 'disconnected':
38
- case 'error':
39
- return getStatusIndicatorColor('error');
40
- case 'pending':
41
- return getStatusIndicatorColor('info');
42
- default:
43
- return getStatusIndicatorColor('neutral');
44
- }
45
- };
46
-
47
- // Dot size classes for different badge sizes
48
- const getDotSizeClass = (size: 'sm' | 'md' | 'lg') => {
49
- switch (size) {
50
- case 'sm':
51
- return 'w-1.5 h-1.5';
52
- case 'lg':
53
- return 'w-3 h-3';
54
- default: // md
55
- return 'w-2 h-2';
56
- }
57
- };
58
-
59
- export const StatusBadge: React.FC<StatusBadgeProps> = ({
60
- status,
61
- label,
62
- showDot = true,
63
- size = 'md',
64
- }) => {
65
- const defaultLabels: Record<StatusType, string> = {
66
- verified: 'Verified',
67
- connected: 'Connected',
68
- disconnected: 'Disconnected',
69
- pending: 'Pending',
70
- error: 'Error',
71
- success: 'Success',
72
- warning: 'Warning',
73
- };
74
-
75
- const displayLabel = label || defaultLabels[status];
76
-
77
- // Use design system badge variants for consistent styling
78
- const getDesignSystemVariant = (
79
- status: StatusType,
80
- size: 'sm' | 'md' | 'lg'
81
- ) => {
82
- const sizeMap = { sm: 'small', md: 'default', lg: 'large' } as const;
83
- const variantMap = {
84
- verified: 'success',
85
- success: 'success',
86
- connected: 'warning',
87
- warning: 'warning',
88
- disconnected: 'error',
89
- error: 'error',
90
- pending: 'primary',
91
- } as const;
92
-
93
- const variant = variantMap[status] || 'default';
94
- const badgeSize = sizeMap[size];
95
-
96
- if (badgeSize === 'default') {
97
- return variants.badge[variant as keyof typeof variants.badge]() as string;
98
- } else {
99
- return variants.badge[badgeSize](variant) as string;
100
- }
101
- };
102
-
103
- const badgeClass = getDesignSystemVariant(status, size);
104
- const dotColor = getStatusDotColor(status);
105
- const dotSize = getDotSizeClass(size);
106
-
107
- return (
108
- <span className={badgeClass}>
109
- {showDot && (
110
- <span
111
- className={`inline-block ${dotSize} rounded-full ${dotColor} mr-1`}
112
- />
113
- )}
114
- {displayLabel}
115
- </span>
116
- );
117
- };
118
-
119
- export const ChainBadge: React.FC<ChainBadgeProps> = ({
120
- chainType,
121
- size = 'md',
122
- }) => {
123
- if (chainType === 'unknown') return null;
124
-
125
- const chainLabel = chainType === 'solana' ? 'SOL' : 'ETH';
126
- const sizeMap = { sm: 'small', md: 'default', lg: 'large' } as const;
127
- const badgeSize = sizeMap[size];
128
-
129
- // Use design system Web3 badge variants
130
- const getBadgeClass = () => {
131
- const badgeType = chainType === 'solana' ? 'solana' : 'ethereum';
132
- if (badgeSize === 'default') {
133
- return variants.badge[badgeType]();
134
- } else {
135
- return variants.badge[badgeSize](badgeType);
136
- }
137
- };
138
-
139
- return <span className={getBadgeClass() as string}>{chainLabel}</span>;
140
- };