@danxbot/ui 17.0.0 → 18.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -404,10 +404,11 @@ interface ProgressRingBase extends VariantProps<typeof ring> {
404
404
  */
405
405
  label: string;
406
406
  /**
407
- * DX-4062 — opt-in done state: at 100% or more the centre shows a green check
407
+ * DX-4062 / DX-4257 — done state: at 100% or more the centre shows a green check
408
408
  * (the library's `check` icon) instead of "100%". Below 100% nothing changes.
409
- * Off by default so no existing ring changes; it takes the place of the
410
- * number, so it has no effect with `showValue={false}`.
409
+ * On by default; pass `false` for a ring whose full value must still read as a
410
+ * number. It takes the place of the number, so it has no effect with
411
+ * `showValue={false}`.
411
412
  */
412
413
  checkWhenFull?: boolean;
413
414
  className?: string;
@@ -0,0 +1,33 @@
1
+ import { type ButtonProps } from "./Button";
2
+ export type SortDirection = "asc" | "desc";
3
+ export interface SortOption<Field extends string = string> {
4
+ value: Field;
5
+ /** The field as a person names it ("Name", "Created"). */
6
+ label: string;
7
+ /**
8
+ * What each direction means for THIS field, in the words that fit it
9
+ * ("A to Z" / "Z to A", "Oldest first" / "Newest first"). Absent, the
10
+ * directions read "Ascending" / "Descending". It names the arrows to
11
+ * assistive technology and appears in their tooltips, so a person is never
12
+ * left decoding which way an arrow sorts a date.
13
+ */
14
+ directions?: {
15
+ asc: string;
16
+ desc: string;
17
+ };
18
+ }
19
+ export interface SortValue<Field extends string = string> {
20
+ field: Field;
21
+ direction: SortDirection;
22
+ }
23
+ export interface SortMenuProps<Field extends string = string> {
24
+ options: readonly SortOption<Field>[];
25
+ value: SortValue<Field>;
26
+ onValueChange: (value: SortValue<Field>) => void;
27
+ /** Names the control for assistive technology, e.g. "Sort plans". The active order is appended to it. */
28
+ "aria-label": string;
29
+ size?: ButtonProps["size"];
30
+ align?: "start" | "center" | "end";
31
+ className?: string;
32
+ }
33
+ export declare function SortMenu<Field extends string = string>({ options, value, onValueChange, "aria-label": ariaLabel, size, align, className, }: SortMenuProps<Field>): import("react").JSX.Element;
@@ -16,3 +16,23 @@ export declare const OVERLAY_POPUP_SURFACE = "dx-ground-overlay rounded-xl borde
16
16
  * different transform: `Dialog` scales in place, `CommandPalette` also
17
17
  * drifts up a couple pixels), so it is deliberately not included here. */
18
18
  export declare const OVERLAY_POPUP_MOTION: string[];
19
+ /** The surface of every popup ANCHORED to a control — `Menu`, `Select`,
20
+ * `Combobox`, `MultiCombobox`, `Popover` (DX-4265). Same paint as
21
+ * `OVERLAY_POPUP_SURFACE` minus the modal panel's radius, so the five
22
+ * stop hand-copying it. `bg-surface-overlay` is opaque in both themes.
23
+ * `dx-ground-overlay` tells the interaction ramp what the popup is painted ON:
24
+ * without it every hover inside mixes from `--surface`, which on dark is two
25
+ * ramp steps below `--surface-overlay`, so the hover fill lands DARKER than
26
+ * the popup and reads as nothing happening (tokens.css). */
27
+ export declare const ANCHORED_POPUP_SURFACE = "dx-ground-overlay rounded-lg border border-border bg-surface-overlay shadow-lg outline-none";
28
+ /** The motion every `ANCHORED_POPUP_SURFACE` consumer shares.
29
+ *
30
+ * DX-4265: ENTRY DOES NOT FADE. Opacity animates the whole element, background
31
+ * included, so a popup that fades in is see-through for its first
32
+ * `--dur-slow`: the page behind it reads through the option list. That is
33
+ * invisible in dark, where popup and page are both near-black, and obvious in
34
+ * light, where the list is white text-on-white over page text; it was filed as
35
+ * "the light popup is translucent" when the surface token was opaque all along.
36
+ * The popup arrives by scale + a one-step drift, opaque from the first frame.
37
+ * EXIT still fades: a closing popup being see-through says "leaving". */
38
+ export declare const ANCHORED_POPUP_MOTION: string[];
@@ -3,8 +3,9 @@ import type { Permission, Role } from "./types";
3
3
  export interface ApiKey {
4
4
  id: number;
5
5
  name: string;
6
- /** The `Role.id` this key acts with. */
7
- roleId: string;
6
+ /** The label of the role this key acts with. A label, not an id: a key can carry a role of a team other than the one whose
7
+ * `roles` the create dialog offers, and only the consumer's server can name that one. */
8
+ roleLabel: string;
8
9
  /** ISO instant. */
9
10
  createdAt: string;
10
11
  /** ISO instant, or `null`/omitted if it has never been used. */
@@ -17,7 +18,7 @@ export interface ApiKeysPanelProps {
17
18
  keys: ApiKey[];
18
19
  /** Keys a worker minted on the person's behalf; listed and revocable, never created here. Omitted or empty hides the group. */
19
20
  agentKeys?: ApiKey[];
20
- /** Every role a key could carry; also resolves each listed key's role label. */
21
+ /** The roles the create dialog offers. */
21
22
  roles: Role[];
22
23
  /** The permission catalog, used to name the permissions that make a role unavailable. */
23
24
  permissions: Permission[];
@@ -57,6 +57,7 @@ export { OTPInput, type OTPInputProps } from "./components/OTPInput";
57
57
  export { Combobox, ComboboxItem, ComboboxGroup, MultiCombobox, type ComboboxProps, type ComboboxItemProps, type ComboboxGroupProps, type MultiComboboxProps, } from "./components/Combobox";
58
58
  export { Select, SelectItem, SelectGroup, SelectSeparator, type SelectProps, type SelectItemProps, type SelectGroupProps, } from "./components/Select";
59
59
  export { StatusSelect, type StatusSelectProps, type StatusOption } from "./components/StatusSelect";
60
+ export { SortMenu, type SortMenuProps, type SortOption, type SortValue, type SortDirection } from "./components/SortMenu";
60
61
  export { Card, CardHeader, CardFooter, type CardProps, type CardHeaderProps, } from "./components/Card";
61
62
  export { RecordCard, RecordCardHandle, RecordCardEyebrow, RecordCardTitle, RecordCardBadges, RecordCardMedia, RecordCardMeta, type RecordCardProps, type RecordCardMetric, type RecordCardHandleProps, type RecordCardEyebrowProps, type RecordCardTitleProps, type RecordCardBadgesProps, type RecordCardMediaProps, type RecordCardMetaProps, } from "./components/RecordCard";
62
63
  export { Tabs, TabList, Tab, TabPanel, type TabsProps, type TabListProps, type TabProps, type TabPanelProps, } from "./components/Tabs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danxbot/ui",
3
- "version": "17.0.0",
3
+ "version": "18.1.0",
4
4
  "type": "module",
5
5
  "description": "Danxbot — a domain-agnostic React design system with motion as a first-class primitive.",
6
6
  "license": "MIT",