@fluentui/web-components 2.3.1 → 2.5.1

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.
Files changed (98) hide show
  1. package/CHANGELOG.json +61 -1
  2. package/CHANGELOG.md +29 -2
  3. package/dist/dts/_docs/design-system/color-explorer/app.d.ts +25 -0
  4. package/dist/dts/_docs/design-system/color-explorer/colors.d.ts +13 -0
  5. package/dist/dts/_docs/design-system/color-explorer/component-types.d.ts +6 -0
  6. package/dist/dts/_docs/design-system/color-explorer/components/color-block.d.ts +11 -0
  7. package/dist/dts/_docs/design-system/color-explorer/components/color-picker/color-picker.d.ts +190 -0
  8. package/dist/dts/_docs/design-system/color-explorer/components/color-picker/color-picker.form-associated.d.ts +15 -0
  9. package/dist/dts/_docs/design-system/color-explorer/components/color-picker/color-picker.styles.d.ts +3 -0
  10. package/dist/dts/_docs/design-system/color-explorer/components/color-picker/color-picker.template.d.ts +8 -0
  11. package/dist/dts/_docs/design-system/color-explorer/components/color-picker/index.d.ts +9 -0
  12. package/dist/dts/_docs/design-system/color-explorer/components/control-pane/control-pane.d.ts +8 -0
  13. package/dist/dts/_docs/design-system/color-explorer/components/control-pane/control-pane.styles.d.ts +1 -0
  14. package/dist/dts/_docs/design-system/color-explorer/components/control-pane/control-pane.template.d.ts +2 -0
  15. package/dist/dts/_docs/design-system/color-explorer/components/control-pane/index.d.ts +6 -0
  16. package/dist/dts/_docs/design-system/color-explorer/components/gradient/gradient.d.ts +5 -0
  17. package/dist/dts/_docs/design-system/color-explorer/components/gradient/gradient.styles.d.ts +1 -0
  18. package/dist/dts/_docs/design-system/color-explorer/components/gradient/gradient.template.d.ts +2 -0
  19. package/dist/dts/_docs/design-system/color-explorer/components/gradient/index.d.ts +6 -0
  20. package/dist/dts/_docs/design-system/color-explorer/components/layer-background/index.d.ts +21 -0
  21. package/dist/dts/_docs/design-system/color-explorer/components/sample-app/index.d.ts +6 -0
  22. package/dist/dts/_docs/design-system/color-explorer/components/sample-app/sample-app.d.ts +3 -0
  23. package/dist/dts/_docs/design-system/color-explorer/components/sample-app/sample-app.styles.d.ts +1 -0
  24. package/dist/dts/_docs/design-system/color-explorer/components/sample-app/sample-app.template.d.ts +1 -0
  25. package/dist/dts/_docs/design-system/color-explorer/components/sample-page/index.d.ts +6 -0
  26. package/dist/dts/_docs/design-system/color-explorer/components/sample-page/sample-page.d.ts +3 -0
  27. package/dist/dts/_docs/design-system/color-explorer/components/sample-page/sample-page.styles.d.ts +1 -0
  28. package/dist/dts/_docs/design-system/color-explorer/components/sample-page/sample-page.template.d.ts +1 -0
  29. package/dist/dts/_docs/design-system/color-explorer/components/swatch.d.ts +30 -0
  30. package/dist/dts/_docs/design-system/color-explorer/custom-elements.d.ts +7 -0
  31. package/dist/dts/_docs/design-system/color-explorer/index.d.ts +2 -0
  32. package/dist/dts/design-tokens.d.ts +20 -0
  33. package/dist/dts/styles/patterns/index.d.ts +1 -0
  34. package/dist/dts/styles/patterns/type-ramp.d.ts +18 -0
  35. package/dist/dts/utilities/type-ramp.d.ts +12 -0
  36. package/dist/esm/_docs/design-system/color-explorer/app.js +247 -0
  37. package/dist/esm/_docs/design-system/color-explorer/colors.js +24 -0
  38. package/dist/esm/_docs/design-system/color-explorer/component-types.js +7 -0
  39. package/dist/esm/_docs/design-system/color-explorer/components/color-block.js +412 -0
  40. package/dist/esm/_docs/design-system/color-explorer/components/color-picker/color-picker.form-associated.js +16 -0
  41. package/dist/esm/_docs/design-system/color-explorer/components/color-picker/color-picker.js +297 -0
  42. package/dist/esm/_docs/design-system/color-explorer/components/color-picker/color-picker.styles.js +124 -0
  43. package/dist/esm/_docs/design-system/color-explorer/components/color-picker/color-picker.template.js +130 -0
  44. package/dist/esm/_docs/design-system/color-explorer/components/color-picker/index.js +15 -0
  45. package/dist/esm/_docs/design-system/color-explorer/components/control-pane/control-pane.js +24 -0
  46. package/dist/esm/_docs/design-system/color-explorer/components/control-pane/control-pane.styles.js +19 -0
  47. package/dist/esm/_docs/design-system/color-explorer/components/control-pane/control-pane.template.js +52 -0
  48. package/dist/esm/_docs/design-system/color-explorer/components/control-pane/index.js +18 -0
  49. package/dist/esm/_docs/design-system/color-explorer/components/gradient/gradient.js +11 -0
  50. package/dist/esm/_docs/design-system/color-explorer/components/gradient/gradient.styles.js +31 -0
  51. package/dist/esm/_docs/design-system/color-explorer/components/gradient/gradient.template.js +21 -0
  52. package/dist/esm/_docs/design-system/color-explorer/components/gradient/index.js +18 -0
  53. package/dist/esm/_docs/design-system/color-explorer/components/layer-background/index.js +70 -0
  54. package/dist/esm/_docs/design-system/color-explorer/components/sample-app/index.js +18 -0
  55. package/dist/esm/_docs/design-system/color-explorer/components/sample-app/sample-app.js +3 -0
  56. package/dist/esm/_docs/design-system/color-explorer/components/sample-app/sample-app.styles.js +166 -0
  57. package/dist/esm/_docs/design-system/color-explorer/components/sample-app/sample-app.template.js +97 -0
  58. package/dist/esm/_docs/design-system/color-explorer/components/sample-page/index.js +18 -0
  59. package/dist/esm/_docs/design-system/color-explorer/components/sample-page/sample-page.js +3 -0
  60. package/dist/esm/_docs/design-system/color-explorer/components/sample-page/sample-page.styles.js +130 -0
  61. package/dist/esm/_docs/design-system/color-explorer/components/sample-page/sample-page.template.js +82 -0
  62. package/dist/esm/_docs/design-system/color-explorer/components/swatch.js +157 -0
  63. package/dist/esm/_docs/design-system/color-explorer/custom-elements.js +3 -0
  64. package/dist/esm/_docs/design-system/color-explorer/index.js +14 -0
  65. package/dist/esm/accordion/accordion-item/accordion-item.styles.js +4 -5
  66. package/dist/esm/accordion/accordion.styles.js +3 -4
  67. package/dist/esm/badge/badge.styles.js +3 -4
  68. package/dist/esm/breadcrumb/breadcrumb.styles.js +2 -4
  69. package/dist/esm/breadcrumb-item/breadcrumb-item.styles.js +3 -4
  70. package/dist/esm/calendar/calendar.styles.js +3 -4
  71. package/dist/esm/checkbox/checkbox.styles.js +3 -4
  72. package/dist/esm/combobox/combobox.styles.js +3 -3
  73. package/dist/esm/data-grid/data-grid-cell.styles.js +3 -5
  74. package/dist/esm/design-tokens.js +38 -1
  75. package/dist/esm/listbox-option/listbox-option.styles.js +3 -4
  76. package/dist/esm/menu-item/menu-item.styles.js +3 -4
  77. package/dist/esm/radio/radio.styles.js +3 -4
  78. package/dist/esm/search/search.styles.js +3 -4
  79. package/dist/esm/select/select.styles.js +3 -4
  80. package/dist/esm/slider-label/slider-label.styles.js +3 -2
  81. package/dist/esm/styles/patterns/button.styles.js +3 -4
  82. package/dist/esm/styles/patterns/index.js +1 -0
  83. package/dist/esm/styles/patterns/input.styles.js +4 -6
  84. package/dist/esm/styles/patterns/type-ramp.js +74 -0
  85. package/dist/esm/switch/switch.styles.js +4 -5
  86. package/dist/esm/tabs/tab/tab.styles.js +3 -5
  87. package/dist/esm/tabs/tab-panel/tab-panel.styles.js +3 -5
  88. package/dist/esm/tabs/tabs.styles.js +3 -4
  89. package/dist/esm/tooltip/tooltip.styles.js +3 -4
  90. package/dist/esm/tree-item/tree-item.styles.js +3 -4
  91. package/dist/esm/utilities/type-ramp.js +12 -0
  92. package/dist/fluent-web-components.api.json +534 -0
  93. package/dist/web-components.d.ts +57 -0
  94. package/dist/web-components.js +3867 -3282
  95. package/dist/web-components.min.js +230 -158
  96. package/docs/api-report.md +57 -0
  97. package/package.json +5 -5
  98. package/public/SegoeUI-VF.ttf +0 -0
