@gyramais/gyra-design 0.2.41 → 0.2.42

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.
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ import "./index.css";
3
+ type SkeletonVariant = "text" | "rect" | "circle";
4
+ type SkeletonProps = {
5
+ id?: string;
6
+ className?: string;
7
+ /** Formato do bloco. `text` = linha fina; `rect` = bloco; `circle` = avatar. */
8
+ variant?: SkeletonVariant;
9
+ width?: number | string;
10
+ height?: number | string;
11
+ /** Quando > 1 (variant text), empilha N linhas; a ultima sai mais curta. */
12
+ lines?: number;
13
+ /** Override do border-radius. */
14
+ radius?: number | string;
15
+ };
16
+ declare const Skeleton: ({ id, className, variant, width, height, lines, radius, }: SkeletonProps) => React.JSX.Element;
17
+ export { Skeleton };
18
+ export type { SkeletonProps };
@@ -0,0 +1 @@
1
+ export * from "./Skeleton";
@@ -50,6 +50,7 @@ import "./components/MultiSelectPicker/index.css";
50
50
  import "./components/RuleSearchPicker/index.css";
51
51
  import "./components/OperatorPicker/index.css";
52
52
  import "./components/ContextMenu/index.css";
53
+ import "./components/Skeleton/index.css";
53
54
  import "./components/StatusTag/index.css";
54
55
  import "./components/Switch/index.css";
55
56
  import "./components/SyncChip/index.css";
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ import "./index.css";
3
+ type SkeletonVariant = "text" | "rect" | "circle";
4
+ type SkeletonProps = {
5
+ id?: string;
6
+ className?: string;
7
+ /** Formato do bloco. `text` = linha fina; `rect` = bloco; `circle` = avatar. */
8
+ variant?: SkeletonVariant;
9
+ width?: number | string;
10
+ height?: number | string;
11
+ /** Quando > 1 (variant text), empilha N linhas; a ultima sai mais curta. */
12
+ lines?: number;
13
+ /** Override do border-radius. */
14
+ radius?: number | string;
15
+ };
16
+ declare const Skeleton: ({ id, className, variant, width, height, lines, radius, }: SkeletonProps) => React.JSX.Element;
17
+ export { Skeleton };
18
+ export type { SkeletonProps };
@@ -0,0 +1 @@
1
+ export * from "./Skeleton";
@@ -50,6 +50,7 @@ import "./components/MultiSelectPicker/index.css";
50
50
  import "./components/RuleSearchPicker/index.css";
51
51
  import "./components/OperatorPicker/index.css";
52
52
  import "./components/ContextMenu/index.css";
53
+ import "./components/Skeleton/index.css";
53
54
  import "./components/StatusTag/index.css";
54
55
  import "./components/Switch/index.css";
55
56
  import "./components/SyncChip/index.css";
package/dist/index.css CHANGED
@@ -9851,6 +9851,72 @@ h6 {
9851
9851
  height: 16px;
9852
9852
  }
9853
9853
 
