@fluentui/web-components 2.4.0 → 2.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +61 -1
- package/CHANGELOG.md +29 -2
- package/dist/dts/_docs/design-system/color-explorer/app.d.ts +25 -0
- package/dist/dts/_docs/design-system/color-explorer/colors.d.ts +13 -0
- package/dist/dts/_docs/design-system/color-explorer/component-types.d.ts +6 -0
- package/dist/dts/_docs/design-system/color-explorer/components/color-block.d.ts +10 -0
- package/dist/dts/_docs/design-system/color-explorer/components/color-picker/color-picker.d.ts +190 -0
- package/dist/dts/_docs/design-system/color-explorer/components/color-picker/color-picker.form-associated.d.ts +15 -0
- package/dist/dts/_docs/design-system/color-explorer/components/color-picker/color-picker.styles.d.ts +3 -0
- package/dist/dts/_docs/design-system/color-explorer/components/color-picker/color-picker.template.d.ts +8 -0
- package/dist/dts/_docs/design-system/color-explorer/components/color-picker/index.d.ts +9 -0
- package/dist/dts/_docs/design-system/color-explorer/components/control-pane/control-pane.d.ts +8 -0
- package/dist/dts/_docs/design-system/color-explorer/components/control-pane/control-pane.styles.d.ts +1 -0
- package/dist/dts/_docs/design-system/color-explorer/components/control-pane/control-pane.template.d.ts +2 -0
- package/dist/dts/_docs/design-system/color-explorer/components/control-pane/index.d.ts +6 -0
- package/dist/dts/_docs/design-system/color-explorer/components/gradient/gradient.d.ts +5 -0
- package/dist/dts/_docs/design-system/color-explorer/components/gradient/gradient.styles.d.ts +1 -0
- package/dist/dts/_docs/design-system/color-explorer/components/gradient/gradient.template.d.ts +2 -0
- package/dist/dts/_docs/design-system/color-explorer/components/gradient/index.d.ts +6 -0
- package/dist/dts/_docs/design-system/color-explorer/components/layer-background/index.d.ts +21 -0
- package/dist/dts/_docs/design-system/color-explorer/components/sample-app/index.d.ts +6 -0
- package/dist/dts/_docs/design-system/color-explorer/components/sample-app/sample-app.d.ts +3 -0
- package/dist/dts/_docs/design-system/color-explorer/components/sample-app/sample-app.styles.d.ts +1 -0
- package/dist/dts/_docs/design-system/color-explorer/components/sample-app/sample-app.template.d.ts +1 -0
- package/dist/dts/_docs/design-system/color-explorer/components/sample-page/index.d.ts +6 -0
- package/dist/dts/_docs/design-system/color-explorer/components/sample-page/sample-page.d.ts +3 -0
- package/dist/dts/_docs/design-system/color-explorer/components/sample-page/sample-page.styles.d.ts +1 -0
- package/dist/dts/_docs/design-system/color-explorer/components/sample-page/sample-page.template.d.ts +1 -0
- package/dist/dts/_docs/design-system/color-explorer/components/swatch.d.ts +30 -0
- package/dist/dts/_docs/design-system/color-explorer/custom-elements.d.ts +7 -0
- package/dist/dts/_docs/design-system/color-explorer/index.d.ts +2 -0
- package/dist/dts/design-tokens.d.ts +20 -0
- package/dist/dts/styles/patterns/index.d.ts +1 -0
- package/dist/dts/styles/patterns/type-ramp.d.ts +18 -0
- package/dist/dts/utilities/type-ramp.d.ts +12 -0
- package/dist/esm/_docs/design-system/color-explorer/app.js +247 -0
- package/dist/esm/_docs/design-system/color-explorer/colors.js +24 -0
- package/dist/esm/_docs/design-system/color-explorer/component-types.js +7 -0
- package/dist/esm/_docs/design-system/color-explorer/components/color-block.js +408 -0
- package/dist/esm/_docs/design-system/color-explorer/components/color-picker/color-picker.form-associated.js +16 -0
- package/dist/esm/_docs/design-system/color-explorer/components/color-picker/color-picker.js +297 -0
- package/dist/esm/_docs/design-system/color-explorer/components/color-picker/color-picker.styles.js +124 -0
- package/dist/esm/_docs/design-system/color-explorer/components/color-picker/color-picker.template.js +130 -0
- package/dist/esm/_docs/design-system/color-explorer/components/color-picker/index.js +15 -0
- package/dist/esm/_docs/design-system/color-explorer/components/control-pane/control-pane.js +24 -0
- package/dist/esm/_docs/design-system/color-explorer/components/control-pane/control-pane.styles.js +19 -0
- package/dist/esm/_docs/design-system/color-explorer/components/control-pane/control-pane.template.js +52 -0
- package/dist/esm/_docs/design-system/color-explorer/components/control-pane/index.js +18 -0
- package/dist/esm/_docs/design-system/color-explorer/components/gradient/gradient.js +11 -0
- package/dist/esm/_docs/design-system/color-explorer/components/gradient/gradient.styles.js +31 -0
- package/dist/esm/_docs/design-system/color-explorer/components/gradient/gradient.template.js +21 -0
- package/dist/esm/_docs/design-system/color-explorer/components/gradient/index.js +18 -0
- package/dist/esm/_docs/design-system/color-explorer/components/layer-background/index.js +70 -0
- package/dist/esm/_docs/design-system/color-explorer/components/sample-app/index.js +18 -0
- package/dist/esm/_docs/design-system/color-explorer/components/sample-app/sample-app.js +3 -0
- package/dist/esm/_docs/design-system/color-explorer/components/sample-app/sample-app.styles.js +166 -0
- package/dist/esm/_docs/design-system/color-explorer/components/sample-app/sample-app.template.js +97 -0
- package/dist/esm/_docs/design-system/color-explorer/components/sample-page/index.js +18 -0
- package/dist/esm/_docs/design-system/color-explorer/components/sample-page/sample-page.js +3 -0
- package/dist/esm/_docs/design-system/color-explorer/components/sample-page/sample-page.styles.js +130 -0
- package/dist/esm/_docs/design-system/color-explorer/components/sample-page/sample-page.template.js +82 -0
- package/dist/esm/_docs/design-system/color-explorer/components/swatch.js +163 -0
- package/dist/esm/_docs/design-system/color-explorer/custom-elements.js +3 -0
- package/dist/esm/_docs/design-system/color-explorer/index.js +14 -0
- package/dist/esm/accordion/accordion-item/accordion-item.styles.js +4 -5
- package/dist/esm/accordion/accordion.styles.js +3 -4
- package/dist/esm/badge/badge.styles.js +3 -4
- package/dist/esm/breadcrumb/breadcrumb.styles.js +2 -4
- package/dist/esm/breadcrumb-item/breadcrumb-item.styles.js +3 -4
- package/dist/esm/calendar/calendar.styles.js +3 -4
- package/dist/esm/checkbox/checkbox.styles.js +3 -4
- package/dist/esm/combobox/combobox.styles.js +3 -3
- package/dist/esm/data-grid/data-grid-cell.styles.js +3 -5
- package/dist/esm/design-tokens.js +38 -1
- package/dist/esm/listbox-option/listbox-option.styles.js +3 -4
- package/dist/esm/menu-item/menu-item.styles.js +3 -4
- package/dist/esm/radio/radio.styles.js +3 -4
- package/dist/esm/search/search.styles.js +3 -4
- package/dist/esm/select/select.styles.js +3 -4
- package/dist/esm/slider-label/slider-label.styles.js +3 -2
- package/dist/esm/styles/patterns/button.styles.js +3 -4
- package/dist/esm/styles/patterns/index.js +1 -0
- package/dist/esm/styles/patterns/input.styles.js +4 -6
- package/dist/esm/styles/patterns/type-ramp.js +74 -0
- package/dist/esm/switch/switch.styles.js +4 -5
- package/dist/esm/tabs/tab/tab.styles.js +3 -5
- package/dist/esm/tabs/tab-panel/tab-panel.styles.js +3 -5
- package/dist/esm/tabs/tabs.styles.js +3 -4
- package/dist/esm/tooltip/tooltip.styles.js +3 -4
- package/dist/esm/tree-item/tree-item.styles.js +3 -4
- package/dist/esm/utilities/type-ramp.js +12 -0
- package/dist/fluent-web-components.api.json +534 -0
- package/dist/web-components.d.ts +57 -0
- package/dist/web-components.js +191 -28
- package/dist/web-components.min.js +211 -139
- package/docs/api-report.md +57 -0
- package/package.json +2 -2
- package/public/SegoeUI-VF.ttf +0 -0
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,67 @@
|
|
|
2
2
|
"name": "@fluentui/web-components",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Tue, 07 Jun 2022 07:46:02 GMT",
|
|
6
|
+
"tag": "@fluentui/web-components_v2.5.2",
|
|
7
|
+
"version": "2.5.2",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "47367562+bheston@users.noreply.github.com",
|
|
12
|
+
"package": "@fluentui/web-components",
|
|
13
|
+
"commit": "8949b3e8dcdb3dcb4b987fcb08ff48e549133828",
|
|
14
|
+
"comment": "(web-components) Fix issue loading Color Explorer values"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Thu, 02 Jun 2022 07:38:04 GMT",
|
|
21
|
+
"tag": "@fluentui/web-components_v2.5.1",
|
|
22
|
+
"version": "2.5.1",
|
|
23
|
+
"comments": {
|
|
24
|
+
"none": [
|
|
25
|
+
{
|
|
26
|
+
"author": "mgodbolt@microsoft.com",
|
|
27
|
+
"package": "@fluentui/web-components",
|
|
28
|
+
"commit": "d989caf6db389bb92221f372c8028cf7a85210b4",
|
|
29
|
+
"comment": "upgrade storybook to 6.5"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"date": "Tue, 17 May 2022 07:45:01 GMT",
|
|
36
|
+
"tag": "@fluentui/web-components_v2.5.1",
|
|
37
|
+
"version": "2.5.1",
|
|
38
|
+
"comments": {
|
|
39
|
+
"patch": [
|
|
40
|
+
{
|
|
41
|
+
"author": "47367562+bheston@users.noreply.github.com",
|
|
42
|
+
"package": "@fluentui/web-components",
|
|
43
|
+
"commit": "d5706692da2077930b084bff166d0981c058eb7e",
|
|
44
|
+
"comment": "Added the Color Explorer as a web components Storybook page"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"date": "Fri, 06 May 2022 07:36:53 GMT",
|
|
51
|
+
"tag": "@fluentui/web-components_v2.5.0",
|
|
52
|
+
"version": "2.5.0",
|
|
53
|
+
"comments": {
|
|
54
|
+
"minor": [
|
|
55
|
+
{
|
|
56
|
+
"author": "47367562+bheston@users.noreply.github.com",
|
|
57
|
+
"package": "@fluentui/web-components",
|
|
58
|
+
"commit": "b60bcd3b01d2927a03660523eea42b42f507e85b",
|
|
59
|
+
"comment": "Added support for Segoe UI Variable font with variant configurations Added type ramp helpers to conveniently and consistently apply all necessary font attributes."
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"date": "Thu, 28 Apr 2022 07:39:56 GMT",
|
|
6
66
|
"tag": "@fluentui/web-components_v2.4.0",
|
|
7
67
|
"version": "2.4.0",
|
|
8
68
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,39 @@
|
|
|
1
1
|
# Change Log - @fluentui/web-components
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 07 Jun 2022 07:46:02 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [2.5.2](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v2.5.2)
|
|
8
|
+
|
|
9
|
+
Tue, 07 Jun 2022 07:46:02 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v2.5.1..@fluentui/web-components_v2.5.2)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- (web-components) Fix issue loading Color Explorer values ([PR #23392](https://github.com/microsoft/fluentui/pull/23392) by 47367562+bheston@users.noreply.github.com)
|
|
15
|
+
|
|
16
|
+
## [2.5.1](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v2.5.1)
|
|
17
|
+
|
|
18
|
+
Tue, 17 May 2022 07:45:01 GMT
|
|
19
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v2.5.0..@fluentui/web-components_v2.5.1)
|
|
20
|
+
|
|
21
|
+
### Patches
|
|
22
|
+
|
|
23
|
+
- Added the Color Explorer as a web components Storybook page ([PR #22918](https://github.com/microsoft/fluentui/pull/22918) by 47367562+bheston@users.noreply.github.com)
|
|
24
|
+
|
|
25
|
+
## [2.5.0](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v2.5.0)
|
|
26
|
+
|
|
27
|
+
Fri, 06 May 2022 07:36:53 GMT
|
|
28
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v2.4.0..@fluentui/web-components_v2.5.0)
|
|
29
|
+
|
|
30
|
+
### Minor changes
|
|
31
|
+
|
|
32
|
+
- Added support for Segoe UI Variable font with variant configurations Added type ramp helpers to conveniently and consistently apply all necessary font attributes. ([PR #22079](https://github.com/microsoft/fluentui/pull/22079) by 47367562+bheston@users.noreply.github.com)
|
|
33
|
+
|
|
7
34
|
## [2.4.0](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v2.4.0)
|
|
8
35
|
|
|
9
|
-
Thu, 28 Apr 2022 07:
|
|
36
|
+
Thu, 28 Apr 2022 07:39:56 GMT
|
|
10
37
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v2.3.1..@fluentui/web-components_v2.4.0)
|
|
11
38
|
|
|
12
39
|
### Minor changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FASTElement } from '@microsoft/fast-element';
|
|
2
|
+
import { ComponentTypes } from './component-types';
|
|
3
|
+
export interface SwatchInfo {
|
|
4
|
+
index: number;
|
|
5
|
+
color: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class App extends FASTElement {
|
|
9
|
+
canvasElement: HTMLDivElement;
|
|
10
|
+
componentType: ComponentTypes;
|
|
11
|
+
neutralColor: string;
|
|
12
|
+
private neutralColorChanged;
|
|
13
|
+
neutralPalette: string[];
|
|
14
|
+
accentColor: string;
|
|
15
|
+
private accentColorChanged;
|
|
16
|
+
accentPalette: string[];
|
|
17
|
+
showOnlyLayerBackgrounds: boolean;
|
|
18
|
+
connectedCallback(): void;
|
|
19
|
+
backgrounds(): Array<SwatchInfo>;
|
|
20
|
+
private layerRecipes;
|
|
21
|
+
private resolveLayerRecipes;
|
|
22
|
+
private get lightModeLayers();
|
|
23
|
+
private get darkModeLayers();
|
|
24
|
+
controlPaneHandler(e: CustomEvent): void;
|
|
25
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare enum AccentColors {
|
|
2
|
+
black = "#000000",
|
|
3
|
+
white = "#FFFFFF",
|
|
4
|
+
magenta = "#DA1A5F",
|
|
5
|
+
blue = "#0078D4",
|
|
6
|
+
green = "#107C10",
|
|
7
|
+
purple = "#5C2D91",
|
|
8
|
+
orange = "#D83B01",
|
|
9
|
+
yellow = "#F2C812"
|
|
10
|
+
}
|
|
11
|
+
export declare const neutralColors: string[];
|
|
12
|
+
export declare const defaultAccentColor: string;
|
|
13
|
+
export declare const defaultNeutralColor: string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FASTElement } from '@microsoft/fast-element';
|
|
2
|
+
import { ComponentTypes } from '../component-types';
|
|
3
|
+
export declare class AppColorBlock extends FASTElement {
|
|
4
|
+
index: number;
|
|
5
|
+
component: ComponentTypes;
|
|
6
|
+
color: string;
|
|
7
|
+
private colorChanged;
|
|
8
|
+
layerName?: string;
|
|
9
|
+
private updateColor;
|
|
10
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { ColorHSV, ColorRGBA64 } from '@microsoft/fast-colors';
|
|
2
|
+
import { FormAssociatedColorPicker } from './color-picker.form-associated';
|
|
3
|
+
/**
|
|
4
|
+
* This is currently experimental, any use of the color picker must include the following
|
|
5
|
+
* imports and register with the DesignSystem
|
|
6
|
+
*
|
|
7
|
+
* import { fastTextField } from "@microsoft/fast-components";
|
|
8
|
+
* import { DesignSystem } from "@microsoft/fast-foundation";
|
|
9
|
+
* DesignSystem.getOrCreate().register(fastTextField());
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Simple class for storing all of the color picker UI observable values.
|
|
13
|
+
*/
|
|
14
|
+
declare class ColorPickerUI {
|
|
15
|
+
RGBColor: ColorRGBA64;
|
|
16
|
+
HSVColor: ColorHSV;
|
|
17
|
+
HueCSSColor: string;
|
|
18
|
+
HuePosition: number;
|
|
19
|
+
SatValTopPos: number;
|
|
20
|
+
SatValLeftPos: number;
|
|
21
|
+
AlphaPos: number;
|
|
22
|
+
constructor(rgbColor: ColorRGBA64, hsvColor: ColorHSV);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A Color Picker Custom HTML Element.
|
|
26
|
+
*
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
export declare class ColorPicker extends FormAssociatedColorPicker {
|
|
30
|
+
/**
|
|
31
|
+
* When true, the control will be immutable by user interaction. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly | readonly HTML attribute} for more information.
|
|
32
|
+
* @public
|
|
33
|
+
* @remarks
|
|
34
|
+
* HTML Attribute: readonly
|
|
35
|
+
*/
|
|
36
|
+
readOnly: boolean;
|
|
37
|
+
private readOnlyChanged;
|
|
38
|
+
/**
|
|
39
|
+
* Indicates that this element should get focus after the page finishes loading. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefautofocus | autofocus HTML attribute} for more information.
|
|
40
|
+
* @public
|
|
41
|
+
* @remarks
|
|
42
|
+
* HTML Attribute: autofocus
|
|
43
|
+
*/
|
|
44
|
+
autofocus: boolean;
|
|
45
|
+
private autofocusChanged;
|
|
46
|
+
/**
|
|
47
|
+
* Sets the placeholder value of the element, generally used to provide a hint to the user.
|
|
48
|
+
* @public
|
|
49
|
+
* @remarks
|
|
50
|
+
* HTML Attribute: placeholder
|
|
51
|
+
* Using this attribute does is not a valid substitute for a labeling element.
|
|
52
|
+
*/
|
|
53
|
+
placeholder: string;
|
|
54
|
+
private placeholderChanged;
|
|
55
|
+
/**
|
|
56
|
+
* Flag indicating that the color UI is visible.
|
|
57
|
+
*/
|
|
58
|
+
open: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Flag indicating that the color UI is activily listening for mouse move and up events.
|
|
61
|
+
*/
|
|
62
|
+
mouseActive: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Object containing all of the properties displayed in the color picker UI.
|
|
65
|
+
*/
|
|
66
|
+
uiValues: ColorPickerUI;
|
|
67
|
+
/**
|
|
68
|
+
* A reference to the internal input element
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
control: HTMLInputElement;
|
|
72
|
+
/**
|
|
73
|
+
* A reference to the HTMLElement that is the current target of mouse move events.
|
|
74
|
+
*/
|
|
75
|
+
private currentMouseTarget;
|
|
76
|
+
/**
|
|
77
|
+
* A string indicating which of the three graphical elements is the current mouse target. ['sv','h','a']
|
|
78
|
+
*/
|
|
79
|
+
private currentMouseParam;
|
|
80
|
+
/**
|
|
81
|
+
* The ColorRGBA64 representation of the current color value.
|
|
82
|
+
*/
|
|
83
|
+
private currentRGBColor;
|
|
84
|
+
/**
|
|
85
|
+
* The ColorHSV representation of the current color value.
|
|
86
|
+
*/
|
|
87
|
+
private currentHSVColor;
|
|
88
|
+
/**
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
91
|
+
connectedCallback(): void;
|
|
92
|
+
/**
|
|
93
|
+
* Handles the focus event. When the template has focus the color UI will be visable.
|
|
94
|
+
* @internal
|
|
95
|
+
*/
|
|
96
|
+
handleFocus(): void;
|
|
97
|
+
/**
|
|
98
|
+
* Handles the blur event. Hides the color UI when the template loses focus.
|
|
99
|
+
* @internal
|
|
100
|
+
*/
|
|
101
|
+
handleBlur(): void;
|
|
102
|
+
/**
|
|
103
|
+
* Handles the internal control's `input` event. This event is fired whenever a user types directly into the primary text field.
|
|
104
|
+
* @internal
|
|
105
|
+
*/
|
|
106
|
+
handleTextInput(): void;
|
|
107
|
+
/**
|
|
108
|
+
* Handles the mouse down event on the Sat/Val square and Hue and Alpha sliders. Sets the current targeted element and begins listening for mouse move events.
|
|
109
|
+
* @param param ['sv','h','a'] - string specifying which color property is being modified with the mouse.
|
|
110
|
+
* @param e - A reference to the mouse event.
|
|
111
|
+
*/
|
|
112
|
+
handleMouseDown(param: string, e: MouseEvent): void;
|
|
113
|
+
/**
|
|
114
|
+
* Handles the mouse move event within the color UI. Is only called once the mouseActive is set to true.
|
|
115
|
+
* @param e - Reference to the Mouse Event
|
|
116
|
+
*/
|
|
117
|
+
handleMouseMove(e: MouseEvent): void;
|
|
118
|
+
/**
|
|
119
|
+
* Handles the mouse up event within the color UI. Disables listening for mouse move events.
|
|
120
|
+
* @param e - Reference to the Mouse Event
|
|
121
|
+
*/
|
|
122
|
+
handleMouseUp(e: MouseEvent): void;
|
|
123
|
+
/**
|
|
124
|
+
* Handles changes to any of the color property text inputs typed by the user.
|
|
125
|
+
* @param param ['r','g','b','a','h','s','v'] - String specifying which color value is being modified.
|
|
126
|
+
* @param e - Reference to the event.
|
|
127
|
+
*/
|
|
128
|
+
handleTextValueInput(param: string, e: Event): void;
|
|
129
|
+
/**
|
|
130
|
+
* Change event handler for inner control.
|
|
131
|
+
* @remarks
|
|
132
|
+
* "Change" events are not `composable` so they will not
|
|
133
|
+
* permeate the shadow DOM boundary. This fn effectively proxies
|
|
134
|
+
* the change event, emitting a `change` event whenever the internal
|
|
135
|
+
* control emits a `change` event
|
|
136
|
+
* @internal
|
|
137
|
+
*/
|
|
138
|
+
handleChange(): void;
|
|
139
|
+
/**
|
|
140
|
+
* Initialize internal color values based on input value and set the UI elements
|
|
141
|
+
* to the correct positions / values.
|
|
142
|
+
*/
|
|
143
|
+
private initColorValues;
|
|
144
|
+
/**
|
|
145
|
+
* Determines if a number value is within the valid range for an R, G, or B color channel.
|
|
146
|
+
* @param val - Number to be evaluated.
|
|
147
|
+
*/
|
|
148
|
+
private isValidRGB;
|
|
149
|
+
/**
|
|
150
|
+
* Determines if a number value is within the valid range for the alpha channel.
|
|
151
|
+
* @param val - Number to be evaluated.
|
|
152
|
+
*/
|
|
153
|
+
private isValidAlpha;
|
|
154
|
+
/**
|
|
155
|
+
* Determines if a number value is within the valid range for the saturation or value color channels.
|
|
156
|
+
* @param val - Number to be evaluated.
|
|
157
|
+
*/
|
|
158
|
+
private isValidSaturationValue;
|
|
159
|
+
/**
|
|
160
|
+
* Determines if a number value is within the valid range for the hue color channel.
|
|
161
|
+
* @param val - Number to be evaluated.
|
|
162
|
+
*/
|
|
163
|
+
private isValidHue;
|
|
164
|
+
/**
|
|
165
|
+
* Checks if input is a valid CSS color.
|
|
166
|
+
* After placing an invalid css color value into a color style property the value will be an empty string when read back.
|
|
167
|
+
* @internal
|
|
168
|
+
*/
|
|
169
|
+
private isValideCSSColor;
|
|
170
|
+
/**
|
|
171
|
+
* Update the current color values to a new HSV color.
|
|
172
|
+
* @param hue The new Hue value.
|
|
173
|
+
* @param sat The new saturation value.
|
|
174
|
+
* @param val The new Value value.
|
|
175
|
+
*/
|
|
176
|
+
private updateHSV;
|
|
177
|
+
/**
|
|
178
|
+
* Update the current color values based on the mouse position over one of the three UI elements (hue, saturation/value, or alpha).
|
|
179
|
+
* @param pageX The pageX position of the mouse.
|
|
180
|
+
* @param pageY The pageY position of the mouse.
|
|
181
|
+
*/
|
|
182
|
+
private updateFromMouseEvent;
|
|
183
|
+
/**
|
|
184
|
+
* Update the UI values with the current color. This updates the position of the indicators over the Sat/Val, Hue and Alpha elements
|
|
185
|
+
* and the values in all of the text fields at once.
|
|
186
|
+
* @param updateValue - Flag to trigger updating of the main text field value and emitting the change event.
|
|
187
|
+
*/
|
|
188
|
+
private updateUIValues;
|
|
189
|
+
}
|
|
190
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FormAssociated, FoundationElement } from '@microsoft/fast-foundation';
|
|
2
|
+
declare class _ColorPicker extends FoundationElement {
|
|
3
|
+
}
|
|
4
|
+
interface _ColorPicker extends FormAssociated {
|
|
5
|
+
}
|
|
6
|
+
declare const FormAssociatedColorPicker_base: typeof _ColorPicker;
|
|
7
|
+
/**
|
|
8
|
+
* A form-associated base class for the component.
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare class FormAssociatedColorPicker extends FormAssociatedColorPicker_base {
|
|
13
|
+
proxy: HTMLInputElement;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
package/dist/dts/_docs/design-system/color-explorer/components/color-picker/color-picker.styles.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ElementStyles } from "@microsoft/fast-element";
|
|
2
|
+
import { ElementDefinitionContext, FoundationElementDefinition } from "@microsoft/fast-foundation";
|
|
3
|
+
export declare const colorPickerStyles: (context: ElementDefinitionContext, definition: FoundationElementDefinition) => ElementStyles;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ViewTemplate } from '@microsoft/fast-element';
|
|
2
|
+
import { ElementDefinitionContext } from '@microsoft/fast-foundation';
|
|
3
|
+
import { ColorPicker } from './color-picker';
|
|
4
|
+
/**
|
|
5
|
+
* The template for the color picker component.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare const colorPickerTemplate: (context: ElementDefinitionContext) => ViewTemplate<ColorPicker>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ColorPicker } from './color-picker';
|
|
2
|
+
/**
|
|
3
|
+
* A web component used for updating color values.
|
|
4
|
+
*
|
|
5
|
+
* @alpha
|
|
6
|
+
* @remarks
|
|
7
|
+
* HTML Element: \<color-picker\>
|
|
8
|
+
*/
|
|
9
|
+
export declare const fastToolingColorPicker: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<import("@microsoft/fast-foundation").FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<import("@microsoft/fast-foundation").FoundationElementDefinition, typeof ColorPicker>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
|
+
export declare class ControlPane extends FoundationElement {
|
|
3
|
+
componentType: string;
|
|
4
|
+
accentColor: string;
|
|
5
|
+
neutralColor: string;
|
|
6
|
+
showOnlyLayerBackgrounds: boolean;
|
|
7
|
+
updateFormValue(field: string, value: any): void;
|
|
8
|
+
}
|
package/dist/dts/_docs/design-system/color-explorer/components/control-pane/control-pane.styles.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const controlPaneStyles: import("@microsoft/fast-element").ElementStyles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const gradientStyles: import("@microsoft/fast-element").ElementStyles;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DesignToken, DesignTokenChangeRecord, FoundationElement } from '@microsoft/fast-foundation';
|
|
2
|
+
export declare class LayerBackground extends FoundationElement {
|
|
3
|
+
baseLayerLuminance: number;
|
|
4
|
+
private baseLayerLuminanceChanged;
|
|
5
|
+
backgroundLayerRecipe: string;
|
|
6
|
+
private backgroundLayerRecipeChanged;
|
|
7
|
+
private updateBackgroundColor;
|
|
8
|
+
handleChange(record: DesignTokenChangeRecord<DesignToken<any>>): void;
|
|
9
|
+
connectedCallback(): void;
|
|
10
|
+
}
|
|
11
|
+
export declare const layerBackgroundTemplate: import("@microsoft/fast-element").ViewTemplate<any, any>;
|
|
12
|
+
export declare const layerBackgroundStyles: import("@microsoft/fast-element").ElementStyles;
|
|
13
|
+
export declare const layerBackground: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<{
|
|
14
|
+
baseName: string;
|
|
15
|
+
template: import("@microsoft/fast-element").ViewTemplate<any, any>;
|
|
16
|
+
styles: import("@microsoft/fast-element").ElementStyles;
|
|
17
|
+
}> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<{
|
|
18
|
+
baseName: string;
|
|
19
|
+
template: import("@microsoft/fast-element").ViewTemplate<any, any>;
|
|
20
|
+
styles: import("@microsoft/fast-element").ElementStyles;
|
|
21
|
+
}, typeof LayerBackground>;
|
package/dist/dts/_docs/design-system/color-explorer/components/sample-app/sample-app.styles.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const sampleAppStyles: import("@microsoft/fast-element").ElementStyles;
|
package/dist/dts/_docs/design-system/color-explorer/components/sample-app/sample-app.template.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const sampleAppTemplate: import("@microsoft/fast-element").ViewTemplate<any, any>;
|
package/dist/dts/_docs/design-system/color-explorer/components/sample-page/sample-page.styles.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const samplePageStyles: import("@microsoft/fast-element").ElementStyles;
|
package/dist/dts/_docs/design-system/color-explorer/components/sample-page/sample-page.template.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const samplePageTemplate: import("@microsoft/fast-element").ViewTemplate<any, any>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DesignToken, FoundationElement } from '@microsoft/fast-foundation';
|
|
2
|
+
import { Swatch } from '../../../../index-rollup';
|
|
3
|
+
export declare enum SwatchTypes {
|
|
4
|
+
fill = "fill",
|
|
5
|
+
foreground = "foreground",
|
|
6
|
+
outline = "outline"
|
|
7
|
+
}
|
|
8
|
+
export declare class AppSwatch extends FoundationElement {
|
|
9
|
+
type: SwatchTypes;
|
|
10
|
+
recipeName: string;
|
|
11
|
+
foregroundRecipe?: DesignToken<Swatch>;
|
|
12
|
+
foregroundRecipeChanged(): void;
|
|
13
|
+
fillRecipe?: DesignToken<Swatch>;
|
|
14
|
+
fillRecipeChanged(): void;
|
|
15
|
+
outlineRecipe?: DesignToken<Swatch>;
|
|
16
|
+
outlineRecipeChanged(): void;
|
|
17
|
+
iconStyle: string;
|
|
18
|
+
contrastMessage: string;
|
|
19
|
+
colorValue: string;
|
|
20
|
+
connectedCallback(): void;
|
|
21
|
+
private updateObservables;
|
|
22
|
+
private tokenCSS;
|
|
23
|
+
private evaluateToken;
|
|
24
|
+
private updateIconStyle;
|
|
25
|
+
private formatContrast;
|
|
26
|
+
private formatBackgroundContrast;
|
|
27
|
+
private formatForegroundContrast;
|
|
28
|
+
private updateContrastMessage;
|
|
29
|
+
private updateColorValue;
|
|
30
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { layerBackground } from './components/layer-background';
|
|
2
|
+
export { layerBackground };
|
|
3
|
+
export declare const appComponents: import("@microsoft/fast-foundation").FoundationElementRegistry<{
|
|
4
|
+
baseName: string;
|
|
5
|
+
template: import("@microsoft/fast-element").ViewTemplate<any, any>;
|
|
6
|
+
styles: import("@microsoft/fast-element").ElementStyles;
|
|
7
|
+
}, typeof import("./components/layer-background").LayerBackground>[];
|
|
@@ -38,42 +38,62 @@ export declare const focusStrokeWidth: import("@microsoft/fast-foundation").CSSD
|
|
|
38
38
|
/** @public */
|
|
39
39
|
export declare const bodyFont: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
40
40
|
/** @public */
|
|
41
|
+
export declare const fontWeight: import("@microsoft/fast-foundation").CSSDesignToken<number>;
|
|
42
|
+
/** @public */
|
|
41
43
|
export declare const typeRampBaseFontSize: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
42
44
|
/** @public */
|
|
43
45
|
export declare const typeRampBaseLineHeight: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
44
46
|
/** @public */
|
|
47
|
+
export declare const typeRampBaseFontVariations: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
48
|
+
/** @public */
|
|
45
49
|
export declare const typeRampMinus1FontSize: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
46
50
|
/** @public */
|
|
47
51
|
export declare const typeRampMinus1LineHeight: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
48
52
|
/** @public */
|
|
53
|
+
export declare const typeRampMinus1FontVariations: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
54
|
+
/** @public */
|
|
49
55
|
export declare const typeRampMinus2FontSize: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
50
56
|
/** @public */
|
|
51
57
|
export declare const typeRampMinus2LineHeight: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
52
58
|
/** @public */
|
|
59
|
+
export declare const typeRampMinus2FontVariations: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
60
|
+
/** @public */
|
|
53
61
|
export declare const typeRampPlus1FontSize: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
54
62
|
/** @public */
|
|
55
63
|
export declare const typeRampPlus1LineHeight: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
56
64
|
/** @public */
|
|
65
|
+
export declare const typeRampPlus1FontVariations: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
66
|
+
/** @public */
|
|
57
67
|
export declare const typeRampPlus2FontSize: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
58
68
|
/** @public */
|
|
59
69
|
export declare const typeRampPlus2LineHeight: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
60
70
|
/** @public */
|
|
71
|
+
export declare const typeRampPlus2FontVariations: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
72
|
+
/** @public */
|
|
61
73
|
export declare const typeRampPlus3FontSize: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
62
74
|
/** @public */
|
|
63
75
|
export declare const typeRampPlus3LineHeight: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
64
76
|
/** @public */
|
|
77
|
+
export declare const typeRampPlus3FontVariations: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
78
|
+
/** @public */
|
|
65
79
|
export declare const typeRampPlus4FontSize: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
66
80
|
/** @public */
|
|
67
81
|
export declare const typeRampPlus4LineHeight: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
68
82
|
/** @public */
|
|
83
|
+
export declare const typeRampPlus4FontVariations: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
84
|
+
/** @public */
|
|
69
85
|
export declare const typeRampPlus5FontSize: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
70
86
|
/** @public */
|
|
71
87
|
export declare const typeRampPlus5LineHeight: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
72
88
|
/** @public */
|
|
89
|
+
export declare const typeRampPlus5FontVariations: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
90
|
+
/** @public */
|
|
73
91
|
export declare const typeRampPlus6FontSize: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
74
92
|
/** @public */
|
|
75
93
|
export declare const typeRampPlus6LineHeight: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
76
94
|
/** @public */
|
|
95
|
+
export declare const typeRampPlus6FontVariations: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
96
|
+
/** @public */
|
|
77
97
|
export declare const baseLayerLuminance: import("@microsoft/fast-foundation").CSSDesignToken<number>;
|
|
78
98
|
/** @public */
|
|
79
99
|
export declare const accentFillRestDelta: DesignToken<number>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** @public */
|
|
2
|
+
export declare const typeRampBase: import("@microsoft/fast-element").CSSDirective;
|
|
3
|
+
/** @public */
|
|
4
|
+
export declare const typeRampMinus1: import("@microsoft/fast-element").CSSDirective;
|
|
5
|
+
/** @public */
|
|
6
|
+
export declare const typeRampMinus2: import("@microsoft/fast-element").CSSDirective;
|
|
7
|
+
/** @public */
|
|
8
|
+
export declare const typeRampPlus1: import("@microsoft/fast-element").CSSDirective;
|
|
9
|
+
/** @public */
|
|
10
|
+
export declare const typeRampPlus2: import("@microsoft/fast-element").CSSDirective;
|
|
11
|
+
/** @public */
|
|
12
|
+
export declare const typeRampPlus3: import("@microsoft/fast-element").CSSDirective;
|
|
13
|
+
/** @public */
|
|
14
|
+
export declare const typeRampPlus4: import("@microsoft/fast-element").CSSDirective;
|
|
15
|
+
/** @public */
|
|
16
|
+
export declare const typeRampPlus5: import("@microsoft/fast-element").CSSDirective;
|
|
17
|
+
/** @public */
|
|
18
|
+
export declare const typeRampPlus6: import("@microsoft/fast-element").CSSDirective;
|