@papernote/ui 1.10.19 → 1.10.20
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/components/Alert.d.ts +1 -1
- package/dist/components/Alert.d.ts.map +1 -1
- package/dist/components/Badge.d.ts +1 -1
- package/dist/components/Badge.d.ts.map +1 -1
- package/dist/components/StatusBadge.d.ts +1 -1
- package/dist/components/StatusBadge.d.ts.map +1 -1
- package/dist/components/Text.d.ts +2 -1
- package/dist/components/Text.d.ts.map +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.esm.js +15 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/dist/styles.css +10 -0
- package/package.json +1 -1
- package/src/components/Alert.stories.tsx +20 -7
- package/src/components/Alert.tsx +7 -1
- package/src/components/Badge.stories.tsx +18 -7
- package/src/components/Badge.tsx +3 -1
- package/src/components/StatusBadge.tsx +7 -2
- package/src/components/Text.stories.tsx +30 -6
- package/src/components/Text.tsx +5 -3
|
@@ -5,7 +5,7 @@ export interface AlertAction {
|
|
|
5
5
|
variant?: 'primary' | 'secondary';
|
|
6
6
|
}
|
|
7
7
|
export interface AlertProps {
|
|
8
|
-
variant?: 'success' | 'error' | 'warning' | 'info';
|
|
8
|
+
variant?: 'success' | 'error' | 'warning' | 'caution' | 'info';
|
|
9
9
|
title?: string;
|
|
10
10
|
children: React.ReactNode;
|
|
11
11
|
onClose?: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../src/components/Alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;CACnC;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../src/components/Alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;CACnC;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC5B,OAAgB,EAChB,KAAK,EACL,QAAQ,EACR,OAAO,EACP,SAAc,EACd,OAAY,GACb,EAAE,UAAU,2CAwFZ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface BadgeProps {
|
|
3
3
|
children?: React.ReactNode;
|
|
4
|
-
variant?: 'success' | 'warning' | 'error' | 'info' | 'neutral';
|
|
4
|
+
variant?: 'success' | 'warning' | 'error' | 'caution' | 'info' | 'neutral';
|
|
5
5
|
size?: 'sm' | 'md' | 'lg';
|
|
6
6
|
icon?: React.ReactNode;
|
|
7
7
|
onRemove?: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../src/components/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../src/components/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;IAC3E,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,oEAAoE;IACpE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,sEAAsE;IACtE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC5B,QAAQ,EACR,OAAmB,EACnB,IAAW,EACX,IAAI,EACJ,QAAQ,EACR,SAAc,EACd,GAAW,EACX,IAAY,EACZ,QAAgB,EAChB,QAAQ,EACR,OAAe,GAChB,EAAE,UAAU,2CAuFZ"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export interface StatusBadgeProps {
|
|
2
|
-
status: 'paid' | 'pending' | 'overdue' | 'cancelled' | 'success' | 'warning' | 'error' | 'info';
|
|
2
|
+
status: 'paid' | 'pending' | 'overdue' | 'cancelled' | 'success' | 'warning' | 'caution' | 'error' | 'info';
|
|
3
3
|
label?: string;
|
|
4
4
|
size?: 'sm' | 'md' | 'lg';
|
|
5
5
|
showIcon?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBadge.d.ts","sourceRoot":"","sources":["../../src/components/StatusBadge.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"StatusBadge.d.ts","sourceRoot":"","sources":["../../src/components/StatusBadge.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;IAC5G,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAiED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,MAAM,EACN,KAAK,EACL,IAAW,EACX,QAAe,EAChB,EAAE,gBAAgB,2CAclB"}
|
|
@@ -17,7 +17,7 @@ export interface TextProps extends Omit<React.HTMLAttributes<HTMLElement>, 'colo
|
|
|
17
17
|
/** Weight variant */
|
|
18
18
|
weight?: 'normal' | 'medium' | 'semibold' | 'bold';
|
|
19
19
|
/** Color variant */
|
|
20
|
-
color?: 'primary' | 'secondary' | 'muted' | 'accent' | 'error' | 'success' | 'warning';
|
|
20
|
+
color?: 'primary' | 'secondary' | 'muted' | 'accent' | 'error' | 'success' | 'warning' | 'caution';
|
|
21
21
|
/** Text alignment */
|
|
22
22
|
align?: 'left' | 'center' | 'right';
|
|
23
23
|
/** Truncate text with ellipsis (single line) */
|
|
@@ -49,6 +49,7 @@ export interface TextProps extends Omit<React.HTMLAttributes<HTMLElement>, 'colo
|
|
|
49
49
|
* </Text>
|
|
50
50
|
*
|
|
51
51
|
* <Text color="warning">Warning message</Text>
|
|
52
|
+
* <Text color="caution">Caution message (informational, not alarming)</Text>
|
|
52
53
|
*
|
|
53
54
|
* // With ref
|
|
54
55
|
* const textRef = useRef<HTMLParagraphElement>(null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../src/components/Text.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,KAAK,WAAW,GAAG,GAAG,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,OAAO,CAAC;AAE5F,KAAK,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAE3D,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IACjF,mBAAmB;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,6BAA6B;IAC7B,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,2DAA2D;IAC3D,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,sEAAsE;IACtE,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,sEAAsE;IACtE,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,qBAAqB;IACrB,MAAM,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC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,CAAC,EAAE,OAAO,CAAC;IACnB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAClC,qBAAqB;IACrB,SAAS,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,YAAY,GAAG,QAAQ,CAAC;IAChE,uBAAuB;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,IAAI,+EAqHf,CAAC;AAIH,eAAe,IAAI,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1822,7 +1822,7 @@ interface TextProps extends Omit<React__default.HTMLAttributes<HTMLElement>, 'co
|
|
|
1822
1822
|
/** Weight variant */
|
|
1823
1823
|
weight?: 'normal' | 'medium' | 'semibold' | 'bold';
|
|
1824
1824
|
/** Color variant */
|
|
1825
|
-
color?: 'primary' | 'secondary' | 'muted' | 'accent' | 'error' | 'success' | 'warning';
|
|
1825
|
+
color?: 'primary' | 'secondary' | 'muted' | 'accent' | 'error' | 'success' | 'warning' | 'caution';
|
|
1826
1826
|
/** Text alignment */
|
|
1827
1827
|
align?: 'left' | 'center' | 'right';
|
|
1828
1828
|
/** Truncate text with ellipsis (single line) */
|
|
@@ -1854,6 +1854,7 @@ interface TextProps extends Omit<React__default.HTMLAttributes<HTMLElement>, 'co
|
|
|
1854
1854
|
* </Text>
|
|
1855
1855
|
*
|
|
1856
1856
|
* <Text color="warning">Warning message</Text>
|
|
1857
|
+
* <Text color="caution">Caution message (informational, not alarming)</Text>
|
|
1857
1858
|
*
|
|
1858
1859
|
* // With ref
|
|
1859
1860
|
* const textRef = useRef<HTMLParagraphElement>(null);
|
|
@@ -1891,7 +1892,7 @@ interface AlertAction {
|
|
|
1891
1892
|
variant?: 'primary' | 'secondary';
|
|
1892
1893
|
}
|
|
1893
1894
|
interface AlertProps {
|
|
1894
|
-
variant?: 'success' | 'error' | 'warning' | 'info';
|
|
1895
|
+
variant?: 'success' | 'error' | 'warning' | 'caution' | 'info';
|
|
1895
1896
|
title?: string;
|
|
1896
1897
|
children: React__default.ReactNode;
|
|
1897
1898
|
onClose?: () => void;
|
|
@@ -4149,7 +4150,7 @@ declare function StepIndicator({ steps, currentStep, variant, onStepClick, }: St
|
|
|
4149
4150
|
|
|
4150
4151
|
interface BadgeProps {
|
|
4151
4152
|
children?: React__default.ReactNode;
|
|
4152
|
-
variant?: 'success' | 'warning' | 'error' | 'info' | 'neutral';
|
|
4153
|
+
variant?: 'success' | 'warning' | 'error' | 'caution' | 'info' | 'neutral';
|
|
4153
4154
|
size?: 'sm' | 'md' | 'lg';
|
|
4154
4155
|
icon?: React__default.ReactNode;
|
|
4155
4156
|
onRemove?: () => void;
|
|
@@ -6217,7 +6218,7 @@ interface DateDisplayProps {
|
|
|
6217
6218
|
declare function DateDisplay({ date, format, fallback, label, showLabel, className, locale, minValidYear, }: DateDisplayProps): react_jsx_runtime.JSX.Element;
|
|
6218
6219
|
|
|
6219
6220
|
interface StatusBadgeProps {
|
|
6220
|
-
status: 'paid' | 'pending' | 'overdue' | 'cancelled' | 'success' | 'warning' | 'error' | 'info';
|
|
6221
|
+
status: 'paid' | 'pending' | 'overdue' | 'cancelled' | 'success' | 'warning' | 'caution' | 'error' | 'info';
|
|
6221
6222
|
label?: string;
|
|
6222
6223
|
size?: 'sm' | 'md' | 'lg';
|
|
6223
6224
|
showIcon?: boolean;
|
package/dist/index.esm.js
CHANGED
|
@@ -4885,6 +4885,7 @@ Stack.displayName = 'Stack';
|
|
|
4885
4885
|
* </Text>
|
|
4886
4886
|
*
|
|
4887
4887
|
* <Text color="warning">Warning message</Text>
|
|
4888
|
+
* <Text color="caution">Caution message (informational, not alarming)</Text>
|
|
4888
4889
|
*
|
|
4889
4890
|
* // With ref
|
|
4890
4891
|
* const textRef = useRef<HTMLParagraphElement>(null);
|
|
@@ -4939,6 +4940,7 @@ const Text = forwardRef(({ children, as: Component = 'p', size = 'base', smSize,
|
|
|
4939
4940
|
error: 'text-error-600',
|
|
4940
4941
|
success: 'text-success-600',
|
|
4941
4942
|
warning: 'text-warning-600',
|
|
4943
|
+
caution: 'text-warning-700',
|
|
4942
4944
|
};
|
|
4943
4945
|
const alignClasses = {
|
|
4944
4946
|
left: 'text-left',
|
|
@@ -5813,6 +5815,10 @@ function Alert({ variant = 'info', title, children, onClose, className = '', act
|
|
|
5813
5815
|
container: 'bg-warning-50 border-warning-200 text-warning-900',
|
|
5814
5816
|
icon: jsx(AlertTriangle, { className: "h-5 w-5 text-warning-600" }),
|
|
5815
5817
|
},
|
|
5818
|
+
caution: {
|
|
5819
|
+
container: 'bg-warning-100 border-warning-200 text-warning-800',
|
|
5820
|
+
icon: jsx(Info, { className: "h-5 w-5 text-warning-700" }),
|
|
5821
|
+
},
|
|
5816
5822
|
info: {
|
|
5817
5823
|
container: 'bg-primary-50 border-primary-200 text-primary-900',
|
|
5818
5824
|
icon: jsx(Info, { className: "h-5 w-5 text-primary-600" }),
|
|
@@ -5826,6 +5832,7 @@ function Alert({ variant = 'info', title, children, onClose, className = '', act
|
|
|
5826
5832
|
success: 'bg-success-600 text-white hover:bg-success-700',
|
|
5827
5833
|
error: 'bg-error-600 text-white hover:bg-error-700',
|
|
5828
5834
|
warning: 'bg-warning-600 text-white hover:bg-warning-700',
|
|
5835
|
+
caution: 'bg-warning-700 text-white hover:bg-warning-800',
|
|
5829
5836
|
info: 'bg-primary-600 text-white hover:bg-primary-700',
|
|
5830
5837
|
};
|
|
5831
5838
|
return `${base} ${variantClasses[variant]}`;
|
|
@@ -5835,6 +5842,7 @@ function Alert({ variant = 'info', title, children, onClose, className = '', act
|
|
|
5835
5842
|
success: 'bg-white border border-success-300 text-success-700 hover:bg-success-50',
|
|
5836
5843
|
error: 'bg-white border border-error-300 text-error-700 hover:bg-error-50',
|
|
5837
5844
|
warning: 'bg-white border border-warning-300 text-warning-700 hover:bg-warning-50',
|
|
5845
|
+
caution: 'bg-white border border-warning-300 text-warning-800 hover:bg-warning-50',
|
|
5838
5846
|
info: 'bg-white border border-primary-300 text-primary-700 hover:bg-primary-50',
|
|
5839
5847
|
};
|
|
5840
5848
|
return `${base} ${variantClasses[variant]}`;
|
|
@@ -9480,6 +9488,7 @@ function Badge({ children, variant = 'neutral', size = 'md', icon, onRemove, cla
|
|
|
9480
9488
|
success: 'bg-success-50 text-success-700 border-success-200',
|
|
9481
9489
|
warning: 'bg-warning-50 text-warning-700 border-warning-200',
|
|
9482
9490
|
error: 'bg-error-50 text-error-700 border-error-200',
|
|
9491
|
+
caution: 'bg-warning-100 text-warning-800 border-warning-200',
|
|
9483
9492
|
info: 'bg-primary-50 text-primary-700 border-primary-200',
|
|
9484
9493
|
neutral: 'bg-paper-100 text-ink-700 border-paper-300',
|
|
9485
9494
|
};
|
|
@@ -9487,6 +9496,7 @@ function Badge({ children, variant = 'neutral', size = 'md', icon, onRemove, cla
|
|
|
9487
9496
|
success: 'bg-success-500',
|
|
9488
9497
|
warning: 'bg-warning-500',
|
|
9489
9498
|
error: 'bg-error-500',
|
|
9499
|
+
caution: 'bg-warning-700',
|
|
9490
9500
|
info: 'bg-primary-500',
|
|
9491
9501
|
neutral: 'bg-ink-400',
|
|
9492
9502
|
};
|
|
@@ -59795,6 +59805,11 @@ const statusConfig = {
|
|
|
59795
59805
|
defaultLabel: 'Warning',
|
|
59796
59806
|
className: 'bg-warning-100 text-warning-800',
|
|
59797
59807
|
},
|
|
59808
|
+
caution: {
|
|
59809
|
+
icon: Info,
|
|
59810
|
+
defaultLabel: 'Caution',
|
|
59811
|
+
className: 'bg-warning-100 text-warning-700',
|
|
59812
|
+
},
|
|
59798
59813
|
overdue: {
|
|
59799
59814
|
icon: AlertCircle,
|
|
59800
59815
|
defaultLabel: 'Overdue',
|