ionbase-ui 0.76.0 → 0.81.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Card.d.ts +61 -0
- package/dist/components/Card.d.ts.map +1 -0
- package/dist/components/Card.js +37 -0
- package/dist/components/Card.js.map +1 -0
- package/dist/components/CommandPalette.d.ts +76 -0
- package/dist/components/CommandPalette.d.ts.map +1 -0
- package/dist/components/CommandPalette.js +194 -0
- package/dist/components/CommandPalette.js.map +1 -0
- package/dist/components/DateField.d.ts +14 -0
- package/dist/components/DateField.d.ts.map +1 -1
- package/dist/components/DateField.js +1 -1
- package/dist/components/DateField.js.map +1 -1
- package/dist/components/Kbd.d.ts +45 -0
- package/dist/components/Kbd.d.ts.map +1 -0
- package/dist/components/Kbd.js +45 -0
- package/dist/components/Kbd.js.map +1 -0
- package/dist/components/Table.d.ts +18 -0
- package/dist/components/Table.d.ts.map +1 -1
- package/dist/components/Table.js +14 -3
- package/dist/components/Table.js.map +1 -1
- package/dist/components/TagGroup.d.ts +51 -0
- package/dist/components/TagGroup.d.ts.map +1 -0
- package/dist/components/TagGroup.js +84 -0
- package/dist/components/TagGroup.js.map +1 -0
- package/dist/components/TimeField.d.ts +72 -0
- package/dist/components/TimeField.d.ts.map +1 -0
- package/dist/components/TimeField.js +102 -0
- package/dist/components/TimeField.js.map +1 -0
- package/dist/components/index.d.ts +14 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +6 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/iso-time.d.ts +23 -0
- package/dist/components/iso-time.d.ts.map +1 -0
- package/dist/components/iso-time.js +34 -0
- package/dist/components/iso-time.js.map +1 -0
- package/dist/components/shortcut.d.ts +19 -0
- package/dist/components/shortcut.d.ts.map +1 -0
- package/dist/components/shortcut.js +122 -0
- package/dist/components/shortcut.js.map +1 -0
- package/dist/components/use-table-sort.d.ts +38 -0
- package/dist/components/use-table-sort.d.ts.map +1 -0
- package/dist/components/use-table-sort.js +33 -0
- package/dist/components/use-table-sort.js.map +1 -0
- package/dist/figma-descriptions.json +103 -68
- package/dist/figma-map.json +343 -2
- package/dist/meta/Card.json +153 -0
- package/dist/meta/Checkbox.json +2 -2
- package/dist/meta/CommandPalette.json +178 -0
- package/dist/meta/DatePicker.json +2 -2
- package/dist/meta/Kbd.json +97 -0
- package/dist/meta/Radio.json +2 -2
- package/dist/meta/RadioGroup.json +2 -2
- package/dist/meta/Table.json +4 -1
- package/dist/meta/TableBody.json +3 -0
- package/dist/meta/TableCell.json +49 -5
- package/dist/meta/TableHead.json +3 -0
- package/dist/meta/TableRow.json +3 -0
- package/dist/meta/Tag.json +54 -0
- package/dist/meta/TagGroup.json +211 -0
- package/dist/meta/TimeField.json +224 -0
- package/dist/meta/Toggle.json +2 -2
- package/dist/meta/components.json +1010 -36
- package/dist/meta/contrast.json +1133 -6
- package/dist/meta/index.json +86 -12
- package/dist/meta/patterns/DataTable.json +27 -3
- package/dist/meta/patterns/PageShell.json +15 -2
- package/dist/meta/patterns/index.json +7 -3
- package/dist/styles/agent-activity.css +4 -2
- package/dist/styles/approval-gate.css +4 -3
- package/dist/styles/card.css +75 -0
- package/dist/styles/citation.css +4 -2
- package/dist/styles/command-palette.css +250 -0
- package/dist/styles/confidence-indicator.css +2 -2
- package/dist/styles/index.css +5 -0
- package/dist/styles/kbd.css +47 -0
- package/dist/styles/streaming-text.css +3 -2
- package/dist/styles/table.css +51 -0
- package/dist/styles/tag-group.css +172 -0
- package/dist/styles/time-field.css +31 -0
- package/llms.txt +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "CommandPalette",
|
|
3
|
+
"source": "src/components/CommandPalette.tsx",
|
|
4
|
+
"propsType": "CommandPaletteProps",
|
|
5
|
+
"description": "CommandPalette — every action in the product, one search away.\n\n⌘K (Ctrl+K elsewhere) opens it from anywhere; typing filters; Enter runs.\nMount it once, near the root, and hand it every command the product has.\n\nWHY NOT A MODAL WITH A COMBOBOX IN IT\n\nA Combobox's list is a popover that opens and closes on its own rules, and\nit SELECTS a value that stays selected. A palette's list is always open and\neach row is RUN, once, and the palette goes away. The ARIA shape is the same\n— a combobox driving a listbox through `aria-activedescendant` — so this\nuses it, without the parts of Combobox that exist for choosing a value.\n\nNOT A NAVIGATION MENU\n\nEverything in the palette must also be reachable without it. It is a faster\nroute for people who know what they want, and a shortcut nobody told you\nabout is not a route at all.",
|
|
6
|
+
"import": "import { CommandPalette } from 'ionbase-ui';",
|
|
7
|
+
"status": "stable",
|
|
8
|
+
"since": "0.81.0",
|
|
9
|
+
"summary": "A searchable list of every command in the product, opened with ⌘K / Ctrl+K from anywhere, that runs the chosen command and closes.",
|
|
10
|
+
"useWhen": [
|
|
11
|
+
"the product has more actions and destinations than its navigation shows at once",
|
|
12
|
+
"people who use it daily want to reach anything without the pointer",
|
|
13
|
+
"mounted once, near the root, with every command the product has"
|
|
14
|
+
],
|
|
15
|
+
"useInstead": [
|
|
16
|
+
{
|
|
17
|
+
"when": "the user picks a value that stays chosen — an assignee, a country",
|
|
18
|
+
"use": "Combobox",
|
|
19
|
+
"why": "a combobox selects and keeps a value in a form; a palette runs a command once and goes away"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"when": "a few actions belong to one object — a row's Edit, Duplicate, Delete",
|
|
23
|
+
"use": "Menu",
|
|
24
|
+
"why": "those actions belong beside the thing they act on, where people look for them"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"when": "the search is over records — agents, runs — shown as a page of results",
|
|
28
|
+
"use": "Input",
|
|
29
|
+
"why": "a filtered table is a page with its own URL, and a palette is gone the moment it is used"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"a11y": {
|
|
33
|
+
"role": "dialog",
|
|
34
|
+
"guarantees": [
|
|
35
|
+
"a modal dialog named by `label`: focus is trapped, the page behind is hidden from assistive tech, Escape and a scrim click close it, and focus returns to what had it",
|
|
36
|
+
"focus stays in the search field, a combobox whose always-open listbox is driven by aria-activedescendant — typing and choosing never compete for focus",
|
|
37
|
+
"sections are role=group, named by their heading",
|
|
38
|
+
"disabled commands are listed with aria-disabled, skipped by the arrow keys, and do nothing on click",
|
|
39
|
+
"the number of matches is announced through a polite live region as the query changes",
|
|
40
|
+
"`onAction` runs after the palette has closed and handed focus back, so an action that moves focus keeps it",
|
|
41
|
+
"shortcut hints are read as key names — \"Command Shift N\" — not as symbols"
|
|
42
|
+
],
|
|
43
|
+
"requires": [
|
|
44
|
+
"every command also reachable without the palette — it is a faster route, never the only one",
|
|
45
|
+
"a visible way to open it for people who do not know the shortcut, such as a header button showing the keys"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"antiPatterns": [
|
|
49
|
+
{
|
|
50
|
+
"dont": "showing a `shortcut` on a command without binding that shortcut yourself",
|
|
51
|
+
"why": "the palette displays a command's shortcut and does not listen for it; a hint for a key that does nothing is worse than no hint"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"dont": "moving focus from inside a command's handler by running it before closing, or wrapping onAction to close the palette first",
|
|
55
|
+
"why": "onAction already runs after close. While the dialog is mounted its focus scope pulls focus back to the search field"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"dont": "rendering <CommandPalette> only when a state flag is true",
|
|
59
|
+
"do": "mount it always and drive `isOpen`, or let it open itself on the shortcut",
|
|
60
|
+
"why": "unmounted, it cannot listen for ⌘K"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"dont": "labels that are nouns — \"Agents\", \"Dark mode\"",
|
|
64
|
+
"do": "start with a verb — \"Go to Agents\", \"Switch to dark theme\"",
|
|
65
|
+
"why": "a row says what pressing Enter will do; a noun leaves the reader guessing whether it opens, toggles or deletes"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"dont": "two palettes on one page, or a second listener for ⌘K",
|
|
69
|
+
"why": "both toggle on the same key press and cancel each other out"
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"slots": {
|
|
73
|
+
"emptyLabel": {
|
|
74
|
+
"expects": "what to show when nothing matches"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"stylesheet": "src/styles/command-palette.css",
|
|
78
|
+
"tokens": [
|
|
79
|
+
"--border-subtle",
|
|
80
|
+
"--border-width-default",
|
|
81
|
+
"--border-width-thick",
|
|
82
|
+
"--font-family-sans",
|
|
83
|
+
"--font-weight-medium",
|
|
84
|
+
"--icon-disabled",
|
|
85
|
+
"--icon-secondary",
|
|
86
|
+
"--icon-size-md",
|
|
87
|
+
"--icon-size-sm",
|
|
88
|
+
"--ion-shadow-shadow-xl",
|
|
89
|
+
"--radius-sm",
|
|
90
|
+
"--radius-xl",
|
|
91
|
+
"--spacing-12",
|
|
92
|
+
"--spacing-16",
|
|
93
|
+
"--spacing-2",
|
|
94
|
+
"--spacing-32",
|
|
95
|
+
"--spacing-4",
|
|
96
|
+
"--spacing-40",
|
|
97
|
+
"--spacing-48",
|
|
98
|
+
"--spacing-8",
|
|
99
|
+
"--spacing-96",
|
|
100
|
+
"--surface-hover",
|
|
101
|
+
"--surface-overlay",
|
|
102
|
+
"--surface-scrim",
|
|
103
|
+
"--text-default",
|
|
104
|
+
"--text-disabled",
|
|
105
|
+
"--text-tertiary",
|
|
106
|
+
"--type-body",
|
|
107
|
+
"--type-body-lg",
|
|
108
|
+
"--type-body-lg-line-height",
|
|
109
|
+
"--type-body-line-height",
|
|
110
|
+
"--type-body-sm",
|
|
111
|
+
"--type-body-sm-line-height",
|
|
112
|
+
"--type-caption",
|
|
113
|
+
"--type-caption-line-height"
|
|
114
|
+
],
|
|
115
|
+
"props": {
|
|
116
|
+
"commands": {
|
|
117
|
+
"type": "readonly CommandPaletteItem[]",
|
|
118
|
+
"required": true,
|
|
119
|
+
"origin": "own",
|
|
120
|
+
"description": "Every command. Filtering happens here, against what is typed."
|
|
121
|
+
},
|
|
122
|
+
"onAction": {
|
|
123
|
+
"type": "(id: string) => void",
|
|
124
|
+
"required": true,
|
|
125
|
+
"origin": "own",
|
|
126
|
+
"description": "Runs the chosen command. Called AFTER the palette has closed and handed\nfocus back, so an action that moves focus — to a search field, into a\nform — keeps it."
|
|
127
|
+
},
|
|
128
|
+
"isOpen": {
|
|
129
|
+
"type": "boolean | undefined",
|
|
130
|
+
"required": false,
|
|
131
|
+
"origin": "own"
|
|
132
|
+
},
|
|
133
|
+
"defaultOpen": {
|
|
134
|
+
"type": "boolean | undefined",
|
|
135
|
+
"required": false,
|
|
136
|
+
"origin": "own"
|
|
137
|
+
},
|
|
138
|
+
"onOpenChange": {
|
|
139
|
+
"type": "((isOpen: boolean) => void) | undefined",
|
|
140
|
+
"required": false,
|
|
141
|
+
"origin": "own"
|
|
142
|
+
},
|
|
143
|
+
"openShortcut": {
|
|
144
|
+
"type": "string | null | undefined",
|
|
145
|
+
"required": false,
|
|
146
|
+
"origin": "own",
|
|
147
|
+
"description": "The shortcut that opens it from anywhere on the page, and closes it again.\nDefaults to `mod+k` — ⌘K on a Mac, Ctrl+K elsewhere. `null` turns it off,\nfor a page that opens the palette some other way."
|
|
148
|
+
},
|
|
149
|
+
"label": {
|
|
150
|
+
"type": "string | undefined",
|
|
151
|
+
"required": false,
|
|
152
|
+
"origin": "own",
|
|
153
|
+
"description": "Names the dialog and the search field."
|
|
154
|
+
},
|
|
155
|
+
"placeholder": {
|
|
156
|
+
"type": "string | undefined",
|
|
157
|
+
"required": false,
|
|
158
|
+
"origin": "own"
|
|
159
|
+
},
|
|
160
|
+
"emptyLabel": {
|
|
161
|
+
"type": "React.ReactNode",
|
|
162
|
+
"required": false,
|
|
163
|
+
"origin": "own",
|
|
164
|
+
"description": "Shown in place of the list when nothing matches."
|
|
165
|
+
},
|
|
166
|
+
"className": {
|
|
167
|
+
"type": "string | undefined",
|
|
168
|
+
"required": false,
|
|
169
|
+
"origin": "own"
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"propCounts": {
|
|
173
|
+
"own": 10,
|
|
174
|
+
"aria": 0,
|
|
175
|
+
"dom": 0,
|
|
176
|
+
"other": 0
|
|
177
|
+
}
|
|
178
|
+
}
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
"when": "a time of day is part of the value",
|
|
32
|
-
"use": "
|
|
33
|
-
"why": "this picker is fixed to day granularity; a
|
|
32
|
+
"use": "TimeField",
|
|
33
|
+
"why": "this picker is fixed to day granularity; put a TimeField beside it — the two share one box and one set of states"
|
|
34
34
|
}
|
|
35
35
|
],
|
|
36
36
|
"variants": {
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Kbd",
|
|
3
|
+
"source": "src/components/Kbd.tsx",
|
|
4
|
+
"propsType": "KbdProps",
|
|
5
|
+
"description": "Kbd — a key, or a keyboard shortcut, as printed on the keyboard.\n\n`<kbd>` is the element HTML has for this, and a combination is a `<kbd>` of\n`<kbd>`s — the spec's own shape for \"press these together\".\n\nWHAT A SCREEN READER HEARS\n\nThe symbols do not survive being read aloud: VoiceOver says \"⌘\" as \"place of\ninterest sign\" in some voices and \"⇧\" as \"upwards white arrow\". So a\nshortcut's drawn keys are hidden and a visually hidden copy spells them out\n— \"Command K\", \"Control Shift P\".",
|
|
6
|
+
"import": "import { Kbd } from 'ionbase-ui';",
|
|
7
|
+
"status": "stable",
|
|
8
|
+
"since": "0.81.0",
|
|
9
|
+
"summary": "A key, or a keyboard shortcut, drawn as keycaps in the reader's platform's own symbols and read aloud by name.",
|
|
10
|
+
"useWhen": [
|
|
11
|
+
"telling people a shortcut exists — beside a button, in a tooltip, in a command palette row",
|
|
12
|
+
"instructions that name a key: \"press Esc to cancel\""
|
|
13
|
+
],
|
|
14
|
+
"useInstead": [
|
|
15
|
+
{
|
|
16
|
+
"when": "the text is code, a file name or a value",
|
|
17
|
+
"use": "render it directly",
|
|
18
|
+
"why": "Kbd means keys to press; `<code>` is the element for code"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"a11y": {
|
|
22
|
+
"guarantees": [
|
|
23
|
+
"a combination is a <kbd> of <kbd>s, the HTML spec's shape for keys pressed together",
|
|
24
|
+
"the drawn symbols are hidden and a visually hidden copy spells the keys out — \"Command K\", \"Control Shift P\" — because ⌘ and ⇧ are read as symbol names or not at all",
|
|
25
|
+
"`mod` resolves to ⌘ on Apple platforms and Ctrl elsewhere; server rendering shows Ctrl and corrects after hydration without a mismatch"
|
|
26
|
+
],
|
|
27
|
+
"requires": [
|
|
28
|
+
"the shortcut to be bound somewhere — Kbd shows a key, it does not listen for one"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"antiPatterns": [
|
|
32
|
+
{
|
|
33
|
+
"dont": "writing `ctrl+k` or `cmd+k` for the platform's command key",
|
|
34
|
+
"do": "write `mod+k`",
|
|
35
|
+
"why": "`ctrl` shows a Mac user a key they do not press for it; `cmd` shows everyone else a key they do not have"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"dont": "children like \"⌘K\" or \"Ctrl+K\"",
|
|
39
|
+
"do": "`shortcut=\"mod+k\"`",
|
|
40
|
+
"why": "hand-typed symbols are wrong on the other platform and are read aloud as symbol names"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"dont": "setting `platform`",
|
|
44
|
+
"why": "it overrides detection, so half the readers see the other platform's keys; it exists for docs that compare the two"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"stylesheet": "src/styles/kbd.css",
|
|
48
|
+
"tokens": [
|
|
49
|
+
"--border-default",
|
|
50
|
+
"--border-width-default",
|
|
51
|
+
"--font-family-sans",
|
|
52
|
+
"--font-weight-medium",
|
|
53
|
+
"--radius-xs",
|
|
54
|
+
"--spacing-2",
|
|
55
|
+
"--spacing-20",
|
|
56
|
+
"--spacing-4",
|
|
57
|
+
"--surface-subtle",
|
|
58
|
+
"--text-secondary",
|
|
59
|
+
"--type-caption",
|
|
60
|
+
"--type-caption-line-height"
|
|
61
|
+
],
|
|
62
|
+
"props": {
|
|
63
|
+
"shortcut": {
|
|
64
|
+
"type": "string | undefined",
|
|
65
|
+
"required": false,
|
|
66
|
+
"origin": "own",
|
|
67
|
+
"description": "A whole shortcut, `+`-joined: `mod+k`, `mod+shift+p`, `esc`. `mod` is ⌘\non a Mac and Ctrl elsewhere, so write `mod` rather than guessing. Drawn as\none key per part, in the platform's order."
|
|
68
|
+
},
|
|
69
|
+
"children": {
|
|
70
|
+
"type": "React.ReactNode",
|
|
71
|
+
"required": false,
|
|
72
|
+
"origin": "own",
|
|
73
|
+
"description": "One key, as printed: `K`, `Esc`, `/`. Use `shortcut` for a combination."
|
|
74
|
+
},
|
|
75
|
+
"platform": {
|
|
76
|
+
"type": "KbdPlatform | undefined",
|
|
77
|
+
"required": false,
|
|
78
|
+
"origin": "own",
|
|
79
|
+
"description": "Leave it out: the reader's platform is detected. Set it only to show a\nspecific platform's keys — a docs page comparing the two.",
|
|
80
|
+
"values": [
|
|
81
|
+
"mac",
|
|
82
|
+
"other"
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
"className": {
|
|
86
|
+
"type": "string | undefined",
|
|
87
|
+
"required": false,
|
|
88
|
+
"origin": "own"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"propCounts": {
|
|
92
|
+
"own": 4,
|
|
93
|
+
"aria": 0,
|
|
94
|
+
"dom": 0,
|
|
95
|
+
"other": 0
|
|
96
|
+
}
|
|
97
|
+
}
|
package/dist/meta/Radio.json
CHANGED
package/dist/meta/Table.json
CHANGED
|
@@ -86,6 +86,7 @@
|
|
|
86
86
|
"--font-family-sans",
|
|
87
87
|
"--font-weight-medium",
|
|
88
88
|
"--font-weight-regular",
|
|
89
|
+
"--icon-default",
|
|
89
90
|
"--icon-interactive",
|
|
90
91
|
"--icon-secondary",
|
|
91
92
|
"--icon-size-sm",
|
|
@@ -93,6 +94,8 @@
|
|
|
93
94
|
"--ion-duration-base",
|
|
94
95
|
"--ion-ease-out",
|
|
95
96
|
"--radius-md",
|
|
97
|
+
"--radius-xs",
|
|
98
|
+
"--ring-focus",
|
|
96
99
|
"--spacing-16",
|
|
97
100
|
"--spacing-20",
|
|
98
101
|
"--spacing-6",
|
|
@@ -114,8 +117,8 @@
|
|
|
114
117
|
"origin": "own",
|
|
115
118
|
"description": "Matches Figma's `Density` variant on `Table Cell` / `Table Row`.",
|
|
116
119
|
"values": [
|
|
117
|
-
"compact",
|
|
118
120
|
"default",
|
|
121
|
+
"compact",
|
|
119
122
|
"relaxed"
|
|
120
123
|
]
|
|
121
124
|
},
|
package/dist/meta/TableBody.json
CHANGED
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"--font-family-sans",
|
|
49
49
|
"--font-weight-medium",
|
|
50
50
|
"--font-weight-regular",
|
|
51
|
+
"--icon-default",
|
|
51
52
|
"--icon-interactive",
|
|
52
53
|
"--icon-secondary",
|
|
53
54
|
"--icon-size-sm",
|
|
@@ -55,6 +56,8 @@
|
|
|
55
56
|
"--ion-duration-base",
|
|
56
57
|
"--ion-ease-out",
|
|
57
58
|
"--radius-md",
|
|
59
|
+
"--radius-xs",
|
|
60
|
+
"--ring-focus",
|
|
58
61
|
"--spacing-16",
|
|
59
62
|
"--spacing-20",
|
|
60
63
|
"--spacing-6",
|
package/dist/meta/TableCell.json
CHANGED
|
@@ -49,6 +49,17 @@
|
|
|
49
49
|
"link": {
|
|
50
50
|
"use": "recolours the content to `text/link` / `icon/primary` for a cell whose content navigates"
|
|
51
51
|
}
|
|
52
|
+
},
|
|
53
|
+
"sortDirection": {
|
|
54
|
+
"ascending": {
|
|
55
|
+
"use": "the column the rows are sorted by, smallest or earliest first"
|
|
56
|
+
},
|
|
57
|
+
"descending": {
|
|
58
|
+
"use": "the column the rows are sorted by, largest or newest first"
|
|
59
|
+
},
|
|
60
|
+
"none": {
|
|
61
|
+
"use": "a column that can be sorted but is not the current sort — it shows the neutral indicator"
|
|
62
|
+
}
|
|
52
63
|
}
|
|
53
64
|
},
|
|
54
65
|
"slots": {
|
|
@@ -67,10 +78,15 @@
|
|
|
67
78
|
"a11y": {
|
|
68
79
|
"guarantees": [
|
|
69
80
|
"`scope` is inferred when omitted — `col` in TableHead, `row` in TableBody — and can be set explicitly when the inference is wrong",
|
|
70
|
-
"`header` decides the element directly rather than a `type` prop that could disagree with where the cell sits"
|
|
81
|
+
"`header` decides the element directly rather than a `type` prop that could disagree with where the cell sits",
|
|
82
|
+
"a sortable header renders a real <button> inside the <th>, so it is focusable and answers Enter and Space, and the header keeps its column-header role",
|
|
83
|
+
"`aria-sort` is set on the sorted header only, never `none` on the rest"
|
|
71
84
|
],
|
|
72
85
|
"requires": [
|
|
73
86
|
"`scope=\"col\"` on header cells — inferred inside TableHead, but explicit for a header rendered outside it"
|
|
87
|
+
],
|
|
88
|
+
"notes": [
|
|
89
|
+
"`useTableSort` returns `sortDirection` and `onSort` for each column. The table never reorders rows itself: they may be one page of a server's thousands."
|
|
74
90
|
]
|
|
75
91
|
},
|
|
76
92
|
"antiPatterns": [
|
|
@@ -85,6 +101,14 @@
|
|
|
85
101
|
{
|
|
86
102
|
"dont": "`showDivider` on every cell",
|
|
87
103
|
"why": "it is a column rule, not a row rule — on every cell it becomes a grid"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"dont": "`onSort` on a header without `sortDirection`",
|
|
107
|
+
"why": "the cell stays plain text, so nothing can be clicked; `sortDirection` is what makes it a sort control — pass `none` for an unsorted column"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"dont": "`trailingIcon` on a sortable header",
|
|
111
|
+
"why": "the sort indicator takes the trailing slot; the icon is not rendered"
|
|
88
112
|
}
|
|
89
113
|
],
|
|
90
114
|
"stylesheet": "src/styles/table.css",
|
|
@@ -96,6 +120,7 @@
|
|
|
96
120
|
"--font-family-sans",
|
|
97
121
|
"--font-weight-medium",
|
|
98
122
|
"--font-weight-regular",
|
|
123
|
+
"--icon-default",
|
|
99
124
|
"--icon-interactive",
|
|
100
125
|
"--icon-secondary",
|
|
101
126
|
"--icon-size-sm",
|
|
@@ -103,6 +128,8 @@
|
|
|
103
128
|
"--ion-duration-base",
|
|
104
129
|
"--ion-ease-out",
|
|
105
130
|
"--radius-md",
|
|
131
|
+
"--radius-xs",
|
|
132
|
+
"--ring-focus",
|
|
106
133
|
"--spacing-16",
|
|
107
134
|
"--spacing-20",
|
|
108
135
|
"--spacing-6",
|
|
@@ -147,13 +174,13 @@
|
|
|
147
174
|
]
|
|
148
175
|
},
|
|
149
176
|
"variant": {
|
|
150
|
-
"type": "\"
|
|
177
|
+
"type": "\"default\" | \"link\" | undefined",
|
|
151
178
|
"required": false,
|
|
152
179
|
"origin": "own",
|
|
153
180
|
"description": "Figma's `Type=Link` — recolours the content to `text/link` /\n`icon/primary` rather than the body defaults.",
|
|
154
181
|
"values": [
|
|
155
|
-
"
|
|
156
|
-
"
|
|
182
|
+
"default",
|
|
183
|
+
"link"
|
|
157
184
|
]
|
|
158
185
|
},
|
|
159
186
|
"showDivider": {
|
|
@@ -173,6 +200,23 @@
|
|
|
173
200
|
"required": false,
|
|
174
201
|
"origin": "own"
|
|
175
202
|
},
|
|
203
|
+
"sortDirection": {
|
|
204
|
+
"type": "TableSortDirection | undefined",
|
|
205
|
+
"required": false,
|
|
206
|
+
"origin": "own",
|
|
207
|
+
"description": "Makes a header cell a sort control. Set it on every sortable column:\n`ascending` or `descending` on the one the rows are sorted by, `none` on\nthe rest. Header cells only — ignored on a body cell. `useTableSort`\nreturns this and `onSort` for each column.",
|
|
208
|
+
"values": [
|
|
209
|
+
"none",
|
|
210
|
+
"ascending",
|
|
211
|
+
"descending"
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
"onSort": {
|
|
215
|
+
"type": "(() => void) | undefined",
|
|
216
|
+
"required": false,
|
|
217
|
+
"origin": "own",
|
|
218
|
+
"description": "Called when the header is activated. The table does not reorder rows:\nsorting is the caller's, since only it knows whether the data is local\nor paged from a server."
|
|
219
|
+
},
|
|
176
220
|
"children": {
|
|
177
221
|
"type": "React.ReactNode",
|
|
178
222
|
"required": false,
|
|
@@ -180,7 +224,7 @@
|
|
|
180
224
|
}
|
|
181
225
|
},
|
|
182
226
|
"propCounts": {
|
|
183
|
-
"own":
|
|
227
|
+
"own": 10,
|
|
184
228
|
"aria": 0,
|
|
185
229
|
"dom": 284,
|
|
186
230
|
"other": 0
|
package/dist/meta/TableHead.json
CHANGED
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"--font-family-sans",
|
|
52
52
|
"--font-weight-medium",
|
|
53
53
|
"--font-weight-regular",
|
|
54
|
+
"--icon-default",
|
|
54
55
|
"--icon-interactive",
|
|
55
56
|
"--icon-secondary",
|
|
56
57
|
"--icon-size-sm",
|
|
@@ -58,6 +59,8 @@
|
|
|
58
59
|
"--ion-duration-base",
|
|
59
60
|
"--ion-ease-out",
|
|
60
61
|
"--radius-md",
|
|
62
|
+
"--radius-xs",
|
|
63
|
+
"--ring-focus",
|
|
61
64
|
"--spacing-16",
|
|
62
65
|
"--spacing-20",
|
|
63
66
|
"--spacing-6",
|
package/dist/meta/TableRow.json
CHANGED
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"--font-family-sans",
|
|
59
59
|
"--font-weight-medium",
|
|
60
60
|
"--font-weight-regular",
|
|
61
|
+
"--icon-default",
|
|
61
62
|
"--icon-interactive",
|
|
62
63
|
"--icon-secondary",
|
|
63
64
|
"--icon-size-sm",
|
|
@@ -65,6 +66,8 @@
|
|
|
65
66
|
"--ion-duration-base",
|
|
66
67
|
"--ion-ease-out",
|
|
67
68
|
"--radius-md",
|
|
69
|
+
"--radius-xs",
|
|
70
|
+
"--ring-focus",
|
|
68
71
|
"--spacing-16",
|
|
69
72
|
"--spacing-20",
|
|
70
73
|
"--spacing-6",
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Tag",
|
|
3
|
+
"source": "../../node_modules/.pnpm/react-stately@3.48.0_react@19.2.8/node_modules/react-stately/dist/types/src/collections/Item.d.ts",
|
|
4
|
+
"propsType": null,
|
|
5
|
+
"import": "import { Tag } from 'ionbase-ui';",
|
|
6
|
+
"status": "stable",
|
|
7
|
+
"since": "0.79.0",
|
|
8
|
+
"summary": "One tag in a TagGroup. Re-exported from react-stately's collection Item — `key` identifies it, children are its label.",
|
|
9
|
+
"useWhen": [
|
|
10
|
+
"a child of TagGroup — it is not usable anywhere else"
|
|
11
|
+
],
|
|
12
|
+
"useInstead": [
|
|
13
|
+
{
|
|
14
|
+
"when": "it is a status label on its own",
|
|
15
|
+
"use": "Badge"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"composition": {
|
|
19
|
+
"order": [
|
|
20
|
+
"TagGroup",
|
|
21
|
+
"Tag"
|
|
22
|
+
],
|
|
23
|
+
"note": "A collection item, not a rendered component: TagGroup reads it to build the collection, so it never appears in the DOM itself. That is why it exposes no props of its own here — `key` and `textValue` are the collection's API.",
|
|
24
|
+
"example": "<Tag key=\"team:finance\">Team: Finance</Tag>"
|
|
25
|
+
},
|
|
26
|
+
"a11y": {
|
|
27
|
+
"guarantees": [
|
|
28
|
+
"the row, cell and remove-button roles and names are supplied by TagGroup, not by this element"
|
|
29
|
+
],
|
|
30
|
+
"requires": [
|
|
31
|
+
"a stable `key` — it is what `onRemove` hands back",
|
|
32
|
+
"`textValue` when the label is not plain text, so type-ahead and the remove button's name have words to use"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"antiPatterns": [
|
|
36
|
+
{
|
|
37
|
+
"dont": "array indexes as keys in a list that shrinks",
|
|
38
|
+
"why": "removing the first tag renumbers the rest, and the next removal drops the wrong one"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"dont": "wrapping Tag in a <div> or a fragment inside TagGroup",
|
|
42
|
+
"why": "TagGroup reads the collection from its direct children; a wrapper makes the tag invisible to it"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"stylesheet": null,
|
|
46
|
+
"tokens": [],
|
|
47
|
+
"props": {},
|
|
48
|
+
"propCounts": {
|
|
49
|
+
"own": 0,
|
|
50
|
+
"aria": 0,
|
|
51
|
+
"dom": 0,
|
|
52
|
+
"other": 0
|
|
53
|
+
}
|
|
54
|
+
}
|