@antscorp/ui 0.1.3 → 0.1.5

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 (198) hide show
  1. package/README.md +25 -1
  2. package/dist/atoms/AddButton.d.ts +3 -5
  3. package/dist/atoms/Chip.d.ts +3 -3
  4. package/dist/atoms/Chip.js +1 -1
  5. package/dist/atoms/RemoveButton.d.ts +3 -5
  6. package/dist/atoms/TextAction.d.ts +3 -3
  7. package/dist/docs.json +1 -1
  8. package/dist/lib/forwardable.d.ts +8 -0
  9. package/dist/lib/iso.d.ts +2 -2
  10. package/dist/lib/iso.js +16 -8
  11. package/dist/lib/tokenEditorExtensions.js +1 -1
  12. package/dist/molecules/AccentCard.js +2 -2
  13. package/dist/molecules/CheckGroup.d.ts +2 -1
  14. package/dist/molecules/CheckRow.d.ts +3 -5
  15. package/dist/molecules/ChoiceTiles.js +1 -1
  16. package/dist/molecules/CommitTextField.d.ts +2 -19
  17. package/dist/molecules/CommitTextField.js +21 -18
  18. package/dist/molecules/ConfirmDialog.d.ts +3 -7
  19. package/dist/molecules/DateTimeInput.d.ts +7 -3
  20. package/dist/molecules/DateTimeInput.js +82 -73
  21. package/dist/molecules/DurationInput.d.ts +2 -1
  22. package/dist/molecules/PercentRow.d.ts +2 -1
  23. package/dist/molecules/RemovableRow.js +32 -32
  24. package/dist/molecules/RevealRadioGroup.d.ts +3 -9
  25. package/dist/molecules/RevealSwitch.d.ts +3 -7
  26. package/dist/molecules/Select.d.ts +8 -23
  27. package/dist/molecules/Select.js +26 -20
  28. package/dist/molecules/StatusButton.d.ts +3 -7
  29. package/dist/molecules/ToggleGrid.d.ts +2 -1
  30. package/dist/molecules/TokenTextField.d.ts +2 -1
  31. package/dist/molecules/TreeOptions.d.ts +3 -2
  32. package/dist/molecules/TreeOptions.js +67 -44
  33. package/dist/organisms/HourOfDayRow.js +2 -2
  34. package/dist/organisms/HourOfWeekGrid.js +2 -2
  35. package/dist/organisms/TokenPickerDialog.d.ts +2 -1
  36. package/dist/organisms/TransferPicker.d.ts +2 -1
  37. package/dist/organisms/TreeSearchPanel.js +50 -47
  38. package/dist/theme/AntsomiTheme.d.ts +3 -2
  39. package/dist/theme/AntsomiTheme.js +8 -7
  40. package/dist/ui.css +1 -1
  41. package/package.json +23 -17
  42. package/src/atoms/AddButton.tsx +3 -6
  43. package/src/atoms/Chip.tsx +6 -5
  44. package/src/atoms/RemoveButton.tsx +4 -6
  45. package/src/atoms/TextAction.tsx +4 -4
  46. package/src/lib/forwardable.ts +8 -0
  47. package/src/lib/iso.ts +15 -3
  48. package/src/lib/tokenEditorExtensions.ts +1 -1
  49. package/src/molecules/AccentCard.tsx +4 -2
  50. package/src/molecules/CheckGroup.tsx +3 -3
  51. package/src/molecules/CheckRow.tsx +3 -6
  52. package/src/molecules/ChoiceTiles.tsx +3 -1
  53. package/src/molecules/CommitTextField.tsx +18 -20
  54. package/src/molecules/ConfirmDialog.tsx +6 -8
  55. package/src/molecules/DateTimeInput.tsx +87 -68
  56. package/src/molecules/DurationInput.tsx +4 -1
  57. package/src/molecules/PercentRow.tsx +3 -2
  58. package/src/molecules/RemovableRow.tsx +1 -1
  59. package/src/molecules/RevealRadioGroup.tsx +5 -10
  60. package/src/molecules/RevealSwitch.tsx +4 -8
  61. package/src/molecules/Select.tsx +25 -22
  62. package/src/molecules/StatusButton.tsx +4 -8
  63. package/src/molecules/ToggleGrid.tsx +3 -3
  64. package/src/molecules/TokenTextField.tsx +3 -3
  65. package/src/molecules/TreeOptions.tsx +86 -62
  66. package/src/organisms/HourOfDayRow.tsx +4 -2
  67. package/src/organisms/HourOfWeekGrid.tsx +4 -2
  68. package/src/organisms/TokenPickerDialog.tsx +2 -1
  69. package/src/organisms/TransferPicker.tsx +3 -3
  70. package/src/organisms/TreeSearchPanel.tsx +1 -1
  71. package/src/theme/AntsomiTheme.tsx +9 -3
  72. package/dist/atoms/AddButton.doc.d.ts +0 -21
  73. package/dist/atoms/AddGlyph.doc.d.ts +0 -16
  74. package/dist/atoms/Chip.doc.d.ts +0 -29
  75. package/dist/atoms/ChipSkeletons.doc.d.ts +0 -21
  76. package/dist/atoms/FieldHeading.doc.d.ts +0 -15
  77. package/dist/atoms/HoverSwap.doc.d.ts +0 -25
  78. package/dist/atoms/InfoTip.doc.d.ts +0 -25
  79. package/dist/atoms/JointLabel.doc.d.ts +0 -15
  80. package/dist/atoms/LabeledDivider.doc.d.ts +0 -21
  81. package/dist/atoms/LogoImage.doc.d.ts +0 -21
  82. package/dist/atoms/PanelSearchInput.doc.d.ts +0 -25
  83. package/dist/atoms/PathMark.doc.d.ts +0 -16
  84. package/dist/atoms/RemoveButton.doc.d.ts +0 -16
  85. package/dist/atoms/RowSkeletons.doc.d.ts +0 -25
  86. package/dist/atoms/TextAction.doc.d.ts +0 -25
  87. package/dist/atoms/TruncatedOption.doc.d.ts +0 -24
  88. package/dist/atoms/TruncatedText.doc.d.ts +0 -15
  89. package/dist/molecules/AccentCard.doc.d.ts +0 -25
  90. package/dist/molecules/CheckGroup.doc.d.ts +0 -25
  91. package/dist/molecules/CheckRow.doc.d.ts +0 -25
  92. package/dist/molecules/ChoiceDialog.doc.d.ts +0 -21
  93. package/dist/molecules/ChoiceTiles.doc.d.ts +0 -21
  94. package/dist/molecules/CommitTextField.doc.d.ts +0 -29
  95. package/dist/molecules/ConfirmDialog.doc.d.ts +0 -21
  96. package/dist/molecules/DateTimeInput.doc.d.ts +0 -25
  97. package/dist/molecules/DurationInput.doc.d.ts +0 -25
  98. package/dist/molecules/FieldGroup.doc.d.ts +0 -25
  99. package/dist/molecules/FieldRow.doc.d.ts +0 -24
  100. package/dist/molecules/FieldSkeleton.doc.d.ts +0 -25
  101. package/dist/molecules/FrequencyLimitRow.doc.d.ts +0 -25
  102. package/dist/molecules/InlineEditableText.doc.d.ts +0 -25
  103. package/dist/molecules/LoadMoreRow.doc.d.ts +0 -21
  104. package/dist/molecules/LoadState.doc.d.ts +0 -21
  105. package/dist/molecules/MetaTable.doc.d.ts +0 -25
  106. package/dist/molecules/PercentRow.doc.d.ts +0 -25
  107. package/dist/molecules/PhoneFrame.doc.d.ts +0 -21
  108. package/dist/molecules/ProblemsButton.doc.d.ts +0 -25
  109. package/dist/molecules/RemovableRow.doc.d.ts +0 -25
  110. package/dist/molecules/RevealRadioGroup.doc.d.ts +0 -25
  111. package/dist/molecules/RevealSwitch.doc.d.ts +0 -25
  112. package/dist/molecules/RuleRow.doc.d.ts +0 -25
  113. package/dist/molecules/Select.doc.d.ts +0 -30
  114. package/dist/molecules/SideLabelRow.doc.d.ts +0 -20
  115. package/dist/molecules/SplitButton.doc.d.ts +0 -25
  116. package/dist/molecules/StatusButton.doc.d.ts +0 -25
  117. package/dist/molecules/TagSelect.doc.d.ts +0 -25
  118. package/dist/molecules/ToggleGrid.doc.d.ts +0 -25
  119. package/dist/molecules/TokenTextField.doc.d.ts +0 -29
  120. package/dist/molecules/TransferLayout.doc.d.ts +0 -25
  121. package/dist/molecules/TreeOptions.doc.d.ts +0 -25
  122. package/dist/organisms/ChipListAddPopover.doc.d.ts +0 -25
  123. package/dist/organisms/HourOfDayRow.doc.d.ts +0 -25
  124. package/dist/organisms/HourOfWeekGrid.doc.d.ts +0 -25
  125. package/dist/organisms/RepeatableList.doc.d.ts +0 -21
  126. package/dist/organisms/ResizableDrawer.doc.d.ts +0 -25
  127. package/dist/organisms/RuleGroups.doc.d.ts +0 -21
  128. package/dist/organisms/RuleList.doc.d.ts +0 -25
  129. package/dist/organisms/SearchableGroupedList.doc.d.ts +0 -25
  130. package/dist/organisms/TokenPickerDialog.doc.d.ts +0 -21
  131. package/dist/organisms/TransferPicker.doc.d.ts +0 -29
  132. package/dist/organisms/TreeSearchPanel.doc.d.ts +0 -25
  133. package/dist/organisms/TreeSelect.doc.d.ts +0 -29
  134. package/dist/theme/AntsomiTheme.doc.d.ts +0 -15
  135. package/dist/theme/AntsomiTheme.doc.js +0 -22
  136. package/src/atoms/AddButton.doc.ts +0 -36
  137. package/src/atoms/AddGlyph.doc.ts +0 -26
  138. package/src/atoms/Chip.doc.ts +0 -45
  139. package/src/atoms/ChipSkeletons.doc.ts +0 -31
  140. package/src/atoms/FieldHeading.doc.ts +0 -22
  141. package/src/atoms/HoverSwap.doc.ts +0 -39
  142. package/src/atoms/InfoTip.doc.ts +0 -37
  143. package/src/atoms/JointLabel.doc.ts +0 -23
  144. package/src/atoms/LabeledDivider.doc.ts +0 -35
  145. package/src/atoms/LogoImage.doc.ts +0 -42
  146. package/src/atoms/PanelSearchInput.doc.ts +0 -41
  147. package/src/atoms/PathMark.doc.ts +0 -25
  148. package/src/atoms/RemoveButton.doc.ts +0 -26
  149. package/src/atoms/RowSkeletons.doc.ts +0 -43
  150. package/src/atoms/TextAction.doc.ts +0 -40
  151. package/src/atoms/TruncatedOption.doc.ts +0 -39
  152. package/src/atoms/TruncatedText.doc.ts +0 -22
  153. package/src/molecules/AccentCard.doc.ts +0 -43
  154. package/src/molecules/CheckGroup.doc.ts +0 -40
  155. package/src/molecules/CheckRow.doc.ts +0 -43
  156. package/src/molecules/ChoiceDialog.doc.ts +0 -48
  157. package/src/molecules/ChoiceTiles.doc.ts +0 -42
  158. package/src/molecules/CommitTextField.doc.ts +0 -41
  159. package/src/molecules/ConfirmDialog.doc.ts +0 -43
  160. package/src/molecules/DateTimeInput.doc.ts +0 -48
  161. package/src/molecules/DurationInput.doc.ts +0 -36
  162. package/src/molecules/FieldGroup.doc.ts +0 -41
  163. package/src/molecules/FieldRow.doc.ts +0 -36
  164. package/src/molecules/FieldSkeleton.doc.ts +0 -38
  165. package/src/molecules/FrequencyLimitRow.doc.ts +0 -48
  166. package/src/molecules/InlineEditableText.doc.ts +0 -41
  167. package/src/molecules/LoadMoreRow.doc.ts +0 -36
  168. package/src/molecules/LoadState.doc.ts +0 -42
  169. package/src/molecules/MetaTable.doc.ts +0 -46
  170. package/src/molecules/PercentRow.doc.ts +0 -48
  171. package/src/molecules/PhoneFrame.doc.ts +0 -46
  172. package/src/molecules/ProblemsButton.doc.ts +0 -41
  173. package/src/molecules/RemovableRow.doc.ts +0 -48
  174. package/src/molecules/RevealRadioGroup.doc.ts +0 -41
  175. package/src/molecules/RevealSwitch.doc.ts +0 -38
  176. package/src/molecules/RuleRow.doc.ts +0 -43
  177. package/src/molecules/Select.doc.ts +0 -62
  178. package/src/molecules/SideLabelRow.doc.ts +0 -35
  179. package/src/molecules/SplitButton.doc.ts +0 -41
  180. package/src/molecules/StatusButton.doc.ts +0 -39
  181. package/src/molecules/TagSelect.doc.ts +0 -41
  182. package/src/molecules/ToggleGrid.doc.ts +0 -43
  183. package/src/molecules/TokenTextField.doc.ts +0 -41
  184. package/src/molecules/TransferLayout.doc.ts +0 -42
  185. package/src/molecules/TreeOptions.doc.ts +0 -38
  186. package/src/organisms/ChipListAddPopover.doc.ts +0 -54
  187. package/src/organisms/HourOfDayRow.doc.ts +0 -43
  188. package/src/organisms/HourOfWeekGrid.doc.ts +0 -48
  189. package/src/organisms/RepeatableList.doc.ts +0 -49
  190. package/src/organisms/ResizableDrawer.doc.ts +0 -48
  191. package/src/organisms/RuleGroups.doc.ts +0 -49
  192. package/src/organisms/RuleList.doc.ts +0 -43
  193. package/src/organisms/SearchableGroupedList.doc.ts +0 -49
  194. package/src/organisms/TokenPickerDialog.doc.ts +0 -54
  195. package/src/organisms/TransferPicker.doc.ts +0 -69
  196. package/src/organisms/TreeSearchPanel.doc.ts +0 -43
  197. package/src/organisms/TreeSelect.doc.ts +0 -56
  198. package/src/theme/AntsomiTheme.doc.ts +0 -23
