@fluentui/web-components 3.0.0-alpha.11 → 3.0.0-alpha.12

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 (34) hide show
  1. package/CHANGELOG.json +16 -1
  2. package/CHANGELOG.md +11 -2
  3. package/dist/dts/index.d.ts +1 -0
  4. package/dist/dts/progress-bar/progress-bar.styles.d.ts +1 -1
  5. package/dist/dts/slider/define.d.ts +1 -0
  6. package/dist/dts/slider/index.d.ts +5 -0
  7. package/dist/dts/slider/slider.d.ts +24 -0
  8. package/dist/dts/slider/slider.definition.d.ts +10 -0
  9. package/dist/dts/slider/slider.options.d.ts +15 -0
  10. package/dist/dts/slider/slider.styles.d.ts +4 -0
  11. package/dist/dts/slider/slider.template.d.ts +3 -0
  12. package/dist/esm/index.js +1 -0
  13. package/dist/esm/index.js.map +1 -1
  14. package/dist/esm/progress-bar/progress-bar.styles.js +1 -1
  15. package/dist/esm/slider/define.js +4 -0
  16. package/dist/esm/slider/define.js.map +1 -0
  17. package/dist/esm/slider/index.js +6 -0
  18. package/dist/esm/slider/index.js.map +1 -0
  19. package/dist/esm/slider/slider.definition.js +18 -0
  20. package/dist/esm/slider/slider.definition.js.map +1 -0
  21. package/dist/esm/slider/slider.js +59 -0
  22. package/dist/esm/slider/slider.js.map +1 -0
  23. package/dist/esm/slider/slider.options.js +10 -0
  24. package/dist/esm/slider/slider.options.js.map +1 -0
  25. package/dist/esm/slider/slider.styles.js +186 -0
  26. package/dist/esm/slider/slider.styles.js.map +1 -0
  27. package/dist/esm/slider/slider.template.js +5 -0
  28. package/dist/esm/slider/slider.template.js.map +1 -0
  29. package/dist/fluent-web-components.api.json +348 -1
  30. package/dist/web-components.d.ts +60 -1
  31. package/dist/web-components.js +598 -40
  32. package/dist/web-components.min.js +131 -127
  33. package/docs/api-report.md +33 -0
  34. package/package.json +8 -4
package/CHANGELOG.json CHANGED
@@ -2,7 +2,22 @@
2
2
  "name": "@fluentui/web-components",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 14 Mar 2023 04:21:16 GMT",
5
+ "date": "Tue, 28 Mar 2023 04:19:56 GMT",
6
+ "tag": "@fluentui/web-components_v3.0.0-alpha.12",
7
+ "version": "3.0.0-alpha.12",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "ryan@ryanmerrill.net",
12
+ "package": "@fluentui/web-components",
13
+ "commit": "d63779409cf8b7565b415fdac51e09cf4dbc6e08",
14
+ "comment": "Adds Slider as a web component"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Tue, 14 Mar 2023 04:21:22 GMT",
6
21
  "tag": "@fluentui/web-components_v3.0.0-alpha.11",
7
22
  "version": "3.0.0-alpha.11",
8
23
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,21 @@
1
1
  # Change Log - @fluentui/web-components
2
2
 
