@ews-admin/global-design-system 1.1.12 → 1.1.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ews-admin/global-design-system",
3
- "version": "1.1.12",
3
+ "version": "1.1.13",
4
4
  "description": "EWS Global Design System - Reusable components for EWS applications",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -6,7 +6,13 @@ export interface ButtonProps
6
6
  /**
7
7
  * Button variant
8
8
  */
9
- variant?: "primary" | "secondary" | "success" | "warning" | "error" | "ghost";
9
+ variant?:
10
+ | "ews-primary"
11
+ | "ews-secondary"
12
+ | "success"
13
+ | "warning"
14
+ | "error"
15
+ | "outline";
10
16
  /**
11
17
  * Button size
12
18
  */
@@ -33,7 +39,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
33
39
  (
34
40
  {
35
41
  className,
36
- variant = "primary",
42
+ variant = "ews-primary",
37
43
  size = "md",
38
44
  loading = false,
39
45
  fullWidth = false,
@@ -46,21 +52,17 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
46
52
  ref
47
53
  ) => {
48
54
  const baseStyles =
49
- "inline-flex items-center justify-center font-medium rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none";
55
+ "inline-flex items-center justify-center font-medium rounded-md transition-colors focus:outline-none disabled:opacity-50 disabled:pointer-events-none";
50
56
 
51
57
  const variants = {
52
- primary:
53
- "bg-ews-primary text-white hover:bg-ews-primary-hover focus:ring-ews-primary",
54
- secondary:
55
- "bg-ews-secondary text-white hover:bg-ews-secondary-hover focus:ring-ews-secondary",
56
- success:
57
- "bg-ews-success text-white hover:bg-ews-success-hover focus:ring-ews-success",
58
- warning:
59
- "bg-ews-warning text-white hover:bg-ews-warning-hover focus:ring-ews-warning",
60
- error:
61
- "bg-ews-error text-white hover:bg-ews-error-hover focus:ring-ews-error",
62
- ghost:
63
- "bg-transparent text-ews-gray-700 hover:bg-ews-gray-100 focus:ring-ews-gray-500",
58
+ "ews-primary": "bg-ews-primary text-white hover:bg-ews-primary-hover",
59
+ "ews-secondary":
60
+ "bg-ews-secondary text-white hover:bg-ews-secondary-hover",
61
+ success: "bg-ews-success text-white hover:bg-ews-success-hover",
62
+ warning: "bg-ews-warning text-white hover:bg-ews-warning-hover",
63
+ error: "bg-ews-error text-white hover:bg-ews-error-hover",
64
+ outline:
65
+ "bg-transparent text-sm font-medium text-ews-primary hover:text-ews-primary/80",
64
66
  };
65
67
 
66
68
  const sizes = {
@@ -90,7 +92,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
90
92
  >
91
93
  {loading && (
92
94
  <svg
93
- className="animate-spin -ml-1 mr-2 h-4 w-4"
95
+ className="mr-2 -ml-1 w-4 h-4 animate-spin"
94
96
  xmlns="http://www.w3.org/2000/svg"
95
97
  fill="none"
96
98
  viewBox="0 0 24 24"
@@ -111,13 +113,13 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
111
113
  </svg>
112
114
  )}
113
115
  {!loading && leftIcon && (
114
- <span className={cn("mr-2 flex items-center", iconSizes[size])}>
116
+ <span className={cn("flex items-center mr-2", iconSizes[size])}>
115
117
  {leftIcon}
116
118
  </span>
117
119
  )}
118
120
  {children}
119
121
  {!loading && rightIcon && (
120
- <span className={cn("ml-2 flex items-center", iconSizes[size])}>
122
+ <span className={cn("flex items-center ml-2", iconSizes[size])}>
121
123
  {rightIcon}
122
124
  </span>
123
125
  )}
@@ -231,7 +231,7 @@ const Modal = ({
231
231
  <div className="flex justify-end items-center p-6 pt-0 space-x-3">
232
232
  {secondaryAction && (
233
233
  <Button
234
- variant="ghost"
234
+ variant="outline"
235
235
  onClick={onSecondaryAction || onClose}
236
236
  disabled={isLoading}
237
237
  >
@@ -240,7 +240,7 @@ const Modal = ({
240
240
  )}
241
241
  {primaryAction && (
242
242
  <Button
243
- variant={variant === "error" ? "error" : "primary"}
243
+ variant={variant === "error" ? "error" : "ews-primary"}
244
244
  onClick={onPrimaryAction}
245
245
  loading={isLoading}
246
246
  >