@antscorp/ui 0.1.2 → 0.1.4

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 (99) hide show
  1. package/README.md +26 -2
  2. package/dist/atoms/AddButton.d.ts +3 -6
  3. package/dist/atoms/Chip.d.ts +2 -5
  4. package/dist/atoms/Chip.js +1 -1
  5. package/dist/atoms/InfoTip.js +2 -0
  6. package/dist/atoms/LabeledDivider.d.ts +1 -1
  7. package/dist/atoms/PanelSearchInput.d.ts +1 -1
  8. package/dist/atoms/RemoveButton.d.ts +2 -5
  9. package/dist/atoms/TextAction.d.ts +5 -6
  10. package/dist/atoms/TruncatedOption.d.ts +1 -1
  11. package/dist/cli.js +248 -0
  12. package/dist/doc/schema.d.ts +34 -0
  13. package/dist/doc/schema.js +33 -0
  14. package/dist/docs.json +1 -0
  15. package/dist/index.d.ts +2 -0
  16. package/dist/index.js +53 -51
  17. package/dist/lib/iso.d.ts +2 -2
  18. package/dist/lib/iso.js +16 -8
  19. package/dist/lib/tokenEditorExtensions.js +1 -1
  20. package/dist/lib/useLoadingShown.d.ts +1 -1
  21. package/dist/molecules/AccentCard.d.ts +2 -3
  22. package/dist/molecules/AccentCard.js +2 -2
  23. package/dist/molecules/CheckRow.d.ts +3 -8
  24. package/dist/molecules/ChoiceTiles.d.ts +1 -1
  25. package/dist/molecules/ChoiceTiles.js +1 -1
  26. package/dist/molecules/CommitTextField.d.ts +1 -19
  27. package/dist/molecules/CommitTextField.js +21 -18
  28. package/dist/molecules/ConfirmDialog.d.ts +2 -7
  29. package/dist/molecules/DateTimeInput.d.ts +6 -3
  30. package/dist/molecules/DateTimeInput.js +82 -73
  31. package/dist/molecules/FieldGroup.d.ts +1 -1
  32. package/dist/molecules/FieldRow.d.ts +1 -1
  33. package/dist/molecules/MetaTable.d.ts +1 -1
  34. package/dist/molecules/PhoneFrame.d.ts +1 -1
  35. package/dist/molecules/RemovableRow.d.ts +1 -1
  36. package/dist/molecules/RemovableRow.js +32 -32
  37. package/dist/molecules/RevealRadioGroup.d.ts +2 -9
  38. package/dist/molecules/RevealSwitch.d.ts +2 -7
  39. package/dist/molecules/Select.d.ts +8 -24
  40. package/dist/molecules/Select.js +50 -44
  41. package/dist/molecules/SideLabelRow.d.ts +1 -1
  42. package/dist/molecules/SplitButton.d.ts +1 -1
  43. package/dist/molecules/StatusButton.d.ts +2 -7
  44. package/dist/molecules/TagSelect.d.ts +2 -2
  45. package/dist/molecules/TransferLayout.d.ts +1 -1
  46. package/dist/molecules/TreeOptions.d.ts +4 -3
  47. package/dist/molecules/TreeOptions.js +67 -44
  48. package/dist/organisms/HourOfDayRow.js +2 -2
  49. package/dist/organisms/HourOfWeekGrid.js +2 -2
  50. package/dist/organisms/RuleGroups.d.ts +3 -3
  51. package/dist/organisms/SearchableGroupedList.d.ts +1 -1
  52. package/dist/organisms/TransferPicker.d.ts +1 -1
  53. package/dist/organisms/TreeSearchPanel.js +50 -47
  54. package/dist/organisms/TreeSelect.d.ts +3 -3
  55. package/dist/ui.css +1 -1
  56. package/package.json +36 -19
  57. package/src/atoms/AddButton.tsx +3 -7
  58. package/src/atoms/Chip.tsx +7 -9
  59. package/src/atoms/InfoTip.tsx +2 -2
  60. package/src/atoms/LabeledDivider.tsx +1 -1
  61. package/src/atoms/PanelSearchInput.tsx +1 -1
  62. package/src/atoms/RemoveButton.tsx +2 -6
  63. package/src/atoms/TextAction.tsx +6 -8
  64. package/src/atoms/TruncatedOption.tsx +1 -1
  65. package/src/doc/schema.ts +67 -0
  66. package/src/index.ts +2 -0
  67. package/src/lib/iso.ts +15 -3
  68. package/src/lib/tokenEditorExtensions.ts +1 -1
  69. package/src/lib/useLoadMore.ts +1 -2
  70. package/src/lib/useLoadingShown.ts +1 -1
  71. package/src/molecules/AccentCard.tsx +11 -10
  72. package/src/molecules/CheckRow.tsx +3 -9
  73. package/src/molecules/ChoiceTiles.tsx +6 -4
  74. package/src/molecules/CommitTextField.tsx +15 -20
  75. package/src/molecules/ConfirmDialog.tsx +2 -8
  76. package/src/molecules/DateTimeInput.tsx +86 -68
  77. package/src/molecules/DurationInput.tsx +2 -2
  78. package/src/molecules/FieldGroup.tsx +1 -1
  79. package/src/molecules/FieldRow.tsx +1 -1
  80. package/src/molecules/FrequencyLimitRow.tsx +1 -1
  81. package/src/molecules/MetaTable.tsx +1 -1
  82. package/src/molecules/PhoneFrame.tsx +2 -2
  83. package/src/molecules/RemovableRow.tsx +3 -3
  84. package/src/molecules/RevealRadioGroup.tsx +5 -10
  85. package/src/molecules/RevealSwitch.tsx +2 -8
  86. package/src/molecules/Select.tsx +23 -23
  87. package/src/molecules/SideLabelRow.tsx +2 -2
  88. package/src/molecules/SplitButton.tsx +1 -1
  89. package/src/molecules/StatusButton.tsx +2 -8
  90. package/src/molecules/TagSelect.tsx +5 -5
  91. package/src/molecules/TransferLayout.tsx +2 -3
  92. package/src/molecules/TreeOptions.tsx +89 -65
  93. package/src/organisms/HourOfDayRow.tsx +5 -3
  94. package/src/organisms/HourOfWeekGrid.tsx +5 -3
  95. package/src/organisms/RuleGroups.tsx +3 -3
  96. package/src/organisms/SearchableGroupedList.tsx +2 -2
  97. package/src/organisms/TransferPicker.tsx +3 -3
  98. package/src/organisms/TreeSearchPanel.tsx +2 -2
  99. package/src/organisms/TreeSelect.tsx +4 -4
