@webority/ui-react 0.164.0 → 0.165.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.
Files changed (80) hide show
  1. package/LICENSE +1 -1
  2. package/dist/canvas-kit/kit.js +206 -206
  3. package/dist/canvas-kit/manifest.json +1086 -406
  4. package/dist/canvas-kit/release.json +6 -6
  5. package/dist/components/AppAsyncBlock.js +1 -1
  6. package/dist/components/AppColorField.js +1 -1
  7. package/dist/components/AppDataTable.js +1 -1
  8. package/dist/components/AppDatePicker.js +1 -1
  9. package/dist/components/AppDateRangePicker.js +1 -1
  10. package/dist/components/AppDescriptions.js +1 -1
  11. package/dist/components/AppDropZone.js +1 -1
  12. package/dist/components/AppDropdown.js +1 -1
  13. package/dist/components/AppEntryGrid.js +1 -0
  14. package/dist/components/AppFileAttachment.js +1 -1
  15. package/dist/components/AppFilePicker.js +1 -1
  16. package/dist/components/AppFilterBar.js +1 -1
  17. package/dist/components/AppForm.js +1 -1
  18. package/dist/components/AppFormulaSteps.js +1 -0
  19. package/dist/components/AppImagePicker.js +1 -1
  20. package/dist/components/AppInput.js +1 -1
  21. package/dist/components/AppMentionInput.js +1 -1
  22. package/dist/components/AppMetricStrip.js +1 -1
  23. package/dist/components/AppModal.js +1 -1
  24. package/dist/components/AppNumberInput.js +1 -1
  25. package/dist/components/AppOtpInput.js +1 -1
  26. package/dist/components/AppPhoneNumberInput.js +1 -1
  27. package/dist/components/AppPopover.js +1 -1
  28. package/dist/components/AppRadioGroup.js +1 -1
  29. package/dist/components/AppRating.js +1 -1
  30. package/dist/components/AppRichText.js +1 -1
  31. package/dist/components/AppRowActions.js +1 -0
  32. package/dist/components/AppScoreScale.js +1 -1
  33. package/dist/components/AppSectionFeatures.js +1 -1
  34. package/dist/components/AppSectionLogos.js +1 -1
  35. package/dist/components/AppSelect.js +1 -1
  36. package/dist/components/AppShell.js +1 -1
  37. package/dist/components/AppSlider.js +1 -1
  38. package/dist/components/AppTextarea.js +1 -1
  39. package/dist/components/AppTimePicker.js +1 -1
  40. package/dist/components/AppToast.js +1 -1
  41. package/dist/guidance.json +212 -137
  42. package/dist/hookForm/index.js +1 -0
  43. package/dist/lib/CheckField.js +1 -1
  44. package/dist/lib/formFields.js +1 -0
  45. package/dist/lib/unsavedText.js +1 -0
  46. package/dist/types/components/AppAsyncBlock.d.ts +3 -3
  47. package/dist/types/components/AppChart.d.ts +12 -4
  48. package/dist/types/components/AppDataTable.d.ts +29 -2
  49. package/dist/types/components/AppDateRangePicker.d.ts +4 -0
  50. package/dist/types/components/AppDescriptions.d.ts +6 -0
  51. package/dist/types/components/AppEntryGrid.d.ts +122 -0
  52. package/dist/types/components/AppFilterBar.d.ts +12 -1
  53. package/dist/types/components/AppForm.d.ts +18 -0
  54. package/dist/types/components/AppFormulaSteps.d.ts +64 -0
  55. package/dist/types/components/AppMetricStrip.d.ts +5 -0
  56. package/dist/types/components/AppModal.d.ts +5 -0
  57. package/dist/types/components/AppRowActions.d.ts +40 -0
  58. package/dist/types/components/AppSectionFeatures.d.ts +5 -1
  59. package/dist/types/components/AppSectionLogos.d.ts +1 -0
  60. package/dist/types/components/AppShell.d.ts +2 -0
  61. package/dist/types/components/AppSlider.d.ts +5 -0
  62. package/dist/types/components/AppToast.d.ts +5 -0
  63. package/dist/types/hookForm/index.d.ts +14 -0
  64. package/dist/types/index.d.ts +7 -5
  65. package/dist/types/lib/formFields.d.ts +12 -0
  66. package/dist/types/lib/unsavedText.d.ts +5 -0
  67. package/dist/ui-react.js +1 -1
  68. package/dist/web-core/dist/errors/extractApiError.js +2 -0
  69. package/dist/web-core/dist/errors/requestPlatform.js +1 -0
  70. package/package.json +20 -9
  71. package/dist/components/AppResizable.js +0 -1
  72. package/dist/components/AppResizableHandle.js +0 -1
  73. package/dist/components/AppResizablePanel.js +0 -1
  74. package/dist/components/AppRollingNumber.js +0 -1
  75. package/dist/components/AppRowSwitch.js +0 -1
  76. package/dist/types/components/AppResizable.d.ts +0 -37
  77. package/dist/types/components/AppResizableHandle.d.ts +0 -14
  78. package/dist/types/components/AppResizablePanel.d.ts +0 -14
  79. package/dist/types/components/AppRollingNumber.d.ts +0 -30
  80. package/dist/types/components/AppRowSwitch.d.ts +0 -18
@@ -0,0 +1,122 @@
1
+ import { type JSX, type ReactNode } from "react";
2
+ export type AppEntryGridRowStatus = "clean" | "dirty" | "saving" | "saved" | "failed";
3
+ export type AppEntryGridColumnKind = "text" | "number";
4
+ export interface AppEntryGridColumn<Row> {
5
+ key: string;
6
+ label: ReactNode;
7
+ /** "number" right-aligns the column and selects a focused input's text. Default "text". */
8
+ kind?: AppEntryGridColumnKind | undefined;
9
+ width?: string | number | undefined;
10
+ /** Help shown in an AppInfoTip beside the header label. */
11
+ help?: ReactNode | undefined;
12
+ /** Renders this column's cell of the sticky totals row. */
13
+ footer?: ((rows: readonly Row[]) => ReactNode) | undefined;
14
+ }
15
+ export interface AppEntryGridProps<Row> {
16
+ /** The columns, left to right, each with a key and a label, plus optional kind, width and help. */
17
+ columns: readonly AppEntryGridColumn<Row>[];
18
+ /** The row objects shown in the grid, one per line, in the order they appear. */
19
+ rows: readonly Row[];
20
+ rowKey: (row: Row) => string;
21
+ /** The key, as rowKey returns it, of the row the person is working on; that row is drawn as active. */
22
+ activeRowKey?: string | null | undefined;
23
+ onActiveRowChange?: ((rowKey: string) => void) | undefined;
24
+ renderCell: (row: Row, column: AppEntryGridColumn<Row>, isActive: boolean) => ReactNode;
25
+ rowState?: ((row: Row) => AppEntryGridRowStatus) | undefined;
26
+ /** The failure shown under a failed row (role alert). */
27
+ rowError?: ((row: Row) => ReactNode) | undefined;
28
+ onCommitRow?: ((row: Row, move: "next" | "stay") => void) | undefined;
29
+ onDiscardRow?: ((row: Row) => void) | undefined;
30
+ onAddRow?: (() => void) | undefined;
31
+ renderRowDetail?: ((row: Row) => ReactNode) | undefined;
32
+ /**
33
+ * Shows the keyboard legend under the grid.
34
+ * @default true
35
+ */
36
+ hint?: boolean | undefined;
37
+ /**
38
+ * The accessible name of the table.
39
+ * @default "Entry lines"
40
+ */
41
+ label?: string | undefined;
42
+ /**
43
+ * The text of the button that adds an empty line at the end.
44
+ * @default "Add line"
45
+ */
46
+ addLabel?: string | undefined;
47
+ /**
48
+ * The message shown when there are no rows.
49
+ * @default "No lines yet"
50
+ */
51
+ emptyLabel?: string | undefined;
52
+ /**
53
+ * The name of the status column, read by screen readers but not shown.
54
+ * @default "Status"
55
+ */
56
+ statusLabel?: string | undefined;
57
+ /**
58
+ * The status word for a line with changes not yet saved.
59
+ * @default "Changed"
60
+ */
61
+ dirtyLabel?: string | undefined;
62
+ /**
63
+ * The status word for a line being saved.
64
+ * @default "Saving"
65
+ */
66
+ savingLabel?: string | undefined;
67
+ /**
68
+ * The status word for a line that was saved.
69
+ * @default "Saved"
70
+ */
71
+ savedLabel?: string | undefined;
72
+ /**
73
+ * The status word for a line whose save failed.
74
+ * @default "Not saved"
75
+ */
76
+ failedLabel?: string | undefined;
77
+ /**
78
+ * The keyboard legend for Enter.
79
+ * @default "Save and go to the next line"
80
+ */
81
+ commitNextLabel?: string | undefined;
82
+ /**
83
+ * The keyboard legend for Ctrl and S.
84
+ * @default "Save"
85
+ */
86
+ commitStayLabel?: string | undefined;
87
+ /**
88
+ * The keyboard legend for Escape.
89
+ * @default "Discard changes"
90
+ */
91
+ discardLabel?: string | undefined;
92
+ /**
93
+ * The keyboard legend for Ctrl and the arrow keys.
94
+ * @default "Move between lines"
95
+ */
96
+ moveLabel?: string | undefined;
97
+ /**
98
+ * Extra class names added to the grid's root element.
99
+ * @default ""
100
+ */
101
+ className?: string | undefined;
102
+ }
103
+ /**
104
+ * A keyboard-first grid for entering lines (an invoice, a stock count, a journal): one row is
105
+ * active, its cells are editable inputs the caller renders, and the keys work without the mouse.
106
+ *
107
+ * Enter save the active row and go to the next line (not in a textarea, a button or
108
+ * an open list, and never while an input method is composing)
109
+ * Ctrl+S / Meta+S save and stay on the row
110
+ * Esc discard the row's changes (not while a list is open: that closes the list)
111
+ * Ctrl+Up / Down move to the previous or next row
112
+ * Tab native order, field by field; never intercepted
113
+ *
114
+ * The grid reports intent and never moves on its own: after `onCommitRow(row, "next")` the caller
115
+ * saves, and only when the save succeeds sets `activeRowKey` to the next row. A failed row stays
116
+ * active and shows `rowError`. Focus follows `activeRowKey`, so the caller drives the cursor.
117
+ *
118
+ * Each row shows a status mark (changed, saving, saved, not saved); a column with `footer` adds a
119
+ * totals row. The keys and focus live in `<wui-entry-grid>`, the element the Razor `<app-entry-grid>`
120
+ * prints too; this component answers its events with the callbacks.
121
+ */
122
+ export default function AppEntryGrid<Row>(props: AppEntryGridProps<Row>): JSX.Element;
@@ -4,6 +4,8 @@ import { type AppDateRangePickerProps } from "./AppDateRangePicker.tsx";
4
4
  export interface AppFilterOption {
5
5
  value: string;
6
6
  label: string;
7
+ count?: number | undefined;
8
+ icon?: string | undefined;
7
9
  }
