@beeq/core 1.8.0-beta.0 → 1.8.0-beta.1
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/dist/beeq/beeq.esm.js +43 -1
- package/dist/beeq/beeq.esm.js.map +1 -1
- package/dist/beeq/index.esm.js +64 -1
- package/dist/beeq/index.esm.js.map +1 -1
- package/dist/beeq/p-063a3968.entry.js +388 -0
- package/dist/beeq/{p-9acfedb8.entry.js.map → p-063a3968.entry.js.map} +1 -1
- package/dist/beeq/p-0979fdfd.entry.js +297 -0
- package/dist/beeq/{p-7f23cde7.entry.js.map → p-0979fdfd.entry.js.map} +1 -1
- package/dist/beeq/p-0ab0b58d.js +25 -1
- package/dist/beeq/p-0ab0b58d.js.map +1 -1
- package/dist/beeq/p-0c42c08a.js +1811 -0
- package/dist/beeq/p-0c42c08a.js.map +1 -0
- package/dist/beeq/p-0f48adcc.entry.js +117 -0
- package/dist/beeq/{p-9f40249f.entry.js.map → p-0f48adcc.entry.js.map} +1 -1
- package/dist/beeq/p-115ed5b2.js +25 -1
- package/dist/beeq/p-115ed5b2.js.map +1 -1
- package/dist/beeq/p-14b44a4b.entry.js +205 -0
- package/dist/beeq/{p-8059836c.entry.js.map → p-14b44a4b.entry.js.map} +1 -1
- package/dist/beeq/p-1715ac80.entry.js +274 -0
- package/dist/beeq/{p-eab59153.entry.js.map → p-1715ac80.entry.js.map} +1 -1
- package/dist/beeq/p-1c8b6eb4.js +12 -1
- package/dist/beeq/p-1c8b6eb4.js.map +1 -1
- package/dist/beeq/p-1f3a4359.js +11 -1
- package/dist/beeq/p-1f3a4359.js.map +1 -1
- package/dist/beeq/p-242ac28a.entry.js +145 -0
- package/dist/beeq/{p-90c5851d.entry.js.map → p-242ac28a.entry.js.map} +1 -1
- package/dist/beeq/p-297fb76b.entry.js +220 -0
- package/dist/beeq/{p-79b7547b.entry.js.map → p-297fb76b.entry.js.map} +1 -1
- package/dist/beeq/p-2bb65f53.entry.js +204 -0
- package/dist/beeq/{p-a8cb8989.entry.js.map → p-2bb65f53.entry.js.map} +1 -1
- package/dist/beeq/p-2e66fc4f.entry.js +434 -0
- package/dist/beeq/{p-ddb23180.entry.js.map → p-2e66fc4f.entry.js.map} +1 -1
- package/dist/beeq/p-36652891.entry.js +102 -0
- package/dist/beeq/{p-633319f3.entry.js.map → p-36652891.entry.js.map} +1 -1
- package/dist/beeq/p-38d4bd8a.js +1934 -1
- package/dist/beeq/p-38d4bd8a.js.map +1 -1
- package/dist/beeq/p-39b7c578.entry.js +84 -0
- package/dist/beeq/{p-94d62f1b.entry.js.map → p-39b7c578.entry.js.map} +1 -1
- package/dist/beeq/p-39d77ba6.entry.js +90 -0
- package/dist/beeq/{p-be664fb0.entry.js.map → p-39d77ba6.entry.js.map} +1 -1
- package/dist/beeq/p-3fd0d92d.js +1228 -1
- package/dist/beeq/p-3fd0d92d.js.map +1 -1
- package/dist/beeq/p-4688e046.js +16 -0
- package/dist/beeq/{p-aee056e5.js.map → p-4688e046.js.map} +1 -1
- package/dist/beeq/p-49249dda.entry.js +156 -0
- package/dist/beeq/{p-235328ee.entry.js.map → p-49249dda.entry.js.map} +1 -1
- package/dist/beeq/p-548b45b7.entry.js +104 -0
- package/dist/beeq/{p-ae8ffb81.entry.js.map → p-548b45b7.entry.js.map} +1 -1
- package/dist/beeq/p-57621be1.js +9 -1
- package/dist/beeq/p-57621be1.js.map +1 -1
- package/dist/beeq/p-57a55ac5.entry.js +261 -0
- package/dist/beeq/{p-52577f3a.entry.js.map → p-57a55ac5.entry.js.map} +1 -1
- package/dist/beeq/p-5e11b866.entry.js +102 -0
- package/dist/beeq/{p-b7281046.entry.js.map → p-5e11b866.entry.js.map} +1 -1
- package/dist/beeq/p-687da041.js +20 -1
- package/dist/beeq/p-687da041.js.map +1 -1
- package/dist/beeq/p-6a4e104b.entry.js +263 -0
- package/dist/beeq/{p-3aa41d80.entry.js.map → p-6a4e104b.entry.js.map} +1 -1
- package/dist/beeq/p-6a5a79a3.entry.js +184 -0
- package/dist/beeq/{p-606c080c.entry.js.map → p-6a5a79a3.entry.js.map} +1 -1
- package/dist/beeq/p-7f301da8.entry.js +508 -0
- package/dist/beeq/p-7f301da8.entry.js.map +1 -0
- package/dist/beeq/p-81f1c3ba.entry.js +121 -0
- package/dist/beeq/{p-c9c942e6.entry.js.map → p-81f1c3ba.entry.js.map} +1 -1
- package/dist/beeq/p-822773ae.entry.js +195 -0
- package/dist/beeq/{p-a7b0fd0b.entry.js.map → p-822773ae.entry.js.map} +1 -1
- package/dist/beeq/p-951ba558.js +64 -1
- package/dist/beeq/p-951ba558.js.map +1 -1
- package/dist/beeq/p-99829fc7.js +8 -1
- package/dist/beeq/p-99829fc7.js.map +1 -1
- package/dist/beeq/p-9990889d.entry.js +222 -0
- package/dist/beeq/{p-9cd26e8d.entry.js.map → p-9990889d.entry.js.map} +1 -1
- package/dist/beeq/p-a1b43de6.entry.js +248 -0
- package/dist/beeq/{p-4ba2bec7.entry.js.map → p-a1b43de6.entry.js.map} +1 -1
- package/dist/beeq/p-a5dc1c94.js +118 -1
- package/dist/beeq/p-a5dc1c94.js.map +1 -1
- package/dist/beeq/p-a6489187.entry.js +103 -0
- package/dist/beeq/{p-b90c6de9.entry.js.map → p-a6489187.entry.js.map} +1 -1
- package/dist/beeq/p-a8cad5ab.js +5 -1
- package/dist/beeq/p-a8cad5ab.js.map +1 -1
- package/dist/beeq/p-ac969486.entry.js +330 -0
- package/dist/beeq/{p-4739f5c3.entry.js.map → p-ac969486.entry.js.map} +1 -1
- package/dist/beeq/p-af062402.js +7 -1
- package/dist/beeq/p-af062402.js.map +1 -1
- package/dist/beeq/p-afc9fd80.entry.js +144 -0
- package/dist/beeq/{p-6e026fad.entry.js.map → p-afc9fd80.entry.js.map} +1 -1
- package/dist/beeq/p-bef53750.js +79 -0
- package/dist/beeq/p-bef53750.js.map +1 -0
- package/dist/beeq/p-bf2320dd.entry.js +329 -0
- package/dist/beeq/{p-e6382462.entry.js.map → p-bf2320dd.entry.js.map} +1 -1
- package/dist/beeq/p-c34e292e.entry.js +127 -0
- package/dist/beeq/{p-268dc1e3.entry.js.map → p-c34e292e.entry.js.map} +1 -1
- package/dist/beeq/p-d7a88b16.js +87 -1
- package/dist/beeq/p-d7a88b16.js.map +1 -1
- package/dist/beeq/p-db18eba1.entry.js +173 -0
- package/dist/beeq/{p-eddb77c7.entry.js.map → p-db18eba1.entry.js.map} +1 -1
- package/dist/beeq/p-dd950c12.entry.js +309 -0
- package/dist/beeq/{p-63ad9702.entry.js.map → p-dd950c12.entry.js.map} +1 -1
- package/dist/beeq/p-e301647a.entry.js +87 -0
- package/dist/beeq/{p-3b2ce34b.entry.js.map → p-e301647a.entry.js.map} +1 -1
- package/dist/beeq/p-e3aa2886.entry.js +203 -0
- package/dist/beeq/{p-a006be9e.entry.js.map → p-e3aa2886.entry.js.map} +1 -1
- package/dist/beeq/p-e41f07ae.entry.js +173 -0
- package/dist/beeq/{p-9c6c6646.entry.js.map → p-e41f07ae.entry.js.map} +1 -1
- package/dist/beeq/p-e88257a8.entry.js +259 -0
- package/dist/beeq/{p-d2bbae3b.entry.js.map → p-e88257a8.entry.js.map} +1 -1
- package/dist/beeq/p-e9a54b49.entry.js +145 -0
- package/dist/beeq/{p-96d7f361.entry.js.map → p-e9a54b49.entry.js.map} +1 -1
- package/dist/beeq/p-ecd27cf2.js +11 -1
- package/dist/beeq/p-ecd27cf2.js.map +1 -1
- package/dist/beeq/p-f77d9b8b.entry.js +144 -0
- package/dist/beeq/{p-41bac721.entry.js.map → p-f77d9b8b.entry.js.map} +1 -1
- package/dist/beeq/p-fd658de1.entry.js +135 -0
- package/dist/beeq/{p-255fcbe4.entry.js.map → p-fd658de1.entry.js.map} +1 -1
- package/dist/beeq/p-ffb48c40.entry.js +258 -0
- package/dist/beeq/{p-b9544567.entry.js.map → p-ffb48c40.entry.js.map} +1 -1
- package/dist/beeq/p-ffddc425.entry.js +149 -0
- package/dist/beeq/{p-571b40ff.entry.js.map → p-ffddc425.entry.js.map} +1 -1
- package/dist/cjs/app-globals-b11284b9.js.map +1 -1
- package/dist/cjs/assetsPath-3938a05d.js +78 -0
- package/dist/cjs/assetsPath-3938a05d.js.map +1 -0
- package/dist/cjs/beeq.cjs.js +1 -1
- package/dist/cjs/bq-accordion-group.cjs.entry.js +2 -2
- package/dist/cjs/bq-accordion.cjs.entry.js +2 -2
- package/dist/cjs/bq-alert.cjs.entry.js +2 -2
- package/dist/cjs/bq-avatar.cjs.entry.js +2 -2
- package/dist/cjs/bq-badge.cjs.entry.js +2 -2
- package/dist/cjs/bq-breadcrumb-item.cjs.entry.js +3 -3
- package/dist/cjs/bq-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/bq-button_2.cjs.entry.js +3 -3
- package/dist/cjs/bq-card.cjs.entry.js +2 -2
- package/dist/cjs/bq-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/bq-date-picker.cjs.entry.js +3 -3
- package/dist/cjs/bq-dialog.cjs.entry.js +2 -2
- package/dist/cjs/bq-divider.cjs.entry.js +2 -2
- package/dist/cjs/bq-drawer.cjs.entry.js +3 -3
- package/dist/cjs/bq-dropdown_2.cjs.entry.js +1 -1
- package/dist/cjs/bq-empty-state.cjs.entry.js +2 -2
- package/dist/cjs/bq-input.cjs.entry.js +3 -3
- package/dist/cjs/bq-notification.cjs.entry.js +2 -2
- package/dist/cjs/bq-option-group.cjs.entry.js +1 -1
- package/dist/cjs/bq-option-list_2.cjs.entry.js +2 -2
- package/dist/cjs/bq-option.cjs.entry.js +2 -2
- package/dist/cjs/bq-page-title.cjs.entry.js +2 -2
- package/dist/cjs/bq-progress.cjs.entry.js +2 -2
- package/dist/cjs/bq-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/bq-radio.cjs.entry.js +1 -1
- package/dist/cjs/bq-select.cjs.entry.js +12 -12
- package/dist/cjs/bq-select.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-side-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/bq-side-menu.cjs.entry.js +2 -2
- package/dist/cjs/bq-slider.cjs.entry.js +2 -2
- package/dist/cjs/bq-spinner.cjs.entry.js +2 -2
- package/dist/cjs/bq-status.cjs.entry.js +2 -2
- package/dist/cjs/bq-step-item.cjs.entry.js +2 -2
- package/dist/cjs/bq-steps.cjs.entry.js +2 -2
- package/dist/cjs/bq-switch.cjs.entry.js +2 -2
- package/dist/cjs/bq-tab-group.cjs.entry.js +2 -2
- package/dist/cjs/bq-tab.cjs.entry.js +2 -2
- package/dist/cjs/bq-textarea.cjs.entry.js +2 -2
- package/dist/cjs/bq-toast.cjs.entry.js +2 -2
- package/dist/cjs/bq-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/{index-e6d59dbb.js → index-1d3aac65.js} +20 -2
- package/dist/cjs/index-1d3aac65.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/{isDefined-4f4a320b.js → isDefined-750bffc4.js} +2 -2
- package/dist/cjs/{isDefined-4f4a320b.js.map → isDefined-750bffc4.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/drawer/scss/bq-drawer.css +1 -1
- package/dist/collection/components/select/bq-select.js +10 -10
- package/dist/collection/components/select/bq-select.js.map +1 -1
- package/dist/collection/components/select/scss/bq-select.css +1 -1
- package/dist/collection/shared/utils/assetsPath.js +52 -26
- package/dist/collection/shared/utils/assetsPath.js.map +1 -1
- package/dist/components/assetsPath.js +52 -26
- package/dist/components/assetsPath.js.map +1 -1
- package/dist/components/bq-drawer.js +1 -1
- package/dist/components/bq-select.js +10 -10
- package/dist/components/bq-select.js.map +1 -1
- package/dist/esm/app-globals-de5a646b.js.map +1 -1
- package/dist/esm/assetsPath-a1b58980.js +75 -0
- package/dist/esm/assetsPath-a1b58980.js.map +1 -0
- package/dist/esm/beeq.js +2 -2
- package/dist/esm/bq-accordion-group.entry.js +2 -2
- package/dist/esm/bq-accordion.entry.js +2 -2
- package/dist/esm/bq-alert.entry.js +2 -2
- package/dist/esm/bq-avatar.entry.js +2 -2
- package/dist/esm/bq-badge.entry.js +2 -2
- package/dist/esm/bq-breadcrumb-item.entry.js +3 -3
- package/dist/esm/bq-breadcrumb.entry.js +2 -2
- package/dist/esm/bq-button_2.entry.js +3 -3
- package/dist/esm/bq-card.entry.js +2 -2
- package/dist/esm/bq-checkbox.entry.js +2 -2
- package/dist/esm/bq-date-picker.entry.js +3 -3
- package/dist/esm/bq-dialog.entry.js +2 -2
- package/dist/esm/bq-divider.entry.js +2 -2
- package/dist/esm/bq-drawer.entry.js +3 -3
- package/dist/esm/bq-dropdown_2.entry.js +1 -1
- package/dist/esm/bq-empty-state.entry.js +2 -2
- package/dist/esm/bq-input.entry.js +3 -3
- package/dist/esm/bq-notification.entry.js +2 -2
- package/dist/esm/bq-option-group.entry.js +1 -1
- package/dist/esm/bq-option-list_2.entry.js +2 -2
- package/dist/esm/bq-option.entry.js +2 -2
- package/dist/esm/bq-page-title.entry.js +2 -2
- package/dist/esm/bq-progress.entry.js +2 -2
- package/dist/esm/bq-radio-group.entry.js +2 -2
- package/dist/esm/bq-radio.entry.js +1 -1
- package/dist/esm/bq-select.entry.js +13 -13
- package/dist/esm/bq-select.entry.js.map +1 -1
- package/dist/esm/bq-side-menu-item.entry.js +2 -2
- package/dist/esm/bq-side-menu.entry.js +2 -2
- package/dist/esm/bq-slider.entry.js +2 -2
- package/dist/esm/bq-spinner.entry.js +2 -2
- package/dist/esm/bq-status.entry.js +2 -2
- package/dist/esm/bq-step-item.entry.js +2 -2
- package/dist/esm/bq-steps.entry.js +2 -2
- package/dist/esm/bq-switch.entry.js +2 -2
- package/dist/esm/bq-tab-group.entry.js +2 -2
- package/dist/esm/bq-tab.entry.js +2 -2
- package/dist/esm/bq-textarea.entry.js +2 -2
- package/dist/esm/bq-toast.entry.js +2 -2
- package/dist/esm/bq-tooltip.entry.js +1 -1
- package/dist/esm/{index-efc1c2ef.js → index-f69556fe.js} +20 -2
- package/dist/esm/index-f69556fe.js.map +1 -0
- package/dist/esm/index.js +3 -3
- package/dist/esm/{isDefined-91ae4cd3.js → isDefined-170f3095.js} +2 -2
- package/dist/esm/{isDefined-91ae4cd3.js.map → isDefined-170f3095.js.map} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/hydrate/index.js +62 -36
- package/dist/hydrate/index.mjs +62 -36
- package/dist/stencil.config.js +4 -1
- package/dist/stencil.config.js.map +1 -1
- package/dist/types/home/workflows/workspace/packages/beeq/.stencil/packages/beeq/stencil.config.d.ts +2 -0
- package/dist/types/shared/utils/assetsPath.d.ts +18 -11
- package/package.json +1 -1
- package/dist/beeq/p-235328ee.entry.js +0 -6
- package/dist/beeq/p-255fcbe4.entry.js +0 -6
- package/dist/beeq/p-268dc1e3.entry.js +0 -6
- package/dist/beeq/p-3aa41d80.entry.js +0 -6
- package/dist/beeq/p-3b2ce34b.entry.js +0 -6
- package/dist/beeq/p-41bac721.entry.js +0 -6
- package/dist/beeq/p-4739f5c3.entry.js +0 -6
- package/dist/beeq/p-4ba2bec7.entry.js +0 -6
- package/dist/beeq/p-52577f3a.entry.js +0 -6
- package/dist/beeq/p-571b40ff.entry.js +0 -6
- package/dist/beeq/p-606c080c.entry.js +0 -6
- package/dist/beeq/p-633319f3.entry.js +0 -6
- package/dist/beeq/p-63ad9702.entry.js +0 -6
- package/dist/beeq/p-6e026fad.entry.js +0 -6
- package/dist/beeq/p-6edc8a33.js +0 -6
- package/dist/beeq/p-6edc8a33.js.map +0 -1
- package/dist/beeq/p-76e714c6.js +0 -7
- package/dist/beeq/p-76e714c6.js.map +0 -1
- package/dist/beeq/p-79b7547b.entry.js +0 -6
- package/dist/beeq/p-7f23cde7.entry.js +0 -6
- package/dist/beeq/p-8059836c.entry.js +0 -6
- package/dist/beeq/p-8b7c7049.entry.js +0 -6
- package/dist/beeq/p-8b7c7049.entry.js.map +0 -1
- package/dist/beeq/p-90c5851d.entry.js +0 -6
- package/dist/beeq/p-94d62f1b.entry.js +0 -6
- package/dist/beeq/p-96d7f361.entry.js +0 -6
- package/dist/beeq/p-9acfedb8.entry.js +0 -6
- package/dist/beeq/p-9c6c6646.entry.js +0 -6
- package/dist/beeq/p-9cd26e8d.entry.js +0 -6
- package/dist/beeq/p-9f40249f.entry.js +0 -6
- package/dist/beeq/p-a006be9e.entry.js +0 -6
- package/dist/beeq/p-a7b0fd0b.entry.js +0 -6
- package/dist/beeq/p-a8cb8989.entry.js +0 -6
- package/dist/beeq/p-ae8ffb81.entry.js +0 -6
- package/dist/beeq/p-aee056e5.js +0 -6
- package/dist/beeq/p-b7281046.entry.js +0 -6
- package/dist/beeq/p-b90c6de9.entry.js +0 -6
- package/dist/beeq/p-b9544567.entry.js +0 -6
- package/dist/beeq/p-be664fb0.entry.js +0 -6
- package/dist/beeq/p-c9c942e6.entry.js +0 -6
- package/dist/beeq/p-d2bbae3b.entry.js +0 -6
- package/dist/beeq/p-ddb23180.entry.js +0 -6
- package/dist/beeq/p-e6382462.entry.js +0 -6
- package/dist/beeq/p-eab59153.entry.js +0 -6
- package/dist/beeq/p-eddb77c7.entry.js +0 -6
- package/dist/cjs/assetsPath-eac0a3bf.js +0 -52
- package/dist/cjs/assetsPath-eac0a3bf.js.map +0 -1
- package/dist/cjs/index-e6d59dbb.js.map +0 -1
- package/dist/esm/assetsPath-ae18c25e.js +0 -49
- package/dist/esm/assetsPath-ae18c25e.js.map +0 -1
- package/dist/esm/index-efc1c2ef.js.map +0 -1
- package/dist/types/Users/dramos/PROJECTs/ENDAVA/BEEQ-Design-System/packages/beeq/.stencil/packages/beeq/stencil.config.d.ts +0 -2
- /package/dist/types/{Users/dramos/PROJECTs/ENDAVA/BEEQ-Design-System → home/workflows/workspace}/packages/beeq/.stencil/tailwind.config.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["bqSliderCss","BqSliderStyle0","BqSlider","this","runUpdates","updateProgressTrack","syncInputsValue","setThumbPosition","setState","newValue","isRangeType","value","stringToObject","minValue","clamp","min","max","gap","maxValue","enableTooltip","minThumbPosition","maxThumbPosition","thumbPosition","_a","inputMinElem","setAttribute","toString","_b","inputMaxElem","isString","JSON","parse","handleInputChange","type","event","target","parseFloat","Math","reflectedValue","calculatePercent","totalRange","Number","progressElem","left","width","style","insetInlineStart","inlineSize","calculateThumbPosition","trackAreaWidth","trackElem","getBoundingClientRect","inputThumbSize","parseInt","getComputedStyle","el","getPropertyValue","totalWidth","undefined","emitBqChange","debounceBqChange","cancel","debounce","bqChange","emit","debounceTime","handleBlur","bqBlur","handleFocus","bqFocus","handleMouseDown","handleTooltipVisibility","handleMouseUp","action","tooltipAlwaysVisible","tooltipElem","minTooltipElem","maxTooltipElem","classList","renderLabel","position","css","h","class","hidden","enableValueIndicator","part","toFixed","decimalCount","renderInput","refCallback","zIndexValue","zIndex","disabled","step","ref","onInput","ev","onBlur","onFocus","onMouseDown","onMouseUp","renderTooltip","isTooltipAlwaysVisible","exportparts","alwaysVisible","distance","fontVariant","slot","handleValuePropChange","handleStepPropChange","round","handleGapChange","isNil","connectedCallback","componentDidLoad","componentDidUpdate","split","replace","length","render","key","elem","input"],"sources":["../../packages/beeq/src/components/slider/scss/bq-slider.scss?tag=bq-slider&encapsulation=shadow","../../packages/beeq/src/components/slider/bq-slider.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Slider styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-slider.variables';\n\n@layer components {\n .thumb {\n @apply pointer-events-auto box-content size-[--bq-slider--thumb-size] cursor-pointer appearance-none rounded-full border-m border-solid border-stroke-brand bg-ui-primary;\n @apply transition-[background-color,border-color,box-shadow] duration-300;\n }\n\n .thumb-focus {\n @apply focus;\n }\n\n .thumb-hover {\n @apply border-hover-stroke-brand;\n }\n\n .thumb-active {\n @apply cursor-grabbing bg-active-ui-brand border-active-stroke-brand;\n }\n}\n\n:host {\n @apply block is-full;\n}\n\n/* ---------------------- Webkit (Chrome, Safari, Edge) --------------------- */\n\ninput[type='range']::-webkit-slider-thumb {\n @apply thumb;\n}\n\ninput[type='range']::-webkit-slider-runnable-track {\n @apply transition-all duration-300 ease-in;\n}\n\ninput[type='range']:focus-visible::-webkit-slider-thumb {\n @apply thumb-focus;\n}\n\ninput[type='range']:hover::-webkit-slider-thumb {\n @apply thumb-hover;\n}\n\ninput[type='range']:active::-webkit-slider-thumb {\n @apply thumb-active;\n}\n\ninput[type='range'][disabled]::-webkit-slider-thumb {\n @apply cursor-not-allowed;\n}\n\n/* ---------------------------- Mozilla (Firefox) --------------------------- */\n\ninput[type='range']::-moz-range-thumb {\n @apply thumb;\n}\n\ninput[type='range']::-moz-range-track {\n @apply transition-all duration-300 ease-in;\n}\n\ninput[type='range']:focus-visible::-moz-range-thumb {\n @apply thumb-focus;\n}\n\ninput[type='range']:hover::-moz-range-thumb {\n @apply thumb-hover;\n}\n\ninput[type='range']:active::-moz-range-thumb {\n @apply thumb-active;\n}\n\ninput[type='range'][disabled]::-moz-range-thumb {\n @apply cursor-not-allowed;\n}\n","import { Component, Element, Event, EventEmitter, h, Prop, State, Watch } from '@stencil/core';\n\nimport { TSliderType, TSliderValue } from './bq-slider.types';\nimport { clamp, debounce, isNil, isString, TDebounce } from '../../shared/utils';\n\n/**\n * @part base - The component's base wrapper.\n * @part container - The container of the slider.\n * @part track-area - The track area of the slider.\n * @part progress-area - The progress area of the slider.\n * @part input-min - The input element for the value when the slider type is `single` or the minimum value when the slider type is `range`.\n * @part input-max - The input element for the maximum value.\n * @part label-start - The label for the value when the slider type is `single` or the minimum value when the slider type is `range`.\n * @part label-end - The label for maximum value when the slider type is `range`.\n */\n@Component({\n tag: 'bq-slider',\n styleUrl: './scss/bq-slider.scss',\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqSlider {\n // Own Properties\n // ====================\n\n private inputMinElem: HTMLInputElement;\n private inputMaxElem: HTMLInputElement;\n private minTooltipElem: HTMLBqTooltipElement;\n private maxTooltipElem: HTMLBqTooltipElement;\n private progressElem: HTMLSpanElement;\n private trackElem: HTMLSpanElement;\n private debounceBqChange: TDebounce<void>;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqSliderElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n /**\n * The `minValue` state is the only value when the slider type is `single`\n * and the minimum value when the slider type is `range`.\n */\n @State() minValue: number;\n /** The `maxValue` state is only used when the slider type is `range`. */\n @State() maxValue: number;\n /** It hold the left position of the Thumb for the value or the minimum value (if the slider type is `range`) */\n @State() minThumbPosition: number;\n /** It hold the left position of the Thumb for the maximum value (if the slider type is `range`) */\n @State() maxThumbPosition: number;\n\n // Public Property API\n // ========================\n\n /** The amount of time, in milliseconds, to wait to trigger the `bqChange` event after each value change. */\n @Prop({ reflect: true }) debounceTime = 0;\n\n /** If `true` the slider is disabled. */\n @Prop({ reflect: true }) disabled? = false;\n\n /** If `true` it will show the value label on a side of the slider track area */\n @Prop({ reflect: true }) enableValueIndicator? = false;\n\n /** A number representing the amount to remain between the minimum and maximum values (only for range type). */\n @Prop({ reflect: true, mutable: true }) gap = 0;\n\n /** A number representing the max value of the slider. */\n @Prop({ reflect: true }) max = 100;\n\n /** A number representing the min value of the slider. */\n @Prop({ reflect: true }) min = 0;\n\n /**\n * A number representing the step of the slider.\n * ⚠️ Please notice that the value (or list of values if the slider type is `range`) will be rounded to the nearest multiple of `step`.\n */\n @Prop({ reflect: true }) step = 1;\n\n /** It defines the type of slider to display */\n @Prop({ reflect: true }) type: TSliderType = 'single';\n\n /**\n * The value of the slider.\n * - If the slider type is `single`, the value is a number.\n * - If the slider type is `range`, the value is an array of two numbers (the first number represents the `min` value and the second number represents the `max` value).\n */\n @Prop({ reflect: true, mutable: true }) value: TSliderValue;\n\n /** If `true`, a tooltip will be shown displaying the progress value */\n @Prop({ reflect: true }) enableTooltip: boolean = false;\n\n /**\n * If `true`, a tooltip will always display the progress value.\n * It relies on enableTooltip and if enableTooltip is false, tooltipAlwaysVisible cannot be true.\n */\n @Prop({ reflect: true }) tooltipAlwaysVisible: boolean = false;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('value')\n handleValuePropChange(newValue: TSliderValue) {\n this.setState(newValue);\n this.emitBqChange();\n }\n\n @Watch('step')\n handleStepPropChange() {\n this.minValue = Math.round(this.minValue / this.step) * this.step;\n this.maxValue = Math.round(this.maxValue / this.step) * this.step;\n }\n\n @Watch('gap')\n handleGapChange(newValue: number) {\n if (!this.isRangeType) return;\n // Use the this.value prop value when the component is initialized\n // Otherwise, use the current this.min and this.max state values\n const value = !isNil(this.min) && !isNil(this.max) ? [this.min, this.max] : this.stringToObject(this.value);\n // If the gap is less than the min or greater than the max, set it to 0\n this.gap = newValue < value[0] || newValue > value[1] ? 0 : newValue;\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when change the value on range inputs */\n @Event() bqChange: EventEmitter<{ value: Exclude<TSliderValue, string>; el: HTMLBqSliderElement }>;\n\n /** Handler to be called when the slider loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqSliderElement>;\n\n /** Handler to be called when the slider gets focused */\n @Event() bqFocus: EventEmitter<HTMLBqSliderElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n connectedCallback() {\n this.handleGapChange(this.gap);\n this.setState(this.value);\n this.handleStepPropChange();\n }\n\n componentDidLoad() {\n this.runUpdates();\n }\n\n componentDidUpdate() {\n this.runUpdates();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private runUpdates = () => {\n this.updateProgressTrack();\n this.syncInputsValue();\n this.setThumbPosition();\n };\n\n private setState = (newValue: TSliderValue) => {\n const isRangeType = this.isRangeType;\n const value = this.stringToObject(newValue);\n\n this.minValue = isRangeType ? clamp(value[0], this.min, this.max - this.gap) : value;\n this.maxValue = isRangeType ? clamp(value[1], this.minValue + this.gap, this.max) : this.minValue;\n };\n\n private setThumbPosition = () => {\n if (!this.enableTooltip) return;\n\n // Destructure the returned object from this.thumbPosition() and assign the properties to this.minThumbPosition and this.maxThumbPosition\n ({ minThumbPosition: this.minThumbPosition, maxThumbPosition: this.maxThumbPosition } = this.thumbPosition());\n };\n\n private syncInputsValue = () => {\n this.inputMinElem?.setAttribute('value', this.minValue.toString());\n this.inputMaxElem?.setAttribute('value', this.maxValue.toString());\n };\n\n private stringToObject = (value: TSliderValue) => (isString(value) ? JSON.parse(value) : value);\n\n private handleInputChange = (type: 'min' | 'max', event: InputEvent) => {\n const target = event.target as HTMLInputElement;\n const value = parseFloat(target.value);\n\n if (type === 'min') {\n this.minValue = this.isRangeType ? Math.min(value, this.maxValue - this.gap) : value;\n } else if (type === 'max') {\n this.maxValue = this.isRangeType ? Math.max(value, this.minValue + this.gap) : value;\n }\n\n // Update the input value to reflect the clamped value\n const reflectedValue = (type === 'min' ? this.minValue : this.maxValue).toString();\n target.value = reflectedValue;\n target.setAttribute('value', reflectedValue);\n\n // Sync the prop value.\n // This will trigger the `@Watch('value')` method and emit the `bqChange` event.\n this.value = this.isRangeType ? [this.minValue, this.maxValue] : this.minValue;\n };\n\n private calculatePercent = (value: number) => {\n const totalRange = Number(this.max) - Number(this.min);\n return (value / totalRange) * 100;\n };\n\n private updateProgressTrack = () => {\n if (!this.progressElem) return;\n\n // For range type, left starts from the `min` value and width is the difference between `max` and `min`.\n // For non-range type, left starts from 0 and width is the `min` value.\n const left = this.isRangeType ? this.calculatePercent(this.minValue) : 0;\n const width = this.isRangeType\n ? this.calculatePercent(Number(this.maxValue) - Number(this.minValue))\n : this.calculatePercent(this.minValue);\n\n this.progressElem.style.insetInlineStart = `${left}%`;\n this.progressElem.style.inlineSize = `${width}%`;\n };\n\n private calculateThumbPosition = (value: number): number => {\n if (!this.progressElem) return;\n\n // Get the width of the track area and the size of the input range thumb\n const trackAreaWidth = this.trackElem.getBoundingClientRect().width;\n // We need to also add 4px to the thumb size,\n // this is because the thumb is 2px border (`border-m`)\n const inputThumbSize = parseInt(getComputedStyle(this.el).getPropertyValue('--bq-slider--thumb-size'), 10) + 4;\n const totalWidth = trackAreaWidth - inputThumbSize;\n\n return ((value - this.min) / (this.max - this.min)) * totalWidth + inputThumbSize / 2;\n };\n\n private thumbPosition = (): { minThumbPosition: number; maxThumbPosition?: number } => {\n const minThumbPosition = this.calculateThumbPosition(this.minValue);\n const maxThumbPosition = this.isRangeType ? this.calculateThumbPosition(this.maxValue) : undefined;\n\n return { minThumbPosition, maxThumbPosition };\n };\n\n private emitBqChange = () => {\n this.debounceBqChange?.cancel();\n\n const value: Exclude<TSliderValue, string> = this.isRangeType ? [this.minValue, this.maxValue] : this.minValue;\n this.debounceBqChange = debounce(() => this.bqChange.emit({ value, el: this.el }), this.debounceTime);\n\n this.debounceBqChange();\n };\n\n private handleBlur = () => {\n this.bqBlur.emit(this.el);\n };\n\n private handleFocus = () => {\n this.bqFocus.emit(this.el);\n };\n\n private handleMouseDown = (event: MouseEvent) => {\n this.handleTooltipVisibility(event, 'remove');\n };\n\n private handleMouseUp = (event: MouseEvent) => {\n this.handleTooltipVisibility(event, 'add');\n };\n\n private handleTooltipVisibility = (event: MouseEvent, action: 'add' | 'remove') => {\n if (!this.enableTooltip || this.tooltipAlwaysVisible) return;\n\n const target = event.target as HTMLElement;\n const tooltipElem = target === this.inputMinElem ? this.minTooltipElem : this.maxTooltipElem;\n tooltipElem.classList[action]('hidden');\n };\n\n private get decimalCount(): number {\n // Return the length of the decimal part of the step value.\n return (this.step % 1).toFixed(10).split('.')[1].replace(/0+$/, '').length;\n }\n\n private get isRangeType() {\n return this.type === 'range';\n }\n\n private get isTooltipAlwaysVisible(): boolean {\n return this.tooltipAlwaysVisible && this.enableTooltip;\n }\n\n private renderLabel = (value: number, position: 'start' | 'end', css?: string) => {\n return (\n <span\n class={{\n [`${css} box-content block text-s font-medium leading-regular text-text-primary is-fit min-is-8 [font-variant:tabular-nums]`]:\n true,\n hidden: position === 'start' ? !this.enableValueIndicator : !this.enableValueIndicator || !this.isRangeType,\n }}\n part={`label-${position}`}\n >\n {value.toFixed(this.decimalCount)}\n </span>\n );\n };\n\n private renderInput = (type: 'max' | 'min', value: number, refCallback: (input: HTMLInputElement) => void) => {\n // Determine the zIndex value based on the type and the current min and max values.\n const zIndexValue = (type: 'min' | 'max'): string => {\n const zIndex = {\n min: this.minValue === this.min && this.maxValue === this.minValue,\n max: this.maxValue === this.max && this.minValue === this.maxValue,\n };\n\n // If the value of both thumbs is the same as the min or max value, set the zIndex to -1\n return zIndex[type] ? '-1' : '0';\n };\n\n return (\n <input\n type=\"range\"\n class={{\n 'absolute start-0 -translate-y-1/2 cursor-pointer appearance-none bg-transparent outline-none is-full inset-bs-[50%] disabled:cursor-not-allowed':\n true,\n 'pointer-events-none': this.isRangeType,\n }}\n style={this.isRangeType ? { zIndex: zIndexValue(type) } : undefined}\n disabled={this.disabled}\n min={this.min}\n max={this.max}\n step={this.step}\n ref={refCallback}\n onInput={(ev) => this.handleInputChange(type, ev)}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onMouseDown={this.handleMouseDown}\n onMouseUp={this.handleMouseUp}\n value={value}\n part={`input-${type}`}\n />\n );\n };\n\n private renderTooltip = (\n value: number,\n thumbPosition: number,\n refCallback: (elem: HTMLBqTooltipElement) => void,\n ): HTMLBqTooltipElement => (\n <bq-tooltip\n class={{\n 'absolute [&::part(panel)]:absolute': true,\n hidden: !this.isTooltipAlwaysVisible,\n }}\n exportparts=\"base,trigger,panel\"\n alwaysVisible={true}\n distance={this.enableValueIndicator ? 6 : 16}\n style={{ insetInlineStart: `${thumbPosition}px`, fontVariant: 'tabular-nums' }}\n ref={refCallback}\n >\n <div class=\"absolute bs-1 is-1\" slot=\"trigger\" />\n {value.toFixed(this.decimalCount)}\n </bq-tooltip>\n );\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div\n aria-disabled={this.disabled ? 'true' : 'false'}\n class={{ 'flex is-full': true, 'cursor-not-allowed opacity-60': this.disabled }}\n part=\"base\"\n >\n {/* LABEL (start) */}\n {this.renderLabel(this.minValue, 'start', 'me-xs text-end')}\n {/* SLIDER */}\n <div class=\"relative is-full\" part=\"container\">\n {/* TRACK AREA */}\n <span\n class=\"absolute start-0 -translate-y-1/2 rounded-xs bg-[--bq-slider--trackarea-color] bs-1 is-full inset-bs-[50%]\"\n ref={(elem) => (this.trackElem = elem)}\n part=\"track-area\"\n />\n {/* PROGRESS AREA */}\n <span\n class=\"absolute -translate-y-1/2 rounded-xs bg-[--bq-slider--progress-color] bs-1 is-[50%] inset-bs-[50%]\"\n ref={(elem) => (this.progressElem = elem)}\n part=\"progress-area\"\n />\n {/* TOOLTIP on top of the value or min value (if the slider type is `range`) */}\n {this.enableTooltip &&\n this.renderTooltip(this.minValue, this.minThumbPosition, (elem) => (this.minTooltipElem = elem))}\n {/* INPUT (Min), used on single type */}\n {this.renderInput('min', this.minValue, (input) => (this.inputMinElem = input))}\n {/* TOOLTIP on top of the max value (if the slider type is `range`) */}\n {this.enableTooltip &&\n this.isRangeType &&\n this.renderTooltip(this.maxValue, this.maxThumbPosition, (elem) => (this.maxTooltipElem = elem))}\n {/* INPUT (Max) */}\n {this.isRangeType && this.renderInput('max', this.maxValue, (input) => (this.inputMaxElem = input))}\n </div>\n {/* LABEL (end) */}\n {this.renderLabel(this.maxValue, 'end', 'ms-xs text-start')}\n </div>\n );\n }\n}\n"],"mappings":";;;;4NAAA,MAAMA,EAAc,4pzBACpB,MAAAC,EAAeD,E,MCqBFE,EAAQ,M,4HAsJXC,KAAAC,WAAa,KACnBD,KAAKE,sBACLF,KAAKG,kBACLH,KAAKI,kBAAkB,EAGjBJ,KAAAK,SAAYC,IAClB,MAAMC,EAAcP,KAAKO,YACzB,MAAMC,EAAQR,KAAKS,eAAeH,GAElCN,KAAKU,SAAWH,EAAcI,EAAMH,EAAM,GAAIR,KAAKY,IAAKZ,KA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F,KAAO,GAAGP,QAAQ,IAAI8B,MAAM,KAAK,GAAGC,QAAQ,MAAO,IAAIC,M,CAGtE,eAAY7G,GACV,OAAOP,KAAK8B,OAAS,O,CAGvB,0BAAYsE,GACV,OAAOpG,KAAKuE,sBAAwBvE,KAAKgB,a,CAgF3C,MAAAqG,GACE,OACEtC,EAAA,OAAAuC,IAAA,2DACiBtH,KAAK0F,SAAW,OAAS,QACxCV,MAAO,CAAE,eAAgB,KAAM,gCAAiChF,KAAK0F,UACrEP,KAAK,QAGJnF,KAAK4E,YAAY5E,KAAKU,SAAU,QAAS,kBAE1CqE,EAAA,OAAAuC,IAAA,2CAAKtC,MAAM,mBAAmBG,KAAK,aAEjCJ,EAAA,QAAAuC,IAAA,2CACEtC,MAAM,6GACNY,IAAM2B,GAAUvH,KAAK+C,UAAYwE,EACjCpC,KAAK,eAGPJ,EAAA,QAAAuC,IAAA,2CACEtC,MAAM,qGACNY,IAAM2B,GAAUvH,KAAKuC,aAAegF,EACpCpC,KAAK,kBAGNnF,KAAKgB,eACJhB,KAAKmG,cAAcnG,KAAKU,SAAUV,KAAKiB,kBAAmBsG,GAAUvH,KAAKyE,eAAiB8C,IAE3FvH,KAAKsF,YAAY,MAAOtF,KAAKU,UAAW8G,GAAWxH,KAAKqB,aAAemG,IAEvExH,KAAKgB,eACJhB,KAAKO,aACLP,KAAKmG,cAAcnG,KAAKe,SAAUf,KAAKkB,kBAAmBqG,GAAUvH,KAAK0E,eAAiB6C,IAE3FvH,KAAKO,aAAeP,KAAKsF,YAAY,MAAOtF,KAAKe,UAAWyG,GAAWxH,KAAKyB,aAAe+F,KAG7FxH,KAAK4E,YAAY5E,KAAKe,SAAU,MAAO,oB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["bqSliderCss","BqSliderStyle0","BqSlider","this","runUpdates","updateProgressTrack","syncInputsValue","setThumbPosition","setState","newValue","isRangeType","value","stringToObject","minValue","clamp","min","max","gap","maxValue","enableTooltip","minThumbPosition","maxThumbPosition","thumbPosition","_a","inputMinElem","setAttribute","toString","_b","inputMaxElem","isString","JSON","parse","handleInputChange","type","event","target","parseFloat","Math","reflectedValue","calculatePercent","totalRange","Number","progressElem","left","width","style","insetInlineStart","inlineSize","calculateThumbPosition","trackAreaWidth","trackElem","getBoundingClientRect","inputThumbSize","parseInt","getComputedStyle","el","getPropertyValue","totalWidth","undefined","emitBqChange","debounceBqChange","cancel","debounce","bqChange","emit","debounceTime","handleBlur","bqBlur","handleFocus","bqFocus","handleMouseDown","handleTooltipVisibility","handleMouseUp","action","tooltipAlwaysVisible","tooltipElem","minTooltipElem","maxTooltipElem","classList","renderLabel","position","css","h","class","hidden","enableValueIndicator","part","toFixed","decimalCount","renderInput","refCallback","zIndexValue","zIndex","disabled","step","ref","onInput","ev","onBlur","onFocus","onMouseDown","onMouseUp","renderTooltip","isTooltipAlwaysVisible","exportparts","alwaysVisible","distance","fontVariant","slot","handleValuePropChange","handleStepPropChange","round","handleGapChange","isNil","connectedCallback","componentDidLoad","componentDidUpdate","split","replace","length","render","key","elem","input"],"sources":["../../packages/beeq/src/components/slider/scss/bq-slider.scss?tag=bq-slider&encapsulation=shadow","../../packages/beeq/src/components/slider/bq-slider.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Slider styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-slider.variables';\n\n@layer components {\n .thumb {\n @apply pointer-events-auto box-content size-[--bq-slider--thumb-size] cursor-pointer appearance-none rounded-full border-m border-solid border-stroke-brand bg-ui-primary;\n @apply transition-[background-color,border-color,box-shadow] duration-300;\n }\n\n .thumb-focus {\n @apply focus;\n }\n\n .thumb-hover {\n @apply border-hover-stroke-brand;\n }\n\n .thumb-active {\n @apply cursor-grabbing bg-active-ui-brand border-active-stroke-brand;\n }\n}\n\n:host {\n @apply block is-full;\n}\n\n/* ---------------------- Webkit (Chrome, Safari, Edge) --------------------- */\n\ninput[type='range']::-webkit-slider-thumb {\n @apply thumb;\n}\n\ninput[type='range']::-webkit-slider-runnable-track {\n @apply transition-all duration-300 ease-in;\n}\n\ninput[type='range']:focus-visible::-webkit-slider-thumb {\n @apply thumb-focus;\n}\n\ninput[type='range']:hover::-webkit-slider-thumb {\n @apply thumb-hover;\n}\n\ninput[type='range']:active::-webkit-slider-thumb {\n @apply thumb-active;\n}\n\ninput[type='range'][disabled]::-webkit-slider-thumb {\n @apply cursor-not-allowed;\n}\n\n/* ---------------------------- Mozilla (Firefox) --------------------------- */\n\ninput[type='range']::-moz-range-thumb {\n @apply thumb;\n}\n\ninput[type='range']::-moz-range-track {\n @apply transition-all duration-300 ease-in;\n}\n\ninput[type='range']:focus-visible::-moz-range-thumb {\n @apply thumb-focus;\n}\n\ninput[type='range']:hover::-moz-range-thumb {\n @apply thumb-hover;\n}\n\ninput[type='range']:active::-moz-range-thumb {\n @apply thumb-active;\n}\n\ninput[type='range'][disabled]::-moz-range-thumb {\n @apply cursor-not-allowed;\n}\n","import { Component, Element, Event, EventEmitter, h, Prop, State, Watch } from '@stencil/core';\n\nimport { TSliderType, TSliderValue } from './bq-slider.types';\nimport { clamp, debounce, isNil, isString, TDebounce } from '../../shared/utils';\n\n/**\n * @part base - The component's base wrapper.\n * @part container - The container of the slider.\n * @part track-area - The track area of the slider.\n * @part progress-area - The progress area of the slider.\n * @part input-min - The input element for the value when the slider type is `single` or the minimum value when the slider type is `range`.\n * @part input-max - The input element for the maximum value.\n * @part label-start - The label for the value when the slider type is `single` or the minimum value when the slider type is `range`.\n * @part label-end - The label for maximum value when the slider type is `range`.\n */\n@Component({\n tag: 'bq-slider',\n styleUrl: './scss/bq-slider.scss',\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqSlider {\n // Own Properties\n // ====================\n\n private inputMinElem: HTMLInputElement;\n private inputMaxElem: HTMLInputElement;\n private minTooltipElem: HTMLBqTooltipElement;\n private maxTooltipElem: HTMLBqTooltipElement;\n private progressElem: HTMLSpanElement;\n private trackElem: HTMLSpanElement;\n private debounceBqChange: TDebounce<void>;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqSliderElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n /**\n * The `minValue` state is the only value when the slider type is `single`\n * and the minimum value when the slider type is `range`.\n */\n @State() minValue: number;\n /** The `maxValue` state is only used when the slider type is `range`. */\n @State() maxValue: number;\n /** It hold the left position of the Thumb for the value or the minimum value (if the slider type is `range`) */\n @State() minThumbPosition: number;\n /** It hold the left position of the Thumb for the maximum value (if the slider type is `range`) */\n @State() maxThumbPosition: number;\n\n // Public Property API\n // ========================\n\n /** The amount of time, in milliseconds, to wait to trigger the `bqChange` event after each value change. */\n @Prop({ reflect: true }) debounceTime = 0;\n\n /** If `true` the slider is disabled. */\n @Prop({ reflect: true }) disabled? = false;\n\n /** If `true` it will show the value label on a side of the slider track area */\n @Prop({ reflect: true }) enableValueIndicator? = false;\n\n /** A number representing the amount to remain between the minimum and maximum values (only for range type). */\n @Prop({ reflect: true, mutable: true }) gap = 0;\n\n /** A number representing the max value of the slider. */\n @Prop({ reflect: true }) max = 100;\n\n /** A number representing the min value of the slider. */\n @Prop({ reflect: true }) min = 0;\n\n /**\n * A number representing the step of the slider.\n * ⚠️ Please notice that the value (or list of values if the slider type is `range`) will be rounded to the nearest multiple of `step`.\n */\n @Prop({ reflect: true }) step = 1;\n\n /** It defines the type of slider to display */\n @Prop({ reflect: true }) type: TSliderType = 'single';\n\n /**\n * The value of the slider.\n * - If the slider type is `single`, the value is a number.\n * - If the slider type is `range`, the value is an array of two numbers (the first number represents the `min` value and the second number represents the `max` value).\n */\n @Prop({ reflect: true, mutable: true }) value: TSliderValue;\n\n /** If `true`, a tooltip will be shown displaying the progress value */\n @Prop({ reflect: true }) enableTooltip: boolean = false;\n\n /**\n * If `true`, a tooltip will always display the progress value.\n * It relies on enableTooltip and if enableTooltip is false, tooltipAlwaysVisible cannot be true.\n */\n @Prop({ reflect: true }) tooltipAlwaysVisible: boolean = false;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('value')\n handleValuePropChange(newValue: TSliderValue) {\n this.setState(newValue);\n this.emitBqChange();\n }\n\n @Watch('step')\n handleStepPropChange() {\n this.minValue = Math.round(this.minValue / this.step) * this.step;\n this.maxValue = Math.round(this.maxValue / this.step) * this.step;\n }\n\n @Watch('gap')\n handleGapChange(newValue: number) {\n if (!this.isRangeType) return;\n // Use the this.value prop value when the component is initialized\n // Otherwise, use the current this.min and this.max state values\n const value = !isNil(this.min) && !isNil(this.max) ? [this.min, this.max] : this.stringToObject(this.value);\n // If the gap is less than the min or greater than the max, set it to 0\n this.gap = newValue < value[0] || newValue > value[1] ? 0 : newValue;\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when change the value on range inputs */\n @Event() bqChange: EventEmitter<{ value: Exclude<TSliderValue, string>; el: HTMLBqSliderElement }>;\n\n /** Handler to be called when the slider loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqSliderElement>;\n\n /** Handler to be called when the slider gets focused */\n @Event() bqFocus: EventEmitter<HTMLBqSliderElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n connectedCallback() {\n this.handleGapChange(this.gap);\n this.setState(this.value);\n this.handleStepPropChange();\n }\n\n componentDidLoad() {\n this.runUpdates();\n }\n\n componentDidUpdate() {\n this.runUpdates();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private runUpdates = () => {\n this.updateProgressTrack();\n this.syncInputsValue();\n this.setThumbPosition();\n };\n\n private setState = (newValue: TSliderValue) => {\n const isRangeType = this.isRangeType;\n const value = this.stringToObject(newValue);\n\n this.minValue = isRangeType ? clamp(value[0], this.min, this.max - this.gap) : value;\n this.maxValue = isRangeType ? clamp(value[1], this.minValue + this.gap, this.max) : this.minValue;\n };\n\n private setThumbPosition = () => {\n if (!this.enableTooltip) return;\n\n // Destructure the returned object from this.thumbPosition() and assign the properties to this.minThumbPosition and this.maxThumbPosition\n ({ minThumbPosition: this.minThumbPosition, maxThumbPosition: this.maxThumbPosition } = this.thumbPosition());\n };\n\n private syncInputsValue = () => {\n this.inputMinElem?.setAttribute('value', this.minValue.toString());\n this.inputMaxElem?.setAttribute('value', this.maxValue.toString());\n };\n\n private stringToObject = (value: TSliderValue) => (isString(value) ? JSON.parse(value) : value);\n\n private handleInputChange = (type: 'min' | 'max', event: InputEvent) => {\n const target = event.target as HTMLInputElement;\n const value = parseFloat(target.value);\n\n if (type === 'min') {\n this.minValue = this.isRangeType ? Math.min(value, this.maxValue - this.gap) : value;\n } else if (type === 'max') {\n this.maxValue = this.isRangeType ? Math.max(value, this.minValue + this.gap) : value;\n }\n\n // Update the input value to reflect the clamped value\n const reflectedValue = (type === 'min' ? this.minValue : this.maxValue).toString();\n target.value = reflectedValue;\n target.setAttribute('value', reflectedValue);\n\n // Sync the prop value.\n // This will trigger the `@Watch('value')` method and emit the `bqChange` event.\n this.value = this.isRangeType ? [this.minValue, this.maxValue] : this.minValue;\n };\n\n private calculatePercent = (value: number) => {\n const totalRange = Number(this.max) - Number(this.min);\n return (value / totalRange) * 100;\n };\n\n private updateProgressTrack = () => {\n if (!this.progressElem) return;\n\n // For range type, left starts from the `min` value and width is the difference between `max` and `min`.\n // For non-range type, left starts from 0 and width is the `min` value.\n const left = this.isRangeType ? this.calculatePercent(this.minValue) : 0;\n const width = this.isRangeType\n ? this.calculatePercent(Number(this.maxValue) - Number(this.minValue))\n : this.calculatePercent(this.minValue);\n\n this.progressElem.style.insetInlineStart = `${left}%`;\n this.progressElem.style.inlineSize = `${width}%`;\n };\n\n private calculateThumbPosition = (value: number): number => {\n if (!this.progressElem) return;\n\n // Get the width of the track area and the size of the input range thumb\n const trackAreaWidth = this.trackElem.getBoundingClientRect().width;\n // We need to also add 4px to the thumb size,\n // this is because the thumb is 2px border (`border-m`)\n const inputThumbSize = parseInt(getComputedStyle(this.el).getPropertyValue('--bq-slider--thumb-size'), 10) + 4;\n const totalWidth = trackAreaWidth - inputThumbSize;\n\n return ((value - this.min) / (this.max - this.min)) * totalWidth + inputThumbSize / 2;\n };\n\n private thumbPosition = (): { minThumbPosition: number; maxThumbPosition?: number } => {\n const minThumbPosition = this.calculateThumbPosition(this.minValue);\n const maxThumbPosition = this.isRangeType ? this.calculateThumbPosition(this.maxValue) : undefined;\n\n return { minThumbPosition, maxThumbPosition };\n };\n\n private emitBqChange = () => {\n this.debounceBqChange?.cancel();\n\n const value: Exclude<TSliderValue, string> = this.isRangeType ? [this.minValue, this.maxValue] : this.minValue;\n this.debounceBqChange = debounce(() => this.bqChange.emit({ value, el: this.el }), this.debounceTime);\n\n this.debounceBqChange();\n };\n\n private handleBlur = () => {\n this.bqBlur.emit(this.el);\n };\n\n private handleFocus = () => {\n this.bqFocus.emit(this.el);\n };\n\n private handleMouseDown = (event: MouseEvent) => {\n this.handleTooltipVisibility(event, 'remove');\n };\n\n private handleMouseUp = (event: MouseEvent) => {\n this.handleTooltipVisibility(event, 'add');\n };\n\n private handleTooltipVisibility = (event: MouseEvent, action: 'add' | 'remove') => {\n if (!this.enableTooltip || this.tooltipAlwaysVisible) return;\n\n const target = event.target as HTMLElement;\n const tooltipElem = target === this.inputMinElem ? this.minTooltipElem : this.maxTooltipElem;\n tooltipElem.classList[action]('hidden');\n };\n\n private get decimalCount(): number {\n // Return the length of the decimal part of the step value.\n return (this.step % 1).toFixed(10).split('.')[1].replace(/0+$/, '').length;\n }\n\n private get isRangeType() {\n return this.type === 'range';\n }\n\n private get isTooltipAlwaysVisible(): boolean {\n return this.tooltipAlwaysVisible && this.enableTooltip;\n }\n\n private renderLabel = (value: number, position: 'start' | 'end', css?: string) => {\n return (\n <span\n class={{\n [`${css} box-content block text-s font-medium leading-regular text-text-primary is-fit min-is-8 [font-variant:tabular-nums]`]:\n true,\n hidden: position === 'start' ? !this.enableValueIndicator : !this.enableValueIndicator || !this.isRangeType,\n }}\n part={`label-${position}`}\n >\n {value.toFixed(this.decimalCount)}\n </span>\n );\n };\n\n private renderInput = (type: 'max' | 'min', value: number, refCallback: (input: HTMLInputElement) => void) => {\n // Determine the zIndex value based on the type and the current min and max values.\n const zIndexValue = (type: 'min' | 'max'): string => {\n const zIndex = {\n min: this.minValue === this.min && this.maxValue === this.minValue,\n max: this.maxValue === this.max && this.minValue === this.maxValue,\n };\n\n // If the value of both thumbs is the same as the min or max value, set the zIndex to -1\n return zIndex[type] ? '-1' : '0';\n };\n\n return (\n <input\n type=\"range\"\n class={{\n 'absolute start-0 -translate-y-1/2 cursor-pointer appearance-none bg-transparent outline-none is-full inset-bs-[50%] disabled:cursor-not-allowed':\n true,\n 'pointer-events-none': this.isRangeType,\n }}\n style={this.isRangeType ? { zIndex: zIndexValue(type) } : undefined}\n disabled={this.disabled}\n min={this.min}\n max={this.max}\n step={this.step}\n ref={refCallback}\n onInput={(ev) => this.handleInputChange(type, ev)}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onMouseDown={this.handleMouseDown}\n onMouseUp={this.handleMouseUp}\n value={value}\n part={`input-${type}`}\n />\n );\n };\n\n private renderTooltip = (\n value: number,\n thumbPosition: number,\n refCallback: (elem: HTMLBqTooltipElement) => void,\n ): HTMLBqTooltipElement => (\n <bq-tooltip\n class={{\n 'absolute [&::part(panel)]:absolute': true,\n hidden: !this.isTooltipAlwaysVisible,\n }}\n exportparts=\"base,trigger,panel\"\n alwaysVisible={true}\n distance={this.enableValueIndicator ? 6 : 16}\n style={{ insetInlineStart: `${thumbPosition}px`, fontVariant: 'tabular-nums' }}\n ref={refCallback}\n >\n <div class=\"absolute bs-1 is-1\" slot=\"trigger\" />\n {value.toFixed(this.decimalCount)}\n </bq-tooltip>\n );\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div\n aria-disabled={this.disabled ? 'true' : 'false'}\n class={{ 'flex is-full': true, 'cursor-not-allowed opacity-60': this.disabled }}\n part=\"base\"\n >\n {/* LABEL (start) */}\n {this.renderLabel(this.minValue, 'start', 'me-xs text-end')}\n {/* SLIDER */}\n <div class=\"relative is-full\" part=\"container\">\n {/* TRACK AREA */}\n <span\n class=\"absolute start-0 -translate-y-1/2 rounded-xs bg-[--bq-slider--trackarea-color] bs-1 is-full inset-bs-[50%]\"\n ref={(elem) => (this.trackElem = elem)}\n part=\"track-area\"\n />\n {/* PROGRESS AREA */}\n <span\n class=\"absolute -translate-y-1/2 rounded-xs bg-[--bq-slider--progress-color] bs-1 is-[50%] inset-bs-[50%]\"\n ref={(elem) => (this.progressElem = elem)}\n part=\"progress-area\"\n />\n {/* TOOLTIP on top of the value or min value (if the slider type is `range`) */}\n {this.enableTooltip &&\n this.renderTooltip(this.minValue, this.minThumbPosition, (elem) => (this.minTooltipElem = elem))}\n {/* INPUT (Min), used on single type */}\n {this.renderInput('min', this.minValue, (input) => (this.inputMinElem = input))}\n {/* TOOLTIP on top of the max value (if the slider type is `range`) */}\n {this.enableTooltip &&\n this.isRangeType &&\n this.renderTooltip(this.maxValue, this.maxThumbPosition, (elem) => (this.maxTooltipElem = elem))}\n {/* INPUT (Max) */}\n {this.isRangeType && this.renderInput('max', this.maxValue, (input) => (this.inputMaxElem = input))}\n </div>\n {/* LABEL (end) */}\n {this.renderLabel(this.maxValue, 'end', 'ms-xs text-start')}\n </div>\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,MAAMA,IAAc;;AACpB,MAAAC,IAAeD;;MCqBFE,IAAQ;;;;;;;;;;;;;;;;;;QAsJXC,KAAAC,aAAa;MACnBD,KAAKE;MACLF,KAAKG;MACLH,KAAKI;AAAkB;IAGjBJ,KAAAK,WAAYC;MAClB,MAAMC,IAAcP,KAAKO;MACzB,MAAMC,IAAQR,KAAKS,eAAeH;MAElCN,KAAKU,WAAWH,IAAcI,EAAMH,EAAM,IAAIR,KAAKY,KAAKZ,KAAKa,MAAMb,KAAK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
7
|
+
/**
|
|
8
|
+
* Get CSS custom property variable of a given color string value
|
|
9
|
+
*
|
|
10
|
+
* @param {string} colorName - Valid string value.
|
|
11
|
+
* @return {string} The corresponding CSS custom property variable
|
|
12
|
+
*/ function getColorCSSVariable(t) {
|
|
13
|
+
const n = `${e}${t}`;
|
|
14
|
+
const r = getComputedStyle(document.documentElement).getPropertyValue(n);
|
|
15
|
+
if (!r) return undefined;
|
|
16
|
+
return `var(${n})`;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Get compiled CSS custom property value
|
|
21
|
+
*
|
|
22
|
+
* @param {string} variable - The variable name for which to get its value
|
|
23
|
+
* @return {string} The corresponding value for the given CSS custom property
|
|
24
|
+
*/ function getCSSVariableValue(e, t) {
|
|
25
|
+
const n = getComputedStyle(t);
|
|
26
|
+
return String(n.getPropertyValue(`--${e}`)).trim();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { getCSSVariableValue as a, getColorCSSVariable as g };
|
|
6
30
|
//# sourceMappingURL=p-0ab0b58d.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CSSVALUEPREFIX","getColorCSSVariable","colorName","token","value","getComputedStyle","document","documentElement","getPropertyValue","undefined","getCSSVariableValue","variable","component","styles","String","trim"],"sources":["../../packages/beeq/src/shared/utils/cssVariables.ts"],"sourcesContent":["const CSSVALUEPREFIX = '--bq-';\n\n/**\n * Get CSS custom property variable of a given color string value\n *\n * @param {string} colorName - Valid string value.\n * @return {string} The corresponding CSS custom property variable\n */\nexport function getColorCSSVariable(colorName: string): string {\n const token = `${CSSVALUEPREFIX}${colorName}`;\n const value = getComputedStyle(document.documentElement).getPropertyValue(token);\n if (!value) return undefined;\n\n return `var(${token})`;\n}\n\n/**\n * Get compiled CSS custom property value\n *\n * @param {string} variable - The variable name for which to get its value\n * @return {string} The corresponding value for the given CSS custom property\n */\nexport function getCSSVariableValue(variable: string, component: Element): string {\n const styles = getComputedStyle(component);\n return String(styles.getPropertyValue(`--${variable}`)).trim();\n}\n"],"mappings":";;;;AAAA,MAAMA,
|
|
1
|
+
{"version":3,"names":["CSSVALUEPREFIX","getColorCSSVariable","colorName","token","value","getComputedStyle","document","documentElement","getPropertyValue","undefined","getCSSVariableValue","variable","component","styles","String","trim"],"sources":["../../packages/beeq/src/shared/utils/cssVariables.ts"],"sourcesContent":["const CSSVALUEPREFIX = '--bq-';\n\n/**\n * Get CSS custom property variable of a given color string value\n *\n * @param {string} colorName - Valid string value.\n * @return {string} The corresponding CSS custom property variable\n */\nexport function getColorCSSVariable(colorName: string): string {\n const token = `${CSSVALUEPREFIX}${colorName}`;\n const value = getComputedStyle(document.documentElement).getPropertyValue(token);\n if (!value) return undefined;\n\n return `var(${token})`;\n}\n\n/**\n * Get compiled CSS custom property value\n *\n * @param {string} variable - The variable name for which to get its value\n * @return {string} The corresponding value for the given CSS custom property\n */\nexport function getCSSVariableValue(variable: string, component: Element): string {\n const styles = getComputedStyle(component);\n return String(styles.getPropertyValue(`--${variable}`)).trim();\n}\n"],"mappings":";;;;AAAA,MAAMA,IAAiB;;;;;;;aAQPC,oBAAoBC;EAClC,MAAMC,IAAQ,GAAGH,IAAiBE;EAClC,MAAME,IAAQC,iBAAiBC,SAASC,iBAAiBC,iBAAiBL;EAC1E,KAAKC,GAAO,OAAOK;EAEnB,OAAO,OAAON;AAChB;;;;;;;aAQgBO,oBAAoBC,GAAkBC;EACpD,MAAMC,IAASR,iBAAiBO;EAChC,OAAOE,OAAOD,EAAOL,iBAAiB,KAAKG,MAAaI;AAC1D","ignoreList":[]}
|