@fluentui/web-components 3.0.0-beta.82 → 3.0.0-beta.84

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 (153) hide show
  1. package/CHANGELOG.md +20 -2
  2. package/dist/dts/accordion-item/accordion-item.base.d.ts +71 -0
  3. package/dist/dts/accordion-item/accordion-item.d.ts +1 -71
  4. package/dist/dts/accordion-item/index.d.ts +2 -1
  5. package/dist/dts/anchor-button/anchor-button.base.d.ts +144 -0
  6. package/dist/dts/anchor-button/anchor-button.d.ts +2 -144
  7. package/dist/dts/anchor-button/index.d.ts +2 -1
  8. package/dist/dts/avatar/avatar.base.d.ts +42 -0
  9. package/dist/dts/avatar/avatar.d.ts +2 -42
  10. package/dist/dts/avatar/index.d.ts +2 -1
  11. package/dist/dts/button/button.base.d.ts +242 -0
  12. package/dist/dts/button/button.d.ts +2 -242
  13. package/dist/dts/button/index.d.ts +2 -1
  14. package/dist/dts/checkbox/checkbox.base.d.ts +288 -0
  15. package/dist/dts/checkbox/checkbox.d.ts +1 -288
  16. package/dist/dts/checkbox/index.d.ts +2 -1
  17. package/dist/dts/divider/divider.base.d.ts +49 -0
  18. package/dist/dts/divider/divider.d.ts +2 -49
  19. package/dist/dts/divider/index.d.ts +2 -1
  20. package/dist/dts/dropdown/dropdown.base.d.ts +418 -0
  21. package/dist/dts/dropdown/dropdown.d.ts +2 -418
  22. package/dist/dts/dropdown/dropdown.options.d.ts +1 -1
  23. package/dist/dts/dropdown/dropdown.template.d.ts +1 -1
  24. package/dist/dts/dropdown/index.d.ts +2 -1
  25. package/dist/dts/field/field.base.d.ts +120 -0
  26. package/dist/dts/field/field.d.ts +2 -120
  27. package/dist/dts/field/index.d.ts +2 -1
  28. package/dist/dts/link/link.d.ts +1 -1
  29. package/dist/dts/listbox/listbox.d.ts +1 -1
  30. package/dist/dts/progress-bar/index.d.ts +2 -1
  31. package/dist/dts/progress-bar/progress-bar.base.d.ts +73 -0
  32. package/dist/dts/progress-bar/progress-bar.d.ts +2 -73
  33. package/dist/dts/radio/radio.d.ts +1 -1
  34. package/dist/dts/rating-display/index.d.ts +2 -1
  35. package/dist/dts/rating-display/rating-display.base.d.ts +89 -0
  36. package/dist/dts/rating-display/rating-display.d.ts +1 -89
  37. package/dist/dts/spinner/index.d.ts +2 -1
  38. package/dist/dts/spinner/spinner.base.d.ts +14 -0
  39. package/dist/dts/spinner/spinner.d.ts +1 -14
  40. package/dist/dts/switch/switch.d.ts +1 -1
  41. package/dist/dts/tablist/index.d.ts +2 -1
  42. package/dist/dts/tablist/tablist.base.d.ts +95 -0
  43. package/dist/dts/tablist/tablist.d.ts +2 -94
  44. package/dist/dts/tabs/tabs.base.d.ts +90 -0
  45. package/dist/dts/tabs/tabs.d.ts +2 -90
  46. package/dist/dts/text-input/index.d.ts +2 -1
  47. package/dist/dts/text-input/text-input.base.d.ts +393 -0
  48. package/dist/dts/text-input/text-input.d.ts +2 -393
  49. package/dist/dts/textarea/index.d.ts +2 -1
  50. package/dist/dts/textarea/textarea.base.d.ts +347 -0
  51. package/dist/dts/textarea/textarea.d.ts +2 -347
  52. package/dist/esm/accordion/accordion.js +1 -1
  53. package/dist/esm/accordion/accordion.js.map +1 -1
  54. package/dist/esm/accordion-item/accordion-item.base.js +94 -0
  55. package/dist/esm/accordion-item/accordion-item.base.js.map +1 -0
  56. package/dist/esm/accordion-item/accordion-item.js +2 -91
  57. package/dist/esm/accordion-item/accordion-item.js.map +1 -1
  58. package/dist/esm/accordion-item/index.js +2 -1
  59. package/dist/esm/accordion-item/index.js.map +1 -1
  60. package/dist/esm/anchor-button/anchor-button.base.js +147 -0
  61. package/dist/esm/anchor-button/anchor-button.base.js.map +1 -0
  62. package/dist/esm/anchor-button/anchor-button.js +3 -145
  63. package/dist/esm/anchor-button/anchor-button.js.map +1 -1
  64. package/dist/esm/anchor-button/index.js +2 -1
  65. package/dist/esm/anchor-button/index.js.map +1 -1
  66. package/dist/esm/avatar/avatar.base.js +28 -0
  67. package/dist/esm/avatar/avatar.base.js.map +1 -0
  68. package/dist/esm/avatar/avatar.js +2 -26
  69. package/dist/esm/avatar/avatar.js.map +1 -1
  70. package/dist/esm/avatar/index.js +2 -1
  71. package/dist/esm/avatar/index.js.map +1 -1
  72. package/dist/esm/button/button.base.js +283 -0
  73. package/dist/esm/button/button.base.js.map +1 -0
  74. package/dist/esm/button/button.js +3 -281
  75. package/dist/esm/button/button.js.map +1 -1
  76. package/dist/esm/button/button.styles.js +2 -1
  77. package/dist/esm/button/button.styles.js.map +1 -1
  78. package/dist/esm/button/index.js +2 -1
  79. package/dist/esm/button/index.js.map +1 -1
  80. package/dist/esm/checkbox/checkbox.base.js +366 -0
  81. package/dist/esm/checkbox/checkbox.base.js.map +1 -0
  82. package/dist/esm/checkbox/checkbox.js +2 -363
  83. package/dist/esm/checkbox/checkbox.js.map +1 -1
  84. package/dist/esm/checkbox/index.js +2 -1
  85. package/dist/esm/checkbox/index.js.map +1 -1
  86. package/dist/esm/divider/divider.base.js +61 -0
  87. package/dist/esm/divider/divider.base.js.map +1 -0
  88. package/dist/esm/divider/divider.js +3 -58
  89. package/dist/esm/divider/divider.js.map +1 -1
  90. package/dist/esm/divider/index.js +2 -1
  91. package/dist/esm/divider/index.js.map +1 -1
  92. package/dist/esm/dropdown/dropdown.base.js +677 -0
  93. package/dist/esm/dropdown/dropdown.base.js.map +1 -0
  94. package/dist/esm/dropdown/dropdown.js +3 -674
  95. package/dist/esm/dropdown/dropdown.js.map +1 -1
  96. package/dist/esm/dropdown/index.js +2 -1
  97. package/dist/esm/dropdown/index.js.map +1 -1
  98. package/dist/esm/field/field.base.js +189 -0
  99. package/dist/esm/field/field.base.js.map +1 -0
  100. package/dist/esm/field/field.js +3 -187
  101. package/dist/esm/field/field.js.map +1 -1
  102. package/dist/esm/field/index.js +2 -1
  103. package/dist/esm/field/index.js.map +1 -1
  104. package/dist/esm/link/link.js +1 -1
  105. package/dist/esm/link/link.js.map +1 -1
  106. package/dist/esm/progress-bar/index.js +2 -1
  107. package/dist/esm/progress-bar/index.js.map +1 -1
  108. package/dist/esm/progress-bar/progress-bar.base.js +90 -0
  109. package/dist/esm/progress-bar/progress-bar.base.js.map +1 -0
  110. package/dist/esm/progress-bar/progress-bar.js +3 -87
  111. package/dist/esm/progress-bar/progress-bar.js.map +1 -1
  112. package/dist/esm/radio/radio.js +1 -1
  113. package/dist/esm/radio/radio.js.map +1 -1
  114. package/dist/esm/rating-display/index.js +2 -1
  115. package/dist/esm/rating-display/index.js.map +1 -1
  116. package/dist/esm/rating-display/rating-display.base.js +94 -0
  117. package/dist/esm/rating-display/rating-display.base.js.map +1 -0
  118. package/dist/esm/rating-display/rating-display.js +2 -92
  119. package/dist/esm/rating-display/rating-display.js.map +1 -1
  120. package/dist/esm/spinner/index.js +2 -1
  121. package/dist/esm/spinner/index.js.map +1 -1
  122. package/dist/esm/spinner/spinner.base.js +18 -0
  123. package/dist/esm/spinner/spinner.base.js.map +1 -0
  124. package/dist/esm/spinner/spinner.js +2 -17
  125. package/dist/esm/spinner/spinner.js.map +1 -1
  126. package/dist/esm/switch/switch.js +1 -1
  127. package/dist/esm/switch/switch.js.map +1 -1
  128. package/dist/esm/tablist/index.js +2 -1
  129. package/dist/esm/tablist/index.js.map +1 -1
  130. package/dist/esm/tablist/tablist.base.js +248 -0
  131. package/dist/esm/tablist/tablist.base.js.map +1 -0
  132. package/dist/esm/tablist/tablist.js +3 -221
  133. package/dist/esm/tablist/tablist.js.map +1 -1
  134. package/dist/esm/tabs/tabs.base.js +279 -0
  135. package/dist/esm/tabs/tabs.base.js.map +1 -0
  136. package/dist/esm/tabs/tabs.js +2 -276
  137. package/dist/esm/tabs/tabs.js.map +1 -1
  138. package/dist/esm/text-input/index.js +2 -1
  139. package/dist/esm/text-input/index.js.map +1 -1
  140. package/dist/esm/text-input/text-input.base.js +409 -0
  141. package/dist/esm/text-input/text-input.base.js.map +1 -0
  142. package/dist/esm/text-input/text-input.js +3 -407
  143. package/dist/esm/text-input/text-input.js.map +1 -1
  144. package/dist/esm/textarea/index.js +2 -1
  145. package/dist/esm/textarea/index.js.map +1 -1
  146. package/dist/esm/textarea/textarea.base.js +494 -0
  147. package/dist/esm/textarea/textarea.base.js.map +1 -0
  148. package/dist/esm/textarea/textarea.js +3 -491
  149. package/dist/esm/textarea/textarea.js.map +1 -1
  150. package/dist/web-components.d.ts +1 -0
  151. package/dist/web-components.js +707 -556
  152. package/dist/web-components.min.js +265 -265
  153. package/package.json +5 -1
