@fluentui/web-components 3.0.0-beta.89 → 3.0.0-beta.90

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 (128) hide show
  1. package/CHANGELOG.md +12 -2
  2. package/dist/dts/accordion-item/accordion-item.base.d.ts +0 -12
  3. package/dist/dts/accordion-item/accordion-item.d.ts +0 -18
  4. package/dist/dts/avatar/avatar.base.d.ts +0 -12
  5. package/dist/dts/avatar/avatar.d.ts +13 -2
  6. package/dist/dts/badge/badge.d.ts +0 -30
  7. package/dist/dts/button/button.d.ts +0 -24
  8. package/dist/dts/checkbox/checkbox.d.ts +0 -16
  9. package/dist/dts/counter-badge/counter-badge.d.ts +0 -30
  10. package/dist/dts/divider/divider.d.ts +0 -18
  11. package/dist/dts/dropdown/dropdown.d.ts +0 -16
  12. package/dist/dts/image/image.d.ts +0 -36
  13. package/dist/dts/label/label.d.ts +0 -24
  14. package/dist/dts/link/link.d.ts +0 -12
  15. package/dist/dts/message-bar/message-bar.d.ts +0 -18
  16. package/dist/dts/progress-bar/progress-bar.d.ts +0 -12
  17. package/dist/dts/rating-display/rating-display.d.ts +0 -14
  18. package/dist/dts/slider/slider.d.ts +0 -1
  19. package/dist/dts/spinner/spinner.d.ts +0 -12
  20. package/dist/dts/styles/states/index.d.ts +0 -500
  21. package/dist/dts/tablist/tablist.d.ts +0 -8
  22. package/dist/dts/text/text.d.ts +1 -34
  23. package/dist/dts/text-input/text-input.d.ts +0 -12
  24. package/dist/dts/textarea/textarea.d.ts +0 -4
  25. package/dist/dts/tree-item/tree-item.d.ts +1 -1
  26. package/dist/esm/accordion-item/accordion-item.base.js +0 -17
  27. package/dist/esm/accordion-item/accordion-item.base.js.map +1 -1
  28. package/dist/esm/accordion-item/accordion-item.js +0 -26
  29. package/dist/esm/accordion-item/accordion-item.js.map +1 -1
  30. package/dist/esm/accordion-item/accordion-item.styles.js +19 -20
  31. package/dist/esm/accordion-item/accordion-item.styles.js.map +1 -1
  32. package/dist/esm/avatar/avatar.base.js +0 -3
  33. package/dist/esm/avatar/avatar.base.js.map +1 -1
  34. package/dist/esm/avatar/avatar.js +4 -2
  35. package/dist/esm/avatar/avatar.js.map +1 -1
  36. package/dist/esm/avatar/avatar.styles.js +31 -32
  37. package/dist/esm/avatar/avatar.styles.js.map +1 -1
  38. package/dist/esm/badge/badge.js +1 -40
  39. package/dist/esm/badge/badge.js.map +1 -1
  40. package/dist/esm/badge/badge.styles.js +7 -10
  41. package/dist/esm/badge/badge.styles.js.map +1 -1
  42. package/dist/esm/button/button.js +0 -34
  43. package/dist/esm/button/button.js.map +1 -1
  44. package/dist/esm/button/button.styles.js +34 -35
  45. package/dist/esm/button/button.styles.js.map +1 -1
  46. package/dist/esm/checkbox/checkbox.js +1 -22
  47. package/dist/esm/checkbox/checkbox.js.map +1 -1
  48. package/dist/esm/checkbox/checkbox.styles.js +6 -6
  49. package/dist/esm/checkbox/checkbox.styles.js.map +1 -1
  50. package/dist/esm/compound-button/compound-button.styles.js +12 -13
  51. package/dist/esm/compound-button/compound-button.styles.js.map +1 -1
  52. package/dist/esm/counter-badge/counter-badge.js +0 -42
  53. package/dist/esm/counter-badge/counter-badge.js.map +1 -1
  54. package/dist/esm/counter-badge/counter-badge.styles.js +3 -7
  55. package/dist/esm/counter-badge/counter-badge.styles.js.map +1 -1
  56. package/dist/esm/divider/divider.js +0 -26
  57. package/dist/esm/divider/divider.js.map +1 -1
  58. package/dist/esm/divider/divider.styles.js +32 -35
  59. package/dist/esm/divider/divider.styles.js.map +1 -1
  60. package/dist/esm/dropdown/dropdown.js +1 -22
  61. package/dist/esm/dropdown/dropdown.js.map +1 -1
  62. package/dist/esm/dropdown/dropdown.styles.js +18 -18
  63. package/dist/esm/dropdown/dropdown.styles.js.map +1 -1
  64. package/dist/esm/image/image.js +0 -51
  65. package/dist/esm/image/image.js.map +1 -1
  66. package/dist/esm/image/image.styles.js +9 -10
  67. package/dist/esm/image/image.styles.js.map +1 -1
  68. package/dist/esm/label/label.js +0 -32
  69. package/dist/esm/label/label.js.map +1 -1
  70. package/dist/esm/label/label.styles.js +5 -6
  71. package/dist/esm/label/label.styles.js.map +1 -1
  72. package/dist/esm/link/link.js +0 -18
  73. package/dist/esm/link/link.js.map +1 -1
  74. package/dist/esm/link/link.styles.js +4 -5
  75. package/dist/esm/link/link.styles.js.map +1 -1
  76. package/dist/esm/message-bar/message-bar.js +0 -26
  77. package/dist/esm/message-bar/message-bar.js.map +1 -1
  78. package/dist/esm/message-bar/message-bar.styles.js +9 -10
  79. package/dist/esm/message-bar/message-bar.styles.js.map +1 -1
  80. package/dist/esm/progress-bar/progress-bar.js +0 -18
  81. package/dist/esm/progress-bar/progress-bar.js.map +1 -1
  82. package/dist/esm/progress-bar/progress-bar.styles.js +6 -7
  83. package/dist/esm/progress-bar/progress-bar.styles.js.map +1 -1
  84. package/dist/esm/radio-group/radio-group.styles.js +0 -1
  85. package/dist/esm/radio-group/radio-group.styles.js.map +1 -1
  86. package/dist/esm/rating-display/rating-display.js +0 -20
  87. package/dist/esm/rating-display/rating-display.js.map +1 -1
  88. package/dist/esm/rating-display/rating-display.styles.js +16 -19
  89. package/dist/esm/rating-display/rating-display.styles.js.map +1 -1
  90. package/dist/esm/slider/slider.js +1 -6
  91. package/dist/esm/slider/slider.js.map +1 -1
  92. package/dist/esm/slider/slider.styles.js +6 -7
  93. package/dist/esm/slider/slider.styles.js.map +1 -1
  94. package/dist/esm/spinner/spinner.js +0 -18
  95. package/dist/esm/spinner/spinner.js.map +1 -1
  96. package/dist/esm/spinner/spinner.styles.js +8 -9
  97. package/dist/esm/spinner/spinner.styles.js.map +1 -1
  98. package/dist/esm/styles/partials/badge.partials.js +42 -43
  99. package/dist/esm/styles/partials/badge.partials.js.map +1 -1
  100. package/dist/esm/styles/states/index.js +0 -500
  101. package/dist/esm/styles/states/index.js.map +1 -1
  102. package/dist/esm/tablist/tablist.js +1 -14
  103. package/dist/esm/tablist/tablist.js.map +1 -1
  104. package/dist/esm/tablist/tablist.styles.js +26 -27
  105. package/dist/esm/tablist/tablist.styles.js.map +1 -1
  106. package/dist/esm/text/text.js +1 -66
  107. package/dist/esm/text/text.js.map +1 -1
  108. package/dist/esm/text/text.styles.js +26 -27
  109. package/dist/esm/text/text.styles.js.map +1 -1
  110. package/dist/esm/text-input/text-input.js +0 -18
  111. package/dist/esm/text-input/text-input.js.map +1 -1
  112. package/dist/esm/text-input/text-input.styles.js +22 -23
  113. package/dist/esm/text-input/text-input.styles.js.map +1 -1
  114. package/dist/esm/textarea/textarea.js +1 -29
  115. package/dist/esm/textarea/textarea.js.map +1 -1
  116. package/dist/esm/textarea/textarea.styles.js +14 -14
  117. package/dist/esm/textarea/textarea.styles.js.map +1 -1
  118. package/dist/esm/toggle-button/toggle-button.styles.js +19 -20
  119. package/dist/esm/toggle-button/toggle-button.styles.js.map +1 -1
  120. package/dist/esm/tree-item/tree-item.js +1 -1
  121. package/dist/esm/tree-item/tree-item.js.map +1 -1
  122. package/dist/esm/tree-item/tree-item.styles.js.map +1 -1
  123. package/dist/esm/tree-item/tree-item.template.js +1 -1
  124. package/dist/esm/tree-item/tree-item.template.js.map +1 -1
  125. package/dist/web-components.d.ts +13 -363
  126. package/dist/web-components.js +178 -987
  127. package/dist/web-components.min.js +357 -354
  128. package/package.json +1 -1
