@antscorp/ui 0.1.3 → 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.
- package/README.md +25 -1
- package/dist/atoms/AddButton.d.ts +2 -5
- package/dist/atoms/Chip.d.ts +2 -5
- package/dist/atoms/Chip.js +1 -1
- package/dist/atoms/RemoveButton.d.ts +2 -5
- package/dist/atoms/TextAction.d.ts +2 -3
- package/dist/docs.json +1 -1
- package/dist/lib/iso.d.ts +2 -2
- package/dist/lib/iso.js +16 -8
- package/dist/lib/tokenEditorExtensions.js +1 -1
- package/dist/molecules/AccentCard.js +2 -2
- package/dist/molecules/CheckRow.d.ts +2 -7
- package/dist/molecules/ChoiceTiles.js +1 -1
- package/dist/molecules/CommitTextField.d.ts +1 -19
- package/dist/molecules/CommitTextField.js +21 -18
- package/dist/molecules/ConfirmDialog.d.ts +2 -7
- package/dist/molecules/DateTimeInput.d.ts +6 -3
- package/dist/molecules/DateTimeInput.js +82 -73
- package/dist/molecules/RemovableRow.js +32 -32
- package/dist/molecules/RevealRadioGroup.d.ts +2 -9
- package/dist/molecules/RevealSwitch.d.ts +2 -7
- package/dist/molecules/Select.d.ts +7 -23
- package/dist/molecules/Select.js +26 -20
- package/dist/molecules/StatusButton.d.ts +2 -7
- package/dist/molecules/TreeOptions.d.ts +3 -2
- package/dist/molecules/TreeOptions.js +67 -44
- package/dist/organisms/HourOfDayRow.js +2 -2
- package/dist/organisms/HourOfWeekGrid.js +2 -2
- package/dist/organisms/TreeSearchPanel.js +50 -47
- package/dist/ui.css +1 -1
- package/package.json +23 -17
- package/src/atoms/AddButton.tsx +2 -6
- package/src/atoms/Chip.tsx +5 -7
- package/src/atoms/RemoveButton.tsx +2 -6
- package/src/atoms/TextAction.tsx +2 -4
- package/src/lib/iso.ts +15 -3
- package/src/lib/tokenEditorExtensions.ts +1 -1
- package/src/molecules/AccentCard.tsx +4 -2
- package/src/molecules/CheckRow.tsx +2 -8
- package/src/molecules/ChoiceTiles.tsx +3 -1
- package/src/molecules/CommitTextField.tsx +15 -20
- package/src/molecules/ConfirmDialog.tsx +2 -8
- package/src/molecules/DateTimeInput.tsx +86 -68
- package/src/molecules/RemovableRow.tsx +1 -1
- package/src/molecules/RevealRadioGroup.tsx +5 -10
- package/src/molecules/RevealSwitch.tsx +2 -8
- package/src/molecules/Select.tsx +22 -22
- package/src/molecules/StatusButton.tsx +2 -8
- package/src/molecules/TreeOptions.tsx +86 -62
- package/src/organisms/HourOfDayRow.tsx +4 -2
- package/src/organisms/HourOfWeekGrid.tsx +4 -2
- package/src/organisms/TreeSearchPanel.tsx +1 -1
- package/dist/atoms/AddButton.doc.d.ts +0 -21
- package/dist/atoms/AddGlyph.doc.d.ts +0 -16
- package/dist/atoms/Chip.doc.d.ts +0 -29
- package/dist/atoms/ChipSkeletons.doc.d.ts +0 -21
- package/dist/atoms/FieldHeading.doc.d.ts +0 -15
- package/dist/atoms/HoverSwap.doc.d.ts +0 -25
- package/dist/atoms/InfoTip.doc.d.ts +0 -25
- package/dist/atoms/JointLabel.doc.d.ts +0 -15
- package/dist/atoms/LabeledDivider.doc.d.ts +0 -21
- package/dist/atoms/LogoImage.doc.d.ts +0 -21
- package/dist/atoms/PanelSearchInput.doc.d.ts +0 -25
- package/dist/atoms/PathMark.doc.d.ts +0 -16
- package/dist/atoms/RemoveButton.doc.d.ts +0 -16
- package/dist/atoms/RowSkeletons.doc.d.ts +0 -25
- package/dist/atoms/TextAction.doc.d.ts +0 -25
- package/dist/atoms/TruncatedOption.doc.d.ts +0 -24
- package/dist/atoms/TruncatedText.doc.d.ts +0 -15
- package/dist/molecules/AccentCard.doc.d.ts +0 -25
- package/dist/molecules/CheckGroup.doc.d.ts +0 -25
- package/dist/molecules/CheckRow.doc.d.ts +0 -25
- package/dist/molecules/ChoiceDialog.doc.d.ts +0 -21
- package/dist/molecules/ChoiceTiles.doc.d.ts +0 -21
- package/dist/molecules/CommitTextField.doc.d.ts +0 -29
- package/dist/molecules/ConfirmDialog.doc.d.ts +0 -21
- package/dist/molecules/DateTimeInput.doc.d.ts +0 -25
- package/dist/molecules/DurationInput.doc.d.ts +0 -25
- package/dist/molecules/FieldGroup.doc.d.ts +0 -25
- package/dist/molecules/FieldRow.doc.d.ts +0 -24
- package/dist/molecules/FieldSkeleton.doc.d.ts +0 -25
- package/dist/molecules/FrequencyLimitRow.doc.d.ts +0 -25
- package/dist/molecules/InlineEditableText.doc.d.ts +0 -25
- package/dist/molecules/LoadMoreRow.doc.d.ts +0 -21
- package/dist/molecules/LoadState.doc.d.ts +0 -21
- package/dist/molecules/MetaTable.doc.d.ts +0 -25
- package/dist/molecules/PercentRow.doc.d.ts +0 -25
- package/dist/molecules/PhoneFrame.doc.d.ts +0 -21
- package/dist/molecules/ProblemsButton.doc.d.ts +0 -25
- package/dist/molecules/RemovableRow.doc.d.ts +0 -25
- package/dist/molecules/RevealRadioGroup.doc.d.ts +0 -25
- package/dist/molecules/RevealSwitch.doc.d.ts +0 -25
- package/dist/molecules/RuleRow.doc.d.ts +0 -25
- package/dist/molecules/Select.doc.d.ts +0 -30
- package/dist/molecules/SideLabelRow.doc.d.ts +0 -20
- package/dist/molecules/SplitButton.doc.d.ts +0 -25
- package/dist/molecules/StatusButton.doc.d.ts +0 -25
- package/dist/molecules/TagSelect.doc.d.ts +0 -25
- package/dist/molecules/ToggleGrid.doc.d.ts +0 -25
- package/dist/molecules/TokenTextField.doc.d.ts +0 -29
- package/dist/molecules/TransferLayout.doc.d.ts +0 -25
- package/dist/molecules/TreeOptions.doc.d.ts +0 -25
- package/dist/organisms/ChipListAddPopover.doc.d.ts +0 -25
- package/dist/organisms/HourOfDayRow.doc.d.ts +0 -25
- package/dist/organisms/HourOfWeekGrid.doc.d.ts +0 -25
- package/dist/organisms/RepeatableList.doc.d.ts +0 -21
- package/dist/organisms/ResizableDrawer.doc.d.ts +0 -25
- package/dist/organisms/RuleGroups.doc.d.ts +0 -21
- package/dist/organisms/RuleList.doc.d.ts +0 -25
- package/dist/organisms/SearchableGroupedList.doc.d.ts +0 -25
- package/dist/organisms/TokenPickerDialog.doc.d.ts +0 -21
- package/dist/organisms/TransferPicker.doc.d.ts +0 -29
- package/dist/organisms/TreeSearchPanel.doc.d.ts +0 -25
- package/dist/organisms/TreeSelect.doc.d.ts +0 -29
- package/dist/theme/AntsomiTheme.doc.d.ts +0 -15
- package/dist/theme/AntsomiTheme.doc.js +0 -22
- package/src/atoms/AddButton.doc.ts +0 -36
- package/src/atoms/AddGlyph.doc.ts +0 -26
- package/src/atoms/Chip.doc.ts +0 -45
- package/src/atoms/ChipSkeletons.doc.ts +0 -31
- package/src/atoms/FieldHeading.doc.ts +0 -22
- package/src/atoms/HoverSwap.doc.ts +0 -39
- package/src/atoms/InfoTip.doc.ts +0 -37
- package/src/atoms/JointLabel.doc.ts +0 -23
- package/src/atoms/LabeledDivider.doc.ts +0 -35
- package/src/atoms/LogoImage.doc.ts +0 -42
- package/src/atoms/PanelSearchInput.doc.ts +0 -41
- package/src/atoms/PathMark.doc.ts +0 -25
- package/src/atoms/RemoveButton.doc.ts +0 -26
- package/src/atoms/RowSkeletons.doc.ts +0 -43
- package/src/atoms/TextAction.doc.ts +0 -40
- package/src/atoms/TruncatedOption.doc.ts +0 -39
- package/src/atoms/TruncatedText.doc.ts +0 -22
- package/src/molecules/AccentCard.doc.ts +0 -43
- package/src/molecules/CheckGroup.doc.ts +0 -40
- package/src/molecules/CheckRow.doc.ts +0 -43
- package/src/molecules/ChoiceDialog.doc.ts +0 -48
- package/src/molecules/ChoiceTiles.doc.ts +0 -42
- package/src/molecules/CommitTextField.doc.ts +0 -41
- package/src/molecules/ConfirmDialog.doc.ts +0 -43
- package/src/molecules/DateTimeInput.doc.ts +0 -48
- package/src/molecules/DurationInput.doc.ts +0 -36
- package/src/molecules/FieldGroup.doc.ts +0 -41
- package/src/molecules/FieldRow.doc.ts +0 -36
- package/src/molecules/FieldSkeleton.doc.ts +0 -38
- package/src/molecules/FrequencyLimitRow.doc.ts +0 -48
- package/src/molecules/InlineEditableText.doc.ts +0 -41
- package/src/molecules/LoadMoreRow.doc.ts +0 -36
- package/src/molecules/LoadState.doc.ts +0 -42
- package/src/molecules/MetaTable.doc.ts +0 -46
- package/src/molecules/PercentRow.doc.ts +0 -48
- package/src/molecules/PhoneFrame.doc.ts +0 -46
- package/src/molecules/ProblemsButton.doc.ts +0 -41
- package/src/molecules/RemovableRow.doc.ts +0 -48
- package/src/molecules/RevealRadioGroup.doc.ts +0 -41
- package/src/molecules/RevealSwitch.doc.ts +0 -38
- package/src/molecules/RuleRow.doc.ts +0 -43
- package/src/molecules/Select.doc.ts +0 -62
- package/src/molecules/SideLabelRow.doc.ts +0 -35
- package/src/molecules/SplitButton.doc.ts +0 -41
- package/src/molecules/StatusButton.doc.ts +0 -39
- package/src/molecules/TagSelect.doc.ts +0 -41
- package/src/molecules/ToggleGrid.doc.ts +0 -43
- package/src/molecules/TokenTextField.doc.ts +0 -41
- package/src/molecules/TransferLayout.doc.ts +0 -42
- package/src/molecules/TreeOptions.doc.ts +0 -38
- package/src/organisms/ChipListAddPopover.doc.ts +0 -54
- package/src/organisms/HourOfDayRow.doc.ts +0 -43
- package/src/organisms/HourOfWeekGrid.doc.ts +0 -48
- package/src/organisms/RepeatableList.doc.ts +0 -49
- package/src/organisms/ResizableDrawer.doc.ts +0 -48
- package/src/organisms/RuleGroups.doc.ts +0 -49
- package/src/organisms/RuleList.doc.ts +0 -43
- package/src/organisms/SearchableGroupedList.doc.ts +0 -49
- package/src/organisms/TokenPickerDialog.doc.ts +0 -54
- package/src/organisms/TransferPicker.doc.ts +0 -69
- package/src/organisms/TreeSearchPanel.doc.ts +0 -43
- package/src/organisms/TreeSelect.doc.ts +0 -56
- package/src/theme/AntsomiTheme.doc.ts +0 -23
|
@@ -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;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { ComponentDoc } from "../doc/schema";
|
|
2
|
-
|
|
3
|
-
/** Usage guidance for ChoiceTiles. */
|
|
4
|
-
export const doc = {
|
|
5
|
-
category: "Selection",
|
|
6
|
-
keywords: ["tiles", "choices", "actions", "cards"],
|
|
7
|
-
usage: {
|
|
8
|
-
description:
|
|
9
|
-
"Offer a few actions as cards with an icon, title and short description. Use RevealRadioGroup when a persistent selected value is required.",
|
|
10
|
-
bestPractices: [
|
|
11
|
-
{
|
|
12
|
-
guidance: true,
|
|
13
|
-
description:
|
|
14
|
-
"Make each title distinguish the action and use onSelect to show or perform what follows.",
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
guidance: false,
|
|
18
|
-
description: "Do not use tiles as toggles; this view has no selected state.",
|
|
19
|
-
},
|
|
20
|
-
],
|
|
21
|
-
anatomy: [
|
|
22
|
-
{
|
|
23
|
-
name: "Icon circle",
|
|
24
|
-
required: true,
|
|
25
|
-
description: "Host glyph displayed in an accent circle on each tile.",
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
name: "Title",
|
|
29
|
-
required: true,
|
|
30
|
-
description: "The bold action text and button name.",
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
name: "Description",
|
|
34
|
-
required: true,
|
|
35
|
-
description: "Supporting text limited to two lines.",
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
},
|
|
39
|
-
accessibility: [
|
|
40
|
-
"label names the group; each tile is a button named by its title and supports click, Enter and Space.",
|
|
41
|
-
],
|
|
42
|
-
} satisfies ComponentDoc;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { ComponentDoc } from "../doc/schema";
|
|
2
|
-
|
|
3
|
-
/** Usage guidance for CommitTextField. */
|
|
4
|
-
export const doc = {
|
|
5
|
-
category: "Inputs",
|
|
6
|
-
keywords: ["text", "draft", "commit", "blur"],
|
|
7
|
-
related: [{ name: "TokenTextField", when: "Matched tokens need to appear as atomic pills." }],
|
|
8
|
-
usage: {
|
|
9
|
-
description:
|
|
10
|
-
"Edit text locally and report a single change on blur or single-line Enter. Use TokenTextField when matched tokens need to appear as atomic pills.",
|
|
11
|
-
bestPractices: [
|
|
12
|
-
{
|
|
13
|
-
guidance: true,
|
|
14
|
-
description:
|
|
15
|
-
"Return accepted text through value; use isDraftKeptOnCommit only when a refused draft should remain visible.",
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
guidance: false,
|
|
19
|
-
description: "Do not expect Enter to commit a multiline field; it inserts a new line.",
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
anatomy: [
|
|
23
|
-
{
|
|
24
|
-
name: "Label",
|
|
25
|
-
required: true,
|
|
26
|
-
description: "The field's accessible name, optionally visually hidden.",
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: "Input",
|
|
30
|
-
required: true,
|
|
31
|
-
description: "A single-line control or a multiline text area holding a draft.",
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
name: "Help and error",
|
|
35
|
-
required: false,
|
|
36
|
-
description: "Translated description and validation text.",
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
},
|
|
40
|
-
accessibility: ["Always supply label, including when isLabelHidden is true."],
|
|
41
|
-
} satisfies ComponentDoc;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { ComponentDoc } from "../doc/schema";
|
|
2
|
-
|
|
3
|
-
/** Usage guidance for ConfirmDialog. */
|
|
4
|
-
export const doc = {
|
|
5
|
-
category: "Overlays",
|
|
6
|
-
keywords: ["confirmation", "dialog", "cancel", "loss"],
|
|
7
|
-
usage: {
|
|
8
|
-
description:
|
|
9
|
-
"Ask before a change that loses work, optionally paired with useConfirmedChange. Use ChoiceDialog when the user must choose an option before confirming.",
|
|
10
|
-
bestPractices: [
|
|
11
|
-
{
|
|
12
|
-
guidance: true,
|
|
13
|
-
description:
|
|
14
|
-
"Explain the consequence in description and make labels.action name the actual change.",
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
guidance: false,
|
|
18
|
-
description:
|
|
19
|
-
"Do not perform the pending change until onConfirm; onCancel should discard the pending request.",
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
anatomy: [
|
|
23
|
-
{
|
|
24
|
-
name: "Header",
|
|
25
|
-
required: true,
|
|
26
|
-
description: "The confirmation question supplied by title.",
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: "Description",
|
|
30
|
-
required: true,
|
|
31
|
-
description: "The consequence of the pending change.",
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
name: "Actions",
|
|
35
|
-
required: true,
|
|
36
|
-
description: "The cancel button and confirming action.",
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
},
|
|
40
|
-
accessibility: [
|
|
41
|
-
"Supply a clear title and translated action and cancel labels; dialog behavior is provided by Astryx Dialog.",
|
|
42
|
-
],
|
|
43
|
-
} satisfies ComponentDoc;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { ComponentDoc } from "../doc/schema";
|
|
2
|
-
|
|
3
|
-
/** Usage guidance for DateTimeInput. */
|
|
4
|
-
export const doc = {
|
|
5
|
-
category: "Inputs",
|
|
6
|
-
keywords: ["date", "time", "partial", "calendar"],
|
|
7
|
-
usage: {
|
|
8
|
-
description:
|
|
9
|
-
"Edit a local date and time even while either part is incomplete. Set hasTime=false for a date-only value; labels.timezone only displays a note.",
|
|
10
|
-
bestPractices: [
|
|
11
|
-
{
|
|
12
|
-
guidance: true,
|
|
13
|
-
description:
|
|
14
|
-
"Keep wire values as strings and use frame=none when the individual date and time labels should be visible.",
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
guidance: false,
|
|
18
|
-
description:
|
|
19
|
-
"Do not require the value to be complete on every onChange; empty and partial strings are supported.",
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
anatomy: [
|
|
23
|
-
{
|
|
24
|
-
name: "Date input",
|
|
25
|
-
required: true,
|
|
26
|
-
description: "The date portion, optionally constrained by min.",
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: "Time input",
|
|
30
|
-
required: false,
|
|
31
|
-
description: "The time portion when hasTime is enabled.",
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
name: "Note",
|
|
35
|
-
required: false,
|
|
36
|
-
description: "labels.timezone shown beside the time.",
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
name: "Help and error",
|
|
40
|
-
required: false,
|
|
41
|
-
description: "Group guidance or date-field guidance with frame=none.",
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
},
|
|
45
|
-
accessibility: [
|
|
46
|
-
"Supply label and labels.date and labels.time; the default bare group hides the individual visible labels while preserving their names.",
|
|
47
|
-
],
|
|
48
|
-
} satisfies ComponentDoc;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { ComponentDoc } from "../doc/schema";
|
|
2
|
-
|
|
3
|
-
/** Usage guidance for DurationInput. */
|
|
4
|
-
export const doc = {
|
|
5
|
-
category: "Inputs",
|
|
6
|
-
keywords: ["duration", "days", "hours", "seconds"],
|
|
7
|
-
usage: {
|
|
8
|
-
description:
|
|
9
|
-
"Edit a length of time as days, hours, minutes and seconds. Use DateTimeInput for a calendar date and time instead of an elapsed duration.",
|
|
10
|
-
bestPractices: [
|
|
11
|
-
{
|
|
12
|
-
guidance: true,
|
|
13
|
-
description:
|
|
14
|
-
"Translate every unit label and use max to constrain parts; reaching max.days disables the remaining parts.",
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
guidance: false,
|
|
18
|
-
description:
|
|
19
|
-
"Do not treat this partial duration object as an instant or assume unset parts are explicitly stored as zero.",
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
anatomy: [
|
|
23
|
-
{
|
|
24
|
-
name: "Part inputs",
|
|
25
|
-
required: true,
|
|
26
|
-
description: "Four number inputs, each followed by its translated unit.",
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: "Error",
|
|
30
|
-
required: false,
|
|
31
|
-
description: "A translated problem with the whole duration.",
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
|
-
},
|
|
35
|
-
accessibility: ["label names the unframed group; labels names each unit's input."],
|
|
36
|
-
} satisfies ComponentDoc;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { ComponentDoc } from "../doc/schema";
|
|
2
|
-
|
|
3
|
-
/** Usage guidance for FieldGroup. */
|
|
4
|
-
export const doc = {
|
|
5
|
-
category: "Layout",
|
|
6
|
-
keywords: ["fields", "group", "fieldset", "card"],
|
|
7
|
-
usage: {
|
|
8
|
-
description:
|
|
9
|
-
"Name several related fields and show a problem with the group as a whole. Use FieldRow to place a separate caption beside the grouped controls.",
|
|
10
|
-
bestPractices: [
|
|
11
|
-
{
|
|
12
|
-
guidance: true,
|
|
13
|
-
description:
|
|
14
|
-
"Supply label even without a frame, and disable child controls explicitly when using frame=card.",
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
guidance: false,
|
|
18
|
-
description:
|
|
19
|
-
"Do not expect isDisabled to disable the card variant; only the unframed fieldset disables its descendants.",
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
anatomy: [
|
|
23
|
-
{
|
|
24
|
-
name: "Group label",
|
|
25
|
-
required: true,
|
|
26
|
-
description: "An accessible name, visible above content in the card variant.",
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: "Fields",
|
|
30
|
-
required: true,
|
|
31
|
-
description: "Host controls with the requested gap.",
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
name: "Description and error",
|
|
35
|
-
required: false,
|
|
36
|
-
description: "Help and a translated problem with the group.",
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
},
|
|
40
|
-
accessibility: ["The unframed variant is a named fieldset; the card variant uses role group."],
|
|
41
|
-
} satisfies ComponentDoc;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { ComponentDoc } from "../doc/schema";
|
|
2
|
-
|
|
3
|
-
/** Usage guidance for FieldRow. */
|
|
4
|
-
export const doc = {
|
|
5
|
-
category: "Layout",
|
|
6
|
-
keywords: ["form", "caption", "columns", "responsive"],
|
|
7
|
-
usage: {
|
|
8
|
-
description:
|
|
9
|
-
"Arrange a form section as a caption column beside its controls, stacking when room is limited. Use SideLabelRow for padded rows inside a card.",
|
|
10
|
-
bestPractices: [
|
|
11
|
-
{
|
|
12
|
-
guidance: true,
|
|
13
|
-
description:
|
|
14
|
-
"Keep caption widths consistent through the theme or labelWidth and use align=start for controls without a useful text baseline.",
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
guidance: false,
|
|
18
|
-
description:
|
|
19
|
-
"Do not rely on the visible caption to name individual controls; keep their own labels.",
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
anatomy: [
|
|
23
|
-
{
|
|
24
|
-
name: "Caption column",
|
|
25
|
-
required: false,
|
|
26
|
-
description:
|
|
27
|
-
"The label and optional description; its space remains when no label is supplied in horizontal layout.",
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
name: "Control column",
|
|
31
|
-
required: true,
|
|
32
|
-
description: "Host controls that move below the caption in a narrow layout.",
|
|
33
|
-
},
|
|
34
|
-
],
|
|
35
|
-
},
|
|
36
|
-
} satisfies ComponentDoc;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { ComponentDoc } from "../doc/schema";
|
|
2
|
-
|
|
3
|
-
/** Usage guidance for FieldSkeleton. */
|
|
4
|
-
export const doc = {
|
|
5
|
-
category: "Feedback",
|
|
6
|
-
keywords: ["field", "loading", "skeleton", "placeholder"],
|
|
7
|
-
usage: {
|
|
8
|
-
description:
|
|
9
|
-
"Reserve a form field's shape while its data loads. Use RowSkeletons for a list and ChipSkeletons for picked values.",
|
|
10
|
-
bestPractices: [
|
|
11
|
-
{
|
|
12
|
-
guidance: true,
|
|
13
|
-
description:
|
|
14
|
-
"Show the real label when known and match isLabelHidden to the field that will replace the placeholder.",
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
guidance: false,
|
|
18
|
-
description:
|
|
19
|
-
"Do not add a separate status for every skeleton inside one named loading region; set hasStatus=false.",
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
anatomy: [
|
|
23
|
-
{
|
|
24
|
-
name: "Label",
|
|
25
|
-
required: false,
|
|
26
|
-
description: "The real caption or a short shimmer bar unless isLabelHidden.",
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: "Control placeholder",
|
|
30
|
-
required: true,
|
|
31
|
-
description: "A shimmer as high as a control, respecting horizontal-labels layout.",
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
|
-
},
|
|
35
|
-
accessibility: [
|
|
36
|
-
"The default wrapper is a status named by labels.loading; hasStatus=false hides the placeholder from assistive technology.",
|
|
37
|
-
],
|
|
38
|
-
} satisfies ComponentDoc;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { ComponentDoc } from "../doc/schema";
|
|
2
|
-
|
|
3
|
-
/** Usage guidance for FrequencyLimitRow. */
|
|
4
|
-
export const doc = {
|
|
5
|
-
category: "Inputs",
|
|
6
|
-
keywords: ["frequency", "limit", "count", "window"],
|
|
7
|
-
usage: {
|
|
8
|
-
description:
|
|
9
|
-
"Edit a count per time window as one sentence. The window identified by everyWindow also reveals a number of units.",
|
|
10
|
-
bestPractices: [
|
|
11
|
-
{
|
|
12
|
-
guidance: true,
|
|
13
|
-
description:
|
|
14
|
-
"Keep value controlled and supply translated labels and connecting words; use paths when the inputs must be found by revealPath.",
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
guidance: false,
|
|
18
|
-
description:
|
|
19
|
-
"Do not retain every for unrelated windows; switching away from everyWindow drops that extra number.",
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
anatomy: [
|
|
23
|
-
{
|
|
24
|
-
name: "Count input",
|
|
25
|
-
required: true,
|
|
26
|
-
description: "The number of occurrences followed by words.times.",
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: "Window select",
|
|
30
|
-
required: true,
|
|
31
|
-
description: "The offered counting window.",
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
name: "Every input",
|
|
35
|
-
required: false,
|
|
36
|
-
description: "An extra number and words.every for the designated window.",
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
name: "Trailing content",
|
|
40
|
-
required: false,
|
|
41
|
-
description: "Host content finishing the sentence.",
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
},
|
|
45
|
-
accessibility: [
|
|
46
|
-
"labels.times, labels.window and labels.every supply the hidden accessible input labels.",
|
|
47
|
-
],
|
|
48
|
-
} satisfies ComponentDoc;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { ComponentDoc } from "../doc/schema";
|
|
2
|
-
|
|
3
|
-
/** Usage guidance for InlineEditableText. */
|
|
4
|
-
export const doc = {
|
|
5
|
-
category: "Inputs",
|
|
6
|
-
keywords: ["inline", "text", "edit", "draft"],
|
|
7
|
-
usage: {
|
|
8
|
-
description:
|
|
9
|
-
"Edit a title or body text in place, committing on blur or Enter without a separate edit mode. Use CommitTextField for a conventional labeled field.",
|
|
10
|
-
bestPractices: [
|
|
11
|
-
{
|
|
12
|
-
guidance: true,
|
|
13
|
-
description:
|
|
14
|
-
"Supply both labels.edit and icons.edit to offer a pencil that focuses the input.",
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
guidance: false,
|
|
18
|
-
description:
|
|
19
|
-
"Do not expect a field or pencil in read-only mode; the view renders plain text with the placeholder when empty.",
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
anatomy: [
|
|
23
|
-
{
|
|
24
|
-
name: "Text",
|
|
25
|
-
required: true,
|
|
26
|
-
description: "A draft input, or plain text in read-only mode.",
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: "Trailing content",
|
|
30
|
-
required: false,
|
|
31
|
-
description: "The after slot between the text and pencil.",
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
name: "Pencil",
|
|
35
|
-
required: false,
|
|
36
|
-
description: "A named host-supplied edit glyph shown on hover.",
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
},
|
|
40
|
-
accessibility: ["label names the input; labels.edit names the optional pencil button."],
|
|
41
|
-
} satisfies ComponentDoc;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { ComponentDoc } from "../doc/schema";
|
|
2
|
-
|
|
3
|
-
/** Usage guidance for LoadMoreRow. */
|
|
4
|
-
export const doc = {
|
|
5
|
-
category: "Feedback",
|
|
6
|
-
keywords: ["pagination", "loading", "retry", "sentinel"],
|
|
7
|
-
usage: {
|
|
8
|
-
description:
|
|
9
|
-
"Finish a paged list with loading placeholders or a failed-page retry action. Use LoadState for the initial load that replaces the whole content.",
|
|
10
|
-
bestPractices: [
|
|
11
|
-
{
|
|
12
|
-
guidance: true,
|
|
13
|
-
description:
|
|
14
|
-
"Keep loaded rows above this view and attach sentinelRef to the host's load-more observer.",
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
guidance: false,
|
|
18
|
-
description:
|
|
19
|
-
"Do not pass error without onRetry and expect an error row; both are needed to show it.",
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
anatomy: [
|
|
23
|
-
{
|
|
24
|
-
name: "Loading rows",
|
|
25
|
-
required: false,
|
|
26
|
-
description: "Two timed skeleton rows in the requested variant.",
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: "Retry row",
|
|
30
|
-
required: false,
|
|
31
|
-
description: "The translated error and retry button.",
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
|
-
},
|
|
35
|
-
accessibility: ["Supply a clear translated labels.retry for the retry button."],
|
|
36
|
-
} satisfies ComponentDoc;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { ComponentDoc } from "../doc/schema";
|
|
2
|
-
|
|
3
|
-
/** Usage guidance for LoadState. */
|
|
4
|
-
export const doc = {
|
|
5
|
-
category: "Feedback",
|
|
6
|
-
keywords: ["loading", "error", "retry", "placeholder"],
|
|
7
|
-
usage: {
|
|
8
|
-
description:
|
|
9
|
-
"Switch between a content-shaped loading placeholder, a failure with retry, and loaded children. Use LoadMoreRow for later pages so existing results can remain visible.",
|
|
10
|
-
bestPractices: [
|
|
11
|
-
{
|
|
12
|
-
guidance: true,
|
|
13
|
-
description:
|
|
14
|
-
"Choose FieldSkeleton or RowSkeletons as placeholder and give that placeholder its loading status name.",
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
guidance: false,
|
|
18
|
-
description: "Do not use a generic spinner in place of the content-shaped skeleton.",
|
|
19
|
-
},
|
|
20
|
-
],
|
|
21
|
-
anatomy: [
|
|
22
|
-
{
|
|
23
|
-
name: "Placeholder",
|
|
24
|
-
required: false,
|
|
25
|
-
description: "Host-supplied skeleton content while loading.",
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
name: "Error",
|
|
29
|
-
required: false,
|
|
30
|
-
description: "A failure title, optional detail and retry button.",
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
name: "Content",
|
|
34
|
-
required: false,
|
|
35
|
-
description: "The children after loading succeeds.",
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
},
|
|
39
|
-
accessibility: [
|
|
40
|
-
"The placeholder names its own loading status; labels.retry names the error action.",
|
|
41
|
-
],
|
|
42
|
-
} satisfies ComponentDoc;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { ComponentDoc } from "../doc/schema";
|
|
2
|
-
|
|
3
|
-
/** Usage guidance for MetaTable. */
|
|
4
|
-
export const doc = {
|
|
5
|
-
category: "Data display",
|
|
6
|
-
keywords: ["table", "metadata", "names", "counts"],
|
|
7
|
-
usage: {
|
|
8
|
-
description:
|
|
9
|
-
"Display a read-only list of names with an optional short-value column. Use TransferPicker when users need to edit the picked values.",
|
|
10
|
-
bestPractices: [
|
|
11
|
-
{
|
|
12
|
-
guidance: true,
|
|
13
|
-
description:
|
|
14
|
-
"Provide labels.meta to show the meta column and labels.loading when rows are loading.",
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
guidance: false,
|
|
18
|
-
description:
|
|
19
|
-
"Do not expect a row with error to remain a link; its name becomes plain error-toned text with an explanation.",
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
anatomy: [
|
|
23
|
-
{
|
|
24
|
-
name: "Name column",
|
|
25
|
-
required: true,
|
|
26
|
-
description: "A heading and names, optionally linked in a new tab.",
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: "Meta column",
|
|
30
|
-
required: false,
|
|
31
|
-
description: "Short values under labels.meta.",
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
name: "Problem tip",
|
|
35
|
-
required: false,
|
|
36
|
-
description: "A warning explanation for an invalid row.",
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
name: "Loading cells",
|
|
40
|
-
required: false,
|
|
41
|
-
description: "Shimmer bars in the real columns for loading rows.",
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
},
|
|
45
|
-
accessibility: ["The first loading row provides the one status named by labels.loading."],
|
|
46
|
-
} satisfies ComponentDoc;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { ComponentDoc } from "../doc/schema";
|
|
2
|
-
|
|
3
|
-
/** Usage guidance for PercentRow. */
|
|
4
|
-
export const doc = {
|
|
5
|
-
category: "Inputs",
|
|
6
|
-
keywords: ["percent", "slider", "share", "commit"],
|
|
7
|
-
usage: {
|
|
8
|
-
description:
|
|
9
|
-
"Edit a whole percentage through a number input and a bounded slider. Dragging previews locally and reports the change only when the interaction ends.",
|
|
10
|
-
bestPractices: [
|
|
11
|
-
{
|
|
12
|
-
guidance: true,
|
|
13
|
-
description:
|
|
14
|
-
"Use onChange to store committed values and isRemoveDisabled when removal must also be blocked.",
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
guidance: false,
|
|
18
|
-
description:
|
|
19
|
-
"Do not assume isDisabled blocks removal; it locks the share while the optional remove action stays active.",
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
anatomy: [
|
|
23
|
-
{
|
|
24
|
-
name: "Caption",
|
|
25
|
-
required: false,
|
|
26
|
-
description: "The FieldRow caption beside the controls.",
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: "Percent input",
|
|
30
|
-
required: true,
|
|
31
|
-
description: "The controlled whole percentage.",
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
name: "Slider",
|
|
35
|
-
required: true,
|
|
36
|
-
description: "A bounded percentage control with local drag preview.",
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
name: "Remove button",
|
|
40
|
-
required: false,
|
|
41
|
-
description: "A named removal action supplied through onRemove.",
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
},
|
|
45
|
-
accessibility: [
|
|
46
|
-
"labels.share names the controls and labels.remove names the optional remove button.",
|
|
47
|
-
],
|
|
48
|
-
} satisfies ComponentDoc;
|