ionbase-ui 0.16.0 → 0.18.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/README.md +71 -7
- package/dist/meta/Alert.json +269 -0
- package/dist/meta/Avatar.json +97 -0
- package/dist/meta/AvatarGroup.json +82 -0
- package/dist/meta/Badge.json +83 -0
- package/dist/meta/Button.json +556 -0
- package/dist/meta/Checkbox.json +113 -0
- package/dist/meta/Divider.json +30 -0
- package/dist/meta/FullCard.json +97 -0
- package/dist/meta/Header.json +91 -0
- package/dist/meta/Icon.json +35 -0
- package/dist/meta/Input.json +558 -0
- package/dist/meta/Link.json +239 -0
- package/dist/meta/Logo.json +46 -0
- package/dist/meta/LogoMark.json +41 -0
- package/dist/meta/Menu.json +50 -0
- package/dist/meta/MenuItem.json +75 -0
- package/dist/meta/Modal.json +241 -0
- package/dist/meta/NavItem.json +76 -0
- package/dist/meta/PhoneInput.json +472 -0
- package/dist/meta/Popover.json +124 -0
- package/dist/meta/Radio.json +104 -0
- package/dist/meta/RadioGroup.json +126 -0
- package/dist/meta/ScrollProgress.json +63 -0
- package/dist/meta/Select.json +195 -0
- package/dist/meta/TabItem.json +15 -0
- package/dist/meta/Table.json +135 -0
- package/dist/meta/TableBody.json +43 -0
- package/dist/meta/TableCell.json +105 -0
- package/dist/meta/TableHead.json +43 -0
- package/dist/meta/TableRow.json +56 -0
- package/dist/meta/Tabs.json +186 -0
- package/dist/meta/Toast.json +105 -0
- package/dist/meta/ToastProvider.json +75 -0
- package/dist/meta/Toggle.json +102 -0
- package/dist/meta/Tooltip.json +78 -0
- package/dist/meta/components.json +4816 -0
- package/dist/meta/contrast.json +3608 -0
- package/dist/meta/index.json +479 -0
- package/dist/styles/alert.css +10 -5
- package/dist/styles/tokens/base.css +25 -25
- package/dist/styles/tokens/theme-dark.css +11 -11
- package/dist/tokens/index.d.ts +8 -8
- package/dist/tokens/index.js +8 -8
- package/eslint-plugin/index.js +64 -0
- package/eslint-plugin/meta-data.js +66 -0
- package/eslint-plugin/rules/needs-accessible-name.js +88 -0
- package/eslint-plugin/rules/no-deprecated-props.js +74 -0
- package/eslint-plugin/rules/no-known-contrast-failure.js +75 -0
- package/eslint-plugin/rules/no-raw-style-values.js +107 -0
- package/eslint-plugin/rules/one-primary-action.js +128 -0
- package/package.json +33 -7
- package/stylelint-config.js +144 -0
|
@@ -0,0 +1,472 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "PhoneInput",
|
|
3
|
+
"source": "src/components/PhoneInput.tsx",
|
|
4
|
+
"propsType": "PhoneInputProps",
|
|
5
|
+
"description": "PhoneInput — Figma `Input/Phone` (80:372).\n\nA dial-code block butted against an Input, sharing one outline: the block\ncarries the left radii and the control the right, so the seam is square on\nboth sides and reads as a single control. Both keep their full 1px border,\nwhich is what Figma draws — the 2px seam is the two strokes meeting, not an\naccident.\n\nThree sizes, no State axis. Every interaction state is the Input's, reached\nthrough the ordinary props, because Figma composes this from the same `Input`\ninstance rather than redrawing it.\n\nWHAT THIS DELIBERATELY DOES NOT DO\n\nIt does not pick countries. The chevron implies a menu and Figma specifies no\nopen state for it — no list, no flags, no search, no selected state. Country\ndata and the picker are application concerns with real editorial weight (which\nterritories, which names, which order), and inventing them here would be\ndesigning rather than implementing.\n\nSo the trigger is a real `<button>` with an accessible name, and\n`countryButtonProps` is how you wire it to a `Menu`, a popover or your own\nlistbox — including the `aria-haspopup` and `aria-expanded` that only the\nthing owning the popup can set honestly.",
|
|
6
|
+
"import": "import { PhoneInput } from 'ionbase-ui';",
|
|
7
|
+
"stylesheet": "src/styles/phone-input.css",
|
|
8
|
+
"tokens": [
|
|
9
|
+
"--border-default",
|
|
10
|
+
"--border-disabled",
|
|
11
|
+
"--border-focus",
|
|
12
|
+
"--border-strong",
|
|
13
|
+
"--border-width-default",
|
|
14
|
+
"--border-width-thick",
|
|
15
|
+
"--font-family-sans",
|
|
16
|
+
"--font-weight-regular",
|
|
17
|
+
"--icon-disabled",
|
|
18
|
+
"--icon-size-md",
|
|
19
|
+
"--icon-size-sm",
|
|
20
|
+
"--icon-tertiary",
|
|
21
|
+
"--ion-duration-base",
|
|
22
|
+
"--ion-ease-out",
|
|
23
|
+
"--ion-phone-input-border-width",
|
|
24
|
+
"--ion-phone-input-font-size",
|
|
25
|
+
"--ion-phone-input-gap",
|
|
26
|
+
"--ion-phone-input-icon-size",
|
|
27
|
+
"--ion-phone-input-line-height",
|
|
28
|
+
"--ion-phone-input-padding-x",
|
|
29
|
+
"--ion-phone-input-radius",
|
|
30
|
+
"--radius-md",
|
|
31
|
+
"--radius-sm",
|
|
32
|
+
"--spacing-12",
|
|
33
|
+
"--spacing-16",
|
|
34
|
+
"--spacing-4",
|
|
35
|
+
"--surface-disabled",
|
|
36
|
+
"--surface-page",
|
|
37
|
+
"--text-disabled",
|
|
38
|
+
"--text-secondary",
|
|
39
|
+
"--type-body",
|
|
40
|
+
"--type-body-line-height",
|
|
41
|
+
"--type-body-sm",
|
|
42
|
+
"--type-body-sm-line-height"
|
|
43
|
+
],
|
|
44
|
+
"props": {
|
|
45
|
+
"dialCode": {
|
|
46
|
+
"type": "string | undefined",
|
|
47
|
+
"required": false,
|
|
48
|
+
"origin": "own",
|
|
49
|
+
"description": "The dial code shown in the leading block, e.g. `+1`.",
|
|
50
|
+
"default": "+1"
|
|
51
|
+
},
|
|
52
|
+
"countryLabel": {
|
|
53
|
+
"type": "string | undefined",
|
|
54
|
+
"required": false,
|
|
55
|
+
"origin": "own",
|
|
56
|
+
"description": "Accessible name for the dial-code trigger. It shows only `+1`, which names\na value rather than an action, so the button needs a label of its own.",
|
|
57
|
+
"default": "Select country calling code"
|
|
58
|
+
},
|
|
59
|
+
"countryButtonProps": {
|
|
60
|
+
"type": "React.ButtonHTMLAttributes<HTMLButtonElement> | undefined",
|
|
61
|
+
"required": false,
|
|
62
|
+
"origin": "own",
|
|
63
|
+
"description": "Spread onto the dial-code `<button>`. This is how a country picker gets\nattached — see the note on scope below."
|
|
64
|
+
},
|
|
65
|
+
"defaultValue": {
|
|
66
|
+
"type": "string | undefined",
|
|
67
|
+
"required": false,
|
|
68
|
+
"origin": "aria",
|
|
69
|
+
"description": "The default value (uncontrolled)."
|
|
70
|
+
},
|
|
71
|
+
"autoCapitalize": {
|
|
72
|
+
"type": "\"none\" | \"off\" | \"on\" | \"sentences\" | \"words\" | \"characters\" | undefined",
|
|
73
|
+
"required": false,
|
|
74
|
+
"origin": "own",
|
|
75
|
+
"description": "Narrower than React's own typing, which also allows any `string`.\n`autoCapitalize` is declared on `AriaTextFieldOptions` rather than\n`AriaTextFieldProps`, so `keyof AriaTextFieldProps` above cannot omit it —\nand the wide DOM version does not satisfy what `useTextField` accepts.",
|
|
76
|
+
"values": [
|
|
77
|
+
"none",
|
|
78
|
+
"off",
|
|
79
|
+
"on",
|
|
80
|
+
"sentences",
|
|
81
|
+
"words",
|
|
82
|
+
"characters"
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
"autoFocus": {
|
|
86
|
+
"type": "boolean | undefined",
|
|
87
|
+
"required": false,
|
|
88
|
+
"origin": "aria",
|
|
89
|
+
"description": "Whether the element should receive focus on render."
|
|
90
|
+
},
|
|
91
|
+
"className": {
|
|
92
|
+
"type": "string | undefined",
|
|
93
|
+
"required": false,
|
|
94
|
+
"origin": "own",
|
|
95
|
+
"description": "Class names for the control box (`.ion-input`). Always lands here —\nnever on the form-field wrapper. Use `wrapperClassName` for that."
|
|
96
|
+
},
|
|
97
|
+
"enterKeyHint": {
|
|
98
|
+
"type": "\"enter\" | \"done\" | \"go\" | \"next\" | \"previous\" | \"search\" | \"send\" | undefined",
|
|
99
|
+
"required": false,
|
|
100
|
+
"origin": "aria",
|
|
101
|
+
"description": "An enumerated attribute that defines what action label or icon to preset for the enter key on\nvirtual keyboards. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint).",
|
|
102
|
+
"values": [
|
|
103
|
+
"enter",
|
|
104
|
+
"done",
|
|
105
|
+
"go",
|
|
106
|
+
"next",
|
|
107
|
+
"previous",
|
|
108
|
+
"search",
|
|
109
|
+
"send"
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
"id": {
|
|
113
|
+
"type": "string | undefined",
|
|
114
|
+
"required": false,
|
|
115
|
+
"origin": "aria",
|
|
116
|
+
"description": "The element's unique identifier. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id)."
|
|
117
|
+
},
|
|
118
|
+
"spellCheck": {
|
|
119
|
+
"type": "string | undefined",
|
|
120
|
+
"required": false,
|
|
121
|
+
"origin": "aria",
|
|
122
|
+
"description": "An enumerated attribute that defines whether the element may be checked for spelling errors.\nSee [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck)."
|
|
123
|
+
},
|
|
124
|
+
"autoCorrect": {
|
|
125
|
+
"type": "string | undefined",
|
|
126
|
+
"required": false,
|
|
127
|
+
"origin": "aria",
|
|
128
|
+
"description": "An attribute that takes as its value a space-separated string that describes what, if any, type\nof autocomplete functionality the input should provide. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#autocomplete)."
|
|
129
|
+
},
|
|
130
|
+
"inputMode": {
|
|
131
|
+
"type": "\"none\" | \"search\" | \"text\" | \"url\" | \"tel\" | \"email\" | \"numeric\" | \"decimal\" | undefined",
|
|
132
|
+
"required": false,
|
|
133
|
+
"origin": "aria",
|
|
134
|
+
"description": "Hints at the type of data that might be entered by the user while editing the element or its\ncontents. See\n[MDN](https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute).",
|
|
135
|
+
"values": [
|
|
136
|
+
"none",
|
|
137
|
+
"search",
|
|
138
|
+
"text",
|
|
139
|
+
"url",
|
|
140
|
+
"tel",
|
|
141
|
+
"email",
|
|
142
|
+
"numeric",
|
|
143
|
+
"decimal"
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
"aria-activedescendant": {
|
|
147
|
+
"type": "string | undefined",
|
|
148
|
+
"required": false,
|
|
149
|
+
"origin": "aria",
|
|
150
|
+
"description": "Identifies the currently active element when DOM focus is on a composite widget, textbox,\ngroup, or application."
|
|
151
|
+
},
|
|
152
|
+
"aria-autocomplete": {
|
|
153
|
+
"type": "\"inline\" | \"list\" | \"none\" | \"both\" | undefined",
|
|
154
|
+
"required": false,
|
|
155
|
+
"origin": "aria",
|
|
156
|
+
"description": "Indicates whether inputting text could trigger display of one or more predictions of the user's\nintended value for an input and specifies how predictions would be presented if they are made.",
|
|
157
|
+
"values": [
|
|
158
|
+
"inline",
|
|
159
|
+
"list",
|
|
160
|
+
"none",
|
|
161
|
+
"both"
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
"aria-controls": {
|
|
165
|
+
"type": "string | undefined",
|
|
166
|
+
"required": false,
|
|
167
|
+
"origin": "aria",
|
|
168
|
+
"description": "Identifies the element (or elements) whose contents or presence are controlled by the current\nelement."
|
|
169
|
+
},
|
|
170
|
+
"aria-describedby": {
|
|
171
|
+
"type": "string | undefined",
|
|
172
|
+
"required": false,
|
|
173
|
+
"origin": "aria",
|
|
174
|
+
"description": "Identifies the element (or elements) that describes the object."
|
|
175
|
+
},
|
|
176
|
+
"aria-details": {
|
|
177
|
+
"type": "string | undefined",
|
|
178
|
+
"required": false,
|
|
179
|
+
"origin": "aria",
|
|
180
|
+
"description": "Identifies the element (or elements) that provide a detailed, extended description for the\nobject."
|
|
181
|
+
},
|
|
182
|
+
"aria-errormessage": {
|
|
183
|
+
"type": "string | undefined",
|
|
184
|
+
"required": false,
|
|
185
|
+
"origin": "aria",
|
|
186
|
+
"description": "Identifies the element that provides an error message for the object."
|
|
187
|
+
},
|
|
188
|
+
"aria-haspopup": {
|
|
189
|
+
"type": "boolean | \"true\" | \"false\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\" | undefined",
|
|
190
|
+
"required": false,
|
|
191
|
+
"origin": "aria",
|
|
192
|
+
"description": "Indicates the availability and type of interactive popup element, such as menu or dialog, that\ncan be triggered by an element."
|
|
193
|
+
},
|
|
194
|
+
"aria-label": {
|
|
195
|
+
"type": "string | undefined",
|
|
196
|
+
"required": false,
|
|
197
|
+
"origin": "aria",
|
|
198
|
+
"description": "Defines a string value that labels the current element."
|
|
199
|
+
},
|
|
200
|
+
"aria-labelledby": {
|
|
201
|
+
"type": "string | undefined",
|
|
202
|
+
"required": false,
|
|
203
|
+
"origin": "aria",
|
|
204
|
+
"description": "Identifies the element (or elements) that labels the current element."
|
|
205
|
+
},
|
|
206
|
+
"onCopy": {
|
|
207
|
+
"type": "ClipboardEventHandler<HTMLInputElement> | undefined",
|
|
208
|
+
"required": false,
|
|
209
|
+
"origin": "aria",
|
|
210
|
+
"description": "Handler that is called when the user copies text. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/oncopy)."
|
|
211
|
+
},
|
|
212
|
+
"onCut": {
|
|
213
|
+
"type": "ClipboardEventHandler<HTMLInputElement> | undefined",
|
|
214
|
+
"required": false,
|
|
215
|
+
"origin": "aria",
|
|
216
|
+
"description": "Handler that is called when the user cuts text. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/oncut)."
|
|
217
|
+
},
|
|
218
|
+
"onPaste": {
|
|
219
|
+
"type": "ClipboardEventHandler<HTMLInputElement> | undefined",
|
|
220
|
+
"required": false,
|
|
221
|
+
"origin": "aria",
|
|
222
|
+
"description": "Handler that is called when the user pastes text. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/onpaste)."
|
|
223
|
+
},
|
|
224
|
+
"onCompositionEnd": {
|
|
225
|
+
"type": "CompositionEventHandler<HTMLInputElement> | undefined",
|
|
226
|
+
"required": false,
|
|
227
|
+
"origin": "aria",
|
|
228
|
+
"description": "Handler that is called when a text composition system completes or cancels the current text\ncomposition session. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/API/Element/compositionend_event)."
|
|
229
|
+
},
|
|
230
|
+
"onCompositionStart": {
|
|
231
|
+
"type": "CompositionEventHandler<HTMLInputElement> | undefined",
|
|
232
|
+
"required": false,
|
|
233
|
+
"origin": "aria",
|
|
234
|
+
"description": "Handler that is called when a text composition system starts a new text composition session.\nSee [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Element/compositionstart_event)."
|
|
235
|
+
},
|
|
236
|
+
"onCompositionUpdate": {
|
|
237
|
+
"type": "CompositionEventHandler<HTMLInputElement> | undefined",
|
|
238
|
+
"required": false,
|
|
239
|
+
"origin": "aria",
|
|
240
|
+
"description": "Handler that is called when a new character is received in the current text composition\nsession. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/API/Element/compositionupdate_event)."
|
|
241
|
+
},
|
|
242
|
+
"onFocus": {
|
|
243
|
+
"type": "((e: FocusEvent<HTMLInputElement, Element>) => void) | undefined",
|
|
244
|
+
"required": false,
|
|
245
|
+
"origin": "aria",
|
|
246
|
+
"description": "Handler that is called when the element receives focus."
|
|
247
|
+
},
|
|
248
|
+
"onBlur": {
|
|
249
|
+
"type": "((e: FocusEvent<HTMLInputElement, Element>) => void) | undefined",
|
|
250
|
+
"required": false,
|
|
251
|
+
"origin": "aria",
|
|
252
|
+
"description": "Handler that is called when the element loses focus."
|
|
253
|
+
},
|
|
254
|
+
"onChange": {
|
|
255
|
+
"type": "((value: string) => void) | undefined",
|
|
256
|
+
"required": false,
|
|
257
|
+
"origin": "aria",
|
|
258
|
+
"description": "Handler that is called when the value changes."
|
|
259
|
+
},
|
|
260
|
+
"onBeforeInput": {
|
|
261
|
+
"type": "FormEventHandler<HTMLInputElement> | undefined",
|
|
262
|
+
"required": false,
|
|
263
|
+
"origin": "aria",
|
|
264
|
+
"description": "Handler that is called when the input value is about to be modified. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/beforeinput_event)."
|
|
265
|
+
},
|
|
266
|
+
"onInput": {
|
|
267
|
+
"type": "FormEventHandler<HTMLInputElement> | undefined",
|
|
268
|
+
"required": false,
|
|
269
|
+
"origin": "aria",
|
|
270
|
+
"description": "Handler that is called when the input value is modified. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event)."
|
|
271
|
+
},
|
|
272
|
+
"onKeyDown": {
|
|
273
|
+
"type": "((e: KeyboardEvent) => void) | undefined",
|
|
274
|
+
"required": false,
|
|
275
|
+
"origin": "aria",
|
|
276
|
+
"description": "Handler that is called when a key is pressed."
|
|
277
|
+
},
|
|
278
|
+
"onKeyUp": {
|
|
279
|
+
"type": "((e: KeyboardEvent) => void) | undefined",
|
|
280
|
+
"required": false,
|
|
281
|
+
"origin": "aria",
|
|
282
|
+
"description": "Handler that is called when a key is released."
|
|
283
|
+
},
|
|
284
|
+
"onSelect": {
|
|
285
|
+
"type": "ReactEventHandler<HTMLInputElement> | undefined",
|
|
286
|
+
"required": false,
|
|
287
|
+
"origin": "aria",
|
|
288
|
+
"description": "Handler that is called when text in the input is selected. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/API/Element/select_event)."
|
|
289
|
+
},
|
|
290
|
+
"size": {
|
|
291
|
+
"type": "InputSize | undefined",
|
|
292
|
+
"required": false,
|
|
293
|
+
"origin": "own",
|
|
294
|
+
"description": "Matches the Figma `Size` variant: Small, Medium, Large.",
|
|
295
|
+
"values": [
|
|
296
|
+
"sm",
|
|
297
|
+
"md",
|
|
298
|
+
"lg"
|
|
299
|
+
],
|
|
300
|
+
"default": "md"
|
|
301
|
+
},
|
|
302
|
+
"type": {
|
|
303
|
+
"type": "(string & {}) | \"search\" | \"text\" | \"url\" | \"tel\" | \"email\" | \"password\" | undefined",
|
|
304
|
+
"required": false,
|
|
305
|
+
"origin": "aria",
|
|
306
|
+
"description": "The type of input to render. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdeftype).",
|
|
307
|
+
"tags": {
|
|
308
|
+
"default": "'text'"
|
|
309
|
+
},
|
|
310
|
+
"default": "tel"
|
|
311
|
+
},
|
|
312
|
+
"autoComplete": {
|
|
313
|
+
"type": "string | undefined",
|
|
314
|
+
"required": false,
|
|
315
|
+
"origin": "aria",
|
|
316
|
+
"description": "Describes the type of autocomplete functionality the input should provide if any. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefautocomplete)."
|
|
317
|
+
},
|
|
318
|
+
"disabled": {
|
|
319
|
+
"type": "boolean | undefined",
|
|
320
|
+
"required": false,
|
|
321
|
+
"origin": "own",
|
|
322
|
+
"tags": {
|
|
323
|
+
"deprecated": "Use `isDisabled`. Accepted as an alias for one minor version."
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
"form": {
|
|
327
|
+
"type": "string | undefined",
|
|
328
|
+
"required": false,
|
|
329
|
+
"origin": "aria",
|
|
330
|
+
"description": "The `<form>` element to associate the input with.\nThe value of this attribute must be the id of a `<form>` in the same document.\nSee [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#form)."
|
|
331
|
+
},
|
|
332
|
+
"maxLength": {
|
|
333
|
+
"type": "number | undefined",
|
|
334
|
+
"required": false,
|
|
335
|
+
"origin": "aria",
|
|
336
|
+
"description": "The maximum number of characters supported by the input. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefmaxlength)."
|
|
337
|
+
},
|
|
338
|
+
"minLength": {
|
|
339
|
+
"type": "number | undefined",
|
|
340
|
+
"required": false,
|
|
341
|
+
"origin": "aria",
|
|
342
|
+
"description": "The minimum number of characters required by the input. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefminlength)."
|
|
343
|
+
},
|
|
344
|
+
"name": {
|
|
345
|
+
"type": "string | undefined",
|
|
346
|
+
"required": false,
|
|
347
|
+
"origin": "aria",
|
|
348
|
+
"description": "The name of the input element, used when submitting an HTML form. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname)."
|
|
349
|
+
},
|
|
350
|
+
"pattern": {
|
|
351
|
+
"type": "string | undefined",
|
|
352
|
+
"required": false,
|
|
353
|
+
"origin": "aria",
|
|
354
|
+
"description": "Regex pattern that the value of the input must match to be valid. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefpattern)."
|
|
355
|
+
},
|
|
356
|
+
"placeholder": {
|
|
357
|
+
"type": "string | undefined",
|
|
358
|
+
"required": false,
|
|
359
|
+
"origin": "aria",
|
|
360
|
+
"description": "Temporary text that occupies the text input when it is empty."
|
|
361
|
+
},
|
|
362
|
+
"value": {
|
|
363
|
+
"type": "string | undefined",
|
|
364
|
+
"required": false,
|
|
365
|
+
"origin": "aria",
|
|
366
|
+
"description": "The current value (controlled)."
|
|
367
|
+
},
|
|
368
|
+
"isDisabled": {
|
|
369
|
+
"type": "boolean | undefined",
|
|
370
|
+
"required": false,
|
|
371
|
+
"origin": "aria",
|
|
372
|
+
"description": "Whether the input is disabled."
|
|
373
|
+
},
|
|
374
|
+
"isReadOnly": {
|
|
375
|
+
"type": "boolean | undefined",
|
|
376
|
+
"required": false,
|
|
377
|
+
"origin": "aria",
|
|
378
|
+
"description": "Whether the input can be selected but not changed by the user."
|
|
379
|
+
},
|
|
380
|
+
"isRequired": {
|
|
381
|
+
"type": "boolean | undefined",
|
|
382
|
+
"required": false,
|
|
383
|
+
"origin": "aria",
|
|
384
|
+
"description": "Whether user input is required on the input before form submission."
|
|
385
|
+
},
|
|
386
|
+
"isInvalid": {
|
|
387
|
+
"type": "boolean | undefined",
|
|
388
|
+
"required": false,
|
|
389
|
+
"origin": "aria",
|
|
390
|
+
"description": "Whether the input value is invalid."
|
|
391
|
+
},
|
|
392
|
+
"validationState": {
|
|
393
|
+
"type": "ValidationState | undefined",
|
|
394
|
+
"required": false,
|
|
395
|
+
"origin": "aria",
|
|
396
|
+
"values": [
|
|
397
|
+
"valid",
|
|
398
|
+
"invalid"
|
|
399
|
+
],
|
|
400
|
+
"tags": {
|
|
401
|
+
"deprecated": "Use `isInvalid` instead."
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
"validationBehavior": {
|
|
405
|
+
"type": "\"aria\" | \"native\" | undefined",
|
|
406
|
+
"required": false,
|
|
407
|
+
"origin": "aria",
|
|
408
|
+
"description": "Whether to use native HTML form validation to prevent form submission\nwhen the value is missing or invalid, or mark the field as required\nor invalid via ARIA.",
|
|
409
|
+
"values": [
|
|
410
|
+
"aria",
|
|
411
|
+
"native"
|
|
412
|
+
],
|
|
413
|
+
"tags": {
|
|
414
|
+
"default": "'aria'"
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
"validate": {
|
|
418
|
+
"type": "((value: string) => ValidationError | true | null | undefined) | undefined",
|
|
419
|
+
"required": false,
|
|
420
|
+
"origin": "aria",
|
|
421
|
+
"description": "A function that returns an error message if a given value is invalid.\nValidation errors are displayed to the user when the form is submitted\nif `validationBehavior=\"native\"`. For realtime validation, use the `isInvalid`\nprop instead."
|
|
422
|
+
},
|
|
423
|
+
"description": {
|
|
424
|
+
"type": "ReactNode",
|
|
425
|
+
"required": false,
|
|
426
|
+
"origin": "aria",
|
|
427
|
+
"description": "A description for the field. Provides a hint such as specific requirements for what to choose."
|
|
428
|
+
},
|
|
429
|
+
"errorMessage": {
|
|
430
|
+
"type": "ReactNode | ((v: ValidationResult) => ReactNode)",
|
|
431
|
+
"required": false,
|
|
432
|
+
"origin": "aria",
|
|
433
|
+
"description": "An error message for the field."
|
|
434
|
+
},
|
|
435
|
+
"onFocusChange": {
|
|
436
|
+
"type": "((isFocused: boolean) => void) | undefined",
|
|
437
|
+
"required": false,
|
|
438
|
+
"origin": "aria",
|
|
439
|
+
"description": "Handler that is called when the element's focus status changes."
|
|
440
|
+
},
|
|
441
|
+
"label": {
|
|
442
|
+
"type": "ReactNode",
|
|
443
|
+
"required": false,
|
|
444
|
+
"origin": "aria",
|
|
445
|
+
"description": "The content to display as the label."
|
|
446
|
+
},
|
|
447
|
+
"excludeFromTabOrder": {
|
|
448
|
+
"type": "boolean | undefined",
|
|
449
|
+
"required": false,
|
|
450
|
+
"origin": "aria",
|
|
451
|
+
"description": "Whether to exclude the element from the sequential tab order. If true,\nthe element will not be focusable via the keyboard by tabbing. This should\nbe avoided except in rare scenarios where an alternative means of accessing\nthe element or its functionality via the keyboard is available."
|
|
452
|
+
},
|
|
453
|
+
"trailingIcon": {
|
|
454
|
+
"type": "React.ReactNode",
|
|
455
|
+
"required": false,
|
|
456
|
+
"origin": "own",
|
|
457
|
+
"description": "Trailing icon. Figma's `Show Trailing Icon` + `Trailing Icon` swap."
|
|
458
|
+
},
|
|
459
|
+
"wrapperClassName": {
|
|
460
|
+
"type": "string | undefined",
|
|
461
|
+
"required": false,
|
|
462
|
+
"origin": "own",
|
|
463
|
+
"description": "Class names for the `.ion-field` wrapper when a label or helper is shown."
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
"propCounts": {
|
|
467
|
+
"own": 9,
|
|
468
|
+
"aria": 51,
|
|
469
|
+
"dom": 265,
|
|
470
|
+
"other": 0
|
|
471
|
+
}
|
|
472
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Popover",
|
|
3
|
+
"source": "src/components/Popover.tsx",
|
|
4
|
+
"propsType": "PopoverProps",
|
|
5
|
+
"description": "Popover — Figma `Popover` (825:1853).\n\nSITS BETWEEN TOOLTIP AND MODAL. A tooltip is a hint that cannot hold\nfocusable content; a modal is a task that takes over the page. A popover\nholds interactive content but stays attached to the control that opened it.\n\n`usePopover` contains focus, closes on Escape or an outside click, and hides\nthe rest of the page from assistive tech while open — the same guarantees\nModal gives. What differs is the framing, and it is deliberate: no visible\nscrim, anchored to its trigger, and `surface/raised` rather than Modal's\n`surface/overlay`. It reads as attached to the page rather than replacing it.",
|
|
6
|
+
"import": "import { Popover } from 'ionbase-ui';",
|
|
7
|
+
"stylesheet": "src/styles/popover.css",
|
|
8
|
+
"tokens": [
|
|
9
|
+
"--border-subtle",
|
|
10
|
+
"--border-width-default",
|
|
11
|
+
"--border-width-thick",
|
|
12
|
+
"--font-family-sans",
|
|
13
|
+
"--font-weight-medium",
|
|
14
|
+
"--font-weight-regular",
|
|
15
|
+
"--icon-secondary",
|
|
16
|
+
"--icon-size-md",
|
|
17
|
+
"--ion-duration-base",
|
|
18
|
+
"--ion-ease-out",
|
|
19
|
+
"--ion-popover-width",
|
|
20
|
+
"--ion-shadow-shadow-lg",
|
|
21
|
+
"--radius-md",
|
|
22
|
+
"--radius-sm",
|
|
23
|
+
"--ring-focus",
|
|
24
|
+
"--spacing-12",
|
|
25
|
+
"--spacing-16",
|
|
26
|
+
"--spacing-32",
|
|
27
|
+
"--spacing-8",
|
|
28
|
+
"--surface-hover",
|
|
29
|
+
"--surface-raised",
|
|
30
|
+
"--text-default",
|
|
31
|
+
"--text-secondary",
|
|
32
|
+
"--type-body",
|
|
33
|
+
"--type-body-line-height",
|
|
34
|
+
"--type-body-sm",
|
|
35
|
+
"--type-body-sm-line-height"
|
|
36
|
+
],
|
|
37
|
+
"props": {
|
|
38
|
+
"children": {
|
|
39
|
+
"type": "React.ReactElement<unknown, string | React.JSXElementConstructor<any>>",
|
|
40
|
+
"required": true,
|
|
41
|
+
"origin": "own",
|
|
42
|
+
"description": "The element that opens it. Must accept a ref and DOM props."
|
|
43
|
+
},
|
|
44
|
+
"content": {
|
|
45
|
+
"type": "React.ReactNode",
|
|
46
|
+
"required": false,
|
|
47
|
+
"origin": "own",
|
|
48
|
+
"description": "Panel contents."
|
|
49
|
+
},
|
|
50
|
+
"title": {
|
|
51
|
+
"type": "React.ReactNode",
|
|
52
|
+
"required": false,
|
|
53
|
+
"origin": "own",
|
|
54
|
+
"description": "Heading. Also gives the dialog its accessible name."
|
|
55
|
+
},
|
|
56
|
+
"footer": {
|
|
57
|
+
"type": "React.ReactNode",
|
|
58
|
+
"required": false,
|
|
59
|
+
"origin": "own",
|
|
60
|
+
"description": "Action row, right-aligned."
|
|
61
|
+
},
|
|
62
|
+
"placement": {
|
|
63
|
+
"type": "PopoverPlacement | undefined",
|
|
64
|
+
"required": false,
|
|
65
|
+
"origin": "own",
|
|
66
|
+
"description": "Matches the Figma `Placement` variant, and names where the POPOVER sits —\nnot where the arrow points. A preference, not a guarantee: it flips when\nthere is no room, and the arrow follows.",
|
|
67
|
+
"values": [
|
|
68
|
+
"right",
|
|
69
|
+
"left",
|
|
70
|
+
"top",
|
|
71
|
+
"bottom"
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"size": {
|
|
75
|
+
"type": "PopoverSize | undefined",
|
|
76
|
+
"required": false,
|
|
77
|
+
"origin": "own",
|
|
78
|
+
"description": "Matches the Figma `Size` variant. Widths only; height always hugs.",
|
|
79
|
+
"values": [
|
|
80
|
+
"sm",
|
|
81
|
+
"md",
|
|
82
|
+
"lg"
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
"showClose": {
|
|
86
|
+
"type": "boolean | undefined",
|
|
87
|
+
"required": false,
|
|
88
|
+
"origin": "own",
|
|
89
|
+
"description": "Show the close button. Defaults to `true`."
|
|
90
|
+
},
|
|
91
|
+
"hideArrow": {
|
|
92
|
+
"type": "boolean | undefined",
|
|
93
|
+
"required": false,
|
|
94
|
+
"origin": "own",
|
|
95
|
+
"description": "Hide the caret."
|
|
96
|
+
},
|
|
97
|
+
"closeLabel": {
|
|
98
|
+
"type": "string | undefined",
|
|
99
|
+
"required": false,
|
|
100
|
+
"origin": "own"
|
|
101
|
+
},
|
|
102
|
+
"isOpen": {
|
|
103
|
+
"type": "boolean | undefined",
|
|
104
|
+
"required": false,
|
|
105
|
+
"origin": "own"
|
|
106
|
+
},
|
|
107
|
+
"onOpenChange": {
|
|
108
|
+
"type": "((isOpen: boolean) => void) | undefined",
|
|
109
|
+
"required": false,
|
|
110
|
+
"origin": "own"
|
|
111
|
+
},
|
|
112
|
+
"className": {
|
|
113
|
+
"type": "string | undefined",
|
|
114
|
+
"required": false,
|
|
115
|
+
"origin": "own"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"propCounts": {
|
|
119
|
+
"own": 12,
|
|
120
|
+
"aria": 0,
|
|
121
|
+
"dom": 0,
|
|
122
|
+
"other": 0
|
|
123
|
+
}
|
|
124
|
+
}
|