@designa8/vibedesign-linear-internal-v1-b737 0.7.0 → 0.8.0

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/styles.css CHANGED
@@ -24,6 +24,7 @@
24
24
  --radius-lg: 12px;
25
25
  --radius-xl: 16px;
26
26
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
27
+ --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
27
28
  --animate-spin: spin 1s linear infinite;
28
29
  --animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
29
30
  --aspect-video: 16 / 9;
@@ -310,6 +311,9 @@
310
311
  .sticky {
311
312
  position: sticky;
312
313
  }
314
+ .-inset-md {
315
+ inset: calc(var(--spacing-md) * -1);
316
+ }
313
317
  .inset-0 {
314
318
  inset: 0;
315
319
  }
@@ -887,6 +891,9 @@
887
891
  .max-w-48 {
888
892
  max-width: calc(var(--spacing) * 48);
889
893
  }
894
+ .max-w-drawer {
895
+ max-width: var(--container-drawer);
896
+ }
890
897
  .max-w-full {
891
898
  max-width: 100%;
892
899
  }
@@ -1621,6 +1628,9 @@
1621
1628
  .py-xs {
1622
1629
  padding-block: var(--spacing-xs);
1623
1630
  }
1631
+ .py-xxl {
1632
+ padding-block: var(--spacing-xxl);
1633
+ }
1624
1634
  .py-xxs {
1625
1635
  padding-block: var(--spacing-xxs);
1626
1636
  }
@@ -1869,6 +1879,9 @@
1869
1879
  .opacity-0 {
1870
1880
  opacity: 0%;
1871
1881
  }
1882
+ .opacity-30 {
1883
+ opacity: 30%;
1884
+ }
1872
1885
  .opacity-50 {
1873
1886
  opacity: 50%;
1874
1887
  }
@@ -1979,6 +1992,10 @@
1979
1992
  --tw-duration: 200ms;
1980
1993
  transition-duration: 200ms;
1981
1994
  }
1995
+ .ease-in-out {
1996
+ --tw-ease: var(--ease-in-out);
1997
+ transition-timing-function: var(--ease-in-out);
1998
+ }
1982
1999
  .ease-out {
1983
2000
  --tw-ease: var(--ease-out);
1984
2001
  transition-timing-function: var(--ease-out);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@designa8/vibedesign-linear-internal-v1-b737",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Complete design system \"My Project linear-internal-v1\" generated by Atoms Design.",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -189,6 +189,11 @@
189
189
  "kind": "Organism",
190
190
  "description": null
191
191
  },
