@cloudgrid-io/ui 0.64.0 → 0.65.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/blocks/add-tile.d.ts +16 -1
- package/dist/blocks/add-tile.d.ts.map +1 -1
- package/dist/blocks/add-tile.js +20 -3
- package/dist/blocks/add-tile.js.map +1 -1
- package/dist/blocks/bento-card-hint.d.ts +16 -0
- package/dist/blocks/bento-card-hint.d.ts.map +1 -0
- package/dist/blocks/bento-card-hint.js +23 -0
- package/dist/blocks/bento-card-hint.js.map +1 -0
- package/dist/blocks/bento-card.d.ts +59 -0
- package/dist/blocks/bento-card.d.ts.map +1 -0
- package/dist/blocks/bento-card.js +59 -0
- package/dist/blocks/bento-card.js.map +1 -0
- package/dist/blocks/coming-soon-hint.d.ts.map +1 -1
- package/dist/blocks/coming-soon-hint.js +110 -7
- package/dist/blocks/coming-soon-hint.js.map +1 -1
- package/dist/blocks/creation-search.d.ts +147 -0
- package/dist/blocks/creation-search.d.ts.map +1 -0
- package/dist/blocks/creation-search.js +239 -0
- package/dist/blocks/creation-search.js.map +1 -0
- package/dist/blocks/entity-card.d.ts +80 -2
- package/dist/blocks/entity-card.d.ts.map +1 -1
- package/dist/blocks/entity-card.js +162 -17
- package/dist/blocks/entity-card.js.map +1 -1
- package/dist/blocks/from-your-grid.d.ts +66 -0
- package/dist/blocks/from-your-grid.d.ts.map +1 -0
- package/dist/blocks/from-your-grid.js +63 -0
- package/dist/blocks/from-your-grid.js.map +1 -0
- package/dist/blocks/grid-profile.d.ts +10 -1
- package/dist/blocks/grid-profile.d.ts.map +1 -1
- package/dist/blocks/grid-profile.js +57 -6
- package/dist/blocks/grid-profile.js.map +1 -1
- package/dist/blocks/home-bento.d.ts +86 -0
- package/dist/blocks/home-bento.d.ts.map +1 -0
- package/dist/blocks/home-bento.js +87 -0
- package/dist/blocks/home-bento.js.map +1 -0
- package/dist/blocks/home-empty-illustrations.d.ts +37 -0
- package/dist/blocks/home-empty-illustrations.d.ts.map +1 -0
- package/dist/blocks/home-empty-illustrations.js +47 -0
- package/dist/blocks/home-empty-illustrations.js.map +1 -0
- package/dist/blocks/home-pinned.d.ts +120 -0
- package/dist/blocks/home-pinned.d.ts.map +1 -0
- package/dist/blocks/home-pinned.js +58 -0
- package/dist/blocks/home-pinned.js.map +1 -0
- package/dist/blocks/icons.d.ts +33 -0
- package/dist/blocks/icons.d.ts.map +1 -1
- package/dist/blocks/icons.js +33 -0
- package/dist/blocks/icons.js.map +1 -1
- package/dist/blocks/inspiration-cards.d.ts +241 -0
- package/dist/blocks/inspiration-cards.d.ts.map +1 -0
- package/dist/blocks/inspiration-cards.js +234 -0
- package/dist/blocks/inspiration-cards.js.map +1 -0
- package/dist/blocks/liquid-glass.d.ts +106 -0
- package/dist/blocks/liquid-glass.d.ts.map +1 -0
- package/dist/blocks/liquid-glass.js +283 -0
- package/dist/blocks/liquid-glass.js.map +1 -0
- package/dist/blocks/meter.d.ts +5 -2
- package/dist/blocks/meter.d.ts.map +1 -1
- package/dist/blocks/meter.js +4 -0
- package/dist/blocks/meter.js.map +1 -1
- package/dist/blocks/motion.d.ts +46 -0
- package/dist/blocks/motion.d.ts.map +1 -0
- package/dist/blocks/motion.js +144 -0
- package/dist/blocks/motion.js.map +1 -0
- package/dist/blocks/needs-attention.d.ts +78 -0
- package/dist/blocks/needs-attention.d.ts.map +1 -0
- package/dist/blocks/needs-attention.js +29 -0
- package/dist/blocks/needs-attention.js.map +1 -0
- package/dist/blocks/phosphor-marks.d.ts +12 -0
- package/dist/blocks/phosphor-marks.d.ts.map +1 -1
- package/dist/blocks/phosphor-marks.js +18 -0
- package/dist/blocks/phosphor-marks.js.map +1 -1
- package/dist/blocks/ranked-list.d.ts +7 -1
- package/dist/blocks/ranked-list.d.ts.map +1 -1
- package/dist/blocks/ranked-list.js +8 -6
- package/dist/blocks/ranked-list.js.map +1 -1
- package/dist/blocks/recent-plugs.d.ts +66 -0
- package/dist/blocks/recent-plugs.d.ts.map +1 -0
- package/dist/blocks/recent-plugs.js +20 -0
- package/dist/blocks/recent-plugs.js.map +1 -0
- package/dist/blocks/shared-grid-illustration.d.ts +55 -0
- package/dist/blocks/shared-grid-illustration.d.ts.map +1 -0
- package/dist/blocks/shared-grid-illustration.js +81 -0
- package/dist/blocks/shared-grid-illustration.js.map +1 -0
- package/dist/blocks/shelf-strip.d.ts +36 -0
- package/dist/blocks/shelf-strip.d.ts.map +1 -0
- package/dist/blocks/shelf-strip.js +32 -0
- package/dist/blocks/shelf-strip.js.map +1 -0
- package/dist/blocks/stat-tile.d.ts +17 -1
- package/dist/blocks/stat-tile.d.ts.map +1 -1
- package/dist/blocks/stat-tile.js +4 -1
- package/dist/blocks/stat-tile.js.map +1 -1
- package/dist/blocks/top-creations.d.ts +76 -0
- package/dist/blocks/top-creations.d.ts.map +1 -0
- package/dist/blocks/top-creations.js +54 -0
- package/dist/blocks/top-creations.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/fit.d.ts +39 -0
- package/dist/lib/fit.d.ts.map +1 -0
- package/dist/lib/fit.js +92 -0
- package/dist/lib/fit.js.map +1 -0
- package/dist/lib/motion.d.ts +126 -0
- package/dist/lib/motion.d.ts.map +1 -0
- package/dist/lib/motion.js +132 -0
- package/dist/lib/motion.js.map +1 -0
- package/dist/ui/dialog.d.ts +7 -1
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +2 -2
- package/dist/ui/dialog.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Whether `content` fits in `space` (ui#546): the Home bento's question for
|
|
4
|
+
* the room a stretched card is given. `space` is a place that only ever has
|
|
5
|
+
* the room a stretch gives it (a zero flex basis, no least height), `content`
|
|
6
|
+
* is what would go there, at its own height.
|
|
7
|
+
*
|
|
8
|
+
* Both are watched with one ResizeObserver, and the answer is worked out from
|
|
9
|
+
* the sizes it reports, so nothing here reads a size and forces a layout. The
|
|
10
|
+
* state changes only when the answer does. Showing or hiding the content never
|
|
11
|
+
* changes either size (the content keeps its place while hidden, and the
|
|
12
|
+
* space is the card's to give), so the answer cannot flip back and forth.
|
|
13
|
+
*
|
|
14
|
+
* `slack` is room the content needs beyond its own height: the 16 above a
|
|
15
|
+
* row that is measured by the row before it, which has the same height.
|
|
16
|
+
*
|
|
17
|
+
* No space, no observer (a server, an old browser) or `enabled` false: false.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useFits(space: React.RefObject<HTMLElement | null>, content: React.RefObject<HTMLElement | null>, enabled?: boolean, slack?: number): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* The band the outer (border-box) width of `el` is in (ui#546), as `classify` names it
|
|
22
|
+
* from the width and the root font size (for bands in rem): the inspiration
|
|
23
|
+
* card's columns, say. `classify` should be a module-level function, so it is
|
|
24
|
+
* the same on every render.
|
|
25
|
+
*
|
|
26
|
+
* Outer, not inside, so a band that changes the element's own padding cannot
|
|
27
|
+
* move it back across the edge.
|
|
28
|
+
*
|
|
29
|
+
* The first band is read once, in the layout effect, so it lands in the
|
|
30
|
+
* commit that mounts (or hydrates) the element, before anything paints or
|
|
31
|
+
* handles a click: a page never shows a frame of the default and then moves.
|
|
32
|
+
* That is this module's one read of a size; after it, one ResizeObserver on
|
|
33
|
+
* the border box, its width from the
|
|
34
|
+
* observer's entries; the state changes only when the band does, so a resize
|
|
35
|
+
* re-renders nothing until a band's edge is crossed. Null until measured (a
|
|
36
|
+
* server, the first render), so the caller's markup is its default until then.
|
|
37
|
+
*/
|
|
38
|
+
export declare function useBand<T>(el: React.RefObject<HTMLElement | null>, classify: (width: number, rem: number) => T): T | null;
|
|
39
|
+
//# sourceMappingURL=fit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fit.d.ts","sourceRoot":"","sources":["../../src/lib/fit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,OAAO,CACrB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAC1C,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAC5C,OAAO,UAAO,EACd,KAAK,SAAI,GACR,OAAO,CAyBT;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAqBzH"}
|
package/dist/lib/fit.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** useLayoutEffect in the browser; useEffect on a server. Not motion's: that module brings gsap. */
|
|
3
|
+
const useIsoLayoutEffect = typeof document === "undefined" ? React.useEffect : React.useLayoutEffect;
|
|
4
|
+
/**
|
|
5
|
+
* Whether `content` fits in `space` (ui#546): the Home bento's question for
|
|
6
|
+
* the room a stretched card is given. `space` is a place that only ever has
|
|
7
|
+
* the room a stretch gives it (a zero flex basis, no least height), `content`
|
|
8
|
+
* is what would go there, at its own height.
|
|
9
|
+
*
|
|
10
|
+
* Both are watched with one ResizeObserver, and the answer is worked out from
|
|
11
|
+
* the sizes it reports, so nothing here reads a size and forces a layout. The
|
|
12
|
+
* state changes only when the answer does. Showing or hiding the content never
|
|
13
|
+
* changes either size (the content keeps its place while hidden, and the
|
|
14
|
+
* space is the card's to give), so the answer cannot flip back and forth.
|
|
15
|
+
*
|
|
16
|
+
* `slack` is room the content needs beyond its own height: the 16 above a
|
|
17
|
+
* row that is measured by the row before it, which has the same height.
|
|
18
|
+
*
|
|
19
|
+
* No space, no observer (a server, an old browser) or `enabled` false: false.
|
|
20
|
+
*/
|
|
21
|
+
export function useFits(space, content, enabled = true, slack = 0) {
|
|
22
|
+
const [fits, setFits] = React.useState(false);
|
|
23
|
+
useIsoLayoutEffect(() => {
|
|
24
|
+
const s = space.current;
|
|
25
|
+
const c = content.current;
|
|
26
|
+
if (!enabled || !s || !c || typeof ResizeObserver === "undefined") {
|
|
27
|
+
setFits(false);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const heights = new Map();
|
|
31
|
+
const observer = new ResizeObserver((entries) => {
|
|
32
|
+
for (const entry of entries)
|
|
33
|
+
heights.set(entry.target, blockSize(entry));
|
|
34
|
+
const room = heights.get(s);
|
|
35
|
+
const need = heights.get(c);
|
|
36
|
+
if (room === undefined || need === undefined)
|
|
37
|
+
return;
|
|
38
|
+
// Half a pixel either way is the same room: zoom and fractional rows.
|
|
39
|
+
setFits(need > 0 && room + 0.5 >= need + slack);
|
|
40
|
+
});
|
|
41
|
+
observer.observe(s, { box: "border-box" });
|
|
42
|
+
observer.observe(c, { box: "border-box" });
|
|
43
|
+
return () => observer.disconnect();
|
|
44
|
+
}, [enabled, space, content, slack]);
|
|
45
|
+
return enabled && fits;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The band the outer (border-box) width of `el` is in (ui#546), as `classify` names it
|
|
49
|
+
* from the width and the root font size (for bands in rem): the inspiration
|
|
50
|
+
* card's columns, say. `classify` should be a module-level function, so it is
|
|
51
|
+
* the same on every render.
|
|
52
|
+
*
|
|
53
|
+
* Outer, not inside, so a band that changes the element's own padding cannot
|
|
54
|
+
* move it back across the edge.
|
|
55
|
+
*
|
|
56
|
+
* The first band is read once, in the layout effect, so it lands in the
|
|
57
|
+
* commit that mounts (or hydrates) the element, before anything paints or
|
|
58
|
+
* handles a click: a page never shows a frame of the default and then moves.
|
|
59
|
+
* That is this module's one read of a size; after it, one ResizeObserver on
|
|
60
|
+
* the border box, its width from the
|
|
61
|
+
* observer's entries; the state changes only when the band does, so a resize
|
|
62
|
+
* re-renders nothing until a band's edge is crossed. Null until measured (a
|
|
63
|
+
* server, the first render), so the caller's markup is its default until then.
|
|
64
|
+
*/
|
|
65
|
+
export function useBand(el, classify) {
|
|
66
|
+
const [band, setBand] = React.useState(null);
|
|
67
|
+
useIsoLayoutEffect(() => {
|
|
68
|
+
const node = el.current;
|
|
69
|
+
if (!node || typeof ResizeObserver === "undefined")
|
|
70
|
+
return;
|
|
71
|
+
const rem = parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;
|
|
72
|
+
// eslint-disable-next-line react-hooks/set-state-in-effect -- the first band belongs to the mounting commit; see above
|
|
73
|
+
setBand(classify(node.getBoundingClientRect().width, rem));
|
|
74
|
+
const observer = new ResizeObserver((entries) => {
|
|
75
|
+
const entry = entries[entries.length - 1];
|
|
76
|
+
if (!entry)
|
|
77
|
+
return;
|
|
78
|
+
const box = entry.borderBoxSize?.[0];
|
|
79
|
+
// An observer too old for border boxes gives the content box: near enough.
|
|
80
|
+
setBand(classify(box ? box.inlineSize : entry.contentRect.width, rem));
|
|
81
|
+
});
|
|
82
|
+
observer.observe(node, { box: "border-box" });
|
|
83
|
+
return () => observer.disconnect();
|
|
84
|
+
}, [el, classify]);
|
|
85
|
+
return band;
|
|
86
|
+
}
|
|
87
|
+
/** The border-box height an observer reported, from the older field where the newer is missing. */
|
|
88
|
+
function blockSize(entry) {
|
|
89
|
+
const box = entry.borderBoxSize?.[0];
|
|
90
|
+
return box ? box.blockSize : entry.contentRect.height;
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=fit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fit.js","sourceRoot":"","sources":["../../src/lib/fit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,oGAAoG;AACpG,MAAM,kBAAkB,GAAG,OAAO,QAAQ,K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KAAK,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAA;QACxE,CAAC,CAAC,CAAA;QACF,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC,CAAA;QAC7C,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAA;IACpC,CAAC,EAAE,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAA;IAElB,OAAO,IAAI,CAAA;AACb,CAAC;AAED,mGAAmG;AACnG,SAAS,SAAS,CAAC,KAA0B;IAC3C,MAAM,GAAG,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,CAAA;IACpC,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAA;AACvD,CAAC"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { gsap } from "gsap";
|
|
3
|
+
/**
|
|
4
|
+
* The library's motion, on gsap (ui#533). The one module that imports gsap:
|
|
5
|
+
* the pieces in `blocks/motion.tsx` and `blocks/shared-grid-illustration.tsx`
|
|
6
|
+
* call the helpers here, and a caller never touches gsap at all.
|
|
7
|
+
*
|
|
8
|
+
* ## Quiet, because this is a console
|
|
9
|
+
*
|
|
10
|
+
* The website moves; the Console mostly sits still. So every motion here is
|
|
11
|
+
* short (at most 0.8s), eases out, and travels a few pixels. A count and the
|
|
12
|
+
* bar beside it share one duration, so a ranked row's number and its fill land
|
|
13
|
+
* together. The one motion that does not end is the empty illustration's float,
|
|
14
|
+
* and it is 3px over 2.4s.
|
|
15
|
+
*
|
|
16
|
+
* ## The final state is the markup
|
|
17
|
+
*
|
|
18
|
+
* Every piece RENDERS its end state: the caller's number, the full bar, every
|
|
19
|
+
* item visible. The motion is applied in a layout effect, before the browser
|
|
20
|
+
* paints, by setting the start state and tweening back to what React rendered.
|
|
21
|
+
* That makes three cases one:
|
|
22
|
+
*
|
|
23
|
+
* - no script (a server render, a crawler): the end state;
|
|
24
|
+
* - reduced motion: the effect returns before it starts anything, so the
|
|
25
|
+
* end state shows at once and gsap never runs;
|
|
26
|
+
* - an unmount mid-motion: the gsap context reverts, nothing is left inline.
|
|
27
|
+
*
|
|
28
|
+
* A server-rendered page shows the end state for the moment between its HTML
|
|
29
|
+
* painting and hydration, then runs the motion from the start. The Console's
|
|
30
|
+
* Home renders its data on the client, where the layout effect runs before the
|
|
31
|
+
* first paint and there is no such moment.
|
|
32
|
+
*
|
|
33
|
+
* ## The number reader
|
|
34
|
+
*
|
|
35
|
+
* "Number formatting stays the caller's" (ui#533). A count-up takes the text
|
|
36
|
+
* the caller already formatted ("214", "12 min", "1.2K", "1,234") and finds the
|
|
37
|
+
* figure in it; each frame writes a number back in that same shape: the same
|
|
38
|
+
* prefix and suffix, the same decimal places, grouping if the caller grouped.
|
|
39
|
+
* Text with no figure ("—", "Static") is left as it is. Grouping is read and
|
|
40
|
+
* written as en-US commas, which is the only grouping the Console prints.
|
|
41
|
+
*/
|
|
42
|
+
/** The durations, eases and distances every motion here uses. */
|
|
43
|
+
export declare const MOTION: {
|
|
44
|
+
/** A count-up, 0 to the caller's figure. */
|
|
45
|
+
readonly count: {
|
|
46
|
+
readonly duration: 0.8;
|
|
47
|
+
readonly ease: "power2.out";
|
|
48
|
+
};
|
|
49
|
+
/** A meter's fill, 0 to its width; the same time as its count. */
|
|
50
|
+
readonly fill: {
|
|
51
|
+
readonly duration: 0.8;
|
|
52
|
+
readonly ease: "power2.out";
|
|
53
|
+
};
|
|
54
|
+
/** Items appearing one by one: up from 8px below, 0.08s apart. */
|
|
55
|
+
readonly reveal: {
|
|
56
|
+
readonly duration: 0.4;
|
|
57
|
+
readonly ease: "power2.out";
|
|
58
|
+
readonly y: 8;
|
|
59
|
+
readonly stagger: 0.08;
|
|
60
|
+
};
|
|
61
|
+
/** The illustration's build: a part grows in from 92%, sides 0.15s later. */
|
|
62
|
+
readonly build: {
|
|
63
|
+
readonly duration: 0.45;
|
|
64
|
+
readonly ease: "power2.out";
|
|
65
|
+
readonly scale: 0.92;
|
|
66
|
+
readonly x: 16;
|
|
67
|
+
readonly sideDelay: 0.15;
|
|
68
|
+
readonly lineDuration: 0.4;
|
|
69
|
+
};
|
|
70
|
+
/** The illustration's float: 3px up and back, 2.4s each way. */
|
|
71
|
+
readonly float: {
|
|
72
|
+
readonly duration: 2.4;
|
|
73
|
+
readonly ease: "sine.inOut";
|
|
74
|
+
readonly y: 3;
|
|
75
|
+
readonly offset: 0.6;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
/** Whether the reader asked for reduced motion. False where there is no window. */
|
|
79
|
+
export declare function prefersReducedMotion(): boolean;
|
|
80
|
+
/** useLayoutEffect in the browser; useEffect on a server, where nothing paints. */
|
|
81
|
+
export declare const useIsoLayoutEffect: typeof React.useEffect;
|
|
82
|
+
/**
|
|
83
|
+
* Where a piece is in its motion, on its root as `data-motion`:
|
|
84
|
+
* `running`, `done`, or `static` (reduced motion, or nothing to move).
|
|
85
|
+
*/
|
|
86
|
+
export type MotionState = "running" | "done" | "static";
|
|
87
|
+
export declare function markMotion(el: HTMLElement | SVGElement, state: MotionState): void;
|
|
88
|
+
/**
|
|
89
|
+
* Runs `build` inside a gsap context scoped to `scope`, and returns the undo:
|
|
90
|
+
* every tween it made is killed and every inline style it set is removed.
|
|
91
|
+
*/
|
|
92
|
+
export declare function withMotion(scope: Element, build: () => void): () => void;
|
|
93
|
+
/**
|
|
94
|
+
* The start state is written at once, in the layout effect, not on gsap's
|
|
95
|
+
* next tick (`lazy: false` with the immediate render a from-tween has): the
|
|
96
|
+
* browser never paints the end state first and then jumps back to the start.
|
|
97
|
+
*/
|
|
98
|
+
export declare const START_NOW: {
|
|
99
|
+
readonly immediateRender: true;
|
|
100
|
+
readonly lazy: false;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Notes `els`' own inline style BEFORE a tween touches them, and returns what
|
|
104
|
+
* hands it back once the tween is over. gsap's revert
|
|
105
|
+
* restores what a tween moved, but leaves the `translate`, `rotate` and
|
|
106
|
+
* `scale` it writes as `none` beside a transform; this puts those back as they
|
|
107
|
+
* were too, and drops a `style` attribute that ends up empty, so a piece at
|
|
108
|
+
* rest carries no inline style of ours.
|
|
109
|
+
*/
|
|
110
|
+
export declare function holdStyle(els: readonly (HTMLElement | SVGElement)[]): (tween: {
|
|
111
|
+
revert(): unknown;
|
|
112
|
+
}) => void;
|
|
113
|
+
export { gsap };
|
|
114
|
+
/** A caller's formatted figure, split so a count-up can write it back. */
|
|
115
|
+
export type Figure = {
|
|
116
|
+
prefix: string;
|
|
117
|
+
value: number;
|
|
118
|
+
decimals: number;
|
|
119
|
+
grouped: boolean;
|
|
120
|
+
suffix: string;
|
|
121
|
+
};
|
|
122
|
+
/** The first figure in `text`, with what comes before and after it; null for words. */
|
|
123
|
+
export declare function readFigure(text: string): Figure | null;
|
|
124
|
+
/** `n` written in `figure`'s shape. */
|
|
125
|
+
export declare function writeFigure(figure: Figure, n: number): string;
|
|
126
|
+
//# sourceMappingURL=motion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../../src/lib/motion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,iEAAiE;AACjE,eAAO,MAAM,MAAM;IACjB,4CAA4C;;;;;IAE5C,kEAAkE;;;;;IAElE,kEAAkE;;;;;;;IAElE,6EAA6E;;;;;;;;;IAE7E,gEAAgE;;;;;;;CAExD,CAAA;AAEV,mFAAmF;AACnF,wBAAgB,oBAAoB,IAAI,OAAO,CAM9C;AAED,mFAAmF;AACnF,eAAO,MAAM,kBAAkB,wBAA4E,CAAA;AAE3G;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAA;AAEvD,wBAAgB,UAAU,CAAC,EAAE,EAAE,WAAW,GAAG,UAAU,EAAE,KAAK,EAAE,WAAW,QAE1E;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAGxE;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS;;;CAAkD,CAAA;AAIxE;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,SAAS,CAAC,WAAW,GAAG,UAAU,CAAC,EAAE,GAAG,CAAC,KAAK,EAAE;IAAE,MAAM,IAAI,OAAO,CAAA;CAAE,KAAK,IAAI,CAc5G;AAED,OAAO,EAAE,IAAI,EAAE,CAAA;AAEf,0EAA0E;AAC1E,MAAM,MAAM,MAAM,GAAG;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAID,uFAAuF;AACvF,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQtD;AAED,uCAAuC;AACvC,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAS7D"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { gsap } from "gsap";
|
|
3
|
+
/**
|
|
4
|
+
* The library's motion, on gsap (ui#533). The one module that imports gsap:
|
|
5
|
+
* the pieces in `blocks/motion.tsx` and `blocks/shared-grid-illustration.tsx`
|
|
6
|
+
* call the helpers here, and a caller never touches gsap at all.
|
|
7
|
+
*
|
|
8
|
+
* ## Quiet, because this is a console
|
|
9
|
+
*
|
|
10
|
+
* The website moves; the Console mostly sits still. So every motion here is
|
|
11
|
+
* short (at most 0.8s), eases out, and travels a few pixels. A count and the
|
|
12
|
+
* bar beside it share one duration, so a ranked row's number and its fill land
|
|
13
|
+
* together. The one motion that does not end is the empty illustration's float,
|
|
14
|
+
* and it is 3px over 2.4s.
|
|
15
|
+
*
|
|
16
|
+
* ## The final state is the markup
|
|
17
|
+
*
|
|
18
|
+
* Every piece RENDERS its end state: the caller's number, the full bar, every
|
|
19
|
+
* item visible. The motion is applied in a layout effect, before the browser
|
|
20
|
+
* paints, by setting the start state and tweening back to what React rendered.
|
|
21
|
+
* That makes three cases one:
|
|
22
|
+
*
|
|
23
|
+
* - no script (a server render, a crawler): the end state;
|
|
24
|
+
* - reduced motion: the effect returns before it starts anything, so the
|
|
25
|
+
* end state shows at once and gsap never runs;
|
|
26
|
+
* - an unmount mid-motion: the gsap context reverts, nothing is left inline.
|
|
27
|
+
*
|
|
28
|
+
* A server-rendered page shows the end state for the moment between its HTML
|
|
29
|
+
* painting and hydration, then runs the motion from the start. The Console's
|
|
30
|
+
* Home renders its data on the client, where the layout effect runs before the
|
|
31
|
+
* first paint and there is no such moment.
|
|
32
|
+
*
|
|
33
|
+
* ## The number reader
|
|
34
|
+
*
|
|
35
|
+
* "Number formatting stays the caller's" (ui#533). A count-up takes the text
|
|
36
|
+
* the caller already formatted ("214", "12 min", "1.2K", "1,234") and finds the
|
|
37
|
+
* figure in it; each frame writes a number back in that same shape: the same
|
|
38
|
+
* prefix and suffix, the same decimal places, grouping if the caller grouped.
|
|
39
|
+
* Text with no figure ("—", "Static") is left as it is. Grouping is read and
|
|
40
|
+
* written as en-US commas, which is the only grouping the Console prints.
|
|
41
|
+
*/
|
|
42
|
+
/** The durations, eases and distances every motion here uses. */
|
|
43
|
+
export const MOTION = {
|
|
44
|
+
/** A count-up, 0 to the caller's figure. */
|
|
45
|
+
count: { duration: 0.8, ease: "power2.out" },
|
|
46
|
+
/** A meter's fill, 0 to its width; the same time as its count. */
|
|
47
|
+
fill: { duration: 0.8, ease: "power2.out" },
|
|
48
|
+
/** Items appearing one by one: up from 8px below, 0.08s apart. */
|
|
49
|
+
reveal: { duration: 0.4, ease: "power2.out", y: 8, stagger: 0.08 },
|
|
50
|
+
/** The illustration's build: a part grows in from 92%, sides 0.15s later. */
|
|
51
|
+
build: { duration: 0.45, ease: "power2.out", scale: 0.92, x: 16, sideDelay: 0.15, lineDuration: 0.4 },
|
|
52
|
+
/** The illustration's float: 3px up and back, 2.4s each way. */
|
|
53
|
+
float: { duration: 2.4, ease: "sine.inOut", y: 3, offset: 0.6 },
|
|
54
|
+
};
|
|
55
|
+
/** Whether the reader asked for reduced motion. False where there is no window. */
|
|
56
|
+
export function prefersReducedMotion() {
|
|
57
|
+
return (typeof window !== "undefined" &&
|
|
58
|
+
typeof window.matchMedia === "function" &&
|
|
59
|
+
window.matchMedia("(prefers-reduced-motion: reduce)").matches);
|
|
60
|
+
}
|
|
61
|
+
/** useLayoutEffect in the browser; useEffect on a server, where nothing paints. */
|
|
62
|
+
export const useIsoLayoutEffect = typeof document === "undefined" ? React.useEffect : React.useLayoutEffect;
|
|
63
|
+
export function markMotion(el, state) {
|
|
64
|
+
el.setAttribute("data-motion", state);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Runs `build` inside a gsap context scoped to `scope`, and returns the undo:
|
|
68
|
+
* every tween it made is killed and every inline style it set is removed.
|
|
69
|
+
*/
|
|
70
|
+
export function withMotion(scope, build) {
|
|
71
|
+
const ctx = gsap.context(build, scope);
|
|
72
|
+
return () => ctx.revert();
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* The start state is written at once, in the layout effect, not on gsap's
|
|
76
|
+
* next tick (`lazy: false` with the immediate render a from-tween has): the
|
|
77
|
+
* browser never paints the end state first and then jumps back to the start.
|
|
78
|
+
*/
|
|
79
|
+
export const START_NOW = { immediateRender: true, lazy: false };
|
|
80
|
+
const INDEPENDENT = ["translate", "rotate", "scale"];
|
|
81
|
+
/**
|
|
82
|
+
* Notes `els`' own inline style BEFORE a tween touches them, and returns what
|
|
83
|
+
* hands it back once the tween is over. gsap's revert
|
|
84
|
+
* restores what a tween moved, but leaves the `translate`, `rotate` and
|
|
85
|
+
* `scale` it writes as `none` beside a transform; this puts those back as they
|
|
86
|
+
* were too, and drops a `style` attribute that ends up empty, so a piece at
|
|
87
|
+
* rest carries no inline style of ours.
|
|
88
|
+
*/
|
|
89
|
+
export function holdStyle(els) {
|
|
90
|
+
const saved = els.map((el) => INDEPENDENT.map((p) => el.style.getPropertyValue(p)));
|
|
91
|
+
const hadStyle = els.map((el) => el.hasAttribute("style"));
|
|
92
|
+
return (tween) => {
|
|
93
|
+
tween.revert();
|
|
94
|
+
els.forEach((el, i) => {
|
|
95
|
+
INDEPENDENT.forEach((p, j) => {
|
|
96
|
+
const v = saved[i][j];
|
|
97
|
+
if (v)
|
|
98
|
+
el.style.setProperty(p, v);
|
|
99
|
+
else
|
|
100
|
+
el.style.removeProperty(p);
|
|
101
|
+
});
|
|
102
|
+
if (!hadStyle[i] && !el.getAttribute("style"))
|
|
103
|
+
el.removeAttribute("style");
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
export { gsap };
|
|
108
|
+
const FIGURE = /^(\D*?)(\d{1,3}(?:,\d{3})+|\d+)(?:\.(\d+))?([\s\S]*)$/;
|
|
109
|
+
/** The first figure in `text`, with what comes before and after it; null for words. */
|
|
110
|
+
export function readFigure(text) {
|
|
111
|
+
const m = FIGURE.exec(text);
|
|
112
|
+
if (!m)
|
|
113
|
+
return null;
|
|
114
|
+
const [, prefix = "", whole = "", fraction, suffix = ""] = m;
|
|
115
|
+
const grouped = whole.includes(",");
|
|
116
|
+
const value = Number(`${whole.replace(/,/g, "")}${fraction ? `.${fraction}` : ""}`);
|
|
117
|
+
if (!Number.isFinite(value))
|
|
118
|
+
return null;
|
|
119
|
+
return { prefix, value, decimals: fraction ? fraction.length : 0, grouped, suffix };
|
|
120
|
+
}
|
|
121
|
+
/** `n` written in `figure`'s shape. */
|
|
122
|
+
export function writeFigure(figure, n) {
|
|
123
|
+
const fixed = n.toFixed(figure.decimals);
|
|
124
|
+
const body = figure.grouped
|
|
125
|
+
? Number(fixed).toLocaleString("en-US", {
|
|
126
|
+
minimumFractionDigits: figure.decimals,
|
|
127
|
+
maximumFractionDigits: figure.decimals,
|
|
128
|
+
})
|
|
129
|
+
: fixed;
|
|
130
|
+
return `${figure.prefix}${body}${figure.suffix}`;
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=motion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motion.js","sourceRoot":"","sources":["../../src/lib/motion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,iEAAiE;AACjE,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,4CAA4C;IAC5C,KAAK,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE;IAC5C,kEAAkE;IAClE,IAAI,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE;IAC3C,kEAAkE;IAClE,MAAM,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE;IAClE,6EAA6E;IAC7E,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE;IACrG,gEAAgE;IAChE,KA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GAAG,CAAC,CAAA;IACnC,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IACnF,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IACxC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAA;AACrF,CAAC;AAED,uCAAuC;AACvC,MAAM,UAAU,WAAW,CAAC,MAAc,EAAE,CAAS;IACnD,MAAM,KAAK,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;IACxC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO;QACzB,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,OAAO,EAAE;YACpC,qBAAqB,EAAE,MAAM,CAAC,QAAQ;YACtC,qBAAqB,EAAE,MAAM,CAAC,QAAQ;SACvC,CAAC;QACJ,CAAC,CAAC,KAAK,CAAA;IACT,OAAO,GAAG,MAAM,CAAC,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,CAAA;AAClD,CAAC"}
|
package/dist/ui/dialog.d.ts
CHANGED
|
@@ -67,8 +67,14 @@ declare function DialogOverlay({ className, forceRender, ...props }: DialogPrimi
|
|
|
67
67
|
* conflict): `ConfirmDeleteDialog` keeps its 24 padding and 448 width,
|
|
68
68
|
* `PluggedDialog` its own radius and 632 width.
|
|
69
69
|
*/
|
|
70
|
-
declare function DialogContent({ className, children, showCloseButton, scrim, ...props }: DialogPrimitive.Popup.Props & {
|
|
70
|
+
declare function DialogContent({ className, children, showCloseButton, scrim, container, ...props }: DialogPrimitive.Popup.Props & {
|
|
71
71
|
showCloseButton?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Where the scrim and the card portal (ui#531). Absent, the document body,
|
|
74
|
+
* as before. A gallery frame passes a stage with a `transform`, which then
|
|
75
|
+
* holds the fixed scrim and card, the way `InvitePopup` and `Drawer` do.
|
|
76
|
+
*/
|
|
77
|
+
container?: DialogPrimitive.Portal.Props["container"];
|
|
72
78
|
/**
|
|
73
79
|
* The backdrop. `default` is the Style Guide overlay, the purple wash with
|
|
74
80
|
* the page blurred behind it (ui#368), unchanged. `light` is a light dim with
|
package/dist/ui/dialog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/ui/dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAkBjE,iBAAS,MAAM,CAAC,EAAE,KAAY,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,IAAI,CAAC,KAAK,qBAMrE;AAED,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,OAAO,CAAC,KAAK,qBAEjE;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,MAAM,CAAC,KAAK,qBAE1E;AAED,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,qBAE7D;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,WAAkB,EAClB,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,QAAQ,CAAC,KAAK,qBAYhC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;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,GAAG;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,qBAkBA;AAED;;;;;;;;GAQG;AACH,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,GAAG;IAC/B,kEAAkE;IAClE,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;CACxB,qBAeA;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,WAAW,CAAC,KAAK,qBAWnC;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAA"}
|
package/dist/ui/dialog.js
CHANGED
|
@@ -93,9 +93,9 @@ function DialogOverlay({ className, forceRender = true, ...props }) {
|
|
|
93
93
|
* conflict): `ConfirmDeleteDialog` keeps its 24 padding and 448 width,
|
|
94
94
|
* `PluggedDialog` its own radius and 632 width.
|
|
95
95
|
*/
|
|
96
|
-
function DialogContent({ className, children, showCloseButton = true, scrim = "default", ...props }) {
|
|
96
|
+
function DialogContent({ className, children, showCloseButton = true, scrim = "default", container, ...props }) {
|
|
97
97
|
const modal = React.useContext(DialogModalContext);
|
|
98
|
-
return (_jsxs(DialogPortal, { children: [scrim === "light" ? _jsx(DialogOverlay, { className: "scrim-overlay-light", "data-scrim": "light" }) : _jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Popup, { "data-slot": "dialog-content", "aria-modal": modal !== false ? true : undefined, className: cn("fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100svh-2rem)] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 overflow-y-auto rounded-md border border-hairline bg-popover px-8 py-6 text-body-sm text-ink duration-100 outline-none sm:max-w-131.25 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props, children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", render: _jsx(Button, { variant: "ghost", className: "absolute top-5 right-6.5 text-ink", size: "icon" }), children: [_jsx(CloseIcon, { className: "size-5" }), _jsx("span", { className: "sr-only", children: "Close" })] }))] })] }));
|
|
98
|
+
return (_jsxs(DialogPortal, { container: container, children: [scrim === "light" ? _jsx(DialogOverlay, { className: "scrim-overlay-light", "data-scrim": "light" }) : _jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Popup, { "data-slot": "dialog-content", "aria-modal": modal !== false ? true : undefined, className: cn("fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100svh-2rem)] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 overflow-y-auto rounded-md border border-hairline bg-popover px-8 py-6 text-body-sm text-ink duration-100 outline-none sm:max-w-131.25 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props, children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", render: _jsx(Button, { variant: "ghost", className: "absolute top-5 right-6.5 text-ink", size: "icon" }), children: [_jsx(CloseIcon, { className: "size-5" }), _jsx("span", { className: "sr-only", children: "Close" })] }))] })] }));
|
|
99
99
|
}
|
|
100
100
|
/** The title and its line. `pr-8` keeps a long title clear of the close X. */
|
|
101
101
|
function DialogHeader({ className, ...props }) {
|
package/dist/ui/dialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/ui/dialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEjE,OAAO,EAAE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AS,EACT,GAAG,KAAK,EAC0B;IAClC,OAAO,CACL,KAAC,eAAe,CAAC,WAAW,iBAChB,oBAAoB,EAC9B,SAAS,EAAE,EAAE,CACX,0FAA0F,EAC1F,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudgrid-io/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.65.0",
|
|
4
4
|
"description": "CloudGrid design system: React components, brand design tokens, Tailwind theme, self-hosted fonts.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -82,6 +82,7 @@
|
|
|
82
82
|
"@fontsource-variable/space-grotesk": "^5.3.0",
|
|
83
83
|
"class-variance-authority": "^0.7.1",
|
|
84
84
|
"clsx": "^2.1.1",
|
|
85
|
+
"gsap": "3.15.1",
|
|
85
86
|
"recharts": "3.8.0",
|
|
86
87
|
"sonner": "^2.0.8",
|
|
87
88
|
"tailwind-merge": "^3.7.0"
|