@jfrader/ui 0.2.0 → 0.3.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/accordion-Bd-j04hW.js +198 -0
- package/dist/accordion.js +1 -1
- package/dist/alert-BBqaKI4k.js +135 -0
- package/dist/alert.js +1 -1
- package/dist/avatar-BahDVO9t.js +132 -0
- package/dist/avatar.js +1 -1
- package/dist/badge-B_sLygxU.js +108 -0
- package/dist/badge.js +1 -1
- package/dist/breadcrumbs-DVAOxfvL.js +141 -0
- package/dist/breadcrumbs.js +1 -1
- package/dist/button-P2e7_44z.js +200 -0
- package/dist/button.js +1 -1
- package/dist/calendar-C9Yad_-w.js +394 -0
- package/dist/calendar.js +1 -1
- package/dist/card-D-aI2QHx.js +158 -0
- package/dist/card.js +1 -1
- package/dist/checkbox-COYG6L7d.js +140 -0
- package/dist/checkbox.js +1 -1
- package/dist/{choice-control-ByFogYcT.js → choice-control-5kJkLXgv.js} +1 -1
- package/dist/{collection-registry-1l9f3XJZ.js → collection-registry-BTYi6zGh.js} +1 -1
- package/dist/combobox-DrmjBbo7.js +327 -0
- package/dist/combobox.js +1 -1
- package/dist/command-palette-V_2pEay7.js +379 -0
- package/dist/command-palette.js +1 -1
- package/dist/container-BOaSptJa.js +41 -0
- package/dist/container.js +1 -1
- package/dist/date-picker-ClUYBIBh.js +250 -0
- package/dist/date-picker.js +1 -1
- package/dist/dialog-xaydbXl2.js +218 -0
- package/dist/dialog.js +1 -1
- package/dist/divider-DYoJf0I_.js +84 -0
- package/dist/divider.js +1 -1
- package/dist/field-anatomy-D2ToMeRa.js +109 -0
- package/dist/flex-Dh-_J5-U.js +28 -0
- package/dist/flex.js +1 -1
- package/dist/{icon-wrapper-CFWzew5m.js → icon-wrapper-stN8sD7R.js} +1 -1
- package/dist/index.js +38 -37
- package/dist/kbd-C3ACoMoE.js +71 -0
- package/dist/kbd.js +1 -1
- package/dist/{layout-style-7ZTOiWGR.js → layout-style-Cbd1Vilw.js} +1 -1
- package/dist/{loading-ring-BpdB0aFi.js → loading-ring-B8-30Dl1.js} +1 -1
- package/dist/menu-DU60SMdt.js +216 -0
- package/dist/menu.js +1 -1
- package/dist/navigation-DhnKriOp.js +197 -0
- package/dist/navigation.js +1 -1
- package/dist/pagination-DYdwsxwe.js +156 -0
- package/dist/pagination.js +1 -1
- package/dist/pill-DO2gHzMb.js +56 -0
- package/dist/pill.js +1 -1
- package/dist/popover-BtN_0ejj.js +113 -0
- package/dist/popover.js +1 -1
- package/dist/progress-BpJswTG4.js +90 -0
- package/dist/progress.js +1 -1
- package/dist/radio-group-Ce0_IWQr.js +145 -0
- package/dist/radio-group.js +1 -1
- package/dist/select-BCS0-LVW.js +286 -0
- package/dist/select.js +1 -1
- package/dist/skeleton-OoFlOEXO.js +54 -0
- package/dist/skeleton.js +1 -1
- package/dist/spinner-C2YDoiMn.js +56 -0
- package/dist/spinner.js +1 -1
- package/dist/stack-DC3IbtWk.js +27 -0
- package/dist/stack.js +1 -1
- package/dist/switch-Dr-qjmT4.js +142 -0
- package/dist/switch.js +1 -1
- package/dist/sx-Dx9JUKp5.js +23 -0
- package/dist/tabs-CK_g1RKa.js +203 -0
- package/dist/tabs.js +1 -1
- package/dist/{text-field-8PQAqRpM.js → text-field-D60ok14S.js} +19 -18
- package/dist/text-field.js +1 -1
- package/dist/{textarea-CcGWuntL.js → textarea-DyfjtP0A.js} +19 -18
- package/dist/textarea.js +1 -1
- package/dist/theme-root-BiXXvQvr.js +42 -0
- package/dist/theme-root.js +1 -1
- package/dist/toast-iqelR-r0.js +282 -0
- package/dist/toast.js +1 -1
- package/dist/toggle-group-CI0e7hFm.js +166 -0
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip-CB-HC1js.js +108 -0
- package/dist/tooltip.js +1 -1
- package/dist/{trigger-style-B1GFmH7M.js → trigger-style-B1KVC8O1.js} +1 -1
- package/dist/types/components/accordion/accordion.d.ts +9 -8
- package/dist/types/components/alert/alert.d.ts +3 -2
- package/dist/types/components/avatar/avatar.d.ts +3 -2
- package/dist/types/components/badge/badge.d.ts +3 -2
- package/dist/types/components/breadcrumbs/breadcrumbs.d.ts +5 -4
- package/dist/types/components/button/button.d.ts +3 -2
- package/dist/types/components/calendar/calendar.d.ts +7 -6
- package/dist/types/components/card/card.d.ts +13 -12
- package/dist/types/components/checkbox/checkbox.d.ts +3 -2
- package/dist/types/components/combobox/combobox.d.ts +8 -7
- package/dist/types/components/command-palette/command-palette.d.ts +15 -14
- package/dist/types/components/container/container.d.ts +3 -2
- package/dist/types/components/date-picker/date-picker.d.ts +3 -2
- package/dist/types/components/dialog/dialog.d.ts +11 -10
- package/dist/types/components/divider/divider.d.ts +3 -2
- package/dist/types/components/field/field-anatomy.d.ts +3 -2
- package/dist/types/components/flex/flex.d.ts +3 -2
- package/dist/types/components/kbd/kbd.d.ts +5 -4
- package/dist/types/components/menu/menu.d.ts +9 -8
- package/dist/types/components/navigation/navigation.d.ts +7 -6
- package/dist/types/components/pagination/pagination.d.ts +3 -2
- package/dist/types/components/pill/pill.d.ts +3 -2
- package/dist/types/components/popover/popover.d.ts +5 -4
- package/dist/types/components/progress/progress.d.ts +3 -2
- package/dist/types/components/radio-group/radio-group.d.ts +5 -4
- package/dist/types/components/select/select.d.ts +9 -8
- package/dist/types/components/skeleton/skeleton.d.ts +3 -2
- package/dist/types/components/spinner/spinner.d.ts +3 -2
- package/dist/types/components/stack/stack.d.ts +1 -1
- package/dist/types/components/switch/switch.d.ts +3 -2
- package/dist/types/components/tabs/tabs.d.ts +9 -8
- package/dist/types/components/text-field/text-field.d.ts +3 -2
- package/dist/types/components/textarea/textarea.d.ts +3 -2
- package/dist/types/components/theme-provider/theme-provider.d.ts +11 -0
- package/dist/types/components/theme-root/theme-root.d.ts +3 -2
- package/dist/types/components/toast/toast.d.ts +3 -2
- package/dist/types/components/toggle-group/toggle-group.d.ts +5 -4
- package/dist/types/components/tooltip/tooltip.d.ts +5 -4
- package/dist/types/index.d.ts +4 -0
- package/dist/types/styling/css.d.ts +3 -2
- package/dist/types/styling/styled.d.ts +1 -0
- package/dist/types/styling/sx.d.ts +16 -0
- package/dist/types/styling/theme.d.ts +98 -0
- package/dist/{visually-hidden-DCWhf0Cb.js → visually-hidden-BJdvqqvn.js} +1 -1
- package/package.json +3 -2
- package/dist/accordion-CkOZ-tvs.js +0 -178
- package/dist/alert-Dsjx14UW.js +0 -131
- package/dist/avatar-BRGKkoSr.js +0 -127
- package/dist/badge-DLxUMsCx.js +0 -104
- package/dist/breadcrumbs-694hF_hm.js +0 -131
- package/dist/button-CoaIcykB.js +0 -190
- package/dist/calendar-Doj7PTdG.js +0 -379
- package/dist/card-2IM71XZj.js +0 -134
- package/dist/checkbox-B7xGNFzp.js +0 -136
- package/dist/combobox-Bjhxv5U3.js +0 -311
- package/dist/command-palette-BhJwm6cS.js +0 -344
- package/dist/container-BhnrGPu-.js +0 -36
- package/dist/css-Cgj6sCHn.js +0 -2
- package/dist/date-picker-Jk8SpoiO.js +0 -245
- package/dist/dialog-fhS07G41.js +0 -187
- package/dist/divider-v_78HYF5.js +0 -79
- package/dist/field-anatomy-BzGw1Ch9.js +0 -105
- package/dist/flex-COZzFqI8.js +0 -22
- package/dist/kbd-CeP8Kfvp.js +0 -61
- package/dist/menu-B6KCbLCr.js +0 -196
- package/dist/navigation-BDht6S2-.js +0 -182
- package/dist/pagination-B50PCaDU.js +0 -151
- package/dist/pill-2_XzBdkD.js +0 -51
- package/dist/popover-DRHbeIVq.js +0 -103
- package/dist/progress-CpsskKTD.js +0 -85
- package/dist/radio-group-DPI5KUCj.js +0 -136
- package/dist/select-C1xGrOhT.js +0 -266
- package/dist/skeleton-DitdP-yz.js +0 -49
- package/dist/spinner-CFq5HPoo.js +0 -51
- package/dist/stack-D_g6NJzo.js +0 -21
- package/dist/switch-B5TTU-oJ.js +0 -138
- package/dist/tabs-C26PWl2c.js +0 -183
- package/dist/theme-root-BRLIA4eb.js +0 -22
- package/dist/toast-B1PXuwZ4.js +0 -277
- package/dist/toggle-group-N_owicT0.js +0 -156
- package/dist/tooltip-BJPisf60.js +0 -98
package/dist/tooltip-BJPisf60.js
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./css-Cgj6sCHn.js";
|
|
3
|
-
import { t } from "./use-controlled-state-CVXDa-qM.js";
|
|
4
|
-
import { t as n } from "./trigger-style-B1GFmH7M.js";
|
|
5
|
-
import { t as r } from "./use-overlay-floating-efeqppiw.js";
|
|
6
|
-
import { createContext as i, useContext as a, useMemo as o } from "react";
|
|
7
|
-
import { vars as s } from "@jfrader/tokens/vars";
|
|
8
|
-
import { jsx as c } from "@emotion/react/jsx-runtime";
|
|
9
|
-
import { FloatingPortal as l, useDismiss as u, useFocus as d, useHover as f, useInteractions as p, useMergeRefs as m, useRole as h } from "@floating-ui/react";
|
|
10
|
-
//#region src/components/tooltip/tooltip.tsx
|
|
11
|
-
var g = 300, _ = 100, v = i(null);
|
|
12
|
-
function y(e) {
|
|
13
|
-
let t = a(v);
|
|
14
|
-
if (!t) throw Error(`Tooltip.${e} must be rendered inside <Tooltip>.`);
|
|
15
|
-
return t;
|
|
16
|
-
}
|
|
17
|
-
var b = e({
|
|
18
|
-
boxSizing: "border-box",
|
|
19
|
-
backgroundColor: s.color.bgSoft,
|
|
20
|
-
border: `1px solid ${s.color.border}`,
|
|
21
|
-
borderRadius: s.radius.sm,
|
|
22
|
-
boxShadow: s.shadow.raised,
|
|
23
|
-
padding: `${s.space[1]} ${s.space[2]}`,
|
|
24
|
-
maxInlineSize: "260px",
|
|
25
|
-
color: s.color.text,
|
|
26
|
-
fontFamily: s.font.sans,
|
|
27
|
-
fontSize: s.textSize.sm,
|
|
28
|
-
lineHeight: s.lineHeight.base
|
|
29
|
-
});
|
|
30
|
-
function x({ open: e, defaultOpen: n = !1, onOpenChange: i, placement: a = "top", openDelay: s = g, closeDelay: l = _, children: m }) {
|
|
31
|
-
let [y = !1, b] = t(e, n, i), { refs: x, floatingStyles: S, context: C } = r({
|
|
32
|
-
open: y,
|
|
33
|
-
placement: a,
|
|
34
|
-
onOpenChange: b
|
|
35
|
-
}), w = f(C, {
|
|
36
|
-
delay: {
|
|
37
|
-
open: s,
|
|
38
|
-
close: l
|
|
39
|
-
},
|
|
40
|
-
move: !1
|
|
41
|
-
}), T = d(C), E = u(C, { escapeKey: !0 }), D = h(C, { role: "tooltip" }), { getReferenceProps: O, getFloatingProps: k } = p([
|
|
42
|
-
w,
|
|
43
|
-
T,
|
|
44
|
-
E,
|
|
45
|
-
D
|
|
46
|
-
]), A = o(() => ({
|
|
47
|
-
open: y,
|
|
48
|
-
refs: x,
|
|
49
|
-
floatingStyles: S,
|
|
50
|
-
getReferenceProps: O,
|
|
51
|
-
getFloatingProps: k
|
|
52
|
-
}), [
|
|
53
|
-
y,
|
|
54
|
-
x,
|
|
55
|
-
S,
|
|
56
|
-
O,
|
|
57
|
-
k
|
|
58
|
-
]);
|
|
59
|
-
return /* @__PURE__ */ c(v.Provider, {
|
|
60
|
-
value: A,
|
|
61
|
-
children: m
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
x.displayName = "Tooltip";
|
|
65
|
-
function S({ ref: e, "aria-describedby": t, ...r }) {
|
|
66
|
-
let { refs: i, getReferenceProps: a } = y("Trigger"), o = m([i.setReference, e]), s = a(r), l = [t, s["aria-describedby"]].filter(Boolean).join(" ") || void 0;
|
|
67
|
-
return /* @__PURE__ */ c("button", {
|
|
68
|
-
type: "button",
|
|
69
|
-
...s,
|
|
70
|
-
ref: o,
|
|
71
|
-
"aria-describedby": l,
|
|
72
|
-
"data-ui": "tooltip-trigger",
|
|
73
|
-
css: n
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
S.displayName = "Tooltip.Trigger";
|
|
77
|
-
function C({ ref: e, style: t, ...n }) {
|
|
78
|
-
let { open: r, refs: i, floatingStyles: a, getFloatingProps: o } = y("Content"), s = m([i.setFloating, e]);
|
|
79
|
-
if (!r) return null;
|
|
80
|
-
let { tabIndex: u, ...d } = o(n);
|
|
81
|
-
return /* @__PURE__ */ c(l, { children: /* @__PURE__ */ c("div", {
|
|
82
|
-
...d,
|
|
83
|
-
ref: s,
|
|
84
|
-
"data-ui": "tooltip",
|
|
85
|
-
style: {
|
|
86
|
-
...t,
|
|
87
|
-
...a
|
|
88
|
-
},
|
|
89
|
-
css: b
|
|
90
|
-
}) });
|
|
91
|
-
}
|
|
92
|
-
C.displayName = "Tooltip.Content";
|
|
93
|
-
var w = Object.assign(x, {
|
|
94
|
-
Trigger: S,
|
|
95
|
-
Content: C
|
|
96
|
-
});
|
|
97
|
-
//#endregion
|
|
98
|
-
export { w as t };
|