@vonage/vivid 5.27.0 → 5.28.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/bundled/calendar-picker.template.cjs +1 -1
- package/bundled/calendar-picker.template.js +3 -3
- package/bundled/decorate.js +1 -1
- package/bundled/definition10.cjs +5 -1
- package/bundled/definition10.js +5 -1
- package/bundled/definition2.cjs +1 -1
- package/bundled/definition2.js +1 -1
- package/bundled/definition23.cjs +8 -4
- package/bundled/definition23.js +8 -4
- package/bundled/definition4.cjs +1 -1
- package/bundled/definition4.js +1 -1
- package/bundled/definition5.cjs +1 -1
- package/bundled/definition5.js +2 -1
- package/bundled/definition8.cjs +9 -7
- package/bundled/definition8.js +11 -9
- package/bundled/definition9.cjs +3 -3
- package/bundled/definition9.js +4 -4
- package/bundled/feedback-message.cjs +1 -1
- package/bundled/feedback-message.js +1 -1
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +12 -0
- package/bundled/render-in-light-dom.js +3 -3
- package/bundled/text-field.cjs +1 -1
- package/bundled/text-field.js +1 -1
- package/bundled/vivid-element.cjs +1 -1
- package/bundled/vivid-element.js +1 -1
- package/custom-elements.json +2052 -1998
- package/lib/badge/badge.d.ts +1 -0
- package/lib/badge/badge.template.d.ts +2 -1
- package/lib/icon/icon.d.ts +1 -1
- package/lib/popover/popover.d.ts +2 -1
- package/lib/progress-ring/progress-ring.d.ts +1 -1
- package/lib/rich-text-editor/rich-text-editor.d.ts +427 -0
- package/lib/rich-text-editor/rte/__tests__/async-generator.d.ts +1 -0
- package/lib/rich-text-editor/rte/features/atom.d.ts +6 -2
- package/lib/rich-text-editor/rte/instance.d.ts +2 -1
- package/lib/table/locale.d.ts +10 -0
- package/lib/table/table-sorting-button.d.ts +425 -0
- package/locales/de-DE.cjs +12 -0
- package/locales/de-DE.js +12 -0
- package/locales/en-GB.cjs +12 -0
- package/locales/en-GB.js +12 -0
- package/locales/ja-JP.cjs +12 -0
- package/locales/ja-JP.js +12 -0
- package/locales/zh-CN.cjs +12 -0
- package/locales/zh-CN.js +12 -0
- package/number-field/index.cjs +1 -1
- package/number-field/index.js +1 -1
- package/package.json +14 -14
- package/popover/index.cjs +2 -2
- package/popover/index.js +70 -37
- package/rich-text-editor/index.cjs +23 -17
- package/rich-text-editor/index.js +1653 -1588
- package/shared/localization/Locale.d.ts +2 -0
- package/table/index.cjs +17 -17
- package/table/index.js +50 -40
- package/unbundled/decorate.cjs +1 -1
- package/unbundled/decorate.js +1 -1
- package/unbundled/definition.cjs +1 -1
- package/unbundled/definition.js +1 -1
- package/unbundled/definition14.cjs +1 -1
- package/unbundled/definition14.js +1 -1
- package/unbundled/definition15.cjs +8 -3
- package/unbundled/definition15.js +8 -3
- package/unbundled/definition2.cjs +1 -1
- package/unbundled/definition2.js +1 -1
- package/unbundled/definition24.cjs +4 -4
- package/unbundled/definition24.js +4 -4
- package/unbundled/definition25.cjs +5 -1
- package/unbundled/definition25.js +5 -1
- package/unbundled/definition27.cjs +8 -5
- package/unbundled/definition27.js +8 -5
- package/unbundled/definition5.cjs +1 -1
- package/unbundled/definition5.js +1 -1
- package/unbundled/definition55.cjs +1 -1
- package/unbundled/definition55.js +1 -1
- package/unbundled/definition58.cjs +69 -4
- package/unbundled/definition58.js +69 -4
- package/unbundled/definition6.cjs +2 -1
- package/unbundled/definition6.js +2 -1
- package/unbundled/definition63.cjs +80 -21
- package/unbundled/definition63.js +80 -21
- package/unbundled/definition75.cjs +19 -6
- package/unbundled/definition75.js +20 -7
- package/unbundled/definition8.cjs +2 -2
- package/unbundled/definition8.js +2 -2
- package/unbundled/definition83.cjs +1 -1
- package/unbundled/definition83.js +1 -1
- package/unbundled/en-US.cjs +12 -0
- package/unbundled/en-US.js +12 -0
- package/unbundled/feedback-message.cjs +1 -1
- package/unbundled/feedback-message.js +1 -1
- package/unbundled/linkable.cjs +1 -1
- package/unbundled/linkable.js +1 -1
- package/unbundled/text-field.cjs +1 -1
- package/unbundled/text-field.js +1 -1
- package/unbundled/vivid-element.cjs +1 -1
- package/unbundled/vivid-element.js +1 -1
- package/video-player/index.cjs +1 -1
- package/video-player/index.js +1 -1
- package/vivid.api.json +63 -2
|
@@ -21,6 +21,7 @@ import { CharCountLocale } from '../patterns/char-count/locale';
|
|
|
21
21
|
import { DataGridLocale } from '../../lib/data-grid/locale';
|
|
22
22
|
import { PaginationLocale } from '../../lib/pagination/locale';
|
|
23
23
|
import { TagLocale } from '../../lib/tag/locale';
|
|
24
|
+
import { TableSortingButtonLocale } from '../../lib/table/locale';
|
|
24
25
|
import { Connotation } from '../../lib/enums';
|
|
25
26
|
import { ToggletipLocale } from '../../lib/toggletip/locale';
|
|
26
27
|
import { SimpleColorPickerLocale } from '../../lib/simple-color-picker/locale';
|
|
@@ -61,6 +62,7 @@ export interface Locale {
|
|
|
61
62
|
dataGrid: DataGridLocale;
|
|
62
63
|
pagination: PaginationLocale;
|
|
63
64
|
tag: TagLocale;
|
|
65
|
+
tableSortingButton: TableSortingButtonLocale;
|
|
64
66
|
toggletip: ToggletipLocale;
|
|
65
67
|
baseColorPicker: BaseColorPickerLocale;
|
|
66
68
|
simpleColorPicker: SimpleColorPickerLocale;
|
package/table/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("../bundled/vivid-element.cjs"),
|
|
1
|
+
const e=require("../bundled/localized.cjs"),t=require("../bundled/vivid-element.cjs"),n=require("../bundled/decorate.cjs"),r=require("../bundled/definition2.cjs"),i=require("../bundled/icon.cjs"),a=require("../bundled/host-semantics.cjs"),o=require("../bundled/delegates-aria.cjs"),s=require("../bundled/data-grid.options.cjs");var c=`:host{border-collapse:collapse;border-spacing:0;inline-size:100%}.table-inner-container{--scrollbar-track-color:transparent;--scrollbar-thumb-color:color-mix(in sRGB, var(--vvd-color-neutral-950), transparent 70%);scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}.table-inner-container ::-webkit-scrollbar{width:4px}.table-inner-container ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.table-inner-container ::-webkit-scrollbar-thumb{background-color:var(--scrollbar-fallback-track-color,var(--scrollbar-thumb-color));border:0;border-radius:4px}.table-inner-container{inline-size:100%;display:block;overflow-x:auto}.table-content{inline-size:100%;display:table;overflow-x:auto}`,l=`button{aspect-ratio:1;cursor:pointer;background:0 0;border:none;border-radius:8px}button:focus-visible{--focus-stroke-gap-color:transparent;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))}`,u=`:host{display:table-header-group}`,d=`:host{display:table-row-group}`,f=`:host{display:table-row}@media (hover:hover){:host:hover{background-color:var(--vvd-color-neutral-200)}}:host[selected]{background-color:var(--_appearance-color-fill)}.base{box-sizing:border-box;width:100%;color:var(--vvd-color-canvas-text);display:contents}`,p=`:host{border-bottom:1px solid var(--vvd-color-neutral-300);vertical-align:middle;--_table-cell-default-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 8));--_table-cell-default-white-space:nowrap;display:table-cell}:host([role=columnheader]){border-bottom-color:var(--vvd-color-canvas-text)}:host(:focus-visible){outline:none}.base{box-sizing:border-box;block-size:100%;color:var(--_appearance-color-text);font:var(--vvd-typography-base-bold);min-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 8));padding:0;flex-direction:column;justify-content:center;padding-block:4px;padding-inline:12px;display:flex;overflow:hidden}:host(:focus-visible) .base{--focus-stroke-gap-color:transparent;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{text-overflow:ellipsis;inline-size:100%;white-space:var(--table-cell-white-space,var(--_table-cell-default-white-space));flex:none;display:block;overflow:hidden}`,m=`:host{border-bottom:1px solid var(--vvd-color-neutral-300);vertical-align:middle;display:table-cell}:host:not([cell-type=columnheader]){--_table-cell-default-block-size:100%;--_table-cell-default-white-space:normal}:host[selected]{background-color:var(--_appearance-color-fill)}:host(:focus-visible){outline:none}.base{box-sizing:border-box;block-size:100%;color:var(--_appearance-color-text);font:var(--vvd-typography-base);min-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 8));flex-direction:column;justify-content:center;padding-block:4px;padding-inline:12px;display:flex;overflow:hidden}:host(:focus-visible) .base{--focus-stroke-gap-color:transparent;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{flex:none;inline-size:100%;display:block}`,h=class extends t.t{},g=()=>t.p`
|
|
2
2
|
<template role="table">
|
|
3
3
|
<div part="inner-container" class="table-inner-container">
|
|
4
4
|
<div part="content" class="table-content">
|
|
@@ -6,47 +6,47 @@ const e=require("../bundled/vivid-element.cjs"),t=require("../bundled/decorate.c
|
|
|
6
6
|
</div>
|
|
7
7
|
</div>
|
|
8
8
|
</template>
|
|
9
|
-
`,
|
|
9
|
+
`,_=`table-head`,v=class extends t.t{},y=()=>t.p`
|
|
10
10
|
<template>
|
|
11
11
|
<slot></slot>
|
|
12
12
|
</template>
|
|
13
|
-
`,
|
|
13
|
+
`,b=class extends t.t{},x=()=>t.p`
|
|
14
14
|
<template>
|
|
15
15
|
<slot></slot>
|
|
16
16
|
</template>
|
|
17
|
-
`,
|
|
17
|
+
`,S=class extends a.t(t.t){},C=()=>t.p`
|
|
18
18
|
<template
|
|
19
|
-
${
|
|
19
|
+
${a.n({role:`row`})}
|
|
20
20
|
>
|
|
21
21
|
<div class="base connotation-accent appearance-listitem with-idle">
|
|
22
22
|
<slot></slot>
|
|
23
23
|
</div>
|
|
24
24
|
</template>
|
|
25
|
-
`,
|
|
25
|
+
`,w=class extends a.t(t.t){connectedCallback(){super.connectedCallback(),this.addEventListener(`sort`,this.#e)}#e(e){let t=e.detail;t===`asc`?this.setAttribute(`aria-sort`,`ascending`):t===`desc`?this.setAttribute(`aria-sort`,`descending`):t===`none`?this.setAttribute(`aria-sort`,`none`):this.removeAttribute(`aria-sort`)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`sort`,this.#e)}},T=e=>{let n=e.tagForNonDependency(_);return t.p`
|
|
26
26
|
<template
|
|
27
27
|
class="connotation-accent appearance-listitem with-idle"
|
|
28
|
-
${
|
|
28
|
+
${a.n({role:e=>e.closest(n)===null?s.t.rowheader:s.t.columnheader})}
|
|
29
29
|
>
|
|
30
30
|
<div class="base">
|
|
31
31
|
<slot></slot>
|
|
32
32
|
</div>
|
|
33
33
|
</template>
|
|
34
|
-
`},
|
|
34
|
+
`},E=class extends a.t(t.t){},D=()=>t.p`
|
|
35
35
|
<template
|
|
36
36
|
class="connotation-accent appearance-listitem with-idle"
|
|
37
|
-
${
|
|
37
|
+
${a.n({role:()=>`cell`})}
|
|
38
38
|
>
|
|
39
39
|
<div class="base">
|
|
40
40
|
<slot></slot>
|
|
41
41
|
</div>
|
|
42
42
|
</template>
|
|
43
|
-
`,
|
|
44
|
-
<template
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
${
|
|
43
|
+
`,O=class extends e.t(o.t(t.t)){get#e(){return!this.direction||this.direction===`none`?`asc`:this.direction===`asc`?`desc`:`none`}toggleSort(){this.$emit(`sort`,this.#e)&&(this.direction=this.#e,this.dispatchEvent(new CustomEvent(`sort`,{detail:this.direction,bubbles:!0,composed:!0})))}};n.t([t.m],O.prototype,`direction`,void 0);var k=e=>{switch(e.direction){case`asc`:return`ascending`;case`desc`:return`descending`;default:return`none`}},A=e=>{let t=k(e),{sortStatus:n,sortInstruction:r}=e.locale.tableSortingButton;return`${n[t]} ${r[t]}`},j=e=>{let n=e.tagFor(i.t);return t.p`
|
|
44
|
+
<template @click="${e=>e.toggleSort()}">
|
|
45
|
+
<button
|
|
46
|
+
type="button"
|
|
47
|
+
${o.n({ariaLabel:e=>e.ariaLabel||A(e)})}
|
|
48
|
+
>
|
|
49
|
+
${e=>{switch(e.direction){case`asc`:return t.p`<${n} name="sort-asc-line"></${n}>`;case`desc`:return t.p`<${n} name="sort-desc-line"></${n}>`;default:return t.p`<${n} name="sort-line"></${n}>`}}}
|
|
50
50
|
</button>
|
|
51
51
|
</template>
|
|
52
|
-
`},
|
|
52
|
+
`},M=t.u(`table-cell`,E,D,[],{styles:m}),N=t.u(`table-header-cell`,w,T,[],{styles:p}),P=t.u(`table-row`,S,C,[],{styles:f}),F=t.u(`table-body`,b,x,[],{styles:d}),I=t.u(`table-head`,v,y,[],{styles:u}),L=t.u(`table-sorting-button`,O,j,[r.t],{styles:l}),R=t.u(`table`,h,g,[M,N,P,I,F,L],{styles:c});t.d(R)();
|
package/table/index.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as a } from "../bundled/
|
|
3
|
-
import { t as o } from "../bundled/
|
|
4
|
-
import { t as s } from "../bundled/
|
|
5
|
-
import {
|
|
6
|
-
import { t as u } from "../bundled/
|
|
7
|
-
import {
|
|
1
|
+
import { t as e } from "../bundled/localized.js";
|
|
2
|
+
import { d as t, m as n, p as r, t as i, u as a } from "../bundled/vivid-element.js";
|
|
3
|
+
import { t as o } from "../bundled/decorate.js";
|
|
4
|
+
import { t as s } from "../bundled/definition2.js";
|
|
5
|
+
import { t as c } from "../bundled/icon.js";
|
|
6
|
+
import { n as l, t as u } from "../bundled/host-semantics.js";
|
|
7
|
+
import { n as d, t as f } from "../bundled/delegates-aria.js";
|
|
8
|
+
import { t as p } from "../bundled/data-grid.options.js";
|
|
8
9
|
//#region src/lib/table/table.scss?inline
|
|
9
|
-
var
|
|
10
|
+
var m = ":host{border-collapse:collapse;border-spacing:0;inline-size:100%}.table-inner-container{--scrollbar-track-color:transparent;--scrollbar-thumb-color:color-mix(in sRGB, var(--vvd-color-neutral-950), transparent 70%);scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}.table-inner-container ::-webkit-scrollbar{width:4px}.table-inner-container ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.table-inner-container ::-webkit-scrollbar-thumb{background-color:var(--scrollbar-fallback-track-color,var(--scrollbar-thumb-color));border:0;border-radius:4px}.table-inner-container{inline-size:100%;display:block;overflow-x:auto}.table-content{inline-size:100%;display:table;overflow-x:auto}", h = "button{aspect-ratio:1;cursor:pointer;background:0 0;border:none;border-radius:8px}button:focus-visible{--focus-stroke-gap-color:transparent;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))}", g = ":host{display:table-header-group}", _ = ":host{display:table-row-group}", v = ":host{display:table-row}@media (hover:hover){:host:hover{background-color:var(--vvd-color-neutral-200)}}:host[selected]{background-color:var(--_appearance-color-fill)}.base{box-sizing:border-box;width:100%;color:var(--vvd-color-canvas-text);display:contents}", y = ":host{border-bottom:1px solid var(--vvd-color-neutral-300);vertical-align:middle;--_table-cell-default-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 8));--_table-cell-default-white-space:nowrap;display:table-cell}:host([role=columnheader]){border-bottom-color:var(--vvd-color-canvas-text)}:host(:focus-visible){outline:none}.base{box-sizing:border-box;block-size:100%;color:var(--_appearance-color-text);font:var(--vvd-typography-base-bold);min-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 8));padding:0;flex-direction:column;justify-content:center;padding-block:4px;padding-inline:12px;display:flex;overflow:hidden}:host(:focus-visible) .base{--focus-stroke-gap-color:transparent;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{text-overflow:ellipsis;inline-size:100%;white-space:var(--table-cell-white-space,var(--_table-cell-default-white-space));flex:none;display:block;overflow:hidden}", b = ":host{border-bottom:1px solid var(--vvd-color-neutral-300);vertical-align:middle;display:table-cell}:host:not([cell-type=columnheader]){--_table-cell-default-block-size:100%;--_table-cell-default-white-space:normal}:host[selected]{background-color:var(--_appearance-color-fill)}:host(:focus-visible){outline:none}.base{box-sizing:border-box;block-size:100%;color:var(--_appearance-color-text);font:var(--vvd-typography-base);min-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 8));flex-direction:column;justify-content:center;padding-block:4px;padding-inline:12px;display:flex;overflow:hidden}:host(:focus-visible) .base{--focus-stroke-gap-color:transparent;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{flex:none;inline-size:100%;display:block}", x = class extends i {}, S = () => r`
|
|
10
11
|
<template role="table">
|
|
11
12
|
<div part="inner-container" class="table-inner-container">
|
|
12
13
|
<div part="content" class="table-content">
|
|
@@ -14,23 +15,23 @@ var f = ":host{border-collapse:collapse;border-spacing:0;inline-size:100%}.table
|
|
|
14
15
|
</div>
|
|
15
16
|
</div>
|
|
16
17
|
</template>
|
|
17
|
-
`,
|
|
18
|
+
`, C = "table-head", w = class extends i {}, T = () => r`
|
|
18
19
|
<template>
|
|
19
20
|
<slot></slot>
|
|
20
21
|
</template>
|
|
21
|
-
`,
|
|
22
|
+
`, E = class extends i {}, D = () => r`
|
|
22
23
|
<template>
|
|
23
24
|
<slot></slot>
|
|
24
25
|
</template>
|
|
25
|
-
`,
|
|
26
|
+
`, O = class extends u(i) {}, k = () => r`
|
|
26
27
|
<template
|
|
27
|
-
${
|
|
28
|
+
${l({ role: "row" })}
|
|
28
29
|
>
|
|
29
30
|
<div class="base connotation-accent appearance-listitem with-idle">
|
|
30
31
|
<slot></slot>
|
|
31
32
|
</div>
|
|
32
33
|
</template>
|
|
33
|
-
`,
|
|
34
|
+
`, A = class extends u(i) {
|
|
34
35
|
connectedCallback() {
|
|
35
36
|
super.connectedCallback(), this.addEventListener("sort", this.#e);
|
|
36
37
|
}
|
|
@@ -41,28 +42,28 @@ var f = ":host{border-collapse:collapse;border-spacing:0;inline-size:100%}.table
|
|
|
41
42
|
disconnectedCallback() {
|
|
42
43
|
super.disconnectedCallback(), this.removeEventListener("sort", this.#e);
|
|
43
44
|
}
|
|
44
|
-
},
|
|
45
|
-
let t = e.tagForNonDependency(
|
|
46
|
-
return
|
|
45
|
+
}, j = (e) => {
|
|
46
|
+
let t = e.tagForNonDependency(C);
|
|
47
|
+
return r`
|
|
47
48
|
<template
|
|
48
49
|
class="connotation-accent appearance-listitem with-idle"
|
|
49
|
-
${
|
|
50
|
+
${l({ role: (e) => e.closest(t) === null ? p.rowheader : p.columnheader })}
|
|
50
51
|
>
|
|
51
52
|
<div class="base">
|
|
52
53
|
<slot></slot>
|
|
53
54
|
</div>
|
|
54
55
|
</template>
|
|
55
56
|
`;
|
|
56
|
-
},
|
|
57
|
+
}, M = class extends u(i) {}, N = () => r`
|
|
57
58
|
<template
|
|
58
59
|
class="connotation-accent appearance-listitem with-idle"
|
|
59
|
-
${
|
|
60
|
+
${l({ role: () => "cell" })}
|
|
60
61
|
>
|
|
61
62
|
<div class="base">
|
|
62
63
|
<slot></slot>
|
|
63
64
|
</div>
|
|
64
65
|
</template>
|
|
65
|
-
`,
|
|
66
|
+
`, P = class extends e(f(i)) {
|
|
66
67
|
get #e() {
|
|
67
68
|
return !this.direction || this.direction === "none" ? "asc" : this.direction === "asc" ? "desc" : "none";
|
|
68
69
|
}
|
|
@@ -74,36 +75,45 @@ var f = ":host{border-collapse:collapse;border-spacing:0;inline-size:100%}.table
|
|
|
74
75
|
})));
|
|
75
76
|
}
|
|
76
77
|
};
|
|
77
|
-
|
|
78
|
+
o([n], P.prototype, "direction", void 0);
|
|
78
79
|
//#endregion
|
|
79
80
|
//#region src/lib/table/table-sorting-button.template.ts
|
|
80
|
-
var
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
81
|
+
var F = (e) => {
|
|
82
|
+
switch (e.direction) {
|
|
83
|
+
case "asc": return "ascending";
|
|
84
|
+
case "desc": return "descending";
|
|
85
|
+
default: return "none";
|
|
86
|
+
}
|
|
87
|
+
}, I = (e) => {
|
|
88
|
+
let t = F(e), { sortStatus: n, sortInstruction: r } = e.locale.tableSortingButton;
|
|
89
|
+
return `${n[t]} ${r[t]}`;
|
|
90
|
+
}, L = (e) => {
|
|
91
|
+
let t = e.tagFor(c);
|
|
92
|
+
return r`
|
|
93
|
+
<template @click="${(e) => e.toggleSort()}">
|
|
94
|
+
<button
|
|
95
|
+
type="button"
|
|
96
|
+
${d({ ariaLabel: (e) => e.ariaLabel || I(e) })}
|
|
97
|
+
>
|
|
88
98
|
${(e) => {
|
|
89
99
|
switch (e.direction) {
|
|
90
|
-
case "asc": return
|
|
91
|
-
case "desc": return
|
|
92
|
-
default: return
|
|
100
|
+
case "asc": return r`<${t} name="sort-asc-line"></${t}>`;
|
|
101
|
+
case "desc": return r`<${t} name="sort-desc-line"></${t}>`;
|
|
102
|
+
default: return r`<${t} name="sort-line"></${t}>`;
|
|
93
103
|
}
|
|
94
104
|
}}
|
|
95
105
|
</button>
|
|
96
106
|
</template>
|
|
97
107
|
`;
|
|
98
|
-
},
|
|
99
|
-
P,
|
|
100
|
-
F,
|
|
101
|
-
I,
|
|
108
|
+
}, R = a("table-cell", M, N, [], { styles: b }), z = a("table-header-cell", A, j, [], { styles: y }), B = a("table-row", O, k, [], { styles: v }), V = a("table-body", E, D, [], { styles: _ }), H = a("table-head", w, T, [], { styles: g }), U = a("table-sorting-button", P, L, [s], { styles: h }), W = a("table", x, S, [
|
|
102
109
|
R,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
110
|
+
z,
|
|
111
|
+
B,
|
|
112
|
+
H,
|
|
113
|
+
V,
|
|
114
|
+
U
|
|
115
|
+
], { styles: m });
|
|
106
116
|
//#endregion
|
|
107
117
|
//#region src/lib/table/index.ts
|
|
108
|
-
|
|
118
|
+
t(W)();
|
|
109
119
|
//#endregion
|
package/unbundled/decorate.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region \0@oxc-project+runtime@0.
|
|
1
|
+
//#region \0@oxc-project+runtime@0.147.0/helpers/esm/decorate.js
|
|
2
2
|
function __decorate(decorators, target, key, desc) {
|
|
3
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
package/unbundled/decorate.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region \0@oxc-project+runtime@0.
|
|
1
|
+
//#region \0@oxc-project+runtime@0.147.0/helpers/esm/decorate.js
|
|
2
2
|
function __decorate(decorators, target, key, desc) {
|
|
3
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
package/unbundled/definition.cjs
CHANGED
|
@@ -3,7 +3,7 @@ const require_icon = require("./icon.cjs");
|
|
|
3
3
|
let _microsoft_fast_element = require("@microsoft/fast-element");
|
|
4
4
|
let _microsoft_fast_web_utilities = require("@microsoft/fast-web-utilities");
|
|
5
5
|
//#region src/lib/icon/icon.scss?inline
|
|
6
|
-
var icon_default = ":host{vertical-align:sub;display:inline-block}.control.size--6{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)) - 1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16))}.control.size--5{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 20))}.control.size--4{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16))}.control.size--3{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 12))}.control.size--2{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 8))}.control.size--1{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 4))}.control.size-0{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)))}.control.size-1{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 4))}.control.size-2{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 8))}.control.size-3{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 12))}.control.size-4{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 16))}.control.size-5{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 20))}.control:not(.size--6,.size--5,.size--4,.size--3,.size--2,.size--1,.size-0,.size-1,.size-2,.size-3,.size-4,.size-5){--_icon-block-size:1em}.control{margin:unset;block-size:var(--_icon-block-size);color:currentColor;contain:strict;inline-size:var(--_icon-block-size);display:flex}.control[class*=connotation]{color:var(--_connotation-color-primary)}slot,svg,::slotted(:where(svg,img)){block-size:inherit;inline-size:inherit;margin:auto}";
|
|
6
|
+
var icon_default = ":host{vertical-align:sub;display:inline-block}.control.size--7{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)) - 1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 12))}.control.size--6{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)) - 1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16))}.control.size--5{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 20))}.control.size--4{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16))}.control.size--3{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 12))}.control.size--2{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 8))}.control.size--1{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 4))}.control.size-0{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)))}.control.size-1{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 4))}.control.size-2{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 8))}.control.size-3{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 12))}.control.size-4{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 16))}.control.size-5{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 20))}.control:not(.size--7,.size--6,.size--5,.size--4,.size--3,.size--2,.size--1,.size-0,.size-1,.size-2,.size-3,.size-4,.size-5){--_icon-block-size:1em}.control{margin:unset;block-size:var(--_icon-block-size);color:currentColor;contain:strict;inline-size:var(--_icon-block-size);display:flex}.control[class*=connotation]{color:var(--_connotation-color-primary)}slot,svg,::slotted(:where(svg,img)){block-size:inherit;inline-size:inherit;margin:auto}";
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/lib/icon/icon.template.ts
|
|
9
9
|
var iconTemplate = () => {
|
package/unbundled/definition.js
CHANGED
|
@@ -3,7 +3,7 @@ import { t as Icon } from "./icon.js";
|
|
|
3
3
|
import { html, when } from "@microsoft/fast-element";
|
|
4
4
|
import { classNames } from "@microsoft/fast-web-utilities";
|
|
5
5
|
//#region src/lib/icon/icon.scss?inline
|
|
6
|
-
var icon_default = ":host{vertical-align:sub;display:inline-block}.control.size--6{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)) - 1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16))}.control.size--5{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 20))}.control.size--4{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16))}.control.size--3{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 12))}.control.size--2{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 8))}.control.size--1{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 4))}.control.size-0{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)))}.control.size-1{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 4))}.control.size-2{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 8))}.control.size-3{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 12))}.control.size-4{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 16))}.control.size-5{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 20))}.control:not(.size--6,.size--5,.size--4,.size--3,.size--2,.size--1,.size-0,.size-1,.size-2,.size-3,.size-4,.size-5){--_icon-block-size:1em}.control{margin:unset;block-size:var(--_icon-block-size);color:currentColor;contain:strict;inline-size:var(--_icon-block-size);display:flex}.control[class*=connotation]{color:var(--_connotation-color-primary)}slot,svg,::slotted(:where(svg,img)){block-size:inherit;inline-size:inherit;margin:auto}";
|
|
6
|
+
var icon_default = ":host{vertical-align:sub;display:inline-block}.control.size--7{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)) - 1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 12))}.control.size--6{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)) - 1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16))}.control.size--5{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 20))}.control.size--4{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16))}.control.size--3{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 12))}.control.size--2{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 8))}.control.size--1{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 4))}.control.size-0{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)))}.control.size-1{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 4))}.control.size-2{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 8))}.control.size-3{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 12))}.control.size-4{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 16))}.control.size-5{--_icon-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 20))}.control:not(.size--7,.size--6,.size--5,.size--4,.size--3,.size--2,.size--1,.size-0,.size-1,.size-2,.size-3,.size-4,.size-5){--_icon-block-size:1em}.control{margin:unset;block-size:var(--_icon-block-size);color:currentColor;contain:strict;inline-size:var(--_icon-block-size);display:flex}.control[class*=connotation]{color:var(--_connotation-color-primary)}slot,svg,::slotted(:where(svg,img)){block-size:inherit;inline-size:inherit;margin:auto}";
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/lib/icon/icon.template.ts
|
|
9
9
|
var iconTemplate = () => {
|
|
@@ -21,7 +21,7 @@ var avatarAppearance = require_component_enum.componentEnum([
|
|
|
21
21
|
/**
|
|
22
22
|
* @public
|
|
23
23
|
* @component avatar
|
|
24
|
-
* @slot graphic - Assign nodes to the graphic slot to set a graphic media of any kind (e.g
|
|
24
|
+
* @slot graphic - Assign nodes to the graphic slot to set a graphic media of any kind (e.g., image, illustration, etc.).
|
|
25
25
|
* @slot icon - The preferred way to add an icon to the component.
|
|
26
26
|
*/
|
|
27
27
|
var Avatar = class extends require_linkable.Linkable(require_vivid_element.VividElement) {
|
|
@@ -21,7 +21,7 @@ var avatarAppearance = componentEnum([
|
|
|
21
21
|
/**
|
|
22
22
|
* @public
|
|
23
23
|
* @component avatar
|
|
24
|
-
* @slot graphic - Assign nodes to the graphic slot to set a graphic media of any kind (e.g
|
|
24
|
+
* @slot graphic - Assign nodes to the graphic slot to set a graphic media of any kind (e.g., image, illustration, etc.).
|
|
25
25
|
* @slot icon - The preferred way to add an icon to the component.
|
|
26
26
|
*/
|
|
27
27
|
var Avatar = class extends Linkable(VividElement) {
|
|
@@ -38,18 +38,23 @@ require_decorate.__decorate([_microsoft_fast_element.attr], Badge.prototype, "si
|
|
|
38
38
|
require_decorate.__decorate([_microsoft_fast_element.attr], Badge.prototype, "appearance", void 0);
|
|
39
39
|
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ mode: "boolean" })], Badge.prototype, "count", void 0);
|
|
40
40
|
require_decorate.__decorate([_microsoft_fast_element.attr], Badge.prototype, "text", void 0);
|
|
41
|
+
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ attribute: "text-secondary" })], Badge.prototype, "textSecondary", void 0);
|
|
41
42
|
//#endregion
|
|
42
43
|
//#region src/lib/badge/badge.scss?inline
|
|
43
|
-
var badge_default = ":host{display:inline-flex}.base{box-sizing:border-box;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-condensed-bold);vertical-align:middle;justify-content:center;align-items:center;column-gap:8px;display:inline-flex}.base:not(.icon-only){max-inline-size:100%}.base.icon-only{contain:size;place-content:center;padding-inline:0}@supports (aspect-ratio:1){.base.icon-only{aspect-ratio:1}}@supports not (aspect-ratio:1){.base.icon-only{inline-size:var(--_badge-block-size)}}.base:not(.shape-pill){border-radius:4px}.base.shape-pill{border-radius:16px}.base:not(.dot){block-size:var(--_badge-block-size);inline-size:100%;min-inline-size:var(--_badge-block-size);padding-inline:var(--_badge-padding-inline)}.base.dot{block-size:calc(var(--_badge-block-size) / 2);contain:size;inline-size:calc(var(--_badge-block-size) / 2);border-radius:50%}.base:not(.size-expanded){--_badge-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 20))}.base:not(.size-expanded):not(.count){--_badge-padding-inline:8px}.base:not(.size-expanded).count{--_badge-padding-inline:6px}.base.size-expanded{--_badge-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16));--_badge-padding-inline:8px}.text{text-overflow:ellipsis;white-space:nowrap;max-inline-size:100%;overflow:hidden}slot[name=icon]{font-size:calc(var(--_badge-block-size) / 1.6667);flex-shrink:0;line-height:1}.icon-trailing slot[name=icon]{order:1;display:flex}";
|
|
44
|
+
var badge_default = ":host{display:inline-flex}.base{box-sizing:border-box;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-condensed-bold);vertical-align:middle;justify-content:center;align-items:center;column-gap:8px;display:inline-flex}.base:not(.icon-only){max-inline-size:100%}.base.icon-only{contain:size;place-content:center;padding-inline:0}@supports (aspect-ratio:1){.base.icon-only{aspect-ratio:1}}@supports not (aspect-ratio:1){.base.icon-only{inline-size:var(--_badge-block-size)}}.base:not(.shape-pill){border-radius:4px}.base.shape-pill{border-radius:16px}.base:not(.dot){block-size:var(--_badge-block-size);inline-size:100%;min-inline-size:var(--_badge-block-size);padding-inline:var(--_badge-padding-inline)}.base.dot{block-size:calc(var(--_badge-block-size) / 2);contain:size;inline-size:calc(var(--_badge-block-size) / 2);border-radius:50%}.base:not(.size-expanded){--_badge-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 20))}.base:not(.size-expanded):not(.count){--_badge-padding-inline:8px}.base:not(.size-expanded).count{--_badge-padding-inline:6px}.base.size-expanded{--_badge-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16));--_badge-padding-inline:8px}.content{column-gap:4px;max-inline-size:100%;display:flex;overflow:hidden}.text,.text-secondary{text-overflow:ellipsis;white-space:nowrap;max-inline-size:100%;overflow:hidden}.text-secondary{font:var(--vvd-typography-base-condensed)}slot[name=icon]{font-size:calc(var(--_badge-block-size) / 1.6667);flex-shrink:0;line-height:1}.icon-trailing slot[name=icon]{order:1;display:flex}";
|
|
44
45
|
//#endregion
|
|
45
46
|
//#region src/lib/badge/badge.template.ts
|
|
46
47
|
var badgeTemplate = (context) => {
|
|
47
48
|
const affixIconTemplate = require_affix.affixIconTemplateFactory(context);
|
|
48
49
|
return _microsoft_fast_element.html`<span
|
|
49
|
-
class="${(x) => (0, _microsoft_fast_web_utilities.classNames)("base", `connotation-${badgeConnotation.parse(x.connotation)}`, `appearance-${badgeAppearance.parse(x.appearance)}`, "with-idle", [`shape-${x.shape}`, Boolean(x.shape)], [`size-${x.size}`, Boolean(x.size)], ["icon-trailing", x.iconTrailing], ["icon-only", !x.text && (Boolean(x.icon) || Boolean(x.iconSlottedContent?.length))], ["count", x.count], ["dot", !x.text && !x.icon && !x.iconSlottedContent?.length])}"
|
|
50
|
+
class="${(x) => (0, _microsoft_fast_web_utilities.classNames)("base", `connotation-${badgeConnotation.parse(x.connotation)}`, `appearance-${badgeAppearance.parse(x.appearance)}`, "with-idle", [`shape-${x.shape}`, Boolean(x.shape)], [`size-${x.size}`, Boolean(x.size)], ["icon-trailing", x.iconTrailing], ["icon-only", !x.text && !x.textSecondary && (Boolean(x.icon) || Boolean(x.iconSlottedContent?.length))], ["count", x.count], ["dot", !x.text && !x.textSecondary && !x.icon && !x.iconSlottedContent?.length])}"
|
|
50
51
|
>
|
|
51
52
|
${(x) => affixIconTemplate(x.icon, require_affix.IconWrapper.Slot)}
|
|
52
|
-
${(0, _microsoft_fast_element.when)((x) => x.text
|
|
53
|
+
${(0, _microsoft_fast_element.when)((x) => x.text || x.textSecondary, _microsoft_fast_element.html`<span class="content"
|
|
54
|
+
>${(0, _microsoft_fast_element.when)((x) => x.text, _microsoft_fast_element.html`<span class="text">${(x) => x.text}</span>`)}${(x) => x.text && x.textSecondary ? " " : ""}${(0, _microsoft_fast_element.when)((x) => x.textSecondary, _microsoft_fast_element.html`<span class="text-secondary"
|
|
55
|
+
>${(x) => x.textSecondary}</span
|
|
56
|
+
>`)}</span
|
|
57
|
+
>`)}
|
|
53
58
|
</span>`;
|
|
54
59
|
};
|
|
55
60
|
//#endregion
|
|
@@ -38,18 +38,23 @@ __decorate([attr], Badge.prototype, "size", void 0);
|
|
|
38
38
|
__decorate([attr], Badge.prototype, "appearance", void 0);
|
|
39
39
|
__decorate([attr({ mode: "boolean" })], Badge.prototype, "count", void 0);
|
|
40
40
|
__decorate([attr], Badge.prototype, "text", void 0);
|
|
41
|
+
__decorate([attr({ attribute: "text-secondary" })], Badge.prototype, "textSecondary", void 0);
|
|
41
42
|
//#endregion
|
|
42
43
|
//#region src/lib/badge/badge.scss?inline
|
|
43
|
-
var badge_default = ":host{display:inline-flex}.base{box-sizing:border-box;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-condensed-bold);vertical-align:middle;justify-content:center;align-items:center;column-gap:8px;display:inline-flex}.base:not(.icon-only){max-inline-size:100%}.base.icon-only{contain:size;place-content:center;padding-inline:0}@supports (aspect-ratio:1){.base.icon-only{aspect-ratio:1}}@supports not (aspect-ratio:1){.base.icon-only{inline-size:var(--_badge-block-size)}}.base:not(.shape-pill){border-radius:4px}.base.shape-pill{border-radius:16px}.base:not(.dot){block-size:var(--_badge-block-size);inline-size:100%;min-inline-size:var(--_badge-block-size);padding-inline:var(--_badge-padding-inline)}.base.dot{block-size:calc(var(--_badge-block-size) / 2);contain:size;inline-size:calc(var(--_badge-block-size) / 2);border-radius:50%}.base:not(.size-expanded){--_badge-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 20))}.base:not(.size-expanded):not(.count){--_badge-padding-inline:8px}.base:not(.size-expanded).count{--_badge-padding-inline:6px}.base.size-expanded{--_badge-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16));--_badge-padding-inline:8px}.text{text-overflow:ellipsis;white-space:nowrap;max-inline-size:100%;overflow:hidden}slot[name=icon]{font-size:calc(var(--_badge-block-size) / 1.6667);flex-shrink:0;line-height:1}.icon-trailing slot[name=icon]{order:1;display:flex}";
|
|
44
|
+
var badge_default = ":host{display:inline-flex}.base{box-sizing:border-box;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-condensed-bold);vertical-align:middle;justify-content:center;align-items:center;column-gap:8px;display:inline-flex}.base:not(.icon-only){max-inline-size:100%}.base.icon-only{contain:size;place-content:center;padding-inline:0}@supports (aspect-ratio:1){.base.icon-only{aspect-ratio:1}}@supports not (aspect-ratio:1){.base.icon-only{inline-size:var(--_badge-block-size)}}.base:not(.shape-pill){border-radius:4px}.base.shape-pill{border-radius:16px}.base:not(.dot){block-size:var(--_badge-block-size);inline-size:100%;min-inline-size:var(--_badge-block-size);padding-inline:var(--_badge-padding-inline)}.base.dot{block-size:calc(var(--_badge-block-size) / 2);contain:size;inline-size:calc(var(--_badge-block-size) / 2);border-radius:50%}.base:not(.size-expanded){--_badge-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 20))}.base:not(.size-expanded):not(.count){--_badge-padding-inline:8px}.base:not(.size-expanded).count{--_badge-padding-inline:6px}.base.size-expanded{--_badge-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16));--_badge-padding-inline:8px}.content{column-gap:4px;max-inline-size:100%;display:flex;overflow:hidden}.text,.text-secondary{text-overflow:ellipsis;white-space:nowrap;max-inline-size:100%;overflow:hidden}.text-secondary{font:var(--vvd-typography-base-condensed)}slot[name=icon]{font-size:calc(var(--_badge-block-size) / 1.6667);flex-shrink:0;line-height:1}.icon-trailing slot[name=icon]{order:1;display:flex}";
|
|
44
45
|
//#endregion
|
|
45
46
|
//#region src/lib/badge/badge.template.ts
|
|
46
47
|
var badgeTemplate = (context) => {
|
|
47
48
|
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
48
49
|
return html`<span
|
|
49
|
-
class="${(x) => classNames("base", `connotation-${badgeConnotation.parse(x.connotation)}`, `appearance-${badgeAppearance.parse(x.appearance)}`, "with-idle", [`shape-${x.shape}`, Boolean(x.shape)], [`size-${x.size}`, Boolean(x.size)], ["icon-trailing", x.iconTrailing], ["icon-only", !x.text && (Boolean(x.icon) || Boolean(x.iconSlottedContent?.length))], ["count", x.count], ["dot", !x.text && !x.icon && !x.iconSlottedContent?.length])}"
|
|
50
|
+
class="${(x) => classNames("base", `connotation-${badgeConnotation.parse(x.connotation)}`, `appearance-${badgeAppearance.parse(x.appearance)}`, "with-idle", [`shape-${x.shape}`, Boolean(x.shape)], [`size-${x.size}`, Boolean(x.size)], ["icon-trailing", x.iconTrailing], ["icon-only", !x.text && !x.textSecondary && (Boolean(x.icon) || Boolean(x.iconSlottedContent?.length))], ["count", x.count], ["dot", !x.text && !x.textSecondary && !x.icon && !x.iconSlottedContent?.length])}"
|
|
50
51
|
>
|
|
51
52
|
${(x) => affixIconTemplate(x.icon, IconWrapper.Slot)}
|
|
52
|
-
${when((x) => x.text
|
|
53
|
+
${when((x) => x.text || x.textSecondary, html`<span class="content"
|
|
54
|
+
>${when((x) => x.text, html`<span class="text">${(x) => x.text}</span>`)}${(x) => x.text && x.textSecondary ? " " : ""}${when((x) => x.textSecondary, html`<span class="text-secondary"
|
|
55
|
+
>${(x) => x.textSecondary}</span
|
|
56
|
+
>`)}</span
|
|
57
|
+
>`)}
|
|
53
58
|
</span>`;
|
|
54
59
|
};
|
|
55
60
|
//#endregion
|
|
@@ -21,7 +21,7 @@ var accordionItemAppearance = require_component_enum.componentEnum([
|
|
|
21
21
|
* @slot icon - The preferred way to add an icon to the component.
|
|
22
22
|
* @slot meta - Used to add additional content to the heading.
|
|
23
23
|
* @slot heading - Used to add content to the heading.
|
|
24
|
-
* @event {CustomEvent<undefined>} change - Fires a custom 'change' event when the
|
|
24
|
+
* @event {CustomEvent<undefined>} change - Fires a custom 'change' event when the Accordion Item is toggled by the user.
|
|
25
25
|
* @testSelector byHeading byHeading
|
|
26
26
|
* @testAction expand toggleAccordionItem true
|
|
27
27
|
* @testAction collapse toggleAccordionItem false
|
package/unbundled/definition2.js
CHANGED
|
@@ -21,7 +21,7 @@ var accordionItemAppearance = componentEnum([
|
|
|
21
21
|
* @slot icon - The preferred way to add an icon to the component.
|
|
22
22
|
* @slot meta - Used to add additional content to the heading.
|
|
23
23
|
* @slot heading - Used to add content to the heading.
|
|
24
|
-
* @event {CustomEvent<undefined>} change - Fires a custom 'change' event when the
|
|
24
|
+
* @event {CustomEvent<undefined>} change - Fires a custom 'change' event when the Accordion Item is toggled by the user.
|
|
25
25
|
* @testSelector byHeading byHeading
|
|
26
26
|
* @testAction expand toggleAccordionItem true
|
|
27
27
|
* @testAction collapse toggleAccordionItem false
|
|
@@ -7,7 +7,7 @@ const require_anchored = require("./anchored.cjs");
|
|
|
7
7
|
let _microsoft_fast_element = require("@microsoft/fast-element");
|
|
8
8
|
let _microsoft_fast_web_utilities = require("@microsoft/fast-web-utilities");
|
|
9
9
|
//#region src/lib/toggletip/toggletip.scss?inline
|
|
10
|
-
var toggletip_default = ":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:
|
|
10
|
+
var toggletip_default = ":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:8px 12px}.content{font:var(--vvd-typography-base-bold)}.has-headline .content{font:var(--vvd-typography-base)}.headline{font:var(--vvd-typography-base-bold);margin:0 0 2px}.text-secondary{color:var(--vvd-color-neutral-600);font:var(--vvd-typography-base);margin:0}.text-secondary:first-child{margin-block-start:0}.action-items{justify-content:flex-end;gap:8px;display:flex}::slotted([slot=action-items]){margin-block-start:12px}";
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/lib/toggletip/toggletip.ts
|
|
13
13
|
/**
|
|
@@ -98,7 +98,7 @@ require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ mode: "fromView
|
|
|
98
98
|
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ mode: "boolean" })], Toggletip.prototype, "open", void 0);
|
|
99
99
|
//#endregion
|
|
100
100
|
//#region src/lib/toggletip/toggletip.template.ts
|
|
101
|
-
var getClasses = (
|
|
101
|
+
var getClasses = (x) => (0, _microsoft_fast_web_utilities.classNames)("control", ["has-headline", x.headline !== void 0]);
|
|
102
102
|
var ToggletipTemplate = (context) => {
|
|
103
103
|
const popup = context.tagFor(require_definition.Popup);
|
|
104
104
|
const anchorSlotTemplate = require_anchored.anchorSlotTemplateFactory();
|
|
@@ -109,7 +109,7 @@ var ToggletipTemplate = (context) => {
|
|
|
109
109
|
if (x.open && require_dialog.handleEscapeKeyAndStopPropogation(event)) return false;
|
|
110
110
|
return true;
|
|
111
111
|
}}"
|
|
112
|
-
class="${getClasses}"
|
|
112
|
+
class="${(x) => getClasses(x)}"
|
|
113
113
|
arrow
|
|
114
114
|
:anchor="${(x) => x._anchorEl}"
|
|
115
115
|
:open="${(x) => x.open}"
|
|
@@ -120,7 +120,7 @@ var ToggletipTemplate = (context) => {
|
|
|
120
120
|
<div class="content-wrapper">
|
|
121
121
|
${(0, _microsoft_fast_element.when)((x) => x.headline, _microsoft_fast_element.html`<h2 class="headline">${(x) => x.headline}</h2>`)}
|
|
122
122
|
${(0, _microsoft_fast_element.when)((x) => x.textSecondary, _microsoft_fast_element.html`<p class="text-secondary">${(x) => x.textSecondary}</p>`)}
|
|
123
|
-
<slot></slot>
|
|
123
|
+
<span class="content"><slot></slot></span>
|
|
124
124
|
<div class="action-items"><slot name="action-items"></slot></div>
|
|
125
125
|
</div>
|
|
126
126
|
</${popup}>
|
|
@@ -7,7 +7,7 @@ import { i as setAnchorExpanded, n as anchorSlotTemplateFactory, r as clearAncho
|
|
|
7
7
|
import { Updates, attr, html, when } from "@microsoft/fast-element";
|
|
8
8
|
import { classNames } from "@microsoft/fast-web-utilities";
|
|
9
9
|
//#region src/lib/toggletip/toggletip.scss?inline
|
|
10
|
-
var toggletip_default = ":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:
|
|
10
|
+
var toggletip_default = ":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:8px 12px}.content{font:var(--vvd-typography-base-bold)}.has-headline .content{font:var(--vvd-typography-base)}.headline{font:var(--vvd-typography-base-bold);margin:0 0 2px}.text-secondary{color:var(--vvd-color-neutral-600);font:var(--vvd-typography-base);margin:0}.text-secondary:first-child{margin-block-start:0}.action-items{justify-content:flex-end;gap:8px;display:flex}::slotted([slot=action-items]){margin-block-start:12px}";
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/lib/toggletip/toggletip.ts
|
|
13
13
|
/**
|
|
@@ -98,7 +98,7 @@ __decorate([attr({ mode: "fromView" })], Toggletip.prototype, "placement", void
|
|
|
98
98
|
__decorate([attr({ mode: "boolean" })], Toggletip.prototype, "open", void 0);
|
|
99
99
|
//#endregion
|
|
100
100
|
//#region src/lib/toggletip/toggletip.template.ts
|
|
101
|
-
var getClasses = (
|
|
101
|
+
var getClasses = (x) => classNames("control", ["has-headline", x.headline !== void 0]);
|
|
102
102
|
var ToggletipTemplate = (context) => {
|
|
103
103
|
const popup = context.tagFor(Popup);
|
|
104
104
|
const anchorSlotTemplate = anchorSlotTemplateFactory();
|
|
@@ -109,7 +109,7 @@ var ToggletipTemplate = (context) => {
|
|
|
109
109
|
if (x.open && handleEscapeKeyAndStopPropogation(event)) return false;
|
|
110
110
|
return true;
|
|
111
111
|
}}"
|
|
112
|
-
class="${getClasses}"
|
|
112
|
+
class="${(x) => getClasses(x)}"
|
|
113
113
|
arrow
|
|
114
114
|
:anchor="${(x) => x._anchorEl}"
|
|
115
115
|
:open="${(x) => x.open}"
|
|
@@ -120,7 +120,7 @@ var ToggletipTemplate = (context) => {
|
|
|
120
120
|
<div class="content-wrapper">
|
|
121
121
|
${when((x) => x.headline, html`<h2 class="headline">${(x) => x.headline}</h2>`)}
|
|
122
122
|
${when((x) => x.textSecondary, html`<p class="text-secondary">${(x) => x.textSecondary}</p>`)}
|
|
123
|
-
<slot></slot>
|
|
123
|
+
<span class="content"><slot></slot></span>
|
|
124
124
|
<div class="action-items"><slot name="action-items"></slot></div>
|
|
125
125
|
</div>
|
|
126
126
|
</${popup}>
|
|
@@ -26,7 +26,11 @@ var ContextualHelpTemplate = (context) => {
|
|
|
26
26
|
const toggletipTag = context.tagFor(require_definition$1.Toggletip);
|
|
27
27
|
const iconTag = context.tagFor(require_icon.Icon);
|
|
28
28
|
return _microsoft_fast_element.html`
|
|
29
|
-
<${toggletipTag}
|
|
29
|
+
<${toggletipTag}
|
|
30
|
+
class="base"
|
|
31
|
+
exportparts="vvd-theme-alternate"
|
|
32
|
+
placement="${(x) => x.placement}"
|
|
33
|
+
>
|
|
30
34
|
<button class="${getClasses}" slot="anchor">
|
|
31
35
|
<slot name="icon" slot="icon">
|
|
32
36
|
<${iconTag} name="help-solid"></${iconTag}>
|
|
@@ -26,7 +26,11 @@ var ContextualHelpTemplate = (context) => {
|
|
|
26
26
|
const toggletipTag = context.tagFor(Toggletip);
|
|
27
27
|
const iconTag = context.tagFor(Icon);
|
|
28
28
|
return html`
|
|
29
|
-
<${toggletipTag}
|
|
29
|
+
<${toggletipTag}
|
|
30
|
+
class="base"
|
|
31
|
+
exportparts="vvd-theme-alternate"
|
|
32
|
+
placement="${(x) => x.placement}"
|
|
33
|
+
>
|
|
30
34
|
<button class="${getClasses}" slot="anchor">
|
|
31
35
|
<slot name="icon" slot="icon">
|
|
32
36
|
<${iconTag} name="help-solid"></${iconTag}>
|
|
@@ -8,7 +8,7 @@ const require_randomId = require("./randomId.cjs");
|
|
|
8
8
|
let _microsoft_fast_element = require("@microsoft/fast-element");
|
|
9
9
|
let _microsoft_fast_web_utilities = require("@microsoft/fast-web-utilities");
|
|
10
10
|
//#region src/lib/tooltip/tooltip.scss?inline
|
|
11
|
-
var tooltip_default = ":host :host{display:var(--_popup-display,inline)}:host :host([slotted-anchor]){--_popup-display:contents}.control{pointer-events:none}.tooltip{width:var(--tooltip-inline-size,auto);box-sizing:border-box;color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base-bold);max-inline-size:var(--tooltip-max-inline-size,30ch);flex-direction:column;align-items:flex-start;gap:
|
|
11
|
+
var tooltip_default = ":host :host{display:var(--_popup-display,inline)}:host :host([slotted-anchor]){--_popup-display:contents}.control{pointer-events:none}.tooltip{width:var(--tooltip-inline-size,auto);box-sizing:border-box;color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base-bold);max-inline-size:var(--tooltip-max-inline-size,30ch);flex-direction:column;align-items:flex-start;gap:2px;padding:8px 12px;display:flex}.control:not(.has-text) .text{display:none}.content{display:contents}.has-text .content{font:var(--vvd-typography-base)}.text-secondary{color:var(--vvd-color-neutral-600);font:var(--vvd-typography-base)}";
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/lib/tooltip/tooltip.ts
|
|
14
14
|
/**
|
|
@@ -116,13 +116,14 @@ require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ mode: "boolean"
|
|
|
116
116
|
require_decorate.__decorate([_microsoft_fast_element.observable], Tooltip.prototype, "_defaultSlotContent", void 0);
|
|
117
117
|
//#endregion
|
|
118
118
|
//#region src/lib/tooltip/tooltip.template.ts
|
|
119
|
+
var getClasses = (x) => (0, _microsoft_fast_web_utilities.classNames)("control", ["has-text", x.text !== void 0], ["open", x.open]);
|
|
119
120
|
var TooltipTemplate = (context) => {
|
|
120
121
|
const popupTag = context.tagFor(require_definition.Popup);
|
|
121
122
|
const anchorSlotTemplate = require_anchored.anchorSlotTemplateFactory();
|
|
122
123
|
return _microsoft_fast_element.html`
|
|
123
124
|
${anchorSlotTemplate}
|
|
124
125
|
${require_randomId.renderInLightDOM(_microsoft_fast_element.html`<span slot="_description" id="${(x) => x._descriptionId}">${(x) => x.text}</span><span slot="_description-secondary" id="${(x) => x._descriptionSecondaryId}">${(x) => x.textSecondary}</span>`)}
|
|
125
|
-
<${popupTag} class="${(x) => (
|
|
126
|
+
<${popupTag} class="${(x) => getClasses(x)}" arrow alternate
|
|
126
127
|
:placement=${(x) => x.placement}
|
|
127
128
|
:anchor="${(x) => x._anchorEl}"
|
|
128
129
|
:open="${(x) => x.open}"
|
|
@@ -135,12 +136,14 @@ ${require_randomId.renderInLightDOM(_microsoft_fast_element.html`<span slot="_de
|
|
|
135
136
|
${(0, _microsoft_fast_element.when)((x) => x.textSecondary, _microsoft_fast_element.html`<span class="text-secondary"
|
|
136
137
|
><slot name="_description-secondary"></slot
|
|
137
138
|
></span>`)}
|
|
138
|
-
<
|
|
139
|
-
|
|
139
|
+
<span class="content"
|
|
140
|
+
><slot
|
|
141
|
+
${(0, _microsoft_fast_element.slotted)({
|
|
140
142
|
property: "_defaultSlotContent",
|
|
141
143
|
filter: (0, _microsoft_fast_element.elements)()
|
|
142
144
|
})}
|
|
143
|
-
|
|
145
|
+
></slot
|
|
146
|
+
></span>
|
|
144
147
|
<slot name="kbd-shortcut"
|
|
145
148
|
${(0, _microsoft_fast_element.slotted)({
|
|
146
149
|
property: "_kbdShortcutSlotted",
|