@vonage/vivid 4.17.0 → 4.18.0
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/custom-elements.json +3903 -3860
- package/date-time-picker/index.cjs +5 -0
- package/date-time-picker/index.js +3 -0
- package/dial-pad/index.cjs +1 -1
- package/dial-pad/index.js +1 -1
- package/dialog/index.cjs +1 -1
- package/dialog/index.js +1 -1
- package/divider/index.cjs +1 -1
- package/divider/index.js +1 -1
- package/elevation/index.cjs +1 -1
- package/elevation/index.js +1 -1
- package/empty-state/index.cjs +1 -1
- package/empty-state/index.js +1 -1
- package/fab/index.cjs +1 -1
- package/fab/index.js +1 -1
- package/file-picker/index.cjs +1 -1
- package/file-picker/index.js +1 -1
- package/header/index.cjs +1 -1
- package/header/index.js +1 -1
- package/icon/index.cjs +1 -1
- package/icon/index.js +1 -1
- package/index.cjs +136 -133
- package/index.js +45 -44
- package/layout/index.cjs +1 -1
- package/layout/index.js +1 -1
- package/lib/action-group/action-group.d.ts +449 -3
- package/lib/banner/banner.d.ts +449 -3
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +449 -1
- package/lib/checkbox/checkbox.d.ts +449 -4
- package/lib/components.d.ts +1 -0
- package/lib/date-picker/date-picker.d.ts +2182 -4
- package/lib/date-picker/date-picker.template.d.ts +2 -0
- package/lib/date-range-picker/date-range-picker.d.ts +1110 -4
- package/lib/date-range-picker/date-range-picker.template.d.ts +2 -0
- package/lib/date-time-picker/date-time-picker.d.ts +2175 -0
- package/lib/date-time-picker/date-time-picker.template.d.ts +2 -0
- package/lib/date-time-picker/definition.d.ts +1 -0
- package/lib/date-time-picker/locale.d.ts +9 -0
- package/lib/dialog/dialog.d.ts +449 -2
- package/lib/divider/divider.d.ts +448 -1
- package/lib/menu/menu.d.ts +446 -1
- package/lib/nav-disclosure/nav-disclosure.d.ts +449 -2
- package/lib/number-field/number-field.d.ts +450 -3
- package/lib/option/option.d.ts +1 -11
- package/lib/progress/progress.d.ts +449 -2
- package/lib/progress-ring/progress-ring.d.ts +449 -2
- package/lib/rich-text-editor/facades/vivid-prose-mirror.facade.d.ts +1 -0
- package/lib/rich-text-editor/rich-text-editor.d.ts +7 -4
- package/lib/select/select.d.ts +1 -5
- package/lib/selectable-box/selectable-box.d.ts +449 -2
- package/lib/slider/slider.d.ts +449 -3
- package/lib/split-button/split-button.d.ts +449 -3
- package/lib/switch/switch.d.ts +449 -2
- package/lib/tag-group/tag-group.d.ts +449 -2
- package/lib/text-anchor/text-anchor.d.ts +449 -1
- package/lib/text-area/text-area.d.ts +450 -3
- package/lib/text-field/text-field.d.ts +450 -7
- package/lib/time-picker/locale.d.ts +0 -2
- package/lib/time-picker/time-picker.d.ts +1053 -9
- package/lib/time-picker/time-picker.template.d.ts +2 -1
- package/locales/de-DE.cjs +29 -5
- package/locales/de-DE.js +29 -5
- package/locales/en-GB.cjs +29 -5
- package/locales/en-GB.js +29 -5
- package/locales/en-US.cjs +29 -5
- package/locales/en-US.js +29 -5
- package/locales/ja-JP.cjs +29 -5
- package/locales/ja-JP.js +29 -5
- package/locales/zh-CN.cjs +29 -5
- package/locales/zh-CN.js +29 -5
- package/menu/index.cjs +1 -1
- package/menu/index.js +1 -1
- package/menu-item/index.cjs +1 -1
- package/menu-item/index.js +1 -1
- package/nav/index.cjs +1 -1
- package/nav/index.js +1 -1
- package/nav-disclosure/index.cjs +1 -1
- package/nav-disclosure/index.js +1 -1
- package/nav-item/index.cjs +1 -1
- package/nav-item/index.js +1 -1
- package/note/index.cjs +1 -1
- package/note/index.js +1 -1
- package/number-field/index.cjs +1 -1
- package/number-field/index.js +1 -1
- package/option/index.cjs +1 -1
- package/option/index.js +1 -1
- package/package.json +1 -1
- package/pagination/index.cjs +1 -1
- package/pagination/index.js +1 -1
- package/popup/index.cjs +1 -1
- package/popup/index.js +1 -1
- package/progress/index.cjs +1 -1
- package/progress/index.js +1 -1
- package/progress-ring/index.cjs +1 -1
- package/progress-ring/index.js +1 -1
- package/radio/index.cjs +1 -1
- package/radio/index.js +1 -1
- package/radio-group/index.cjs +1 -1
- package/radio-group/index.js +1 -1
- package/range-slider/index.cjs +1 -1
- package/range-slider/index.js +1 -1
- package/rich-text-editor/index.cjs +1 -1
- package/rich-text-editor/index.js +1 -1
- package/searchable-select/index.cjs +1 -1
- package/searchable-select/index.js +1 -1
- package/select/index.cjs +1 -1
- package/select/index.js +1 -1
- package/selectable-box/index.cjs +1 -1
- package/selectable-box/index.js +1 -1
- package/shared/Reflector.cjs +71 -0
- package/shared/Reflector.js +69 -0
- package/shared/affix.cjs +1 -1
- package/shared/affix.js +1 -1
- package/shared/anchor.cjs +0 -10
- package/shared/anchor.js +0 -10
- package/shared/aria/delegates-aria.d.ts +454 -0
- package/shared/base-progress.js +1 -1
- package/shared/breadcrumb-item.cjs +2 -1
- package/shared/breadcrumb-item.js +2 -1
- package/shared/button.cjs +2 -13
- package/shared/button.js +2 -13
- package/shared/{presentationDate.cjs → calendar-picker.template.cjs} +730 -900
- package/shared/{presentationDate.js → calendar-picker.template.js} +672 -845
- package/shared/datetime/dateTimeStr.d.ts +6 -0
- package/shared/datetime/presentationDate.d.ts +4 -0
- package/shared/{date-picker/calendar → datetime}/presentationDateRange.d.ts +3 -3
- package/shared/datetime/presentationDateTime.d.ts +4 -0
- package/{lib/time-picker/time → shared/datetime}/time.d.ts +1 -0
- package/shared/definition.cjs +1 -1
- package/shared/definition.js +1 -1
- package/shared/definition11.cjs +8 -11
- package/shared/definition11.js +8 -11
- package/shared/definition14.cjs +2 -2
- package/shared/definition14.js +2 -2
- package/shared/definition15.cjs +3 -10
- package/shared/definition15.js +3 -10
- package/shared/definition16.cjs +29 -33
- package/shared/definition16.js +29 -33
- package/shared/definition17.cjs +1 -1
- package/shared/definition17.js +1 -1
- package/shared/definition18.cjs +56 -91
- package/shared/definition18.js +56 -91
- package/shared/definition19.cjs +68 -32
- package/shared/definition19.js +58 -22
- package/shared/definition20.cjs +253 -220
- package/shared/definition20.js +254 -220
- package/shared/definition21.cjs +200 -286
- package/shared/definition21.js +198 -284
- package/shared/definition22.cjs +302 -31
- package/shared/definition22.js +301 -30
- package/shared/definition23.cjs +37 -58
- package/shared/definition23.js +36 -57
- package/shared/definition24.cjs +50 -70
- package/shared/definition24.js +49 -69
- package/shared/definition25.cjs +75 -2475
- package/shared/definition25.js +74 -2475
- package/shared/definition26.cjs +2480 -50
- package/shared/definition26.js +2479 -48
- package/shared/definition27.cjs +53 -271
- package/shared/definition27.js +52 -269
- package/shared/definition28.cjs +271 -48
- package/shared/definition28.js +269 -47
- package/shared/definition29.cjs +37 -764
- package/shared/definition29.js +36 -758
- package/shared/definition3.cjs +2 -9
- package/shared/definition3.js +2 -9
- package/shared/definition30.cjs +739 -57
- package/shared/definition30.js +733 -56
- package/shared/definition31.cjs +93 -22
- package/shared/definition31.js +92 -21
- package/shared/definition32.cjs +28 -10
- package/shared/definition32.js +27 -9
- package/shared/definition33.cjs +10 -52
- package/shared/definition33.js +9 -51
- package/shared/definition34.cjs +30 -411
- package/shared/definition34.js +30 -412
- package/shared/definition35.cjs +422 -52
- package/shared/definition35.js +423 -53
- package/shared/definition36.cjs +53 -216
- package/shared/definition36.js +53 -215
- package/shared/definition37.cjs +201 -71
- package/shared/definition37.js +200 -70
- package/shared/definition38.cjs +53 -48
- package/shared/definition38.js +51 -46
- package/shared/definition39.cjs +57 -263
- package/shared/definition39.js +56 -262
- package/shared/definition4.cjs +2 -2
- package/shared/definition4.js +2 -2
- package/shared/definition40.cjs +220 -148
- package/shared/definition40.js +220 -148
- package/shared/definition41.cjs +143 -567
- package/shared/definition41.js +143 -568
- package/shared/definition42.cjs +596 -12573
- package/shared/definition42.js +596 -12573
- package/shared/definition43.cjs +13489 -1058
- package/shared/definition43.js +13489 -1059
- package/shared/definition44.cjs +936 -698
- package/shared/definition44.js +937 -698
- package/shared/definition45.cjs +850 -105
- package/shared/definition45.js +850 -104
- package/shared/definition46.cjs +110 -90
- package/shared/definition46.js +108 -88
- package/shared/definition47.cjs +88 -464
- package/shared/definition47.js +87 -463
- package/shared/definition48.cjs +457 -111
- package/shared/definition48.js +456 -110
- package/shared/definition49.cjs +103 -109
- package/shared/definition49.js +102 -108
- package/shared/definition5.cjs +3 -3
- package/shared/definition5.js +3 -3
- package/shared/definition50.cjs +136 -14
- package/shared/definition50.js +135 -13
- package/shared/definition51.cjs +16 -115
- package/shared/definition51.js +15 -114
- package/shared/definition52.cjs +79 -486
- package/shared/definition52.js +78 -485
- package/shared/definition53.cjs +503 -24
- package/shared/definition53.js +502 -23
- package/shared/definition54.cjs +23 -137
- package/shared/definition54.js +22 -136
- package/shared/definition55.cjs +96 -241
- package/shared/definition55.js +95 -241
- package/shared/definition56.cjs +261 -61
- package/shared/definition56.js +260 -60
- package/shared/definition57.cjs +419 -788
- package/shared/definition57.js +420 -789
- package/shared/definition58.cjs +27 -144
- package/shared/definition58.js +27 -143
- package/shared/definition59.cjs +83 -54
- package/shared/definition59.js +82 -53
- package/shared/definition6.cjs +1 -1
- package/shared/definition6.js +1 -1
- package/shared/definition60.cjs +80 -165
- package/shared/definition60.js +79 -163
- package/shared/definition61.cjs +143 -230
- package/shared/definition61.js +141 -229
- package/shared/definition62.cjs +233 -69344
- package/shared/definition62.js +232 -69343
- package/shared/definition63.cjs +69381 -28
- package/shared/definition63.js +69379 -26
- package/shared/definition64.cjs +28 -2168
- package/shared/definition64.js +27 -2166
- package/shared/definition65.cjs +2195 -0
- package/shared/definition65.js +2190 -0
- package/shared/definition7.cjs +1 -1
- package/shared/definition7.js +1 -1
- package/shared/definition8.cjs +3 -9
- package/shared/definition8.js +3 -9
- package/shared/definition9.cjs +1 -1
- package/shared/definition9.js +1 -1
- package/shared/delegates-aria.cjs +69 -0
- package/shared/delegates-aria.js +67 -0
- package/shared/form-associated.js +1 -1
- package/shared/form-elements.cjs +1 -1
- package/shared/form-elements.js +1 -1
- package/shared/foundation/anchor/anchor.d.ts +0 -8
- package/shared/foundation/button/button.d.ts +449 -7
- package/shared/foundation/listbox/listbox.d.ts +0 -9
- package/shared/listbox.cjs +4 -30
- package/shared/listbox.js +4 -30
- package/shared/localization/Locale.d.ts +6 -2
- package/shared/option.cjs +1 -38
- package/shared/option.js +1 -38
- package/shared/picker-field/locale.d.ts +4 -0
- package/shared/picker-field/mixins/calendar-picker.d.ts +558 -0
- package/shared/{date-picker/locale.d.ts → picker-field/mixins/calendar-picker.locale.d.ts} +1 -3
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +555 -0
- package/shared/picker-field/mixins/calendar-segments/calendarGrid.d.ts +17 -0
- package/shared/{date-picker/calendar → picker-field/mixins/calendar-segments}/monthPickerGrid.d.ts +3 -3
- package/{lib/time-picker → shared/picker-field/mixins}/inline-time-picker/columns.d.ts +1 -1
- package/{lib/time-picker → shared/picker-field/mixins}/inline-time-picker/inline-time-picker.d.ts +2 -2
- package/{lib/time-picker/time/picker.d.ts → shared/picker-field/mixins/inline-time-picker/picker-option.d.ts} +1 -1
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +1110 -0
- package/shared/picker-field/mixins/single-date-picker.d.ts +1626 -0
- package/shared/picker-field/mixins/single-value-picker.d.ts +518 -0
- package/shared/picker-field/mixins/time-selection-picker.d.ts +1053 -0
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +1050 -0
- package/shared/picker-field/picker-field.d.ts +11 -0
- package/shared/picker-field/picker-field.form-associated.d.ts +11 -0
- package/shared/picker-field/picker-field.template.d.ts +7 -0
- package/shared/picker-field.template.cjs +315 -0
- package/shared/picker-field.template.js +310 -0
- package/shared/single-date-picker.cjs +46 -0
- package/shared/single-date-picker.js +44 -0
- package/shared/single-value-picker.cjs +77 -0
- package/shared/single-value-picker.js +75 -0
- package/shared/slider.template.cjs +3 -3
- package/shared/slider.template.js +3 -3
- package/shared/text-anchor.cjs +2 -1
- package/shared/text-anchor.js +2 -1
- package/shared/text-anchor.template.cjs +3 -5
- package/shared/text-anchor.template.js +3 -5
- package/shared/text-field.cjs +2 -555
- package/shared/text-field.js +2 -554
- package/shared/time-selection-picker.template.cjs +776 -0
- package/shared/time-selection-picker.template.js +767 -0
- package/shared/vivid-element.cjs +1 -1
- package/shared/vivid-element.js +1 -1
- package/side-drawer/index.cjs +1 -1
- package/side-drawer/index.js +1 -1
- package/slider/index.cjs +1 -1
- package/slider/index.js +1 -1
- package/split-button/index.cjs +1 -1
- package/split-button/index.js +1 -1
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/switch/index.cjs +1 -1
- package/switch/index.js +1 -1
- package/tab/index.cjs +1 -1
- package/tab/index.js +1 -1
- package/tab-panel/index.cjs +1 -1
- package/tab-panel/index.js +1 -1
- package/tabs/index.cjs +1 -1
- package/tabs/index.js +1 -1
- package/tag/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/tag-group/index.cjs +1 -1
- package/tag-group/index.js +1 -1
- package/text-anchor/index.cjs +1 -1
- package/text-anchor/index.js +1 -1
- package/text-area/index.cjs +1 -1
- package/text-area/index.js +1 -1
- package/text-field/index.cjs +1 -1
- package/text-field/index.js +1 -1
- package/time-picker/index.cjs +1 -1
- package/time-picker/index.js +1 -1
- package/toggletip/index.cjs +1 -1
- package/toggletip/index.js +1 -1
- package/tooltip/index.cjs +1 -1
- package/tooltip/index.js +1 -1
- package/tree-item/index.cjs +1 -1
- package/tree-item/index.js +1 -1
- package/tree-view/index.cjs +1 -1
- package/tree-view/index.js +1 -1
- package/video-player/index.cjs +1 -1
- package/video-player/index.js +1 -1
- package/vivid.api.json +105 -1152
- package/lib/time-picker/time-picker.form-associated.d.ts +0 -11
- package/shared/aria-global.cjs +0 -93
- package/shared/aria-global.js +0 -91
- package/shared/date-picker/calendar/calendarGrid.d.ts +0 -17
- package/shared/date-picker/calendar/presentationDate.d.ts +0 -4
- package/shared/date-picker/date-picker-base.d.ts +0 -21
- package/shared/date-picker/date-picker-base.form-associated.d.ts +0 -11
- package/shared/date-picker/date-picker-base.template.d.ts +0 -3
- package/shared/foundation/patterns/aria-global.d.ts +0 -21
- package/shared/foundation/patterns/index.d.ts +0 -1
- package/shared/text-field2.cjs +0 -5
- package/shared/text-field2.js +0 -3
- package/shared/trapped-focus.cjs +0 -35
- package/shared/trapped-focus.js +0 -33
- /package/shared/{date-picker/calendar → datetime}/dateRange.d.ts +0 -0
- /package/shared/{date-picker/calendar → datetime}/dateStr.d.ts +0 -0
- /package/shared/{date-picker/calendar → datetime}/month.d.ts +0 -0
- /package/{lib/time-picker/time → shared/datetime}/presentationTime.d.ts +0 -0
- /package/shared/{date-picker/calendar → datetime}/year.d.ts +0 -0
- /package/shared/{date-picker/calendar → picker-field/mixins/calendar-segments}/segment.d.ts +0 -0
- /package/{lib/time-picker → shared/picker-field/mixins}/inline-time-picker/definition.d.ts +0 -0
- /package/{lib/time-picker → shared/picker-field/mixins}/inline-time-picker/inline-time-picker.template.d.ts +0 -0
package/shared/definition56.js
CHANGED
|
@@ -1,43 +1,229 @@
|
|
|
1
|
-
import { i as iconDefinition } from './
|
|
2
|
-
import { h as html, d as createRegisterFunction, f as defineVividComponent } from './vivid-element.js';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { i as iconDefinition } from './definition28.js';
|
|
2
|
+
import { V as VividElement, a as attr, n as nullableNumberConverter, o as observable, h as html, d as createRegisterFunction, f as defineVividComponent } from './vivid-element.js';
|
|
3
|
+
import { R as Reflector } from './Reflector.js';
|
|
4
|
+
import { a as applyMixinsWithObservables } from './applyMixinsWithObservables.js';
|
|
5
|
+
import { D as DelegatesAria } from './delegates-aria.js';
|
|
6
|
+
import { F as FormAssociated } from './form-associated.js';
|
|
7
|
+
import { F as FormElementSuccessText, a as FormElementHelperText, b as FormElementCharCount, e as errorText, f as formElements, g as getFeedbackTemplate } from './form-elements.js';
|
|
6
8
|
import { c as classNames } from './class-names.js';
|
|
7
9
|
import { w as when } from './when.js';
|
|
8
|
-
import {
|
|
9
|
-
import { g as getFeedbackTemplate } from './form-elements.js';
|
|
10
|
+
import { r as ref } from './ref.js';
|
|
10
11
|
|
|
11
|
-
const
|
|
12
|
+
const styles = ":host{display:inline-block}.base{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--_connotation-color-intermediate)}.base.appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--_connotation-color-fierce)}.base:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)).appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.base:where(.disabled,:disabled){--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: var(--vvd-color-neutral-300)}.base:where(.disabled,:disabled).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.readonly):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: var(--vvd-color-neutral-400)}.base:where(.readonly):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-600);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.error):where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: var(--vvd-color-alert-500)}.base:where(.error):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: transparent}.base:where(.success):where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: var(--vvd-color-success-500)}.base:where(.success):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: transparent}.base.connotation-success{--_connotation-color-primary: var(--vvd-text-area-success-primary, var(--vvd-color-success-500));--_connotation-color-primary-text: var(--vvd-text-area-success-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-text-area-success-primary-increment, var(--vvd-color-success-600));--_connotation-color-intermediate: var(--vvd-text-area-success-intermediate, var(--vvd-color-success-500));--_connotation-color-firm: var(--vvd-text-area-success-firm, var(--vvd-color-success-600));--_connotation-color-fierce: var(--vvd-text-area-success-fierce, var(--vvd-color-success-700));--_connotation-color-faint: var(--vvd-text-area-success-faint, var(--vvd-color-success-50));--_connotation-color-soft: var(--vvd-text-area-success-soft, var(--vvd-color-success-100))}.base.connotation-alert{--_connotation-color-primary: var(--vvd-text-area-alert-primary, var(--vvd-color-alert-500));--_connotation-color-primary-text: var(--vvd-text-area-alert-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-text-area-alert-primary-increment, var(--vvd-color-alert-600));--_connotation-color-intermediate: var(--vvd-text-area-alert-intermediate, var(--vvd-color-alert-500));--_connotation-color-firm: var(--vvd-text-area-alert-firm, var(--vvd-color-alert-600));--_connotation-color-fierce: var(--vvd-text-area-alert-fierce, var(--vvd-color-alert-700));--_connotation-color-faint: var(--vvd-text-area-alert-faint, var(--vvd-color-alert-50));--_connotation-color-soft: var(--vvd-text-area-alert-soft, var(--vvd-color-alert-100))}.base:not(.connotation-success,.connotation-alert){--_connotation-color-primary: var(--vvd-text-area-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-text-area-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-text-area-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-intermediate: var(--vvd-text-area-accent-intermediate, var(--vvd-color-neutral-500));--_connotation-color-firm: var(--vvd-text-area-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-fierce: var(--vvd-text-area-accent-fierce, var(--vvd-color-neutral-700));--_connotation-color-faint: var(--vvd-text-area-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-text-area-accent-soft, var(--vvd-color-neutral-100))}.base{display:inline-grid;grid-template-columns:1fr max-content;inline-size:100%;row-gap:4px}@supports (user-select: none){.base{user-select:none}}.base:not(.disabled){--_low-ink-color: var(--vvd-color-neutral-600)}.base.disabled{--_low-ink-color: var(--_appearance-color-text);cursor:not-allowed}.label{color:var(--vvd-color-canvas-text);contain:inline-size;font:var(--vvd-typography-base);grid-column:1/2;grid-row:1;line-height:20px}.char-count{color:var(--_low-ink-color);font:var(--vvd-typography-base);grid-column:2/-1}.control{--scrollbar-track-color: transparent;--scrollbar-thumb-color: color-mix(in srgb, var(--vvd-color-neutral-950), transparent 70%)}.control{scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}.control ::-webkit-scrollbar{width:4px}.control ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.control ::-webkit-scrollbar-thumb{border:0;border-radius:4px;background-color:var(--scrollbar-thumb-color)}.control{box-sizing:border-box;padding:8px 16px;border:0 none;border-radius:8px;appearance:none;background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_appearance-color-text);font:var(--vvd-typography-base);grid-column:1/-1;min-block-size:calc(1px*(32 + 4*clamp(-1,var(--vvd-size-density, 0),2)));resize:none;transition:box-shadow .2s,background-color .2s,color .2s}@supports selector(::-webkit-resizer){.control::-webkit-resizer{background-image:linear-gradient(315deg,transparent 0,transparent 2px,var(--vvd-color-canvas-text) 2px,var(--vvd-color-canvas-text) 3px,transparent 3px,transparent 5px,var(--vvd-color-canvas-text) 5px,var(--vvd-color-canvas-text) 6px,transparent 6px,transparent 8px,transparent 100%);background-repeat:no-repeat;background-size:10px 10px;block-size:10px;inline-size:10px}}.control:disabled{opacity:1;pointer-events:none;-webkit-text-fill-color:var(--_appearance-color-text)}.control::placeholder,.control:disabled::placeholder{opacity:1;pointer-events:none;-webkit-text-fill-color:var(--_low-ink-color)}.control:focus-visible{--focus-stroke-gap-color: transparent;box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px))}:host([resize=both]) .control{resize:both}:host([resize=horizontal]) .control{resize:horizontal}:host([resize=vertical]) .control{resize:vertical}";
|
|
13
|
+
|
|
14
|
+
class _TextArea extends VividElement {
|
|
15
|
+
}
|
|
16
|
+
class FormAssociatedTextArea extends FormAssociated(_TextArea) {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments);
|
|
19
|
+
this.proxy = document.createElement("textarea");
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
var __defProp = Object.defineProperty;
|
|
24
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
25
|
+
var __typeError = (msg) => {
|
|
26
|
+
throw TypeError(msg);
|
|
27
|
+
};
|
|
28
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
29
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
30
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
31
|
+
if (decorator = decorators[i])
|
|
32
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
33
|
+
if (kind && result) __defProp(target, key, result);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
37
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
38
|
+
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
39
|
+
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
|
|
40
|
+
var _reflectToTextArea;
|
|
41
|
+
const TextAreaResize = {
|
|
42
|
+
/**
|
|
43
|
+
* No resize.
|
|
44
|
+
*/
|
|
45
|
+
none: "none"};
|
|
46
|
+
let TextArea = class extends DelegatesAria(FormAssociatedTextArea) {
|
|
47
|
+
constructor() {
|
|
48
|
+
super(...arguments);
|
|
49
|
+
// eslint-disable-next-line @nrwl/nx/workspace/no-attribute-default-value
|
|
50
|
+
this.resize = TextAreaResize.none;
|
|
51
|
+
this.cols = 20;
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
this.handleTextInput = () => {
|
|
56
|
+
this.value = this.control.value;
|
|
57
|
+
};
|
|
58
|
+
__privateAdd(this, _reflectToTextArea);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
63
|
+
readOnlyChanged() {
|
|
64
|
+
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
65
|
+
this.proxy.readOnly = this.readOnly;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
autofocusChanged() {
|
|
72
|
+
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
73
|
+
this.proxy.autofocus = this.autofocus;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
79
|
+
listChanged() {
|
|
80
|
+
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
81
|
+
this.proxy.setAttribute("list", this.list);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* @internal
|
|
86
|
+
*/
|
|
87
|
+
maxlengthChanged() {
|
|
88
|
+
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
89
|
+
this.proxy.maxLength = this.maxlength;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* @internal
|
|
94
|
+
*/
|
|
95
|
+
minlengthChanged() {
|
|
96
|
+
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
97
|
+
this.proxy.minLength = this.minlength;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* @internal
|
|
102
|
+
*/
|
|
103
|
+
spellcheckChanged() {
|
|
104
|
+
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
105
|
+
this.proxy.spellcheck = this.spellcheck;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Selects all the text in the text area
|
|
110
|
+
*
|
|
111
|
+
* @public
|
|
112
|
+
*/
|
|
113
|
+
select() {
|
|
114
|
+
this.control.select();
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Change event handler for inner control.
|
|
118
|
+
* @remarks
|
|
119
|
+
* "Change" events are not `composable` so they will not
|
|
120
|
+
* permeate the shadow DOM boundary. This fn effectively proxies
|
|
121
|
+
* the change event, emitting a `change` event whenever the internal
|
|
122
|
+
* control emits a `change` event
|
|
123
|
+
* @internal
|
|
124
|
+
*/
|
|
125
|
+
handleChange() {
|
|
126
|
+
this.$emit("change");
|
|
127
|
+
}
|
|
128
|
+
/** {@inheritDoc (FormAssociated:interface).validate} */
|
|
129
|
+
validate() {
|
|
130
|
+
super.validate(this.control);
|
|
131
|
+
}
|
|
132
|
+
connectedCallback() {
|
|
133
|
+
super.connectedCallback();
|
|
134
|
+
__privateSet(this, _reflectToTextArea, new Reflector(this, this.control));
|
|
135
|
+
__privateGet(this, _reflectToTextArea).property("value", "value", true);
|
|
136
|
+
}
|
|
137
|
+
disconnectedCallback() {
|
|
138
|
+
super.disconnectedCallback();
|
|
139
|
+
__privateGet(this, _reflectToTextArea).destroy();
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
_reflectToTextArea = new WeakMap();
|
|
143
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
144
|
+
__decorateClass([
|
|
145
|
+
attr({ mode: "boolean" })
|
|
146
|
+
], TextArea.prototype, "readOnly", 2);
|
|
147
|
+
__decorateClass([
|
|
148
|
+
attr
|
|
149
|
+
], TextArea.prototype, "resize", 2);
|
|
150
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
151
|
+
__decorateClass([
|
|
152
|
+
attr({ mode: "boolean" })
|
|
153
|
+
], TextArea.prototype, "autofocus", 2);
|
|
154
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
155
|
+
__decorateClass([
|
|
156
|
+
attr({ attribute: "form" })
|
|
157
|
+
], TextArea.prototype, "formId", 2);
|
|
158
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
159
|
+
__decorateClass([
|
|
160
|
+
attr
|
|
161
|
+
], TextArea.prototype, "list", 2);
|
|
162
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
163
|
+
__decorateClass([
|
|
164
|
+
attr({ converter: nullableNumberConverter })
|
|
165
|
+
], TextArea.prototype, "maxlength", 2);
|
|
166
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
167
|
+
__decorateClass([
|
|
168
|
+
attr({ converter: nullableNumberConverter })
|
|
169
|
+
], TextArea.prototype, "minlength", 2);
|
|
170
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
171
|
+
__decorateClass([
|
|
172
|
+
attr
|
|
173
|
+
], TextArea.prototype, "name", 2);
|
|
174
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
175
|
+
__decorateClass([
|
|
176
|
+
attr
|
|
177
|
+
], TextArea.prototype, "placeholder", 2);
|
|
178
|
+
__decorateClass([
|
|
179
|
+
attr({ converter: nullableNumberConverter, mode: "fromView" })
|
|
180
|
+
], TextArea.prototype, "cols", 2);
|
|
181
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
182
|
+
__decorateClass([
|
|
183
|
+
attr({ converter: nullableNumberConverter, mode: "fromView" })
|
|
184
|
+
], TextArea.prototype, "rows", 2);
|
|
185
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
186
|
+
__decorateClass([
|
|
187
|
+
attr({ mode: "boolean" })
|
|
188
|
+
], TextArea.prototype, "spellcheck", 2);
|
|
189
|
+
__decorateClass([
|
|
190
|
+
observable
|
|
191
|
+
], TextArea.prototype, "defaultSlottedNodes", 2);
|
|
192
|
+
__decorateClass([
|
|
193
|
+
attr
|
|
194
|
+
], TextArea.prototype, "wrap", 2);
|
|
195
|
+
TextArea = __decorateClass([
|
|
196
|
+
errorText,
|
|
197
|
+
formElements
|
|
198
|
+
], TextArea);
|
|
199
|
+
applyMixinsWithObservables(
|
|
200
|
+
TextArea,
|
|
201
|
+
FormElementCharCount,
|
|
202
|
+
FormElementHelperText,
|
|
203
|
+
FormElementSuccessText
|
|
204
|
+
);
|
|
205
|
+
|
|
206
|
+
const getClasses = ({
|
|
207
|
+
value,
|
|
12
208
|
errorValidationMessage,
|
|
13
209
|
disabled,
|
|
14
|
-
value,
|
|
15
|
-
readOnly,
|
|
16
210
|
placeholder,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
label,
|
|
20
|
-
successText,
|
|
21
|
-
actionItemsSlottedContent,
|
|
22
|
-
leadingActionItemsSlottedContent,
|
|
23
|
-
icon,
|
|
24
|
-
scale
|
|
211
|
+
readOnly,
|
|
212
|
+
successText
|
|
25
213
|
}) => classNames(
|
|
26
|
-
|
|
27
|
-
["disabled", disabled],
|
|
28
|
-
["has-value", Boolean(value)],
|
|
214
|
+
"base",
|
|
29
215
|
["readonly", readOnly],
|
|
30
216
|
["placeholder", Boolean(placeholder)],
|
|
31
|
-
[
|
|
32
|
-
[
|
|
33
|
-
["
|
|
34
|
-
["
|
|
35
|
-
["success", Boolean(successText)],
|
|
36
|
-
["action-items", !!actionItemsSlottedContent?.length],
|
|
37
|
-
["leading-action-items", !!leadingActionItemsSlottedContent?.length],
|
|
38
|
-
["no-leading", !(leadingActionItemsSlottedContent?.length || icon)],
|
|
39
|
-
[`size-${scale}`, Boolean(scale)]
|
|
217
|
+
["disabled", disabled],
|
|
218
|
+
["error", Boolean(errorValidationMessage)],
|
|
219
|
+
["has-value", Boolean(value)],
|
|
220
|
+
["success", !!successText]
|
|
40
221
|
);
|
|
222
|
+
function renderLabel() {
|
|
223
|
+
return html` <label for="control" class="label">
|
|
224
|
+
${(x) => x.label}
|
|
225
|
+
</label>`;
|
|
226
|
+
}
|
|
41
227
|
function renderCharCount() {
|
|
42
228
|
return html`
|
|
43
229
|
<span class="char-count"
|
|
@@ -45,39 +231,53 @@ function renderCharCount() {
|
|
|
45
231
|
>
|
|
46
232
|
`;
|
|
47
233
|
}
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
234
|
+
const TextAreaTemplate = (context) => {
|
|
235
|
+
return html`
|
|
236
|
+
<div class="${getClasses}">
|
|
51
237
|
${when((x) => x.charCount && x.maxlength, renderCharCount())}
|
|
52
|
-
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
238
|
+
${when((x) => x.label, renderLabel())}
|
|
239
|
+
<textarea
|
|
240
|
+
class="control"
|
|
241
|
+
id="control"
|
|
242
|
+
?autofocus="${(x) => x.autofocus}"
|
|
243
|
+
placeholder="${(x) => x.placeholder ? x.placeholder : null}"
|
|
244
|
+
name="${(x) => x.name ? x.name : null}"
|
|
245
|
+
list="${(x) => x.list}"
|
|
246
|
+
minlength="${(x) => x.minlength ? x.minlength : null}"
|
|
247
|
+
maxlength="${(x) => x.maxlength ? x.maxlength : null}"
|
|
248
|
+
rows="${(x) => x.rows ? x.rows : null}"
|
|
249
|
+
cols="${(x) => x.cols ? x.cols : null}"
|
|
250
|
+
wrap="${(x) => x.wrap ? x.wrap : null}"
|
|
251
|
+
?readonly="${(x) => x.readOnly}"
|
|
252
|
+
?disabled="${(x) => x.disabled}"
|
|
253
|
+
?required="${(x) => x.required}"
|
|
254
|
+
?spellcheck="${(x) => x.spellcheck}"
|
|
255
|
+
aria-atomic="${(x) => x.ariaAtomic}"
|
|
256
|
+
aria-busy="${(x) => x.ariaBusy}"
|
|
257
|
+
aria-current="${(x) => x.ariaCurrent}"
|
|
258
|
+
aria-disabled="${(x) => x.ariaDisabled}"
|
|
259
|
+
aria-haspopup="${(x) => x.ariaHasPopup}"
|
|
260
|
+
aria-hidden="${(x) => x.ariaHidden}"
|
|
261
|
+
aria-invalid="${(x) => x.ariaInvalid}"
|
|
262
|
+
aria-keyshortcuts="${(x) => x.ariaKeyShortcuts}"
|
|
263
|
+
aria-label="${(x) => x.ariaLabel}"
|
|
264
|
+
aria-live="${(x) => x.ariaLive}"
|
|
265
|
+
aria-relevant="${(x) => x.ariaRelevant}"
|
|
266
|
+
aria-roledescription="${(x) => x.ariaRoleDescription}"
|
|
267
|
+
@input="${(x) => x.handleTextInput()}"
|
|
268
|
+
@change="${(x) => x.handleChange()}"
|
|
269
|
+
${ref("control")}
|
|
270
|
+
>
|
|
271
|
+
</textarea>
|
|
72
272
|
${getFeedbackTemplate(context)}
|
|
73
273
|
</div>
|
|
74
|
-
|
|
274
|
+
`;
|
|
75
275
|
};
|
|
76
276
|
|
|
77
|
-
const
|
|
78
|
-
"text-
|
|
79
|
-
|
|
80
|
-
|
|
277
|
+
const textAreaDefinition = defineVividComponent(
|
|
278
|
+
"text-area",
|
|
279
|
+
TextArea,
|
|
280
|
+
TextAreaTemplate,
|
|
81
281
|
[iconDefinition],
|
|
82
282
|
{
|
|
83
283
|
styles,
|
|
@@ -86,6 +286,6 @@ const textFieldDefinition = defineVividComponent(
|
|
|
86
286
|
}
|
|
87
287
|
}
|
|
88
288
|
);
|
|
89
|
-
const
|
|
289
|
+
const registerTextArea = createRegisterFunction(textAreaDefinition);
|
|
90
290
|
|
|
91
|
-
export {
|
|
291
|
+
export { TextArea as T, registerTextArea as r, textAreaDefinition as t };
|