package/dist/index.d.ts CHANGED
@@ -15,6 +15,7 @@ export { PathMark, type PathMarkProps, useEnclosingPath } from "./atoms/PathMark
15
15
  export { RowSkeletons, type RowSkeletonsProps } from "./atoms/RowSkeletons.js";
16
16
  export { TextAction, type TextActionProps } from "./atoms/TextAction.js";
17
17
  export { TruncatedText, type TruncatedTextProps } from "./atoms/TruncatedText.js";
18
+ export { TruncatedOption, type TruncatedOptionProps } from "./atoms/TruncatedOption.js";
18
19
  export { AccentCard, type AccentCardProps } from "./molecules/AccentCard.js";
19
20
  export { ChoiceDialog, type ChoiceDialogProps } from "./molecules/ChoiceDialog.js";
20
21
  export { type ChoiceTile, ChoiceTiles, type ChoiceTilesProps } from "./molecules/ChoiceTiles.js";
@@ -66,3 +67,4 @@ export { HourOfDayRow, type HourOfDayRowProps } from "./organisms/HourOfDayRow.j
66
67
  export { HourOfWeekGrid, type HourOfWeekGridProps } from "./organisms/HourOfWeekGrid.js";
67
68
  export { ResizableDrawer, type ResizableDrawerProps } from "./organisms/ResizableDrawer.js";
68
69
  export { TreeSelect, type TreeSelectItem, type TreeSelectProps } from "./organisms/TreeSelect.js";
70
+ export { TreeSearchPanel, type TreeSearchPanelProps } from "./organisms/TreeSearchPanel.js";
package/dist/index.js CHANGED
@@ -16,54 +16,56 @@ import { PathMark as y, useEnclosingPath as b } from "./atoms/PathMark.js";
16
16
  import { RowSkeletons as x } from "./atoms/RowSkeletons.js";
17
17
  import { TextAction as S } from "./atoms/TextAction.js";
18
18
  import { TruncatedText as C } from "./atoms/TruncatedText.js";
