@fluentui/web-components 2.5.0 → 2.5.3

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 (65) hide show
  1. package/CHANGELOG.json +76 -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 +10 -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/esm/_docs/design-system/color-explorer/app.js +247 -0
  33. package/dist/esm/_docs/design-system/color-explorer/colors.js +24 -0
  34. package/dist/esm/_docs/design-system/color-explorer/component-types.js +7 -0
  35. package/dist/esm/_docs/design-system/color-explorer/components/color-block.js +408 -0
  36. package/dist/esm/_docs/design-system/color-explorer/components/color-picker/color-picker.form-associated.js +16 -0
  37. package/dist/esm/_docs/design-system/color-explorer/components/color-picker/color-picker.js +297 -0
  38. package/dist/esm/_docs/design-system/color-explorer/components/color-picker/color-picker.styles.js +124 -0
  39. package/dist/esm/_docs/design-system/color-explorer/components/color-picker/color-picker.template.js +130 -0
  40. package/dist/esm/_docs/design-system/color-explorer/components/color-picker/index.js +15 -0
  41. package/dist/esm/_docs/design-system/color-explorer/components/control-pane/control-pane.js +24 -0
  42. package/dist/esm/_docs/design-system/color-explorer/components/control-pane/control-pane.styles.js +19 -0
  43. package/dist/esm/_docs/design-system/color-explorer/components/control-pane/control-pane.template.js +52 -0
  44. package/dist/esm/_docs/design-system/color-explorer/components/control-pane/index.js +18 -0
  45. package/dist/esm/_docs/design-system/color-explorer/components/gradient/gradient.js +11 -0
  46. package/dist/esm/_docs/design-system/color-explorer/components/gradient/gradient.styles.js +31 -0
  47. package/dist/esm/_docs/design-system/color-explorer/components/gradient/gradient.template.js +21 -0
  48. package/dist/esm/_docs/design-system/color-explorer/components/gradient/index.js +18 -0
  49. package/dist/esm/_docs/design-system/color-explorer/components/layer-background/index.js +70 -0
  50. package/dist/esm/_docs/design-system/color-explorer/components/sample-app/index.js +18 -0
  51. package/dist/esm/_docs/design-system/color-explorer/components/sample-app/sample-app.js +3 -0
  52. package/dist/esm/_docs/design-system/color-explorer/components/sample-app/sample-app.styles.js +166 -0
  53. package/dist/esm/_docs/design-system/color-explorer/components/sample-app/sample-app.template.js +97 -0
  54. package/dist/esm/_docs/design-system/color-explorer/components/sample-page/index.js +18 -0
  55. package/dist/esm/_docs/design-system/color-explorer/components/sample-page/sample-page.js +3 -0
  56. package/dist/esm/_docs/design-system/color-explorer/components/sample-page/sample-page.styles.js +130 -0
  57. package/dist/esm/_docs/design-system/color-explorer/components/sample-page/sample-page.template.js +82 -0
  58. package/dist/esm/_docs/design-system/color-explorer/components/swatch.js +163 -0
  59. package/dist/esm/_docs/design-system/color-explorer/custom-elements.js +3 -0
  60. package/dist/esm/_docs/design-system/color-explorer/index.js +14 -0
  61. package/dist/esm/card/card.stories.js +1 -1
  62. package/dist/esm/data-grid/data-grid.stories.js +1 -1
  63. package/dist/web-components.js +634 -278
  64. package/dist/web-components.min.js +222 -222
  65. package/package.json +6 -6
