@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/esm/index.js CHANGED
@@ -7,13 +7,12 @@ import { createPortal } from 'react-dom';
7
7
  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); }
8
8
  const AlertErrorIcon = props => /*#__PURE__*/React.createElement("svg", _extends$8({
9
9
  xmlns: "http://www.w3.org/2000/svg",
10
- width: 24,
11
- height: 24,
12
10
  fill: "none",
13
11
  stroke: "currentColor",
14
12
  strokeLinecap: "round",
15
13
  strokeLinejoin: "round",
16
- strokeWidth: 2
14
+ strokeWidth: 2,
15
+ viewBox: "0 0 24 24"
17
16
  }, props), /*#__PURE__*/React.createElement("circle", {
18
17
  cx: 12,
19
18
  cy: 12,
@@ -25,13 +24,12 @@ const AlertErrorIcon = props => /*#__PURE__*/React.createElement("svg", _extends
25
24
  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); }
26
25
  const AlertInfoIcon = props => /*#__PURE__*/React.createElement("svg", _extends$7({
27
26
  xmlns: "http://www.w3.org/2000/svg",
28
- width: 24,
29
- height: 24,
30
27
  fill: "none",
31
28
  stroke: "currentColor",
32
29
  strokeLinecap: "round",
33
30
  strokeLinejoin: "round",
34
- strokeWidth: 2
31
+ strokeWidth: 2,
32
+ viewBox: "0 0 24 24"
35
33
  }, props), /*#__PURE__*/React.createElement("circle", {
36
34
  cx: 12,
37
35
  cy: 12,
@@ -43,13 +41,12 @@ const AlertInfoIcon = props => /*#__PURE__*/React.createElement("svg", _extends$
43
41
  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); }
44
42
  const AlertSuccessIcon = props => /*#__PURE__*/React.createElement("svg", _extends$6({
45
43
  xmlns: "http://www.w3.org/2000/svg",
46
- width: 24,
47
- height: 24,
48
44
  fill: "none",
49
45
  stroke: "currentColor",
50
46
  strokeLinecap: "round",
51
47
  strokeLinejoin: "round",
52
- strokeWidth: 2
48
+ strokeWidth: 2,
49
+ viewBox: "0 0 24 24"
53
50
  }, props), /*#__PURE__*/React.createElement("circle", {
54
51
  cx: 12,
55
52
  cy: 12,
@@ -61,13 +58,12 @@ const AlertSuccessIcon = props => /*#__PURE__*/React.createElement("svg", _exten
61
58
  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); }
62
59
  const AlertWarningIcon = props => /*#__PURE__*/React.createElement("svg", _extends$5({
63
60
  xmlns: "http://www.w3.org/2000/svg",
64
- width: 24,
65
- height: 24,
66
61
  fill: "none",
67
62
  stroke: "currentColor",
68
63
  strokeLinecap: "round",
69
64
  strokeLinejoin: "round",
70
- strokeWidth: 2
65
+ strokeWidth: 2,
66
+ viewBox: "0 0 24 24"
71
67
  }, props), /*#__PURE__*/React.createElement("path", {
72
68
  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"
73
69
  }));
@@ -75,14 +71,13 @@ const AlertWarningIcon = props => /*#__PURE__*/React.createElement("svg", _exten
75
71
  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); }
76
72
  const ChevronDownIcon = props => /*#__PURE__*/React.createElement("svg", _extends$4({
77
73
  xmlns: "http://www.w3.org/2000/svg",
78
- width: 24,
79
- height: 24,
80
74
  fill: "none",
81
75
  stroke: "currentColor",
82
76
  strokeLinecap: "round",
83
77
  strokeLinejoin: "round",
84
78
  strokeWidth: 2,
85
- className: "prefix__lucide prefix__lucide-chevron-down-icon prefix__lucide-chevron-down"
79
+ className: "lucide lucide-chevron-down-icon lucide-chevron-down",
80
+ viewBox: "0 0 24 24"
86
81
  }, props), /*#__PURE__*/React.createElement("path", {
87
82
  d: "m6 9 6 6 6-6"
88
83
  }));
@@ -104,14 +99,13 @@ const CloseIcon = props => /*#__PURE__*/React.createElement("svg", _extends$3({
104
99
  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); }
105
100
  const EyeIcon = props => /*#__PURE__*/React.createElement("svg", _extends$2({
106
101
  xmlns: "http://www.w3.org/2000/svg",
107
- width: 24,
108
- height: 24,
109
102
  fill: "none",
110
103
  stroke: "currentColor",
111
104
  strokeLinecap: "round",
112
105
  strokeLinejoin: "round",
113
106
  strokeWidth: 2,
114
- className: "prefix__lucide prefix__lucide-eye-icon prefix__lucide-eye"
107
+ className: "lucide lucide-eye-icon lucide-eye",
108
+ viewBox: "0 0 24 24"
115
109
  }, props), /*#__PURE__*/React.createElement("path", {
116
110
  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"
117
111
  }), /*#__PURE__*/React.createElement("circle", {
@@ -123,14 +117,13 @@ const EyeIcon = props => /*#__PURE__*/React.createElement("svg", _extends$2({
123
117
  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); }
124
118
  const EyeSlashIcon = props => /*#__PURE__*/React.createElement("svg", _extends$1({
125
119
  xmlns: "http://www.w3.org/2000/svg",
126
- width: 24,
127
- height: 24,
128
120
  fill: "none",
129
121
  stroke: "currentColor",
130
122
  strokeLinecap: "round",
131
123
  strokeLinejoin: "round",
132
124
  strokeWidth: 2,
133
- className: "prefix__lucide prefix__lucide-eye-off-icon prefix__lucide-eye-off"
125
+ className: "lucide lucide-eye-off-icon lucide-eye-off",
126
+ viewBox: "0 0 24 24"
134
127
  }, props), /*#__PURE__*/React.createElement("path", {
135
128
  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"
136
129
  }), /*#__PURE__*/React.createElement("path", {
@@ -559,11 +552,11 @@ const ICON_SIZE$2 = {
559
552
  /**
560
553
  * Theme-aware button built on `createVariants`.
561
554
  *
562
- * @example <Button onClick={save}>Save</Button>
563
- * @example <Button variant='outlined' color='error' startIcon={IconRegistry.CloseIcon}>Delete</Button>
564
- * @example <Button color='success' isLoading width='100%'>Submitting…</Button>
555
+ * @example <Button label='Save' onClick={save} />
556
+ * @example <Button label='Delete' variant='outlined' color='error' startIcon={IconRegistry.CloseIcon} />
557
+ * @example <Button label='Submitting…' color='success' isLoading width='100%' />
565
558
  */
566
- const Button = ({ ref, variant = 'contained', color = 'primary', size = 'md', width, flexGrow, flexShrink, isLoading = false, startIcon: StartIcon, endIcon: EndIcon, children, className, type = 'button', disabled, style, ...rest }) => {
559
+ 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 }) => {
567
560
  const isDisabled = disabled || isLoading;
568
561
  const iconSize = ICON_SIZE$2[size];
569
562
  const rootClassName = BUTTON_VARIANTS({ variant, color, size }, className);
@@ -573,7 +566,7 @@ const Button = ({ ref, variant = 'contained', color = 'primary', size = 'md', wi
573
566
  ...(flexGrow !== undefined ? { flexGrow } : {}),
574
567
  ...(flexShrink !== undefined ? { flexShrink } : {}),
575
568
  };
576
- return (jsxs("button", { ref: ref, type: type, className: rootClassName, disabled: isDisabled, "aria-busy": isLoading || undefined, style: mergedStyle, ...rest, children: [isLoading && (jsx("span", { className: BUTTON_STYLES.spinnerWrap, children: jsx(Icon, { icon: SpinnerIcon, size: iconSize, className: BUTTON_STYLES.spinnerIcon }) })), jsxs("span", { className: cx(BUTTON_STYLES.content, isLoading && BUTTON_STYLES.contentHidden), children: [StartIcon && (jsx(Icon, { icon: StartIcon, size: iconSize })), children !== undefined && children !== null && (jsx(Text, { variant: 'span', fontSize: LABEL_FONT_SIZE$1[size], fontWeight: 'medium', lineHeight: 'none', children: children })), EndIcon && (jsx(Icon, { icon: EndIcon, size: iconSize }))] })] }));
569
+ return (jsxs("button", { ref: ref, type: type, className: rootClassName, disabled: isDisabled, "aria-busy": isLoading || undefined, style: mergedStyle, ...rest, children: [isLoading && (jsx("span", { className: BUTTON_STYLES.spinnerWrap, children: jsx(Icon, { icon: SpinnerIcon, size: iconSize, className: BUTTON_STYLES.spinnerIcon }) })), jsxs("span", { className: cx(BUTTON_STYLES.content, isLoading && BUTTON_STYLES.contentHidden), children: [StartIcon && (jsx(Icon, { icon: StartIcon, size: iconSize })), label && (jsx(Text, { variant: 'span', fontSize: LABEL_FONT_SIZE$1[size], fontWeight: 'medium', lineHeight: 'none', children: label })), EndIcon && (jsx(Icon, { icon: EndIcon, size: iconSize }))] })] }));
577
570
  };
578
571
  Button.displayName = 'Button';
579
572
 
@@ -2289,8 +2282,8 @@ const CardBody = ({ children, py = 'md', px = 'md', }) => {
2289
2282
  };
2290
2283
  CardBody.displayName = 'Card.Body';
2291
2284
 
2292
- const CardBase = ({ ref, variant = 'outlined', className, children, ...rest }) => {
2293
- return (jsx(Box, { ref: ref, className: cx(CARD_VARIANTS({ variant }), className), ...rest, children: children }));
2285
+ const CardBase = ({ ref, variant = 'outlined', padding = 'none', className, children, ...rest }) => {
2286
+ return (jsx(Box, { ref: ref, padding: padding, className: cx(CARD_VARIANTS({ variant }), className), ...rest, children: children }));
2294
2287
  };
2295
2288
  CardBase.displayName = 'Card';
2296
2289
  const Card = CardBase;