ionbase-ui 0.16.0 → 0.17.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.
Files changed (43) hide show
  1. package/README.md +34 -7
  2. package/dist/meta/Alert.json +248 -0
  3. package/dist/meta/Avatar.json +97 -0
  4. package/dist/meta/AvatarGroup.json +82 -0
  5. package/dist/meta/Badge.json +83 -0
  6. package/dist/meta/Button.json +518 -0
  7. package/dist/meta/Checkbox.json +113 -0
  8. package/dist/meta/Divider.json +30 -0
  9. package/dist/meta/FullCard.json +97 -0
  10. package/dist/meta/Header.json +91 -0
  11. package/dist/meta/Icon.json +35 -0
  12. package/dist/meta/Input.json +558 -0
  13. package/dist/meta/Link.json +239 -0
  14. package/dist/meta/Logo.json +46 -0
  15. package/dist/meta/LogoMark.json +41 -0
  16. package/dist/meta/Menu.json +50 -0
  17. package/dist/meta/MenuItem.json +75 -0
  18. package/dist/meta/Modal.json +241 -0
  19. package/dist/meta/NavItem.json +76 -0
  20. package/dist/meta/PhoneInput.json +472 -0
  21. package/dist/meta/Popover.json +124 -0
  22. package/dist/meta/Radio.json +104 -0
  23. package/dist/meta/RadioGroup.json +126 -0
  24. package/dist/meta/ScrollProgress.json +63 -0
  25. package/dist/meta/Select.json +195 -0
  26. package/dist/meta/TabItem.json +15 -0
  27. package/dist/meta/Table.json +135 -0
  28. package/dist/meta/TableBody.json +43 -0
  29. package/dist/meta/TableCell.json +105 -0
  30. package/dist/meta/TableHead.json +43 -0
  31. package/dist/meta/TableRow.json +56 -0
  32. package/dist/meta/Tabs.json +186 -0
  33. package/dist/meta/Toast.json +105 -0
  34. package/dist/meta/ToastProvider.json +75 -0
  35. package/dist/meta/Toggle.json +102 -0
  36. package/dist/meta/Tooltip.json +78 -0
  37. package/dist/meta/components.json +4757 -0
  38. package/dist/meta/index.json +479 -0
  39. package/dist/styles/tokens/base.css +25 -25
  40. package/dist/styles/tokens/theme-dark.css +11 -11
  41. package/dist/tokens/index.d.ts +8 -8
  42. package/dist/tokens/index.js +8 -8
  43. package/package.json +12 -6
