@ds-autonomie/web-components 1.16.2 → 1.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 +40 -0
- package/dist/chunks/{chunk.VC3XT47N.js → chunk.26R2GJ3D.js} +24 -46
- package/dist/chunks/{chunk.RG342A22.js → chunk.2GIZK5OL.js} +5 -5
- package/dist/chunks/{chunk.MXDA7QXL.js → chunk.33YIN2OK.js} +12 -9
- package/dist/chunks/{chunk.GYJZ3E7K.js → chunk.3RD6XYCZ.js} +1 -1
- package/dist/chunks/{chunk.JHPIOVRD.js → chunk.3RQ3AMTB.js} +4 -4
- package/dist/chunks/{chunk.VJRDVQTS.js → chunk.4EOWX2QT.js} +1 -1
- package/dist/chunks/{chunk.CZFGLE3Y.js → chunk.4FP4K3F5.js} +20 -0
- package/dist/chunks/chunk.4IGA5VLC.js +308 -0
- package/dist/chunks/{chunk.3UNYRJRK.js → chunk.4IXJVHZ5.js} +1 -1
- package/dist/chunks/{chunk.V7MYOBN4.js → chunk.4L7EJLR4.js} +5 -5
- package/dist/chunks/{chunk.2UZSRWJ7.js → chunk.4QUJBAX3.js} +5 -0
- package/dist/chunks/{chunk.5MXBL3PY.js → chunk.4WWQYBFA.js} +1 -1
- package/dist/chunks/{chunk.E475BLMD.js → chunk.63LGJMTZ.js} +1 -1
- package/dist/chunks/{chunk.45B5UA3U.js → chunk.64JQY57B.js} +1 -1
- package/dist/chunks/{chunk.NXQ42SSB.js → chunk.67S77FO4.js} +145 -313
- package/dist/chunks/{chunk.IDAQJSVV.js → chunk.6GVM3YU4.js} +16 -2
- package/dist/chunks/chunk.6K3AQESH.js +31 -0
- package/dist/chunks/{chunk.Z5LJXDHJ.js → chunk.7PFNOFBI.js} +23 -12
- package/dist/chunks/{chunk.MZF7MK5G.js → chunk.7UPFI4HE.js} +1 -0
- package/dist/chunks/{chunk.7J3HDP6J.js → chunk.AC3HBDLB.js} +1 -1
- package/dist/chunks/{chunk.ORNTGXRO.js → chunk.ARYKCY32.js} +1 -0
- package/dist/chunks/{chunk.KKAOTWJY.js → chunk.ATFH7NZ3.js} +23 -1
- package/dist/chunks/{chunk.7KF6Z37I.js → chunk.ATHRVCEP.js} +1 -1
- package/dist/chunks/{chunk.A2AK34DU.js → chunk.B5XEZJD7.js} +1 -1
- package/dist/chunks/{chunk.KOW5OFDN.js → chunk.BAASBQN5.js} +85 -27
- package/dist/chunks/{chunk.BROIFXIH.js → chunk.BCJMEP6L.js} +1 -1
- package/dist/chunks/chunk.BFVPPAWG.js +277 -0
- package/dist/chunks/{chunk.4DRKFRDB.js → chunk.BNPEW3RO.js} +4 -10
- package/dist/chunks/{chunk.V5J2RAQ5.js → chunk.CFISAFUN.js} +90 -1
- package/dist/chunks/chunk.CFUNT7FK.js +96 -0
- package/dist/chunks/{chunk.OXM5EF3F.js → chunk.CZIWWDCG.js} +7 -18
- package/dist/chunks/{chunk.WHTNMZZS.js → chunk.DLMZ2MN2.js} +4 -4
- package/dist/chunks/{chunk.N2H4K44W.js → chunk.ENMMYFHE.js} +1 -1
- package/dist/chunks/chunk.EWT3XVAN.js +319 -0
- package/dist/chunks/{chunk.6L4HRCFK.js → chunk.EWVN3OFD.js} +1 -1
- package/dist/chunks/{chunk.PNTPO2DN.js → chunk.EY6DBOBY.js} +21 -11
- package/dist/chunks/chunk.FWFLQD5T.js +49 -0
- package/dist/chunks/chunk.FXAGFSAU.js +68 -0
- package/dist/chunks/{chunk.SIPW72IF.js → chunk.FZBZ5HAZ.js} +3 -3
- package/dist/chunks/{chunk.ZYY6O4PU.js → chunk.G2ETLWQZ.js} +5 -16
- package/dist/chunks/{chunk.BAU3732X.js → chunk.G2PBKGYI.js} +3 -2
- package/dist/chunks/{chunk.6L6CZSQX.js → chunk.G3MRVMJ4.js} +2 -16
- package/dist/chunks/chunk.GBE3NP7T.js +36 -0
- package/dist/chunks/{chunk.IQTKA4UT.js → chunk.GCPXZXYD.js} +1 -1
- package/dist/chunks/chunk.H3OIUOL7.js +55 -0
- package/dist/chunks/{chunk.CKBRIIGV.js → chunk.HF2BKQ7K.js} +7 -5
- package/dist/chunks/chunk.HF7GESMZ.js +15 -0
- package/dist/chunks/{chunk.43EIYNTL.js → chunk.HSLR5GY4.js} +9 -3
- package/dist/chunks/{chunk.5MB36CJO.js → chunk.IMRGO6QP.js} +1 -1
- package/dist/chunks/{chunk.JXWCUSV3.js → chunk.ISIFJ4EB.js} +1 -1
- package/dist/chunks/{chunk.O2OMAMMI.js → chunk.IWQVNYM3.js} +1 -1
- package/dist/chunks/{chunk.LFYUJOPU.js → chunk.JH5GMUO7.js} +7 -8
- package/dist/chunks/{chunk.A3RCXT25.js → chunk.JKSDPLU3.js} +1 -1
- package/dist/chunks/{chunk.2PA4QKLT.js → chunk.KKJF6BYU.js} +1 -0
- package/dist/chunks/{chunk.VDOVUA55.js → chunk.KOTPR264.js} +1 -0
- package/dist/chunks/{chunk.4EFJ2NV3.js → chunk.KSF45YRN.js} +7 -2
- package/dist/chunks/{chunk.BHQ3BNQA.js → chunk.L2L37MWZ.js} +10 -12
- package/dist/chunks/{chunk.2P44D5YL.js → chunk.L5DEEGJU.js} +10 -1
- package/dist/chunks/{chunk.Z74FEBJS.js → chunk.L6I3R7R4.js} +1 -1
- package/dist/chunks/{chunk.D433F3FV.js → chunk.LDRVRUQG.js} +1 -0
- package/dist/chunks/{chunk.ZLGBX4RI.js → chunk.LQ42ZLXI.js} +1 -1
- package/dist/chunks/{chunk.VXQMFXV5.js → chunk.M7QP6END.js} +20 -2
- package/dist/chunks/{chunk.WPYZYOD5.js → chunk.MFWGK7WB.js} +1 -1
- package/dist/chunks/{chunk.RBXTMFL6.js → chunk.MNWP6APB.js} +1 -1
- package/dist/chunks/{chunk.H2JSXKGD.js → chunk.MPZ56XQK.js} +4 -0
- package/dist/chunks/{chunk.MUGCPHYQ.js → chunk.MSCG6J3T.js} +4 -4
- package/dist/chunks/chunk.MVFQ3IXQ.js +179 -0
- package/dist/chunks/{chunk.ZWVWEQGL.js → chunk.NDQ5XCHJ.js} +5 -0
- package/dist/chunks/{chunk.GZMFP7UN.js → chunk.O5STCK5X.js} +8 -4
- package/dist/chunks/{chunk.3YSH35MM.js → chunk.O7DWCXXH.js} +1 -1
- package/dist/chunks/{chunk.7DHGAM7P.js → chunk.PC2VIFJW.js} +2 -2
- package/dist/chunks/{chunk.RYD4BVIA.js → chunk.PSAB4UIG.js} +1 -1
- package/dist/chunks/{chunk.GE2PTQVM.js → chunk.PT4W6K27.js} +8 -3
- package/dist/chunks/{chunk.CWHNW2T5.js → chunk.QGNUX2KV.js} +38 -28
- package/dist/chunks/{chunk.EAP74BQL.js → chunk.QVJYJURQ.js} +32 -35
- package/dist/chunks/{chunk.VO6MIHUM.js → chunk.RFQ2Y5SK.js} +2 -0
- package/dist/chunks/{chunk.QR4Z7SWH.js → chunk.RJCFCZY3.js} +1 -1
- package/dist/chunks/{chunk.BQ7R6MC6.js → chunk.RSX6EFCX.js} +23 -1
- package/dist/chunks/{chunk.JR77AUQ7.js → chunk.SH26MYV3.js} +1 -1
- package/dist/chunks/{chunk.TRKYAEYS.js → chunk.SRYBWTPD.js} +143 -240
- package/dist/chunks/{chunk.4V4L6Q7P.js → chunk.TEHCPESC.js} +1 -1
- package/dist/chunks/{chunk.AMIXGL74.js → chunk.TOZLN2DN.js} +20 -3
- package/dist/chunks/chunk.TSW2ZSHN.js +63 -0
- package/dist/chunks/{chunk.IJMNSKEV.js → chunk.TVVACMGN.js} +1 -6
- package/dist/chunks/{chunk.EMJZLQCL.js → chunk.UVGAHM33.js} +2 -1
- package/dist/chunks/{chunk.YG7TOAY3.js → chunk.V5E77HVI.js} +4 -4
- package/dist/chunks/{chunk.SUCVNPSQ.js → chunk.VNMJ2D4A.js} +31 -4
- package/dist/chunks/{chunk.R6572W75.js → chunk.WMZ6HMZN.js} +10 -7
- package/dist/chunks/{chunk.RTEOTFLP.js → chunk.WQVKSBYD.js} +11 -0
- package/dist/chunks/{chunk.QDXCYEAZ.js → chunk.WSP5BYQP.js} +7 -7
- package/dist/chunks/{chunk.XD5JM6WF.js → chunk.WYUQG5BJ.js} +20 -0
- package/dist/chunks/{chunk.N43R5DJN.js → chunk.YU57HFSC.js} +1 -1
- package/dist/chunks/chunk.YVJBJSTS.js +595 -0
- package/dist/chunks/{chunk.WAROYP2H.js → chunk.YXVKJQFH.js} +1 -1
- package/dist/chunks/{chunk.RCSAV4XJ.js → chunk.ZV7TVP6P.js} +1 -1
- package/dist/components/accordion/accordion.js +6 -6
- package/dist/components/accordion/accordion.styles.js +1 -1
- package/dist/components/alert/alert.d.ts +2 -0
- package/dist/components/alert/alert.js +5 -5
- package/dist/components/anchor-tag/anchor-tag.js +2 -2
- package/dist/components/anchor-tag/anchor-tag.styles.js +1 -1
- package/dist/components/avatar/avatar.js +4 -4
- package/dist/components/breadcrumb/breadcrumb.js +5 -5
- package/dist/components/breadcrumb-item/breadcrumb-item.js +2 -2
- package/dist/components/button/button.js +6 -6
- package/dist/components/calendar/calendar.d.ts +1 -1
- package/dist/components/calendar/calendar.js +3 -3
- package/dist/components/calendar/calendar.styles.js +1 -1
- package/dist/components/callout/callout.d.ts +23 -0
- package/dist/components/callout/callout.js +75 -0
- package/dist/components/callout/callout.styles.d.ts +2 -0
- package/dist/components/callout/callout.styles.js +8 -0
- package/dist/components/card/card.d.ts +1 -1
- package/dist/components/card/card.js +2 -2
- package/dist/components/card/card.styles.js +1 -1
- package/dist/components/checkbox/checkbox.js +4 -4
- package/dist/components/checkbox-button/checkbox-button.d.ts +2 -0
- package/dist/components/checkbox-button/checkbox-button.js +5 -5
- package/dist/components/checkbox-button/checkbox-button.styles.js +1 -1
- package/dist/components/checkbox-group/checkbox-group.d.ts +3 -1
- package/dist/components/checkbox-group/checkbox-group.js +2 -2
- package/dist/components/combobox/combobox.d.ts +1 -0
- package/dist/components/combobox/combobox.js +10 -10
- package/dist/components/combobox/combobox.styles.js +1 -1
- package/dist/components/dialog/dialog.d.ts +2 -1
- package/dist/components/dialog/dialog.js +6 -6
- package/dist/components/dialog/dialog.styles.js +1 -1
- package/dist/components/download-card/download-card.js +3 -3
- package/dist/components/download-link/download-link.js +5 -5
- package/dist/components/download-link/download-link.styles.js +1 -1
- package/dist/components/drawer/drawer.d.ts +4 -0
- package/dist/components/drawer/drawer.js +6 -6
- package/dist/components/drawer/drawer.styles.js +1 -1
- package/dist/components/dropdown/dropdown.js +2 -2
- package/dist/components/error-message-panel/error-message-panel.js +2 -2
- package/dist/components/filter/filter-base/filter-base.d.ts +49 -0
- package/dist/components/filter/filter-base/filter-base.js +13 -0
- package/dist/components/filter/filter-base/filter-base.styles.d.ts +2 -0
- package/dist/components/filter/filter-base/filter-base.styles.js +8 -0
- package/dist/components/filter/filter-button/filter-button.d.ts +1 -0
- package/dist/components/filter/filter-button/filter-button.js +6 -6
- package/dist/components/filter/filter-button/filter-button.styles.js +1 -1
- package/dist/components/filter/filter-counter/filter-counter.d.ts +5 -42
- package/dist/components/filter/filter-counter/filter-counter.js +7 -5
- package/dist/components/filter/filter-counter/filter-counter.styles.js +2 -1
- package/dist/components/filter/filter-date/filter-date.d.ts +7 -0
- package/dist/components/filter/filter-date/filter-date.js +15 -12
- package/dist/components/filter/filter-date/filter-date.styles.js +1 -1
- package/dist/components/filter/filter-range/filter-range.d.ts +7 -39
- package/dist/components/filter/filter-range/filter-range.js +19 -14
- package/dist/components/filter/filter-range/filter-range.styles.js +2 -1
- package/dist/components/filter/filter-select/filter-select.d.ts +7 -40
- package/dist/components/filter/filter-select/filter-select.js +26 -10
- package/dist/components/filter/filter-select/filter-select.styles.js +2 -2
- package/dist/components/footer/footer.js +3 -3
- package/dist/components/footer-sitemap-item/footer-sitemap-item.js +2 -2
- package/dist/components/footer-sitemap-item/footer-sitemap-item.styles.js +1 -1
- package/dist/components/format-bytes/format-bytes.js +2 -2
- package/dist/components/format-date/format-date.js +2 -2
- package/dist/components/format-number/format-number.js +2 -2
- package/dist/components/header/header.js +3 -3
- package/dist/components/header/header.styles.js +1 -1
- package/dist/components/header-search/header-search.d.ts +2 -0
- package/dist/components/header-search/header-search.js +2 -2
- package/dist/components/icon/icon.js +3 -3
- package/dist/components/icon/library.js +2 -2
- package/dist/components/icon-button/icon-button.js +3 -3
- package/dist/components/input/input.d.ts +8 -18
- package/dist/components/input/input.js +11 -8
- package/dist/components/input/input.styles.js +1 -1
- package/dist/components/input-date/input-date.d.ts +157 -0
- package/dist/components/input-date/input-date.js +35 -0
- package/dist/components/input-date/input-date.styles.d.ts +2 -0
- package/dist/components/input-date/input-date.styles.js +10 -0
- package/dist/components/input-mask/input-mask.d.ts +2 -0
- package/dist/components/input-mask/input-mask.js +3 -3
- package/dist/components/input-mask/input-mask.styles.js +1 -1
- package/dist/components/input-phone/input-phone.d.ts +4 -2
- package/dist/components/input-phone/input-phone.js +17 -17
- package/dist/components/input-phone/input-phone.styles.js +1 -1
- package/dist/components/menu-accordion/menu-accordion.d.ts +2 -0
- package/dist/components/menu-accordion/menu-accordion.js +5 -5
- package/dist/components/menu-item/menu-item.js +3 -3
- package/dist/components/navbar/navbar-link/navbar-link.js +3 -3
- package/dist/components/navbar/navbar-menu/navbar-menu.d.ts +2 -0
- package/dist/components/navbar/navbar-menu/navbar-menu.js +5 -5
- package/dist/components/option/option.js +6 -6
- package/dist/components/option/option.styles.js +1 -1
- package/dist/components/pagination/pagination.js +13 -10
- package/dist/components/popup/popup.d.ts +8 -0
- package/dist/components/popup/popup.js +2 -2
- package/dist/components/popup/popup.styles.js +1 -1
- package/dist/components/progress-bar/progress-bar.js +2 -2
- package/dist/components/radio/radio.js +3 -3
- package/dist/components/radio-button/radio-button.d.ts +2 -0
- package/dist/components/radio-button/radio-button.js +2 -2
- package/dist/components/radio-button/radio-button.styles.js +1 -1
- package/dist/components/range-slider/range-slider.js +2 -2
- package/dist/components/range-slider/range-slider.styles.js +1 -1
- package/dist/components/relative-time/relative-time.js +2 -2
- package/dist/components/select/select.d.ts +1 -0
- package/dist/components/select/select.js +9 -9
- package/dist/components/select/select.styles.js +1 -1
- package/dist/components/spinner/spinner.js +2 -2
- package/dist/components/split-panel/split-panel.d.ts +66 -0
- package/dist/components/split-panel/split-panel.js +21 -0
- package/dist/components/split-panel/split-panel.styles.d.ts +2 -0
- package/dist/components/split-panel/split-panel.styles.js +7 -0
- package/dist/components/step/step.js +6 -6
- package/dist/components/tab/tab.js +2 -2
- package/dist/components/tab-group/tab-group.js +2 -2
- package/dist/components/table/table-action/table-action.js +2 -2
- package/dist/components/table/table-caption/table-caption.js +2 -2
- package/dist/components/table/table-header-row/table-header-row.js +3 -3
- package/dist/components/table/table-row/table-row.js +2 -2
- 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-of-contents/table-of-contents.d.ts +2 -0
- 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/tag/tag.js +5 -5
- package/dist/components/tooltip/tooltip.d.ts +1 -1
- package/dist/components/tooltip/tooltip.js +5 -5
- package/dist/components/tooltip/tooltip.styles.js +1 -1
- package/dist/components/tree/tree.js +10 -9
- package/dist/components/tree-item/tree-item.js +7 -7
- package/dist/custom-elements.json +8830 -6464
- package/dist/design-system.d.ts +1 -0
- package/dist/design-system.js +170 -159
- package/dist/internal/test.d.ts +11 -0
- package/dist/internal/test.js +19 -0
- package/dist/themes/dsa-wc-theme.css +52 -13
- package/dist/themes/dsa-wc-theme.min.css +1 -1
- package/dist/themes/dsa-wc-theme.styles.js +52 -15
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/utilities/date.d.ts +2 -0
- package/dist/utilities/date.js +9 -0
- package/dist/utilities/icon-library.js +2 -2
- package/dist/utilities/localize.d.ts +1 -2
- package/dist/utilities/localize.js +1 -1
- package/dist/utilities/storybook.d.ts +3 -2
- package/dist/utilities/storybook.js +62 -21
- package/dist/vscode.html-custom-data.json +302 -67
- package/dist/web-types.json +1783 -574
- package/package.json +4 -3
- package/dist/chunks/chunk.5BCAEDG4.js +0 -382
- package/dist/chunks/chunk.FZODQJBF.js +0 -99
- package/dist/chunks/chunk.PAF4S7OV.js +0 -484
- package/dist/chunks/chunk.YOLAIUYX.js +0 -95
- package/dist/chunks/{chunk.O2PIWM25.js → chunk.D34QDO4H.js} +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ds-autonomie/web-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"author": "CNSA",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"customElements": "dist/custom-elements.json",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"@shoelace-style/localize": "3.1.1",
|
|
44
44
|
"composed-offset-position": "0.0.4",
|
|
45
45
|
"lit": "2.8.0",
|
|
46
|
-
"wc-datepicker": "0.
|
|
46
|
+
"wc-datepicker": "0.6.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@ds-autonomie/assets": "1.4.
|
|
49
|
+
"@ds-autonomie/assets": "1.4.2"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@custom-elements-manifest/analyzer": "0.8.4",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"sinon": "15.0.1",
|
|
88
88
|
"source-map": "0.7.4",
|
|
89
89
|
"storybook": "7.3.2",
|
|
90
|
+
"storybook-addon-mock-date": "0.6.0",
|
|
90
91
|
"storybook-addon-pseudo-states": "2.1.0",
|
|
91
92
|
"strip-css-comments": "5.0.0",
|
|
92
93
|
"stylelint": "16.5.0",
|
|
@@ -1,382 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
filter_counter_styles_default
|
|
3
|
-
} from "./chunk.OXM5EF3F.js";
|
|
4
|
-
import {
|
|
5
|
-
waitForEvent
|
|
6
|
-
} from "./chunk.B4BZKR24.js";
|
|
7
|
-
import {
|
|
8
|
-
animateTo,
|
|
9
|
-
stopAnimations
|
|
10
|
-
} from "./chunk.2FK6USFR.js";
|
|
11
|
-
import {
|
|
12
|
-
getAnimation,
|
|
13
|
-
setDefaultAnimation
|
|
14
|
-
} from "./chunk.V7RJROLH.js";
|
|
15
|
-
import {
|
|
16
|
-
LocalizeController
|
|
17
|
-
} from "./chunk.6L6CZSQX.js";
|
|
18
|
-
import {
|
|
19
|
-
watch
|
|
20
|
-
} from "./chunk.6IH66JBY.js";
|
|
21
|
-
import {
|
|
22
|
-
ShoelaceElement
|
|
23
|
-
} from "./chunk.YCXTCVAZ.js";
|
|
24
|
-
import {
|
|
25
|
-
__decorateClass
|
|
26
|
-
} from "./chunk.6M63UXML.js";
|
|
27
|
-
|
|
28
|
-
// src/components/filter/filter-counter/filter-counter.ts
|
|
29
|
-
import { html } from "lit";
|
|
30
|
-
import { customElement, property, query, state } from "lit/decorators.js";
|
|
31
|
-
var DSAFilterCounter = class extends ShoelaceElement {
|
|
32
|
-
constructor() {
|
|
33
|
-
super(...arguments);
|
|
34
|
-
this.localize = new LocalizeController(this);
|
|
35
|
-
this.value = "";
|
|
36
|
-
this.defaultValue = "";
|
|
37
|
-
this.open = false;
|
|
38
|
-
this.hoist = false;
|
|
39
|
-
this.label = "";
|
|
40
|
-
this.filterLabel = "";
|
|
41
|
-
this.disabled = false;
|
|
42
|
-
this.readonly = false;
|
|
43
|
-
}
|
|
44
|
-
connectedCallback() {
|
|
45
|
-
super.connectedCallback();
|
|
46
|
-
this.handleDocumentFocusIn = this.handleDocumentFocusIn.bind(this);
|
|
47
|
-
this.handleDocumentMouseDown = this.handleDocumentMouseDown.bind(this);
|
|
48
|
-
this.tempValue = this.value === "" ? this.defaultValue : this.value;
|
|
49
|
-
}
|
|
50
|
-
addOpenListeners() {
|
|
51
|
-
document.addEventListener("focusin", this.handleDocumentFocusIn);
|
|
52
|
-
document.addEventListener("mousedown", this.handleDocumentMouseDown);
|
|
53
|
-
}
|
|
54
|
-
removeOpenListeners() {
|
|
55
|
-
document.removeEventListener("focusin", this.handleDocumentFocusIn);
|
|
56
|
-
document.removeEventListener("mousedown", this.handleDocumentMouseDown);
|
|
57
|
-
}
|
|
58
|
-
handleFocus() {
|
|
59
|
-
this.emit("dsa-focus");
|
|
60
|
-
}
|
|
61
|
-
handleBlur() {
|
|
62
|
-
this.emit("dsa-blur");
|
|
63
|
-
}
|
|
64
|
-
handleDocumentFocusIn(event) {
|
|
65
|
-
const path = event.composedPath();
|
|
66
|
-
if (this && !path.includes(this)) {
|
|
67
|
-
this.hide();
|
|
68
|
-
this.filterTrigger.focus({ preventScroll: true });
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
handleKeyDown(event) {
|
|
72
|
-
if (this.open && event.key === "Escape") {
|
|
73
|
-
event.stopPropagation();
|
|
74
|
-
event.preventDefault();
|
|
75
|
-
this.hide();
|
|
76
|
-
this.filterTrigger.focus({ preventScroll: true });
|
|
77
|
-
}
|
|
78
|
-
if (this.open && event.key === "Tab") {
|
|
79
|
-
setTimeout(() => {
|
|
80
|
-
var _a, _b;
|
|
81
|
-
const activeElement = (this == null ? void 0 : this.getRootNode()) instanceof ShadowRoot ? (_b = (_a = document.activeElement) == null ? void 0 : _a.shadowRoot) == null ? void 0 : _b.activeElement : document.activeElement;
|
|
82
|
-
if (!this || (activeElement == null ? void 0 : activeElement.closest(this.tagName.toLowerCase())) !== this) {
|
|
83
|
-
this.hide();
|
|
84
|
-
this.filterTrigger.focus({ preventScroll: true });
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
const path = event.composedPath();
|
|
89
|
-
const isFilterTrigger = path.some((el) => el === this.filterTrigger);
|
|
90
|
-
if (isFilterTrigger && (event.key === "Enter" || event.key === " ")) {
|
|
91
|
-
event.preventDefault();
|
|
92
|
-
if (!this.open) {
|
|
93
|
-
this.show();
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
if (isFilterTrigger) {
|
|
97
|
-
this.hide();
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
handleDocumentMouseDown(event) {
|
|
102
|
-
const path = event.composedPath();
|
|
103
|
-
if (this && !path.includes(this)) {
|
|
104
|
-
this.hide();
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
handleFilterTriggerMouseDown(event) {
|
|
108
|
-
event.preventDefault();
|
|
109
|
-
this.filterTrigger.focus({ preventScroll: true });
|
|
110
|
-
this.open = !this.open;
|
|
111
|
-
}
|
|
112
|
-
handleInput(event) {
|
|
113
|
-
event.stopPropagation();
|
|
114
|
-
this.tempValue = this.filterInput.value;
|
|
115
|
-
}
|
|
116
|
-
handleDecrease() {
|
|
117
|
-
if (this.tempValue === "") {
|
|
118
|
-
this.tempValue = this.defaultValue !== "" ? this.defaultValue : "0";
|
|
119
|
-
} else if (!this.min || parseFloat(this.tempValue) > this.min) {
|
|
120
|
-
this.tempValue = `${parseFloat(this.tempValue) - 1}`;
|
|
121
|
-
this.emit("dsa-input");
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
handleIncrease() {
|
|
125
|
-
if (this.tempValue === "") {
|
|
126
|
-
this.tempValue = this.defaultValue !== "" ? this.defaultValue : "0";
|
|
127
|
-
} else if (!this.max || parseFloat(this.tempValue) < this.max) {
|
|
128
|
-
this.tempValue = `${parseFloat(this.tempValue) + 1}`;
|
|
129
|
-
this.emit("dsa-input");
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
handleReset() {
|
|
133
|
-
this.tempValue = this.defaultValue;
|
|
134
|
-
this.emit("dsa-input");
|
|
135
|
-
this.filterInput.focus({ preventScroll: true });
|
|
136
|
-
}
|
|
137
|
-
handleSubmit() {
|
|
138
|
-
this.value = this.tempValue;
|
|
139
|
-
this.emit("dsa-submit");
|
|
140
|
-
this.hide();
|
|
141
|
-
this.filterTrigger.focus({ preventScroll: true });
|
|
142
|
-
}
|
|
143
|
-
handleValueChange() {
|
|
144
|
-
if (this.value !== "") {
|
|
145
|
-
this.tempValue = this.value === "" ? this.defaultValue : this.value;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
async handleDisabledChange() {
|
|
149
|
-
if (this.disabled || this.readonly) {
|
|
150
|
-
this.open = false;
|
|
151
|
-
this.emit("dsa-hide");
|
|
152
|
-
this.removeOpenListeners();
|
|
153
|
-
await stopAnimations(this);
|
|
154
|
-
this.popup.active = false;
|
|
155
|
-
const { keyframes, options } = getAnimation(this, "filter.hide", {
|
|
156
|
-
dir: this.localize.dir()
|
|
157
|
-
});
|
|
158
|
-
await animateTo(this.popup.popup, keyframes, options);
|
|
159
|
-
this.emit("dsa-after-hide");
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
async handleOpenChange() {
|
|
163
|
-
if (this.open) {
|
|
164
|
-
this.emit("dsa-show");
|
|
165
|
-
this.addOpenListeners();
|
|
166
|
-
await stopAnimations(this);
|
|
167
|
-
this.popup.active = true;
|
|
168
|
-
const { keyframes, options } = getAnimation(this, "filter.show", {
|
|
169
|
-
dir: this.localize.dir()
|
|
170
|
-
});
|
|
171
|
-
await animateTo(this.popup.popup, keyframes, options);
|
|
172
|
-
this.emit("dsa-after-show");
|
|
173
|
-
} else {
|
|
174
|
-
this.emit("dsa-hide");
|
|
175
|
-
this.removeOpenListeners();
|
|
176
|
-
this.tempValue = this.value === "" ? this.defaultValue : this.value;
|
|
177
|
-
await stopAnimations(this);
|
|
178
|
-
const { keyframes, options } = getAnimation(this, "filter.hide", {
|
|
179
|
-
dir: this.localize.dir()
|
|
180
|
-
});
|
|
181
|
-
await animateTo(this.popup.popup, keyframes, options);
|
|
182
|
-
this.popup.active = false;
|
|
183
|
-
this.emit("dsa-after-hide");
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
/** Shows the listbox. */
|
|
187
|
-
async show() {
|
|
188
|
-
if (this.open) {
|
|
189
|
-
this.open = false;
|
|
190
|
-
return void 0;
|
|
191
|
-
}
|
|
192
|
-
this.open = true;
|
|
193
|
-
return await waitForEvent(this, "dsa-after-show");
|
|
194
|
-
}
|
|
195
|
-
/** Hides the listbox. */
|
|
196
|
-
async hide() {
|
|
197
|
-
if (!this.open) {
|
|
198
|
-
this.open = false;
|
|
199
|
-
return void 0;
|
|
200
|
-
}
|
|
201
|
-
this.open = false;
|
|
202
|
-
return await waitForEvent(this, "dsa-after-hide");
|
|
203
|
-
}
|
|
204
|
-
/** Sets focus on the control. */
|
|
205
|
-
focus(options) {
|
|
206
|
-
this.filterTrigger.focus(options);
|
|
207
|
-
}
|
|
208
|
-
/** Removes focus from the control. */
|
|
209
|
-
blur() {
|
|
210
|
-
this.filterTrigger.blur();
|
|
211
|
-
}
|
|
212
|
-
render() {
|
|
213
|
-
return html`
|
|
214
|
-
<dsa-popup
|
|
215
|
-
class="filter"
|
|
216
|
-
part="popup"
|
|
217
|
-
placement="bottom-start"
|
|
218
|
-
strategy=${this.hoist ? "fixed" : "absolute"}
|
|
219
|
-
distance="4"
|
|
220
|
-
flip
|
|
221
|
-
shift
|
|
222
|
-
auto-size="vertical"
|
|
223
|
-
auto-size-padding="10"
|
|
224
|
-
@keydown=${this.handleKeyDown}
|
|
225
|
-
>
|
|
226
|
-
<dsa-filter-button
|
|
227
|
-
slot="anchor"
|
|
228
|
-
class="filter__trigger"
|
|
229
|
-
label=${this.label !== "" ? this.label : this.filterLabel}
|
|
230
|
-
selected-option=${this.value}
|
|
231
|
-
selection-count=${this.value !== "" ? 1 : 0}
|
|
232
|
-
aria-expanded=${this.open ? "true" : "false"}
|
|
233
|
-
aria-controls="filter__panel"
|
|
234
|
-
?disabled=${this.disabled}
|
|
235
|
-
?readonly=${this.readonly}
|
|
236
|
-
@focus=${this.handleFocus}
|
|
237
|
-
@blur=${this.handleBlur}
|
|
238
|
-
@mousedown=${this.handleFilterTriggerMouseDown}
|
|
239
|
-
></dsa-filter-button>
|
|
240
|
-
|
|
241
|
-
<div id="filter__panel" class="filter__panel">
|
|
242
|
-
<div class="filter__content">
|
|
243
|
-
<dsa-icon-button
|
|
244
|
-
name="remove"
|
|
245
|
-
variant="secondary"
|
|
246
|
-
size="xlarge"
|
|
247
|
-
label=${this.localize.term("decrease")}
|
|
248
|
-
@click=${this.handleDecrease}
|
|
249
|
-
?disabled=${this.min && parseFloat(this.tempValue) <= this.min}
|
|
250
|
-
class="filter__decrease"
|
|
251
|
-
></dsa-icon-button>
|
|
252
|
-
<dsa-input
|
|
253
|
-
type="number"
|
|
254
|
-
.value=${this.tempValue}
|
|
255
|
-
@input=${this.handleInput}
|
|
256
|
-
min=${this.min}
|
|
257
|
-
max=${this.max}
|
|
258
|
-
title=${this.label !== "" ? this.label : this.filterLabel}
|
|
259
|
-
aria-label=${this.label !== "" ? this.label : this.filterLabel}
|
|
260
|
-
></dsa-input>
|
|
261
|
-
<dsa-icon-button
|
|
262
|
-
name="add"
|
|
263
|
-
variant="secondary"
|
|
264
|
-
size="xlarge"
|
|
265
|
-
label=${this.localize.term("increase")}
|
|
266
|
-
@click=${this.handleIncrease}
|
|
267
|
-
?disabled=${this.max && parseFloat(this.tempValue) >= this.max}
|
|
268
|
-
class="filter__increase"
|
|
269
|
-
></dsa-icon-button>
|
|
270
|
-
</div>
|
|
271
|
-
|
|
272
|
-
<div class="filter__footer">
|
|
273
|
-
<dsa-button
|
|
274
|
-
variant="tertiary"
|
|
275
|
-
size="small"
|
|
276
|
-
@click=${this.handleReset}
|
|
277
|
-
class="filter__reset"
|
|
278
|
-
?disabled=${this.tempValue === this.defaultValue}
|
|
279
|
-
>
|
|
280
|
-
<dsa-icon name="restart_alt" slot="prefix"></dsa-icon>
|
|
281
|
-
${this.localize.term("reinitialize")}
|
|
282
|
-
</dsa-button>
|
|
283
|
-
<dsa-button
|
|
284
|
-
variant="primary"
|
|
285
|
-
size="small"
|
|
286
|
-
@click=${this.handleSubmit}
|
|
287
|
-
class="filter__submit"
|
|
288
|
-
?disabled=${this.min && parseFloat(this.tempValue) < this.min || this.max && parseFloat(this.tempValue) > this.max}
|
|
289
|
-
>
|
|
290
|
-
${this.localize.term("validate")}
|
|
291
|
-
</dsa-button>
|
|
292
|
-
</div>
|
|
293
|
-
</div>
|
|
294
|
-
</dsa-popup>
|
|
295
|
-
`;
|
|
296
|
-
}
|
|
297
|
-
};
|
|
298
|
-
DSAFilterCounter.styles = filter_counter_styles_default;
|
|
299
|
-
__decorateClass([
|
|
300
|
-
query(".filter")
|
|
301
|
-
], DSAFilterCounter.prototype, "popup", 2);
|
|
302
|
-
__decorateClass([
|
|
303
|
-
query(".filter__trigger")
|
|
304
|
-
], DSAFilterCounter.prototype, "filterTrigger", 2);
|
|
305
|
-
__decorateClass([
|
|
306
|
-
query("dsa-input")
|
|
307
|
-
], DSAFilterCounter.prototype, "filterInput", 2);
|
|
308
|
-
__decorateClass([
|
|
309
|
-
query(".filter__decrease")
|
|
310
|
-
], DSAFilterCounter.prototype, "decreaseButton", 2);
|
|
311
|
-
__decorateClass([
|
|
312
|
-
query(".filter__increase")
|
|
313
|
-
], DSAFilterCounter.prototype, "increaseButton", 2);
|
|
314
|
-
__decorateClass([
|
|
315
|
-
query(".filter__reset")
|
|
316
|
-
], DSAFilterCounter.prototype, "resetButton", 2);
|
|
317
|
-
__decorateClass([
|
|
318
|
-
query(".filter__submit")
|
|
319
|
-
], DSAFilterCounter.prototype, "submitButton", 2);
|
|
320
|
-
__decorateClass([
|
|
321
|
-
state()
|
|
322
|
-
], DSAFilterCounter.prototype, "tempValue", 2);
|
|
323
|
-
__decorateClass([
|
|
324
|
-
property({ reflect: true })
|
|
325
|
-
], DSAFilterCounter.prototype, "value", 2);
|
|
326
|
-
__decorateClass([
|
|
327
|
-
property({ attribute: "default-value" })
|
|
328
|
-
], DSAFilterCounter.prototype, "defaultValue", 2);
|
|
329
|
-
__decorateClass([
|
|
330
|
-
property({ type: Boolean, reflect: true })
|
|
331
|
-
], DSAFilterCounter.prototype, "open", 2);
|
|
332
|
-
__decorateClass([
|
|
333
|
-
property({ type: Boolean })
|
|
334
|
-
], DSAFilterCounter.prototype, "hoist", 2);
|
|
335
|
-
__decorateClass([
|
|
336
|
-
property({ attribute: "label", reflect: true })
|
|
337
|
-
], DSAFilterCounter.prototype, "label", 2);
|
|
338
|
-
__decorateClass([
|
|
339
|
-
property({ attribute: "filter-label", reflect: true })
|
|
340
|
-
], DSAFilterCounter.prototype, "filterLabel", 2);
|
|
341
|
-
__decorateClass([
|
|
342
|
-
property({ type: Boolean, reflect: true })
|
|
343
|
-
], DSAFilterCounter.prototype, "disabled", 2);
|
|
344
|
-
__decorateClass([
|
|
345
|
-
property({ type: Boolean, reflect: true })
|
|
346
|
-
], DSAFilterCounter.prototype, "readonly", 2);
|
|
347
|
-
__decorateClass([
|
|
348
|
-
property()
|
|
349
|
-
], DSAFilterCounter.prototype, "min", 2);
|
|
350
|
-
__decorateClass([
|
|
351
|
-
property()
|
|
352
|
-
], DSAFilterCounter.prototype, "max", 2);
|
|
353
|
-
__decorateClass([
|
|
354
|
-
watch("value", { waitUntilFirstUpdate: true })
|
|
355
|
-
], DSAFilterCounter.prototype, "handleValueChange", 1);
|
|
356
|
-
__decorateClass([
|
|
357
|
-
watch(["disabled", "readonly"], { waitUntilFirstUpdate: true })
|
|
358
|
-
], DSAFilterCounter.prototype, "handleDisabledChange", 1);
|
|
359
|
-
__decorateClass([
|
|
360
|
-
watch("open", { waitUntilFirstUpdate: true })
|
|
361
|
-
], DSAFilterCounter.prototype, "handleOpenChange", 1);
|
|
362
|
-
DSAFilterCounter = __decorateClass([
|
|
363
|
-
customElement("dsa-filter-counter")
|
|
364
|
-
], DSAFilterCounter);
|
|
365
|
-
setDefaultAnimation("filter.show", {
|
|
366
|
-
keyframes: [
|
|
367
|
-
{ opacity: 0, scale: 0.9 },
|
|
368
|
-
{ opacity: 1, scale: 1 }
|
|
369
|
-
],
|
|
370
|
-
options: { duration: 100, easing: "ease" }
|
|
371
|
-
});
|
|
372
|
-
setDefaultAnimation("filter.hide", {
|
|
373
|
-
keyframes: [
|
|
374
|
-
{ opacity: 1, scale: 1 },
|
|
375
|
-
{ opacity: 0, scale: 0.9 }
|
|
376
|
-
],
|
|
377
|
-
options: { duration: 100, easing: "ease" }
|
|
378
|
-
});
|
|
379
|
-
|
|
380
|
-
export {
|
|
381
|
-
DSAFilterCounter
|
|
382
|
-
};
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
component_styles_default
|
|
3
|
-
} from "./chunk.TUVJKY7S.js";
|
|
4
|
-
|
|
5
|
-
// src/components/filter/filter-range/filter-range.styles.ts
|
|
6
|
-
import { css } from "lit";
|
|
7
|
-
var filter_range_styles_default = css`
|
|
8
|
-
${component_styles_default}
|
|
9
|
-
|
|
10
|
-
:host {
|
|
11
|
-
display: inline-flex;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/** The popup */
|
|
15
|
-
.filter {
|
|
16
|
-
flex: 1 1 auto;
|
|
17
|
-
display: inline-flex;
|
|
18
|
-
width: 100%;
|
|
19
|
-
position: relative;
|
|
20
|
-
vertical-align: middle;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.filter::part(popup) {
|
|
24
|
-
z-index: var(--dsa-wc-z-index-dropdown);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/* Panel */
|
|
28
|
-
.filter__panel {
|
|
29
|
-
display: flex;
|
|
30
|
-
flex-direction: column;
|
|
31
|
-
position: relative;
|
|
32
|
-
font: var(--dsa-wc-input-text-field-font);
|
|
33
|
-
box-shadow: var(--dsa-wc-shadow-small);
|
|
34
|
-
background: var(--dsa-wc-select-listbox-background-color);
|
|
35
|
-
border: solid var(--dsa-wc-select-listbox-border-width)
|
|
36
|
-
var(--dsa-wc-select-listbox-border-color);
|
|
37
|
-
border-radius: var(--dsa-wc-select-listbox-border-radius);
|
|
38
|
-
padding-inline: 0;
|
|
39
|
-
overflow: hidden;
|
|
40
|
-
overscroll-behavior: none;
|
|
41
|
-
min-width: 300px;
|
|
42
|
-
|
|
43
|
-
/* Make sure it adheres to the popup's auto size */
|
|
44
|
-
/* stylelint-disable-next-line */
|
|
45
|
-
max-width: var(--auto-size-available-width);
|
|
46
|
-
/* stylelint-disable-next-line */
|
|
47
|
-
max-height: min(
|
|
48
|
-
var(--auto-size-available-height),
|
|
49
|
-
var(--dsa-filter-panel-max-height)
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.filter__content {
|
|
54
|
-
padding: var(--dsa-spacing-16);
|
|
55
|
-
display: flex;
|
|
56
|
-
flex-direction: column;
|
|
57
|
-
gap: var(--dsa-spacing-16);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.filter__footer {
|
|
61
|
-
display: flex;
|
|
62
|
-
justify-content: flex-end;
|
|
63
|
-
padding: var(--dsa-spacing-8) var(--dsa-spacing-16);
|
|
64
|
-
gap: var(--dsa-spacing-16);
|
|
65
|
-
border-top: solid var(--dsa-wc-select-listbox-border-width)
|
|
66
|
-
var(--dsa-wc-select-listbox-border-color);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.filter__content--inputs {
|
|
70
|
-
display: flex;
|
|
71
|
-
flex-direction: row;
|
|
72
|
-
gap: var(--dsa-spacing-16);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.filter__slider {
|
|
76
|
-
height: 25px;
|
|
77
|
-
display: flex;
|
|
78
|
-
align-items: center;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
dsa-input {
|
|
82
|
-
flex: 1;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
dsa-range-slider {
|
|
86
|
-
flex: 1;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
dsa-divider {
|
|
90
|
-
width: 8px;
|
|
91
|
-
border-color: var(--dsa-color-primitive-colors-neutral-600);
|
|
92
|
-
margin: auto;
|
|
93
|
-
margin-bottom: 20px;
|
|
94
|
-
}
|
|
95
|
-
`;
|
|
96
|
-
|
|
97
|
-
export {
|
|
98
|
-
filter_range_styles_default
|
|
99
|
-
};
|