8
10
  export interface AppFilterDateRange {
9
11
  from: string;
@@ -25,11 +27,18 @@ export interface AppFilterBarProps extends Omit<ComponentPropsWithoutRef<"div">,
25
27
  /** The current filters, keyed by facet key: a string, a list of strings, or a { from, to } date range. */
26
28
  value: Readonly<Record<string, ListFilterValue>>;
27
29
  onChange: (key: string, value: AppFilterValue) => void;
30
+ /** Called once per user action with every changed key and its new value: Clear all and Apply. Without it each key calls onChange. Use it when filters live in the page address, where one write per key overwrites the last. */
31
+ onChangeMany?: ((values: Record<string, AppFilterValue>) => void) | undefined;
28
32
  /**
29
33
  * How many facets stay in the row; the rest fold into the Filters button.
30
34
  * @default 3
31
35
  */
32
36
  inline?: number | undefined;
37
+ /**
38
+ * Draws each inline facet's label above its control. The folded Filters panel always shows labels.
39
+ * @default false
40
+ */
41
+ facetLabels?: boolean | undefined;
33
42
  /**
34
43
  * A floating panel: hover, click or F opens the facets in a non-modal panel under the Filters button, with a chip summary in the row.
35
44
  * @default false
@@ -132,8 +141,10 @@ export interface AppFilterBarProps extends Omit<ComponentPropsWithoutRef<"div">,
132
141
  * @param props.facets
133
142
  * @param props.value
134
143
  * @param props.onChange
135
- * Called with the facet key and its new value. Clear all calls it once per active facet, with the empty value.
144
+ * Called with the facet key and its new value.
145
+ * @param [props.onChangeMany] Called once per user action with every changed key and its new value: Clear all and Apply. Without it each key calls onChange. Use it when filters live in the page address, where one write per key overwrites the last.
136
146
  * @param [props.inline]
147
+ * @param [props.facetLabels] Default false. Draws each inline facet's label above its control; the folded panel always shows labels.
137
148
  * @param [props.floating]
138
149
  * @param [props.apply]
139
150
  * @param [props.size]
@@ -1,3 +1,4 @@
1
+ import type { UnsavedChangesGuard } from "@webority/web-core/router";
1
2
  import { type ComponentPropsWithRef, type JSX, type ReactNode, type SubmitEvent } from "react";
2
3
  export interface AppFormSubmitContext {
3
4
  /** One key per send; a new one is made only after onSubmit returns true. */
@@ -12,6 +13,23 @@ export interface AppFormProps extends Omit<ComponentPropsWithRef<"form">, "onSub
12
13
  */
13
14
  className?: string | undefined;
14
15
  children?: ReactNode;
16
+ /**
17
+ * Field name to message. A field inside the form with that name and no error of its own shows it; one no field claims is drawn at the top of the form.
18
+ * @default {}
19
+ */
20
+ fieldErrors?: Readonly<Record<string, string>> | undefined;
21
+ /**
22
+ * Errors that name no field, drawn at the top of the form.
23
+ * @default []
24
+ */
25
+ formErrors?: readonly string[] | undefined;
26
+ /** The guard from useUnsavedChanges (@webority/web-core/router); the form asks before a held navigation goes ahead. */
27
+ unsavedChanges?: UnsavedChangesGuard | undefined;
28
+ /**
29
+ * Replaces the question's message.
30
+ * @default "Your changes on this page are not saved. If you leave now, they are lost."
31
+ */
32
+ unsavedChangesMessage?: string | undefined;
15
33
  }
