@iress-oss/ids-components 6.0.0-alpha.41 → 6.0.0-alpha.43
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/.ai/components/alert.md +15 -4
- package/.ai/components/autocomplete-recipes.md +0 -6
- package/.ai/components/autocomplete.md +4 -5
- package/.ai/components/button-group.md +0 -5
- package/.ai/components/button.md +74 -5
- package/.ai/components/card.md +0 -5
- package/.ai/components/checkbox-group-recipes.md +0 -1
- package/.ai/components/checkbox-group.md +0 -5
- package/.ai/components/checkbox.md +0 -5
- package/.ai/components/col.md +0 -5
- package/.ai/components/container.md +0 -5
- package/.ai/components/divider.md +0 -5
- package/.ai/components/expander.md +0 -5
- package/.ai/components/field.md +0 -5
- package/.ai/components/icon.md +7 -7
- package/.ai/components/image.md +0 -5
- package/.ai/components/inline.md +0 -5
- package/.ai/components/input-currency-recipes.md +0 -1
- package/.ai/components/input-currency.md +0 -5
- package/.ai/components/input-recipes.md +0 -1
- package/.ai/components/input.md +0 -5
- package/.ai/components/label.md +0 -5
- package/.ai/components/link.md +0 -5
- package/.ai/components/menu-item.md +0 -5
- package/.ai/components/menu.md +0 -5
- package/.ai/components/modal.md +17 -5
- package/.ai/components/panel.md +0 -5
- package/.ai/components/pill.md +0 -5
- package/.ai/components/popover-recipes.md +0 -1
- package/.ai/components/popover.md +0 -5
- package/.ai/components/progress.md +0 -5
- package/.ai/components/provider.md +3 -0
- package/.ai/components/radio-group.md +0 -5
- package/.ai/components/radio.md +0 -5
- package/.ai/components/readonly.md +10 -5
- package/.ai/components/row.md +0 -5
- package/.ai/components/select.md +412 -0
- package/.ai/components/skeleton-recipes.md +0 -1
- package/.ai/components/skeleton.md +0 -5
- package/.ai/components/slideout.md +6 -7
- package/.ai/components/slider.md +0 -5
- package/.ai/components/spinner.md +0 -5
- package/.ai/components/stack.md +0 -5
- package/.ai/components/styled.md +0 -5
- package/.ai/components/tab-set.md +0 -5
- package/.ai/components/tab.md +0 -5
- package/.ai/components/table.md +0 -5
- package/.ai/components/tag.md +0 -5
- package/.ai/components/text.md +2 -5
- package/.ai/components/toaster.md +20 -5
- package/.ai/components/toggle.md +0 -5
- package/.ai/components/tooltip.md +0 -5
- package/.ai/components/validation-message.md +0 -5
- package/.ai/guides/foundations-common-mistakes.md +53 -0
- package/.ai/guides/foundations-responsive.md +3 -0
- package/.ai/guides/get-started-develop.md +3 -2
- package/.ai/guides/migration-guides-oui.md +3 -0
- package/.ai/guides/migration-guides-v6.md +5 -1
- package/.ai/guides/styling-props-colour.md +2 -0
- package/.ai/guides/styling-props-reference.md +2 -0
- package/.ai/guides/styling-props-spacing.md +2 -0
- package/.ai/guides/styling-props-typography.md +2 -0
- package/.ai/index.json +16 -0
- package/.ai/patterns/breadcrumbs.md +2 -5
- package/.ai/patterns/contextual-menu.md +0 -5
- package/.ai/patterns/dropdown-menu.md +0 -5
- package/.ai/patterns/feedback.md +76 -0
- package/.ai/patterns/form-recipes.md +0 -1
- package/.ai/patterns/form.md +0 -6
- package/.ai/patterns/loading.md +0 -5
- package/.ai/patterns/shadow.md +2 -5
- package/.ai/patterns/side-nav.md +2 -5
- package/.ai/skills/figma-to-ids.md +36 -40
- package/.ai/skills/ui-doctor.md +73 -723
- package/.ai/skills/ui-translation.md +138 -60
- package/dist/Autocomplete-DJLmZml2.js +446 -0
- package/dist/{Button-01cBgK1X.js → Button--S4rHug-.js} +1 -1
- package/dist/{TableBody-mcqrqkgi.js → TableBody-CkHJmbkD.js} +18 -17
- package/dist/components/Alert/Alert.js +2 -2
- package/dist/components/Autocomplete/Autocomplete.js +1 -1
- package/dist/components/Autocomplete/index.js +1 -1
- package/dist/components/Button/Button.js +2 -2
- package/dist/components/Button/CloseButton/CloseButton.js +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +2 -2
- package/dist/components/Card/Card.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +2 -2
- package/dist/components/CheckboxMark/CheckboxMark.js +1 -1
- package/dist/components/Col/Col.js +1 -1
- package/dist/components/Container/Container.js +1 -1
- package/dist/components/Divider/Divider.js +1 -1
- package/dist/components/Expander/Expander.js +2 -2
- package/dist/components/Field/Field.js +2 -2
- package/dist/components/Field/FieldGroup/FieldGroup.js +2 -2
- package/dist/components/Field/components/FieldFooter.js +1 -1
- package/dist/components/Field/components/FieldHint.js +1 -1
- package/dist/components/Hide/Hide.js +1 -1
- package/dist/components/Icon/Icon.js +2 -2
- package/dist/components/Image/Image.js +1 -1
- package/dist/components/Inline/Inline.js +1 -1
- package/dist/components/Input/Input.js +35 -34
- package/dist/components/Input/InputBase/InputBase.js +1 -1
- package/dist/components/Label/LabelBase/LabelBase.js +1 -1
- package/dist/components/Link/Link.js +1 -1
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Menu/MenuGroup/MenuGroup.js +27 -26
- package/dist/components/Menu/MenuItem/MenuItem.js +1 -1
- package/dist/components/Menu/MenuText/MenuText.js +1 -1
- package/dist/components/Modal/Modal.js +3 -3
- package/dist/components/Pill/Pill.js +2 -2
- package/dist/components/Popover/InputPopover/InputPopover.js +1 -1
- package/dist/components/Popover/Popover.js +56 -54
- package/dist/components/Popover/Popover.styles.d.ts +1 -0
- package/dist/components/Popover/Popover.styles.js +3 -1
- package/dist/components/Popover/components/PopoverActivator.js +33 -32
- package/dist/components/Popover/components/PopoverContent.js +1 -1
- package/dist/components/Popover/hooks/useFloatingPopover.js +44 -44
- package/dist/components/Progress/Progress.js +2 -2
- package/dist/components/Radio/Radio.js +2 -2
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.styles.d.ts +2 -2
- package/dist/components/RadioGroup/RadioGroup.styles.js +2 -2
- package/dist/components/RadioMark/RadioMark.js +1 -1
- package/dist/components/Readonly/Readonly.js +66 -57
- package/dist/components/Readonly/Readonly.styles.d.ts +13 -13
- package/dist/components/Readonly/Readonly.styles.js +36 -16
- package/dist/components/Row/Row.js +1 -1
- package/dist/components/Select/Select.d.ts +9 -2
- package/dist/components/Select/Select.js +3 -2
- package/dist/components/Select/SelectHeading/SelectHeading.js +1 -1
- package/dist/components/Select/SelectTags/SelectTags.js +23 -21
- package/dist/components/Select/components/NativeSelect.js +1 -1
- package/dist/components/Select/components/SelectActivator.d.ts +2 -2
- package/dist/components/Select/components/SelectActivator.js +31 -29
- package/dist/components/Select/components/SelectHiddenInput.d.ts +1 -1
- package/dist/components/Select/components/SelectOptions.d.ts +1 -1
- package/dist/components/Select/index.js +1 -1
- package/dist/components/SkipLink/SkipLink.js +1 -1
- package/dist/components/Slideout/Slideout.js +1 -1
- package/dist/components/Slideout/components/SlideoutInner.js +3 -3
- package/dist/components/Slider/Slider.js +2 -2
- package/dist/components/Slider/components/SliderTicks.js +1 -1
- package/dist/components/Stack/Stack.js +1 -1
- package/dist/components/Styled/Styled.js +1 -1
- package/dist/components/TabSet/Tab/Tab.js +1 -1
- package/dist/components/TabSet/TabSet.js +101 -91
- package/dist/components/Table/Table.js +2 -2
- package/dist/components/Table/TableBody/TableBody.js +2 -2
- package/dist/components/Table/components/TableFilterButton.js +3 -3
- package/dist/components/Table/components/TableHeader.js +1 -1
- package/dist/components/Table/components/TableHeaderCell.js +1 -1
- package/dist/components/Table/components/TableRows.js +1 -1
- package/dist/components/Table/hooks/useTableColumnStyles.js +1 -1
- package/dist/components/Table/index.js +1 -1
- package/dist/components/Tag/Tag.js +3 -3
- package/dist/components/Text/Text.js +1 -1
- package/dist/components/Toaster/Toaster.js +1 -1
- package/dist/components/Toggle/Toggle.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/ValidationMessage/ValidationMessage.js +1 -1
- package/dist/components/ValidationMessage/ValidationSummary/ValidationSummary.js +1 -1
- package/dist/{factory-ZI23d_XV.js → factory-DoNPBpVE.js} +1 -1
- package/dist/{is-valid-prop-DfLqxikI.js → is-valid-prop-DKvI2LyO.js} +3 -3
- package/dist/main.js +3 -3
- package/dist/patterns/Breadcrumbs/Breadcrumbs.js +13 -12
- package/dist/patterns/ContextualMenu/ContextualMenu.js +4 -4
- package/dist/patterns/DropdownMenu/DropdownMenu.js +69 -69
- package/dist/patterns/Feedback/meta/Thumbnail.d.ts +2 -0
- package/dist/patterns/Feedback/meta/index.d.ts +7 -0
- package/dist/patterns/Form/FormValidationSummary/FormValidationSummary.js +1 -1
- package/dist/patterns/Form/HookForm/HookForm.js +1 -1
- package/dist/patterns/Loading/components/ComponentLoading.js +2 -2
- package/dist/patterns/Loading/components/DefaultLoading.js +1 -1
- package/dist/patterns/Loading/components/LongLoading.js +1 -1
- package/dist/patterns/Loading/components/PageLoading.js +1 -1
- package/dist/patterns/Loading/components/ValidateLoading.js +2 -2
- package/dist/patterns/Shadow/Shadow.js +1 -1
- package/dist/patterns/SideNav/SideNav.js +2 -2
- package/dist/style.css +1 -1
- package/llms.txt +6 -4
- package/package.json +9 -9
- package/dist/Autocomplete-XUAa7ThE.js +0 -402
package/.ai/components/alert.md
CHANGED
|
@@ -15,10 +15,21 @@ import { IressAlert } from '@iress-oss/ids-components';
|
|
|
15
15
|
</IressAlert>
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
### When to use
|
|
21
|
+
|
|
22
|
+
- **Form validation**: Display errors or warnings near the relevant form section
|
|
23
|
+
- **Page-level status**: Inform users about the state of the current page (e.g. "This record is read-only")
|
|
24
|
+
- **Informational banners**: Provide tips, guidance, or announcements inline with content
|
|
25
|
+
- **Persistent warnings**: Messages that should remain visible until the condition changes
|
|
26
|
+
|
|
27
|
+
### When not to use
|
|
28
|
+
|
|
29
|
+
- **Transient confirmations** of completed actions (e.g. "Saved") — use [IressToaster](https://main--691abcc79dfa560a36d0a74f.chromatic.com/?path=/docs/components_components-toaster--docs) instead
|
|
30
|
+
- **Tasks requiring user decisions** before continuing — use [IressModal](https://main--691abcc79dfa560a36d0a74f.chromatic.com/?path=/docs/components_components-modal--docs) instead
|
|
31
|
+
|
|
32
|
+
For a full comparison of feedback components, see the [Feedback pattern](https://main--691abcc79dfa560a36d0a74f.chromatic.com/?path=/docs/components_patterns-feedback--docs).
|
|
22
33
|
|
|
23
34
|
## Examples
|
|
24
35
|
|
|
@@ -2,14 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Autocomplete component documentation.
|
|
4
4
|
|
|
5
|
-
> **Component:** `@iress-oss/ids-components`
|
|
6
5
|
> **Storybook:** [Recipes in Storybook](https://main--691abcc79dfa560a36d0a74f.chromatic.com/?path=/docs/components_components-autocomplete--docs)
|
|
7
6
|
|
|
8
|
-
import {
|
|
9
|
-
ComponentExample,
|
|
10
|
-
ComponentApi,
|
|
11
|
-
} from '@iress-oss/ids-storybook-config';
|
|
12
|
-
|
|
13
7
|
> [!NOTE]
|
|
14
8
|
> **Experimental**
|
|
15
9
|
>
|
|
@@ -13,11 +13,6 @@ import { IressAutocomplete } from '@iress-oss/ids-components';
|
|
|
13
13
|
<IressAutocomplete />
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
import {
|
|
17
|
-
ComponentOverview,
|
|
18
|
-
ComponentExample,
|
|
19
|
-
} from '@iress-oss/ids-storybook-config';
|
|
20
|
-
|
|
21
16
|
## Usage
|
|
22
17
|
|
|
23
18
|
The `IressAutocomplete` element extends `IressInput` with additional functionality to provide suggestions to the user as they type.
|
|
@@ -263,6 +258,7 @@ We recommend using [Mock Service Worker](https://mswjs.io/) to mock the API call
|
|
|
263
258
|
|
|
264
259
|
```tsx
|
|
265
260
|
// src/mocks/handlers.ts
|
|
261
|
+
import { http, HttpResponse } from 'msw';
|
|
266
262
|
|
|
267
263
|
export const handlers = [
|
|
268
264
|
// Intercept "GET https://swapi.py4e.com/api/people" requests...
|
|
@@ -276,10 +272,13 @@ export const handlers = [
|
|
|
276
272
|
];
|
|
277
273
|
|
|
278
274
|
// src/mocks/node.js
|
|
275
|
+
import { setupServer } from 'msw/node';
|
|
276
|
+
import { handlers } from './handlers';
|
|
279
277
|
|
|
280
278
|
export const server = setupServer(...handlers);
|
|
281
279
|
|
|
282
280
|
// src/CustomAutocomplete.test.tsx
|
|
281
|
+
import { server } from './mocks/node';
|
|
283
282
|
|
|
284
283
|
server.listen();
|
|
285
284
|
|
|
@@ -13,11 +13,6 @@ import { IressButtonGroup } from '@iress-oss/ids-components';
|
|
|
13
13
|
<IressButtonGroup label="Options" />
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
import {
|
|
17
|
-
ComponentExample,
|
|
18
|
-
ComponentOverview,
|
|
19
|
-
} from '@iress-oss/ids-storybook-config';
|
|
20
|
-
|
|
21
16
|
## Usage
|
|
22
17
|
|
|
23
18
|
Button Group requires some `label` text to describe what the group of buttons represent. The `label` text can be visually hidden (but still read by screenreaders) using the `hiddenLabel` prop.
|
package/.ai/components/button.md
CHANGED
|
@@ -15,10 +15,79 @@ import { IressButton } from '@iress-oss/ids-components';
|
|
|
15
15
|
</IressButton>
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
### Avoid using `disabled`
|
|
21
|
+
|
|
22
|
+
IDS discourages using `disabled` on `IressButton`. Although the native HTML `disabled` attribute is supported via the underlying `<button>`/`<a>` element, it is an anti-pattern that should be avoided because:
|
|
23
|
+
|
|
24
|
+
- Screen readers skip disabled elements, making them invisible to assistive technology users
|
|
25
|
+
- Users cannot understand why a button is disabled or what they need to do to enable it
|
|
26
|
+
- It creates a poor user experience with no path to resolution
|
|
27
|
+
|
|
28
|
+
<details>
|
|
29
|
+
<summary>Alternatives by use case</summary>
|
|
30
|
+
|
|
31
|
+
**"Form is incomplete"** — Keep the submit button enabled. Use `IressForm` with `rules` validation — it will show inline errors on submit and prevent submission until the form is valid.
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
// ❌ Disabling submit until form is valid
|
|
35
|
+
<IressButton disabled={!isValid} type="submit">Save</IressButton>
|
|
36
|
+
|
|
37
|
+
// ✅ Let IressForm handle validation on submit
|
|
38
|
+
<IressForm onSubmit={handleSubmit}>
|
|
39
|
+
<IressFormField
|
|
40
|
+
name="email"
|
|
41
|
+
label="Email"
|
|
42
|
+
rules={{ required: 'Email is required' }}
|
|
43
|
+
render={(props) => <IressInput {...props} type="email" />}
|
|
44
|
+
/>
|
|
45
|
+
<IressButton mode="primary" type="submit">Save</IressButton>
|
|
46
|
+
</IressForm>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**"Action is in progress"** — Use the `loading` prop. It shows a spinner, announces the state to screen readers, and automatically prevents duplicate clicks.
|
|
50
|
+
|
|
51
|
+
```tsx
|
|
52
|
+
// ❌ Disabling during submission
|
|
53
|
+
<IressButton disabled={isSubmitting}>Save</IressButton>
|
|
54
|
+
|
|
55
|
+
// ✅ Use loading — prevents clicks and communicates state
|
|
56
|
+
<IressButton loading={isSubmitting} mode="primary" type="submit">Save</IressButton>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**"User lacks permission"** — Hide the button entirely, or keep it enabled and show an explanation when clicked.
|
|
60
|
+
|
|
61
|
+
```tsx
|
|
62
|
+
// ❌ Showing a disabled button the user can never enable
|
|
63
|
+
<IressButton disabled={!canEdit}>Edit</IressButton>;
|
|
64
|
+
|
|
65
|
+
// ✅ Option A — don't render the button at all
|
|
66
|
+
{
|
|
67
|
+
canEdit && <IressButton onClick={handleEdit}>Edit</IressButton>;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// ✅ Option B — explain on click
|
|
71
|
+
<IressButton onClick={() => (canEdit ? handleEdit() : showPermissionError())}>
|
|
72
|
+
Edit
|
|
73
|
+
</IressButton>;
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**"Prerequisite step not completed"** — Guide the user to the prerequisite instead of silently disabling.
|
|
77
|
+
|
|
78
|
+
```tsx
|
|
79
|
+
// ❌ Disabled with no explanation
|
|
80
|
+
<IressButton disabled={!hasSelectedItem}>Delete</IressButton>
|
|
81
|
+
|
|
82
|
+
// ✅ Explain what's needed
|
|
83
|
+
<IressButton onClick={() => !hasSelectedItem ? showAlert('Select an item first') : confirmDelete()}>
|
|
84
|
+
Delete
|
|
85
|
+
</IressButton>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**"Destructive action needs confirmation"** — Use `IressModal` with `status="danger"` for a confirmation step.
|
|
89
|
+
|
|
90
|
+
</details>
|
|
22
91
|
|
|
23
92
|
## Examples
|
|
24
93
|
|
|
@@ -131,7 +200,7 @@ reset
|
|
|
131
200
|
|
|
132
201
|
Loading buttons give the user an indication something is happening (eg. a form submission or extra content being loaded) after they have been triggered.
|
|
133
202
|
|
|
134
|
-
The loading state can be activated by setting the `loading` prop to `true
|
|
203
|
+
The loading state can be activated by setting the `loading` prop to `true`. To customise the screen reader announcement, pass a string instead of `true` (e.g. `loading="Submitting…"`). The default announcement is "Loading".
|
|
135
204
|
|
|
136
205
|
When the loading state is activated, any click events on the button are disabled.
|
|
137
206
|
|
package/.ai/components/card.md
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
CheckboxGroup component documentation.
|
|
4
4
|
|
|
5
|
-
> **Component:** `@iress-oss/ids-components`
|
|
6
5
|
> **Storybook:** [Recipes in Storybook](https://main--691abcc79dfa560a36d0a74f.chromatic.com/?path=/docs/components_components-checkbox-group--docs)
|
|
7
6
|
|
|
8
7
|
## Checkboxes inside an `IressTable`
|
|
@@ -13,11 +13,6 @@ import { IressCheckboxGroup } from '@iress-oss/ids-components';
|
|
|
13
13
|
<IressCheckboxGroup name="preferences" />
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
import {
|
|
17
|
-
ComponentExample,
|
|
18
|
-
ComponentOverview,
|
|
19
|
-
} from '@iress-oss/ids-storybook-config';
|
|
20
|
-
|
|
21
16
|
## Examples
|
|
22
17
|
|
|
23
18
|
### Checkbox children
|
package/.ai/components/col.md
CHANGED
|
@@ -13,11 +13,6 @@ import { IressContainer } from '@iress-oss/ids-components';
|
|
|
13
13
|
<IressContainer />
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
import {
|
|
17
|
-
ComponentOverview,
|
|
18
|
-
ComponentExample,
|
|
19
|
-
} from '@iress-oss/ids-storybook-config';
|
|
20
|
-
|
|
21
16
|
## Behaviour
|
|
22
17
|
|
|
23
18
|
The `IressContainer` snaps to fixed max widths at different breakpoints. Those max widths are as follows:
|
|
@@ -15,11 +15,6 @@ import { IressExpander } from '@iress-oss/ids-components';
|
|
|
15
15
|
</IressExpander>
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
import {
|
|
19
|
-
ComponentExample,
|
|
20
|
-
ComponentOverview,
|
|
21
|
-
} from '@iress-oss/ids-storybook-config';
|
|
22
|
-
|
|
23
18
|
## Accessibility
|
|
24
19
|
|
|
25
20
|
For Accessibility guidelines refer to
|
package/.ai/components/field.md
CHANGED
package/.ai/components/icon.md
CHANGED
|
@@ -13,11 +13,6 @@ import { IressIcon } from '@iress-oss/ids-components';
|
|
|
13
13
|
<IressIcon name="home" />
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
import {
|
|
17
|
-
ComponentExample,
|
|
18
|
-
ComponentOverview,
|
|
19
|
-
} from '@iress-oss/ids-storybook-config';
|
|
20
|
-
|
|
21
16
|
## Installation
|
|
22
17
|
|
|
23
18
|
### Material Symbols
|
|
@@ -26,9 +21,10 @@ From version 6, the `IressIcon` component supports Material Symbols icons from G
|
|
|
26
21
|
|
|
27
22
|
#### Option 1: Automatic loading with `IressProvider` (recommended)
|
|
28
23
|
|
|
29
|
-
If you are already using the `IressProvider` component in your application, no further action is required as the Material Symbols font will be automatically loaded for you as it contains the `IressIconProvider` component.
|
|
24
|
+
If you are already using the `IressProvider` component in your application, no further action is required as the Material Symbols font will be automatically loaded for you as it contains the `IressIconProvider` component. The same applies if you are using `IressShadow`, which includes `IressProvider` internally.
|
|
30
25
|
|
|
31
26
|
```tsx
|
|
27
|
+
import { IressProvider } from '@iress-oss/ids-components';
|
|
32
28
|
|
|
33
29
|
<IressProvider>
|
|
34
30
|
<App />
|
|
@@ -46,7 +42,9 @@ The `IressProvider` component takes care of this for you when you use it with th
|
|
|
46
42
|
|
|
47
43
|
#### Option 2: Using the `IressIconProvider`
|
|
48
44
|
|
|
49
|
-
For more simpler applications, you can use the `IressIconProvider` directly.
|
|
45
|
+
For more simpler applications, or if you need to customise the icon provider independently, you can use the `IressIconProvider` directly.
|
|
46
|
+
|
|
47
|
+
> **Note:** If you are already using `IressProvider` or `IressShadow`, you do not need to add `IressIconProvider` separately — it is already included.
|
|
50
48
|
|
|
51
49
|
```tsx
|
|
52
50
|
const [showMoreIcons, setShowMoreIcons] = useState(false);
|
|
@@ -243,6 +241,7 @@ If you are using Microfrontends or Web Components that use Shadow DOM, you need
|
|
|
243
241
|
The easiest way to do this is to use the `IressIconProvider` component with the `container` prop.
|
|
244
242
|
|
|
245
243
|
```tsx
|
|
244
|
+
import { IressIconProvider, IressIcon as Icon } from '@iress/ids-components';
|
|
246
245
|
|
|
247
246
|
<IressIconProvider type="fontawesome" container={shadowRoot}>
|
|
248
247
|
<App />
|
|
@@ -256,6 +255,7 @@ The easiest way to do this is to use the `IressIconProvider` component with the
|
|
|
256
255
|
From version 6, the default icon type is Material Symbols. If you want to make Font Awesome the default icon type, you can wrap your application in the `IressIconProvider` component.
|
|
257
256
|
|
|
258
257
|
```tsx
|
|
258
|
+
import { IressIconProvider, IressIcon as Icon } from '@iress/ids-components';
|
|
259
259
|
|
|
260
260
|
// Export a version of IressIcon that uses Font Awesome by default for typing
|
|
261
261
|
export const IressIcon = Icon<'fontawesome'>;
|
package/.ai/components/image.md
CHANGED
|
@@ -13,11 +13,6 @@ import { IressImage } from '@iress-oss/ids-components';
|
|
|
13
13
|
<IressImage src="https://www.fdcbuilding.com.au/wp-content/webp-express/webp-images/uploads/2020/01/4-1.jpg.webp" alt="Placeholder image" />
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
import {
|
|
17
|
-
ComponentExample,
|
|
18
|
-
ComponentOverview,
|
|
19
|
-
} from '@iress-oss/ids-storybook-config';
|
|
20
|
-
|
|
21
16
|
## Examples
|
|
22
17
|
|
|
23
18
|
### MaxWidth
|
package/.ai/components/inline.md
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
InputCurrency component documentation.
|
|
4
4
|
|
|
5
|
-
> **Component:** `@iress-oss/ids-components`
|
|
6
5
|
> **Storybook:** [Recipes in Storybook](https://main--691abcc79dfa560a36d0a74f.chromatic.com/?path=/docs/components_components-input-currency--docs)
|
|
7
6
|
|
|
8
7
|
## Using IressInputCurrency in table
|
|
@@ -13,11 +13,6 @@ import { IressInputCurrency } from '@iress-oss/ids-components';
|
|
|
13
13
|
<IressInputCurrency defaultValue={12345.678} locale="en-AU" currencyCode="AUD" />
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
import {
|
|
17
|
-
ComponentExample,
|
|
18
|
-
ComponentOverview,
|
|
19
|
-
} from '@iress-oss/ids-storybook-config';
|
|
20
|
-
|
|
21
16
|
## Examples
|
|
22
17
|
|
|
23
18
|
### Different Locale and CurrencyCode
|
package/.ai/components/input.md
CHANGED
package/.ai/components/label.md
CHANGED
package/.ai/components/link.md
CHANGED
|
@@ -15,11 +15,6 @@ import { IressLink } from '@iress-oss/ids-components';
|
|
|
15
15
|
</IressLink>
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
import {
|
|
19
|
-
ComponentExample,
|
|
20
|
-
ComponentOverview,
|
|
21
|
-
} from '@iress-oss/ids-storybook-config';
|
|
22
|
-
|
|
23
18
|
## Usage
|
|
24
19
|
|
|
25
20
|
`IressLink` is an alternative to the `IressButton` component, and is used when you want to add interactive text inside a block of static text.
|
package/.ai/components/menu.md
CHANGED
package/.ai/components/modal.md
CHANGED
|
@@ -13,12 +13,20 @@ import { IressModal } from '@iress-oss/ids-components';
|
|
|
13
13
|
<IressModal heading="Modal Header" />
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
ComponentExample,
|
|
18
|
-
ComponentOverview,
|
|
19
|
-
} from '@iress-oss/ids-storybook-config';
|
|
16
|
+
## Usage
|
|
20
17
|
|
|
21
|
-
|
|
18
|
+
### Use a modal when
|
|
19
|
+
|
|
20
|
+
- Providing supplemental tasks required by the underlying page
|
|
21
|
+
- Providing non-essential information related to the underlying page
|
|
22
|
+
- Content requires full attention
|
|
23
|
+
|
|
24
|
+
### Avoid using a modal when
|
|
25
|
+
|
|
26
|
+
- Conveying brief messages about background processes or status changes. Instead use [IressAlert](https://main--691abcc79dfa560a36d0a74f.chromatic.com/?path=/docs/components_components-alert--docs) or [IressToaster](https://main--691abcc79dfa560a36d0a74f.chromatic.com/?path=/docs/components_components-toaster--docs).
|
|
27
|
+
- The modal content can be incorporated into the page without complicating the page's intent
|
|
28
|
+
|
|
29
|
+
For a full comparison of feedback components, see the [Feedback pattern](https://main--691abcc79dfa560a36d0a74f.chromatic.com/?path=/docs/components_patterns-feedback--docs).
|
|
22
30
|
|
|
23
31
|
### Using the `show` property
|
|
24
32
|
|
|
@@ -34,6 +42,8 @@ You can use state to control the modal by setting the `show` property to `true`
|
|
|
34
42
|
|
|
35
43
|
You can use the `IressModalProvider` to open and close modals from anywhere in your application, as long as the modal has a unique `id`. In this case you would use the `useModal` hook to open and close the modal.
|
|
36
44
|
|
|
45
|
+
> **Note:** If you are already using `IressProvider` or `IressShadow`, you do not need to add `IressModalProvider` separately — it is already included.
|
|
46
|
+
|
|
37
47
|
To use, wrap your `<App/>` or the component that you want to use the `useModal` hook with `<IressModalProvider />`.
|
|
38
48
|
|
|
39
49
|
```tsx
|
|
@@ -206,6 +216,8 @@ const { showModal } = useModal();
|
|
|
206
216
|
|
|
207
217
|
For your components to work as previously, you will need to set up the `IressModalProvider` at the root of your application. This will allow you to use the `useModal` hook to open and close modals from anywhere in your application using the ID of the modal.
|
|
208
218
|
|
|
219
|
+
> **Note:** If you are using `IressProvider` or `IressShadow`, you do not need to add `IressModalProvider` separately — it is already included.
|
|
220
|
+
|
|
209
221
|
```tsx
|
|
210
222
|
const App = () => <IressModalProvider>Rest of app here</IressModalProvider>;
|
|
211
223
|
```
|
package/.ai/components/panel.md
CHANGED
|
@@ -15,11 +15,6 @@ import { IressPanel } from '@iress-oss/ids-components';
|
|
|
15
15
|
</IressPanel>
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
import {
|
|
19
|
-
ComponentExample,
|
|
20
|
-
ComponentOverview,
|
|
21
|
-
} from '@iress-oss/ids-storybook-config';
|
|
22
|
-
|
|
23
18
|
## Usage
|
|
24
19
|
|
|
25
20
|
`IressPanel` uses `IressCard` under the hood, so it inherits all of the same props and styling options. It is purely a semantic component that provides a more specific name for grouping related content together.
|
package/.ai/components/pill.md
CHANGED
|
@@ -15,11 +15,6 @@ import { IressPill } from '@iress-oss/ids-components';
|
|
|
15
15
|
</IressPill>
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
import {
|
|
19
|
-
ComponentOverview,
|
|
20
|
-
ComponentExample,
|
|
21
|
-
} from '@iress-oss/ids-storybook-config';
|
|
22
|
-
|
|
23
18
|
## When to use
|
|
24
19
|
|
|
25
20
|
Use pills for **status indication and notifications** where information needs to be highlighted:
|
|
@@ -13,11 +13,6 @@ import { IressProgress } from '@iress-oss/ids-components';
|
|
|
13
13
|
<IressProgress min={10} max={30} value={20} />
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
import {
|
|
17
|
-
ComponentOverview,
|
|
18
|
-
ComponentExample,
|
|
19
|
-
} from '@iress-oss/ids-storybook-config';
|
|
20
|
-
|
|
21
16
|
## Usage
|
|
22
17
|
|
|
23
18
|
Progress shows how far through a task or operation you are in a graphical way. The simplest way to use it to set the `value` to specify how much of the task the user has completed, relative to the `max` value (which defaults to 100).
|
|
@@ -22,7 +22,10 @@ The design system provider automates some set-up tasks for you, including:
|
|
|
22
22
|
|
|
23
23
|
In most cases, you should wrap the entire application with the `IressProvider` component. This will ensure that the design system is set up correctly and consistently across the application.
|
|
24
24
|
|
|
25
|
+
> **Note:** `IressProvider` already includes `IressModalProvider`, `IressSlideoutProvider`, `IressToasterProvider`, and `IressIconProvider`. You do not need to add these providers separately when using `IressProvider`. Similarly, `IressShadow` includes `IressProvider` internally, so you do not need any additional providers when using `IressShadow`.
|
|
26
|
+
|
|
25
27
|
```tsx
|
|
28
|
+
import { IressProvider } from '@iress-oss/ids-components';
|
|
26
29
|
|
|
27
30
|
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
28
31
|
<IressProvider>
|
package/.ai/components/radio.md
CHANGED
|
@@ -13,11 +13,6 @@ import { IressReadonly } from '@iress-oss/ids-components';
|
|
|
13
13
|
<IressReadonly value="AU" />
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
import {
|
|
17
|
-
ComponentExample,
|
|
18
|
-
ComponentOverview,
|
|
19
|
-
} from '@iress-oss/ids-storybook-config';
|
|
20
|
-
|
|
21
16
|
## Examples
|
|
22
17
|
|
|
23
18
|
### Rich Content
|
|
@@ -36,6 +31,16 @@ You can make the prepend/append element closer to the input content using the `i
|
|
|
36
31
|
|
|
37
32
|
[View "InlineStyle" example in Storybook →](https://main--691abcc79dfa560a36d0a74f.chromatic.com/?path=/story/components_components-readonly--inline-style)
|
|
38
33
|
|
|
34
|
+
### Actions
|
|
35
|
+
|
|
36
|
+
The `actions` prop allows you to add buttons next to the readonly field. These can be used to trigger actions related to the displayed value, such as copying it to the clipboard or opening an edit dialog.
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
<ReadonlyEditToggle />
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
[View "Actions" example in Storybook →](https://main--691abcc79dfa560a36d0a74f.chromatic.com/?path=/story/components_components-readonly--actions)
|
|
43
|
+
|
|
39
44
|
## Props
|
|
40
45
|
|
|
41
46
|
- **Type:** `IressReadonlyProps`
|
package/.ai/components/row.md
CHANGED
|
@@ -13,11 +13,6 @@ import { IressRow } from '@iress-oss/ids-components';
|
|
|
13
13
|
<IressRow gutter="spacing.7" horizontalAlign="left" verticalAlign="top" />
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
import {
|
|
17
|
-
ComponentExample,
|
|
18
|
-
ComponentOverview,
|
|
19
|
-
} from '@iress-oss/ids-storybook-config';
|
|
20
|
-
|
|
21
16
|
## Usage
|
|
22
17
|
|
|
23
18
|
`IressRow` supports visual hierarchy by allowing you to add multiple columns in your layout, allowing the user to see more content on the screen at the same time.
|