@@ -1,31 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for ChipSkeletons. */
4
- export const doc = {
5
- category: "Feedback",
6
- keywords: ["loading", "skeleton", "chips", "placeholder"],
7
- usage: {
8
- description:
9
- "Reserve the shape of picked values while their labels load. Use RowSkeletons for a vertical options list.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Match count, size and shape to the values being loaded, and supply label for the loading status.",
15
- },
16
- {
17
- guidance: false,
18
- description:
19
- "Do not replace already known labels with skeletons unless the whole list is being reloaded.",
20
- },
21
- ],
22
- anatomy: [
23
- {
24
- name: "Chip bars",
25
- required: true,
26
- description: "A row of rounded shimmer bars with varied widths.",
27
- },
28
- ],
29
- },
30
- accessibility: ["The wrapper has role status and uses label as its accessible name."],
31
- } satisfies ComponentDoc;
@@ -1,22 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for FieldHeading. */
4
- export const doc = {
5
- category: "Data display",
6
- keywords: ["heading", "caption", "field"],
7
- usage: {
8
- description:
9
- "Show a separate supporting caption above controls whose own labels are hidden. Use FieldRow when the form needs a caption column beside its controls.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Keep each control's own accessible label even when FieldHeading supplies the visible caption.",
15
- },
16
- {
17
- guidance: false,
18
- description: "Do not treat this text as a label association or a semantic heading element.",
19
- },
20
- ],
21
- },
22
- } satisfies ComponentDoc;
@@ -1,39 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for HoverSwap. */
4
- export const doc = {
5
- category: "Layout",
6
- keywords: ["hover", "actions", "focus", "row"],
7
- usage: {
8
- description:
9
- "Share one position between resting content and row actions shown on hover or focus. Use permanent end content when the action should always be visible.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Put stylex.defaultMarker() on the ancestor row so hover and focus-within reach both layers.",
15
- },
16
- {
17
- guidance: false,
18
- description:
19
- "Do not assume the transparent layer is removed from the tab order or the accessibility tree.",
20
- },
21
- ],
22
- anatomy: [
23
- {
24
- name: "Resting layer",
25
- required: false,
26
- description: "children is visible at rest.",
27
- },
28
- {
29
- name: "Action layer",
30
- required: true,
31
- description:
32
- "hoverContent occupies the same grid cell and appears on ancestor hover or focus.",
33
- },
34
- ],
35
- },
36
- accessibility: [
37
- "Controls in the transparent action layer remain tabbable; focusing within the marked row reveals them.",
38
- ],
39
- } satisfies ComponentDoc;
@@ -1,37 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for InfoTip. */
4
- export const doc = {
5
- category: "Feedback",
6
- keywords: ["help", "tooltip", "warning", "explanation"],
7
- usage: {
8
- description:
9
- "Put a short supplementary explanation beside a control or value. Use visible error text for a problem the user must act on.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Supply a translated label explaining the nearby value; choose error tone for a warning glyph.",
15
- },
16
- {
17
- guidance: false,
18
- description: "Do not put essential instructions only in a tooltip.",
19
- },
20
- ],
21
- anatomy: [
22
- {
23
- name: "Glyph",
24
- required: true,
25
- description: "An info icon, or a warning icon in error tone.",
26
- },
27
- {
28
- name: "Tooltip",
29
- required: false,
30
- description: "The explanation supplied by label, shown on hover or keyboard focus.",
31
- },
32
- ],
33
- },
34
- accessibility: [
35
- "Tab reaches the icon's wrapper, named by label, and focus opens the tooltip. Keep essential instructions visible outside it.",
36
- ],
37
- } satisfies ComponentDoc;
@@ -1,23 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for JointLabel. */
4
- export const doc = {
5
- category: "Data display",
6
- keywords: ["joint", "and", "or", "rows"],
7
- usage: {
8
- description:
9
- "Show a short connecting word between related rows. Use LabeledDivider when alternatives need a horizontal rule.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Pass the translated word in normal case and use width to align neighboring joints.",
15
- },
16
- {
17
- guidance: false,
18
- description:
19
- "Do not encode rule evaluation in this label; the host owns the meaning and data.",
20
- },
21
- ],
22
- },
23
- } satisfies ComponentDoc;
@@ -1,35 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for LabeledDivider. */
4
- export const doc = {
5
- category: "Layout",
6
- keywords: ["separator", "divider", "alternatives", "rule"],
7
- usage: {
8
- description:
9
- "Separate two blocks with a dashed line and a short joining word. Use JointLabel for a compact word without the rule.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Keep label short and use case to control capitalization without changing the translated text.",
15
- },
16
- {
17
- guidance: false,
18
- description: "Do not use the divider as an interactive control.",
19
- },
20
- ],
21
- anatomy: [
22
- {
23
- name: "Rules",
24
- required: true,
25
- description: "Dashed lines extend on both sides of the word.",
26
- },
27
- {
28
- name: "Joint word",
29
- required: true,
30
- description: "The centered label explains the relationship between blocks.",
31
- },
32
- ],
33
- },
34
- accessibility: ["The wrapper is a horizontal separator named by label."],
35
- } satisfies ComponentDoc;
@@ -1,42 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for LogoImage. */
4
- export const doc = {
5
- category: "Data display",
6
- keywords: ["logo", "avatar", "image", "fallback"],
7
- usage: {
8
- description:
9
- "Show a decorative logo or avatar beside content that already names it. A skeleton reserves its box until loading finishes, and fallback replaces a failed image.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Supply a fallback appropriate to the surrounding control and match size to its reserved box.",
15
- },
16
- {
17
- guidance: false,
18
- description:
19
- "Do not use this decorative image to carry information that is absent from adjacent text.",
20
- },
21
- ],
22
- anatomy: [
23
- {
24
- name: "Image",
25
- required: false,
26
- description:
27
- "A lazy-loaded image in the requested square or round box, until a load failure replaces it.",
28
- },
29
- {
30
- name: "Loading placeholder",
31
- required: false,
32
- description: "A matching skeleton while the image loads.",
33
- },
34
- {
35
- name: "Fallback",
36
- required: false,
37
- description: "Host content shown instead of the image after a load failure.",
38
- },
39
- ],
40
- },
41
- accessibility: ["The image has an empty alt attribute; provide the identifying text elsewhere."],
42
- } satisfies ComponentDoc;
@@ -1,41 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for PanelSearchInput. */
4
- export const doc = {
5
- category: "Inputs",
6
- keywords: ["search", "query", "panel", "clear"],
7
- usage: {
8
- description:
9
- "Place a controlled search row at the top of a dropdown panel. Use SearchableGroupedList when filtering and grouped results should be composed for you.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Supply label and labels.clear, and update value on each onChange; add a Divider below when separating results.",
15
- },
16
- {
17
- guidance: false,
18
- description:
19
- "Do not expect the input to filter data itself or provide disabled and read-only modes.",
20
- },
21
- ],
22
- anatomy: [
23
- {
24
- name: "Search glyph",
25
- required: true,
26
- description: "A magnifier at the start or end of the row.",
27
- },
28
- {
29
- name: "Input",
30
- required: true,
31
- description: "The controlled text query.",
32
- },
33
- {
34
- name: "Clear button",
35
- required: false,
36
- description: "Clears a nonempty query and restores focus to the input.",
37
- },
38
- ],
39
- },
40
- accessibility: ["The input is named by label and the clear button by labels.clear."],
41
- } satisfies ComponentDoc;
@@ -1,25 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for PathMark. */
4
- export const doc = {
5
- category: "Layout",
6
- keywords: ["path", "reveal", "focus", "form"],
7
- usage: {
8
- description:
9
- "Mark controls so revealPath can scroll to and focus the value associated with a data path. Nested marks interpret their paths relative to the enclosing mark.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Wrap the controls of the value and use a relative path inside another PathMark.",
15
- },
16
- {
17
- guidance: false,
18
- description: "Do not expect PathMark to render a visual frame or provide a control label.",
19
- },
20
- ],
21
- },
22
- accessibility: [
23
- "Keep accessible names on the wrapped controls; PathMark only carries their path for revealPath.",
24
- ],
25
- } satisfies ComponentDoc;
@@ -1,26 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for RemoveButton. */
4
- export const doc = {
5
- category: "Inputs",
6
- keywords: ["remove", "button", "row", "delete"],
7
- usage: {
8
- description:
9
- "Offer an icon-only action to remove the surrounding row or item. Use TextAction for a removal that should have a visible text caption.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Name what will be removed through label and perform the data change in onClick.",
15
- },
16
- {
17
- guidance: false,
18
- description:
19
- "Do not use isDisabled for a read-only presentation when isReadOnly should hide the removal affordance.",
20
- },
21
- ],
22
- },
23
- accessibility: [
24
- "label names the icon-only button; include the item or row being removed when needed to distinguish actions.",
25
- ],
26
- } satisfies ComponentDoc;
@@ -1,43 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for RowSkeletons. */
4
- export const doc = {
5
- category: "Feedback",
6
- keywords: ["loading", "skeleton", "rows", "tiles"],
7
- usage: {
8
- description:
9
- "Stand in for options, checkbox rows or framed picks while data loads. Use ChipSkeletons for compact picked values and FieldSkeleton for a field.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Match layout, variant, count and hasIcon to the content that will replace the placeholder.",
15
- },
16
- {
17
- guidance: false,
18
- description:
19
- "Do not create multiple loading statuses inside one named load; use hasStatus=false for nested placeholders.",
20
- },
21
- ],
22
- anatomy: [
23
- {
24
- name: "Text bars",
25
- required: true,
26
- description: "Varied shimmer widths stand in for row or tile labels.",
27
- },
28
- {
29
- name: "Leading shape",
30
- required: false,
31
- description: "An icon placeholder or checkbox shape when requested.",
32
- },
33
- {
34
- name: "End bar",
35
- required: false,
36
- description: "A short trailing value in check and framed variants.",
37
- },
38
- ],
39
- },
40
- accessibility: [
41
- "By default the wrapper has role status, named through labels.loading; hasStatus=false hides it from assistive technology.",
42
- ],
43
- } satisfies ComponentDoc;
@@ -1,40 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for TextAction. */
4
- export const doc = {
5
- category: "Inputs",
6
- keywords: ["action", "text", "button", "chevron"],
7
- usage: {
8
- description:
9
- "Offer a quiet action styled as bold accent text, optionally with an icon or menu chevron. Use AddButton for an add action with the kit's plus glyph.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Pass label in normal case and let case control its appearance; omit onClick when a Popover wrapper owns activation.",
15
- },
16
- {
17
- guidance: false,
18
- description: "Do not treat this action as navigation; it renders a button without an href.",
19
- },
20
- ],
21
- anatomy: [
22
- {
23
- name: "Label",
24
- required: true,
25
- description: "The translated action text.",
26
- },
27
- {
28
- name: "Leading icon",
29
- required: false,
30
- description: "Host-supplied content before the label.",
31
- },
32
- {
33
- name: "Chevron",
34
- required: false,
35
- description: "An indicator for an action that opens a menu.",
36
- },
37
- ],
38
- },
39
- accessibility: ["The text supplies the button's accessible name."],
40
- } satisfies ComponentDoc;
@@ -1,39 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for TruncatedOption. */
4
- export const doc = {
5
- category: "Selection",
6
- keywords: ["option", "ellipsis", "select", "label"],
7
- usage: {
8
- description:
9
- "Render a Selector option with a one-line label and a tooltip when it is cut. Use TruncatedText for plain text outside an option.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Provide a recognizable option label; an absent label falls back to option.value.",
15
- },
16
- {
17
- guidance: false,
18
- description: "Do not expect this presentation view to own selection or open a list.",
19
- },
20
- ],
21
- anatomy: [
22
- {
23
- name: "Label",
24
- required: true,
25
- description: "The option label, or its value, rendered through TruncatedText.",
26
- },
27
- {
28
- name: "Icon",
29
- required: false,
30
- description: "The option's supplied icon.",
31
- },
32
- {
33
- name: "Description",
34
- required: false,
35
- description: "Supporting option text rendered by SelectorOption.",
36
- },
37
- ],
38
- },
39
- } satisfies ComponentDoc;
@@ -1,22 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for TruncatedText. */
4
- export const doc = {
5
- category: "Data display",
6
- keywords: ["text", "ellipsis", "tooltip", "overflow"],
7
- usage: {
8
- description:
9
- "Keep a value on one line within the space its parent supplies. Astryx Text shows the whole label in a tooltip when the text is cut.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description: "Give the parent a constrained width so truncation has a useful boundary.",
14
- },
15
- {
16
- guidance: false,
17
- description:
18
- "Do not use error tone as the only explanation of a problem; provide the reason nearby.",
19
- },
20
- ],
21
- },
22
- } satisfies ComponentDoc;
@@ -1,43 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for AccentCard. */
4
- export const doc = {
5
- category: "Layout",
6
- keywords: ["card", "header", "rows", "footer"],
7
- usage: {
8
- description:
9
- "Group related rows under a titled header, with an optional close action and footer. Choose stripe or banner to match the surrounding composition.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Provide labels.close with onClose, and disable or make the supplied row controls read-only in the host.",
15
- },
16
- {
17
- guidance: false,
18
- description:
19
- "Do not expect isDisabled to disable the card's children; it only blocks closing.",
20
- },
21
- ],
22
- anatomy: [
23
- {
24
- name: "Header",
25
- required: true,
26
- description: "The title and optional named close button.",
27
- },
28
- {
29
- name: "Rows",
30
- required: true,
31
- description: "Host content stacked below the header.",
32
- },
33
- {
34
- name: "Footer",
35
- required: false,
36
- description: "Host content separated from the rows by a line.",
37
- },
38
- ],
39
- },
40
- accessibility: [
41
- "The card is a group named by title; labels.close names its optional close button.",
42
- ],
43
- } satisfies ComponentDoc;
@@ -1,40 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for CheckGroup. */
4
- export const doc = {
5
- category: "Selection",
6
- keywords: ["checkboxes", "multiple", "options", "group"],
7
- usage: {
8
- description:
9
- "Choose several values from a short list of labeled checkboxes. Use ToggleGrid when a compact grid of toggle buttons fits the choices better.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Keep value controlled and accept onChange values in options order; use vertical orientation when labels need more room.",
15
- },
16
- {
17
- guidance: false,
18
- description: "Do not use checkboxes for mutually exclusive choices; use RevealRadioGroup.",
19
- },
20
- ],
21
- anatomy: [
22
- {
23
- name: "Group label",
24
- required: true,
25
- description: "Names the set through FieldGroup.",
26
- },
27
- {
28
- name: "Checkboxes",
29
- required: true,
30
- description: "One controlled checkbox per option, in a wrapping row or column.",
31
- },
32
- {
33
- name: "Error",
34
- required: false,
35
- description: "A translated problem with the selection.",
36
- },
37
- ],
38
- },
39
- accessibility: ["Supply label for the group and a clear label on every option."],
40
- } satisfies ComponentDoc;
@@ -1,43 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for CheckRow. */
4
- export const doc = {
5
- category: "Selection",
6
- keywords: ["checkbox", "row", "pick", "list"],
7
- usage: {
8
- description:
9
- "Show one checkbox choice with optional supporting text and end content. Use RemovableRow for a value that is already picked and needs a removal action.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Keep label meaningful because it names the checkbox, and reserve hoverContent for supplementary row actions.",
15
- },
16
- {
17
- guidance: false,
18
- description:
19
- "Do not assume clicking the text toggles the checkbox; the checkbox itself is the control.",
20
- },
21
- ],
22
- anatomy: [
23
- {
24
- name: "Checkbox",
25
- required: true,
26
- description: "The controlled boolean choice.",
27
- },
28
- {
29
- name: "Text",
30
- required: true,
31
- description: "A one-line label and optional one-line description.",
32
- },
33
- {
34
- name: "End content",
35
- required: false,
36
- description: "A value optionally replaced by hover actions.",
37
- },
38
- ],
39
- },
40
- accessibility: [
41
- "label names the checkbox; provide names on interactive controls supplied through hoverContent.",
42
- ],
43
- } satisfies ComponentDoc;
@@ -1,48 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for ChoiceDialog. */
4
- export const doc = {
5
- category: "Overlays",
6
- keywords: ["dialog", "choice", "confirm", "radio"],
7
- usage: {
8
- description:
9
- "Ask for one choice before confirming a change, with optional details under the selected option. Use ConfirmDialog when no choice is required.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Keep value and option details controlled, and use isConfirmDisabled while the selected details are incomplete.",
15
- },
16
- {
17
- guidance: false,
18
- description:
19
- "Do not apply the choice merely when onValueChange fires; onConfirm is the explicit confirmation action.",
20
- },
21
- ],
22
- anatomy: [
23
- {
24
- name: "Header",
25
- required: true,
26
- description: "The question supplied by title.",
27
- },
28
- {
29
- name: "Description",
30
- required: true,
31
- description: "Explains what the user is choosing.",
32
- },
33
- {
34
- name: "Choices",
35
- required: true,
36
- description: "A radio list revealing the selected option's detail.",
37
- },
38
- {
39
- name: "Actions",
40
- required: true,
41
- description: "Translated cancel and confirm buttons.",
42
- },
43
- ],
44
- },
45
- accessibility: [
46
- "Provide descriptive title and option labels; closing the dialog, including Escape, calls onCancel.",
47
- ],
48
- } satisfies ComponentDoc;