3
- This log was last generated on Tue, 14 Mar 2023 04:21:16 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 28 Mar 2023 04:19:56 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [3.0.0-alpha.12](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-alpha.12)
8
+
9
+ Tue, 28 Mar 2023 04:19:56 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-alpha.11..@fluentui/web-components_v3.0.0-alpha.12)
11
+
12
+ ### Changes
13
+
14
+ - Adds Slider as a web component ([PR #27165](https://github.com/microsoft/fluentui/pull/27165) by ryan@ryanmerrill.net)
15
+
7
16
  ## [3.0.0-alpha.11](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-alpha.11)
8
17
 
9
- Tue, 14 Mar 2023 04:21:16 GMT
18
+ Tue, 14 Mar 2023 04:21:22 GMT
10
19
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-alpha.10..@fluentui/web-components_v3.0.0-alpha.11)
11
20
 
12
21
  ### Changes
@@ -6,6 +6,7 @@ export * from './counter-badge/index.js';
6
6
  export * from './divider/index.js';
7
7
  export * from './image/index.js';
8
8
  export * from './progress-bar/index.js';
9
+ export * from './slider/index.js';
9
10
  export * from './spinner/index.js';
10
11
  export * from './switch/index.js';
11
12
  export * from './text/index.js';
@@ -1,4 +1,4 @@
1
- /** Text styles
1
+ /** ProgressBar styles
2
2
  * @public
3
3
  */
4
4
  export declare const styles: import("@microsoft/fast-element").ElementStyles;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export * from './slider.js';
2
+ export * from './slider.options.js';
3
+ export { definition as SliderDefinition } from './slider.definition.js';
4
+ export { styles as SliderStyles } from './slider.styles.js';
5
+ export { template as SliderTemplate } from './slider.template.js';
@@ -0,0 +1,24 @@
1
+ import { FASTSlider } from '@microsoft/fast-foundation';
2
+ import type { SliderSize } from './slider.options.js';
3
+ /**
4
+ * The base class used for constructing a fluent-slider custom element
5
+ * @public
6
+ */
7
+ export declare class Slider extends FASTSlider {
8
+ /**
9
+ * The size of the slider
10
+ * @public
11
+ * @remarks
12
+ * HTML Attribute: size
13
+ */
14
+ size?: SliderSize;
15
+ handleChange(source: any, propertyName: string): void;
16
+ connectedCallback(): void;
17
+ disconnectedCallback(): void;
18
+ private stepStyles?;
19
+ /**
20
+ * Handles changes to step styling based on the step value
21
+ * NOTE: This function is not a changed callback, stepStyles is not observable
22
+ */
23
+ private handleStepStyles;
24
+ }
@@ -0,0 +1,10 @@
1
+ import { Slider } from './slider.js';
2
+ /**
3
+ * The Fluent Slider Element.
4
+ *
5
+ *
6
+ * @public
7
+ * @remarks
8
+ * HTML Element: \<fluent-slider\>
9
+ */
10
+ export declare const definition: import("@microsoft/fast-element").FASTElementDefinition<typeof Slider>;
@@ -0,0 +1,15 @@
1
+ import { ValuesOf } from '@microsoft/fast-foundation';
2
+ export { SliderOrientation } from '@microsoft/fast-foundation';
3
+ /**
4
+ * SliderSize Constants
5
+ * @public
6
+ */
7
+ export declare const SliderSize: {
8
+ readonly small: "small";
9
+ readonly medium: "medium";
10
+ };
11
+ /**
12
+ * Applies bar height to the slider rail and diameter to the slider thumbs
13
+ * @public
14
+ */
15
+ export declare type SliderSize = ValuesOf<typeof SliderSize>;
@@ -0,0 +1,4 @@
1
+ /** Text styles
2
+ * @public
3
+ */
4
+ export declare const styles: import("@microsoft/fast-element").ElementStyles;
@@ -0,0 +1,3 @@
1
+ import type { ElementViewTemplate } from '@microsoft/fast-element';
2
+ import { FASTSlider } from '@microsoft/fast-foundation';
3
+ export declare const template: ElementViewTemplate<FASTSlider>;
package/dist/esm/index.js CHANGED
@@ -6,6 +6,7 @@ export * from './counter-badge/index.js';
6
6
  export * from './divider/index.js';
7
7
  export * from './image/index.js';
8
8
  export * from './progress-bar/index.js';
9
+ export * from './slider/index.js';
9
10
  export * from './spinner/index.js';
10
11
  export * from './switch/index.js';
11
12
  export * from './text/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,kBAAkB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { css } from '@microsoft/fast-element';
2
2
  import { display } from '@microsoft/fast-foundation';
3
3
  import { borderRadiusMedium, colorBrandBackground2, colorCompoundBrandBackground, colorNeutralBackground6, colorPaletteDarkOrangeBackground2, colorPaletteDarkOrangeBackground3, colorPaletteGreenBackground2, colorPaletteGreenBackground3, colorPaletteRedBackground2, colorPaletteRedBackground3, } from '../theme/design-tokens.js';
4
- /** Text styles
4
+ /** ProgressBar styles
5
5
  * @public
6
6
  */
7
7
  export const styles = css `
@@ -0,0 +1,4 @@
1
+ import { FluentDesignSystem } from '../fluent-design-system.js';
2
+ import { definition } from './slider.definition.js';
3
+ definition.define(FluentDesignSystem.registry);
4
+ //# sourceMappingURL=define.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define.js","sourceRoot":"","sources":["../../../src/slider/define.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,UAAU,CAAC,MAAM,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from './slider.js';
2
+ export * from './slider.options.js';
3
+ export { definition as SliderDefinition } from './slider.definition.js';
4
+ export { styles as SliderStyles } from './slider.styles.js';
5
+ export { template as SliderTemplate } from './slider.template.js';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slider/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { FluentDesignSystem } from '../fluent-design-system.js';
2
+ import { Slider } from './slider.js';
3
+ import { styles } from './slider.styles.js';
4
+ import { template } from './slider.template.js';
5
+ /**
6
+ * The Fluent Slider Element.
7
+ *
8
+ *
9
+ * @public
10
+ * @remarks
11
+ * HTML Element: \<fluent-slider\>
12
+ */
13
+ export const definition = Slider.compose({
14
+ name: `${FluentDesignSystem.prefix}-slider`,
15
+ template,
16
+ styles,
17
+ });
18
+ //# sourceMappingURL=slider.definition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slider.definition.js","sourceRoot":"","sources":["../../../src/slider/slider.definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC;IACvC,IAAI,EAAE,GAAG,kBAAkB,CAAC,MAAM,SAAS;IAC3C,QAAQ;IACR,MAAM;CACP,CAAC,CAAC"}
@@ -0,0 +1,59 @@
1
+ import { __decorate } from "tslib";
2
+ import { attr, css, Observable } from '@microsoft/fast-element';
3
+ import { FASTSlider } from '@microsoft/fast-foundation';
4
+ /**
5
+ * The base class used for constructing a fluent-slider custom element
6
+ * @public
7
+ */
8
+ export class Slider extends FASTSlider {
9
+ handleChange(source, propertyName) {
10
+ switch (propertyName) {
11
+ case 'min':
12
+ case 'max':
13
+ case 'step':
14
+ this.handleStepStyles();
15
+ break;
16
+ default:
17
+ break;
18
+ }
19
+ }
20
+ connectedCallback() {
21
+ super.connectedCallback();
22
+ Observable.getNotifier(this).subscribe(this, 'max');
23
+ Observable.getNotifier(this).subscribe(this, 'min');
24
+ Observable.getNotifier(this).subscribe(this, 'step');
25
+ this.handleStepStyles();
26
+ }
27
+ disconnectedCallback() {
28
+ super.disconnectedCallback();
29
+ Observable.getNotifier(this).unsubscribe(this, 'max');
30
+ Observable.getNotifier(this).unsubscribe(this, 'min');
31
+ Observable.getNotifier(this).unsubscribe(this, 'step');
32
+ }
33
+ /**
34
+ * Handles changes to step styling based on the step value
35
+ * NOTE: This function is not a changed callback, stepStyles is not observable
36
+ */
37
+ handleStepStyles() {
38
+ if (this.step) {
39
+ const totalSteps = (100 / Math.floor((this.max - this.min) / this.step));
40
+ if (this.stepStyles !== undefined) {
41
+ this.$fastController.removeStyles(this.stepStyles);
42
+ }
43
+ this.stepStyles = css /**css*/ `
44
+ :host {
45
+ --step-rate: ${totalSteps}%;
46
+ color: blue;
47
+ }
48
+ `;
49
+ this.$fastController.addStyles(this.stepStyles);
50
+ }
51
+ else if (this.stepStyles !== undefined) {
52
+ this.$fastController.removeStyles(this.stepStyles);
53
+ }
54
+ }
55
+ }
56
+ __decorate([
57
+ attr
58
+ ], Slider.prototype, "size", void 0);
59
+ //# sourceMappingURL=slider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slider.js","sourceRoot":"","sources":["../../../src/slider/slider.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAGxD;;;GAGG;AACH,MAAM,OAAO,MAAO,SAAQ,UAAU;IAU7B,YAAY,CAAC,MAAW,EAAE,YAAoB;QACnD,QAAQ,YAAY,EAAE;YACpB,KAAK,KAAK,CAAC;YACX,KAAK,KAAK,CAAC;YACX,KAAK,MAAM;gBACT,IAAI,CAAC,gBAAgB,EAAE,CAAC;gBACxB,MAAM;YACR;gBACE,MAAM;SACT;IACH,CAAC;IAEM,iBAAiB;QACtB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAE1B,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACpD,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACpD,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAErD,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC1B,CAAC;IAEM,oBAAoB;QACzB,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAE7B,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACtD,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACtD,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACzD,CAAC;IAID;;;OAGG;IACK,gBAAgB;QACtB,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,MAAM,UAAU,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAQ,CAAC;YAEhF,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE;gBACjC,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;aACpD;YAED,IAAI,CAAC,UAAU,GAAG,GAAG,CAAA,QAAQ,CAAC;;yBAEX,UAAU;;;OAG5B,CAAC;YAEF,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SACjD;aAAM,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE;YACxC,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SACpD;IACH,CAAC;CACF;AA1DC;IADC,IAAI;oCACoB"}
@@ -0,0 +1,10 @@
1
+ export { SliderOrientation } from '@microsoft/fast-foundation';
2
+ /**
3
+ * SliderSize Constants
4
+ * @public
5
+ */
6
+ export const SliderSize = {
7
+ small: 'small',
8
+ medium: 'medium',
9
+ };
10
+ //# sourceMappingURL=slider.options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slider.options.js","sourceRoot":"","sources":["../../../src/slider/slider.options.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;CACR,CAAC"}
@@ -0,0 +1,186 @@
1
+ import { css } from '@microsoft/fast-element';
2
+ import { display } from '@microsoft/fast-foundation';
3
+ import { borderRadiusCircular, borderRadiusMedium, borderRadiusSmall, colorBrandBackground, colorCompoundBrandBackground, colorCompoundBrandBackgroundHover, colorCompoundBrandBackgroundPressed, colorNeutralBackground1, colorNeutralBackgroundDisabled, colorNeutralForegroundDisabled, colorNeutralStroke1, colorNeutralStrokeAccessible, colorNeutralStrokeDisabled, colorStrokeFocus1, colorStrokeFocus2, } from '../theme/design-tokens.js';
4
+ /** Text styles
5
+ * @public
6
+ */
7
+ export const styles = css `
8
+ ${display('inline-grid')} :host {
9
+ --thumb-size: 18px;
10
+ --thumb-padding: 3px;
11
+ --thumb-translate: calc(var(--thumb-size) * -0.5 + var(--track-width) / 2);
12
+ --track-overhang: -2px;
13
+ --track-width: 4px;
14
+ --fast-slider-height: calc(var(--thumb-size) * 10);
15
+ --slider-direction: 90deg;
16
+ align-items: center;
17
+ box-sizing: border-box;
18
+ outline: none;
19
+ cursor: pointer;
20
+ user-select: none;
21
+ border-radius: ${borderRadiusSmall};
22
+ touch-action: pan-y;
23
+ min-width: calc(var(--thumb-size) * 1px);
24
+ width: 100%;
25
+ }
26
+
27
+ :host([size='small']) {
28
+ --thumb-size: 14px;
29
+ --track-width: 2px;
30
+ --thumb-padding: 3px;
31
+ }
32
+
33
+ :host([orientation='vertical']) {
34
+ --slider-direction: 0deg;
35
+ height: 160px;
36
+ min-height: var(--thumb-size);
37
+ touch-action: pan-x;
38
+ padding: 8px 0;
39
+ width: auto;
40
+ min-width: auto;
41
+ }
42
+
43
+ :host([disabled]:hover) {
44
+ cursor: initial;
45
+ }
46
+
47
+ :host(:focus-visible) {
48
+ box-shadow: 0 0 0 2pt ${colorStrokeFocus2};
49
+ outline: 1px solid ${colorStrokeFocus1};
50
+ }
51
+
52
+ .thumb-cursor:focus {
53
+ outline: 0;
54
+ }
55
+
56
+ /* Thumb Container and Cursor */
57
+ .thumb-container {
58
+ position: absolute;
59
+ height: var(--thumb-size);
60
+ width: var(--thumb-size);
61
+ transition: all 0.2s ease;
62
+ }
63
+
64
+ .thumb-container {
65
+ transform: translateX(calc(var(--thumb-size) * 0.5)) translateY(calc(var(--thumb-translate) * -1.5));
66
+ }
67
+
68
+ :host([size='small']) .thumb-container {
69
+ transform: translateX(calc(var(--thumb-size) * 0.5)) translateY(calc(var(--thumb-translate) * -1.35));
70
+ }
71
+
72
+ :host([orientation='vertical']) .thumb-container {
73
+ transform: translateX(calc(var(--thumb-translate) * -1.5)) translateY(calc(var(--thumb-size) * -0.5));
74
+ }
75
+
76
+ :host([orientation='vertical'][size='small']) .thumb-container {
77
+ transform: translateX(calc(var(--thumb-translate) * -1.35)) translateY(calc(var(--thumb-size) * -0.5));
78
+ }
79
+
80
+ .thumb-cursor {
81
+ height: var(--thumb-size);
82
+ width: var(--thumb-size);
83
+ background-color: ${colorBrandBackground};
84
+ border-radius: ${borderRadiusCircular};
85
+ box-shadow: inset 0 0 0 var(--thumb-padding) ${colorNeutralBackground1}, 0 0 0 1px ${colorNeutralStroke1};
86
+ }
87
+ .thumb-cursor:hover {
88
+ background-color: ${colorCompoundBrandBackgroundHover};
89
+ }
90
+ .thumb-cursor:active {
91
+ background-color: ${colorCompoundBrandBackgroundPressed};
92
+ }
93
+ :host([disabled]) .thumb-cursor {
94
+ background-color: ${colorNeutralForegroundDisabled};
95
+ box-shadow: inset 0 0 0 var(--thumb-padding) ${colorNeutralBackground1}, 0 0 0 1px ${colorNeutralStrokeDisabled};
96
+ }
97
+
98
+ /* Positioning Region */
99
+ .positioning-region {
100
+ position: relative;
101
+ display: grid;
102
+ }
103
+
104
+ :host([orientation='horizontal']) .positioning-region {
105
+ margin: 0 8px;
106
+ grid-template-rows: var(--thumb-size) var(--thumb-size);
107
+ }
108
+ :host([orientation='vertical']) .positioning-region {
109
+ margin: 8px 0;
110
+ height: 100%;
111
+ grid-template-columns: var(--thumb-size) var(--thumb-size);
112
+ }
113
+
114
+ /* Track */
115
+ .track {
116
+ align-self: start;
117
+ position: absolute;
118
+ background-color: ${colorNeutralStrokeAccessible};
119
+ border-radius: ${borderRadiusMedium};
120
+ overflow: hidden;
121
+ }
122
+
123
+ :host([step]) .track::after {
124
+ content: '';
125
+ position: absolute;
126
+ border-radius: ${borderRadiusMedium};
127
+ width: 100%;
128
+ inset: 0 2px;
129
+ background-image: repeating-linear-gradient(
130
+ var(--slider-direction),
131
+ #0000 0%,
132
+ #0000 calc(var(--step-rate) - 1px),
133
+ ${colorNeutralBackground1} calc(var(--step-rate) - 1px),
134
+ ${colorNeutralBackground1} var(--step-rate)
135
+ );
136
+ }
137
+
138
+ :host([orientation='vertical'][step]) .track::after {
139
+ inset: -2px 0;
140
+ }
141
+
142
+ :host([disabled]) .track {
143
+ background-color: ${colorNeutralBackgroundDisabled};
144
+ }
145
+
146
+ :host([orientation='horizontal']) .track {
147
+ right: var(--track-overhang);
148
+ left: var(--track-overhang);
149
+ align-self: start;
150
+ height: var(--track-width);
151
+ grid-row: 2 / auto;
152
+ }
153
+
154
+ :host([orientation='vertical']) .track {
155
+ top: var(--track-overhang);
156
+ bottom: var(--track-overhang);
157
+ width: var(--track-width);
158
+ height: 100%;
159
+ grid-column: 2 / auto;
160
+ }
161
+ .track-start {
162
+ background-color: ${colorCompoundBrandBackground};
163
+ position: absolute;
164
+ height: 100%;
165
+ left: 0;
166
+ border-radius: ${borderRadiusMedium};
167
+ }
168
+ :host([disabled]) .track-start {
169
+ background-color: ${colorNeutralForegroundDisabled};
170
+ }
171
+ :host(:hover) .track-start {
172
+ background-color: ${colorCompoundBrandBackgroundHover};
173
+ }
174
+ :host([disabled]:hover) .track-start {
175
+ background-color: ${colorNeutralForegroundDisabled};
176
+ }
177
+ .track-start:active {
178
+ background-color: ${colorCompoundBrandBackgroundPressed};
179
+ }
180
+ :host([orientation='vertical']) .track-start {
181
+ height: auto;
182
+ width: 100%;
183
+ bottom: 0;
184
+ }
185
+ `;
186
+ //# sourceMappingURL=slider.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slider.styles.js","sourceRoot":"","sources":["../../../src/slider/slider.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,4BAA4B,EAC5B,iCAAiC,EACjC,mCAAmC,EACnC,uBAAuB,EACvB,8BAA8B,EAC9B,8BAA8B,EAC9B,mBAAmB,EACnB,4BAA4B,EAC5B,0BAA0B,EAC1B,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AAEnC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;IACrB,OAAO,CAAC,aAAa,CAAC;;;;;;;;;;;;;qBAaL,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;4BA2BV,iBAAiB;yBACpB,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAkClB,oBAAoB;qBACvB,oBAAoB;mDACU,uBAAuB,eAAe,mBAAmB;;;wBAGpF,iCAAiC;;;wBAGjC,mCAAmC;;;wBAGnC,8BAA8B;mDACH,uBAAuB,eAAe,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;wBAuB3F,4BAA4B;qBAC/B,kBAAkB;;;;;;;qBAOlB,kBAAkB;;;;;;;QAO/B,uBAAuB;QACvB,uBAAuB;;;;;;;;;wBASP,8BAA8B;;;;;;;;;;;;;;;;;;;wBAmB9B,4BAA4B;;;;qBAI/B,kBAAkB;;;wBAGf,8BAA8B;;;wBAG9B,iCAAiC;;;wBAGjC,8BAA8B;;;wBAG9B,mCAAmC;;;;;;;CAO1D,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { sliderTemplate } from '@microsoft/fast-foundation';
2
+ export const template = sliderTemplate({
3
+ thumb: `<div class="thumb-cursor" tabindex="0"></div>`,
4
+ });
5
+ //# sourceMappingURL=slider.template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slider.template.js","sourceRoot":"","sources":["../../../src/slider/slider.template.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAExE,MAAM,CAAC,MAAM,QAAQ,GAAoC,cAAc,CAAC;IACtE,KAAK,EAAE,+CAA+C;CACvD,CAAC,CAAC"}