package/CHANGELOG.md CHANGED
@@ -1,12 +1,30 @@
1
1
  # Change Log - @fluentui/web-components
2
2
 
3
- This log was last generated on Fri, 28 Feb 2025 04:07:08 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 10 Mar 2025 21:04:51 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [3.0.0-beta.84](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-beta.84)
8
+
9
+ Mon, 10 Mar 2025 21:04:51 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-beta.83..@fluentui/web-components_v3.0.0-beta.84)
11
+
12
+ ### Changes
13
+
14
+ - fix: move base classes to a separate file and provide export paths for improved tree shaking ([PR #33962](https://github.com/microsoft/fluentui/pull/33962) by 13071055+chrisdholt@users.noreply.github.com)
15
+
16
+ ## [3.0.0-beta.83](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-beta.83)
17
+
18
+ Wed, 05 Mar 2025 04:07:03 GMT
19
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-beta.82..@fluentui/web-components_v3.0.0-beta.83)
20
+
21
+ ### Changes
22
+
23
+ - feat: auto associate tabpanels with tabs ([PR #33939](https://github.com/microsoft/fluentui/pull/33939) by machi@microsoft.com)
24
+
7
25
  ## [3.0.0-beta.82](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-beta.82)
8
26
 
9
- Fri, 28 Feb 2025 04:07:08 GMT
27
+ Fri, 28 Feb 2025 04:07:19 GMT
10
28
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-beta.81..@fluentui/web-components_v3.0.0-beta.82)
11
29
 
12
30
  ### Changes
@@ -0,0 +1,71 @@
1
+ import { FASTElement } from '@microsoft/fast-element';
2
+ /**
3
+ *
4
+ * @slot start - Content positioned before heading in the collapsed state
5
+ * @slot heading - Content which serves as the accordion item heading and text of the expand button
6
+ * @slot - The default slot for accordion item content
7
+ * @slot marker-expanded - The expanded icon
8
+ * @slot marker-collapsed - The collapsed icon
9
+ * @csspart heading - Wraps the button
10
+ * @csspart button - The button which serves to invoke the item
11
+ * @csspart content - The wrapper for the accordion item content
12
+ *
13
+ * @public
14
+ */
15
+ export declare class BaseAccordionItem extends FASTElement {
16
+ /**
17
+ * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
18
+ *
19
+ * @internal
20
+ */
21
+ elementInternals: ElementInternals;
22
+ /**
23
+ * Configures the {@link https://www.w3.org/TR/wai-aria-1.1/#aria-level | level} of the
24
+ * heading element.
25
+ *
26
+ * @public
27
+ * @remarks
28
+ * HTML attribute: heading-level
29
+ */
30
+ headinglevel: 1 | 2 | 3 | 4 | 5 | 6;
31
+ /**
32
+ * Expands or collapses the item.
33
+ *
34
+ * @public
35
+ * @remarks
36
+ * HTML attribute: expanded
37
+ */
38
+ expanded: boolean;
39
+ /**
40
+ * Handles expanded changes
41
+ * @param prev - previous value
42
+ * @param next - next value
43
+ */
44
+ expandedChanged(prev: boolean, next: boolean): void;
45
+ /**
46
+ * Disables an accordion item
47
+ *
48
+ * @public
49
+ * @remarks
50
+ * HTML attribute: disabled
51
+ */
52
+ disabled: boolean;
53
+ /**
54
+ * Handles disabled changes
55
+ * @param prev - previous value
56
+ * @param next - next value
57
+ */
58
+ disabledChanged(prev: boolean, next: boolean): void;
59
+ /**
60
+ * The item ID
61
+ *
62
+ * @public
63
+ * @remarks
64
+ * HTML Attribute: id
65
+ */
66
+ id: string;
67
+ /**
68
+ * @internal
69
+ */
70
+ expandbutton: HTMLElement;
71
+ }
@@ -1,7 +1,7 @@
1
- import { FASTElement } from '@microsoft/fast-element';
2
1
  import type { StaticallyComposableHTML } from '../utils/index.js';
3
2
  import { StartEnd } from '../patterns/index.js';
4
3
  import type { StartEndOptions } from '../patterns/index.js';
4
+ import { BaseAccordionItem } from './accordion-item.base.js';
5
5
  import { AccordionItemMarkerPosition, AccordionItemSize } from './accordion-item.options.js';
6
6
  /**
7
7
  * Accordion Item configuration options
@@ -11,76 +11,6 @@ export type AccordionItemOptions = StartEndOptions<AccordionItem> & {
11
11
  expandedIcon?: StaticallyComposableHTML<AccordionItem>;
12
12
  collapsedIcon?: StaticallyComposableHTML<AccordionItem>;
13
13
  };
14
- /**
15
- *
16
- * @slot start - Content positioned before heading in the collapsed state
17
- * @slot heading - Content which serves as the accordion item heading and text of the expand button
18
- * @slot - The default slot for accordion item content
19
- * @slot marker-expanded - The expanded icon
20
- * @slot marker-collapsed - The collapsed icon
21
- * @csspart heading - Wraps the button
22
- * @csspart button - The button which serves to invoke the item
23
- * @csspart content - The wrapper for the accordion item content
24
- *
25
- * @public
26
- */
27
- export declare class BaseAccordionItem extends FASTElement {
28
- /**
29
- * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
30
- *
31
- * @internal
32
- */
33
- elementInternals: ElementInternals;
34
- /**
35
- * Configures the {@link https://www.w3.org/TR/wai-aria-1.1/#aria-level | level} of the
36
- * heading element.
37
- *
38
- * @public
39
- * @remarks
40
- * HTML attribute: heading-level
41
- */
42
- headinglevel: 1 | 2 | 3 | 4 | 5 | 6;
43
- /**
44
- * Expands or collapses the item.
45
- *
46
- * @public
47
- * @remarks
48
- * HTML attribute: expanded
49
- */
50
- expanded: boolean;
51
- /**
52
- * Handles expanded changes
53
- * @param prev - previous value
54
- * @param next - next value
55
- */
56
- expandedChanged(prev: boolean, next: boolean): void;
57
- /**
58
- * Disables an accordion item
59
- *
60
- * @public
61
- * @remarks
62
- * HTML attribute: disabled
63
- */
64
- disabled: boolean;
65
- /**
66
- * Handles disabled changes
67
- * @param prev - previous value
68
- * @param next - next value
69
- */
70
- disabledChanged(prev: boolean, next: boolean): void;
71
- /**
72
- * The item ID
73
- *
74
- * @public
75
- * @remarks
76
- * HTML Attribute: id
77
- */
78
- id: string;
79
- /**
80
- * @internal
81
- */
82
- expandbutton: HTMLElement;
83
- }
84
14
  /**
85
15
  * An Accordion Item Custom HTML Element.
86
16
  * Based on BaseAccordionItem and includes style and layout specific attributes
@@ -1,4 +1,5 @@
1
- export { AccordionItem, BaseAccordionItem } from './accordion-item.js';
1
+ export { BaseAccordionItem } from './accordion-item.base.js';
2
+ export { AccordionItem } from './accordion-item.js';
2
3
  export type { AccordionItemOptions } from './accordion-item.js';
3
4
  export { AccordionItemSize, AccordionItemMarkerPosition } from './accordion-item.options.js';
4
5
  export { styles as accordionItemStyles } from './accordion-item.styles.js';
@@ -0,0 +1,144 @@
1
+ import { FASTElement } from '@microsoft/fast-element';
2
+ import { type AnchorTarget } from './anchor-button.options.js';
3
+ /**
4
+ * An Anchor Custom HTML Element.
5
+ * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element }.
6
+ *
7
+ * @slot start - Content which can be provided before the anchor content
8
+ * @slot end - Content which can be provided after the anchor content
9
+ * @slot - The default slot for anchor content
10
+ * @csspart control - The anchor element
11
+ * @csspart content - The element wrapping anchor content
12
+ *
13
+ * @public
14
+ */
15
+ export declare class BaseAnchor extends FASTElement {
16
+ /**
17
+ * Holds a reference to the platform to manage ctrl+click on Windows and cmd+click on Mac
18
+ * @internal
19
+ */
20
+ private readonly isMac;
21
+ /**
22
+ * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
23
+ *
24
+ * @internal
25
+ */
26
+ elementInternals: ElementInternals;
27
+ /**
28
+ * The proxy anchor element
29
+ * @internal
30
+ */
31
+ private internalProxyAnchor;
32
+ /**
33
+ * Prompts the user to save the linked URL.
34
+ *
35
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/a#download | `download`} attribute
36
+ *
37
+ * @public
38
+ * @remarks
39
+ * HTML Attribute: `download`
40
+ */
41
+ download?: string;
42
+ /**
43
+ * The URL the hyperlink references.
44
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/a#href | `href`} attribute
45
+ *
46
+ * @public
47
+ * @remarks
48
+ * HTML Attribute: `href`
49
+ */
50
+ href?: string;
51
+ /**
52
+ * Hints at the language of the referenced resource.
53
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/a#hreflang | `hreflang`} attribute
54
+ *
55
+ * @public
56
+ * @remarks
57
+ * HTML Attribute: `hreflang`
58
+ */
59
+ hreflang?: string;
60
+ /**
61
+ * The ping attribute.
62
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/a#ping | `ping`} attribute
63
+ *
64
+ * @public
65
+ * @remarks
66
+ * HTML Attribute: `ping`
67
+ */
68
+ ping?: string;
69
+ /**
70
+ * The referrerpolicy attribute.
71
+ * See The {@link https://developer.mozilla.org/docs/Web/HTML/Element/a#referrerpolicy | `referrerpolicy`} attribute
72
+ *
73
+ * @public
74
+ * @remarks
75
+ * HTML Attribute: `referrerpolicy`
76
+ */
77
+ referrerpolicy?: string;
78
+ /**
79
+ * The rel attribute.
80
+ * See The {@link https://developer.mozilla.org/docs/Web/HTML/Element/a#rel | `rel`} attribute
81
+ *
82
+ * @public
83
+ * @remarks
84
+ * HTML Attribute: `rel`
85
+ */
86
+ rel: string;
87
+ /**
88
+ * The target attribute.
89
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/a#target | `target`} attribute
90
+ *
91
+ * @public
92
+ * @remarks
93
+ * HTML Attribute: `target`
94
+ */
95
+ target?: AnchorTarget;
96
+ /**
97
+ * The type attribute.
98
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/a#type | `type`} attribute
99
+ *
100
+ * @public
101
+ * @remarks
102
+ * HTML Attribute: `type`
103
+ */
104
+ type?: string;
105
+ constructor();
106
+ connectedCallback(): void;
107
+ disconnectedCallback(): void;
108
+ /**
109
+ * Handles changes to observable properties
110
+ * @internal
111
+ * @param source - the source of the change
112
+ * @param propertyName - the property name being changed
113
+ */
114
+ handleChange(source: any, propertyName: string): void;
115
+ /**
116
+ * Handles the anchor click event.
117
+ *
118
+ * @param e - The event object
119
+ * @internal
120
+ */
121
+ clickHandler(e: PointerEvent): boolean;
122
+ /**
123
+ * Handles keydown events for the anchor.
124
+ *
125
+ * @param e - the keyboard event
126
+ * @returns - the return value of the click handler
127
+ * @public
128
+ */
129
+ keydownHandler(e: KeyboardEvent): boolean | void;
130
+ /**
131
+ * Handles navigation based on input
132
+ * If the metaKey is pressed, opens the href in a new window, if false, uses the click on the proxy
133
+ * @internal
134
+ */
135
+ private handleNavigation;
136
+ /**
137
+ * A method for updating proxy attributes when attributes have changed
138
+ * @internal
139
+ * @param attribute - an attribute to set/remove
140
+ * @param value - the value of the attribute
141
+ */
142
+ private handleProxyAttributeChange;
143
+ private createProxyElement;
144
+ }
@@ -1,154 +1,12 @@
1
- import { FASTElement } from '@microsoft/fast-element';
2
1
  import type { StartEndOptions } from '../patterns/index.js';
3
2
  import { StartEnd } from '../patterns/index.js';
4
- import { AnchorButtonAppearance, AnchorButtonShape, AnchorButtonSize, type AnchorTarget } from './anchor-button.options.js';
3
+ import { BaseAnchor } from './anchor-button.base.js';
4
+ import { AnchorButtonAppearance, AnchorButtonShape, AnchorButtonSize } from './anchor-button.options.js';
5
5
  /**
6
6
  * Anchor configuration options
7
7
  * @public
8
8
  */
9
9
  export type AnchorOptions = StartEndOptions<AnchorButton>;
10
- /**
11
- * An Anchor Custom HTML Element.
12
- * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element }.
13
- *
14
- * @slot start - Content which can be provided before the anchor content
15
- * @slot end - Content which can be provided after the anchor content
16
- * @slot - The default slot for anchor content
17
- * @csspart control - The anchor element
18
- * @csspart content - The element wrapping anchor content
19
- *
20
- * @public
21
- */
22
- export declare class BaseAnchor extends FASTElement {
23
- /**
24
- * Holds a reference to the platform to manage ctrl+click on Windows and cmd+click on Mac
25
- * @internal
26
- */
27
- private readonly isMac;
28
- /**
29
- * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
30
- *
31
- * @internal
32
- */
33
- elementInternals: ElementInternals;
34
- /**
35
- * The proxy anchor element
36
- * @internal
37
- */
38
- private internalProxyAnchor;
39
- /**
40
- * Prompts the user to save the linked URL.
41
- *
42
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/a#download | `download`} attribute
43
- *
44
- * @public
45
- * @remarks
46
- * HTML Attribute: `download`
47
- */
48
- download?: string;
49
- /**
50
- * The URL the hyperlink references.
51
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/a#href | `href`} attribute
52
- *
53
- * @public
54
- * @remarks
55
- * HTML Attribute: `href`
56
- */
57
- href?: string;
58
- /**
59
- * Hints at the language of the referenced resource.
60
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/a#hreflang | `hreflang`} attribute
61
- *
62
- * @public
63
- * @remarks
64
- * HTML Attribute: `hreflang`
65
- */
66
- hreflang?: string;
67
- /**
68
- * The ping attribute.
69
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/a#ping | `ping`} attribute
70
- *
71
- * @public
72
- * @remarks
73
- * HTML Attribute: `ping`
74
- */
75
- ping?: string;
76
- /**
77
- * The referrerpolicy attribute.
78
- * See The {@link https://developer.mozilla.org/docs/Web/HTML/Element/a#referrerpolicy | `referrerpolicy`} attribute
79
- *
80
- * @public
81
- * @remarks
82
- * HTML Attribute: `referrerpolicy`
83
- */
84
- referrerpolicy?: string;
85
- /**
86
- * The rel attribute.
87
- * See The {@link https://developer.mozilla.org/docs/Web/HTML/Element/a#rel | `rel`} attribute
88
- *
89
- * @public
90
- * @remarks
91
- * HTML Attribute: `rel`
92
- */
93
- rel: string;
94
- /**
95
- * The target attribute.
96
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/a#target | `target`} attribute
97
- *
98
- * @public
99
- * @remarks
100
- * HTML Attribute: `target`
101
- */
102
- target?: AnchorTarget;
103
- /**
104
- * The type attribute.
105
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/a#type | `type`} attribute
106
- *
107
- * @public
108
- * @remarks
109
- * HTML Attribute: `type`
110
- */
111
- type?: string;
112
- constructor();
113
- connectedCallback(): void;
114
- disconnectedCallback(): void;
115
- /**
116
- * Handles changes to observable properties
117
- * @internal
118
- * @param source - the source of the change
119
- * @param propertyName - the property name being changed
120
- */
121
- handleChange(source: any, propertyName: string): void;
122
- /**
123
- * Handles the anchor click event.
124
- *
125
- * @param e - The event object
126
- * @internal
127
- */
128
- clickHandler(e: PointerEvent): boolean;
129
- /**
130
- * Handles keydown events for the anchor.
131
- *
132
- * @param e - the keyboard event
133
- * @returns - the return value of the click handler
134
- * @public
135
- */
136
- keydownHandler(e: KeyboardEvent): boolean | void;
137
- /**
138
- * Handles navigation based on input
139
- * If the metaKey is pressed, opens the href in a new window, if false, uses the click on the proxy
140
- * @internal
141
- */
142
- private handleNavigation;
143
- /**
144
- * A method for updating proxy attributes when attributes have changed
145
- * @internal
146
- * @param attribute - an attribute to set/remove
147
- * @param value - the value of the attribute
148
- */
149
- private handleProxyAttributeChange;
150
- private createProxyElement;
151
- }
152
10
  /**
153
11
  * An Anchor Custom HTML Element.
154
12
  * Based on BaseAnchor and includes style and layout specific attributes
@@ -1,5 +1,6 @@
1
1
  export { definition as AnchorButtonDefinition } from './anchor-button.definition.js';
2
- export { BaseAnchor, AnchorButton } from './anchor-button.js';
2
+ export { BaseAnchor } from './anchor-button.base.js';
3
+ export { AnchorButton } from './anchor-button.js';
3
4
  export { AnchorButtonAppearance, AnchorButtonShape, AnchorButtonSize, AnchorTarget } from './anchor-button.options.js';
4
5
  export type { AnchorButtonOptions } from './anchor-button.options.js';
5
6
  export { template as AnchorButtonTemplate } from './anchor-button.template.js';
@@ -0,0 +1,42 @@
1
+ import { FASTElement } from '@microsoft/fast-element';
2
+ import { type AvatarActive } from './avatar.options.js';
3
+ /**
4
+ * The base class used for constructing a fluent-avatar custom element
5
+ * @public
6
+ */
7
+ export declare class BaseAvatar extends FASTElement {
8
+ /**
9
+ * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
10
+ *
11
+ * @internal
12
+ */
13
+ elementInternals: ElementInternals;
14
+ /**
15
+ * The name of the person or entity represented by this Avatar. This should always be provided if it is available.
16
+ *
17
+ * @public
18
+ * @remarks
19
+ * HTML Attribute: name
20
+ */
21
+ name?: string | undefined;
22
+ /**
23
+ * Provide custom initials rather than one generated via the name
24
+ *
25
+ * @public
26
+ * @remarks
27
+ * HTML Attribute: name
28
+ */
29
+ initials?: string | undefined;
30
+ /**
31
+ * Optional activity indicator
32
+ * * active: the avatar will be decorated according to activeAppearance
33
+ * * inactive: the avatar will be reduced in size and partially transparent
34
+ * * undefined: normal display
35
+ *
36
+ * @public
37
+ * @remarks
38
+ * HTML Attribute: active
39
+ */
40
+ active?: AvatarActive | undefined;
41
+ constructor();
42
+ }
@@ -1,45 +1,5 @@
1
- import { FASTElement } from '@microsoft/fast-element';
2
- import { type AvatarActive, type AvatarAppearance, AvatarColor, AvatarNamedColor, type AvatarShape, type AvatarSize } from './avatar.options.js';
3
- /**
4
- * The base class used for constructing a fluent-avatar custom element
5
- * @public
6
- */
7
- export declare class BaseAvatar extends FASTElement {
8
- /**
9
- * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
10
- *
11
- * @internal
12
- */
13
- elementInternals: ElementInternals;
14
- /**
15
- * The name of the person or entity represented by this Avatar. This should always be provided if it is available.
16
- *
17
- * @public
18
- * @remarks
19
- * HTML Attribute: name
20
- */
21
- name?: string | undefined;
22
- /**
23
- * Provide custom initials rather than one generated via the name
24
- *
25
- * @public
26
- * @remarks
27
- * HTML Attribute: name
28
- */
29
- initials?: string | undefined;
30
- /**
31
- * Optional activity indicator
32
- * * active: the avatar will be decorated according to activeAppearance
33
- * * inactive: the avatar will be reduced in size and partially transparent
34
- * * undefined: normal display
35
- *
36
- * @public
37
- * @remarks
38
- * HTML Attribute: active
39
- */
40
- active?: AvatarActive | undefined;
41
- constructor();
42
- }
1
+ import { BaseAvatar } from './avatar.base.js';
2
+ import { type AvatarAppearance, AvatarColor, AvatarNamedColor, type AvatarShape, type AvatarSize } from './avatar.options.js';
43
3
  /**
44
4
  * An Avatar Custom HTML Element.
45
5
  * Based on BaseAvatar and includes style and layout specific attributes
@@ -1,4 +1,5 @@
1
- export { BaseAvatar, Avatar } from './avatar.js';
1
+ export { Avatar } from './avatar.js';
2
+ export { BaseAvatar } from './avatar.base.js';
2
3
  export { AvatarActive, AvatarAppearance, AvatarColor, AvatarNamedColor, AvatarShape, AvatarSize, } from './avatar.options.js';
3
4
  export { template as AvatarTemplate } from './avatar.template.js';
4
5
  export { styles as AvatarStyles } from './avatar.styles.js';