@vonage/vivid 3.0.0-next.6 → 3.0.0-next.61

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 (161) hide show
  1. package/README.md +135 -4
  2. package/accordion/index.js +2 -4
  3. package/accordion-item/index.js +26 -20
  4. package/action-group/index.js +47 -0
  5. package/avatar/index.js +51 -0
  6. package/badge/index.js +14 -20
  7. package/banner/index.js +21 -86
  8. package/breadcrumb/index.js +20 -18
  9. package/breadcrumb-item/index.js +14 -11
  10. package/button/index.js +28 -661
  11. package/calendar/index.js +67 -25
  12. package/calendar-event/index.js +115 -0
  13. package/card/index.js +132 -0
  14. package/checkbox/index.js +180 -0
  15. package/dialog/index.js +279 -0
  16. package/divider/index.js +86 -0
  17. package/elevation/index.js +3 -31
  18. package/fab/index.js +100 -0
  19. package/focus/index.js +18 -3
  20. package/header/index.js +66 -0
  21. package/icon/index.js +9 -5
  22. package/index.js +45 -20
  23. package/layout/index.js +4 -6
  24. package/lib/accordion-item/accordion-item.d.ts +2 -2
  25. package/lib/accordion-item/index.d.ts +2 -1
  26. package/lib/action-group/action-group.d.ts +10 -0
  27. package/lib/{sidenav-item/sidenav-item.template.d.ts → action-group/action-group.template.d.ts} +2 -2
  28. package/lib/{sidenav-item → action-group}/index.d.ts +1 -2
  29. package/lib/avatar/avatar.d.ts +14 -0
  30. package/lib/avatar/avatar.template.d.ts +4 -0
  31. package/lib/avatar/index.d.ts +3 -0
  32. package/lib/badge/badge.d.ts +6 -6
  33. package/lib/badge/index.d.ts +1 -1
  34. package/lib/banner/banner.d.ts +1 -1
  35. package/lib/banner/banner.template.d.ts +0 -2
  36. package/lib/banner/index.d.ts +1 -0
  37. package/lib/breadcrumb/breadcrumb.template.d.ts +4 -0
  38. package/lib/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  39. package/lib/breadcrumb-item/index.d.ts +1 -0
  40. package/lib/button/button.d.ts +6 -5
  41. package/lib/button/index.d.ts +2 -19
  42. package/lib/calendar/calendar.d.ts +3 -1
  43. package/lib/calendar/index.d.ts +0 -1
  44. package/lib/calendar-event/calendar-event.d.ts +14 -0
  45. package/lib/calendar-event/calendar-event.template.d.ts +4 -0
  46. package/lib/calendar-event/index.d.ts +2 -0
  47. package/lib/card/card.d.ts +10 -0
  48. package/lib/{text/text.template.d.ts → card/card.template.d.ts} +2 -2
  49. package/lib/card/index.d.ts +4 -0
  50. package/lib/checkbox/checkbox.d.ts +5 -0
  51. package/lib/checkbox/checkbox.template.d.ts +4 -0
  52. package/lib/checkbox/index.d.ts +4 -0
  53. package/lib/components.d.ts +22 -10
  54. package/lib/dialog/dialog.d.ts +20 -0
  55. package/lib/dialog/dialog.template.d.ts +4 -0
  56. package/lib/dialog/index.d.ts +5 -0
  57. package/lib/divider/divider.d.ts +3 -0
  58. package/lib/divider/divider.template.d.ts +4 -0
  59. package/lib/divider/index.d.ts +2 -0
  60. package/lib/elevation/elevation.d.ts +1 -0
  61. package/lib/elevation/index.d.ts +1 -1
  62. package/lib/enums.d.ts +12 -6
  63. package/lib/fab/fab.d.ts +13 -0
  64. package/lib/fab/fab.template.d.ts +4 -0
  65. package/lib/fab/index.d.ts +4 -0
  66. package/lib/focus/index.d.ts +1 -1
  67. package/lib/header/header.d.ts +5 -0
  68. package/lib/header/header.template.d.ts +4 -0
  69. package/lib/header/index.d.ts +3 -0
  70. package/lib/icon/icon.d.ts +4 -3
  71. package/lib/layout/index.d.ts +1 -1
  72. package/lib/layout/layout.d.ts +3 -3
  73. package/lib/menu/index.d.ts +11 -0
  74. package/lib/menu/menu.d.ts +7 -0
  75. package/lib/menu/menu.template.d.ts +3 -0
  76. package/lib/nav/index.d.ts +2 -0
  77. package/lib/nav/nav.d.ts +3 -0
  78. package/lib/nav/nav.template.d.ts +4 -0
  79. package/lib/nav-disclosure/index.d.ts +4 -0
  80. package/lib/nav-disclosure/nav-disclosure.d.ts +10 -0
  81. package/lib/nav-disclosure/nav-disclosure.template.d.ts +4 -0
  82. package/lib/nav-item/index.d.ts +4 -0
  83. package/lib/{sidenav-item/sidenav-item.d.ts → nav-item/nav-item.d.ts} +2 -2
  84. package/lib/nav-item/nav-item.template.d.ts +4 -0
  85. package/lib/{text → note}/index.d.ts +1 -1
  86. package/lib/note/note.d.ts +10 -0
  87. package/lib/note/note.template.d.ts +5 -0
  88. package/lib/popup/index.d.ts +1 -1
  89. package/lib/popup/popup.d.ts +3 -15
  90. package/lib/progress/progress.d.ts +1 -1
  91. package/lib/progress-ring/progress-ring.d.ts +2 -1
  92. package/lib/side-drawer/index.d.ts +1 -1
  93. package/lib/side-drawer/side-drawer.d.ts +4 -7
  94. package/lib/side-drawer/side-drawer.template.d.ts +2 -2
  95. package/lib/text-anchor/text-anchor.d.ts +1 -1
  96. package/lib/text-area/index.d.ts +3 -0
  97. package/lib/text-area/text-area.d.ts +9 -0
  98. package/lib/text-area/text-area.template.d.ts +4 -0
  99. package/lib/text-field/index.d.ts +4 -0
  100. package/lib/text-field/text-field.d.ts +16 -0
  101. package/lib/text-field/text-field.template.d.ts +5 -0
  102. package/lib/tooltip/tooltip.d.ts +2 -4
  103. package/menu/index.js +659 -0
  104. package/nav/index.js +17 -0
  105. package/nav-disclosure/index.js +88 -0
  106. package/nav-item/index.js +41 -0
  107. package/note/index.js +66 -0
  108. package/package.json +49 -8
  109. package/popup/index.js +19 -2082
  110. package/progress/index.js +35 -28
  111. package/progress-ring/index.js +9 -5
  112. package/shared/anchor.js +8 -1
  113. package/shared/aria-global.js +3 -40
  114. package/shared/base-progress.js +5 -0
  115. package/shared/button.js +199 -0
  116. package/shared/calendar-event.js +26 -0
  117. package/shared/dialog-polyfill.esm.js +858 -0
  118. package/shared/enums.js +79 -0
  119. package/shared/es.object.assign.js +7 -6
  120. package/shared/export.js +995 -0
  121. package/shared/focus.js +5 -0
  122. package/shared/focus2.js +11 -0
  123. package/shared/form-associated.js +554 -0
  124. package/shared/form-elements.js +298 -0
  125. package/shared/icon.js +533 -520
  126. package/shared/index.js +79 -56
  127. package/shared/index2.js +26 -12
  128. package/shared/index3.js +2113 -0
  129. package/shared/iterators.js +61 -0
  130. package/shared/object-keys.js +13 -0
  131. package/shared/patterns/focus.d.ts +3 -0
  132. package/shared/patterns/form-elements.d.ts +22 -0
  133. package/shared/patterns/index.d.ts +1 -0
  134. package/shared/ref.js +41 -0
  135. package/shared/text-anchor.js +2 -11
  136. package/shared/text-anchor.template.js +5 -2
  137. package/shared/to-string.js +51 -0
  138. package/shared/web.dom-collections.iterator.js +78 -1083
  139. package/side-drawer/index.js +50 -51
  140. package/styles/core/all.css +75 -0
  141. package/styles/core/theme.css +11 -0
  142. package/styles/core/typography.css +69 -0
  143. package/styles/fonts/SpeziaCompleteVariableItalicWeb.woff +0 -0
  144. package/styles/fonts/SpeziaCompleteVariableItalicWeb.woff2 +0 -0
  145. package/styles/fonts/SpeziaCompleteVariableUprightWeb.woff +0 -0
  146. package/styles/fonts/SpeziaCompleteVariableUprightWeb.woff2 +0 -0
  147. package/styles/fonts/SpeziaMonoCompleteVariableWeb.woff +0 -0
  148. package/styles/fonts/SpeziaMonoCompleteVariableWeb.woff2 +0 -0
  149. package/styles/fonts/spezia.css +12 -12
  150. package/styles/tokens/theme-dark.css +210 -0
  151. package/styles/tokens/theme-light.css +210 -0
  152. package/text-anchor/index.js +8 -1
  153. package/text-area/index.js +302 -0
  154. package/text-field/index.js +150 -0
  155. package/tooltip/index.js +19 -23
  156. package/lib/text/text.d.ts +0 -10
  157. package/shared/style-inject.es.js +0 -28
  158. package/sidenav-item/index.js +0 -38
  159. package/styles/themes/dark.css +0 -193
  160. package/styles/themes/light.css +0 -193
  161. package/text/index.js +0 -45