9854
+ /* Skeleton shimmer — silhueta cinza do conteudo que carrega */
9855
+
9856
+ .gyramais-skeleton {
9857
+ position: relative;
9858
+ display: block;
9859
+ overflow: hidden;
9860
+ background-color: var(--color-border-subtle);
9861
+ border-radius: 6px;
9862
+ }
9863
+ .gyramais-skeleton::after {
9864
+ position: absolute;
9865
+ inset: 0px;
9866
+ --tw-content: '';
9867
+ content: var(--tw-content);
9868
+ transform: translateX(-100%);
9869
+ background: linear-gradient(
9870
+ 90deg,
9871
+ transparent,
9872
+ rgba(255, 255, 255, 0.55),
9873
+ transparent
9874
+ );
9875
+ animation: gyramais-skeleton-sweep 1.4s ease-in-out infinite;
9876
+ }
9877
+ .gyramais-skeleton-text {
9878
+ height: 12px;
9879
+ width: 100%;
9880
+ }
9881
+ .gyramais-skeleton-rect {
9882
+ height: 64px;
9883
+ width: 100%;
9884
+ }
9885
+ .gyramais-skeleton-circle {
9886
+ border-radius: 9999px;
9887
+ }
9888
+ .gyramais-skeleton-stack {
9889
+ display: flex;
9890
+ width: 100%;
9891
+ flex-direction: column;
9892
+ gap: 8px;
9893
+ }
9894
+
9895
+ @keyframes gyramais-skeleton-sweep {
9896
+ 100% {
9897
+ transform: translateX(100%);
9898
+ }
9899
+ }
9900
+
9901
+ /* Sem movimento deslizante pra quem pediu menos animacao: pulso de opacidade */
9902
+ @media (prefers-reduced-motion: reduce) {
9903
+ .gyramais-skeleton::after {
9904
+ animation: none;
9905
+ }
9906
+ .gyramais-skeleton {
9907
+ animation: gyramais-skeleton-pulse 1.6s ease-in-out infinite;
9908
+ }
9909
+ }
9910
+ @keyframes gyramais-skeleton-pulse {
9911
+ 0%,
9912
+ 100% {
9913
+ opacity: 1;
9914
+ }
9915
+ 50% {
9916
+ opacity: 0.55;
9917
+ }
9918
+ }
9919
+
9854
9920
  .gyramais-status-tag {
9855
9921
 
9856
9922
  display: inline-flex;
@@ -9991,23 +10057,27 @@ h6 {
9991
10057
  color: var(--color-text-primary);
9992
10058
  font-feature-settings: "tnum";
9993
10059
  }
9994
- .gyramais-sync-chip .gyramais-sync-chip-loading {
9995
- position: relative;
9996
- height: 4px;
9997
- width: 64px;
9998
- overflow: hidden;
9999
- border-radius: 2px;
10000
- background-color: var(--color-border-subtle);
10060
+ /* "Sincronizando" — 3 pontos com pulso escalonado (estilo Apple), no lugar
10061
+ da barra deslizante. Cada ponto anima scale+opacity com delay crescente,
10062
+ dando a onda da esquerda pra direita. Sem framer-motion: keyframes CSS. */
10063
+ .gyramais-sync-chip .gyramais-sync-chip-dots {
10064
+ display: inline-flex;
10065
+ align-items: center;
10066
+ gap: 4px;
10001
10067
  }
10002
- .gyramais-sync-chip .gyramais-sync-chip-loading::after {
10003
- position: absolute;
10004
- height: 100%;
10005
- width: 32px;
10006
- border-radius: 2px;
10007
- background-color: var(--gyra-blue);
10008
- --tw-content: '';
10009
- content: var(--tw-content);
10010
- animation: gyramais-sync-chip-bar 1.6s ease-in-out infinite;
10068
+ .gyramais-sync-chip .gyramais-sync-chip-dots-dot {
10069
+ height: 5px;
10070
+ width: 5px;
10071
+ flex-shrink: 0;
10072
+ border-radius: 9999px;
10073
+ background-color: var(--color-text-tertiary);
10074
+ animation: gyramais-sync-chip-pulse 1.2s ease-in-out infinite;
10075
+ }
10076
+ .gyramais-sync-chip .gyramais-sync-chip-dots-dot:nth-child(2) {
10077
+ animation-delay: 0.15s;
10078
+ }
10079
+ .gyramais-sync-chip .gyramais-sync-chip-dots-dot:nth-child(3) {
10080
+ animation-delay: 0.3s;
10011
10081
  }
10012
10082
 
10013
10083
  .gyramais-sync-chip.gyramais-sync-chip-error {
@@ -10036,15 +10106,15 @@ h6 {
10036
10106
  background-color: var(--status-danger-text);
10037
10107
  }
10038
10108
 
10039
- @keyframes gyramais-sync-chip-bar {
10040
- 0% {
10041
- transform: translateX(-32px);
10109
+ @keyframes gyramais-sync-chip-pulse {
10110
+ 0%,
10111
+ 100% {
10112
+ transform: scale(0.5);
10113
+ opacity: 0.3;
10042
10114
  }
10043
10115
  50% {
10044
- transform: translateX(64px);
10045
- }
10046
- 100% {
10047
- transform: translateX(-32px);
10116
+ transform: scale(1);
10117
+ opacity: 1;
10048
10118
  }
10049
10119
  }
10050
10120
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gyramais/gyra-design",
3
- "version": "0.2.41",
3
+ "version": "0.2.42",
4
4
  "description": "Gyramais Design System",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",