@opencxh/ui-kit 3.110.0 → 3.110.1

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.
@@ -15,6 +15,8 @@ export interface FilterChipProps {
15
15
  * rather than a filter, where a softer corner sits better next to inputs.
16
16
  */
17
17
  shape?: "pill" | "rect";
18
+ /** `md` is the default control height; `sm` for a dense toolbar. */
19
+ size?: "sm" | "md";
18
20
  /** Selected/active — renders the filled dark treatment. */
19
21
  active?: boolean;
20
22
  /** Show a trailing caret (opens a menu the consumer wires with Dropdown/Popover). */
@@ -38,4 +40,4 @@ export interface FilterChipProps {
38
40
  * active={!!status} onClick={openMenu} onClear={() => setStatus(null)} />
39
41
  * ```
40
42
  */
41
- export declare function FilterChip({ label, icon, tone, shape, active, caret, onClear, clearLabel, onClick, className, }: FilterChipProps): React.JSX.Element;
43
+ export declare function FilterChip({ label, icon, tone, shape, size, active, caret, onClear, clearLabel, onClick, className, }: FilterChipProps): React.JSX.Element;
@@ -15,8 +15,20 @@ export interface PageHeaderAction {
15
15
  disabled?: boolean;
16
16
  /** Dropdown options for split button */
17
17
  splitOptions?: SplitButtonOption[];
18
+ /**
19
+ * Render this action yourself instead of as a Button — a filter chip, a
20
+ * segmented toggle, an avatar stack. Position follows the array, so put it
21
+ * before the buttons to have it sit to their left. When set, every other
22
+ * field except `id` is ignored.
23
+ */
24
+ render?: () => React.ReactNode;
18
25
  }
19
26
  export interface PageHeaderProps {
27
+ /**
28
+ * `plain` sits directly on the page. `surface` is the app-bar treatment:
29
+ * its own background, full-bleed, closed off with a bottom border.
30
+ */
31
+ surface?: boolean;
20
32
  /** Page title */
21
33
  title: string;
22
34
  /** Page subtitle/description */
@@ -0,0 +1,22 @@
1
+ import { CSSProperties, RefObject } from 'react';
2
+ export interface AnchoredPositionOptions {
3
+ /** Gap between the anchor and the panel, in px. */
4
+ gap?: number;
5
+ /** Match the panel's width to the anchor — what a select wants, a menu does not. */
6
+ matchWidth?: boolean;
7
+ /** Preferred side. Flips automatically when there is no room. */
8
+ placement?: "bottom-start" | "bottom-end" | "top-start" | "top-end";
9
+ }
10
+ /**
11
+ * Position a floating panel against its trigger, in viewport coordinates.
12
+ *
13
+ * Two problems this solves, both of which a plain `absolute` panel has:
14
+ * an ancestor with `overflow-hidden` (a bordered form panel, a scroll area)
15
+ * clips the panel, and a trigger near the bottom of the window opens a panel
16
+ * that runs off-screen. Fixed coordinates escape every ancestor, and the
17
+ * placement flips upward when the space below is too small.
18
+ *
19
+ * Recomputes on scroll and resize while open, so the panel tracks its trigger
20
+ * instead of detaching when the page moves under it.
21
+ */
22
+ export declare function useAnchoredPosition(open: boolean, anchorRef: RefObject<HTMLElement | null>, { gap, matchWidth, placement }?: AnchoredPositionOptions): CSSProperties;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencxh/ui-kit",
3
- "version": "3.110.0",
3
+ "version": "3.110.1",
4
4
  "description": "Theme-aware UI component library for OpenCXH platform",
5
5
  "type": "module",
6
6
  "exports": {