@cystackapp/ui 1.4.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/assets/background-pattern-circles-md.svg.js +5 -0
- package/dist/components/badge/Badge.d.ts +29 -0
- package/dist/components/badge/Badge.js +67 -0
- package/dist/components/badge/BadgeTestStory.d.ts +5 -0
- package/dist/components/badge/badge-utils.d.ts +27 -0
- package/dist/components/badge/badge-utils.js +74 -0
- package/dist/components/badge/variants/BadgeMore.d.ts +6 -0
- package/dist/components/badge/variants/BadgeMore.js +10 -0
- package/dist/components/badge/variants/BadgeMoreTestStory.d.ts +5 -0
- package/dist/components/badge/variants/BadgeTag.d.ts +10 -0
- package/dist/components/badge/variants/BadgeTag.js +50 -0
- package/dist/components/combobox/Combobox.d.ts +96 -0
- package/dist/components/combobox/Combobox.js +206 -0
- package/dist/components/combobox/use-validated-combobox.d.ts +17 -0
- package/dist/components/combobox/use-validated-combobox.js +23 -0
- package/dist/components/error-state/ErrorState.d.ts +9 -0
- package/dist/components/error-state/ErrorState.js +33 -0
- package/dist/components/page-title/PageTitle.d.ts +7 -0
- package/dist/components/page-title/PageTitle.js +6 -0
- package/dist/components/popover/Popover.d.ts +8 -0
- package/dist/components/popover/Popover.js +42 -0
- package/dist/components/popover/use-popover-coord.d.ts +24 -0
- package/dist/components/popover/use-popover-coord.js +130 -0
- package/dist/components/switch/Switch.d.ts +7 -0
- package/dist/components/switch/Switch.js +39 -0
- package/dist/components/tooltip/Tooltip.d.ts +11 -0
- package/dist/components/tooltip/Tooltip.js +58 -0
- package/dist/components/tooltip/tooltip-utils.d.ts +4 -0
- package/dist/components/tooltip/tooltip-utils.js +120 -0
- package/dist/hooks/element-shift/use-animation-frame.d.ts +4 -0
- package/dist/hooks/element-shift/use-animation-frame.js +14 -0
- package/dist/hooks/element-shift/use-element-shift.d.ts +17 -0
- package/dist/hooks/element-shift/use-element-shift.js +22 -0
- package/dist/hooks/element-shift/use-mutation-observer.d.ts +4 -0
- package/dist/hooks/element-shift/use-mutation-observer.js +15 -0
- package/dist/hooks/element-shift/use-resize-observer.d.ts +5 -0
- package/dist/hooks/element-shift/use-resize-observer.js +13 -0
- package/dist/hooks/element-shift/use-scroll-listener.d.ts +5 -0
- package/dist/hooks/element-shift/use-scroll-listener.js +26 -0
- package/dist/hooks/element-shift/use-transition-end-listener.d.ts +5 -0
- package/dist/hooks/element-shift/use-transition-end-listener.js +28 -0
- package/dist/hooks/element-shift/use-window-resize-listener.d.ts +4 -0
- package/dist/hooks/element-shift/use-window-resize-listener.js +10 -0
- package/dist/i18n/resources.d.ts +2 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +42 -0
- package/dist/node_modules/clsx/dist/clsx.js +16 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +2924 -0
- package/dist/utils/cn.d.ts +2 -0
- package/dist/utils/cn.js +8 -0
- package/package.json +66 -0
- package/theme.css +358 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useLayoutEffect as u } from "react";
|
|
2
|
+
function a(r) {
|
|
3
|
+
const t = [];
|
|
4
|
+
let e = r.parentElement;
|
|
5
|
+
for (; e && e !== document.body; ) {
|
|
6
|
+
const n = getComputedStyle(e).transform;
|
|
7
|
+
n && n !== "none" && t.push(e), e = e.parentElement;
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
}
|
|
11
|
+
function f(r, t, e = !0) {
|
|
12
|
+
u(() => {
|
|
13
|
+
if (!e) return;
|
|
14
|
+
const s = r.current;
|
|
15
|
+
if (!s) return;
|
|
16
|
+
const n = a(s);
|
|
17
|
+
return n.forEach(
|
|
18
|
+
(o) => o.addEventListener("transitionend", t, {
|
|
19
|
+
passive: !0
|
|
20
|
+
})
|
|
21
|
+
), () => n.forEach(
|
|
22
|
+
(o) => o.removeEventListener("transitionend", t)
|
|
23
|
+
);
|
|
24
|
+
}, [r, t, e]);
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
f as useTransitionEndListener
|
|
28
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export { Badge } from './components/badge/Badge';
|
|
2
|
+
export { BadgeTag, getBadgeAutoColor, TAG_ICON_COLOR_CLASSES, } from './components/badge/variants/BadgeTag';
|
|
3
|
+
export { BadgeMore } from './components/badge/variants/BadgeMore';
|
|
4
|
+
export type { BadgeProps } from './components/badge/Badge';
|
|
5
|
+
export type { BadgeColor, BadgeSize, BadgeType, } from './components/badge/badge-utils';
|
|
6
|
+
export { useResizeObserver } from './hooks/element-shift/use-resize-observer';
|
|
7
|
+
export { useScrollListener } from './hooks/element-shift/use-scroll-listener';
|
|
8
|
+
export { useWindowResizeListener } from './hooks/element-shift/use-window-resize-listener';
|
|
9
|
+
export { useMutationObserver } from './hooks/element-shift/use-mutation-observer';
|
|
10
|
+
export { useTransitionEndListener } from './hooks/element-shift/use-transition-end-listener';
|
|
11
|
+
export { useAnimationFrame } from './hooks/element-shift/use-animation-frame';
|
|
12
|
+
export { useElementShift } from './hooks/element-shift/use-element-shift';
|
|
13
|
+
export { Combobox } from './components/combobox/Combobox';
|
|
14
|
+
export type { ComboboxSuggestionItem } from './components/combobox/Combobox';
|
|
15
|
+
export { useValidatedCombobox } from './components/combobox/use-validated-combobox';
|
|
16
|
+
export { ErrorState } from './components/error-state/ErrorState';
|
|
17
|
+
export { PageTitle } from './components/page-title/PageTitle';
|
|
18
|
+
export { Popover } from './components/popover/Popover';
|
|
19
|
+
export { usePopoverCoord } from './components/popover/use-popover-coord';
|
|
20
|
+
export type { PopoverPosition } from './components/popover/use-popover-coord';
|
|
21
|
+
export { Switch } from './components/switch/Switch';
|
|
22
|
+
export { Tooltip } from './components/tooltip/Tooltip';
|
|
23
|
+
export { cn } from './utils/cn';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Badge as r } from "./components/badge/Badge.js";
|
|
2
|
+
import { BadgeTag as m, TAG_ICON_COLOR_CLASSES as p, getBadgeAutoColor as x } from "./components/badge/variants/BadgeTag.js";
|
|
3
|
+
import { BadgeMore as s } from "./components/badge/variants/BadgeMore.js";
|
|
4
|
+
import { useResizeObserver as a } from "./hooks/element-shift/use-resize-observer.js";
|
|
5
|
+
import { useScrollListener as u } from "./hooks/element-shift/use-scroll-listener.js";
|
|
6
|
+
import { useWindowResizeListener as g } from "./hooks/element-shift/use-window-resize-listener.js";
|
|
7
|
+
import { useMutationObserver as C } from "./hooks/element-shift/use-mutation-observer.js";
|
|
8
|
+
import { useTransitionEndListener as b } from "./hooks/element-shift/use-transition-end-listener.js";
|
|
9
|
+
import { useAnimationFrame as O } from "./hooks/element-shift/use-animation-frame.js";
|
|
10
|
+
import { useElementShift as v } from "./hooks/element-shift/use-element-shift.js";
|
|
11
|
+
import { Combobox as B } from "./components/combobox/Combobox.js";
|
|
12
|
+
import { useValidatedCombobox as c } from "./components/combobox/use-validated-combobox.js";
|
|
13
|
+
import { ErrorState as R } from "./components/error-state/ErrorState.js";
|
|
14
|
+
import { PageTitle as h } from "./components/page-title/PageTitle.js";
|
|
15
|
+
import { Popover as z } from "./components/popover/Popover.js";
|
|
16
|
+
import { usePopoverCoord as F } from "./components/popover/use-popover-coord.js";
|
|
17
|
+
import { Switch as I } from "./components/switch/Switch.js";
|
|
18
|
+
import { Tooltip as V } from "./components/tooltip/Tooltip.js";
|
|
19
|
+
import { cn as j } from "./utils/cn.js";
|
|
20
|
+
export {
|
|
21
|
+
r as Badge,
|
|
22
|
+
s as BadgeMore,
|
|
23
|
+
m as BadgeTag,
|
|
24
|
+
B as Combobox,
|
|
25
|
+
R as ErrorState,
|
|
26
|
+
h as PageTitle,
|
|
27
|
+
z as Popover,
|
|
28
|
+
I as Switch,
|
|
29
|
+
p as TAG_ICON_COLOR_CLASSES,
|
|
30
|
+
V as Tooltip,
|
|
31
|
+
j as cn,
|
|
32
|
+
x as getBadgeAutoColor,
|
|
33
|
+
O as useAnimationFrame,
|
|
34
|
+
v as useElementShift,
|
|
35
|
+
C as useMutationObserver,
|
|
36
|
+
F as usePopoverCoord,
|
|
37
|
+
a as useResizeObserver,
|
|
38
|
+
u as useScrollListener,
|
|
39
|
+
b as useTransitionEndListener,
|
|
40
|
+
c as useValidatedCombobox,
|
|
41
|
+
g as useWindowResizeListener
|
|
42
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function i(r) {
|
|
2
|
+
var f, n, t = "";
|
|
3
|
+
if (typeof r == "string" || typeof r == "number") t += r;
|
|
4
|
+
else if (typeof r == "object") if (Array.isArray(r)) {
|
|
5
|
+
var o = r.length;
|
|
6
|
+
for (f = 0; f < o; f++) r[f] && (n = i(r[f])) && (t && (t += " "), t += n);
|
|
7
|
+
} else for (n in r) r[n] && (t && (t += " "), t += n);
|
|
8
|
+
return t;
|
|
9
|
+
}
|
|
10
|
+
function a() {
|
|
11
|
+
for (var r, f, n = 0, t = "", o = arguments.length; n < o; n++) (r = arguments[n]) && (f = i(r)) && (t && (t += " "), t += f);
|
|
12
|
+
return t;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
a as clsx
|
|
16
|
+
};
|