@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/select.tsx"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,eAAe,IAA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
|
21
21
|
const SelectGroup = GuiSelect.Group;
|
|
22
22
|
const SelectValue = GuiSelect.Value;
|
|
23
|
-
const SelectTrigger = ({ children, ...props }) => (_jsxs(GuiSelect.Trigger, { ...slot('select-trigger'), unstyled: true, items: "center", justify: "space-between", gap: "$2",
|
|
23
|
+
const SelectTrigger = ({ children, ...props }) => (_jsxs(GuiSelect.Trigger, { ...slot('select-trigger'), unstyled: true, items: "center", justify: "space-between", gap: "$2",
|
|
24
|
+
// A FLOOR, not a pin. `height` alone clips a child taller than the box, and
|
|
25
|
+
// the build stays green while it does — that is why 01ac46dce moved Button
|
|
26
|
+
// off a pinned height. Select and Input kept theirs, so the same trap was
|
|
27
|
+
// still armed in the two controls that sit in every form.
|
|
28
|
+
height: "auto", minHeight: TRIGGER_H, px: "$3", rounded: "$3", borderWidth: 1, borderColor: "$borderColor", bg: "transparent", cursor: "pointer", ...touch(TRIGGER_H, 44, 'y'), ...props, children: [ink(children, undefined, { size: '$3' }), _jsx(GuiSelect.Icon, { children: _jsx(ChevronDown, { size: 16, opacity: 0.5 }) })] }));
|
|
24
29
|
const SelectItem = ({ children, ...props }) => (_jsxs(GuiSelect.Item, { ...slot('select-item'), unstyled: true, index: props.index ?? 0, items: "center", gap: "$2", minH: ROW_H, pl: "$2", pr: "$7", rounded: "$2", cursor: "pointer", ...touch(ROW_H, 44, 'y'), hoverStyle: { bg: '$color5' }, focusStyle: { bg: '$color5' }, ...props, children: [_jsx(GuiSelect.ItemText, { children: children }), _jsx(XStack, { position: "absolute", r: "$2", items: "center", justify: "center", pointerEvents: "none", children: _jsx(GuiSelect.ItemIndicator, { children: _jsx(Check, { size: 16 }) }) })] }));
|
|
25
30
|
/** Depth-first stamp of `index` onto every `SelectItem` in render order. */
|
|
26
31
|
const stampIndices = (children, next) => Children.map(children, (child) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../../src/backends/gui/select.tsx"],"names":[],"mappings":"AAAA,Y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,CAAC,KAAK,OAAK,IAAI,CAAC,cAAc,CAAC,EAAE,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,MAAM,EAAC,QAAQ,EAAC,IAAI,EAAC,KAAK,EAAC,UAAU,KAAK,KAAK,GAAI,CAC1G,CAAA;AAED,MAAM,eAAe,GAAG,CAAC,KAA2B,EAAE,EAAE,CAAC,CACvD,KAAC,kBAAkB,OAAK,IAAI,CAAC,kBAAkB,CAAC,EAAE,EAAE,EAAC,IAAI,EAAC,WAAW,EAAC,cAAc,KAAK,KAAK,GAAI,CACnG,CAAA;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,sBAAsB,GACvB,CAAA"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
'use client';"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ToggleGroup = ToggleGroup;
|
|
5
|
+
exports.ToggleGroupItem = ToggleGroupItem;
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
/**
|
|
8
|
+
* ToggleGroup — the segmented control, on @hanzogui/toggle-group.
|
|
9
|
+
*
|
|
10
|
+
* gui ships the group machinery (single/multiple selection, roving arrow-key
|
|
11
|
+
* focus, `data-state="on|off"`, `aria-pressed`), so this file flattens
|
|
12
|
+
* `ToggleGroup` + `ToggleGroup.Item` into the two shadcn names, adds the
|
|
13
|
+
* `variant`/`size` recipe those names carry, and repairs three things gui does
|
|
14
|
+
* not do for itself.
|
|
15
|
+
*
|
|
16
|
+
* NO RENAMES. type / value / defaultValue / onValueChange / disabled /
|
|
17
|
+
* orientation / rovingFocus / loop / dir / variant / size are the Radix +
|
|
18
|
+
* shadcn spellings, and `variant`/`size` still resolve the shadcn way: set on
|
|
19
|
+
* the GROUP they win for every item, otherwise each item decides for itself.
|
|
20
|
+
*
|
|
21
|
+
* WORKED AROUND, 1 — SELECTION WAS UNREADABLE TO A SCREEN READER in `single`
|
|
22
|
+
* mode. Radix gives a single-select group `role="radiogroup"` and each item
|
|
23
|
+
* `role="radio"` + `aria-checked`; gui keeps `role="group"` and, for single,
|
|
24
|
+
* deletes `aria-pressed` (correct — an exclusive choice is not a pressed
|
|
25
|
+
* button) without putting the radio semantics back. So the selected segment
|
|
26
|
+
* announced as an ordinary unlabelled button with no state at all. The roles
|
|
27
|
+
* are restored here, `toolbar` + `aria-pressed` for `multiple` exactly as Radix
|
|
28
|
+
* has it, and that is why this file mirrors the value at all: `aria-checked`
|
|
29
|
+
* needs to know which item is on, and gui's value context is internal.
|
|
30
|
+
*
|
|
31
|
+
* The mirror is not a second source of truth — it is THE source. gui is handed
|
|
32
|
+
* `value` + `onValueChange` from it, i.e. driven as a controlled component, so
|
|
33
|
+
* there is exactly one place the current value lives whether the call site
|
|
34
|
+
* controls it or not.
|
|
35
|
+
*
|
|
36
|
+
* WORKED AROUND, 2 — a horizontal group laid out VERTICALLY. `ToggleGroupImpl`
|
|
37
|
+
* consumes `orientation` for the roving-focus axis and never forwards it, and
|
|
38
|
+
* its frame is a plain `View`, which stacks. Radix's was a `<div>` that call
|
|
39
|
+
* sites made a row with `flex`. The axis is restored here from the same prop.
|
|
40
|
+
*
|
|
41
|
+
* WORKED AROUND, 3 — `size` on a gui toggle means a SQUARE (its variant sets
|
|
42
|
+
* width AND height from one token), which is not what `size="sm"` means on a
|
|
43
|
+
* labelled segment. Items render `unstyled` and this file supplies the whole
|
|
44
|
+
* recipe, so the shadcn ladder (height + horizontal padding + type scale) is
|
|
45
|
+
* what the prop actually does.
|
|
46
|
+
*/
|
|
47
|
+
const gui_1 = require("@hanzo/gui");
|
|
48
|
+
const react_1 = require("react");
|
|
49
|
+
const ink_1 = require("./ink.cjs");
|
|
50
|
+
const slot_1 = require("./slot.cjs");
|
|
51
|
+
const gesture_1 = require("./gesture.cjs");
|
|
52
|
+
/** Density ladder — the Button's, so a toggle and a button line up in a row. */
|
|
53
|
+
const HEIGHT = { default: 36, sm: 32, lg: 40 };
|
|
54
|
+
const PAD = { default: '$3', sm: '$2.5', lg: '$4' };
|
|
55
|
+
const TYPE = { default: '$3', sm: '$2', lg: '$3' };
|
|
56
|
+
/** Resting fill per variant. `outline` is the one that draws its own edge. */
|
|
57
|
+
const REST = {
|
|
58
|
+
default: {
|
|
59
|
+
backgroundColor: '$color3',
|
|
60
|
+
borderColor: 'transparent',
|
|
61
|
+
hoverStyle: { backgroundColor: '$color4' },
|
|
62
|
+
},
|
|
63
|
+
outline: {
|
|
64
|
+
backgroundColor: 'transparent',
|
|
65
|
+
borderColor: '$borderColor',
|
|
66
|
+
hoverStyle: { backgroundColor: '$color3' },
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* The ON treatment. gui merges `activeStyle` into hover and focus as well as
|
|
71
|
+
* rest, so the selected segment keeps its fill under the pointer — which is the
|
|
72
|
+
* whole reason this is `activeStyle` and not a conditional prop. Fill AND edge
|
|
73
|
+
* move together: one step of grey is what a segmented control has to say with,
|
|
74
|
+
* and the label brightens alongside it (see `ink` below).
|
|
75
|
+
*/
|
|
76
|
+
const ON = {
|
|
77
|
+
default: { backgroundColor: '$color6', borderColor: '$color7' },
|
|
78
|
+
outline: { backgroundColor: '$color5', borderColor: '$color7' },
|
|
79
|
+
};
|
|
80
|
+
/** The system's WCAG-checked ring — `unstyled` items lose gui's, so restore it. */
|
|
81
|
+
const RING = { outlineColor: '$outlineColor', outlineWidth: 2, outlineStyle: 'solid' };
|
|
82
|
+
const GroupContext = /* @__PURE__ */ (0, react_1.createContext)({
|
|
83
|
+
type: 'multiple',
|
|
84
|
+
selected: [],
|
|
85
|
+
});
|
|
86
|
+
function ToggleGroup({ type, value, defaultValue, onValueChange, orientation = 'horizontal', disableDeactivation, variant, size, disabled, children, ...props }) {
|
|
87
|
+
const [current, setCurrent] = (0, gui_1.useControllableState)({
|
|
88
|
+
prop: value,
|
|
89
|
+
defaultProp: defaultValue,
|
|
90
|
+
onChange: onValueChange,
|
|
91
|
+
});
|
|
92
|
+
const selected = current ? (Array.isArray(current) ? current : [current]) : [];
|
|
93
|
+
return ((0, jsx_runtime_1.jsx)(gui_1.ToggleGroup, { ...(0, slot_1.slot)('toggle-group'), ...{
|
|
94
|
+
type,
|
|
95
|
+
value: current,
|
|
96
|
+
onValueChange: setCurrent,
|
|
97
|
+
disableDeactivation,
|
|
98
|
+
}, role: type === 'single' ? 'radiogroup' : 'toolbar', orientation: orientation, disabled: disabled, flexDirection: orientation === 'vertical' ? 'column' : 'row', items: "center", gap: "$1", ...props, children: (0, jsx_runtime_1.jsx)(GroupContext.Provider, { value: { type, selected, variant, size, disabled }, children: children }) }));
|
|
99
|
+
}
|
|
100
|
+
function ToggleGroupItem({ variant, size, disabled, children, ...props }) {
|
|
101
|
+
const group = (0, react_1.useContext)(GroupContext);
|
|
102
|
+
const v = group.variant ?? variant ?? 'default';
|
|
103
|
+
const s = group.size ?? size ?? 'default';
|
|
104
|
+
const on = group.selected.includes(props.value);
|
|
105
|
+
const off = disabled || group.disabled;
|
|
106
|
+
return ((0, jsx_runtime_1.jsx)(gui_1.ToggleGroup.Item, { ...(0, slot_1.slot)('toggle-group-item'), "data-variant": v, "data-size": s,
|
|
107
|
+
// The two Radix semantics gui drops in `single` mode. `aria-pressed` is
|
|
108
|
+
// left alone for `multiple`, where gui already sets it from the same state.
|
|
109
|
+
role: group.type === 'single' ? 'radio' : undefined, "aria-checked": group.type === 'single' ? on : undefined, unstyled: true, flexDirection: "row", items: "center", justify: "center", height: HEIGHT[s], px: PAD[s], gap: "$1.5", borderWidth: 1, rounded: "$3", select: "none", disabled: off, opacity: off ? 0.5 : 1, cursor: off ? 'not-allowed' : 'pointer', focusVisibleStyle: RING, ...REST[v], activeStyle: ON[v], ...(0, gesture_1.touch)(HEIGHT[s], 44, 'y'), ...props, children: (0, ink_1.ink)(children, undefined, {
|
|
110
|
+
size: TYPE[s],
|
|
111
|
+
fontWeight: '500',
|
|
112
|
+
color: on ? '$color12' : '$color11',
|
|
113
|
+
}) }));
|
|
114
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ToggleGroup — the segmented control, on @hanzogui/toggle-group.
|
|
3
|
+
*
|
|
4
|
+
* gui ships the group machinery (single/multiple selection, roving arrow-key
|
|
5
|
+
* focus, `data-state="on|off"`, `aria-pressed`), so this file flattens
|
|
6
|
+
* `ToggleGroup` + `ToggleGroup.Item` into the two shadcn names, adds the
|
|
7
|
+
* `variant`/`size` recipe those names carry, and repairs three things gui does
|
|
8
|
+
* not do for itself.
|
|
9
|
+
*
|
|
10
|
+
* NO RENAMES. type / value / defaultValue / onValueChange / disabled /
|
|
11
|
+
* orientation / rovingFocus / loop / dir / variant / size are the Radix +
|
|
12
|
+
* shadcn spellings, and `variant`/`size` still resolve the shadcn way: set on
|
|
13
|
+
* the GROUP they win for every item, otherwise each item decides for itself.
|
|
14
|
+
*
|
|
15
|
+
* WORKED AROUND, 1 — SELECTION WAS UNREADABLE TO A SCREEN READER in `single`
|
|
16
|
+
* mode. Radix gives a single-select group `role="radiogroup"` and each item
|
|
17
|
+
* `role="radio"` + `aria-checked`; gui keeps `role="group"` and, for single,
|
|
18
|
+
* deletes `aria-pressed` (correct — an exclusive choice is not a pressed
|
|
19
|
+
* button) without putting the radio semantics back. So the selected segment
|
|
20
|
+
* announced as an ordinary unlabelled button with no state at all. The roles
|
|
21
|
+
* are restored here, `toolbar` + `aria-pressed` for `multiple` exactly as Radix
|
|
22
|
+
* has it, and that is why this file mirrors the value at all: `aria-checked`
|
|
23
|
+
* needs to know which item is on, and gui's value context is internal.
|
|
24
|
+
*
|
|
25
|
+
* The mirror is not a second source of truth — it is THE source. gui is handed
|
|
26
|
+
* `value` + `onValueChange` from it, i.e. driven as a controlled component, so
|
|
27
|
+
* there is exactly one place the current value lives whether the call site
|
|
28
|
+
* controls it or not.
|
|
29
|
+
*
|
|
30
|
+
* WORKED AROUND, 2 — a horizontal group laid out VERTICALLY. `ToggleGroupImpl`
|
|
31
|
+
* consumes `orientation` for the roving-focus axis and never forwards it, and
|
|
32
|
+
* its frame is a plain `View`, which stacks. Radix's was a `<div>` that call
|
|
33
|
+
* sites made a row with `flex`. The axis is restored here from the same prop.
|
|
34
|
+
*
|
|
35
|
+
* WORKED AROUND, 3 — `size` on a gui toggle means a SQUARE (its variant sets
|
|
36
|
+
* width AND height from one token), which is not what `size="sm"` means on a
|
|
37
|
+
* labelled segment. Items render `unstyled` and this file supplies the whole
|
|
38
|
+
* recipe, so the shadcn ladder (height + horizontal padding + type scale) is
|
|
39
|
+
* what the prop actually does.
|
|
40
|
+
*/
|
|
41
|
+
import { ToggleGroup as GuiToggleGroup } from '@hanzo/gui';
|
|
42
|
+
import { type ComponentProps, type ReactNode } from 'react';
|
|
43
|
+
export type ToggleGroupVariant = 'default' | 'outline';
|
|
44
|
+
export type ToggleGroupSize = 'default' | 'sm' | 'lg';
|
|
45
|
+
export type ToggleGroupProps = Omit<ComponentProps<typeof GuiToggleGroup>, 'size'> & {
|
|
46
|
+
variant?: ToggleGroupVariant;
|
|
47
|
+
size?: ToggleGroupSize;
|
|
48
|
+
children?: ReactNode;
|
|
49
|
+
};
|
|
50
|
+
declare function ToggleGroup({ type, value, defaultValue, onValueChange, orientation, disableDeactivation, variant, size, disabled, children, ...props }: ToggleGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
export type ToggleGroupItemProps = Omit<ComponentProps<typeof GuiToggleGroup.Item>, 'size'> & {
|
|
52
|
+
variant?: ToggleGroupVariant;
|
|
53
|
+
size?: ToggleGroupSize;
|
|
54
|
+
};
|
|
55
|
+
declare function ToggleGroupItem({ variant, size, disabled, children, ...props }: ToggleGroupItemProps): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
export { ToggleGroup, ToggleGroupItem };
|
|
57
|
+
//# sourceMappingURL=toggle-group.d.ts.map
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 +1,112 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* ToggleGroup — the segmented control, on @hanzogui/toggle-group.
|
|
5
|
+
*
|
|
6
|
+
* gui ships the group machinery (single/multiple selection, roving arrow-key
|
|
7
|
+
* focus, `data-state="on|off"`, `aria-pressed`), so this file flattens
|
|
8
|
+
* `ToggleGroup` + `ToggleGroup.Item` into the two shadcn names, adds the
|
|
9
|
+
* `variant`/`size` recipe those names carry, and repairs three things gui does
|
|
10
|
+
* not do for itself.
|
|
11
|
+
*
|
|
12
|
+
* NO RENAMES. type / value / defaultValue / onValueChange / disabled /
|
|
13
|
+
* orientation / rovingFocus / loop / dir / variant / size are the Radix +
|
|
14
|
+
* shadcn spellings, and `variant`/`size` still resolve the shadcn way: set on
|
|
15
|
+
* the GROUP they win for every item, otherwise each item decides for itself.
|
|
16
|
+
*
|
|
17
|
+
* WORKED AROUND, 1 — SELECTION WAS UNREADABLE TO A SCREEN READER in `single`
|
|
18
|
+
* mode. Radix gives a single-select group `role="radiogroup"` and each item
|
|
19
|
+
* `role="radio"` + `aria-checked`; gui keeps `role="group"` and, for single,
|
|
20
|
+
* deletes `aria-pressed` (correct — an exclusive choice is not a pressed
|
|
21
|
+
* button) without putting the radio semantics back. So the selected segment
|
|
22
|
+
* announced as an ordinary unlabelled button with no state at all. The roles
|
|
23
|
+
* are restored here, `toolbar` + `aria-pressed` for `multiple` exactly as Radix
|
|
24
|
+
* has it, and that is why this file mirrors the value at all: `aria-checked`
|
|
25
|
+
* needs to know which item is on, and gui's value context is internal.
|
|
26
|
+
*
|
|
27
|
+
* The mirror is not a second source of truth — it is THE source. gui is handed
|
|
28
|
+
* `value` + `onValueChange` from it, i.e. driven as a controlled component, so
|
|
29
|
+
* there is exactly one place the current value lives whether the call site
|
|
30
|
+
* controls it or not.
|
|
31
|
+
*
|
|
32
|
+
* WORKED AROUND, 2 — a horizontal group laid out VERTICALLY. `ToggleGroupImpl`
|
|
33
|
+
* consumes `orientation` for the roving-focus axis and never forwards it, and
|
|
34
|
+
* its frame is a plain `View`, which stacks. Radix's was a `<div>` that call
|
|
35
|
+
* sites made a row with `flex`. The axis is restored here from the same prop.
|
|
36
|
+
*
|
|
37
|
+
* WORKED AROUND, 3 — `size` on a gui toggle means a SQUARE (its variant sets
|
|
38
|
+
* width AND height from one token), which is not what `size="sm"` means on a
|
|
39
|
+
* labelled segment. Items render `unstyled` and this file supplies the whole
|
|
40
|
+
* recipe, so the shadcn ladder (height + horizontal padding + type scale) is
|
|
41
|
+
* what the prop actually does.
|
|
42
|
+
*/
|
|
43
|
+
import { ToggleGroup as GuiToggleGroup, useControllableState } from '@hanzo/gui';
|
|
44
|
+
import { createContext, useContext } from 'react';
|
|
45
|
+
import { ink } from './ink.js';
|
|
46
|
+
import { slot } from './slot.js';
|
|
47
|
+
import { touch } from './gesture.js';
|
|
48
|
+
/** Density ladder — the Button's, so a toggle and a button line up in a row. */
|
|
49
|
+
const HEIGHT = { default: 36, sm: 32, lg: 40 };
|
|
50
|
+
const PAD = { default: '$3', sm: '$2.5', lg: '$4' };
|
|
51
|
+
const TYPE = { default: '$3', sm: '$2', lg: '$3' };
|
|
52
|
+
/** Resting fill per variant. `outline` is the one that draws its own edge. */
|
|
53
|
+
const REST = {
|
|
54
|
+
default: {
|
|
55
|
+
backgroundColor: '$color3',
|
|
56
|
+
borderColor: 'transparent',
|
|
57
|
+
hoverStyle: { backgroundColor: '$color4' },
|
|
58
|
+
},
|
|
59
|
+
outline: {
|
|
60
|
+
backgroundColor: 'transparent',
|
|
61
|
+
borderColor: '$borderColor',
|
|
62
|
+
hoverStyle: { backgroundColor: '$color3' },
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* The ON treatment. gui merges `activeStyle` into hover and focus as well as
|
|
67
|
+
* rest, so the selected segment keeps its fill under the pointer — which is the
|
|
68
|
+
* whole reason this is `activeStyle` and not a conditional prop. Fill AND edge
|
|
69
|
+
* move together: one step of grey is what a segmented control has to say with,
|
|
70
|
+
* and the label brightens alongside it (see `ink` below).
|
|
71
|
+
*/
|
|
72
|
+
const ON = {
|
|
73
|
+
default: { backgroundColor: '$color6', borderColor: '$color7' },
|
|
74
|
+
outline: { backgroundColor: '$color5', borderColor: '$color7' },
|
|
75
|
+
};
|
|
76
|
+
/** The system's WCAG-checked ring — `unstyled` items lose gui's, so restore it. */
|
|
77
|
+
const RING = { outlineColor: '$outlineColor', outlineWidth: 2, outlineStyle: 'solid' };
|
|
78
|
+
const GroupContext = /* @__PURE__ */ createContext({
|
|
79
|
+
type: 'multiple',
|
|
80
|
+
selected: [],
|
|
81
|
+
});
|
|
82
|
+
function ToggleGroup({ type, value, defaultValue, onValueChange, orientation = 'horizontal', disableDeactivation, variant, size, disabled, children, ...props }) {
|
|
83
|
+
const [current, setCurrent] = useControllableState({
|
|
84
|
+
prop: value,
|
|
85
|
+
defaultProp: defaultValue,
|
|
86
|
+
onChange: onValueChange,
|
|
87
|
+
});
|
|
88
|
+
const selected = current ? (Array.isArray(current) ? current : [current]) : [];
|
|
89
|
+
return (_jsx(GuiToggleGroup, { ...slot('toggle-group'), ...{
|
|
90
|
+
type,
|
|
91
|
+
value: current,
|
|
92
|
+
onValueChange: setCurrent,
|
|
93
|
+
disableDeactivation,
|
|
94
|
+
}, role: type === 'single' ? 'radiogroup' : 'toolbar', orientation: orientation, disabled: disabled, flexDirection: orientation === 'vertical' ? 'column' : 'row', items: "center", gap: "$1", ...props, children: _jsx(GroupContext.Provider, { value: { type, selected, variant, size, disabled }, children: children }) }));
|
|
95
|
+
}
|
|
96
|
+
function ToggleGroupItem({ variant, size, disabled, children, ...props }) {
|
|
97
|
+
const group = useContext(GroupContext);
|
|
98
|
+
const v = group.variant ?? variant ?? 'default';
|
|
99
|
+
const s = group.size ?? size ?? 'default';
|
|
100
|
+
const on = group.selected.includes(props.value);
|
|
101
|
+
const off = disabled || group.disabled;
|
|
102
|
+
return (_jsx(GuiToggleGroup.Item, { ...slot('toggle-group-item'), "data-variant": v, "data-size": s,
|
|
103
|
+
// The two Radix semantics gui drops in `single` mode. `aria-pressed` is
|
|
104
|
+
// left alone for `multiple`, where gui already sets it from the same state.
|
|
105
|
+
role: group.type === 'single' ? 'radio' : undefined, "aria-checked": group.type === 'single' ? on : undefined, unstyled: true, flexDirection: "row", items: "center", justify: "center", height: HEIGHT[s], px: PAD[s], gap: "$1.5", borderWidth: 1, rounded: "$3", select: "none", disabled: off, opacity: off ? 0.5 : 1, cursor: off ? 'not-allowed' : 'pointer', focusVisibleStyle: RING, ...REST[v], activeStyle: ON[v], ...touch(HEIGHT[s], 44, 'y'), ...props, children: ink(children, undefined, {
|
|
106
|
+
size: TYPE[s],
|
|
107
|
+
fontWeight: '500',
|
|
108
|
+
color: on ? '$color12' : '$color11',
|
|
109
|
+
}) }));
|
|
110
|
+
}
|
|
111
|
+
export { ToggleGroup, ToggleGroupItem };
|
|
112
|
+
//# sourceMappingURL=toggle-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-group.js","sourceRoot":"","sources":["../../../src/backends/gui/toggle-group.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,OAAO,EAAE,WAAW,IAAI,cAAc,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAChF,OAAO,EAAE,aAAa,EAAE,UAAU,EAAuC,MAAM,OAAO,CAAA;AACtF,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AAKjC,gFAAgF;AAChF,MAAM,MAAM,GAAoC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EA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,EAAE,eAAe,EAAE,CAAA"}
|
package/dist/gallery.cjs
CHANGED
|
@@ -27,10 +27,10 @@ const Section = ({ name, children }) => ((0, jsx_runtime_1.jsx)("section", { "da
|
|
|
27
27
|
* Every component, once. `data-gallery` names each section so a browser test can
|
|
28
28
|
* scope its assertions without depending on document order.
|
|
29
29
|
*/
|
|
30
|
-
const Gallery = () => ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column', gap: 28, padding: 24, maxWidth: 928 }, children: [(0, jsx_runtime_1.jsxs)(Section, { name: "button", children: [BUTTON_VARIANTS.map((variant) => ((0, jsx_runtime_1.jsx)(gui_1.Button, { variant: variant, children: variant }, variant))), BUTTON_SIZES.map((size) => ((0, jsx_runtime_1.jsx)(gui_1.Button, { size: size, children: size }, size))), (0, jsx_runtime_1.jsx)(gui_1.Button, { disabled: true, children: "disabled" }), (0, jsx_runtime_1.jsx)(gui_1.Button, { isLoading: true, children: "loading" })] }), (0, jsx_runtime_1.jsx)(Section, { name: "badge", children: BADGE_VARIANTS.map((variant) => ((0, jsx_runtime_1.jsx)(gui_1.Badge, { variant: variant, children: variant }, variant))) }), (0, jsx_runtime_1.jsx)(Section, { name: "card", children: (0, jsx_runtime_1.jsxs)(gui_1.Card, { children: [(0, jsx_runtime_1.jsxs)(gui_1.CardHeader, { children: [(0, jsx_runtime_1.jsx)(gui_1.CardTitle, { children: "Card title" }), (0, jsx_runtime_1.jsx)(gui_1.CardDescription, { children: "Card description" }), (0, jsx_runtime_1.jsx)(gui_1.CardAction, { children: (0, jsx_runtime_1.jsx)(gui_1.Button, { size: "sm", variant: "ghost", children: "action" }) })] }), (0, jsx_runtime_1.jsx)(gui_1.CardContent, { children: "Card content" }), (0, jsx_runtime_1.jsx)(gui_1.CardFooter, { children: "Card footer" })] }) }), (0, jsx_runtime_1.jsxs)(Section, { name: "form", children: [(0, jsx_runtime_1.jsx)(gui_1.Label, { children: "Label" }), (0, jsx_runtime_1.jsx)(gui_1.Input, { placeholder: "Input" }), (0, jsx_runtime_1.jsx)(gui_1.Input, { placeholder: "Password", type: "password" }), (0, jsx_runtime_1.jsx)(gui_1.Textarea, { placeholder: "Textarea" }), (0, jsx_runtime_1.jsx)(gui_1.Checkbox, {}), (0, jsx_runtime_1.jsx)(gui_1.Checkbox, { checked: true }), (0, jsx_runtime_1.jsx)(gui_1.Switch, {}), (0, jsx_runtime_1.jsx)(gui_1.Switch, { checked: true }), (0, jsx_runtime_1.jsx)(gui_1.Slider, { defaultValue: [40] }), (0, jsx_runtime_1.jsx)(gui_1.Progress, { value: 40 })] }), (0, jsx_runtime_1.jsx)(Section, { name: "tabs", children: (0, jsx_runtime_1.jsxs)(gui_1.Tabs, { defaultValue: "one", children: [(0, jsx_runtime_1.jsxs)(gui_1.TabsList, { children: [(0, jsx_runtime_1.jsx)(gui_1.TabsTrigger, { value: "one", children: "One" }), (0, jsx_runtime_1.jsx)(gui_1.TabsTrigger, { value: "two", children: "Two" })] }), (0, jsx_runtime_1.jsx)(gui_1.TabsContent, { value: "one", children: "Panel one" })] }) }), (0, jsx_runtime_1.jsxs)(Section, { name: "surface", children: [(0, jsx_runtime_1.jsx)(gui_1.Separator, {}), (0, jsx_runtime_1.jsx)(gui_1.AspectRatio, { ratio: 16 / 9 }), (0, jsx_runtime_1.jsx)(gui_1.Avatar, { children: (0, jsx_runtime_1.jsx)(gui_1.AvatarFallback, { children: "HZ" }) }), (0, jsx_runtime_1.jsx)(gui_1.ScrollArea, { height: 80, children: "Scroll area" }), (0, jsx_runtime_1.jsxs)(gui_1.ResizablePanelGroup, { direction: "horizontal", children: [(0, jsx_runtime_1.jsx)(gui_1.ResizablePanel, {}), (0, jsx_runtime_1.jsx)(gui_1.ResizableHandle, {}), (0, jsx_runtime_1.jsx)(gui_1.ResizablePanel, {})] })] }), (0, jsx_runtime_1.jsx)(Section, { name: "collapsible", children: (0, jsx_runtime_1.jsxs)(gui_1.Collapsible, { open: true, children: [(0, jsx_runtime_1.jsx)(gui_1.CollapsibleTrigger, { children: "Collapsible trigger" }), (0, jsx_runtime_1.jsx)(gui_1.CollapsibleContent, { children: "Collapsible content" })] }) }), (0, jsx_runtime_1.jsxs)(Section, { name: "command", children: [(0, jsx_runtime_1.jsxs)(gui_1.Command, { children: [(0, jsx_runtime_1.jsx)(gui_1.CommandInput, {}), (0, jsx_runtime_1.jsxs)(gui_1.CommandList, { children: [(0, jsx_runtime_1.jsx)(gui_1.CommandEmpty, { children: "No results" }), (0, jsx_runtime_1.jsx)(gui_1.CommandGroup, { heading: "Group", children: (0, jsx_runtime_1.jsxs)(gui_1.CommandItem, { value: "a", children: ["Item", (0, jsx_runtime_1.jsx)(gui_1.CommandShortcut, { children: "\u2318A" })] }) }), (0, jsx_runtime_1.jsx)(gui_1.CommandSeparator, {})] })] }), (0, jsx_runtime_1.jsxs)(gui_1.CommandDialog, { open: true, defaultValue: "alpha", onValueChange: (v) => {
|
|
30
|
+
const Gallery = () => ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column', gap: 28, padding: 24, maxWidth: 928 }, children: [(0, jsx_runtime_1.jsxs)(Section, { name: "button", children: [BUTTON_VARIANTS.map((variant) => ((0, jsx_runtime_1.jsx)(gui_1.Button, { variant: variant, children: variant }, variant))), BUTTON_SIZES.map((size) => ((0, jsx_runtime_1.jsx)(gui_1.Button, { size: size, children: size }, size))), (0, jsx_runtime_1.jsx)(gui_1.Button, { disabled: true, children: "disabled" }), (0, jsx_runtime_1.jsx)(gui_1.Button, { isLoading: true, children: "loading" })] }), (0, jsx_runtime_1.jsx)(Section, { name: "badge", children: BADGE_VARIANTS.map((variant) => ((0, jsx_runtime_1.jsx)(gui_1.Badge, { variant: variant, children: variant }, variant))) }), (0, jsx_runtime_1.jsx)(Section, { name: "card", children: (0, jsx_runtime_1.jsxs)(gui_1.Card, { children: [(0, jsx_runtime_1.jsxs)(gui_1.CardHeader, { children: [(0, jsx_runtime_1.jsx)(gui_1.CardTitle, { children: "Card title" }), (0, jsx_runtime_1.jsx)(gui_1.CardDescription, { children: "Card description" }), (0, jsx_runtime_1.jsx)(gui_1.CardAction, { children: (0, jsx_runtime_1.jsx)(gui_1.Button, { size: "sm", variant: "ghost", children: "action" }) })] }), (0, jsx_runtime_1.jsx)(gui_1.CardContent, { children: "Card content" }), (0, jsx_runtime_1.jsx)(gui_1.CardFooter, { children: "Card footer" })] }) }), (0, jsx_runtime_1.jsxs)(Section, { name: "form", children: [(0, jsx_runtime_1.jsx)(gui_1.Label, { children: "Label" }), (0, jsx_runtime_1.jsx)(gui_1.Input, { placeholder: "Input" }), (0, jsx_runtime_1.jsx)(gui_1.Input, { placeholder: "Password", type: "password" }), (0, jsx_runtime_1.jsx)(gui_1.Textarea, { placeholder: "Textarea" }), (0, jsx_runtime_1.jsx)(gui_1.Checkbox, {}), (0, jsx_runtime_1.jsx)(gui_1.Checkbox, { checked: true }), (0, jsx_runtime_1.jsx)(gui_1.Switch, {}), (0, jsx_runtime_1.jsx)(gui_1.Switch, { checked: true }), (0, jsx_runtime_1.jsx)(gui_1.Slider, { defaultValue: [40] }), (0, jsx_runtime_1.jsx)(gui_1.Progress, { value: 40 }), (0, jsx_runtime_1.jsxs)(gui_1.RadioGroup, { defaultValue: "a", children: [(0, jsx_runtime_1.jsx)(gui_1.RadioGroupItem, { value: "a" }), (0, jsx_runtime_1.jsx)(gui_1.RadioGroupItem, { value: "b" }), (0, jsx_runtime_1.jsx)(gui_1.RadioGroupItem, { value: "c", disabled: true })] }), (0, jsx_runtime_1.jsxs)(gui_1.RadioGroup, { orientation: "horizontal", defaultValue: "a", children: [(0, jsx_runtime_1.jsx)(gui_1.RadioGroupItem, { value: "a" }), (0, jsx_runtime_1.jsx)(gui_1.RadioGroupItem, { value: "b" })] })] }), (0, jsx_runtime_1.jsxs)(Section, { name: "toggle-group", children: [['default', 'outline'].map((variant) => ['default', 'sm', 'lg'].map((size) => ((0, jsx_runtime_1.jsxs)(gui_1.ToggleGroup, { type: "single", defaultValue: "a", variant: variant, size: size, children: [(0, jsx_runtime_1.jsx)(gui_1.ToggleGroupItem, { value: "a", children: "A" }), (0, jsx_runtime_1.jsx)(gui_1.ToggleGroupItem, { value: "b", children: "B" }), (0, jsx_runtime_1.jsx)(gui_1.ToggleGroupItem, { value: "c", disabled: true, children: "C" })] }, `${variant}-${size}`)))), (0, jsx_runtime_1.jsxs)(gui_1.ToggleGroup, { type: "multiple", defaultValue: ['a'], children: [(0, jsx_runtime_1.jsx)(gui_1.ToggleGroupItem, { value: "a", children: "A" }), (0, jsx_runtime_1.jsx)(gui_1.ToggleGroupItem, { value: "b", children: "B" })] }), (0, jsx_runtime_1.jsxs)(gui_1.ToggleGroup, { type: "single", orientation: "vertical", defaultValue: "a", children: [(0, jsx_runtime_1.jsx)(gui_1.ToggleGroupItem, { value: "a", children: "A" }), (0, jsx_runtime_1.jsx)(gui_1.ToggleGroupItem, { value: "b", children: "B" })] })] }), (0, jsx_runtime_1.jsx)(Section, { name: "accordion", children: (0, jsx_runtime_1.jsxs)(gui_1.Accordion, { type: "single", collapsible: true, defaultValue: "one", children: [(0, jsx_runtime_1.jsxs)(gui_1.AccordionItem, { value: "one", children: [(0, jsx_runtime_1.jsx)(gui_1.AccordionTrigger, { children: "Accordion trigger" }), (0, jsx_runtime_1.jsx)(gui_1.AccordionContent, { children: "Accordion content" })] }), (0, jsx_runtime_1.jsxs)(gui_1.AccordionItem, { value: "two", children: [(0, jsx_runtime_1.jsx)(gui_1.AccordionTrigger, { children: "Second trigger" }), (0, jsx_runtime_1.jsx)(gui_1.AccordionContent, { children: "Second content" })] })] }) }), (0, jsx_runtime_1.jsx)(Section, { name: "tabs", children: (0, jsx_runtime_1.jsxs)(gui_1.Tabs, { defaultValue: "one", children: [(0, jsx_runtime_1.jsxs)(gui_1.TabsList, { children: [(0, jsx_runtime_1.jsx)(gui_1.TabsTrigger, { value: "one", children: "One" }), (0, jsx_runtime_1.jsx)(gui_1.TabsTrigger, { value: "two", children: "Two" })] }), (0, jsx_runtime_1.jsx)(gui_1.TabsContent, { value: "one", children: "Panel one" })] }) }), (0, jsx_runtime_1.jsxs)(Section, { name: "surface", children: [(0, jsx_runtime_1.jsx)(gui_1.Separator, {}), (0, jsx_runtime_1.jsx)(gui_1.AspectRatio, { ratio: 16 / 9 }), (0, jsx_runtime_1.jsx)(gui_1.Avatar, { children: (0, jsx_runtime_1.jsx)(gui_1.AvatarFallback, { children: "HZ" }) }), (0, jsx_runtime_1.jsx)(gui_1.ScrollArea, { height: 80, children: "Scroll area" }), (0, jsx_runtime_1.jsxs)(gui_1.ResizablePanelGroup, { direction: "horizontal", children: [(0, jsx_runtime_1.jsx)(gui_1.ResizablePanel, {}), (0, jsx_runtime_1.jsx)(gui_1.ResizableHandle, {}), (0, jsx_runtime_1.jsx)(gui_1.ResizablePanel, {})] })] }), (0, jsx_runtime_1.jsx)(Section, { name: "collapsible", children: (0, jsx_runtime_1.jsxs)(gui_1.Collapsible, { open: true, children: [(0, jsx_runtime_1.jsx)(gui_1.CollapsibleTrigger, { children: "Collapsible trigger" }), (0, jsx_runtime_1.jsx)(gui_1.CollapsibleContent, { children: "Collapsible content" })] }) }), (0, jsx_runtime_1.jsxs)(Section, { name: "command", children: [(0, jsx_runtime_1.jsxs)(gui_1.Command, { children: [(0, jsx_runtime_1.jsx)(gui_1.CommandInput, {}), (0, jsx_runtime_1.jsxs)(gui_1.CommandList, { children: [(0, jsx_runtime_1.jsx)(gui_1.CommandEmpty, { children: "No results" }), (0, jsx_runtime_1.jsx)(gui_1.CommandGroup, { heading: "Group", children: (0, jsx_runtime_1.jsxs)(gui_1.CommandItem, { value: "a", children: ["Item", (0, jsx_runtime_1.jsx)(gui_1.CommandShortcut, { children: "\u2318A" })] }) }), (0, jsx_runtime_1.jsx)(gui_1.CommandSeparator, {})] })] }), (0, jsx_runtime_1.jsxs)(gui_1.CommandDialog, { open: true, defaultValue: "alpha", onValueChange: (v) => {
|
|
31
31
|
const el = document.querySelector('[data-palette-selected]');
|
|
32
32
|
if (el)
|
|
33
33
|
el.setAttribute('data-palette-selected', v);
|
|
34
|
-
}, children: [(0, jsx_runtime_1.jsx)(gui_1.CommandInput, {}), (0, jsx_runtime_1.jsxs)(gui_1.CommandList, { children: [(0, jsx_runtime_1.jsx)(gui_1.CommandEmpty, { children: "No results" }), (0, jsx_runtime_1.jsxs)(gui_1.CommandGroup, { heading: "Palette", children: [(0, jsx_runtime_1.jsx)(gui_1.CommandItem, { value: "alpha", children: "alpha" }), (0, jsx_runtime_1.jsx)(gui_1.CommandItem, { value: "beta", children: "beta" }), (0, jsx_runtime_1.jsx)(gui_1.CommandItem, { value: "gamma", children: "gamma" })] })] })] }), (0, jsx_runtime_1.jsx)("span", { "data-palette-selected": "" })] }), (0, jsx_runtime_1.jsxs)(Section, { name: "overlay", children: [(0, jsx_runtime_1.jsx)(gui_1.Dialog, { open: true, children: (0, jsx_runtime_1.jsxs)(gui_1.DialogContent, { children: [(0, jsx_runtime_1.jsxs)(gui_1.DialogHeader, { children: [(0, jsx_runtime_1.jsx)(gui_1.DialogTitle, { children: "Dialog title" }), (0, jsx_runtime_1.jsx)(gui_1.DialogDescription, { children: "Dialog description" })] }), (0, jsx_runtime_1.jsx)(gui_1.DialogFooter, { children: (0, jsx_runtime_1.jsx)(gui_1.Button, { size: "sm", children: "OK" }) })] }) }), (0, jsx_runtime_1.jsxs)(gui_1.DropdownMenu, { open: true, children: [(0, jsx_runtime_1.jsx)(gui_1.DropdownMenuTrigger, { children: "Menu" }), (0, jsx_runtime_1.jsxs)(gui_1.DropdownMenuContent, { children: [(0, jsx_runtime_1.jsx)(gui_1.DropdownMenuLabel, { children: "Label" }), (0, jsx_runtime_1.jsx)(gui_1.DropdownMenuSeparator, {}), (0, jsx_runtime_1.jsx)(gui_1.DropdownMenuItem, { children: "Item" })] })] }), (0, jsx_runtime_1.jsxs)(gui_1.Popover, { open: true, children: [(0, jsx_runtime_1.jsx)(gui_1.PopoverTrigger, { children: "Popover" }), (0, jsx_runtime_1.jsx)(gui_1.PopoverContent, { children: "Popover content" })] }), (0, jsx_runtime_1.jsxs)(gui_1.Select, { open: true, children: [(0, jsx_runtime_1.jsx)(gui_1.SelectTrigger, { children: (0, jsx_runtime_1.jsx)(gui_1.SelectValue, { placeholder: "Select" }) }), (0, jsx_runtime_1.jsx)(gui_1.SelectContent, { children: (0, jsx_runtime_1.jsx)(gui_1.SelectItem, { value: "x", index: 0, children: "Option" }) })] }), (0, jsx_runtime_1.jsx)(gui_1.TooltipProvider, { delay: 0, children: (0, jsx_runtime_1.jsxs)(gui_1.Tooltip, { open: true, children: [(0, jsx_runtime_1.jsx)(gui_1.TooltipTrigger, { children: "Tooltip" }), (0, jsx_runtime_1.jsx)(gui_1.TooltipContent, { children: "Tooltip content" })] }) }), (0, jsx_runtime_1.jsx)(gui_1.Toaster, {})] }), (0, jsx_runtime_1.jsxs)(Section, { name: "layout", children: [(0, jsx_runtime_1.jsx)(gui_1.Grid, { min: 240, gap: "$3", style: { width: '100%' }, "data-grid": "auto", children: [0, 1, 2, 3, 4, 5, 6].map((i) => ((0, jsx_runtime_1.jsxs)(gui_1.Card, { children: [(0, jsx_runtime_1.jsx)(gui_1.CardMedia, { ratio: 16 / 10, children: (0, jsx_runtime_1.jsx)("img", { src: SWATCH, alt: "" }) }), (0, jsx_runtime_1.jsxs)(gui_1.CardHeader, { children: [(0, jsx_runtime_1.jsxs)(gui_1.CardTitle, { children: ["Card ", i] }), (0, jsx_runtime_1.jsx)(gui_1.CardDescription, { children: "Sized by its content, never by a pinned height." })] })] }, i))) }), (0, jsx_runtime_1.jsx)(gui_1.Grid, { min: 160, max: 4, gap: "$3", style: { width: '100%' }, "data-grid": "capped", children: [0, 1, 2, 3, 4, 5].map((i) => ((0, jsx_runtime_1.jsx)(gui_1.Card, { children: (0, jsx_runtime_1.jsxs)(gui_1.CardContent, { children: ["cap ", i] }) }, i))) }), (0, jsx_runtime_1.jsxs)(gui_1.Grid, { min: 900, gap: "$3", style: { width: '100%' }, "data-grid": "wide", children: [(0, jsx_runtime_1.jsx)(gui_1.Card, { children: (0, jsx_runtime_1.jsx)(gui_1.CardContent, { children: "wide" }) }), (0, jsx_runtime_1.jsx)(gui_1.Card, { children: (0, jsx_runtime_1.jsx)(gui_1.CardContent, { children: "wide" }) })] }), (0, jsx_runtime_1.jsx)("div", { style: { width: '100%', overflow: 'hidden' }, children: (0, jsx_runtime_1.jsxs)(gui_1.Grid, { cols: 3, gap: "$3", style: { width: '100%' }, "data-grid": "fixed", children: [(0, jsx_runtime_1.jsx)(gui_1.Card, { children: (0, jsx_runtime_1.jsx)(gui_1.CardContent, { children: "short" }) }), (0, jsx_runtime_1.jsx)(gui_1.Card, { children: (0, jsx_runtime_1.jsx)(gui_1.CardContent, { children: (0, jsx_runtime_1.jsx)("span", { style: { whiteSpace: 'nowrap' }, children: "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM" }) }) }), (0, jsx_runtime_1.jsx)(gui_1.Card, { children: (0, jsx_runtime_1.jsx)(gui_1.CardContent, { children: "short" }) })] }) }), (0, jsx_runtime_1.jsxs)("div", { "data-grid": "growth", style: { display: 'flex', alignItems: 'flex-start', gap: 12, width: '100%' }, children: [(0, jsx_runtime_1.jsx)(gui_1.Card, { "data-card": "lean", children: (0, jsx_runtime_1.jsx)(gui_1.CardContent, { children: "one line" }) }), (0, jsx_runtime_1.jsxs)(gui_1.Card, { "data-card": "fat", children: [(0, jsx_runtime_1.jsx)(gui_1.CardContent, { children: "one line" }), (0, jsx_runtime_1.jsx)(gui_1.CardContent, { children: "two line" }), (0, jsx_runtime_1.jsx)(gui_1.CardContent, { children: "three line" }), (0, jsx_runtime_1.jsx)(gui_1.CardContent, { children: "four line" })] })] }), (0, jsx_runtime_1.jsx)(gui_1.Card, { interactive: true, "data-card": "interactive", children: (0, jsx_runtime_1.jsx)(gui_1.CardHeader, { children: (0, jsx_runtime_1.jsx)(gui_1.CardTitle, { children: "Interactive card" }) }) }), (0, jsx_runtime_1.jsx)(gui_1.Section, { maxWidth: 600, "data-section": "demo", children: (0, jsx_runtime_1.jsx)(gui_1.CardTitle, { children: "Section" }) }), (0, jsx_runtime_1.jsx)(gui_1.CardTitle, { fontFamily: "$mono", "data-type": "mono", children: "1234567890" }), (0, jsx_runtime_1.jsx)(gui_1.Button, { "data-button": "block-child", children: (0, jsx_runtime_1.jsx)("span", { "data-block-child": true, style: { display: 'block', height: 119, width: 119 } }) })] })] }));
|
|
34
|
+
}, children: [(0, jsx_runtime_1.jsx)(gui_1.CommandInput, {}), (0, jsx_runtime_1.jsxs)(gui_1.CommandList, { children: [(0, jsx_runtime_1.jsx)(gui_1.CommandEmpty, { children: "No results" }), (0, jsx_runtime_1.jsxs)(gui_1.CommandGroup, { heading: "Palette", children: [(0, jsx_runtime_1.jsx)(gui_1.CommandItem, { value: "alpha", children: "alpha" }), (0, jsx_runtime_1.jsx)(gui_1.CommandItem, { value: "beta", children: "beta" }), (0, jsx_runtime_1.jsx)(gui_1.CommandItem, { value: "gamma", children: "gamma" })] })] })] }), (0, jsx_runtime_1.jsx)("span", { "data-palette-selected": "" })] }), (0, jsx_runtime_1.jsxs)(Section, { name: "overlay", children: [(0, jsx_runtime_1.jsx)(gui_1.Dialog, { open: true, children: (0, jsx_runtime_1.jsxs)(gui_1.DialogContent, { children: [(0, jsx_runtime_1.jsxs)(gui_1.DialogHeader, { children: [(0, jsx_runtime_1.jsx)(gui_1.DialogTitle, { children: "Dialog title" }), (0, jsx_runtime_1.jsx)(gui_1.DialogDescription, { children: "Dialog description" })] }), (0, jsx_runtime_1.jsx)(gui_1.DialogFooter, { children: (0, jsx_runtime_1.jsx)(gui_1.Button, { size: "sm", children: "OK" }) })] }) }), (0, jsx_runtime_1.jsxs)(gui_1.DropdownMenu, { open: true, children: [(0, jsx_runtime_1.jsx)(gui_1.DropdownMenuTrigger, { children: "Menu" }), (0, jsx_runtime_1.jsxs)(gui_1.DropdownMenuContent, { children: [(0, jsx_runtime_1.jsx)(gui_1.DropdownMenuLabel, { children: "Label" }), (0, jsx_runtime_1.jsx)(gui_1.DropdownMenuSeparator, {}), (0, jsx_runtime_1.jsx)(gui_1.DropdownMenuItem, { children: "Item" })] })] }), (0, jsx_runtime_1.jsxs)(gui_1.Popover, { open: true, children: [(0, jsx_runtime_1.jsx)(gui_1.PopoverTrigger, { children: "Popover" }), (0, jsx_runtime_1.jsx)(gui_1.PopoverContent, { children: "Popover content" })] }), (0, jsx_runtime_1.jsxs)(gui_1.Select, { open: true, children: [(0, jsx_runtime_1.jsx)(gui_1.SelectTrigger, { children: (0, jsx_runtime_1.jsx)(gui_1.SelectValue, { placeholder: "Select" }) }), (0, jsx_runtime_1.jsx)(gui_1.SelectContent, { children: (0, jsx_runtime_1.jsx)(gui_1.SelectItem, { value: "x", index: 0, children: "Option" }) })] }), (0, jsx_runtime_1.jsx)(gui_1.TooltipProvider, { delay: 0, children: (0, jsx_runtime_1.jsxs)(gui_1.Tooltip, { open: true, children: [(0, jsx_runtime_1.jsx)(gui_1.TooltipTrigger, { children: "Tooltip" }), (0, jsx_runtime_1.jsx)(gui_1.TooltipContent, { children: "Tooltip content" })] }) }), (0, jsx_runtime_1.jsx)(gui_1.AlertDialog, { open: true, children: (0, jsx_runtime_1.jsxs)(gui_1.AlertDialogContent, { children: [(0, jsx_runtime_1.jsxs)(gui_1.AlertDialogHeader, { children: [(0, jsx_runtime_1.jsx)(gui_1.AlertDialogTitle, { children: "Alert title" }), (0, jsx_runtime_1.jsx)(gui_1.AlertDialogDescription, { children: "Alert description" })] }), (0, jsx_runtime_1.jsxs)(gui_1.AlertDialogFooter, { children: [(0, jsx_runtime_1.jsx)(gui_1.AlertDialogCancel, { children: "Cancel" }), (0, jsx_runtime_1.jsx)(gui_1.AlertDialogAction, { variant: "destructive", children: "Delete" })] })] }) }), (0, jsx_runtime_1.jsxs)(gui_1.HoverCard, { open: true, children: [(0, jsx_runtime_1.jsx)(gui_1.HoverCardTrigger, { children: "Hover card" }), (0, jsx_runtime_1.jsx)(gui_1.HoverCardContent, { children: "Hover card content" })] }), (0, jsx_runtime_1.jsxs)(gui_1.ContextMenu, { children: [(0, jsx_runtime_1.jsx)(gui_1.ContextMenuTrigger, { children: "Context menu" }), (0, jsx_runtime_1.jsxs)(gui_1.ContextMenuContent, { children: [(0, jsx_runtime_1.jsx)(gui_1.ContextMenuLabel, { children: "Label" }), (0, jsx_runtime_1.jsx)(gui_1.ContextMenuSeparator, {}), (0, jsx_runtime_1.jsx)(gui_1.ContextMenuItem, { children: "Item" })] })] }), (0, jsx_runtime_1.jsx)(gui_1.Toaster, {})] }), (0, jsx_runtime_1.jsxs)(Section, { name: "layout", children: [(0, jsx_runtime_1.jsx)(gui_1.Grid, { min: 240, gap: "$3", style: { width: '100%' }, "data-grid": "auto", children: [0, 1, 2, 3, 4, 5, 6].map((i) => ((0, jsx_runtime_1.jsxs)(gui_1.Card, { children: [(0, jsx_runtime_1.jsx)(gui_1.CardMedia, { ratio: 16 / 10, children: (0, jsx_runtime_1.jsx)("img", { src: SWATCH, alt: "" }) }), (0, jsx_runtime_1.jsxs)(gui_1.CardHeader, { children: [(0, jsx_runtime_1.jsxs)(gui_1.CardTitle, { children: ["Card ", i] }), (0, jsx_runtime_1.jsx)(gui_1.CardDescription, { children: "Sized by its content, never by a pinned height." })] })] }, i))) }), (0, jsx_runtime_1.jsx)(gui_1.Grid, { min: 160, max: 4, gap: "$3", style: { width: '100%' }, "data-grid": "capped", children: [0, 1, 2, 3, 4, 5].map((i) => ((0, jsx_runtime_1.jsx)(gui_1.Card, { children: (0, jsx_runtime_1.jsxs)(gui_1.CardContent, { children: ["cap ", i] }) }, i))) }), (0, jsx_runtime_1.jsxs)(gui_1.Grid, { min: 900, gap: "$3", style: { width: '100%' }, "data-grid": "wide", children: [(0, jsx_runtime_1.jsx)(gui_1.Card, { children: (0, jsx_runtime_1.jsx)(gui_1.CardContent, { children: "wide" }) }), (0, jsx_runtime_1.jsx)(gui_1.Card, { children: (0, jsx_runtime_1.jsx)(gui_1.CardContent, { children: "wide" }) })] }), (0, jsx_runtime_1.jsx)("div", { style: { width: '100%', overflow: 'hidden' }, children: (0, jsx_runtime_1.jsxs)(gui_1.Grid, { cols: 3, gap: "$3", style: { width: '100%' }, "data-grid": "fixed", children: [(0, jsx_runtime_1.jsx)(gui_1.Card, { children: (0, jsx_runtime_1.jsx)(gui_1.CardContent, { children: "short" }) }), (0, jsx_runtime_1.jsx)(gui_1.Card, { children: (0, jsx_runtime_1.jsx)(gui_1.CardContent, { children: (0, jsx_runtime_1.jsx)("span", { style: { whiteSpace: 'nowrap' }, children: "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM" }) }) }), (0, jsx_runtime_1.jsx)(gui_1.Card, { children: (0, jsx_runtime_1.jsx)(gui_1.CardContent, { children: "short" }) })] }) }), (0, jsx_runtime_1.jsxs)("div", { "data-grid": "growth", style: { display: 'flex', alignItems: 'flex-start', gap: 12, width: '100%' }, children: [(0, jsx_runtime_1.jsx)(gui_1.Card, { "data-card": "lean", children: (0, jsx_runtime_1.jsx)(gui_1.CardContent, { children: "one line" }) }), (0, jsx_runtime_1.jsxs)(gui_1.Card, { "data-card": "fat", children: [(0, jsx_runtime_1.jsx)(gui_1.CardContent, { children: "one line" }), (0, jsx_runtime_1.jsx)(gui_1.CardContent, { children: "two line" }), (0, jsx_runtime_1.jsx)(gui_1.CardContent, { children: "three line" }), (0, jsx_runtime_1.jsx)(gui_1.CardContent, { children: "four line" })] })] }), (0, jsx_runtime_1.jsx)(gui_1.Card, { interactive: true, "data-card": "interactive", children: (0, jsx_runtime_1.jsx)(gui_1.CardHeader, { children: (0, jsx_runtime_1.jsx)(gui_1.CardTitle, { children: "Interactive card" }) }) }), (0, jsx_runtime_1.jsx)(gui_1.Section, { maxWidth: 600, "data-section": "demo", children: (0, jsx_runtime_1.jsx)(gui_1.CardTitle, { children: "Section" }) }), (0, jsx_runtime_1.jsx)(gui_1.CardTitle, { fontFamily: "$mono", "data-type": "mono", children: "1234567890" }), (0, jsx_runtime_1.jsx)(gui_1.Button, { "data-button": "block-child", children: (0, jsx_runtime_1.jsx)("span", { "data-block-child": true, style: { display: 'block', height: 119, width: 119 } }) })] })] }));
|
|
35
35
|
exports.Gallery = Gallery;
|
|
36
36
|
exports.default = exports.Gallery;
|
package/dist/gallery.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gallery.d.ts","sourceRoot":"","sources":["../src/gallery.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gallery.d.ts","sourceRoot":"","sources":["../src/gallery.tsx"],"names":[],"mappings":"AA4EA;;;GAGG;AACH,eAAO,MAAM,OAAO,+CAkWnB,CAAA;AAED,eAAe,OAAO,CAAA"}
|
package/dist/gallery.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { AspectRatio, Avatar, AvatarFallback, Badge, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, Input, Label, Popover, PopoverContent, PopoverTrigger, Progress, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Separator, Slider, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Grid, Section as PageSection, CardMedia, CommandDialog, } from './backends/gui/index.js';
|
|
3
|
+
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuTrigger, HoverCard, HoverCardContent, HoverCardTrigger, RadioGroup, RadioGroupItem, ToggleGroup, ToggleGroupItem, AspectRatio, Avatar, AvatarFallback, Badge, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, Input, Label, Popover, PopoverContent, PopoverTrigger, Progress, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Separator, Slider, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Grid, Section as PageSection, CardMedia, CommandDialog, } from './backends/gui/index.js';
|
|
4
4
|
/** A real <img> with real intrinsic pixels, inline so nothing hits the network.
|
|
5
5
|
* 120x40 on purpose: the wrong ratio for every box it goes in, so a frame that
|
|
6
6
|
* fails to cover-fit its child is visible rather than merely untested. */
|
|
@@ -24,10 +24,10 @@ const Section = ({ name, children }) => (_jsx("section", { "data-gallery": name,
|
|
|
24
24
|
* Every component, once. `data-gallery` names each section so a browser test can
|
|
25
25
|
* scope its assertions without depending on document order.
|
|
26
26
|
*/
|
|
27
|
-
export const Gallery = () => (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: 28, padding: 24, maxWidth: 928 }, children: [_jsxs(Section, { name: "button", children: [BUTTON_VARIANTS.map((variant) => (_jsx(Button, { variant: variant, children: variant }, variant))), BUTTON_SIZES.map((size) => (_jsx(Button, { size: size, children: size }, size))), _jsx(Button, { disabled: true, children: "disabled" }), _jsx(Button, { isLoading: true, children: "loading" })] }), _jsx(Section, { name: "badge", children: BADGE_VARIANTS.map((variant) => (_jsx(Badge, { variant: variant, children: variant }, variant))) }), _jsx(Section, { name: "card", children: _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Card title" }), _jsx(CardDescription, { children: "Card description" }), _jsx(CardAction, { children: _jsx(Button, { size: "sm", variant: "ghost", children: "action" }) })] }), _jsx(CardContent, { children: "Card content" }), _jsx(CardFooter, { children: "Card footer" })] }) }), _jsxs(Section, { name: "form", children: [_jsx(Label, { children: "Label" }), _jsx(Input, { placeholder: "Input" }), _jsx(Input, { placeholder: "Password", type: "password" }), _jsx(Textarea, { placeholder: "Textarea" }), _jsx(Checkbox, {}), _jsx(Checkbox, { checked: true }), _jsx(Switch, {}), _jsx(Switch, { checked: true }), _jsx(Slider, { defaultValue: [40] }), _jsx(Progress, { value: 40 })] }), _jsx(Section, { name: "tabs", children: _jsxs(Tabs, { defaultValue: "one", children: [_jsxs(TabsList, { children: [_jsx(TabsTrigger, { value: "one", children: "One" }), _jsx(TabsTrigger, { value: "two", children: "Two" })] }), _jsx(TabsContent, { value: "one", children: "Panel one" })] }) }), _jsxs(Section, { name: "surface", children: [_jsx(Separator, {}), _jsx(AspectRatio, { ratio: 16 / 9 }), _jsx(Avatar, { children: _jsx(AvatarFallback, { children: "HZ" }) }), _jsx(ScrollArea, { height: 80, children: "Scroll area" }), _jsxs(ResizablePanelGroup, { direction: "horizontal", children: [_jsx(ResizablePanel, {}), _jsx(ResizableHandle, {}), _jsx(ResizablePanel, {})] })] }), _jsx(Section, { name: "collapsible", children: _jsxs(Collapsible, { open: true, children: [_jsx(CollapsibleTrigger, { children: "Collapsible trigger" }), _jsx(CollapsibleContent, { children: "Collapsible content" })] }) }), _jsxs(Section, { name: "command", children: [_jsxs(Command, { children: [_jsx(CommandInput, {}), _jsxs(CommandList, { children: [_jsx(CommandEmpty, { children: "No results" }), _jsx(CommandGroup, { heading: "Group", children: _jsxs(CommandItem, { value: "a", children: ["Item", _jsx(CommandShortcut, { children: "\u2318A" })] }) }), _jsx(CommandSeparator, {})] })] }), _jsxs(CommandDialog, { open: true, defaultValue: "alpha", onValueChange: (v) => {
|
|
27
|
+
export const Gallery = () => (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: 28, padding: 24, maxWidth: 928 }, children: [_jsxs(Section, { name: "button", children: [BUTTON_VARIANTS.map((variant) => (_jsx(Button, { variant: variant, children: variant }, variant))), BUTTON_SIZES.map((size) => (_jsx(Button, { size: size, children: size }, size))), _jsx(Button, { disabled: true, children: "disabled" }), _jsx(Button, { isLoading: true, children: "loading" })] }), _jsx(Section, { name: "badge", children: BADGE_VARIANTS.map((variant) => (_jsx(Badge, { variant: variant, children: variant }, variant))) }), _jsx(Section, { name: "card", children: _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Card title" }), _jsx(CardDescription, { children: "Card description" }), _jsx(CardAction, { children: _jsx(Button, { size: "sm", variant: "ghost", children: "action" }) })] }), _jsx(CardContent, { children: "Card content" }), _jsx(CardFooter, { children: "Card footer" })] }) }), _jsxs(Section, { name: "form", children: [_jsx(Label, { children: "Label" }), _jsx(Input, { placeholder: "Input" }), _jsx(Input, { placeholder: "Password", type: "password" }), _jsx(Textarea, { placeholder: "Textarea" }), _jsx(Checkbox, {}), _jsx(Checkbox, { checked: true }), _jsx(Switch, {}), _jsx(Switch, { checked: true }), _jsx(Slider, { defaultValue: [40] }), _jsx(Progress, { value: 40 }), _jsxs(RadioGroup, { defaultValue: "a", children: [_jsx(RadioGroupItem, { value: "a" }), _jsx(RadioGroupItem, { value: "b" }), _jsx(RadioGroupItem, { value: "c", disabled: true })] }), _jsxs(RadioGroup, { orientation: "horizontal", defaultValue: "a", children: [_jsx(RadioGroupItem, { value: "a" }), _jsx(RadioGroupItem, { value: "b" })] })] }), _jsxs(Section, { name: "toggle-group", children: [['default', 'outline'].map((variant) => ['default', 'sm', 'lg'].map((size) => (_jsxs(ToggleGroup, { type: "single", defaultValue: "a", variant: variant, size: size, children: [_jsx(ToggleGroupItem, { value: "a", children: "A" }), _jsx(ToggleGroupItem, { value: "b", children: "B" }), _jsx(ToggleGroupItem, { value: "c", disabled: true, children: "C" })] }, `${variant}-${size}`)))), _jsxs(ToggleGroup, { type: "multiple", defaultValue: ['a'], children: [_jsx(ToggleGroupItem, { value: "a", children: "A" }), _jsx(ToggleGroupItem, { value: "b", children: "B" })] }), _jsxs(ToggleGroup, { type: "single", orientation: "vertical", defaultValue: "a", children: [_jsx(ToggleGroupItem, { value: "a", children: "A" }), _jsx(ToggleGroupItem, { value: "b", children: "B" })] })] }), _jsx(Section, { name: "accordion", children: _jsxs(Accordion, { type: "single", collapsible: true, defaultValue: "one", children: [_jsxs(AccordionItem, { value: "one", children: [_jsx(AccordionTrigger, { children: "Accordion trigger" }), _jsx(AccordionContent, { children: "Accordion content" })] }), _jsxs(AccordionItem, { value: "two", children: [_jsx(AccordionTrigger, { children: "Second trigger" }), _jsx(AccordionContent, { children: "Second content" })] })] }) }), _jsx(Section, { name: "tabs", children: _jsxs(Tabs, { defaultValue: "one", children: [_jsxs(TabsList, { children: [_jsx(TabsTrigger, { value: "one", children: "One" }), _jsx(TabsTrigger, { value: "two", children: "Two" })] }), _jsx(TabsContent, { value: "one", children: "Panel one" })] }) }), _jsxs(Section, { name: "surface", children: [_jsx(Separator, {}), _jsx(AspectRatio, { ratio: 16 / 9 }), _jsx(Avatar, { children: _jsx(AvatarFallback, { children: "HZ" }) }), _jsx(ScrollArea, { height: 80, children: "Scroll area" }), _jsxs(ResizablePanelGroup, { direction: "horizontal", children: [_jsx(ResizablePanel, {}), _jsx(ResizableHandle, {}), _jsx(ResizablePanel, {})] })] }), _jsx(Section, { name: "collapsible", children: _jsxs(Collapsible, { open: true, children: [_jsx(CollapsibleTrigger, { children: "Collapsible trigger" }), _jsx(CollapsibleContent, { children: "Collapsible content" })] }) }), _jsxs(Section, { name: "command", children: [_jsxs(Command, { children: [_jsx(CommandInput, {}), _jsxs(CommandList, { children: [_jsx(CommandEmpty, { children: "No results" }), _jsx(CommandGroup, { heading: "Group", children: _jsxs(CommandItem, { value: "a", children: ["Item", _jsx(CommandShortcut, { children: "\u2318A" })] }) }), _jsx(CommandSeparator, {})] })] }), _jsxs(CommandDialog, { open: true, defaultValue: "alpha", onValueChange: (v) => {
|
|
28
28
|
const el = document.querySelector('[data-palette-selected]');
|
|
29
29
|
if (el)
|
|
30
30
|
el.setAttribute('data-palette-selected', v);
|
|
31
|
-
}, children: [_jsx(CommandInput, {}), _jsxs(CommandList, { children: [_jsx(CommandEmpty, { children: "No results" }), _jsxs(CommandGroup, { heading: "Palette", children: [_jsx(CommandItem, { value: "alpha", children: "alpha" }), _jsx(CommandItem, { value: "beta", children: "beta" }), _jsx(CommandItem, { value: "gamma", children: "gamma" })] })] })] }), _jsx("span", { "data-palette-selected": "" })] }), _jsxs(Section, { name: "overlay", children: [_jsx(Dialog, { open: true, children: _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Dialog title" }), _jsx(DialogDescription, { children: "Dialog description" })] }), _jsx(DialogFooter, { children: _jsx(Button, { size: "sm", children: "OK" }) })] }) }), _jsxs(DropdownMenu, { open: true, children: [_jsx(DropdownMenuTrigger, { children: "Menu" }), _jsxs(DropdownMenuContent, { children: [_jsx(DropdownMenuLabel, { children: "Label" }), _jsx(DropdownMenuSeparator, {}), _jsx(DropdownMenuItem, { children: "Item" })] })] }), _jsxs(Popover, { open: true, children: [_jsx(PopoverTrigger, { children: "Popover" }), _jsx(PopoverContent, { children: "Popover content" })] }), _jsxs(Select, { open: true, children: [_jsx(SelectTrigger, { children: _jsx(SelectValue, { placeholder: "Select" }) }), _jsx(SelectContent, { children: _jsx(SelectItem, { value: "x", index: 0, children: "Option" }) })] }), _jsx(TooltipProvider, { delay: 0, children: _jsxs(Tooltip, { open: true, children: [_jsx(TooltipTrigger, { children: "Tooltip" }), _jsx(TooltipContent, { children: "Tooltip content" })] }) }), _jsx(Toaster, {})] }), _jsxs(Section, { name: "layout", children: [_jsx(Grid, { min: 240, gap: "$3", style: { width: '100%' }, "data-grid": "auto", children: [0, 1, 2, 3, 4, 5, 6].map((i) => (_jsxs(Card, { children: [_jsx(CardMedia, { ratio: 16 / 10, children: _jsx("img", { src: SWATCH, alt: "" }) }), _jsxs(CardHeader, { children: [_jsxs(CardTitle, { children: ["Card ", i] }), _jsx(CardDescription, { children: "Sized by its content, never by a pinned height." })] })] }, i))) }), _jsx(Grid, { min: 160, max: 4, gap: "$3", style: { width: '100%' }, "data-grid": "capped", children: [0, 1, 2, 3, 4, 5].map((i) => (_jsx(Card, { children: _jsxs(CardContent, { children: ["cap ", i] }) }, i))) }), _jsxs(Grid, { min: 900, gap: "$3", style: { width: '100%' }, "data-grid": "wide", children: [_jsx(Card, { children: _jsx(CardContent, { children: "wide" }) }), _jsx(Card, { children: _jsx(CardContent, { children: "wide" }) })] }), _jsx("div", { style: { width: '100%', overflow: 'hidden' }, children: _jsxs(Grid, { cols: 3, gap: "$3", style: { width: '100%' }, "data-grid": "fixed", children: [_jsx(Card, { children: _jsx(CardContent, { children: "short" }) }), _jsx(Card, { children: _jsx(CardContent, { children: _jsx("span", { style: { whiteSpace: 'nowrap' }, children: "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM" }) }) }), _jsx(Card, { children: _jsx(CardContent, { children: "short" }) })] }) }), _jsxs("div", { "data-grid": "growth", style: { display: 'flex', alignItems: 'flex-start', gap: 12, width: '100%' }, children: [_jsx(Card, { "data-card": "lean", children: _jsx(CardContent, { children: "one line" }) }), _jsxs(Card, { "data-card": "fat", children: [_jsx(CardContent, { children: "one line" }), _jsx(CardContent, { children: "two line" }), _jsx(CardContent, { children: "three line" }), _jsx(CardContent, { children: "four line" })] })] }), _jsx(Card, { interactive: true, "data-card": "interactive", children: _jsx(CardHeader, { children: _jsx(CardTitle, { children: "Interactive card" }) }) }), _jsx(PageSection, { maxWidth: 600, "data-section": "demo", children: _jsx(CardTitle, { children: "Section" }) }), _jsx(CardTitle, { fontFamily: "$mono", "data-type": "mono", children: "1234567890" }), _jsx(Button, { "data-button": "block-child", children: _jsx("span", { "data-block-child": true, style: { display: 'block', height: 119, width: 119 } }) })] })] }));
|
|
31
|
+
}, children: [_jsx(CommandInput, {}), _jsxs(CommandList, { children: [_jsx(CommandEmpty, { children: "No results" }), _jsxs(CommandGroup, { heading: "Palette", children: [_jsx(CommandItem, { value: "alpha", children: "alpha" }), _jsx(CommandItem, { value: "beta", children: "beta" }), _jsx(CommandItem, { value: "gamma", children: "gamma" })] })] })] }), _jsx("span", { "data-palette-selected": "" })] }), _jsxs(Section, { name: "overlay", children: [_jsx(Dialog, { open: true, children: _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Dialog title" }), _jsx(DialogDescription, { children: "Dialog description" })] }), _jsx(DialogFooter, { children: _jsx(Button, { size: "sm", children: "OK" }) })] }) }), _jsxs(DropdownMenu, { open: true, children: [_jsx(DropdownMenuTrigger, { children: "Menu" }), _jsxs(DropdownMenuContent, { children: [_jsx(DropdownMenuLabel, { children: "Label" }), _jsx(DropdownMenuSeparator, {}), _jsx(DropdownMenuItem, { children: "Item" })] })] }), _jsxs(Popover, { open: true, children: [_jsx(PopoverTrigger, { children: "Popover" }), _jsx(PopoverContent, { children: "Popover content" })] }), _jsxs(Select, { open: true, children: [_jsx(SelectTrigger, { children: _jsx(SelectValue, { placeholder: "Select" }) }), _jsx(SelectContent, { children: _jsx(SelectItem, { value: "x", index: 0, children: "Option" }) })] }), _jsx(TooltipProvider, { delay: 0, children: _jsxs(Tooltip, { open: true, children: [_jsx(TooltipTrigger, { children: "Tooltip" }), _jsx(TooltipContent, { children: "Tooltip content" })] }) }), _jsx(AlertDialog, { open: true, children: _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: "Alert title" }), _jsx(AlertDialogDescription, { children: "Alert description" })] }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { children: "Cancel" }), _jsx(AlertDialogAction, { variant: "destructive", children: "Delete" })] })] }) }), _jsxs(HoverCard, { open: true, children: [_jsx(HoverCardTrigger, { children: "Hover card" }), _jsx(HoverCardContent, { children: "Hover card content" })] }), _jsxs(ContextMenu, { children: [_jsx(ContextMenuTrigger, { children: "Context menu" }), _jsxs(ContextMenuContent, { children: [_jsx(ContextMenuLabel, { children: "Label" }), _jsx(ContextMenuSeparator, {}), _jsx(ContextMenuItem, { children: "Item" })] })] }), _jsx(Toaster, {})] }), _jsxs(Section, { name: "layout", children: [_jsx(Grid, { min: 240, gap: "$3", style: { width: '100%' }, "data-grid": "auto", children: [0, 1, 2, 3, 4, 5, 6].map((i) => (_jsxs(Card, { children: [_jsx(CardMedia, { ratio: 16 / 10, children: _jsx("img", { src: SWATCH, alt: "" }) }), _jsxs(CardHeader, { children: [_jsxs(CardTitle, { children: ["Card ", i] }), _jsx(CardDescription, { children: "Sized by its content, never by a pinned height." })] })] }, i))) }), _jsx(Grid, { min: 160, max: 4, gap: "$3", style: { width: '100%' }, "data-grid": "capped", children: [0, 1, 2, 3, 4, 5].map((i) => (_jsx(Card, { children: _jsxs(CardContent, { children: ["cap ", i] }) }, i))) }), _jsxs(Grid, { min: 900, gap: "$3", style: { width: '100%' }, "data-grid": "wide", children: [_jsx(Card, { children: _jsx(CardContent, { children: "wide" }) }), _jsx(Card, { children: _jsx(CardContent, { children: "wide" }) })] }), _jsx("div", { style: { width: '100%', overflow: 'hidden' }, children: _jsxs(Grid, { cols: 3, gap: "$3", style: { width: '100%' }, "data-grid": "fixed", children: [_jsx(Card, { children: _jsx(CardContent, { children: "short" }) }), _jsx(Card, { children: _jsx(CardContent, { children: _jsx("span", { style: { whiteSpace: 'nowrap' }, children: "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM" }) }) }), _jsx(Card, { children: _jsx(CardContent, { children: "short" }) })] }) }), _jsxs("div", { "data-grid": "growth", style: { display: 'flex', alignItems: 'flex-start', gap: 12, width: '100%' }, children: [_jsx(Card, { "data-card": "lean", children: _jsx(CardContent, { children: "one line" }) }), _jsxs(Card, { "data-card": "fat", children: [_jsx(CardContent, { children: "one line" }), _jsx(CardContent, { children: "two line" }), _jsx(CardContent, { children: "three line" }), _jsx(CardContent, { children: "four line" })] })] }), _jsx(Card, { interactive: true, "data-card": "interactive", children: _jsx(CardHeader, { children: _jsx(CardTitle, { children: "Interactive card" }) }) }), _jsx(PageSection, { maxWidth: 600, "data-section": "demo", children: _jsx(CardTitle, { children: "Section" }) }), _jsx(CardTitle, { fontFamily: "$mono", "data-type": "mono", children: "1234567890" }), _jsx(Button, { "data-button": "block-child", children: _jsx("span", { "data-block-child": true, style: { display: 'block', height: 119, width: 119 } }) })] })] }));
|
|
32
32
|
export default Gallery;
|
|
33
33
|
//# sourceMappingURL=gallery.js.map
|
package/dist/gallery.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gallery.js","sourceRoot":"","sources":["../src/gallery.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAyBZ,OAAO,EACL,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EACjF,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EACzE,kBAAkB,EAAE,kBAAkB,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EACzF,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,EAAE,aAAa,EAClF,iBAAiB,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EACxE,mBAAmB,EAAE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