@@ -0,0 +1,18 @@
1
+ import { __decorate } from "tslib";
2
+ import { customElement } from '@microsoft/fast-element';
3
+ import { ControlPane } from './control-pane';
4
+ import { controlPaneTemplate as template } from './control-pane.template';
5
+ import { controlPaneStyles as styles } from './control-pane.styles';
6
+ let AppControlPane = class AppControlPane extends ControlPane {
7
+ };
8
+ AppControlPane = __decorate([
9
+ customElement({
10
+ name: 'app-control-pane',
11
+ template,
12
+ styles,
13
+ })
14
+ ], AppControlPane);
15
+ export { AppControlPane };
16
+ export * from './control-pane.template';
17
+ export * from './control-pane.styles';
18
+ export * from './control-pane';
@@ -0,0 +1,11 @@
1
+ import { __decorate } from "tslib";
2
+ import { observable } from '@microsoft/fast-element';
3
+ import { FoundationElement } from '@microsoft/fast-foundation';
4
+ export class Gradient extends FoundationElement {
5
+ }
6
+ __decorate([
7
+ observable
8
+ ], Gradient.prototype, "colors", void 0);
9
+ __decorate([
10
+ observable
11
+ ], Gradient.prototype, "markedColor", void 0);
@@ -0,0 +1,31 @@
1
+ import { css } from "@microsoft/fast-element";
2
+ import { display } from "@microsoft/fast-foundation";
3
+ export const gradientStyles = css `
4
+ ${display("flex")} :host {
5
+ display: flex;
6
+ width: 100%;
7
+ }
8
+
9
+ a {
10
+ display: flex;
11
+ flex: 1;
12
+ height: 100%;
13
+ }
14
+
15
+ a.marked {
16
+ position: relative;
17
+ }
18
+
19
+ a.marked::before {
20
+ width: 6px;
21
+ height: 6px;
22
+ margin: 0 auto;
23
+ content: "";
24
+ opacity: 0.7;
25
+ position: relative;
26
+ border: solid 1px currentcolor;
27
+ border-radius: 50%;
28
+ display: block;
29
+ align-self: center;
30
+ }
31
+ `;
@@ -0,0 +1,21 @@
1
+ import { parseColor } from '@microsoft/fast-colors';
2
+ import { html, repeat } from '@microsoft/fast-element';
3
+ import { isDark, SwatchRGB } from '../../../../../index-rollup';
4
+ function getColor(background) {
5
+ const bg = parseColor(background);
6
+ const darkMode = isDark(SwatchRGB.from(bg));
7
+ return darkMode ? 'white' : 'black';
8
+ }
9
+ export const gradientTemplate = html `
10
+ <template>
11
+ ${repeat(x => x.colors, html `
12
+ <a
13
+ class="${(x, c) => c.parent.markedColor !== undefined && x.toUpperCase() === c.parent.markedColor.toUpperCase()
14
+ ? 'marked'
15
+ : ''}"
16
+ style="background: ${x => x}; color: ${x => getColor(x)}"
17
+ title="${(x, c) => c.index.toString().concat(': ', x.toUpperCase())}"
18
+ ></a>
19
+ `, { positioning: true })}
20
+ </template>
21
+ `;
@@ -0,0 +1,18 @@
1
+ import { __decorate } from "tslib";
2
+ import { customElement } from '@microsoft/fast-element';
3
+ import { Gradient } from './gradient';
4
+ import { gradientTemplate as template } from './gradient.template';
5
+ import { gradientStyles as styles } from './gradient.styles';
6
+ let AppGradient = class AppGradient extends Gradient {
7
+ };
8
+ AppGradient = __decorate([
9
+ customElement({
10
+ name: 'app-gradient',
11
+ template,
12
+ styles,
13
+ })
14
+ ], AppGradient);
15
+ export { AppGradient };
16
+ export * from './gradient.template';
17
+ export * from './gradient.styles';
18
+ export * from './gradient';
@@ -0,0 +1,70 @@
1
+ import { __decorate } from "tslib";
2
+ import { attr, css, html, nullableNumberConverter } from '@microsoft/fast-element';
3
+ import { display, FoundationElement } from '@microsoft/fast-foundation';
4
+ import { baseLayerLuminance, fillColor, neutralForegroundRest, neutralLayer1, neutralLayer2, neutralLayer3, neutralLayer4, neutralPalette, } from '../../../../../index-rollup';
5
+ export class LayerBackground extends FoundationElement {
6
+ constructor() {
7
+ super(...arguments);
8
+ this.backgroundLayerRecipe = 'L1';
9
+ }
10
+ baseLayerLuminanceChanged(prev, next) {
11
+ baseLayerLuminance.setValueFor(this, this.baseLayerLuminance);
12
+ this.updateBackgroundColor();
13
+ }
14
+ backgroundLayerRecipeChanged(prev, next) {
15
+ this.updateBackgroundColor();
16
+ }
17
+ updateBackgroundColor() {
18
+ if (!this.$fastController.isConnected) {
19
+ return;
20
+ }
21
+ if (this.backgroundLayerRecipe !== undefined) {
22
+ let swatch = null;
23
+ switch (this.backgroundLayerRecipe) {
24
+ case 'L1':
25
+ swatch = neutralLayer1.getValueFor(this);
26
+ break;
27
+ case 'L2':
28
+ swatch = neutralLayer2.getValueFor(this);
29
+ break;
30
+ case 'L3':
31
+ swatch = neutralLayer3.getValueFor(this);
32
+ break;
33
+ case 'L4':
34
+ swatch = neutralLayer4.getValueFor(this);
35
+ break;
36
+ }
37
+ if (swatch !== null) {
38
+ fillColor.setValueFor(this, swatch);
39
+ }
40
+ }
41
+ }
42
+ handleChange(record) {
43
+ if (record.token === neutralPalette) {
44
+ this.updateBackgroundColor();
45
+ }
46
+ }
47
+ connectedCallback() {
48
+ super.connectedCallback();
49
+ neutralPalette.subscribe(this);
50
+ this.updateBackgroundColor();
51
+ }
52
+ }
53
+ __decorate([
54
+ attr({ attribute: 'base-layer-luminance', converter: nullableNumberConverter })
55
+ ], LayerBackground.prototype, "baseLayerLuminance", void 0);
56
+ __decorate([
57
+ attr({ attribute: 'background-layer-recipe' })
58
+ ], LayerBackground.prototype, "backgroundLayerRecipe", void 0);
59
+ export const layerBackgroundTemplate = html ` <slot></slot> `;
60
+ export const layerBackgroundStyles = css `
61
+ ${display('block')} :host {
62
+ background: ${fillColor};
63
+ color: ${neutralForegroundRest};
64
+ }
65
+ `;
66
+ export const layerBackground = LayerBackground.compose({
67
+ baseName: 'layer-background',
68
+ template: layerBackgroundTemplate,
69
+ styles: layerBackgroundStyles,
70
+ });
@@ -0,0 +1,18 @@
1
+ import { __decorate } from "tslib";
2
+ import { customElement } from '@microsoft/fast-element';
3
+ import { SampleApp } from './sample-app';
4
+ import { sampleAppTemplate as template } from './sample-app.template';
5
+ import { sampleAppStyles as styles } from './sample-app.styles';
6
+ let AppSampleApp = class AppSampleApp extends SampleApp {
7
+ };
8
+ AppSampleApp = __decorate([
9
+ customElement({
10
+ name: 'app-sample-app',
11
+ template,
12
+ styles,
13
+ })
14
+ ], AppSampleApp);
15
+ export { AppSampleApp };
16
+ export * from './sample-app.template';
17
+ export * from './sample-app.styles';
18
+ export * from './sample-app';
@@ -0,0 +1,3 @@
1
+ import { FoundationElement } from '@microsoft/fast-foundation';
2
+ export class SampleApp extends FoundationElement {
3
+ }
@@ -0,0 +1,166 @@
1
+ import { css } from "@microsoft/fast-element";
2
+ import { display, forcedColorsStylesheetBehavior } from "@microsoft/fast-foundation";
3
+ import { SystemColors } from "@microsoft/fast-web-utilities";
4
+ import { bodyFont, controlCornerRadius, designUnit, elevation, fillColor, neutralForegroundHint, neutralForegroundRest, typeRampMinus2FontSize, typeRampPlus3FontSize, typeRampPlus3LineHeight, } from "../../../../../index-rollup";
5
+ export const sampleAppStyles = css `
6
+ ${display("flex")}
7
+
8
+ :host {
9
+ flex-direction: column;
10
+ font-family: ${bodyFont};
11
+ color: ${neutralForegroundRest};
12
+ box-sizing: border-box;
13
+ min-height: 650px;
14
+ min-width: 775px;
15
+ background: ${fillColor};
16
+ border-radius: calc(${controlCornerRadius} * 1px);
17
+ --elevation: 20;
18
+ ${elevation}
19
+ --gutter: 20;
20
+ }
21
+
22
+ app-layer-background {
23
+ display: flex;
24
+ flex-grow: 1;
25
+ }
26
+
27
+ p {
28
+ margin: 0;
29
+ }
30
+
31
+ .icon {
32
+ pointer-events: none;
33
+ }
34
+
35
+ .wrapper {
36
+ display: flex;
37
+ flex-direction: column;
38
+ width: 100%;
39
+ position: relative;
40
+ }
41
+
42
+ .toolbar {
43
+ display: flex;
44
+ align-items: center;
45
+ box-sizing: border-box;
46
+ height: 40px;
47
+ padding: 0 12px;
48
+ }
49
+
50
+ fast-tabs {
51
+ flex-grow: 1;
52
+ }
53
+
54
+ fast-tabs::part(tablist) {
55
+ padding: 0 4px;
56
+ align-self: start;
57
+ }
58
+
59
+ fast-tabs::part(activeIndicator) {
60
+ margin: 0;
61
+ }
62
+
63
+ fast-tab {
64
+ padding: calc(${designUnit} * 5px) calc(${designUnit} * 3px);
65
+ }
66
+
67
+ fast-tab-panel {
68
+ padding: 0;
69
+ height: 100%;
70
+ }
71
+
72
+ .content {
73
+ display: flex;
74
+ align-items: stretch;
75
+ width: 100%;
76
+ text-align: start;
77
+ box-shadow: none;
78
+ }
79
+
80
+ .pane {
81
+ width: 240px;
82
+ }
83
+
84
+ .pane > fast-listbox {
85
+ width: 100%;
86
+ }
87
+
88
+ .details {
89
+ height: unset;
90
+ box-shadow: none;
91
+ }
92
+
93
+ /* wrapper, toolbar, content, pane, details */
94
+
95
+ .content .heading {
96
+ font-size: ${typeRampPlus3FontSize};
97
+ line-height: ${typeRampPlus3LineHeight};
98
+ margin: 0;
99
+ margin-bottom: 10px;
100
+ font-weight: bold;
101
+ }
102
+
103
+ .icon {
104
+ fill: currentColor;
105
+ }
106
+
107
+ .saturation-slider-track {
108
+ height: 100%;
109
+ border-radius: calc(${controlCornerRadius} * 1px);
110
+ }
111
+
112
+ .hue-slider-track {
113
+ height: 100%;
114
+ border-radius: calc(${controlCornerRadius} * 1px);
115
+ background-image:
116
+ linear-gradient(
117
+ to right,
118
+ rgb(255, 0, 0),
119
+ rgb(255, 77, 0),
120
+ rgb(255, 153, 0),
121
+ rgb(255, 230, 0),
122
+ rgb(204, 255, 0),
123
+ rgb(128, 255, 0),
124
+ rgb(51, 255, 0),
125
+ rgb(0, 255, 26),
126
+ rgb(0, 255, 102),
127
+ rgb(0, 255, 179),
128
+ rgb(0, 255, 255),
129
+ rgb(0, 179, 255),
130
+ rgb(0, 102, 255),
131
+ rgb(0, 26, 255),
132
+ rgb(51, 0, 255),
133
+ rgb(128, 0, 255),
134
+ rgb(204, 0, 255),
135
+ rgb(255, 0, 230),
136
+ rgb(255, 0, 153),
137
+ rgb(255, 0, 76),
138
+ rgb(255, 0, 4)
139
+ );"
140
+ }
141
+
142
+ .responsive-expand-flipper {
143
+ position: absolute;
144
+ left: -30px;
145
+ align-self: center;
146
+ display: none;
147
+ visibility: hidden;
148
+ }
149
+
150
+ site-color-swatch {
151
+ margin: 0;
152
+ }
153
+
154
+ fast-slider-label {
155
+ font-size: ${typeRampMinus2FontSize};
156
+ color: ${neutralForegroundHint};
157
+ }
158
+ `.withBehaviors(forcedColorsStylesheetBehavior(css `
159
+ .text-container {
160
+ color: ${SystemColors.ButtonText};
161
+ }
162
+ fast-tab:hover[aria-selected="true"] {
163
+ background: ${SystemColors.Highlight};
164
+ fill: ${SystemColors.HighlightText};
165
+ }
166
+ `));
@@ -0,0 +1,97 @@
1
+ import { html } from '@microsoft/fast-element';
2
+ import { AppSamplePage } from '../sample-page';
3
+ // import DataAreaIcon from "@fluentui/svg-icons/icons/data_area_24_regular.svg";
4
+ // import DataHistogramIcon from "@fluentui/svg-icons/icons/data_histogram_24_regular.svg";
5
+ // import DataScatterIcon from "@fluentui/svg-icons/icons/data_scatter_24_regular.svg";
6
+ AppSamplePage;
7
+ export const sampleAppTemplate = html `
8
+ <template>
9
+ <app-layer-background background-layer-recipe="L3">
10
+ <div class="wrapper">
11
+ <div class="toolbar">
12
+ <p>Adaptive sample app</p>
13
+ </div>
14
+ <fluent-tabs orientation="vertical">
15
+ <fluent-tab id="tab-1" title="Area">
16
+ <svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
17
+ <path
18
+ d="M3 3.75a.75.75 0 011.5 0v6.26l3.65-1.92c.23-.12.5-.12.73.01l3.82 2.25 5.6-4.2a.75.75 0 011.2.6V19.5h.75a.75.75 0 010 1.5H3.75a.75.75 0 01-.75-.75v-8.99-7.51zm1.5 7.95v7.8H18V8.25l-4.8 3.6a.75.75 0 01-.83.05L8.48 9.6 4.5 11.7z"
19
+ />
20
+ </svg>
21
+ </fluent-tab>
22
+ <fluent-tab id="tab-2" title="Histogram">
23
+ <svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
24
+ <path
25
+ d="M8.5 5.23c0-1.24 1-2.25 2.25-2.25h2.5c1.24 0 2.25 1 2.25 2.25V7h3.25C19.99 7 21 8 21 9.25v11c0 .41-.34.75-.75.75H3.75a.75.75 0 01-.75-.75v-8C3 11.01 4 10 5.25 10H8.5V5.23zM10 19.5h4V5.23a.75.75 0 00-.75-.75h-2.5a.75.75 0 00-.75.75V19.5zm-1.5-8H5.25a.75.75 0 00-.75.75v7.25h4v-8zm7 8h4V9.25a.75.75 0 00-.75-.75H15.5v11z"
26
+ />
27
+ </svg>
28
+ </fluent-tab>
29
+ <fluent-tab id="tab-3" title="Scatter">
30
+ <svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
31
+ <path
32
+ d="M3 3.75a.75.75 0 011.5 0V19.5h15.75a.75.75 0 010 1.5H3.75a.75.75 0 01-.75-.75V3.75zM17 4a3 3 0 100 6 3 3 0 000-6zm-1.5 3a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zM6 9a3 3 0 116 0 3 3 0 01-6 0zm3-1.5a1.5 1.5 0 100 3 1.5 1.5 0 000-3zm6 4.5a3 3 0 100 6 3 3 0 000-6zm-1.5 3a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0z"
33
+ />
34
+ </svg>
35
+ </fluent-tab>
36
+ <fluent-tab-panel id="tab-panel-1">
37
+ <fluent-card class="content">
38
+ <div class="pane">
39
+ <fluent-tree-view render-collapsed-nodes="false">
40
+ <fluent-tree-item>
41
+ Root item 1
42
+ <fluent-divider></fluent-divider>
43
+ <fluent-tree-item expanded>
44
+ Flowers
45
+ <fluent-tree-item>Daisy</fluent-tree-item>
46
+ <fluent-tree-item disabled> Sunflower </fluent-tree-item>
47
+ <fluent-tree-item expanded>
48
+ Rose
49
+ <fluent-divider role="presentation"></fluent-divider>
50
+ <fluent-tree-item>Pink</fluent-tree-item>
51
+ <fluent-tree-item>Red</fluent-tree-item>
52
+ <fluent-tree-item>White</fluent-tree-item>
53
+ </fluent-tree-item>
54
+ </fluent-tree-item>
55
+ <fluent-tree-item>Nested item 2</fluent-tree-item>
56
+ <fluent-tree-item>Nested item 3</fluent-tree-item>
57
+ </fluent-tree-item>
58
+ <fluent-tree-item>
59
+ Root item 2
60
+ <fluent-tree-item>
61
+ Flowers
62
+ <fluent-divider></fluent-divider>
63
+ <fluent-tree-item disabled> Daisy </fluent-tree-item>
64
+ <fluent-tree-item>Sunflower</fluent-tree-item>
65
+ <fluent-tree-item>Rose</fluent-tree-item>
66
+ </fluent-tree-item>
67
+ <fluent-tree-item>Nested item 2</fluent-tree-item>
68
+ <fluent-tree-item>Nested item 3</fluent-tree-item>
69
+ </fluent-tree-item>
70
+ <fluent-tree-item> Root item 3 </fluent-tree-item>
71
+ </fluent-tree-view>
72
+ </div>
73
+ <fluent-card class="details"></fluent-card>
74
+ </fluent-card>
75
+ </fluent-tab-panel>
76
+ <fluent-tab-panel id="tab-panel-2">
77
+ <fluent-card class="content">
78
+ <div class="pane">
79
+ <fluent-listbox>
80
+ <fluent-option>Item 1</fluent-option>
81
+ <fluent-option>Item 2</fluent-option>
82
+ <fluent-option>Item 3</fluent-option>
83
+ </fluent-listbox>
84
+ </div>
85
+ <fluent-card class="details"></fluent-card>
86
+ </fluent-card>
87
+ </fluent-tab-panel>
88
+ <fluent-tab-panel id="tab-panel-3">
89
+ <fluent-card class="content">
90
+ <app-sample-page></app-sample-page>
91
+ </fluent-card>
92
+ </fluent-tab-panel>
93
+ </fluent-tabs>
94
+ </div>
95
+ </app-layer-background>
96
+ </template>
97
+ `;
@@ -0,0 +1,18 @@
1
+ import { __decorate } from "tslib";
2
+ import { customElement } from '@microsoft/fast-element';
3
+ import { SamplePage } from './sample-page';
4
+ import { samplePageStyles as styles } from './sample-page.styles';
5
+ import { samplePageTemplate as template } from './sample-page.template';
6
+ let AppSamplePage = class AppSamplePage extends SamplePage {
7
+ };
8
+ AppSamplePage = __decorate([
9
+ customElement({
10
+ name: 'app-sample-page',
11
+ template,
12
+ styles,
13
+ })
14
+ ], AppSamplePage);
15
+ export { AppSamplePage };
16
+ export * from './sample-page.template';
17
+ export * from './sample-page.styles';
18
+ export * from './sample-page';
@@ -0,0 +1,3 @@
1
+ import { FoundationElement } from '@microsoft/fast-foundation';
2
+ export class SamplePage extends FoundationElement {
3
+ }
@@ -0,0 +1,130 @@
1
+ import { css } from '@microsoft/fast-element';
2
+ import { display } from '@microsoft/fast-foundation';
3
+ import { accentFillRest, controlCornerRadius, designUnit, neutralForegroundRest } from '../../../../../index-rollup';
4
+ export const samplePageStyles = css `
5
+ ${display('flex')} :host {
6
+ display: grid;
7
+ grid-gap: calc(var(--gutter) * 2px);
8
+ grid-template-columns: auto 300px;
9
+ padding: calc(var(--gutter) * 2px);
10
+ position: relative;
11
+ border-radius: 0 calc(${controlCornerRadius} * 1px) calc(${controlCornerRadius} * 1px) 0;
12
+ }
13
+
14
+ .image-container {
15
+ /** Temp background */
16
+ background: #d6d6d6;
17
+ width: 100%;
18
+ height: 215px;
19
+ display: flex;
20
+ }
21
+
22
+ .badge {
23
+ align-self: flex-end;
24
+ margin: calc(var(--gutter) * 1px);
25
+ }
26
+
27
+ .text-container {
28
+ display: flex;
29
+ flex-direction: column;
30
+ padding: calc(var(--gutter) * 1px);
31
+ text-align: start;
32
+ color: ${neutralForegroundRest};
33
+ }
34
+
35
+ .sample-control {
36
+ display: flex;
37
+ align-items: center;
38
+ width: 100%;
39
+ }
40
+
41
+ .sample-control-actions {
42
+ margin-inline-start: auto;
43
+ }
44
+
45
+ .sample-control-text {
46
+ margin-inline-start: calc(${designUnit} * 2px + 2px);
47
+ }
48
+
49
+ .sample-control-icon {
50
+ width: 21px;
51
+ height: 21px;
52
+ background-color: ${accentFillRest};
53
+ border-radius: calc(${controlCornerRadius} * 1px);
54
+ }
55
+
56
+ .preview-controls {
57
+ display: grid;
58
+ grid-auto-rows: max-content;
59
+ grid-gap: 20px;
60
+ }
61
+
62
+ .control-container {
63
+ display: grid;
64
+ grid-template-columns: 1fr 1fr;
65
+ grid-gap: 20px;
66
+ }
67
+
68
+ .control-container-2 {
69
+ display: grid;
70
+ grid-template-columns: 1fr auto auto;
71
+ grid-gap: 20px;
72
+ }
73
+
74
+ .control-container p {
75
+ margin-inline-start: calc(${designUnit} * 2px + 2px);
76
+ }
77
+
78
+ .control-container-grid {
79
+ display: grid;
80
+ grid-template-columns: auto 1fr;
81
+ text-align: start;
82
+ color: ${neutralForegroundRest};
83
+ }
84
+
85
+ .checkbox {
86
+ grid-row: 2;
87
+ }
88
+
89
+ .checkbox-label {
90
+ grid-row: 2;
91
+ grid-column: 2;
92
+ }
93
+
94
+ fast-card {
95
+ width: 280px;
96
+ }
97
+
98
+ fast-badge {
99
+ --badge-fill-primary: #e4bc11;
100
+ --badge-color-primary: #000000;
101
+ }
102
+
103
+ fast-slider {
104
+ min-width: unset;
105
+ }
106
+
107
+ fast-tab-panel {
108
+ height: 100%;
109
+ }
110
+
111
+ fast-tab[aria-selected='true'] {
112
+ background: transparent;
113
+ }
114
+
115
+ fast-radio-group.example-radios {
116
+ margin: 0;
117
+ }
118
+
119
+ fast-radio-group.example-radios::part(positioning-region) {
120
+ display: grid;
121
+ grid-template-columns: auto;
122
+ height: 100%;
123
+ }
124
+
125
+ fast-radio-group.swatches::part(positioning-region) {
126
+ display: grid;
127
+ grid-gap: 10px;
128
+ grid-auto-flow: column;
129
+ }
130
+ `;