@wellingtonhlc/shared-ui 0.1.16 → 0.22.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/README.md +19 -0
- package/dist/components/ActionPrimitives.d.ts +1 -0
- package/dist/components/ActionPrimitives.d.ts.map +1 -1
- package/dist/components/ActionPrimitives.js +5 -5
- package/dist/components/AppShell.d.ts +9 -2
- package/dist/components/AppShell.d.ts.map +1 -1
- package/dist/components/AppShell.js +8 -3
- package/dist/components/Button.d.ts +1 -1
- package/dist/components/Button.d.ts.map +1 -1
- package/dist/components/Button.js +7 -6
- package/dist/components/Card.d.ts.map +1 -1
- package/dist/components/Card.js +8 -4
- package/dist/components/ConfirmationDialog.d.ts +4 -3
- package/dist/components/ConfirmationDialog.d.ts.map +1 -1
- package/dist/components/ConfirmationDialog.js +35 -17
- package/dist/components/EmptyState.d.ts +2 -1
- package/dist/components/EmptyState.d.ts.map +1 -1
- package/dist/components/EmptyState.js +2 -2
- package/dist/components/FieldSkeleton.js +1 -1
- package/dist/components/Modal.d.ts +2 -1
- package/dist/components/Modal.d.ts.map +1 -1
- package/dist/components/Modal.js +5 -5
- package/dist/components/NavCard.js +1 -1
- package/dist/components/PageMessage.js +11 -11
- package/dist/components/StatCard.js +26 -26
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/styles.css +800 -254
- package/package.json +1 -1
|
@@ -2,39 +2,39 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { cn } from '../utils/cn';
|
|
3
3
|
const variantClasses = {
|
|
4
4
|
default: {
|
|
5
|
-
container: '
|
|
6
|
-
label: '
|
|
7
|
-
value: '
|
|
8
|
-
description: '
|
|
9
|
-
icon: '
|
|
5
|
+
container: 'app-stat-card--default shadow-sm',
|
|
6
|
+
label: 'app-stat-card__label--default',
|
|
7
|
+
value: 'app-stat-card__value--default',
|
|
8
|
+
description: 'app-stat-card__description--default',
|
|
9
|
+
icon: 'app-stat-card__icon--default',
|
|
10
10
|
},
|
|
11
11
|
success: {
|
|
12
|
-
container: '
|
|
13
|
-
label: '
|
|
14
|
-
value: '
|
|
15
|
-
description: '
|
|
16
|
-
icon: '
|
|
12
|
+
container: 'app-stat-card--success shadow-sm',
|
|
13
|
+
label: 'app-stat-card__label--success',
|
|
14
|
+
value: 'app-stat-card__value--success',
|
|
15
|
+
description: 'app-stat-card__description--success',
|
|
16
|
+
icon: 'app-stat-card__icon--success',
|
|
17
17
|
},
|
|
18
18
|
info: {
|
|
19
|
-
container: '
|
|
20
|
-
label: '
|
|
21
|
-
value: '
|
|
22
|
-
description: '
|
|
23
|
-
icon: '
|
|
19
|
+
container: 'app-stat-card--info shadow-sm',
|
|
20
|
+
label: 'app-stat-card__label--info',
|
|
21
|
+
value: 'app-stat-card__value--info',
|
|
22
|
+
description: 'app-stat-card__description--info',
|
|
23
|
+
icon: 'app-stat-card__icon--info',
|
|
24
24
|
},
|
|
25
25
|
warning: {
|
|
26
|
-
container: '
|
|
27
|
-
label: '
|
|
28
|
-
value: '
|
|
29
|
-
description: '
|
|
30
|
-
icon: '
|
|
26
|
+
container: 'app-stat-card--warning shadow-sm',
|
|
27
|
+
label: 'app-stat-card__label--warning',
|
|
28
|
+
value: 'app-stat-card__value--warning',
|
|
29
|
+
description: 'app-stat-card__description--warning',
|
|
30
|
+
icon: 'app-stat-card__icon--warning',
|
|
31
31
|
},
|
|
32
32
|
danger: {
|
|
33
|
-
container: '
|
|
34
|
-
label: '
|
|
35
|
-
value: '
|
|
36
|
-
description: '
|
|
37
|
-
icon: '
|
|
33
|
+
container: 'app-stat-card--danger shadow-sm',
|
|
34
|
+
label: 'app-stat-card__label--danger',
|
|
35
|
+
value: 'app-stat-card__value--danger',
|
|
36
|
+
description: 'app-stat-card__description--danger',
|
|
37
|
+
icon: 'app-stat-card__icon--danger',
|
|
38
38
|
},
|
|
39
39
|
};
|
|
40
40
|
const sizeClasses = {
|
|
@@ -58,5 +58,5 @@ export function StatCard({ className, description, format, icon, label, size = '
|
|
|
58
58
|
const variantStyle = variantClasses[variant];
|
|
59
59
|
const sizeStyle = sizeClasses[size];
|
|
60
60
|
const formattedValue = format ? format(value) : String(value ?? '-');
|
|
61
|
-
return (_jsxs("div", { className: cn('rounded-xl border', variantStyle.container, sizeStyle.container, className), children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("div", { className: cn('min-w-0 text-xs font-medium tracking-wide uppercase', variantStyle.label), children: label }), icon && (_jsx("div", { className: cn('shrink-0 [&>svg]:size-full', sizeStyle.icon, variantStyle.icon), children: icon }))] }), _jsx("div", { className: cn('mt-1 font-semibold', sizeStyle.value, variantStyle.value, valueClassName), children: formattedValue }), description && (_jsx("div", { className: cn('mt-1 text-xs', size === 'lg' && 'min-h-8 leading-4', variantStyle.description), children: description }))] }));
|
|
61
|
+
return (_jsxs("div", { className: cn('app-stat-card rounded-xl border', variantStyle.container, sizeStyle.container, className), children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("div", { className: cn('min-w-0 text-xs font-medium tracking-wide uppercase', variantStyle.label), children: label }), icon && (_jsx("div", { className: cn('shrink-0 [&>svg]:size-full', sizeStyle.icon, variantStyle.icon), children: icon }))] }), _jsx("div", { className: cn('mt-1 font-semibold', sizeStyle.value, variantStyle.value, valueClassName), children: formattedValue }), description && (_jsx("div", { className: cn('mt-1 text-xs', size === 'lg' && 'min-h-8 leading-4', variantStyle.description), children: description }))] }));
|
|
62
62
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { cn } from './utils/cn';
|
|
2
|
-
export { AppShell, type AppShellContentMode, type AppShellMainProps, type AppShellOverlayProps, type AppShellOverlayVariant } from './components/AppShell';
|
|
2
|
+
export { AppShell, type AppShellContentMode, type AppShellMainProps, type AppShellOverlayProps, type AppShellOverlayVariant, type AppShellTopbarButtonProps, type AppShellTopbarProps, } from './components/AppShell';
|
|
3
3
|
export { AppShellActionButton, AppShellActions, AppShellActionsSeparator, type AppShellActionButtonProps, type AppShellActionButtonVariant, type AppShellActionsAlign, type AppShellActionsProps, type AppShellActionsRegion, type AppShellActionsSeparatorProps, } from './components/AppShellActions';
|
|
4
4
|
export { Badge, type BadgeProps, type BadgeVariant } from './components/Badge';
|
|
5
5
|
export { Button, type ButtonProps, type ButtonSize, type ButtonVariant } from './components/Button';
|
|
6
|
-
export { ConfirmationDialog, type ConfirmationDialogAction, type ConfirmationDialogProps, type ConfirmationDialogVariant } from './components/ConfirmationDialog';
|
|
6
|
+
export { ConfirmationDialog, type ConfirmationDialogAction, type ConfirmationDialogProps, type ConfirmationDialogVariant, type ConfirmationDialogVariantInput, } from './components/ConfirmationDialog';
|
|
7
7
|
export { CopyableField, type CopyableFieldProps } from './components/CopyableField';
|
|
8
8
|
export { FieldGroup, FormSection, type FieldGroupProps } from './components/FieldGroup';
|
|
9
9
|
export { EmptyState, type EmptyStateProps, type EmptyStateVariant } from './components/EmptyState';
|
|
@@ -23,7 +23,7 @@ export { TextareaField, type TextareaFieldProps } from './components/TextareaFie
|
|
|
23
23
|
export { DateField, type DateFieldProps } from './components/DateField';
|
|
24
24
|
export { DecimalField, type DecimalFieldProps } from './components/DecimalField';
|
|
25
25
|
export { Pagination, type PaginationProps, type PaginationSize } from './components/Pagination';
|
|
26
|
-
export { Page } from './components/Page';
|
|
26
|
+
export { Page, type PageActionButtonProps, type PageActionsAlign, type PageActionsElement, type PageActionsPosition, type PageActionsProps, type PageActionsSeparatorProps, type PageActionsSize, type PageDescriptionProps, type PageTitleProps, } from './components/Page';
|
|
27
27
|
export { PageMessage, type PageMessageProps, type PageMessageVariant } from './components/PageMessage';
|
|
28
28
|
export { PasswordInput, type PasswordInputProps } from './components/PasswordInput';
|
|
29
29
|
export { Filter, type FilterFooterProps, type FilterRootProps } from './components/Filter';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAChC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAChC,OAAO,EACL,QAAQ,EACR,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,GACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,wBAAwB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,6BAA6B,GACnC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpG,OAAO,EACL,kBAAkB,EAClB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,8BAA8B,GACpC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,KAAK,iBAA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E,QAAQ,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC9G,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { cn } from './utils/cn';
|
|
2
|
-
export { AppShell } from './components/AppShell';
|
|
2
|
+
export { AppShell, } from './components/AppShell';
|
|
3
3
|
export { AppShellActionButton, AppShellActions, AppShellActionsSeparator, } from './components/AppShellActions';
|
|
4
4
|
export { Badge } from './components/Badge';
|
|
5
5
|
export { Button } from './components/Button';
|
|
6
|
-
export { ConfirmationDialog } from './components/ConfirmationDialog';
|
|
6
|
+
export { ConfirmationDialog, } from './components/ConfirmationDialog';
|
|
7
7
|
export { CopyableField } from './components/CopyableField';
|
|
8
8
|
export { FieldGroup, FormSection } from './components/FieldGroup';
|
|
9
9
|
export { EmptyState } from './components/EmptyState';
|
|
@@ -23,7 +23,7 @@ export { TextareaField } from './components/TextareaField';
|
|
|
23
23
|
export { DateField } from './components/DateField';
|
|
24
24
|
export { DecimalField } from './components/DecimalField';
|
|
25
25
|
export { Pagination } from './components/Pagination';
|
|
26
|
-
export { Page } from './components/Page';
|
|
26
|
+
export { Page, } from './components/Page';
|
|
27
27
|
export { PageMessage } from './components/PageMessage';
|
|
28
28
|
export { PasswordInput } from './components/PasswordInput';
|
|
29
29
|
export { Filter } from './components/Filter';
|