@appcorp/app-corp-vista 0.1.20 → 0.1.21

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.
@@ -31,10 +31,11 @@ var vistaButtonRoundedMap = (_c = {},
31
31
  _c[vista_button_type_1.VISTA_BUTTON_ROUNDED.FULL] = 'rounded-full',
32
32
  _c);
33
33
  var VistaButtonV1 = function (_a) {
34
- var _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, handleOnClick = _a.handleOnClick, icon = _a.icon, label = _a.label, prefixIcon = _a.prefixIcon, _d = _a.rounded, rounded = _d === void 0 ? vista_button_type_1.VISTA_BUTTON_ROUNDED.MD : _d, _e = _a.size, size = _e === void 0 ? vista_button_type_1.VISTA_BUTTON_SIZE.SM : _e, suffixIcon = _a.suffixIcon, _f = _a.variant, variant = _f === void 0 ? vista_button_type_1.VISTA_BUTTON_VARIANT.PRIMARY : _f;
34
+ var _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, handleOnClick = _a.handleOnClick, icon = _a.icon, label = _a.label, prefixIcon = _a.prefixIcon, _d = _a.rounded, rounded = _d === void 0 ? vista_button_type_1.VISTA_BUTTON_ROUNDED.MD : _d, _e = _a.size, size = _e === void 0 ? vista_button_type_1.VISTA_BUTTON_SIZE.SM : _e, suffixIcon = _a.suffixIcon, _f = _a.variant, variant = _f === void 0 ? vista_button_type_1.VISTA_BUTTON_VARIANT.PRIMARY : _f, _g = _a.loading, loading = _g === void 0 ? false : _g;
35
35
  return (react_1.default.createElement("button", { className: "flex flex-row justify-center items-center font-semibold shadow-sm focus-visible:outline focus-visible:outline-offset-2 disabled:bg-gray-200 disabled:text-gray-400 ".concat(className, " ").concat(vistaButtonVariantMap[variant], " ").concat(vistaButtonRoundedMap[rounded], " ").concat(vistaButtonSizeMap[size]), onClick: handleOnClick, disabled: disabled, type: "button" },
36
36
  react_1.default.createElement("div", { className: 'flex flex-row justify-center items-center gap-2' },
37
37
  react_1.default.createElement(react_1.default.Fragment, null, variant !== vista_button_type_1.VISTA_BUTTON_VARIANT.ICON && prefixIcon && prefixIcon),
38
+ loading && react_1.default.createElement("div", { className: "border-gray-300 h-4 w-4 animate-spin rounded-full border-1 border-t-gray-500" }),
38
39
  react_1.default.createElement(react_1.default.Fragment, null,
39
40
  variant !== vista_button_type_1.VISTA_BUTTON_VARIANT.ICON && label,
40
41
  variant === vista_button_type_1.VISTA_BUTTON_VARIANT.ICON && icon),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/app-corp-vista",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "scripts": {
5
5
  "build": "yarn clean && yarn build:ts && cp package.json lib && cp README.md lib",
6
6
  "build:next": "next build",
@@ -27,6 +27,7 @@ export interface VistaButtonV1Props {
27
27
  handleOnClick: (e: MouseEvent<HTMLButtonElement>) => void;
28
28
  icon?: ReactNode;
29
29
  label?: string;
30
+ loading?: boolean;
30
31
  prefixIcon?: ReactNode;
31
32
  rounded?: VISTA_BUTTON_ROUNDED;
32
33
  size?: VISTA_BUTTON_SIZE;