192
+ {
193
+ "name": "DesignSystemLoader",
194
+ "kind": "Organism",
195
+ "description": null
196
+ },
192
197
  {
193
198
  "name": "Divider",
194
199
  "kind": "Atom",
@@ -0,0 +1,139 @@
1
+ import * as React from "react";
2
+ import { Icon } from "../Icon";
3
+
4
+ export interface DesignSystemLoaderProps
5
+ extends React.ComponentPropsWithoutRef<"div"> {
6
+ /** Primary status line announced to assistive tech. */
7
+ label?: string;
8
+ /** Secondary supporting line. */
9
+ sublabel?: string;
10
+ }
11
+
12
+ /** Cells per side of the loading grid. */
13
+ const GRID = 9;
14
+
15
+ /** Full sweep length for one cell, in milliseconds. */
16
+ const SWEEP_MS = 2400;
17
+ /** Delay added per step of diagonal distance from the top-right corner. */
18
+ const STEP_MS = 35;
19
+
20
+ interface Sparkle {
21
+ top: string;
22
+ left: string;
23
+ size: number;
24
+ delay: string;
25
+ }
26
+
27
+ /**
28
+ * Positions are percentages of the sparkle layer, which is inset past the grid
29
+ * on every side — so each glyph lands in the ring around the cells, never
30
+ * hidden beneath them.
31
+ */
32
+ const SPARKLES: readonly Sparkle[] = [
33
+ { top: "0%", left: "14%", size: 10, delay: "0ms" },
34
+ { top: "2%", left: "46%", size: 8, delay: "150ms" },
35
+ { top: "1%", left: "78%", size: 9, delay: "75ms" },
36
+ { top: "30%", left: "0%", size: 7, delay: "300ms" },
37
+ { top: "58%", left: "97%", size: 8, delay: "125ms" },
38
+ { top: "96%", left: "20%", size: 8, delay: "225ms" },
39
+ { top: "93%", left: "62%", size: 10, delay: "375ms" },
40
+ ];
41
+
42
+ const KEYFRAMES = `
43
+ @keyframes dsl-twinkle {
44
+ 0%, 100% { opacity: 0.2; transform: scale(0.85); }
45
+ 50% { opacity: 0.9; transform: scale(1.1); }
46
+ }
47
+ @keyframes dsl-cell {
48
+ 0% { background-color: var(--color-primary); border-color: transparent; border-style: solid; opacity: 1; }
49
+ 8% { background-color: var(--color-primary); border-color: transparent; border-style: solid; opacity: 0.8; }
50
+ 18% { background-color: var(--color-primary-soft); border-color: transparent; border-style: solid; opacity: 1; }
51
+ 30% { background-color: var(--color-primary-soft); border-color: transparent; border-style: solid; opacity: 0.55; }
52
+ 45% { background-color: var(--color-surface-soft); border-color: var(--color-hairline); border-style: solid; opacity: 1; }
53
+ 62% { background-color: transparent; border-color: var(--color-hairline-strong); border-style: dashed; opacity: 1; }
54
+ 82% { background-color: transparent; border-color: var(--color-hairline-strong); border-style: dashed; opacity: 1; }
55
+ 100% { background-color: var(--color-primary); border-color: transparent; border-style: solid; opacity: 1; }
56
+ }
57
+ @media (prefers-reduced-motion: reduce) {
58
+ .dsl-animate { animation: none !important; }
59
+ }
60
+ `;
61
+
62
+ export const DesignSystemLoader = React.forwardRef<
63
+ HTMLDivElement,
64
+ DesignSystemLoaderProps
65
+ >(
66
+ (
67
+ {
68
+ label = "Loading design system…",
69
+ sublabel = "Building your component library",
70
+ className,
71
+ ...rest
72
+ },
73
+ ref,
74
+ ) => (
75
+ <div
76
+ ref={ref}
77
+ role="status"
78
+ aria-live="polite"
79
+ aria-busy="true"
80
+ className={[
81
+ "mx-auto flex w-full max-w-3xl flex-col items-center justify-center gap-xl bg-canvas px-lg py-xxl text-center",
82
+ className,
83
+ ]
84
+ .filter(Boolean)
85
+ .join(" ")}
86
+ {...rest}
87
+ >
88
+ <style>{KEYFRAMES}</style>
89
+
90
+ <div className="relative mx-auto w-full max-w-drawer">
91
+ <div className="pointer-events-none absolute -inset-md" aria-hidden="true">
92
+ {SPARKLES.map((sparkle) => (
93
+ <Icon
94
+ key={`${sparkle.top}-${sparkle.left}`}
95
+ name="sparkles"
96
+ size={sparkle.size}
97
+ className="dsl-animate absolute text-primary opacity-30"
98
+ style={{
99
+ top: sparkle.top,
100
+ left: sparkle.left,
101
+ animation: `dsl-twinkle 1.6s ease-in-out ${sparkle.delay} infinite`,
102
+ }}
103
+ />
104
+ ))}
105
+ </div>
106
+
107
+ <div
108
+ className="relative grid gap-xxs"
109
+ aria-hidden="true"
110
+ style={{ gridTemplateColumns: `repeat(${GRID}, minmax(0, 1fr))` }}
111
+ >
112
+ {Array.from({ length: GRID * GRID }, (_, index) => {
113
+ const row = Math.floor(index / GRID);
114
+ const col = index % GRID;
115
+ const diagonal = row + (GRID - 1 - col);
116
+ return (
117
+ <span
118
+ key={index}
119
+ className="dsl-animate aspect-square rounded-xs border-2 border-transparent bg-primary"
120
+ style={{
121
+ animation: `dsl-cell ${SWEEP_MS}ms ease-in-out ${
122
+ diagonal * STEP_MS
123
+ }ms infinite both`,
124
+ }}
125
+ />
126
+ );
127
+ })}
128
+ </div>
129
+ </div>
130
+
131
+ <div className="mx-auto flex w-full max-w-drawer flex-col items-center gap-xs">
132
+ <p className="text-heading-sm text-ink">{label}</p>
133
+ <p className="text-body-sm text-muted">{sublabel}</p>
134
+ </div>
135
+ </div>
136
+ ),
137
+ );
138
+
139
+ DesignSystemLoader.displayName = "DesignSystemLoader";
@@ -0,0 +1,2 @@
1
+ export { DesignSystemLoader } from "./DesignSystemLoader";
2
+ export type { DesignSystemLoaderProps } from "./DesignSystemLoader";
@@ -0,0 +1,19 @@
1
+ import * as React from "react";
2
+ import { DesignSystemLoader } from "./DesignSystemLoader";
3
+
4
+ export default function DesignSystemLoaderPreview() {
5
+ return (
6
+ <div className="w-full max-w-3xl mx-auto p-lg space-y-xl bg-canvas">
7
+ <section className="rounded-lg border border-hairline bg-surface shadow-card overflow-hidden">
8
+ <DesignSystemLoader />
9
+ </section>
10
+
11
+ <section className="rounded-lg border border-hairline bg-surface shadow-card overflow-hidden">
12
+ <DesignSystemLoader
13
+ label="Opening workspace…"
14
+ sublabel="Restoring your last session"
15
+ />
16
+ </section>
17
+ </div>
18
+ );
19
+ }
package/src/index.ts CHANGED
@@ -31,6 +31,7 @@ export * from "./atoms/DataTableDesktop";
31
31
  export * from "./atoms/DataTableMobile";
32
32
  export * from "./atoms/DatePickerInput";
33
33
  export * from "./atoms/DateRangePicker";
34
+ export * from "./atoms/DesignSystemLoader";
34
35
  export * from "./atoms/Divider";
35
36
  export * from "./atoms/Drawer";
36
37
  export * from "./atoms/Dropdown";