@ds-autonomie/web-components 2.17.0 → 2.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/cdn/chunks/{chunk.W25NCUPA.js → chunk.23QXZAWH.js} +7 -8
- package/cdn/chunks/{chunk.SPZ3HJLD.js → chunk.3FYOZ6BI.js} +5 -5
- package/cdn/chunks/{chunk.D5S2YDML.js → chunk.3TFD5K7U.js} +1 -1
- package/cdn/chunks/chunk.4NE2V6DW.js +9 -0
- package/cdn/chunks/chunk.67MZYN3N.js +37 -0
- package/cdn/chunks/{chunk.2UUQJVQI.js → chunk.6AGU5DOT.js} +1 -1
- package/cdn/chunks/chunk.A6JUKRCA.js +38 -0
- package/cdn/chunks/{chunk.465G6RHI.js → chunk.AOPSMRYY.js} +1 -1
- package/cdn/chunks/chunk.AZWPWL5D.js +44 -0
- package/cdn/chunks/{chunk.M2JVAL5G.js → chunk.BRP4WPSN.js} +5 -5
- package/cdn/chunks/chunk.E6XLVREY.js +11 -0
- package/cdn/chunks/{chunk.RVQUT7ZY.js → chunk.EHLI2NSG.js} +8 -8
- package/cdn/chunks/{chunk.ZPQE4HH4.js → chunk.EJ5DXQU3.js} +1 -9
- package/cdn/chunks/{chunk.A6MZKELV.js → chunk.F6YFQ3GB.js} +1 -2
- package/cdn/chunks/{chunk.N7EFYGZ6.js → chunk.H5VVBPCR.js} +13 -13
- package/cdn/chunks/chunk.HJUAHLY6.js +60 -0
- package/cdn/chunks/chunk.HLG5HGVW.js +11 -0
- package/cdn/chunks/chunk.MTXJMWYM.js +64 -0
- package/cdn/chunks/{chunk.LLKFUARE.js → chunk.OFITABL5.js} +10 -10
- package/cdn/chunks/chunk.PFU2C3OZ.js +1 -0
- package/cdn/chunks/{chunk.3HXQ2XPS.js → chunk.QJLFNSIA.js} +4 -4
- package/cdn/chunks/{chunk.AAEIE3M2.js → chunk.RNR6P3VA.js} +3 -4
- package/cdn/chunks/{chunk.ZKV4BJLY.js → chunk.S4UDOENW.js} +3 -3
- package/cdn/chunks/{chunk.MWGVWSH3.js → chunk.SDPQMM4W.js} +2 -2
- package/cdn/chunks/{chunk.IKPDLLWM.js → chunk.TGVZIOKS.js} +1 -1
- package/cdn/chunks/chunk.THOSFGWY.js +31 -0
- package/cdn/chunks/chunk.TM7AGXEU.js +13 -0
- package/cdn/chunks/{chunk.NE525Q3J.js → chunk.VMY3LI3D.js} +8 -8
- package/cdn/chunks/{chunk.S5TQGB4V.js → chunk.W3ZGFMS3.js} +1 -1
- package/cdn/chunks/chunk.X4U7WI77.js +28 -0
- package/cdn/chunks/{chunk.BXV6H4J7.js → chunk.YUUDCDMZ.js} +1 -1
- package/cdn/chunks/{chunk.X4UXKXMO.js → chunk.ZKKBL76K.js} +6 -6
- package/cdn/chunks/{chunk.LA5W25UC.js → chunk.ZWCO2GBI.js} +1 -1
- package/cdn/components/filter-counter/filter-counter.js +1 -1
- package/cdn/components/filter-date/filter-date.js +1 -1
- package/cdn/components/filter-range/filter-range.js +1 -1
- package/cdn/components/filter-select/filter-select.js +1 -1
- package/cdn/components/header-search/header-search.d.ts +2 -0
- package/cdn/components/header-search/header-search.js +1 -1
- package/cdn/components/input/input.js +1 -1
- package/cdn/components/input-date/input-date.d.ts +3 -0
- package/cdn/components/input-date/input-date.js +1 -1
- package/cdn/components/menu-navigation/menu-navigation.d.ts +0 -4
- package/cdn/components/menu-navigation/menu-navigation.js +1 -1
- package/cdn/components/navbar/navbar.d.ts +0 -4
- package/cdn/components/navbar/navbar.js +1 -1
- package/cdn/components/navbar-link/navbar-link.js +1 -1
- package/cdn/components/pagination/pagination.js +1 -1
- package/cdn/components/table/table.js +1 -1
- package/cdn/components/table-action/table-action.js +1 -1
- package/cdn/components/table-action/table-action.styles.js +1 -1
- package/cdn/components/table-body/table-body.js +1 -1
- package/cdn/components/table-caption/table-caption.js +1 -1
- package/cdn/components/table-caption/table-caption.styles.js +1 -1
- package/cdn/components/table-container/table-container.d.ts +2 -0
- package/cdn/components/table-container/table-container.js +1 -1
- package/cdn/components/table-container/table-container.styles.js +1 -1
- package/cdn/components/table-expanded-row/table-expanded-row.d.ts +1 -1
- package/cdn/components/table-head/table-head.js +1 -1
- package/cdn/components/table-header-cell/table-header-cell.js +1 -1
- package/cdn/components/table-header-cell/table-header-cell.styles.js +1 -1
- package/cdn/components/table-header-row/table-header-row.d.ts +1 -0
- package/cdn/components/table-header-row/table-header-row.js +1 -1
- package/cdn/components/table-header-row/table-header-row.styles.js +1 -1
- package/cdn/components/table-of-contents/table-of-contents.d.ts +4 -5
- package/cdn/components/table-of-contents/table-of-contents.js +1 -1
- package/cdn/components/table-of-contents/table-of-contents.styles.js +1 -1
- package/cdn/components/table-row/table-row-base.styles.d.ts +2 -0
- package/cdn/components/table-row/table-row-base.styles.js +1 -0
- package/cdn/components/table-row/table-row.d.ts +2 -0
- package/cdn/components/table-row/table-row.js +1 -1
- package/cdn/components/table-row/table-row.styles.js +1 -1
- package/cdn/components/table-toolbar/table-toolbar.js +1 -1
- package/cdn/components/table-toolbar/table-toolbar.styles.js +1 -1
- package/cdn/components/tree/tree.d.ts +0 -4
- package/cdn/components/tree/tree.js +1 -1
- package/cdn/components/tree-item/tree-item.js +1 -1
- package/cdn/components/tree-item/tree-item.styles.js +1 -1
- package/cdn/custom-elements.json +145 -102
- package/cdn/design-system.js +1 -1
- package/cdn/internal/components/date-field/date-field.styles.js +2 -2
- package/cdn/themes/dsa-wc-theme.css +20 -45
- package/cdn/themes/dsa-wc-theme.min.css +1 -1
- package/cdn/themes/dsa-wc-theme.styles.js +20 -46
- package/cdn/vscode.html-custom-data.json +18 -8
- package/cdn/web-types.json +87 -47
- package/dist/chunks/{chunk.LPQTWKYW.js → chunk.3NOR7Y4Y.js} +1 -1
- package/dist/chunks/{chunk.ORFYYGB2.js → chunk.5T4IWZR2.js} +2 -2
- package/dist/chunks/{chunk.HHVXZJUU.js → chunk.63ACYDSJ.js} +33 -2
- package/dist/chunks/{chunk.SN5JW345.js → chunk.6TDKZD7U.js} +8 -8
- package/dist/chunks/{chunk.BTEEMPDS.js → chunk.A42VA6HE.js} +8 -4
- package/dist/chunks/{chunk.NCN4I6KX.js → chunk.ATUDHG2E.js} +5 -5
- package/dist/chunks/{chunk.DC6KKJOX.js → chunk.BHEY6E7D.js} +64 -30
- package/dist/chunks/{chunk.MXDGKTTH.js → chunk.BSSSDSVK.js} +3 -3
- package/dist/chunks/{chunk.2VZ4MMR5.js → chunk.D6D5UTHQ.js} +5 -0
- package/dist/chunks/{chunk.7S4HUOC7.js → chunk.DMQJ4GLL.js} +9 -6
- package/dist/chunks/chunk.DYZHSPWO.js +48 -0
- package/dist/chunks/{chunk.73XRFTV7.js → chunk.EHGHV3EE.js} +1 -1
- package/dist/chunks/{chunk.3RFVW3FP.js → chunk.GBBK2LRH.js} +1 -1
- package/dist/chunks/{chunk.5FNJFIAP.js → chunk.IDBAIF3R.js} +8 -8
- package/dist/chunks/{chunk.57DTA5ZP.js → chunk.JFAQ5QOI.js} +1 -1
- package/dist/chunks/{chunk.MXQ5RSBS.js → chunk.MDQDWJCR.js} +1 -2
- package/dist/chunks/chunk.MVDMKWDN.js +41 -0
- package/dist/chunks/{chunk.3W6ROVW2.js → chunk.PFQ6NGY7.js} +31 -3
- package/dist/chunks/{chunk.QBVIZ55Q.js → chunk.POR4SJ2I.js} +5 -5
- package/dist/chunks/{chunk.HALYTFYA.js → chunk.RFJJRWWT.js} +2 -2
- package/dist/chunks/{chunk.VA2ASBUR.js → chunk.RIMN7NRW.js} +1 -1
- package/dist/chunks/{chunk.OKTHM7J2.js → chunk.RKKRGVJW.js} +3 -43
- package/dist/chunks/{chunk.VBUVNNMA.js → chunk.T3CLPVPE.js} +1 -1
- package/dist/chunks/{chunk.ANV74452.js → chunk.TF4MJ3XV.js} +1 -1
- package/dist/chunks/{chunk.XDW2FM6B.js → chunk.TURUUPFG.js} +3 -3
- package/dist/chunks/{chunk.SGKW2DOH.js → chunk.UXJPFBV5.js} +3 -3
- package/dist/chunks/chunk.WLP7MATK.js +23 -0
- package/dist/chunks/{chunk.UEVTKGMG.js → chunk.WO56WJXU.js} +1 -9
- package/dist/chunks/{chunk.LAPA4KOO.js → chunk.WYLT5ZNJ.js} +2 -2
- package/dist/chunks/{chunk.OW6RUTZA.js → chunk.YS4HYV3F.js} +3 -3
- package/dist/chunks/{chunk.QOW4B54V.js → chunk.ZU3DGID3.js} +5 -16
- package/dist/components/filter-counter/filter-counter.js +4 -4
- package/dist/components/filter-date/filter-date.js +1 -1
- package/dist/components/filter-range/filter-range.js +4 -4
- package/dist/components/filter-select/filter-select.js +4 -4
- package/dist/components/header-search/header-search.d.ts +2 -0
- package/dist/components/header-search/header-search.js +1 -1
- package/dist/components/input/input.js +3 -3
- package/dist/components/input-date/input-date.d.ts +3 -0
- package/dist/components/input-date/input-date.js +2 -2
- package/dist/components/menu-navigation/menu-navigation.d.ts +0 -4
- package/dist/components/navbar/navbar.d.ts +0 -4
- package/dist/components/pagination/pagination.js +4 -4
- package/dist/components/table/table.js +1 -1
- package/dist/components/table-action/table-action.js +2 -2
- package/dist/components/table-action/table-action.styles.js +1 -1
- package/dist/components/table-body/table-body.js +2 -2
- package/dist/components/table-caption/table-caption.js +2 -2
- package/dist/components/table-caption/table-caption.styles.js +1 -1
- package/dist/components/table-container/table-container.d.ts +2 -0
- package/dist/components/table-container/table-container.js +2 -2
- package/dist/components/table-container/table-container.styles.js +1 -1
- package/dist/components/table-expanded-row/table-expanded-row.d.ts +1 -1
- package/dist/components/table-head/table-head.js +2 -2
- package/dist/components/table-header-cell/table-header-cell.js +2 -2
- package/dist/components/table-header-cell/table-header-cell.styles.js +1 -1
- package/dist/components/table-header-row/table-header-row.d.ts +1 -0
- package/dist/components/table-header-row/table-header-row.js +7 -6
- package/dist/components/table-header-row/table-header-row.styles.js +2 -1
- package/dist/components/table-of-contents/table-of-contents.d.ts +4 -5
- package/dist/components/table-of-contents/table-of-contents.js +2 -2
- package/dist/components/table-of-contents/table-of-contents.styles.js +1 -1
- package/dist/components/table-row/table-row-base.styles.d.ts +2 -0
- package/dist/components/table-row/table-row-base.styles.js +8 -0
- package/dist/components/table-row/table-row.d.ts +2 -0
- package/dist/components/table-row/table-row.js +8 -2
- package/dist/components/table-row/table-row.styles.js +2 -1
- package/dist/components/table-toolbar/table-toolbar.js +2 -2
- package/dist/components/table-toolbar/table-toolbar.styles.js +1 -1
- package/dist/components/tree/tree.d.ts +0 -4
- package/dist/components/tree/tree.js +3 -3
- package/dist/components/tree-item/tree-item.js +2 -2
- package/dist/components/tree-item/tree-item.styles.js +1 -1
- package/dist/custom-elements.json +145 -102
- package/dist/design-system.js +34 -33
- package/dist/internal/components/date-field/date-field.styles.js +2 -2
- package/dist/themes/dsa-wc-theme.css +20 -45
- package/dist/themes/dsa-wc-theme.min.css +1 -1
- package/dist/themes/dsa-wc-theme.styles.js +20 -46
- package/dist/vscode.html-custom-data.json +18 -8
- package/dist/web-types.json +87 -47
- package/package.json +1 -1
- package/cdn/chunks/chunk.6TFK3HZG.js +0 -43
- package/cdn/chunks/chunk.ABNF7OWB.js +0 -11
- package/cdn/chunks/chunk.ADTGGBWH.js +0 -72
- package/cdn/chunks/chunk.CBNY3KDR.js +0 -60
- package/cdn/chunks/chunk.EL4NZRIR.js +0 -26
- package/cdn/chunks/chunk.GGGLGLGP.js +0 -38
- package/cdn/chunks/chunk.IOIBAXOU.js +0 -9
- package/cdn/chunks/chunk.JZMIS7DF.js +0 -7
- package/cdn/chunks/chunk.LIYDVH7Q.js +0 -48
- package/cdn/chunks/chunk.MQFH5TMZ.js +0 -1
- package/cdn/chunks/chunk.QNAPY67H.js +0 -73
- package/dist/chunks/chunk.GI3JNOHH.js +0 -58
- package/dist/chunks/chunk.SHNAUO5J.js +0 -82
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @ds-autonomie/web-components
|
|
2
2
|
|
|
3
|
+
## 2.18.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 860a7a5: `input-date`: possibilité de désactiver certaines dates
|
|
8
|
+
- f995024: `header-search`: ajout d'un attribut placeholder
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- cdd076c: `table-of-contents` : application des bonnes pratiques écoconception, et support du redimensionnement
|
|
13
|
+
- 6eccef4: Application des principes d'écoconeption aux classes CSS `dsa-*`
|
|
14
|
+
- f7bbb30: `table-action`, `table-caption`, `table-container`, `table-expanded-row`, `table-header-cell`, `table-header-row`, `table-row`, `table-toolbar`, `table` : application des bonnes pratiques eco-conception
|
|
15
|
+
- 7033aff: `tree`, `tree-item`: application des bonnes pratiques d'écoconception
|
|
16
|
+
- 406e70f: `filter-date`, `input-date` : correction de l'apparence sur Mozilla Firefox
|
|
17
|
+
|
|
3
18
|
## 2.17.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
<slot
|
|
3
|
-
${this.loading&&
|
|
1
|
+
import{a as h}from"./chunk.VMY3LI3D.js";import{a as d}from"./chunk.FNWVRCNG.js";import{b as c}from"./chunk.IMXEAMW3.js";import{a as m}from"./chunk.ELL45QD3.js";import{c as n}from"./chunk.GM4KTNXL.js";import{d as i}from"./chunk.ZBHHLRFH.js";import{a as r}from"./chunk.BWEPOOQP.js";import{a as o,b as a}from"./chunk.KBZ32KWP.js";import{a as e}from"./chunk.GP725TPQ.js";import{f as s}from"./chunk.IZ2HVRME.js";var t=class extends d{constructor(){super(...arguments);this.hasSlotController=new m(this,"subtitle","total-items");this.localize=new n(this);this.totalItemsLabel=this.localize.term("results")}handleLoading(){this.setAttribute("aria-busy",this.loading.toString())}render(){let f=this.hasSlotController.test("subtitle"),l=this.hasSlotController.test("total-items");return e`
|
|
2
|
+
<slot class="title" name="title"></slot>
|
|
3
|
+
${this.loading&&f?e`<dsa-skeleton
|
|
4
4
|
class="subtitle-skeleton"
|
|
5
5
|
effect=${this.skeletonEffect}
|
|
6
|
-
></dsa-skeleton>`:e`<slot
|
|
6
|
+
></dsa-skeleton>`:e`<slot class="subtitle" name="subtitle"></slot> `}
|
|
7
7
|
${this.loading&&l?e`<dsa-skeleton
|
|
8
8
|
class="total-items-skeleton"
|
|
9
9
|
effect=${this.skeletonEffect}
|
|
10
10
|
></dsa-skeleton>`:e`
|
|
11
11
|
<p
|
|
12
|
-
|
|
13
|
-
class=${i({"has-total-items":l})}
|
|
12
|
+
class=${i({"total-items":!0,"has-total-items":l})}
|
|
14
13
|
aria-hidden=${l?"false":"true"}
|
|
15
14
|
>
|
|
16
15
|
<slot name="total-items"></slot>
|
|
17
|
-
<span
|
|
16
|
+
<span class="total-item--indicator">${this.totalItemsLabel}</span>
|
|
18
17
|
</p>
|
|
19
18
|
`}
|
|
20
|
-
`}};t.styles=
|
|
19
|
+
`}};t.styles=h,t.dependencies={"dsa-skeleton":c},s([a({attribute:"total-items-label"})],t.prototype,"totalItemsLabel",2),s([r("loading")],t.prototype,"handleLoading",1),t=s([o("dsa-table-caption")],t);export{t as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as t}from"./chunk.UMC4I57R.js";import{a as e}from"./chunk.6G2FNLAV.js";var
|
|
1
|
+
import{a as t}from"./chunk.UMC4I57R.js";import{a as e}from"./chunk.6G2FNLAV.js";var n=e`
|
|
2
2
|
${t}
|
|
3
3
|
|
|
4
4
|
:host {
|
|
@@ -33,7 +33,7 @@ import{a as t}from"./chunk.UMC4I57R.js";import{a as e}from"./chunk.6G2FNLAV.js";
|
|
|
33
33
|
text-align: end;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
.sort-button {
|
|
37
37
|
appearance: none;
|
|
38
38
|
padding: var(--dsa-wc-table-header-cell-padding-y)
|
|
39
39
|
var(--dsa-wc-table-header-cell-padding-x);
|
|
@@ -49,11 +49,11 @@ import{a as t}from"./chunk.UMC4I57R.js";import{a as e}from"./chunk.6G2FNLAV.js";
|
|
|
49
49
|
height: 100%;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
.sort-button:active {
|
|
53
53
|
background: var(--dsa-wc-table-header-cell-background-active);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
.sort-button:focus-visible {
|
|
57
57
|
outline: var(--dsa-wc-focus-ring);
|
|
58
58
|
outline-offset: var(--dsa-wc-table-header-cell-sort-button-outline-offset);
|
|
59
59
|
}
|
|
@@ -90,4 +90,4 @@ import{a as t}from"./chunk.UMC4I57R.js";import{a as e}from"./chunk.6G2FNLAV.js";
|
|
|
90
90
|
--color: var(--dsa-wc-table-header-cell-skeleton-color);
|
|
91
91
|
--sheen-color: var(--dsa-wc-table-header-cell-skeleton-sheen-color);
|
|
92
92
|
}
|
|
93
|
-
`;export{
|
|
93
|
+
`;export{n as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as u}from"./chunk.H5XLHNHE.js";import{a as g}from"./chunk.LFI7CMVX.js";import{a as h}from"./chunk.
|
|
1
|
+
import{a as u}from"./chunk.H5XLHNHE.js";import{a as g}from"./chunk.LFI7CMVX.js";import{a as h}from"./chunk.H5VVBPCR.js";import{a as b}from"./chunk.L7SDBPGB.js";import{a as p}from"./chunk.ZCITPD2M.js";import{a as t}from"./chunk.2RF4WD6T.js";import{a as f}from"./chunk.BWEPOOQP.js";import{a as c,b as o,d as $}from"./chunk.KBZ32KWP.js";import{a as e}from"./chunk.GP725TPQ.js";import{a as m,b as d,f as l}from"./chunk.IZ2HVRME.js";var i=class extends p{constructor(){super(...arguments);this.hideCalendarButton=!1;this.range=!1}get valueAsDate(){return this.inputElement.valueAsDate}set valueAsDate(s){this.inputElement.valueAsDate=s,this.value=this.inputElement.value}get valueAsNumber(){return this.inputElement.valueAsNumber}set valueAsNumber(s){this.inputElement.valueAsNumber=s,this.value=this.inputElement.value}get validity(){return this.inputElement.validity}get validationMessage(){return this.inputElement.validationMessage}handleChange(){this.value=this.inputElement.value}handleInput(){this.value=this.inputElement.value}handleStepChange(){this.inputElement.step=this.step,this.formControlController.updateValidity()}focus(s){this.inputElement.focus(s)}blur(){this.inputElement.blur()}select(){this.inputElement.select()}setSelectionRange(s,a,n="none"){this.inputElement.setSelectionRange(s,a,n)}setRangeText(s,a,n,r){this.inputElement.setRangeText(s,a,n,r),this.value!==this.inputElement.value&&(this.value=this.inputElement.value)}async showTimePicker(){this.inputElement instanceof u&&await this.inputElement.showTimePicker()}async hideTimePicker(){this.inputElement instanceof u&&await this.inputElement.hideTimePicker()}async showDatepicker(){this.inputElement instanceof h&&await this.inputElement.showDatepicker()}async hideDatepicker(){this.inputElement instanceof h&&await this.inputElement.hideDatepicker()}stepUp(s){this.inputElement.stepUp(s),this.value!==this.inputElement.value&&(this.value=this.inputElement.value)}stepDown(s){this.inputElement.stepDown(s),this.value!==this.inputElement.value&&(this.value=this.inputElement.value)}checkValidity(){return this.inputElement.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.inputElement.reportValidity()}setCustomValidity(s){this.inputElement.setCustomValidity(s)}async getUpdateComplete(){return this.inputElement?await this.inputElement.updateComplete:!1}render(){var s,a,n,r;return(this.type==="date"||this.type==="time"||this.type==="amount")&&console.warn('Warning: The use of types "amount", "date", and "time" with dsa-input is deprecated. These types will be removed in the next major release of the design system. Please transition to the dedicated components: dsa-input-amount, dsa-input-date, and dsa-input-time for improved functionality and support.'),this.type==="date"?e`
|
|
2
2
|
<dsa-input-date
|
|
3
3
|
class="input-element"
|
|
4
4
|
name=${t(this.name)}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{a as d}from"./chunk.PIWF5VEN.js";import{a as m}from"./chunk.BWEPOOQP.js";import{a as o,b as u,c as l,d as i,f as h}from"./chunk.KBZ32KWP.js";import{a as s}from"./chunk.GP725TPQ.js";import{f as n}from"./chunk.IZ2HVRME.js";var r="dsa-navbar-menu",p="dsa-navbar-link",t=class extends h{constructor(){super(...arguments);this.currentOpenMenu=null;this.mobile=!1}connectedCallback(){super.connectedCallback()}handleSlotChange(){this.getAllChildren().forEach(e=>{e.mobile=this.mobile})}handleMobileChange(){this.getAllChildren().forEach(e=>{this.mobile?e.setAttribute("mobile","true"):e.removeAttribute("mobile"),this.currentOpenMenu=null,e.classList.remove("hidden"),this.isNavbarMenu(e)&&e.removeAttribute("open")})}handleMenuShow(e){if(!this.mobile)return;let a=e.target.closest(r);a&&(this.currentOpenMenu=a)}handleMenuHide(){this.mobile&&(this.getAllMenus().some(e=>e.open)||(this.currentOpenMenu=null))}getAllChildren(){return[...this.querySelectorAll(r),...this.querySelectorAll(p)]}getAllMenus(){return[...this.querySelectorAll(r)]}isNavbarMenu(e){return e.tagName.toLowerCase()===r}render(){return this.mobile&&this.getAllChildren().forEach(e=>{this.currentOpenMenu===null||e===this.currentOpenMenu?e.classList.remove("hidden"):(e.classList.add("hidden"),this.isNavbarMenu(e)&&e.removeAttribute("open"))}),s`
|
|
2
|
+
<div role="list" class="navbar__list">
|
|
3
|
+
<slot
|
|
4
|
+
@slotchange=${this.handleSlotChange}
|
|
5
|
+
@dsa-show=${this.handleMenuShow}
|
|
6
|
+
@dsa-hide=${this.handleMenuHide}
|
|
7
|
+
></slot>
|
|
8
|
+
</div>
|
|
9
|
+
`}};t.styles=d,n([i("nav")],t.prototype,"navbar",2),n([i("slot")],t.prototype,"defaultSlot",2),n([l()],t.prototype,"allMenus",2),n([l()],t.prototype,"currentOpenMenu",2),n([u({type:Boolean})],t.prototype,"mobile",2),n([m("mobile")],t.prototype,"handleMobileChange",1),t=n([o("dsa-navbar")],t);export{t as a};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import{a as b}from"./chunk.A6JUKRCA.js";import{a as m}from"./chunk.MMVWNVZX.js";import{a as x}from"./chunk.WJLFKSRJ.js";import{a as p}from"./chunk.63UE4VAO.js";import{c as h}from"./chunk.GM4KTNXL.js";import{d as i}from"./chunk.ZBHHLRFH.js";import{a as d}from"./chunk.BWEPOOQP.js";import{a as o,b as n,c,d as s,f as r}from"./chunk.KBZ32KWP.js";import{a as l}from"./chunk.GP725TPQ.js";import{f as t}from"./chunk.IZ2HVRME.js";var e=class extends r{constructor(){super(...arguments);this.localize=new h(this);this.showExpandButton=!1;this.role="row";this.size="medium";this.selected=!1;this.expandable=!1;this.expanded=!1;this.showExpandedLabel="";this.hideExpandedLabel="";this.selectionLabel="";this.selectionName="";this.selectionValue="";this.loading=!1}connectedCallback(){super.connectedCallback(),this.handleRowClick=this.handleRowClick.bind(this),this.handleCheckboxChange=this.handleCheckboxChange.bind(this),this.addEventListener("click",this.handleRowClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleRowClick)}handleRowClick(){this.emit("dsa-table-row-click")}handleCheckboxChange(a){a.stopPropagation(),this.selected=this.checkbox.checked}renderFirstCell(){return this.selectionName?l`
|
|
2
|
+
<dsa-table-cell class="column-checkbox" aria-hidden=${this.loading}>
|
|
3
|
+
<div class="column-checkbox--content">
|
|
4
|
+
<dsa-checkbox
|
|
5
|
+
class="checkbox"
|
|
6
|
+
size="small"
|
|
7
|
+
name=${this.selectionName}
|
|
8
|
+
accessible-name=${this.selectionLabel!==""?this.selectionLabel:this.localize.term("selectRow")}
|
|
9
|
+
value=${this.selectionValue}
|
|
10
|
+
?checked=${this.selected}
|
|
11
|
+
@click=${a=>a.stopPropagation()}
|
|
12
|
+
@dsa-change=${this.handleCheckboxChange}
|
|
13
|
+
?disabled=${this.loading}
|
|
14
|
+
></dsa-checkbox>
|
|
15
|
+
</div>
|
|
16
|
+
</dsa-table-cell>
|
|
17
|
+
`:l``}handleExpandClick(a){a.stopPropagation(),this.expanded=!this.expanded,this.emit("dsa-table-row-expand-change")}renderExpandButton(){let a=this.showExpandedLabel!==""?this.showExpandedLabel:this.localize.term("showExpandedTableRow"),u=this.hideExpandedLabel!==""?this.hideExpandedLabel:this.localize.term("hideExpandedTableRow");return l`
|
|
18
|
+
<dsa-table-cell
|
|
19
|
+
class=${i({"column-expand-button":!0,"column-expand-button--has-icon":this.showExpandButton})}
|
|
20
|
+
aria-hidden=${this.loading}
|
|
21
|
+
>
|
|
22
|
+
<dsa-icon-button
|
|
23
|
+
variant="default"
|
|
24
|
+
name="expand_more"
|
|
25
|
+
size="xlarge"
|
|
26
|
+
class=${i({"expand-button":!0,"expand-button--expand-less":this.expanded})}
|
|
27
|
+
label=${this.expanded?u:a}
|
|
28
|
+
@click=${this.handleExpandClick}
|
|
29
|
+
?disabled=${this.loading}
|
|
30
|
+
library="system"
|
|
31
|
+
></dsa-icon-button>
|
|
32
|
+
</dsa-table-cell>
|
|
33
|
+
`}handleExpandableChange(){var a;this.expandable&&((a=this.nextElementSibling)!=null&&a.matches(this.selectorExpandedRow))?this.showExpandButton=!0:this.showExpandButton=!1}handleExpandedChange(){var a;(a=this.nextElementSibling)!=null&&a.matches(this.selectorExpandedRow)&&(this.nextElementSibling.expanded=this.expanded)}handleSelectedChange(){this.emit("dsa-table-row-change-selection")}render(){return l`
|
|
34
|
+
${this.renderFirstCell()}
|
|
35
|
+
<slot></slot>
|
|
36
|
+
${this.expandable?this.renderExpandButton():l``}
|
|
37
|
+
`}get selectorExpandedRow(){return"dsa-table-expanded-row"}};e.styles=b,e.dependencies={"dsa-table-cell":m,"dsa-checkbox":x,"dsa-icon-button":p},t([s(".checkbox")],e.prototype,"checkbox",2),t([s(".expand-button")],e.prototype,"expandedButton",2),t([c()],e.prototype,"showExpandButton",2),t([n({reflect:!0})],e.prototype,"role",2),t([n({reflect:!0})],e.prototype,"size",2),t([n({type:Boolean,reflect:!0})],e.prototype,"selected",2),t([n({type:Boolean,reflect:!0})],e.prototype,"expandable",2),t([n({type:Boolean,reflect:!0})],e.prototype,"expanded",2),t([n({attribute:"show-expanded-label"})],e.prototype,"showExpandedLabel",2),t([n({attribute:"hide-expanded-label"})],e.prototype,"hideExpandedLabel",2),t([n({attribute:"selection-label"})],e.prototype,"selectionLabel",2),t([n({attribute:"selection-name",reflect:!0})],e.prototype,"selectionName",2),t([n({attribute:"selection-value"})],e.prototype,"selectionValue",2),t([n({type:Boolean,reflect:!0})],e.prototype,"loading",2),t([d("expandable")],e.prototype,"handleExpandableChange",1),t([d("expanded")],e.prototype,"handleExpandedChange",1),t([d("selected",{waitUntilFirstUpdate:!0})],e.prototype,"handleSelectedChange",1),e=t([o("dsa-table-row")],e);export{e as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m}from"./chunk.YRSOFNQ3.js";import{a as d}from"./chunk.
|
|
1
|
+
import{a as m}from"./chunk.YRSOFNQ3.js";import{a as d}from"./chunk.PFU2C3OZ.js";import{a as h}from"./chunk.FNWVRCNG.js";import{a}from"./chunk.BWEPOOQP.js";import{a as n,b as i}from"./chunk.KBZ32KWP.js";import{a as s}from"./chunk.GP725TPQ.js";import{f as r}from"./chunk.IZ2HVRME.js";var e=class extends h{constructor(){super(...arguments);this.role="rowgroup"}handleDefaultSlotChange(){let t=this.parentElement;t instanceof d&&(t.handleHeaderRowExpandable(),t.handleHeaderRowSelectable(),t.handleAlignmentChange(),t.handleHeaderCellsCount())}getAllRows(){return[...this.querySelectorAll("dsa-table-header-row")]}getAllCells(){return[...this.querySelectorAll("dsa-table-header-cell")]}handleLoading(){this.setAttribute("aria-busy",this.loading.toString()),this.getAllRows().forEach(l=>this.loading?l.setAttribute("loading","true"):l.removeAttribute("loading")),this.getAllCells().forEach(l=>this.loading?l.setAttribute("loading","true"):l.removeAttribute("loading"))}handleSkeletonEffectChange(){this.getAllCells().forEach(o=>o.setAttribute("skeleton-effect",this.skeletonEffect))}render(){return s` <slot @slotchange=${this.handleDefaultSlotChange}></slot> `}};e.styles=m,r([i({reflect:!0})],e.prototype,"role",2),r([a("loading")],e.prototype,"handleLoading",1),r([a("skeletonEffect")],e.prototype,"handleSkeletonEffectChange",1),e=r([n("dsa-table-head")],e);export{e as a};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import{a as t}from"./chunk.THOSFGWY.js";import{a as o}from"./chunk.6G2FNLAV.js";var n=o`
|
|
2
|
+
${t}
|
|
3
|
+
|
|
4
|
+
:host {
|
|
5
|
+
background: var(--dsa-wc-table-row-background);
|
|
6
|
+
font: var(--dsa-wc-table-row-font);
|
|
7
|
+
color: var(--dsa-wc-table-row-color);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:host(:hover:not([loading])),
|
|
11
|
+
:host(:hover[selected]) {
|
|
12
|
+
background: var(--dsa-wc-table-row-hover-background);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* Selected State */
|
|
16
|
+
:host([selected]) {
|
|
17
|
+
background: var(--dsa-wc-table-row-selected-background);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.column-expand-button {
|
|
21
|
+
padding: 0;
|
|
22
|
+
text-align: center;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.expand-button {
|
|
26
|
+
display: none;
|
|
27
|
+
transform: rotateX(0deg);
|
|
28
|
+
transition: transform 200ms ease;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.column-expand-button--has-icon .expand-button {
|
|
32
|
+
display: inline-block;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.expand-button--expand-less {
|
|
36
|
+
transform: rotateX(-180deg);
|
|
37
|
+
}
|
|
38
|
+
`;export{n as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as m}from"./chunk.6QPTXGCJ.js";import{a as $}from"./chunk.M5ND6PIZ.js";import{a as b}from"./chunk.HN5GRHJU.js";import{a as g}from"./chunk.
|
|
1
|
+
import{a as m}from"./chunk.6QPTXGCJ.js";import{a as $}from"./chunk.M5ND6PIZ.js";import{a as b}from"./chunk.HN5GRHJU.js";import{a as g}from"./chunk.3TFD5K7U.js";import{a as c}from"./chunk.KC2NESXB.js";import{a as v}from"./chunk.ODH67RGS.js";import{a as S}from"./chunk.GYURCDPD.js";import{a as h}from"./chunk.NIRNX67K.js";import{c as E}from"./chunk.KD3BHBHK.js";import{a as s}from"./chunk.2RF4WD6T.js";import{a as d}from"./chunk.BWEPOOQP.js";import{a as f,b as i,c as o,d as u}from"./chunk.KBZ32KWP.js";import{a as l}from"./chunk.GP725TPQ.js";import{a as p,b as V,f as e}from"./chunk.IZ2HVRME.js";var C=100,t=class extends c{constructor(){super(...arguments);this.currentStartValue="";this.currentEndValue="";this.start="";this.end="";this.defaultStart="";this.defaultEnd="";this.slider=!1}connectedCallback(){super.connectedCallback(),this.handleSliderFromValueChange=this.handleSliderFromValueChange.bind(this),this.handleSliderToValueChange=this.handleSliderToValueChange.bind(this),this.addEventListener("dsa-slider-from-value-change",this.handleSliderFromValueChange),this.addEventListener("dsa-slider-to-value-change",this.handleSliderToValueChange),this.start=this.start===""?this.defaultStart:this.start,this.currentStartValue=this.start,this.end=this.end===""?this.defaultEnd:this.end,this.currentEndValue=this.end,this.value=this.getRangeValue()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("dsa-slider-from-value-change",this.handleSliderFromValueChange),this.removeEventListener("dsa-slider-to-value-change",this.handleSliderToValueChange)}handleSliderFromValueChange(r){let a=r.detail.value;this.currentStartValue=a}handleSliderToValueChange(r){let a=r.detail.value;this.currentEndValue=a}handleReset(){var r;this.currentStartValue=this.defaultStart,this.currentEndValue=this.defaultEnd,(r=this.startValueInput)==null||r.focus({preventScroll:!0})}handleSubmit(){this.start=this.currentStartValue,this.end=this.currentEndValue,this.value=this.getRangeValue(),this.emit("dsa-submit"),this.hide(),this.filterTrigger.focus({preventScroll:!0})}handleStartInput(r){let a=r.target.value;this.currentStartValue=a,this.emit("dsa-input")}handleEndInput(r){let a=r.target.value;this.currentEndValue=a,this.emit("dsa-input")}handleStartChange(r){let a=r.target.value,n=parseFloat(this.currentEndValue);parseFloat(a)<=this.min?this.currentStartValue=`${this.min}`:parseFloat(a)<=n?this.currentStartValue=a:parseFloat(a)>n&&(this.currentStartValue=this.currentEndValue),this.emit("dsa-change")}handleEndChange(r){let a=r.target.value,n=parseFloat(this.currentStartValue);parseFloat(a)>=this.max?this.currentEndValue=`${this.max}`:parseFloat(a)>=n?this.currentEndValue=a:parseFloat(a)<n&&(this.currentEndValue=this.currentStartValue),this.emit("dsa-change")}getRangeValue(){return this.start===""&&this.end===""?"":this.start===""?`${this.localize.term("lessThan")} ${this.end}`:this.end===""?`${this.localize.term("moreThan")} ${this.start}`:`${this.start} - ${this.end}`}handleFilterRangeOpenChange(){this.open||(this.currentStartValue=this.start===""?this.defaultStart:this.start,this.currentEndValue=this.end===""?this.defaultEnd:this.end)}handleStartPropChange(){this.currentStartValue!==this.start&&(this.currentStartValue=this.start),this.value=this.getRangeValue()}handleEndPropChange(){this.currentEndValue!==this.end&&(this.currentEndValue=this.end),this.value=this.getRangeValue()}handleCurrentValuesChange(){this.drawer&&(this.start=this.currentStartValue,this.end=this.currentEndValue,this.value=this.getRangeValue())}renderPanelContent(){return l`
|
|
2
2
|
<div class="filter__content">
|
|
3
3
|
${this.slider?l`
|
|
4
4
|
<div class="filter__slider">
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import{a as d}from"./chunk.GHHMVWM2.js";import{a as b}from"./chunk.VQENJXGP.js";import{a as m}from"./chunk.FX5UP23Z.js";import{a as c}from"./chunk.GYURCDPD.js";import{a as h}from"./chunk.63UE4VAO.js";import{c as p}from"./chunk.GM4KTNXL.js";import{c as u}from"./chunk.KD3BHBHK.js";import{a as l}from"./chunk.2RF4WD6T.js";import{d as o}from"./chunk.ZBHHLRFH.js";import{a as s,b as a,d as n,f as r}from"./chunk.KBZ32KWP.js";import{a as i}from"./chunk.GP725TPQ.js";import{f as e}from"./chunk.IZ2HVRME.js";var t=class extends r{constructor(){super(...arguments);this.localize=new p(this);this.value="";this.expanded=!1;this.alwaysOpen=!1;this.mobile=!1}async handleExpandClick(){this.emit("dsa-expand"),this.expanded=!0,await this.updateComplete,this.input.focus()}handleChange(){this.value=this.search.value}handleInput(){this.value=this.search.value}async handleCancelClick(){this.emit("dsa-collapse"),this.expanded=!1,await this.updateComplete,this.expandButton.focus()}get input(){return this.search.input}get submitButton(){return this.search.submitButton}get clearButton(){return this.search.clearButton}render(){return!this.expanded&&!this.alwaysOpen?this.mobile?i`
|
|
2
|
+
<dsa-icon-button
|
|
3
|
+
id="expand-button"
|
|
4
|
+
part="button button--navigation"
|
|
5
|
+
name="search"
|
|
6
|
+
library="system"
|
|
7
|
+
size="large"
|
|
8
|
+
label=${this.localize.term("search")}
|
|
9
|
+
@click=${this.handleExpandClick}
|
|
10
|
+
></dsa-icon-button>
|
|
11
|
+
`:i`
|
|
12
|
+
<dsa-button
|
|
13
|
+
id="expand-button"
|
|
14
|
+
variant="navigation"
|
|
15
|
+
part="button button--navigation"
|
|
16
|
+
@click=${this.handleExpandClick}
|
|
17
|
+
>
|
|
18
|
+
<dsa-icon name="search" library="system"></dsa-icon>
|
|
19
|
+
<span>${this.localize.term("search")}</span>
|
|
20
|
+
</dsa-button>
|
|
21
|
+
`:i`
|
|
22
|
+
<div
|
|
23
|
+
class=${o({"search-bar":!0,"search-bar--mobile":this.mobile,"search-bar--desktop":!this.mobile})}
|
|
24
|
+
>
|
|
25
|
+
<dsa-search
|
|
26
|
+
size=${this.mobile?"small":"medium"}
|
|
27
|
+
placeholder=${l(this.placeholder)}
|
|
28
|
+
.value=${m(this.value)}
|
|
29
|
+
@dsa-change=${this.handleChange}
|
|
30
|
+
@dsa-input=${this.handleInput}
|
|
31
|
+
></dsa-search>
|
|
32
|
+
|
|
33
|
+
${this.alwaysOpen?"":i`
|
|
34
|
+
<dsa-button
|
|
35
|
+
id="cancel-button"
|
|
36
|
+
variant="tertiary"
|
|
37
|
+
size=${this.mobile?"small":"medium"}
|
|
38
|
+
@click=${this.handleCancelClick}
|
|
39
|
+
>
|
|
40
|
+
${this.localize.term("cancel")}
|
|
41
|
+
</dsa-button>
|
|
42
|
+
`}
|
|
43
|
+
</div>
|
|
44
|
+
`}};t.styles=b,t.dependencies={"dsa-icon":u,"dsa-icon-button":h,"dsa-button":c,"dsa-search":d},e([n("dsa-search")],t.prototype,"search",2),e([n("#expand-button")],t.prototype,"expandButton",2),e([n("#cancel-button")],t.prototype,"cancelButton",2),e([a()],t.prototype,"value",2),e([a({reflect:!0,type:Boolean})],t.prototype,"expanded",2),e([a({type:Boolean,attribute:"always-open"})],t.prototype,"alwaysOpen",2),e([a({type:Boolean})],t.prototype,"mobile",2),e([a()],t.prototype,"placeholder",2),t=e([s("dsa-header-search")],t);export{t as a};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{a
|
|
2
|
-
${
|
|
1
|
+
import{a}from"./chunk.UMC4I57R.js";import{a as e}from"./chunk.6G2FNLAV.js";var l=e`
|
|
2
|
+
${a}
|
|
3
3
|
|
|
4
4
|
:host {
|
|
5
5
|
display: flex;
|
|
@@ -8,7 +8,7 @@ import{a as e}from"./chunk.UMC4I57R.js";import{a}from"./chunk.6G2FNLAV.js";var s
|
|
|
8
8
|
padding-inline: var(--dsa-spacing-12);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
.slot-filters {
|
|
12
12
|
display: flex;
|
|
13
13
|
flex-flow: row wrap;
|
|
14
14
|
gap: var(--dsa-spacing-16);
|
|
@@ -22,8 +22,8 @@ import{a as e}from"./chunk.UMC4I57R.js";import{a}from"./chunk.6G2FNLAV.js";var s
|
|
|
22
22
|
justify-content: flex-end;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
.slot-search {
|
|
26
26
|
display: flex;
|
|
27
27
|
flex-direction: row;
|
|
28
28
|
}
|
|
29
|
-
`;export{
|
|
29
|
+
`;export{l as a};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{a as A}from"./chunk.I5IBJET7.js";import{a as c}from"./chunk.MTXJMWYM.js";import{a as T}from"./chunk.FC4RDJJF.js";import{a as b}from"./chunk.BWEPOOQP.js";import{a as f,b as p,d as I,f as g}from"./chunk.KBZ32KWP.js";import{a as u}from"./chunk.GP725TPQ.js";import{f as d}from"./chunk.IZ2HVRME.js";function S(h,m=!1){function e(s){let i=s.getChildrenItems({includeDisabled:!1});if(i.length){let l=i.every(r=>r.selected),a=i.every(r=>!r.selected&&!r.indeterminate);s.selected=l,s.indeterminate=!l&&!a}}function n(s){let i=s.parentElement;c.isTreeItem(i)&&(e(i),n(i))}function t(s){for(let i of s.getChildrenItems())i.selected=m?s.selected||i.selected:!i.disabled&&s.selected,t(i);m&&e(s)}t(h),n(h)}var o=class extends g{constructor(){super(...arguments);this.selection="single";this.clickTarget=null;this.initTreeItem=e=>{e.selectable=this.selection==="multiple",this.selection==="parent"&&e.isLeaf&&e.setAttribute("aria-disabled","true")}}async connectedCallback(){super.connectedCallback(),this.handleTreeChanged=this.handleTreeChanged.bind(this),this.handleFocusIn=this.handleFocusIn.bind(this),this.handleFocusOut=this.handleFocusOut.bind(this),this.setAttribute("role","tree"),this.setAttribute("tabindex","0"),this.addEventListener("focusin",this.handleFocusIn),this.addEventListener("focusout",this.handleFocusOut),this.addEventListener("dsa-lazy-change",this.handleSlotChange),await this.updateComplete,this.mutationObserver=new MutationObserver(this.handleTreeChanged),this.mutationObserver.observe(this,{childList:!0,subtree:!0})}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver.disconnect(),this.removeEventListener("focusin",this.handleFocusIn),this.removeEventListener("focusout",this.handleFocusOut),this.removeEventListener("dsa-lazy-change",this.handleSlotChange)}handleTreeChanged(e){for(let n of e){let t=[...n.addedNodes].filter(c.isTreeItem),s=[...n.removedNodes].filter(c.isTreeItem);t.forEach(this.initTreeItem),s.includes(this.lastFocusedItem)&&this.focusItem(this.getFocusableItems()[0])}}selectItem(e){var s;let n=[...this.selectedItems];if(this.selection==="multiple")e.selected=!e.selected,e.lazy&&(e.expanded=!0),S(e);else if(this.selection==="single"||this.selection==="leaf"&&e.isLeaf||this.selection==="parent"&&!e.isLeaf){let i=this.getAllTreeItems();for(let l of i)l.selected=l===e}else if(this.selection==="leaf"&&!e.isLeaf)e.expanded=!e.expanded;else if(this.selection==="parent"&&e.isLeaf){let i=(s=e.parentElement)==null?void 0:s.closest("[role=treeitem]");if(i){let l=this.getAllTreeItems();for(let a of l)a.selected=a===i}}let t=this.selectedItems;(n.length!==t.length||t.some(i=>!n.includes(i)))&&Promise.all(t.map(i=>i.updateComplete)).then(()=>{this.emit("dsa-selection-change",{detail:{selection:t}})})}getAllTreeItems(){return[...this.querySelectorAll("dsa-tree-item")]}focusItem(e){e==null||e.focus()}handleKeyDown(e){if(!["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Home","End","Enter"," "].includes(e.key))return;let n=this.getFocusableItems();if(n.length>0){e.preventDefault();let t=n.findIndex(a=>a.matches(":focus")),s=n[t],i=a=>{let r=n[T(a,0,n.length-1)];this.focusItem(r)},l=a=>{s.expanded=a};e.key==="ArrowDown"?i(t+1):e.key==="ArrowUp"?i(t-1):e.key==="ArrowRight"?!s||s.disabled||s.expanded||s.isLeaf&&!s.lazy?i(t+1):l(!0):e.key==="ArrowLeft"?!s||s.disabled||s.isLeaf||!s.expanded?i(t-1):l(!1):e.key==="Home"?i(0):e.key==="End"?i(n.length-1):(e.key==="Enter"||e.key===" ")&&(s.disabled||this.selectItem(s))}}handleClick(e){let n=e.target,t=n.closest("dsa-tree-item"),s=e.composedPath().some(i=>{var l;return(l=i==null?void 0:i.classList)==null?void 0:l.contains("tree-item__expand-button")});!t||t.disabled||n!==this.clickTarget||(s?t.expanded=!t.expanded:this.selectItem(t))}handleMouseDown(e){this.clickTarget=e.target}handleFocusOut(e){let n=e.relatedTarget;(!n||!this.contains(n))&&(this.tabIndex=0)}handleFocusIn(e){let n=e.target;e.target===this&&this.focusItem(this.lastFocusedItem||this.getAllTreeItems()[0]),c.isTreeItem(n)&&!n.disabled&&(this.lastFocusedItem&&(this.lastFocusedItem.tabIndex=-1),this.lastFocusedItem=n,this.tabIndex=-1,n.tabIndex=0)}handleSlotChange(){customElements.get("dsa-tree-item")?this.getAllTreeItems().forEach(this.initTreeItem):customElements.whenDefined("dsa-tree-item").then(()=>this.handleSlotChange())}async handleSelectionChange(){let e=this.selection==="multiple",n=this.getAllTreeItems();this.setAttribute("aria-multiselectable",e?"true":"false");for(let t of n)t.selectable=e,t.setAttribute("aria-disabled",t.disabled||(t.isLeaf&&this.selection)==="parent"?"true":"false");e&&(await this.updateComplete,[...this.querySelectorAll(":scope > dsa-tree-item")].forEach(t=>{t instanceof c&&S(t,!0)}))}get selectedItems(){let e=this.getAllTreeItems(),n=t=>t.selected;return e.filter(n)}getFocusableItems(){let e=this.getAllTreeItems(),n=new Set;return e.filter(t=>{var i;if(t.disabled)return!1;let s=(i=t.parentElement)==null?void 0:i.closest("[role=treeitem]");return s&&(!s.expanded||s.loading||n.has(s))&&n.add(t),!n.has(t)})}render(){return u`
|
|
2
|
+
<div
|
|
3
|
+
part="base"
|
|
4
|
+
class="tree"
|
|
5
|
+
@click=${this.handleClick}
|
|
6
|
+
@keydown=${this.handleKeyDown}
|
|
7
|
+
@mousedown=${this.handleMouseDown}
|
|
8
|
+
>
|
|
9
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
10
|
+
</div>
|
|
11
|
+
`}};o.styles=A,d([I("slot:not([name])")],o.prototype,"defaultSlot",2),d([p()],o.prototype,"selection",2),d([b("selection")],o.prototype,"handleSelectionChange",1),o=d([f("dsa-tree")],o);export{o as a};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import{a}from"./chunk.
|
|
2
|
-
<dsa-table-header-cell
|
|
1
|
+
import{a}from"./chunk.67MZYN3N.js";import{a as h}from"./chunk.RNR6P3VA.js";import{a as n}from"./chunk.TM7AGXEU.js";import{a as o}from"./chunk.PIG773U2.js";import{a as i,d}from"./chunk.KBZ32KWP.js";import{a as l}from"./chunk.GP725TPQ.js";import{a as s,b as c,f as t}from"./chunk.IZ2HVRME.js";var e=class extends a{handleCheckboxChange(){this.selected=this.checkbox.checked,this.emit("dsa-table-row-all-change-selection")}renderFirstCell(){return this.selectionName?l`
|
|
2
|
+
<dsa-table-header-cell
|
|
3
|
+
class="column-checkbox"
|
|
4
|
+
aria-hidden=${this.loading}
|
|
5
|
+
>
|
|
3
6
|
<div class="column-checkbox--content">
|
|
4
7
|
<dsa-checkbox
|
|
5
8
|
class="checkbox"
|
|
@@ -14,13 +17,10 @@ import{a}from"./chunk.GGGLGLGP.js";import{a as h}from"./chunk.AAEIE3M2.js";impor
|
|
|
14
17
|
></dsa-checkbox>
|
|
15
18
|
</div>
|
|
16
19
|
</dsa-table-header-cell>
|
|
17
|
-
`:
|
|
18
|
-
<dsa-table-header-cell
|
|
19
|
-
class="column-expand-button"
|
|
20
|
-
aria-hidden=${this.loading}
|
|
21
|
-
>
|
|
20
|
+
`:l``}renderExpandButton(){return l`
|
|
21
|
+
<dsa-table-header-cell aria-hidden=${this.loading}>
|
|
22
22
|
<dsa-visually-hidden>
|
|
23
23
|
${this.localize.term("showExpandedTableRowHeader")}
|
|
24
24
|
</dsa-visually-hidden>
|
|
25
25
|
</dsa-table-header-cell>
|
|
26
|
-
`}};e.styles=n,e.dependencies=c(s({},a.dependencies),{"dsa-table-header-cell":h,"dsa-visually-hidden":
|
|
26
|
+
`}};e.styles=n,e.dependencies=c(s({},a.dependencies),{"dsa-table-header-cell":h,"dsa-visually-hidden":o}),t([d(".checkbox")],e.prototype,"selectAllCheckbox",2),e=t([i("dsa-table-header-row")],e);export{e as a};
|
|
@@ -65,10 +65,6 @@ import{a as t}from"./chunk.UMC4I57R.js";import{a as e}from"./chunk.6G2FNLAV.js";
|
|
|
65
65
|
rotate: 90deg;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
.tree-item--expanded.tree-item--rtl .tree-item__expand-button {
|
|
69
|
-
rotate: -90deg;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
68
|
.tree-item--expanded .tree-item__expand-icon,
|
|
73
69
|
.tree-item:not(.tree-item--expanded) .tree-item__collapse-icon {
|
|
74
70
|
display: none;
|
|
@@ -87,6 +83,7 @@ import{a as t}from"./chunk.UMC4I57R.js";import{a as e}from"./chunk.6G2FNLAV.js";
|
|
|
87
83
|
display: flex;
|
|
88
84
|
align-items: center;
|
|
89
85
|
border-inline-start: solid 3px transparent;
|
|
86
|
+
overflow-y: hidden;
|
|
90
87
|
}
|
|
91
88
|
|
|
92
89
|
.tree-item--disabled .tree-item__item {
|
|
@@ -145,11 +142,6 @@ import{a as t}from"./chunk.UMC4I57R.js";import{a as e}from"./chunk.6G2FNLAV.js";
|
|
|
145
142
|
z-index: 1;
|
|
146
143
|
}
|
|
147
144
|
|
|
148
|
-
.tree-item--rtl .tree-item__children::before {
|
|
149
|
-
left: auto;
|
|
150
|
-
right: 1em;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
145
|
@media (forced-colors: active) {
|
|
154
146
|
:host(:not([aria-disabled='true'])) .tree-item--selected .tree-item__item {
|
|
155
147
|
outline: dashed 1px SelectedItem;
|
|
@@ -82,7 +82,7 @@ import{a as t}from"./chunk.UMC4I57R.js";import{a as o}from"./chunk.6G2FNLAV.js";
|
|
|
82
82
|
position: absolute;
|
|
83
83
|
transition:
|
|
84
84
|
var(--dsa-wc-transition-fast) translate ease,
|
|
85
|
-
var(--dsa-wc-transition-fast)
|
|
85
|
+
var(--dsa-wc-transition-fast) height ease;
|
|
86
86
|
border-inline-start: var(--dsa-wc-table-of-contents-indicator-border);
|
|
87
87
|
}
|
|
88
88
|
|
|
@@ -92,7 +92,6 @@ import{a as t}from"./chunk.UMC4I57R.js";import{a as o}from"./chunk.6G2FNLAV.js";
|
|
|
92
92
|
color: var(--dsa-wc-table-of-contents-link-color);
|
|
93
93
|
transition: var(--dsa-wc-transition-fast) fill;
|
|
94
94
|
user-select: none;
|
|
95
|
-
|
|
96
95
|
text-decoration: none;
|
|
97
96
|
font: var(--dsa-wc-menu-item-font);
|
|
98
97
|
padding: var(--dsa-wc-table-of-contents-link-padding-desktop);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as P}from"./chunk.FYJYTPOV.js";import{a as $}from"./chunk.ZCITPD2M.js";import{a as K}from"./chunk.
|
|
1
|
+
import{a as P}from"./chunk.FYJYTPOV.js";import{a as $}from"./chunk.ZCITPD2M.js";import{a as K}from"./chunk.ZKKBL76K.js";import{a as m}from"./chunk.FX5UP23Z.js";import{a as _}from"./chunk.CUYQOZPJ.js";import{a as N}from"./chunk.VE5CSYN4.js";import{e as L,f as u,h as l,i as T}from"./chunk.IFSGAJQ4.js";import{a as I}from"./chunk.63UE4VAO.js";import{a as v}from"./chunk.KLRPP4NQ.js";import{a as g,c as y}from"./chunk.HHVNQNCC.js";import{a as b,c as D}from"./chunk.TV2TMO2H.js";import{c as z}from"./chunk.GM4KTNXL.js";import{a}from"./chunk.2RF4WD6T.js";import{d as f}from"./chunk.ZBHHLRFH.js";import{a as B}from"./chunk.BWEPOOQP.js";import{a as x,b as d,c as V,d as p}from"./chunk.KBZ32KWP.js";import{a as c}from"./chunk.GP725TPQ.js";import{a as M,b as O,f as s}from"./chunk.IZ2HVRME.js";var i=class extends ${constructor(){super(...arguments);this.localize=new z(this);this.isDatepickerOpen=!1;this.hideCalendarButton=!1;this.range=!1;this.hoist=!1}get valueAsDate(){var t;return this.range?null:(t=this.inputStart)==null?void 0:t.valueAsDate}set valueAsDate(t){if(!this.range){let e=document.createElement("input");e.type="date",e.valueAsDate=t,this.value=e.value}}get valueAsNumber(){return this.range?NaN:this.inputStart.valueAsNumber}set valueAsNumber(t){this.range||(this.inputStart.valueAsNumber=t,this.value=this.inputStart.value)}get validity(){let t=this.inputStart.validity;if(this.range){let e=this.inputEnd.validity;return{badInput:t.badInput||e.badInput,customError:t.customError||e.customError,patternMismatch:t.patternMismatch||e.patternMismatch,rangeOverflow:t.rangeOverflow||e.rangeOverflow,rangeUnderflow:t.rangeUnderflow||e.rangeUnderflow,stepMismatch:t.stepMismatch||e.stepMismatch,tooLong:t.tooLong||e.tooLong,tooShort:t.tooShort||e.tooShort,typeMismatch:t.typeMismatch||e.typeMismatch,valid:t.valid&&e.valid,valueMissing:t.valueMissing||e.valueMissing}}else return t}get validationMessage(){var t;return`${this.inputStart.validationMessage}${(t=this.inputEnd)==null?void 0:t.validationMessage}`}connectedCallback(){super.connectedCallback(),this.handleDocumentFocusIn=this.handleDocumentFocusIn.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.shouldDisableDate=this.shouldDisableDate.bind(this)}async firstUpdated(){var t;await this.updateComplete,(t=this.datepickerButton)==null||t.button.setAttribute("aria-expanded","false"),this.formControlController.updateValidity()}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}async handleSelectedDate(t){let{detail:e}=t;(!this.range||e.dates.length!==1)&&(this.value=e.dates.map(r=>L(r)).join(","),this.hideDatepicker(),await this.updateComplete,this.emit("dsa-change"))}handleDocumentFocusIn(t){let e=t.composedPath();this&&!e.includes(this)&&this.hideDatepicker()}handleDocumentMouseDown(t){let e=t.composedPath();this&&!e.includes(this)&&this.hideDatepicker()}handleInputClick(t){!this.disabled&&t.currentTarget===t.target&&this.focus()}handleDefaultKeyDown(t){this.isDatepickerOpen&&t.key==="Escape"&&(t.preventDefault(),t.stopPropagation(),this.hideDatepicker()),this.isDatepickerOpen&&t.key==="Tab"&&setTimeout(()=>{var n,h;let o=(this==null?void 0:this.getRootNode())instanceof ShadowRoot?(h=(n=document.activeElement)==null?void 0:n.shadowRoot)==null?void 0:h.activeElement:document.activeElement;(!this||(o==null?void 0:o.closest(this.tagName.toLowerCase()))!==this)&&this.hideDatepicker()});let r=t.composedPath().some(o=>o===this.datepickerButton);if(r&&(t.key==="Enter"||t.key===" ")){if(t.preventDefault(),!this.isDatepickerOpen){this.showDatepicker();return}r&&this.hideDatepicker()}}handleDateFieldKeydown(t){let e=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;t.key==="Enter"&&!e&&setTimeout(()=>{!t.defaultPrevented&&!t.isComposing&&this.formControlController.submit()})}handleChange(){let t="",e="";t=this.inputStart.value,this.range?(e=this.inputEnd.value,this.value=T(t,e)):this.value=t,this.formControlController.updateValidity()}handleDateFieldFocus(){setTimeout(()=>{this.hasFocus=!0})}handleDateFieldBlur(){this.hasFocus=!1}getFullDateFromISO(t){return u(t).toLocaleDateString(this.lang||this.localize.lang(),{year:"numeric",month:"long",day:"numeric"})}getDescriptionText(t){let e=typeof this.errorMessage=="string"?this.errorMessage:this.errorMessage.join(", "),r="";if(this.value!=="")if(t==="calendarButton"&&this.range){let n=l(this.value)[0],h=l(this.value)[1];r=`${this.localize.term("selectedDates")}${this.getFullDateFromISO(n)} - ${this.getFullDateFromISO(h)}`}else{let n="";t==="end"?n=l(this.value)[1]:n=this.range?l(this.value)[0]:this.value,r=`${this.localize.term("selectedDate")}${this.getFullDateFromISO(n)}`}return[...e.length>0&&this.error?[e]:[],...this.value?[r]:[],...this.helpText?[this.helpText]:[],...this.description?[this.description]:[]].join(", ")}shouldDisableDate(t){var o,n;let e=typeof this.min=="string"&&t<u(this.min),r=typeof this.max=="string"&&t>u(this.max);return e||r||((n=(o=this.disableDate)==null?void 0:o.call(this,t))!=null?n:!1)}updateInputsValidity(){if(this.disableDate!==void 0){let t=this.inputStart.value;if(this.disableDate(u(t))?this.inputStart.setCustomValidity(this.disabledDateError||this.localize.term(this.range?"invalidStartDate":"invalidDate")):this.inputStart.setCustomValidity(""),this.range){let e=this.inputEnd.value;this.disableDate(u(e))?this.inputEnd.setCustomValidity(this.disabledDateError||this.localize.term("invalidEndDate")):this.inputEnd.setCustomValidity("")}}}async handleOpenChange(){if(this.isDatepickerOpen){this.emit("dsa-show"),this.addOpenListeners(),await y(this),this.popup.active=!0,this.datepickerButton.button.setAttribute("aria-expanded","true");let{keyframes:t,options:e}=D(this,"date-popup.show",{dir:this.localize.dir()});await g(this.popup.popup,t,e),this.emit("dsa-after-show")}else{this.emit("dsa-hide"),this.removeOpenListeners(),await y(this),this.popup.active=!1,this.datepickerButton.button.setAttribute("aria-expanded","false"),this.datepickerButton.focus({preventScroll:!0});let{keyframes:t,options:e}=D(this,"date-popup.hide",{dir:this.localize.dir()});await g(this.popup.popup,t,e),this.emit("dsa-after-hide")}}async showDatepicker(){if(this.isDatepickerOpen){this.isDatepickerOpen=!1;return}return this.isDatepickerOpen=!0,await v(this,"dsa-after-show")}async hideDatepicker(){if(!this.isDatepickerOpen){this.isDatepickerOpen=!1;return}return this.isDatepickerOpen=!1,await v(this,"dsa-after-hide")}async getUpdateComplete(){let t=await super.getUpdateComplete();return await Promise.allSettled([this.inputStart.updateComplete,...this.range?[this.inputEnd.updateComplete]:[]]),t}handleLabelClick(){this.focus()}focus(t){this.inputStart.focus(t)}blur(){var t,e;this.inputStart.blur(),(t=this.inputEnd)==null||t.blur(),(e=this.datepickerButton)==null||e.blur()}stepUp(t){this.inputStart.stepUp(t),this.handleChange()}stepDown(t){this.inputStart.stepDown(t),this.handleChange()}checkValidity(){var t;return this.updateInputsValidity(),this.inputStart.checkValidity()&&(!this.range||((t=this.inputEnd)==null?void 0:t.checkValidity()))}reportValidity(){var t;return this.updateInputsValidity(),this.inputStart.reportValidity()&&(!this.range||((t=this.inputEnd)==null?void 0:t.reportValidity()))}setCustomValidity(t){this.inputStart.setCustomValidity(t),this.formControlController.updateValidity()}renderInput(){var o,n,h,k,w,C,S,F,E;let t=this.hasSlotController.test("prefix"),e=this.clearable&&!this.disabled&&!this.readonly,r=e&&(typeof this.value=="number"||this.value.length>0);return c`
|
|
2
2
|
<div
|
|
3
3
|
part="base"
|
|
4
4
|
class=${f({input:!0,"input--date":!0,"input--small":this.size==="small","input--medium":this.size==="medium","input--large":this.size==="large","input--error":this.error,"input--success":this.success&&!this.error,"input--on-layer":this.variant==="layer","input--on-base":this.variant==="base","input--disabled":this.disabled,"input--readonly":this.readonly,"input--focused":this.hasFocus,"input--empty":!this.value,"input--no-calendar":this.hideCalendarButton,"form-control--has-prefix-icon":t})}
|
|
@@ -12,17 +12,17 @@ import{a as P}from"./chunk.FYJYTPOV.js";import{a as $}from"./chunk.ZCITPD2M.js";
|
|
|
12
12
|
>
|
|
13
13
|
<dsa-internal-date-field
|
|
14
14
|
id="input-start"
|
|
15
|
-
parent-name=${this.range?`${(
|
|
15
|
+
parent-name=${this.range?`${(n=(o=this.label)!=null?o:this.accessibleName)!=null?n:this.title} - ${this.localize.term("startDate")}`:(k=(h=this.label)!=null?h:this.accessibleName)!=null?k:this.title}
|
|
16
16
|
description=${this.getDescriptionText("start")}
|
|
17
|
-
.value=${m(this.range?
|
|
18
|
-
.defaultValue=${a(this.range?
|
|
17
|
+
.value=${m(this.range?l(this.value)[0]:this.value)}
|
|
18
|
+
.defaultValue=${a(this.range?l(this.defaultValue)[0]:this.defaultValue)}
|
|
19
19
|
?disabled=${this.disabled}
|
|
20
20
|
lang=${a(this.lang)}
|
|
21
21
|
?readonly=${this.readonly}
|
|
22
22
|
?error=${this.error}
|
|
23
23
|
?required=${this.required}
|
|
24
24
|
min=${a(this.min)}
|
|
25
|
-
max=${a(m(
|
|
25
|
+
max=${a(m(l(this.value)[1]||this.max))}
|
|
26
26
|
?autofocus=${this.autofocus}
|
|
27
27
|
autocomplete=${a(this.autocomplete)}
|
|
28
28
|
enterkeyhint=${a(this.enterkeyhint)}
|
|
@@ -43,14 +43,14 @@ import{a as P}from"./chunk.FYJYTPOV.js";import{a as $}from"./chunk.ZCITPD2M.js";
|
|
|
43
43
|
id="input-end"
|
|
44
44
|
parent-name=${`${(C=(w=this.label)!=null?w:this.accessibleName)!=null?C:this.title} - ${this.localize.term("endDate")}`}
|
|
45
45
|
description=${this.getDescriptionText("end")}
|
|
46
|
-
.value=${(S=
|
|
47
|
-
.defaultValue=${a(
|
|
46
|
+
.value=${(S=l(this.value)[1])!=null?S:""}
|
|
47
|
+
.defaultValue=${a(l(this.defaultValue)[1])}
|
|
48
48
|
?disabled=${this.disabled}
|
|
49
49
|
lang=${a(this.lang)}
|
|
50
50
|
?readonly=${this.readonly}
|
|
51
51
|
?error=${this.error}
|
|
52
52
|
?required=${this.required}
|
|
53
|
-
min=${a(m(
|
|
53
|
+
min=${a(m(l(this.value)[0]||this.min))}
|
|
54
54
|
max=${a(this.max)}
|
|
55
55
|
enterkeyhint=${a(this.enterkeyhint)}
|
|
56
56
|
@dsa-change=${this.handleChange}
|
|
@@ -61,17 +61,17 @@ import{a as P}from"./chunk.FYJYTPOV.js";import{a as $}from"./chunk.ZCITPD2M.js";
|
|
|
61
61
|
></dsa-internal-date-field>
|
|
62
62
|
</div>
|
|
63
63
|
|
|
64
|
-
${e?
|
|
64
|
+
${e?c`
|
|
65
65
|
<dsa-icon-button
|
|
66
66
|
part="clear-button"
|
|
67
|
-
class=${f({"input__action-button":!0,"input__action-button--hidden":!
|
|
67
|
+
class=${f({"input__action-button":!0,"input__action-button--hidden":!r})}
|
|
68
68
|
name="clear"
|
|
69
69
|
label=${this.localize.term("clearEntry")}
|
|
70
70
|
@click=${this.handleClearClick}
|
|
71
71
|
library="system"
|
|
72
72
|
></dsa-icon-button>
|
|
73
73
|
`:""}
|
|
74
|
-
${this.hideCalendarButton?"":
|
|
74
|
+
${this.hideCalendarButton?"":c`
|
|
75
75
|
<dsa-popup
|
|
76
76
|
class="date-popup"
|
|
77
77
|
part="popup"
|
|
@@ -88,7 +88,7 @@ import{a as P}from"./chunk.FYJYTPOV.js";import{a as $}from"./chunk.ZCITPD2M.js";
|
|
|
88
88
|
part="picker-button"
|
|
89
89
|
class="input__action-button icon-button--date"
|
|
90
90
|
name="calendar_today"
|
|
91
|
-
label=${`${this.localize.term("picker")} - ${(
|
|
91
|
+
label=${`${this.localize.term("picker")} - ${(E=(F=this.label)!=null?F:this.accessibleName)!=null?E:this.title}`}
|
|
92
92
|
size=${this.size}
|
|
93
93
|
?disabled=${this.disabled||this.readonly}
|
|
94
94
|
@click=${this.showDatepicker}
|
|
@@ -109,4 +109,4 @@ import{a as P}from"./chunk.FYJYTPOV.js";import{a as $}from"./chunk.ZCITPD2M.js";
|
|
|
109
109
|
</dsa-popup>
|
|
110
110
|
`}
|
|
111
111
|
</div>
|
|
112
|
-
`}};i.styles=P,i.dependencies=O(
|
|
112
|
+
`}};i.styles=P,i.dependencies=O(M({},$.dependencies),{"dsa-internal-date-field":K,"dsa-popup":_,"dsa-icon-button":I,"dsa-calendar":N}),s([p("#input-start")],i.prototype,"inputStart",2),s([p("#input-end")],i.prototype,"inputEnd",2),s([p(".date-popup")],i.prototype,"popup",2),s([p(".icon-button--date")],i.prototype,"datepickerButton",2),s([V()],i.prototype,"isDatepickerOpen",2),s([d()],i.prototype,"lang",2),s([d({attribute:"calendar-start-date"})],i.prototype,"calendarStartDate",2),s([d({attribute:"hide-calendar-button",type:Boolean})],i.prototype,"hideCalendarButton",2),s([d({type:Boolean,reflect:!0})],i.prototype,"range",2),s([d({type:Boolean})],i.prototype,"hoist",2),s([d({type:Function,attribute:!1})],i.prototype,"disableDate",2),s([d({attribute:"disabled-date-error"})],i.prototype,"disabledDateError",2),s([B("isDatepickerOpen",{waitUntilFirstUpdate:!0})],i.prototype,"handleOpenChange",1),i=s([x("dsa-input-date")],i);b("date-popup.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}});b("date-popup.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});export{i as a};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import{a as M}from"./chunk.F6YFQ3GB.js";import{a as $}from"./chunk.LRR4YZGW.js";import{a as b}from"./chunk.KLRPP4NQ.js";import{a as m,c as v,d as f}from"./chunk.HHVNQNCC.js";import{a as y,c as g}from"./chunk.TV2TMO2H.js";import{c as E}from"./chunk.GM4KTNXL.js";import{c as L}from"./chunk.KD3BHBHK.js";import{a as r}from"./chunk.2RF4WD6T.js";import{d as u}from"./chunk.ZBHHLRFH.js";import{a as p}from"./chunk.BWEPOOQP.js";import{a as w,b as d,c,d as h,f as k}from"./chunk.KBZ32KWP.js";import{a}from"./chunk.GP725TPQ.js";import{f as s}from"./chunk.IZ2HVRME.js";var i=class extends k{constructor(){super(...arguments);this.localize=new E(this);this.mutationObserver=null;this.resizeObserver=null;this.mobile=!1;this.open=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this)}disconnectedCallback(){var e,t;super.disconnectedCallback(),this.removeOpenListeners(),(e=this.mutationObserver)==null||e.disconnect(),(t=this.resizeObserver)==null||t.disconnect()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}async firstUpdated(){this.observeAttributeChanges(),this.observeIndicatorChanges(),this.mobile&&(this.content.hidden=!this.open,this.content.style.height=this.open?"auto":"0",this.open&&this.addOpenListeners()),await this.updateComplete,this.repositionIndicator()}observeAttributeChanges(){var e;(e=this.mutationObserver)==null||e.disconnect(),this.mutationObserver=new MutationObserver(t=>{t.some(n=>n.type==="attributes")&&(this.allLinks=this.cloneSlottedLinks(),this.updateCurrentSection())}),[...this.defaultSlot.assignedElements({flatten:!0})].forEach(t=>{this.mutationObserver.observe(t,{attributes:!0})})}observeIndicatorChanges(){this.resizeObserver=new ResizeObserver(()=>{this.repositionIndicator()}),this.resizeObserver.observe(this.content)}cloneSlottedLinks(){let e=[...this.defaultSlot.assignedElements({flatten:!0})],t=[];return e.forEach(n=>{let o=n.cloneNode(!0);t.push(o)}),t}async updateCurrentSection(){let e=this.allLinks.findIndex(t=>t.getAttribute("aria-current")==="true");this.currentSectionLink=this.allLinks[e],this.progress=(e+1)/this.allLinks.length*100,await this.updateComplete,this.repositionIndicator()}repositionIndicator(){if(!this.currentSectionLink){this.indicator.style.display="none";return}this.indicator.style.display="block";let e=this.currentSectionLink.clientHeight,n=this.allLinks.slice(0,this.allLinks.indexOf(this.currentSectionLink)).reduce((o,l)=>o+l.clientHeight,0);this.indicator.style.width="auto",this.indicator.style.height=`${e}px`,this.indicator.style.translate=`0 ${n}px`}handleSlotChange(){this.allLinks=this.cloneSlottedLinks(),this.updateCurrentSection(),this.observeAttributeChanges()}handleHeaderKeydown(e){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.open?this.hide():this.show())}handleDocumentKeyDown(e){this.open&&e.key==="Escape"&&(e.preventDefault(),this.hide(),this.headerButton.focus({preventScroll:!0})),this.open&&e.key==="Tab"&&setTimeout(()=>{var n,o;let t=(this==null?void 0:this.getRootNode())instanceof ShadowRoot?(o=(n=document.activeElement)==null?void 0:n.shadowRoot)==null?void 0:o.activeElement:document.activeElement;(!this||(t==null?void 0:t.closest(this.tagName.toLowerCase()))!==this)&&(this.hide(),this.headerButton.focus({preventScroll:!0}))})}handleDocumentMouseDown(e){let t=e.composedPath();this&&!t.includes(this)&&this.hide()}handleHeaderClick(){this.open?this.hide():this.show(),this.headerButton.focus()}handleLinkClick(){this.hide()}async handleOpenChange(){if(this.mobile)if(this.open){if(this.emit("dsa-show",{cancelable:!0}).defaultPrevented){this.open=!1;return}this.addOpenListeners(),await v(this.content),this.content.hidden=!1;let{keyframes:t,options:n}=g(this,"content.show",{dir:this.localize.dir()});await m(this.content,f(t,this.content.scrollHeight),n),this.content.style.height="auto",this.repositionIndicator(),this.emit("dsa-after-show")}else{if(this.emit("dsa-hide",{cancelable:!0}).defaultPrevented){this.open=!0;return}this.removeOpenListeners(),await v(this.content);let{keyframes:t,options:n}=g(this,"content.hide",{dir:this.localize.dir()});await m(this.content,f(t,this.content.scrollHeight),n),this.content.hidden=!0,this.content.style.height="auto",this.emit("dsa-after-hide")}}handleMobileChange(){this.mobile?(this.content.hidden=!this.open,this.content.style.height=this.open?"auto":"0",this.open&&this.addOpenListeners()):(this.content.removeAttribute("hidden"),this.content.removeAttribute("style"),this.removeOpenListeners())}async show(){if(!this.open)return this.open=!0,await b(this,"dsa-after-show")}async hide(){if(this.open)return this.open=!1,await b(this,"dsa-after-hide")}render(){var e,t,n,o,l;return a`
|
|
2
|
+
<nav
|
|
3
|
+
role="navigation"
|
|
4
|
+
class=${u({toc:!0,"toc--mobile":this.mobile,"toc--desktop":!this.mobile,"toc--open":!this.open})}
|
|
5
|
+
aria-labelledby="label"
|
|
6
|
+
>
|
|
7
|
+
<div
|
|
8
|
+
role=${r(this.mobile?"button":void 0)}
|
|
9
|
+
tabindex=${r(this.mobile?"0":void 0)}
|
|
10
|
+
aria-expanded=${r(this.mobile?this.open:void 0)}
|
|
11
|
+
aria-controls=${r(this.mobile?"content":void 0)}
|
|
12
|
+
class="header"
|
|
13
|
+
@click=${r(this.mobile?this.handleHeaderClick:void 0)}
|
|
14
|
+
@keydown=${r(this.mobile?this.handleHeaderKeydown:void 0)}
|
|
15
|
+
>
|
|
16
|
+
<slot id="label" name="label" class="label"
|
|
17
|
+
>${(e=this.label)!=null?e:this.localize.term("tableOfContents")}</slot
|
|
18
|
+
>
|
|
19
|
+
${this.mobile?a`<span class="header__current-section"
|
|
20
|
+
>${(n=(t=this.currentSectionLink)==null?void 0:t.textContent)!=null?n:""}</span
|
|
21
|
+
>
|
|
22
|
+
<dsa-icon
|
|
23
|
+
name="expand_more"
|
|
24
|
+
class="header__icon"
|
|
25
|
+
library="system"
|
|
26
|
+
></dsa-icon>`:""}
|
|
27
|
+
</div>
|
|
28
|
+
${this.mobile?a`
|
|
29
|
+
<div
|
|
30
|
+
part="progress-bar"
|
|
31
|
+
role="progressbar"
|
|
32
|
+
class="progress-bar"
|
|
33
|
+
aria-hidden="true"
|
|
34
|
+
>
|
|
35
|
+
<div
|
|
36
|
+
class="progress-bar__indicator"
|
|
37
|
+
style=${$({width:`${(o=this.progress)!=null?o:0}%`})}
|
|
38
|
+
></div>
|
|
39
|
+
</div>
|
|
40
|
+
`:""}
|
|
41
|
+
|
|
42
|
+
<div
|
|
43
|
+
id="content"
|
|
44
|
+
class=${u({content:!0,"content--mobile":this.mobile})}
|
|
45
|
+
>
|
|
46
|
+
<div class="content__indicator"></div>
|
|
47
|
+
<div
|
|
48
|
+
role="list"
|
|
49
|
+
@click=${r(this.mobile?this.handleLinkClick:void 0)}
|
|
50
|
+
>
|
|
51
|
+
${a`${(l=this.allLinks)==null?void 0:l.map(H=>a`<div role="listitem">${H}</div>`)}`}
|
|
52
|
+
</div>
|
|
53
|
+
<slot
|
|
54
|
+
part="items"
|
|
55
|
+
class="slotted__items"
|
|
56
|
+
@slotchange=${this.handleSlotChange}
|
|
57
|
+
></slot>
|
|
58
|
+
</div>
|
|
59
|
+
</nav>
|
|
60
|
+
`}};i.styles=M,i.dependencies={"dsa-icon":L},s([h(".header")],i.prototype,"headerButton",2),s([h(".content")],i.prototype,"content",2),s([h(".content__indicator")],i.prototype,"indicator",2),s([h('[part="items"]')],i.prototype,"defaultSlot",2),s([c()],i.prototype,"allLinks",2),s([c()],i.prototype,"currentSectionLink",2),s([c()],i.prototype,"progress",2),s([d()],i.prototype,"label",2),s([d({type:Boolean,reflect:!0})],i.prototype,"mobile",2),s([d({type:Boolean,reflect:!0})],i.prototype,"open",2),s([p("open",{waitUntilFirstUpdate:!0})],i.prototype,"handleOpenChange",1),s([p("mobile",{waitUntilFirstUpdate:!0})],i.prototype,"handleMobileChange",1),i=s([w("dsa-table-of-contents")],i);y("content.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:250,easing:"linear"}});y("content.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:250,easing:"linear"}});export{i as a};
|