19
- import { AccentCard as w } from "./molecules/AccentCard.js";
20
- import { RevealRadioGroup as T } from "./molecules/RevealRadioGroup.js";
21
- import { ChoiceDialog as E } from "./molecules/ChoiceDialog.js";
22
- import { ChoiceTiles as D } from "./molecules/ChoiceTiles.js";
23
- import { errorStatus as O } from "./lib/errorStatus.js";
24
- import { tokenLength as k } from "./lib/tokenLength.js";
25
- import { fitToMaxLength as A } from "./lib/fitToMaxLength.js";
26
- import { useDraft as j } from "./lib/useDraft.js";
27
- import { CommitTextField as M } from "./molecules/CommitTextField.js";
28
- import { FieldSkeleton as N } from "./molecules/FieldSkeleton.js";
29
- import { TokenTextField as P } from "./molecules/TokenTextField.js";
30
- import { TreeOptions as F } from "./molecules/TreeOptions.js";
31
- import { LoadMoreRow as I } from "./molecules/LoadMoreRow.js";
32
- import { TreeSelect as L } from "./organisms/TreeSelect.js";
33
- import { TokenPickerDialog as R } from "./organisms/TokenPickerDialog.js";
34
- import { ConfirmDialog as z } from "./molecules/ConfirmDialog.js";
35
- import { dateValue as B, timeValue as V } from "./lib/iso.js";
36
- import { FieldGroup as H } from "./molecules/FieldGroup.js";
37
- import { DateTimeInput as U } from "./molecules/DateTimeInput.js";
38
- import { DurationInput as W } from "./molecules/DurationInput.js";
39
- import { FieldRow as G } from "./molecules/FieldRow.js";
40
- import { PercentRow as K } from "./molecules/PercentRow.js";
41
- import { PhoneFrame as q } from "./molecules/PhoneFrame.js";
42
- import { ProblemsButton as J } from "./molecules/ProblemsButton.js";
43
- import { RemovableRow as Y } from "./molecules/RemovableRow.js";
44
- import { RevealSwitch as X } from "./molecules/RevealSwitch.js";
45
- import { RuleRow as Z } from "./molecules/RuleRow.js";
46
- import { Select as Q } from "./molecules/Select.js";
47
- import { SideLabelRow as $ } from "./molecules/SideLabelRow.js";
48
- import { CheckRow as ee } from "./molecules/CheckRow.js";
49
- import { MetaTable as te } from "./molecules/MetaTable.js";
50
- import { TransferLayout as ne } from "./molecules/TransferLayout.js";
51
- import { CheckGroup as re } from "./molecules/CheckGroup.js";
52
- import { FrequencyLimitRow as ie } from "./molecules/FrequencyLimitRow.js";
53
- import { InlineEditableText as ae } from "./molecules/InlineEditableText.js";
54
- import { LoadState as oe } from "./molecules/LoadState.js";
55
- import { SplitButton as se } from "./molecules/SplitButton.js";
56
- import { StatusButton as ce } from "./molecules/StatusButton.js";
57
- import { TagSelect as le } from "./molecules/TagSelect.js";
58
- import { ToggleGrid as ue } from "./molecules/ToggleGrid.js";
59
- import { useConfirmedChange as de } from "./lib/useConfirmedChange.js";
60
- import { RepeatableList as fe } from "./organisms/RepeatableList.js";
61
- import { RuleGroups as pe } from "./organisms/RuleGroups.js";
62
- import { RuleList as me } from "./organisms/RuleList.js";
63
- import { SearchableGroupedList as he } from "./organisms/SearchableGroupedList.js";
64
- import { TransferPicker as ge } from "./organisms/TransferPicker.js";
65
- import { ChipListAddPopover as _e } from "./organisms/ChipListAddPopover.js";
66
- import { HourOfDayRow as ve } from "./organisms/HourOfDayRow.js";
67
- import { HourOfWeekGrid as ye } from "./organisms/HourOfWeekGrid.js";
68
- import { ResizableDrawer as be } from "./organisms/ResizableDrawer.js";
69
- export { w as AccentCard, n as AddButton, t as AddGlyph, e as AntsomiTheme, re as CheckGroup, ee as CheckRow, i as Chip, _e as ChipListAddPopover, l as ChipSkeletons, E as ChoiceDialog, D as ChoiceTiles, M as CommitTextField, z as ConfirmDialog, U as DateTimeInput, W as DurationInput, p as FIELD_PATH_ATTRIBUTE, H as FieldGroup, s as FieldHeading, G as FieldRow, N as FieldSkeleton, ie as FrequencyLimitRow, ve as HourOfDayRow, ye as HourOfWeekGrid, a as HoverSwap, o as InfoTip, ae as InlineEditableText, c as JointLabel, u as LabeledDivider, I as LoadMoreRow, oe as LoadState, f as LogoImage, te as MetaTable, d as PanelSearchInput, y as PathMark, m as PathRevealContext, K as PercentRow, q as PhoneFrame, J as ProblemsButton, Y as RemovableRow, r as RemoveButton, fe as RepeatableList, be as ResizableDrawer, T as RevealRadioGroup, X as RevealSwitch, x as RowSkeletons, pe as RuleGroups, me as RuleList, Z as RuleRow, he as SearchableGroupedList, Q as Select, $ as SideLabelRow, se as SplitButton, ce as StatusButton, le as TagSelect, S as TextAction, ue as ToggleGrid, R as TokenPickerDialog, P as TokenTextField, ne as TransferLayout, ge as TransferPicker, F as TreeOptions, L as TreeSelect, C as TruncatedText, B as dateValue, O as errorStatus, A as fitToMaxLength, h as pathMarkOf, g as revealPath, V as timeValue, k as tokenLength, de as useConfirmedChange, j as useDraft, b as useEnclosingPath, _ as usePathReveal, v as useRevealedState };
19
+ import { TruncatedOption as w } from "./atoms/TruncatedOption.js";
20
+ import { AccentCard as T } from "./molecules/AccentCard.js";
21
+ import { RevealRadioGroup as E } from "./molecules/RevealRadioGroup.js";
22
+ import { ChoiceDialog as D } from "./molecules/ChoiceDialog.js";
23
+ import { ChoiceTiles as O } from "./molecules/ChoiceTiles.js";
24
+ import { errorStatus as k } from "./lib/errorStatus.js";
25
+ import { tokenLength as A } from "./lib/tokenLength.js";
26
+ import { fitToMaxLength as j } from "./lib/fitToMaxLength.js";
27
+ import { useDraft as M } from "./lib/useDraft.js";
28
+ import { CommitTextField as N } from "./molecules/CommitTextField.js";
29
+ import { FieldSkeleton as P } from "./molecules/FieldSkeleton.js";
30
+ import { TokenTextField as F } from "./molecules/TokenTextField.js";
31
+ import { TreeOptions as I } from "./molecules/TreeOptions.js";
32
+ import { LoadMoreRow as L } from "./molecules/LoadMoreRow.js";
33
+ import { TreeSearchPanel as R } from "./organisms/TreeSearchPanel.js";
34
+ import { TreeSelect as z } from "./organisms/TreeSelect.js";
35
+ import { TokenPickerDialog as B } from "./organisms/TokenPickerDialog.js";
36
+ import { ConfirmDialog as V } from "./molecules/ConfirmDialog.js";
37
+ import { dateValue as H, timeValue as U } from "./lib/iso.js";
38
+ import { FieldGroup as W } from "./molecules/FieldGroup.js";
39
+ import { DateTimeInput as G } from "./molecules/DateTimeInput.js";
40
+ import { DurationInput as K } from "./molecules/DurationInput.js";
41
+ import { FieldRow as q } from "./molecules/FieldRow.js";
42
+ import { PercentRow as J } from "./molecules/PercentRow.js";
43
+ import { PhoneFrame as Y } from "./molecules/PhoneFrame.js";
44
+ import { ProblemsButton as X } from "./molecules/ProblemsButton.js";
45
+ import { RemovableRow as Z } from "./molecules/RemovableRow.js";
46
+ import { RevealSwitch as Q } from "./molecules/RevealSwitch.js";
47
+ import { RuleRow as $ } from "./molecules/RuleRow.js";
48
+ import { Select as ee } from "./molecules/Select.js";
49
+ import { SideLabelRow as te } from "./molecules/SideLabelRow.js";
50
+ import { CheckRow as ne } from "./molecules/CheckRow.js";
51
+ import { MetaTable as re } from "./molecules/MetaTable.js";
52
+ import { TransferLayout as ie } from "./molecules/TransferLayout.js";
53
+ import { CheckGroup as ae } from "./molecules/CheckGroup.js";
54
+ import { FrequencyLimitRow as oe } from "./molecules/FrequencyLimitRow.js";
55
+ import { InlineEditableText as se } from "./molecules/InlineEditableText.js";
56
+ import { LoadState as ce } from "./molecules/LoadState.js";
57
+ import { SplitButton as le } from "./molecules/SplitButton.js";
58
+ import { StatusButton as ue } from "./molecules/StatusButton.js";
59
+ import { TagSelect as de } from "./molecules/TagSelect.js";
60
+ import { ToggleGrid as fe } from "./molecules/ToggleGrid.js";
61
+ import { useConfirmedChange as pe } from "./lib/useConfirmedChange.js";
62
+ import { RepeatableList as me } from "./organisms/RepeatableList.js";
63
+ import { RuleGroups as he } from "./organisms/RuleGroups.js";
64
+ import { RuleList as ge } from "./organisms/RuleList.js";
65
+ import { SearchableGroupedList as _e } from "./organisms/SearchableGroupedList.js";
66
+ import { TransferPicker as ve } from "./organisms/TransferPicker.js";
67
+ import { ChipListAddPopover as ye } from "./organisms/ChipListAddPopover.js";
68
+ import { HourOfDayRow as be } from "./organisms/HourOfDayRow.js";
69
+ import { HourOfWeekGrid as xe } from "./organisms/HourOfWeekGrid.js";
70
+ import { ResizableDrawer as Se } from "./organisms/ResizableDrawer.js";
71
+ export { T as AccentCard, n as AddButton, t as AddGlyph, e as AntsomiTheme, ae as CheckGroup, ne as CheckRow, i as Chip, ye as ChipListAddPopover, l as ChipSkeletons, D as ChoiceDialog, O as ChoiceTiles, N as CommitTextField, V as ConfirmDialog, G as DateTimeInput, K as DurationInput, p as FIELD_PATH_ATTRIBUTE, W as FieldGroup, s as FieldHeading, q as FieldRow, P as FieldSkeleton, oe as FrequencyLimitRow, be as HourOfDayRow, xe as HourOfWeekGrid, a as HoverSwap, o as InfoTip, se as InlineEditableText, c as JointLabel, u as LabeledDivider, L as LoadMoreRow, ce as LoadState, f as LogoImage, re as MetaTable, d as PanelSearchInput, y as PathMark, m as PathRevealContext, J as PercentRow, Y as PhoneFrame, X as ProblemsButton, Z as RemovableRow, r as RemoveButton, me as RepeatableList, Se as ResizableDrawer, E as RevealRadioGroup, Q as RevealSwitch, x as RowSkeletons, he as RuleGroups, ge as RuleList, $ as RuleRow, _e as SearchableGroupedList, ee as Select, te as SideLabelRow, le as SplitButton, ue as StatusButton, de as TagSelect, S as TextAction, fe as ToggleGrid, B as TokenPickerDialog, F as TokenTextField, ie as TransferLayout, ve as TransferPicker, I as TreeOptions, R as TreeSearchPanel, z as TreeSelect, w as TruncatedOption, C as TruncatedText, H as dateValue, k as errorStatus, j as fitToMaxLength, h as pathMarkOf, g as revealPath, U as timeValue, A as tokenLength, pe as useConfirmedChange, M as useDraft, b as useEnclosingPath, _ as usePathReveal, v as useRevealedState };
package/dist/lib/iso.d.ts CHANGED
@@ -3,11 +3,11 @@ import { type ISODateString, type ISOTimeString } from "@astryxdesign/core/utils
3
3
  export declare function timeValue(time: string): {
4
4
  readonly value?: ISOTimeString;
5
5
  };
