@gyramais/gyra-design 0.2.32 → 0.2.33

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.
@@ -11,7 +11,15 @@ type SyncChipProps = {
11
11
  errorTooltip?: string;
12
12
  /** Optional override for the tooltip when verified is false. */
13
13
  notVerifiedTooltip?: string;
14
+ /** When in error state and provided, renders a compact retry action to
15
+ the LEFT of the chip. Keeps the retry paired with its sync-status,
16
+ consistently across every usage. */
17
+ onRetry?: () => void;
18
+ /** Label for the retry action. */
19
+ retryLabel?: string;
20
+ /** Disables the retry action (e.g. while a retry is already in flight). */
21
+ retryDisabled?: boolean;
14
22
  };
15
- declare const SyncChip: ({ id, className, loading, date, error, verified, errorTooltip, notVerifiedTooltip, }: SyncChipProps) => React.JSX.Element;
23
+ declare const SyncChip: ({ id, className, loading, date, error, verified, errorTooltip, notVerifiedTooltip, onRetry, retryLabel, retryDisabled, }: SyncChipProps) => React.JSX.Element;
16
24
  export { SyncChip };
17
25
  export type { SyncChipProps };
@@ -11,7 +11,15 @@ type SyncChipProps = {
11
11
  errorTooltip?: string;
12
12
  /** Optional override for the tooltip when verified is false. */
13
13
  notVerifiedTooltip?: string;
14
+ /** When in error state and provided, renders a compact retry action to
15
+ the LEFT of the chip. Keeps the retry paired with its sync-status,
16
+ consistently across every usage. */
17
+ onRetry?: () => void;
18
+ /** Label for the retry action. */
19
+ retryLabel?: string;
20
+ /** Disables the retry action (e.g. while a retry is already in flight). */
21
+ retryDisabled?: boolean;
14
22
  };
15
- declare const SyncChip: ({ id, className, loading, date, error, verified, errorTooltip, notVerifiedTooltip, }: SyncChipProps) => React.JSX.Element;
23
+ declare const SyncChip: ({ id, className, loading, date, error, verified, errorTooltip, notVerifiedTooltip, onRetry, retryLabel, retryDisabled, }: SyncChipProps) => React.JSX.Element;
16
24
  export { SyncChip };
17
25
  export type { SyncChipProps };
package/dist/index.css CHANGED
@@ -10046,6 +10046,58 @@ h6 {
10046
10046
  }
10047
10047
  }
10048
10048
 
10049
+ /* Retry action paired with the chip — sits to the LEFT of the pill,
10050
+ styled as a matching pill-button, so the retry stays visually tied to
10051
+ the sync-status it refers to. */
10052
+ .gyramais-sync-chip-wrap {
10053
+ display: inline-flex;
10054
+ width: -moz-fit-content;
10055
+ width: fit-content;
10056
+ align-items: center;
10057
+ gap: 8px;
10058
+ }
10059
+ .gyramais-sync-chip-retry {
10060
+ display: inline-flex;
10061
+ height: 28px;
10062
+ width: 28px;
10063
+ flex-shrink: 0;
10064
+ cursor: pointer;
10065
+ align-items: center;
10066
+ justify-content: center;
10067
+ border-radius: 9999px;
10068
+ border-width: 1px;
10069
+ border-color: var(--color-border-secondary);
10070
+ background-color: var(--color-surface-secondary);
10071
+ padding: 0px;
10072
+ color: var(--color-text-secondary);
10073
+ transition: background 150ms ease, color 150ms ease,
10074
+ border-color 150ms ease;
10075
+ }
10076
+ .gyramais-sync-chip-retry:hover {
10077
+ border-color: rgba(255,59,48,0.18);
10078
+ background-color: rgba(255,59,48,0.08);
10079
+ color: var(--status-danger-text);
10080
+ }
10081
+ .gyramais-sync-chip-retry:disabled {
10082
+ cursor: default;
10083
+ border-color: rgba(255,59,48,0.18);
10084
+ color: var(--status-danger-text);
10085
+ }
10086
+ .gyramais-sync-chip-retry .gyramais-sync-chip-retry-icon {
10087
+ height: 16px;
10088
+ width: 16px;
10089
+ font-size: 16px;
10090
+ }
10091
+ .gyramais-sync-chip-retry
10092
+ .gyramais-sync-chip-retry-icon.gyramais-sync-chip-retry-icon--spinning {
10093
+ animation: gyramais-sync-chip-spin 0.9s linear infinite;
10094
+ }
10095
+ @keyframes gyramais-sync-chip-spin {
10096
+ to {
10097
+ transform: rotate(360deg);
10098
+ }
10099
+ }
10100
+
10049
10101
  .gyramais-table-container {
10050
10102
  width: 100%;
10051
10103
  overflow-y: auto;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gyramais/gyra-design",
3
- "version": "0.2.32",
3
+ "version": "0.2.33",
4
4
  "description": "Gyramais Design System",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",