@hanzo/ui 8.0.65 → 8.0.68
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/backends/gui/accordion.cjs +69 -0
- package/dist/backends/gui/accordion.d.ts +57 -0
- package/dist/backends/gui/accordion.d.ts.map +1 -0
- package/dist/backends/gui/accordion.js +64 -0
- package/dist/backends/gui/accordion.js.map +1 -0
- package/dist/backends/gui/alert-dialog.cjs +91 -0
- package/dist/backends/gui/alert-dialog.d.ts +77 -0
- package/dist/backends/gui/alert-dialog.d.ts.map +1 -0
- package/dist/backends/gui/alert-dialog.js +79 -0
- package/dist/backends/gui/alert-dialog.js.map +1 -0
- package/dist/backends/gui/context-menu.cjs +189 -0
- package/dist/backends/gui/context-menu.d.ts +116 -0
- package/dist/backends/gui/context-menu.d.ts.map +1 -0
- package/dist/backends/gui/context-menu.js +140 -0
- package/dist/backends/gui/context-menu.js.map +1 -0
- package/dist/backends/gui/dropdown-menu.d.ts +1 -1
- package/dist/backends/gui/hover-card.cjs +76 -0
- package/dist/backends/gui/hover-card.d.ts +57 -0
- package/dist/backends/gui/hover-card.d.ts.map +1 -0
- package/dist/backends/gui/hover-card.js +72 -0
- package/dist/backends/gui/hover-card.js.map +1 -0
- package/dist/backends/gui/index.cjs +53 -3
- package/dist/backends/gui/index.d.ts +7 -1
- package/dist/backends/gui/index.d.ts.map +1 -1
- package/dist/backends/gui/index.js +12 -1
- package/dist/backends/gui/index.js.map +1 -1
- package/dist/backends/gui/input.cjs +7 -1
- package/dist/backends/gui/input.d.ts.map +1 -1
- package/dist/backends/gui/input.js +7 -1
- package/dist/backends/gui/input.js.map +1 -1
- package/dist/backends/gui/layout.cjs +3 -2
- package/dist/backends/gui/layout.d.ts +1 -1
- package/dist/backends/gui/layout.d.ts.map +1 -1
- package/dist/backends/gui/layout.js +2 -2
- package/dist/backends/gui/layout.js.map +1 -1
- package/dist/backends/gui/radio-group.cjs +47 -0
- package/dist/backends/gui/radio-group.d.ts +36 -0
- package/dist/backends/gui/radio-group.d.ts.map +1 -0
- package/dist/backends/gui/radio-group.js +44 -0
- package/dist/backends/gui/radio-group.js.map +1 -0
- package/dist/backends/gui/select.cjs +6 -1
- package/dist/backends/gui/select.d.ts.map +1 -1
- package/dist/backends/gui/select.js +6 -1
- package/dist/backends/gui/select.js.map +1 -1
- package/dist/backends/gui/toggle-group.cjs +114 -0
- package/dist/backends/gui/toggle-group.d.ts +57 -0
- package/dist/backends/gui/toggle-group.d.ts.map +1 -0
- package/dist/backends/gui/toggle-group.js +112 -0
- package/dist/backends/gui/toggle-group.js.map +1 -0
- package/dist/gallery.cjs +2 -2
- package/dist/gallery.d.ts.map +1 -1
- package/dist/gallery.js +3 -3
- package/dist/gallery.js.map +1 -1
- package/dist/glass.css +117 -0
- package/dist/index.cjs +91 -4
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -3
- package/dist/index.js.map +1 -1
- package/dist/primitives/Accordion.cjs +8 -0
- package/dist/primitives/Accordion.d.ts +2 -0
- package/dist/primitives/Accordion.d.ts.map +1 -0
- package/dist/primitives/Accordion.js +5 -0
- package/dist/primitives/Accordion.js.map +1 -0
- package/dist/primitives/AccordionContent.cjs +8 -0
- package/dist/primitives/AccordionContent.d.ts +2 -0
- package/dist/primitives/AccordionContent.d.ts.map +1 -0
- package/dist/primitives/AccordionContent.js +5 -0
- package/dist/primitives/AccordionContent.js.map +1 -0
- package/dist/primitives/AccordionItem.cjs +8 -0
- package/dist/primitives/AccordionItem.d.ts +2 -0
- package/dist/primitives/AccordionItem.d.ts.map +1 -0
- package/dist/primitives/AccordionItem.js +5 -0
- package/dist/primitives/AccordionItem.js.map +1 -0
- package/dist/primitives/AccordionTrigger.cjs +8 -0
- package/dist/primitives/AccordionTrigger.d.ts +2 -0
- package/dist/primitives/AccordionTrigger.d.ts.map +1 -0
- package/dist/primitives/AccordionTrigger.js +5 -0
- package/dist/primitives/AccordionTrigger.js.map +1 -0
- package/dist/primitives/AlertDialog.cjs +8 -0
- package/dist/primitives/AlertDialog.d.ts +2 -0
- package/dist/primitives/AlertDialog.d.ts.map +1 -0
- package/dist/primitives/AlertDialog.js +5 -0
- package/dist/primitives/AlertDialog.js.map +1 -0
- package/dist/primitives/AlertDialogAction.cjs +8 -0
- package/dist/primitives/AlertDialogAction.d.ts +2 -0
- package/dist/primitives/AlertDialogAction.d.ts.map +1 -0
- package/dist/primitives/AlertDialogAction.js +5 -0
- package/dist/primitives/AlertDialogAction.js.map +1 -0
- package/dist/primitives/AlertDialogCancel.cjs +8 -0
- package/dist/primitives/AlertDialogCancel.d.ts +2 -0
- package/dist/primitives/AlertDialogCancel.d.ts.map +1 -0
- package/dist/primitives/AlertDialogCancel.js +5 -0
- package/dist/primitives/AlertDialogCancel.js.map +1 -0
- package/dist/primitives/AlertDialogContent.cjs +8 -0
- package/dist/primitives/AlertDialogContent.d.ts +2 -0
- package/dist/primitives/AlertDialogContent.d.ts.map +1 -0
- package/dist/primitives/AlertDialogContent.js +5 -0
- package/dist/primitives/AlertDialogContent.js.map +1 -0
- package/dist/primitives/AlertDialogDescription.cjs +8 -0
- package/dist/primitives/AlertDialogDescription.d.ts +2 -0
- package/dist/primitives/AlertDialogDescription.d.ts.map +1 -0
- package/dist/primitives/AlertDialogDescription.js +5 -0
- package/dist/primitives/AlertDialogDescription.js.map +1 -0
- package/dist/primitives/AlertDialogFooter.cjs +8 -0
- package/dist/primitives/AlertDialogFooter.d.ts +2 -0
- package/dist/primitives/AlertDialogFooter.d.ts.map +1 -0
- package/dist/primitives/AlertDialogFooter.js +5 -0
- package/dist/primitives/AlertDialogFooter.js.map +1 -0
- package/dist/primitives/AlertDialogHeader.cjs +8 -0
- package/dist/primitives/AlertDialogHeader.d.ts +2 -0
- package/dist/primitives/AlertDialogHeader.d.ts.map +1 -0
- package/dist/primitives/AlertDialogHeader.js +5 -0
- package/dist/primitives/AlertDialogHeader.js.map +1 -0
- package/dist/primitives/AlertDialogOverlay.cjs +8 -0
- package/dist/primitives/AlertDialogOverlay.d.ts +2 -0
- package/dist/primitives/AlertDialogOverlay.d.ts.map +1 -0
- package/dist/primitives/AlertDialogOverlay.js +5 -0
- package/dist/primitives/AlertDialogOverlay.js.map +1 -0
- package/dist/primitives/AlertDialogPortal.cjs +8 -0
- package/dist/primitives/AlertDialogPortal.d.ts +2 -0
- package/dist/primitives/AlertDialogPortal.d.ts.map +1 -0
- package/dist/primitives/AlertDialogPortal.js +5 -0
- package/dist/primitives/AlertDialogPortal.js.map +1 -0
- package/dist/primitives/AlertDialogTitle.cjs +8 -0
- package/dist/primitives/AlertDialogTitle.d.ts +2 -0
- package/dist/primitives/AlertDialogTitle.d.ts.map +1 -0
- package/dist/primitives/AlertDialogTitle.js +5 -0
- package/dist/primitives/AlertDialogTitle.js.map +1 -0
- package/dist/primitives/AlertDialogTrigger.cjs +8 -0
- package/dist/primitives/AlertDialogTrigger.d.ts +2 -0
- package/dist/primitives/AlertDialogTrigger.d.ts.map +1 -0
- package/dist/primitives/AlertDialogTrigger.js +5 -0
- package/dist/primitives/AlertDialogTrigger.js.map +1 -0
- package/dist/primitives/Anchor.cjs +8 -0
- package/dist/primitives/Anchor.d.ts +2 -0
- package/dist/primitives/Anchor.d.ts.map +1 -0
- package/dist/primitives/Anchor.js +5 -0
- package/dist/primitives/Anchor.js.map +1 -0
- package/dist/primitives/HoverCard.cjs +8 -0
- package/dist/primitives/HoverCard.d.ts +2 -0
- package/dist/primitives/HoverCard.d.ts.map +1 -0
- package/dist/primitives/HoverCard.js +5 -0
- package/dist/primitives/HoverCard.js.map +1 -0
- package/dist/primitives/HoverCardContent.cjs +8 -0
- package/dist/primitives/HoverCardContent.d.ts +2 -0
- package/dist/primitives/HoverCardContent.d.ts.map +1 -0
- package/dist/primitives/HoverCardContent.js +5 -0
- package/dist/primitives/HoverCardContent.js.map +1 -0
- package/dist/primitives/HoverCardTrigger.cjs +8 -0
- package/dist/primitives/HoverCardTrigger.d.ts +2 -0
- package/dist/primitives/HoverCardTrigger.d.ts.map +1 -0
- package/dist/primitives/HoverCardTrigger.js +5 -0
- package/dist/primitives/HoverCardTrigger.js.map +1 -0
- package/dist/primitives/RadioGroup.cjs +8 -0
- package/dist/primitives/RadioGroup.d.ts +2 -0
- package/dist/primitives/RadioGroup.d.ts.map +1 -0
- package/dist/primitives/RadioGroup.js +5 -0
- package/dist/primitives/RadioGroup.js.map +1 -0
- package/dist/primitives/RadioGroupItem.cjs +8 -0
- package/dist/primitives/RadioGroupItem.d.ts +2 -0
- package/dist/primitives/RadioGroupItem.d.ts.map +1 -0
- package/dist/primitives/RadioGroupItem.js +5 -0
- package/dist/primitives/RadioGroupItem.js.map +1 -0
- package/dist/primitives/ToggleGroup.cjs +8 -0
- package/dist/primitives/ToggleGroup.d.ts +2 -0
- package/dist/primitives/ToggleGroup.d.ts.map +1 -0
- package/dist/primitives/ToggleGroup.js +5 -0
- package/dist/primitives/ToggleGroup.js.map +1 -0
- package/dist/primitives/ToggleGroupItem.cjs +8 -0
- package/dist/primitives/ToggleGroupItem.d.ts +2 -0
- package/dist/primitives/ToggleGroupItem.d.ts.map +1 -0
- package/dist/primitives/ToggleGroupItem.js +5 -0
- package/dist/primitives/ToggleGroupItem.js.map +1 -0
- package/dist/product/Field.cjs +8 -3
- package/dist/product/Field.d.ts.map +1 -1
- package/dist/product/Field.js +8 -3
- package/dist/product/Field.js.map +1 -1
- package/dist/product/PrimaryButton.cjs +12 -0
- package/dist/product/PrimaryButton.d.ts.map +1 -1
- package/dist/product/PrimaryButton.js +12 -0
- package/dist/product/PrimaryButton.js.map +1 -1
- package/dist/styles.css +167 -1
- package/dist/theme.css +117 -0
- package/package.json +1 -1
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* HoverCard — the rich preview a pointer opens by resting on a trigger.
|
|
5
|
+
*
|
|
6
|
+
* gui ships no HoverCard primitive, but it ships the thing a hover card IS: a
|
|
7
|
+
* `Popover` in hover mode. `hoverable` puts floating-ui's `useHover` +
|
|
8
|
+
* `safePolygon` on the same popper the Popover already uses, so the cursor can
|
|
9
|
+
* travel the gap into the panel without it closing, and `useFocus` opens it from
|
|
10
|
+
* the keyboard. Nothing here re-implements hover timing, positioning or dismiss.
|
|
11
|
+
*
|
|
12
|
+
* TWO RENAMES, and they are the only two. Both are unavoidable — gui keeps on the
|
|
13
|
+
* popper ROOT what Radix put on the children — so both are absorbed HERE and the
|
|
14
|
+
* Radix call site is unchanged:
|
|
15
|
+
*
|
|
16
|
+
* 1. `openDelay` / `closeDelay` (root) -> one `hoverable={{ delay: {open, close} }}`.
|
|
17
|
+
* Radix's own defaults (700 / 300) are kept.
|
|
18
|
+
* 2. `side` + `align` + `sideOffset` (Content) -> ONE `placement` and one
|
|
19
|
+
* `offset` on the ROOT. Content still ACCEPTS all three and publishes them
|
|
20
|
+
* up through a context — the same idiom `popover.tsx` uses for `sideOffset`
|
|
21
|
+
* — so `<HoverCardContent side="left" align="start">` lands as
|
|
22
|
+
* `placement="left-start"` instead of being silently dropped, which is what
|
|
23
|
+
* `PopoverContent` does with `align` today. gui's popper and Radix agree on
|
|
24
|
+
* the default here (`bottom`/`center`), so nothing has to be written out.
|
|
25
|
+
*
|
|
26
|
+
* One deliberate a11y deviation from Radix, in the safer direction. Radix's hover
|
|
27
|
+
* card is sighted-user-only: its Content carries no role and its Trigger no aria
|
|
28
|
+
* state. Riding gui's popper gives the trigger `aria-expanded` and the panel
|
|
29
|
+
* `role="dialog"`, opens on keyboard FOCUS as well as hover, and closes on
|
|
30
|
+
* Escape through the dismissable layer. That is strictly more reachable than the
|
|
31
|
+
* component it replaces, so it is kept rather than suppressed.
|
|
32
|
+
*
|
|
33
|
+
* Press is NOT a trigger (`disablePressTrigger`): Radix's hover card never
|
|
34
|
+
* toggled on click, and its trigger is usually a link whose click must navigate.
|
|
35
|
+
*
|
|
36
|
+
* `HoverCardContent` re-applies the trigger's resolved theme inside the portal
|
|
37
|
+
* via `PortalTheme` — gui portals re-root the subtree, so theme context does not
|
|
38
|
+
* flow. `GuiPopover.Content` portals itself, so there is no `HoverCardPortal`,
|
|
39
|
+
* exactly as there is no `PopoverPortal`.
|
|
40
|
+
*/
|
|
41
|
+
import { Popover as GuiPopover } from '@hanzo/gui';
|
|
42
|
+
import { createContext, useCallback, useContext, useEffect, useState, } from 'react';
|
|
43
|
+
import { ink } from './ink.js';
|
|
44
|
+
import { slot } from './slot.js';
|
|
45
|
+
import { PortalTheme, useThemeName } from '../../product/menu/portal-theme.js';
|
|
46
|
+
/** Radix's defaults, kept so a migrated call site behaves identically. */
|
|
47
|
+
const OPEN_DELAY = 700;
|
|
48
|
+
const CLOSE_DELAY = 300;
|
|
49
|
+
const DEFAULT_OFFSET = 4;
|
|
50
|
+
/** Radix/shadcn ship `w-64`. */
|
|
51
|
+
const WIDTH = 256;
|
|
52
|
+
/** Root-owned floating geometry. Content publishes into it; see rename 2 above. */
|
|
53
|
+
const FloatContext = /* @__PURE__ */ createContext(null);
|
|
54
|
+
function HoverCard({ openDelay = OPEN_DELAY, closeDelay = CLOSE_DELAY, ...props }) {
|
|
55
|
+
const [float, setFloat] = useState({
|
|
56
|
+
placement: 'bottom',
|
|
57
|
+
offset: DEFAULT_OFFSET,
|
|
58
|
+
});
|
|
59
|
+
// Identity-stable: an unchanged publish returns the same object, so Content's
|
|
60
|
+
// effect cannot drive a render loop.
|
|
61
|
+
const publish = useCallback((placement, offset) => setFloat((f) => (f.placement === placement && f.offset === offset ? f : { placement, offset })), []);
|
|
62
|
+
return (_jsx(FloatContext.Provider, { value: publish, children: _jsx(GuiPopover, { hoverable: { delay: { open: openDelay, close: closeDelay } }, placement: float.placement, offset: float.offset, ...props }) }));
|
|
63
|
+
}
|
|
64
|
+
const HoverCardTrigger = (props) => (_jsx(GuiPopover.Trigger, { ...slot('hover-card-trigger'), disablePressTrigger: true, ...props }));
|
|
65
|
+
const HoverCardContent = ({ side = 'bottom', align = 'center', sideOffset = DEFAULT_OFFSET, children, ...props }) => {
|
|
66
|
+
const themeName = useThemeName();
|
|
67
|
+
const publish = useContext(FloatContext);
|
|
68
|
+
useEffect(() => publish?.(align === 'center' ? side : `${side}-${align}`, sideOffset), [publish, side, align, sideOffset]);
|
|
69
|
+
return (_jsx(PortalTheme, { name: themeName, children: _jsx(GuiPopover.Content, { ...slot('hover-card-content'), bg: "$color2", borderWidth: 1, borderColor: "$borderColor", rounded: "$4", p: "$4", width: WIDTH, ...props, children: ink(children, undefined, { size: '$2' }) }) }));
|
|
70
|
+
};
|
|
71
|
+
export { HoverCard, HoverCardTrigger, HoverCardContent };
|
|
72
|
+
//# sourceMappingURL=hover-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hover-card.js","sourceRoot":"","sources":["../../../src/backends/gui/hover-card.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,EACL,aAAa,EACb,WAAW,EACX,UAAU,EACV,SAAS,EACT,QAAQ,GAET,MAAM,OAAO,CAAA;AAEd,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAE3E,0EAA0E;AAC1E,MAAM,UAAU,GAAG,GAAG,CAAA;AACtB,MAAM,WAAW,GAAG,GAAG,CAAA;AACvB,MAAM,cAAc,GAAG,CAAC,CAAA;AACxB,gCAAgC;AAChC,MAAM,KAAK,GAAG,GAAG,CAAA;AAMjB,mFAAmF;AACnF,MAAM,YAAY,GAAG,eAAe,CAAC,aAAa,CAEhD,IAAI,CAAC,CAAA;AAU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AAG,UAAU,CAAC,YAAY,CAAC,CAAA;IACxC,SAAS,CACP,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAE,GAAG,IAAI,IAAI,KAAK,EAAgB,EAAE,UAAU,CAAC,EAC1F,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,CAAC,CACnC,CAAA;IACD,OAAO,CACL,KAAC,WAAW,IAAC,IAAI,EAAE,SAAS,YAC1B,KAAC,UAAU,CAAC,OAAO,OACb,IAAI,CAAC,oBAAoB,CAAC,EAC9B,EAAE,EAAC,SAAS,EACZ,WAAW,EAAE,CAAC,EACd,WAAW,EAAC,cAAc,EAC1B,OAAO,EAAC,IAAI,EACZ,CAAC,EAAC,IAAI,EACN,KAAK,EAAE,KAAK,KACR,KAAK,YAER,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,GACtB,GACT,CACf,CAAA;AACH,CAAC,CAAA;AAED,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -16,9 +16,27 @@
|
|
|
16
16
|
// one room. Re-run after changing the surface:
|
|
17
17
|
// node scripts/gen-primitives.mjs
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
19
|
+
exports.ContextMenuRadioItem = exports.ContextMenuCheckboxItem = exports.ContextMenuItem = exports.ContextMenuContent = exports.ContextMenuTrigger = exports.ContextMenu = exports.CommandSeparator = exports.CommandShortcut = exports.CommandItem = exports.CommandGroup = exports.CommandEmpty = exports.CommandList = exports.CommandInput = exports.CommandDialog = exports.Command = exports.CollapsibleContent = exports.CollapsibleTrigger = exports.Collapsible = exports.Checkbox = exports.CardMedia = exports.CardContent = exports.CardDescription = exports.CardAction = exports.CardTitle = exports.CardFooter = exports.CardHeader = exports.Card = exports.buttonVariants = exports.Button = exports.badgeVariants = exports.Badge = exports.AvatarFallback = exports.AvatarImage = exports.Avatar = exports.AspectRatio = exports.AlertDialogCancel = exports.AlertDialogAction = exports.AlertDialogDescription = exports.AlertDialogTitle = exports.AlertDialogFooter = exports.AlertDialogHeader = exports.AlertDialogContent = exports.AlertDialogOverlay = exports.AlertDialogPortal = exports.AlertDialogTrigger = exports.AlertDialog = exports.AccordionContent = exports.AccordionTrigger = exports.AccordionItem = exports.Accordion = void 0;
|
|
20
|
+
exports.ResizablePanelGroup = exports.RadioGroupItem = exports.RadioGroup = exports.Progress = exports.PopoverClose = exports.PopoverAnchor = exports.PopoverContent = exports.PopoverTrigger = exports.Popover = exports.Label = exports.Input = exports.HoverCardContent = exports.HoverCardTrigger = exports.HoverCard = exports.Grid = exports.Glass = exports.DropdownMenuRadioGroup = exports.DropdownMenuSubTrigger = exports.DropdownMenuSubContent = exports.DropdownMenuSub = exports.DropdownMenuPortal = exports.DropdownMenuGroup = exports.DropdownMenuShortcut = exports.DropdownMenuSeparator = exports.DropdownMenuLabel = exports.DropdownMenuRadioItem = exports.DropdownMenuCheckboxItem = exports.DropdownMenuItem = exports.DropdownMenuContent = exports.DropdownMenuTrigger = exports.DropdownMenu = exports.DialogTrigger = exports.DialogTitle = exports.DialogPortal = exports.DialogOverlay = exports.DialogHeader = exports.DialogFooter = exports.DialogDescription = exports.DialogContent = exports.DialogClose = exports.Dialog = exports.ContextMenuRadioGroup = exports.ContextMenuSubTrigger = exports.ContextMenuSubContent = exports.ContextMenuSub = exports.ContextMenuPortal = exports.ContextMenuGroup = exports.ContextMenuShortcut = exports.ContextMenuSeparator = exports.ContextMenuLabel = void 0;
|
|
21
|
+
exports.TooltipTrigger = exports.Tooltip = exports.ToggleGroupItem = exports.ToggleGroup = exports.toast = exports.Toaster = exports.Textarea = exports.TabsContent = exports.TabsTrigger = exports.TabsList = exports.Tabs = exports.Switch = exports.Slider = exports.Separator = exports.Section = exports.SelectScrollDownButton = exports.SelectScrollUpButton = exports.SelectSeparator = exports.SelectItem = exports.SelectLabel = exports.SelectContent = exports.SelectTrigger = exports.SelectValue = exports.SelectGroup = exports.Select = exports.ScrollBar = exports.ScrollArea = exports.Text = exports.View = exports.ScrollView = exports.Spacer = exports.Image = exports.Anchor = exports.Em = exports.Strong = exports.Span = exports.H6 = exports.H5 = exports.H4 = exports.H3 = exports.H2 = exports.H1 = exports.Heading = exports.Paragraph = exports.SizableText = exports.ZStack = exports.YStack = exports.XStack = exports.ResizableHandle = exports.ResizablePanel = void 0;
|
|
22
|
+
exports.TooltipProvider = exports.TooltipContent = void 0;
|
|
23
|
+
var accordion_1 = require("./accordion.cjs");
|
|
24
|
+
Object.defineProperty(exports, "Accordion", { enumerable: true, get: function () { return accordion_1.Accordion; } });
|
|
25
|
+
Object.defineProperty(exports, "AccordionItem", { enumerable: true, get: function () { return accordion_1.AccordionItem; } });
|
|
26
|
+
Object.defineProperty(exports, "AccordionTrigger", { enumerable: true, get: function () { return accordion_1.AccordionTrigger; } });
|
|
27
|
+
Object.defineProperty(exports, "AccordionContent", { enumerable: true, get: function () { return accordion_1.AccordionContent; } });
|
|
28
|
+
var alert_dialog_1 = require("./alert-dialog.cjs");
|
|
29
|
+
Object.defineProperty(exports, "AlertDialog", { enumerable: true, get: function () { return alert_dialog_1.AlertDialog; } });
|
|
30
|
+
Object.defineProperty(exports, "AlertDialogTrigger", { enumerable: true, get: function () { return alert_dialog_1.AlertDialogTrigger; } });
|
|
31
|
+
Object.defineProperty(exports, "AlertDialogPortal", { enumerable: true, get: function () { return alert_dialog_1.AlertDialogPortal; } });
|
|
32
|
+
Object.defineProperty(exports, "AlertDialogOverlay", { enumerable: true, get: function () { return alert_dialog_1.AlertDialogOverlay; } });
|
|
33
|
+
Object.defineProperty(exports, "AlertDialogContent", { enumerable: true, get: function () { return alert_dialog_1.AlertDialogContent; } });
|
|
34
|
+
Object.defineProperty(exports, "AlertDialogHeader", { enumerable: true, get: function () { return alert_dialog_1.AlertDialogHeader; } });
|
|
35
|
+
Object.defineProperty(exports, "AlertDialogFooter", { enumerable: true, get: function () { return alert_dialog_1.AlertDialogFooter; } });
|
|
36
|
+
Object.defineProperty(exports, "AlertDialogTitle", { enumerable: true, get: function () { return alert_dialog_1.AlertDialogTitle; } });
|
|
37
|
+
Object.defineProperty(exports, "AlertDialogDescription", { enumerable: true, get: function () { return alert_dialog_1.AlertDialogDescription; } });
|
|
38
|
+
Object.defineProperty(exports, "AlertDialogAction", { enumerable: true, get: function () { return alert_dialog_1.AlertDialogAction; } });
|
|
39
|
+
Object.defineProperty(exports, "AlertDialogCancel", { enumerable: true, get: function () { return alert_dialog_1.AlertDialogCancel; } });
|
|
22
40
|
var aspect_ratio_1 = require("./aspect-ratio.cjs");
|
|
23
41
|
Object.defineProperty(exports, "AspectRatio", { enumerable: true, get: function () { return aspect_ratio_1.AspectRatio; } });
|
|
24
42
|
var avatar_1 = require("./avatar.cjs");
|
|
@@ -56,6 +74,27 @@ Object.defineProperty(exports, "CommandGroup", { enumerable: true, get: function
|
|
|
56
74
|
Object.defineProperty(exports, "CommandItem", { enumerable: true, get: function () { return command_1.CommandItem; } });
|
|
57
75
|
Object.defineProperty(exports, "CommandShortcut", { enumerable: true, get: function () { return command_1.CommandShortcut; } });
|
|
58
76
|
Object.defineProperty(exports, "CommandSeparator", { enumerable: true, get: function () { return command_1.CommandSeparator; } });
|
|
77
|
+
// The compound, shadcn-shaped ContextMenu. `@hanzo/ui/product` still exports a
|
|
78
|
+
// DIFFERENT, declarative `ContextMenu` (`trigger` + `items`) — the two names now
|
|
79
|
+
// collide across subpaths exactly as DropdownMenu's did before it collapsed onto
|
|
80
|
+
// one component here. Same collapse is owed to this one; it needs
|
|
81
|
+
// dropdown-menu.tsx's private `renderSpec` hoisted onto a shared module first.
|
|
82
|
+
var context_menu_1 = require("./context-menu.cjs");
|
|
83
|
+
Object.defineProperty(exports, "ContextMenu", { enumerable: true, get: function () { return context_menu_1.ContextMenu; } });
|
|
84
|
+
Object.defineProperty(exports, "ContextMenuTrigger", { enumerable: true, get: function () { return context_menu_1.ContextMenuTrigger; } });
|
|
85
|
+
Object.defineProperty(exports, "ContextMenuContent", { enumerable: true, get: function () { return context_menu_1.ContextMenuContent; } });
|
|
86
|
+
Object.defineProperty(exports, "ContextMenuItem", { enumerable: true, get: function () { return context_menu_1.ContextMenuItem; } });
|
|
87
|
+
Object.defineProperty(exports, "ContextMenuCheckboxItem", { enumerable: true, get: function () { return context_menu_1.ContextMenuCheckboxItem; } });
|
|
88
|
+
Object.defineProperty(exports, "ContextMenuRadioItem", { enumerable: true, get: function () { return context_menu_1.ContextMenuRadioItem; } });
|
|
89
|
+
Object.defineProperty(exports, "ContextMenuLabel", { enumerable: true, get: function () { return context_menu_1.ContextMenuLabel; } });
|
|
90
|
+
Object.defineProperty(exports, "ContextMenuSeparator", { enumerable: true, get: function () { return context_menu_1.ContextMenuSeparator; } });
|
|
91
|
+
Object.defineProperty(exports, "ContextMenuShortcut", { enumerable: true, get: function () { return context_menu_1.ContextMenuShortcut; } });
|
|
92
|
+
Object.defineProperty(exports, "ContextMenuGroup", { enumerable: true, get: function () { return context_menu_1.ContextMenuGroup; } });
|
|
93
|
+
Object.defineProperty(exports, "ContextMenuPortal", { enumerable: true, get: function () { return context_menu_1.ContextMenuPortal; } });
|
|
94
|
+
Object.defineProperty(exports, "ContextMenuSub", { enumerable: true, get: function () { return context_menu_1.ContextMenuSub; } });
|
|
95
|
+
Object.defineProperty(exports, "ContextMenuSubContent", { enumerable: true, get: function () { return context_menu_1.ContextMenuSubContent; } });
|
|
96
|
+
Object.defineProperty(exports, "ContextMenuSubTrigger", { enumerable: true, get: function () { return context_menu_1.ContextMenuSubTrigger; } });
|
|
97
|
+
Object.defineProperty(exports, "ContextMenuRadioGroup", { enumerable: true, get: function () { return context_menu_1.ContextMenuRadioGroup; } });
|
|
59
98
|
var dialog_1 = require("./dialog.cjs");
|
|
60
99
|
Object.defineProperty(exports, "Dialog", { enumerable: true, get: function () { return dialog_1.Dialog; } });
|
|
61
100
|
Object.defineProperty(exports, "DialogClose", { enumerable: true, get: function () { return dialog_1.DialogClose; } });
|
|
@@ -87,6 +126,10 @@ var glass_1 = require("./glass.cjs");
|
|
|
87
126
|
Object.defineProperty(exports, "Glass", { enumerable: true, get: function () { return glass_1.Glass; } });
|
|
88
127
|
var grid_1 = require("./grid.cjs");
|
|
89
128
|
Object.defineProperty(exports, "Grid", { enumerable: true, get: function () { return grid_1.Grid; } });
|
|
129
|
+
var hover_card_1 = require("./hover-card.cjs");
|
|
130
|
+
Object.defineProperty(exports, "HoverCard", { enumerable: true, get: function () { return hover_card_1.HoverCard; } });
|
|
131
|
+
Object.defineProperty(exports, "HoverCardTrigger", { enumerable: true, get: function () { return hover_card_1.HoverCardTrigger; } });
|
|
132
|
+
Object.defineProperty(exports, "HoverCardContent", { enumerable: true, get: function () { return hover_card_1.HoverCardContent; } });
|
|
90
133
|
var input_1 = require("./input.cjs");
|
|
91
134
|
Object.defineProperty(exports, "Input", { enumerable: true, get: function () { return input_1.Input; } });
|
|
92
135
|
var label_1 = require("./label.cjs");
|
|
@@ -99,6 +142,9 @@ Object.defineProperty(exports, "PopoverAnchor", { enumerable: true, get: functio
|
|
|
99
142
|
Object.defineProperty(exports, "PopoverClose", { enumerable: true, get: function () { return popover_1.PopoverClose; } });
|
|
100
143
|
var progress_1 = require("./progress.cjs");
|
|
101
144
|
Object.defineProperty(exports, "Progress", { enumerable: true, get: function () { return progress_1.Progress; } });
|
|
145
|
+
var radio_group_1 = require("./radio-group.cjs");
|
|
146
|
+
Object.defineProperty(exports, "RadioGroup", { enumerable: true, get: function () { return radio_group_1.RadioGroup; } });
|
|
147
|
+
Object.defineProperty(exports, "RadioGroupItem", { enumerable: true, get: function () { return radio_group_1.RadioGroupItem; } });
|
|
102
148
|
var resizable_1 = require("./resizable.cjs");
|
|
103
149
|
Object.defineProperty(exports, "ResizablePanelGroup", { enumerable: true, get: function () { return resizable_1.ResizablePanelGroup; } });
|
|
104
150
|
Object.defineProperty(exports, "ResizablePanel", { enumerable: true, get: function () { return resizable_1.ResizablePanel; } });
|
|
@@ -122,6 +168,7 @@ Object.defineProperty(exports, "H6", { enumerable: true, get: function () { retu
|
|
|
122
168
|
Object.defineProperty(exports, "Span", { enumerable: true, get: function () { return layout_1.Span; } });
|
|
123
169
|
Object.defineProperty(exports, "Strong", { enumerable: true, get: function () { return layout_1.Strong; } });
|
|
124
170
|
Object.defineProperty(exports, "Em", { enumerable: true, get: function () { return layout_1.Em; } });
|
|
171
|
+
Object.defineProperty(exports, "Anchor", { enumerable: true, get: function () { return layout_1.Anchor; } });
|
|
125
172
|
Object.defineProperty(exports, "Image", { enumerable: true, get: function () { return layout_1.Image; } });
|
|
126
173
|
Object.defineProperty(exports, "Spacer", { enumerable: true, get: function () { return layout_1.Spacer; } });
|
|
127
174
|
Object.defineProperty(exports, "ScrollView", { enumerable: true, get: function () { return layout_1.ScrollView; } });
|
|
@@ -159,6 +206,9 @@ Object.defineProperty(exports, "Textarea", { enumerable: true, get: function ()
|
|
|
159
206
|
var toaster_1 = require("./toaster.cjs");
|
|
160
207
|
Object.defineProperty(exports, "Toaster", { enumerable: true, get: function () { return toaster_1.Toaster; } });
|
|
161
208
|
Object.defineProperty(exports, "toast", { enumerable: true, get: function () { return toaster_1.toast; } });
|
|
209
|
+
var toggle_group_1 = require("./toggle-group.cjs");
|
|
210
|
+
Object.defineProperty(exports, "ToggleGroup", { enumerable: true, get: function () { return toggle_group_1.ToggleGroup; } });
|
|
211
|
+
Object.defineProperty(exports, "ToggleGroupItem", { enumerable: true, get: function () { return toggle_group_1.ToggleGroupItem; } });
|
|
162
212
|
var tooltip_1 = require("./tooltip.cjs");
|
|
163
213
|
Object.defineProperty(exports, "Tooltip", { enumerable: true, get: function () { return tooltip_1.Tooltip; } });
|
|
164
214
|
Object.defineProperty(exports, "TooltipTrigger", { enumerable: true, get: function () { return tooltip_1.TooltipTrigger; } });
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent, type AccordionProps, type AccordionItemProps, type AccordionTriggerProps, type AccordionContentProps, } from './accordion.js';
|
|
2
|
+
export { AlertDialog, AlertDialogTrigger, AlertDialogPortal, AlertDialogOverlay, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, type AlertDialogProps, type AlertDialogOverlayProps, type AlertDialogContentProps, type AlertDialogSectionProps, } from './alert-dialog.js';
|
|
1
3
|
export { AspectRatio, type AspectRatioProps } from './aspect-ratio.js';
|
|
2
4
|
export { Avatar, AvatarImage, AvatarFallback } from './avatar.js';
|
|
3
5
|
export { Badge, badgeVariants, type BadgeProps, type BadgeVariant } from './badge.js';
|
|
@@ -6,16 +8,19 @@ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, C
|
|
|
6
8
|
export { Checkbox } from './checkbox.js';
|
|
7
9
|
export { Collapsible, CollapsibleTrigger, CollapsibleContent } from './collapsible.js';
|
|
8
10
|
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, type CommandFilter, type CommandProps, } from './command.js';
|
|
11
|
+
export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, type ContextMenuContentProps, type ContextMenuSubContentProps, type ContextMenuItemProps, } from './context-menu.js';
|
|
9
12
|
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, } from './dialog.js';
|
|
10
13
|
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, type DropdownMenuProps, } from './dropdown-menu.js';
|
|
11
14
|
export { Glass, type GlassProps } from './glass.js';
|
|
12
15
|
export { Grid, type GridProps } from './grid.js';
|
|
16
|
+
export { HoverCard, HoverCardTrigger, HoverCardContent, type HoverCardProps, type HoverCardTriggerProps, type HoverCardContentProps, } from './hover-card.js';
|
|
13
17
|
export { Input, type InputProps } from './input.js';
|
|
14
18
|
export { Label } from './label.js';
|
|
15
19
|
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverClose } from './popover.js';
|
|
16
20
|
export { Progress } from './progress.js';
|
|
21
|
+
export { RadioGroup, RadioGroupItem, type RadioGroupProps, type RadioGroupItemProps, } from './radio-group.js';
|
|
17
22
|
export { ResizablePanelGroup, ResizablePanel, ResizableHandle, type ResizablePanelGroupProps, type ResizablePanelProps, type ResizableHandleProps, } from './resizable.js';
|
|
18
|
-
export { XStack, YStack, ZStack, SizableText, Paragraph, Heading, H1, H2, H3, H4, H5, H6, Span, Strong, Em, Image, Spacer, ScrollView, View, Text, type GuiElement, } from './layout.js';
|
|
23
|
+
export { XStack, YStack, ZStack, SizableText, Paragraph, Heading, H1, H2, H3, H4, H5, H6, Span, Strong, Em, Anchor, Image, Spacer, ScrollView, View, Text, type GuiElement, } from './layout.js';
|
|
19
24
|
export { ScrollArea, ScrollBar } from './scroll-area.js';
|
|
20
25
|
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, } from './select.js';
|
|
21
26
|
export { Section, type SectionProps } from './section.js';
|
|
@@ -25,5 +30,6 @@ export { Switch } from './switch.js';
|
|
|
25
30
|
export { Tabs, TabsList, TabsTrigger, TabsContent } from './tabs.js';
|
|
26
31
|
export { Textarea } from './textarea.js';
|
|
27
32
|
export { Toaster, toast } from './toaster.js';
|
|
33
|
+
export { ToggleGroup, ToggleGroupItem, type ToggleGroupProps, type ToggleGroupItemProps, type ToggleGroupVariant, type ToggleGroupSize, } from './toggle-group.js';
|
|
28
34
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from './tooltip.js';
|
|
29
35
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/index.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAClF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAA;AACxG,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,EACX,SAAS,EACT,KAAK,cAAc,GACpB,MAAM,QAAQ,CAAA;AACf,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AACnF,OAAO,EACL,OAAO,EACP,aAAa,EACb,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/index.ts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W,EACX,eAAe,EACf,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,eAAe,GACrB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA"}
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
// entrypoints, so root, `./primitives` and `./primitives/*` are three doors into
|
|
15
15
|
// one room. Re-run after changing the surface:
|
|
16
16
|
// node scripts/gen-primitives.mjs
|
|
17
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent, } from './accordion.js';
|
|
18
|
+
export { AlertDialog, AlertDialogTrigger, AlertDialogPortal, AlertDialogOverlay, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, } from './alert-dialog.js';
|
|
17
19
|
export { AspectRatio } from './aspect-ratio.js';
|
|
18
20
|
export { Avatar, AvatarImage, AvatarFallback } from './avatar.js';
|
|
19
21
|
export { Badge, badgeVariants } from './badge.js';
|
|
@@ -22,19 +24,27 @@ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, C
|
|
|
22
24
|
export { Checkbox } from './checkbox.js';
|
|
23
25
|
export { Collapsible, CollapsibleTrigger, CollapsibleContent } from './collapsible.js';
|
|
24
26
|
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, } from './command.js';
|
|
27
|
+
// The compound, shadcn-shaped ContextMenu. `@hanzo/ui/product` still exports a
|
|
28
|
+
// DIFFERENT, declarative `ContextMenu` (`trigger` + `items`) — the two names now
|
|
29
|
+
// collide across subpaths exactly as DropdownMenu's did before it collapsed onto
|
|
30
|
+
// one component here. Same collapse is owed to this one; it needs
|
|
31
|
+
// dropdown-menu.tsx's private `renderSpec` hoisted onto a shared module first.
|
|
32
|
+
export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, } from './context-menu.js';
|
|
25
33
|
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, } from './dialog.js';
|
|
26
34
|
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, } from './dropdown-menu.js';
|
|
27
35
|
export { Glass } from './glass.js';
|
|
28
36
|
export { Grid } from './grid.js';
|
|
37
|
+
export { HoverCard, HoverCardTrigger, HoverCardContent, } from './hover-card.js';
|
|
29
38
|
export { Input } from './input.js';
|
|
30
39
|
export { Label } from './label.js';
|
|
31
40
|
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverClose } from './popover.js';
|
|
32
41
|
export { Progress } from './progress.js';
|
|
42
|
+
export { RadioGroup, RadioGroupItem, } from './radio-group.js';
|
|
33
43
|
export { ResizablePanelGroup, ResizablePanel, ResizableHandle, } from './resizable.js';
|
|
34
44
|
// The layout primitives. Without these an app cannot obey "import from
|
|
35
45
|
// @hanzo/ui" — it has to reach past this package to @hanzo/gui, which is how
|
|
36
46
|
// 216 files in hanzo.app ended up doing exactly that. See ./layout.
|
|
37
|
-
export { XStack, YStack, ZStack, SizableText, Paragraph, Heading, H1, H2, H3, H4, H5, H6, Span, Strong, Em, Image, Spacer, ScrollView, View, Text, } from './layout.js';
|
|
47
|
+
export { XStack, YStack, ZStack, SizableText, Paragraph, Heading, H1, H2, H3, H4, H5, H6, Span, Strong, Em, Anchor, Image, Spacer, ScrollView, View, Text, } from './layout.js';
|
|
38
48
|
export { ScrollArea, ScrollBar } from './scroll-area.js';
|
|
39
49
|
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, } from './select.js';
|
|
40
50
|
export { Section } from './section.js';
|
|
@@ -44,5 +54,6 @@ export { Switch } from './switch.js';
|
|
|
44
54
|
export { Tabs, TabsList, TabsTrigger, TabsContent } from './tabs.js';
|
|
45
55
|
export { Textarea } from './textarea.js';
|
|
46
56
|
export { Toaster, toast } from './toaster.js';
|
|
57
|
+
export { ToggleGroup, ToggleGroupItem, } from './toggle-group.js';
|
|
47
58
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from './tooltip.js';
|
|
48
59
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/backends/gui/index.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,EAAE;AACF,kFAAkF;AAClF,4EAA4E;AAC5E,uEAAuE;AACvE,EAAE;AACF,4EAA4E;AAC5E,iFAAiF;AACjF,+EAA+E;AAC/E,0BAA0B;AAC1B,EAAE;AACF,6DAA6D;AAC7D,6EAA6E;AAC7E,iFAAiF;AACjF,+CAA+C;AAC/C,oCAAoC;AAEpC,OAAO,EAAE,WAAW,EAAyB,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,EAAE,KAAK,EAAE,aAAa,EAAsC,MAAM,SAAS,CAAA;AAClF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAyD,MAAM,UAAU,CAAA;AACxG,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,EACX,SAAS,GAEV,MAAM,QAAQ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Ac,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA"}
|
|
@@ -33,7 +33,13 @@ const Input = /* @__PURE__ */ (0, react_1.forwardRef)(function Input({ startAdor
|
|
|
33
33
|
const [revealed, setRevealed] = (0, react_1.useState)(false);
|
|
34
34
|
const isPassword = type === 'password' || secureTextEntry === true;
|
|
35
35
|
const toggle = isPassword && reveal;
|
|
36
|
-
const field = ((0, jsx_runtime_1.jsx)(gui_1.Input, { ref: ref, ...(0, slot_1.slot)('input'), ...(isPassword ? (0, mask_1.masked)(!revealed) : { type, secureTextEntry }),
|
|
36
|
+
const field = ((0, jsx_runtime_1.jsx)(gui_1.Input, { ref: ref, ...(0, slot_1.slot)('input'), ...(isPassword ? (0, mask_1.masked)(!revealed) : { type, secureTextEntry }),
|
|
37
|
+
// A pin, and correct here. `<input>` is single-line: no children, no
|
|
38
|
+
// wrapping, so its content CANNOT exceed the box and there is nothing to
|
|
39
|
+
// clip. gui's Input does not accept `minHeight` at all, which is the type
|
|
40
|
+
// system saying the same thing. The floor rule is for controls that hold
|
|
41
|
+
// children — Button and SelectTrigger.
|
|
42
|
+
height: HEIGHT, width: "100%", minW: 0, rounded: "$3", bg: "transparent", borderWidth: 1, borderColor: "$borderColor", ...focus_1.FOCUS, placeholderTextColor: "$color10", fontSize: "$3", pl: startAdornment ? WELL : GUTTER, pr: endAdornment || toggle ? WELL : GUTTER, ...props }));
|
|
37
43
|
if (!startAdornment && !endAdornment && !toggle)
|
|
38
44
|
return field;
|
|
39
45
|
return ((0, jsx_runtime_1.jsxs)(gui_1.XStack, { position: "relative", width: "100%", items: "center", children: [startAdornment ? ((0, jsx_runtime_1.jsx)(gui_1.XStack, { ...well('l'), pointerEvents: "none", opacity: 0.6, children: startAdornment })) : null, field, toggle ? ((0, jsx_runtime_1.jsx)(gui_1.XStack, { ...well('r'), cursor: "pointer", ...(0, gesture_1.touch)(20), onPress: () => setRevealed((v) => !v), "aria-label": revealed ? 'Hide password' : 'Show password', children: revealed ? (0, jsx_runtime_1.jsx)(lucide_icons_2_1.EyeOff, { size: 16 }) : (0, jsx_runtime_1.jsx)(lucide_icons_2_1.Eye, { size: 16 }) })) : endAdornment ? ((0, jsx_runtime_1.jsx)(gui_1.XStack, { ...well('r'), opacity: 0.6, children: endAdornment })) : null] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/input.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAU,MAAM,YAAY,CAAA;AAEtD,OAAO,EAAwB,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAWjF,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,EAAE,UAAU,CAAC,GAAG;IAC3E,yEAAyE;IACzE,cAAc,CAAC,EAAE,SAAS,CAAA;IAC1B,8DAA8D;IAC9D,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAYD,QAAA,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/input.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAU,MAAM,YAAY,CAAA;AAEtD,OAAO,EAAwB,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAWjF,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,EAAE,UAAU,CAAC,GAAG;IAC3E,yEAAyE;IACzE,cAAc,CAAC,EAAE,SAAS,CAAA;IAC1B,8DAA8D;IAC9D,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAYD,QAAA,MAAM,KAAK,sHAwET,CAAA;AAEF,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
|
@@ -30,7 +30,13 @@ const Input = /* @__PURE__ */ forwardRef(function Input({ startAdornment, endAdo
|
|
|
30
30
|
const [revealed, setRevealed] = useState(false);
|
|
31
31
|
const isPassword = type === 'password' || secureTextEntry === true;
|
|
32
32
|
const toggle = isPassword && reveal;
|
|
33
|
-
const field = (_jsx(GuiInput, { ref: ref, ...slot('input'), ...(isPassword ? masked(!revealed) : { type, secureTextEntry }),
|
|
33
|
+
const field = (_jsx(GuiInput, { ref: ref, ...slot('input'), ...(isPassword ? masked(!revealed) : { type, secureTextEntry }),
|
|
34
|
+
// A pin, and correct here. `<input>` is single-line: no children, no
|
|
35
|
+
// wrapping, so its content CANNOT exceed the box and there is nothing to
|
|
36
|
+
// clip. gui's Input does not accept `minHeight` at all, which is the type
|
|
37
|
+
// system saying the same thing. The floor rule is for controls that hold
|
|
38
|
+
// children — Button and SelectTrigger.
|
|
39
|
+
height: HEIGHT, width: "100%", minW: 0, rounded: "$3", bg: "transparent", borderWidth: 1, borderColor: "$borderColor", ...FOCUS, placeholderTextColor: "$color10", fontSize: "$3", pl: startAdornment ? WELL : GUTTER, pr: endAdornment || toggle ? WELL : GUTTER, ...props }));
|
|
34
40
|
if (!startAdornment && !endAdornment && !toggle)
|
|
35
41
|
return field;
|
|
36
42
|
return (_jsxs(XStack, { position: "relative", width: "100%", items: "center", children: [startAdornment ? (_jsx(XStack, { ...well('l'), pointerEvents: "none", opacity: 0.6, children: startAdornment })) : null, field, toggle ? (_jsx(XStack, { ...well('r'), cursor: "pointer", ...touch(20), onPress: () => setRevealed((v) => !v), "aria-label": revealed ? 'Hide password' : 'Show password', children: revealed ? _jsx(EyeOff, { size: 16 }) : _jsx(Eye, { size: 16 }) })) : endAdornment ? (_jsx(XStack, { ...well('r'), opacity: 0.6, children: endAdornment })) : null] }));
|
|
@@ -1 +1 @@
|
|
|
1
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AAE,aAAa,EAAC,MAAM,EAAC,OAAO,EAAE,GAAG,YACrD,cAAc,GACR,CACV,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,EACL,MAAM,CAAC,CAAC,CAAC,CACR,KAAC,MAAM,OACD,IAAI,CAAC,GAAG,CAAC,EACb,MAAM,EAAC,SAAS,KACZ,KAAK,CAAC,EAAE,CAAC,EACb,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,gBACzB,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,eAAe,YAEvD,QAAQ,CAAC,CAAC,CAAC,KAAC,MAAM,IAAC,IAAI,EAAE,EAAE,GAAI,CAAC,CAAC,CAAC,KAAC,GAAG,IAAC,IAAI,EAAE,EAAE,GAAI,GAC7C,CACV,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CACjB,KAAC,MAAM,OAAK,IAAI,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,GAAG,YAChC,YAAY,GACN,CACV,CAAC,CAAC,CAAC,IAAI,IACD,CACV,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';"use strict";
|
|
2
2
|
'use client';
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Text = exports.View = exports.ScrollView = exports.Spacer = exports.Image = exports.Em = exports.Strong = exports.Span = exports.H6 = exports.H5 = exports.H4 = exports.H3 = exports.H2 = exports.H1 = exports.Heading = exports.Paragraph = exports.SizableText = exports.ZStack = exports.YStack = exports.XStack = void 0;
|
|
4
|
+
exports.Text = exports.View = exports.ScrollView = exports.Spacer = exports.Image = exports.Anchor = exports.Em = exports.Strong = exports.Span = exports.H6 = exports.H5 = exports.H4 = exports.H3 = exports.H2 = exports.H1 = exports.Heading = exports.Paragraph = exports.SizableText = exports.ZStack = exports.YStack = exports.XStack = void 0;
|
|
5
5
|
/**
|
|
6
6
|
* LAYOUT — the primitives an app lays a screen out with.
|
|
7
7
|
*
|
|
@@ -46,7 +46,8 @@ Object.defineProperty(exports, "H6", { enumerable: true, get: function () { retu
|
|
|
46
46
|
Object.defineProperty(exports, "Span", { enumerable: true, get: function () { return gui_1.Span; } });
|
|
47
47
|
Object.defineProperty(exports, "Strong", { enumerable: true, get: function () { return gui_1.Strong; } });
|
|
48
48
|
Object.defineProperty(exports, "Em", { enumerable: true, get: function () { return gui_1.Em; } });
|
|
49
|
-
// Leaves —
|
|
49
|
+
// Leaves — a link, an image, a gap, a scroller.
|
|
50
|
+
Object.defineProperty(exports, "Anchor", { enumerable: true, get: function () { return gui_1.Anchor; } });
|
|
50
51
|
Object.defineProperty(exports, "Image", { enumerable: true, get: function () { return gui_1.Image; } });
|
|
51
52
|
Object.defineProperty(exports, "Spacer", { enumerable: true, get: function () { return gui_1.Spacer; } });
|
|
52
53
|
Object.defineProperty(exports, "ScrollView", { enumerable: true, get: function () { return gui_1.ScrollView; } });
|
|
@@ -23,6 +23,6 @@
|
|
|
23
23
|
* boundary"), and a star also defeats tree-shaking, so importing XStack would
|
|
24
24
|
* drag the whole gui surface in. Same rule the root barrel already follows.
|
|
25
25
|
*/
|
|
26
|
-
export { XStack, YStack, ZStack, SizableText, Paragraph, Heading, H1, H2, H3, H4, H5, H6, Span, Strong, Em, Image, Spacer, ScrollView, View, Text, } from '@hanzo/gui';
|
|
26
|
+
export { XStack, YStack, ZStack, SizableText, Paragraph, Heading, H1, H2, H3, H4, H5, H6, Span, Strong, Em, Anchor, Image, Spacer, ScrollView, View, Text, } from '@hanzo/gui';
|
|
27
27
|
export type { GuiElement } from '@hanzo/gui';
|
|
28
28
|
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/layout.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAEL,MAAM,EACN,MAAM,EACN,MAAM,EAIN,WAAW,EACX,SAAS,EACT,OAAO,EACP,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,IAAI,EACJ,MAAM,EACN,EAAE,EAGF,KAAK,EACL,MAAM,EACN,UAAU,EAGV,IAAI,EACJ,IAAI,GACL,MAAM,YAAY,CAAA;AAEnB,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/layout.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAEL,MAAM,EACN,MAAM,EACN,MAAM,EAIN,WAAW,EACX,SAAS,EACT,OAAO,EACP,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,IAAI,EACJ,MAAM,EACN,EAAE,EAGF,MAAM,EACN,KAAK,EACL,MAAM,EACN,UAAU,EAGV,IAAI,EACJ,IAAI,GACL,MAAM,YAAY,CAAA;AAEnB,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -30,8 +30,8 @@ XStack, YStack, ZStack,
|
|
|
30
30
|
// Type scale — @hanzogui/text. `SizableText` is the workhorse; the headings
|
|
31
31
|
// carry the scale so a screen never hand-picks a font size.
|
|
32
32
|
SizableText, Paragraph, Heading, H1, H2, H3, H4, H5, H6, Span, Strong, Em,
|
|
33
|
-
// Leaves —
|
|
34
|
-
Image, Spacer, ScrollView,
|
|
33
|
+
// Leaves — a link, an image, a gap, a scroller.
|
|
34
|
+
Anchor, Image, Spacer, ScrollView,
|
|
35
35
|
// The untyped hosts, for the rare case a component needs a bare box.
|
|
36
36
|
View, Text, } from '@hanzo/gui';
|
|
37
37
|
//# sourceMappingURL=layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../src/backends/gui/layout.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO;AACL,4BAA4B;AAC5B,MAAM,EACN,MAAM,EACN,MAAM;AAEN,4EAA4E;AAC5E,4DAA4D;AAC5D,WAAW,EACX,SAAS,EACT,OAAO,EACP,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,IAAI,EACJ,MAAM,EACN,EAAE;AAEF,gDAAgD;AAChD,KAAK,EACL,MAAM,EACN,UAAU;AAEV,qEAAqE;AACrE,IAAI,EACJ,IAAI,GACL,MAAM,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../src/backends/gui/layout.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO;AACL,4BAA4B;AAC5B,MAAM,EACN,MAAM,EACN,MAAM;AAEN,4EAA4E;AAC5E,4DAA4D;AAC5D,WAAW,EACX,SAAS,EACT,OAAO,EACP,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,IAAI,EACJ,MAAM,EACN,EAAE;AAEF,gDAAgD;AAChD,MAAM,EACN,KAAK,EACL,MAAM,EACN,UAAU;AAEV,qEAAqE;AACrE,IAAI,EACJ,IAAI,GACL,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use client';"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.RadioGroupItem = exports.RadioGroup = void 0;
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
/**
|
|
7
|
+
* RadioGroup — one-of-many, on @hanzogui/radio-group.
|
|
8
|
+
*
|
|
9
|
+
* gui's `RadioGroup` already ships everything the Radix original shipped:
|
|
10
|
+
* `role="radiogroup"` on the frame, `role="radio"` + `aria-checked` +
|
|
11
|
+
* `data-state` on each item, roving arrow-key focus that loops, Enter/Space to
|
|
12
|
+
* select, and the hidden bubbling `<input type="radio">` that makes the group a
|
|
13
|
+
* real form control. This file only FLATTENS `RadioGroup.Item` +
|
|
14
|
+
* `RadioGroup.Indicator` into the two shadcn names and dresses them in Hanzo
|
|
15
|
+
* tokens, so `<RadioGroupItem value="x" />` carries its own dot exactly as the
|
|
16
|
+
* Radix fork it replaces did.
|
|
17
|
+
*
|
|
18
|
+
* NO RENAMES. value / defaultValue / onValueChange / name / required / disabled
|
|
19
|
+
* / orientation / id all mean what they meant under Radix.
|
|
20
|
+
*
|
|
21
|
+
* NOT EXPRESSIBLE — `loop` and `dir`. gui builds the roving focus group inside
|
|
22
|
+
* RadioGroup with `loop: true` fixed and takes direction from its own context,
|
|
23
|
+
* so neither prop has anywhere to land. Both are the Radix defaults, so no call
|
|
24
|
+
* site loses behaviour, and one that passed `loop={false}` gets a type error
|
|
25
|
+
* instead of a silent no-op — the failure you want from a layer that otherwise
|
|
26
|
+
* drops what it does not recognise.
|
|
27
|
+
*
|
|
28
|
+
* WORKED AROUND — `orientation="horizontal"` reached gui as `aria-orientation`
|
|
29
|
+
* and as the roving-focus axis but NOT as layout: `RadioGroup` destructures
|
|
30
|
+
* `orientation` for those two and never forwards it, so the frame's own
|
|
31
|
+
* `orientation` variant never runs and the group stays a COLUMN while
|
|
32
|
+
* announcing itself a row. The direction is restored here, from the same prop.
|
|
33
|
+
*/
|
|
34
|
+
const gui_1 = require("@hanzo/gui");
|
|
35
|
+
const slot_1 = require("./slot.cjs");
|
|
36
|
+
const gesture_1 = require("./gesture.cjs");
|
|
37
|
+
/** 16px control, 8px dot — the Checkbox's box, made round. */
|
|
38
|
+
const BOX = 16;
|
|
39
|
+
const DOT = 8;
|
|
40
|
+
const RadioGroup = ({ orientation = 'vertical', ...props }) => ((0, jsx_runtime_1.jsx)(gui_1.RadioGroup, { ...(0, slot_1.slot)('radio-group'), orientation: orientation, flexDirection: orientation === 'horizontal' ? 'row' : 'column', gap: "$2", ...props }));
|
|
41
|
+
exports.RadioGroup = RadioGroup;
|
|
42
|
+
const RadioGroupItem = ({ disabled, children, ...props }) => ((0, jsx_runtime_1.jsxs)(gui_1.RadioGroup.Item, { ...(0, slot_1.slot)('radio-group-item'), width: BOX, height: BOX, flexShrink: 0, borderRadius: 1000, borderWidth: 1, borderColor: "$borderColor", backgroundColor: "transparent",
|
|
43
|
+
// Stated rather than left to gui's `disabled` variant, which turns off
|
|
44
|
+
// pointer events without dimming: a dead control that looks live invites a
|
|
45
|
+
// click that does nothing. Same treatment as Switch.
|
|
46
|
+
disabled: disabled, opacity: disabled ? 0.5 : 1, cursor: disabled ? 'not-allowed' : 'pointer', ...(0, gesture_1.touch)(BOX), ...props, children: [(0, jsx_runtime_1.jsx)(gui_1.RadioGroup.Indicator, { ...(0, slot_1.slot)('radio-group-indicator'), width: DOT, height: DOT, borderRadius: 1000, backgroundColor: "$color12" }), children] }));
|
|
47
|
+
exports.RadioGroupItem = RadioGroupItem;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RadioGroup — one-of-many, on @hanzogui/radio-group.
|
|
3
|
+
*
|
|
4
|
+
* gui's `RadioGroup` already ships everything the Radix original shipped:
|
|
5
|
+
* `role="radiogroup"` on the frame, `role="radio"` + `aria-checked` +
|
|
6
|
+
* `data-state` on each item, roving arrow-key focus that loops, Enter/Space to
|
|
7
|
+
* select, and the hidden bubbling `<input type="radio">` that makes the group a
|
|
8
|
+
* real form control. This file only FLATTENS `RadioGroup.Item` +
|
|
9
|
+
* `RadioGroup.Indicator` into the two shadcn names and dresses them in Hanzo
|
|
10
|
+
* tokens, so `<RadioGroupItem value="x" />` carries its own dot exactly as the
|
|
11
|
+
* Radix fork it replaces did.
|
|
12
|
+
*
|
|
13
|
+
* NO RENAMES. value / defaultValue / onValueChange / name / required / disabled
|
|
14
|
+
* / orientation / id all mean what they meant under Radix.
|
|
15
|
+
*
|
|
16
|
+
* NOT EXPRESSIBLE — `loop` and `dir`. gui builds the roving focus group inside
|
|
17
|
+
* RadioGroup with `loop: true` fixed and takes direction from its own context,
|
|
18
|
+
* so neither prop has anywhere to land. Both are the Radix defaults, so no call
|
|
19
|
+
* site loses behaviour, and one that passed `loop={false}` gets a type error
|
|
20
|
+
* instead of a silent no-op — the failure you want from a layer that otherwise
|
|
21
|
+
* drops what it does not recognise.
|
|
22
|
+
*
|
|
23
|
+
* WORKED AROUND — `orientation="horizontal"` reached gui as `aria-orientation`
|
|
24
|
+
* and as the roving-focus axis but NOT as layout: `RadioGroup` destructures
|
|
25
|
+
* `orientation` for those two and never forwards it, so the frame's own
|
|
26
|
+
* `orientation` variant never runs and the group stays a COLUMN while
|
|
27
|
+
* announcing itself a row. The direction is restored here, from the same prop.
|
|
28
|
+
*/
|
|
29
|
+
import { RadioGroup as GuiRadioGroup } from '@hanzo/gui';
|
|
30
|
+
import type { ComponentProps } from 'react';
|
|
31
|
+
export type RadioGroupProps = ComponentProps<typeof GuiRadioGroup>;
|
|
32
|
+
export type RadioGroupItemProps = ComponentProps<typeof GuiRadioGroup.Item>;
|
|
33
|
+
declare const RadioGroup: ({ orientation, ...props }: RadioGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
declare const RadioGroupItem: ({ disabled, children, ...props }: RadioGroupItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export { RadioGroup, RadioGroupItem };
|
|
36
|
+
//# sourceMappingURL=radio-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/radio-group.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EAAE,UAAU,IAAI,aAAa,EAAE,MAAM,YAAY,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAQ3C,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,aAAa,CAAC,CAAA;AAClE,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,CAAA;AAE3E,QAAA,MAAM,UAAU,GAAI,2BAAwC,eAAe,4CAQ1E,CAAA;AAED,QAAA,MAAM,cAAc,GAAI,kCAAkC,mBAAmB,4CAgC5E,CAAA;AAED,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* RadioGroup — one-of-many, on @hanzogui/radio-group.
|
|
5
|
+
*
|
|
6
|
+
* gui's `RadioGroup` already ships everything the Radix original shipped:
|
|
7
|
+
* `role="radiogroup"` on the frame, `role="radio"` + `aria-checked` +
|
|
8
|
+
* `data-state` on each item, roving arrow-key focus that loops, Enter/Space to
|
|
9
|
+
* select, and the hidden bubbling `<input type="radio">` that makes the group a
|
|
10
|
+
* real form control. This file only FLATTENS `RadioGroup.Item` +
|
|
11
|
+
* `RadioGroup.Indicator` into the two shadcn names and dresses them in Hanzo
|
|
12
|
+
* tokens, so `<RadioGroupItem value="x" />` carries its own dot exactly as the
|
|
13
|
+
* Radix fork it replaces did.
|
|
14
|
+
*
|
|
15
|
+
* NO RENAMES. value / defaultValue / onValueChange / name / required / disabled
|
|
16
|
+
* / orientation / id all mean what they meant under Radix.
|
|
17
|
+
*
|
|
18
|
+
* NOT EXPRESSIBLE — `loop` and `dir`. gui builds the roving focus group inside
|
|
19
|
+
* RadioGroup with `loop: true` fixed and takes direction from its own context,
|
|
20
|
+
* so neither prop has anywhere to land. Both are the Radix defaults, so no call
|
|
21
|
+
* site loses behaviour, and one that passed `loop={false}` gets a type error
|
|
22
|
+
* instead of a silent no-op — the failure you want from a layer that otherwise
|
|
23
|
+
* drops what it does not recognise.
|
|
24
|
+
*
|
|
25
|
+
* WORKED AROUND — `orientation="horizontal"` reached gui as `aria-orientation`
|
|
26
|
+
* and as the roving-focus axis but NOT as layout: `RadioGroup` destructures
|
|
27
|
+
* `orientation` for those two and never forwards it, so the frame's own
|
|
28
|
+
* `orientation` variant never runs and the group stays a COLUMN while
|
|
29
|
+
* announcing itself a row. The direction is restored here, from the same prop.
|
|
30
|
+
*/
|
|
31
|
+
import { RadioGroup as GuiRadioGroup } from '@hanzo/gui';
|
|
32
|
+
import { slot } from './slot.js';
|
|
33
|
+
import { touch } from './gesture.js';
|
|
34
|
+
/** 16px control, 8px dot — the Checkbox's box, made round. */
|
|
35
|
+
const BOX = 16;
|
|
36
|
+
const DOT = 8;
|
|
37
|
+
const RadioGroup = ({ orientation = 'vertical', ...props }) => (_jsx(GuiRadioGroup, { ...slot('radio-group'), orientation: orientation, flexDirection: orientation === 'horizontal' ? 'row' : 'column', gap: "$2", ...props }));
|
|
38
|
+
const RadioGroupItem = ({ disabled, children, ...props }) => (_jsxs(GuiRadioGroup.Item, { ...slot('radio-group-item'), width: BOX, height: BOX, flexShrink: 0, borderRadius: 1000, borderWidth: 1, borderColor: "$borderColor", backgroundColor: "transparent",
|
|
39
|
+
// Stated rather than left to gui's `disabled` variant, which turns off
|
|
40
|
+
// pointer events without dimming: a dead control that looks live invites a
|
|
41
|
+
// click that does nothing. Same treatment as Switch.
|
|
42
|
+
disabled: disabled, opacity: disabled ? 0.5 : 1, cursor: disabled ? 'not-allowed' : 'pointer', ...touch(BOX), ...props, children: [_jsx(GuiRadioGroup.Indicator, { ...slot('radio-group-indicator'), width: DOT, height: DOT, borderRadius: 1000, backgroundColor: "$color12" }), children] }));
|
|
43
|
+
export { RadioGroup, RadioGroupItem };
|
|
44
|
+
//# sourceMappingURL=radio-group.js.map
|
|
@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,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,KACxC,KAAK,CAAC,GAAG,CAAC,KACV,KAAK,aAMT,KAAC,aAAa,CAAC,SAAS,OAClB,IAAI,CAAC,uBAAuB,CAAC,EACjC,KAAK,EAAE,GAAG,EACV,MAAM,EAAE,GAAG,EACX,YAAY,EAAE,IAAI,EAClB,eAAe,EAAC,UAAU,GAC1B,EACD,QAAQ,IACU,CACtB,CAAA;AAED,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -26,7 +26,12 @@ const SelectGroup = gui_1.Select.Group;
|
|
|
26
26
|
exports.SelectGroup = SelectGroup;
|
|
27
27
|
const SelectValue = gui_1.Select.Value;
|
|
28
28
|
exports.SelectValue = SelectValue;
|
|
29
|
-
const SelectTrigger = ({ children, ...props }) => ((0, jsx_runtime_1.jsxs)(gui_1.Select.Trigger, { ...(0, slot_1.slot)('select-trigger'), unstyled: true, items: "center", justify: "space-between", gap: "$2",
|
|
29
|
+
const SelectTrigger = ({ children, ...props }) => ((0, jsx_runtime_1.jsxs)(gui_1.Select.Trigger, { ...(0, slot_1.slot)('select-trigger'), unstyled: true, items: "center", justify: "space-between", gap: "$2",
|
|
30
|
+
// A FLOOR, not a pin. `height` alone clips a child taller than the box, and
|
|
31
|
+
// the build stays green while it does — that is why 01ac46dce moved Button
|
|
32
|
+
// off a pinned height. Select and Input kept theirs, so the same trap was
|
|
33
|
+
// still armed in the two controls that sit in every form.
|
|
34
|
+
height: "auto", minHeight: TRIGGER_H, px: "$3", rounded: "$3", borderWidth: 1, borderColor: "$borderColor", bg: "transparent", cursor: "pointer", ...(0, gesture_1.touch)(TRIGGER_H, 44, 'y'), ...props, children: [(0, ink_1.ink)(children, undefined, { size: '$3' }), (0, jsx_runtime_1.jsx)(gui_1.Select.Icon, { children: (0, jsx_runtime_1.jsx)(lucide_icons_2_1.ChevronDown, { size: 16, opacity: 0.5 }) })] }));
|
|
30
35
|
exports.SelectTrigger = SelectTrigger;
|
|
31
36
|
const SelectItem = ({ children, ...props }) => ((0, jsx_runtime_1.jsxs)(gui_1.Select.Item, { ...(0, slot_1.slot)('select-item'), unstyled: true, index: props.index ?? 0, items: "center", gap: "$2", minH: ROW_H, pl: "$2", pr: "$7", rounded: "$2", cursor: "pointer", ...(0, gesture_1.touch)(ROW_H, 44, 'y'), hoverStyle: { bg: '$color5' }, focusStyle: { bg: '$color5' }, ...props, children: [(0, jsx_runtime_1.jsx)(gui_1.Select.ItemText, { children: children }), (0, jsx_runtime_1.jsx)(gui_1.XStack, { position: "absolute", r: "$2", items: "center", justify: "center", pointerEvents: "none", children: (0, jsx_runtime_1.jsx)(gui_1.Select.ItemIndicator, { children: (0, jsx_runtime_1.jsx)(lucide_icons_2_1.Check, { size: 16 }) }) })] }));
|
|
32
37
|
exports.SelectItem = SelectItem;
|