@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.
- package/CHANGELOG.md +12 -2
- package/dist/dts/accordion-item/accordion-item.base.d.ts +0 -12
- package/dist/dts/accordion-item/accordion-item.d.ts +0 -18
- package/dist/dts/avatar/avatar.base.d.ts +0 -12
- package/dist/dts/avatar/avatar.d.ts +13 -2
- package/dist/dts/badge/badge.d.ts +0 -30
- package/dist/dts/button/button.d.ts +0 -24
- package/dist/dts/checkbox/checkbox.d.ts +0 -16
- package/dist/dts/counter-badge/counter-badge.d.ts +0 -30
- package/dist/dts/divider/divider.d.ts +0 -18
- package/dist/dts/dropdown/dropdown.d.ts +0 -16
- package/dist/dts/image/image.d.ts +0 -36
- package/dist/dts/label/label.d.ts +0 -24
- package/dist/dts/link/link.d.ts +0 -12
- package/dist/dts/message-bar/message-bar.d.ts +0 -18
- package/dist/dts/progress-bar/progress-bar.d.ts +0 -12
- package/dist/dts/rating-display/rating-display.d.ts +0 -14
- package/dist/dts/slider/slider.d.ts +0 -1
- package/dist/dts/spinner/spinner.d.ts +0 -12
- package/dist/dts/styles/states/index.d.ts +0 -500
- package/dist/dts/tablist/tablist.d.ts +0 -8
- package/dist/dts/text/text.d.ts +1 -34
- package/dist/dts/text-input/text-input.d.ts +0 -12
- package/dist/dts/textarea/textarea.d.ts +0 -4
- package/dist/dts/tree-item/tree-item.d.ts +1 -1
- package/dist/esm/accordion-item/accordion-item.base.js +0 -17
- package/dist/esm/accordion-item/accordion-item.base.js.map +1 -1
- package/dist/esm/accordion-item/accordion-item.js +0 -26
- package/dist/esm/accordion-item/accordion-item.js.map +1 -1
- package/dist/esm/accordion-item/accordion-item.styles.js +19 -20
- package/dist/esm/accordion-item/accordion-item.styles.js.map +1 -1
- package/dist/esm/avatar/avatar.base.js +0 -3
- package/dist/esm/avatar/avatar.base.js.map +1 -1
- package/dist/esm/avatar/avatar.js +4 -2
- package/dist/esm/avatar/avatar.js.map +1 -1
- package/dist/esm/avatar/avatar.styles.js +31 -32
- package/dist/esm/avatar/avatar.styles.js.map +1 -1
- package/dist/esm/badge/badge.js +1 -40
- package/dist/esm/badge/badge.js.map +1 -1
- package/dist/esm/badge/badge.styles.js +7 -10
- package/dist/esm/badge/badge.styles.js.map +1 -1
- package/dist/esm/button/button.js +0 -34
- package/dist/esm/button/button.js.map +1 -1
- package/dist/esm/button/button.styles.js +34 -35
- package/dist/esm/button/button.styles.js.map +1 -1
- package/dist/esm/checkbox/checkbox.js +1 -22
- package/dist/esm/checkbox/checkbox.js.map +1 -1
- package/dist/esm/checkbox/checkbox.styles.js +6 -6
- package/dist/esm/checkbox/checkbox.styles.js.map +1 -1
- package/dist/esm/compound-button/compound-button.styles.js +12 -13
- package/dist/esm/compound-button/compound-button.styles.js.map +1 -1
- package/dist/esm/counter-badge/counter-badge.js +0 -42
- package/dist/esm/counter-badge/counter-badge.js.map +1 -1
- package/dist/esm/counter-badge/counter-badge.styles.js +3 -7
- package/dist/esm/counter-badge/counter-badge.styles.js.map +1 -1
- package/dist/esm/divider/divider.js +0 -26
- package/dist/esm/divider/divider.js.map +1 -1
- package/dist/esm/divider/divider.styles.js +32 -35
- package/dist/esm/divider/divider.styles.js.map +1 -1
- package/dist/esm/dropdown/dropdown.js +1 -22
- package/dist/esm/dropdown/dropdown.js.map +1 -1
- package/dist/esm/dropdown/dropdown.styles.js +18 -18
- package/dist/esm/dropdown/dropdown.styles.js.map +1 -1
- package/dist/esm/image/image.js +0 -51
- package/dist/esm/image/image.js.map +1 -1
- package/dist/esm/image/image.styles.js +9 -10
- package/dist/esm/image/image.styles.js.map +1 -1
- package/dist/esm/label/label.js +0 -32
- package/dist/esm/label/label.js.map +1 -1
- package/dist/esm/label/label.styles.js +5 -6
- package/dist/esm/label/label.styles.js.map +1 -1
- package/dist/esm/link/link.js +0 -18
- package/dist/esm/link/link.js.map +1 -1
- package/dist/esm/link/link.styles.js +4 -5
- package/dist/esm/link/link.styles.js.map +1 -1
- package/dist/esm/message-bar/message-bar.js +0 -26
- package/dist/esm/message-bar/message-bar.js.map +1 -1
- package/dist/esm/message-bar/message-bar.styles.js +9 -10
- package/dist/esm/message-bar/message-bar.styles.js.map +1 -1
- package/dist/esm/progress-bar/progress-bar.js +0 -18
- package/dist/esm/progress-bar/progress-bar.js.map +1 -1
- package/dist/esm/progress-bar/progress-bar.styles.js +6 -7
- package/dist/esm/progress-bar/progress-bar.styles.js.map +1 -1
- package/dist/esm/radio-group/radio-group.styles.js +0 -1
- package/dist/esm/radio-group/radio-group.styles.js.map +1 -1
- package/dist/esm/rating-display/rating-display.js +0 -20
- package/dist/esm/rating-display/rating-display.js.map +1 -1
- package/dist/esm/rating-display/rating-display.styles.js +16 -19
- package/dist/esm/rating-display/rating-display.styles.js.map +1 -1
- package/dist/esm/slider/slider.js +1 -6
- package/dist/esm/slider/slider.js.map +1 -1
- package/dist/esm/slider/slider.styles.js +6 -7
- package/dist/esm/slider/slider.styles.js.map +1 -1
- package/dist/esm/spinner/spinner.js +0 -18
- package/dist/esm/spinner/spinner.js.map +1 -1
- package/dist/esm/spinner/spinner.styles.js +8 -9
- package/dist/esm/spinner/spinner.styles.js.map +1 -1
- package/dist/esm/styles/partials/badge.partials.js +42 -43
- package/dist/esm/styles/partials/badge.partials.js.map +1 -1
- package/dist/esm/styles/states/index.js +0 -500
- package/dist/esm/styles/states/index.js.map +1 -1
- package/dist/esm/tablist/tablist.js +1 -14
- package/dist/esm/tablist/tablist.js.map +1 -1
- package/dist/esm/tablist/tablist.styles.js +26 -27
- package/dist/esm/tablist/tablist.styles.js.map +1 -1
- package/dist/esm/text/text.js +1 -66
- package/dist/esm/text/text.js.map +1 -1
- package/dist/esm/text/text.styles.js +26 -27
- package/dist/esm/text/text.styles.js.map +1 -1
- package/dist/esm/text-input/text-input.js +0 -18
- package/dist/esm/text-input/text-input.js.map +1 -1
- package/dist/esm/text-input/text-input.styles.js +22 -23
- package/dist/esm/text-input/text-input.styles.js.map +1 -1
- package/dist/esm/textarea/textarea.js +1 -29
- package/dist/esm/textarea/textarea.js.map +1 -1
- package/dist/esm/textarea/textarea.styles.js +14 -14
- package/dist/esm/textarea/textarea.styles.js.map +1 -1
- package/dist/esm/toggle-button/toggle-button.styles.js +19 -20
- package/dist/esm/toggle-button/toggle-button.styles.js.map +1 -1
- package/dist/esm/tree-item/tree-item.js +1 -1
- package/dist/esm/tree-item/tree-item.js.map +1 -1
- package/dist/esm/tree-item/tree-item.styles.js.map +1 -1
- package/dist/esm/tree-item/tree-item.template.js +1 -1
- package/dist/esm/tree-item/tree-item.template.js.map +1 -1
- package/dist/web-components.d.ts +13 -363
- package/dist/web-components.js +178 -987
- package/dist/web-components.min.js +357 -354
- package/package.json +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { css } from '@microsoft/fast-element';
|
|
2
2
|
import { display } from '../utils/index.js';
|
|
3
3
|
import { borderRadiusCircular, colorCompoundBrandForeground1Hover, colorNeutralForeground1, colorNeutralForeground1Hover, colorNeutralForeground2, colorNeutralForegroundDisabled, colorSubtleBackgroundHover, colorSubtleBackgroundPressed, curveDecelerateMax, durationSlow, fontSizeBase300, fontSizeBase400, lineHeightBase300, lineHeightBase400, spacingHorizontalMNudge, spacingHorizontalSNudge, spacingVerticalL, spacingVerticalMNudge, spacingVerticalS, spacingVerticalSNudge, spacingVerticalXXS, strokeWidthThicker, } from '../theme/design-tokens.js';
|
|
4
|
-
import { disabledState, largeState, smallState, subtleState, verticalState } from '../styles/states/index.js';
|
|
5
4
|
/**
|
|
6
5
|
* @public
|
|
7
6
|
*/
|
|
@@ -18,7 +17,7 @@ export const styles = css `
|
|
|
18
17
|
flex-direction: row;
|
|
19
18
|
}
|
|
20
19
|
|
|
21
|
-
:host(
|
|
20
|
+
:host([orientation='vertical']) {
|
|
22
21
|
flex-direction: column;
|
|
23
22
|
}
|
|
24
23
|
|
|
@@ -40,7 +39,7 @@ export const styles = css `
|
|
|
40
39
|
transform: translateX(var(--tabIndicatorOffset)) scaleX(var(--tabIndicatorScale));
|
|
41
40
|
}
|
|
42
41
|
|
|
43
|
-
:host(
|
|
42
|
+
:host([orientation='vertical']) ::slotted([slot='tab'])::after {
|
|
44
43
|
width: ${strokeWidthThicker};
|
|
45
44
|
height: unset;
|
|
46
45
|
margin-block-start: unset;
|
|
@@ -74,27 +73,27 @@ export const styles = css `
|
|
|
74
73
|
transform-origin: left;
|
|
75
74
|
}
|
|
76
75
|
|
|
77
|
-
:host(
|
|
78
|
-
:host(
|
|
76
|
+
:host([orientation='vertical']) ::slotted([slot='tab'])::before,
|
|
77
|
+
:host([orientation='vertical']) ::slotted([slot='tab'][aria-selected='false']:hover)::after {
|
|
79
78
|
height: unset;
|
|
80
79
|
width: ${strokeWidthThicker};
|
|
81
80
|
margin-inline-end: auto;
|
|
82
81
|
transform-origin: top;
|
|
83
82
|
}
|
|
84
83
|
|
|
85
|
-
:host(:where(
|
|
84
|
+
:host(:where([size='small'], [size='large'])) ::slotted([slot='tab']) {
|
|
86
85
|
padding-inline: var(--tabPaddingInline);
|
|
87
86
|
padding-block: var(--tabPaddingBlock);
|
|
88
87
|
}
|
|
89
88
|
|
|
90
|
-
:host(
|
|
89
|
+
:host([size='small']) ::slotted([slot='tab']) {
|
|
91
90
|
--tabPaddingBlock: ${spacingVerticalSNudge};
|
|
92
91
|
--tabPaddingInline: ${spacingHorizontalSNudge};
|
|
93
92
|
font-size: ${fontSizeBase300};
|
|
94
93
|
line-height: ${lineHeightBase300};
|
|
95
94
|
}
|
|
96
95
|
|
|
97
|
-
:host(
|
|
96
|
+
:host([size='large']) ::slotted([slot='tab']) {
|
|
98
97
|
--tabPaddingBlock: ${spacingVerticalL};
|
|
99
98
|
--tabPaddingInline: ${spacingHorizontalMNudge};
|
|
100
99
|
font-size: ${fontSizeBase400};
|
|
@@ -112,80 +111,80 @@ export const styles = css `
|
|
|
112
111
|
--tabIndicatorInsetInline: ${spacingHorizontalMNudge};
|
|
113
112
|
}
|
|
114
113
|
|
|
115
|
-
:host(
|
|
114
|
+
:host([size='small']) ::slotted([slot='tab']) {
|
|
116
115
|
--tabIndicatorInsetInline: ${spacingHorizontalSNudge};
|
|
117
116
|
}
|
|
118
117
|
|
|
119
|
-
:host(
|
|
118
|
+
:host([size='large']) ::slotted([slot='tab']) {
|
|
120
119
|
--tabIndicatorInsetInline: ${spacingHorizontalMNudge};
|
|
121
120
|
}
|
|
122
121
|
|
|
123
|
-
:host(
|
|
122
|
+
:host([orientation='vertical']) ::slotted([slot='tab']) {
|
|
124
123
|
padding-block: var(--tabPaddingBlock);
|
|
125
124
|
}
|
|
126
125
|
|
|
127
|
-
:host(
|
|
126
|
+
:host([orientation='vertical']) ::slotted([slot='tab']) {
|
|
128
127
|
--tabPaddingBlock: ${spacingVerticalS};
|
|
129
128
|
}
|
|
130
129
|
|
|
131
|
-
:host(
|
|
130
|
+
:host([orientation='vertical'][size='small']) ::slotted([slot='tab']) {
|
|
132
131
|
--tabPaddingBlock: ${spacingVerticalXXS};
|
|
133
132
|
}
|
|
134
133
|
|
|
135
|
-
:host(
|
|
134
|
+
:host([orientation='vertical'][size='large']) ::slotted([slot='tab']) {
|
|
136
135
|
--tabPaddingBlock: ${spacingVerticalS};
|
|
137
136
|
}
|
|
138
137
|
|
|
139
|
-
:host(
|
|
140
|
-
:host(
|
|
141
|
-
:host(
|
|
138
|
+
:host([orientation='vertical']) ::slotted([slot='tab'])::after,
|
|
139
|
+
:host([orientation='vertical']) ::slotted([slot='tab'])::before,
|
|
140
|
+
:host([orientation='vertical']) ::slotted([slot='tab']:hover)::after {
|
|
142
141
|
inset-inline: 0;
|
|
143
142
|
inset-block: var(--tabIndicatorInsetBlock);
|
|
144
143
|
}
|
|
145
144
|
|
|
146
|
-
:host(
|
|
145
|
+
:host([orientation='vertical']) {
|
|
147
146
|
--tabIndicatorInsetBlock: ${spacingVerticalS};
|
|
148
147
|
}
|
|
149
148
|
|
|
150
|
-
:host(
|
|
149
|
+
:host([orientation='vertical'][size='small']) {
|
|
151
150
|
--tabIndicatorInsetBlock: ${spacingVerticalSNudge};
|
|
152
151
|
}
|
|
153
152
|
|
|
154
|
-
:host(
|
|
153
|
+
:host([orientation='vertical'][size='large']) {
|
|
155
154
|
--tabIndicatorInsetBlock: ${spacingVerticalMNudge};
|
|
156
155
|
}
|
|
157
156
|
|
|
158
157
|
/* disabled styles */
|
|
159
|
-
:host(
|
|
158
|
+
:host([disabled]) {
|
|
160
159
|
cursor: not-allowed;
|
|
161
160
|
color: ${colorNeutralForegroundDisabled};
|
|
162
161
|
}
|
|
163
162
|
|
|
164
|
-
:host(
|
|
163
|
+
:host([disabled]) ::slotted([slot='tab']) {
|
|
165
164
|
pointer-events: none;
|
|
166
165
|
cursor: not-allowed;
|
|
167
166
|
color: ${colorNeutralForegroundDisabled};
|
|
168
167
|
}
|
|
169
168
|
|
|
170
|
-
:host(
|
|
169
|
+
:host([disabled]) ::slotted([slot='tab']:after) {
|
|
171
170
|
background-color: ${colorNeutralForegroundDisabled};
|
|
172
171
|
}
|
|
173
172
|
|
|
174
|
-
:host(
|
|
173
|
+
:host([disabled]) ::slotted([slot='tab'][aria-selected='true'])::after {
|
|
175
174
|
background-color: ${colorNeutralForegroundDisabled};
|
|
176
175
|
}
|
|
177
176
|
|
|
178
|
-
:host(
|
|
177
|
+
:host([disabled]) ::slotted([slot='tab']:hover):before {
|
|
179
178
|
content: unset;
|
|
180
179
|
}
|
|
181
180
|
|
|
182
|
-
:host(
|
|
181
|
+
:host([appearance='subtle']) ::slotted([slot='tab']:hover) {
|
|
183
182
|
background-color: ${colorSubtleBackgroundHover};
|
|
184
183
|
color: ${colorNeutralForeground1Hover};
|
|
185
184
|
fill: ${colorCompoundBrandForeground1Hover};
|
|
186
185
|
}
|
|
187
186
|
|
|
188
|
-
:host(
|
|
187
|
+
:host([appearance='subtle']) ::slotted([slot='tab']:active) {
|
|
189
188
|
background-color: ${colorSubtleBackgroundPressed};
|
|
190
189
|
fill: ${colorSubtleBackgroundPressed};
|
|
191
190
|
color: ${colorNeutralForeground1};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tablist.styles.js","sourceRoot":"","sources":["../../../src/tablist/tablist.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EACL,oBAAoB,EACpB,kCAAkC,EAClC,uBAAuB,EACvB,4BAA4B,EAC5B,uBAAuB,EACvB,8BAA8B,EAC9B,0BAA0B,EAC1B,4BAA4B,EAC5B,kBAAkB,EAClB,YAAY,EACZ,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,uBAAuB,EACvB,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"tablist.styles.js","sourceRoot":"","sources":["../../../src/tablist/tablist.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EACL,oBAAoB,EACpB,kCAAkC,EAClC,uBAAuB,EACvB,4BAA4B,EAC5B,uBAAuB,EACvB,8BAA8B,EAC9B,0BAA0B,EAC1B,4BAA4B,EAC5B,kBAAkB,EAClB,YAAY,EACZ,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,uBAAuB,EACvB,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AAEnC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;IACrB,OAAO,CAAC,MAAM,CAAC;;;;;;;;aAQN,uBAAuB;;;;;;;;;;;;;;;2BAeT,YAAY;kCACL,kBAAkB;;;;cAItC,kBAAkB;;;;;;;aAOnB,kBAAkB;;;;;;;;;cASjB,kBAAkB;qBACX,oBAAoB;;;;;;;;;;;;;;wBAcjB,8BAA8B;;;;cAIxC,kBAAkB;;;;;;;;aAQnB,kBAAkB;;;;;;;;;;;yBAWN,qBAAqB;0BACpB,uBAAuB;iBAChC,eAAe;mBACb,iBAAiB;;;;yBAIX,gBAAgB;0BACf,uBAAuB;iBAChC,eAAe;mBACb,iBAAiB;;;;;;;;;;;iCAWH,uBAAuB;;;;iCAIvB,uBAAuB;;;;iCAIvB,uBAAuB;;;;;;;;yBAQ/B,gBAAgB;;;;yBAIhB,kBAAkB;;;;yBAIlB,gBAAgB;;;;;;;;;;;gCAWT,gBAAgB;;;;gCAIhB,qBAAqB;;;;gCAIrB,qBAAqB;;;;;;aAMxC,8BAA8B;;;;;;aAM9B,8BAA8B;;;;wBAInB,8BAA8B;;;;wBAI9B,8BAA8B;;;;;;;;wBAQ9B,0BAA0B;aACrC,4BAA4B;YAC7B,kCAAkC;;;;wBAItB,4BAA4B;YACxC,4BAA4B;aAC3B,uBAAuB;;CAEnC,CAAC"}
|
package/dist/esm/text/text.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { attr, FASTElement
|
|
3
|
-
import { swapStates, toggleState } from '../utils/element-internals.js';
|
|
4
|
-
import { TextAlign, TextFont, TextSize, TextWeight } from './text.options.js';
|
|
2
|
+
import { attr, FASTElement } from '@microsoft/fast-element';
|
|
5
3
|
/**
|
|
6
4
|
* The base class used for constructing a fluent-text custom element
|
|
7
5
|
* @public
|
|
@@ -66,69 +64,6 @@ export class Text extends FASTElement {
|
|
|
66
64
|
*/
|
|
67
65
|
this.block = false;
|
|
68
66
|
}
|
|
69
|
-
/**
|
|
70
|
-
* Handles changes to size attribute custom states
|
|
71
|
-
* @param prev - the previous state
|
|
72
|
-
* @param next - the next state
|
|
73
|
-
*/
|
|
74
|
-
sizeChanged(prev, next) {
|
|
75
|
-
swapStates(this.elementInternals, prev, next, TextSize, 'size-');
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Handles changes to font attribute custom states
|
|
79
|
-
* @param prev - the previous state
|
|
80
|
-
* @param next - the next state
|
|
81
|
-
*/
|
|
82
|
-
fontChanged(prev, next) {
|
|
83
|
-
swapStates(this.elementInternals, prev, next, TextFont);
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Handles changes to weight attribute custom states
|
|
87
|
-
* @param prev - the previous state
|
|
88
|
-
* @param next - the next state
|
|
89
|
-
*/
|
|
90
|
-
weightChanged(prev, next) {
|
|
91
|
-
swapStates(this.elementInternals, prev, next, TextWeight);
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Handles changes to align attribute custom states
|
|
95
|
-
* @param prev - the previous state
|
|
96
|
-
* @param next - the next state
|
|
97
|
-
*/
|
|
98
|
-
alignChanged(prev, next) {
|
|
99
|
-
swapStates(this.elementInternals, prev, next, TextAlign);
|
|
100
|
-
}
|
|
101
|
-
connectedCallback() {
|
|
102
|
-
super.connectedCallback();
|
|
103
|
-
Observable.getNotifier(this).subscribe(this);
|
|
104
|
-
Object.keys(this.$fastController.definition.attributeLookup).forEach(key => {
|
|
105
|
-
this.handleChange(this, key);
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
disconnectedCallback() {
|
|
109
|
-
super.disconnectedCallback();
|
|
110
|
-
Observable.getNotifier(this).unsubscribe(this);
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Handles changes to observable properties
|
|
114
|
-
* @internal
|
|
115
|
-
* @param source - the source of the change
|
|
116
|
-
* @param propertyName - the property name being changed
|
|
117
|
-
*/
|
|
118
|
-
handleChange(source, propertyName) {
|
|
119
|
-
switch (propertyName) {
|
|
120
|
-
case 'nowrap':
|
|
121
|
-
case 'truncate':
|
|
122
|
-
case 'italic':
|
|
123
|
-
case 'underline':
|
|
124
|
-
case 'strikethrough':
|
|
125
|
-
case 'block':
|
|
126
|
-
toggleState(this.elementInternals, propertyName, !!this[propertyName]);
|
|
127
|
-
break;
|
|
128
|
-
default:
|
|
129
|
-
break;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
67
|
}
|
|
133
68
|
__decorate([
|
|
134
69
|
attr({ mode: 'boolean' })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.js","sourceRoot":"","sources":["../../../src/text/text.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"text.js","sourceRoot":"","sources":["../../../src/text/text.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAG5D;;;GAGG;AACH,MAAM,OAAO,IAAK,SAAQ,WAAW;IAArC;;QACE;;;;WAIG;QACI,qBAAgB,GAAqB,IAAI,CAAC,eAAe,EAAE,CAAC;QAEnE;;;;;;;;WAQG;QAEH,WAAM,GAAY,KAAK,CAAC;QAExB;;;;;;WAMG;QAEH,aAAQ,GAAY,KAAK,CAAC;QAE1B;;;;;;WAMG;QAEH,WAAM,GAAY,KAAK,CAAC;QAExB;;;;;;WAMG;QAEH,cAAS,GAAY,KAAK,CAAC;QAE3B;;;;;;WAMG;QAEH,kBAAa,GAAY,KAAK,CAAC;QAE/B;;;;;;WAMG;QAEH,UAAK,GAAY,KAAK,CAAC;IA0CzB,CAAC;CAAA;AA5FC;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;oCACF;AAUxB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;sCACA;AAU1B;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;oCACF;AAUxB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;uCACC;AAU3B;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;2CACK;AAU/B;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;mCACH;AAWvB;IADC,IAAI;kCACW;AAUhB;IADC,IAAI;kCACW;AAUhB;IADC,IAAI;oCACe;AAUpB;IADC,IAAI;mCACa"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { css } from '@microsoft/fast-element';
|
|
2
2
|
import { display } from '../utils/index.js';
|
|
3
3
|
import { fontFamilyBase, fontFamilyMonospace, fontFamilyNumeric, fontSizeBase100, fontSizeBase200, fontSizeBase300, fontSizeBase400, fontSizeBase500, fontSizeBase600, fontSizeHero1000, fontSizeHero700, fontSizeHero800, fontSizeHero900, fontWeightBold, fontWeightMedium, fontWeightRegular, fontWeightSemibold, lineHeightBase100, lineHeightBase200, lineHeightBase300, lineHeightBase400, lineHeightBase500, lineHeightBase600, lineHeightHero1000, lineHeightHero700, lineHeightHero800, lineHeightHero900, } from '../theme/design-tokens.js';
|
|
4
|
-
import { blockState, boldState, centerState, endState, italicState, justifyState, mediumState, monospaceState, nowrapState, numericState, semiboldState, size1000State, size100State, size200State, size400State, size500State, size600State, size700State, size800State, size900State, strikethroughState, truncateState, underlineState, } from '../styles/states/index.js';
|
|
5
4
|
/** Text styles
|
|
6
5
|
* @public
|
|
7
6
|
*/
|
|
@@ -17,88 +16,88 @@ export const styles = css `
|
|
|
17
16
|
text-align: start;
|
|
18
17
|
}
|
|
19
18
|
|
|
20
|
-
:host(
|
|
21
|
-
:host(
|
|
19
|
+
:host([nowrap]),
|
|
20
|
+
:host([nowrap]) ::slotted(*) {
|
|
22
21
|
white-space: nowrap;
|
|
23
22
|
overflow: hidden;
|
|
24
23
|
}
|
|
25
|
-
:host(
|
|
26
|
-
:host(
|
|
24
|
+
:host([truncate]),
|
|
25
|
+
:host([truncate]) ::slotted(*) {
|
|
27
26
|
text-overflow: ellipsis;
|
|
28
27
|
}
|
|
29
|
-
:host(
|
|
28
|
+
:host([block]) {
|
|
30
29
|
display: block;
|
|
31
30
|
}
|
|
32
|
-
:host(
|
|
31
|
+
:host([italic]) {
|
|
33
32
|
font-style: italic;
|
|
34
33
|
}
|
|
35
|
-
:host(
|
|
34
|
+
:host([underline]) {
|
|
36
35
|
text-decoration-line: underline;
|
|
37
36
|
}
|
|
38
|
-
:host(
|
|
37
|
+
:host([strikethrough]) {
|
|
39
38
|
text-decoration-line: line-through;
|
|
40
39
|
}
|
|
41
|
-
:host(
|
|
40
|
+
:host([underline][strikethrough]) {
|
|
42
41
|
text-decoration-line: line-through underline;
|
|
43
42
|
}
|
|
44
|
-
:host(
|
|
43
|
+
:host([size='100']) {
|
|
45
44
|
font-size: ${fontSizeBase100};
|
|
46
45
|
line-height: ${lineHeightBase100};
|
|
47
46
|
}
|
|
48
|
-
:host(
|
|
47
|
+
:host([size='200']) {
|
|
49
48
|
font-size: ${fontSizeBase200};
|
|
50
49
|
line-height: ${lineHeightBase200};
|
|
51
50
|
}
|
|
52
|
-
:host(
|
|
51
|
+
:host([size='400']) {
|
|
53
52
|
font-size: ${fontSizeBase400};
|
|
54
53
|
line-height: ${lineHeightBase400};
|
|
55
54
|
}
|
|
56
|
-
:host(
|
|
55
|
+
:host([size='500']) {
|
|
57
56
|
font-size: ${fontSizeBase500};
|
|
58
57
|
line-height: ${lineHeightBase500};
|
|
59
58
|
}
|
|
60
|
-
:host(
|
|
59
|
+
:host([size='600']) {
|
|
61
60
|
font-size: ${fontSizeBase600};
|
|
62
61
|
line-height: ${lineHeightBase600};
|
|
63
62
|
}
|
|
64
|
-
:host(
|
|
63
|
+
:host([size='700']) {
|
|
65
64
|
font-size: ${fontSizeHero700};
|
|
66
65
|
line-height: ${lineHeightHero700};
|
|
67
66
|
}
|
|
68
|
-
:host(
|
|
67
|
+
:host([size='800']) {
|
|
69
68
|
font-size: ${fontSizeHero800};
|
|
70
69
|
line-height: ${lineHeightHero800};
|
|
71
70
|
}
|
|
72
|
-
:host(
|
|
71
|
+
:host([size='900']) {
|
|
73
72
|
font-size: ${fontSizeHero900};
|
|
74
73
|
line-height: ${lineHeightHero900};
|
|
75
74
|
}
|
|
76
|
-
:host(
|
|
75
|
+
:host([size='1000']) {
|
|
77
76
|
font-size: ${fontSizeHero1000};
|
|
78
77
|
line-height: ${lineHeightHero1000};
|
|
79
78
|
}
|
|
80
|
-
:host(
|
|
79
|
+
:host([font='monospace']) {
|
|
81
80
|
font-family: ${fontFamilyMonospace};
|
|
82
81
|
}
|
|
83
|
-
:host(
|
|
82
|
+
:host([font='numeric']) {
|
|
84
83
|
font-family: ${fontFamilyNumeric};
|
|
85
84
|
}
|
|
86
|
-
:host(
|
|
85
|
+
:host([weight='medium']) {
|
|
87
86
|
font-weight: ${fontWeightMedium};
|
|
88
87
|
}
|
|
89
|
-
:host(
|
|
88
|
+
:host([weight='semibold']) {
|
|
90
89
|
font-weight: ${fontWeightSemibold};
|
|
91
90
|
}
|
|
92
|
-
:host(
|
|
91
|
+
:host([weight='bold']) {
|
|
93
92
|
font-weight: ${fontWeightBold};
|
|
94
93
|
}
|
|
95
|
-
:host(
|
|
94
|
+
:host([align='center']) {
|
|
96
95
|
text-align: center;
|
|
97
96
|
}
|
|
98
|
-
:host(
|
|
97
|
+
:host([align='end']) {
|
|
99
98
|
text-align: end;
|
|
100
99
|
}
|
|
101
|
-
:host(
|
|
100
|
+
:host([align='justify']) {
|
|
102
101
|
text-align: justify;
|
|
103
102
|
}
|
|
104
103
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.styles.js","sourceRoot":"","sources":["../../../src/text/text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"text.styles.js","sourceRoot":"","sources":["../../../src/text/text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AAEnC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;IACrB,OAAO,CAAC,QAAQ,CAAC;;;;mBAIF,cAAc;iBAChB,eAAe;mBACb,iBAAiB;mBACjB,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6BnB,eAAe;mBACb,iBAAiB;;;iBAGnB,eAAe;mBACb,iBAAiB;;;iBAGnB,eAAe;mBACb,iBAAiB;;;iBAGnB,eAAe;mBACb,iBAAiB;;;iBAGnB,eAAe;mBACb,iBAAiB;;;iBAGnB,eAAe;mBACb,iBAAiB;;;iBAGnB,eAAe;mBACb,iBAAiB;;;iBAGnB,eAAe;mBACb,iBAAiB;;;iBAGnB,gBAAgB;mBACd,kBAAkB;;;mBAGlB,mBAAmB;;;mBAGnB,iBAAiB;;;mBAGjB,gBAAgB;;;mBAGhB,kBAAkB;;;mBAGlB,cAAc;;;;;;;;;;;;;;;;;;;;CAoBhC,CAAC"}
|
|
@@ -2,9 +2,7 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { attr } from '@microsoft/fast-element';
|
|
3
3
|
import { StartEnd } from '../patterns/start-end.js';
|
|
4
4
|
import { applyMixins } from '../utils/apply-mixins.js';
|
|
5
|
-
import { swapStates } from '../utils/element-internals.js';
|
|
6
5
|
import { BaseTextInput } from './text-input.base.js';
|
|
7
|
-
import { TextInputAppearance, TextInputControlSize } from './text-input.options.js';
|
|
8
6
|
/**
|
|
9
7
|
* A Text Input Custom HTML Element.
|
|
10
8
|
* Based on BaseTextInput and includes style and layout specific attributes
|
|
@@ -12,22 +10,6 @@ import { TextInputAppearance, TextInputControlSize } from './text-input.options.
|
|
|
12
10
|
* @public
|
|
13
11
|
*/
|
|
14
12
|
export class TextInput extends BaseTextInput {
|
|
15
|
-
/**
|
|
16
|
-
* Handles changes to appearance attribute custom states
|
|
17
|
-
* @param prev - the previous state
|
|
18
|
-
* @param next - the next state
|
|
19
|
-
*/
|
|
20
|
-
appearanceChanged(prev, next) {
|
|
21
|
-
swapStates(this.elementInternals, prev, next, TextInputAppearance);
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Handles changes to `control-size` attribute custom states
|
|
25
|
-
* @param prev - the previous state
|
|
26
|
-
* @param next - the next state
|
|
27
|
-
*/
|
|
28
|
-
controlSizeChanged(prev, next) {
|
|
29
|
-
swapStates(this.elementInternals, prev, next, TextInputControlSize);
|
|
30
|
-
}
|
|
31
13
|
}
|
|
32
14
|
__decorate([
|
|
33
15
|
attr
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input.js","sourceRoot":"","sources":["../../../src/text-input/text-input.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"text-input.js","sourceRoot":"","sources":["../../../src/text-input/text-input.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGrD;;;;;GAKG;AACH,MAAM,OAAO,SAAU,SAAQ,aAAa;CAoB3C;AAXQ;IADN,IAAI;6CACmC;AAUjC;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;8CACM;AAY5C,WAAW,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { css } from '@microsoft/fast-element';
|
|
2
2
|
import { borderRadiusMedium, colorCompoundBrandStroke, colorCompoundBrandStrokePressed, colorNeutralBackground1, colorNeutralBackground3, colorNeutralBackgroundInverted, colorNeutralForeground1, colorNeutralForeground3, colorNeutralForeground4, colorNeutralForegroundDisabled, colorNeutralForegroundInverted, colorNeutralStroke1, colorNeutralStroke1Hover, colorNeutralStroke1Pressed, colorNeutralStrokeAccessible, colorNeutralStrokeAccessibleHover, colorNeutralStrokeAccessiblePressed, colorNeutralStrokeDisabled, colorPaletteRedBorder2, colorTransparentBackground, colorTransparentStroke, colorTransparentStrokeInteractive, curveAccelerateMid, curveDecelerateMid, durationNormal, durationUltraFast, fontFamilyBase, fontSizeBase200, fontSizeBase300, fontSizeBase400, fontSizeBase500, fontSizeBase600, fontWeightRegular, lineHeightBase200, lineHeightBase300, lineHeightBase400, shadow2, spacingHorizontalM, spacingHorizontalMNudge, spacingHorizontalS, spacingHorizontalSNudge, spacingHorizontalXS, spacingHorizontalXXS, spacingVerticalXS, strokeWidthThin, } from '../theme/design-tokens.js';
|
|
3
3
|
import { display } from '../utils/display.js';
|
|
4
|
-
import { filledDarkerState, filledLighterState, largeState, outlineState, smallState, underlineState, } from '../styles/states/index.js';
|
|
5
4
|
/**
|
|
6
5
|
* Styles for the TextInput component.
|
|
7
6
|
*
|
|
@@ -121,7 +120,7 @@ export const styles = css `
|
|
|
121
120
|
:host(:focus-within:active) .root:after {
|
|
122
121
|
border-bottom-color: ${colorCompoundBrandStrokePressed};
|
|
123
122
|
}
|
|
124
|
-
:host(
|
|
123
|
+
:host([appearance='outline']:focus-within) .root {
|
|
125
124
|
border: ${strokeWidthThin} solid ${colorNeutralStroke1};
|
|
126
125
|
}
|
|
127
126
|
:host(:focus-within) .control {
|
|
@@ -140,70 +139,70 @@ export const styles = css `
|
|
|
140
139
|
color: ${colorNeutralForegroundInverted};
|
|
141
140
|
background-color: ${colorNeutralBackgroundInverted};
|
|
142
141
|
}
|
|
143
|
-
:host(
|
|
142
|
+
:host([control-size='small']) .control {
|
|
144
143
|
font-size: ${fontSizeBase200};
|
|
145
144
|
font-weight: ${fontWeightRegular};
|
|
146
145
|
line-height: ${lineHeightBase200};
|
|
147
146
|
}
|
|
148
|
-
:host(
|
|
147
|
+
:host([control-size='small']) .root {
|
|
149
148
|
height: 24px;
|
|
150
149
|
gap: ${spacingHorizontalXXS};
|
|
151
150
|
padding: 0 ${spacingHorizontalSNudge};
|
|
152
151
|
}
|
|
153
|
-
:host(
|
|
154
|
-
:host(
|
|
152
|
+
:host([control-size='small']) ::slotted([slot='start']),
|
|
153
|
+
:host([control-size='small']) ::slotted([slot='end']) {
|
|
155
154
|
font-size: ${fontSizeBase400};
|
|
156
155
|
}
|
|
157
|
-
:host(
|
|
156
|
+
:host([control-size='large']) .control {
|
|
158
157
|
font-size: ${fontSizeBase400};
|
|
159
158
|
font-weight: ${fontWeightRegular};
|
|
160
159
|
line-height: ${lineHeightBase400};
|
|
161
160
|
}
|
|
162
|
-
:host(
|
|
161
|
+
:host([control-size='large']) .root {
|
|
163
162
|
height: 40px;
|
|
164
163
|
gap: ${spacingHorizontalS};
|
|
165
164
|
padding: 0 ${spacingHorizontalM};
|
|
166
165
|
}
|
|
167
|
-
:host(
|
|
168
|
-
:host(
|
|
166
|
+
:host([control-size='large']) ::slotted([slot='start']),
|
|
167
|
+
:host([control-size='large']) ::slotted([slot='end']) {
|
|
169
168
|
font-size: ${fontSizeBase600};
|
|
170
169
|
}
|
|
171
|
-
:host(
|
|
170
|
+
:host([appearance='underline']) .root {
|
|
172
171
|
background: ${colorTransparentBackground};
|
|
173
172
|
border: 0;
|
|
174
173
|
border-radius: 0;
|
|
175
174
|
border-bottom: ${strokeWidthThin} solid ${colorNeutralStrokeAccessible};
|
|
176
175
|
}
|
|
177
|
-
:host(
|
|
176
|
+
:host([appearance='underline']:hover) .root {
|
|
178
177
|
border-bottom-color: ${colorNeutralStrokeAccessibleHover};
|
|
179
178
|
}
|
|
180
|
-
:host(
|
|
179
|
+
:host([appearance='underline']:active) .root {
|
|
181
180
|
border-bottom-color: ${colorNeutralStrokeAccessiblePressed};
|
|
182
181
|
}
|
|
183
|
-
:host(
|
|
182
|
+
:host([appearance='underline']:focus-within) .root {
|
|
184
183
|
border: 0;
|
|
185
184
|
border-bottom-color: ${colorNeutralStrokeAccessiblePressed};
|
|
186
185
|
}
|
|
187
|
-
:host(
|
|
186
|
+
:host([appearance='underline'][disabled]) .root {
|
|
188
187
|
border-bottom-color: ${colorNeutralStrokeDisabled};
|
|
189
188
|
}
|
|
190
|
-
:host(
|
|
191
|
-
:host(
|
|
189
|
+
:host([appearance='filled-lighter']) .root,
|
|
190
|
+
:host([appearance='filled-darker']) .root {
|
|
192
191
|
border: ${strokeWidthThin} solid ${colorTransparentStroke};
|
|
193
192
|
box-shadow: ${shadow2};
|
|
194
193
|
}
|
|
195
|
-
:host(
|
|
194
|
+
:host([appearance='filled-lighter']) .root {
|
|
196
195
|
background: ${colorNeutralBackground1};
|
|
197
196
|
}
|
|
198
|
-
:host(
|
|
197
|
+
:host([appearance='filled-darker']) .root {
|
|
199
198
|
background: ${colorNeutralBackground3};
|
|
200
199
|
}
|
|
201
|
-
:host(
|
|
202
|
-
:host(
|
|
200
|
+
:host([appearance='filled-lighter']:hover) .root,
|
|
201
|
+
:host([appearance='filled-darker']:hover) .root {
|
|
203
202
|
border-color: ${colorTransparentStrokeInteractive};
|
|
204
203
|
}
|
|
205
|
-
:host(
|
|
206
|
-
:host(
|
|
204
|
+
:host([appearance='filled-lighter']:active) .root,
|
|
205
|
+
:host([appearance='filled-darker']:active) .root {
|
|
207
206
|
border-color: ${colorTransparentStrokeInteractive};
|
|
208
207
|
background: ${colorNeutralBackground3};
|
|
209
208
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input.styles.js","sourceRoot":"","sources":["../../../src/text-input/text-input.styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,+BAA+B,EAC/B,uBAAuB,EACvB,uBAAuB,EACvB,8BAA8B,EAC9B,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,8BAA8B,EAC9B,8BAA8B,EAC9B,mBAAmB,EACnB,wBAAwB,EACxB,0BAA0B,EAC1B,4BAA4B,EAC5B,iCAAiC,EACjC,mCAAmC,EACnC,0BAA0B,EAC1B,sBAAsB,EACtB,0BAA0B,EAC1B,sBAAsB,EACtB,iCAAiC,EACjC,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,OAAO,EACP,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,eAAe,GAChB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"text-input.styles.js","sourceRoot":"","sources":["../../../src/text-input/text-input.styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,+BAA+B,EAC/B,uBAAuB,EACvB,uBAAuB,EACvB,8BAA8B,EAC9B,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,8BAA8B,EAC9B,8BAA8B,EAC9B,mBAAmB,EACnB,wBAAwB,EACxB,0BAA0B,EAC1B,4BAA4B,EAC5B,iCAAiC,EACjC,mCAAmC,EACnC,0BAA0B,EAC1B,sBAAsB,EACtB,0BAA0B,EAC1B,sBAAsB,EACtB,iCAAiC,EACjC,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,OAAO,EACP,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,eAAe,GAChB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C;;;;GAIG;AACH,MAAM,CAAC,MAAM,MAAM,GAAkB,GAAG,CAAA;IACpC,OAAO,CAAC,OAAO,CAAC;;;mBAGD,cAAc;iBAChB,eAAe;mBACb,iBAAiB;mBACjB,iBAAiB;;;;;aAKvB,uBAAuB;sBACd,iBAAiB;;0BAEb,mBAAmB;;;;;;;;;;wBAUrB,uBAAuB;cACjC,eAAe,UAAU,mBAAmB;2BAC/B,4BAA4B;qBAClC,kBAAkB;;;;;WAK5B,oBAAoB;iBACd,uBAAuB;;;;;;oBAMpB,sBAAsB;;;;;;;;;;uBAUnB,kBAAkB;yBAChB,kBAAkB,IAAI,kBAAkB;+BAClC,wBAAwB;;;;2BAI5B,iBAAiB;wBACpB,kBAAkB;;;;;;aAM7B,uBAAuB;qBACf,kBAAkB;kBACrB,0BAA0B;mBACzB,cAAc;mBACd,iBAAiB;iBACnB,eAAe;;;;;;;;;aASnB,uBAAuB;;;;;;;aAOvB,uBAAuB;iBACnB,eAAe;;;qBAGX,oBAAoB;;;oBAGrB,oBAAoB;WAC7B,mBAAmB;;;oBAGV,wBAAwB;2BACjB,iCAAiC;;;oBAGxC,0BAA0B;;;;;;;;;2BASnB,cAAc;wBACjB,kBAAkB;;;2BAGf,+BAA+B;;;cAG5C,eAAe,UAAU,mBAAmB;;;aAG7C,uBAAuB;;;kBAGlB,0BAA0B;cAC9B,eAAe,UAAU,0BAA0B;;;;;aAKpD,8BAA8B;;;aAG9B,8BAA8B;wBACnB,8BAA8B;;;iBAGrC,eAAe;mBACb,iBAAiB;mBACjB,iBAAiB;;;;WAIzB,oBAAoB;iBACd,uBAAuB;;;;iBAIvB,eAAe;;;iBAGf,eAAe;mBACb,iBAAiB;mBACjB,iBAAiB;;;;WAIzB,kBAAkB;iBACZ,kBAAkB;;;;iBAIlB,eAAe;;;kBAGd,0BAA0B;;;qBAGvB,eAAe,UAAU,4BAA4B;;;2BAG/C,iCAAiC;;;2BAGjC,mCAAmC;;;;2BAInC,mCAAmC;;;2BAGnC,0BAA0B;;;;cAIvC,eAAe,UAAU,sBAAsB;kBAC3C,OAAO;;;kBAGP,uBAAuB;;;kBAGvB,uBAAuB;;;;oBAIrB,iCAAiC;;;;oBAIjC,iCAAiC;kBACnC,uBAAuB;;CAExC,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { attr, Observable } from '@microsoft/fast-element';
|
|
3
|
-
import { hasMatchingState, swapStates, toggleState } from '../utils/element-internals.js';
|
|
4
3
|
import { BaseTextArea } from './textarea.base.js';
|
|
5
|
-
import { TextAreaAppearance
|
|
4
|
+
import { TextAreaAppearance } from './textarea.options.js';
|
|
6
5
|
export class TextArea extends BaseTextArea {
|
|
7
6
|
constructor() {
|
|
8
7
|
super(...arguments);
|
|
@@ -29,21 +28,6 @@ export class TextArea extends BaseTextArea {
|
|
|
29
28
|
node.size = this.size;
|
|
30
29
|
});
|
|
31
30
|
}
|
|
32
|
-
appearanceChanged(prev, next) {
|
|
33
|
-
toggleState(this.elementInternals, prev, false);
|
|
34
|
-
if (hasMatchingState(TextAreaAppearance, next)) {
|
|
35
|
-
toggleState(this.elementInternals, next, true);
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
this.appearance = TextAreaAppearance.outline;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
blockChanged() {
|
|
42
|
-
toggleState(this.elementInternals, 'block', this.block);
|
|
43
|
-
}
|
|
44
|
-
sizeChanged(prev, next) {
|
|
45
|
-
swapStates(this.elementInternals, prev, next, TextAreaSize);
|
|
46
|
-
}
|
|
47
31
|
/**
|
|
48
32
|
* @internal
|
|
49
33
|
*/
|
|
@@ -54,10 +38,6 @@ export class TextArea extends BaseTextArea {
|
|
|
54
38
|
node.size = this.size;
|
|
55
39
|
});
|
|
56
40
|
break;
|
|
57
|
-
case 'appearance':
|
|
58
|
-
case 'displayShadow':
|
|
59
|
-
this.maybeDisplayShadow();
|
|
60
|
-
break;
|
|
61
41
|
}
|
|
62
42
|
}
|
|
63
43
|
/**
|
|
@@ -65,9 +45,6 @@ export class TextArea extends BaseTextArea {
|
|
|
65
45
|
*/
|
|
66
46
|
connectedCallback() {
|
|
67
47
|
super.connectedCallback();
|
|
68
|
-
this.maybeDisplayShadow();
|
|
69
|
-
Observable.getNotifier(this).subscribe(this, 'appearance');
|
|
70
|
-
Observable.getNotifier(this).subscribe(this, 'displayShadow');
|
|
71
48
|
Observable.getNotifier(this).subscribe(this, 'size');
|
|
72
49
|
}
|
|
73
50
|
/**
|
|
@@ -75,13 +52,8 @@ export class TextArea extends BaseTextArea {
|
|
|
75
52
|
*/
|
|
76
53
|
disconnectedCallback() {
|
|
77
54
|
super.disconnectedCallback();
|
|
78
|
-
Observable.getNotifier(this).unsubscribe(this, 'appearance');
|
|
79
|
-
Observable.getNotifier(this).unsubscribe(this, 'displayShadow');
|
|
80
55
|
Observable.getNotifier(this).unsubscribe(this, 'size');
|
|
81
56
|
}
|
|
82
|
-
maybeDisplayShadow() {
|
|
83
|
-
toggleState(this.elementInternals, 'display-shadow', this.displayShadow && TextAreaAppearancesForDisplayShadow.includes(this.appearance));
|
|
84
|
-
}
|
|
85
57
|
}
|
|
86
58
|
__decorate([
|
|
87
59
|
attr({ mode: 'fromView' })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../../src/textarea/textarea.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../../src/textarea/textarea.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAgB,MAAM,uBAAuB,CAAC;AAEzE,MAAM,OAAO,QAAS,SAAQ,YAAY;IAA1C;;QASE;;;;;;WAMG;QAEI,eAAU,GAAuB,kBAAkB,CAAC,OAAO,CAAC;QAEnE;;;;;;WAMG;QAEI,UAAK,GAAY,KAAK,CAAC;IA0ChC,CAAC;IApEW,wBAAwB;QAChC,KAAK,CAAC,wBAAwB,EAAE,CAAC;QAEjC,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACpC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACxB,CAAC,CAAC,CAAC;IACL,CAAC;IAgCD;;OAEG;IACI,YAAY,CAAC,CAAM,EAAE,YAAoB;QAC9C,QAAQ,YAAY,EAAE,CAAC;YACrB,KAAK,MAAM;gBACT,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;oBACpC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;gBACxB,CAAC,CAAC,CAAC;gBACH,MAAM;QACV,CAAC;IACH,CAAC;IAED;;OAEG;IACI,iBAAiB;QACtB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAE1B,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACvD,CAAC;IAED;;OAEG;IACI,oBAAoB;QACzB,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAE7B,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACzD,CAAC;CACF;AApDQ;IADN,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;4CACwC;AAU5D;IADN,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;uCACI;AAUvB;IADN,IAAI;sCACsB"}
|