@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,41 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for ProblemsButton. */
4
- export const doc = {
5
- category: "Feedback",
6
- keywords: ["errors", "problems", "popover", "count"],
7
- usage: {
8
- description:
9
- "Summarize validation problems in a count button that opens a selectable list. The view renders nothing when items is empty.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Translate labels.count with the problem count and use onPick's index to locate the corresponding problem.",
15
- },
16
- {
17
- guidance: false,
18
- description:
19
- "Do not assume picking a problem fixes it; the host decides how to reveal or address it.",
20
- },
21
- ],
22
- anatomy: [
23
- {
24
- name: "Count button",
25
- required: true,
26
- description: "An error glyph and the number of problems when there are problems.",
27
- },
28
- {
29
- name: "Popover",
30
- required: false,
31
- description: "A titled, scrollable list built while open.",
32
- },
33
- {
34
- name: "Problem actions",
35
- required: false,
36
- description: "A button per problem that reports its index and closes the popover.",
37
- },
38
- ],
39
- },
40
- accessibility: ["labels.count names the count button; title labels the problem list."],
41
- } satisfies ComponentDoc;
@@ -1,48 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for RemovableRow. */
4
- export const doc = {
5
- category: "Inputs",
6
- keywords: ["picked", "row", "remove", "framed"],
7
- usage: {
8
- description:
9
- "Show a picked value with supporting text and a remove action. Use CheckRow when the row is an option to tick instead.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Name the removal through labels.remove and use isFramed when picked values need bordered single-line rows.",
15
- },
16
- {
17
- guidance: false,
18
- description:
19
- "Do not expect isReadOnly to hide host-supplied hover actions; the host must make those appropriate for viewing.",
20
- },
21
- ],
22
- anatomy: [
23
- {
24
- name: "Text",
25
- required: true,
26
- description: "The value label with an optional description.",
27
- },
28
- {
29
- name: "Problem",
30
- required: false,
31
- description: "Validation text below an unframed row or a warning tip in a framed row.",
32
- },
33
- {
34
- name: "End content",
35
- required: false,
36
- description: "Host content optionally swapped for hover actions.",
37
- },
38
- {
39
- name: "Remove button",
40
- required: false,
41
- description: "Removes the picked value unless read-only.",
42
- },
43
- ],
44
- },
45
- accessibility: [
46
- "labels.remove names the remove button; name interactive host-supplied hover actions separately.",
47
- ],
48
- } satisfies ComponentDoc;
@@ -1,41 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for RevealRadioGroup. */
4
- export const doc = {
5
- category: "Selection",
6
- keywords: ["radio", "choice", "reveal", "details"],
7
- usage: {
8
- description:
9
- "Choose one option and reveal only its related content below the list or beneath that option. Use RevealSwitch for a single boolean setting.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Keep value controlled and choose contentPlacement=option when each option's detail should follow its label.",
15
- },
16
- {
17
- guidance: false,
18
- description:
19
- "Do not expect the group to make controls inside option content read-only or disabled; configure those controls in the host.",
20
- },
21
- ],
22
- anatomy: [
23
- {
24
- name: "Group label",
25
- required: true,
26
- description: "The group's name, optionally visually hidden.",
27
- },
28
- {
29
- name: "Radio options",
30
- required: true,
31
- description: "The mutually exclusive choices with optional explanatory tips.",
32
- },
33
- {
34
- name: "Revealed content",
35
- required: false,
36
- description: "Only the chosen option's content.",
37
- },
38
- ],
39
- },
40
- accessibility: ["Supply label even when isLabelHidden, and clear labels for every option."],
41
- } satisfies ComponentDoc;
@@ -1,38 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for RevealSwitch. */
4
- export const doc = {
5
- category: "Selection",
6
- keywords: ["switch", "boolean", "reveal", "settings"],
7
- usage: {
8
- description:
9
- "Turn a setting on or off and reveal its controls only while it is on. Use RevealRadioGroup when choosing among several alternatives.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Keep value controlled and give the switch a label that explains what enabling it does.",
15
- },
16
- {
17
- guidance: false,
18
- description:
19
- "Do not expect disabling or making the switch read-only to change the behavior of supplied children.",
20
- },
21
- ],
22
- anatomy: [
23
- {
24
- name: "Switch",
25
- required: true,
26
- description: "The labeled boolean control.",
27
- },
28
- {
29
- name: "Content",
30
- required: false,
31
- description: "Host controls shown below the switch while value is true.",
32
- },
33
- ],
34
- },
35
- accessibility: [
36
- "label names the switch; the host supplies accessible labels for revealed controls.",
37
- ],
38
- } satisfies ComponentDoc;
@@ -1,43 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for RuleRow. */
4
- export const doc = {
5
- category: "Inputs",
6
- keywords: ["rule", "row", "joint", "remove"],
7
- usage: {
8
- description:
9
- "Arrange a joining word, host controls and a remove button on a wrapping row. Inside RepeatableList with columns, the row uses the shared grid tracks.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Give host controls the row's size and use align=start when a control shows validation below its input.",
15
- },
16
- {
17
- guidance: false,
18
- description:
19
- "Do not assume isDisabled or isReadOnly changes the supplied controls; those flags control the row's remove affordance.",
20
- },
21
- ],
22
- anatomy: [
23
- {
24
- name: "Joint word",
25
- required: false,
26
- description: "The translated word joining this row to its predecessor.",
27
- },
28
- {
29
- name: "Controls",
30
- required: true,
31
- description: "Host-supplied fields, operators and values.",
32
- },
33
- {
34
- name: "Remove button",
35
- required: false,
36
- description: "A named action, with its grid track preserved in read-only column layouts.",
37
- },
38
- ],
39
- },
40
- accessibility: [
41
- "labels.remove names the remove button; each supplied control needs its own label.",
42
- ],
43
- } satisfies ComponentDoc;
@@ -1,62 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for Select. */
4
- export const doc = {
5
- category: "Selection",
6
- keywords: ["choice", "options", "search"],
7
- related: [
8
- { name: "TreeSelect", when: "Choose one leaf from a two-level tree." },
9
- {
10
- name: "ChipListAddPopover",
11
- when: "Choose multiple values in a compact popover with an Apply draft.",
12
- },
13
- {
14
- name: "TransferPicker",
15
- when: "Choose multiple values with available and picked rows visible together.",
16
- },
17
- ],
18
- example: "Default",
19
- usage: {
20
- description:
21
- "Choose one value from options, optionally grouped into sections. Keep value controlled and update it through onChange. Offer onClear when the selection may be empty.",
22
- bestPractices: [
23
- {
24
- guidance: true,
25
- description:
26
- "Use hasSearch for long lists and keep the known label available through labels.value while options load.",
27
- },
28
- {
29
- guidance: false,
30
- description:
31
- "Do not supply labels.warning alongside error expecting both to appear; warning takes precedence over the validation error.",
32
- },
33
- {
34
- guidance: false,
35
- description:
36
- "Do not disable a field merely to display its value; use isReadOnly when editing is unavailable.",
37
- },
38
- ],
39
- anatomy: [
40
- {
41
- name: "Field label",
42
- required: true,
43
- description: "Names the choice even when visually hidden.",
44
- },
45
- {
46
- name: "Trigger",
47
- required: true,
48
- description: "Shows the selected value or placeholder and opens the list.",
49
- },
50
- {
51
- name: "Options",
52
- required: false,
53
- description:
54
- "The choices, sections and optional search field, while the list is open and editable.",
55
- },
56
- ],
57
- },
58
- accessibility: [
59
- "Always provide label, including when isLabelHidden is true.",
60
- "Supply translated description and error text so the choice and its validation are clear.",
61
- ],
62
- } satisfies ComponentDoc;
@@ -1,35 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for SideLabelRow. */
4
- export const doc = {
5
- category: "Layout",
6
- keywords: ["card", "row", "caption", "responsive"],
7
- usage: {
8
- description:
9
- "Place a narrow caption beside controls inside a card, with padding for the card's rows. Use FieldRow for a form section with theme-driven caption and control widths.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Keep labelWidth consistent across the card and let controls move below the caption when space runs out.",
15
- },
16
- {
17
- guidance: false,
18
- description:
19
- "Do not treat the visual caption as an accessible label association for every supplied control.",
20
- },
21
- ],
22
- anatomy: [
23
- {
24
- name: "Caption",
25
- required: true,
26
- description: "The narrow label column, wrapping long text.",
27
- },
28
- {
29
- name: "Controls",
30
- required: true,
31
- description: "Host content beside the caption or beneath it in a narrow layout.",
32
- },
33
- ],
34
- },
35
- } satisfies ComponentDoc;
@@ -1,41 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for SplitButton. */
4
- export const doc = {
5
- category: "Inputs",
6
- keywords: ["button", "menu", "actions", "split"],
7
- usage: {
8
- description:
9
- "Pair a primary action with a menu of related alternatives. With no items, only the main button is shown.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Use isMainDisabled to block only the primary action, and labels.menu to name the menu arrow.",
15
- },
16
- {
17
- guidance: false,
18
- description:
19
- "Do not assume isLoading disables the alternatives menu; it affects the main action while the menu stays usable.",
20
- },
21
- ],
22
- anatomy: [
23
- {
24
- name: "Main button",
25
- required: true,
26
- description: "The default action, optionally busy or disabled.",
27
- },
28
- {
29
- name: "Menu button",
30
- required: false,
31
- description: "A named arrow or host glyph opening the alternatives.",
32
- },
33
- {
34
- name: "Menu",
35
- required: false,
36
- description: "Related actions, each with its own optional disabled state.",
37
- },
38
- ],
39
- },
40
- accessibility: ["label names the main action and labels.menu names the icon-only menu button."],
41
- } satisfies ComponentDoc;
@@ -1,39 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for StatusButton. */
4
- export const doc = {
5
- category: "Feedback",
6
- keywords: ["status", "dot", "button", "connection"],
7
- usage: {
8
- description:
9
- "Combine an action with a small dot showing a related state. Use a plain button when no state needs to be communicated.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description: "Translate labels.status to explain the dot independently of its tone.",
14
- },
15
- {
16
- guidance: false,
17
- description: "Do not rely on the dot's color alone to convey the state.",
18
- },
19
- ],
20
- anatomy: [
21
- {
22
- name: "Button text",
23
- required: true,
24
- description: "The action supplied by label.",
25
- },
26
- {
27
- name: "Status dot",
28
- required: true,
29
- description: "A named dot in the supplied status tone.",
30
- },
31
- {
32
- name: "Icon",
33
- required: false,
34
- description: "Host-supplied leading content.",
35
- },
36
- ],
37
- },
38
- accessibility: ["labels.status names the status dot and label names the action."],
39
- } satisfies ComponentDoc;
@@ -1,41 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for TagSelect. */
4
- export const doc = {
5
- category: "Selection",
6
- keywords: ["tag", "color", "choice", "popover"],
7
- usage: {
8
- description:
9
- "Choose one value through a small colored tag and a popover of tags. Use Select for a conventional field with a larger options list.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Keep option labels concise and provide label for the tag button and title for its popover.",
15
- },
16
- {
17
- guidance: false,
18
- description:
19
- "Do not use the colored tag alone to explain the selected value; its text must identify it.",
20
- },
21
- ],
22
- anatomy: [
23
- {
24
- name: "Picked tag",
25
- required: true,
26
- description: "The selected label, or the raw unknown value in blue.",
27
- },
28
- {
29
- name: "Popover heading",
30
- required: false,
31
- description: "The supplied title while the tag list is open.",
32
- },
33
- {
34
- name: "Tag choices",
35
- required: false,
36
- description: "Wrapping tag buttons that choose a value and close the popover.",
37
- },
38
- ],
39
- },
40
- accessibility: ["label names the tag button; read-only mode shows the tag without a button."],
41
- } satisfies ComponentDoc;
@@ -1,43 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for ToggleGrid. */
4
- export const doc = {
5
- category: "Selection",
6
- keywords: ["toggle", "grid", "multiple", "days"],
7
- usage: {
8
- description:
9
- "Choose several compact values in a grid of toggle buttons, such as numbered days or hours. Use CheckGroup for longer checkbox labels.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Keep value controlled and accept changes in options order; use span for an option that should fill more tracks.",
15
- },
16
- {
17
- guidance: false,
18
- description:
19
- "Do not use the grid for a single exclusive choice or assume toggling preserves click order.",
20
- },
21
- ],
22
- anatomy: [
23
- {
24
- name: "Group label",
25
- required: true,
26
- description: "Names the set through FieldGroup.",
27
- },
28
- {
29
- name: "Toggle buttons",
30
- required: true,
31
- description: "One pressed or unpressed button per option, with optional column spans.",
32
- },
33
- {
34
- name: "Error",
35
- required: false,
36
- description: "A translated selection problem.",
37
- },
38
- ],
39
- },
40
- accessibility: [
41
- "label names the group; option labels name the toggle buttons and their pressed states show the pick.",
42
- ],
43
- } satisfies ComponentDoc;
@@ -1,41 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for TokenTextField. */
4
- export const doc = {
5
- category: "Inputs",
6
- keywords: ["text", "tokens", "editor", "draft"],
7
- related: [{ name: "CommitTextField", when: "Edit ordinary text without atomic token pills." }],
8
- usage: {
9
- description:
10
- "Edit a controlled string containing atomic token pills. pattern returns a fresh global regular expression matching whole tokens and describe supplies their appearance. Local edits commit on blur or single-line Enter; an outside value replaces the draft.",
11
- bestPractices: [
12
- {
13
- guidance: true,
14
- description:
15
- "Keep raw tokens in the string and use onDraftChange only for draft feedback such as a live length counter.",
16
- },
17
- {
18
- guidance: false,
19
- description:
20
- "Do not return a pattern that matches empty strings or treat the visible token label as the stored value.",
21
- },
22
- ],
23
- anatomy: [
24
- { name: "Field label", required: true, description: "Names the editable string." },
25
- {
26
- name: "Editor",
27
- required: true,
28
- description: "Text and atomic tokens; loads separately with a skeleton.",
29
- },
30
- {
31
- name: "Add button",
32
- required: false,
33
- description: "Opens the host's picker through onAddClick.",
34
- },
35
- ],
36
- },
37
- accessibility: [
38
- "Provide label and translated labels.add, labels.remove and labels.loading.",
39
- "Use isReadOnly to hide editing affordances while keeping the value readable.",
40
- ],
41
- } satisfies ComponentDoc;
@@ -1,42 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for TransferLayout. */
4
- export const doc = {
5
- category: "Layout",
6
- keywords: ["transfer", "columns", "scroll", "slots"],
7
- usage: {
8
- description:
9
- "Lay out available and picked content in two independently scrolling columns with fixed headers. Use TransferPicker when the kit should also manage selection controls and search.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Name both columns through labels and use startRef when the host observes paging in the start viewport.",
15
- },
16
- {
17
- guidance: false,
18
- description:
19
- "Do not expect layout slots to implement filtering, picking or removal; those behaviors belong to the host.",
20
- },
21
- ],
22
- anatomy: [
23
- {
24
- name: "Start column",
25
- required: true,
26
- description: "The start viewport with optional header, fixed title and footer.",
27
- },
28
- {
29
- name: "End column",
30
- required: true,
31
- description: "The end viewport with an optional fixed title and header.",
32
- },
33
- {
34
- name: "Header strip",
35
- required: false,
36
- description:
37
- "Host controls above the viewports; endHeader is omitted with isEndFullHeight.",
38
- },
39
- ],
40
- },
41
- accessibility: ["labels.start and labels.end name the two content columns."],
42
- } satisfies ComponentDoc;
@@ -1,38 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for TreeOptions. */
4
- export const doc = {
5
- category: "Selection",
6
- keywords: ["tree", "options", "leaves", "groups"],
7
- usage: {
8
- description:
9
- "Pick one leaf from a flat or two-level tree while groups only expand and collapse. Use TreeSelect to put this tree behind a searchable field trigger.",
10
- bestPractices: [
11
- {
12
- guidance: true,
13
- description:
14
- "Give every item a unique value and use isExpandedByDefault at mount when all groups should start open.",
15
- },
16
- {
17
- guidance: false,
18
- description:
19
- "Do not supply deeper nesting and expect it to render; only the top level and its children are shown.",
20
- },
21
- ],
22
- anatomy: [
23
- {
24
- name: "Rows",
25
- required: true,
26
- description: "Labels with a leaf selection mark or a group's trailing chevron.",
27
- },
28
- {
29
- name: "Child rows",
30
- required: false,
31
- description: "Leaves indented beneath an expanded group.",
32
- },
33
- ],
34
- },
35
- accessibility: [
36
- "The named tree exposes treeitem levels, expansion, selection and disabled states; Up and Down move focus, and Enter or Space acts on a row.",
37
- ],
38
- } satisfies ComponentDoc;
@@ -1,54 +0,0 @@
1
- import type { ComponentDoc } from "../doc/schema";
2
-
3
- /** Usage guidance for ChipListAddPopover. */
4
- export const doc = {
5
- category: "Selection",
6
- keywords: ["chips", "multiple", "popover", "apply"],
7
- related: [
8
- {
9
- name: "TransferPicker",
10
- when: "Keep available rows and picked values visible together with immediate changes.",
11
- },
12
- ],
13
- usage: {
14
- description:
15
- "Pick several values as removable chips through a searchable checkbox popover. Checkbox edits remain a draft until Apply; closing another way drops them.",
16
- bestPractices: [
17
- {
18
- guidance: true,
19
- description:
20
- "Use onRemove to confirm direct chip removal, and separately handle removals arriving in onChange from Apply.",
21
- },
22
- {
23
- guidance: false,
24
- description:
25
- "Do not discard unknown stored values just because options has not loaded them; they remain visible as invalid values or loading placeholders.",
26
- },
27
- ],
28
- anatomy: [
29
- {
30
- name: "Picked values",
31
- required: false,
32
- description: "Tokens or pill Chips when values are picked, with unknown values retained.",
33
- },
34
- {
35
- name: "Add button",
36
- required: false,
37
- description: "Opens the checkbox popover unless read-only.",
38
- },
39
- {
40
- name: "Popover",
41
- required: false,
42
- description: "Search, draft checkboxes and Apply.",
43
- },
44
- {
45
- name: "Error",
46
- required: false,
47
- description: "A translated selection problem.",
48
- },
49
- ],
50
- },
51
- accessibility: [
52
- "Supply translated search, add and apply labels plus labels.remove for each chip; labels.loading names loading placeholders.",
53
- ],
54
- } satisfies ComponentDoc;