6
- /** Spread into a date input: `{ value }` when `date` is `YYYY-MM-DD`, `{}` otherwise. */
6
+ /** Spread into a date input: `{ value }` for a valid calendar date in `YYYY-MM-DD`, `{}` otherwise. */
7
7
  export declare function dateValue(date: string): {
8
8
  readonly value?: ISODateString;
9
9
  };
10
- /** Spread into a date input: `{ min }` when `min` is `YYYY-MM-DD`, `{}` otherwise. */
10
+ /** Spread into a date input: `{ min }` for a valid calendar date in `YYYY-MM-DD`, `{}` otherwise. */
11
11
  export declare function minDate(min: string | undefined): {
12
12
  readonly min?: ISODateString;
13
13
  };
package/dist/lib/iso.js CHANGED
@@ -1,14 +1,22 @@
1
- import { createISOTimeString as e } from "@astryxdesign/core/utils";
1
+ import { createISOTimeString as e, parseISO as t } from "@astryxdesign/core/utils";
2
2
  // src/lib/iso.ts
3
- function t(t) {
3
+ function n(t) {
4
4
  let n = e(t);
5
5
  return n === null ? {} : { value: n };
6
6
  }
7
- var n = (e) => /^\d{4}-\d{2}-\d{2}$/u.test(e);
8
- function r(e) {
9
- return n(e) ? { value: e } : {};
10
- }
7
+ var r = (e) => /^\d{4}-\d{2}-\d{2}$/u.test(e);
11
8
  function i(e) {
12
- return e !== void 0 && n(e) ? { min: e } : {};
9
+ if (!r(e)) return !1;
10
+ try {
11
+ return t(e), !0;
12
+ } catch {
13
+ return !1;
14
+ }
15
+ }
16
+ function a(e) {
17
+ return i(e) ? { value: e } : {};
18
+ }
19
+ function o(e) {
20
+ return e !== void 0 && i(e) ? { min: e } : {};
13
21
  }
14
- export { r as dateValue, i as minDate, t as timeValue };
22
+ export { a as dateValue, o as minDate, n as timeValue };
@@ -187,7 +187,7 @@ var h = r.theme({
187
187
  font: "inherit",
188
188
  fontSize: "12px",
189
189
  borderRadius: "50%",
190
- color: "var(--ants-mh-blue-700)",
190
+ color: "var(--color-icon-accent)",
191
191
  cursor: "pointer"
192
192
  },
193
193
  ".cm-token:hover .cm-token-remove, .cm-token:focus-within .cm-token-remove": { opacity: "1" }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * When a loading state shows, for every view of the kit (marketinghub ADR 0080): only after the load has
2
+ * When a loading state shows, for every view of the kit: only after the load has
3
3
  * lasted `delay` ms, then for at least `minDuration` ms, so a fast load shows nothing and a slow
4
4
  * one never flashes. `delay` matches the antsomi theme's skeleton `animationDelay`.
5
5
  */
@@ -21,9 +21,8 @@ export type AccentCardProps = {
21
21
  readonly isDisabled?: boolean | undefined;
22
22
  /**
23
23
  * `stripe` (default): a grey border with an accent stripe down the start edge and a light
24
- * header bar, as fe-app's Perform event card. `banner`: no border nor stripe but a soft shadow,
25
- * under a dark blue header bar with the title in white capitals and a white close cross, as
26
- * fe-app's audience picker.
24
+ * header bar. `banner`: no border nor stripe but a soft shadow,
25
+ * under a dark blue header bar with the title in white capitals and a white close cross.
27
26
  */
28
27
  readonly variant?: "stripe" | "banner" | undefined;
29
28
  };
@@ -41,7 +41,7 @@ function u(u) {
41
41
  }) : /* @__PURE__ */ n(e, {
42
42
  label: p,
43
43
  size: "sm",
44
- isDisabled: u.isDisabled,
44
+ isDisabled: u.isDisabled ?? !1,
45
45
  onClick: u.onClose
46
46
  })), f[9] = p, f[10] = h, f[11] = m, f[12] = u.isDisabled, f[13] = u.onClose, f[14] = S) : S = f[14];
