@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,591 @@
|
|
|
1
|
+
# ColorPicker
|
|
2
|
+
|
|
3
|
+
The Unified Color Picker component allows for a fully accessible and
|
|
4
|
+
configurable color picker, allowing the user to pick from a set of
|
|
5
|
+
predefined colors (swatches), or to pick a custom color using a HSB
|
|
6
|
+
selection interface.
|
|
7
|
+
|
|
8
|
+
## Import
|
|
9
|
+
|
|
10
|
+
```tsx
|
|
11
|
+
import { ColorPicker } from '@salesforce/design-system-react';
|
|
12
|
+
// or, one entry point per module:
|
|
13
|
+
import ColorPicker from '@salesforce/design-system-react/components/color-picker';
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## ColorPicker props
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import type { ColorPickerProps } from '@salesforce/design-system-react/components/color-picker';
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The props type is a union: some props only apply to some variants (see the Types block). A prop is marked required only when every variant requires it.
|
|
23
|
+
|
|
24
|
+
| Prop | Type | Required | Description |
|
|
25
|
+
| --- | --- | --- | --- |
|
|
26
|
+
| `assistiveText` | `ColorPickerAssistiveText` | | Assistive text for accessibility |
|
|
27
|
+
| `className` | `string \| string[] \| Record<string, boolean>` | | CSS classes for the color-picker container |
|
|
28
|
+
| `classNameMenu` | `string \| string[] \| Record<string, boolean>` | | CSS classes for the popover menu |
|
|
29
|
+
| `defaultIsOpen` | `boolean` | | Initial open state of the popover when `isOpen` is not set (uncontrolled). Defaults to `false`. |
|
|
30
|
+
| `defaultSelectedTab` | `'swatches' \| 'custom'` (`'custom' \| 'swatches'`) | | Which tab is visible when dialog opens |
|
|
31
|
+
| `disabled` | `boolean` | | Disables the input and button |
|
|
32
|
+
| `errorText` | `string` | | Error message for the outer input. When empty, the message is derived from `value`: `labels.invalidColor` is shown while `value` fails validation (`validateColor`, or the built-in hex/named-color check). |
|
|
33
|
+
| `errorTextWorkingColor` | `string` | | Error message for the custom tab working color input |
|
|
34
|
+
| `events` | `ColorPickerEvents & { onChange: ColorPickerChangeHandler; } \| ColorPickerEvents` | | Event callbacks. `events.onChange` is required unless `disabled` is set. |
|
|
35
|
+
| `events.onChange` | `(event: SyntheticEvent<Element, Event>, data: { color: string; isValid?: boolean }) => void` | Yes | Triggered when the user types in the input and when Done is clicked. Returns the hex representation of the color. Required unless `disabled` is set. |
|
|
36
|
+
| `events.onClose` | `(event: SyntheticEvent<Element, Event>, data: { trigger?: string; componentWillUnmount?: boolean }) => void` | | Triggered when the menu is closed |
|
|
37
|
+
| `events.onOpen` | `(event: SyntheticEvent<Element, Event>, data: { portal?: HTMLElement }) => void` | | Triggered when the color-picker menu is mounted |
|
|
38
|
+
| `events.onRequestClose` | `(event: SyntheticEvent<Element, Event>, data: { trigger: ColorPickerRequestCloseTrigger }) => void` | | Called when the popover requests to close, before it closes. `data.trigger` says why. When `isOpen` is controlled, set it to `false` here (or leave it `true` to keep the popover open). |
|
|
39
|
+
| `events.onRequestOpen` | `() => void` | | Called when the swatch button is clicked while the popover is closed, before it opens. When `isOpen` is controlled, set it to `true` here. |
|
|
40
|
+
| `events.onValidateColor` | `(hex: string) => boolean` | | **Deprecated.** Use the top-level `validateColor` prop instead. Works only in the 11.0.0 release candidates, and warns. |
|
|
41
|
+
| `events.onValidateWorkingColor` | `(hex: string) => boolean` | | **Deprecated.** Use the top-level `validateWorkingColor` prop instead. Works only in the 11.0.0 release candidates, and warns. |
|
|
42
|
+
| `events.onWorkingColorChange` | `(event: SyntheticEvent<Element, Event>, data: { color: WorkingColor }) => void` | | Triggered when working color changes (color inside the custom tab) |
|
|
43
|
+
| `hasStaticAlignment` | `boolean` | | Disable flip behavior for popover alignment |
|
|
44
|
+
| `hideInput` | `boolean` | | Hides the text input |
|
|
45
|
+
| `id` | `string` | | Unique ID for the component |
|
|
46
|
+
| `isOpen` | `boolean` | | Whether the popover is open. When set, the popover is controlled: it only opens or closes when this prop changes, so update it from `onRequestOpen` and `onRequestClose`. When `undefined`, the popover manages its own open state (see `defaultIsOpen`). |
|
|
47
|
+
| `labels` | `ColorPickerLabels` | | Text labels for internationalization |
|
|
48
|
+
| `menuPosition` | `'absolute' \| 'overflowBoundaryElement' \| 'relative'` | | Popover position strategy |
|
|
49
|
+
| `onClose` | `ColorPickerEvents['onClose']` | | **Deprecated.** Use `events.onClose` instead. Works only in the 11.0.0 release candidates, and warns. |
|
|
50
|
+
| `onOpen` | `ColorPickerEvents['onOpen']` | | **Deprecated.** Use `events.onOpen` instead. Works only in the 11.0.0 release candidates, and warns. |
|
|
51
|
+
| `onRequestClose` | `ColorPickerEvents['onRequestClose']` | | **Deprecated.** Use `events.onRequestClose` instead. Works only in the 11.0.0 release candidates, and warns. |
|
|
52
|
+
| `onRequestOpen` | `ColorPickerEvents['onRequestOpen']` | | **Deprecated.** Use `events.onRequestOpen` instead. Works only in the 11.0.0 release candidates, and warns. |
|
|
53
|
+
| `swatchColors` | `string[]` | | Array of hex color values for swatch options |
|
|
54
|
+
| `validateColor` | `(hex: string) => boolean` | | Replaces the built-in hex/named-color check for the summary input. Returns whether `hex` is a valid color. |
|
|
55
|
+
| `validateWorkingColor` | `(hex: string) => boolean` | | Replaces the built-in hex check for the custom tab's working color input. Returns whether `hex` is a valid color. |
|
|
56
|
+
| `value` | `string` | Yes | Current color as a hexadecimal string (or a CSS color name); `''` for no color. Required and controlled: the summary input and swatch always render this value. Update it from `events.onChange`, which fires when the user types in the input (`isValid` says whether the text is a valid color) and when Done is clicked. |
|
|
57
|
+
| `valueWorking` | `string` | | Working color (the in-popover draft) as a hexadecimal string. When set, the working color is controlled: update it from `events.onWorkingColorChange`. When `undefined`, the working color is internal and is reset from `value` each time the popover opens. |
|
|
58
|
+
| `variant` | `'base' \| 'swatches' \| 'custom'` | | Both the swatch and custom tabs |
|
|
59
|
+
|
|
60
|
+
## Types
|
|
61
|
+
|
|
62
|
+
Declarations the props above refer to, from the package `.d.ts`:
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
export type ColorPickerProps = ColorPickerBaseProps & ColorPickerVariantProps & ColorPickerEventsProps;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* `variant` sets which tabs are present. `swatchColors` needs the swatch tab
|
|
69
|
+
* and `defaultSelectedTab` only applies when both tabs are present.
|
|
70
|
+
*/
|
|
71
|
+
export type ColorPickerVariantProps = {
|
|
72
|
+
/** Both the swatch and custom tabs */
|
|
73
|
+
variant?: 'base';
|
|
74
|
+
/** Array of hex color values for swatch options */
|
|
75
|
+
swatchColors?: string[];
|
|
76
|
+
/** Which tab is visible when dialog opens */
|
|
77
|
+
defaultSelectedTab?: 'swatches' | 'custom';
|
|
78
|
+
} | {
|
|
79
|
+
/** Only the swatch tab */
|
|
80
|
+
variant: 'swatches';
|
|
81
|
+
/** Array of hex color values for swatch options */
|
|
82
|
+
swatchColors?: string[];
|
|
83
|
+
defaultSelectedTab?: never;
|
|
84
|
+
} | {
|
|
85
|
+
/** Only the custom tab */
|
|
86
|
+
variant: 'custom';
|
|
87
|
+
swatchColors?: never;
|
|
88
|
+
defaultSelectedTab?: never;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* `events.onChange` is required unless the color picker is `disabled`:
|
|
93
|
+
* ColorPicker is controlled, so without it choosing a color does nothing.
|
|
94
|
+
*/
|
|
95
|
+
export type ColorPickerEventsProps = {
|
|
96
|
+
/** Event callbacks. `events.onChange` is required unless `disabled` is set. */
|
|
97
|
+
events: ColorPickerEvents & {
|
|
98
|
+
onChange: ColorPickerChangeHandler;
|
|
99
|
+
};
|
|
100
|
+
} | {
|
|
101
|
+
/** Disables the color picker. */
|
|
102
|
+
disabled: true;
|
|
103
|
+
/** Event callbacks. `events.onChange` is optional while disabled. */
|
|
104
|
+
events?: ColorPickerEvents;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export interface ColorPickerEvents {
|
|
108
|
+
/**
|
|
109
|
+
* Triggered when the user types in the input and when Done is clicked. Returns the hex
|
|
110
|
+
* representation of the color. Required unless `disabled` is set.
|
|
111
|
+
*/
|
|
112
|
+
onChange?: ColorPickerChangeHandler;
|
|
113
|
+
/** Triggered when the menu is closed */
|
|
114
|
+
onClose?: (event: React.SyntheticEvent, data: {
|
|
115
|
+
trigger?: string;
|
|
116
|
+
componentWillUnmount?: boolean;
|
|
117
|
+
}) => void;
|
|
118
|
+
/** Triggered when the color-picker menu is mounted */
|
|
119
|
+
onOpen?: (event: React.SyntheticEvent, data: {
|
|
120
|
+
portal?: HTMLElement;
|
|
121
|
+
}) => void;
|
|
122
|
+
/**
|
|
123
|
+
* Called when the popover requests to close, before it closes. `data.trigger` says why. When
|
|
124
|
+
* `isOpen` is controlled, set it to `false` here (or leave it `true` to keep the popover open).
|
|
125
|
+
*/
|
|
126
|
+
onRequestClose?: (event: React.SyntheticEvent, data: ColorPickerRequestCloseData) => void;
|
|
127
|
+
/**
|
|
128
|
+
* Called when the swatch button is clicked while the popover is closed, before it opens. When
|
|
129
|
+
* `isOpen` is controlled, set it to `true` here.
|
|
130
|
+
*/
|
|
131
|
+
onRequestOpen?: () => void;
|
|
132
|
+
/**
|
|
133
|
+
* @deprecated Use the top-level `validateColor` prop instead. Works only in the 11.0.0 release candidates, and warns.
|
|
134
|
+
*/
|
|
135
|
+
onValidateColor?: (hex: string) => boolean;
|
|
136
|
+
/**
|
|
137
|
+
* @deprecated Use the top-level `validateWorkingColor` prop instead. Works only in the 11.0.0 release candidates, and warns.
|
|
138
|
+
*/
|
|
139
|
+
onValidateWorkingColor?: (hex: string) => boolean;
|
|
140
|
+
/** Triggered when working color changes (color inside the custom tab) */
|
|
141
|
+
onWorkingColorChange?: (event: React.SyntheticEvent, data: {
|
|
142
|
+
color: WorkingColor;
|
|
143
|
+
}) => void;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export type ColorPickerChangeHandler = (event: React.SyntheticEvent, data: {
|
|
147
|
+
color: string;
|
|
148
|
+
isValid?: boolean;
|
|
149
|
+
}) => void;
|
|
150
|
+
|
|
151
|
+
/** Data passed to `events.onRequestClose` */
|
|
152
|
+
export interface ColorPickerRequestCloseData {
|
|
153
|
+
/** What caused the close request */
|
|
154
|
+
trigger: ColorPickerRequestCloseTrigger;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Why the popover requested to close:
|
|
159
|
+
* * `cancel`: the Cancel button or Escape
|
|
160
|
+
* * `submit`: the Done button
|
|
161
|
+
* * `clickOutside`: a click outside the popover
|
|
162
|
+
* * `triggerClick`: the swatch button was clicked while open
|
|
163
|
+
* * `newPopover`: another popover opened
|
|
164
|
+
*/
|
|
165
|
+
export type ColorPickerRequestCloseTrigger = 'cancel' | 'submit' | 'clickOutside' | 'triggerClick' | 'newPopover';
|
|
166
|
+
|
|
167
|
+
export interface WorkingColor {
|
|
168
|
+
hex: string;
|
|
169
|
+
hsv: HSV;
|
|
170
|
+
rgb: RGB;
|
|
171
|
+
errors?: ColorErrors;
|
|
172
|
+
name?: string;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Type definitions for ColorPicker component
|
|
177
|
+
*/
|
|
178
|
+
export interface HSV {
|
|
179
|
+
hue: number | '';
|
|
180
|
+
saturation: number | '';
|
|
181
|
+
value: number | '';
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export interface RGB {
|
|
185
|
+
red: number | '';
|
|
186
|
+
green: number | '';
|
|
187
|
+
blue: number | '';
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export interface ColorErrors {
|
|
191
|
+
hex?: boolean;
|
|
192
|
+
red?: boolean;
|
|
193
|
+
green?: boolean;
|
|
194
|
+
blue?: boolean;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export interface ColorPickerAssistiveText {
|
|
198
|
+
/** Visually hidden label but read out loud by screen readers */
|
|
199
|
+
label?: string;
|
|
200
|
+
/** Instructions for hue selection input */
|
|
201
|
+
hueSlider?: string;
|
|
202
|
+
/** Instructions for using the grid for saturation and value selection */
|
|
203
|
+
saturationValueGrid?: string;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export interface ColorPickerLabels {
|
|
207
|
+
/** One letter abbreviation of blue color component */
|
|
208
|
+
blueAbbreviated?: string;
|
|
209
|
+
/** Text for cancel button on popover */
|
|
210
|
+
cancelButton?: string;
|
|
211
|
+
/** Text for custom tab of popover */
|
|
212
|
+
customTab?: string;
|
|
213
|
+
/** Label for custom tab active working color swatch */
|
|
214
|
+
customTabActiveWorkingColorSwatch?: string;
|
|
215
|
+
/** Label for custom tab active transparent swatch */
|
|
216
|
+
customTabTransparentSwatch?: string;
|
|
217
|
+
/** One letter abbreviation of green color component */
|
|
218
|
+
greenAbbreviated?: string;
|
|
219
|
+
/** Label for input of hexadecimal color */
|
|
220
|
+
hexLabel?: string;
|
|
221
|
+
/** Error message when hex color input is invalid */
|
|
222
|
+
invalidColor?: string;
|
|
223
|
+
/** Error message when a component input is invalid */
|
|
224
|
+
invalidComponent?: string;
|
|
225
|
+
/** An input label as for a form */
|
|
226
|
+
label?: string;
|
|
227
|
+
/** One letter abbreviation of red color component */
|
|
228
|
+
redAbbreviated?: string;
|
|
229
|
+
/** Label for swatch tab of popover */
|
|
230
|
+
swatchTab?: string;
|
|
231
|
+
/** Label for transparent swatch in swatch tab */
|
|
232
|
+
swatchTabTransparentSwatch?: string;
|
|
233
|
+
/** Text for submit/done button of popover */
|
|
234
|
+
submitButton?: string;
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
## Examples
|
|
239
|
+
|
|
240
|
+
Every story in Storybook for this component, in sidebar order, as code for an app: imports use the package paths, and Storybook's own code (`meta`, decorators, `parameters`) is left out. A story that renders an `__examples__` file shows that file the first time. Icons are served from `/assets/icons` (see `IconSettings`). Storybook: <https://opensource.salesforce.com/design-system-react/?path=/docs/components-colorpicker--docs>.
|
|
241
|
+
|
|
242
|
+
### Shared code: `components/color-picker/__docs__/ColorPicker.stories.tsx`
|
|
243
|
+
|
|
244
|
+
The stories from Components/ColorPicker below use these imports and helpers.
|
|
245
|
+
|
|
246
|
+
```tsx
|
|
247
|
+
import React, { useState } from 'react';
|
|
248
|
+
import ColorPicker, {
|
|
249
|
+
type ColorPickerEvents,
|
|
250
|
+
type ColorPickerProps,
|
|
251
|
+
} from '@salesforce/design-system-react/components/color-picker';
|
|
252
|
+
import UNSAFE_DirectionSettings from '@salesforce/design-system-react/components/utilities/UNSAFE_direction';
|
|
253
|
+
|
|
254
|
+
const HEX_REGEX_6_DIGITS = /^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;
|
|
255
|
+
|
|
256
|
+
const handleChange = (
|
|
257
|
+
event: React.SyntheticEvent,
|
|
258
|
+
data: { color: string; isValid?: boolean }
|
|
259
|
+
) => {
|
|
260
|
+
// Storybook can't serialize a React event (it's circular), so log only the data
|
|
261
|
+
console.log('onChange', data);
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
const customOuterInputValidator = (hex: string) =>
|
|
265
|
+
!hex || HEX_REGEX_6_DIGITS.test(hex);
|
|
266
|
+
|
|
267
|
+
// `value` (and `valueWorking`, when a story sets it) are controlled, so stories keep them in state.
|
|
268
|
+
// `isOpen` is controlled too: ColorPicker requests open and close, and this parent decides.
|
|
269
|
+
/** ColorPickerProps with `events` optional: the wrapper supplies the handlers. */
|
|
270
|
+
type StatefulColorPickerProps = ColorPickerProps extends infer P
|
|
271
|
+
? P extends unknown
|
|
272
|
+
? Omit<P, 'events' | 'disabled'> & {
|
|
273
|
+
disabled?: boolean;
|
|
274
|
+
events?: ColorPickerEvents;
|
|
275
|
+
}
|
|
276
|
+
: never
|
|
277
|
+
: never;
|
|
278
|
+
|
|
279
|
+
const StatefulColorPicker = (props: StatefulColorPickerProps) => {
|
|
280
|
+
const [value, setValue] = useState(props.value ?? '');
|
|
281
|
+
const [valueWorking, setValueWorking] = useState(props.valueWorking);
|
|
282
|
+
const [isOpen, setIsOpen] = useState(
|
|
283
|
+
props.isOpen ?? props.defaultIsOpen ?? false
|
|
284
|
+
);
|
|
285
|
+
const { events = {} } = props;
|
|
286
|
+
|
|
287
|
+
return (
|
|
288
|
+
<ColorPicker
|
|
289
|
+
{...props}
|
|
290
|
+
defaultIsOpen={undefined}
|
|
291
|
+
isOpen={isOpen}
|
|
292
|
+
events={{
|
|
293
|
+
...events,
|
|
294
|
+
onRequestOpen: () => {
|
|
295
|
+
console.log('onRequestOpen');
|
|
296
|
+
setIsOpen(true);
|
|
297
|
+
events.onRequestOpen?.();
|
|
298
|
+
},
|
|
299
|
+
onRequestClose: (event, data) => {
|
|
300
|
+
console.log('onRequestClose', data);
|
|
301
|
+
setIsOpen(false);
|
|
302
|
+
events.onRequestClose?.(event, data);
|
|
303
|
+
},
|
|
304
|
+
onChange: (event, data) => {
|
|
305
|
+
setValue(data.color);
|
|
306
|
+
events.onChange?.(event, data);
|
|
307
|
+
},
|
|
308
|
+
onWorkingColorChange: (event, data) => {
|
|
309
|
+
if (valueWorking !== undefined) {
|
|
310
|
+
setValueWorking(data.color.hex);
|
|
311
|
+
}
|
|
312
|
+
events.onWorkingColorChange?.(event, data);
|
|
313
|
+
},
|
|
314
|
+
}}
|
|
315
|
+
value={value}
|
|
316
|
+
valueWorking={valueWorking}
|
|
317
|
+
/>
|
|
318
|
+
);
|
|
319
|
+
};
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
### Default
|
|
323
|
+
|
|
324
|
+
```tsx
|
|
325
|
+
const DefaultStory = () => (
|
|
326
|
+
<StatefulColorPicker
|
|
327
|
+
value=""
|
|
328
|
+
className="test_class_name"
|
|
329
|
+
events={{ onChange: handleChange }}
|
|
330
|
+
labels={{ label: 'Choose Color' }}
|
|
331
|
+
id="default-color-picker"
|
|
332
|
+
/>
|
|
333
|
+
);
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
### Default - Right to Left (RTL)
|
|
337
|
+
|
|
338
|
+
```tsx
|
|
339
|
+
const RightToLeft = () => (
|
|
340
|
+
// eslint-disable-next-line
|
|
341
|
+
<UNSAFE_DirectionSettings.Provider value="rtl">
|
|
342
|
+
<div dir="rtl">
|
|
343
|
+
<StatefulColorPicker
|
|
344
|
+
className="test_class_name"
|
|
345
|
+
events={{ onChange: handleChange }}
|
|
346
|
+
labels={{ label: 'Choose Color' }}
|
|
347
|
+
id="default-color-picker"
|
|
348
|
+
value=""
|
|
349
|
+
/>
|
|
350
|
+
</div>
|
|
351
|
+
</UNSAFE_DirectionSettings.Provider>
|
|
352
|
+
);
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### No label
|
|
356
|
+
|
|
357
|
+
```tsx
|
|
358
|
+
const NoLabel = () => (
|
|
359
|
+
<StatefulColorPicker
|
|
360
|
+
value=""
|
|
361
|
+
className="test_class_name"
|
|
362
|
+
events={{ onChange: handleChange }}
|
|
363
|
+
assistiveText={{ label: 'I should be read' }}
|
|
364
|
+
id="default-color-picker"
|
|
365
|
+
/>
|
|
366
|
+
);
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
### Custom Only
|
|
370
|
+
|
|
371
|
+
```tsx
|
|
372
|
+
const CustomOnly = () => (
|
|
373
|
+
<StatefulColorPicker
|
|
374
|
+
value=""
|
|
375
|
+
events={{ onChange: handleChange }}
|
|
376
|
+
id="custom-only-color-picker"
|
|
377
|
+
labels={{ label: 'Choose Color' }}
|
|
378
|
+
variant="custom"
|
|
379
|
+
/>
|
|
380
|
+
);
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
### Swatch Only
|
|
384
|
+
|
|
385
|
+
```tsx
|
|
386
|
+
const SwatchOnly = () => (
|
|
387
|
+
<StatefulColorPicker
|
|
388
|
+
value=""
|
|
389
|
+
events={{ onChange: handleChange }}
|
|
390
|
+
id="swatch-only-color-picker"
|
|
391
|
+
labels={{ label: 'Choose Color' }}
|
|
392
|
+
variant="swatches"
|
|
393
|
+
/>
|
|
394
|
+
);
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
### Predefined Colors
|
|
398
|
+
|
|
399
|
+
```tsx
|
|
400
|
+
const PredefinedColors = () => (
|
|
401
|
+
<StatefulColorPicker
|
|
402
|
+
value="#000000"
|
|
403
|
+
events={{ onChange: handleChange }}
|
|
404
|
+
id="predefined-color-picker"
|
|
405
|
+
labels={{ label: 'Choose Color' }}
|
|
406
|
+
swatchColors={[
|
|
407
|
+
'#000000',
|
|
408
|
+
'#ff0000',
|
|
409
|
+
'#00ff00',
|
|
410
|
+
'#0000ff',
|
|
411
|
+
'#ffff00',
|
|
412
|
+
'#ff00ff',
|
|
413
|
+
'#00ffff',
|
|
414
|
+
'#ffffff',
|
|
415
|
+
'',
|
|
416
|
+
]}
|
|
417
|
+
/>
|
|
418
|
+
);
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
### Predefined Colors Only
|
|
422
|
+
|
|
423
|
+
```tsx
|
|
424
|
+
const PredefinedColorsOnly = () => (
|
|
425
|
+
<StatefulColorPicker
|
|
426
|
+
value="#000000"
|
|
427
|
+
events={{ onChange: handleChange }}
|
|
428
|
+
id="predefined-only-color-picker"
|
|
429
|
+
labels={{ label: 'Choose Color' }}
|
|
430
|
+
swatchColors={[
|
|
431
|
+
'#000000',
|
|
432
|
+
'#ff0000',
|
|
433
|
+
'#00ff00',
|
|
434
|
+
'#0000ff',
|
|
435
|
+
'#ffff00',
|
|
436
|
+
'#ff00ff',
|
|
437
|
+
'#00ffff',
|
|
438
|
+
'#ffffff',
|
|
439
|
+
'',
|
|
440
|
+
]}
|
|
441
|
+
variant="swatches"
|
|
442
|
+
/>
|
|
443
|
+
);
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
### Hidden Input
|
|
447
|
+
|
|
448
|
+
```tsx
|
|
449
|
+
const HiddenInput = () => (
|
|
450
|
+
<StatefulColorPicker
|
|
451
|
+
value=""
|
|
452
|
+
events={{ onChange: handleChange }}
|
|
453
|
+
hideInput
|
|
454
|
+
id="hidden-input-color-picker"
|
|
455
|
+
labels={{ label: 'Choose Color' }}
|
|
456
|
+
/>
|
|
457
|
+
);
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
### Custom Tab Selected
|
|
461
|
+
|
|
462
|
+
```tsx
|
|
463
|
+
const CustomTabSelected = () => (
|
|
464
|
+
<StatefulColorPicker
|
|
465
|
+
value=""
|
|
466
|
+
defaultSelectedTab="custom"
|
|
467
|
+
events={{ onChange: handleChange }}
|
|
468
|
+
id="Custom-tab-default-color-picker"
|
|
469
|
+
labels={{ label: 'Choose Color' }}
|
|
470
|
+
/>
|
|
471
|
+
);
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
### Outer Input in Error State
|
|
475
|
+
|
|
476
|
+
```tsx
|
|
477
|
+
const OuterInputErrorState = () => (
|
|
478
|
+
<StatefulColorPicker
|
|
479
|
+
value="#invalid"
|
|
480
|
+
events={{ onChange: handleChange }}
|
|
481
|
+
errorText="Hex is invalid. Please correct this field."
|
|
482
|
+
id="outer-input-error-state-color-picker"
|
|
483
|
+
labels={{ label: 'Choose Color' }}
|
|
484
|
+
/>
|
|
485
|
+
);
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
### Working Color Input in Error State
|
|
489
|
+
|
|
490
|
+
```tsx
|
|
491
|
+
const WorkingColorErrorState = () => (
|
|
492
|
+
<StatefulColorPicker
|
|
493
|
+
value=""
|
|
494
|
+
events={{ onChange: handleChange }}
|
|
495
|
+
errorTextWorkingColor="Hex is invalid. Please correct this field."
|
|
496
|
+
id="working-color-error-state-color-picker"
|
|
497
|
+
labels={{ label: 'Choose Color' }}
|
|
498
|
+
valueWorking="#f"
|
|
499
|
+
variant="custom"
|
|
500
|
+
/>
|
|
501
|
+
);
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
### Custom Validator
|
|
505
|
+
|
|
506
|
+
```tsx
|
|
507
|
+
const CustomValidator = () => (
|
|
508
|
+
<StatefulColorPicker
|
|
509
|
+
value=""
|
|
510
|
+
events={{ onChange: handleChange }}
|
|
511
|
+
validateColor={customOuterInputValidator}
|
|
512
|
+
validateWorkingColor={customOuterInputValidator}
|
|
513
|
+
id="custom-validator-color-picker"
|
|
514
|
+
labels={{ label: 'Choose Color' }}
|
|
515
|
+
/>
|
|
516
|
+
);
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
### Color Picker Disabled
|
|
520
|
+
|
|
521
|
+
```tsx
|
|
522
|
+
const Disabled = () => (
|
|
523
|
+
<StatefulColorPicker
|
|
524
|
+
value=""
|
|
525
|
+
id="color-picker"
|
|
526
|
+
disabled
|
|
527
|
+
labels={{ label: 'Choose Color' }}
|
|
528
|
+
/>
|
|
529
|
+
);
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
### ColorPicker Menu Open
|
|
533
|
+
|
|
534
|
+
```tsx
|
|
535
|
+
const MenuOpen = () => (
|
|
536
|
+
<StatefulColorPicker
|
|
537
|
+
value=""
|
|
538
|
+
id="color-picker"
|
|
539
|
+
classNameMenu="test_class_name_menu"
|
|
540
|
+
isOpen
|
|
541
|
+
labels={{ label: 'Choose Color' }}
|
|
542
|
+
/>
|
|
543
|
+
);
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
### Doc site Default
|
|
547
|
+
|
|
548
|
+
`default.jsx` (from `components/color-picker/__examples__/default.jsx`):
|
|
549
|
+
|
|
550
|
+
```jsx
|
|
551
|
+
/* eslint-disable no-console, react/prop-types */
|
|
552
|
+
import React from 'react';
|
|
553
|
+
|
|
554
|
+
import IconSettings from '@salesforce/design-system-react/components/icon-settings';
|
|
555
|
+
import ColorPicker from '@salesforce/design-system-react/components/color-picker';
|
|
556
|
+
|
|
557
|
+
class Example extends React.Component {
|
|
558
|
+
static displayName = 'ColorPickerExample';
|
|
559
|
+
|
|
560
|
+
state = {
|
|
561
|
+
value: '',
|
|
562
|
+
isOpen: false,
|
|
563
|
+
};
|
|
564
|
+
|
|
565
|
+
render() {
|
|
566
|
+
return (
|
|
567
|
+
<IconSettings iconPath="/assets/icons">
|
|
568
|
+
<ColorPicker
|
|
569
|
+
events={{
|
|
570
|
+
onChange: (event, data) => {
|
|
571
|
+
this.setState({ value: data.color });
|
|
572
|
+
},
|
|
573
|
+
onRequestOpen: () => {
|
|
574
|
+
this.setState({ isOpen: true });
|
|
575
|
+
},
|
|
576
|
+
onRequestClose: () => {
|
|
577
|
+
this.setState({ isOpen: false });
|
|
578
|
+
},
|
|
579
|
+
}}
|
|
580
|
+
isOpen={this.state.isOpen}
|
|
581
|
+
labels={{ label: 'Choose Color' }}
|
|
582
|
+
id="default-color-picker"
|
|
583
|
+
value={this.state.value}
|
|
584
|
+
/>
|
|
585
|
+
</IconSettings>
|
|
586
|
+
);
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
export default Example;
|
|
591
|
+
```
|