@fluentui/web-components 3.0.0-alpha.16 → 3.0.0-alpha.17

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 (76) hide show
  1. package/CHANGELOG.json +28 -1
  2. package/CHANGELOG.md +13 -2
  3. package/dist/dts/anchor-button/anchor-button.d.ts +64 -0
  4. package/dist/dts/anchor-button/anchor-button.definition.d.ts +10 -0
  5. package/dist/dts/anchor-button/anchor-button.options.d.ts +46 -0
  6. package/dist/dts/anchor-button/anchor-button.styles.d.ts +1 -0
  7. package/dist/dts/anchor-button/anchor-button.template.d.ts +7 -0
  8. package/dist/dts/anchor-button/define.d.ts +1 -0
  9. package/dist/dts/anchor-button/index.d.ts +4 -0
  10. package/dist/dts/compound-button/compound-button.d.ts +7 -0
  11. package/dist/dts/compound-button/compound-button.definition.d.ts +10 -0
  12. package/dist/dts/compound-button/compound-button.options.d.ts +50 -0
  13. package/dist/dts/compound-button/compound-button.styles.d.ts +1 -0
  14. package/dist/dts/compound-button/compound-button.template.d.ts +13 -0
  15. package/dist/dts/compound-button/define.d.ts +1 -0
  16. package/dist/dts/compound-button/index.d.ts +5 -0
  17. package/dist/dts/index.d.ts +3 -0
  18. package/dist/dts/toggle-button/define.d.ts +1 -0
  19. package/dist/dts/toggle-button/index.d.ts +5 -0
  20. package/dist/dts/toggle-button/toggle-button.d.ts +48 -0
  21. package/dist/dts/toggle-button/toggle-button.definition.d.ts +10 -0
  22. package/dist/dts/toggle-button/toggle-button.options.d.ts +46 -0
  23. package/dist/dts/toggle-button/toggle-button.styles.d.ts +1 -0
  24. package/dist/dts/toggle-button/toggle-button.template.d.ts +7 -0
  25. package/dist/esm/anchor-button/anchor-button.definition.js +21 -0
  26. package/dist/esm/anchor-button/anchor-button.definition.js.map +1 -0
  27. package/dist/esm/anchor-button/anchor-button.js +93 -0
  28. package/dist/esm/anchor-button/anchor-button.js.map +1 -0
  29. package/dist/esm/anchor-button/anchor-button.options.js +17 -0
  30. package/dist/esm/anchor-button/anchor-button.options.js.map +1 -0
  31. package/dist/esm/anchor-button/anchor-button.styles.js +11 -0
  32. package/dist/esm/anchor-button/anchor-button.styles.js.map +1 -0
  33. package/dist/esm/anchor-button/anchor-button.template.js +7 -0
  34. package/dist/esm/anchor-button/anchor-button.template.js.map +1 -0
  35. package/dist/esm/anchor-button/define.js +4 -0
  36. package/dist/esm/anchor-button/define.js.map +1 -0
  37. package/dist/esm/anchor-button/index.js +5 -0
  38. package/dist/esm/anchor-button/index.js.map +1 -0
  39. package/dist/esm/button/button.styles.js +1 -0
  40. package/dist/esm/button/button.styles.js.map +1 -1
  41. package/dist/esm/compound-button/compound-button.definition.js +21 -0
  42. package/dist/esm/compound-button/compound-button.definition.js.map +1 -0
  43. package/dist/esm/compound-button/compound-button.js +8 -0
  44. package/dist/esm/compound-button/compound-button.js.map +1 -0
  45. package/dist/esm/compound-button/compound-button.options.js +17 -0
  46. package/dist/esm/compound-button/compound-button.options.js.map +1 -0
  47. package/dist/esm/compound-button/compound-button.styles.js +105 -0
  48. package/dist/esm/compound-button/compound-button.styles.js.map +1 -0
  49. package/dist/esm/compound-button/compound-button.template.js +60 -0
  50. package/dist/esm/compound-button/compound-button.template.js.map +1 -0
  51. package/dist/esm/compound-button/define.js +4 -0
  52. package/dist/esm/compound-button/define.js.map +1 -0
  53. package/dist/esm/compound-button/index.js +6 -0
  54. package/dist/esm/compound-button/index.js.map +1 -0
  55. package/dist/esm/index.js +3 -0
  56. package/dist/esm/index.js.map +1 -1
  57. package/dist/esm/toggle-button/define.js +4 -0
  58. package/dist/esm/toggle-button/define.js.map +1 -0
  59. package/dist/esm/toggle-button/index.js +6 -0
  60. package/dist/esm/toggle-button/index.js.map +1 -0
  61. package/dist/esm/toggle-button/toggle-button.definition.js +21 -0
  62. package/dist/esm/toggle-button/toggle-button.definition.js.map +1 -0
  63. package/dist/esm/toggle-button/toggle-button.js +99 -0
  64. package/dist/esm/toggle-button/toggle-button.js.map +1 -0
  65. package/dist/esm/toggle-button/toggle-button.options.js +17 -0
  66. package/dist/esm/toggle-button/toggle-button.options.js.map +1 -0
  67. package/dist/esm/toggle-button/toggle-button.styles.js +83 -0
  68. package/dist/esm/toggle-button/toggle-button.styles.js.map +1 -0
  69. package/dist/esm/toggle-button/toggle-button.template.js +7 -0
  70. package/dist/esm/toggle-button/toggle-button.template.js.map +1 -0
  71. package/dist/fluent-web-components.api.json +3168 -1471
  72. package/dist/web-components.d.ts +330 -0
  73. package/dist/web-components.js +487 -116
  74. package/dist/web-components.min.js +158 -146
  75. package/docs/api-report.md +173 -0
  76. package/package.json +13 -1
