@fluentui/react-swatch-picker 9.5.4 → 9.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -2
- package/dist/index.d.cts +428 -0
- package/dist/index.d.ts +75 -5
- package/lib/ColorSwatch.js +1 -1
- package/lib/ColorSwatch.js.map +1 -1
- package/lib/EmptySwatch.js +1 -1
- package/lib/EmptySwatch.js.map +1 -1
- package/lib/ImageSwatch.js +1 -1
- package/lib/ImageSwatch.js.map +1 -1
- package/lib/SwatchPicker.js +1 -1
- package/lib/SwatchPicker.js.map +1 -1
- package/lib/SwatchPickerRow.js +1 -1
- package/lib/SwatchPickerRow.js.map +1 -1
- package/lib/components/ColorSwatch/ColorSwatch.constants.js +4 -0
- package/lib/components/ColorSwatch/ColorSwatch.constants.js.map +1 -0
- package/lib/components/ColorSwatch/ColorSwatch.js +5 -5
- package/lib/components/ColorSwatch/ColorSwatch.js.map +1 -1
- package/lib/components/ColorSwatch/ColorSwatch.types.js +1 -3
- package/lib/components/ColorSwatch/ColorSwatch.types.js.map +1 -1
- package/lib/components/ColorSwatch/index.js +5 -4
- package/lib/components/ColorSwatch/index.js.map +1 -1
- package/lib/components/ColorSwatch/renderColorSwatch.js +1 -1
- package/lib/components/ColorSwatch/renderColorSwatch.js.map +1 -1
- package/lib/components/ColorSwatch/useColorSwatch.js +37 -20
- package/lib/components/ColorSwatch/useColorSwatch.js.map +1 -1
- package/lib/components/ColorSwatch/useColorSwatchStyles.styles.js +7 -10
- package/lib/components/ColorSwatch/useColorSwatchStyles.styles.js.map +1 -1
- package/lib/components/ColorSwatch/useColorSwatchStyles.styles.raw.js +5 -8
- package/lib/components/ColorSwatch/useColorSwatchStyles.styles.raw.js.map +1 -1
- package/lib/components/EmptySwatch/EmptySwatch.js +5 -5
- package/lib/components/EmptySwatch/EmptySwatch.js.map +1 -1
- package/lib/components/EmptySwatch/EmptySwatch.types.js +1 -3
- package/lib/components/EmptySwatch/EmptySwatch.types.js.map +1 -1
- package/lib/components/EmptySwatch/index.js +4 -4
- package/lib/components/EmptySwatch/index.js.map +1 -1
- package/lib/components/EmptySwatch/renderEmptySwatch.js +1 -1
- package/lib/components/EmptySwatch/renderEmptySwatch.js.map +1 -1
- package/lib/components/EmptySwatch/useEmptySwatch.js +26 -13
- package/lib/components/EmptySwatch/useEmptySwatch.js.map +1 -1
- package/lib/components/EmptySwatch/useEmptySwatchStyles.styles.js +3 -3
- package/lib/components/EmptySwatch/useEmptySwatchStyles.styles.js.map +1 -1
- package/lib/components/EmptySwatch/useEmptySwatchStyles.styles.raw.js +3 -3
- package/lib/components/ImageSwatch/ImageSwatch.js +5 -5
- package/lib/components/ImageSwatch/ImageSwatch.js.map +1 -1
- package/lib/components/ImageSwatch/ImageSwatch.types.js +1 -3
- package/lib/components/ImageSwatch/ImageSwatch.types.js.map +1 -1
- package/lib/components/ImageSwatch/index.js +4 -4
- package/lib/components/ImageSwatch/index.js.map +1 -1
- package/lib/components/ImageSwatch/renderImageSwatch.js +1 -1
- package/lib/components/ImageSwatch/renderImageSwatch.js.map +1 -1
- package/lib/components/ImageSwatch/useImageSwatch.js +25 -11
- package/lib/components/ImageSwatch/useImageSwatch.js.map +1 -1
- package/lib/components/ImageSwatch/useImageSwatchStyles.styles.js +3 -3
- package/lib/components/ImageSwatch/useImageSwatchStyles.styles.js.map +1 -1
- package/lib/components/ImageSwatch/useImageSwatchStyles.styles.raw.js +3 -3
- package/lib/components/SwatchPicker/SwatchPicker.js +6 -6
- package/lib/components/SwatchPicker/SwatchPicker.js.map +1 -1
- package/lib/components/SwatchPicker/SwatchPicker.types.js +1 -3
- package/lib/components/SwatchPicker/SwatchPicker.types.js.map +1 -1
- package/lib/components/SwatchPicker/index.js +4 -4
- package/lib/components/SwatchPicker/index.js.map +1 -1
- package/lib/components/SwatchPicker/renderSwatchPicker.js +2 -2
- package/lib/components/SwatchPicker/renderSwatchPicker.js.map +1 -1
- package/lib/components/SwatchPicker/useSwatchPicker.js +32 -15
- package/lib/components/SwatchPicker/useSwatchPicker.js.map +1 -1
- package/lib/components/SwatchPicker/useSwatchPickerContextValues.js +1 -1
- package/lib/components/SwatchPicker/useSwatchPickerStyles.styles.js +2 -2
- package/lib/components/SwatchPicker/useSwatchPickerStyles.styles.js.map +1 -1
- package/lib/components/SwatchPicker/useSwatchPickerStyles.styles.raw.js +2 -2
- package/lib/components/SwatchPickerRow/SwatchPickerRow.js +5 -5
- package/lib/components/SwatchPickerRow/SwatchPickerRow.js.map +1 -1
- package/lib/components/SwatchPickerRow/SwatchPickerRow.types.js +1 -3
- package/lib/components/SwatchPickerRow/SwatchPickerRow.types.js.map +1 -1
- package/lib/components/SwatchPickerRow/index.js +4 -4
- package/lib/components/SwatchPickerRow/index.js.map +1 -1
- package/lib/components/SwatchPickerRow/renderSwatchPickerRow.js +1 -1
- package/lib/components/SwatchPickerRow/renderSwatchPickerRow.js.map +1 -1
- package/lib/components/SwatchPickerRow/useSwatchPickerRow.js +21 -8
- package/lib/components/SwatchPickerRow/useSwatchPickerRow.js.map +1 -1
- package/lib/components/SwatchPickerRow/useSwatchPickerRowStyles.styles.js +1 -1
- package/lib/components/SwatchPickerRow/useSwatchPickerRowStyles.styles.js.map +1 -1
- package/lib/components/SwatchPickerRow/useSwatchPickerRowStyles.styles.raw.js +1 -1
- package/lib/contexts/index.js +2 -2
- package/lib/contexts/index.js.map +1 -1
- package/lib/contexts/swatchPicker.js +1 -1
- package/lib/index.js +7 -7
- package/lib/index.js.map +1 -1
- package/lib/utils/renderUtils.js +2 -2
- package/lib/utils/renderUtils.js.map +1 -1
- package/lib-commonjs/{ColorSwatch.js → ColorSwatch.cjs} +4 -1
- package/lib-commonjs/ColorSwatch.cjs.map +1 -0
- package/lib-commonjs/{EmptySwatch.js → EmptySwatch.cjs} +4 -1
- package/lib-commonjs/EmptySwatch.cjs.map +1 -0
- package/lib-commonjs/{ImageSwatch.js → ImageSwatch.cjs} +4 -1
- package/lib-commonjs/ImageSwatch.cjs.map +1 -0
- package/lib-commonjs/{SwatchPicker.js → SwatchPicker.cjs} +4 -1
- package/lib-commonjs/SwatchPicker.cjs.map +1 -0
- package/lib-commonjs/{SwatchPickerRow.js → SwatchPickerRow.cjs} +4 -1
- package/lib-commonjs/SwatchPickerRow.cjs.map +1 -0
- package/lib-commonjs/components/ColorSwatch/{ColorSwatch.js → ColorSwatch.cjs} +3 -3
- package/lib-commonjs/components/ColorSwatch/{ColorSwatch.js.map → ColorSwatch.cjs.map} +1 -1
- package/lib-commonjs/components/ColorSwatch/ColorSwatch.constants.cjs +14 -0
- package/lib-commonjs/components/ColorSwatch/ColorSwatch.constants.cjs.map +1 -0
- package/lib-commonjs/components/ColorSwatch/{ColorSwatch.types.js → ColorSwatch.types.cjs} +1 -3
- package/lib-commonjs/components/ColorSwatch/{ColorSwatch.types.js.map → ColorSwatch.types.cjs.map} +1 -1
- package/lib-commonjs/components/ColorSwatch/{index.js → index.cjs} +9 -5
- package/lib-commonjs/components/ColorSwatch/index.cjs.map +1 -0
- package/lib-commonjs/components/ColorSwatch/renderColorSwatch.cjs.map +1 -0
- package/lib-commonjs/components/ColorSwatch/{useColorSwatch.js → useColorSwatch.cjs} +36 -18
- package/lib-commonjs/components/ColorSwatch/useColorSwatch.cjs.map +1 -0
- package/lib-commonjs/components/ColorSwatch/{useColorSwatchStyles.styles.js → useColorSwatchStyles.styles.cjs} +10 -16
- package/lib-commonjs/components/ColorSwatch/useColorSwatchStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/ColorSwatch/{useColorSwatchStyles.styles.raw.js → useColorSwatchStyles.styles.raw.cjs} +3 -9
- package/lib-commonjs/components/ColorSwatch/useColorSwatchStyles.styles.raw.cjs.map +1 -0
- package/lib-commonjs/components/EmptySwatch/{EmptySwatch.js → EmptySwatch.cjs} +3 -3
- package/lib-commonjs/components/EmptySwatch/{EmptySwatch.js.map → EmptySwatch.cjs.map} +1 -1
- package/lib-commonjs/components/EmptySwatch/{EmptySwatch.types.js → EmptySwatch.types.cjs} +1 -3
- package/lib-commonjs/components/EmptySwatch/{EmptySwatch.types.js.map → EmptySwatch.types.cjs.map} +1 -1
- package/lib-commonjs/components/EmptySwatch/{index.js → index.cjs} +7 -4
- package/lib-commonjs/components/EmptySwatch/index.cjs.map +1 -0
- package/lib-commonjs/components/EmptySwatch/renderEmptySwatch.cjs.map +1 -0
- package/lib-commonjs/components/EmptySwatch/useEmptySwatch.cjs +52 -0
- package/lib-commonjs/components/EmptySwatch/useEmptySwatch.cjs.map +1 -0
- package/lib-commonjs/components/EmptySwatch/useEmptySwatchStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/ImageSwatch/{ImageSwatch.js → ImageSwatch.cjs} +3 -3
- package/lib-commonjs/components/ImageSwatch/{ImageSwatch.js.map → ImageSwatch.cjs.map} +1 -1
- package/lib-commonjs/components/ImageSwatch/{ImageSwatch.types.js → ImageSwatch.types.cjs} +1 -3
- package/lib-commonjs/components/ImageSwatch/{ImageSwatch.types.js.map → ImageSwatch.types.cjs.map} +1 -1
- package/lib-commonjs/components/ImageSwatch/{index.js → index.cjs} +7 -4
- package/lib-commonjs/components/ImageSwatch/index.cjs.map +1 -0
- package/lib-commonjs/components/ImageSwatch/renderImageSwatch.cjs.map +1 -0
- package/lib-commonjs/components/ImageSwatch/{useImageSwatch.js → useImageSwatch.cjs} +25 -10
- package/lib-commonjs/components/ImageSwatch/useImageSwatch.cjs.map +1 -0
- package/lib-commonjs/components/ImageSwatch/useImageSwatchStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/SwatchPicker/{SwatchPicker.js → SwatchPicker.cjs} +4 -4
- package/lib-commonjs/components/SwatchPicker/{SwatchPicker.js.map → SwatchPicker.cjs.map} +1 -1
- package/lib-commonjs/components/SwatchPicker/{SwatchPicker.types.js → SwatchPicker.types.cjs} +1 -3
- package/lib-commonjs/components/SwatchPicker/{SwatchPicker.types.js.map → SwatchPicker.types.cjs.map} +1 -1
- package/lib-commonjs/components/SwatchPicker/{index.js → index.cjs} +7 -4
- package/lib-commonjs/components/SwatchPicker/index.cjs.map +1 -0
- package/lib-commonjs/components/SwatchPicker/{renderSwatchPicker.js → renderSwatchPicker.cjs} +1 -1
- package/lib-commonjs/components/SwatchPicker/renderSwatchPicker.cjs.map +1 -0
- package/lib-commonjs/components/SwatchPicker/{useSwatchPicker.js → useSwatchPicker.cjs} +30 -12
- package/lib-commonjs/components/SwatchPicker/useSwatchPicker.cjs.map +1 -0
- package/lib-commonjs/components/SwatchPicker/useSwatchPickerStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/SwatchPickerRow/{SwatchPickerRow.js → SwatchPickerRow.cjs} +3 -3
- package/lib-commonjs/components/SwatchPickerRow/{SwatchPickerRow.js.map → SwatchPickerRow.cjs.map} +1 -1
- package/lib-commonjs/components/SwatchPickerRow/SwatchPickerRow.types.cjs +4 -0
- package/lib-commonjs/components/SwatchPickerRow/{SwatchPickerRow.types.js.map → SwatchPickerRow.types.cjs.map} +1 -1
- package/lib-commonjs/components/SwatchPickerRow/{index.js → index.cjs} +7 -4
- package/lib-commonjs/components/SwatchPickerRow/index.cjs.map +1 -0
- package/lib-commonjs/components/SwatchPickerRow/renderSwatchPickerRow.cjs.map +1 -0
- package/lib-commonjs/components/SwatchPickerRow/{useSwatchPickerRow.js → useSwatchPickerRow.cjs} +21 -7
- package/lib-commonjs/components/SwatchPickerRow/useSwatchPickerRow.cjs.map +1 -0
- package/lib-commonjs/components/SwatchPickerRow/useSwatchPickerRowStyles.styles.cjs.map +1 -0
- package/lib-commonjs/contexts/{index.js → index.cjs} +2 -2
- package/lib-commonjs/contexts/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/{index.js → index.cjs} +26 -11
- package/lib-commonjs/index.cjs.map +1 -0
- package/lib-commonjs/utils/{renderUtils.js → renderUtils.cjs} +4 -4
- package/lib-commonjs/utils/{renderUtils.js.map → renderUtils.cjs.map} +1 -1
- package/package.json +20 -14
- package/lib-commonjs/ColorSwatch.js.map +0 -1
- package/lib-commonjs/EmptySwatch.js.map +0 -1
- package/lib-commonjs/ImageSwatch.js.map +0 -1
- package/lib-commonjs/SwatchPicker.js.map +0 -1
- package/lib-commonjs/SwatchPickerRow.js.map +0 -1
- package/lib-commonjs/components/ColorSwatch/index.js.map +0 -1
- package/lib-commonjs/components/ColorSwatch/renderColorSwatch.js.map +0 -1
- package/lib-commonjs/components/ColorSwatch/useColorSwatch.js.map +0 -1
- package/lib-commonjs/components/ColorSwatch/useColorSwatchStyles.styles.js.map +0 -1
- package/lib-commonjs/components/ColorSwatch/useColorSwatchStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/EmptySwatch/index.js.map +0 -1
- package/lib-commonjs/components/EmptySwatch/renderEmptySwatch.js.map +0 -1
- package/lib-commonjs/components/EmptySwatch/useEmptySwatch.js +0 -38
- package/lib-commonjs/components/EmptySwatch/useEmptySwatch.js.map +0 -1
- package/lib-commonjs/components/EmptySwatch/useEmptySwatchStyles.styles.js.map +0 -1
- package/lib-commonjs/components/ImageSwatch/index.js.map +0 -1
- package/lib-commonjs/components/ImageSwatch/renderImageSwatch.js.map +0 -1
- package/lib-commonjs/components/ImageSwatch/useImageSwatch.js.map +0 -1
- package/lib-commonjs/components/ImageSwatch/useImageSwatchStyles.styles.js.map +0 -1
- package/lib-commonjs/components/SwatchPicker/index.js.map +0 -1
- package/lib-commonjs/components/SwatchPicker/renderSwatchPicker.js.map +0 -1
- package/lib-commonjs/components/SwatchPicker/useSwatchPicker.js.map +0 -1
- package/lib-commonjs/components/SwatchPicker/useSwatchPickerStyles.styles.js.map +0 -1
- package/lib-commonjs/components/SwatchPickerRow/SwatchPickerRow.types.js +0 -6
- package/lib-commonjs/components/SwatchPickerRow/index.js.map +0 -1
- package/lib-commonjs/components/SwatchPickerRow/renderSwatchPickerRow.js.map +0 -1
- package/lib-commonjs/components/SwatchPickerRow/useSwatchPickerRow.js.map +0 -1
- package/lib-commonjs/components/SwatchPickerRow/useSwatchPickerRowStyles.styles.js.map +0 -1
- package/lib-commonjs/index.js.map +0 -1
- /package/lib-commonjs/components/ColorSwatch/{renderColorSwatch.js → renderColorSwatch.cjs} +0 -0
- /package/lib-commonjs/components/EmptySwatch/{renderEmptySwatch.js → renderEmptySwatch.cjs} +0 -0
- /package/lib-commonjs/components/EmptySwatch/{useEmptySwatchStyles.styles.js → useEmptySwatchStyles.styles.cjs} +0 -0
- /package/lib-commonjs/components/EmptySwatch/{useEmptySwatchStyles.styles.raw.js → useEmptySwatchStyles.styles.raw.cjs} +0 -0
- /package/lib-commonjs/components/EmptySwatch/{useEmptySwatchStyles.styles.raw.js.map → useEmptySwatchStyles.styles.raw.cjs.map} +0 -0
- /package/lib-commonjs/components/ImageSwatch/{renderImageSwatch.js → renderImageSwatch.cjs} +0 -0
- /package/lib-commonjs/components/ImageSwatch/{useImageSwatchStyles.styles.js → useImageSwatchStyles.styles.cjs} +0 -0
- /package/lib-commonjs/components/ImageSwatch/{useImageSwatchStyles.styles.raw.js → useImageSwatchStyles.styles.raw.cjs} +0 -0
- /package/lib-commonjs/components/ImageSwatch/{useImageSwatchStyles.styles.raw.js.map → useImageSwatchStyles.styles.raw.cjs.map} +0 -0
- /package/lib-commonjs/components/SwatchPicker/{useSwatchPickerContextValues.js → useSwatchPickerContextValues.cjs} +0 -0
- /package/lib-commonjs/components/SwatchPicker/{useSwatchPickerContextValues.js.map → useSwatchPickerContextValues.cjs.map} +0 -0
- /package/lib-commonjs/components/SwatchPicker/{useSwatchPickerStyles.styles.js → useSwatchPickerStyles.styles.cjs} +0 -0
- /package/lib-commonjs/components/SwatchPicker/{useSwatchPickerStyles.styles.raw.js → useSwatchPickerStyles.styles.raw.cjs} +0 -0
- /package/lib-commonjs/components/SwatchPicker/{useSwatchPickerStyles.styles.raw.js.map → useSwatchPickerStyles.styles.raw.cjs.map} +0 -0
- /package/lib-commonjs/components/SwatchPickerRow/{renderSwatchPickerRow.js → renderSwatchPickerRow.cjs} +0 -0
- /package/lib-commonjs/components/SwatchPickerRow/{useSwatchPickerRowStyles.styles.js → useSwatchPickerRowStyles.styles.cjs} +0 -0
- /package/lib-commonjs/components/SwatchPickerRow/{useSwatchPickerRowStyles.styles.raw.js → useSwatchPickerRowStyles.styles.raw.cjs} +0 -0
- /package/lib-commonjs/components/SwatchPickerRow/{useSwatchPickerRowStyles.styles.raw.js.map → useSwatchPickerRowStyles.styles.raw.cjs.map} +0 -0
- /package/lib-commonjs/contexts/{swatchPicker.js → swatchPicker.cjs} +0 -0
- /package/lib-commonjs/contexts/{swatchPicker.js.map → swatchPicker.cjs.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,33 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-swatch-picker
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Tue, 11 Aug 2026 17:16:02 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.6.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-swatch-picker_v9.6.0)
|
|
8
|
+
|
|
9
|
+
Tue, 11 Aug 2026 17:16:02 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-swatch-picker_v9.5.4..@fluentui/react-swatch-picker_v9.6.0)
|
|
11
|
+
|
|
12
|
+
### Minor changes
|
|
13
|
+
|
|
14
|
+
- feat: expose headless base APIs ([PR #36534](https://github.com/microsoft/fluentui/pull/36534) by dmytrokirpa@microsoft.com)
|
|
15
|
+
- Bump @fluentui/react-context-selector to v9.2.19 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
16
|
+
- Bump @fluentui/react-field to v9.5.4 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
17
|
+
- Bump @fluentui/react-jsx-runtime to v9.4.5 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
18
|
+
- Bump @fluentui/react-shared-contexts to v9.26.3 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
19
|
+
- Bump @fluentui/react-tabster to v9.26.17 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
20
|
+
- Bump @fluentui/react-theme to v9.2.2 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
21
|
+
- Bump @fluentui/react-utilities to v9.26.6 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
22
|
+
|
|
23
|
+
### Patches
|
|
24
|
+
|
|
25
|
+
- fix: Move ColorSwatch styling out of the headless base hook. ([PR #36550](https://github.com/microsoft/fluentui/pull/36550) by dmytrokirpa@microsoft.com)
|
|
26
|
+
- Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake. ([PR #36327](https://github.com/microsoft/fluentui/pull/36327) by martinhochel@microsoft.com)
|
|
27
|
+
|
|
7
28
|
## [9.5.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-swatch-picker_v9.5.4)
|
|
8
29
|
|
|
9
|
-
Wed, 24 Jun 2026 11:
|
|
30
|
+
Wed, 24 Jun 2026 11:09:57 GMT
|
|
10
31
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-swatch-picker_v9.5.3..@fluentui/react-swatch-picker_v9.5.4)
|
|
11
32
|
|
|
12
33
|
### Patches
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
import type { ComponentProps } from '@fluentui/react-utilities';
|
|
2
|
+
import type { ComponentState } from '@fluentui/react-utilities';
|
|
3
|
+
import type { ContextSelector } from '@fluentui/react-context-selector';
|
|
4
|
+
import type { EventData } from '@fluentui/react-utilities';
|
|
5
|
+
import type { EventHandler } from '@fluentui/react-utilities';
|
|
6
|
+
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
|
7
|
+
import type { JSXElement } from '@fluentui/react-utilities';
|
|
8
|
+
import * as React_2 from 'react';
|
|
9
|
+
import type { Slot } from '@fluentui/react-utilities';
|
|
10
|
+
import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* ColorSwatch component is used to render a colors, icons and gradients.
|
|
14
|
+
*/
|
|
15
|
+
export declare const ColorSwatch: ForwardRefComponent<ColorSwatchProps>;
|
|
16
|
+
|
|
17
|
+
export declare type ColorSwatchBaseProps = Omit<ColorSwatchProps, 'size' | 'shape'>;
|
|
18
|
+
|
|
19
|
+
export declare type ColorSwatchBaseState = Omit<ColorSwatchState, 'size' | 'shape'>;
|
|
20
|
+
|
|
21
|
+
export declare const colorSwatchClassNames: SlotClassNames<ColorSwatchSlots>;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* ColorSwatch Props
|
|
25
|
+
*/
|
|
26
|
+
export declare type ColorSwatchProps = ComponentProps<ColorSwatchSlots> & Pick<SwatchPickerProps, 'size' | 'shape'> & {
|
|
27
|
+
/**
|
|
28
|
+
* Border color when contrast is low
|
|
29
|
+
*/
|
|
30
|
+
borderColor?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Swatch color
|
|
33
|
+
*/
|
|
34
|
+
color: string;
|
|
35
|
+
/**
|
|
36
|
+
* Whether the swatch is disabled
|
|
37
|
+
*/
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Swatch value
|
|
41
|
+
*/
|
|
42
|
+
value: string;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export declare type ColorSwatchSlots = {
|
|
46
|
+
root: NonNullable<Slot<'button'>>;
|
|
47
|
+
icon?: Slot<'span'>;
|
|
48
|
+
disabledIcon?: Slot<'span'>;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* State used in rendering ColorSwatch
|
|
53
|
+
*/
|
|
54
|
+
export declare type ColorSwatchState = ComponentState<ColorSwatchSlots> & Pick<ColorSwatchProps, 'color' | 'disabled' | 'size' | 'shape' | 'value'> & {
|
|
55
|
+
selected: boolean;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* EmptySwatch component is used for adding new color swatches.
|
|
60
|
+
*/
|
|
61
|
+
export declare const EmptySwatch: ForwardRefComponent<EmptySwatchProps>;
|
|
62
|
+
|
|
63
|
+
export declare type EmptySwatchBaseProps = ComponentProps<EmptySwatchSlots>;
|
|
64
|
+
|
|
65
|
+
export declare type EmptySwatchBaseState = ComponentState<EmptySwatchSlots>;
|
|
66
|
+
|
|
67
|
+
export declare const emptySwatchClassNames: SlotClassNames<EmptySwatchSlots>;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* EmptySwatch Props
|
|
71
|
+
*/
|
|
72
|
+
export declare type EmptySwatchProps = ComponentProps<EmptySwatchSlots> & Pick<SwatchPickerProps, 'size' | 'shape'>;
|
|
73
|
+
|
|
74
|
+
export declare type EmptySwatchSlots = {
|
|
75
|
+
root: Slot<'button'>;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* State used in rendering EmptySwatch
|
|
80
|
+
*/
|
|
81
|
+
export declare type EmptySwatchState = ComponentState<EmptySwatchSlots> & Pick<EmptySwatchProps, 'size' | 'shape'>;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* ImageSwatch component is used to render an images, patterns and textures.
|
|
85
|
+
*/
|
|
86
|
+
export declare const ImageSwatch: ForwardRefComponent<ImageSwatchProps>;
|
|
87
|
+
|
|
88
|
+
export declare type ImageSwatchBaseProps = Omit<ImageSwatchProps, 'size' | 'shape'>;
|
|
89
|
+
|
|
90
|
+
export declare type ImageSwatchBaseState = Omit<ImageSwatchState, 'size' | 'shape'>;
|
|
91
|
+
|
|
92
|
+
export declare const imageSwatchClassNames: SlotClassNames<ImageSwatchSlots>;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* ImageSwatch Props
|
|
96
|
+
*/
|
|
97
|
+
export declare type ImageSwatchProps = ComponentProps<ImageSwatchSlots> & Pick<SwatchPickerProps, 'size' | 'shape'> & {
|
|
98
|
+
/**
|
|
99
|
+
* Swatch color
|
|
100
|
+
*/
|
|
101
|
+
src: string;
|
|
102
|
+
/**
|
|
103
|
+
* Swatch value
|
|
104
|
+
*/
|
|
105
|
+
value: string;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export declare type ImageSwatchSlots = {
|
|
109
|
+
root: Slot<'button'>;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* State used in rendering ImageSwatch
|
|
114
|
+
*/
|
|
115
|
+
export declare type ImageSwatchState = ComponentState<ImageSwatchSlots> & Pick<ImageSwatchProps, 'color' | 'size' | 'shape' | 'value'> & {
|
|
116
|
+
selected: boolean;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Render the final JSX of ColorSwatch
|
|
121
|
+
*/
|
|
122
|
+
export declare const renderColorSwatch_unstable: (state: ColorSwatchBaseState) => JSXElement;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Render the final JSX of EmptySwatch
|
|
126
|
+
*/
|
|
127
|
+
export declare const renderEmptySwatch_unstable: (state: EmptySwatchBaseState) => JSXElement;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Render the final JSX of ImageSwatch
|
|
131
|
+
*/
|
|
132
|
+
export declare const renderImageSwatch_unstable: (state: ImageSwatchBaseState) => JSXElement;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Render the final JSX of SwatchPicker
|
|
136
|
+
*/
|
|
137
|
+
export declare const renderSwatchPicker_unstable: (state: SwatchPickerBaseState, contextValues: SwatchPickerContextValues) => JSXElement;
|
|
138
|
+
|
|
139
|
+
export declare const renderSwatchPickerGrid: (props: SwatchPickerGridProps) => JSXElement[];
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Render the final JSX of SwatchPickerRow
|
|
143
|
+
*/
|
|
144
|
+
export declare const renderSwatchPickerRow_unstable: (state: SwatchPickerRowBaseState) => JSXElement;
|
|
145
|
+
|
|
146
|
+
export declare const swatchCSSVars: {
|
|
147
|
+
color: string;
|
|
148
|
+
borderColor: string;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* SwatchPicker component - TODO: add more docs
|
|
153
|
+
*/
|
|
154
|
+
export declare const SwatchPicker: ForwardRefComponent<SwatchPickerProps>;
|
|
155
|
+
|
|
156
|
+
export declare type SwatchPickerBaseProps = Omit<SwatchPickerProps, 'size' | 'shape' | 'spacing'>;
|
|
157
|
+
|
|
158
|
+
export declare type SwatchPickerBaseState = Omit<SwatchPickerState, 'size' | 'shape' | 'spacing'>;
|
|
159
|
+
|
|
160
|
+
export declare const swatchPickerClassNames: SlotClassNames<SwatchPickerSlots>;
|
|
161
|
+
|
|
162
|
+
export declare const swatchPickerContextDefaultValue: SwatchPickerContextValue;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* The context through which individual color controls communicate with the picker.
|
|
166
|
+
*/
|
|
167
|
+
export declare type SwatchPickerContextValue = Pick<SwatchPickerProps, 'size' | 'shape' | 'spacing' | 'selectedValue'> & {
|
|
168
|
+
/**
|
|
169
|
+
* Whether layout is grid.
|
|
170
|
+
*/
|
|
171
|
+
isGrid: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Callback used by ColorSwatch to request a change on it's selected state
|
|
174
|
+
* Should be used to select ColorSwatch
|
|
175
|
+
*
|
|
176
|
+
* @internal
|
|
177
|
+
*/
|
|
178
|
+
requestSelectionChange: (event: React_2.MouseEvent<HTMLButtonElement>, data: {
|
|
179
|
+
selectedValue: string;
|
|
180
|
+
selectedSwatch: string;
|
|
181
|
+
}) => void;
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
export declare type SwatchPickerContextValues = {
|
|
185
|
+
swatchPicker: SwatchPickerContextValue;
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
export declare type SwatchPickerGridProps = {
|
|
189
|
+
items: SwatchProps[];
|
|
190
|
+
columnCount: number;
|
|
191
|
+
renderRow?: (props: {
|
|
192
|
+
children: JSXElement[];
|
|
193
|
+
rowId: string | number;
|
|
194
|
+
}) => JSXElement;
|
|
195
|
+
renderSwatch?: (item: SwatchProps) => JSXElement;
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
export declare type SwatchPickerOnSelectEventHandler = EventHandler<SwatchPickerOnSelectionChangeData>;
|
|
199
|
+
|
|
200
|
+
export declare type SwatchPickerOnSelectionChangeData = EventData<'click', React_2.MouseEvent<HTMLButtonElement>> & {
|
|
201
|
+
selectedValue: string;
|
|
202
|
+
selectedSwatch: string;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* SwatchPicker Props
|
|
207
|
+
*/
|
|
208
|
+
export declare type SwatchPickerProps = ComponentProps<SwatchPickerSlots> & {
|
|
209
|
+
/**
|
|
210
|
+
* Default selected value
|
|
211
|
+
*/
|
|
212
|
+
defaultSelectedValue?: string;
|
|
213
|
+
/**
|
|
214
|
+
* Sets the focus behavior for the SwatchPicker.
|
|
215
|
+
*
|
|
216
|
+
* `arrow`
|
|
217
|
+
* This behavior will cycle through all elements inside of the SwatchPicker when pressing the Arrow key.
|
|
218
|
+
*
|
|
219
|
+
* `tab`
|
|
220
|
+
* This behavior will cycle through all elements inside of the SwatchPicker when pressing the Tab key.
|
|
221
|
+
*
|
|
222
|
+
* @default 'arrow'
|
|
223
|
+
*/
|
|
224
|
+
focusMode?: 'arrow' | 'tab';
|
|
225
|
+
/**
|
|
226
|
+
* Whether SwatchPicker is row or grid
|
|
227
|
+
*/
|
|
228
|
+
layout?: 'row' | 'grid';
|
|
229
|
+
/**
|
|
230
|
+
* Triggers a callback when the value has been changed
|
|
231
|
+
*/
|
|
232
|
+
onSelectionChange?: EventHandler<SwatchPickerOnSelectionChangeData>;
|
|
233
|
+
/**
|
|
234
|
+
* Controlled selected value
|
|
235
|
+
*/
|
|
236
|
+
selectedValue?: string;
|
|
237
|
+
/**
|
|
238
|
+
* Swatch size
|
|
239
|
+
* @defaultvalue 'medium'
|
|
240
|
+
*/
|
|
241
|
+
size?: 'extra-small' | 'small' | 'medium' | 'large';
|
|
242
|
+
/**
|
|
243
|
+
* Swatch shape
|
|
244
|
+
* @defaultvalue 'square'
|
|
245
|
+
*/
|
|
246
|
+
shape?: 'rounded' | 'square' | 'circular';
|
|
247
|
+
/**
|
|
248
|
+
* Spacing between swatches
|
|
249
|
+
* @defaultvalue 'medium'
|
|
250
|
+
*/
|
|
251
|
+
spacing?: 'small' | 'medium';
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
export declare const SwatchPickerProvider: React_2.Provider<SwatchPickerContextValue> & React_2.FC<React_2.ProviderProps<SwatchPickerContextValue>>;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* SwatchPickerRow component is used to render a row of swatches.
|
|
258
|
+
*/
|
|
259
|
+
export declare const SwatchPickerRow: ForwardRefComponent<SwatchPickerRowProps>;
|
|
260
|
+
|
|
261
|
+
export declare type SwatchPickerRowBaseProps = ComponentProps<SwatchPickerRowSlots>;
|
|
262
|
+
|
|
263
|
+
export declare type SwatchPickerRowBaseState = ComponentState<SwatchPickerRowSlots>;
|
|
264
|
+
|
|
265
|
+
export declare const swatchPickerRowClassNames: SlotClassNames<SwatchPickerRowSlots>;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* SwatchPickerRow Props
|
|
269
|
+
*/
|
|
270
|
+
export declare type SwatchPickerRowProps = ComponentProps<SwatchPickerRowSlots>;
|
|
271
|
+
|
|
272
|
+
export declare type SwatchPickerRowSlots = {
|
|
273
|
+
root: Slot<'div'>;
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* State used in rendering SwatchPickerRow
|
|
278
|
+
*/
|
|
279
|
+
export declare type SwatchPickerRowState = ComponentState<SwatchPickerRowSlots> & Pick<SwatchPickerProps, 'spacing'>;
|
|
280
|
+
|
|
281
|
+
export declare type SwatchPickerSlots = {
|
|
282
|
+
root: Slot<'div'>;
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* State used in rendering SwatchPicker
|
|
287
|
+
*/
|
|
288
|
+
export declare type SwatchPickerState = ComponentState<SwatchPickerSlots> & SwatchPickerContextValue & Pick<SwatchPickerProps, 'layout' | 'size' | 'shape' | 'spacing'> & {
|
|
289
|
+
isGrid: boolean;
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
export declare type SwatchProps = ImageSwatchProps | ColorSwatchProps;
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Create the state required to render ColorSwatch.
|
|
296
|
+
*
|
|
297
|
+
* The returned state can be modified with hooks such as useColorSwatchStyles_unstable,
|
|
298
|
+
* before being passed to renderColorSwatch_unstable.
|
|
299
|
+
*
|
|
300
|
+
* @param props - props from this instance of ColorSwatch
|
|
301
|
+
* @param ref - reference to root HTMLButtonElement of ColorSwatch
|
|
302
|
+
*/
|
|
303
|
+
export declare const useColorSwatch_unstable: (props: ColorSwatchProps, ref: React_2.Ref<HTMLButtonElement>) => ColorSwatchState;
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Create the basee state required to render unstyled ColorSwatch.
|
|
307
|
+
*
|
|
308
|
+
* The returned state can be modified with hooks before being passed to renderColorSwatch_unstable.
|
|
309
|
+
*
|
|
310
|
+
* @param props - props from this instance of ColorSwatch
|
|
311
|
+
* @param ref - reference to root HTMLButtonElement of ColorSwatch
|
|
312
|
+
*/
|
|
313
|
+
export declare const useColorSwatchBase_unstable: (props: ColorSwatchBaseProps, ref: React_2.Ref<HTMLButtonElement>) => ColorSwatchBaseState;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Apply styling to the ColorSwatch slots based on the state
|
|
317
|
+
*/
|
|
318
|
+
export declare const useColorSwatchStyles_unstable: (state: ColorSwatchState) => ColorSwatchState;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Create the state required to render EmptySwatch.
|
|
322
|
+
*
|
|
323
|
+
* The returned state can be modified with hooks such as useEmptySwatchStyles_unstable,
|
|
324
|
+
* before being passed to renderEmptySwatch_unstable.
|
|
325
|
+
*
|
|
326
|
+
* @param props - props from this instance of EmptySwatch
|
|
327
|
+
* @param ref - reference to root HTMLDivElement of EmptySwatch
|
|
328
|
+
*/
|
|
329
|
+
export declare const useEmptySwatch_unstable: (props: EmptySwatchProps, ref: React_2.Ref<HTMLButtonElement>) => EmptySwatchState;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Create the base state required to render unstyled EmptySwatch.
|
|
333
|
+
*
|
|
334
|
+
* The returned state can be modified with hooks before being passed to renderEmptySwatch_unstable.
|
|
335
|
+
*
|
|
336
|
+
* @param props - props from this instance of EmptySwatch
|
|
337
|
+
* @param ref - reference to root HTMLDivElement of EmptySwatch
|
|
338
|
+
*/
|
|
339
|
+
export declare const useEmptySwatchBase_unstable: (props: EmptySwatchBaseProps, ref: React_2.Ref<HTMLButtonElement>) => EmptySwatchBaseState;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Apply styling to the EmptySwatch slots based on the state
|
|
343
|
+
*/
|
|
344
|
+
export declare const useEmptySwatchStyles_unstable: (state: EmptySwatchState) => EmptySwatchState;
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Create the state required to render ImageSwatch.
|
|
348
|
+
*
|
|
349
|
+
* The returned state can be modified with hooks such as useImageSwatchStyles_unstable,
|
|
350
|
+
* before being passed to renderImageSwatch_unstable.
|
|
351
|
+
*
|
|
352
|
+
* @param props - props from this instance of ImageSwatch
|
|
353
|
+
* @param ref - reference to root HTMLDivElement of ImageSwatch
|
|
354
|
+
*/
|
|
355
|
+
export declare const useImageSwatch_unstable: (props: ImageSwatchProps, ref: React_2.Ref<HTMLButtonElement>) => ImageSwatchState;
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Create the base state required to render unstyled ImageSwatch.
|
|
359
|
+
*
|
|
360
|
+
* The returned state can be modified with hooks before being passed to renderImageSwatch_unstable.
|
|
361
|
+
*
|
|
362
|
+
* @param props - props from this instance of ImageSwatch
|
|
363
|
+
* @param ref - reference to root HTMLDivElement of ImageSwatch
|
|
364
|
+
*/
|
|
365
|
+
export declare const useImageSwatchBase_unstable: (props: ImageSwatchBaseProps, ref: React_2.Ref<HTMLButtonElement>) => ImageSwatchBaseState;
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Apply styling to the ImageSwatch slots based on the state
|
|
369
|
+
*/
|
|
370
|
+
export declare const useImageSwatchStyles_unstable: (state: ImageSwatchState) => ImageSwatchState;
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Create the state required to render SwatchPicker.
|
|
374
|
+
*
|
|
375
|
+
* The returned state can be modified with hooks such as useSwatchPickerStyles_unstable,
|
|
376
|
+
* before being passed to renderSwatchPicker_unstable.
|
|
377
|
+
*
|
|
378
|
+
* @param props - props from this instance of SwatchPicker
|
|
379
|
+
* @param ref - reference to root HTMLElement of SwatchPicker
|
|
380
|
+
*/
|
|
381
|
+
export declare const useSwatchPicker_unstable: (props: SwatchPickerProps, ref: React_2.Ref<HTMLDivElement>) => SwatchPickerState;
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Create the base state required to render unstyled SwatchPicker.
|
|
385
|
+
*
|
|
386
|
+
* The returned state can be modified with hooks before being passed to renderSwatchPicker_unstable.
|
|
387
|
+
*
|
|
388
|
+
* @param props - props from this instance of SwatchPicker
|
|
389
|
+
* @param ref - reference to root HTMLElement of SwatchPicker
|
|
390
|
+
*/
|
|
391
|
+
export declare const useSwatchPickerBase_unstable: (props: SwatchPickerBaseProps, ref: React_2.Ref<HTMLDivElement>) => SwatchPickerBaseState;
|
|
392
|
+
|
|
393
|
+
export declare const useSwatchPickerContextValue_unstable: <T>(selector: ContextSelector<SwatchPickerContextValue, T>) => T;
|
|
394
|
+
|
|
395
|
+
export declare const useSwatchPickerContextValues: (state: SwatchPickerState) => SwatchPickerContextValues;
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* Create the state required to render SwatchPickerRow.
|
|
399
|
+
*
|
|
400
|
+
* The returned state can be modified with hooks such as useSwatchPickerRowStyles_unstable,
|
|
401
|
+
* before being passed to renderSwatchPickerRow_unstable.
|
|
402
|
+
*
|
|
403
|
+
* @param props - props from this instance of SwatchPickerRow
|
|
404
|
+
* @param ref - reference to root HTMLDivElement of SwatchPickerRow
|
|
405
|
+
*/
|
|
406
|
+
export declare const useSwatchPickerRow_unstable: (props: SwatchPickerRowProps, ref: React_2.Ref<HTMLDivElement>) => SwatchPickerRowState;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Create the base state required to render unstyled SwatchPickerRow.
|
|
410
|
+
*
|
|
411
|
+
* The returned state can be modified with hooks before being passed to renderSwatchPickerRow_unstable.
|
|
412
|
+
*
|
|
413
|
+
* @param props - props from this instance of SwatchPickerRow
|
|
414
|
+
* @param ref - reference to root HTMLDivElement of SwatchPickerRow
|
|
415
|
+
*/
|
|
416
|
+
export declare const useSwatchPickerRowBase_unstable: (props: SwatchPickerRowBaseProps, ref: React_2.Ref<HTMLDivElement>) => SwatchPickerRowBaseState;
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Apply styling to the SwatchPickerRow slots based on the state
|
|
420
|
+
*/
|
|
421
|
+
export declare const useSwatchPickerRowStyles_unstable: (state: SwatchPickerRowState) => SwatchPickerRowState;
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Apply styling to the SwatchPicker slots based on the state
|
|
425
|
+
*/
|
|
426
|
+
export declare const useSwatchPickerStyles_unstable: (state: SwatchPickerState) => SwatchPickerState;
|
|
427
|
+
|
|
428
|
+
export { }
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,10 @@ import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
|
14
14
|
*/
|
|
15
15
|
export declare const ColorSwatch: ForwardRefComponent<ColorSwatchProps>;
|
|
16
16
|
|
|
17
|
+
export declare type ColorSwatchBaseProps = Omit<ColorSwatchProps, 'size' | 'shape'>;
|
|
18
|
+
|
|
19
|
+
export declare type ColorSwatchBaseState = Omit<ColorSwatchState, 'size' | 'shape'>;
|
|
20
|
+
|
|
17
21
|
export declare const colorSwatchClassNames: SlotClassNames<ColorSwatchSlots>;
|
|
18
22
|
|
|
19
23
|
/**
|
|
@@ -56,6 +60,10 @@ export declare type ColorSwatchState = ComponentState<ColorSwatchSlots> & Pick<C
|
|
|
56
60
|
*/
|
|
57
61
|
export declare const EmptySwatch: ForwardRefComponent<EmptySwatchProps>;
|
|
58
62
|
|
|
63
|
+
export declare type EmptySwatchBaseProps = ComponentProps<EmptySwatchSlots>;
|
|
64
|
+
|
|
65
|
+
export declare type EmptySwatchBaseState = ComponentState<EmptySwatchSlots>;
|
|
66
|
+
|
|
59
67
|
export declare const emptySwatchClassNames: SlotClassNames<EmptySwatchSlots>;
|
|
60
68
|
|
|
61
69
|
/**
|
|
@@ -77,6 +85,10 @@ export declare type EmptySwatchState = ComponentState<EmptySwatchSlots> & Pick<E
|
|
|
77
85
|
*/
|
|
78
86
|
export declare const ImageSwatch: ForwardRefComponent<ImageSwatchProps>;
|
|
79
87
|
|
|
88
|
+
export declare type ImageSwatchBaseProps = Omit<ImageSwatchProps, 'size' | 'shape'>;
|
|
89
|
+
|
|
90
|
+
export declare type ImageSwatchBaseState = Omit<ImageSwatchState, 'size' | 'shape'>;
|
|
91
|
+
|
|
80
92
|
export declare const imageSwatchClassNames: SlotClassNames<ImageSwatchSlots>;
|
|
81
93
|
|
|
82
94
|
/**
|
|
@@ -107,29 +119,29 @@ export declare type ImageSwatchState = ComponentState<ImageSwatchSlots> & Pick<I
|
|
|
107
119
|
/**
|
|
108
120
|
* Render the final JSX of ColorSwatch
|
|
109
121
|
*/
|
|
110
|
-
export declare const renderColorSwatch_unstable: (state:
|
|
122
|
+
export declare const renderColorSwatch_unstable: (state: ColorSwatchBaseState) => JSXElement;
|
|
111
123
|
|
|
112
124
|
/**
|
|
113
125
|
* Render the final JSX of EmptySwatch
|
|
114
126
|
*/
|
|
115
|
-
export declare const renderEmptySwatch_unstable: (state:
|
|
127
|
+
export declare const renderEmptySwatch_unstable: (state: EmptySwatchBaseState) => JSXElement;
|
|
116
128
|
|
|
117
129
|
/**
|
|
118
130
|
* Render the final JSX of ImageSwatch
|
|
119
131
|
*/
|
|
120
|
-
export declare const renderImageSwatch_unstable: (state:
|
|
132
|
+
export declare const renderImageSwatch_unstable: (state: ImageSwatchBaseState) => JSXElement;
|
|
121
133
|
|
|
122
134
|
/**
|
|
123
135
|
* Render the final JSX of SwatchPicker
|
|
124
136
|
*/
|
|
125
|
-
export declare const renderSwatchPicker_unstable: (state:
|
|
137
|
+
export declare const renderSwatchPicker_unstable: (state: SwatchPickerBaseState, contextValues: SwatchPickerContextValues) => JSXElement;
|
|
126
138
|
|
|
127
139
|
export declare const renderSwatchPickerGrid: (props: SwatchPickerGridProps) => JSXElement[];
|
|
128
140
|
|
|
129
141
|
/**
|
|
130
142
|
* Render the final JSX of SwatchPickerRow
|
|
131
143
|
*/
|
|
132
|
-
export declare const renderSwatchPickerRow_unstable: (state:
|
|
144
|
+
export declare const renderSwatchPickerRow_unstable: (state: SwatchPickerRowBaseState) => JSXElement;
|
|
133
145
|
|
|
134
146
|
export declare const swatchCSSVars: {
|
|
135
147
|
color: string;
|
|
@@ -141,6 +153,10 @@ export declare const swatchCSSVars: {
|
|
|
141
153
|
*/
|
|
142
154
|
export declare const SwatchPicker: ForwardRefComponent<SwatchPickerProps>;
|
|
143
155
|
|
|
156
|
+
export declare type SwatchPickerBaseProps = Omit<SwatchPickerProps, 'size' | 'shape' | 'spacing'>;
|
|
157
|
+
|
|
158
|
+
export declare type SwatchPickerBaseState = Omit<SwatchPickerState, 'size' | 'shape' | 'spacing'>;
|
|
159
|
+
|
|
144
160
|
export declare const swatchPickerClassNames: SlotClassNames<SwatchPickerSlots>;
|
|
145
161
|
|
|
146
162
|
export declare const swatchPickerContextDefaultValue: SwatchPickerContextValue;
|
|
@@ -242,6 +258,10 @@ export declare const SwatchPickerProvider: React_2.Provider<SwatchPickerContextV
|
|
|
242
258
|
*/
|
|
243
259
|
export declare const SwatchPickerRow: ForwardRefComponent<SwatchPickerRowProps>;
|
|
244
260
|
|
|
261
|
+
export declare type SwatchPickerRowBaseProps = ComponentProps<SwatchPickerRowSlots>;
|
|
262
|
+
|
|
263
|
+
export declare type SwatchPickerRowBaseState = ComponentState<SwatchPickerRowSlots>;
|
|
264
|
+
|
|
245
265
|
export declare const swatchPickerRowClassNames: SlotClassNames<SwatchPickerRowSlots>;
|
|
246
266
|
|
|
247
267
|
/**
|
|
@@ -282,6 +302,16 @@ export declare type SwatchProps = ImageSwatchProps | ColorSwatchProps;
|
|
|
282
302
|
*/
|
|
283
303
|
export declare const useColorSwatch_unstable: (props: ColorSwatchProps, ref: React_2.Ref<HTMLButtonElement>) => ColorSwatchState;
|
|
284
304
|
|
|
305
|
+
/**
|
|
306
|
+
* Create the basee state required to render unstyled ColorSwatch.
|
|
307
|
+
*
|
|
308
|
+
* The returned state can be modified with hooks before being passed to renderColorSwatch_unstable.
|
|
309
|
+
*
|
|
310
|
+
* @param props - props from this instance of ColorSwatch
|
|
311
|
+
* @param ref - reference to root HTMLButtonElement of ColorSwatch
|
|
312
|
+
*/
|
|
313
|
+
export declare const useColorSwatchBase_unstable: (props: ColorSwatchBaseProps, ref: React_2.Ref<HTMLButtonElement>) => ColorSwatchBaseState;
|
|
314
|
+
|
|
285
315
|
/**
|
|
286
316
|
* Apply styling to the ColorSwatch slots based on the state
|
|
287
317
|
*/
|
|
@@ -298,6 +328,16 @@ export declare const useColorSwatchStyles_unstable: (state: ColorSwatchState) =>
|
|
|
298
328
|
*/
|
|
299
329
|
export declare const useEmptySwatch_unstable: (props: EmptySwatchProps, ref: React_2.Ref<HTMLButtonElement>) => EmptySwatchState;
|
|
300
330
|
|
|
331
|
+
/**
|
|
332
|
+
* Create the base state required to render unstyled EmptySwatch.
|
|
333
|
+
*
|
|
334
|
+
* The returned state can be modified with hooks before being passed to renderEmptySwatch_unstable.
|
|
335
|
+
*
|
|
336
|
+
* @param props - props from this instance of EmptySwatch
|
|
337
|
+
* @param ref - reference to root HTMLDivElement of EmptySwatch
|
|
338
|
+
*/
|
|
339
|
+
export declare const useEmptySwatchBase_unstable: (props: EmptySwatchBaseProps, ref: React_2.Ref<HTMLButtonElement>) => EmptySwatchBaseState;
|
|
340
|
+
|
|
301
341
|
/**
|
|
302
342
|
* Apply styling to the EmptySwatch slots based on the state
|
|
303
343
|
*/
|
|
@@ -314,6 +354,16 @@ export declare const useEmptySwatchStyles_unstable: (state: EmptySwatchState) =>
|
|
|
314
354
|
*/
|
|
315
355
|
export declare const useImageSwatch_unstable: (props: ImageSwatchProps, ref: React_2.Ref<HTMLButtonElement>) => ImageSwatchState;
|
|
316
356
|
|
|
357
|
+
/**
|
|
358
|
+
* Create the base state required to render unstyled ImageSwatch.
|
|
359
|
+
*
|
|
360
|
+
* The returned state can be modified with hooks before being passed to renderImageSwatch_unstable.
|
|
361
|
+
*
|
|
362
|
+
* @param props - props from this instance of ImageSwatch
|
|
363
|
+
* @param ref - reference to root HTMLDivElement of ImageSwatch
|
|
364
|
+
*/
|
|
365
|
+
export declare const useImageSwatchBase_unstable: (props: ImageSwatchBaseProps, ref: React_2.Ref<HTMLButtonElement>) => ImageSwatchBaseState;
|
|
366
|
+
|
|
317
367
|
/**
|
|
318
368
|
* Apply styling to the ImageSwatch slots based on the state
|
|
319
369
|
*/
|
|
@@ -330,6 +380,16 @@ export declare const useImageSwatchStyles_unstable: (state: ImageSwatchState) =>
|
|
|
330
380
|
*/
|
|
331
381
|
export declare const useSwatchPicker_unstable: (props: SwatchPickerProps, ref: React_2.Ref<HTMLDivElement>) => SwatchPickerState;
|
|
332
382
|
|
|
383
|
+
/**
|
|
384
|
+
* Create the base state required to render unstyled SwatchPicker.
|
|
385
|
+
*
|
|
386
|
+
* The returned state can be modified with hooks before being passed to renderSwatchPicker_unstable.
|
|
387
|
+
*
|
|
388
|
+
* @param props - props from this instance of SwatchPicker
|
|
389
|
+
* @param ref - reference to root HTMLElement of SwatchPicker
|
|
390
|
+
*/
|
|
391
|
+
export declare const useSwatchPickerBase_unstable: (props: SwatchPickerBaseProps, ref: React_2.Ref<HTMLDivElement>) => SwatchPickerBaseState;
|
|
392
|
+
|
|
333
393
|
export declare const useSwatchPickerContextValue_unstable: <T>(selector: ContextSelector<SwatchPickerContextValue, T>) => T;
|
|
334
394
|
|
|
335
395
|
export declare const useSwatchPickerContextValues: (state: SwatchPickerState) => SwatchPickerContextValues;
|
|
@@ -345,6 +405,16 @@ export declare const useSwatchPickerContextValues: (state: SwatchPickerState) =>
|
|
|
345
405
|
*/
|
|
346
406
|
export declare const useSwatchPickerRow_unstable: (props: SwatchPickerRowProps, ref: React_2.Ref<HTMLDivElement>) => SwatchPickerRowState;
|
|
347
407
|
|
|
408
|
+
/**
|
|
409
|
+
* Create the base state required to render unstyled SwatchPickerRow.
|
|
410
|
+
*
|
|
411
|
+
* The returned state can be modified with hooks before being passed to renderSwatchPickerRow_unstable.
|
|
412
|
+
*
|
|
413
|
+
* @param props - props from this instance of SwatchPickerRow
|
|
414
|
+
* @param ref - reference to root HTMLDivElement of SwatchPickerRow
|
|
415
|
+
*/
|
|
416
|
+
export declare const useSwatchPickerRowBase_unstable: (props: SwatchPickerRowBaseProps, ref: React_2.Ref<HTMLDivElement>) => SwatchPickerRowBaseState;
|
|
417
|
+
|
|
348
418
|
/**
|
|
349
419
|
* Apply styling to the SwatchPickerRow slots based on the state
|
|
350
420
|
*/
|
package/lib/ColorSwatch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ColorSwatch, colorSwatchClassNames, renderColorSwatch_unstable, swatchCSSVars, useColorSwatchStyles_unstable, useColorSwatch_unstable } from
|
|
1
|
+
export { ColorSwatch, colorSwatchClassNames, renderColorSwatch_unstable, swatchCSSVars, useColorSwatchStyles_unstable, useColorSwatch_unstable, useColorSwatchBase_unstable } from "./components/ColorSwatch/index.js";
|
package/lib/ColorSwatch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ColorSwatch.ts"],"sourcesContent":["export type {
|
|
1
|
+
{"version":3,"sources":["../src/ColorSwatch.ts"],"sourcesContent":["export type {\n ColorSwatchBaseProps,\n ColorSwatchBaseState,\n ColorSwatchProps,\n ColorSwatchSlots,\n ColorSwatchState,\n} from './components/ColorSwatch/index';\nexport {\n ColorSwatch,\n colorSwatchClassNames,\n renderColorSwatch_unstable,\n swatchCSSVars,\n useColorSwatchStyles_unstable,\n useColorSwatch_unstable,\n useColorSwatchBase_unstable,\n} from './components/ColorSwatch/index';\n"],"names":["ColorSwatch","colorSwatchClassNames","renderColorSwatch_unstable","swatchCSSVars","useColorSwatchStyles_unstable","useColorSwatch_unstable","useColorSwatchBase_unstable"],"mappings":"AAOA,SACEA,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,aAAa,EACbC,6BAA6B,EAC7BC,uBAAuB,EACvBC,2BAA2B,QACtB,oCAAiC"}
|
package/lib/EmptySwatch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { EmptySwatch, emptySwatchClassNames, renderEmptySwatch_unstable, useEmptySwatchStyles_unstable, useEmptySwatch_unstable } from
|
|
1
|
+
export { EmptySwatch, emptySwatchClassNames, renderEmptySwatch_unstable, useEmptySwatchBase_unstable, useEmptySwatchStyles_unstable, useEmptySwatch_unstable } from "./components/EmptySwatch/index.js";
|
package/lib/EmptySwatch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/EmptySwatch.ts"],"sourcesContent":["export type {
|
|
1
|
+
{"version":3,"sources":["../src/EmptySwatch.ts"],"sourcesContent":["export type {\n EmptySwatchBaseProps,\n EmptySwatchBaseState,\n EmptySwatchProps,\n EmptySwatchSlots,\n EmptySwatchState,\n} from './components/EmptySwatch/index';\nexport {\n EmptySwatch,\n emptySwatchClassNames,\n renderEmptySwatch_unstable,\n useEmptySwatchBase_unstable,\n useEmptySwatchStyles_unstable,\n useEmptySwatch_unstable,\n} from './components/EmptySwatch/index';\n"],"names":["EmptySwatch","emptySwatchClassNames","renderEmptySwatch_unstable","useEmptySwatchBase_unstable","useEmptySwatchStyles_unstable","useEmptySwatch_unstable"],"mappings":"AAOA,SACEA,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,2BAA2B,EAC3BC,6BAA6B,EAC7BC,uBAAuB,QAClB,oCAAiC"}
|
package/lib/ImageSwatch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ImageSwatch, imageSwatchClassNames, renderImageSwatch_unstable, useImageSwatchStyles_unstable, useImageSwatch_unstable } from
|
|
1
|
+
export { ImageSwatch, imageSwatchClassNames, renderImageSwatch_unstable, useImageSwatchStyles_unstable, useImageSwatch_unstable, useImageSwatchBase_unstable } from "./components/ImageSwatch/index.js";
|
package/lib/ImageSwatch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ImageSwatch.ts"],"sourcesContent":["export type {
|
|
1
|
+
{"version":3,"sources":["../src/ImageSwatch.ts"],"sourcesContent":["export type {\n ImageSwatchBaseProps,\n ImageSwatchBaseState,\n ImageSwatchProps,\n ImageSwatchSlots,\n ImageSwatchState,\n} from './components/ImageSwatch/index';\nexport {\n ImageSwatch,\n imageSwatchClassNames,\n renderImageSwatch_unstable,\n useImageSwatchStyles_unstable,\n useImageSwatch_unstable,\n useImageSwatchBase_unstable,\n} from './components/ImageSwatch/index';\n"],"names":["ImageSwatch","imageSwatchClassNames","renderImageSwatch_unstable","useImageSwatchStyles_unstable","useImageSwatch_unstable","useImageSwatchBase_unstable"],"mappings":"AAOA,SACEA,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,uBAAuB,EACvBC,2BAA2B,QACtB,oCAAiC"}
|
package/lib/SwatchPicker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { SwatchPicker, renderSwatchPicker_unstable, swatchPickerClassNames, useSwatchPickerStyles_unstable, useSwatchPicker_unstable } from
|
|
1
|
+
export { SwatchPicker, renderSwatchPicker_unstable, swatchPickerClassNames, useSwatchPickerStyles_unstable, useSwatchPicker_unstable, useSwatchPickerBase_unstable } from "./components/SwatchPicker/index.js";
|