@aurora-ds/components 1.1.1 → 1.1.3
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/cjs/index.js +21 -28
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +21 -28
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +11 -3
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -27,13 +27,12 @@ var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
|
27
27
|
function _extends$8() { return _extends$8 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$8.apply(null, arguments); }
|
|
28
28
|
const AlertErrorIcon = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
|
|
29
29
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30
|
-
width: 24,
|
|
31
|
-
height: 24,
|
|
32
30
|
fill: "none",
|
|
33
31
|
stroke: "currentColor",
|
|
34
32
|
strokeLinecap: "round",
|
|
35
33
|
strokeLinejoin: "round",
|
|
36
|
-
strokeWidth: 2
|
|
34
|
+
strokeWidth: 2,
|
|
35
|
+
viewBox: "0 0 24 24"
|
|
37
36
|
}, props), /*#__PURE__*/React__namespace.createElement("circle", {
|
|
38
37
|
cx: 12,
|
|
39
38
|
cy: 12,
|
|
@@ -45,13 +44,12 @@ const AlertErrorIcon = props => /*#__PURE__*/React__namespace.createElement("svg
|
|
|
45
44
|
function _extends$7() { return _extends$7 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$7.apply(null, arguments); }
|
|
46
45
|
const AlertInfoIcon = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
|
|
47
46
|
xmlns: "http://www.w3.org/2000/svg",
|
|
48
|
-
width: 24,
|
|
49
|
-
height: 24,
|
|
50
47
|
fill: "none",
|
|
51
48
|
stroke: "currentColor",
|
|
52
49
|
strokeLinecap: "round",
|
|
53
50
|
strokeLinejoin: "round",
|
|
54
|
-
strokeWidth: 2
|
|
51
|
+
strokeWidth: 2,
|
|
52
|
+
viewBox: "0 0 24 24"
|
|
55
53
|
}, props), /*#__PURE__*/React__namespace.createElement("circle", {
|
|
56
54
|
cx: 12,
|
|
57
55
|
cy: 12,
|
|
@@ -63,13 +61,12 @@ const AlertInfoIcon = props => /*#__PURE__*/React__namespace.createElement("svg"
|
|
|
63
61
|
function _extends$6() { return _extends$6 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$6.apply(null, arguments); }
|
|
64
62
|
const AlertSuccessIcon = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
|
|
65
63
|
xmlns: "http://www.w3.org/2000/svg",
|
|
66
|
-
width: 24,
|
|
67
|
-
height: 24,
|
|
68
64
|
fill: "none",
|
|
69
65
|
stroke: "currentColor",
|
|
70
66
|
strokeLinecap: "round",
|
|
71
67
|
strokeLinejoin: "round",
|
|
72
|
-
strokeWidth: 2
|
|
68
|
+
strokeWidth: 2,
|
|
69
|
+
viewBox: "0 0 24 24"
|
|
73
70
|
}, props), /*#__PURE__*/React__namespace.createElement("circle", {
|
|
74
71
|
cx: 12,
|
|
75
72
|
cy: 12,
|
|
@@ -81,13 +78,12 @@ const AlertSuccessIcon = props => /*#__PURE__*/React__namespace.createElement("s
|
|
|
81
78
|
function _extends$5() { return _extends$5 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$5.apply(null, arguments); }
|
|
82
79
|
const AlertWarningIcon = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
|
|
83
80
|
xmlns: "http://www.w3.org/2000/svg",
|
|
84
|
-
width: 24,
|
|
85
|
-
height: 24,
|
|
86
81
|
fill: "none",
|
|
87
82
|
stroke: "currentColor",
|
|
88
83
|
strokeLinecap: "round",
|
|
89
84
|
strokeLinejoin: "round",
|
|
90
|
-
strokeWidth: 2
|
|
85
|
+
strokeWidth: 2,
|
|
86
|
+
viewBox: "0 0 24 24"
|
|
91
87
|
}, props), /*#__PURE__*/React__namespace.createElement("path", {
|
|
92
88
|
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3M12 9v4M12 17h.01"
|
|
93
89
|
}));
|
|
@@ -95,14 +91,13 @@ const AlertWarningIcon = props => /*#__PURE__*/React__namespace.createElement("s
|
|
|
95
91
|
function _extends$4() { return _extends$4 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$4.apply(null, arguments); }
|
|
96
92
|
const ChevronDownIcon = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
|
|
97
93
|
xmlns: "http://www.w3.org/2000/svg",
|
|
98
|
-
width: 24,
|
|
99
|
-
height: 24,
|
|
100
94
|
fill: "none",
|
|
101
95
|
stroke: "currentColor",
|
|
102
96
|
strokeLinecap: "round",
|
|
103
97
|
strokeLinejoin: "round",
|
|
104
98
|
strokeWidth: 2,
|
|
105
|
-
className: "
|
|
99
|
+
className: "lucide lucide-chevron-down-icon lucide-chevron-down",
|
|
100
|
+
viewBox: "0 0 24 24"
|
|
106
101
|
}, props), /*#__PURE__*/React__namespace.createElement("path", {
|
|
107
102
|
d: "m6 9 6 6 6-6"
|
|
108
103
|
}));
|
|
@@ -124,14 +119,13 @@ const CloseIcon = props => /*#__PURE__*/React__namespace.createElement("svg", _e
|
|
|
124
119
|
function _extends$2() { return _extends$2 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$2.apply(null, arguments); }
|
|
125
120
|
const EyeIcon = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
|
|
126
121
|
xmlns: "http://www.w3.org/2000/svg",
|
|
127
|
-
width: 24,
|
|
128
|
-
height: 24,
|
|
129
122
|
fill: "none",
|
|
130
123
|
stroke: "currentColor",
|
|
131
124
|
strokeLinecap: "round",
|
|
132
125
|
strokeLinejoin: "round",
|
|
133
126
|
strokeWidth: 2,
|
|
134
|
-
className: "
|
|
127
|
+
className: "lucide lucide-eye-icon lucide-eye",
|
|
128
|
+
viewBox: "0 0 24 24"
|
|
135
129
|
}, props), /*#__PURE__*/React__namespace.createElement("path", {
|
|
136
130
|
d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"
|
|
137
131
|
}), /*#__PURE__*/React__namespace.createElement("circle", {
|
|
@@ -143,14 +137,13 @@ const EyeIcon = props => /*#__PURE__*/React__namespace.createElement("svg", _ext
|
|
|
143
137
|
function _extends$1() { return _extends$1 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$1.apply(null, arguments); }
|
|
144
138
|
const EyeSlashIcon = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
145
139
|
xmlns: "http://www.w3.org/2000/svg",
|
|
146
|
-
width: 24,
|
|
147
|
-
height: 24,
|
|
148
140
|
fill: "none",
|
|
149
141
|
stroke: "currentColor",
|
|
150
142
|
strokeLinecap: "round",
|
|
151
143
|
strokeLinejoin: "round",
|
|
152
144
|
strokeWidth: 2,
|
|
153
|
-
className: "
|
|
145
|
+
className: "lucide lucide-eye-off-icon lucide-eye-off",
|
|
146
|
+
viewBox: "0 0 24 24"
|
|
154
147
|
}, props), /*#__PURE__*/React__namespace.createElement("path", {
|
|
155
148
|
d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.8 10.8 0 0 1-1.444 2.49M14.084 14.158a3 3 0 0 1-4.242-4.242"
|
|
156
149
|
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -579,11 +572,11 @@ const ICON_SIZE$2 = {
|
|
|
579
572
|
/**
|
|
580
573
|
* Theme-aware button built on `createVariants`.
|
|
581
574
|
*
|
|
582
|
-
* @example <Button onClick={save}
|
|
583
|
-
* @example <Button variant='outlined' color='error' startIcon={IconRegistry.CloseIcon}
|
|
584
|
-
* @example <Button color='success' isLoading width='100%'
|
|
575
|
+
* @example <Button label='Save' onClick={save} />
|
|
576
|
+
* @example <Button label='Delete' variant='outlined' color='error' startIcon={IconRegistry.CloseIcon} />
|
|
577
|
+
* @example <Button label='Submitting…' color='success' isLoading width='100%' />
|
|
585
578
|
*/
|
|
586
|
-
const Button = ({ ref, variant = 'contained', color = 'primary', size = 'md', width, flexGrow, flexShrink, isLoading = false, startIcon: StartIcon, endIcon: EndIcon,
|
|
579
|
+
const Button = ({ ref, variant = 'contained', color = 'primary', size = 'md', width, flexGrow, flexShrink, isLoading = false, startIcon: StartIcon, endIcon: EndIcon, label, className, type = 'button', disabled, style, ...rest }) => {
|
|
587
580
|
const isDisabled = disabled || isLoading;
|
|
588
581
|
const iconSize = ICON_SIZE$2[size];
|
|
589
582
|
const rootClassName = BUTTON_VARIANTS({ variant, color, size }, className);
|
|
@@ -593,7 +586,7 @@ const Button = ({ ref, variant = 'contained', color = 'primary', size = 'md', wi
|
|
|
593
586
|
...(flexGrow !== undefined ? { flexGrow } : {}),
|
|
594
587
|
...(flexShrink !== undefined ? { flexShrink } : {}),
|
|
595
588
|
};
|
|
596
|
-
return (jsxRuntime.jsxs("button", { ref: ref, type: type, className: rootClassName, disabled: isDisabled, "aria-busy": isLoading || undefined, style: mergedStyle, ...rest, children: [isLoading && (jsxRuntime.jsx("span", { className: BUTTON_STYLES.spinnerWrap, children: jsxRuntime.jsx(Icon, { icon: SpinnerIcon, size: iconSize, className: BUTTON_STYLES.spinnerIcon }) })), jsxRuntime.jsxs("span", { className: theme.cx(BUTTON_STYLES.content, isLoading && BUTTON_STYLES.contentHidden), children: [StartIcon && (jsxRuntime.jsx(Icon, { icon: StartIcon, size: iconSize })),
|
|
589
|
+
return (jsxRuntime.jsxs("button", { ref: ref, type: type, className: rootClassName, disabled: isDisabled, "aria-busy": isLoading || undefined, style: mergedStyle, ...rest, children: [isLoading && (jsxRuntime.jsx("span", { className: BUTTON_STYLES.spinnerWrap, children: jsxRuntime.jsx(Icon, { icon: SpinnerIcon, size: iconSize, className: BUTTON_STYLES.spinnerIcon }) })), jsxRuntime.jsxs("span", { className: theme.cx(BUTTON_STYLES.content, isLoading && BUTTON_STYLES.contentHidden), children: [StartIcon && (jsxRuntime.jsx(Icon, { icon: StartIcon, size: iconSize })), label && (jsxRuntime.jsx(Text, { variant: 'span', fontSize: LABEL_FONT_SIZE$1[size], fontWeight: 'medium', lineHeight: 'none', children: label })), EndIcon && (jsxRuntime.jsx(Icon, { icon: EndIcon, size: iconSize }))] })] }));
|
|
597
590
|
};
|
|
598
591
|
Button.displayName = 'Button';
|
|
599
592
|
|
|
@@ -2309,8 +2302,8 @@ const CardBody = ({ children, py = 'md', px = 'md', }) => {
|
|
|
2309
2302
|
};
|
|
2310
2303
|
CardBody.displayName = 'Card.Body';
|
|
2311
2304
|
|
|
2312
|
-
const CardBase = ({ ref, variant = 'outlined', className, children, ...rest }) => {
|
|
2313
|
-
return (jsxRuntime.jsx(Box, { ref: ref, className: theme.cx(CARD_VARIANTS({ variant }), className), ...rest, children: children }));
|
|
2305
|
+
const CardBase = ({ ref, variant = 'outlined', padding = 'none', className, children, ...rest }) => {
|
|
2306
|
+
return (jsxRuntime.jsx(Box, { ref: ref, padding: padding, className: theme.cx(CARD_VARIANTS({ variant }), className), ...rest, children: children }));
|
|
2314
2307
|
};
|
|
2315
2308
|
CardBase.displayName = 'Card';
|
|
2316
2309
|
const Card = CardBase;
|