@@ -1,7 +1,5 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { attr } from '@microsoft/fast-element';
3
- import { swapStates, toggleState } from '../utils/element-internals.js';
4
- import { DividerAlignContent, DividerAppearance } from './divider.options.js';
5
3
  import { BaseDivider } from './divider.base.js';
6
4
  /**
7
5
  * A Divider Custom HTML Element.
@@ -10,30 +8,6 @@ import { BaseDivider } from './divider.base.js';
10
8
  * @public
11
9
  */
12
10
  export class Divider extends BaseDivider {
13
- /**
14
- * Handles changes to align-content attribute custom states
15
- * @param prev - the previous state
16
- * @param next - the next state
17
- */
18
- alignContentChanged(prev, next) {
19
- swapStates(this.elementInternals, prev, next, DividerAlignContent, 'align-');
20
- }
21
- /**
22
- * Handles changes to appearance attribute custom states
23
- * @param prev - the previous state
24
- * @param next - the next state
25
- */
26
- appearanceChanged(prev, next) {
27
- swapStates(this.elementInternals, prev, next, DividerAppearance);
28
- }
29
- /**
30
- * Handles changes to inset custom states
31
- * @param prev - the previous state
32
- * @param next - the next state
33
- */
34
- insetChanged(prev, next) {
35
- toggleState(this.elementInternals, 'inset', next);
36
- }
37
11
  }