16
34
  export interface FormSubmitState {
17
35
  submitting: boolean;
@@ -0,0 +1,64 @@
1
+ import type { ComponentPropsWithoutRef, JSX } from "react";
2
+ export type AppFormulaSign = "plus" | "minus" | "times" | "divide" | "equal";
3
+ export interface AppFormulaStep {
4
+ key?: string | undefined;
5
+ /** The operator before this line; unset on the first line. "equal" marks a result line. */
6
+ sign?: AppFormulaSign | undefined;
7
+ label: string;
8
+ /** The working in words and numbers, such as "0.1% of ₹10,00,000.00, rounded to the rupee". */
9
+ working?: string | undefined;
10
+ /** The line's figure, already formatted. */
11
+ result: string;
12
+ note?: string | undefined;
13
+ }
14
+ export interface AppFormulaStepsProps extends ComponentPropsWithoutRef<"ol"> {
15
+ /**
16
+ * The lines of the calculation, top to bottom. The first line has no sign; each later line names its operator.
17
+ * @default []
18
+ */
19
+ steps?: AppFormulaStep[] | undefined;
20
+ /**
21
+ * The accessible name of the list.
22
+ * @default "Calculation"
23
+ */
24
+ label?: string | undefined;
25
+ /**
26
+ * The word a plus line is read as. Replaces the built-in English text, for other languages.
27
+ * @default "plus"
28
+ */
29
+ plusLabel?: string | undefined;
30
+ /**
31
+ * The word a minus line is read as. Replaces the built-in English text, for other languages.
32
+ * @default "minus"
33
+ */
34
+ minusLabel?: string | undefined;
35
+ /**
36
+ * The word a times line is read as. Replaces the built-in English text, for other languages.
37
+ * @default "times"
38
+ */
39
+ timesLabel?: string | undefined;
40
+ /**
41
+ * The word a divide line is read as. Replaces the built-in English text, for other languages.
42
+ * @default "divided by"
43
+ */
44
+ divideLabel?: string | undefined;
45
+ /**
46
+ * The word an equal line is read as. Replaces the built-in English text, for other languages.
47
+ * @default "equals"
48
+ */
49
+ equalLabel?: string | undefined;
50
+ /**
51
+ * Extra class names added to the list's root element.
52
+ * @default ""
53
+ */
54
+ className?: string | undefined;
55
+ }
56
+ /**
57
+ * A figure worked out one line at a time: each line applies an operator to the running
58
+ * total, shows its working and its figure, and the line marked `equal` is the result.
59
+ *
60
+ * The operator is drawn as a glyph hidden from assistive tech, with its word read
61
+ * in its place, so a screen reader hears "minus TDS" rather than a bare symbol. A
62
+ * line with no `sign` (the first) keeps an empty sign column so the figures align.
63
+ */
64
+ export default function AppFormulaSteps(props: AppFormulaStepsProps): JSX.Element;
@@ -25,6 +25,11 @@ export interface AppMetricStripProps extends Omit<React.ComponentPropsWithoutRef
25
25
  * @default "md"
26
26
  */
27
27
  size?: (typeof SIZES)[number] | undefined;
28
+ /**
29
+ * Draws the strip as one flush row with a rule between figures from the medium breakpoint up, for a strip inside a flush card.
30
+ * @default false
31
+ */
32
+ divided?: boolean | undefined;
28
33
  /** Router link (e.g. react-router Link) for in-app destinations; it receives `to` instead of `href`. Absolute, `#` and scheme hrefs stay plain anchors. Keeps the library router-agnostic. */
29
34
  linkComponent?: AppLinkComponent | undefined;
30
35
  className?: string | undefined;
@@ -50,6 +50,11 @@ export interface AppModalProps extends Omit<ComponentPropsWithoutRef<"dialog">,
50
50
  * @default "center"
51
51
  */
52
52
  placement?: AppModalPlacement | undefined;
53
+ /**
54
+ * Face of the title. serif draws it in the display typeface at the 3xl size, weight 500.
55
+ * @default "sans"
56
+ */
57
+ titleFont?: "sans" | "serif" | undefined;
53
58
  /**
54
59
  * Hides the header, leaving the body and footer.
55
60
  * @default false
@@ -0,0 +1,40 @@
1
+ import type * as React from "react";
2
+ import { type AppLinkComponent } from "../lib/linkTarget.ts";
3
+ export interface AppRowAction {
4
+ /** Unique within the row's list. */
5
+ key: string;
6
+ /** The icon button's accessible name and tooltip, and the menu row's text. */
7
+ label: string;
8
+ /** A library icon name. Without it (and without showLabel) the action is a menu row at every width. */
9
+ icon?: string | undefined;
10
+ /** The inline icon's style; the menu row draws the linear glyph. */
11
+ iconVariant?: "linear" | "outline" | "bold" | "bulk" | "broken" | "twotone" | undefined;
12
+ /** A plain link, never routed through linkComponent. An action takes to or href, not both. */
13
+ href?: string | undefined;
14
+ /** An in-app route, drawn through linkComponent when one is given. */
15
+ to?: string | undefined;
16
+ /** Runs on a click; may accompany href or to. An action needs onClick, href or to unless it is disabled. */
17
+ onClick?: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
18
+ /** danger marks a destructive action. */
19
+ tone?: "danger" | undefined;
20
+ disabled?: boolean | undefined;
21
+ /** Why the action is disabled: joined to the icon button's label as "Edit: locked", and shown on the menu row. Needs disabled. */
22
+ disabledReason?: string | undefined;
23
+ /** Keeps the action in the menu at every width. Not with showLabel. */
24
+ menuOnly?: boolean | undefined;
25
+ /** From sm up, draws the action as a small labelled button instead of an icon button. */
26
+ showLabel?: boolean | undefined;
27
+ }
28
+ /** A list entry; false, null and undefined are skipped, so `canEdit && { ... }` leaves an action out. */
29
+ export type AppRowActionEntry = AppRowAction | false | null | undefined;
30
+ export interface AppRowActionsProps extends Omit<React.ComponentPropsWithoutRef<"div">, "children"> {
31
+ /** The row's actions, in order. A list entry; false, null and undefined are skipped, so `canEdit && { ... }` leaves an action out. Each item needs a unique `key`, and onClick, href or to unless it is disabled; onClick may accompany href or to. */
32
+ items: readonly AppRowActionEntry[];
33
+ /**
34
+ * The menu trigger's accessible name and tooltip.
35
+ * @default "More actions"
36
+ */
37
+ menuLabel?: string | undefined;
38
+ linkComponent?: AppLinkComponent | undefined;
39
+ }
40
+ export default function AppRowActions(props: AppRowActionsProps): React.JSX.Element;
@@ -11,7 +11,7 @@ export interface AppSectionFeaturesProps {
11
11
  /** The section's heading. */
12
12
  title: ReactNode;
13
13
  /**
14
- * The points: a title, a description, a library icon name and an image.
14
+ * The points: a title, a description, a library icon name or an image, and a second image for the rows layout.
15
15
  * @default []
16
16
  */
17
17
  items?: {
@@ -19,6 +19,10 @@ export interface AppSectionFeaturesProps {
19
19
  title: string;
20
20
  description?: ReactNode | undefined;
21
21
  icon?: string | undefined;
22
+ imageSrc?: string | undefined;
23
+ imageAlt?: string | undefined;
24
+ imageWidth?: number | undefined;
25
+ imageHeight?: number | undefined;
22
26
  media?: ReactNode | undefined;
23
27
  }[] | undefined;
24
28
  /**
@@ -26,6 +26,7 @@ export interface AppSectionLogosProps {
26
26
  width?: number | undefined;
27
27
  height?: number | undefined;
28
28
  href?: string | undefined;
29
+ caption?: string | undefined;
29
30
  }[] | undefined;
30
31
  /**
31
32
  * The heading element.
@@ -61,6 +61,8 @@ export interface UserMenuShape {
61
61
  roles?: string[] | undefined;
62
62
  /** Leave the job title off the topbar trigger; the opened menu still shows it. */
63
63
  noTriggerRole?: boolean | undefined;
64
+ /** Draws an always-on outline around the topbar trigger. Defaults to false. */
65
+ outlined?: boolean | undefined;
64
66
  /** Profile photo URL. */
65
67
  photo?: string | undefined;
66
68
  profileHref?: string | undefined;
@@ -55,6 +55,11 @@ interface AppSliderBaseProps {
55
55
  showValue?: boolean | undefined;
56
56
  /** Suffix for the value label, for example %. */
57
57
  unit?: string | undefined;
58
+ /**
59
+ * Digit grouping of the value label: indian writes 1,50,000; none writes 150000.
60
+ * @default "none"
61
+ */
62
+ grouping?: "none" | "indian" | undefined;
58
63
  /** Element id; a generated id is used when omitted. */
59
64
  id?: string | undefined;
60
65
  /** Accessible name when no visible label is used. */
@@ -34,6 +34,11 @@ export interface AppToastProps extends Omit<ComponentPropsWithoutRef<"div">, "cl
34
34
  * @default 16
35
35
  */
36
36
  offset?: number | undefined;
37
+ /**
38
+ * The close button's accessible name on every toast, for other languages.
39
+ * @default "Close"
40
+ */
41
+ closeLabel?: string | undefined;
37
42
  /**
38
43
  * Extra class on the container element.
39
44
  * @default ""
@@ -0,0 +1,14 @@
1
+ import type { FieldValues, UseFormReturn } from "react-hook-form";
2
+ import type { AppFormProps, AppFormSubmitContext } from "../components/AppForm.tsx";
3
+ export interface UseHookFormOptions<TValues extends FieldValues> {
4
+ /** Runs with the valid values. Throw or reject to fail: an ApiError's field errors land on their fields, the rest at the top of the form. */
5
+ onSubmit: (values: TValues, context: AppFormSubmitContext) => void | Promise<void>;
6
+ }
7
+ export interface HookFormBinding {
8
+ onSubmit: AppFormProps["onSubmit"];
9
+ fieldErrors: Readonly<Record<string, string>>;
10
+ formErrors: readonly string[];
11
+ noValidate: true;
12
+ }
13
+ /** Connects a react-hook-form form to AppForm: `<AppForm {...useHookForm(form, { onSubmit })}>`. */
14
+ export declare function useHookForm<TValues extends FieldValues>(form: UseFormReturn<TValues>, options: UseHookFormOptions<TValues>): HookFormBinding;
@@ -16,6 +16,7 @@ export { default as AppCalendar } from "./components/AppCalendar.tsx";
16
16
  export { default as AppCard } from "./components/AppCard.tsx";
17
17
  export { default as AppCarousel } from "./components/AppCarousel.tsx";
18
18
  export { default as AppCell } from "./components/AppCell.tsx";
19
+ export type { ChartFormat } from "./components/AppChart.tsx";
19
20
  export { default as AppChart } from "./components/AppChart.tsx";
20
21
  export { default as AppChartCard } from "./components/AppChartCard.tsx";
21
22
  export { default as AppCheckbox } from "./components/AppCheckbox.tsx";
@@ -49,6 +50,8 @@ export type { AppDropZoneMultipleProps, AppDropZoneProps, AppDropZoneSingleProps
49
50
  export { default as AppDropZone } from "./components/AppDropZone.tsx";
50
51
  export { default as AppDueDate } from "./components/AppDueDate.tsx";
51
52
  export { default as AppEmptyState } from "./components/AppEmptyState.tsx";
53
+ export type { AppEntryGridColumn, AppEntryGridColumnKind, AppEntryGridProps, AppEntryGridRowStatus, } from "./components/AppEntryGrid.tsx";
54
+ export { default as AppEntryGrid } from "./components/AppEntryGrid.tsx";
52
55
  export { default as AppErrorBoundary } from "./components/AppErrorBoundary.tsx";
53
56
  export { default as AppErrorSummary } from "./components/AppErrorSummary.tsx";
54
57
  export { default as AppFileAttachment } from "./components/AppFileAttachment.tsx";
@@ -64,6 +67,8 @@ export { default as AppForm, useFormSubmit } from "./components/AppForm.tsx";
64
67
  export { default as AppFormActions } from "./components/AppFormActions.tsx";
65
68
  export { default as AppFormRow } from "./components/AppFormRow.tsx";
66
69
  export { default as AppFormSection } from "./components/AppFormSection.tsx";
70
+ export type { AppFormulaSign, AppFormulaStep, AppFormulaStepsProps } from "./components/AppFormulaSteps.tsx";
71
+ export { default as AppFormulaSteps } from "./components/AppFormulaSteps.tsx";
67
72
  export { default as AppHoverCard } from "./components/AppHoverCard.tsx";
68
73
  export { default as AppIcon, iconNames, registerIcons } from "./components/AppIcon.tsx";
69
74
  export { default as AppImagePicker } from "./components/AppImagePicker.tsx";
@@ -104,15 +109,12 @@ export { default as AppRecordPager } from "./components/AppRecordPager.tsx";
104
109
  export { default as AppRelativeTime } from "./components/AppRelativeTime.tsx";
105
110
  export { default as AppRepeater } from "./components/AppRepeater.tsx";
106
111
  export { default as AppRequiredMark } from "./components/AppRequiredMark.tsx";
107
- export { default as AppResizable } from "./components/AppResizable.tsx";
108
- export { default as AppResizableHandle } from "./components/AppResizableHandle.tsx";
109
- export { default as AppResizablePanel } from "./components/AppResizablePanel.tsx";
110
112
  export { default as AppResourceCard } from "./components/AppResourceCard.tsx";
111
113
  export { default as AppResult } from "./components/AppResult.tsx";
112
114
  export { default as AppRichText } from "./components/AppRichText.tsx";
113
- export { default as AppRollingNumber } from "./components/AppRollingNumber.tsx";
114
115
  export { default as AppRouteError } from "./components/AppRouteError.tsx";
115
- export { default as AppRowSwitch } from "./components/AppRowSwitch.tsx";
116
+ export type { AppRowAction, AppRowActionEntry, AppRowActionsProps } from "./components/AppRowActions.tsx";
117
+ export { default as AppRowActions } from "./components/AppRowActions.tsx";
116
118
  export { default as AppScoreScale } from "./components/AppScoreScale.tsx";
117
119
  export { default as AppScrollbar } from "./components/AppScrollbar.tsx";
118
120
  export { default as AppSearch } from "./components/AppSearch.tsx";
@@ -0,0 +1,12 @@
1
+ export interface FormFieldsState {
2
+ /** The message for a field name, or undefined: none, or the person has edited the field since the map arrived. */
3
+ errorOf: (name: string) => string | undefined;
4
+ /** A mounted field says it is on the form; returns its release. */
5
+ claim: (name: string) => () => void;
6
+ }
7
+ /** The enclosing AppForm's field errors, or null outside one. */
8
+ export declare const FormFieldsContext: import("react").Context<FormFieldsState | null>;
9
+ /** The form's message for this field, and the claim on its name while mounted. Undefined outside an AppForm or with no name. */
10
+ export declare function useFieldError(name: string | undefined): string | undefined;
11
+ /** One spelling per field path: `items[0].qty` becomes `items.0.qty`. */
12
+ export declare function toFieldName(path: string): string;
@@ -0,0 +1,5 @@
1
+ export declare const UNSAVED_TEXT: Readonly<{
2
+ title: string;
3
+ message: string;
4
+ leaveLabel: string;
5
+ }>;
package/dist/ui-react.js CHANGED
@@ -1 +1 @@
1
- import e from"./components/AppAccordion.js";import t from"./components/AppAccountSwitcher.js";import n from"./components/AppActionIcon.js";import r from"./components/AppAlert.js";import i from"./components/AppAsyncBlock.js";import a from"./components/AppAuthLayout.js";import o from"./components/AppAvatar.js";import s from"./components/AppAvatarGroup.js";import c from"./components/AppBadge.js";import l from"./components/AppBanner.js";import u from"./components/AppBreadcrumbs.js";import d from"./components/AppButton.js";import f from"./components/AppButtonGroup.js";import p from"./components/AppCalendar.js";import m from"./components/AppCard.js";import h from"./components/AppCarousel.js";import g from"./components/AppCell.js";import _ from"./components/AppChart.js";import v from"./components/AppChartCard.js";import y from"./components/AppCheckbox.js";import b from"./components/AppChip.js";import x from"./components/AppChipGroup.js";import S from"./components/AppChoiceCard.js";import C from"./components/AppChoiceChip.js";import w from"./components/AppCodeBlock.js";import T from"./components/AppColorField.js";import E from"./components/AppColumnMenu.js";import D from"./components/AppCommandPalette.js";import O from"./components/AppCommentThread.js";import k from"./components/AppCompareTable.js";import A from"./components/AppConfirmDialog.js";import j,{useConfirm as M}from"./components/AppConfirmProvider.js";import N from"./components/AppConsentBanner.js";import P from"./components/AppContextMenu.js";import F from"./components/AppCopyButton.js";import I from"./components/AppCountryFlag.js";import L from"./components/AppDashboardCell.js";import R from"./components/AppDashboardGrid.js";import z from"./components/AppDataTable.js";import B from"./components/AppDatePicker.js";import V from"./components/AppDateRangePicker.js";import H from"./components/AppDescriptions.js";import U from"./components/AppDetailPane.js";import W from"./components/AppDrawer.js";import G from"./components/AppDropdown.js";import K from"./components/AppDropZone.js";import q from"./components/AppDueDate.js";import J from"./components/AppEmptyState.js";import Y from"./components/AppErrorBoundary.js";import X from"./components/AppErrorSummary.js";import Z from"./components/AppFileAttachment.js";import Q from"./components/AppFilePicker.js";import $ from"./components/AppFileTiles.js";import ee from"./components/AppFileViewer.js";import te from"./components/AppFilterBar.js";import ne from"./components/AppFloatingButton.js";import re from"./components/AppFloatingDock.js";import ie,{useFormSubmit as ae}from"./components/AppForm.js";import oe from"./components/AppFormActions.js";import se from"./components/AppFormRow.js";import ce from"./components/AppFormSection.js";import le from"./components/AppHoverCard.js";import ue,{iconNames as de,registerIcons as fe}from"./components/AppIcon.js";import pe from"./components/AppImagePicker.js";import me from"./components/AppInfoTip.js";import he from"./components/AppInlineEdit.js";import ge from"./components/AppInput.js";import _e from"./components/AppInputGroup.js";import ve from"./components/AppKanban.js";import ye from"./components/AppKbd.js";import be from"./components/AppKpiTile.js";import xe from"./components/AppLeadPopup.js";import Se from"./components/AppLightbox.js";import Ce from"./components/AppLink.js";import we from"./components/AppMarkdown.js";import Te from"./components/AppMentionInput.js";import Ee from"./components/AppMeter.js";import De from"./components/AppMetricStrip.js";import Oe from"./components/AppModal.js";import ke from"./components/AppNavigationMenu.js";import Ae from"./components/AppNavList.js";import je from"./components/AppNotificationCenter.js";import Me from"./components/AppNumberInput.js";import Ne from"./components/AppOnboardingChecklist.js";import Pe from"./components/AppOrgTree.js";import Fe from"./components/AppOtpInput.js";import Ie from"./components/AppPageHeader.js";import Le from"./components/AppPhoneNumberInput.js";import Re from"./components/AppPopover.js";import ze from"./components/AppPricingCard.js";import Be from"./components/AppProgress.js";import Ve from"./components/AppQrCode.js";import He from"./components/AppRadio.js";import Ue from"./components/AppRadioGroup.js";import We from"./components/AppRating.js";import Ge from"./components/AppRecordPager.js";import Ke from"./components/AppRelativeTime.js";import qe from"./components/AppRepeater.js";import Je from"./components/AppRequiredMark.js";import Ye from"./components/AppResizable.js";import Xe from"./components/AppResizableHandle.js";import Ze from"./components/AppResizablePanel.js";import Qe from"./components/AppResourceCard.js";import $e from"./components/AppResult.js";import et from"./components/AppRichText.js";import tt from"./components/AppRollingNumber.js";import nt from"./components/AppRouteError.js";import rt from"./components/AppRowSwitch.js";import it from"./components/AppScoreScale.js";import at from"./components/AppScrollbar.js";import ot from"./components/AppSearch.js";import st from"./components/AppSectionCallToAction.js";import ct from"./components/AppSectionFaq.js";import lt from"./components/AppSectionFeatures.js";import ut from"./components/AppSectionHero.js";import dt from"./components/AppSectionLeadCapture.js";import ft from"./components/AppSectionLogos.js";import pt from"./components/AppSectionPricing.js";import mt from"./components/AppSectionTestimonials.js";import ht from"./components/AppSegmented.js";import gt from"./components/AppSelect.js";import _t from"./components/AppSeoHead.js";import vt from"./components/AppShell.js";import yt from"./components/AppShortcutLegend.js";import bt from"./components/AppShowMore.js";import xt,{AppSkeletonRows as St}from"./components/AppSkeleton.js";import Ct from"./components/AppSkeletonLines.js";import wt from"./components/AppSlider.js";import Tt from"./components/AppSortableList.js";import Et from"./components/AppSparkline.js";import Dt from"./components/AppSpinner.js";import Ot from"./components/AppSplash.js";import kt from"./components/AppSplitButton.js";import At from"./components/AppSplitView.js";import jt from"./components/AppStatusBadge.js";import Mt from"./components/AppStepper.js";import Nt from"./components/AppSwitch.js";import Pt from"./components/AppTablePagination.js";import Ft from"./components/AppTableToolbar.js";import It from"./components/AppTabs.js";import Lt from"./components/AppTextarea.js";import Rt from"./components/AppThemeToggle.js";import zt from"./components/AppTimeline.js";import Bt from"./components/AppTimePicker.js";import Vt from"./components/AppToast.js";import Ht from"./components/AppToolbar.js";import Ut from"./components/AppTooltip.js";import Wt from"./components/AppTour.js";import Gt from"./components/AppTreeView.js";import Kt from"./components/AppTruncate.js";import qt from"./components/AppUpdateBar.js";import Jt from"./components/AppWhatsNew.js";import Yt from"./components/AppWizard.js";import Xt from"./components/AppWorkspaceSwitcher.js";import Zt from"./components/assertValidValue.js";import{MODAL_ICONS as Qt}from"./components/ModalIcons.js";import{dismissAll as $t,errorToast as en,toast as tn}from"./components/toast.js";import{useCommandPaletteShortcut as nn}from"./lib/useCommandPaletteShortcut.js";import{useFloatingStack as rn}from"./lib/useFloatingStack.js";import{useListShortcuts as an}from"./lib/useListShortcuts.js";import{usePagination as on}from"./lib/usePagination.js";import{useTableView as sn}from"./lib/useTableView.js";import{createLocalSeenStore as cn,isImeSafeEnter as ln,mentionedIds as un,parseMentionValue as dn,postedMasked as fn,themeBootScript as pn,wireTooltips as mn}from"@webority/ui-elements/helpers";export{e as AppAccordion,t as AppAccountSwitcher,n as AppActionIcon,r as AppAlert,i as AppAsyncBlock,a as AppAuthLayout,o as AppAvatar,s as AppAvatarGroup,c as AppBadge,l as AppBanner,u as AppBreadcrumbs,d as AppButton,f as AppButtonGroup,p as AppCalendar,m as AppCard,h as AppCarousel,g as AppCell,_ as AppChart,v as AppChartCard,y as AppCheckbox,b as AppChip,x as AppChipGroup,S as AppChoiceCard,C as AppChoiceChip,w as AppCodeBlock,T as AppColorField,E as AppColumnMenu,D as AppCommandPalette,O as AppCommentThread,k as AppCompareTable,A as AppConfirmDialog,j as AppConfirmProvider,N as AppConsentBanner,P as AppContextMenu,F as AppCopyButton,I as AppCountryFlag,L as AppDashboardCell,R as AppDashboardGrid,z as AppDataTable,B as AppDatePicker,V as AppDateRangePicker,H as AppDescriptions,U as AppDetailPane,W as AppDrawer,K as AppDropZone,G as AppDropdown,q as AppDueDate,J as AppEmptyState,Y as AppErrorBoundary,X as AppErrorSummary,Z as AppFileAttachment,Q as AppFilePicker,$ as AppFileTiles,ee as AppFileViewer,te as AppFilterBar,ne as AppFloatingButton,re as AppFloatingDock,ie as AppForm,oe as AppFormActions,se as AppFormRow,ce as AppFormSection,le as AppHoverCard,ue as AppIcon,pe as AppImagePicker,me as AppInfoTip,he as AppInlineEdit,ge as AppInput,_e as AppInputGroup,ve as AppKanban,ye as AppKbd,be as AppKpiTile,xe as AppLeadPopup,Se as AppLightbox,Ce as AppLink,we as AppMarkdown,Te as AppMentionInput,Ee as AppMeter,De as AppMetricStrip,Oe as AppModal,Ae as AppNavList,ke as AppNavigationMenu,je as AppNotificationCenter,Me as AppNumberInput,Ne as AppOnboardingChecklist,Pe as AppOrgTree,Fe as AppOtpInput,Ie as AppPageHeader,Le as AppPhoneNumberInput,Re as AppPopover,ze as AppPricingCard,Be as AppProgress,Ve as AppQrCode,He as AppRadio,Ue as AppRadioGroup,We as AppRating,Ge as AppRecordPager,Ke as AppRelativeTime,qe as AppRepeater,Je as AppRequiredMark,Ye as AppResizable,Xe as AppResizableHandle,Ze as AppResizablePanel,Qe as AppResourceCard,$e as AppResult,et as AppRichText,tt as AppRollingNumber,nt as AppRouteError,rt as AppRowSwitch,it as AppScoreScale,at as AppScrollbar,ot as AppSearch,st as AppSectionCallToAction,ct as AppSectionFaq,lt as AppSectionFeatures,ut as AppSectionHero,dt as AppSectionLeadCapture,ft as AppSectionLogos,pt as AppSectionPricing,mt as AppSectionTestimonials,ht as AppSegmented,gt as AppSelect,_t as AppSeoHead,vt as AppShell,yt as AppShortcutLegend,bt as AppShowMore,xt as AppSkeleton,Ct as AppSkeletonLines,St as AppSkeletonRows,wt as AppSlider,Tt as AppSortableList,Et as AppSparkline,Dt as AppSpinner,Ot as AppSplash,kt as AppSplitButton,At as AppSplitView,jt as AppStatusBadge,Mt as AppStepper,Nt as AppSwitch,Pt as AppTablePagination,Ft as AppTableToolbar,It as AppTabs,Lt as AppTextarea,Rt as AppThemeToggle,Bt as AppTimePicker,zt as AppTimeline,Vt as AppToast,Ht as AppToolbar,Ut as AppTooltip,Wt as AppTour,Gt as AppTreeView,Kt as AppTruncate,qt as AppUpdateBar,Jt as AppWhatsNew,Yt as AppWizard,Xt as AppWorkspaceSwitcher,Qt as MODAL_ICONS,Zt as assertValidValue,cn as createLocalSeenStore,$t as dismissAll,en as errorToast,de as iconNames,ln as isImeSafeEnter,un as mentionedIds,dn as parseMentionValue,fn as postedMasked,fe as registerIcons,pn as themeBootScript,tn as toast,nn as useCommandPaletteShortcut,M as useConfirm,rn as useFloatingStack,ae as useFormSubmit,an as useListShortcuts,on as usePagination,sn as useTableView,mn as wireTooltips};
1
+ import e from"./components/AppAccordion.js";import t from"./components/AppAccountSwitcher.js";import n from"./components/AppActionIcon.js";import r from"./components/AppAlert.js";import i from"./components/AppAsyncBlock.js";import a from"./components/AppAuthLayout.js";import o from"./components/AppAvatar.js";import s from"./components/AppAvatarGroup.js";import c from"./components/AppBadge.js";import l from"./components/AppBanner.js";import u from"./components/AppBreadcrumbs.js";import d from"./components/AppButton.js";import f from"./components/AppButtonGroup.js";import p from"./components/AppCalendar.js";import m from"./components/AppCard.js";import h from"./components/AppCarousel.js";import g from"./components/AppCell.js";import _ from"./components/AppChart.js";import v from"./components/AppChartCard.js";import y from"./components/AppCheckbox.js";import b from"./components/AppChip.js";import x from"./components/AppChipGroup.js";import S from"./components/AppChoiceCard.js";import C from"./components/AppChoiceChip.js";import w from"./components/AppCodeBlock.js";import T from"./components/AppColorField.js";import E from"./components/AppColumnMenu.js";import D from"./components/AppCommandPalette.js";import O from"./components/AppCommentThread.js";import k from"./components/AppCompareTable.js";import A from"./components/AppConfirmDialog.js";import j,{useConfirm as M}from"./components/AppConfirmProvider.js";import N from"./components/AppConsentBanner.js";import P from"./components/AppContextMenu.js";import F from"./components/AppCopyButton.js";import I from"./components/AppCountryFlag.js";import L from"./components/AppDashboardCell.js";import R from"./components/AppDashboardGrid.js";import z from"./components/AppDataTable.js";import B from"./components/AppDatePicker.js";import V from"./components/AppDateRangePicker.js";import H from"./components/AppDescriptions.js";import U from"./components/AppDetailPane.js";import W from"./components/AppDrawer.js";import G from"./components/AppDropdown.js";import K from"./components/AppDropZone.js";import q from"./components/AppDueDate.js";import J from"./components/AppEmptyState.js";import Y from"./components/AppEntryGrid.js";import X from"./components/AppErrorBoundary.js";import Z from"./components/AppErrorSummary.js";import Q from"./components/AppFileAttachment.js";import $ from"./components/AppFilePicker.js";import ee from"./components/AppFileTiles.js";import te from"./components/AppFileViewer.js";import ne from"./components/AppFilterBar.js";import re from"./components/AppFloatingButton.js";import ie from"./components/AppFloatingDock.js";import ae,{useFormSubmit as oe}from"./components/AppForm.js";import se from"./components/AppFormActions.js";import ce from"./components/AppFormRow.js";import le from"./components/AppFormSection.js";import ue from"./components/AppFormulaSteps.js";import de from"./components/AppHoverCard.js";import fe,{iconNames as pe,registerIcons as me}from"./components/AppIcon.js";import he from"./components/AppImagePicker.js";import ge from"./components/AppInfoTip.js";import _e from"./components/AppInlineEdit.js";import ve from"./components/AppInput.js";import ye from"./components/AppInputGroup.js";import be from"./components/AppKanban.js";import xe from"./components/AppKbd.js";import Se from"./components/AppKpiTile.js";import Ce from"./components/AppLeadPopup.js";import we from"./components/AppLightbox.js";import Te from"./components/AppLink.js";import Ee from"./components/AppMarkdown.js";import De from"./components/AppMentionInput.js";import Oe from"./components/AppMeter.js";import ke from"./components/AppMetricStrip.js";import Ae from"./components/AppModal.js";import je from"./components/AppNavigationMenu.js";import Me from"./components/AppNavList.js";import Ne from"./components/AppNotificationCenter.js";import Pe from"./components/AppNumberInput.js";import Fe from"./components/AppOnboardingChecklist.js";import Ie from"./components/AppOrgTree.js";import Le from"./components/AppOtpInput.js";import Re from"./components/AppPageHeader.js";import ze from"./components/AppPhoneNumberInput.js";import Be from"./components/AppPopover.js";import Ve from"./components/AppPricingCard.js";import He from"./components/AppProgress.js";import Ue from"./components/AppQrCode.js";import We from"./components/AppRadio.js";import Ge from"./components/AppRadioGroup.js";import Ke from"./components/AppRating.js";import qe from"./components/AppRecordPager.js";import Je from"./components/AppRelativeTime.js";import Ye from"./components/AppRepeater.js";import Xe from"./components/AppRequiredMark.js";import Ze from"./components/AppResourceCard.js";import Qe from"./components/AppResult.js";import $e from"./components/AppRichText.js";import et from"./components/AppRouteError.js";import tt from"./components/AppRowActions.js";import nt from"./components/AppScoreScale.js";import rt from"./components/AppScrollbar.js";import it from"./components/AppSearch.js";import at from"./components/AppSectionCallToAction.js";import ot from"./components/AppSectionFaq.js";import st from"./components/AppSectionFeatures.js";import ct from"./components/AppSectionHero.js";import lt from"./components/AppSectionLeadCapture.js";import ut from"./components/AppSectionLogos.js";import dt from"./components/AppSectionPricing.js";import ft from"./components/AppSectionTestimonials.js";import pt from"./components/AppSegmented.js";import mt from"./components/AppSelect.js";import ht from"./components/AppSeoHead.js";import gt from"./components/AppShell.js";import _t from"./components/AppShortcutLegend.js";import vt from"./components/AppShowMore.js";import yt,{AppSkeletonRows as bt}from"./components/AppSkeleton.js";import xt from"./components/AppSkeletonLines.js";import St from"./components/AppSlider.js";import Ct from"./components/AppSortableList.js";import wt from"./components/AppSparkline.js";import Tt from"./components/AppSpinner.js";import Et from"./components/AppSplash.js";import Dt from"./components/AppSplitButton.js";import Ot from"./components/AppSplitView.js";import kt from"./components/AppStatusBadge.js";import At from"./components/AppStepper.js";import jt from"./components/AppSwitch.js";import Mt from"./components/AppTablePagination.js";import Nt from"./components/AppTableToolbar.js";import Pt from"./components/AppTabs.js";import Ft from"./components/AppTextarea.js";import It from"./components/AppThemeToggle.js";import Lt from"./components/AppTimeline.js";import Rt from"./components/AppTimePicker.js";import zt from"./components/AppToast.js";import Bt from"./components/AppToolbar.js";import Vt from"./components/AppTooltip.js";import Ht from"./components/AppTour.js";import Ut from"./components/AppTreeView.js";import Wt from"./components/AppTruncate.js";import Gt from"./components/AppUpdateBar.js";import Kt from"./components/AppWhatsNew.js";import qt from"./components/AppWizard.js";import Jt from"./components/AppWorkspaceSwitcher.js";import Yt from"./components/assertValidValue.js";import{MODAL_ICONS as Xt}from"./components/ModalIcons.js";import{dismissAll as Zt,errorToast as Qt,toast as $t}from"./components/toast.js";import{useCommandPaletteShortcut as en}from"./lib/useCommandPaletteShortcut.js";import{useFloatingStack as tn}from"./lib/useFloatingStack.js";import{useListShortcuts as nn}from"./lib/useListShortcuts.js";import{usePagination as rn}from"./lib/usePagination.js";import{useTableView as an}from"./lib/useTableView.js";import{createLocalSeenStore as on,isImeSafeEnter as sn,mentionedIds as cn,parseMentionValue as ln,postedMasked as un,themeBootScript as dn,wireTooltips as fn}from"@webority/ui-elements/helpers";export{e as AppAccordion,t as AppAccountSwitcher,n as AppActionIcon,r as AppAlert,i as AppAsyncBlock,a as AppAuthLayout,o as AppAvatar,s as AppAvatarGroup,c as AppBadge,l as AppBanner,u as AppBreadcrumbs,d as AppButton,f as AppButtonGroup,p as AppCalendar,m as AppCard,h as AppCarousel,g as AppCell,_ as AppChart,v as AppChartCard,y as AppCheckbox,b as AppChip,x as AppChipGroup,S as AppChoiceCard,C as AppChoiceChip,w as AppCodeBlock,T as AppColorField,E as AppColumnMenu,D as AppCommandPalette,O as AppCommentThread,k as AppCompareTable,A as AppConfirmDialog,j as AppConfirmProvider,N as AppConsentBanner,P as AppContextMenu,F as AppCopyButton,I as AppCountryFlag,L as AppDashboardCell,R as AppDashboardGrid,z as AppDataTable,B as AppDatePicker,V as AppDateRangePicker,H as AppDescriptions,U as AppDetailPane,W as AppDrawer,K as AppDropZone,G as AppDropdown,q as AppDueDate,J as AppEmptyState,Y as AppEntryGrid,X as AppErrorBoundary,Z as AppErrorSummary,Q as AppFileAttachment,$ as AppFilePicker,ee as AppFileTiles,te as AppFileViewer,ne as AppFilterBar,re as AppFloatingButton,ie as AppFloatingDock,ae as AppForm,se as AppFormActions,ce as AppFormRow,le as AppFormSection,ue as AppFormulaSteps,de as AppHoverCard,fe as AppIcon,he as AppImagePicker,ge as AppInfoTip,_e as AppInlineEdit,ve as AppInput,ye as AppInputGroup,be as AppKanban,xe as AppKbd,Se as AppKpiTile,Ce as AppLeadPopup,we as AppLightbox,Te as AppLink,Ee as AppMarkdown,De as AppMentionInput,Oe as AppMeter,ke as AppMetricStrip,Ae as AppModal,Me as AppNavList,je as AppNavigationMenu,Ne as AppNotificationCenter,Pe as AppNumberInput,Fe as AppOnboardingChecklist,Ie as AppOrgTree,Le as AppOtpInput,Re as AppPageHeader,ze as AppPhoneNumberInput,Be as AppPopover,Ve as AppPricingCard,He as AppProgress,Ue as AppQrCode,We as AppRadio,Ge as AppRadioGroup,Ke as AppRating,qe as AppRecordPager,Je as AppRelativeTime,Ye as AppRepeater,Xe as AppRequiredMark,Ze as AppResourceCard,Qe as AppResult,$e as AppRichText,et as AppRouteError,tt as AppRowActions,nt as AppScoreScale,rt as AppScrollbar,it as AppSearch,at as AppSectionCallToAction,ot as AppSectionFaq,st as AppSectionFeatures,ct as AppSectionHero,lt as AppSectionLeadCapture,ut as AppSectionLogos,dt as AppSectionPricing,ft as AppSectionTestimonials,pt as AppSegmented,mt as AppSelect,ht as AppSeoHead,gt as AppShell,_t as AppShortcutLegend,vt as AppShowMore,yt as AppSkeleton,xt as AppSkeletonLines,bt as AppSkeletonRows,St as AppSlider,Ct as AppSortableList,wt as AppSparkline,Tt as AppSpinner,Et as AppSplash,Dt as AppSplitButton,Ot as AppSplitView,kt as AppStatusBadge,At as AppStepper,jt as AppSwitch,Mt as AppTablePagination,Nt as AppTableToolbar,Pt as AppTabs,Ft as AppTextarea,It as AppThemeToggle,Rt as AppTimePicker,Lt as AppTimeline,zt as AppToast,Bt as AppToolbar,Vt as AppTooltip,Ht as AppTour,Ut as AppTreeView,Wt as AppTruncate,Gt as AppUpdateBar,Kt as AppWhatsNew,qt as AppWizard,Jt as AppWorkspaceSwitcher,Xt as MODAL_ICONS,Yt as assertValidValue,on as createLocalSeenStore,Zt as dismissAll,Qt as errorToast,pe as iconNames,sn as isImeSafeEnter,cn as mentionedIds,ln as parseMentionValue,un as postedMasked,me as registerIcons,dn as themeBootScript,$t as toast,en as useCommandPaletteShortcut,M as useConfirm,tn as useFloatingStack,oe as useFormSubmit,nn as useListShortcuts,rn as usePagination,an as useTableView,fn as wireTooltips};
@@ -0,0 +1,2 @@
1
+ import{isOfflineFailure as e}from"./requestPlatform.js";var t=`You appear to be offline. Check your connection and try again.`,n=`We couldn't reach the server. Check your connection and try again.`,r=`That took too long to respond. Check your connection and try again.`,i=`Something went wrong. Please try again.`,a=`request_canceled`,o=`contract_error`,s=`timeout`,c=`network`,l=`offline`,u=300,d=`internal_error`,f=e=>`Request failed (${e})`,p={401:{code:`unauthorized`,sentence:`Please sign in to continue.`},403:{code:`forbidden`,sentence:`You do not have access to this.`}},m=e=>typeof e==`object`&&!!e&&!Array.isArray(e),h=e=>typeof e==`string`&&e.trim().length>0?e:null,g=(e,t)=>{let n=p[e];if(n===void 0||t===null||t.code!==n.code)return null;let r=h(t.detail);return r===null||r===n.sentence?n.sentence:null},_=e=>e.length>u||/^\s*</.test(e)||e.includes(`
2
+ at `)||/(Exception|StackTrace):/.test(e)||/\b(System|Microsoft)\.[A-Za-z]+\.[A-Za-z]/.test(e),v=e=>{let t=h(e);return t!==null&&!_(t)?t:null},y=e=>e.replace(/^\$\.?/,``).split(`.`).map(e=>e.charAt(0).toLowerCase()+e.slice(1)).join(`.`),b=e=>{if(Array.isArray(e)){for(let t of e){let e=h(t);if(e!==null)return e}return null}return h(e)},x=(e,t,n)=>{let r=y(t);r===``?e.form??=n:r in e.fields||(e.fields[r]=n)},S=e=>{let t={fields:{},form:null};if(Array.isArray(e)){for(let n of e){if(!m(n))continue;let e=h(n.message);e!==null&&x(t,typeof n.field==`string`?n.field:``,e)}return t}if(!m(e))return t;for(let[n,r]of Object.entries(e)){let e=b(r);e!==null&&x(t,n,e)}return t},C=e=>m(e)&&typeof e.message==`string`&&typeof e.status==`number`&&typeof e.offline==`boolean`&&m(e.fieldErrors)&&m(e.extensions),w=e=>({code:null,fieldErrors:{},status:0,offline:!1,traceId:null,diagnostic:null,extensions:{},...e}),T=/* @__PURE__ */ new Set([`type`,`title`,`status`,`detail`,`instance`,`code`,`errors`,`traceId`]),E=e=>e===null?{}:Object.fromEntries(Object.entries(e).filter(([e])=>!T.has(e))),D=e=>{let t=m(e.config)?e.config.headers:void 0;if(!m(t))return null;let n=typeof t.get==`function`?t.get(`traceparent`):t.traceparent??t.Traceparent;return(typeof n==`string`?/^00-([0-9a-f]{32})-[0-9a-f]{16}-[0-9a-f]{2}$/.exec(n):null)?.[1]??null},O=o=>{let u=h(o.code),d=h(o.name),f=h(o.message),p=D(o);return d===`CanceledError`||u===`ERR_CANCELED`?w({code:a,message:i,traceId:p,diagnostic:f}):u===`ECONNABORTED`||u===`ETIMEDOUT`?w({code:s,message:r,offline:!0,traceId:p,diagnostic:f}):d===`RequestOfflineError`||u===`ERR_NETWORK`||f===`Network Error`||f===`Network request failed`?e(o)?w({code:l,message:t,offline:!0,traceId:p,diagnostic:f}):w({code:c,message:n,offline:!0,traceId:p,diagnostic:f}):w({message:i,traceId:p,diagnostic:f})};function k(e){if(C(e))return e;if(typeof e==`string`)return w({message:v(e)??`Something went wrong. Please try again.`,diagnostic:e||null});if(!m(e))return w({message:i,diagnostic:e==null?null:String(e)});if(e.isContractError===!0)return w({code:o,message:v(e.message)??`Something went wrong. Please try again.`,diagnostic:h(e.message)});let t=m(e.response)?e.response:null,n=typeof t?.status==`number`?t.status:typeof e.status==`number`?e.status:0,r=t?t.data:e.body;if(n===0&&r==null)return O(e);let a=m(r)?r:null,{fields:s,form:c}=S(a?.errors),l=h(a?.code),u=h(a?.traceId)??D(e),p=h(a?.detail)??h(a?.title)??h(r)??h(e.message),_;_=n>=500?(l!==null&&l!==d?v(a?.detail):null)??`Something went wrong on our side. Please try again in a moment.`:g(n,a)??v(Object.values(s)[0])??v(c)??v(a?.detail)??v(a?.title)??v(r)??(n?f(n):`Something went wrong. Please try again.`);let y=m(e.config)?e.config:null,b=y===null?null:h(y.url),x=y!==null&&`_accountId`in y?h(y._accountId):null;return w({code:l,message:_,fieldErrors:s,status:n,traceId:u,diagnostic:p,extensions:E(a),...b===null?{}:{requestUrl:b},...x===null?{}:{accountId:x}})}export{o as CONTRACT_ERROR_CODE,c as NETWORK_CODE,l as OFFLINE_CODE,t as OFFLINE_MESSAGE,a as REQUEST_CANCELED_CODE,s as TIMEOUT_CODE,r as TIMEOUT_MESSAGE,i as UNEXPECTED_MESSAGE,n as UNREACHABLE_MESSAGE,k as extractApiError,C as isApiError,y as toFieldPath};
@@ -0,0 +1 @@
1
+ function e(e){return typeof navigator<`u`&&navigator.onLine===!1}export{e as isOfflineFailure};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/ui-react",
3
- "version": "0.164.0",
3
+ "version": "0.165.0",
4
4
  "description": "Webority shared React component library: App* primitives on react-bootstrap and the @webority/theme design system.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",
@@ -23,23 +23,33 @@
23
23
  "types": "./dist/types/index.d.ts",
24
24
  "default": "./dist/ui-react.js"
25
25
  },
26
+ "./hook-form": {
27
+ "types": "./dist/types/hookForm/index.d.ts",
28
+ "default": "./dist/hookForm/index.js"
29
+ },
26
30
  "./guidance.json": "./dist/guidance.json",
27
31
  "./canvas-kit/*": "./dist/canvas-kit/*",
28
32
  "./package.json": "./package.json"
29
33
  },
30
34
  "sideEffects": false,
31
35
  "dependencies": {
32
- "@webority/markdown-core": "0.164.0",
33
- "@webority/theme": "0.164.0",
34
- "@webority/ui-elements": "0.164.0",
35
- "@webority/web-core": "0.164.0"
36
+ "@webority/markdown-core": "0.165.0",
37
+ "@webority/theme": "0.165.0",
38
+ "@webority/ui-elements": "0.165.0",
39
+ "@webority/web-core": "0.165.0"
36
40
  },
37
41
  "peerDependencies": {
38
42
  "@webority/analytics": "^0.40.0",
39
43
  "bootstrap": "5.3.9",
40
44
  "react": "^19.0.0",
41
45
  "react-bootstrap": "^2.10.0",
42
- "react-dom": "^19.0.0"
46
+ "react-dom": "^19.0.0",
47
+ "react-hook-form": "^7.55.0"
48
+ },
49
+ "peerDependenciesMeta": {
50
+ "react-hook-form": {
51
+ "optional": true
52
+ }
43
53
  },
44
54
  "devDependencies": {
45
55
  "@testing-library/dom": "10.4.2",
@@ -52,14 +62,15 @@
52
62
  "@vitejs/plugin-react": "^6.0.1",
53
63
  "@vitest/coverage-v8": "5.1.0",
54
64
  "@webority/analytics": "0.40.6",
55
- "@webority/canvas-kit": "0.164.0",
56
- "@webority/biome-config": "0.164.0",
57
- "@webority/tokens": "0.164.0",
65
+ "@webority/canvas-kit": "0.165.0",
66
+ "@webority/biome-config": "0.165.0",
67
+ "@webority/tokens": "0.165.0",
58
68
  "bootstrap": "5.3.9",
59
69
  "jsdom": "30.1.1",
60
70
  "react": "^19.3.1",
61
71
  "react-bootstrap": "^2.10.6",
62
72
  "react-dom": "^19.3.1",
73
+ "react-hook-form": "7.89.0",
63
74
  "typescript": "^7.0.2",
64
75
  "vite": "^8.3.6",
65
76
  "vitest": "5.1.0"
@@ -1 +0,0 @@
1
- import e from"../lib/useElementEntry.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./assertValidValue.js";import r from"./warnUnknownProps.js";import{createContext as i,useEffect as a,useRef as o}from"react";import{jsx as s}from"react/jsx-runtime";var c=[`horizontal`,`vertical`],l=()=>import(`@webority/ui-elements/elements/resizable`),u=e=>typeof e==`object`&&!!e&&`sizes`in e&&Array.isArray(e.sizes),d=i(`horizontal`);function f(i){e(`wui-resizable`,l);let{marker:f,props:p}=t(`AppResizable`,i),{direction:m=`horizontal`,storageKey:h,onChange:g,children:_,className:v=``,...y}=p;r(`AppResizable`,y),n(`AppResizable`,`direction`,m,c);let b=o(null),x=m===`vertical`;return a(()=>{let e=b.current;if(!e||!g)return;let t=t=>{if(t.target!==e)return;let n=t instanceof CustomEvent?t.detail:void 0;if(!u(n))throw Error(`wui-resizable:change carried no sizes`);g(n.sizes)};return e.addEventListener(`wui-resizable:change`,t),()=>e.removeEventListener(`wui-resizable:change`,t)},[g]),/* @__PURE__ */ s(d.Provider,{value:x?`vertical`:`horizontal`,children:/* @__PURE__ */ s(`wui-resizable`,{ref:b,class:[`wui-resizable`,v].filter(Boolean).join(` `),direction:x?`vertical`:`horizontal`,"storage-key":h||void 0,...f,...y,children:_})})}export{d as ResizableDirection,f as default};
@@ -1 +0,0 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import{ResizableDirection as t}from"./AppResizable.js";import n from"./warnUnknownProps.js";import{useContext as r}from"react";import{jsx as i}from"react/jsx-runtime";function a(a){let{marker:o,props:s}=e(`AppResizableHandle`,a),{label:c=`Resize panels`,className:l=``,...u}=s;n(`AppResizableHandle`,u);let d=r(t);return/* @__PURE__ */ i(`div`,{className:[`wui-resizable-handle`,l].filter(Boolean).join(` `),role:`separator`,tabIndex:0,"aria-orientation":d===`vertical`?`horizontal`:`vertical`,"aria-label":c,...o,...u})}export{a as default};
@@ -1 +0,0 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{jsx as n}from"react/jsx-runtime";function r(r){let{marker:i,props:a}=e(`AppResizablePanel`,r),{defaultSize:o,minSize:s,maxSize:c,children:l,className:u=``,style:d,...f}=a;return t(`AppResizablePanel`,f),/* @__PURE__ */ n(`div`,{className:[`wui-resizable-panel`,u].filter(Boolean).join(` `),"data-default-size":o,"data-min-size":s,"data-max-size":c,style:o?{flex:`${o} 1 0px`,...d}:d,...i,...f,children:l})}export{r as default};