@@ -8,6 +8,7 @@ export const styles = css `
8
8
  :host {
9
9
  --icon-spacing: ${spacingHorizontalSNudge};
10
10
  contain: layout style;
11
+ vertical-align: middle;
11
12
  }
12
13
 
13
14
  :host .control {
@@ -1 +1 @@
1
- {"version":3,"file":"button.styles.js","sourceRoot":"","sources":["../../../src/button/button.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,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,EACzB,2BAA2B,EAC3B,uBAAuB,EACvB,4BAA4B,EAC5B,8BAA8B,EAC9B,8BAA8B,EAC9B,uBAAuB,EACvB,4BAA4B,EAC5B,8BAA8B,EAC9B,uBAAuB,EACvB,iCAAiC,EACjC,mCAAmC,EACnC,4BAA4B,EAC5B,8BAA8B,EAC9B,8BAA8B,EAC9B,6BAA6B,EAC7B,mBAAmB,EACnB,wBAAwB,EACxB,0BAA0B,EAC1B,0BAA0B,EAC1B,iBAAiB,EACjB,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC5B,0BAA0B,EAC1B,+BAA+B,EAC/B,iCAAiC,EACjC,sBAA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wBAI/B,iCAAiC;;;;;;wBAMjC,0BAA0B;;;;wBAI1B,qBAAqB;aAChC,uBAAuB;;;;;wBAKZ,0BAA0B;aACrC,4BAA4B;;;;;wBAKjB,4BAA4B;aACvC,8BAA8B;;;;;;;wBAOnB,0BAA0B;;;;;YAKtC,iCAAiC;;;;YAIjC,mCAAmC;;;;wBAIvB,0BAA0B;aACrC,uBAAuB;;;;wBAIZ,+BAA+B;aAC1C,iCAAiC;;;;wBAItB,iCAAiC;aAC5C,mCAAmC;;;;;;;;;;;;;wBAaxB,0BAA0B;;;;;;;wBAO1B,8BAA8B;oBAClC,0BAA0B;aACjC,8BAA8B;;;CAG1C,CAAC"}
1
+ {"version":3,"file":"button.styles.js","sourceRoot":"","sources":["../../../src/button/button.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,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,EACzB,2BAA2B,EAC3B,uBAAuB,EACvB,4BAA4B,EAC5B,8BAA8B,EAC9B,8BAA8B,EAC9B,uBAAuB,EACvB,4BAA4B,EAC5B,8BAA8B,EAC9B,uBAAuB,EACvB,iCAAiC,EACjC,mCAAmC,EACnC,4BAA4B,EAC5B,8BAA8B,EAC9B,8BAA8B,EAC9B,6BAA6B,EAC7B,mBAAmB,EACnB,wBAAwB,EACxB,0BAA0B,EAC1B,0BAA0B,EAC1B,iBAAiB,EACjB,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC5B,0BAA0B,EAC1B,+BAA+B,EAC/B,iCAAiC,EACjC,sBAAsB,EACtB,aAAa,EACb,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,i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BAKjB,4BAA4B;aACvC,8BAA8B;;;;;;;wBAOnB,0BAA0B;;;;;YAKtC,iCAAiC;;;;YAIjC,mCAAmC;;;;wBAIvB,0BAA0B;aACrC,uBAAuB;;;;wBAIZ,+BAA+B;aAC1C,iCAAiC;;;;wBAItB,iCAAiC;aAC5C,mCAAmC;;;;;;;;;;;;;wBAaxB,0BAA0B;;;;;;;wBAO1B,8BAA8B;oBAClC,0BAA0B;aACjC,8BAA8B;;;CAG1C,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { FluentDesignSystem } from '../fluent-design-system.js';
2
+ import { CompoundButton } from './compound-button.js';
3
+ import { styles } from './compound-button.styles.js';
4
+ import { template } from './compound-button.template.js';
5
+ /**
6
+ * The Fluent Compound Button Element. Implements {@link @microsoft/fast-foundation#Button },
7
+ * {@link @microsoft/fast-foundation#buttonTemplate}
8
+ *
9
+ * @public
10
+ * @remarks
11
+ * HTML Element: \<fluent-comopund-button\>
12
+ */
13
+ export const definition = CompoundButton.compose({
14
+ name: `${FluentDesignSystem.prefix}-compound-button`,
15
+ template,
16
+ styles,
17
+ shadowOptions: {
18
+ delegatesFocus: true,
19
+ },
20
+ });
21
+ //# sourceMappingURL=compound-button.definition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compound-button.definition.js","sourceRoot":"","sources":["../../../src/compound-button/compound-button.definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,cAAc,CAAC,OAAO,CAAC;IAC/C,IAAI,EAAE,GAAG,kBAAkB,CAAC,MAAM,kBAAkB;IACpD,QAAQ;IACR,MAAM;IACN,aAAa,EAAE;QACb,cAAc,EAAE,IAAI;KACrB;CACF,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Button } from '../button/button.js';
2
+ /**
3
+ * The base class used for constructing a fluent-compound-button custom element
4
+ * @public
5
+ */
6
+ export class CompoundButton extends Button {
7
+ }
8
+ //# sourceMappingURL=compound-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compound-button.js","sourceRoot":"","sources":["../../../src/compound-button/compound-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C;;;GAGG;AACH,MAAM,OAAO,cAAe,SAAQ,MAAM;CAAG"}
@@ -0,0 +1,17 @@
1
+ import { ButtonAppearance, ButtonShape, ButtonSize } from '../button/button.options.js';
2
+ /**
3
+ * Compound Button Appearance constants
4
+ * @public
5
+ */
6
+ export const CompoundButtonAppearance = ButtonAppearance;
7
+ /**
8
+ * A Compound Button can be square, circular or rounded.
9
+ * @public
10
+ */
11
+ export const CompoundButtonShape = ButtonShape;
12
+ /**
13
+ * A Compound Button can be a size of small, medium or large.
14
+ * @public
15
+ */
16
+ export const CompoundButtonSize = ButtonSize;
17
+ //# sourceMappingURL=compound-button.options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compound-button.options.js","sourceRoot":"","sources":["../../../src/compound-button/compound-button.options.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAExF;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,gBAAgB,CAAC;AAQzD;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,WAAW,CAAC;AAQ/C;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAAC"}
@@ -0,0 +1,105 @@
1
+ import { css } from '@microsoft/fast-element';
2
+ import { styles as ButtonStyles } from '../button/button.styles.js';
3
+ import { colorNeutralForeground2, colorNeutralForeground2BrandHover, colorNeutralForeground2BrandPressed, colorNeutralForeground2Hover, colorNeutralForeground2Pressed, colorNeutralForegroundDisabled, colorNeutralForegroundOnBrand, fontSizeBase200, fontSizeBase300, fontSizeBase400, fontWeightRegular, lineHeightBase300, lineHeightBase400, spacingHorizontalS, spacingHorizontalSNudge, spacingHorizontalXS, } from '../theme/design-tokens.js';
4
+ // Need to support icon hover styles
5
+ export const styles = css `
6
+ ${ButtonStyles}
7
+
8
+ :host .control,
9
+ :host(:is([size])) .control {
10
+ gap: 12px;
11
+ height: auto;
12
+ padding-top: 14px;
13
+ padding-inline: 12px;
14
+ padding-bottom: 16px;
15
+ font-size: ${fontSizeBase300};
16
+ line-height: ${lineHeightBase300};
17
+ }
18
+
19
+ .content {
20
+ display: flex;
21
+ flex-direction: column;
22
+ text-align: start;
23
+ }
24
+
25
+ ::slotted([slot='description']) {
26
+ color: ${colorNeutralForeground2};
27
+ line-height: 100%;
28
+ font-size: ${fontSizeBase200};
29
+ font-weight: ${fontWeightRegular};
30
+ }
31
+
32
+ ::slotted(svg),
33
+ :host([size='large']) ::slotted(svg) {
34
+ font-size: 40px;
35
+ height: 40px;
36
+ width: 40px;
37
+ }
38
+
39
+ :host(:hover) ::slotted([slot='description']) {
40
+ color: ${colorNeutralForeground2Hover};
41
+ }
42
+
43
+ :host(:active) ::slotted([slot='description']) {
44
+ color: ${colorNeutralForeground2Pressed};
45
+ }
46
+
47
+ :host(:is([appearance='primary'], [appearance='primary']:hover, [appearance='primary']:active))
48
+ ::slotted([slot='description']) {
49
+ color: ${colorNeutralForegroundOnBrand};
50
+ }
51
+
52
+ :host(:is([appearance='subtle'], [appearance='subtle']:hover, [appearance='subtle']:active))
53
+ ::slotted([slot='description']),
54
+ :host([appearance='transparent']) ::slotted([slot='description']) {
55
+ color: ${colorNeutralForeground2};
56
+ }
57
+
58
+ :host([appearance='transparent']:hover) ::slotted([slot='description']) {
59
+ color: ${colorNeutralForeground2BrandHover};
60
+ }
61
+
62
+ :host([appearance='transparent']:active) ::slotted([slot='description']) {
63
+ color: ${colorNeutralForeground2BrandPressed};
64
+ }
65
+
66
+ :host(:is([disabled], [disabled][appearance], [disabled-focusable], [disabled-focusable][appearance]))
67
+ ::slotted([slot='description']) {
68
+ color: ${colorNeutralForegroundDisabled};
69
+ }
70
+
71
+ :host([size='small']) .control {
72
+ padding: 8px;
73
+ padding-bottom: 10px;
74
+ }
75
+
76
+ :host([icon-only]) .control {
77
+ min-width: 52px;
78
+ max-width: 52px;
79
+ padding: ${spacingHorizontalSNudge};
80
+ }
81
+
82
+ :host([icon-only][size='small']) .control {
83
+ min-width: 48px;
84
+ max-width: 48px;
85
+ padding: ${spacingHorizontalXS};
86
+ }
87
+
88
+ :host([icon-only][size='large']) .control {
89
+ min-width: 56px;
90
+ max-width: 56px;
91
+ padding: ${spacingHorizontalS};
92
+ }
93
+
94
+ :host([size='large']) .control {
95
+ padding-top: 18px;
96
+ padding-inline: 16px;
97
+ padding-bottom: 20px;
98
+ font-size: ${fontSizeBase400};
99
+ line-height: ${lineHeightBase400};
100
+ }
101
+ :host([size='large']) ::slotted([slot='description']) {
102
+ font-size: ${fontSizeBase300};
103
+ }
104
+ `;
105
+ //# sourceMappingURL=compound-button.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compound-button.styles.js","sourceRoot":"","sources":["../../../src/compound-button/compound-button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EACL,uBAAuB,EACvB,iCAAiC,EACjC,mCAAmC,EACnC,4BAA4B,EAC5B,8BAA8B,EAC9B,8BAA8B,EAC9B,6BAA6B,EAC7B,eAAe,EACf,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AAEnC,oCAAoC;AACpC,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;IACrB,YAAY;;;;;;;;;iBASC,eAAe;mBACb,iBAAiB;;;;;;;;;;aAUvB,uBAAuB;;iBAEnB,eAAe;mBACb,iBAAiB;;;;;;;;;;;aAWvB,4BAA4B;;;;aAI5B,8BAA8B;;;;;aAK9B,6BAA6B;;;;;;aAM7B,uBAAuB;;;;aAIvB,iCAAiC;;;;aAIjC,mCAAmC;;;;;aAKnC,8BAA8B;;;;;;;;;;;eAW5B,uBAAuB;;;;;;eAMvB,mBAAmB;;;;;;eAMnB,kBAAkB;;;;;;;iBAOhB,eAAe;mBACb,iBAAiB;;;iBAGnB,eAAe;;CAE/B,CAAC"}
@@ -0,0 +1,60 @@
1
+ import { html, ref, slotted } from '@microsoft/fast-element';
2
+ import { endSlotTemplate, startSlotTemplate } from '@microsoft/fast-foundation';
3
+ /**
4
+ * The template for the Compound Button component.
5
+ * @public
6
+ */
7
+ export function buttonTemplate(options = {}) {
8
+ return html `
9
+ <button
10
+ class="control"
11
+ part="control"
12
+ ?autofocus="${x => x.autofocus}"
13
+ ?disabled="${x => x.disabled}"
14
+ form="${x => x.formId}"
15
+ formaction="${x => x.formaction}"
16
+ formenctype="${x => x.formenctype}"
17
+ formmethod="${x => x.formmethod}"
18
+ ?formnovalidate="${x => x.formnovalidate}"
19
+ formtarget="${x => x.formtarget}"
20
+ name="${x => x.name}"
21
+ type="${x => x.type}"
22
+ value="${x => x.value}"
23
+ aria-atomic="${x => x.ariaAtomic}"
24
+ aria-busy="${x => x.ariaBusy}"
25
+ aria-controls="${x => x.ariaControls}"
26
+ aria-current="${x => x.ariaCurrent}"
27
+ aria-describedby="${x => x.ariaDescribedby}"
28
+ aria-details="${x => x.ariaDetails}"
29
+ aria-disabled="${x => x.ariaDisabled}"
30
+ aria-errormessage="${x => x.ariaErrormessage}"
31
+ aria-expanded="${x => x.ariaExpanded}"
32
+ aria-flowto="${x => x.ariaFlowto}"
33
+ aria-haspopup="${x => x.ariaHaspopup}"
34
+ aria-hidden="${x => x.ariaHidden}"
35
+ aria-invalid="${x => x.ariaInvalid}"
36
+ aria-keyshortcuts="${x => x.ariaKeyshortcuts}"
37
+ aria-label="${x => x.ariaLabel}"
38
+ aria-labelledby="${x => x.ariaLabelledby}"
39
+ aria-live="${x => x.ariaLive}"
40
+ aria-owns="${x => x.ariaOwns}"
41
+ aria-pressed="${x => x.ariaPressed}"
42
+ aria-relevant="${x => x.ariaRelevant}"
43
+ aria-roledescription="${x => x.ariaRoledescription}"
44
+ ${ref('control')}
45
+ >
46
+ ${startSlotTemplate(options)}
47
+ <span class="content" part="content">
48
+ <slot ${slotted('defaultSlottedContent')}></slot>
49
+ <slot name="description"></slot>
50
+ </span>
51
+ ${endSlotTemplate(options)}
52
+ </button>
53
+ `;
54
+ }
55
+ /**
56
+ * The template for the Button component.
57
+ * @public
58
+ */
59
+ export const template = buttonTemplate();
60
+ //# sourceMappingURL=compound-button.template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compound-button.template.js","sourceRoot":"","sources":["../../../src/compound-button/compound-button.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAIhF;;;GAGG;AACH,MAAM,UAAU,cAAc,CAA2B,UAAiC,EAAE;IAC1F,OAAO,IAAI,CAAG;;;;oBAII,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS;mBACjB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ;cACpB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM;oBACP,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU;qBAChB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW;oBACnB,CAAC,CAAC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,EAAE,CAAC,CAAC,CAAC,YAAY;8BACZ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,mBAAmB;QAChD,GAAG,CAAC,SAAS,CAAC;;QAEd,iBAAiB,CAAC,OAAO,CAAC;;gBAElB,OAAO,CAAC,uBAAuB,CAAC;;;QAGxC,eAAe,CAAC,OAAO,CAAC;;GAE7B,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAwC,cAAc,EAAE,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FluentDesignSystem } from '../fluent-design-system.js';
2
+ import { definition } from './compound-button.definition.js';
3
+ definition.define(FluentDesignSystem.registry);
4
+ //# sourceMappingURL=define.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define.js","sourceRoot":"","sources":["../../../src/compound-button/define.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE7D,UAAU,CAAC,MAAM,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from './compound-button.js';
2
+ export * from './compound-button.options.js';
3
+ export { template as CompoundButtonTemplate } from './compound-button.template.js';
4
+ export { styles as CompoundButtonStyles } from './compound-button.styles.js';
5
+ export { definition as CompoundButtonDefinition } from './compound-button.definition.js';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/compound-button/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,QAAQ,IAAI,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,EAAE,MAAM,IAAI,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAAE,UAAU,IAAI,wBAAwB,EAAE,MAAM,iCAAiC,CAAC"}
package/dist/esm/index.js CHANGED
@@ -1,8 +1,10 @@
1
1
  export * from './accordion/index.js';
2
2
  export * from './accordion-item/index.js';
3
+ export * from './anchor-button/index.js';
3
4
  export * from './avatar/index.js';
4
5
  export * from './badge/index.js';
5
6
  export * from './button/index.js';
7
+ export * from './compound-button/index.js';
6
8
  export * from './counter-badge/index.js';
7
9
  export * from './divider/index.js';
8
10
  export * from './image/index.js';
@@ -16,5 +18,6 @@ export * from './tabs/index.js';
16
18
  export * from './tab/index.js';
17
19
  export * from './tab-panel/index.js';
18
20
  export * from './text/index.js';
21
+ export * from './toggle-button/index.js';
19
22
  export * from './theme/index.js';
20
23
  //# sourceMappingURL=index.js.map
@@ -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,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,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,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AAEzC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FluentDesignSystem } from '../fluent-design-system.js';
2
+ import { definition } from './toggle-button.definition.js';
3
+ definition.define(FluentDesignSystem.registry);
4
+ //# sourceMappingURL=define.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define.js","sourceRoot":"","sources":["../../../src/toggle-button/define.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,UAAU,CAAC,MAAM,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from './toggle-button.js';
2
+ export * from './toggle-button.options.js';
3
+ export { template as ToggleButtonTemplate } from './toggle-button.template.js';
4
+ export { styles as ToggleButtonStyles } from './toggle-button.styles.js';
5
+ export { definition as ToggleButtonDefinition } from './toggle-button.definition.js';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/toggle-button/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,QAAQ,IAAI,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAAE,MAAM,IAAI,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,UAAU,IAAI,sBAAsB,EAAE,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { FluentDesignSystem } from '../fluent-design-system.js';
2
+ import { ToggleButton } from './toggle-button.js';
3
+ import { styles } from './toggle-button.styles.js';
4
+ import { template } from './toggle-button.template.js';
5
+ /**
6
+ * The Fluent Toggle Button Element. Implements {@link @microsoft/fast-foundation#Button },
7
+ * {@link @microsoft/fast-foundation#buttonTemplate}
8
+ *
9
+ * @public
10
+ * @remarks
11
+ * HTML Element: \<fluent-toggle-button\>
12
+ */
13
+ export const definition = ToggleButton.compose({
14
+ name: `${FluentDesignSystem.prefix}-toggle-button`,
15
+ template,
16
+ styles,
17
+ shadowOptions: {
18
+ delegatesFocus: true,
19
+ },
20
+ });
21
+ //# sourceMappingURL=toggle-button.definition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggle-button.definition.js","sourceRoot":"","sources":["../../../src/toggle-button/toggle-button.definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC,OAAO,CAAC;IAC7C,IAAI,EAAE,GAAG,kBAAkB,CAAC,MAAM,gBAAgB;IAClD,QAAQ;IACR,MAAM;IACN,aAAa,EAAE;QACb,cAAc,EAAE,IAAI;KACrB;CACF,CAAC,CAAC"}
@@ -0,0 +1,99 @@
1
+ import { __decorate } from "tslib";
2
+ import { attr, observable } from '@microsoft/fast-element';
3
+ import { Button } from '../button/button.js';
4
+ /**
5
+ * The base class used for constructing a fluent-toggle-button custom element
6
+ * @public
7
+ */
8
+ export class ToggleButton extends Button {
9
+ constructor() {
10
+ super();
11
+ /**
12
+ * Tracks whether the "checked" property has been changed.
13
+ * This is necessary to provide consistent behavior with
14
+ * normal input checkboxes
15
+ */
16
+ this.dirtyChecked = false;
17
+ /**
18
+ * Provides the default checkedness of the input element
19
+ * Passed down to proxy
20
+ *
21
+ * @public
22
+ * @remarks
23
+ * HTML Attribute: checked
24
+ */
25
+ this.checkedAttribute = false;
26
+ this.defaultChecked = false;
27
+ /**
28
+ * The checked state of the control.
29
+ *
30
+ * @public
31
+ */
32
+ this.checked = false;
33
+ /**
34
+ * The current checkedness of the element. This property serves as a mechanism
35
+ * to set the `checked` property through both property assignment and the
36
+ * .setAttribute() method. This is useful for setting the field's checkedness
37
+ * in UI libraries that bind data through the .setAttribute() API
38
+ * and don't support IDL attribute binding.
39
+ */
40
+ this.currentChecked = false;
41
+ /**
42
+ * @internal
43
+ */
44
+ this.handleToggleButtonClick = (e) => {
45
+ if (!this.disabled && !this.disabledFocusable) {
46
+ this.checked = !this.checked;
47
+ }
48
+ };
49
+ // Re-initialize dirtyChecked because initialization of other values
50
+ // causes it to become true
51
+ this.dirtyChecked = false;
52
+ }
53
+ checkedAttributeChanged() {
54
+ this.defaultChecked = this.checkedAttribute;
55
+ }
56
+ defaultCheckedChanged() {
57
+ if (!this.dirtyChecked) {
58
+ // Setting this.checked will cause us to enter a dirty state,
59
+ // but if we are clean when defaultChecked is changed, we want to stay
60
+ // in a clean state, so reset this.dirtyChecked
61
+ this.checked = this.defaultChecked;
62
+ this.dirtyChecked = false;
63
+ }
64
+ }
65
+ checkedChanged(prev, next) {
66
+ if (!this.dirtyChecked) {
67
+ this.dirtyChecked = true;
68
+ }
69
+ this.currentChecked = this.checked;
70
+ this.setAttribute('aria-pressed', `${this.currentChecked}`);
71
+ if (prev !== undefined) {
72
+ this.$emit('change');
73
+ }
74
+ }
75
+ currentCheckedChanged(prev, next) {
76
+ this.checked = this.currentChecked;
77
+ }
78
+ connectedCallback() {
79
+ super.connectedCallback();
80
+ this.addEventListener('click', this.handleToggleButtonClick);
81
+ }
82
+ disconnectedCallback() {
83
+ super.disconnectedCallback();
84
+ this.removeEventListener('click', this.handleToggleButtonClick);
85
+ }
86
+ }
87
+ __decorate([
88
+ attr({ attribute: 'checked', mode: 'boolean' })
89
+ ], ToggleButton.prototype, "checkedAttribute", void 0);
90
+ __decorate([
91
+ observable
92
+ ], ToggleButton.prototype, "defaultChecked", void 0);
93
+ __decorate([
94
+ observable
95
+ ], ToggleButton.prototype, "checked", void 0);
96
+ __decorate([
97
+ attr({ attribute: 'current-checked', mode: 'boolean' })
98
+ ], ToggleButton.prototype, "currentChecked", void 0);
99
+ //# sourceMappingURL=toggle-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggle-button.js","sourceRoot":"","sources":["../../../src/toggle-button/toggle-button.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C;;;GAGG;AACH,MAAM,OAAO,YAAa,SAAQ,MAAM;IAoEtC;QACE,KAAK,EAAE,CAAC;QApEV;;;;WAIG;QACO,iBAAY,GAAY,KAAK,CAAC;QAExC;;;;;;;WAOG;QAEI,qBAAgB,GAAY,KAAK,CAAC;QAMlC,mBAAc,GAAY,KAAK,CAAC;QAWvC;;;;WAIG;QAEI,YAAO,GAAY,KAAK,CAAC;QAehC;;;;;;WAMG;QAEI,mBAAc,GAAY,KAAK,CAAC;QAyBvC;;WAEG;QACO,4BAAuB,GAAG,CAAC,CAAa,EAAQ,EAAE;YAC1D,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE;gBAC7C,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,O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S,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;sDACP;AAMzC;IADC,UAAU;oDAC4B;AAiBvC;IADC,UAAU;6CACqB;AAuBhC;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;oDACjB"}
@@ -0,0 +1,17 @@
1
+ import { ButtonAppearance, ButtonShape, ButtonSize } from '../button/button.options.js';
2
+ /**
3
+ * Toggle Button Appearance constants
4
+ * @public
5
+ */
6
+ export const ToggleButtonAppearance = ButtonAppearance;
7
+ /**
8
+ * A Toggle Button can be square, circular or rounded.
9
+ * @public
10
+ */
11
+ export const ToggleButtonShape = ButtonShape;
12
+ /**
13
+ * A Toggle Button can be a size of small, medium or large.
14
+ * @public
15
+ */
16
+ export const ToggleButtonSize = ButtonSize;
17
+ //# sourceMappingURL=toggle-button.options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggle-button.options.js","sourceRoot":"","sources":["../../../src/toggle-button/toggle-button.options.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAExF;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;AAOvD;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,WAAW,CAAC;AAQ7C;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAC"}
@@ -0,0 +1,83 @@
1
+ import { css } from '@microsoft/fast-element';
2
+ import { styles as ButtonStyles } from '../button/button.styles.js';
3
+ import { colorBrandBackgroundHover, colorBrandBackgroundPressed, colorBrandBackgroundSelected, colorNeutralBackground1Hover, colorNeutralBackground1Pressed, colorNeutralBackground1Selected, colorNeutralForeground1, colorNeutralForeground2BrandHover, colorNeutralForeground2BrandPressed, colorNeutralForeground2BrandSelected, colorNeutralForeground2Hover, colorNeutralForeground2Pressed, colorNeutralForeground2Selected, colorNeutralForegroundOnBrand, colorNeutralStroke1, colorNeutralStroke1Hover, colorNeutralStroke1Pressed, colorSubtleBackgroundHover, colorSubtleBackgroundPressed, colorSubtleBackgroundSelected, colorTransparentBackgroundHover, colorTransparentBackgroundPressed, colorTransparentBackgroundSelected, strokeWidthThin, } from '../theme/design-tokens.js';
4
+ // Need to support icon hover styles
5
+ export const styles = css `
6
+ ${ButtonStyles}
7
+
8
+ :host([aria-pressed="true"]) .control {
9
+ border-color: ${colorNeutralStroke1};
10
+ background-color: ${colorNeutralBackground1Selected};
11
+ color: ${colorNeutralForeground1};
12
+ border-width: ${strokeWidthThin};
13
+ }
14
+
15
+ :host([aria-pressed='true']:hover) .control {
16
+ border-color: ${colorNeutralStroke1Hover};
17
+ background-color: ${colorNeutralBackground1Hover};
18
+ }
19
+
20
+ :host([aria-pressed='true']:active) .control {
21
+ border-color: ${colorNeutralStroke1Pressed};
22
+ background-color: ${colorNeutralBackground1Pressed};
23
+ }
24
+
25
+ :host([aria-pressed='true'][appearance='primary']) .control {
26
+ border-color: transparent;
27
+ background-color: ${colorBrandBackgroundSelected};
28
+ color: ${colorNeutralForegroundOnBrand};
29
+ }
30
+
31
+ :host([aria-pressed='true'][appearance='primary']:hover) .control {
32
+ background-color: ${colorBrandBackgroundHover};
33
+ }
34
+
35
+ :host([aria-pressed='true'][appearance='primary']:active) .control {
36
+ background-color: ${colorBrandBackgroundPressed};
37
+ }
38
+
39
+ :host([aria-pressed='true'][appearance='subtle']) .control {
40
+ border-color: transparent;
41
+ background-color: ${colorSubtleBackgroundSelected};
42
+ color: ${colorNeutralForeground2Selected};
43
+ }
44
+
45
+ :host([aria-pressed='true'][appearance='subtle']:hover) .control {
46
+ background-color: ${colorSubtleBackgroundHover};
47
+ color: ${colorNeutralForeground2Hover};
48
+ }
49
+
50
+ :host([aria-pressed='true'][appearance='subtle']:active) .control {
51
+ background-color: ${colorSubtleBackgroundPressed};
52
+ color: ${colorNeutralForeground2Pressed};
53
+ }
54
+
55
+ :host([aria-pressed='true'][appearance='outline']) .control,
56
+ :host([aria-pressed='true'][appearance='transparent']) .control {
57
+ background-color: ${colorTransparentBackgroundSelected};
58
+ }
59
+
60
+ :host([aria-pressed='true'][appearance='outline']:hover) .control,
61
+ :host([aria-pressed='true'][appearance='transparent']:hover) .control {
62
+ background-color: ${colorTransparentBackgroundHover};
63
+ }
64
+
65
+ :host([aria-pressed='true'][appearance='outline']:active) .control,
66
+ :host([aria-pressed='true'][appearance='transparent']:active) .control {
67
+ background-color: ${colorTransparentBackgroundPressed};
68
+ }
69
+
70
+ :host([aria-pressed='true'][appearance='transparent']) .control {
71
+ border-color: transparent;
72
+ color: ${colorNeutralForeground2BrandSelected};
73
+ }
74
+
75
+ :host([aria-pressed='true'][appearance='transparent']:hover) .control {
76
+ color: ${colorNeutralForeground2BrandHover};
77
+ }
78
+
79
+ :host([aria-pressed='true'][appearance='transparent']:active) .control {
80
+ color: ${colorNeutralForeground2BrandPressed};
81
+ }
82
+ `;
83
+ //# sourceMappingURL=toggle-button.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggle-button.styles.js","sourceRoot":"","sources":["../../../src/toggle-button/toggle-button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,4BAA4B,EAC5B,4BAA4B,EAC5B,8BAA8B,EAC9B,+BAA+B,EAC/B,uBAAuB,EACvB,iCAAiC,EACjC,mCAAmC,EACnC,oCAAoC,EACpC,4BAA4B,EAC5B,8BAA8B,EAC9B,+BAA+B,EAC/B,6BAA6B,EAC7B,mBAAmB,EACnB,wBAAwB,EACxB,0BAA0B,EAC1B,0BAA0B,EAC1B,4BAA4B,EAC5B,6BAA6B,EAC7B,+BAA+B,EAC/B,iCAAiC,EACjC,kCAAkC,EAClC,eAAe,GAChB,MAAM,2BAA2B,CAAC;AAEnC,oCAAoC;AACpC,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;IACrB,YAAY;;;oBAGI,mBAAmB;wBACf,+BAA+B;aAC1C,uBAAuB;oBAChB,eAAe;;;;oBAIf,wBAAwB;wBACpB,4BAA4B;;;;oBAIhC,0BAA0B;wBACtB,8BAA8B;;;;;wBAK9B,4BAA4B;aACvC,6BAA6B;;;;wBAIlB,yBAAyB;;;;wBAIzB,2BAA2B;;;;;wBAK3B,6BAA6B;aACxC,+BAA+B;;;;wBAIpB,0BAA0B;aACrC,4BAA4B;;;;wBAIjB,4BAA4B;aACvC,8BAA8B;;;;;wBAKnB,kCAAkC;;;;;wBAKlC,+BAA+B;;;;;wBAK/B,iCAAiC;;;;;aAK5C,oCAAoC;;;;aAIpC,iCAAiC;;;;aAIjC,mCAAmC;;CAE/C,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { buttonTemplate } from '@microsoft/fast-foundation';
2
+ /**
3
+ * The template for the ToggleButton component.
4
+ * @public
5
+ */
6
+ export const template = buttonTemplate();
7
+ //# sourceMappingURL=toggle-button.template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggle-button.template.js","sourceRoot":"","sources":["../../../src/toggle-button/toggle-button.template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAG5D;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAsC,cAAc,EAAE,CAAC"}