38
12
  __decorate([
39
13
  attr({ attribute: 'align-content' })
@@ -1 +1 @@
1
- {"version":3,"file":"divider.js","sourceRoot":"","sources":["../../../src/divider/divider.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAStC;;;;OAIG;IACI,mBAAmB,CAAC,IAAqC,EAAE,IAAqC;QACrG,UAAU,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,EAAE,IAAI,EAAE,mBAAmB,EAAE,QAAQ,CAAC,CAAC;IAC/E,CAAC;IAUD;;;;OAIG;IACI,iBAAiB,CAAC,IAAmC,EAAE,IAAmC;QAC/F,UAAU,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,EAAE,IAAI,EAAE,iBAAiB,CAAC,CAAC;IACnE,CAAC;IAUD;;;;OAIG;IACI,YAAY,CAAC,IAAa,EAAE,IAAa;QAC9C,WAAW,CAAC,IAAI,CAAC,gBAAgB,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACpD,CAAC;CACF;AA5CQ;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;6CACK;AAiBnC;IADN,IAAI;2CACiC;AAiB/B;IADN,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;sCACH"}
1
+ {"version":3,"file":"divider.js","sourceRoot":"","sources":["../../../src/divider/divider.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;CAwBvC;AAjBQ;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;6CACK;AAQnC;IADN,IAAI;2CACiC;AAQ/B;IADN,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;sCACH"}
@@ -1,7 +1,6 @@
1
1
  import { css } from '@microsoft/fast-element';
2
2
  import { display, forcedColorsStylesheetBehavior } from '../utils/index.js';
3
3
  import { colorBrandForeground1, colorBrandStroke1, colorNeutralForeground1, colorNeutralForeground2, colorNeutralForeground3, colorNeutralStroke1, colorNeutralStroke2, colorNeutralStroke3, fontFamilyBase, fontSizeBase200, fontWeightRegular, strokeWidthThin, } from '../theme/design-tokens.js';
4
- import { alignEndState, alignStartState, brandState, insetState, strongState, subtleState, verticalState, } from '../styles/states/index.js';
5
4
  /** Divider styles
6
5
  * @public
7
6
  */
@@ -23,7 +22,7 @@ export const styles = css `
23
22
  height: ${strokeWidthThin};
24
23
  }
25
24
 
26
- :host(${insetState}) {
25
+ :host([inset]) {
27
26
  padding: 0 12px;
28
27
  }
29
28
 
@@ -36,89 +35,87 @@ export const styles = css `
36
35
  padding: 0 12px;
37
36
  }
38
37
 
39
- :host(${alignStartState})::before,
40
- :host(${alignEndState})::after {
38
+ :host([align-content='start'])::before,
39
+ :host([align-content='end'])::after {
41
40
  flex-basis: 12px;
42
41
  flex-grow: 0;
43
42
  flex-shrink: 0;
44
43
  }
45
44
 
46
- :host(${verticalState}) {
45
+ :host([orientation='vertical']) {
46
+ align-items: center;
47
+ flex-direction: column;
47
48
  height: 100%;
48
49
  min-height: 84px;
49
50
  }
50
- :host(${verticalState}):empty {
51
- min-height: 20px;
52
- }
53
51
 
54
- :host(${verticalState}) {
55
- flex-direction: column;
56
- align-items: center;
52
+ :host([orientation='vertical']):empty {
53
+ min-height: 20px;
57
54
  }
58
55
 
59
- :host(${verticalState}${insetState})::before {
56
+ :host([orientation='vertical'][inset])::before {
60
57
  margin-top: 12px;
61
58
  }
62
- :host(${verticalState}${insetState})::after {
59
+ :host([orientation='vertical'][inset])::after {
63
60
  margin-bottom: 12px;
64
61
  }
65
62
 
66
- :host(${verticalState}):empty::before,
67
- :host(${verticalState}):empty::after {
63
+ :host([orientation='vertical']):empty::before,
64
+ :host([orientation='vertical']):empty::after {
68
65
  height: 10px;
69
66
  min-height: 10px;
70
67
  flex-grow: 0;
71
68
  }
72
69
 
73
- :host(${verticalState})::before,
74
- :host(${verticalState})::after {
70
+ :host([orientation='vertical'])::before,
71
+ :host([orientation='vertical'])::after {
75
72
  width: ${strokeWidthThin};
76
73
  min-height: 20px;
77
74
  height: 100%;
78
75
  }
79
76
 
80
- :host(${verticalState}) ::slotted(*) {
77
+ :host([orientation='vertical']) ::slotted(*) {
81
78
  display: flex;
82
79
  flex-direction: column;
83
80
  padding: 12px 0;
84
81
  line-height: 20px;
85
82
  }
86
83
 
87
- :host(${verticalState}${alignStartState})::before {
84
+ :host([orientation='vertical'][align-content='start'])::before {
88
85
  min-height: 8px;
89
86
  }
90
- :host(${verticalState}${alignEndState})::after {
87
+ :host([orientation='vertical'][align-content='end'])::after {
91
88
  min-height: 8px;
92
89
  }
93
90
 
94
- :host(${strongState})::before,
95
- :host(${strongState})::after {
91
+ :host([appearance='strong'])::before,
92
+ :host([appearance='strong'])::after {
96
93
  background: ${colorNeutralStroke1};
97
94
  }
98
- :host(${strongState}) ::slotted(*) {
95
+ :host([appearance='strong']) ::slotted(*) {
99
96
  color: ${colorNeutralForeground1};
100
97
  }
101
- :host(${brandState})::before,
102
- :host(${brandState})::after {
98
+ :host([appearance='brand'])::before,
99
+ :host([appearance='brand'])::after {
103
100
  background: ${colorBrandStroke1};
104
101
  }
105
- :host(${brandState}) ::slotted(*) {
102
+ :host([appearance='brand']) ::slotted(*) {
106
103
  color: ${colorBrandForeground1};
107
104
  }
108
- :host(${subtleState})::before,
109
- :host(${subtleState})::after {
105
+ :host([appearance='subtle'])::before,
106
+ :host([appearance='subtle'])::after {
110
107
  background: ${colorNeutralStroke3};
111
108
  }
112
- :host(${subtleState}) ::slotted(*) {
109
+ :host([appearance='subtle']) ::slotted(*) {
113
110
  color: ${colorNeutralForeground3};
114
111
  }
115
112
  `.withBehaviors(forcedColorsStylesheetBehavior(css `
116
- :host(${strongState})::before,
117
- :host(${strongState})::after,
118
- :host(${brandState})::before,
119
- :host(${brandState})::after,
120
- :host(${subtleState})::before,
121
- :host(${subtleState})::after,
113
+ :host([appearance='strong'])::before,
114
+ :host([appearance='strong'])::after,
115
+ :host([appearance='brand'])::before,
116
+ :host([appearance='brand'])::after,
117
+ :host([appearance='subtle'])::before,
118
+ :host([appearance='subtle'])::after,
122
119
  :host::after,
123
120
  :host::before {
124
121
  background: WindowText;
@@ -1 +1 @@
1
- {"version":3,"file":"divider.styles.js","sourceRoot":"","sources":["../../../src/divider/divider.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,eAAe,GAChB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,aAAa,EACb,eAAe,EACf,UAAU,EACV,UAAU,EACV,WAAW,EACX,WAAW,EACX,aAAa,GACd,MAAM,2BAA2B,CAAC;AAEnC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;IACrB,OAAO,CAAC,MAAM,CAAC;;;;;;;;;kBASD,mBAAmB;;;;;cAKvB,eAAe;;;UAGnB,UAAU;;;;;aAKP,uBAAuB;mBACjB,cAAc;iBAChB,eAAe;mBACb,iBAAiB;;;;;UAK1B,eAAe;UACf,aAAa;;;;;;UAMb,aAAa;;;;UAIb,aAAa;;;;UAIb,aAAa;;;;;UAKb,aAAa,GAAG,UAAU;;;UAG1B,aAAa,GAAG,UAAU;;;;UAI1B,aAAa;UACb,aAAa;;;;;;UAMb,aAAa;UACb,aAAa;aACV,eAAe;;;;;UAKlB,aAAa;;;;;;;UAOb,aAAa,GAAG,eAAe;;;UAG/B,aAAa,GAAG,aAAa;;;;UAI7B,WAAW;UACX,WAAW;kBACH,mBAAmB;;UAE3B,WAAW;aACR,uBAAuB;;UAE1B,UAAU;UACV,UAAU;kBACF,iBAAiB;;UAEzB,UAAU;aACP,qBAAqB;;UAExB,WAAW;UACX,WAAW;kBACH,mBAAmB;;UAE3B,WAAW;aACR,uBAAuB;;CAEnC,CAAC,aAAa,CACb,8BAA8B,CAAC,GAAG,CAAA;YACxB,WAAW;YACX,WAAW;YACX,UAAU;YACV,UAAU;YACV,WAAW;YACX,WAAW;;;;;;GAMpB,CAAC,CACH,CAAC"}
1
+ {"version":3,"file":"divider.styles.js","sourceRoot":"","sources":["../../../src/divider/divider.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,eAAe,GAChB,MAAM,2BAA2B,CAAC;AAEnC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;IACrB,OAAO,CAAC,MAAM,CAAC;;;;;;;;;kBASD,mBAAmB;;;;;cAKvB,eAAe;;;;;;;;aAQhB,uBAAuB;mBACjB,cAAc;iBAChB,eAAe;mBACb,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAuCvB,eAAe;;;;;;;;;;;;;;;;;;;;;kBAqBV,mBAAmB;;;aAGxB,uBAAuB;;;;kBAIlB,iBAAiB;;;aAGtB,qBAAqB;;;;kBAIhB,mBAAmB;;;aAGxB,uBAAuB;;CAEnC,CAAC,aAAa,CACb,8BAA8B,CAAC,GAAG,CAAA;;;;;;;;;;;;GAYjC,CAAC,CACH,CAAC"}
@@ -1,8 +1,7 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { attr } from '@microsoft/fast-element';
3
- import { swapStates } from '../utils/element-internals.js';
4
3
  import { BaseDropdown } from './dropdown.base.js';
5
- import { DropdownAppearance, DropdownSize } from './dropdown.options.js';
4
+ import { DropdownAppearance } from './dropdown.options.js';
6
5
  /**
7
6
  * The Fluent Dropdown Element. Implements {@link @microsoft/fast-foundation#BaseDropdown}.
8
7
  *
@@ -24,26 +23,6 @@ export class Dropdown extends BaseDropdown {
24
23
  */
25
24
  this.appearance = DropdownAppearance.outline;
26
25
  }
27
- /**
28
- * Swaps appearance states when the appearance property changes.
29
- *
30
- * @param prev - the previous appearance state
31
- * @param next - the current appearance state
32
- * @internal
33
- */
34
- appearanceChanged(prev, next) {
35
- swapStates(this.elementInternals, prev, next, DropdownAppearance);
36
- }
37
- /**
38
- * Swaps size states when the size property changes.
39
- *
40
- * @param prev - the previous size state
41
- * @param next - the current size state
42
- * @internal
43
- */
44
- sizeChanged(prev, next) {
45
- swapStates(this.elementInternals, prev, next, DropdownSize);
46
- }
47
26
  }
48
27
  __decorate([
49
28
  attr
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.js","sourceRoot":"","sources":["../../../src/dropdown/dropdown.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEzE;;;;;;;;GAQG;AACH,MAAM,OAAO,QAAS,SAAQ,YAAY;IAA1C;;QACE;;;;;;WAMG;QAEI,eAAU,GAAuB,kBAAkB,CAAC,OAAO,CAAC;IAgCrE,CAAC;IA9BC;;;;;;OAMG;IACI,iBAAiB,CAAC,IAAoC,EAAE,IAAoC;QACjG,UAAU,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,EAAE,IAAI,EAAE,kBAAkB,CAAC,CAAC;IACpE,CAAC;IAWD;;;;;;OAMG;IACI,WAAW,CAAC,IAA8B,EAAE,IAA8B;QAC/E,UAAU,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC;IAC9D,CAAC;CACF;AAhCQ;IADN,IAAI;4CAC8D;AAoB5D;IADN,IAAI;sCACsB"}
1
+ {"version":3,"file":"dropdown.js","sourceRoot":"","sources":["../../../src/dropdown/dropdown.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAgB,MAAM,uBAAuB,CAAC;AAEzE;;;;;;;;GAQG;AACH,MAAM,OAAO,QAAS,SAAQ,YAAY;IAA1C;;QACE;;;;;;WAMG;QAEI,eAAU,GAAuB,kBAAkB,CAAC,OAAO,CAAC;IAUrE,CAAC;CAAA;AAVQ;IADN,IAAI;4CAC8D;AAS5D;IADN,IAAI;sCACsB"}
@@ -1,6 +1,6 @@
1
1
  import { css } from '@microsoft/fast-element';
2
2
  import { typographyBody1Styles, typographyBody2Styles, typographyCaption1Styles, } from '../styles/partials/typography.partials.js';
3
- import { filledDarkerState, filledLighterState, flipBlockState, largeState, openState, outlineState, placeholderShownState, smallState, transparentState, } from '../styles/states/index.js';
3
+ import { flipBlockState, openState, placeholderShownState } from '../styles/states/index.js';
4
4
  import { borderRadiusMedium, borderRadiusNone, colorCompoundBrandBackgroundHover, colorCompoundBrandBackgroundPressed, colorCompoundBrandStroke, colorNeutralBackground1, colorNeutralBackground3, colorNeutralBackgroundDisabled, colorNeutralForeground1, colorNeutralForeground3, colorNeutralForeground4, colorNeutralForegroundDisabled, colorNeutralStroke1, colorNeutralStroke1Hover, colorNeutralStroke1Pressed, colorNeutralStrokeAccessible, colorNeutralStrokeAccessibleHover, colorNeutralStrokeAccessiblePressed, colorNeutralStrokeDisabled, colorTransparentBackground, colorTransparentStroke, colorTransparentStrokeInteractive, curveAccelerateMid, curveDecelerateMid, durationNormal, durationUltraFast, lineHeightBase200, lineHeightBase300, lineHeightBase400, spacingHorizontalM, spacingHorizontalMNudge, spacingHorizontalS, spacingHorizontalSNudge, spacingHorizontalXXS, spacingVerticalS, spacingVerticalSNudge, spacingVerticalXS, strokeWidthThick, strokeWidthThin, } from '../theme/design-tokens.js';
5
5
  import { display } from '../utils/display.js';
6
6
  /**
@@ -43,13 +43,13 @@ export const styles = css `
43
43
  ${typographyBody1Styles}
44
44
  }
45
45
 
46
- :host(${smallState}) .control {
46
+ :host([size='small']) .control {
47
47
  column-gap: ${spacingHorizontalXXS};
48
48
  padding: ${spacingVerticalXS} ${spacingHorizontalSNudge};
49
49
  ${typographyCaption1Styles}
50
50
  }
51
51
 
52
- :host(${largeState}) .control {
52
+ :host([size='large']) .control {
53
53
  column-gap: ${spacingHorizontalS};
54
54
  padding: ${spacingVerticalS} ${spacingHorizontalM};
55
55
  ${typographyBody2Styles}
@@ -79,11 +79,11 @@ export const styles = css `
79
79
  width: 20px;
80
80
  }
81
81
 
82
- :host(${smallState}) :where(slot[name='indicator'] > *, ::slotted([slot='indicator'])) {
82
+ :host([size='small']) :where(slot[name='indicator'] > *, ::slotted([slot='indicator'])) {
83
83
  width: 16px;
84
84
  }
85
85
 
86
- :host(${largeState}) :where(slot[name='indicator'] > *, ::slotted([slot='indicator'])) {
86
+ :host([size='large']) :where(slot[name='indicator'] > *, ::slotted([slot='indicator'])) {
87
87
  width: 24px;
88
88
  }
89
89
 
@@ -112,49 +112,49 @@ export const styles = css `
112
112
  transition-timing-function: ${curveAccelerateMid};
113
113
  }
114
114
 
115
- :host(:where(${outlineState}, ${transparentState})) .control::before {
115
+ :host(:where([appearance='outline'], [appearance='transparent'])) .control::before {
116
116
  background-color: ${colorNeutralStrokeAccessible};
117
117
  }
118
118
 
119
- :host(${transparentState}) .control {
119
+ :host([appearance='transparent']) .control {
120
120
  --control-border-color: ${colorTransparentStrokeInteractive};
121
121
  background-color: ${colorTransparentBackground};
122
122
  border-radius: ${borderRadiusNone};
123
123
  }
124
124
 
125
- :host(${outlineState}) .control {
125
+ :host([appearance='outline']) .control {
126
126
  --control-border-color: ${colorNeutralStroke1};
127
127
  }
128
128
 
129
- :host(${outlineState}) .control:hover {
129
+ :host([appearance='outline']) .control:hover {
130
130
  --control-border-color: ${colorNeutralStroke1Hover};
131
131
  }
132
132
 
133
- :host(:where(${outlineState}, ${transparentState})) .control:hover::before {
133
+ :host(:where([appearance='outline'], [appearance='transparent'])) .control:hover::before {
134
134
  background-color: ${colorNeutralStrokeAccessibleHover};
135
135
  }
136
136
 
137
- :host(${outlineState}) .control:hover::after {
137
+ :host([appearance='outline']) .control:hover::after {
138
138
  background-color: ${colorCompoundBrandBackgroundHover};
139
139
  }
140
140
 
141
- :host(${outlineState}) .control:active {
141
+ :host([appearance='outline']) .control:active {
142
142
  --control-border-color: ${colorNeutralStroke1Pressed};
143
143
  }
144
144
 
145
- :host(:where(${outlineState}, ${transparentState})) .control:active::before {
145
+ :host(:where([appearance='outline'], [appearance='transparent'])) .control:active::before {
146
146
  background-color: ${colorNeutralStrokeAccessiblePressed};
147
147
  }
148
148
 
149
- :host(:where(${outlineState}, ${transparentState})) .control:active::after {
149
+ :host(:where([appearance='outline'], [appearance='transparent'])) .control:active::after {
150
150
  background-color: ${colorCompoundBrandBackgroundPressed};
151
151
  }
152
152
 
153
- :host(${filledDarkerState}) .control {
153
+ :host([appearance='filled-darker']) .control {
154
154
  background-color: ${colorNeutralBackground3};
155
155
  }
156
156
 
157
- :host(:where(${filledLighterState}, ${filledDarkerState})) .control {
157
+ :host(:where([appearance='filled-lighter'], [appearance='filled-darker'])) .control {
158
158
  --control-border-color: ${colorTransparentStroke};
159
159
  }
160
160
 
@@ -196,11 +196,11 @@ export const styles = css `
196
196
  max-height: 50vh;
197
197
  }
198
198
 
199
- :host(${smallState}) ::slotted([popover]) {
199
+ :host([size='small']) ::slotted([popover]) {
200
200
  margin-block-start: calc(${lineHeightBase200} + (${spacingVerticalXS} * 2) + ${strokeWidthThin});
201
201
  }
202
202
 
203
- :host(${largeState}) ::slotted([popover]) {
203
+ :host([size='large']) ::slotted([popover]) {
204
204
  margin-block-start: calc(${lineHeightBase400} + (${spacingVerticalS} * 2) + ${strokeWidthThin});
205
205
  }
206
206
 
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.styles.js","sourceRoot":"","sources":["../../../src/dropdown/dropdown.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,SAAS,EACT,YAAY,EACZ,qBAAqB,EACrB,UAAU,EACV,gBAAgB,GACjB,MAAM,2BAA2B,CAAC;AACnC,OA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AIjC,iCAAiC;;;;8BAI3B,0BAA0B;;;;wBAIhC,mCAAmC;;;;wBAInC,mCAAmC;;;;wBAInC,uBAAuB;;;;8BAIjB,sBAAsB;;;;;;;;;;;;;;;8BAetB,0BAA0B;wBAChC,8BAA8B;aACzC,8BAA8B;;;;;;;;;;;;;;;;;;;;iCAoBV,iBAAiB,OAAO,qBAAqB,WAAW,eAAe;;;;;iCAKvE,iBAAiB,OAAO,iBAAiB,WAAW,eAAe;;;;iCAInE,iBAAiB,OAAO,gBAAgB,WAAW,eAAe;;;YAGvF,cAAc;;;;;CAKzB,CAAC"}
@@ -1,61 +1,10 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { attr, FASTElement } from '@microsoft/fast-element';
3
- import { swapStates, toggleState } from '../utils/element-internals.js';
4
- import { ImageFit, ImageShape } from './image.options.js';
5
3
  /**
6
4
  * The base class used for constucting a fluent image custom element
7
5
  * @public
8
6
  */
9
7
  export class Image extends FASTElement {
10
- constructor() {
11
- super(...arguments);
12
- /**
13
- * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
14
- *
15
- * @internal
16
- */
17
- this.elementInternals = this.attachInternals();
18
- }
19
- /**
20
- * Handles changes to block custom states
21
- * @param prev - the previous state
22
- * @param next - the next state
23
- */
24
- blockChanged(prev, next) {
25
- toggleState(this.elementInternals, 'block', next);
26
- }
27
- /**
28
- * Handles changes to bordered custom states
29
- * @param prev - the previous state
30
- * @param next - the next state
31
- */
32
- borderedChanged(prev, next) {
33
- toggleState(this.elementInternals, 'bordered', next);
34
- }
35
- /**
36
- * Handles changes to shadow custom states
37
- * @param prev - the previous state
38
- * @param next - the next state
39
- */
40
- shadowChanged(prev, next) {
41
- toggleState(this.elementInternals, 'shadow', next);
42
- }
43
- /**
44
- * Handles changes to fit attribute custom states
45
- * @param prev - the previous state
46
- * @param next - the next state
47
- */
48
- fitChanged(prev, next) {
49
- swapStates(this.elementInternals, prev, next, ImageFit, 'fit-');
50
- }
51
- /**
52
- * Handles changes to shape attribute custom states
53
- * @param prev - the previous state
54
- * @param next - the next state
55
- */
56
- shapeChanged(prev, next) {
57
- swapStates(this.elementInternals, prev, next, ImageShape);
58
- }
59
8
  }
60
9
  __decorate([
61
10
  attr({ mode: 'boolean' })
@@ -1 +1 @@
1
- {"version":3,"file":"image.js","sourceRoot":"","sources":["../../../src/image/image.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE1D;;;GAGG;AACH,MAAM,OAAO,KAAM,SAAQ,WAAW;IAAtC;;QACE;;;;WAIG;QACI,qBAAgB,GAAqB,IAAI,CAAC,eAAe,EAAE,CAAC;IAgGrE,CAAC;IApFC;;;;OAIG;IACI,YAAY,CAAC,IAAa,EAAE,IAAa;QAC9C,WAAW,CAAC,IAAI,CAAC,gBAAgB,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACpD,CAAC;IAYD;;;;OAIG;IACI,eAAe,CAAC,IAAa,EAAE,IAAa;QACjD,WAAW,CAAC,IAAI,CAAC,gBAAgB,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC;IAYD;;;;OAIG;IACI,aAAa,CAAC,IAAa,EAAE,IAAa;QAC/C,WAAW,CAAC,IAAI,CAAC,gBAAgB,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;IACrD,CAAC;IAYD;;;;OAIG;IACI,UAAU,CAAC,IAA0B,EAAE,IAA0B;QACtE,UAAU,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAClE,CAAC;IAYD;;;;OAIG;IACI,YAAY,CAAC,IAA4B,EAAE,IAA4B;QAC5E,UAAU,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;IAC5D,CAAC;CACF;AAtFQ;IADN,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;oCACH;AAmBhB;IADN,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;uCACA;AAmBnB;IADN,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;qCACF;AAmBjB;IADN,IAAI;kCACiB;AAmBf;IADN,IAAI;oCACqB"}
1
+ {"version":3,"file":"image.js","sourceRoot":"","sources":["../../../src/image/image.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAG5D;;;GAGG;AACH,MAAM,OAAO,KAAM,SAAQ,WAAW;CAkDrC;AAzCQ;IADN,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;oCACH;AAUhB;IADN,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;uCACA;AAUnB;IADN,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;qCACF;AAUjB;IADN,IAAI;kCACiB;AAUf;IADN,IAAI;oCACqB"}
@@ -1,6 +1,5 @@
1
1
  import { css } from '@microsoft/fast-element';
2
2
  import { borderRadiusCircular, borderRadiusMedium, colorNeutralStroke2, shadow4, strokeWidthThin, } from '../theme/design-tokens.js';
3
- import { blockState, borderedState, circularState, fitCenterState, fitContainState, fitCoverState, fitNoneState, roundedState, shadowState, } from '../styles/states/index.js';
4
3
  /** Image styles
5
4
  *
6
5
  * @public
@@ -16,44 +15,44 @@ export const styles = css `
16
15
  min-width: 8px;
17
16
  display: inline-block;
18
17
  }
19
- :host(${blockState}) ::slotted(img) {
18
+ :host([block]) ::slotted(img) {
20
19
  width: 100%;
21
20
  height: auto;
22
21
  }
23
- :host(${borderedState}) ::slotted(img) {
22
+ :host([bordered]) ::slotted(img) {
24
23
  border: ${strokeWidthThin} solid ${colorNeutralStroke2};
25
24
  }
26
- :host(${fitNoneState}) ::slotted(img) {
25
+ :host([fit='none']) ::slotted(img) {
27
26
  object-fit: none;
28
27
  object-position: top left;
29
28
  height: 100%;
30
29
  width: 100%;
31
30
  }
32
- :host(${fitCenterState}) ::slotted(img) {
31
+ :host([fit='center']) ::slotted(img) {
33
32
  object-fit: none;
34
33
  object-position: center;
35
34
  height: 100%;
36
35
  width: 100%;
37
36
  }
38
- :host(${fitContainState}) ::slotted(img) {
37
+ :host([fit='contain']) ::slotted(img) {
39
38
  object-fit: contain;
40
39
  object-position: center;
41
40
  height: 100%;
42
41
  width: 100%;
43
42
  }
44
- :host(${fitCoverState}) ::slotted(img) {
43
+ :host([fit='cover']) ::slotted(img) {
45
44
  object-fit: cover;
46
45
  object-position: center;
47
46
  height: 100%;
48
47
  width: 100%;
49
48
  }
50
- :host(${shadowState}) ::slotted(img) {
49
+ :host([shadow]) ::slotted(img) {
51
50
  box-shadow: ${shadow4};
52
51
  }
53
- :host(${circularState}) ::slotted(img) {
52
+ :host([shape='circular']) ::slotted(img) {
54
53
  border-radius: ${borderRadiusCircular};
55
54
  }
56
- :host(${roundedState}) ::slotted(img) {
55
+ :host([shape='rounded']) ::slotted(img) {
57
56
  border-radius: ${borderRadiusMedium};
58
57
  }
59
58
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"image.styles.js","sourceRoot":"","sources":["../../../src/image/image.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,OAAO,EACP,eAAe,GAChB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,UAAU,EACV,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,GACZ,MAAM,2BAA2B,CAAC;AAEnC;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;UAWf,UAAU;;;;UAIV,aAAa;cACT,eAAe,UAAU,mBAAmB;;UAEhD,YAAY;;;;;;UAMZ,cAAc;;;;;;UAMd,eAAe;;;;;;UAMf,aAAa;;;;;;UAMb,WAAW;kBACH,OAAO;;UAEf,aAAa;qBACF,oBAAoB;;UAE/B,YAAY;qBACD,kBAAkB;;CAEtC,CAAC"}
1
+ {"version":3,"file":"image.styles.js","sourceRoot":"","sources":["../../../src/image/image.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,OAAO,EACP,eAAe,GAChB,MAAM,2BAA2B,CAAC;AAEnC;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;cAgBX,eAAe,UAAU,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA2BxC,OAAO;;;qBAGJ,oBAAoB;;;qBAGpB,kBAAkB;;CAEtC,CAAC"}
@@ -1,7 +1,5 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { attr, FASTElement } from '@microsoft/fast-element';
3
- import { swapStates, toggleState } from '../utils/element-internals.js';
4
- import { LabelSize, LabelWeight } from './label.options.js';
5
3
  /**
6
4
  * The base class used for constructing a fluent-label custom element
7
5
  * @public
@@ -9,12 +7,6 @@ import { LabelSize, LabelWeight } from './label.options.js';
9
7
  export class Label extends FASTElement {
10
8
  constructor() {
11
9
  super(...arguments);
12
- /**
13
- * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
14
- *
15
- * @internal
16
- */
17
- this.elementInternals = this.attachInternals();
18
10
  /**
19
11
  * Specifies styles for label when associated input is disabled
20
12
  *
@@ -32,30 +24,6 @@ export class Label extends FASTElement {
32
24
  */
33
25
  this.required = false;
34
26
  }
35
- /**
36
- * Handles changes to size attribute custom states
37
- * @param prev - the previous state
38
- * @param next - the next state
39
- */
40
- sizeChanged(prev, next) {
41
- swapStates(this.elementInternals, prev, next, LabelSize);
42
- }
43
- /**
44
- * Handles changes to weight attribute custom states
45
- * @param prev - the previous state
46
- * @param next - the next state
47
- */
48
- weightChanged(prev, next) {
49
- swapStates(this.elementInternals, prev, next, LabelWeight);
50
- }
51
- /**
52
- * Handles changes to disabled attribute custom states
53
- * @param prev - the previous state
54
- * @param next - the next state
55
- */
56
- disabledChanged(prev, next) {
57
- toggleState(this.elementInternals, 'disabled', next);
58
- }
59
27
  }
60
28
  __decorate([
61
29
  attr
@@ -1 +1 @@
1
- {"version":3,"file":"label.js","sourceRoot":"","sources":["../../../src/label/label.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE5D;;;GAGG;AACH,MAAM,OAAO,KAAM,SAAQ,WAAW;IAAtC;;QACE;;;;WAIG;QACI,qBAAgB,GAAqB,IAAI,CAAC,eAAe,EAAE,CAAC;QAwCnE;;;;;;WAMG;QAEI,aAAQ,GAAY,KAAK,CAAC;QAWjC;;;;;;WAMG;QAEI,aAAQ,GAAY,KAAK,CAAC;IACnC,CAAC;IAxDC;;;;OAIG;IACI,WAAW,CAAC,IAA2B,EAAE,IAA2B;QACzE,UAAU,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;IAC3D,CAAC;IAYD;;;;OAIG;IACI,aAAa,CAAC,IAA6B,EAAE,IAA6B;QAC/E,UAAU,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;IAC7D,CAAC;IAYD;;;;OAIG;IACI,eAAe,CAAC,IAAyB,EAAE,IAAyB;QACzE,WAAW,CAAC,IAAI,CAAC,gBAAgB,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC;CAWF;AA1DQ;IADN,IAAI;mCACmB;AAmBjB;IADN,IAAI;qCACuB;AAmBrB;IADN,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;uCACO;AAmB1B;IADN,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;uCACO"}
1
+ {"version":3,"file":"label.js","sourceRoot":"","sources":["../../../src/label/label.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAG5D;;;GAGG;AACH,MAAM,OAAO,KAAM,SAAQ,WAAW;IAAtC;;QAqBE;;;;;;WAMG;QAEI,aAAQ,GAAY,KAAK,CAAC;QAEjC;;;;;;WAMG;QAEI,aAAQ,GAAY,KAAK,CAAC;IACnC,CAAC;CAAA;AA/BQ;IADN,IAAI;mCACmB;AAUjB;IADN,IAAI;qCACuB;AAUrB;IADN,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;uCACO;AAU1B;IADN,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;uCACO"}
@@ -1,7 +1,6 @@
1
1
  import { css } from '@microsoft/fast-element';
2
2
  import { display } from '../utils/index.js';
3
3
  import { colorNeutralForeground1, colorNeutralForegroundDisabled, colorPaletteRedForeground1, fontFamilyBase, fontSizeBase200, fontSizeBase300, fontSizeBase400, fontWeightRegular, fontWeightSemibold, lineHeightBase200, lineHeightBase300, lineHeightBase400, spacingHorizontalXS, } from '../theme/design-tokens.js';
4
- import { disabledState, largeState, semiboldState, smallState } from '../styles/states/index.js';
5
4
  /** Label styles
6
5
  * @public
7
6
  */
@@ -23,22 +22,22 @@ export const styles = css `
23
22
  margin-inline-start: ${spacingHorizontalXS};
24
23
  }
25
24
 
26
- :host(${smallState}) {
25
+ :host([size='small']) {
27
26
  font-size: ${fontSizeBase200};
28
27
  line-height: ${lineHeightBase200};
29
28
  }
30
29
 
31
- :host(${largeState}) {
30
+ :host([size='large']) {
32
31
  font-size: ${fontSizeBase400};
33
32
  line-height: ${lineHeightBase400};
34
33
  }
35
34
 
36
- :host(:is(${largeState}, ${semiboldState})) {
35
+ :host(:is([size='large'], [weight='semibold'])) {
37
36
  font-weight: ${fontWeightSemibold};
38
37
  }
39
38
 
40
- :host(${disabledState}),
41
- :host(${disabledState}) .asterisk {
39
+ :host([disabled]),
40
+ :host([disabled]) .asterisk {
42
41
  color: ${colorNeutralForegroundDisabled};
43
42
  }
44
43
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"label.styles.js","sourceRoot":"","sources":["../../../src/label/label.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EACL,uBAAuB,EACvB,8BAA8B,EAC9B,0BAA0B,EAC1B,cAAc,EACd,eAAe,EACf,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEjG;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;IACrB,OAAO,CAAC,aAAa,CAAC;;;aAGb,uBAAuB;;mBAEjB,cAAc;iBAChB,eAAe;mBACb,iBAAiB;mBACjB,iBAAiB;;;;;aAKvB,0BAA0B;2BACZ,mBAAmB;;;UAGpC,UAAU;iBACH,eAAe;mBACb,iBAAiB;;;UAG1B,UAAU;iBACH,eAAe;mBACb,iBAAiB;;;cAGtB,UAAU,KAAK,aAAa;mBACvB,kBAAkB;;;UAG3B,aAAa;UACb,aAAa;aACV,8BAA8B;;CAE1C,CAAC"}
1
+ {"version":3,"file":"label.styles.js","sourceRoot":"","sources":["../../../src/label/label.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EACL,uBAAuB,EACvB,8BAA8B,EAC9B,0BAA0B,EAC1B,cAAc,EACd,eAAe,EACf,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AAEnC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;IACrB,OAAO,CAAC,aAAa,CAAC;;;aAGb,uBAAuB;;mBAEjB,cAAc;iBAChB,eAAe;mBACb,iBAAiB;mBACjB,iBAAiB;;;;;aAKvB,0BAA0B;2BACZ,mBAAmB;;;;iBAI7B,eAAe;mBACb,iBAAiB;;;;iBAInB,eAAe;mBACb,iBAAiB;;;;mBAIjB,kBAAkB;;;;;aAKxB,8BAA8B;;CAE1C,CAAC"}
@@ -1,8 +1,6 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { attr } from '@microsoft/fast-element';
3
3
  import { BaseAnchor } from '../anchor-button/anchor-button.base.js';
4
- import { swapStates, toggleState } from '../utils/element-internals.js';
5
- import { LinkAppearance } from './link.options.js';
6
4
  /**
7
5
  * An Anchor Custom HTML Element.
8
6
  * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element }.
@@ -28,22 +26,6 @@ export class Link extends BaseAnchor {
28
26
  */
29
27
  this.inline = false;
30
28
  }
31
- /**
32
- * Handles changes to appearance attribute custom states
33
- * @param prev - the previous state
34
- * @param next - the next state
35
- */
36
- appearanceChanged(prev, next) {
37
- swapStates(this.elementInternals, prev, next, LinkAppearance);
38
- }
39
- /**
40
- * Handles changes to inline attribute custom states
41
- * @param prev - the previous state
42
- * @param next - the next state
43
- */
44
- inlineChanged(prev, next) {
45
- toggleState(this.elementInternals, 'inline', next);
46
- }
47
29
  }
48
30
  __decorate([
49
31
  attr
@@ -1 +1 @@
1
- {"version":3,"file":"link.js","sourceRoot":"","sources":["../../../src/link/link.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;;;;;;;GASG;AACH,MAAM,OAAO,IAAK,SAAQ,UAAU;IAApC;;QAoBE;;;;;;;;;WASG;QAEI,WAAM,GAAY,KAAK,CAAC;IAUjC,CAAC;IA9BC;;;;OAIG;IACI,iBAAiB,CAAC,IAAgC,EAAE,IAAgC;QACzF,UAAU,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;IAChE,CAAC;IAeD;;;;OAIG;IACI,aAAa,CAAC,IAAa,EAAE,IAAa;QAC/C,WAAW,CAAC,IAAI,CAAC,gBAAgB,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;IACrD,CAAC;CACF;AAhCQ;IADN,IAAI;wCAC0C;AAsBxC;IADN,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;oCACK"}
1
+ {"version":3,"file":"link.js","sourceRoot":"","sources":["../../../src/link/link.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAGpE;;;;;;;;;GASG;AACH,MAAM,OAAO,IAAK,SAAQ,UAAU;IAApC;;QAWE;;;;;;;;;WASG;QAEI,WAAM,GAAY,KAAK,CAAC;IACjC,CAAC;CAAA;AAdQ;IADN,IAAI;wCAC0C;AAaxC;IADN,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;oCACK"}