@vonage/vivid 5.16.0 → 5.17.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/accordion/index.cjs +1 -1
- package/accordion/index.js +1 -1
- package/accordion-item/index.cjs +1 -1
- package/accordion-item/index.js +1 -1
- package/action-group/index.cjs +3 -3
- package/action-group/index.js +5 -5
- package/alert/index.cjs +3 -3
- package/alert/index.js +17 -17
- package/audio-player/index.cjs +16 -16
- package/audio-player/index.js +27 -27
- package/avatar/index.cjs +2 -2
- package/avatar/index.js +6 -6
- package/badge/index.cjs +2 -2
- package/badge/index.js +6 -6
- package/banner/index.cjs +3 -3
- package/banner/index.js +15 -15
- package/bundled/base-color-picker.cjs +2 -2
- package/bundled/base-color-picker.js +5 -5
- package/bundled/button.cjs +1 -1
- package/bundled/button.js +2 -2
- package/bundled/calendar-picker.template.cjs +2 -2
- package/bundled/calendar-picker.template.js +498 -498
- package/bundled/definition10.cjs +18 -30
- package/bundled/definition10.js +53 -155
- package/bundled/definition11.cjs +10 -19
- package/bundled/definition11.js +25 -74
- package/bundled/definition12.cjs +72 -18
- package/bundled/definition12.js +171 -107
- package/bundled/definition13.cjs +18 -17
- package/bundled/definition13.js +45 -65
- package/bundled/definition14.cjs +5 -10
- package/bundled/definition14.js +9 -27
- package/bundled/definition15.cjs +17 -71
- package/bundled/definition15.js +64 -181
- package/bundled/definition16.cjs +12 -4
- package/bundled/definition16.js +79 -14
- package/bundled/definition17.cjs +19 -13
- package/bundled/definition17.js +119 -70
- package/bundled/definition18.cjs +87 -12
- package/bundled/definition18.js +409 -52
- package/bundled/definition19.cjs +5 -87
- package/bundled/definition19.js +14 -422
- package/bundled/definition2.cjs +3 -3
- package/bundled/definition2.js +27 -27
- package/bundled/definition20.cjs +30 -5
- package/bundled/definition20.js +159 -9
- package/bundled/definition21.cjs +28 -19
- package/bundled/definition21.js +164 -47
- package/bundled/definition22.cjs +38 -23
- package/bundled/definition22.js +64 -82
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +15 -15
- package/bundled/definition4.cjs +23 -38
- package/bundled/definition4.js +82 -64
- package/bundled/definition5.cjs +2 -2
- package/bundled/definition5.js +5 -5
- package/bundled/definition6.cjs +2 -2
- package/bundled/definition6.js +24 -24
- package/bundled/definition9.cjs +12 -30
- package/bundled/definition9.js +55 -148
- package/bundled/divider.cjs +1 -1
- package/bundled/divider.js +5 -5
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +1 -1
- package/bundled/mixins.cjs +4 -4
- package/bundled/mixins.js +43 -43
- package/bundled/picker-field.template.cjs +7 -7
- package/bundled/picker-field.template.js +14 -14
- package/bundled/slider.template.cjs +7 -7
- package/bundled/slider.template.js +12 -12
- package/bundled/slottable-request.cjs +1 -1
- package/bundled/slottable-request.js +8 -38
- package/bundled/time-selection-picker.template.cjs +4 -4
- package/bundled/time-selection-picker.template.js +35 -35
- package/bundled/vivid-element.cjs +1 -1
- package/bundled/vivid-element.js +1 -1
- package/calendar/index.cjs +11 -11
- package/calendar/index.js +30 -237
- package/calendar-event/index.cjs +3 -3
- package/calendar-event/index.js +4 -4
- package/card/index.cjs +14 -11
- package/card/index.js +16 -13
- package/checkbox/index.cjs +1 -1
- package/checkbox/index.js +1 -1
- package/color-picker/definition.cjs +1 -1
- package/color-picker/definition.js +1 -1
- package/color-picker/index.cjs +6 -6
- package/color-picker/index.js +24 -24
- package/combobox/definition.cjs +1 -1
- package/combobox/definition.js +1 -1
- package/combobox/index.cjs +9 -8
- package/combobox/index.js +32 -28
- package/contextual-help/definition.cjs +1 -1
- package/contextual-help/definition.js +1 -1
- package/contextual-help/index.cjs +1 -1
- package/contextual-help/index.js +1 -1
- package/custom-elements.json +1027 -615
- package/data-grid/definition.js +1 -1
- package/data-grid/index.cjs +17 -17
- package/data-grid/index.js +261 -264
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +12 -12
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +7 -7
- package/date-time-picker/index.cjs +4 -4
- package/date-time-picker/index.js +24 -24
- package/dial-pad/index.cjs +3 -2
- package/dial-pad/index.js +6 -5
- package/dialog/index.cjs +4 -4
- package/dialog/index.js +5 -5
- package/divider/index.cjs +1 -1
- package/divider/index.js +1 -1
- package/fab/index.cjs +3 -3
- package/fab/index.js +8 -8
- package/file-picker/index.cjs +16 -13
- package/file-picker/index.js +31 -28
- package/header/index.cjs +4 -4
- package/header/index.js +5 -5
- package/index.cjs +24 -21
- package/index.js +11 -11
- package/lib/combobox/combobox.d.ts +0 -3
- package/lib/date-time-picker/date-time-picker.d.ts +0 -4
- package/lib/dial-pad/dial-pad.d.ts +6 -2
- package/lib/dialog/dialog.d.ts +0 -1
- package/lib/menu/menu.d.ts +0 -1
- package/lib/option/option.d.ts +0 -1
- package/lib/rich-text-editor/rte/exports.d.ts +1 -0
- package/lib/rich-text-editor/rte/features/alignment.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/character-count.d.ts +21 -0
- package/lib/rich-text-editor/rte/features/font-size-picker.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/internal/basic-text-blocks.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/keyboard-shortcuts.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/text-color-picker.d.ts +1 -1
- package/lib/rich-text-editor/rte/public-interface.d.ts +6 -0
- package/lib/searchable-select/option-tag.d.ts +0 -1
- package/lib/table/definition.d.ts +2 -1
- package/lib/table/table-header-cell.d.ts +3 -0
- package/lib/table/table-sorting-button.d.ts +415 -0
- package/lib/table/table-sorting-button.template.d.ts +3 -0
- package/locales/de-DE.cjs +4 -178
- package/locales/de-DE.js +2 -179
- package/locales/en-GB.cjs +4 -9
- package/locales/en-GB.js +2 -10
- package/locales/en-US.cjs +268 -2
- package/locales/en-US.js +265 -1
- package/locales/ja-JP.cjs +4 -171
- package/locales/ja-JP.js +2 -172
- package/locales/zh-CN.cjs +4 -172
- package/locales/zh-CN.js +2 -173
- 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-disclosure/index.cjs +3 -3
- package/nav-disclosure/index.js +8 -8
- package/nav-item/index.cjs +1 -1
- package/nav-item/index.js +7 -7
- package/note/index.cjs +2 -2
- package/note/index.js +6 -6
- package/number-field/index.cjs +4 -4
- package/number-field/index.js +31 -31
- package/option/definition.cjs +1 -1
- package/option/definition.js +1 -1
- package/option/index.cjs +1 -1
- package/option/index.js +1 -1
- package/package.json +7 -8
- package/pagination/index.cjs +3 -3
- package/pagination/index.js +15 -15
- package/popover/index.cjs +4 -4
- package/popover/index.js +5 -5
- package/progress/index.cjs +2 -2
- package/progress/index.js +5 -5
- package/radio/index.cjs +1 -1
- package/radio/index.js +1 -1
- package/radio-group/index.cjs +4 -4
- package/radio-group/index.js +10 -10
- package/range-slider/index.cjs +4 -4
- package/range-slider/index.js +17 -17
- package/rich-text-editor/definition.cjs +1 -0
- package/rich-text-editor/definition.js +2 -2
- package/rich-text-editor/index.cjs +13 -13
- package/rich-text-editor/index.js +1886 -1829
- package/rich-text-view/index.cjs +1 -1
- package/rich-text-view/index.js +8 -8
- package/searchable-select/index.cjs +12 -12
- package/searchable-select/index.js +25 -25
- package/select/index.cjs +1 -1
- package/select/index.js +1 -1
- package/selectable-box/index.cjs +7 -7
- package/selectable-box/index.js +11 -11
- package/shared/foundation/test-utilities/fixture.d.ts +1 -1
- package/shared/patterns/linkable.d.ts +1 -1
- package/simple-color-picker/index.cjs +3 -3
- package/simple-color-picker/index.js +10 -10
- package/split-button/index.cjs +5 -5
- package/split-button/index.js +10 -10
- package/status/index.cjs +2 -2
- package/status/index.js +12 -12
- package/switch/index.cjs +3 -3
- package/switch/index.js +5 -5
- 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/table/definition.cjs +17 -14
- package/table/definition.js +3 -2
- package/table/index.cjs +19 -10
- package/table/index.js +69 -21
- package/tabs/index.cjs +2 -2
- package/tabs/index.js +4 -4
- package/tag/index.cjs +7 -7
- package/tag/index.js +9 -9
- package/tag-group/index.cjs +3 -3
- package/tag-group/index.js +5 -5
- package/text-area/index.cjs +2 -2
- package/text-area/index.js +12 -12
- package/text-field/definition.cjs +1 -1
- package/text-field/definition.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/definition.cjs +1 -1
- package/toggletip/definition.js +1 -1
- package/toggletip/index.cjs +1 -1
- package/toggletip/index.js +1 -1
- package/tooltip/definition.cjs +1 -1
- package/tooltip/definition.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 +3 -3
- package/tree-view/index.js +17 -17
- package/unbundled/button.cjs +2 -2
- package/unbundled/button.js +2 -2
- package/unbundled/calendar-picker.template.cjs +4347 -9
- package/unbundled/calendar-picker.template.js +4345 -7
- package/unbundled/chunk.cjs +0 -22
- package/unbundled/definition13.cjs +1 -8
- package/unbundled/definition13.js +1 -8
- package/unbundled/definition14.cjs +2 -2
- package/unbundled/definition14.js +2 -2
- package/unbundled/definition2.cjs +1 -1
- package/unbundled/definition2.js +1 -1
- package/unbundled/definition21.cjs +1 -2
- package/unbundled/definition21.js +1 -2
- package/unbundled/definition22.cjs +7 -2
- package/unbundled/definition22.js +7 -2
- package/unbundled/definition24.cjs +98 -979
- package/unbundled/definition24.js +93 -974
- package/unbundled/definition25.cjs +37 -322
- package/unbundled/definition25.js +33 -318
- package/unbundled/definition26.cjs +317 -91
- package/unbundled/definition26.js +313 -87
- package/unbundled/definition27.cjs +94 -192
- package/unbundled/definition27.js +91 -183
- package/unbundled/definition28.cjs +387 -395
- package/unbundled/definition28.js +387 -395
- package/unbundled/definition29.cjs +189 -110
- package/unbundled/definition29.js +180 -107
- package/unbundled/definition30.cjs +520 -36
- package/unbundled/definition30.js +519 -35
- package/unbundled/definition32.cjs +477 -477
- package/unbundled/definition32.js +475 -475
- package/unbundled/definition33.cjs +87 -2
- package/unbundled/definition33.js +77 -4
- package/unbundled/definition35.cjs +2 -2
- package/unbundled/definition35.js +2 -2
- package/unbundled/definition36.cjs +1 -1
- package/unbundled/definition36.js +1 -1
- package/unbundled/definition37.cjs +6 -2
- package/unbundled/definition37.js +6 -2
- package/unbundled/definition38.cjs +7 -5
- package/unbundled/definition38.js +7 -5
- package/unbundled/definition39.cjs +1 -0
- package/unbundled/definition39.js +1 -0
- package/unbundled/definition42.cjs +22 -11
- package/unbundled/definition42.js +22 -11
- package/unbundled/definition49.cjs +3 -3
- package/unbundled/definition49.js +3 -3
- package/unbundled/definition56.cjs +437 -9506
- package/unbundled/definition56.js +340 -9415
- package/unbundled/definition57.cjs +5 -5
- package/unbundled/definition57.js +5 -5
- package/unbundled/definition58.cjs +4 -3
- package/unbundled/definition58.js +2 -1
- package/unbundled/definition59.cjs +4 -3
- package/unbundled/definition59.js +4 -3
- package/unbundled/definition62.cjs +2 -2
- package/unbundled/definition62.js +2 -2
- package/unbundled/definition64.cjs +1 -1
- package/unbundled/definition64.js +1 -1
- package/unbundled/definition71.cjs +2 -2
- package/unbundled/definition71.js +2 -2
- package/unbundled/definition72.cjs +1 -2
- package/unbundled/definition72.js +1 -2
- package/unbundled/definition75.cjs +3 -51711
- package/unbundled/definition75.js +1 -51711
- package/unbundled/listbox.cjs +1 -1
- package/unbundled/listbox.js +1 -1
- package/unbundled/localized.cjs +2 -2
- package/unbundled/localized.js +1 -1
- package/unbundled/picker-field.template.cjs +1 -1
- package/unbundled/picker-field.template.js +1 -1
- package/unbundled/slottable-request.cjs +2 -3168
- package/unbundled/slottable-request.js +3 -3097
- package/unbundled/time-selection-picker.template.cjs +1 -1
- package/unbundled/time-selection-picker.template.js +1 -1
- package/unbundled/vivid-element.cjs +1 -1
- package/unbundled/vivid-element.js +1 -1
- package/video-player/index.cjs +3 -3
- package/video-player/index.js +9 -9
- package/vivid.api.json +220 -282
- package/unbundled/chunk.js +0 -33
- package/unbundled/en-US.cjs +0 -447
- package/unbundled/en-US.js +0 -443
package/bundled/definition10.cjs
CHANGED
|
@@ -1,31 +1,19 @@
|
|
|
1
|
-
const e=require(`./
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<div class="
|
|
17
|
-
<slot name="header" ${n.t(`headerSlottedContent`)}></slot>
|
|
18
|
-
</div>
|
|
19
|
-
<div
|
|
20
|
-
class="body"
|
|
21
|
-
${o.n({role:`menu`})}
|
|
22
|
-
@change="${(e,t)=>e._onBodyChange(t.event)}"
|
|
23
|
-
@keydown="${(e,t)=>e.handleMenuKeyDown(t.event)}"
|
|
24
|
-
@focusout="${(e,t)=>e.handleFocusOut(t.event)}"
|
|
25
|
-
>
|
|
26
|
-
<slot ${n.t(`items`)}></slot>
|
|
27
|
-
</div>
|
|
28
|
-
<footer class="action-items"><slot name="action-items" ${n.t(`actionItemsSlottedContent`)}></slot></footer>
|
|
1
|
+
const e=require(`./localized.cjs`),t=require(`./vivid-element.cjs`),n=require(`./when.cjs`),r=require(`./decorate.cjs`),i=require(`./class-names.cjs`),a=require(`./definition8.cjs`),o=require(`./anchored.cjs`),s=require(`./dialog.cjs`);var c=`:host :host{display:var(--_popup-display,inline)}:host :host([slotted-anchor]){--_popup-display:contents}.content-wrapper{width:var(--toggletip-inline-size,auto);max-inline-size:var(--toggletip-max-inline-size,30ch);padding:16px}.headline{font:var(--vvd-typography-base-bold);margin:0}.action-items{justify-content:flex-end;gap:10px;display:flex}::slotted([slot=action-items]){margin-block-start:16px}`,l=class extends e.t(o.t(t.t)){constructor(...e){super(...e),this.alternate=!1,this.placement=`right`,this.open=!1}#e=null;openChanged(e,t){e!==void 0&&(t?this.setAttribute(`role`,`status`):this.removeAttribute(`role`),this.#a(),this._anchorEl&&this.#n(this._anchorEl))}connectedCallback(){super.connectedCallback(),this.#a()}disconnectedCallback(){super.disconnectedCallback(),this.#a()}_anchorElChanged(e,t){e&&this.#r(e),t&&this.#t(t)}#t(e){e.addEventListener(`click`,this.#i,!0),this.#e=e.ariaLabel,e.ariaLabel=`${this.locale.toggletip.anchorLabel(e.ariaLabel||``)}`,this.#n(e)}#n(e){e.setAttribute(`aria-expanded`,this.open.toString()),e.setAttribute(`data-expanded`,this.open.toString())}#r(e){e.removeEventListener(`click`,this.#i,!0),e.removeAttribute(`aria-expanded`),e.removeAttribute(`data-expanded`),e.ariaLabel&&=this.#e}#i=()=>{this.open||t.O.enqueue(()=>this.open=!0)};#a(){document.removeEventListener(`click`,this.#o),document.removeEventListener(`keydown`,this.#s),this.open&&this.isConnected&&(document.addEventListener(`click`,this.#o),document.addEventListener(`keydown`,this.#s))}#o=e=>{let t=!this.contains(e.target),n=this._anchorEl?.contains(e.target);(t||n)&&(this.open=!1)};#s=e=>{e.key===`Escape`&&(this.open=!1)}};r.t([t.l],l.prototype,`headline`,void 0),r.t([t.l({mode:`boolean`})],l.prototype,`alternate`,void 0),r.t([t.l({mode:`fromView`})],l.prototype,`placement`,void 0),r.t([t.l({mode:`boolean`})],l.prototype,`open`,void 0);var u=e=>i.t(`control`),d=t.o(`toggletip`,l,e=>{let r=e.tagFor(a.i);return t.d`
|
|
2
|
+
${o.n()}
|
|
3
|
+
<${r}
|
|
4
|
+
@keydown="${(e,{event:t})=>!(e.open&&s.t(t))}"
|
|
5
|
+
class="${u}"
|
|
6
|
+
arrow
|
|
7
|
+
:anchor="${e=>e._anchorEl}"
|
|
8
|
+
:open="${e=>e.open}"
|
|
9
|
+
?alternate="${e=>!e.alternate}"
|
|
10
|
+
placement="${e=>e.placement}"
|
|
11
|
+
exportparts="vvd-theme-alternate"
|
|
12
|
+
>
|
|
13
|
+
<div class="content-wrapper">
|
|
14
|
+
${n.t(e=>e.headline,t.d`<h2 class="headline">${e=>e.headline}</h2>`)}
|
|
15
|
+
<slot></slot>
|
|
16
|
+
<div class="action-items"><slot name="action-items"></slot></div>
|
|
29
17
|
</div>
|
|
30
|
-
</${
|
|
31
|
-
|
|
18
|
+
</${r}>
|
|
19
|
+
`},[a.t],{styles:c}),f=t.s(d);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return f}});
|
package/bundled/definition10.js
CHANGED
|
@@ -1,180 +1,78 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { i as
|
|
7
|
-
import { n as
|
|
8
|
-
import { t as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import { n as w, t as T } from "./anchored.js";
|
|
12
|
-
import { t as E } from "./divider.js";
|
|
13
|
-
//#region src/lib/menu/menu.scss?inline
|
|
14
|
-
var D = ":host{display:var(--_popup-display,inline)}:host([slotted-anchor]){--_popup-display:contents}.base{box-sizing:border-box;inline-size:max-content;max-block-size:var(--menu-block-size,408px);min-inline-size:var(--menu-min-inline-size);flex-direction:column;gap:8px;padding:4px;display:flex;overflow:hidden auto}@media not all and (width>=600px){.base{max-inline-size:var(--menu-max-inline-size,300px)}}@media (width>=600px){.base{max-inline-size:var(--menu-max-inline-size)}}::slotted(a){color:var(--vvd-color-canvas-text);text-decoration:none}::slotted(a[data-vvd-component=menuitem]:focus-visible){box-shadow:0 0 0 4px color-mix(in srgb, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px));--focus-stroke-gap-color:transparent;display:block}.header{padding:4px}.hide-header .header{display:none}.body{flex-direction:column;row-gap:1px;display:flex}.hide-body .body{display:none}.action-items{justify-content:flex-end;gap:8px;padding-block-end:4px;padding-inline:12px;display:flex}.hide-actions .action-items{display:none}", O = (e) => e instanceof x && e.controlType === "checkbox", k = (e) => e instanceof x && e.controlType === "radio", A = (e) => e instanceof E ? !0 : e.role === "separator", j = (e) => e instanceof x ? !0 : !!(e.role && e.role in b), M = class extends T(g(o)) {
|
|
1
|
+
import { t as e } from "./localized.js";
|
|
2
|
+
import { O as t, d as n, l as r, o as i, s as a, t as o } from "./vivid-element.js";
|
|
3
|
+
import { t as s } from "./when.js";
|
|
4
|
+
import { t as c } from "./decorate.js";
|
|
5
|
+
import { t as l } from "./class-names.js";
|
|
6
|
+
import { i as u, t as d } from "./definition8.js";
|
|
7
|
+
import { n as f, t as p } from "./anchored.js";
|
|
8
|
+
import { t as m } from "./dialog.js";
|
|
9
|
+
//#region src/lib/toggletip/toggletip.scss?inline
|
|
10
|
+
var h = ":host :host{display:var(--_popup-display,inline)}:host :host([slotted-anchor]){--_popup-display:contents}.content-wrapper{width:var(--toggletip-inline-size,auto);max-inline-size:var(--toggletip-max-inline-size,30ch);padding:16px}.headline{font:var(--vvd-typography-base-bold);margin:0}.action-items{justify-content:flex-end;gap:10px;display:flex}::slotted([slot=action-items]){margin-block-start:16px}", g = class extends e(p(o)) {
|
|
15
11
|
constructor(...e) {
|
|
16
|
-
super(...e), this.
|
|
17
|
-
!this.contains(e.relatedTarget) && this.menuItems !== void 0 && this.menuItems.length && (this.collapseExpandedItem(), this.menuItems[this.focusIndex].setAttribute("tabindex", "-1"), this.menuItems[0].setAttribute("tabindex", "0"), this.focusIndex = 0);
|
|
18
|
-
}, this.handleItemFocus = (e) => {
|
|
19
|
-
let t = e.target;
|
|
20
|
-
this.menuItems !== void 0 && t !== this.menuItems[this.focusIndex] && (this.menuItems[this.focusIndex].setAttribute("tabindex", "-1"), this.focusIndex = this.menuItems.indexOf(t), t.setAttribute("tabindex", "0"));
|
|
21
|
-
}, this.handleExpandedChanged = (e) => {
|
|
22
|
-
let t = e.target;
|
|
23
|
-
this.expandedItem !== null && t === this.expandedItem && t.expanded === !1 && (this.expandedItem = null), t.expanded && (this.expandedItem = t);
|
|
24
|
-
}, this.removeItemListeners = () => {
|
|
25
|
-
this.menuItems !== void 0 && this.menuItems.forEach((e) => {
|
|
26
|
-
e.removeEventListener("expanded-change", this.handleExpandedChanged), e.removeEventListener("focus", this.handleItemFocus);
|
|
27
|
-
});
|
|
28
|
-
}, this.setItems = () => {
|
|
29
|
-
let e = this.domChildren();
|
|
30
|
-
this.removeItemListeners(), this.menuItems = e.filter(j), this.menuItems.length && (this.focusIndex = 0), this.menuItems.forEach((e, t) => {
|
|
31
|
-
e instanceof x && (e._isPresentational = !1), e.setAttribute("tabindex", t === 0 ? "0" : "-1"), e.addEventListener("expanded-change", this.handleExpandedChanged), e.addEventListener("focus", this.handleItemFocus);
|
|
32
|
-
});
|
|
33
|
-
}, this.placement = "bottom", this.autoDismiss = !1, this.positionStrategy = "fixed", this.open = !1, this._onFocusout = (e) => {
|
|
34
|
-
let t = e.relatedTarget, n = !this.contains(t) && !this._anchorEl?.contains(t);
|
|
35
|
-
this.autoDismiss && n && (this.open = !1);
|
|
36
|
-
};
|
|
12
|
+
super(...e), this.alternate = !1, this.placement = "right", this.open = !1;
|
|
37
13
|
}
|
|
38
|
-
|
|
39
|
-
|
|
14
|
+
#e = null;
|
|
15
|
+
openChanged(e, t) {
|
|
16
|
+
e !== void 0 && (t ? this.setAttribute("role", "status") : this.removeAttribute("role"), this.#a(), this._anchorEl && this.#n(this._anchorEl));
|
|
40
17
|
}
|
|
41
18
|
connectedCallback() {
|
|
42
|
-
super.connectedCallback(),
|
|
43
|
-
this.setItems();
|
|
44
|
-
});
|
|
19
|
+
super.connectedCallback(), this.#a();
|
|
45
20
|
}
|
|
46
21
|
disconnectedCallback() {
|
|
47
|
-
super.disconnectedCallback(), this
|
|
48
|
-
}
|
|
49
|
-
focus() {
|
|
50
|
-
let e = this.querySelector("[autofocus]:not([slot=\"anchor\"])");
|
|
51
|
-
e instanceof HTMLElement ? e.focus() : this.setFocus(0);
|
|
52
|
-
}
|
|
53
|
-
collapseExpandedItem() {
|
|
54
|
-
this.expandedItem !== null && (this.expandedItem.expanded = !1, this.expandedItem = null);
|
|
55
|
-
}
|
|
56
|
-
handleMenuKeyDown(e) {
|
|
57
|
-
if (!(e.defaultPrevented || this.menuItems === void 0)) switch (e.key) {
|
|
58
|
-
case m:
|
|
59
|
-
this.setFocus(this.focusIndex + 1);
|
|
60
|
-
return;
|
|
61
|
-
case f:
|
|
62
|
-
this.setFocus(this.focusIndex - 1);
|
|
63
|
-
return;
|
|
64
|
-
case "End":
|
|
65
|
-
this.setFocus(this.menuItems.length - 1);
|
|
66
|
-
return;
|
|
67
|
-
case p:
|
|
68
|
-
this.setFocus(0);
|
|
69
|
-
return;
|
|
70
|
-
default: return !0;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
domChildren() {
|
|
74
|
-
return Array.from(this.children).filter((e) => !e.hasAttribute("hidden")).filter((e) => !e.hasAttribute("slot"));
|
|
75
|
-
}
|
|
76
|
-
setFocus(e) {
|
|
77
|
-
if (this.menuItems !== void 0 && e >= 0 && e < this.menuItems.length) {
|
|
78
|
-
let t = this.menuItems[e];
|
|
79
|
-
this.focusIndex > -1 && this.menuItems.length >= this.focusIndex - 1 && this.menuItems[this.focusIndex].setAttribute("tabindex", "-1"), this.focusIndex = e, t.setAttribute("tabindex", "0"), t.focus();
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
get #e() {
|
|
83
|
-
return this.trigger ?? "auto";
|
|
84
|
-
}
|
|
85
|
-
openChanged(e, t) {
|
|
86
|
-
t && this._popupEl?.show().then(() => this.focus()), t ? this.$emit("open", void 0, { bubbles: !1 }) : this.$emit("close", void 0, { bubbles: !1 }), this._anchorEl && this.#n(this._anchorEl);
|
|
22
|
+
super.disconnectedCallback(), this.#a();
|
|
87
23
|
}
|
|
88
24
|
_anchorElChanged(e, t) {
|
|
89
25
|
e && this.#r(e), t && this.#t(t);
|
|
90
26
|
}
|
|
91
27
|
#t(e) {
|
|
92
|
-
e.addEventListener("click", this.#i, !0), e
|
|
28
|
+
e.addEventListener("click", this.#i, !0), this.#e = e.ariaLabel, e.ariaLabel = `${this.locale.toggletip.anchorLabel(e.ariaLabel || "")}`, this.#n(e);
|
|
93
29
|
}
|
|
94
30
|
#n(e) {
|
|
95
|
-
e.
|
|
31
|
+
e.setAttribute("aria-expanded", this.open.toString()), e.setAttribute("data-expanded", this.open.toString());
|
|
96
32
|
}
|
|
97
33
|
#r(e) {
|
|
98
|
-
|
|
34
|
+
/* v8 ignore else -- @preserve */
|
|
35
|
+
e.removeEventListener("click", this.#i, !0), e.removeAttribute("aria-expanded"), e.removeAttribute("data-expanded"), e.ariaLabel &&= this.#e;
|
|
99
36
|
}
|
|
100
37
|
#i = () => {
|
|
101
|
-
|
|
102
|
-
let t = !this.open;
|
|
103
|
-
e.enqueue(() => this.open = t);
|
|
38
|
+
this.open || t.enqueue(() => this.open = !0);
|
|
104
39
|
};
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
this.#e === "auto" && !O(e.target) && (this.open = !1);
|
|
108
|
-
let t = this.domChildren(), n = t.indexOf(e.target);
|
|
109
|
-
if (n !== -1) {
|
|
110
|
-
if (k(e.target) && e.target.checked) {
|
|
111
|
-
for (let e = n - 1; e >= 0; --e) {
|
|
112
|
-
let n = t[e];
|
|
113
|
-
if (k(n) && (n.checked = !1), A(n)) break;
|
|
114
|
-
}
|
|
115
|
-
for (let e = n + 1; e <= t.length - 1; ++e) {
|
|
116
|
-
let n = t[e];
|
|
117
|
-
if (k(n) && (n.checked = !1), A(n)) break;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
return !0;
|
|
121
|
-
}
|
|
40
|
+
#a() {
|
|
41
|
+
document.removeEventListener("click", this.#o), document.removeEventListener("keydown", this.#s), this.open && this.isConnected && (document.addEventListener("click", this.#o), document.addEventListener("keydown", this.#s));
|
|
122
42
|
}
|
|
43
|
+
#o = (e) => {
|
|
44
|
+
let t = !this.contains(e.target), n = this._anchorEl?.contains(e.target);
|
|
45
|
+
(t || n) && (this.open = !1);
|
|
46
|
+
};
|
|
47
|
+
#s = (e) => {
|
|
48
|
+
/* v8 ignore else -- @preserve */
|
|
49
|
+
e.key === "Escape" && (this.open = !1);
|
|
50
|
+
};
|
|
123
51
|
};
|
|
124
|
-
|
|
125
|
-
attribute: "offset",
|
|
126
|
-
converter: s
|
|
127
|
-
})], M.prototype, "offset", void 0), u([t], M.prototype, "items", void 0), u([r({ mode: "fromView" })], M.prototype, "placement", void 0), u([r], M.prototype, "trigger", void 0), u([r({
|
|
128
|
-
mode: "boolean",
|
|
129
|
-
attribute: "auto-dismiss"
|
|
130
|
-
})], M.prototype, "autoDismiss", void 0), u([r({
|
|
131
|
-
mode: "fromView",
|
|
132
|
-
attribute: "position-strategy"
|
|
133
|
-
})], M.prototype, "positionStrategy", void 0), u([r({ mode: "boolean" })], M.prototype, "open", void 0), u([t], M.prototype, "headerSlottedContent", void 0), u([t], M.prototype, "actionItemsSlottedContent", void 0), u([t], M.prototype, "_popupOffset", void 0);
|
|
134
|
-
//#endregion
|
|
135
|
-
//#region src/lib/menu/menu.template.ts
|
|
136
|
-
var N = ({ headerSlottedContent: e, actionItemsSlottedContent: t, items: n }) => d("base", ["hide-header", !e?.length], ["hide-actions", !t?.length], ["hide-body", n && !n.length]);
|
|
137
|
-
function P(e, t) {
|
|
138
|
-
return e.open && _(t) && (e.open = !1), !0;
|
|
139
|
-
}
|
|
52
|
+
c([r], g.prototype, "headline", void 0), c([r({ mode: "boolean" })], g.prototype, "alternate", void 0), c([r({ mode: "fromView" })], g.prototype, "placement", void 0), c([r({ mode: "boolean" })], g.prototype, "open", void 0);
|
|
140
53
|
//#endregion
|
|
141
|
-
//#region src/lib/
|
|
142
|
-
var
|
|
143
|
-
let t = e.tagFor(
|
|
144
|
-
function i(e, t, n) {
|
|
145
|
-
t.stopPropagation(), e.open = n;
|
|
146
|
-
}
|
|
54
|
+
//#region src/lib/toggletip/toggletip.template.ts
|
|
55
|
+
var _ = (e) => l("control"), v = i("toggletip", g, (e) => {
|
|
56
|
+
let t = e.tagFor(u);
|
|
147
57
|
return n`
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
<div class="
|
|
163
|
-
<slot name="header" ${l("headerSlottedContent")}></slot>
|
|
164
|
-
</div>
|
|
165
|
-
<div
|
|
166
|
-
class="body"
|
|
167
|
-
${h({ role: "menu" })}
|
|
168
|
-
@change="${(e, t) => e._onBodyChange(t.event)}"
|
|
169
|
-
@keydown="${(e, t) => e.handleMenuKeyDown(t.event)}"
|
|
170
|
-
@focusout="${(e, t) => e.handleFocusOut(t.event)}"
|
|
171
|
-
>
|
|
172
|
-
<slot ${l("items")}></slot>
|
|
173
|
-
</div>
|
|
174
|
-
<footer class="action-items"><slot name="action-items" ${l("actionItemsSlottedContent")}></slot></footer>
|
|
58
|
+
${f()}
|
|
59
|
+
<${t}
|
|
60
|
+
@keydown="${(e, { event: t }) => !(e.open && m(t))}"
|
|
61
|
+
class="${_}"
|
|
62
|
+
arrow
|
|
63
|
+
:anchor="${(e) => e._anchorEl}"
|
|
64
|
+
:open="${(e) => e.open}"
|
|
65
|
+
?alternate="${(e) => !e.alternate}"
|
|
66
|
+
placement="${(e) => e.placement}"
|
|
67
|
+
exportparts="vvd-theme-alternate"
|
|
68
|
+
>
|
|
69
|
+
<div class="content-wrapper">
|
|
70
|
+
${s((e) => e.headline, n`<h2 class="headline">${(e) => e.headline}</h2>`)}
|
|
71
|
+
<slot></slot>
|
|
72
|
+
<div class="action-items"><slot name="action-items"></slot></div>
|
|
175
73
|
</div>
|
|
176
74
|
</${t}>
|
|
177
|
-
|
|
178
|
-
}, [
|
|
75
|
+
`;
|
|
76
|
+
}, [d], { styles: h }), y = a(v);
|
|
179
77
|
//#endregion
|
|
180
|
-
export {
|
|
78
|
+
export { v as n, g as r, y as t };
|
package/bundled/definition11.cjs
CHANGED
|
@@ -1,19 +1,10 @@
|
|
|
1
|
-
const e=require(`./vivid-element.cjs`),t=require(`./
|
|
2
|
-
|
|
3
|
-
class="${
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
>
|
|
10
|
-
|
|
11
|
-
${t.t(e=>e.checked&&!e.indeterminate,e.d`<${a} name="check-solid" class="icon"></${a}>`)}
|
|
12
|
-
${t.t(e=>e.indeterminate,e.d`<${a} name="minus-solid" class="icon"></${a}>`)}
|
|
13
|
-
</div>
|
|
14
|
-
${e.d`<label
|
|
15
|
-
>${e=>e.label}<slot ${n.t(`slottedContent`)}></slot
|
|
16
|
-
></label>`}
|
|
17
|
-
</div>
|
|
18
|
-
${e=>e._getFeedbackTemplate(i)}
|
|
19
|
-
</template>`},[r.t,d.a],{styles:f,shadowOptions:{delegatesFocus:!0}}),g=e.s(h);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return h}});
|
|
1
|
+
const e=require(`./vivid-element.cjs`),t=require(`./definition2.cjs`),n=require(`./decorate.cjs`),r=require(`./class-names.cjs`),i=require(`./definition10.cjs`);var a=class extends e.t{constructor(...e){super(...e),this.placement=`right`}};n.t([e.l({mode:`fromView`})],a.prototype,`placement`,void 0);var o=e=>r.t(`control`),s=e.o(`contextual-help`,a,n=>{let r=n.tagFor(i.r),a=n.tagFor(t.r);return e.d`
|
|
2
|
+
<${r} class="base" exportparts="vvd-theme-alternate">
|
|
3
|
+
<button class="${o}" slot="anchor">
|
|
4
|
+
<slot name="icon" slot="icon">
|
|
5
|
+
<${a} name="help-solid"></${a}>
|
|
6
|
+
</slot>
|
|
7
|
+
</button>
|
|
8
|
+
<slot></slot>
|
|
9
|
+
</${r}>
|
|
10
|
+
`},[t.t,i.n],{styles:`.control{--_connotation-color-primary:var(--vvd-button-accent-primary,var(--vvd-color-canvas-text));--_connotation-color-primary-text:var(--vvd-button-accent-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-button-accent-primary-increment,var(--vvd-color-neutral-800));--_connotation-color-contrast:var(--vvd-button-accent-contrast,var(--vvd-color-neutral-800));--_connotation-color-fierce:var(--vvd-button-accent-fierce,var(--vvd-color-neutral-700));--_connotation-color-firm:var(--vvd-button-accent-firm,var(--vvd-color-canvas-text));--_connotation-color-soft:var(--vvd-button-accent-soft,var(--vvd-color-neutral-100));--_connotation-color-faint:var(--vvd-button-accent-faint,var(--vvd-color-neutral-50));--_connotation-color-fierce-primary:var(--vvd-button-accent-fierce-primary,var(--vvd-color-canvas-text));--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}@media (hover:hover){.control:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-faint);--_appearance-color-outline:transparent}}.control.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-faint);--_appearance-color-outline:transparent}.control:disabled,.control.disabled{--_appearance-color-text:var(--vvd-color-neutral-300);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}.control:active:where(:not(.disabled,:disabled)),.control.active:where(:not(.disabled,:disabled)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-soft);--_appearance-color-outline:transparent}.control{--focus-stroke-gap-color:transparent;box-sizing:border-box;background-color:var(--_appearance-color-fill);block-size:var(--_button-block-size,24px);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_appearance-color-text);cursor:pointer;padding-inline:calc(var(--_button-block-size,24px) / 6);vertical-align:middle;border:0;border-radius:50%;justify-content:center;align-items:center;margin:0;display:inline-flex}@supports (aspect-ratio:auto){.control{aspect-ratio:1;padding:0}}.control:focus-visible{box-shadow:0 0 0 4px color-mix(in srgb, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px))}slot[name=icon]{font-size:var(--_button-icon-size,16px);line-height:1}`}),c=e.s(s);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
|
package/bundled/definition11.js
CHANGED
|
@@ -1,78 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as o } from "./
|
|
3
|
-
import { t as s } from "./
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import { t as g } from "./with-success-text.js";
|
|
11
|
-
import { t as _ } from "./with-error-text.js";
|
|
12
|
-
import { a as v, t as y } from "./mixins.js";
|
|
13
|
-
//#region src/lib/checkbox/checkbox.scss?inline
|
|
14
|
-
var b = ":host{vertical-align:middle;--_low-ink-color:var(--vvd-color-neutral-600);flex-direction:column;gap:4px;display:inline-flex}:host([disabled]){cursor:not-allowed}.base.connotation-cta{--_connotation-color-primary:var(--vvd-checkbox-cta-primary,var(--vvd-color-cta-500));--_connotation-color-primary-text:var(--vvd-checkbox-cta-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-checkbox-cta-primary-increment,var(--vvd-color-cta-600));--_connotation-color-fierce:var(--vvd-checkbox-cta-fierce,var(--vvd-color-cta-700));--_connotation-color-intermediate:var(--vvd-checkbox-cta-intermediate,var(--vvd-color-cta-500));--_connotation-color-firm:var(--vvd-checkbox-cta-firm,var(--vvd-color-cta-600))}.base:not(.connotation-cta){--_connotation-color-primary:var(--vvd-checkbox-accent-primary,var(--vvd-color-canvas-text));--_connotation-color-primary-text:var(--vvd-checkbox-accent-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-checkbox-accent-primary-increment,var(--vvd-color-neutral-800));--_connotation-color-fierce:var(--vvd-checkbox-accent-fierce,var(--vvd-color-neutral-700));--_connotation-color-intermediate:var(--vvd-checkbox-accent-intermediate,var(--vvd-color-neutral-500));--_connotation-color-firm:var(--vvd-checkbox-accent-firm,var(--vvd-color-canvas-text))}.base{--_appearance-color-text:var(--vvd-color-canvas-text);--_appearance-color-fill:var(--vvd-color-canvas);--_appearance-color-outline:var(--vvd-color-neutral-500)}@media (hover:hover){.base: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(--vvd-color-neutral-700)}}.base.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(--vvd-color-neutral-700)}.base:checked:where(:not(.disabled,:disabled)),.base.checked:where(:not(.disabled,:disabled)){--_appearance-color-text:var(--_connotation-color-primary-text);--_appearance-color-fill:var(--_connotation-color-primary);--_appearance-color-outline:var(--_connotation-color-primary)}@media (hover:hover){.base:checked:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-primary-text);--_appearance-color-fill:var(--_connotation-color-primary-increment);--_appearance-color-outline:var(--_connotation-color-primary-increment)}}.base.checked.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-primary-text);--_appearance-color-fill:var(--_connotation-color-primary-increment);--_appearance-color-outline:var(--_connotation-color-primary-increment)}.base:disabled,.base.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.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{vertical-align:middle;align-items:start;gap:8px;display:inline-flex}.base:focus-visible{outline:none}@supports (user-select:none){.base{user-select:none}}.base:not(.disabled){cursor:pointer}.base.disabled{pointer-events:none}.control{background-color:var(--_appearance-color-fill);block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 20));box-shadow:inset 0 0 0 2px var(--_appearance-color-outline);color:var(--_appearance-color-text);inline-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 20));border-radius:4px;flex-shrink:0;justify-content:center;align-items:center;display:flex;position:relative}.base:focus-visible .control{--focus-stroke-gap-color:transparent}.base:focus-visible .control:after{box-shadow:0 0 0 4px color-mix(in srgb, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px));border-radius:var(--focus-border-radius,inherit);block-size:calc(100% + var(--focus-block-size-addition,4px));content:\"\";inline-size:calc(100% + var(--focus-block-size-addition,4px));display:block;position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%)}.base.error:not(.checked) .control{background-color:var(--vvd-color-canvas);box-shadow:inset 0 0 0 2px var(--vvd-color-alert-500)}.indicator{font-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 20)) - 4px)}.base:not(.checked) .indicator.checkmark,.base.checked .indicator.minus,.base:not(.indeterminate) .indicator.minus{display:none}label{color:var(--vvd-color-canvas-text);cursor:pointer;font:var(--vvd-typography-base);flex-wrap:wrap;align-items:center;column-gap:4px;display:flex}.hide-label label{display:none}.icon{font-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 20)) * .6);line-height:1}", x = class extends p(y(_(g(h(m(a)))))) {
|
|
15
|
-
readOnlyChanged() {
|
|
16
|
-
/* v8 ignore if -- @preserve */
|
|
17
|
-
this.proxy instanceof HTMLInputElement && (this.proxy.readOnly = this.readOnly);
|
|
18
|
-
}
|
|
19
|
-
constructor() {
|
|
20
|
-
super(), this.tabindex = null, this.proxy = document.createElement("input"), this.initialValue = "on", this.defaultSlottedNodes = [], this.indeterminate = !1, this.keypressHandler = (e) => {
|
|
21
|
-
if (e.target instanceof HTMLAnchorElement) return !0;
|
|
22
|
-
if (!this.disabled && !this.readOnly) switch (e.key) {
|
|
23
|
-
case " ":
|
|
24
|
-
this.indeterminate &&= !1, this.checked = !this.checked;
|
|
25
|
-
break;
|
|
26
|
-
}
|
|
27
|
-
return !1;
|
|
28
|
-
}, this.clickHandler = (e) => e.target instanceof HTMLAnchorElement ? !0 : (!this.disabled && !this.readOnly && (this.indeterminate &&= !1, this.checked = !this.checked), !1), this.proxy.setAttribute("type", "checkbox");
|
|
29
|
-
}
|
|
30
|
-
ariaCheckedChanged(e, t) {
|
|
31
|
-
super.ariaCheckedChanged(e, t), this.ariaChecked === "mixed" ? this.indeterminate = !0 : (this.indeterminate = !1, this.checked = this.ariaChecked === "true");
|
|
32
|
-
}
|
|
33
|
-
checkedChanged(e, t) {
|
|
34
|
-
super.checkedChanged(e, t), this.ariaChecked = t == 1 ? "true" : "false", e !== void 0 && this.$emit("input");
|
|
1
|
+
import { d as e, l as t, o as n, s as r, t as i } from "./vivid-element.js";
|
|
2
|
+
import { r as a, t as o } from "./definition2.js";
|
|
3
|
+
import { t as s } from "./decorate.js";
|
|
4
|
+
import { t as c } from "./class-names.js";
|
|
5
|
+
import { n as l, r as u } from "./definition10.js";
|
|
6
|
+
//#region src/lib/contextual-help/contextual-help.ts
|
|
7
|
+
var d = class extends i {
|
|
8
|
+
constructor(...e) {
|
|
9
|
+
super(...e), this.placement = "right";
|
|
35
10
|
}
|
|
36
11
|
};
|
|
37
|
-
|
|
38
|
-
attribute: "readonly",
|
|
39
|
-
mode: "boolean"
|
|
40
|
-
})], x.prototype, "readOnly", void 0), u([e], x.prototype, "defaultSlottedNodes", void 0), u([n({
|
|
41
|
-
attribute: "indeterminate",
|
|
42
|
-
mode: "boolean"
|
|
43
|
-
})], x.prototype, "indeterminate", void 0), u([e], x.prototype, "slottedContent", void 0);
|
|
12
|
+
s([t({ mode: "fromView" })], d.prototype, "placement", void 0);
|
|
44
13
|
//#endregion
|
|
45
|
-
//#region src/lib/
|
|
46
|
-
var
|
|
47
|
-
let n =
|
|
48
|
-
return
|
|
49
|
-
|
|
50
|
-
class="${
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
tabindex="${(e) => e.tabindex === null ? e.disabled ? null : 0 : e.tabindex}"
|
|
60
|
-
@keypress="${(e, t) => e.keypressHandler(t.event)}"
|
|
61
|
-
@click="${(e, t) => e.clickHandler(t.event)}"
|
|
62
|
-
>
|
|
63
|
-
<div class="control">
|
|
64
|
-
${o((e) => e.checked && !e.indeterminate, t`<${n} name="check-solid" class="icon"></${n}>`)}
|
|
65
|
-
${o((e) => e.indeterminate, t`<${n} name="minus-solid" class="icon"></${n}>`)}
|
|
66
|
-
</div>
|
|
67
|
-
${t`<label
|
|
68
|
-
>${(e) => e.label}<slot ${s("slottedContent")}></slot
|
|
69
|
-
></label>`}
|
|
70
|
-
</div>
|
|
71
|
-
${(t) => t._getFeedbackTemplate(e)}
|
|
72
|
-
</template>`;
|
|
73
|
-
}, [l, v], {
|
|
74
|
-
styles: b,
|
|
75
|
-
shadowOptions: { delegatesFocus: !0 }
|
|
76
|
-
}), w = i(C);
|
|
14
|
+
//#region src/lib/contextual-help/contextual-help.template.ts
|
|
15
|
+
var f = (e) => c("control"), p = n("contextual-help", d, (t) => {
|
|
16
|
+
let n = t.tagFor(u), r = t.tagFor(a);
|
|
17
|
+
return e`
|
|
18
|
+
<${n} class="base" exportparts="vvd-theme-alternate">
|
|
19
|
+
<button class="${f}" slot="anchor">
|
|
20
|
+
<slot name="icon" slot="icon">
|
|
21
|
+
<${r} name="help-solid"></${r}>
|
|
22
|
+
</slot>
|
|
23
|
+
</button>
|
|
24
|
+
<slot></slot>
|
|
25
|
+
</${n}>
|
|
26
|
+
`;
|
|
27
|
+
}, [o, l], { styles: ".control{--_connotation-color-primary:var(--vvd-button-accent-primary,var(--vvd-color-canvas-text));--_connotation-color-primary-text:var(--vvd-button-accent-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-button-accent-primary-increment,var(--vvd-color-neutral-800));--_connotation-color-contrast:var(--vvd-button-accent-contrast,var(--vvd-color-neutral-800));--_connotation-color-fierce:var(--vvd-button-accent-fierce,var(--vvd-color-neutral-700));--_connotation-color-firm:var(--vvd-button-accent-firm,var(--vvd-color-canvas-text));--_connotation-color-soft:var(--vvd-button-accent-soft,var(--vvd-color-neutral-100));--_connotation-color-faint:var(--vvd-button-accent-faint,var(--vvd-color-neutral-50));--_connotation-color-fierce-primary:var(--vvd-button-accent-fierce-primary,var(--vvd-color-canvas-text));--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}@media (hover:hover){.control:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-faint);--_appearance-color-outline:transparent}}.control.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-faint);--_appearance-color-outline:transparent}.control:disabled,.control.disabled{--_appearance-color-text:var(--vvd-color-neutral-300);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}.control:active:where(:not(.disabled,:disabled)),.control.active:where(:not(.disabled,:disabled)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-soft);--_appearance-color-outline:transparent}.control{--focus-stroke-gap-color:transparent;box-sizing:border-box;background-color:var(--_appearance-color-fill);block-size:var(--_button-block-size,24px);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_appearance-color-text);cursor:pointer;padding-inline:calc(var(--_button-block-size,24px) / 6);vertical-align:middle;border:0;border-radius:50%;justify-content:center;align-items:center;margin:0;display:inline-flex}@supports (aspect-ratio:auto){.control{aspect-ratio:1;padding:0}}.control:focus-visible{box-shadow:0 0 0 4px color-mix(in srgb, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px))}slot[name=icon]{font-size:var(--_button-icon-size,16px);line-height:1}" }), m = r(p);
|
|
77
28
|
//#endregion
|
|
78
|
-
export {
|
|
29
|
+
export { m as n, p as t };
|
package/bundled/definition12.cjs
CHANGED
|
@@ -1,19 +1,73 @@
|
|
|
1
|
-
const e=require(`./vivid-element.cjs`),t=require(`./
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
const e=require(`./vivid-element.cjs`),t=require(`./ref.cjs`),n=require(`./when.cjs`),r=require(`./slotted.cjs`),i=require(`./definition.cjs`),a=require(`./definition2.cjs`),o=require(`./decorate.cjs`),s=require(`./affix.cjs`),c=require(`./form-element.cjs`),l=require(`./with-success-text.cjs`),u=require(`./with-error-text.cjs`),d=require(`./with-contextual-help.cjs`),f=require(`./delegates-aria.cjs`),p=require(`./char-count.cjs`),m=require(`./class-names.cjs`),h=require(`./form-associated.cjs`),g=require(`./mixins.cjs`),_=require(`./definition11.cjs`),v=require(`./text-field.cjs`);var y={email:`email`,password:`password`,tel:`tel`,text:`text`,url:`url`},b=new e.y([`
|
|
2
|
+
._vvd-3-text-field-safari-workaround::placeholder {
|
|
3
|
+
opacity: 1 !important;
|
|
4
|
+
-webkit-text-fill-color: var(--_low-ink-color) !important;
|
|
5
|
+
}
|
|
6
|
+
`]),x=e=>{let t=e.getRootNode();b.isAttachedTo(t)||b.addStylesTo(t)},S=class extends d.t(g.n(p.t(u.t(l.t(c.t(s.t(f.t(h.n(e.t))))))))){constructor(...e){super(...e),this.proxy=document.createElement(`input`),this.type=y.text}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly,this.validate())}autofocusChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autofocus=this.autofocus,this.validate())}placeholderChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.placeholder=this.placeholder)}typeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.type=this.type,this.validate())}listChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.setAttribute(`list`,this.list),this.validate())}maxlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.maxLength=this.maxlength,this.validate())}minlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.minLength=this.minlength,this.validate())}patternChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.pattern=this.pattern,this.validate())}sizeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.size=this.size)}spellcheckChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.spellcheck=this.spellcheck)}valueChanged(e,t){super.valueChanged(e,t),this._updateControlValueIfNeeded(),this.charCount&&this.maxlength&&this._updateCharCountRemaining()}_updateControlValueIfNeeded(){this.control&&this.control.value!==this.value&&(this.control.value=this.value)}select(){this.control.select()}handleTextInput(e){this.value=this.control.value,e.stopPropagation(),this.$emit(`input`)}handleChange(){this.$emit(`change`)}validate(){super.validate(this.control)}connectedCallback(){super.connectedCallback(),this.proxy.setAttribute(`type`,this.type),this.validate(),this.autofocus&&e.O.enqueue(()=>{this.focus()}),this._updateControlValueIfNeeded(),x(this),this._renderCharCountRemaining()}focus(){this.control?.focus()}#e=g.i();get _uniqueId(){return this.id||this.#e}};o.t([e.l({attribute:`readonly`,mode:`boolean`})],S.prototype,`readOnly`,void 0),o.t([e.l({mode:`boolean`})],S.prototype,`autofocus`,void 0),o.t([e.l],S.prototype,`placeholder`,void 0),o.t([e.l],S.prototype,`type`,void 0),o.t([e.l],S.prototype,`list`,void 0),o.t([e.l({converter:e.u})],S.prototype,`maxlength`,void 0),o.t([e.l({converter:e.u})],S.prototype,`minlength`,void 0),o.t([e.l],S.prototype,`pattern`,void 0),o.t([e.l({converter:e.u})],S.prototype,`size`,void 0),o.t([e.l({mode:`boolean`})],S.prototype,`spellcheck`,void 0),o.t([e.l],S.prototype,`appearance`,void 0),o.t([e.l],S.prototype,`shape`,void 0),o.t([e.l],S.prototype,`autoComplete`,void 0),o.t([e.l()],S.prototype,`scale`,void 0),o.t([e.l({attribute:`inputmode`})],S.prototype,`inputMode`,void 0),o.t([e.T],S.prototype,`actionItemsSlottedContent`,void 0),o.t([e.T],S.prototype,`leadingActionItemsSlottedContent`,void 0);var C=e=>`vvd-text-field-control-${e}`,w=({errorValidationMessage:e,disabled:t,value:n,readOnly:r,placeholder:i,appearance:a,shape:o,label:s,successText:c,actionItemsSlottedContent:l,leadingActionItemsSlottedContent:u,icon:d,scale:f})=>m.t([`error`,!!e],[`disabled`,t],[`has-value`,!!n],[`readonly`,r],[`placeholder`,!!i],[`appearance-${a}`,!!a],[`shape-${o}`,!!o],[`no-label`,!s],[`has-icon`,!!d],[`success`,!!c],[`action-items`,!!l?.length],[`leading-action-items`,!!u?.length],[`no-leading`,!(u?.length||d)],[`size-${f}`,!!f]),T=e.o(`text-field`,S,i=>{let a=s.a(i);return e.d`
|
|
7
|
+
<div class="base ${w}">
|
|
8
|
+
${n.t(e=>e.charCount&&e.maxlength,e=>e._getCharCountTemplate(i))}
|
|
9
|
+
<div
|
|
10
|
+
class="label-wrapper"
|
|
11
|
+
?hidden=${e=>!e.label&&!e._hasContextualHelp}
|
|
12
|
+
>
|
|
13
|
+
<slot class="label" name="_label"></slot>
|
|
14
|
+
<slot
|
|
15
|
+
name="contextual-help"
|
|
16
|
+
${r.t(`_contextualHelpSlottedContent`)}
|
|
17
|
+
></slot>
|
|
17
18
|
</div>
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
${g.r(e.d`
|
|
20
|
+
${n.t(e=>e.label,e.d`
|
|
21
|
+
<label slot="_label" for="${e=>C(e._uniqueId)}">
|
|
22
|
+
${e=>e.label}
|
|
23
|
+
</label>
|
|
24
|
+
`)}
|
|
25
|
+
`)}
|
|
26
|
+
<div class="fieldset">
|
|
27
|
+
<div class="leading-items-wrapper">
|
|
28
|
+
<slot
|
|
29
|
+
name="leading-action-items"
|
|
30
|
+
${r.t(`leadingActionItemsSlottedContent`)}
|
|
31
|
+
></slot>
|
|
32
|
+
${e=>a(e.icon)}
|
|
33
|
+
</div>
|
|
34
|
+
<div class="wrapper">
|
|
35
|
+
<slot class="control" name="_control"></slot>
|
|
36
|
+
${g.r(e.d`<input
|
|
37
|
+
slot="_control"
|
|
38
|
+
id="${e=>C(e._uniqueId)}"
|
|
39
|
+
class="_vvd-3-text-field-safari-workaround"
|
|
40
|
+
@input="${(e,t)=>e.handleTextInput(t.event)}"
|
|
41
|
+
@change="${e=>e.handleChange()}"
|
|
42
|
+
@blur="${e=>{e.$emit(`blur`,void 0,{bubbles:!1})}}"
|
|
43
|
+
@focus="${e=>{e.$emit(`focus`,void 0,{bubbles:!1})}}"
|
|
44
|
+
?autofocus="${e=>e.autofocus}"
|
|
45
|
+
?disabled="${e=>e.disabled}"
|
|
46
|
+
?readonly="${e=>e.readOnly}"
|
|
47
|
+
?required="${e=>e.required}"
|
|
48
|
+
?spellcheck="${e=>e.spellcheck}"
|
|
49
|
+
list="${e=>e.list}"
|
|
50
|
+
maxlength="${e=>e.maxlength}"
|
|
51
|
+
minlength="${e=>e.minlength}"
|
|
52
|
+
pattern="${e=>e.pattern}"
|
|
53
|
+
placeholder="${e=>e.placeholder}"
|
|
54
|
+
size="${e=>e.size}"
|
|
55
|
+
autocomplete="${e=>e.autoComplete}"
|
|
56
|
+
type="${e=>e.type}"
|
|
57
|
+
inputmode="${e=>e.inputMode}"
|
|
58
|
+
aria-describedby="${e=>e._feedbackDescribedBy} ${e=>e.charCount&&e.maxlength?e._charCountDescribedBy:null}"
|
|
59
|
+
value="${e=>e.initialValue}"
|
|
60
|
+
${f.n()}
|
|
61
|
+
${t.t(`control`)}
|
|
62
|
+
/>`)}
|
|
63
|
+
</div>
|
|
64
|
+
<div class="action-items-wrapper">
|
|
65
|
+
<slot
|
|
66
|
+
name="action-items"
|
|
67
|
+
${r.t(`actionItemsSlottedContent`)}
|
|
68
|
+
></slot>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
${e=>e._getFeedbackTemplate(i)}
|
|
72
|
+
</div>
|
|
73
|
+
`},[a.t,g.a,i.n,_.t],{styles:v.t,shadowOptions:{delegatesFocus:!0}}),E=e.s(T);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return E}});
|