47
47
  let C;
@@ -95,7 +95,7 @@ var d = {
95
95
  $$css: !0
96
96
  },
97
97
  banner: {
98
- kWkggS: "auial5by5",
98
+ kWkggS: "aui1jxocwm",
99
99
  kMwMTN: "aui17wrial",
100
100
  kP9fke: "auitvhhri",
101
101
  $$css: !0
@@ -1,8 +1,7 @@
1
+ import { type CheckboxInputProps } from "@astryxdesign/core/CheckboxInput";
1
2
  import type { ReactNode } from "react";
2
3
  /** What `CheckRow` takes. */
3
- export type CheckRowProps = {
4
- /** The row's text and the checkbox's name; one line, the whole text in a tooltip when cut. */
5
- readonly label: string;
4
+ export type CheckRowProps = Pick<CheckboxInputProps, "label" | "isDisabled" | "isReadOnly"> & {
6
5
  /** A second line under the text, such as an id under a name; one line too. */
7
6
  readonly description?: string | undefined;
8
7
  /** Whether the box is ticked. */
@@ -16,16 +15,12 @@ export type CheckRowProps = {
16
15
  * link to the item; the two share one place, so nothing moves. None without it.
17
16
  */
18
17
  readonly hoverContent?: ReactNode;
19
- /** Dims the box and blocks it; nothing is hidden. */
20
- readonly isDisabled?: boolean | undefined;
21
- /** Shows the box's state, not dimmed, and blocks it. */
22
- readonly isReadOnly?: boolean | undefined;
23
18
  };
24
19
  /**
25
20
  * One row of a list to tick: a checkbox (md, as every checkbox), the row's text on one line (and
26
21
  * an optional second line), and content at its end that `hoverContent` replaces while the row is
27
22
  * hovered or focused. The box is the control and is named by the text; the text itself is not a
28
- * click target, as in fe-app. As high as a small control, so `RowSkeletons variant="check"`
23
+ * click target. As high as a small control, so `RowSkeletons variant="check"`
29
24
  * stands in for it without a shift. It holds no state.
30
25
  */
31
26
  export declare function CheckRow(props: CheckRowProps): ReactNode;
@@ -22,7 +22,7 @@ export type ChoiceTilesProps<V extends string> = {
22
22
  readonly isDisabled?: boolean | undefined;
23
23
  };
24
24
  /**
25
- * A choice among a few ways to go on, as antsomi-ui's tiles: a wrapping row of 180×170 cards, each
25
+ * A choice among a few ways to go on: a wrapping row of 180×170 cards, each
26
26
  * a button with its glyph in a soft accent circle, a bold title and a description under it. A pick
27
27
  * is an action, not a selected state: the host shows what follows instead. It holds no state.
28
28
  */
@@ -64,7 +64,7 @@ var l = {
64
64
  kzqmXN: "aui1pju0fl",
65
65
  kZKoxP: "aui10wjd1d",
66
66
  kaIpWk: "aui16rqkct",
67
- kWkggS: "aui1mu13x8",
67
+ kWkggS: "auir796ur",
68
68
  kMwMTN: "auiqwr325",
69
69
  $$css: !0
70
70
  }
@@ -1,33 +1,19 @@
1
1
  import { type TextInputProps } from "@astryxdesign/core/TextInput";
2
2
  import type { ReactNode } from "react";
3
3
  /** What `CommitTextField` takes. */
4
- export type CommitTextFieldProps = {
5
- /** The field's label; also its accessible name when hidden. */
6
- readonly label: string;
4
+ export type CommitTextFieldProps = Pick<TextInputProps, "label" | "isDisabled" | "isReadOnly" | "isLabelHidden" | "placeholder" | "description" | "isRequired" | "width" | "controlXstyle" | "containerXstyle"> & {
7
5
  /** The committed text. A new value from outside (an agent, undo) replaces the draft. */
8
6
  readonly value: string;
9
7
  /** Called with the draft on blur or Enter, only when it differs from `value`. */
10
8
  readonly onCommit: (value: string) => void;
11
9
  /** The input's height, `md` by default. */
12
10
  readonly size?: "sm" | "md";
13
- /** Dims the field and blocks typing. */
14
- readonly isDisabled?: boolean;
15
- /** Shows the text, not dimmed, and blocks typing. */
16
- readonly isReadOnly?: boolean;
17
- /** Keeps the label for screen readers only. */
18
- readonly isLabelHidden?: boolean;
19
- /** Shown while the field is empty. */
20
- readonly placeholder?: string;
21
- /** Help under the label. */
22
- readonly description?: string;
23
11
  /** A problem with the value, already in the user's language. */
24
12
  readonly error?: string | undefined;
25
13
  /** A text area instead of a single line; Enter then adds a line. */
26
14
  readonly isMultiline?: boolean;
27
15
  /** For `isMultiline`: how many rows the text area shows, `4` by default. */
28
16
  readonly rows?: number;
29
- /** Marks the field as required. */
30
- readonly isRequired?: boolean;
31
17
  /**
32
18
  * `false` (default): after a commit the draft goes back to `value`, so a refused text does not
33
19
  * stay in the field. `true` keeps the typed text until `value` changes from outside.
@@ -37,10 +23,6 @@ export type CommitTextFieldProps = {
37
23
  readonly maxLength?: number;
38
24
  /** Fresh global pattern for whole tokens, counted as one character even in plain text. */
39
25
  readonly pattern?: () => RegExp;
40
- /** For a single line: the field's width, in pixels or any CSS length such as `"100%"`. */
41
- readonly width?: number | string;
42
- /** For a single line: StyleX styles for the input's box, e.g. to make it read as plain text. */
43
- readonly controlXstyle?: TextInputProps["controlXstyle"];
44
26
  };
45
27
  /**
46
28
  * Text that stays a local draft while typing and commits on blur or Enter, so a word typed is one
@@ -7,7 +7,7 @@ import { TextArea as a } from "@astryxdesign/core/TextArea";
7
7
  import { TextInput as o } from "@astryxdesign/core/TextInput";
8
8
  // src/molecules/CommitTextField.tsx
9
9
  function s(s) {
10
- let c = r(43), { value: l, onCommit: u, isMultiline: d, error: f, maxLength: p, isDraftKeptOnCommit: m } = s, h = d !== void 0 && d, g = m !== void 0 && m, _;
10
+ let c = r(46), { value: l, onCommit: u, isMultiline: d, error: f, maxLength: p, isDraftKeptOnCommit: m } = s, h = d !== void 0 && d, g = m !== void 0 && m, _;
11
11
  c[0] === u ? _ = c[1] : (_ = (e) => {
12
12
  u(e ?? "");
13
13
  }, c[0] = u, c[1] = _);
@@ -24,9 +24,13 @@ function s(s) {
24
24
  let j;
25
25
  c[14] === s.description ? j = c[15] : (j = s.description === void 0 ? {} : { description: s.description }, c[14] = s.description, c[15] = j);
26
26
  let M;
27
- c[16] === f ? M = c[17] : (M = e(f), c[16] = f, c[17] = M);
27
+ c[16] === s.controlXstyle ? M = c[17] : (M = s.controlXstyle === void 0 ? {} : { controlXstyle: s.controlXstyle }, c[16] = s.controlXstyle, c[17] = M);
28
28
  let N;
29
- c[18] !== S || c[19] !== v || c[20] !== s.label || c[21] !== k || c[22] !== A || c[23] !== j || c[24] !== M || c[25] !== w || c[26] !== T || c[27] !== E || c[28] !== D || c[29] !== O ? (N = {
29
+ c[18] === s.containerXstyle ? N = c[19] : (N = s.containerXstyle === void 0 ? {} : { containerXstyle: s.containerXstyle }, c[18] = s.containerXstyle, c[19] = N);
30
+ let P;
31
+ c[20] === f ? P = c[21] : (P = e(f), c[20] = f, c[21] = P);
32
+ let F;
33
+ c[22] !== S || c[23] !== v || c[24] !== s.label || c[25] !== k || c[26] !== A || c[27] !== j || c[28] !== M || c[29] !== N || c[30] !== P || c[31] !== w || c[32] !== T || c[33] !== E || c[34] !== D || c[35] !== O ? (F = {
30
34
  label: C,
31
35
  value: v,
32
36
  onChange: w,
@@ -38,26 +42,25 @@ function s(s) {
38
42
  isRequired: k,
39
43
  ...A,
40
44
  ...j,
41
- ...M
42
- }, c[18] = S, c[19] = v, c[20] = s.label, c[21] = k, c[22] = A, c[23] = j, c[24] = M, c[25] = w, c[26] = T, c[27] = E, c[28] = D, c[29] = O, c[30] = N) : N = c[30];
43
- let P = N;
45
+ ...M,
46
+ ...N,
47
+ ...P
48
+ }, c[22] = S, c[23] = v, c[24] = s.label, c[25] = k, c[26] = A, c[27] = j, c[28] = M, c[29] = N, c[30] = P, c[31] = w, c[32] = T, c[33] = E, c[34] = D, c[35] = O, c[36] = F) : F = c[36];
49
+ let I = F;
44
50
  if (h) {
45
51
  let e = s.rows ?? 4, t;
46
- return c[31] !== P || c[32] !== e ? (t = /* @__PURE__ */ i(a, {
47
- ...P,
52
+ return c[37] !== I || c[38] !== e ? (t = /* @__PURE__ */ i(a, {
53
+ ...I,
48
54
  rows: e
49
- }), c[31] = P, c[32] = e, c[33] = t) : t = c[33], t;
55
+ }), c[37] = I, c[38] = e, c[39] = t) : t = c[39], t;
50
56
  }
51
- let F;
52
- c[34] === s.width ? F = c[35] : (F = s.width === void 0 ? {} : { width: s.width }, c[34] = s.width, c[35] = F);
53
- let I;
54
- c[36] === s.controlXstyle ? I = c[37] : (I = s.controlXstyle === void 0 ? {} : { controlXstyle: s.controlXstyle }, c[36] = s.controlXstyle, c[37] = I);
55
57
  let L;
56
- return c[38] !== S || c[39] !== P || c[40] !== F || c[41] !== I ? (L = /* @__PURE__ */ i(o, {
57
- ...P,
58
+ c[40] === s.width ? L = c[41] : (L = s.width === void 0 ? {} : { width: s.width }, c[40] = s.width, c[41] = L);
59
+ let R;
60
+ return c[42] !== S || c[43] !== I || c[44] !== L ? (R = /* @__PURE__ */ i(o, {
61
+ ...I,
58
62
  onEnter: S,
59
- ...F,
60
- ...I
61
- }), c[38] = S, c[39] = P, c[40] = F, c[41] = I, c[42] = L) : L = c[42], L;
63
+ ...L
64
+ }), c[42] = S, c[43] = I, c[44] = L, c[45] = R) : R = c[45], R;
62
65
  }
63
66
  export { s as CommitTextField };
@@ -1,12 +1,7 @@
1
+ import { type AlertDialogProps } from "@astryxdesign/core/AlertDialog";
1
2
  import type { ReactNode } from "react";
2
3
  /** What `ConfirmDialog` takes. */
3
- export type ConfirmDialogProps = {
4
- /** Open while a change waits for an answer. */
5
- readonly isOpen: boolean;
6
- /** The question, e.g. "Remove these rows?". */
7
- readonly title: string;
8
- /** What the change does. */
9
- readonly description: string;
4
+ export type ConfirmDialogProps = Pick<AlertDialogProps, "isOpen" | "title" | "description"> & {
10
5
  /** The texts of the two buttons; the host translates them. */
11
6
  readonly labels: {
12
7
  /** The confirming button, e.g. "Remove". */
@@ -1,7 +1,8 @@
1
+ import { type TimeInputProps } from "@astryxdesign/core/TimeInput";
1
2
  import type { ReactNode } from "react";
2
3
  import { type FieldGroupProps } from "./FieldGroup.js";
3
4
  /** What `DateTimeInput` takes. */
4
- export type DateTimeInputProps = Pick<FieldGroupProps, "isDisabled"> & {
5
+ export type DateTimeInputProps = Pick<FieldGroupProps, "isDisabled"> & Pick<TimeInputProps, "hourFormat"> & {
5
6
  /** The group's label, e.g. "Start date"; it names the group and is not shown. */
6
7
  readonly label: string;
7
8
  /** The texts the inputs show; the host translates them. */
@@ -17,7 +18,7 @@ export type DateTimeInputProps = Pick<FieldGroupProps, "isDisabled"> & {
17
18
  readonly value: string;
18
19
  /** The inputs' size, `md` by default. */
19
20
  readonly size?: "sm" | "md" | undefined;
20
- /** Shows the date-time, not dimmed, and ignores changes. */
21
+ /** Shows readable date and time fields at full opacity, without clear or picker actions. */
21
22
  readonly isReadOnly?: boolean | undefined;
22
23
  /** A problem with the date-time, already in the user's language. */
23
24
  readonly error?: string | undefined;
@@ -36,7 +37,7 @@ export type DateTimeInputProps = Pick<FieldGroupProps, "isDisabled"> & {
36
37
  readonly isRequired?: boolean;
37
38
  /** The time input stays disabled until a date is picked. */
38
39
  readonly isTimeLockedWithoutDate?: boolean;
39
- /** The earliest date the calendar offers (`YYYY-MM-DD`), such as an end's start; any without it or with another text. */
40
+ /** The earliest valid calendar date (`YYYY-MM-DD`); an absent or invalid minimum leaves dates unconstrained. */
40
41
  readonly min?: string | undefined;
41
42
  /** Called with the new date-time; a part not picked yet is empty, a new date starts at 00:00:00. */
42
43
  readonly onChange: (value: string) => void;
@@ -45,5 +46,7 @@ export type DateTimeInputProps = Pick<FieldGroupProps, "isDisabled"> & {
45
46
  * A date and a time of day under one label. It composes `DateInput` and `TimeInput` rather than
46
47
  * using Astryx's `DateTimeInput`, which holds only a complete value: here a date or a time may be
47
48
  * set alone while the other is still empty.
49
+ * `hourFormat` defaults to `12h`; choose `24h` for a 24-hour clock. Calendar and clear text use
50
+ * the facade's `InternationalizationProvider`, alongside host-translated `label` and `labels`.
48
51
  */
49
52
  export declare function DateTimeInput(props: DateTimeInputProps): ReactNode;