@@ -0,0 +1,210 @@
1
+ /**
2
+ * Do not edit directly
3
+ * Generated on Sat, 17 Sep 2022 18:17:14 GMT
4
+ */
5
+ /**
6
+ * Do not edit directly
7
+ * Generated on Sat, 17 Sep 2022 18:17:14 GMT
8
+ */
9
+ /**
10
+ * Do not edit directly
11
+ * Generated on Sat, 17 Sep 2022 18:17:14 GMT
12
+ */
13
+ .vvd-root, ::part(vvd-root) {
14
+ --vvd-color-scheme: light;
15
+ --vvd-color-canvas: #ffffff;
16
+ --vvd-color-canvas-text: #000000;
17
+ --vvd-color-neutral-50: #F2F2F2;
18
+ --vvd-color-neutral-100: #E6E6E6;
19
+ --vvd-color-neutral-200: #cccccc;
20
+ --vvd-color-neutral-300: #b3b3b3;
21
+ --vvd-color-neutral-400: #929292;
22
+ --vvd-color-neutral-500: #757575;
23
+ --vvd-color-neutral-600: #666666;
24
+ --vvd-color-neutral-700: #4d4d4d;
25
+ --vvd-color-neutral-800: #333333;
26
+ --vvd-color-neutral-900: #1a1a1a;
27
+ --vvd-color-neutral-950: #0d0d0d;
28
+ --vvd-color-cta-50: #f5f0fd;
29
+ --vvd-color-cta-100: #ece2fa;
30
+ --vvd-color-cta-200: #dcc1fc;
31
+ --vvd-color-cta-300: #cba1fa;
32
+ --vvd-color-cta-400: #b27bf2;
33
+ --vvd-color-cta-500: #9941ff;
34
+ --vvd-color-cta-600: #871eff;
35
+ --vvd-color-cta-700: #6405d1;
36
+ --vvd-color-cta-800: #440291;
37
+ --vvd-color-cta-900: #26044d;
38
+ --vvd-color-warning-50: #FDF5D4;
39
+ --vvd-color-warning-100: #FDEAA0;
40
+ --vvd-color-warning-200: #FACC4B;
41
+ --vvd-color-warning-300: #fa9f00;
42
+ --vvd-color-warning-400: #e07902;
43
+ --vvd-color-warning-500: #be5702;
44
+ --vvd-color-warning-600: #A64C03;
45
+ --vvd-color-warning-700: #893000;
46
+ --vvd-color-warning-800: #522801;
47
+ --vvd-color-warning-900: #2A1502;
48
+ --vvd-color-information-50: #e8f4fb;
49
+ --vvd-color-information-100: #d3e9fc;
50
+ --vvd-color-information-200: #9dd2fe;
51
+ --vvd-color-information-300: #65baff;
52
+ --vvd-color-information-400: #2997f0;
53
+ --vvd-color-information-500: #0276d5;
54
+ --vvd-color-information-600: #0e65c2;
55
+ --vvd-color-information-700: #094a9e;
56
+ --vvd-color-information-800: #0e306d;
57
+ --vvd-color-information-900: #071939;
58
+ --vvd-color-announcement-50: #ffedfb;
59
+ --vvd-color-announcement-100: #ffdcf7;
60
+ --vvd-color-announcement-200: #f8b9e7;
61
+ --vvd-color-announcement-300: #fb8fd8;
62
+ --vvd-color-announcement-400: #e560bb;
63
+ --vvd-color-announcement-500: #d6219c;
64
+ --vvd-color-announcement-600: #bb1e89;
65
+ --vvd-color-announcement-700: #8f1669;
66
+ --vvd-color-announcement-800: #620256;
67
+ --vvd-color-announcement-900: #32082c;
68
+ --vvd-color-alert-50: #ffeef2;
69
+ --vvd-color-alert-100: #fedfdf;
70
+ --vvd-color-alert-200: #ffbbbb;
71
+ --vvd-color-alert-300: #fe9696;
72
+ --vvd-color-alert-400: #f75959;
73
+ --vvd-color-alert-500: #e61d1d;
74
+ --vvd-color-alert-600: #cd0d0d;
75
+ --vvd-color-alert-700: #9f0202;
76
+ --vvd-color-alert-800: #6e0000;
77
+ --vvd-color-alert-900: #3e0004;
78
+ --vvd-color-success-50: #e1f8e5;
79
+ --vvd-color-success-100: #cfeed4;
80
+ --vvd-color-success-200: #86e090;
81
+ --vvd-color-success-300: #53ca6a;
82
+ --vvd-color-success-400: #30a849;
83
+ --vvd-color-success-500: #1c8731;
84
+ --vvd-color-success-600: #167629;
85
+ --vvd-color-success-700: #155923;
86
+ --vvd-color-success-800: #183a1e;
87
+ --vvd-color-success-900: #0a1e11;
88
+ --vvd-color-surface-0dp: #ffffff;
89
+ --vvd-color-surface-2dp: #ffffff;
90
+ --vvd-color-surface-4dp: #ffffff;
91
+ --vvd-color-surface-8dp: #ffffff;
92
+ --vvd-color-surface-12dp: #ffffff;
93
+ --vvd-color-surface-16dp: #ffffff;
94
+ --vvd-color-surface-24dp: #ffffff;
95
+ --vvd-shadow-surface-0dp: drop-shadow(1px 0px 0px #cccccc) drop-shadow(0px 1px 0px #cccccc) drop-shadow(0px -1px 0px #cccccc) drop-shadow(-1px 0px 0px #cccccc);
96
+ --vvd-shadow-surface-2dp: drop-shadow(0px 1px 4px #0000001a) drop-shadow(0px 1px 2px #0000000d) drop-shadow(0px 2px 1px #0000000d);
97
+ --vvd-shadow-surface-4dp: drop-shadow(0px 2px 8px #0000001a) drop-shadow(0px 2px 4px #0000000d) drop-shadow(0px 4px 2px #0000000d);
98
+ --vvd-shadow-surface-8dp: drop-shadow(0px 2px 16px #0000001a) drop-shadow(0px 8px 8px #0000000d) drop-shadow(0px 4px 4px #0000000d);
99
+ --vvd-shadow-surface-12dp: drop-shadow(0px 4px 24px #0000001a) drop-shadow(0px 12px 16px #0000000d) drop-shadow(0px 6px 8px #0000000d);
100
+ --vvd-shadow-surface-16dp: drop-shadow(0px 6px 32px #0000001a) drop-shadow(0px 16px 24px #0000000d) drop-shadow(0px 8px 12px #0000000d);
101
+ --vvd-shadow-surface-24dp: drop-shadow(0px 12px 48px #00000033) drop-shadow(0px 24px 32px #0000000d) drop-shadow(0px 12px 16px #0000000d);
102
+ --vvd-font-headline: 500 condensed 66px/88px SpeziaCompleteVariableUpright;
103
+ --vvd-font-subtitle: 500 condensed 52px/68px SpeziaCompleteVariableUpright;
104
+ --vvd-font-heading1: 500 condensed 40px/52px SpeziaCompleteVariableUpright;
105
+ --vvd-font-heading2: 500 condensed 32px/44px SpeziaCompleteVariableUpright;
106
+ --vvd-font-heading3: 500 condensed 26px/36px SpeziaCompleteVariableUpright;
107
+ --vvd-font-heading4: 500 condensed 20px/28px SpeziaCompleteVariableUpright;
108
+ --vvd-font-base: 400 ultra-condensed 14px/20px SpeziaCompleteVariableUpright;
109
+ --vvd-font-base-bold: 600 ultra-condensed 14px/20px SpeziaCompleteVariableUpright;
110
+ --vvd-font-base-code: 400 ultra-condensed 14px/20px SpeziaMonoCompleteVariable;
111
+ --vvd-font-base-extended: 400 ultra-condensed 16px/24px SpeziaCompleteVariableUpright;
112
+ --vvd-font-base-extended-bold: 600 ultra-condensed 16px/24px SpeziaCompleteVariableUpright;
113
+ --vvd-font-base-extended-code: 400 ultra-condensed 16px/24px SpeziaMonoCompleteVariable;
114
+ --vvd-font-base-condensed: 400 ultra-condensed 12px/16px SpeziaCompleteVariableUpright;
115
+ --vvd-font-base-condensed-bold: 600 ultra-condensed 12px/16px SpeziaCompleteVariableUpright;
116
+ --vvd-font-base-condensed-code: 400 ultra-condensed 12px/16px SpeziaMonoCompleteVariable;
117
+ }
118
+
119
+ .vvd-theme-alternate, ::part(vvd-theme-alternate) {
120
+ --vvd-color-scheme: dark;
121
+ --vvd-color-canvas: #000000;
122
+ --vvd-color-canvas-text: #ffffff;
123
+ --vvd-color-neutral-50: #1a1a1a;
124
+ --vvd-color-neutral-100: #333333;
125
+ --vvd-color-neutral-200: #4d4d4d;
126
+ --vvd-color-neutral-300: #666666;
127
+ --vvd-color-neutral-400: #757575;
128
+ --vvd-color-neutral-500: #929292;
129
+ --vvd-color-neutral-600: #b3b3b3;
130
+ --vvd-color-neutral-700: #cccccc;
131
+ --vvd-color-neutral-800: #E6E6E6;
132
+ --vvd-color-neutral-900: #F2F2F2;
133
+ --vvd-color-neutral-950: #ffffff;
134
+ --vvd-color-cta-50: #26044d;
135
+ --vvd-color-cta-100: #440291;
136
+ --vvd-color-cta-200: #6405d1;
137
+ --vvd-color-cta-300: #871eff;
138
+ --vvd-color-cta-400: #9941ff;
139
+ --vvd-color-cta-500: #b27bf2;
140
+ --vvd-color-cta-600: #cba1fa;
141
+ --vvd-color-cta-700: #dcc1fc;
142
+ --vvd-color-cta-800: #ece2fa;
143
+ --vvd-color-cta-900: #f5f0fd;
144
+ --vvd-color-warning-50: #2A1502;
145
+ --vvd-color-warning-100: #522801;
146
+ --vvd-color-warning-200: #803807;
147
+ --vvd-color-warning-300: #A64C03;
148
+ --vvd-color-warning-400: #be5702;
149
+ --vvd-color-warning-500: #e07902;
150
+ --vvd-color-warning-600: #fa9f00;
151
+ --vvd-color-warning-700: #FACC4B;
152
+ --vvd-color-warning-800: #FDEAA0;
153
+ --vvd-color-warning-900: #FDF5D4;
154
+ --vvd-color-information-50: #071939;
155
+ --vvd-color-information-100: #0e306d;
156
+ --vvd-color-information-200: #094a9e;
157
+ --vvd-color-information-300: #0e65c2;
158
+ --vvd-color-information-400: #0276d5;
159
+ --vvd-color-information-500: #2997f0;
160
+ --vvd-color-information-600: #65baff;
161
+ --vvd-color-information-700: #9dd2fe;
162
+ --vvd-color-information-800: #d3e9fc;
163
+ --vvd-color-information-900: #e8f4fb;
164
+ --vvd-color-announcement-50: #32082c;
165
+ --vvd-color-announcement-100: #620256;
166
+ --vvd-color-announcement-200: #8f1669;
167
+ --vvd-color-announcement-300: #bb1e89;
168
+ --vvd-color-announcement-400: #d6219c;
169
+ --vvd-color-announcement-500: #e560bb;
170
+ --vvd-color-announcement-600: #fb8fd8;
171
+ --vvd-color-announcement-700: #f8b9e7;
172
+ --vvd-color-announcement-800: #ffdcf7;
173
+ --vvd-color-announcement-900: #ffedfb;
174
+ --vvd-color-alert-50: #3e0004;
175
+ --vvd-color-alert-100: #6e0000;
176
+ --vvd-color-alert-200: #9f0202;
177
+ --vvd-color-alert-300: #cd0d0d;
178
+ --vvd-color-alert-400: #e61d1d;
179
+ --vvd-color-alert-500: #f75959;
180
+ --vvd-color-alert-600: #fe9696;
181
+ --vvd-color-alert-700: #ffbbbb;
182
+ --vvd-color-alert-800: #fedfdf;
183
+ --vvd-color-alert-900: #ffeef2;
184
+ --vvd-color-success-50: #0a1e11;
185
+ --vvd-color-success-100: #183a1e;
186
+ --vvd-color-success-200: #155923;
187
+ --vvd-color-success-300: #167629;
188
+ --vvd-color-success-400: #1c8731;
189
+ --vvd-color-success-500: #30a849;
190
+ --vvd-color-success-600: #53ca6a;
191
+ --vvd-color-success-700: #86e090;
192
+ --vvd-color-success-800: #cfeed4;
193
+ --vvd-color-success-900: #e1f8e5;
194
+ --vvd-color-surface-0dp: #0d0d0d;
195
+ --vvd-color-surface-2dp: linear-gradient(#ffffff0f, #ffffff0f), #0d0d0d;
196
+ --vvd-color-surface-4dp: linear-gradient(#ffffff14, #ffffff14), #0d0d0d;
197
+ --vvd-color-surface-8dp: linear-gradient(#ffffff1a, #ffffff1a), #0d0d0d;
198
+ --vvd-color-surface-12dp: linear-gradient(#ffffff1f, #ffffff1f), #0d0d0d;
199
+ --vvd-color-surface-16dp: linear-gradient(#ffffff24, #ffffff24), #0d0d0d;
200
+ --vvd-color-surface-24dp: linear-gradient(#ffffff29, #ffffff29), #0d0d0d;
201
+ --vvd-shadow-surface-0dp: drop-shadow(1px 0px 0px #cccccc) drop-shadow(0px 1px 0px #cccccc) drop-shadow(0px -1px 0px #cccccc) drop-shadow(-1px 0px 0px #cccccc);
202
+ --vvd-shadow-surface-2dp: drop-shadow(0px 1px 4px #00000040) drop-shadow(0px 1px 2px #00000040) drop-shadow(0px 2px 1px #00000040);
203
+ --vvd-shadow-surface-4dp: drop-shadow(0px 2px 8px #00000040) drop-shadow(0px 2px 4px #00000040) drop-shadow(0px 4px 4px #00000040);
204
+ --vvd-shadow-surface-8dp: drop-shadow(0px 2px 16px #00000040) drop-shadow(0px 8px 8px #00000040) drop-shadow(0px 4px 4px #00000040);
205
+ --vvd-shadow-surface-12dp: drop-shadow(0px 4px 24px #00000040) drop-shadow(0px 12px 16px #00000040) drop-shadow(0px 6px 8px #00000040);
206
+ --vvd-shadow-surface-16dp: drop-shadow(0px 6px 32px #00000040) drop-shadow(0px 16px 24px #00000040) drop-shadow(0px 8px 12px #00000040);
207
+ --vvd-shadow-surface-24dp: drop-shadow(0px 12px 48px #00000040) drop-shadow(0px 24px 32px #00000040) drop-shadow(0px 12px 16px #00000040);
208
+ }
209
+
210
+ /*# sourceMappingURL=theme-light.css.map */
@@ -1,13 +1,20 @@
1
1
  import { d as designSystem } from '../shared/index.js';
2
2
  import { T as TextAnchor } from '../shared/text-anchor.js';
3
3
  import { t as textAnchorTemplate } from '../shared/text-anchor.template.js';
4
- import '../shared/web.dom-collections.iterator.js';
5
4
  import '../shared/affix.js';
5
+ import '../shared/web.dom-collections.iterator.js';
6
+ import '../shared/export.js';
7
+ import '../shared/object-keys.js';
8
+ import '../shared/iterators.js';
6
9
  import '../shared/icon.js';
10
+ import '../shared/to-string.js';
7
11
  import '../shared/_has.js';
8
12
  import '../shared/anchor.js';
9
13
  import '../shared/apply-mixins.js';
10
14
  import '../shared/aria-global.js';
15
+ import '../shared/ref.js';
16
+ import '../shared/focus2.js';
17
+ import '../shared/focus.js';
11
18
  import '../shared/class-names.js';
12
19
 
13
20
  const vividTextAnchor = TextAnchor.compose({
@@ -0,0 +1,302 @@
1
+ import '../focus/index.js';
2
+ import { F as FoundationElement, _ as __decorate, a as attr, n as nullableNumberConverter, o as observable, b as __metadata, h as html, d as designSystem } from '../shared/index.js';
3
+ import { D as DelegatesARIATextbox, f as formElements } from '../shared/form-elements.js';
4
+ import { a as applyMixins } from '../shared/apply-mixins.js';
5
+ import { F as FormAssociated } from '../shared/form-associated.js';
6
+ import '../shared/affix.js';
7
+ import { f as focusTemplateFactory } from '../shared/focus2.js';
8
+ import { w as when } from '../shared/when.js';
9
+ import { r as ref } from '../shared/ref.js';
10
+ import { c as classNames } from '../shared/class-names.js';
11
+ import '../shared/focus.js';
12
+ import '../shared/aria-global.js';
13
+ import '../shared/web.dom-collections.iterator.js';
14
+ import '../shared/export.js';
15
+ import '../shared/object-keys.js';
16
+ import '../shared/iterators.js';
17
+ import '../shared/icon.js';
18
+ import '../shared/to-string.js';
19
+ import '../shared/_has.js';
20
+
21
+ class _TextArea extends FoundationElement {
22
+ }
23
+ /**
24
+ * A form-associated base class for the {@link @microsoft/fast-foundation#(TextArea:class)} component.
25
+ *
26
+ * @internal
27
+ */
28
+ class FormAssociatedTextArea extends FormAssociated(_TextArea) {
29
+ constructor() {
30
+ super(...arguments);
31
+ this.proxy = document.createElement("textarea");
32
+ }
33
+ }
34
+
35
+ /**
36
+ * Resize mode for a TextArea
37
+ * @public
38
+ */
39
+ const TextAreaResize = {
40
+ /**
41
+ * No resize.
42
+ */
43
+ none: "none",
44
+ /**
45
+ * Resize vertically and horizontally.
46
+ */
47
+ both: "both",
48
+ /**
49
+ * Resize horizontally.
50
+ */
51
+ horizontal: "horizontal",
52
+ /**
53
+ * Resize vertically.
54
+ */
55
+ vertical: "vertical",
56
+ };
57
+
58
+ /**
59
+ * A Text Area Custom HTML Element.
60
+ * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea | <textarea> element }.
61
+ *
62
+ * @slot - The default slot for the label
63
+ * @csspart label - The label
64
+ * @csspart root - The element wrapping the control
65
+ * @csspart control - The textarea element
66
+ * @fires change - Emits a custom 'change' event when the textarea emits a change event
67
+ *
68
+ * @public
69
+ */
70
+ class TextArea$1 extends FormAssociatedTextArea {
71
+ constructor() {
72
+ super(...arguments);
73
+ /**
74
+ * The resize mode of the element.
75
+ * @public
76
+ * @remarks
77
+ * HTML Attribute: resize
78
+ */
79
+ this.resize = TextAreaResize.none;
80
+ /**
81
+ * Sizes the element horizontally by a number of character columns.
82
+ *
83
+ * @public
84
+ * @remarks
85
+ * HTML Attribute: cols
86
+ */
87
+ this.cols = 20;
88
+ /**
89
+ * @internal
90
+ */
91
+ this.handleTextInput = () => {
92
+ this.value = this.control.value;
93
+ };
94
+ }
95
+ readOnlyChanged() {
96
+ if (this.proxy instanceof HTMLTextAreaElement) {
97
+ this.proxy.readOnly = this.readOnly;
98
+ }
99
+ }
100
+ autofocusChanged() {
101
+ if (this.proxy instanceof HTMLTextAreaElement) {
102
+ this.proxy.autofocus = this.autofocus;
103
+ }
104
+ }
105
+ listChanged() {
106
+ if (this.proxy instanceof HTMLTextAreaElement) {
107
+ this.proxy.setAttribute("list", this.list);
108
+ }
109
+ }
110
+ maxlengthChanged() {
111
+ if (this.proxy instanceof HTMLTextAreaElement) {
112
+ this.proxy.maxLength = this.maxlength;
113
+ }
114
+ }
115
+ minlengthChanged() {
116
+ if (this.proxy instanceof HTMLTextAreaElement) {
117
+ this.proxy.minLength = this.minlength;
118
+ }
119
+ }
120
+ spellcheckChanged() {
121
+ if (this.proxy instanceof HTMLTextAreaElement) {
122
+ this.proxy.spellcheck = this.spellcheck;
123
+ }
124
+ }
125
+ /**
126
+ * Selects all the text in the text area
127
+ *
128
+ * @public
129
+ */
130
+ select() {
131
+ this.control.select();
132
+ /**
133
+ * The select event does not permeate the shadow DOM boundary.
134
+ * This fn effectively proxies the select event,
135
+ * emitting a `select` event whenever the internal
136
+ * control emits a `select` event
137
+ */
138
+ this.$emit("select");
139
+ }
140
+ /**
141
+ * Change event handler for inner control.
142
+ * @remarks
143
+ * "Change" events are not `composable` so they will not
144
+ * permeate the shadow DOM boundary. This fn effectively proxies
145
+ * the change event, emitting a `change` event whenever the internal
146
+ * control emits a `change` event
147
+ * @internal
148
+ */
149
+ handleChange() {
150
+ this.$emit("change");
151
+ }
152
+ /** {@inheritDoc (FormAssociated:interface).validate} */
153
+ validate() {
154
+ super.validate(this.control);
155
+ }
156
+ }
157
+ __decorate([
158
+ attr({ mode: "boolean" })
159
+ ], TextArea$1.prototype, "readOnly", void 0);
160
+ __decorate([
161
+ attr
162
+ ], TextArea$1.prototype, "resize", void 0);
163
+ __decorate([
164
+ attr({ mode: "boolean" })
165
+ ], TextArea$1.prototype, "autofocus", void 0);
166
+ __decorate([
167
+ attr({ attribute: "form" })
168
+ ], TextArea$1.prototype, "formId", void 0);
169
+ __decorate([
170
+ attr
171
+ ], TextArea$1.prototype, "list", void 0);
172
+ __decorate([
173
+ attr({ converter: nullableNumberConverter })
174
+ ], TextArea$1.prototype, "maxlength", void 0);
175
+ __decorate([
176
+ attr({ converter: nullableNumberConverter })
177
+ ], TextArea$1.prototype, "minlength", void 0);
178
+ __decorate([
179
+ attr
180
+ ], TextArea$1.prototype, "name", void 0);
181
+ __decorate([
182
+ attr
183
+ ], TextArea$1.prototype, "placeholder", void 0);
184
+ __decorate([
185
+ attr({ converter: nullableNumberConverter, mode: "fromView" })
186
+ ], TextArea$1.prototype, "cols", void 0);
187
+ __decorate([
188
+ attr({ converter: nullableNumberConverter, mode: "fromView" })
189
+ ], TextArea$1.prototype, "rows", void 0);
190
+ __decorate([
191
+ attr({ mode: "boolean" })
192
+ ], TextArea$1.prototype, "spellcheck", void 0);
193
+ __decorate([
194
+ observable
195
+ ], TextArea$1.prototype, "defaultSlottedNodes", void 0);
196
+ applyMixins(TextArea$1, DelegatesARIATextbox);
197
+
198
+ var css_248z = "/**\n * Do not edit directly\n * Generated on Sat, 17 Sep 2022 18:17:14 GMT\n */\n:host {\n display: inline-block;\n}\n\n.base {\n display: inline-grid;\n width: 100%;\n gap: 4px;\n grid-template-columns: min-content 1fr max-content;\n}\n.base {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--vvd-color-canvas);\n --_appearance-color-outline: var(--vvd-color-neutral-400);\n}\n.base.appearance-ghost {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transaprent;\n --_appearance-color-outline: transaprent;\n}\n.base:where(:hover, .hover):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--vvd-color-canvas);\n --_appearance-color-outline: var(--vvd-color-canvas-text);\n}\n.base:where(:hover, .hover):where(:not(:disabled, .disabled)).appearance-ghost {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-faint);\n --_appearance-color-outline: transaprent;\n}\n.base:where(:disabled, .disabled) {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: var(--vvd-color-neutral-100);\n --_appearance-color-outline: var(--vvd-color-neutral-400);\n}\n.base:where(:disabled, .disabled).appearance-ghost {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: transaprent;\n --_appearance-color-outline: transaprent;\n}\n.base:where(:readonly, .readonly):where(:not(:disabled, .disabled, :hover, .hover, :active, .active)) {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--vvd-color-neutral-100);\n --_appearance-color-outline: var(--vvd-color-neutral-400);\n}\n.base:where(:readonly, .readonly):where(:not(:disabled, .disabled, :hover, .hover, :active, .active)).appearance-ghost {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: transaprent;\n --_appearance-color-outline: transaprent;\n}\n.base:where(.error):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--vvd-color-alert-500);\n --_appearance-color-fill: var(--vvd-color-alert-100);\n --_appearance-color-outline: var(--vvd-color-alert-500);\n}\n.base:where(.error):where(:not(:disabled, .disabled)).appearance-ghost {\n --_appearance-color-text: transparent;\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n@supports (user-select: none) {\n .base {\n user-select: none;\n }\n}\n.base:not(.disabled) {\n --_low-ink-color: var(--vvd-color-neutral-600);\n}\n.base.disabled {\n --_low-ink-color: var(--vvd-color-neutral-400);\n pointer-events: none;\n}\n\n.label {\n contain: inline-size;\n font: var(--vvd-font-base);\n grid-column: 1/4;\n grid-row: 1;\n line-height: 20px;\n}\n.base:not(.disabled) .label {\n color: var(--vvd-color-canvas-text);\n}\n.base.disabled .label {\n color: var(--vvd-color-neutral-400);\n}\n\n.fieldset {\n position: relative;\n display: flex;\n align-items: center;\n border-radius: 6px;\n grid-column: 1/4;\n}\n\n.control {\n width: 100%;\n padding: 8px 16px;\n border: 0 none;\n background-color: var(--_appearance-color-fill);\n border-radius: inherit;\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: var(--_appearance-color-text);\n font: var(--vvd-font-base);\n min-block-size: 40px;\n transition: box-shadow 0.2s, background-color 0.2s, color 0.2s;\n}\n@supports selector(:focus-visible) {\n .control:focus {\n outline: none;\n }\n}\n.control::placeholder {\n color: var(--_low-ink-color);\n}\n\n.helper-text {\n color: var(--_low-ink-color);\n font: var(--vvd-font-base-condensed);\n grid-column: 1/4;\n}\n\n.error-message {\n display: flex;\n color: var(--vvd-color-canvas-text);\n contain: inline-size;\n font: var(--vvd-font-base-condensed);\n grid-column: 2/4;\n}\n.error-message-icon {\n color: var(--vvd-color-alert-500);\n font-size: 16px;\n grid-column: 1/2;\n}\n\n.focus-indicator {\n --focus-stroke-gap-color: transparent;\n pointer-events: none;\n}\n.fieldset:not(:focus-visible, :focus-within) > .focus-indicator {\n display: none;\n}";
199
+
200
+ let TextArea = class TextArea extends TextArea$1 {};
201
+
202
+ __decorate([attr, __metadata("design:type", String)], TextArea.prototype, "wrap", void 0);
203
+
204
+ TextArea = __decorate([formElements], TextArea);
205
+
206
+ let _ = t => t,
207
+ _t,
208
+ _t2,
209
+ _t3,
210
+ _t4;
211
+
212
+ const getClasses = ({
213
+ value,
214
+ errorValidationMessage,
215
+ disabled,
216
+ placeholder,
217
+ readOnly
218
+ }) => classNames('base', ['readonly', readOnly], ['placeholder', Boolean(placeholder)], ['disabled', disabled], ['error', Boolean(errorValidationMessage)], ['has-value', Boolean(value)]);
219
+
220
+ function renderLabel() {
221
+ return html(_t || (_t = _`
222
+ <label for="control" class="label">
223
+ ${0}
224
+ </label>`), x => x.label);
225
+ }
226
+
227
+ function renderHelperText() {
228
+ return html(_t2 || (_t2 = _`<span class="helper-text">${0}</span>`), x => x.helperText);
229
+ }
230
+
231
+ function renderErrorMessage() {
232
+ return html(_t3 || (_t3 = _`
233
+ <vwc-icon class="error-message-icon" type="info-negative"></vwc-icon>
234
+ <span class="error-message">${0}</span>
235
+ `), x => x.errorValidationMessage);
236
+ }
237
+
238
+ const TextAreaTemplate = context => {
239
+ const focusTemplate = focusTemplateFactory(context);
240
+ return html(_t4 || (_t4 = _`
241
+ <div class="${0}">
242
+ ${0}
243
+ <div class="fieldset">
244
+ <textarea class="control"
245
+ ?autofocus="${0}"
246
+ placeholder="${0}"
247
+ name="${0}"
248
+ maxlength="${0}"
249
+ rows="${0}"
250
+ cols="${0}"
251
+ wrap="${0}"
252
+ ?readonly="${0}"
253
+ ?required="${0}"
254
+ ?spellcheck="${0}"
255
+ :value="${0}"
256
+ aria-atomic="${0}"
257
+ aria-busy="${0}"
258
+ aria-controls="${0}"
259
+ aria-current="${0}"
260
+ aria-describedby="${0}"
261
+ aria-details="${0}"
262
+ aria-disabled="${0}"
263
+ aria-errormessage="${0}"
264
+ aria-flowto="${0}"
265
+ aria-haspopup="${0}"
266
+ aria-hidden="${0}"
267
+ aria-invalid="${0}"
268
+ aria-keyshortcuts="${0}"
269
+ aria-label="${0}"
270
+ aria-labelledby="${0}"
271
+ aria-live="${0}"
272
+ aria-owns="${0}"
273
+ aria-relevant="${0}"
274
+ aria-roledescription="${0}"
275
+ @input="${0}"
276
+ @change="${0}"
277
+ ${0}
278
+ >
279
+ </textarea>
280
+ ${0}
281
+ </div>
282
+ ${0}
283
+ ${0}
284
+ </div>
285
+ `), getClasses, when(x => x.label, renderLabel()), x => x.autofocus, x => x.placeholder ? x.placeholder : null, x => x.name ? x.name : null, x => x.maxlength ? x.maxlength : null, x => x.rows ? x.rows : null, x => x.cols ? x.cols : null, x => x.wrap ? x.wrap : null, x => x.readOnly, x => x.required, x => x.spellcheck, x => x.value, x => x.ariaAtomic, x => x.ariaBusy, x => x.ariaControls, x => x.ariaCurrent, x => x.ariaDescribedby, x => x.ariaDetails, x => x.ariaDisabled, x => x.ariaErrormessage, x => x.ariaFlowto, x => x.ariaHaspopup, x => x.ariaHidden, x => x.ariaInvalid, x => x.ariaKeyshortcuts, x => x.ariaLabel, x => x.ariaLabelledby, x => x.ariaLive, x => x.ariaOwns, x => x.ariaRelevant, x => x.ariaRoledescription, x => x.handleTextInput(), x => x.handleChange(), ref('control'), () => focusTemplate, when(x => {
286
+ var _a;
287
+
288
+ return !x.errorValidationMessage && ((_a = x.helperText) === null || _a === void 0 ? void 0 : _a.length);
289
+ }, renderHelperText()), when(x => x.errorValidationMessage, renderErrorMessage()));
290
+ };
291
+
292
+ const vividTextArea = TextArea.compose({
293
+ baseName: 'text-area',
294
+ template: TextAreaTemplate,
295
+ styles: css_248z,
296
+ shadowOptions: {
297
+ delegatesFocus: true
298
+ }
299
+ });
300
+ designSystem.register(vividTextArea());
301
+
302
+ export { vividTextArea };