@estiva-app/ui 0.12.8 → 0.12.10
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/ChipInput.d.ts +8 -0
- package/dist/ChipInput.d.ts.map +1 -1
- package/dist/Menu.d.ts +12 -2
- package/dist/Menu.d.ts.map +1 -1
- package/dist/Popover.d.ts +17 -2
- package/dist/Popover.d.ts.map +1 -1
- package/dist/index.js +15 -8
- package/dist/index.js.map +3 -3
- package/package.json +2 -1
- package/src/ChipInput.mdx +9 -0
- package/src/ChipInput.stories.tsx +0 -4
- package/src/ChipInput.test.tsx +78 -2
- package/src/ChipInput.tsx +31 -2
- package/src/Menu.test.tsx +20 -0
- package/src/Menu.tsx +17 -5
- package/src/Popover.mdx +4 -2
- package/src/Popover.stories.tsx +11 -9
- package/src/Popover.test.tsx +38 -0
- package/src/Popover.tsx +20 -4
- package/src/ReactionPicker.mdx +1 -1
- package/src/ReactionPicker.stories.tsx +2 -1
- package/src/Toolbar.stories.tsx +2 -1
package/dist/ChipInput.d.ts
CHANGED
|
@@ -68,6 +68,14 @@ export interface ChipInputProps<T extends ChipInputOption = ChipInputOption> {
|
|
|
68
68
|
rowLeading?: (option: T) => ReactNode;
|
|
69
69
|
/** Set by a `Field` with `required`; a caller inside one owes nothing. */
|
|
70
70
|
'aria-required'?: boolean | 'true' | 'false';
|
|
71
|
+
/**
|
|
72
|
+
* The field's name, for a caller that is not inside a `Field` — a `Field`'s
|
|
73
|
+
* label names it already. With neither this nor `aria-labelledby`, the
|
|
74
|
+
* placeholder is the name, and it stays the name once a chip is in.
|
|
75
|
+
*/
|
|
76
|
+
'aria-label'?: string;
|
|
77
|
+
/** The id of what names the field on the page — a visible "To:", say. */
|
|
78
|
+
'aria-labelledby'?: string;
|
|
71
79
|
}
|
|
72
80
|
export declare function ChipInput<T extends ChipInputOption = ChipInputOption>({ value, onChange, options, placeholder, autoFocus, excludeIds, chipLeading, rowLeading, ...aria }: ChipInputProps<T>): import("react").JSX.Element;
|
|
73
81
|
//# sourceMappingURL=ChipInput.d.ts.map
|
package/dist/ChipInput.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChipInput.d.ts","sourceRoot":"","sources":["../src/ChipInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ChipInput.d.ts","sourceRoot":"","sources":["../src/ChipInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAuB7E;;;;;;;;;;GAUG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,mDAAmD;IACnD,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,cAAc,+BAwBhF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe;IACzE,KAAK,EAAE,CAAC,EAAE,CAAA;IACV,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,IAAI,CAAA;IAC7B,4CAA4C;IAC5C,OAAO,EAAE,CAAC,EAAE,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,qDAAqD;IACrD,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,SAAS,CAAA;IACtC,6CAA6C;IAC7C,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,SAAS,CAAA;IACrC,0EAA0E;IAC1E,eAAe,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAA;IAC5C;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,yEAAyE;IACzE,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED,wBAAgB,SAAS,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe,EAAE,EACrE,KAAK,EACL,QAAQ,EACR,OAAO,EACP,WAAuB,EACvB,SAAS,EACT,UAAe,EACf,WAAW,EACX,UAAU,EACV,GAAG,IAAI,EACR,EAAE,cAAc,CAAC,CAAC,CAAC,+BAkJnB"}
|
package/dist/Menu.d.ts
CHANGED
|
@@ -57,10 +57,20 @@ export interface MenuProps {
|
|
|
57
57
|
unmount: () => void;
|
|
58
58
|
} | null>;
|
|
59
59
|
children: ReactNode;
|
|
60
|
-
/** On the menu's surface — its width
|
|
60
|
+
/** On the menu's surface — its width. **Not its padding**: see
|
|
61
|
+
* `contentClassName`. */
|
|
61
62
|
className?: string;
|
|
63
|
+
/**
|
|
64
|
+
* The padding around the rows, as a class. Default `p-2`, 8px.
|
|
65
|
+
*
|
|
66
|
+
* It is on the scrolling content, not on the panel, so the scrollbar hugs the
|
|
67
|
+
* panel's edge (D63) — and so a padding class on `className` adds to it
|
|
68
|
+
* rather than replacing it. Peek's Later menu asked for `p-1` there and got
|
|
69
|
+
* 12px from `0.12.6` on (PLAN Finding 60). Set it here.
|
|
70
|
+
*/
|
|
71
|
+
contentClassName?: string;
|
|
62
72
|
}
|
|
63
|
-
export declare function Menu({ trigger, align, openOnHover, open, onOpenChange, actionsRef, children, className }: MenuProps): import("react").JSX.Element;
|
|
73
|
+
export declare function Menu({ trigger, align, openOnHover, open, onOpenChange, actionsRef, children, className, contentClassName }: MenuProps): import("react").JSX.Element;
|
|
64
74
|
/**
|
|
65
75
|
* A row that opens another menu beside it — the submenu two Peek menus
|
|
66
76
|
* hand-rolled before this, one of which dropped the ref its edge-flip
|
package/dist/Menu.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../src/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,qBAAqB,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AA+DhI;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IACpF;;gBAEY;IACZ,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,+BAwB1E;AAED,MAAM,WAAW,SAAS;IACxB;;;;;;;;OAQG;IACH,OAAO,EAAE,YAAY,CAAA;IACrB,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACxB;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;gDAC4C;IAC5C,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC;;kFAE8E;IAC9E,UAAU,CAAC,EAAE,SAAS,CAAC;QAAE,KAAK,EAAE,MAAM,IAAI,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC,CAAA;IACzE,QAAQ,EAAE,SAAS,CAAA;IACnB
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"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MAAM,CAAA;CAAE,UA4BpI;AA+CD,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAgB,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,+BA4DjL;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,+BASxD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,uFAAuF;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAqB7M;AAED,uEAAuE;AACvE,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAE3F"}
|
package/dist/Popover.d.ts
CHANGED
|
@@ -88,8 +88,23 @@ export interface PopoverProps {
|
|
|
88
88
|
* point at it instead, with `aria-labelledby`. */
|
|
89
89
|
ariaLabel?: string;
|
|
90
90
|
children: ReactNode;
|
|
91
|
-
/**
|
|
91
|
+
/**
|
|
92
|
+
* On the panel's surface — its width. **Not its padding**: see
|
|
93
|
+
* `contentClassName`.
|
|
94
|
+
*/
|
|
92
95
|
className?: string;
|
|
96
|
+
/**
|
|
97
|
+
* The padding around the children, as a class. Default `p-2`, 8px — what a
|
|
98
|
+
* panel of rows or a small form wants. **A toolbar wants `p-1`.**
|
|
99
|
+
*
|
|
100
|
+
* The padding is on the scrolling content, not on the panel, so a scrollbar
|
|
101
|
+
* is drawn over it and hugs the panel's edge (D63). A padding class on
|
|
102
|
+
* `className` therefore does not replace this one — it adds to it: that is
|
|
103
|
+
* how every toolbar in a `Popover` grew 8px a side at `0.12.6`, measured 13px
|
|
104
|
+
* from the panel's edge to the toolbar where it had been 5px (PLAN Finding
|
|
105
|
+
* 60). Set it here.
|
|
106
|
+
*/
|
|
107
|
+
contentClassName?: string;
|
|
93
108
|
/**
|
|
94
109
|
* A cap on the scrolling box, as a class — `max-h-[360px]`. Without one the
|
|
95
110
|
* panel grows to the room the positioner has, which is the right default for
|
|
@@ -112,5 +127,5 @@ export interface PopoverProps {
|
|
|
112
127
|
*/
|
|
113
128
|
maxHeight?: string;
|
|
114
129
|
}
|
|
115
|
-
export declare function Popover({ trigger, anchor, align, side, open, onOpenChange, finalFocus, actionsRef, ariaLabel, children, className, maxHeight }: PopoverProps): import("react").JSX.Element;
|
|
130
|
+
export declare function Popover({ trigger, anchor, align, side, open, onOpenChange, finalFocus, actionsRef, ariaLabel, children, className, contentClassName, maxHeight }: PopoverProps): import("react").JSX.Element;
|
|
116
131
|
//# sourceMappingURL=Popover.d.ts.map
|
package/dist/Popover.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../src/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAOlF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,GAAG,IAAI,CAAA;IACrC;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;IACnC;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,KAAK,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QAAE,KAAK,EAAE,MAAM,IAAI,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC,CAAA;IACzE;uDACmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,SAAS,CAAA;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;;;;;OAUG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAOD,wBAAgB,OAAO,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,KAAc,EAAE,IAAe,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAAE,EAAE,YAAY,+BAyElM"}
|
package/dist/index.js
CHANGED
|
@@ -487,6 +487,7 @@ function Chip({ type = "neutral", label, leadingIcon, trailingIcon, className })
|
|
|
487
487
|
|
|
488
488
|
// src/ChipInput.tsx
|
|
489
489
|
import { useMemo, useState as useState2 } from "react";
|
|
490
|
+
import { Button as BaseButton3 } from "@base-ui/react/button";
|
|
490
491
|
import { Combobox } from "@base-ui/react/combobox";
|
|
491
492
|
import { IconX as IconX2 } from "@tabler/icons-react";
|
|
492
493
|
|
|
@@ -549,7 +550,7 @@ var GAP2 = 4;
|
|
|
549
550
|
var VIEWPORT_PAD2 = 8;
|
|
550
551
|
var HOVER_OPEN_DELAY = 0;
|
|
551
552
|
var HOVER_CLOSE_DELAY = 150;
|
|
552
|
-
function Menu({ trigger, align = "left", openOnHover = false, open, onOpenChange, actionsRef, children, className }) {
|
|
553
|
+
function Menu({ trigger, align = "left", openOnHover = false, open, onOpenChange, actionsRef, children, className, contentClassName }) {
|
|
553
554
|
return /* @__PURE__ */ jsxs8(
|
|
554
555
|
BaseMenu.Root,
|
|
555
556
|
{
|
|
@@ -582,7 +583,7 @@ function Menu({ trigger, align = "left", openOnHover = false, open, onOpenChange
|
|
|
582
583
|
"data-interactive": true,
|
|
583
584
|
className: cn("min-w-[180px] outline-none p-0", className),
|
|
584
585
|
render: /* @__PURE__ */ jsx14(MenuPanel, {}),
|
|
585
|
-
children: /* @__PURE__ */ jsx14(ScrollArea, { viewportClassName: "max-h-[var(--available-height)]", contentClassName: "flex flex-col p-2 [&>[role=separator]]:mx-0", children: /* @__PURE__ */ jsx14(MenuContext.Provider, { value: { openOnHover }, children }) })
|
|
586
|
+
children: /* @__PURE__ */ jsx14(ScrollArea, { viewportClassName: "max-h-[var(--available-height)]", contentClassName: cn("flex flex-col p-2 [&>[role=separator]]:mx-0", contentClassName), children: /* @__PURE__ */ jsx14(MenuContext.Provider, { value: { openOnHover }, children }) })
|
|
586
587
|
}
|
|
587
588
|
)
|
|
588
589
|
}
|
|
@@ -743,7 +744,7 @@ function InputChip({ label, leading, onRemove, className }) {
|
|
|
743
744
|
leading && /* @__PURE__ */ jsx15("span", { className: "flex shrink-0 items-center", children: leading }),
|
|
744
745
|
/* @__PURE__ */ jsx15("span", { className: CHIP_LABEL, children: label }),
|
|
745
746
|
onRemove && /* @__PURE__ */ jsx15(
|
|
746
|
-
|
|
747
|
+
BaseButton3,
|
|
747
748
|
{
|
|
748
749
|
type: "button",
|
|
749
750
|
onClick: (e) => {
|
|
@@ -784,6 +785,11 @@ function ChipInput({
|
|
|
784
785
|
[]
|
|
785
786
|
);
|
|
786
787
|
const open = query.trim().length > 0;
|
|
788
|
+
const ariaLabel = aria["aria-label"] ?? (value.length > 0 ? placeholder : void 0);
|
|
789
|
+
const naming = {
|
|
790
|
+
...ariaLabel !== void 0 && { "aria-label": ariaLabel },
|
|
791
|
+
...aria["aria-labelledby"] !== void 0 && { "aria-labelledby": aria["aria-labelledby"] }
|
|
792
|
+
};
|
|
787
793
|
function removeLast() {
|
|
788
794
|
if (value.length > 0) onChange(value.slice(0, -1));
|
|
789
795
|
}
|
|
@@ -829,6 +835,7 @@ function ChipInput({
|
|
|
829
835
|
autoFocus,
|
|
830
836
|
placeholder: value.length === 0 ? placeholder : "",
|
|
831
837
|
"aria-required": aria["aria-required"],
|
|
838
|
+
...naming,
|
|
832
839
|
onKeyDown: onInputKeyDown,
|
|
833
840
|
className: "flex-1 min-w-[120px] bg-transparent text-body-2 text-text-primary placeholder:text-text-muted outline-none border-none"
|
|
834
841
|
}
|
|
@@ -914,13 +921,13 @@ function Person({ name, picture, fallback = "\u2014", size = 20, className }) {
|
|
|
914
921
|
}
|
|
915
922
|
|
|
916
923
|
// src/PersonTrigger.tsx
|
|
917
|
-
import { Button as
|
|
924
|
+
import { Button as BaseButton4 } from "@base-ui/react/button";
|
|
918
925
|
import { IconChevronDown } from "@tabler/icons-react";
|
|
919
926
|
import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
920
927
|
function PersonTrigger({ name, picture, fallback, size, open = false, compact = false, className, ...props }) {
|
|
921
928
|
if (compact) {
|
|
922
929
|
return /* @__PURE__ */ jsx18(
|
|
923
|
-
|
|
930
|
+
BaseButton4,
|
|
924
931
|
{
|
|
925
932
|
type: "button",
|
|
926
933
|
"aria-haspopup": "menu",
|
|
@@ -933,7 +940,7 @@ function PersonTrigger({ name, picture, fallback, size, open = false, compact =
|
|
|
933
940
|
);
|
|
934
941
|
}
|
|
935
942
|
return /* @__PURE__ */ jsxs12(
|
|
936
|
-
|
|
943
|
+
BaseButton4,
|
|
937
944
|
{
|
|
938
945
|
type: "button",
|
|
939
946
|
"aria-haspopup": "menu",
|
|
@@ -1533,7 +1540,7 @@ import { Popover as BasePopover } from "@base-ui/react/popover";
|
|
|
1533
1540
|
import { jsx as jsx31, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1534
1541
|
var GAP5 = 4;
|
|
1535
1542
|
var VIEWPORT_PAD5 = 8;
|
|
1536
|
-
function Popover({ trigger, anchor, align = "left", side = "bottom", open, onOpenChange, finalFocus, actionsRef, ariaLabel, children, className, maxHeight }) {
|
|
1543
|
+
function Popover({ trigger, anchor, align = "left", side = "bottom", open, onOpenChange, finalFocus, actionsRef, ariaLabel, children, className, contentClassName, maxHeight }) {
|
|
1537
1544
|
const anchorTarget = useMemo2(() => {
|
|
1538
1545
|
if (!anchor) return void 0;
|
|
1539
1546
|
if (anchor instanceof Element) return anchor;
|
|
@@ -1569,7 +1576,7 @@ function Popover({ trigger, anchor, align = "left", side = "bottom", open, onOpe
|
|
|
1569
1576
|
ScrollArea,
|
|
1570
1577
|
{
|
|
1571
1578
|
viewportClassName: maxHeight ?? "max-h-[var(--available-height)]",
|
|
1572
|
-
contentClassName: "flex flex-col p-2 [&>[role=separator]]:mx-0",
|
|
1579
|
+
contentClassName: cn("flex flex-col p-2 [&>[role=separator]]:mx-0", contentClassName),
|
|
1573
1580
|
children
|
|
1574
1581
|
}
|
|
1575
1582
|
)
|