@@ -0,0 +1,241 @@
1
+ {
2
+ "name": "Modal",
3
+ "source": "src/components/Modal.tsx",
4
+ "propsType": "ModalProps",
5
+ "description": "Modal — Figma `Modal` (792:1537).\n\n`Size` x `Align`, with the sections as props rather than variants. The panel\nhugs its content at every size except `fullscreen`, which fills the viewport\nand pushes the actions to the bottom edge.\n\nRENDERS NOTHING WHEN CLOSED, and mounts into a portal when open. Both come\nfrom React Aria's `Overlay`, and both matter: a modal left in the tree while\nclosed is still focusable by keyboard, and one rendered inline inherits any\n`overflow: hidden` or stacking context from wherever it was written.\n\nThe scrim is part of this component in code, unlike in Figma — see the note\nin modal.css.",
6
+ "import": "import { Modal } from 'ionbase-ui';",
7
+ "status": "stable",
8
+ "since": "0.11.0",
9
+ "summary": "A focus-trapping dialog. Renders nothing when closed and portals when open.",
10
+ "useWhen": [
11
+ "the task must be completed or abandoned before anything else",
12
+ "confirming a destructive action",
13
+ "a short focused form that would otherwise need its own page"
14
+ ],
15
+ "useInstead": [
16
+ {
17
+ "when": "the content is supplementary and the page stays usable",
18
+ "use": "Popover",
19
+ "why": "a Popover does not trap focus or block the page"
20
+ },
21
+ {
22
+ "when": "it is a short label for a control",
23
+ "use": "Tooltip"
24
+ }
25
+ ],
26
+ "variants": {
27
+ "size": {
28
+ "sm": {
29
+ "use": "confirmations and single-question prompts"
30
+ },
31
+ "md": {
32
+ "use": "the default; short forms"
33
+ },
34
+ "lg": {
35
+ "use": "multi-section forms"
36
+ },
37
+ "fullscreen": {
38
+ "use": "immersive tasks; fills the viewport and pins the actions to the bottom edge"
39
+ }
40
+ },
41
+ "align": {
42
+ "left": {
43
+ "use": "the default; forms and anything the user reads"
44
+ },
45
+ "center": {
46
+ "use": "single-message confirmations only"
47
+ }
48
+ }
49
+ },
50
+ "slots": {
51
+ "footer": {
52
+ "accepts": "Button",
53
+ "note": "the primary action goes last, at the trailing edge"
54
+ },
55
+ "media": {
56
+ "note": "rendered above the title"
57
+ }
58
+ },
59
+ "a11y": {
60
+ "role": "dialog",
61
+ "guarantees": [
62
+ "focus moves into the panel on open and returns to the trigger on close",
63
+ "Escape and a scrim click both close it",
64
+ "focus is trapped while open",
65
+ "nothing is rendered at all while closed, so no closed-modal content is keyboard reachable"
66
+ ],
67
+ "requires": [
68
+ "`title`, which provides the dialog's accessible name"
69
+ ]
70
+ },
71
+ "antiPatterns": [
72
+ {
73
+ "dont": "rendering <Modal> only when a state flag is true",
74
+ "do": "render it always and drive `isOpen`",
75
+ "why": "Modal already renders nothing when closed. Wrapping it in a conditional discards the open/close transition and the focus-return behaviour."
76
+ },
77
+ {
78
+ "dont": "opening a Modal from inside another Modal",
79
+ "why": "two focus traps compete and Escape becomes ambiguous"
80
+ },
81
+ {
82
+ "dont": "a destructive action as the only button, with no cancel",
83
+ "why": "a confirmation with no way out is not a confirmation"
84
+ }
85
+ ],
86
+ "stylesheet": "src/styles/modal.css",
87
+ "tokens": [
88
+ "--border-subtle",
89
+ "--border-width-default",
90
+ "--border-width-thick",
91
+ "--font-family-sans",
92
+ "--font-weight-regular",
93
+ "--font-weight-semibold",
94
+ "--icon-primary",
95
+ "--icon-secondary",
96
+ "--icon-size-lg",
97
+ "--icon-size-md",
98
+ "--ion-duration-base",
99
+ "--ion-ease-out",
100
+ "--ion-modal-width",
101
+ "--ion-shadow-shadow-xl",
102
+ "--radius-full",
103
+ "--radius-sm",
104
+ "--radius-xl",
105
+ "--ring-focus",
106
+ "--spacing-12",
107
+ "--spacing-16",
108
+ "--spacing-20",
109
+ "--spacing-24",
110
+ "--spacing-32",
111
+ "--spacing-48",
112
+ "--spacing-8",
113
+ "--surface-hover",
114
+ "--surface-overlay",
115
+ "--surface-primary-subtle",
116
+ "--surface-scrim",
117
+ "--text-default",
118
+ "--text-secondary",
119
+ "--type-body",
120
+ "--type-body-line-height",
121
+ "--type-h5",
122
+ "--type-h5-line-height"
123
+ ],
124
+ "props": {
125
+ "isOpen": {
126
+ "type": "boolean | undefined",
127
+ "required": false,
128
+ "origin": "own",
129
+ "description": "Whether the modal is shown."
130
+ },
131
+ "onOpenChange": {
132
+ "type": "((isOpen: boolean) => void) | undefined",
133
+ "required": false,
134
+ "origin": "own",
135
+ "description": "Called with the next open state — `false` when the modal asks to close."
136
+ },
137
+ "size": {
138
+ "type": "ModalSize | undefined",
139
+ "required": false,
140
+ "origin": "own",
141
+ "description": "Matches the Figma `Size` variant.",
142
+ "values": [
143
+ "sm",
144
+ "md",
145
+ "lg",
146
+ "fullscreen"
147
+ ],
148
+ "default": "md"
149
+ },
150
+ "align": {
151
+ "type": "ModalAlign | undefined",
152
+ "required": false,
153
+ "origin": "own",
154
+ "description": "Matches the Figma `Align` variant.",
155
+ "values": [
156
+ "left",
157
+ "center"
158
+ ],
159
+ "default": "left"
160
+ },
161
+ "title": {
162
+ "type": "React.ReactNode",
163
+ "required": true,
164
+ "origin": "own",
165
+ "description": "Required: the dialog's accessible name, wired via `aria-labelledby`."
166
+ },
167
+ "description": {
168
+ "type": "React.ReactNode",
169
+ "required": false,
170
+ "origin": "own",
171
+ "description": "Supporting copy under the title."
172
+ },
173
+ "media": {
174
+ "type": "React.ReactNode",
175
+ "required": false,
176
+ "origin": "own",
177
+ "description": "The featured slot above the title — an icon or an illustration. Rendered\ninside a circular container that hugs it."
178
+ },
179
+ "footer": {
180
+ "type": "React.ReactNode",
181
+ "required": false,
182
+ "origin": "own",
183
+ "description": "Action row. Right-aligned when `align=\"left\"`, centred when `\"center\"`."
184
+ },
185
+ "showClose": {
186
+ "type": "boolean | undefined",
187
+ "required": false,
188
+ "origin": "own",
189
+ "description": "Show the close button. Defaults to `true`.",
190
+ "default": true
191
+ },
192
+ "closeLabel": {
193
+ "type": "string | undefined",
194
+ "required": false,
195
+ "origin": "own",
196
+ "description": "Accessible name for the close button.",
197
+ "default": "Close dialog"
198
+ },
199
+ "children": {
200
+ "type": "React.ReactNode",
201
+ "required": false,
202
+ "origin": "own",
203
+ "description": "Body content."
204
+ },
205
+ "className": {
206
+ "type": "string | undefined",
207
+ "required": false,
208
+ "origin": "own"
209
+ },
210
+ "isDismissable": {
211
+ "type": "boolean | undefined",
212
+ "required": false,
213
+ "origin": "aria",
214
+ "description": "Whether to close the modal when the user interacts outside it.",
215
+ "tags": {
216
+ "default": "false"
217
+ }
218
+ },
219
+ "isKeyboardDismissDisabled": {
220
+ "type": "boolean | undefined",
221
+ "required": false,
222
+ "origin": "aria",
223
+ "description": "Whether pressing the escape key to close the modal should be disabled.",
224
+ "tags": {
225
+ "default": "false"
226
+ }
227
+ },
228
+ "shouldCloseOnInteractOutside": {
229
+ "type": "((element: Element) => boolean) | undefined",
230
+ "required": false,
231
+ "origin": "aria",
232
+ "description": "When user interacts with the argument element outside of the overlay ref,\nreturn true if onClose should be called. This gives you a chance to filter\nout interaction with elements that should not dismiss the overlay.\nBy default, onClose will always be called on interaction outside the overlay ref."
233
+ }
234
+ },
235
+ "propCounts": {
236
+ "own": 12,
237
+ "aria": 3,
238
+ "dom": 0,
239
+ "other": 0
240
+ }
241
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "name": "NavItem",
3
+ "source": "src/components/NavItem.tsx",
4
+ "propsType": "NavItemProps",
5
+ "description": "Nav Item renders an `<a>` when given `href`, a `<button>` otherwise —\nchosen by what the caller is actually building, the same judgment call\nMenu and Select make. A primary nav bar is links; a nav item with\n`showChevron` that opens a menu (no `href` of its own) is a button.\n\nInteraction state comes from React Aria rather than CSS pseudo-classes,\nmatching Button: `useHover` is pointer-aware so a tap does not stay\n\"hovered\" until the next tap elsewhere, and `useFocusRing` shows the ring\nonly for keyboard navigation. The CSS keeps its own `:hover` /\n`:focus-visible` rules so the stylesheet still works without React.",
6
+ "import": "import { NavItem } from 'ionbase-ui';",
7
+ "stylesheet": "src/styles/nav-item.css",
8
+ "tokens": [
9
+ "--border-focus",
10
+ "--border-width-thick",
11
+ "--font-family-sans",
12
+ "--font-weight-regular",
13
+ "--icon-disabled",
14
+ "--icon-interactive-hover",
15
+ "--icon-size-sm",
16
+ "--icon-tertiary",
17
+ "--ion-duration-base",
18
+ "--ion-ease-out",
19
+ "--radius-sm",
20
+ "--spacing-4",
21
+ "--spacing-8",
22
+ "--text-disabled",
23
+ "--text-interactive-hover",
24
+ "--text-secondary",
25
+ "--type-body-sm",
26
+ "--type-body-sm-line-height"
27
+ ],
28
+ "props": {
29
+ "icon": {
30
+ "type": "React.ReactNode",
31
+ "required": false,
32
+ "origin": "own",
33
+ "description": "Figma's `Icon` slot — an optional leading icon."
34
+ },
35
+ "showChevron": {
36
+ "type": "boolean | undefined",
37
+ "required": false,
38
+ "origin": "own",
39
+ "description": "Figma's `Show Chevron`. Set on a nav item that opens a menu, not a plain link."
40
+ },
41
+ "isDisabled": {
42
+ "type": "boolean | undefined",
43
+ "required": false,
44
+ "origin": "own"
45
+ },
46
+ "disabled": {
47
+ "type": "boolean | undefined",
48
+ "required": false,
49
+ "origin": "own",
50
+ "tags": {
51
+ "deprecated": "Use `isDisabled`. Accepted as an alias for one minor version."
52
+ }
53
+ },
54
+ "children": {
55
+ "type": "React.ReactNode",
56
+ "required": false,
57
+ "origin": "own"
58
+ },
59
+ "className": {
60
+ "type": "string | undefined",
61
+ "required": false,
62
+ "origin": "own"
63
+ },
64
+ "href": {
65
+ "type": "string | undefined",
66
+ "required": false,
67
+ "origin": "own"
68
+ }
69
+ },
70
+ "propCounts": {
71
+ "own": 7,
72
+ "aria": 0,
73
+ "dom": 276,
74
+ "other": 0
75
+ }
76
+ }