@salesforce/design-system-react 11.0.0-rc.1 → 11.0.0-rc.2
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 +10 -2
- package/dist/cjs/components/accordion/index.cjs +1 -1
- package/dist/cjs/components/accordion/index.cjs.map +1 -1
- package/dist/cjs/components/accordion/panel.cjs.map +1 -1
- package/dist/cjs/components/builder-header/nav-dropdown.cjs.map +1 -1
- package/dist/cjs/components/builder-header/nav-link.cjs.map +1 -1
- package/dist/cjs/components/builder-header/toolbar.cjs.map +1 -1
- package/dist/cjs/components/button/index.cjs.map +1 -1
- package/dist/cjs/components/button-stateful/index.cjs.map +1 -1
- package/dist/cjs/components/checkbox/index.cjs.map +1 -1
- package/dist/cjs/components/color-picker/color-picker.cjs.map +1 -1
- package/dist/cjs/components/combobox/combobox.cjs +1 -1
- package/dist/cjs/components/combobox/combobox.cjs.map +1 -1
- package/dist/cjs/components/date-picker/date-picker.cjs +1 -1
- package/dist/cjs/components/date-picker/date-picker.cjs.map +1 -1
- package/dist/cjs/components/date-picker/index.cjs.map +1 -1
- package/dist/cjs/components/files/file.cjs.map +1 -1
- package/dist/cjs/components/icon/index.cjs.map +1 -1
- package/dist/cjs/components/icon/input-icon/index.cjs.map +1 -1
- package/dist/cjs/components/icon-settings/index.cjs.map +1 -1
- package/dist/cjs/components/input/index.cjs.map +1 -1
- package/dist/cjs/components/input/private/inner-input.cjs.map +1 -1
- package/dist/cjs/components/menu-dropdown/button-trigger.cjs.map +1 -1
- package/dist/cjs/components/menu-dropdown/menu-dropdown.cjs.map +1 -1
- package/dist/cjs/components/modal/index.cjs.map +1 -1
- package/dist/cjs/components/panel/filtering/group.cjs.map +1 -1
- package/dist/cjs/components/pill/index.cjs.map +1 -1
- package/dist/cjs/components/popover/edit-dialog.cjs.map +1 -1
- package/dist/cjs/components/popover/popover.cjs.map +1 -1
- package/dist/cjs/components/progress-indicator/index.cjs.map +1 -1
- package/dist/cjs/components/progress-ring/index.cjs.map +1 -1
- package/dist/cjs/components/radio/index.cjs.map +1 -1
- package/dist/cjs/components/radio-group/check-props.cjs.map +1 -1
- package/dist/cjs/components/radio-group/index.cjs.map +1 -1
- package/dist/cjs/components/scoped-notification/index.cjs.map +1 -1
- package/dist/cjs/components/setup-assistant/step.cjs.map +1 -1
- package/dist/cjs/components/slider/index.cjs.map +1 -1
- package/dist/cjs/components/split-view/header.cjs.map +1 -1
- package/dist/cjs/components/tabs/index.cjs.map +1 -1
- package/dist/cjs/components/tabs/panel.cjs.map +1 -1
- package/dist/cjs/components/textarea/index.cjs +1 -1
- package/dist/cjs/components/textarea/index.cjs.map +1 -1
- package/dist/cjs/components/tooltip/index.cjs.map +1 -1
- package/dist/cjs/components/tree/tree.cjs.map +1 -1
- package/dist/cjs/components/trial-bar/button.cjs.map +1 -1
- package/dist/cjs/components/trial-bar/dropdown.cjs.map +1 -1
- package/dist/cjs/components/utilities/menu-list/item-label.cjs.map +1 -1
- package/dist/cjs/utilities/get-component-doc.cjs +1 -1
- package/dist/cjs/utilities/get-component-doc.cjs.map +1 -1
- package/dist/cjs/utilities/warning/children-as-trigger.cjs +1 -1
- package/dist/cjs/utilities/warning/children-as-trigger.cjs.map +1 -1
- package/dist/cjs/utilities/warning/deprecated-property-value.cjs +1 -1
- package/dist/cjs/utilities/warning/deprecated-property-value.cjs.map +1 -1
- package/dist/cjs/utilities/warning/deprecated-property.cjs +1 -1
- package/dist/cjs/utilities/warning/deprecated-property.cjs.map +1 -1
- package/dist/cjs/utilities/warning/removal-version.cjs +2 -0
- package/dist/cjs/utilities/warning/removal-version.cjs.map +1 -0
- package/dist/es/components/accordion/index.js +7 -3
- package/dist/es/components/accordion/index.js.map +1 -1
- package/dist/es/components/accordion/panel.js.map +1 -1
- package/dist/es/components/builder-header/nav-dropdown.js.map +1 -1
- package/dist/es/components/builder-header/nav-link.js.map +1 -1
- package/dist/es/components/builder-header/toolbar.js.map +1 -1
- package/dist/es/components/button/index.js.map +1 -1
- package/dist/es/components/button-stateful/index.js.map +1 -1
- package/dist/es/components/checkbox/index.js.map +1 -1
- package/dist/es/components/color-picker/color-picker.js.map +1 -1
- package/dist/es/components/combobox/combobox.js +4 -2
- package/dist/es/components/combobox/combobox.js.map +1 -1
- package/dist/es/components/date-picker/date-picker.js +1 -1
- package/dist/es/components/date-picker/date-picker.js.map +1 -1
- package/dist/es/components/date-picker/index.js.map +1 -1
- package/dist/es/components/files/file.js.map +1 -1
- package/dist/es/components/icon/index.js.map +1 -1
- package/dist/es/components/icon/input-icon/index.js.map +1 -1
- package/dist/es/components/icon-settings/index.js.map +1 -1
- package/dist/es/components/input/index.js.map +1 -1
- package/dist/es/components/input/private/inner-input.js.map +1 -1
- package/dist/es/components/menu-dropdown/button-trigger.js.map +1 -1
- package/dist/es/components/menu-dropdown/menu-dropdown.js.map +1 -1
- package/dist/es/components/modal/index.js.map +1 -1
- package/dist/es/components/panel/filtering/group.js.map +1 -1
- package/dist/es/components/pill/index.js.map +1 -1
- package/dist/es/components/popover/edit-dialog.js.map +1 -1
- package/dist/es/components/popover/popover.js.map +1 -1
- package/dist/es/components/progress-indicator/index.js.map +1 -1
- package/dist/es/components/progress-ring/index.js.map +1 -1
- package/dist/es/components/radio/index.js.map +1 -1
- package/dist/es/components/radio-group/check-props.js.map +1 -1
- package/dist/es/components/radio-group/index.js.map +1 -1
- package/dist/es/components/scoped-notification/index.js.map +1 -1
- package/dist/es/components/setup-assistant/step.js.map +1 -1
- package/dist/es/components/slider/index.js.map +1 -1
- package/dist/es/components/split-view/header.js.map +1 -1
- package/dist/es/components/tabs/index.js.map +1 -1
- package/dist/es/components/tabs/panel.js.map +1 -1
- package/dist/es/components/textarea/index.js +29 -44
- package/dist/es/components/textarea/index.js.map +1 -1
- package/dist/es/components/tooltip/index.js.map +1 -1
- package/dist/es/components/tree/tree.js.map +1 -1
- package/dist/es/components/trial-bar/button.js.map +1 -1
- package/dist/es/components/trial-bar/dropdown.js.map +1 -1
- package/dist/es/components/utilities/menu-list/item-label.js.map +1 -1
- package/dist/es/utilities/get-component-doc.js +6 -6
- package/dist/es/utilities/get-component-doc.js.map +1 -1
- package/dist/es/utilities/warning/children-as-trigger.js +9 -8
- package/dist/es/utilities/warning/children-as-trigger.js.map +1 -1
- package/dist/es/utilities/warning/deprecated-property-value.js +11 -10
- package/dist/es/utilities/warning/deprecated-property-value.js.map +1 -1
- package/dist/es/utilities/warning/deprecated-property.js +9 -8
- package/dist/es/utilities/warning/deprecated-property.js.map +1 -1
- package/dist/es/utilities/warning/removal-version.js +6 -0
- package/dist/es/utilities/warning/removal-version.js.map +1 -0
- package/dist/llms/components/accordion.md +267 -0
- package/dist/llms/components/alert.md +228 -0
- package/dist/llms/components/avatar.md +167 -0
- package/dist/llms/components/badge.md +153 -0
- package/dist/llms/components/breadcrumb.md +148 -0
- package/dist/llms/components/builder-header.examples.md +239 -0
- package/dist/llms/components/builder-header.md +736 -0
- package/dist/llms/components/button-group.md +167 -0
- package/dist/llms/components/button-stateful.md +246 -0
- package/dist/llms/components/button.md +661 -0
- package/dist/llms/components/card.md +368 -0
- package/dist/llms/components/carousel.md +365 -0
- package/dist/llms/components/checkbox.md +887 -0
- package/dist/llms/components/color-picker.md +591 -0
- package/dist/llms/components/combobox.examples.md +802 -0
- package/dist/llms/components/combobox.md +929 -0
- package/dist/llms/components/date-picker.md +546 -0
- package/dist/llms/components/docked-composer.md +173 -0
- package/dist/llms/components/dynamic-icon.md +226 -0
- package/dist/llms/components/expandable-section.md +198 -0
- package/dist/llms/components/files.md +337 -0
- package/dist/llms/components/filter.md +775 -0
- package/dist/llms/components/icon-settings.md +301 -0
- package/dist/llms/components/icon.md +1040 -0
- package/dist/llms/components/input.md +746 -0
- package/dist/llms/components/media-object.md +125 -0
- package/dist/llms/components/menu-dropdown.md +732 -0
- package/dist/llms/components/modal.md +504 -0
- package/dist/llms/components/page-header.md +282 -0
- package/dist/llms/components/panel.md +256 -0
- package/dist/llms/components/pill-container.md +218 -0
- package/dist/llms/components/pill.md +266 -0
- package/dist/llms/components/popover.md +600 -0
- package/dist/llms/components/portal-settings.md +371 -0
- package/dist/llms/components/progress-bar.md +175 -0
- package/dist/llms/components/progress-indicator.md +399 -0
- package/dist/llms/components/progress-ring.md +146 -0
- package/dist/llms/components/radio-button-group.md +285 -0
- package/dist/llms/components/radio-group.md +242 -0
- package/dist/llms/components/radio.md +269 -0
- package/dist/llms/components/scoped-notification.md +156 -0
- package/dist/llms/components/setup-assistant.md +398 -0
- package/dist/llms/components/simple-data-table.examples.md +2773 -0
- package/dist/llms/components/simple-data-table.md +919 -0
- package/dist/llms/components/slider.md +217 -0
- package/dist/llms/components/spinner.md +232 -0
- package/dist/llms/components/split-view.md +350 -0
- package/dist/llms/components/tabs.md +311 -0
- package/dist/llms/components/textarea.md +331 -0
- package/dist/llms/components/toast.md +267 -0
- package/dist/llms/components/tooltip.md +470 -0
- package/dist/llms/components/tree.md +1011 -0
- package/dist/llms/components/trial-bar.md +383 -0
- package/dist/llms/components/vertical-navigation.md +196 -0
- package/dist/llms/components/visual-picker.md +362 -0
- package/dist/llms/components/welcome-mat.md +885 -0
- package/dist/llms/docs/migration-v11.md +471 -0
- package/dist/llms/llms-full.txt +6874 -0
- package/dist/llms/llms.txt +133 -0
- package/dist/llms/rules.md +36 -0
- package/dist/types/components/accordion/index.d.ts.map +1 -1
- package/dist/types/components/accordion/panel.d.ts +7 -7
- package/dist/types/components/builder-header/nav-dropdown.d.ts +1 -0
- package/dist/types/components/builder-header/nav-dropdown.d.ts.map +1 -1
- package/dist/types/components/builder-header/nav-link.d.ts +0 -1
- package/dist/types/components/builder-header/nav-link.d.ts.map +1 -1
- package/dist/types/components/builder-header/toolbar.d.ts +0 -1
- package/dist/types/components/builder-header/toolbar.d.ts.map +1 -1
- package/dist/types/components/button/index.d.ts +6 -3
- package/dist/types/components/button/index.d.ts.map +1 -1
- package/dist/types/components/button-stateful/index.d.ts +4 -1
- package/dist/types/components/button-stateful/index.d.ts.map +1 -1
- package/dist/types/components/checkbox/index.d.ts +19 -5
- package/dist/types/components/checkbox/index.d.ts.map +1 -1
- package/dist/types/components/color-picker/color-picker.d.ts +6 -4
- package/dist/types/components/color-picker/color-picker.d.ts.map +1 -1
- package/dist/types/components/color-picker/types.d.ts +2 -2
- package/dist/types/components/combobox/combobox.d.ts +22 -0
- package/dist/types/components/combobox/combobox.d.ts.map +1 -1
- package/dist/types/components/date-picker/date-picker.d.ts +16 -4
- package/dist/types/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/types/components/date-picker/index.d.ts +2 -6
- package/dist/types/components/date-picker/index.d.ts.map +1 -1
- package/dist/types/components/files/file.d.ts +1 -1
- package/dist/types/components/icon/index.d.ts +1 -0
- package/dist/types/components/icon/index.d.ts.map +1 -1
- package/dist/types/components/icon/input-icon/index.d.ts +3 -0
- package/dist/types/components/icon/input-icon/index.d.ts.map +1 -1
- package/dist/types/components/icon-settings/index.d.ts.map +1 -1
- package/dist/types/components/input/index.d.ts +2 -1
- package/dist/types/components/input/index.d.ts.map +1 -1
- package/dist/types/components/menu-dropdown/button-trigger.d.ts +5 -0
- package/dist/types/components/menu-dropdown/button-trigger.d.ts.map +1 -1
- package/dist/types/components/menu-dropdown/menu-dropdown.d.ts +4 -0
- package/dist/types/components/menu-dropdown/menu-dropdown.d.ts.map +1 -1
- package/dist/types/components/modal/index.d.ts +5 -5
- package/dist/types/components/page-header/types.d.ts +3 -0
- package/dist/types/components/page-header/types.d.ts.map +1 -1
- package/dist/types/components/panel/filtering/group.d.ts +2 -0
- package/dist/types/components/panel/filtering/group.d.ts.map +1 -1
- package/dist/types/components/pill/index.d.ts +1 -0
- package/dist/types/components/pill/index.d.ts.map +1 -1
- package/dist/types/components/popover/edit-dialog.d.ts +1 -3
- package/dist/types/components/popover/edit-dialog.d.ts.map +1 -1
- package/dist/types/components/popover/popover.d.ts +1 -0
- package/dist/types/components/popover/popover.d.ts.map +1 -1
- package/dist/types/components/progress-indicator/index.d.ts +1 -0
- package/dist/types/components/progress-indicator/index.d.ts.map +1 -1
- package/dist/types/components/progress-ring/index.d.ts +1 -0
- package/dist/types/components/progress-ring/index.d.ts.map +1 -1
- package/dist/types/components/radio/index.d.ts +2 -2
- package/dist/types/components/radio/index.d.ts.map +1 -1
- package/dist/types/components/radio-group/index.d.ts +2 -0
- package/dist/types/components/radio-group/index.d.ts.map +1 -1
- package/dist/types/components/scoped-notification/index.d.ts +1 -0
- package/dist/types/components/scoped-notification/index.d.ts.map +1 -1
- package/dist/types/components/setup-assistant/step.d.ts +0 -1
- package/dist/types/components/setup-assistant/step.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/types.d.ts +1 -0
- package/dist/types/components/simple-data-table/types.d.ts.map +1 -1
- package/dist/types/components/slider/index.d.ts +4 -2
- package/dist/types/components/slider/index.d.ts.map +1 -1
- package/dist/types/components/tabs/index.d.ts +1 -0
- package/dist/types/components/tabs/index.d.ts.map +1 -1
- package/dist/types/components/tabs/panel.d.ts +2 -1
- package/dist/types/components/tabs/panel.d.ts.map +1 -1
- package/dist/types/components/textarea/index.d.ts +9 -40
- package/dist/types/components/textarea/index.d.ts.map +1 -1
- package/dist/types/components/tooltip/index.d.ts +5 -0
- package/dist/types/components/tooltip/index.d.ts.map +1 -1
- package/dist/types/components/tree/tree.d.ts +5 -0
- package/dist/types/components/tree/tree.d.ts.map +1 -1
- package/dist/types/components/utilities/menu-list/item-label.d.ts +12 -0
- package/dist/types/components/utilities/menu-list/item-label.d.ts.map +1 -1
- package/package.json +8 -5
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# @salesforce/design-system-react 11.0.0-rc.2
|
|
2
|
+
|
|
3
|
+
> React 19 components for the Salesforce Lightning Design System (SLDS 2), written in TypeScript. These docs are generated from the package's `.d.ts` files and examples for version 11.0.0-rc.2. The 0.10.x API differs: when this file and your memory of the library disagree, this file is right.
|
|
4
|
+
|
|
5
|
+
Install (this version is published under the `rc` dist-tag; a plain install gives 0.10.x):
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @salesforce/design-system-react@rc
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Import from the package root, or from one component entry point:
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { Button, IconSettings } from '@salesforce/design-system-react';
|
|
15
|
+
import Button from '@salesforce/design-system-react/components/button';
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Inside a project that installs the package, these files are also at `node_modules/@salesforce/design-system-react/dist/llms/`. The quick start and rules below are also in [rules.md](https://opensource.salesforce.com/design-system-react/rules.md), to copy into `AGENTS.md` or an editor's rules file.
|
|
19
|
+
|
|
20
|
+
## Quick start
|
|
21
|
+
|
|
22
|
+
The components don't ship CSS or icons. Load an SLDS 2 stylesheet, set a color scheme, and serve the SLDS icon sprites: copy `node_modules/@salesforce-ux/design-system/assets/icons` to `public/assets/icons`.
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
// src/main.tsx
|
|
26
|
+
import { StrictMode } from 'react';
|
|
27
|
+
import { createRoot } from 'react-dom/client';
|
|
28
|
+
import { IconSettings, Settings } from '@salesforce/design-system-react';
|
|
29
|
+
import '@salesforce-ux/design-system-2/dist/css/bundled/slds2.cosmos.css';
|
|
30
|
+
import App from './App';
|
|
31
|
+
|
|
32
|
+
document.body.classList.add('slds-color-scheme--system');
|
|
33
|
+
// Modal hides the rest of the app from screen readers while it is open.
|
|
34
|
+
Settings.setAppElement('#root');
|
|
35
|
+
|
|
36
|
+
createRoot(document.getElementById('root')!).render(
|
|
37
|
+
<StrictMode>
|
|
38
|
+
<IconSettings iconPath="/assets/icons">
|
|
39
|
+
<App />
|
|
40
|
+
</IconSettings>
|
|
41
|
+
</StrictMode>
|
|
42
|
+
);
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Rules
|
|
46
|
+
|
|
47
|
+
- **Callbacks are `(event, data)`.** Read the new value from `data`, for example `onChange={(event, { checked }) => setChecked(checked)}`. The props tables list the fields of `data`.
|
|
48
|
+
- **Data props are controlled.** Pass `value`, `checked` or `selection`, and update it in the callback. Without the update, the component does not change. On most popups (Combobox, MenuDropdown, Popover, Tooltip) `isOpen` can be uncontrolled: leave it out, or set `defaultIsOpen`. `Modal` requires `isOpen`: keep it in state and set it to `false` in `onRequestClose`.
|
|
49
|
+
- **Some components take an `events` object** instead of `on*` props: Combobox, ColorPicker, PillContainer, SplitView, BuilderHeader and DockedComposer. For example, `events={{ onSelect: (event, { selection }) => setSelection(selection) }}`.
|
|
50
|
+
- **Every control needs a label.** Use `labels.label` (or `label`) for a visible label, or `assistiveText.label` when the label is visually hidden. Icon-only buttons need `assistiveText.icon`.
|
|
51
|
+
- **Use SLDS utility classes for layout**, for example `slds-grid`, `slds-col`, `slds-gutters`, `slds-p-around_medium` and `slds-m-bottom_small`. Don't write CSS for layout that a utility class covers.
|
|
52
|
+
- **Don't override component internals** (SLDS class names inside a component). Use SLDS 2 styling hooks (`--slds-g-*` and `--slds-c-*` custom properties) for color, spacing and typography.
|
|
53
|
+
- **Don't use a deprecated prop.** The props tables mark each one and name its replacement. Use the replacement.
|
|
54
|
+
- **Import types from the component entry point**, for example `import type { ComboboxProps } from '@salesforce/design-system-react/components/combobox';`.
|
|
55
|
+
- **Ignore the `SLDS<Name>` exports** (`SLDSButton`). They are older names for the same components.
|
|
56
|
+
|
|
57
|
+
## Guides
|
|
58
|
+
|
|
59
|
+
- [Migrating from 0.10.x](https://opensource.salesforce.com/design-system-react/docs/migration-v11.md): each 0.10.x pattern and its v11 replacement. Read it before you change 0.10.x code, or code written from memory of the 0.10.x API.
|
|
60
|
+
|
|
61
|
+
## Components
|
|
62
|
+
|
|
63
|
+
### App setup
|
|
64
|
+
|
|
65
|
+
- [IconSettings](https://opensource.salesforce.com/design-system-react/components/icon-settings.md): The Icon Settings component allows for the path to the icons to be specified in all child components and is recommended to be used at the root of the application.
|
|
66
|
+
- [PortalSettings](https://opensource.salesforce.com/design-system-react/components/portal-settings.md): The Portal Settings component allows for the portal parent node to be specified in all child components and is recommended to be used at the root of the application.
|
|
67
|
+
|
|
68
|
+
### Forms
|
|
69
|
+
|
|
70
|
+
- [Button](https://opensource.salesforce.com/design-system-react/components/button.md): The Button component is the Lightning Design System Button component.
|
|
71
|
+
- [ButtonGroup](https://opensource.salesforce.com/design-system-react/components/button-group.md): The ButtonGroup component wraps other components (Button, MenuDropdown, Checkbox, etc).
|
|
72
|
+
- [ButtonStateful](https://opensource.salesforce.com/design-system-react/components/button-stateful.md): The ButtonStateful component is a variant of the Lightning Design System Button component.
|
|
73
|
+
- [Checkbox](https://opensource.salesforce.com/design-system-react/components/checkbox.md): A checkbox, a toggle (`variant="toggle"`) or a button-group checkbox (`variant="button-group"`).
|
|
74
|
+
- [ColorPicker](https://opensource.salesforce.com/design-system-react/components/color-picker.md): The Unified Color Picker component allows for a fully accessible and configurable color picker, allowing the user to pick from a set of predefined colors (swatches), or to pick a custom color using a HSB selection interface.
|
|
75
|
+
- [Combobox](https://opensource.salesforce.com/design-system-react/components/combobox.md): An input field that is either an autocomplete or read-only, with a listbox of predefined options. Also: comboboxFilterAndLimit, comboboxAddSubheadings.
|
|
76
|
+
- [DatePicker](https://opensource.salesforce.com/design-system-react/components/date-picker.md): A date input with a calendar popover.
|
|
77
|
+
- [Input](https://opensource.salesforce.com/design-system-react/components/input.md): The HTML `input` with a label and error messaging. Also: InputSearch.
|
|
78
|
+
- [Radio](https://opensource.salesforce.com/design-system-react/components/radio.md): A radio input that can have a single input checked at any one time.
|
|
79
|
+
- [RadioButtonGroup](https://opensource.salesforce.com/design-system-react/components/radio-button-group.md): A styled select list that can have a single entry checked at any one time.
|
|
80
|
+
- [RadioGroup](https://opensource.salesforce.com/design-system-react/components/radio-group.md): A styled select list that can have a single entry checked at any one time.
|
|
81
|
+
- [Slider](https://opensource.salesforce.com/design-system-react/components/slider.md): A range input to select a number between `min` and `max`.
|
|
82
|
+
- [Textarea](https://opensource.salesforce.com/design-system-react/components/textarea.md): A multi-line plain-text editing control.
|
|
83
|
+
- [VisualPicker](https://opensource.salesforce.com/design-system-react/components/visual-picker.md): Visual Picker allows users to select an option from a set of visual choices. Also: VisualPickerLink.
|
|
84
|
+
|
|
85
|
+
### Data display
|
|
86
|
+
|
|
87
|
+
- [Avatar](https://opensource.salesforce.com/design-system-react/components/avatar.md): The Avatar component represents an object or entity.
|
|
88
|
+
- [Badge](https://opensource.salesforce.com/design-system-react/components/badge.md): Badges are labels which hold small amounts of information.
|
|
89
|
+
- [Card](https://opensource.salesforce.com/design-system-react/components/card.md): Cards are used to apply a container around a related grouping of information. Also: CardEmpty, CardFilter.
|
|
90
|
+
- [Carousel](https://opensource.salesforce.com/design-system-react/components/carousel.md): A carousel allows multiple pieces of featured content to occupy an allocated amount of space.
|
|
91
|
+
- [DynamicIcon](https://opensource.salesforce.com/design-system-react/components/dynamic-icon.md): A set of delightful animated icons.
|
|
92
|
+
- [Files](https://opensource.salesforce.com/design-system-react/components/files.md): Files is a component that wraps multiple file components that represent attachments. Also: File, FilesMoreFiles.
|
|
93
|
+
- [Icon](https://opensource.salesforce.com/design-system-react/components/icon.md): The Icon component is the Lightning Design System Icon component and should be used for naked icons. Also: ButtonIcon, InputIcon.
|
|
94
|
+
- [MediaObject](https://opensource.salesforce.com/design-system-react/components/media-object.md): When you need text and a figure next to each other, use a media object.
|
|
95
|
+
- [Pill](https://opensource.salesforce.com/design-system-react/components/pill.md): A pill displays a label that can contain links and can be removed from view.
|
|
96
|
+
- [PillContainer](https://opensource.salesforce.com/design-system-react/components/pill-container.md): A PillContainer is a container that holds one or more pills.
|
|
97
|
+
- [ProgressBar](https://opensource.salesforce.com/design-system-react/components/progress-bar.md): A progress bar component communicates to the user the progress of a particular process.
|
|
98
|
+
- [ProgressIndicator](https://opensource.salesforce.com/design-system-react/components/progress-indicator.md): Progress Indicator communicates to the user the progress of a particular process.
|
|
99
|
+
- [ProgressRing](https://opensource.salesforce.com/design-system-react/components/progress-ring.md): Customizable progress ring displaying progress in a circular format.
|
|
100
|
+
- [SimpleDataTable](https://opensource.salesforce.com/design-system-react/components/simple-data-table.md): SimpleDataTables support the display of structured data in rows and columns with an HTML table. Also: SimpleDataTableCell, SimpleDataTableColumn, SimpleDataTableHighlightCell, SimpleDataTableInteractiveElement, SimpleDataTableInteractiveLink, SimpleDataTableRowActions.
|
|
101
|
+
- [Tree](https://opensource.salesforce.com/design-system-react/components/tree.md): A tree is visualization of a structure hierarchy.
|
|
102
|
+
|
|
103
|
+
### Overlays and feedback
|
|
104
|
+
|
|
105
|
+
- [Alert](https://opensource.salesforce.com/design-system-react/components/alert.md): Alert banners communicate a state that affects the entire system, not just a feature or page. Also: AlertContainer.
|
|
106
|
+
- [DockedComposer](https://opensource.salesforce.com/design-system-react/components/docked-composer.md): The Docked Composer is a persistent utility bar that allows a user to continually use the app to complete tasks or gather information while expanding/collapsing a composer window.
|
|
107
|
+
- [Modal](https://opensource.salesforce.com/design-system-react/components/modal.md): The Modal component is used for the Lightning Design System Modal and Notification > Prompt components.
|
|
108
|
+
- [Popover](https://opensource.salesforce.com/design-system-react/components/popover.md): The Popover component is a non-modal dialog. Also: EditDialog.
|
|
109
|
+
- [ScopedNotification](https://opensource.salesforce.com/design-system-react/components/scoped-notification.md): Scoped Notification serves advisory information for the user that is not important enough to justify an alert.
|
|
110
|
+
- [Spinner](https://opensource.salesforce.com/design-system-react/components/spinner.md): Spinners are CSS loading indicators that should be shown when retrieving data or performing slow computations.
|
|
111
|
+
- [Toast](https://opensource.salesforce.com/design-system-react/components/toast.md): Toast serves as a feedback & confirmation mechanism after the user takes an action. Also: ToastContainer.
|
|
112
|
+
- [Tooltip](https://opensource.salesforce.com/design-system-react/components/tooltip.md): The Tooltip component is a variant of the Lightning Design System Popover component.
|
|
113
|
+
- [WelcomeMat](https://opensource.salesforce.com/design-system-react/components/welcome-mat.md): A Welcome Mat provides a series of unordered items a user can click to learn about a thematic topic. Also: WelcomeMatInfoBadge, WelcomeMatTile.
|
|
114
|
+
|
|
115
|
+
### Navigation and layout
|
|
116
|
+
|
|
117
|
+
- [Accordion](https://opensource.salesforce.com/design-system-react/components/accordion.md): An accordion allows a user to toggle the display of sections of content. Also: AccordionPanel.
|
|
118
|
+
- [Breadcrumb](https://opensource.salesforce.com/design-system-react/components/breadcrumb.md): Use breadcrumbs to note the path of a record and help the user navigate back to the parent.
|
|
119
|
+
- [BuilderHeader](https://opensource.salesforce.com/design-system-react/components/builder-header.md): Every builder needs a builder header, which contains basic navigation elements. Also: BuilderHeaderMisc, BuilderHeaderNav, BuilderHeaderNavDropdown, BuilderHeaderNavLink, BuilderHeaderToolbar, BuilderHeaderUtilities.
|
|
120
|
+
- [ExpandableSection](https://opensource.salesforce.com/design-system-react/components/expandable-section.md): Toggle visibility of section content with the Expandable Section
|
|
121
|
+
- [Filter](https://opensource.salesforce.com/design-system-react/components/filter.md): A Filter is a popover with custom trigger.
|
|
122
|
+
- [MenuDropdown](https://opensource.salesforce.com/design-system-react/components/menu-dropdown.md): The MenuDropdown component is a variant of the Lightning Design System Menu component. Also: DropdownTrigger.
|
|
123
|
+
- [PageHeader](https://opensource.salesforce.com/design-system-react/components/page-header.md): The PageHeader component adds PageHeader with multiple variants: base, object-home, record-home, and related-list. Also: PageHeaderControl.
|
|
124
|
+
- [Panel](https://opensource.salesforce.com/design-system-react/components/panel.md): A panel provides detailed contextual information or contextual filtering options. Also: PanelFilterGroup, PanelFilterList, PanelFilterListHeading.
|
|
125
|
+
- [SetupAssistant](https://opensource.salesforce.com/design-system-react/components/setup-assistant.md): Setup Assistant provides Administrators with a centralized list of tasks for onboarding organizations, clouds, or features within the Salesforce Platform. Also: SetupAssistantStep.
|
|
126
|
+
- [SplitView](https://opensource.salesforce.com/design-system-react/components/split-view.md): Split view is used to navigate between records in a list while staying on the same screen. Also: SplitViewHeader, SplitViewListbox.
|
|
127
|
+
- [Tabs](https://opensource.salesforce.com/design-system-react/components/tabs.md): Tabs keeps related content in a single container that is shown and hidden through navigation. Also: TabsPanel.
|
|
128
|
+
- [TrialBar](https://opensource.salesforce.com/design-system-react/components/trial-bar.md): Trial bar components are used to provide an interactive and educational prospect experience for setup. Also: TrialBarButton, TrialBarDropdown.
|
|
129
|
+
- [VerticalNavigation](https://opensource.salesforce.com/design-system-react/components/vertical-navigation.md): Vertical Navigation represents a list of links that either take the user to another page or parts of the page the user is in.
|
|
130
|
+
|
|
131
|
+
## Optional
|
|
132
|
+
|
|
133
|
+
- [llms-full.txt](https://opensource.salesforce.com/design-system-react/llms-full.txt): the description, imports and props of every component in this index, with one example each, in one file. The component files above add the type declarations and every Storybook story.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
## Quick start
|
|
2
|
+
|
|
3
|
+
The components don't ship CSS or icons. Load an SLDS 2 stylesheet, set a color scheme, and serve the SLDS icon sprites: copy `node_modules/@salesforce-ux/design-system/assets/icons` to `public/assets/icons`.
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
// src/main.tsx
|
|
7
|
+
import { StrictMode } from 'react';
|
|
8
|
+
import { createRoot } from 'react-dom/client';
|
|
9
|
+
import { IconSettings, Settings } from '@salesforce/design-system-react';
|
|
10
|
+
import '@salesforce-ux/design-system-2/dist/css/bundled/slds2.cosmos.css';
|
|
11
|
+
import App from './App';
|
|
12
|
+
|
|
13
|
+
document.body.classList.add('slds-color-scheme--system');
|
|
14
|
+
// Modal hides the rest of the app from screen readers while it is open.
|
|
15
|
+
Settings.setAppElement('#root');
|
|
16
|
+
|
|
17
|
+
createRoot(document.getElementById('root')!).render(
|
|
18
|
+
<StrictMode>
|
|
19
|
+
<IconSettings iconPath="/assets/icons">
|
|
20
|
+
<App />
|
|
21
|
+
</IconSettings>
|
|
22
|
+
</StrictMode>
|
|
23
|
+
);
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Rules
|
|
27
|
+
|
|
28
|
+
- **Callbacks are `(event, data)`.** Read the new value from `data`, for example `onChange={(event, { checked }) => setChecked(checked)}`. The props tables list the fields of `data`.
|
|
29
|
+
- **Data props are controlled.** Pass `value`, `checked` or `selection`, and update it in the callback. Without the update, the component does not change. On most popups (Combobox, MenuDropdown, Popover, Tooltip) `isOpen` can be uncontrolled: leave it out, or set `defaultIsOpen`. `Modal` requires `isOpen`: keep it in state and set it to `false` in `onRequestClose`.
|
|
30
|
+
- **Some components take an `events` object** instead of `on*` props: Combobox, ColorPicker, PillContainer, SplitView, BuilderHeader and DockedComposer. For example, `events={{ onSelect: (event, { selection }) => setSelection(selection) }}`.
|
|
31
|
+
- **Every control needs a label.** Use `labels.label` (or `label`) for a visible label, or `assistiveText.label` when the label is visually hidden. Icon-only buttons need `assistiveText.icon`.
|
|
32
|
+
- **Use SLDS utility classes for layout**, for example `slds-grid`, `slds-col`, `slds-gutters`, `slds-p-around_medium` and `slds-m-bottom_small`. Don't write CSS for layout that a utility class covers.
|
|
33
|
+
- **Don't override component internals** (SLDS class names inside a component). Use SLDS 2 styling hooks (`--slds-g-*` and `--slds-c-*` custom properties) for color, spacing and typography.
|
|
34
|
+
- **Don't use a deprecated prop.** The props tables mark each one and name its replacement. Use the replacement.
|
|
35
|
+
- **Import types from the component entry point**, for example `import type { ComboboxProps } from '@salesforce/design-system-react/components/combobox';`.
|
|
36
|
+
- **Ignore the `SLDS<Name>` exports** (`SLDSButton`). They are older names for the same components.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/accordion/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAQN,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAA+B,MAAM,SAAS,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B,gCAAgC;IAChC,QAAQ,EAAE,UAAU,CAAC,mBAAmB,CAAC,CAAC;IAC1C,kBAAkB;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxD,cAAc;IACd,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACrB;2BAMkB,EAClB,QAAQ,EACR,SAAS,EACT,EAAE,EAAE,MAAM,GACV,EAAE,cAAc,GAAG,KAAK,CAAC,YAAY;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/accordion/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAQN,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAA+B,MAAM,SAAS,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B,gCAAgC;IAChC,QAAQ,EAAE,UAAU,CAAC,mBAAmB,CAAC,CAAC;IAC1C,kBAAkB;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxD,cAAc;IACd,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACrB;2BAMkB,EAClB,QAAQ,EACR,SAAS,EACT,EAAE,EAAE,MAAM,GACV,EAAE,cAAc,GAAG,KAAK,CAAC,YAAY;;aA8Hd,SAAS;;eAElB,SAAS"}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import React, { type ReactNode, type KeyboardEvent, type MouseEvent } from 'react';
|
|
2
2
|
export interface AccordionPanelProps {
|
|
3
3
|
/**
|
|
4
|
-
* The panel content for the Accordion component. Accordion panels should be added as <AccordionPanel />. Event handler for the accordion panels should be added to `<AccordionPanel />`. Optional `panelContentActions` component may be passed as prop.
|
|
4
|
+
* The panel content for the Accordion component. Accordion panels should be added as <AccordionPanel />. Event handler for the accordion panels should be added to `<AccordionPanel />`. Optional `panelContentActions` component may be passed as prop.
|
|
5
5
|
*/
|
|
6
6
|
children?: ReactNode;
|
|
7
7
|
/**
|
|
8
|
-
* Indicates whether item is expanded or not, which should be handled by `onTogglePanel`.
|
|
8
|
+
* Indicates whether item is expanded or not, which should be handled by `onTogglePanel`.
|
|
9
9
|
*/
|
|
10
10
|
expanded: boolean;
|
|
11
11
|
/**
|
|
12
|
-
* Id of the item belonging to this panel.
|
|
12
|
+
* Id of the item belonging to this panel.
|
|
13
13
|
*/
|
|
14
14
|
id: number | string;
|
|
15
15
|
/**
|
|
16
|
-
* Component that can be passed as prop to `<Panel />`. As an example, a menu dropdown could be used here to handle additional actions for each accordion panel.
|
|
16
|
+
* Component that can be passed as prop to `<Panel />`. As an example, a menu dropdown could be used here to handle additional actions for each accordion panel.
|
|
17
17
|
*/
|
|
18
18
|
panelContentActions?: ReactNode;
|
|
19
19
|
/**
|
|
20
|
-
* Callback that will run whenever a panel is toggled. Function should handle state to toggle `expanded` prop.
|
|
20
|
+
* Callback that will run whenever a panel is toggled. Function should handle state to toggle `expanded` prop.
|
|
21
21
|
*/
|
|
22
22
|
onTogglePanel: (event: MouseEvent) => void;
|
|
23
23
|
/**
|
|
24
|
-
* Summary in the span element in the header of this panel. The summary is truncated and so the title element should contain the full text so that it is accessible on hover.
|
|
24
|
+
* Summary in the span element in the header of this panel. The summary is truncated and so the title element should contain the full text so that it is accessible on hover.
|
|
25
25
|
*/
|
|
26
26
|
summary: string | ReactNode;
|
|
27
27
|
/**
|
|
28
|
-
* HTML title attribute.
|
|
28
|
+
* HTML title attribute.
|
|
29
29
|
*/
|
|
30
30
|
title?: string;
|
|
31
31
|
}
|
|
@@ -6,6 +6,7 @@ export interface BuilderHeaderNavDropdownProps extends Omit<MenuDropdownBaseProp
|
|
|
6
6
|
* Assistive text for accessibility. `icon` labels the leading icon.
|
|
7
7
|
*/
|
|
8
8
|
assistiveText?: {
|
|
9
|
+
/** Label of the leading icon. */
|
|
9
10
|
icon?: string;
|
|
10
11
|
} & Record<string, unknown>;
|
|
11
12
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-dropdown.d.ts","sourceRoot":"","sources":["../../../../components/builder-header/nav-dropdown.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAExE,MAAM,WAAW,6BAA8B,SAAQ,IAAI,CAC1D,qBAAqB,EACrB,eAAe,CACf;IACA;;OAEG;IACH,aAAa,CAAC,EAAE;
|
|
1
|
+
{"version":3,"file":"nav-dropdown.d.ts","sourceRoot":"","sources":["../../../../components/builder-header/nav-dropdown.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAExE,MAAM,WAAW,6BAA8B,SAAQ,IAAI,CAC1D,qBAAqB,EACrB,eAAe,CACf;IACA;;OAEG;IACH,aAAa,CAAC,EAAE;QACf,iCAAiC;QACjC,IAAI,CAAC,EAAE,MAAM,CAAC;KACd,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,GAAG,MAAM,CAAC;CACtE;0CAKiC,KAAK,EAAE,6BAA6B;;aAuC/B,2BAA2B;;eACnD,wBAAwB"}
|
|
@@ -9,7 +9,6 @@ export interface BuilderHeaderNavLinkProps {
|
|
|
9
9
|
* **Assistive text for accessibility**
|
|
10
10
|
* This object is merged with the default props object on every render.
|
|
11
11
|
* * `icon`: Used for the icon next to the link text.
|
|
12
|
-
* * _Tested with snapshot testing._
|
|
13
12
|
*/
|
|
14
13
|
assistiveText?: BuilderHeaderNavLinkAssistiveText;
|
|
15
14
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-link.d.ts","sourceRoot":"","sources":["../../../../components/builder-header/nav-link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,UAAU,EAAE,MAAM,OAAO,CAAC;AAM/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,MAAM,WAAW,iCAAiC;IACjD,+CAA+C;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,yBAAyB;IACzC
|
|
1
|
+
{"version":3,"file":"nav-link.d.ts","sourceRoot":"","sources":["../../../../components/builder-header/nav-link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,UAAU,EAAE,MAAM,OAAO,CAAC;AAM/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,MAAM,WAAW,iCAAiC;IACjD,+CAA+C;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,yBAAyB;IACzC;;;;OAIG;IACH,aAAa,CAAC,EAAE,iCAAiC,CAAC;IAClD;;OAEG;IACH,YAAY,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IACxE;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;CACtC;sCAQA,KAAK,EAAE,yBAAyB,GAC9B,KAAK,CAAC,YAAY;;aAgCc,uBAAuB;;;sBAIrC,yBAAyB,CAAC,cAAc,CAAC;;;;;eAK/C,oBAAoB"}
|
|
@@ -15,7 +15,6 @@ export interface BuilderHeaderToolbarProps {
|
|
|
15
15
|
* **Assistive text for accessibility**
|
|
16
16
|
* This object is merged with the default props object on every render.
|
|
17
17
|
* * `actions`: Used for the aria-label for the actions section of the toolbar.
|
|
18
|
-
* * _Tested with snapshot testing._
|
|
19
18
|
*/
|
|
20
19
|
assistiveText?: BuilderHeaderToolbarAssistiveText;
|
|
21
20
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbar.d.ts","sourceRoot":"","sources":["../../../../components/builder-header/toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAoB,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAIrE,MAAM,WAAW,iCAAiC;IACjD,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,yBAAyB;IACzC;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB
|
|
1
|
+
{"version":3,"file":"toolbar.d.ts","sourceRoot":"","sources":["../../../../components/builder-header/toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAoB,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAIrE,MAAM,WAAW,iCAAiC;IACjD,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,yBAAyB;IACzC;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,iCAAiC,CAAC;IAClD;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;IACxC,yCAAyC;IACzC,eAAe,CAAC,EAAE,MAAM,SAAS,CAAC;CAClC;sCAS6B,EAC7B,OAAO,EACP,aAAoC,EACpC,QAAQ,EACR,eAAe,GACf,EAAE,yBAAyB,GAAG,KAAK,CAAC,YAAY;;aAoCd,sBAAsB;;eAE1C,oBAAoB"}
|
|
@@ -24,6 +24,7 @@ export type IconPosition = 'left' | 'right';
|
|
|
24
24
|
* Assistive text for button
|
|
25
25
|
*/
|
|
26
26
|
export interface ButtonAssistiveText {
|
|
27
|
+
/** Visually hidden label of an icon-only button. Required when there is no `label`. */
|
|
27
28
|
icon?: string;
|
|
28
29
|
}
|
|
29
30
|
/**
|
|
@@ -71,7 +72,7 @@ export interface ButtonBaseProps extends Omit<ButtonHTMLAttributes<HTMLButtonEle
|
|
|
71
72
|
onKeyDown?: (event: KeyboardEvent<HTMLButtonElement>) => void;
|
|
72
73
|
/**
|
|
73
74
|
* @deprecated `keypress` is a deprecated DOM event. Use `onKeyDown` and read
|
|
74
|
-
* `event.key` instead.
|
|
75
|
+
* `event.key` instead. Works only in the 11.0.0 release candidates, and warns.
|
|
75
76
|
*/
|
|
76
77
|
onKeyPress?: (event: KeyboardEvent<HTMLButtonElement>) => void;
|
|
77
78
|
/** Key up event handler */
|
|
@@ -86,11 +87,11 @@ export interface ButtonBaseProps extends Omit<ButtonHTMLAttributes<HTMLButtonEle
|
|
|
86
87
|
onMouseUp?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
87
88
|
/**
|
|
88
89
|
* @deprecated Focus the button through `ref` or `buttonRef` instead. Called with the
|
|
89
|
-
* `<button>` when `requestFocus` is set.
|
|
90
|
+
* `<button>` when `requestFocus` is set. Works only in the 11.0.0 release candidates, and warns.
|
|
90
91
|
*/
|
|
91
92
|
onRequestFocus?: (element: HTMLButtonElement) => void;
|
|
92
93
|
/**
|
|
93
|
-
* @deprecated Focus the button through `ref` or `buttonRef` instead.
|
|
94
|
+
* @deprecated Focus the button through `ref` or `buttonRef` instead. Works only in the 11.0.0 release candidates, and warns.
|
|
94
95
|
*/
|
|
95
96
|
requestFocus?: boolean;
|
|
96
97
|
/** Stretches the button to the full width of its container (`slds-button_stretch`) */
|
|
@@ -128,11 +129,13 @@ interface ButtonIconProps {
|
|
|
128
129
|
* Other variants size the icon with `iconSize` only.
|
|
129
130
|
*/
|
|
130
131
|
export type ButtonProps = ButtonBaseProps & (({
|
|
132
|
+
/** Button variant: an icon button. */
|
|
131
133
|
variant: 'icon';
|
|
132
134
|
} & ButtonIconProps) | ({
|
|
133
135
|
/** Button variant */
|
|
134
136
|
variant?: Exclude<ButtonVariant, 'icon'>;
|
|
135
137
|
} & Pick<ButtonIconProps, 'iconSize'> & {
|
|
138
|
+
/** Only for `variant="icon"`. */
|
|
136
139
|
iconVariant?: undefined;
|
|
137
140
|
}));
|
|
138
141
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/button/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAIb,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,SAAS,EAEd,KAAK,oBAAoB,EACzB,MAAM,OAAO,CAAC;AAUf,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AA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tonStatefulClickProps = {
|
|
|
42
42
|
*/
|
|
43
43
|
onClick: ButtonStatefulClickHandler;
|
|
44
44
|
} | {
|
|
45
|
+
/** Disables the button. */
|
|
45
46
|
disabled: true;
|
|
47
|
+
/** Called on click. Optional while disabled. */
|
|
46
48
|
onClick?: ButtonStatefulClickHandler;
|
|
47
49
|
};
|
|
48
50
|
interface ButtonStatefulBaseProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'className' | 'disabled' | 'onClick' | 'tabIndex' | 'type'> {
|
|
@@ -76,7 +78,7 @@ interface ButtonStatefulBaseProps extends Omit<ButtonHTMLAttributes<HTMLButtonEl
|
|
|
76
78
|
onKeyDown?: (event: KeyboardEvent<HTMLButtonElement>) => void;
|
|
77
79
|
/**
|
|
78
80
|
* @deprecated `keypress` is a deprecated DOM event. Use `onKeyDown` and read
|
|
79
|
-
* `event.key` instead.
|
|
81
|
+
* `event.key` instead. Works only in the 11.0.0 release candidates, and warns.
|
|
80
82
|
*/
|
|
81
83
|
onKeyPress?: (event: KeyboardEvent<HTMLButtonElement>) => void;
|
|
82
84
|
/** Key up handler */
|
|
@@ -103,6 +105,7 @@ interface ButtonStatefulBaseProps extends Omit<ButtonHTMLAttributes<HTMLButtonEl
|
|
|
103
105
|
*/
|
|
104
106
|
export type ButtonStatefulProps = ButtonStatefulBaseProps & ButtonStatefulClickProps;
|
|
105
107
|
declare function ButtonStateful({ isActive: isActiveProp, active, assistiveText: propAssistiveText, className, disabled, icon, iconName, iconSize, id, onBlur, onClick, onFocus, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, responsive, stateOne, stateTwo, stateThree, tabIndex, variant, triggerClassName: _triggerClassName, ...rest }: ButtonStatefulProps & {
|
|
108
|
+
/** Set by `ButtonGroup` on its last child. Ignored. */
|
|
106
109
|
triggerClassName?: unknown;
|
|
107
110
|
}): React.ReactElement;
|
|
108
111
|
declare namespace ButtonStateful {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/button-stateful/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAIb,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,MAAM,OAAO,CAAC;AAKf,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAI5D;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAC9B,MAAM,GACN,SAAS,GACT,OAAO,GACP,aAAa,GACb,MAAM,GACN,aAAa,GACb,SAAS,GACT,SAAS,GACT,MAAM,CAAC;AAEV;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC,kCAAkC;IAClC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mBAAmB;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC3C,oBAAoB;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACvC,uEAAuE;IACvE,QAAQ,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,MAAM,0BAA0B,GAAG,CACxC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,EACpC,IAAI,EAAE,uBAAuB,KACzB,IAAI,CAAC;AAEV;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GACjC;IACA;;;;OAIG;IACH,OAAO,EAAE,0BAA0B,CAAC;CACnC,GACD;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/button-stateful/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAIb,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,MAAM,OAAO,CAAC;AAK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AAC,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,OAAO,CAAC,EAAE,qBAAqB,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,GACxD,wBAAwB,CAAC;gCAqBF,EACvB,QAAQ,EAAE,YAAY,EACtB,MAAM,EACN,aAAa,EAAE,iBAAiB,EAChC,SAAS,EACT,QAAgB,EAChB,IAAI,EACJ,QAAQ,EACR,QAAmB,EACnB,EAAE,EACF,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,EACT,UAAU,EACV,OAAO,EACP,WAAW,EACX,YAAY,EACZ,UAAkB,EAClB,QAA0B,EAC1B,QAA0B,EAC1B,UAA8B,EAC9B,QAAQ,EACR,OAAO,EAEP,gBAAgB,EAAE,iBAAiB,EACnC,GAAG,IAAI,EACP,EAAE,mBAAmB,GAAG;IACxB,uDAAuD;IACvD,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC3B,GAAG,KAAK,CAAC,YAAY;;aAkNO,eAAe;;eAE7B,cAAc"}
|
|
@@ -11,16 +11,25 @@ export type CheckboxSize = 'medium' | 'large';
|
|
|
11
11
|
* Assistive text for Checkbox
|
|
12
12
|
*/
|
|
13
13
|
export interface CheckboxAssistiveText {
|
|
14
|
+
/** Visually hidden heading of the `visual-picker` variant, read when `label` is unset. */
|
|
14
15
|
heading?: string;
|
|
16
|
+
/** Visually hidden label, for a checkbox without a visible `labels.label`. */
|
|
15
17
|
label?: string;
|
|
16
18
|
}
|
|
17
19
|
/**
|
|
18
20
|
* Labels for Checkbox
|
|
19
21
|
*/
|
|
20
22
|
export interface CheckboxLabels {
|
|
23
|
+
/** Heading of the `visual-picker` variant. */
|
|
21
24
|
heading?: string;
|
|
25
|
+
/** Visible label. */
|
|
22
26
|
label?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Off-state text of the `toggle` variant. Defaults to the English text `Disabled`: the state of
|
|
29
|
+
* what the toggle controls, not of the checkbox itself.
|
|
30
|
+
*/
|
|
23
31
|
toggleDisabled?: string;
|
|
32
|
+
/** On-state text of the `toggle` variant. Defaults to the English text `Enabled`. */
|
|
24
33
|
toggleEnabled?: string;
|
|
25
34
|
}
|
|
26
35
|
/**
|
|
@@ -48,10 +57,14 @@ export type CheckboxChangeProps = {
|
|
|
48
57
|
*/
|
|
49
58
|
onChange: CheckboxChangeHandler;
|
|
50
59
|
} | {
|
|
60
|
+
/** Disables the checkbox. */
|
|
51
61
|
disabled: true;
|
|
62
|
+
/** Called on change. Optional while disabled. */
|
|
52
63
|
onChange?: CheckboxChangeHandler;
|
|
53
64
|
} | {
|
|
65
|
+
/** Renders the checkbox read-only. */
|
|
54
66
|
readOnly: true;
|
|
67
|
+
/** Called on change. Optional while read-only. */
|
|
55
68
|
onChange?: CheckboxChangeHandler;
|
|
56
69
|
};
|
|
57
70
|
interface CheckboxCommonProps {
|
|
@@ -88,14 +101,14 @@ interface CheckboxCommonProps {
|
|
|
88
101
|
onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
89
102
|
/**
|
|
90
103
|
* @deprecated `keypress` is a deprecated DOM event. Use `onKeyDown` and read
|
|
91
|
-
* `event.key` instead.
|
|
104
|
+
* `event.key` instead. Works only in the 11.0.0 release candidates, and warns.
|
|
92
105
|
*/
|
|
93
106
|
onKeyPress?: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
94
107
|
/** Key up event handler */
|
|
95
108
|
onKeyUp?: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
96
109
|
/**
|
|
97
110
|
* @deprecated Focus the checkbox through `ref`, which is forwarded to the `<input>`.
|
|
98
|
-
* Called with the `<input>` when `requestFocus` is set.
|
|
111
|
+
* Called with the `<input>` when `requestFocus` is set. Works only in the 11.0.0 release candidates, and warns.
|
|
99
112
|
*/
|
|
100
113
|
onRequestFocus?: (element: HTMLInputElement) => void;
|
|
101
114
|
/**
|
|
@@ -105,7 +118,7 @@ interface CheckboxCommonProps {
|
|
|
105
118
|
readOnly?: boolean;
|
|
106
119
|
/**
|
|
107
120
|
* @deprecated Focus the checkbox through `ref`, which is forwarded to the `<input>`.
|
|
108
|
-
*
|
|
121
|
+
* Works only in the 11.0.0 release candidates, and warns.
|
|
109
122
|
*/
|
|
110
123
|
requestFocus?: boolean;
|
|
111
124
|
/** ARIA role */
|
|
@@ -208,8 +221,9 @@ type CheckboxVariantProps = CheckboxBaseVariantProps | CheckboxToggleVariantProp
|
|
|
208
221
|
*/
|
|
209
222
|
export type CheckboxProps = CheckboxVariantProps & CheckboxChangeProps;
|
|
210
223
|
/**
|
|
211
|
-
*
|
|
212
|
-
*
|
|
224
|
+
* A checkbox, a toggle (`variant="toggle"`) or a button-group checkbox
|
|
225
|
+
* (`variant="button-group"`). It is controlled: pass `checked` and update it
|
|
226
|
+
* from `onChange`. It looks the same in every browser.
|
|
213
227
|
*/
|
|
214
228
|
declare const Checkbox: import("react").ForwardRefExoticComponent<CheckboxProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
215
229
|
export default Checkbox;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/checkbox/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAKN,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,MAAM,OAAO,CAAC;AAQf;;GAEG;AACH,MAAM,MAAM,eAAe,GAC1B,MAAM,GAAG,QAAQ,GAAG,cAAc,GAAG,eAAe,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,CACnC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,EACpC,IAAI,EAAE,kBAAkB,KACpB,IAAI,CAAC;AAEV;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAC5B;IACA;;;;OAIG;IACH,QAAQ,EAAE,qBAAqB,CAAC;CAC/B,GACD;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/checkbox/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAKN,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,MAAM,OAAO,CAAC;AAQf;;GAEG;AACH,MAAM,MAAM,eAAe,GAC1B,MAAM,GAAG,QAAQ,GAAG,cAAc,GAAG,eAAe,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC,0FAA0F;IAC1F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qBAAqB;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qFAAqF;IACrF,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,OAAO,EAAE,OAAO,CAAC;IAC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B,GAC1B,+BAA+B,GAC/B,gCAAgC,CAAC;AAEpC;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,oBAAoB,GAAG,mBAAmB,CAAC;AAOvE;;;;GAIG;AACH,QAAA,MAAM,QAAQ,4GAgWZ,CAAC;eAIY,QAAQ"}
|
|
@@ -50,13 +50,13 @@ interface ColorPickerBaseProps {
|
|
|
50
50
|
* color is internal and is reset from `value` each time the popover opens.
|
|
51
51
|
*/
|
|
52
52
|
valueWorking?: string;
|
|
53
|
-
/** @deprecated Use `events.onClose` instead.
|
|
53
|
+
/** @deprecated Use `events.onClose` instead. Works only in the 11.0.0 release candidates, and warns. */
|
|
54
54
|
onClose?: ColorPickerEvents['onClose'];
|
|
55
|
-
/** @deprecated Use `events.onOpen` instead.
|
|
55
|
+
/** @deprecated Use `events.onOpen` instead. Works only in the 11.0.0 release candidates, and warns. */
|
|
56
56
|
onOpen?: ColorPickerEvents['onOpen'];
|
|
57
|
-
/** @deprecated Use `events.onRequestClose` instead.
|
|
57
|
+
/** @deprecated Use `events.onRequestClose` instead. Works only in the 11.0.0 release candidates, and warns. */
|
|
58
58
|
onRequestClose?: ColorPickerEvents['onRequestClose'];
|
|
59
|
-
/** @deprecated Use `events.onRequestOpen` instead.
|
|
59
|
+
/** @deprecated Use `events.onRequestOpen` instead. Works only in the 11.0.0 release candidates, and warns. */
|
|
60
60
|
onRequestOpen?: ColorPickerEvents['onRequestOpen'];
|
|
61
61
|
/**
|
|
62
62
|
* Replaces the built-in hex/named-color check for the summary input. Returns whether `hex`
|
|
@@ -102,7 +102,9 @@ export type ColorPickerEventsProps = {
|
|
|
102
102
|
onChange: ColorPickerChangeHandler;
|
|
103
103
|
};
|
|
104
104
|
} | {
|
|
105
|
+
/** Disables the color picker. */
|
|
105
106
|
disabled: true;
|
|
107
|
+
/** Event callbacks. `events.onChange` is optional while disabled. */
|
|
106
108
|
events?: ColorPickerEvents;
|
|
107
109
|
};
|
|
108
110
|
export type ColorPickerProps = ColorPickerBaseProps & ColorPickerVariantProps & ColorPickerEventsProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-picker.d.ts","sourceRoot":"","sources":["../../../../components/color-picker/color-picker.tsx"],"names":[],"mappings":"AACA,OAAO,KAON,MAAM,OAAO,CAAC;AAoBf,OAAO,EAEN,wBAAwB,EACxB,iBAAiB,EACjB,wBAAwB,EACxB,iBAAiB,EAEjB,MAAM,SAAS,CAAC;AAEjB,UAAU,oBAAoB;IAC7B,uCAAuC;IACvC,aAAa,CAAC,EAAE,wBAAwB,CAAC;IACzC,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxD,uCAAuC;IACvC,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5D,kCAAkC;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2DAA2D;IAC3D,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kDAAkD;IAClD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,2BAA2B;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,gCAAgC;IAChC,YAAY,CAAC,EAAE,UAAU,GAAG,yBAAyB,GAAG,UAAU,CAAC;IACnE;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,
|
|
1
|
+
{"version":3,"file":"color-picker.d.ts","sourceRoot":"","sources":["../../../../components/color-picker/color-picker.tsx"],"names":[],"mappings":"AACA,OAAO,KAON,MAAM,OAAO,CAAC;AAoBf,OAAO,EAEN,wBAAwB,EACxB,iBAAiB,EACjB,wBAAwB,EACxB,iBAAiB,EAEjB,MAAM,SAAS,CAAC;AAEjB,UAAU,oBAAoB;IAC7B,uCAAuC;IACvC,aAAa,CAAC,EAAE,wBAAwB,CAAC;IACzC,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxD,uCAAuC;IACvC,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5D,kCAAkC;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2DAA2D;IAC3D,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kDAAkD;IAClD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,2BAA2B;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,gCAAgC;IAChC,YAAY,CAAC,EAAE,UAAU,GAAG,yBAAyB,GAAG,UAAU,CAAC;IACnE;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wGAAwG;IACxG,OAAO,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;IACvC,uG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FxB;;;;;GAKG;AACH,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAse3C,CAAC;eAIa,WAAW"}
|
|
@@ -106,11 +106,11 @@ export interface ColorPickerEvents {
|
|
|
106
106
|
*/
|
|
107
107
|
onRequestOpen?: () => void;
|
|
108
108
|
/**
|
|
109
|
-
* @deprecated Use the top-level `validateColor` prop instead.
|
|
109
|
+
* @deprecated Use the top-level `validateColor` prop instead. Works only in the 11.0.0 release candidates, and warns.
|
|
110
110
|
*/
|
|
111
111
|
onValidateColor?: (hex: string) => boolean;
|
|
112
112
|
/**
|
|
113
|
-
* @deprecated Use the top-level `validateWorkingColor` prop instead.
|
|
113
|
+
* @deprecated Use the top-level `validateWorkingColor` prop instead. Works only in the 11.0.0 release candidates, and warns.
|
|
114
114
|
*/
|
|
115
115
|
onValidateWorkingColor?: (hex: string) => boolean;
|
|
116
116
|
/** Triggered when working color changes (color inside the custom tab) */
|
|
@@ -4,25 +4,43 @@ import { type PopoverProps } from '../popover';
|
|
|
4
4
|
import type { InputProps } from '../input';
|
|
5
5
|
import type { TooltipProps } from '../tooltip';
|
|
6
6
|
export interface ComboboxAssistiveText {
|
|
7
|
+
/** Visually hidden input label, used when there is no `labels.label`. */
|
|
7
8
|
label?: string;
|
|
9
|
+
/** Spinner label while `hasMenuSpinner` is set. Defaults to the English text `Loading`. */
|
|
8
10
|
loadingMenuItems?: string;
|
|
11
|
+
/** Read before the selected item in the menu of the `readonly` variant. Defaults to the English text `Current Selection:`. */
|
|
9
12
|
optionSelectedInMenu?: string;
|
|
13
|
+
/** `aria-label` of the `popover` variant's dialog. Required for that variant. */
|
|
10
14
|
popoverLabel?: string;
|
|
15
|
+
/** Label of the button that removes the selected option in the single-select `inline-listbox` variant. Defaults to the English text `Remove selected option`. */
|
|
11
16
|
removeSingleSelectedOption?: string;
|
|
17
|
+
/** Appended to each pill's label in multiple selection. Defaults to the English text `, Press delete or backspace to remove`. */
|
|
12
18
|
removePill?: string;
|
|
19
|
+
/** Label of the listbox of selected pills in multiple selection. Defaults to the English text `Selected Options:`. */
|
|
13
20
|
selectedListboxLabel?: string;
|
|
14
21
|
}
|
|
15
22
|
export interface ComboboxLabels {
|
|
23
|
+
/** First menu item of a single-select `readonly` combobox; choosing it clears the selection. Defaults to the English text `None`. */
|
|
16
24
|
deselectOption?: string;
|
|
25
|
+
/** Visible label above the input. */
|
|
17
26
|
label?: ReactNode | string;
|
|
27
|
+
/** Cancel button in the `popover` variant's footer. Defaults to the English text `Cancel`. */
|
|
18
28
|
cancelButton?: string;
|
|
29
|
+
/** Done button in the `popover` variant's footer. Defaults to the English text `Done`. */
|
|
19
30
|
doneButton?: string;
|
|
31
|
+
/** Input text of a multiple-selection `readonly` combobox with more than one option selected. Defaults to the English text `<n> options selected`. */
|
|
20
32
|
multipleOptionsSelected?: string;
|
|
33
|
+
/** Shown in the menu when no options match. Defaults to the English text `No matches found.`. */
|
|
21
34
|
noOptionsFound?: ReactNode | string;
|
|
35
|
+
/** Input placeholder. */
|
|
22
36
|
placeholder?: string;
|
|
37
|
+
/** Input placeholder of the `readonly` variant. Defaults to the English text `Select an Option`. */
|
|
23
38
|
placeholderReadOnly?: string;
|
|
39
|
+
/** Title of each pill's remove icon. Defaults to the English text `Remove`. */
|
|
24
40
|
removePillTitle?: string;
|
|
41
|
+
/** Tooltip for disabled options. Defaults to the English text `This option is disabled.`. */
|
|
25
42
|
optionDisabledTooltipLabel?: string;
|
|
43
|
+
/** Title of the search icon in the input. */
|
|
26
44
|
inputIconTitle?: string;
|
|
27
45
|
}
|
|
28
46
|
export interface ComboboxEvents {
|
|
@@ -240,6 +258,10 @@ export type ComboboxVariantProps = {
|
|
|
240
258
|
popover: ReactElement<Partial<PopoverProps>>;
|
|
241
259
|
};
|
|
242
260
|
export type ComboboxProps = ComboboxBaseProps & ComboboxVariantProps;
|
|
261
|
+
/**
|
|
262
|
+
* An input field that is either an autocomplete or read-only, with a listbox of
|
|
263
|
+
* predefined options.
|
|
264
|
+
*/
|
|
243
265
|
declare const Combobox: React.FC<ComboboxProps>;
|
|
244
266
|
export default Combobox;
|
|
245
267
|
//# sourceMappingURL=combobox.d.ts.map
|