@plexui/vue 0.9.0 → 0.11.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/dist/es/components/Alert/Alert.js +6 -2
- package/dist/es/components/Alert/Alert.js.map +1 -1
- package/dist/es/components/Avatar/Avatar.js +3 -1
- package/dist/es/components/Avatar/Avatar.js.map +1 -1
- package/dist/es/components/ButtonGroup/ButtonGroup.js +7 -0
- package/dist/es/components/ButtonGroup/ButtonGroup.js.map +1 -1
- package/dist/es/components/ButtonGroup/index.js.map +1 -1
- package/dist/es/components/Checkbox/Checkbox.js +5 -6
- package/dist/es/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/es/components/ColorPicker/ColorPicker.js +476 -0
- package/dist/es/components/ColorPicker/ColorPicker.js.map +1 -0
- package/dist/es/components/ColorPicker/ColorWell.js +186 -0
- package/dist/es/components/ColorPicker/ColorWell.js.map +1 -0
- package/dist/es/components/ColorPicker/index.js +3 -0
- package/dist/es/components/ColorPicker/index.js.map +1 -0
- package/dist/es/components/ColorPicker/shared.js +132 -0
- package/dist/es/components/ColorPicker/shared.js.map +1 -0
- package/dist/es/components/ContextMenu/ContextMenu.js +223 -0
- package/dist/es/components/ContextMenu/ContextMenu.js.map +1 -0
- package/dist/es/components/ContextMenu/index.js +2 -0
- package/dist/es/components/ContextMenu/index.js.map +1 -0
- package/dist/es/components/ContextMenu/shared.js +58 -0
- package/dist/es/components/ContextMenu/shared.js.map +1 -0
- package/dist/es/components/DatePicker/DatePicker.js +19 -3
- package/dist/es/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/es/components/DateRangePicker/DateRangePicker.js +1 -1
- package/dist/es/components/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/es/components/Dialog/Dialog.js +245 -25
- package/dist/es/components/Dialog/Dialog.js.map +1 -1
- package/dist/es/components/Dialog/dialogSteps.js +85 -0
- package/dist/es/components/Dialog/dialogSteps.js.map +1 -0
- package/dist/es/components/Dialog/dialogViewport.js +74 -0
- package/dist/es/components/Dialog/dialogViewport.js.map +1 -0
- package/dist/es/components/Dialog/index.js +1 -1
- package/dist/es/components/Dialog/index.js.map +1 -1
- package/dist/es/components/Dialog/sheetDrag.js +2 -1
- package/dist/es/components/Dialog/sheetDrag.js.map +1 -1
- package/dist/es/components/Field/Field.js +11 -3
- package/dist/es/components/Field/Field.js.map +1 -1
- package/dist/es/components/FieldGroup/FieldGroup.js +12 -1
- package/dist/es/components/FieldGroup/FieldGroup.js.map +1 -1
- package/dist/es/components/FloatingLabelInput/FloatingLabelInput.js +2 -2
- package/dist/es/components/FloatingLabelInput/FloatingLabelInput.js.map +1 -1
- package/dist/es/components/Icon/index.js +1 -0
- package/dist/es/components/Icon/index.js.map +1 -1
- package/dist/es/components/Icon/svg/Eyedropper.js +10 -0
- package/dist/es/components/Icon/svg/Eyedropper.js.map +1 -0
- package/dist/es/components/IndexBar/IndexBar.js +215 -0
- package/dist/es/components/IndexBar/IndexBar.js.map +1 -0
- package/dist/es/components/IndexBar/index.js +2 -0
- package/dist/es/components/IndexBar/index.js.map +1 -0
- package/dist/es/components/Indicator/LoadingIndicator.js +1 -1
- package/dist/es/components/Indicator/LoadingIndicator.js.map +1 -1
- package/dist/es/components/Input/Input.js +3 -2
- package/dist/es/components/Input/Input.js.map +1 -1
- package/dist/es/components/MarkdownEditor/MarkdownEditor.js +149 -1
- package/dist/es/components/MarkdownEditor/MarkdownEditor.js.map +1 -1
- package/dist/es/components/Menu/Menu.js +206 -33
- package/dist/es/components/Menu/Menu.js.map +1 -1
- package/dist/es/components/Menu/index.js +1 -1
- package/dist/es/components/Menu/index.js.map +1 -1
- package/dist/es/components/Page/Page.js +43 -11
- package/dist/es/components/Page/Page.js.map +1 -1
- package/dist/es/components/PageControl/PageControl.js +210 -0
- package/dist/es/components/PageControl/PageControl.js.map +1 -0
- package/dist/es/components/PageControl/index.js +2 -0
- package/dist/es/components/PageControl/index.js.map +1 -0
- package/dist/es/components/PhoneLayout/PhoneLayout.js +50 -0
- package/dist/es/components/PhoneLayout/PhoneLayout.js.map +1 -0
- package/dist/es/components/PhoneLayout/index.js +2 -0
- package/dist/es/components/PhoneLayout/index.js.map +1 -0
- package/dist/es/components/Popover/Popover.js +5 -1
- package/dist/es/components/Popover/Popover.js.map +1 -1
- package/dist/es/components/Popover/deferredPointerDownOutside.js +59 -4
- package/dist/es/components/Popover/deferredPointerDownOutside.js.map +1 -1
- package/dist/es/components/Select/Select.js +18 -11
- package/dist/es/components/Select/Select.js.map +1 -1
- package/dist/es/components/SelectControl/SelectControl.js +1 -0
- package/dist/es/components/SelectControl/SelectControl.js.map +1 -1
- package/dist/es/components/Sidebar/Sidebar.js +21 -6
- package/dist/es/components/Sidebar/Sidebar.js.map +1 -1
- package/dist/es/components/Slider/Slider.js +44 -9
- package/dist/es/components/Slider/Slider.js.map +1 -1
- package/dist/es/components/Stepper/Stepper.js +195 -0
- package/dist/es/components/Stepper/Stepper.js.map +1 -0
- package/dist/es/components/Stepper/index.js +2 -0
- package/dist/es/components/Stepper/index.js.map +1 -0
- package/dist/es/components/SwipeActions/SwipeActions.js +374 -0
- package/dist/es/components/SwipeActions/SwipeActions.js.map +1 -0
- package/dist/es/components/SwipeActions/index.js +2 -0
- package/dist/es/components/SwipeActions/index.js.map +1 -0
- package/dist/es/components/Switch/Switch.js +3 -1
- package/dist/es/components/Switch/Switch.js.map +1 -1
- package/dist/es/components/TabBar/TabBar.js +205 -0
- package/dist/es/components/TabBar/TabBar.js.map +1 -0
- package/dist/es/components/TabBar/index.js +2 -0
- package/dist/es/components/TabBar/index.js.map +1 -0
- package/dist/es/components/Tabs/Tabs.js +10 -2
- package/dist/es/components/Tabs/Tabs.js.map +1 -1
- package/dist/es/components/TagInput/TagInput.js +3 -46
- package/dist/es/components/TagInput/TagInput.js.map +1 -1
- package/dist/es/components/Textarea/Textarea.js +2 -0
- package/dist/es/components/Textarea/Textarea.js.map +1 -1
- package/dist/es/components/Tip/Tip.js +276 -0
- package/dist/es/components/Tip/Tip.js.map +1 -0
- package/dist/es/components/Tip/index.js +2 -0
- package/dist/es/components/Tip/index.js.map +1 -0
- package/dist/es/components/Toast/ToastRenderer.js +30 -13
- package/dist/es/components/Toast/ToastRenderer.js.map +1 -1
- package/dist/es/components/Toast/Toaster.js +17 -6
- package/dist/es/components/Toast/Toaster.js.map +1 -1
- package/dist/es/components/Toast/toastLifecycle.js +113 -1
- package/dist/es/components/Toast/toastLifecycle.js.map +1 -1
- package/dist/es/components/Toolbar/Toolbar.js +37 -6
- package/dist/es/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/es/components/Toolbar/index.js.map +1 -1
- package/dist/es/components/Tooltip/slot.js +3 -3
- package/dist/es/components/Tooltip/slot.js.map +1 -1
- package/dist/es/composables/useEscCloseStack.js +8 -4
- package/dist/es/composables/useEscCloseStack.js.map +1 -1
- package/dist/es/lib/fieldRow.js +15 -2
- package/dist/es/lib/fieldRow.js.map +1 -1
- package/dist/es/lib/floatingBoundary.js +3 -1
- package/dist/es/lib/floatingBoundary.js.map +1 -1
- package/dist/es/lib/helpers.js +21 -0
- package/dist/es/lib/helpers.js.map +1 -1
- package/dist/es/lib/menuSubmenuPlacement.js +51 -6
- package/dist/es/lib/menuSubmenuPlacement.js.map +1 -1
- package/dist/es/lib/menuTriggerCover.js +70 -0
- package/dist/es/lib/menuTriggerCover.js.map +1 -0
- package/dist/es/lib/phoneLayout.js +16 -0
- package/dist/es/lib/phoneLayout.js.map +1 -0
- package/dist/es/lib/scrollEdges.js +34 -0
- package/dist/es/lib/scrollEdges.js.map +1 -0
- package/dist/es/lib/toastRegion.js +6 -0
- package/dist/es/lib/toastRegion.js.map +1 -0
- package/dist/types/components/ButtonGroup/ButtonGroup.d.ts +13 -0
- package/dist/types/components/ButtonGroup/index.d.ts +1 -1
- package/dist/types/components/ColorPicker/ColorPicker.d.ts +244 -0
- package/dist/types/components/ColorPicker/ColorWell.d.ts +334 -0
- package/dist/types/components/ColorPicker/index.d.ts +3 -0
- package/dist/types/components/ColorPicker/shared.d.ts +69 -0
- package/dist/types/components/ContextMenu/ContextMenu.d.ts +128 -0
- package/dist/types/components/ContextMenu/index.d.ts +1 -0
- package/dist/types/components/ContextMenu/shared.d.ts +51 -0
- package/dist/types/components/DatePicker/DatePicker.d.ts +24 -4
- package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +4 -4
- package/dist/types/components/Dialog/Dialog.d.ts +100 -4
- package/dist/types/components/Dialog/dialogSteps.d.ts +10 -0
- package/dist/types/components/Dialog/dialogViewport.d.ts +1 -0
- package/dist/types/components/Dialog/index.d.ts +1 -1
- package/dist/types/components/Field/Field.d.ts +21 -2
- package/dist/types/components/FieldGroup/FieldGroup.d.ts +18 -1
- package/dist/types/components/Icon/index.d.ts +1 -0
- package/dist/types/components/Icon/svg/Eyedropper.d.ts +3 -0
- package/dist/types/components/IndexBar/IndexBar.d.ts +112 -0
- package/dist/types/components/IndexBar/index.d.ts +1 -0
- package/dist/types/components/Indicator/LoadingIndicator.d.ts +2 -2
- package/dist/types/components/Menu/Menu.d.ts +153 -40
- package/dist/types/components/Menu/index.d.ts +1 -1
- package/dist/types/components/Page/Page.d.ts +13 -5
- package/dist/types/components/PageControl/PageControl.d.ts +216 -0
- package/dist/types/components/PageControl/index.d.ts +1 -0
- package/dist/types/components/PhoneLayout/PhoneLayout.d.ts +21 -0
- package/dist/types/components/PhoneLayout/index.d.ts +1 -0
- package/dist/types/components/Popover/deferredPointerDownOutside.d.ts +1 -1
- package/dist/types/components/Select/Select.d.ts +6 -6
- package/dist/types/components/Stepper/Stepper.d.ts +338 -0
- package/dist/types/components/Stepper/index.d.ts +1 -0
- package/dist/types/components/SwipeActions/SwipeActions.d.ts +135 -0
- package/dist/types/components/SwipeActions/index.d.ts +1 -0
- package/dist/types/components/TabBar/TabBar.d.ts +405 -0
- package/dist/types/components/TabBar/index.d.ts +1 -0
- package/dist/types/components/Tip/Tip.d.ts +146 -0
- package/dist/types/components/Tip/index.d.ts +1 -0
- package/dist/types/components/Toast/toastLifecycle.d.ts +34 -0
- package/dist/types/components/Toolbar/Toolbar.d.ts +26 -9
- package/dist/types/components/Toolbar/index.d.ts +1 -1
- package/dist/types/components/Tooltip/CopyTooltip.d.ts +1 -1
- package/dist/types/composables/useEscCloseStack.d.ts +2 -2
- package/dist/types/lib/fieldRow.d.ts +5 -0
- package/dist/types/lib/helpers.d.ts +6 -0
- package/dist/types/lib/menuSubmenuPlacement.d.ts +14 -1
- package/dist/types/lib/menuTriggerCover.d.ts +23 -0
- package/dist/types/lib/phoneLayout.d.ts +11 -0
- package/dist/types/lib/scrollEdges.d.ts +16 -0
- package/dist/types/lib/toastRegion.d.ts +5 -0
- package/package.json +2 -2
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { type PropType, type VNode } from "vue";
|
|
2
|
+
import { type ColorPickerMode } from "./shared.js";
|
|
3
|
+
declare const ColorPickerComponent: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
/** The `id` of the picker. */
|
|
5
|
+
id: StringConstructor;
|
|
6
|
+
/** The controlled color, `#rrggbb` or `#rrggbbaa`. Bind with `v-model:value`. */
|
|
7
|
+
value: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: undefined;
|
|
10
|
+
};
|
|
11
|
+
/** The color when it is initially rendered. Use when you do not need to control the color. @default "#000000" */
|
|
12
|
+
defaultValue: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: undefined;
|
|
15
|
+
};
|
|
16
|
+
/** Shows the Opacity slider, as `supportsAlpha` of the system picker. @default true */
|
|
17
|
+
supportsAlpha: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
/** The controlled way to choose a color. Bind with `v-model:mode`. */
|
|
22
|
+
mode: {
|
|
23
|
+
type: PropType<ColorPickerMode>;
|
|
24
|
+
default: undefined;
|
|
25
|
+
};
|
|
26
|
+
/** The way to choose a color when the picker is initially rendered. @default "grid" */
|
|
27
|
+
defaultMode: {
|
|
28
|
+
type: PropType<ColorPickerMode>;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
31
|
+
/** The controlled saved colors. Bind with `v-model:swatches`. */
|
|
32
|
+
swatches: {
|
|
33
|
+
type: PropType<string[]>;
|
|
34
|
+
default: undefined;
|
|
35
|
+
};
|
|
36
|
+
/** The saved colors when the picker is initially rendered. @default [] */
|
|
37
|
+
defaultSwatches: {
|
|
38
|
+
type: PropType<string[]>;
|
|
39
|
+
default: undefined;
|
|
40
|
+
};
|
|
41
|
+
/** Accessible name of the picker. @default "Colors" */
|
|
42
|
+
ariaLabel: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
47
|
+
[key: string]: any;
|
|
48
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
49
|
+
/** The color changed: `#rrggbb`, or `#rrggbbaa` when it is not opaque */
|
|
50
|
+
"update:value": (value: string) => boolean;
|
|
51
|
+
/** The color changed (React `onChange`) */
|
|
52
|
+
change: (value: string) => boolean;
|
|
53
|
+
/** Another of Grid, Spectrum and Sliders was chosen */
|
|
54
|
+
"update:mode": (mode: ColorPickerMode) => boolean;
|
|
55
|
+
/** Another way was chosen (React `onModeChange`) */
|
|
56
|
+
modeChange: (mode: ColorPickerMode) => boolean;
|
|
57
|
+
/** Add saved the current color or Delete removed one */
|
|
58
|
+
"update:swatches": (swatches: string[]) => boolean;
|
|
59
|
+
/** The saved colors changed (React `onSwatchesChange`) */
|
|
60
|
+
swatchesChange: (swatches: string[]) => boolean;
|
|
61
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
62
|
+
/** The `id` of the picker. */
|
|
63
|
+
id: StringConstructor;
|
|
64
|
+
/** The controlled color, `#rrggbb` or `#rrggbbaa`. Bind with `v-model:value`. */
|
|
65
|
+
value: {
|
|
66
|
+
type: StringConstructor;
|
|
67
|
+
default: undefined;
|
|
68
|
+
};
|
|
69
|
+
/** The color when it is initially rendered. Use when you do not need to control the color. @default "#000000" */
|
|
70
|
+
defaultValue: {
|
|
71
|
+
type: StringConstructor;
|
|
72
|
+
default: undefined;
|
|
73
|
+
};
|
|
74
|
+
/** Shows the Opacity slider, as `supportsAlpha` of the system picker. @default true */
|
|
75
|
+
supportsAlpha: {
|
|
76
|
+
type: BooleanConstructor;
|
|
77
|
+
default: boolean;
|
|
78
|
+
};
|
|
79
|
+
/** The controlled way to choose a color. Bind with `v-model:mode`. */
|
|
80
|
+
mode: {
|
|
81
|
+
type: PropType<ColorPickerMode>;
|
|
82
|
+
default: undefined;
|
|
83
|
+
};
|
|
84
|
+
/** The way to choose a color when the picker is initially rendered. @default "grid" */
|
|
85
|
+
defaultMode: {
|
|
86
|
+
type: PropType<ColorPickerMode>;
|
|
87
|
+
default: string;
|
|
88
|
+
};
|
|
89
|
+
/** The controlled saved colors. Bind with `v-model:swatches`. */
|
|
90
|
+
swatches: {
|
|
91
|
+
type: PropType<string[]>;
|
|
92
|
+
default: undefined;
|
|
93
|
+
};
|
|
94
|
+
/** The saved colors when the picker is initially rendered. @default [] */
|
|
95
|
+
defaultSwatches: {
|
|
96
|
+
type: PropType<string[]>;
|
|
97
|
+
default: undefined;
|
|
98
|
+
};
|
|
99
|
+
/** Accessible name of the picker. @default "Colors" */
|
|
100
|
+
ariaLabel: {
|
|
101
|
+
type: StringConstructor;
|
|
102
|
+
default: string;
|
|
103
|
+
};
|
|
104
|
+
}>> & Readonly<{
|
|
105
|
+
onChange?: ((value: string) => any) | undefined;
|
|
106
|
+
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
107
|
+
"onUpdate:mode"?: ((mode: ColorPickerMode) => any) | undefined;
|
|
108
|
+
onModeChange?: ((mode: ColorPickerMode) => any) | undefined;
|
|
109
|
+
"onUpdate:swatches"?: ((swatches: string[]) => any) | undefined;
|
|
110
|
+
onSwatchesChange?: ((swatches: string[]) => any) | undefined;
|
|
111
|
+
}>, {
|
|
112
|
+
mode: ColorPickerMode;
|
|
113
|
+
value: string;
|
|
114
|
+
defaultValue: string;
|
|
115
|
+
ariaLabel: string;
|
|
116
|
+
swatches: string[];
|
|
117
|
+
supportsAlpha: boolean;
|
|
118
|
+
defaultMode: ColorPickerMode;
|
|
119
|
+
defaultSwatches: string[];
|
|
120
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
121
|
+
export type ColorPickerProps = InstanceType<typeof ColorPickerComponent>["$props"];
|
|
122
|
+
/**
|
|
123
|
+
* The system color picker of iOS 26 (kit Color Picker - iPhone 0:5275): Grid, Spectrum and Sliders, the Opacity
|
|
124
|
+
* slider, and the saved colors with Add. Show it inside a Popover or a Sheet, or use `ColorWell`, which does.
|
|
125
|
+
*/
|
|
126
|
+
export declare const ColorPicker: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
127
|
+
/** The `id` of the picker. */
|
|
128
|
+
id: StringConstructor;
|
|
129
|
+
/** The controlled color, `#rrggbb` or `#rrggbbaa`. Bind with `v-model:value`. */
|
|
130
|
+
value: {
|
|
131
|
+
type: StringConstructor;
|
|
132
|
+
default: undefined;
|
|
133
|
+
};
|
|
134
|
+
/** The color when it is initially rendered. Use when you do not need to control the color. @default "#000000" */
|
|
135
|
+
defaultValue: {
|
|
136
|
+
type: StringConstructor;
|
|
137
|
+
default: undefined;
|
|
138
|
+
};
|
|
139
|
+
/** Shows the Opacity slider, as `supportsAlpha` of the system picker. @default true */
|
|
140
|
+
supportsAlpha: {
|
|
141
|
+
type: BooleanConstructor;
|
|
142
|
+
default: boolean;
|
|
143
|
+
};
|
|
144
|
+
/** The controlled way to choose a color. Bind with `v-model:mode`. */
|
|
145
|
+
mode: {
|
|
146
|
+
type: PropType<ColorPickerMode>;
|
|
147
|
+
default: undefined;
|
|
148
|
+
};
|
|
149
|
+
/** The way to choose a color when the picker is initially rendered. @default "grid" */
|
|
150
|
+
defaultMode: {
|
|
151
|
+
type: PropType<ColorPickerMode>;
|
|
152
|
+
default: string;
|
|
153
|
+
};
|
|
154
|
+
/** The controlled saved colors. Bind with `v-model:swatches`. */
|
|
155
|
+
swatches: {
|
|
156
|
+
type: PropType<string[]>;
|
|
157
|
+
default: undefined;
|
|
158
|
+
};
|
|
159
|
+
/** The saved colors when the picker is initially rendered. @default [] */
|
|
160
|
+
defaultSwatches: {
|
|
161
|
+
type: PropType<string[]>;
|
|
162
|
+
default: undefined;
|
|
163
|
+
};
|
|
164
|
+
/** Accessible name of the picker. @default "Colors" */
|
|
165
|
+
ariaLabel: {
|
|
166
|
+
type: StringConstructor;
|
|
167
|
+
default: string;
|
|
168
|
+
};
|
|
169
|
+
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
170
|
+
[key: string]: any;
|
|
171
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
172
|
+
/** The color changed: `#rrggbb`, or `#rrggbbaa` when it is not opaque */
|
|
173
|
+
"update:value": (value: string) => boolean;
|
|
174
|
+
/** The color changed (React `onChange`) */
|
|
175
|
+
change: (value: string) => boolean;
|
|
176
|
+
/** Another of Grid, Spectrum and Sliders was chosen */
|
|
177
|
+
"update:mode": (mode: ColorPickerMode) => boolean;
|
|
178
|
+
/** Another way was chosen (React `onModeChange`) */
|
|
179
|
+
modeChange: (mode: ColorPickerMode) => boolean;
|
|
180
|
+
/** Add saved the current color or Delete removed one */
|
|
181
|
+
"update:swatches": (swatches: string[]) => boolean;
|
|
182
|
+
/** The saved colors changed (React `onSwatchesChange`) */
|
|
183
|
+
swatchesChange: (swatches: string[]) => boolean;
|
|
184
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
185
|
+
/** The `id` of the picker. */
|
|
186
|
+
id: StringConstructor;
|
|
187
|
+
/** The controlled color, `#rrggbb` or `#rrggbbaa`. Bind with `v-model:value`. */
|
|
188
|
+
value: {
|
|
189
|
+
type: StringConstructor;
|
|
190
|
+
default: undefined;
|
|
191
|
+
};
|
|
192
|
+
/** The color when it is initially rendered. Use when you do not need to control the color. @default "#000000" */
|
|
193
|
+
defaultValue: {
|
|
194
|
+
type: StringConstructor;
|
|
195
|
+
default: undefined;
|
|
196
|
+
};
|
|
197
|
+
/** Shows the Opacity slider, as `supportsAlpha` of the system picker. @default true */
|
|
198
|
+
supportsAlpha: {
|
|
199
|
+
type: BooleanConstructor;
|
|
200
|
+
default: boolean;
|
|
201
|
+
};
|
|
202
|
+
/** The controlled way to choose a color. Bind with `v-model:mode`. */
|
|
203
|
+
mode: {
|
|
204
|
+
type: PropType<ColorPickerMode>;
|
|
205
|
+
default: undefined;
|
|
206
|
+
};
|
|
207
|
+
/** The way to choose a color when the picker is initially rendered. @default "grid" */
|
|
208
|
+
defaultMode: {
|
|
209
|
+
type: PropType<ColorPickerMode>;
|
|
210
|
+
default: string;
|
|
211
|
+
};
|
|
212
|
+
/** The controlled saved colors. Bind with `v-model:swatches`. */
|
|
213
|
+
swatches: {
|
|
214
|
+
type: PropType<string[]>;
|
|
215
|
+
default: undefined;
|
|
216
|
+
};
|
|
217
|
+
/** The saved colors when the picker is initially rendered. @default [] */
|
|
218
|
+
defaultSwatches: {
|
|
219
|
+
type: PropType<string[]>;
|
|
220
|
+
default: undefined;
|
|
221
|
+
};
|
|
222
|
+
/** Accessible name of the picker. @default "Colors" */
|
|
223
|
+
ariaLabel: {
|
|
224
|
+
type: StringConstructor;
|
|
225
|
+
default: string;
|
|
226
|
+
};
|
|
227
|
+
}>> & Readonly<{
|
|
228
|
+
onChange?: ((value: string) => any) | undefined;
|
|
229
|
+
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
230
|
+
"onUpdate:mode"?: ((mode: ColorPickerMode) => any) | undefined;
|
|
231
|
+
onModeChange?: ((mode: ColorPickerMode) => any) | undefined;
|
|
232
|
+
"onUpdate:swatches"?: ((swatches: string[]) => any) | undefined;
|
|
233
|
+
onSwatchesChange?: ((swatches: string[]) => any) | undefined;
|
|
234
|
+
}>, {
|
|
235
|
+
mode: ColorPickerMode;
|
|
236
|
+
value: string;
|
|
237
|
+
defaultValue: string;
|
|
238
|
+
ariaLabel: string;
|
|
239
|
+
swatches: string[];
|
|
240
|
+
supportsAlpha: boolean;
|
|
241
|
+
defaultMode: ColorPickerMode;
|
|
242
|
+
defaultSwatches: string[];
|
|
243
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
244
|
+
export {};
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import { type PropType } from "vue";
|
|
2
|
+
import { type ColorPickerMode } from "./shared.js";
|
|
3
|
+
declare const ColorWellComponent: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
/** The `id` of the well. */
|
|
5
|
+
id: StringConstructor;
|
|
6
|
+
/** The controlled color, `#rrggbb` or `#rrggbbaa`; `null` shows the rainbow well with no color. Bind with `v-model:value`. */
|
|
7
|
+
value: {
|
|
8
|
+
type: PropType<string | null>;
|
|
9
|
+
default: undefined;
|
|
10
|
+
};
|
|
11
|
+
/** The color when it is initially rendered. Use when you do not need to control the color. @default null */
|
|
12
|
+
defaultValue: {
|
|
13
|
+
type: PropType<string | null>;
|
|
14
|
+
default: null;
|
|
15
|
+
};
|
|
16
|
+
/** The title of the picker. @default "Colors" */
|
|
17
|
+
title: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
/** Shows the eyedropper in the picker where the browser can pick a color from the screen (EyeDropper API). @default true */
|
|
22
|
+
supportsEyedropper: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
/** The kit's Picker Button sizes: `sm` 28px, `lg` 36px. @default "sm" */
|
|
27
|
+
size: {
|
|
28
|
+
type: PropType<"sm" | "lg">;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
31
|
+
/** When `true`, prevents the user from opening the picker. */
|
|
32
|
+
disabled: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
/** The name of the well. Submits its color with the owning form. */
|
|
37
|
+
name: StringConstructor;
|
|
38
|
+
/** Accessible name of the well. @default "Color" */
|
|
39
|
+
ariaLabel: StringConstructor;
|
|
40
|
+
/** The `id` of the visible label of the well. */
|
|
41
|
+
ariaLabelledby: StringConstructor;
|
|
42
|
+
/** Shows the Opacity slider in the picker. @default true */
|
|
43
|
+
supportsAlpha: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
default: boolean;
|
|
46
|
+
};
|
|
47
|
+
/** The controlled way to choose a color. Bind with `v-model:mode`. */
|
|
48
|
+
mode: {
|
|
49
|
+
type: PropType<ColorPickerMode>;
|
|
50
|
+
default: undefined;
|
|
51
|
+
};
|
|
52
|
+
/** The way to choose a color when the picker opens. @default "grid" */
|
|
53
|
+
defaultMode: {
|
|
54
|
+
type: PropType<ColorPickerMode>;
|
|
55
|
+
default: undefined;
|
|
56
|
+
};
|
|
57
|
+
/** The controlled saved colors. Bind with `v-model:swatches`. */
|
|
58
|
+
swatches: {
|
|
59
|
+
type: PropType<string[]>;
|
|
60
|
+
default: undefined;
|
|
61
|
+
};
|
|
62
|
+
/** The saved colors when the picker opens. @default [] */
|
|
63
|
+
defaultSwatches: {
|
|
64
|
+
type: PropType<string[]>;
|
|
65
|
+
default: undefined;
|
|
66
|
+
};
|
|
67
|
+
}>, () => (import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
68
|
+
[key: string]: any;
|
|
69
|
+
}> | null)[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
70
|
+
/** The picker chose a color */
|
|
71
|
+
"update:value": (value: string) => boolean;
|
|
72
|
+
/** The picker chose a color (React `onChange`) */
|
|
73
|
+
change: (value: string) => boolean;
|
|
74
|
+
/** Another of Grid, Spectrum and Sliders was chosen */
|
|
75
|
+
"update:mode": (mode: ColorPickerMode) => boolean;
|
|
76
|
+
/** Another way was chosen (React `onModeChange`) */
|
|
77
|
+
modeChange: (mode: ColorPickerMode) => boolean;
|
|
78
|
+
/** Add saved the current color or Delete removed one */
|
|
79
|
+
"update:swatches": (swatches: string[]) => boolean;
|
|
80
|
+
/** The saved colors changed (React `onSwatchesChange`) */
|
|
81
|
+
swatchesChange: (swatches: string[]) => boolean;
|
|
82
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
83
|
+
/** The `id` of the well. */
|
|
84
|
+
id: StringConstructor;
|
|
85
|
+
/** The controlled color, `#rrggbb` or `#rrggbbaa`; `null` shows the rainbow well with no color. Bind with `v-model:value`. */
|
|
86
|
+
value: {
|
|
87
|
+
type: PropType<string | null>;
|
|
88
|
+
default: undefined;
|
|
89
|
+
};
|
|
90
|
+
/** The color when it is initially rendered. Use when you do not need to control the color. @default null */
|
|
91
|
+
defaultValue: {
|
|
92
|
+
type: PropType<string | null>;
|
|
93
|
+
default: null;
|
|
94
|
+
};
|
|
95
|
+
/** The title of the picker. @default "Colors" */
|
|
96
|
+
title: {
|
|
97
|
+
type: StringConstructor;
|
|
98
|
+
default: string;
|
|
99
|
+
};
|
|
100
|
+
/** Shows the eyedropper in the picker where the browser can pick a color from the screen (EyeDropper API). @default true */
|
|
101
|
+
supportsEyedropper: {
|
|
102
|
+
type: BooleanConstructor;
|
|
103
|
+
default: boolean;
|
|
104
|
+
};
|
|
105
|
+
/** The kit's Picker Button sizes: `sm` 28px, `lg` 36px. @default "sm" */
|
|
106
|
+
size: {
|
|
107
|
+
type: PropType<"sm" | "lg">;
|
|
108
|
+
default: string;
|
|
109
|
+
};
|
|
110
|
+
/** When `true`, prevents the user from opening the picker. */
|
|
111
|
+
disabled: {
|
|
112
|
+
type: BooleanConstructor;
|
|
113
|
+
default: boolean;
|
|
114
|
+
};
|
|
115
|
+
/** The name of the well. Submits its color with the owning form. */
|
|
116
|
+
name: StringConstructor;
|
|
117
|
+
/** Accessible name of the well. @default "Color" */
|
|
118
|
+
ariaLabel: StringConstructor;
|
|
119
|
+
/** The `id` of the visible label of the well. */
|
|
120
|
+
ariaLabelledby: StringConstructor;
|
|
121
|
+
/** Shows the Opacity slider in the picker. @default true */
|
|
122
|
+
supportsAlpha: {
|
|
123
|
+
type: BooleanConstructor;
|
|
124
|
+
default: boolean;
|
|
125
|
+
};
|
|
126
|
+
/** The controlled way to choose a color. Bind with `v-model:mode`. */
|
|
127
|
+
mode: {
|
|
128
|
+
type: PropType<ColorPickerMode>;
|
|
129
|
+
default: undefined;
|
|
130
|
+
};
|
|
131
|
+
/** The way to choose a color when the picker opens. @default "grid" */
|
|
132
|
+
defaultMode: {
|
|
133
|
+
type: PropType<ColorPickerMode>;
|
|
134
|
+
default: undefined;
|
|
135
|
+
};
|
|
136
|
+
/** The controlled saved colors. Bind with `v-model:swatches`. */
|
|
137
|
+
swatches: {
|
|
138
|
+
type: PropType<string[]>;
|
|
139
|
+
default: undefined;
|
|
140
|
+
};
|
|
141
|
+
/** The saved colors when the picker opens. @default [] */
|
|
142
|
+
defaultSwatches: {
|
|
143
|
+
type: PropType<string[]>;
|
|
144
|
+
default: undefined;
|
|
145
|
+
};
|
|
146
|
+
}>> & Readonly<{
|
|
147
|
+
onChange?: ((value: string) => any) | undefined;
|
|
148
|
+
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
149
|
+
"onUpdate:mode"?: ((mode: ColorPickerMode) => any) | undefined;
|
|
150
|
+
onModeChange?: ((mode: ColorPickerMode) => any) | undefined;
|
|
151
|
+
"onUpdate:swatches"?: ((swatches: string[]) => any) | undefined;
|
|
152
|
+
onSwatchesChange?: ((swatches: string[]) => any) | undefined;
|
|
153
|
+
}>, {
|
|
154
|
+
title: string;
|
|
155
|
+
mode: ColorPickerMode;
|
|
156
|
+
value: string | null;
|
|
157
|
+
defaultValue: string | null;
|
|
158
|
+
disabled: boolean;
|
|
159
|
+
size: "sm" | "lg";
|
|
160
|
+
swatches: string[];
|
|
161
|
+
supportsAlpha: boolean;
|
|
162
|
+
defaultMode: ColorPickerMode;
|
|
163
|
+
defaultSwatches: string[];
|
|
164
|
+
supportsEyedropper: boolean;
|
|
165
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
166
|
+
export type ColorWellProps = InstanceType<typeof ColorWellComponent>["$props"];
|
|
167
|
+
/**
|
|
168
|
+
* A color well, as `UIColorWell`: the kit's Picker Button (5739:34128), a rainbow ring around the chosen color. It
|
|
169
|
+
* opens the color picker, in a Popover from the well, and on a phone in a sheet, as the system picker.
|
|
170
|
+
*/
|
|
171
|
+
export declare const ColorWell: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
172
|
+
/** The `id` of the well. */
|
|
173
|
+
id: StringConstructor;
|
|
174
|
+
/** The controlled color, `#rrggbb` or `#rrggbbaa`; `null` shows the rainbow well with no color. Bind with `v-model:value`. */
|
|
175
|
+
value: {
|
|
176
|
+
type: PropType<string | null>;
|
|
177
|
+
default: undefined;
|
|
178
|
+
};
|
|
179
|
+
/** The color when it is initially rendered. Use when you do not need to control the color. @default null */
|
|
180
|
+
defaultValue: {
|
|
181
|
+
type: PropType<string | null>;
|
|
182
|
+
default: null;
|
|
183
|
+
};
|
|
184
|
+
/** The title of the picker. @default "Colors" */
|
|
185
|
+
title: {
|
|
186
|
+
type: StringConstructor;
|
|
187
|
+
default: string;
|
|
188
|
+
};
|
|
189
|
+
/** Shows the eyedropper in the picker where the browser can pick a color from the screen (EyeDropper API). @default true */
|
|
190
|
+
supportsEyedropper: {
|
|
191
|
+
type: BooleanConstructor;
|
|
192
|
+
default: boolean;
|
|
193
|
+
};
|
|
194
|
+
/** The kit's Picker Button sizes: `sm` 28px, `lg` 36px. @default "sm" */
|
|
195
|
+
size: {
|
|
196
|
+
type: PropType<"sm" | "lg">;
|
|
197
|
+
default: string;
|
|
198
|
+
};
|
|
199
|
+
/** When `true`, prevents the user from opening the picker. */
|
|
200
|
+
disabled: {
|
|
201
|
+
type: BooleanConstructor;
|
|
202
|
+
default: boolean;
|
|
203
|
+
};
|
|
204
|
+
/** The name of the well. Submits its color with the owning form. */
|
|
205
|
+
name: StringConstructor;
|
|
206
|
+
/** Accessible name of the well. @default "Color" */
|
|
207
|
+
ariaLabel: StringConstructor;
|
|
208
|
+
/** The `id` of the visible label of the well. */
|
|
209
|
+
ariaLabelledby: StringConstructor;
|
|
210
|
+
/** Shows the Opacity slider in the picker. @default true */
|
|
211
|
+
supportsAlpha: {
|
|
212
|
+
type: BooleanConstructor;
|
|
213
|
+
default: boolean;
|
|
214
|
+
};
|
|
215
|
+
/** The controlled way to choose a color. Bind with `v-model:mode`. */
|
|
216
|
+
mode: {
|
|
217
|
+
type: PropType<ColorPickerMode>;
|
|
218
|
+
default: undefined;
|
|
219
|
+
};
|
|
220
|
+
/** The way to choose a color when the picker opens. @default "grid" */
|
|
221
|
+
defaultMode: {
|
|
222
|
+
type: PropType<ColorPickerMode>;
|
|
223
|
+
default: undefined;
|
|
224
|
+
};
|
|
225
|
+
/** The controlled saved colors. Bind with `v-model:swatches`. */
|
|
226
|
+
swatches: {
|
|
227
|
+
type: PropType<string[]>;
|
|
228
|
+
default: undefined;
|
|
229
|
+
};
|
|
230
|
+
/** The saved colors when the picker opens. @default [] */
|
|
231
|
+
defaultSwatches: {
|
|
232
|
+
type: PropType<string[]>;
|
|
233
|
+
default: undefined;
|
|
234
|
+
};
|
|
235
|
+
}>, () => (import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
236
|
+
[key: string]: any;
|
|
237
|
+
}> | null)[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
238
|
+
/** The picker chose a color */
|
|
239
|
+
"update:value": (value: string) => boolean;
|
|
240
|
+
/** The picker chose a color (React `onChange`) */
|
|
241
|
+
change: (value: string) => boolean;
|
|
242
|
+
/** Another of Grid, Spectrum and Sliders was chosen */
|
|
243
|
+
"update:mode": (mode: ColorPickerMode) => boolean;
|
|
244
|
+
/** Another way was chosen (React `onModeChange`) */
|
|
245
|
+
modeChange: (mode: ColorPickerMode) => boolean;
|
|
246
|
+
/** Add saved the current color or Delete removed one */
|
|
247
|
+
"update:swatches": (swatches: string[]) => boolean;
|
|
248
|
+
/** The saved colors changed (React `onSwatchesChange`) */
|
|
249
|
+
swatchesChange: (swatches: string[]) => boolean;
|
|
250
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
251
|
+
/** The `id` of the well. */
|
|
252
|
+
id: StringConstructor;
|
|
253
|
+
/** The controlled color, `#rrggbb` or `#rrggbbaa`; `null` shows the rainbow well with no color. Bind with `v-model:value`. */
|
|
254
|
+
value: {
|
|
255
|
+
type: PropType<string | null>;
|
|
256
|
+
default: undefined;
|
|
257
|
+
};
|
|
258
|
+
/** The color when it is initially rendered. Use when you do not need to control the color. @default null */
|
|
259
|
+
defaultValue: {
|
|
260
|
+
type: PropType<string | null>;
|
|
261
|
+
default: null;
|
|
262
|
+
};
|
|
263
|
+
/** The title of the picker. @default "Colors" */
|
|
264
|
+
title: {
|
|
265
|
+
type: StringConstructor;
|
|
266
|
+
default: string;
|
|
267
|
+
};
|
|
268
|
+
/** Shows the eyedropper in the picker where the browser can pick a color from the screen (EyeDropper API). @default true */
|
|
269
|
+
supportsEyedropper: {
|
|
270
|
+
type: BooleanConstructor;
|
|
271
|
+
default: boolean;
|
|
272
|
+
};
|
|
273
|
+
/** The kit's Picker Button sizes: `sm` 28px, `lg` 36px. @default "sm" */
|
|
274
|
+
size: {
|
|
275
|
+
type: PropType<"sm" | "lg">;
|
|
276
|
+
default: string;
|
|
277
|
+
};
|
|
278
|
+
/** When `true`, prevents the user from opening the picker. */
|
|
279
|
+
disabled: {
|
|
280
|
+
type: BooleanConstructor;
|
|
281
|
+
default: boolean;
|
|
282
|
+
};
|
|
283
|
+
/** The name of the well. Submits its color with the owning form. */
|
|
284
|
+
name: StringConstructor;
|
|
285
|
+
/** Accessible name of the well. @default "Color" */
|
|
286
|
+
ariaLabel: StringConstructor;
|
|
287
|
+
/** The `id` of the visible label of the well. */
|
|
288
|
+
ariaLabelledby: StringConstructor;
|
|
289
|
+
/** Shows the Opacity slider in the picker. @default true */
|
|
290
|
+
supportsAlpha: {
|
|
291
|
+
type: BooleanConstructor;
|
|
292
|
+
default: boolean;
|
|
293
|
+
};
|
|
294
|
+
/** The controlled way to choose a color. Bind with `v-model:mode`. */
|
|
295
|
+
mode: {
|
|
296
|
+
type: PropType<ColorPickerMode>;
|
|
297
|
+
default: undefined;
|
|
298
|
+
};
|
|
299
|
+
/** The way to choose a color when the picker opens. @default "grid" */
|
|
300
|
+
defaultMode: {
|
|
301
|
+
type: PropType<ColorPickerMode>;
|
|
302
|
+
default: undefined;
|
|
303
|
+
};
|
|
304
|
+
/** The controlled saved colors. Bind with `v-model:swatches`. */
|
|
305
|
+
swatches: {
|
|
306
|
+
type: PropType<string[]>;
|
|
307
|
+
default: undefined;
|
|
308
|
+
};
|
|
309
|
+
/** The saved colors when the picker opens. @default [] */
|
|
310
|
+
defaultSwatches: {
|
|
311
|
+
type: PropType<string[]>;
|
|
312
|
+
default: undefined;
|
|
313
|
+
};
|
|
314
|
+
}>> & Readonly<{
|
|
315
|
+
onChange?: ((value: string) => any) | undefined;
|
|
316
|
+
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
317
|
+
"onUpdate:mode"?: ((mode: ColorPickerMode) => any) | undefined;
|
|
318
|
+
onModeChange?: ((mode: ColorPickerMode) => any) | undefined;
|
|
319
|
+
"onUpdate:swatches"?: ((swatches: string[]) => any) | undefined;
|
|
320
|
+
onSwatchesChange?: ((swatches: string[]) => any) | undefined;
|
|
321
|
+
}>, {
|
|
322
|
+
title: string;
|
|
323
|
+
mode: ColorPickerMode;
|
|
324
|
+
value: string | null;
|
|
325
|
+
defaultValue: string | null;
|
|
326
|
+
disabled: boolean;
|
|
327
|
+
size: "sm" | "lg";
|
|
328
|
+
swatches: string[];
|
|
329
|
+
supportsAlpha: boolean;
|
|
330
|
+
defaultMode: ColorPickerMode;
|
|
331
|
+
defaultSwatches: string[];
|
|
332
|
+
supportsEyedropper: boolean;
|
|
333
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
334
|
+
export {};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/** A color as the picker holds it: channels 0 to 255 and an alpha from 0 to 1. */
|
|
2
|
+
export type Rgba = {
|
|
3
|
+
r: number;
|
|
4
|
+
g: number;
|
|
5
|
+
b: number;
|
|
6
|
+
a: number;
|
|
7
|
+
};
|
|
8
|
+
/** The three ways to choose a color, as the segments of the system picker. */
|
|
9
|
+
export type ColorPickerMode = "grid" | "spectrum" | "sliders";
|
|
10
|
+
export declare const COLOR_PICKER_MODES: readonly {
|
|
11
|
+
value: ColorPickerMode;
|
|
12
|
+
label: string;
|
|
13
|
+
}[];
|
|
14
|
+
/** The kit's Color Grid (515:48178): a row of grays, then nine rows from dark to light, twelve hues across. */
|
|
15
|
+
export declare const COLOR_PICKER_GRID: readonly (readonly string[])[];
|
|
16
|
+
export declare const COLOR_PICKER_GRID_COLUMNS = 12;
|
|
17
|
+
/** Saved colors fill pages of two rows of five, with the Add button after the last one (kit Swatches 515:52724). */
|
|
18
|
+
export declare const COLOR_PICKER_SWATCHES_PER_PAGE = 10;
|
|
19
|
+
export declare const COLOR_PICKER_SWATCHES_PER_ROW = 5;
|
|
20
|
+
/** Reads `#rgb`, `#rgba`, `#rrggbb` or `#rrggbbaa`, in either case; anything else is `null`. */
|
|
21
|
+
export declare function parseColor(input: string | null | undefined): Rgba | null;
|
|
22
|
+
/** `#rrggbb`, or `#rrggbbaa` when the color is not opaque. */
|
|
23
|
+
export declare function formatColor({ r, g, b, a }: Rgba): string;
|
|
24
|
+
/** The six digits the Hex field shows, as the system picker does: upper case, no `#`. */
|
|
25
|
+
export declare const hexDigits: ({ r, g, b }: Rgba) => string;
|
|
26
|
+
/** A CSS color for a fill. */
|
|
27
|
+
export declare const cssColor: ({ r, g, b, a }: Rgba, alpha?: number) => string;
|
|
28
|
+
export declare const sameRgb: (one: Rgba, other: Rgba) => boolean;
|
|
29
|
+
/** Whole percent of opacity, as the Opacity field shows it. */
|
|
30
|
+
export declare const alphaPercent: (a: number) => number;
|
|
31
|
+
/** The grid cell of a color, or -1 when the grid has no such color. */
|
|
32
|
+
export declare const gridIndex: (color: Rgba) => number;
|
|
33
|
+
export declare const gridColor: (index: number) => string;
|
|
34
|
+
/** The cell an arrow key, Home or End moves to from `index`, or `index` itself at an edge. */
|
|
35
|
+
export declare function gridMove(index: number, key: string): number;
|
|
36
|
+
/** The item a key moves to in a list of `count` items (saved colors), or `index` itself. */
|
|
37
|
+
export declare function listMove(index: number, count: number, key: string): number;
|
|
38
|
+
/** Pages of saved colors: the colors and the Add button after them, ten to a page. */
|
|
39
|
+
export declare const swatchPageCount: (count: number) => number;
|
|
40
|
+
/**
|
|
41
|
+
* A point of the spectrum: hue from top to bottom, and from white at the leading edge through the full hue at the
|
|
42
|
+
* middle to black at the trailing edge, as the system picker draws it (UIColorPickerViewController overview image).
|
|
43
|
+
*/
|
|
44
|
+
export type SpectrumPoint = {
|
|
45
|
+
x: number;
|
|
46
|
+
y: number;
|
|
47
|
+
};
|
|
48
|
+
export declare function spectrumColor({ x, y }: SpectrumPoint, alpha: number): Rgba;
|
|
49
|
+
/** Where a color sits on the spectrum; a gray keeps the hue of `previous`, as it has none. */
|
|
50
|
+
export declare function spectrumPoint(color: Rgba, previous?: SpectrumPoint): SpectrumPoint;
|
|
51
|
+
/** The track of the Opacity slider: the color from clear to opaque over the kit's 12% to 88% (515:47434). */
|
|
52
|
+
export declare const opacityTrack: (color: Rgba) => string;
|
|
53
|
+
export type ColorChannel = "r" | "g" | "b";
|
|
54
|
+
export declare const COLOR_PICKER_CHANNELS: readonly {
|
|
55
|
+
channel: ColorChannel;
|
|
56
|
+
label: string;
|
|
57
|
+
}[];
|
|
58
|
+
/** The track of a channel slider: the color with that channel from 0 to 255. */
|
|
59
|
+
export declare const channelTrack: (color: Rgba, channel: ColorChannel) => string;
|
|
60
|
+
/** A number typed in a field, kept within `min` and `max`; text with no number is `null`. */
|
|
61
|
+
export declare function parseNumber(text: string, min: number, max: number): number | null;
|
|
62
|
+
/** The EyeDropper API (Chromium), when the browser has it. */
|
|
63
|
+
type EyeDropperConstructor = new () => {
|
|
64
|
+
open: () => Promise<{
|
|
65
|
+
sRGBHex: string;
|
|
66
|
+
}>;
|
|
67
|
+
};
|
|
68
|
+
export declare function eyeDropper(): EyeDropperConstructor | null;
|
|
69
|
+
export {};
|