@assure-one/design-system 1.47.1 → 1.48.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.
@@ -1,15 +1,16 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React$1 from 'react';
3
3
  import { ReactNode } from 'react';
4
- import { B as BadgeProps, S as SelectSize, F as FileKind, a as ServiceTone } from '../data-table-view-D9a1_IRF.js';
5
- export { A as Assignee, D as Dash, M as MoneyCell, b as StagePill, T as TagsCell } from '../data-table-view-D9a1_IRF.js';
4
+ import { B as BadgeProps, S as SelectSize, F as FileKind, a as ServiceTone } from '../data-table-view-CNTfzEyS.js';
5
+ export { A as Assignee, D as Dash, M as MoneyCell, b as StagePill, T as TagsCell } from '../data-table-view-CNTfzEyS.js';
6
6
  import * as class_variance_authority_types from 'class-variance-authority/types';
7
7
  import { VariantProps } from 'class-variance-authority';
8
8
  import '../vocab-DornLJbW.js';
9
9
  import '../system-DfJIVBlJ.js';
10
10
  import '@radix-ui/react-select';
11
- import '../types-BTHIs2nk.js';
11
+ import '../types-CKpkEBvW.js';
12
12
  import '../brand-theme-ZYM867Jz.js';
13
+ import '../option-izy_4w4Z.js';
13
14
 