@@ -0,0 +1,412 @@
1
+ import { __decorate } from "tslib";
2
+ import { parseColorHexRGB } from '@microsoft/fast-colors';
3
+ import { attr, css, customElement, DOM, FASTElement, html, when } from '@microsoft/fast-element';
4
+ import { display } from '@microsoft/fast-foundation';
5
+ import { accentFillActive, accentFillHover, accentFillRest, accentForegroundActive, accentForegroundHover, accentForegroundRest, fillColor, focusStrokeInner, focusStrokeOuter, foregroundOnAccentRest, neutralFillActive, neutralFillHover, neutralFillInputRest, neutralFillRest, neutralFillStealthActive, neutralFillStealthHover, neutralFillStealthRest, neutralFillStrongActive, neutralFillStrongHover, neutralFillStrongRest, neutralForegroundHint, neutralForegroundRest, neutralStrokeActive, neutralStrokeDividerRest, neutralStrokeHover, neutralStrokeRest, SwatchRGB, } from '../../../../index-rollup';
6
+ import { ComponentTypes } from '../component-types';
7
+ import { AppSwatch } from './swatch';
8
+ AppSwatch;
9
+ const backplateComponents = html `
10
+ <template>
11
+ <div class="example">
12
+ <fluent-button appearance="accent">Accent</fluent-button>
13
+ </div>
14
+ <app-swatch
15
+ type="fill"
16
+ recipe-name="accentFillRest"
17
+ :fillRecipe="${x => accentFillRest}"
18
+ :foregroundRecipe="${x => foregroundOnAccentRest}"
19
+ ></app-swatch>
20
+ <app-swatch
21
+ type="fill"
22
+ recipe-name="accentFillHover"
23
+ :fillRecipe="${x => accentFillHover}"
24
+ :foregroundRecipe="${x => foregroundOnAccentRest}"
25
+ ></app-swatch>
26
+ <app-swatch
27
+ type="fill"
28
+ recipe-name="accentFillActive"
29
+ :fillRecipe="${x => accentFillActive}"
30
+ :foregroundRecipe="${x => foregroundOnAccentRest}"
31
+ ></app-swatch>
32
+ <app-swatch
33
+ type="foreground"
34
+ recipe-name="foregroundOnAccent"
35
+ :fillRecipe="${x => accentFillRest}"
36
+ :foregroundRecipe="${x => foregroundOnAccentRest}"
37
+ ></app-swatch>
38
+ <app-swatch
39
+ type="outline"
40
+ recipe-name="focusStrokeInner"
41
+ :fillRecipe="${x => focusStrokeOuter}"
42
+ :foregroundRecipe="${x => focusStrokeInner}"
43
+ :outlineRecipe="${x => focusStrokeInner}"
44
+ ></app-swatch>
45
+ <app-swatch
46
+ type="outline"
47
+ recipe-name="focusStrokeOuter"
48
+ :fillRecipe="${x => fillColor}"
49
+ :foregroundRecipe="${x => focusStrokeOuter}"
50
+ :outlineRecipe="${x => focusStrokeOuter}"
51
+ ></app-swatch>
52
+
53
+ <div class="example">
54
+ <fluent-button>Neutral</fluent-button>
55
+ </div>
56
+ <app-swatch
57
+ type="fill"
58
+ recipe-name="neutralFillRest"
59
+ :foregroundRecipe="${x => neutralForegroundRest}"
60
+ :fillRecipe="${x => neutralFillRest}"
61
+ ></app-swatch>
62
+ <app-swatch
63
+ type="fill"
64
+ recipe-name="neutralFillHover"
65
+ :foregroundRecipe="${x => neutralForegroundRest}"
66
+ :fillRecipe="${x => neutralFillHover}"
67
+ ></app-swatch>
68
+ <app-swatch
69
+ type="fill"
70
+ recipe-name="neutralFillActive"
71
+ :foregroundRecipe="${x => neutralForegroundRest}"
72
+ :fillRecipe="${x => neutralFillActive}"
73
+ ></app-swatch>
74
+ <app-swatch
75
+ type="foreground"
76
+ recipe-name="neutralForegroundRest"
77
+ :fillRecipe="${x => fillColor}"
78
+ :foregroundRecipe="${x => neutralForegroundRest}"
79
+ ></app-swatch>
80
+ <app-swatch
81
+ type="outline"
82
+ recipe-name="focusStrokeOuter"
83
+ :fillRecipe="${x => fillColor}"
84
+ :foregroundRecipe="${x => focusStrokeOuter}"
85
+ :outlineRecipe="${x => focusStrokeOuter}"
86
+ ></app-swatch>
87
+
88
+ <div class="example">
89
+ <fluent-button appearance="outline">Outline</fluent-button>
90
+ </div>
91
+ <app-swatch
92
+ type="outline"
93
+ recipe-name="neutralStrokeRest"
94
+ :foregroundRecipe="${x => neutralForegroundRest}"
95
+ :fillRecipe="${x => fillColor}"
96
+ :outlineRecipe="${x => neutralStrokeRest}"
97
+ ></app-swatch>
98
+ <app-swatch
99
+ type="outline"
100
+ recipe-name="neutralStrokeHover"
101
+ :foregroundRecipe="${x => neutralForegroundRest}"
102
+ :fillRecipe="${x => fillColor}"
103
+ :outlineRecipe="${x => neutralStrokeHover}"
104
+ ></app-swatch>
105
+ <app-swatch
106
+ type="outline"
107
+ recipe-name="neutralStrokeActive"
108
+ :foregroundRecipe="${x => neutralForegroundRest}"
109
+ :fillRecipe="${x => fillColor}"
110
+ :outlineRecipe="${x => neutralStrokeActive}"
111
+ ></app-swatch>
112
+ <app-swatch
113
+ type="foreground"
114
+ recipe-name="neutralForegroundRest"
115
+ :fillRecipe="${x => fillColor}"
116
+ :foregroundRecipe="${x => neutralForegroundRest}"
117
+ ></app-swatch>
118
+ <app-swatch
119
+ type="outline"
120
+ recipe-name="focusStrokeOuter"
121
+ :fillRecipe="${x => fillColor}"
122
+ :foregroundRecipe="${x => focusStrokeOuter}"
123
+ :outlineRecipe="${x => focusStrokeOuter}"
124
+ ></app-swatch>
125
+
126
+ <div class="example">
127
+ <fluent-button appearance="stealth">Stealth</fluent-button>
128
+ </div>
129
+ <app-swatch
130
+ type="fill"
131
+ recipe-name="neutralFillStealthRest"
132
+ :foregroundRecipe="${x => neutralForegroundRest}"
133
+ :fillRecipe="${x => neutralFillStealthRest}"
134
+ ></app-swatch>
135
+ <app-swatch
136
+ type="fill"
137
+ recipe-name="neutralFillStealthHover"
138
+ :foregroundRecipe="${x => neutralForegroundRest}"
139
+ :fillRecipe="${x => neutralFillStealthHover}"
140
+ ></app-swatch>
141
+ <app-swatch
142
+ type="fill"
143
+ recipe-name="neutralFillStealthActive"
144
+ :foregroundRecipe="${x => neutralForegroundRest}"
145
+ :fillRecipe="${x => neutralFillStealthActive}"
146
+ ></app-swatch>
147
+ <app-swatch
148
+ type="foreground"
149
+ recipe-name="neutralForegroundRest"
150
+ :fillRecipe="${x => fillColor}"
151
+ :foregroundRecipe="${x => neutralForegroundRest}"
152
+ ></app-swatch>
153
+ <app-swatch
154
+ type="outline"
155
+ recipe-name="focusStrokeOuter"
156
+ :fillRecipe="${x => fillColor}"
157
+ :foregroundRecipe="${x => focusStrokeOuter}"
158
+ :outlineRecipe="${x => focusStrokeOuter}"
159
+ ></app-swatch>
160
+ </template>
161
+ `;
162
+ const textComponents = html `
163
+ <template>
164
+ <div class="example">
165
+ <p>Neutral</p>
166
+ </div>
167
+ <app-swatch
168
+ type="foreground"
169
+ recipe-name="neutralForegroundRest"
170
+ :fillRecipe="${x => fillColor}"
171
+ :foregroundRecipe="${x => neutralForegroundRest}"
172
+ ></app-swatch>
173
+
174
+ <div class="example">
175
+ <p class="hint_text">Hint</p>
176
+ </div>
177
+ <app-swatch
178
+ type="foreground"
179
+ recipe-name="neutralForegroundHint"
180
+ :fillRecipe="${x => fillColor}"
181
+ :foregroundRecipe="${x => neutralForegroundHint}"
182
+ ></app-swatch>
183
+
184
+ <div class="example">
185
+ <fluent-anchor href="#" appearance="hypertext">Accent</fluent-anchor>
186
+ </div>
187
+ <app-swatch
188
+ type="foreground"
189
+ recipe-name="accentForegroundRest"
190
+ :fillRecipe="${x => fillColor}"
191
+ :foregroundRecipe="${x => accentForegroundRest}"
192
+ ></app-swatch>
193
+ <app-swatch
194
+ type="foreground"
195
+ recipe-name="accentForegroundHover"
196
+ :fillRecipe="${x => fillColor}"
197
+ :foregroundRecipe="${x => accentForegroundHover}"
198
+ ></app-swatch>
199
+ <app-swatch
200
+ type="foreground"
201
+ recipe-name="accentForegroundActive"
202
+ :fillRecipe="${x => fillColor}"
203
+ :foregroundRecipe="${x => accentForegroundActive}"
204
+ ></app-swatch>
205
+ <app-swatch
206
+ type="outline"
207
+ recipe-name="focusStrokeOuter"
208
+ :fillRecipe="${x => fillColor}"
209
+ :foregroundRecipe="${x => focusStrokeOuter}"
210
+ :outlineRecipe="${x => focusStrokeOuter}"
211
+ ></app-swatch>
212
+ </template>
213
+ `;
214
+ const formComponents = html `
215
+ <template>
216
+ <div class="example">
217
+ <fluent-text-field placeholder="jerry@microsoft.com"></fluent-text-field>
218
+ </div>
219
+ <app-swatch
220
+ type="fill"
221
+ recipe-name="neutralFillInputRest"
222
+ :fillRecipe="${x => neutralFillInputRest}"
223
+ :foregroundRecipe="${x => neutralForegroundRest}"
224
+ ></app-swatch>
225
+ <app-swatch
226
+ type="foreground"
227
+ recipe-name="neutralForegroundHint"
228
+ :fillRecipe="${x => neutralFillInputRest}"
229
+ :foregroundRecipe="${x => neutralForegroundHint}"
230
+ ></app-swatch>
231
+ <app-swatch
232
+ type="foreground"
233
+ recipe-name="neutralForegroundRest"
234
+ :fillRecipe="${x => neutralFillInputRest}"
235
+ :foregroundRecipe="${x => neutralForegroundRest}"
236
+ ></app-swatch>
237
+ <app-swatch
238
+ type="outline"
239
+ recipe-name="neutralStrokeRest"
240
+ :fillRecipe="${x => fillColor}"
241
+ :foregroundRecipe="${x => neutralForegroundRest}"
242
+ :outlineRecipe="${x => neutralStrokeRest}"
243
+ ></app-swatch>
244
+ <app-swatch
245
+ type="outline"
246
+ recipe-name="neutralStrokeHover"
247
+ :fillRecipe="${x => fillColor}"
248
+ :foregroundRecipe="${x => neutralForegroundRest}"
249
+ :outlineRecipe="${x => neutralStrokeHover}"
250
+ ></app-swatch>
251
+ <app-swatch
252
+ type="outline"
253
+ recipe-name="focusStrokeOuter"
254
+ :fillRecipe="${x => fillColor}"
255
+ :foregroundRecipe="${x => focusStrokeOuter}"
256
+ :outlineRecipe="${x => focusStrokeOuter}"
257
+ ></app-swatch>
258
+
259
+ <div class="example">
260
+ <fluent-checkbox>Checkbox</fluent-checkbox>
261
+ </div>
262
+ <app-swatch
263
+ type="fill"
264
+ recipe-name="neutralFillInputRest"
265
+ :fillRecipe="${x => neutralFillInputRest}"
266
+ :foregroundRecipe="${x => neutralForegroundRest}"
267
+ ></app-swatch>
268
+ <app-swatch
269
+ type="fill"
270
+ recipe-name="neutralFillStrongRest"
271
+ :fillRecipe="${x => neutralFillStrongRest}"
272
+ :foregroundRecipe="${x => neutralForegroundRest}"
273
+ ></app-swatch>
274
+ <app-swatch
275
+ type="fill"
276
+ recipe-name="neutralFillStrongHover"
277
+ :fillRecipe="${x => neutralFillStrongHover}"
278
+ :foregroundRecipe="${x => neutralForegroundRest}"
279
+ ></app-swatch>
280
+ <app-swatch
281
+ type="fill"
282
+ recipe-name="neutralFillStrongActive"
283
+ :fillRecipe="${x => neutralFillStrongActive}"
284
+ :foregroundRecipe="${x => neutralForegroundRest}"
285
+ ></app-swatch>
286
+ <app-swatch
287
+ type="foreground"
288
+ recipe-name="neutralForegroundRest"
289
+ :fillRecipe="${x => neutralFillInputRest}"
290
+ :foregroundRecipe="${x => neutralForegroundRest}"
291
+ ></app-swatch>
292
+ <app-swatch
293
+ type="outline"
294
+ recipe-name="focusStrokeOuter"
295
+ :fillRecipe="${x => fillColor}"
296
+ :foregroundRecipe="${x => focusStrokeOuter}"
297
+ :outlineRecipe="${x => focusStrokeOuter}"
298
+ ></app-swatch>
299
+
300
+ <div class="example">
301
+ <fluent-divider class="divider"></fluent-divider>
302
+ </div>
303
+ <app-swatch
304
+ type="outline"
305
+ recipe-name="neutralStrokeDividerRest"
306
+ :fillRecipe="${x => fillColor}"
307
+ :foregroundRecipe="${x => neutralForegroundRest}"
308
+ :outlineRecipe="${x => neutralStrokeDividerRest}"
309
+ ></app-swatch>
310
+ </template>
311
+ `;
312
+ const template = html `
313
+ <p class="title">
314
+ SWATCH ${x => x.index} - ${x => x.color.toUpperCase()}
315
+ ${when(x => x.layerName, html `
316
+ <p>
317
+ <code>${x => x.layerName}</code>
318
+ </p>
319
+ `)}
320
+ </p>
321
+
322
+ <div class="content">
323
+ ${when(x => x.component === ComponentTypes.backplate, backplateComponents)}
324
+ ${when(x => x.component === ComponentTypes.text, textComponents)}
325
+ ${when(x => x.component === ComponentTypes.form, formComponents)}
326
+ </div>
327
+ `;
328
+ const styles = css `
329
+ ${display('flex')}
330
+
331
+ :host {
332
+ flex-direction: column;
333
+ flex-grow: 1;
334
+ align-items: stretch;
335
+ text-align: center;
336
+ position: relative;
337
+ transition: opacity 0.1s linear;
338
+ height: 100%;
339
+ min-height: 100%;
340
+ background-color: ${fillColor};
341
+ color: ${neutralForegroundRest};
342
+ }
343
+
344
+ .title {
345
+ margin: 16px auto 4px;
346
+ font-weight: 600;
347
+ height: 34px;
348
+ color: ${neutralForegroundHint};
349
+ }
350
+
351
+ .title code {
352
+ font-weight: normal;
353
+ }
354
+
355
+ .content {
356
+ flex-grow: 1;
357
+ display: flex;
358
+ flex-direction: column;
359
+ align-items: center;
360
+ padding: 0 48px 36px;
361
+ }
362
+
363
+ .example {
364
+ height: 60px;
365
+ display: flex;
366
+ align-items: center;
367
+ margin-top: 24px;
368
+ }
369
+
370
+ .hint_text {
371
+ color: ${neutralForegroundHint};
372
+ }
373
+
374
+ .divider {
375
+ width: 150px;
376
+ }
377
+ `;
378
+ let AppColorBlock = class AppColorBlock extends FASTElement {
379
+ colorChanged() {
380
+ this.updateColor();
381
+ }
382
+ connectedCallback() {
383
+ super.connectedCallback();
384
+ DOM.queueUpdate(() => this.updateColor());
385
+ }
386
+ updateColor() {
387
+ if (this.color && this.$fastController.isConnected) {
388
+ const color = parseColorHexRGB(this.color);
389
+ fillColor.setValueFor(this, SwatchRGB.from(color));
390
+ }
391
+ }
392
+ };
393
+ __decorate([
394
+ attr
395
+ ], AppColorBlock.prototype, "index", void 0);
396
+ __decorate([
397
+ attr
398
+ ], AppColorBlock.prototype, "component", void 0);
399
+ __decorate([
400
+ attr
401
+ ], AppColorBlock.prototype, "color", void 0);
402
+ __decorate([
403
+ attr({ attribute: 'layer-name' })
404
+ ], AppColorBlock.prototype, "layerName", void 0);
405
+ AppColorBlock = __decorate([
406
+ customElement({
407
+ name: 'app-color-block',
408
+ template,
409
+ styles,
410
+ })
411
+ ], AppColorBlock);
412
+ export { AppColorBlock };
@@ -0,0 +1,16 @@
1
+ import { FormAssociated, FoundationElement } from '@microsoft/fast-foundation';
2
+ /* eslint-disable */
3
+ class _ColorPicker extends FoundationElement {
4
+ }
5
+ /* eslint-enable */
6
+ /**
7
+ * A form-associated base class for the component.
8
+ *
9
+ * @internal
10
+ */
11
+ export class FormAssociatedColorPicker extends FormAssociated(_ColorPicker) {
12
+ constructor() {
13
+ super(...arguments);
14
+ this.proxy = document.createElement('input');
15
+ }
16
+ }