14
15
  /**
15
16
  * Blockquote — semantic quote with optional attribution. Uses `font-display`
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- export { AIReceiptPanel, AiDraftCard, Assignee, AttentionItem, Blockquote, BottomNav, CategoryDivider, CategoryTag, ChannelTabs, ClientRailGroupHeader, ClientRailItem, Dash, DashGrid, DocumentChecklist, DocumentFileCard, DocumentFileLine, DocumentFileRow, DocumentRequestCard, DocumentRequestDetail, DocumentRequestField, DocumentRequestUpload, DocumentSourceFilter, DocumentSourceTag, DocumentsWorkspaceLayout, EmailMessageCard, EngagementCard, EngagementTimeline, EngagementTimelineStep, IntentBadge, MissingDocumentsPanel, MoneyCell, NewMenu, Section, SectionHead, SectionHeader, SignatureEditor, StagePill, Stat, StatusPill, SuggestionPills, TagsCell, TeamMemberSelect, TimeLogger, TimeLoggerActions, TimeLoggerBillable, TimeLoggerContextRow, TimeLoggerEntry, TimeLoggerEntryList, TimeLoggerField, TimeLoggerFooter, TimeLoggerHeader, TimeLoggerNotes, TimeLoggerTimer, formatClock, formatCurrency, formatDuration, parseDuration, useStopwatch } from '../chunk-FIRPQWYR.js';
3
- import '../chunk-IIBDSTOG.js';
2
+ export { AIReceiptPanel, AiDraftCard, Assignee, AttentionItem, Blockquote, BottomNav, CategoryDivider, CategoryTag, ChannelTabs, ClientRailGroupHeader, ClientRailItem, Dash, DashGrid, DocumentChecklist, DocumentFileCard, DocumentFileLine, DocumentFileRow, DocumentRequestCard, DocumentRequestDetail, DocumentRequestField, DocumentRequestUpload, DocumentSourceFilter, DocumentSourceTag, DocumentsWorkspaceLayout, EmailMessageCard, EngagementCard, EngagementTimeline, EngagementTimelineStep, IntentBadge, MissingDocumentsPanel, MoneyCell, NewMenu, Section, SectionHead, SectionHeader, SignatureEditor, StagePill, Stat, StatusPill, SuggestionPills, TagsCell, TeamMemberSelect, TimeLogger, TimeLoggerActions, TimeLoggerBillable, TimeLoggerContextRow, TimeLoggerEntry, TimeLoggerEntryList, TimeLoggerField, TimeLoggerFooter, TimeLoggerHeader, TimeLoggerNotes, TimeLoggerTimer, formatClock, formatCurrency, formatDuration, parseDuration, useStopwatch } from '../chunk-YRFLK7ER.js';
3
+ import '../chunk-HV24JSRN.js';
4
4
  import '../chunk-ARCWF2S3.js';
5
5
  import '../chunk-YRHRVOLV.js';
6
6
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { D as DesignSystemProviderProps } from '../design-system-provider-C6Tu1vyg.js';
2
+ import { D as DesignSystemProviderProps } from '../design-system-provider-YblRtwYw.js';
3
3
  import 'react';
4
- import '../types-BTHIs2nk.js';
4
+ import '../types-CKpkEBvW.js';
5
5
 
6
6
  /**
7
7
  * Props of `NextDesignSystemProvider`: everything `DesignSystemProvider`
@@ -0,0 +1,64 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ /**
4
+ * L1a behaviour primitive (private). Not exported from the package.
5
+ *
6
+ * The canonical option model of every list-shaped control (W4-09; target
7
+ * architecture §32): `Select`, the coming `Combobox` (W4-10) and its
8
+ * `MultiSelect` preset (W4-11), the `SearchSelect` adapter (W4-12) and the
9
+ * `PeoplePicker` pattern all read one shape, in place of the six that ship
10
+ * today (`{value,label}`, `{id,label,group…}`, `{id,label,email}`,
11
+ * `{id,fullName}`, `{key,label,dot}`, `string[]`).
12
+ *
13
+ * Two halves:
14
+ *
15
+ * - {@link Option} and its accessors: what a row *is*. Consumers with domain
16
+ * objects pass {@link OptionAccessors} (`getOptionValue`/`getOptionLabel`)
17
+ * instead of remapping, and {@link toOptions} normalises everything — a
18
+ * `string[]`, domain objects, `Option`s — into one array the list renders.
19
+ * - The selection helpers: what a control's *value* is, discriminated by
20
+ * `multiple` (single `TValue | null`, multi `TValue[]`; §32 "Value"). `""`
21
+ * keeps meaning empty in 2.x (§32 "Compat"), so {@link normalizeSingleValue}
22
+ * folds it to `null` at the boundary.
23
+ *
24
+ * No React, no client directive, no DOM: plain functions over plain data, so
25
+ * the same module serves a Server Component, a test and the keyboard helper.
26
+ */
27
+ /**
28
+ * One row of a list-shaped control.
29
+ *
30
+ * `value` is never `""`: emptiness is `value === null` on the control, not a
31
+ * sentinel row (§32). `label` is the string typeahead, filtering and the
32
+ * accessible name read; `description` and `icon` are rendered, never searched.
33
+ * `keywords` widen the match without showing. `meta` carries consumer data
34
+ * through to `renderOption` / `onValueChange` details untouched.
35
+ *
36
+ * @experimental
37
+ */
38
+ interface Option<TValue extends string = string, TMeta = unknown> {
39
+ value: TValue;
40
+ label: string;
41
+ description?: ReactNode;
42
+ /** Leading visual: icon, avatar, flag, colour swatch. */
43
+ icon?: ReactNode;
44
+ disabled?: boolean;
45
+ group?: string | undefined;
46
+ keywords?: readonly string[] | undefined;
47
+ meta?: TMeta;
48
+ }
49
+ /**
50
+ * How a list reads a consumer's own item type. Only `getOptionValue` and
51
+ * `getOptionLabel` are required: an item with no `disabled`/`group`/`keywords`
52
+ * accessor is enabled, ungrouped and matched on its label alone.
53
+ *
54
+ * @experimental
55
+ */
56
+ interface OptionAccessors<TItem, TValue extends string = string> {
57
+ getOptionValue: (item: TItem) => TValue;
58
+ getOptionLabel: (item: TItem) => string;
59
+ getOptionDisabled?: ((item: TItem) => boolean) | undefined;
60
+ getOptionGroup?: ((item: TItem) => string | undefined) | undefined;
61
+ getOptionKeywords?: ((item: TItem) => readonly string[] | undefined) | undefined;
62
+ }
63
+
64
+ export type { Option as O, OptionAccessors as a };