@orangelogic/design-system 2.0.0-29DUO2-beta-3 → 2.0.0-29IORR-beta-2
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/library/chunks/{AxisLabelRadial.CgPb7ghO.js → AxisLabelRadial.Bs1P_q_F.js} +1 -1
- package/library/chunks/{BaseColumnSeries.B6rG-Ylz.js → BaseColumnSeries.C7jwOxIJ.js} +1 -1
- package/library/chunks/{CandlestickSeries.C-YfO-57.js → CandlestickSeries.CkXGtRWE.js} +2 -2
- package/library/chunks/{Circle.DhoXSsjo.js → Circle.DBa5Ok8V.js} +1 -1
- package/library/chunks/{ColumnSeries.CZi2LBZ2.js → ColumnSeries.DGazbfza.js} +2 -2
- package/library/chunks/{EditableAxisLabel.CykTMTsG.js → EditableAxisLabel.wN0t_G2B.js} +2 -2
- package/library/chunks/{EditableLabel.BlQ7B4D0.js → EditableLabel.BWeq6fgX.js} +1 -1
- package/library/chunks/{Gradient.BQ0JzFEe.js → Gradient.CdcsPIru.js} +1 -1
- package/library/chunks/{LinearGradient.DuVS2EHe.js → LinearGradient.B1z9AGUt.js} +2 -2
- package/library/chunks/{Picture.DRO0jnR6.js → Picture.YSPC0l0Q.js} +1 -1
- package/library/chunks/{Polygon.DEO3f_qs.js → Polygon.BwMvXN2H.js} +1 -1
- package/library/chunks/{ProgressPie.Bryx2w1J.js → ProgressPie.DlCwXN17.js} +5 -5
- package/library/chunks/{RadialLabel.TyXECvYG.js → RadialLabel.DyVOf2K8.js} +1 -1
- package/library/chunks/{Scrollbar.DK48nKk4.js → Scrollbar.BdZVb_Z-.js} +1 -1
- package/library/chunks/{Slice.DbXRplXx.js → Slice.DiEswWa6.js} +1 -1
- package/library/chunks/{Slider.B27osQYu.js → Slider.C20No2z5.js} +1 -1
- package/library/chunks/{SpriteResizer.C4wFzD_x.js → SpriteResizer.DFnmcy0h.js} +1 -1
- package/library/chunks/{Triangle.BEmFiHyd.js → Triangle.BaOef7HV.js} +1 -1
- package/library/chunks/{ZoomTools.CBqjLDqb.js → ZoomTools.D5JPehoL.js} +1 -1
- package/library/chunks/{_baseUniq.Df-fLIBx.js → _baseUniq.BUihBa8c.js} +56 -53
- package/library/chunks/{am-chart.B_OdX4Q-.js → am-chart.H2jnOzFc.js} +254 -262
- package/library/chunks/{animation.DfUHRQry.js → animation.7ifl4x2S.js} +4 -8
- package/library/chunks/array.DCtvHiLS.js +81 -0
- package/library/chunks/asset.D7E0-cUV.js +460 -0
- package/library/chunks/{button.KnE3mcyM.js → button.CauAHfdl.js} +10 -45
- package/library/chunks/button.styles.CKqn956w.js +5 -0
- package/library/chunks/{capitalize.WSkCXkNE.js → capitalize.CNStXZBq.js} +1 -1
- package/library/chunks/{color-swatch-group.p3Sdqlat.js → color-swatch-group.D5BP2W3P.js} +50 -220
- package/library/chunks/{color-swatch.C0oPHfOu.js → color-swatch.2HS4bc3N.js} +20 -204
- package/library/chunks/{colorPicker.CJwbdhtn.js → colorPicker.06n6P3aK.js} +5 -5
- package/library/chunks/component.styles.CRO4Odto.js +5 -0
- package/library/chunks/confirm-popover.DmGAMS8X.js +121 -0
- package/library/chunks/{cropper.tSDgXKqJ.js → cropper.ZU2Dy-MM.js} +8182 -8540
- package/library/chunks/{dialog.DpZBbTCn.js → dialog.2UW1LNm1.js} +117 -314
- package/library/chunks/{dom.BQVKDNd8.js → dom.BslZF2Y_.js} +1 -1
- package/library/chunks/dot-pagination.DsAfSNzr.js +204 -0
- package/library/chunks/{endpoints.B7lcoc1N.js → endpoints.Fpyb8xvv.js} +214 -203
- package/library/chunks/{exporting.DCqJtW6l.js → exporting.Chnl3UWi.js} +2 -2
- package/library/chunks/file-on-demand.Dig_iVvx.js +1956 -0
- package/library/chunks/{flow.Ch1rU01m.js → flow.D2CqFQa7.js} +5 -5
- package/library/chunks/folder-select.BT1drT8C.js +775 -0
- package/library/chunks/form-control.styles.CaGWmeAS.js +5 -0
- package/library/chunks/{form.DgwYWi0O.js → form.CFc09rKh.js} +1 -1
- package/library/chunks/{gantt.rWdF_jmG.js → gantt.DSHD2gjO.js} +8 -8
- package/library/chunks/header.BePZwMCQ.js +170 -0
- package/library/chunks/{hierarchy.HoRJAu6S.js → hierarchy.DwVsMmsP.js} +5 -5
- package/library/chunks/{hub-connection.CfARlehM.js → hub-connection.Ot2odiCz.js} +1 -1
- package/library/chunks/{i18n.C0iakJkV.js → i18n.BFqTRDCA.js} +19 -12
- package/library/chunks/icon-button.rKe0N4VB.js +149 -0
- package/library/chunks/iframe.DznmlYpV.js +73 -0
- package/library/chunks/{image.C9avagDq.js → image.CEtCGsNL.js} +275 -488
- package/library/chunks/{index.D2JPKXqq.js → index.C9khsiad.js} +17 -17
- package/library/chunks/isObjectLike.z36Fu426.js +34 -0
- package/library/chunks/{isSymbol.huJ_Cvxt.js → isSymbol.L0C2ND_U.js} +1 -1
- package/library/chunks/{json.DHNMAC-m.js → json.zyETMOw-.js} +3 -3
- package/library/chunks/{list-editor.B2mFE9f7.js → list-editor.CJ96S1Np.js} +58 -372
- package/library/chunks/{map.BHmZ4Crx.js → map.CqM2O6LB.js} +2 -2
- package/library/chunks/option.COnEtd3X.js +123 -0
- package/library/chunks/{overlayscrollbars.XhGWx9Zk.js → overlayscrollbars.BMav4RQ4.js} +252 -958
- package/library/chunks/pagination.DaD9Yul6.js +334 -0
- package/library/chunks/{percent.CM9cr1H3.js → percent.DuQwbCCg.js} +3 -3
- package/library/chunks/{radar.CQUnnhGk.js → radar.FpYl3UH5.js} +4 -4
- package/library/chunks/{responsive.CrX-HUow.js → responsive.BndCeSg0.js} +1 -1
- package/library/chunks/{sliceGrouper.iv1p8MAK.js → sliceGrouper.BsE7fGMt.js} +1 -1
- package/library/chunks/{stock.CU0y6a5P.js → stock.BR-ag4Pt.js} +9 -9
- package/library/chunks/string.BigZhczf.js +185 -0
- package/library/chunks/{tab-group.05PY0smt.js → tab-group.0Po0eoxR.js} +33 -584
- package/library/chunks/{table.DNTm_GMS.js → table.WNd284in.js} +3535 -4852
- package/library/chunks/{timeline.yzdwtGKM.js → timeline.DkzkmgEM.js} +5 -5
- package/library/chunks/{toString.CRT5zqEU.js → toString.CL_lYXbK.js} +3 -3
- package/library/chunks/toast.B2cJgW5u.js +71 -0
- package/library/chunks/transformation.CzBptarI.js +140 -0
- package/library/chunks/{tree.CeMLCbs-.js → tree.QCQd_cuc.js} +32 -400
- package/library/chunks/typography.DJC_UXgs.js +52 -0
- package/library/chunks/url.Cj9cIQXJ.js +27 -0
- package/library/chunks/{venn.BOEi13la.js → venn.D739bOV3.js} +1 -1
- package/library/chunks/watch.BCJD77bD.js +547 -0
- package/library/chunks/{wc.V-lq02JF.js → wc.DzW311D-.js} +1 -1
- package/library/chunks/{xy.Df1hy9ac.js → xy.DCRDfTsa.js} +10 -10
- package/library/components/alert.js +11 -179
- package/library/components/am-chart.js +3 -3
- package/library/components/animated-image.js +13 -101
- package/library/components/animation.js +3 -3
- package/library/components/array-line-clamp.js +8 -89
- package/library/components/asset-link-format.js +718 -1380
- package/library/components/atoms.js +18 -18
- package/library/components/avatar.js +6 -95
- package/library/components/badge.js +11 -139
- package/library/components/bicolor-picker.js +4 -23
- package/library/components/border-input-group.js +5 -26
- package/library/components/breadcrumb-item.js +25 -156
- package/library/components/breadcrumb.js +4 -22
- package/library/components/button-group.js +3 -28
- package/library/components/button.js +6 -6
- package/library/components/card.js +4 -126
- package/library/components/checkbox.js +13 -254
- package/library/components/color-picker.js +57 -728
- package/library/components/color-swatch-group.js +9 -9
- package/library/components/color-swatch.js +5 -5
- package/library/components/confirm-popover.js +6 -6
- package/library/components/copy-button.js +11 -256
- package/library/components/corner-position-input-group.js +5 -58
- package/library/components/cropper.js +2 -2
- package/library/components/details.js +6 -152
- package/library/components/dialog.js +6 -6
- package/library/components/divider.js +6 -68
- package/library/components/dot-pagination.js +4 -4
- package/library/components/dot-status.js +25 -95
- package/library/components/drawer.js +11 -242
- package/library/components/dropdown.js +49 -151
- package/library/components/dynamic-select.js +10 -75
- package/library/components/e-chart.js +8 -51
- package/library/components/element-clamp.js +7 -80
- package/library/components/file-on-demand.js +13 -13
- package/library/components/folder-select.js +9 -7
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +3 -7
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +4 -14
- package/library/components/grid-item.js +5 -172
- package/library/components/grid.js +5 -41
- package/library/components/header.js +4 -4
- package/library/components/hub-connection.js +2 -2
- package/library/components/icon-button.js +14 -679
- package/library/components/icon.js +9 -2449
- package/library/components/iframe.js +4 -4
- package/library/components/image-comparer.js +9 -129
- package/library/components/image.js +4 -4
- package/library/components/include.js +3 -7
- package/library/components/input-group.js +4 -29
- package/library/components/input.js +358 -966
- package/library/components/line-clamp.js +7 -83
- package/library/components/list-editor.js +9 -9
- package/library/components/markdown.js +2 -4
- package/library/components/masonry.js +24 -223
- package/library/components/menu-item.js +155 -445
- package/library/components/menu-label.js +3 -20
- package/library/components/menu-section.js +3 -17
- package/library/components/menu.js +5 -113
- package/library/components/molecules.js +5 -5
- package/library/components/mutation-observer.js +3 -7
- package/library/components/option.js +4 -4
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +5 -16
- package/library/components/pagination.js +10 -8
- package/library/components/popup.js +385 -682
- package/library/components/position-picker.js +4 -94
- package/library/components/progress-bar.js +19 -136
- package/library/components/progress-ring.js +4 -95
- package/library/components/qr-code.js +5 -17
- package/library/components/radio-button.js +5 -25
- package/library/components/radio-card.js +8 -176
- package/library/components/radio-group.js +22 -153
- package/library/components/radio.js +14 -171
- package/library/components/range.js +123 -660
- package/library/components/rating.js +58 -238
- package/library/components/relative-time.js +3 -13
- package/library/components/resize-observer.js +4 -8
- package/library/components/select.js +305 -1012
- package/library/components/shadow-input-group.js +5 -24
- package/library/components/share-option-list.js +21 -313
- package/library/components/sidebar.js +15 -221
- package/library/components/size-input-group.js +12 -77
- package/library/components/skeleton.js +7 -80
- package/library/components/space.js +6 -143
- package/library/components/spinner.js +7 -76
- package/library/components/split-panel.js +18 -125
- package/library/components/step.js +21 -272
- package/library/components/stepper-wizard.js +9 -43
- package/library/components/stepper.js +17 -34
- package/library/components/switch.js +13 -276
- package/library/components/tab-group.js +7 -7
- package/library/components/tab-panel.js +5 -32
- package/library/components/tab.js +11 -257
- package/library/components/table.js +8 -8
- package/library/components/tag.js +15 -166
- package/library/components/textarea.js +183 -504
- package/library/components/timecode.js +6 -25
- package/library/components/tooltip.js +10 -94
- package/library/components/tree-item.js +4 -4
- package/library/components/tree.js +4 -4
- package/library/components/typeface.js +24 -123
- package/library/components/types.js +37225 -47339
- package/library/components/typography.js +2 -2
- package/library/components/video.js +3875 -6263
- package/library/components/visually-hidden.js +3 -15
- package/library/package.json +4 -1
- package/library/packages/atoms/src/components/dialog/dialog.d.ts +10 -0
- package/library/packages/atoms/src/components/icon-button/icon-button.d.ts +2 -1
- package/library/packages/atoms/src/components/image/image.d.ts +15 -1
- package/library/packages/atoms/src/components/input/auto-grow-controller.d.ts +23 -0
- package/library/packages/atoms/src/components/input/input.d.ts +10 -2
- package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +4 -0
- package/library/packages/atoms/src/components/pagination/pagination.d.ts +32 -2
- package/library/packages/atoms/src/components/popup/overlay/Overlay.d.ts +10 -0
- package/library/packages/atoms/src/components/popup/popup.d.ts +1 -1
- package/library/packages/atoms/src/components/select/select.d.ts +11 -0
- package/library/packages/atoms/src/components/table/table.d.ts +49 -8
- package/library/packages/atoms/src/components/table/tabulator-tables/core/Tabulator.d.ts +1 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/core/TabulatorFull.d.ts +1 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/core/tools/DataLoader.d.ts +3 -1
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/Ajax/Ajax.d.ts +1 -1
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/Edit/Edit.d.ts +1 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/Edit/List.d.ts +40 -1
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/Filter/Filter.d.ts +10 -3
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/Filter/formatter-display-resolvers.d.ts +93 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/GroupRows/Group.d.ts +8 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/GroupRows/GroupComponent.d.ts +3 -1
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/GroupRows/GroupLoadMore.d.ts +7 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/GroupRows/GroupRows.d.ts +2 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/Page/Page.d.ts +2 -2
- package/library/packages/atoms/src/components/textarea/textarea.d.ts +19 -4
- package/library/packages/atoms/src/components/video/video.d.ts +3 -1
- package/library/packages/events/src/cx-asset-transformation-dialog-cancel.d.ts +6 -0
- package/library/packages/events/src/cx-asset-transformation-dialog-confirm.d.ts +11 -0
- package/library/packages/events/src/cx-asset-transformation-dialog-delete.d.ts +6 -0
- package/library/packages/events/src/cx-bento-range-change.d.ts +9 -0
- package/library/packages/events/src/cx-content-builder-gallery-fetched.d.ts +10 -0
- package/library/packages/events/src/cx-lightbox-close.d.ts +6 -0
- package/library/packages/events/src/cx-lightbox-download.d.ts +11 -0
- package/library/packages/events/src/cx-unauthorized.d.ts +10 -0
- package/library/packages/events/src/cx-video-format-picker-delete.d.ts +6 -0
- package/library/packages/events/src/cx-video-format-picker-select.d.ts +8 -0
- package/library/packages/events/src/events.d.ts +11 -1
- package/library/packages/molecules/src/cropper/cropper.d.ts +2 -0
- package/library/packages/molecules/src/cropper/react/Cropper.d.ts +2 -0
- package/library/packages/molecules/src/estimated-reading-time/estimated-reading-time.d.ts +3 -2
- package/library/packages/molecules/src/folder-select/components/folder-select-tree/folder-select-tree.d.ts +26 -0
- package/library/packages/molecules/src/folder-select/components/folder-select-tree-item/folder-select-tree-item.d.ts +46 -0
- package/library/packages/molecules/src/folder-select/folder-select.d.ts +25 -0
- package/library/packages/molecules/src/index.d.ts +1 -0
- package/library/packages/molecules/src/storybook/storybook.d.ts +60 -23
- package/library/packages/molecules/src/timeline/timeline.d.ts +14 -0
- package/library/packages/molecules/src/video-format-picker/video-format-picker.d.ts +55 -0
- package/library/packages/molecules/src/video-format-picker/video-format-picker.styles.d.ts +2 -0
- package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +9 -1
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-rotation/asset-link-format-rotation.d.ts +7 -7
- package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.d.ts +95 -0
- package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.styles.d.ts +2 -0
- package/library/packages/organisms/src/bento-grid/bento-grid.d.ts +57 -26
- package/library/packages/organisms/src/bento-grid/bento-layout.d.ts +44 -0
- package/library/packages/organisms/src/carousel/carousel.d.ts +5 -1
- package/library/packages/organisms/src/comment/comment.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/components/block-picker/block-picker.d.ts +7 -0
- package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +11 -0
- package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +10 -0
- package/library/packages/organisms/src/content-builder/components/folder-picker/folder-picker.d.ts +6 -0
- package/library/packages/organisms/src/content-builder/configs/carousel.d.ts +6 -2
- package/library/packages/organisms/src/content-builder/configs/gallery.d.ts +6 -2
- package/library/packages/organisms/src/content-builder/configs/image.d.ts +7 -4
- package/library/packages/organisms/src/content-builder/configs/timeline.d.ts +5 -2
- package/library/packages/organisms/src/content-builder/configs/video.d.ts +11 -2
- package/library/packages/organisms/src/content-builder/configs-controller.d.ts +45 -4
- package/library/packages/organisms/src/content-builder/content-builder.d.ts +13 -0
- package/library/packages/organisms/src/content-builder/plugins/gallery.d.ts +45 -1
- package/library/packages/organisms/src/content-builder/styleController.d.ts +20 -2
- package/library/packages/organisms/src/index.d.ts +2 -0
- package/library/packages/organisms/src/lightbox/lightbox.d.ts +79 -0
- package/library/packages/organisms/src/lightbox/lightbox.styles.d.ts +2 -0
- package/library/packages/services/src/api/asset/asset.d.ts +3 -2
- package/library/packages/services/src/api/asset/asset.types.d.ts +84 -0
- package/library/packages/services/src/api/asset/asset.utils.d.ts +9 -0
- package/library/packages/services/src/api/endpoints.d.ts +1 -1
- package/library/packages/tools/src/fetch-asset/fetch-asset.d.ts +2 -1
- package/library/packages/tools/src/fetch-image/fetch-image.d.ts +17 -5
- package/library/packages/types/src/asset-click-action.d.ts +3 -1
- package/library/packages/types/src/bento-grid.d.ts +37 -0
- package/library/packages/types/src/content-builder.d.ts +27 -1
- package/library/packages/types/src/gallery.d.ts +0 -6
- package/library/packages/types/src/icon-button.d.ts +7 -0
- package/library/packages/types/src/menu-item.d.ts +33 -0
- package/library/packages/types/src/storybook.d.ts +19 -0
- package/library/packages/types/src/table.d.ts +37 -1
- package/library/packages/types/src/textarea.d.ts +4 -0
- package/library/packages/types/src/video-format-picker.d.ts +11 -0
- package/library/packages/utils/src/actions/asset-click.d.ts +1 -3
- package/library/packages/utils/src/custom-element/i18n.d.ts +10 -3
- package/library/packages/utils/src/index.d.ts +1 -0
- package/library/packages/utils/src/string/string.d.ts +33 -0
- package/library/packages/utils/src/transformation/index.d.ts +1 -0
- package/library/packages/utils/src/url/url.d.ts +9 -0
- package/library/react-web-component.d.ts +293 -29
- package/library/utils.js +483 -178
- package/package.json +4 -1
- package/library/chunks/_baseRest.ClTMQtN1.js +0 -67
- package/library/chunks/asset.CG_yXtWK.js +0 -288
- package/library/chunks/button.styles.Dl5IQLHU.js +0 -718
- package/library/chunks/component.styles.DMSLciL5.js +0 -71
- package/library/chunks/confirm-popover.zmOFI4e-.js +0 -288
- package/library/chunks/content-builder.D_phDrlo.js +0 -127
- package/library/chunks/dot-pagination.COBkyhoJ.js +0 -325
- package/library/chunks/file-on-demand.CbE-qsiP.js +0 -3740
- package/library/chunks/folder-select.Bl_WkhVE.js +0 -844
- package/library/chunks/form-control.styles.CUGhvlfT.js +0 -67
- package/library/chunks/header.BduX6KJP.js +0 -777
- package/library/chunks/identity.ByMq8VxU.js +0 -6
- package/library/chunks/iframe.BPKV2K7z.js +0 -160
- package/library/chunks/index.B3wJT3XS.js +0 -373
- package/library/chunks/isObjectLike.D3cpZO39.js +0 -81
- package/library/chunks/option.DnpkE8Xi.js +0 -296
- package/library/chunks/pagination.C30LoTya.js +0 -341
- package/library/chunks/string.B_rEG27K.js +0 -160
- package/library/chunks/toast.BXNbwZV8.js +0 -25
- package/library/chunks/typography.oDzoLbZS.js +0 -149
- package/library/chunks/url.LjsR2sB5.js +0 -15
- package/library/chunks/watch.q1sEjPWL.js +0 -501
- /package/library/packages/{organisms/src/asset-link-format/asset-link-format.utils.d.ts → utils/src/transformation/transformation.d.ts} +0 -0
|
@@ -1,656 +1,72 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { C } from "../chunks/typography.
|
|
3
|
-
import { n as
|
|
4
|
-
import { c as k } from "../chunks/component.styles.
|
|
5
|
-
import { f as
|
|
1
|
+
import w from "./line-clamp.js";
|
|
2
|
+
import { C } from "../chunks/typography.DJC_UXgs.js";
|
|
3
|
+
import { n as a, C as S } from "../chunks/lib-cortex-element.CVMmyPMC.js";
|
|
4
|
+
import { c as k } from "../chunks/component.styles.CRO4Odto.js";
|
|
5
|
+
import { f as D } from "../chunks/form-control.styles.CaGWmeAS.js";
|
|
6
6
|
import { s as x, a as y } from "../chunks/animate.El-MpOws.js";
|
|
7
|
-
import { c as
|
|
8
|
-
import { d as
|
|
7
|
+
import { c as z } from "../chunks/custom-element.L4WJXn1j.js";
|
|
8
|
+
import { d as L } from "../chunks/default-value.COZopaet.js";
|
|
9
9
|
import { w as v } from "../chunks/event.mFzZi4sr.js";
|
|
10
|
-
import { F as
|
|
11
|
-
import { L as
|
|
12
|
-
import { s as
|
|
10
|
+
import { F as $ } from "../chunks/form.CFc09rKh.js";
|
|
11
|
+
import { L as I } from "../chunks/i18n.BFqTRDCA.js";
|
|
12
|
+
import { s as V } from "../chunks/scroll.xtO5yojm.js";
|
|
13
13
|
import { H as E } from "../chunks/slot.j5oheLJC.js";
|
|
14
|
-
import { i as
|
|
15
|
-
import { w as
|
|
16
|
-
import { i as
|
|
17
|
-
import { r as
|
|
18
|
-
import { e as
|
|
14
|
+
import { i as T } from "../chunks/user-agent.D9aPuOyL.js";
|
|
15
|
+
import { w as p } from "../chunks/watch.BCJD77bD.js";
|
|
16
|
+
import { i as B, x as u, E as F } from "../chunks/lit-element.jLBm65_O.js";
|
|
17
|
+
import { r as g } from "../chunks/state.CSDxrqLd.js";
|
|
18
|
+
import { e as m } from "../chunks/query.BBf1UFkC.js";
|
|
19
19
|
import { e as b } from "../chunks/class-map.BiVq-cVR.js";
|
|
20
|
-
import { o as
|
|
21
|
-
import { n as
|
|
22
|
-
import { s as
|
|
20
|
+
import { o as A } from "../chunks/unsafe-html.Dff7-rCx.js";
|
|
21
|
+
import { n as f } from "../chunks/when.Dr1es41R.js";
|
|
22
|
+
import { s as O, g as _ } from "../chunks/animation-registry.HmpwNuGH.js";
|
|
23
23
|
import P from "./icon.js";
|
|
24
|
-
import { C as d } from "../chunks/option.
|
|
25
|
-
import
|
|
26
|
-
import
|
|
24
|
+
import { C as d } from "../chunks/option.COnEtd3X.js";
|
|
25
|
+
import U from "./popup.js";
|
|
26
|
+
import M from "./spinner.js";
|
|
27
27
|
import N from "./tag.js";
|
|
28
|
-
const R = (e) => !(document.createElement(e.tagName).constructor === HTMLElement || customElements.get(e.tagName.toLowerCase())), W = F`
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
:host([data-user-invalid])::part(combobox) {
|
|
34
|
-
border-color: var(--cx-input-invalid-border-color);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
:host([data-user-invalid]:focus-within)::part(combobox) {
|
|
38
|
-
border-color: var(--cx-input-invalid-border-color);
|
|
39
|
-
box-shadow: var(--cx-input-invalid-shadow);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/** The popup */
|
|
43
|
-
.select {
|
|
44
|
-
flex: 1 1 auto;
|
|
45
|
-
display: inline-flex;
|
|
46
|
-
width: 100%;
|
|
47
|
-
position: relative;
|
|
48
|
-
vertical-align: middle;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.select::part(popup) {
|
|
52
|
-
z-index: var(--cx-z-index-dropdown);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.select[data-current-placement^='top']::part(popup) {
|
|
56
|
-
transform-origin: bottom;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.select[data-current-placement^='bottom']::part(popup) {
|
|
60
|
-
transform-origin: top;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/* Combobox */
|
|
64
|
-
.select__combobox {
|
|
65
|
-
flex: 1;
|
|
66
|
-
display: flex;
|
|
67
|
-
position: relative;
|
|
68
|
-
align-items: center;
|
|
69
|
-
justify-content: start;
|
|
70
|
-
font-family: var(--cx-input-font-family);
|
|
71
|
-
font-weight: var(--cx-input-font-weight);
|
|
72
|
-
letter-spacing: var(--cx-input-letter-spacing);
|
|
73
|
-
vertical-align: middle;
|
|
74
|
-
overflow: hidden;
|
|
75
|
-
cursor: pointer;
|
|
76
|
-
transition:
|
|
77
|
-
var(--cx-transition-fast) color,
|
|
78
|
-
var(--cx-transition-fast) border,
|
|
79
|
-
var(--cx-transition-fast) box-shadow,
|
|
80
|
-
var(--cx-transition-fast) background-color;
|
|
81
|
-
/*
|
|
82
|
-
match default width of HTMLInputElement, so that in multiselect mode,
|
|
83
|
-
when display input gets hidden, the select doesn't shrink
|
|
84
|
-
*/
|
|
85
|
-
width: 20ch;
|
|
86
|
-
min-width: 0;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.select__display-input {
|
|
90
|
-
position: relative;
|
|
91
|
-
width: 100%;
|
|
92
|
-
font: inherit;
|
|
93
|
-
border: none;
|
|
94
|
-
background: none;
|
|
95
|
-
color: var(--cx-input-color);
|
|
96
|
-
cursor: inherit;
|
|
97
|
-
overflow: hidden;
|
|
98
|
-
margin: 0;
|
|
99
|
-
padding: 0;
|
|
100
|
-
-webkit-appearance: none;
|
|
101
|
-
text-overflow: ellipsis;
|
|
102
|
-
transition: padding-top 0.2s ease-in-out;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.select__tags + .select__display-input {
|
|
106
|
-
padding-top: var(--cx-spacing-2x-small);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.select__display-input--small {
|
|
110
|
-
line-height: var(--cx-line-height-small);
|
|
111
|
-
}
|
|
112
|
-
.select__display-input--medium {
|
|
113
|
-
line-height: var(--cx-line-height-medium);
|
|
114
|
-
}
|
|
115
|
-
.select__display-input--large {
|
|
116
|
-
line-height: var(--cx-line-height-large);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.select__display-input--hidden {
|
|
120
|
-
/**
|
|
121
|
-
* Use visibility instead of overflow hidden since browser force input to be overflow clip
|
|
122
|
-
* Use height 0 instead of display none for smoother transition
|
|
123
|
-
*/
|
|
124
|
-
height: 0;
|
|
125
|
-
padding-top: 0 !important;
|
|
126
|
-
visibility: hidden;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.form-control--has-label .select__display-input {
|
|
130
|
-
padding-top: var(--cx-spacing-x-small);
|
|
131
|
-
padding-bottom: var(--cx-spacing-2x-small);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.select__display-input::placeholder {
|
|
135
|
-
color: var(--cx-input-placeholder-color);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.select:not(.select--disabled):hover .select__display-input {
|
|
139
|
-
color: var(--cx-input-color-hover);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.select:not(.select--disabled):hover .select__combobox {
|
|
143
|
-
border-color: var(--cx-input-border-color-hover);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.select__display-input:focus {
|
|
147
|
-
outline: none;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.select__value-input {
|
|
151
|
-
position: absolute;
|
|
152
|
-
top: 0;
|
|
153
|
-
left: 0;
|
|
154
|
-
width: 100%;
|
|
155
|
-
height: 100%;
|
|
156
|
-
padding: 0;
|
|
157
|
-
margin: 0;
|
|
158
|
-
opacity: 0;
|
|
159
|
-
z-index: -1;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.select__tags {
|
|
163
|
-
display: flex;
|
|
164
|
-
align-items: center;
|
|
165
|
-
flex-wrap: wrap;
|
|
166
|
-
max-width: 100%;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.form-control--has-label .select__tags {
|
|
170
|
-
margin-top: var(--cx-spacing-x-small);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/** In multiple mode, select__tags is displayed instead of display__input
|
|
174
|
-
* Make sure select__tags have the same height as a display__input of the same size
|
|
175
|
-
*/
|
|
176
|
-
.select--small:not(.select--placeholder-visible) .select__tags {
|
|
177
|
-
min-height: var(--cx-line-height-medium);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.select--medium:not(.select--placeholder-visible) .select__tags {
|
|
181
|
-
min-height: var(--cx-line-height-medium);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.select--large:not(.select--placeholder-visible) .select__tags {
|
|
185
|
-
min-height: var(--cx-line-height-medium);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.select__tags::slotted(cx-tag) {
|
|
189
|
-
cursor: pointer !important;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.select--disabled .select__tags,
|
|
193
|
-
.select--disabled .select__tags::slotted(cx-tag) {
|
|
194
|
-
cursor: default !important;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.select__tag-wrapper {
|
|
198
|
-
line-height: 1;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
/* Standard selects */
|
|
202
|
-
.select--standard .select__combobox {
|
|
203
|
-
background-color: var(--cx-input-background-color);
|
|
204
|
-
border: solid var(--cx-input-border-width) var(--cx-input-border-color);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.select--standard.select--disabled .select__combobox {
|
|
208
|
-
background-color: var(--cx-input-background-color-disabled);
|
|
209
|
-
border-color: var(--cx-input-border-color-disabled);
|
|
210
|
-
color: var(--cx-input-color-disabled);
|
|
211
|
-
opacity: 0.5;
|
|
212
|
-
cursor: default;
|
|
213
|
-
outline: none;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
.select--standard:not(.select--disabled).select--open .select__combobox,
|
|
217
|
-
.select--standard:not(.select--disabled).select--focused .select__combobox {
|
|
218
|
-
background-color: var(--cx-input-background-color-focus);
|
|
219
|
-
border-color: var(--cx-input-border-color-focus);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
/* Filled selects */
|
|
223
|
-
.select--filled .select__combobox {
|
|
224
|
-
border: none;
|
|
225
|
-
background-color: var(--cx-input-filled-background-color);
|
|
226
|
-
color: var(--cx-input-color);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.select--filled:hover:not(.select--disabled) .select__combobox {
|
|
230
|
-
background-color: var(--cx-input-filled-background-color-hover);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.select--filled.select--disabled .select__combobox {
|
|
234
|
-
background-color: var(--cx-input-filled-background-color-disabled);
|
|
235
|
-
opacity: 0.5;
|
|
236
|
-
cursor: default;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
.select--filled:not(.select--disabled).select--open .select__combobox,
|
|
240
|
-
.select--filled:not(.select--disabled).select--focused .select__combobox {
|
|
241
|
-
background-color: var(--cx-input-filled-background-color-focus);
|
|
242
|
-
outline: var(--cx-focus-ring);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
/* Sizes */
|
|
246
|
-
.select--small .select__combobox {
|
|
247
|
-
border-radius: var(--cx-input-border-radius-small);
|
|
248
|
-
font-size: var(--cx-input-font-size-small);
|
|
249
|
-
min-height: var(--cx-input-height-small);
|
|
250
|
-
padding-block: 0;
|
|
251
|
-
padding-inline: var(--cx-input-spacing-small);
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
.form-control:not(.form-control--has-label)
|
|
255
|
-
.select--small.select--multiple
|
|
256
|
-
.select__combobox {
|
|
257
|
-
padding-block: 2px;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
.form-control:not(.form-control--has-label)
|
|
261
|
-
.select--multiple
|
|
262
|
-
.select__display-input {
|
|
263
|
-
margin-top: 0;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
.form-control:not(.form-control--has-label) .input-container {
|
|
267
|
-
justify-content: center;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.form-control:not(.form-control--has-label)
|
|
271
|
-
.input-container
|
|
272
|
-
.select__display-input {
|
|
273
|
-
margin-top: 0;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.select--small .select__clear {
|
|
277
|
-
margin-inline-start: var(--cx-input-spacing-small);
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
.select--small .select__prefix::slotted(*) {
|
|
281
|
-
margin-inline-end: var(--cx-input-spacing-small);
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
.select--small .select__tags {
|
|
285
|
-
gap: 2px;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
.select--medium .select__combobox {
|
|
289
|
-
border-radius: var(--cx-input-border-radius-medium);
|
|
290
|
-
font-size: var(--cx-input-font-size-small);
|
|
291
|
-
min-height: var(--cx-input-height-medium);
|
|
292
|
-
padding-block: 0;
|
|
293
|
-
padding-inline: var(--cx-input-spacing-medium);
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
.form-control:not(.form-control--has-label)
|
|
297
|
-
.select--medium.select--multiple
|
|
298
|
-
.select__combobox {
|
|
299
|
-
padding-block: 3px;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
.select--medium .select__clear {
|
|
303
|
-
margin-inline-start: var(--cx-input-spacing-medium);
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
.select--medium .select__prefix::slotted(*) {
|
|
307
|
-
margin-inline-end: var(--cx-input-spacing-medium);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
.select--medium .select__tags {
|
|
311
|
-
gap: 3px;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
.select--large .select__combobox {
|
|
315
|
-
border-radius: var(--cx-input-border-radius-large);
|
|
316
|
-
font-size: var(--cx-input-font-size-small);
|
|
317
|
-
min-height: var(--cx-input-height-large);
|
|
318
|
-
padding-block: 0;
|
|
319
|
-
padding-inline: var(--cx-input-spacing-large);
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
.form-control:not(.form-control--has-label)
|
|
323
|
-
.select--large.select--multiple
|
|
324
|
-
.select__combobox {
|
|
325
|
-
padding-block: 4px;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
.select--large .select__clear {
|
|
329
|
-
margin-inline-start: var(--cx-input-spacing-large);
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
.select--large .select__prefix::slotted(*) {
|
|
333
|
-
margin-inline-end: var(--cx-input-spacing-large);
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
.select--large .select__tags {
|
|
337
|
-
gap: 4px;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
/* Pills */
|
|
341
|
-
.select--pill.select--small .select__combobox {
|
|
342
|
-
border-radius: var(--cx-input-height-small);
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
.select--pill.select--medium .select__combobox {
|
|
346
|
-
border-radius: var(--cx-input-height-medium);
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
.select--pill.select--large .select__combobox {
|
|
350
|
-
border-radius: var(--cx-input-height-large);
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
/* Prefix */
|
|
354
|
-
.select__prefix {
|
|
355
|
-
flex: 0;
|
|
356
|
-
display: inline-flex;
|
|
357
|
-
align-items: center;
|
|
358
|
-
color: var(--cx-input-placeholder-color);
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
/* Suffix */
|
|
362
|
-
.select__suffix {
|
|
363
|
-
flex: 0;
|
|
364
|
-
display: inline-flex;
|
|
365
|
-
align-items: center;
|
|
366
|
-
color: var(--cx-input-placeholder-color);
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
/* Clear button */
|
|
370
|
-
.select__clear {
|
|
371
|
-
display: inline-flex;
|
|
372
|
-
align-items: center;
|
|
373
|
-
justify-content: center;
|
|
374
|
-
font-size: inherit;
|
|
375
|
-
color: var(--cx-input-icon-color);
|
|
376
|
-
border: none;
|
|
377
|
-
background: none;
|
|
378
|
-
padding: 0;
|
|
379
|
-
transition: var(--cx-transition-fast) color;
|
|
380
|
-
cursor: pointer;
|
|
381
|
-
z-index: 1;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
.select__clear:hover {
|
|
385
|
-
color: var(--cx-input-icon-color-hover);
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
.select__clear:focus {
|
|
389
|
-
outline: none;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
/* Expand icon */
|
|
393
|
-
.select__expand-icon {
|
|
394
|
-
flex: 0 0 auto;
|
|
395
|
-
display: flex;
|
|
396
|
-
align-items: center;
|
|
397
|
-
transition: var(--cx-transition-medium) rotate ease;
|
|
398
|
-
rotate: 0;
|
|
399
|
-
margin-inline-start: var(--cx-spacing-small);
|
|
400
|
-
font-size: var(--cx-font-size-large);
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
.select--open .select__expand-icon {
|
|
404
|
-
rotate: -180deg;
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
/* Listbox */
|
|
408
|
-
.select__listbox {
|
|
409
|
-
display: block;
|
|
410
|
-
position: relative;
|
|
411
|
-
font-family: var(--cx-font-sans);
|
|
412
|
-
font-size: var(--cx-font-size-medium);
|
|
413
|
-
font-weight: var(--cx-font-weight-regular);
|
|
414
|
-
box-shadow: var(--cx-shadow-large);
|
|
415
|
-
background: var(--cx-panel-background-color);
|
|
416
|
-
border: solid var(--cx-panel-border-width) var(--cx-panel-border-color);
|
|
417
|
-
border-radius: var(--cx-border-radius-large);
|
|
418
|
-
padding-block: var(--cx-spacing-x-small);
|
|
419
|
-
padding-inline: 0;
|
|
420
|
-
overflow: auto;
|
|
421
|
-
overscroll-behavior: none;
|
|
422
|
-
|
|
423
|
-
/* Make sure it adheres to the popup's auto size */
|
|
424
|
-
max-width: var(--auto-size-available-width);
|
|
425
|
-
max-height: var(--auto-size-available-height);
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
.select__listbox ::slotted(cx-divider) {
|
|
429
|
-
--spacing: var(--cx-spacing-x-small);
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
.select__listbox ::slotted(small) {
|
|
433
|
-
display: block;
|
|
434
|
-
font-size: var(--cx-font-size-small);
|
|
435
|
-
color: var(--cx-color-neutral-500);
|
|
436
|
-
padding-block: var(--cx-spacing-2x-small);
|
|
437
|
-
padding-inline: var(--cx-spacing-small);
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
.select__no-options {
|
|
441
|
-
display: block;
|
|
442
|
-
font-size: var(--cx-font-size-small);
|
|
443
|
-
color: var(--cx-color-neutral-500);
|
|
444
|
-
padding-block: var(--cx-spacing-2x-small);
|
|
445
|
-
padding-inline: var(--cx-spacing-small);
|
|
446
|
-
text-align: left;
|
|
447
|
-
cursor: default;
|
|
448
|
-
user-select: none;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
/*
|
|
452
|
-
* Adapt label to be inside select
|
|
453
|
-
*/
|
|
454
|
-
|
|
455
|
-
.input-container {
|
|
456
|
-
position: relative;
|
|
457
|
-
display: inline-flex;
|
|
458
|
-
flex-direction: column;
|
|
459
|
-
flex: 1;
|
|
460
|
-
width: 0;
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
.input-container__display-value {
|
|
464
|
-
display: flex;
|
|
465
|
-
flex-direction: row;
|
|
466
|
-
flex-wrap: wrap;
|
|
467
|
-
column-gap: var(--cx-spacing-small);
|
|
468
|
-
row-gap: var(--cx-spacing-3x-small);
|
|
469
|
-
height: 100%;
|
|
470
|
-
width: 100%;
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
/* Center label vertically + same style as input value */
|
|
474
|
-
.form-control__label {
|
|
475
|
-
position: relative;
|
|
476
|
-
-webkit-transition: transform 0.2s ease-in-out;
|
|
477
|
-
-moz-transition: transform 0.2s ease-in-out;
|
|
478
|
-
transition: transform 0.2s ease-in-out;
|
|
479
|
-
pointer-events: none;
|
|
480
|
-
width: fit-content;
|
|
481
|
-
line-height: 1; /* use line-height: 1 for easier transform calculation */
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
/* when empty with no placeholder (initial state), transform label to vertical center
|
|
485
|
-
= (input height - label height) / 2
|
|
486
|
-
*/
|
|
487
|
-
.select--small .form-control__label {
|
|
488
|
-
transform: translateY(
|
|
489
|
-
calc(
|
|
490
|
-
(
|
|
491
|
-
var(--cx-input-height-small) +
|
|
492
|
-
1.25rem - var(--cx-input-font-size-small)
|
|
493
|
-
) /
|
|
494
|
-
2
|
|
495
|
-
)
|
|
496
|
-
);
|
|
497
|
-
margin: 0;
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
.select--medium .form-control__label {
|
|
501
|
-
transform: translateY(
|
|
502
|
-
calc(
|
|
503
|
-
(
|
|
504
|
-
var(--cx-input-height-medium) / 2 +
|
|
505
|
-
1rem - var(--cx-input-font-size-medium)
|
|
506
|
-
)
|
|
507
|
-
)
|
|
508
|
-
);
|
|
509
|
-
margin: 0;
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
.select--large .form-control__label {
|
|
513
|
-
transform: translateY(
|
|
514
|
-
calc(
|
|
515
|
-
(
|
|
516
|
-
var(--cx-input-height-large) +
|
|
517
|
-
1rem - var(--cx-input-font-size-large)
|
|
518
|
-
) /
|
|
519
|
-
2
|
|
520
|
-
)
|
|
521
|
-
);
|
|
522
|
-
margin: 0;
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
/* Increase input height if there's a label */
|
|
526
|
-
.form-control--has-label .select--small {
|
|
527
|
-
min-height: calc(var(--cx-input-height-small) + 1rem);
|
|
528
|
-
}
|
|
529
|
-
.form-control--has-label .select--medium {
|
|
530
|
-
min-height: calc(var(--cx-input-height-medium) + 1rem);
|
|
531
|
-
}
|
|
532
|
-
.form-control--has-label .select--large {
|
|
533
|
-
min-height: calc(var(--cx-input-height-large) + 1rem);
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
/* When focused or not empty, transform label to top
|
|
537
|
-
Instead of 0, use var(--cx-spacing-2x-small) to have a distance from top
|
|
538
|
-
*/
|
|
539
|
-
.form-control--has-label .select--focused .form-control__label,
|
|
540
|
-
.form-control--has-label .select--placeholder-visible .form-control__label,
|
|
541
|
-
.form-control--has-label .select:not(.select--empty) .form-control__label {
|
|
542
|
-
transform: translateY(
|
|
543
|
-
calc(var(--cx-spacing-2x-small) + var(--cx-spacing-3x-small))
|
|
544
|
-
); /* distance from top */
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
/* Display options in vertical direction */
|
|
548
|
-
.select__listbox slot {
|
|
549
|
-
display: flex;
|
|
550
|
-
flex-direction: column;
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
/*
|
|
554
|
-
* Input groups support a variety of input types (e.g. inputs with tooltips, inputs as dropdown triggers, etc.).
|
|
555
|
-
* This means inputs aren't always direct descendants of the input group, thus we can't target them with the
|
|
556
|
-
* ::slotted selector. To work around this, the input group component does some magic to add these special classes to
|
|
557
|
-
* inputs and we style them here instead.
|
|
558
|
-
*/
|
|
559
|
-
|
|
560
|
-
:host(
|
|
561
|
-
[data-cx-input-group__input--first]:not(
|
|
562
|
-
[data-cx-input-group__input--last]
|
|
563
|
-
)
|
|
564
|
-
)
|
|
565
|
-
.select__combobox {
|
|
566
|
-
border-start-end-radius: 0;
|
|
567
|
-
border-end-end-radius: 0;
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
:host([data-cx-input-group__input--inner]) .select__combobox {
|
|
571
|
-
border-radius: 0;
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
:host(
|
|
575
|
-
[data-cx-input-group__input--last]:not(
|
|
576
|
-
[data-cx-input-group__input--first]
|
|
577
|
-
)
|
|
578
|
-
)
|
|
579
|
-
.select__combobox {
|
|
580
|
-
border-start-start-radius: 0;
|
|
581
|
-
border-end-start-radius: 0;
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
/* All except the first */
|
|
585
|
-
:host([data-cx-input-group__input]:not([data-cx-input-group__input--first])) {
|
|
586
|
-
margin-inline-start: calc(-1 * var(--cx-input-border-width));
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
/* Bump hovered, focused, and checked inputs up so their focus ring isn't clipped */
|
|
590
|
-
:host([data-cx-input-group__input--hover]) {
|
|
591
|
-
z-index: 1;
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
/* Focus and checked are always on top */
|
|
595
|
-
:host([data-cx-input-group__input--focus]),
|
|
596
|
-
:host([data-cx-input-group__input][checked]) {
|
|
597
|
-
z-index: 2;
|
|
598
|
-
}
|
|
599
|
-
`;
|
|
600
|
-
var H = Object.defineProperty, q = Object.getOwnPropertyDescriptor, s = (e, t, l, n) => {
|
|
601
|
-
for (var a = n > 1 ? void 0 : n ? q(t, l) : t, r = e.length - 1, c; r >= 0; r--)
|
|
602
|
-
(c = e[r]) && (a = (n ? c(t, l, a) : c(a)) || a);
|
|
603
|
-
return n && a && H(t, l, a), a;
|
|
28
|
+
const R = (t) => !(document.createElement(t.tagName).constructor === HTMLElement || customElements.get(t.tagName.toLowerCase())), W = B`:host{display:block}:host([data-user-invalid])::part(combobox){border-color:var(--cx-input-invalid-border-color)}:host([data-user-invalid]:focus-within)::part(combobox){border-color:var(--cx-input-invalid-border-color);box-shadow:var(--cx-input-invalid-shadow)}.select{vertical-align:middle;flex:auto;width:100%;display:inline-flex;position:relative}.select::part(popup){z-index:var(--cx-z-index-dropdown)}.select[data-current-placement^=top]::part(popup){transform-origin:bottom}.select[data-current-placement^=bottom]::part(popup){transform-origin:top}.select__combobox{font-family:var(--cx-input-font-family);font-weight:var(--cx-input-font-weight);letter-spacing:var(--cx-input-letter-spacing);vertical-align:middle;cursor:pointer;transition:var(--cx-transition-fast) color, var(--cx-transition-fast) border, var(--cx-transition-fast) box-shadow, var(--cx-transition-fast) background-color;flex:1;justify-content:start;align-items:center;width:20ch;min-width:0;display:flex;position:relative;overflow:hidden}.select__display-input{width:100%;font:inherit;color:var(--cx-input-color);cursor:inherit;-webkit-appearance:none;text-overflow:ellipsis;background:0 0;border:none;margin:0;padding:0;transition:padding-top .2s ease-in-out;position:relative;overflow:hidden}.select__tags+.select__display-input{padding-top:var(--cx-spacing-2x-small)}.select__display-input--small{line-height:var(--cx-line-height-small)}.select__display-input--medium{line-height:var(--cx-line-height-medium)}.select__display-input--large{line-height:var(--cx-line-height-large)}.select__display-input--hidden{visibility:hidden;height:0;padding-top:0!important}.form-control--has-label .select__display-input{padding-top:var(--cx-spacing-x-small);padding-bottom:var(--cx-spacing-2x-small)}.select__display-input::placeholder{color:var(--cx-input-placeholder-color)}.select:not(.select--disabled):hover .select__display-input{color:var(--cx-input-color-hover)}.select:not(.select--disabled):hover .select__combobox{border-color:var(--cx-input-border-color-hover)}.select__display-input:focus{outline:none}.select__value-input{opacity:0;z-index:-1;width:100%;height:100%;margin:0;padding:0;position:absolute;top:0;left:0}.select__tags{flex-wrap:wrap;align-items:center;max-width:100%;display:flex}.form-control--has-label .select__tags{margin-top:var(--cx-spacing-x-small)}.select--small:not(.select--placeholder-visible) .select__tags,.select--medium:not(.select--placeholder-visible) .select__tags,.select--large:not(.select--placeholder-visible) .select__tags{min-height:var(--cx-line-height-medium)}.select__tags::slotted(cx-tag){cursor:pointer!important}.select--disabled .select__tags,.select--disabled .select__tags::slotted(cx-tag){cursor:default!important}.select__tag-wrapper{line-height:1}.select--standard .select__combobox{background-color:var(--cx-input-background-color);border:solid var(--cx-input-border-width) var(--cx-input-border-color)}.select--standard.select--disabled .select__combobox{background-color:var(--cx-input-background-color-disabled);border-color:var(--cx-input-border-color-disabled);color:var(--cx-input-color-disabled);opacity:.5;cursor:default;outline:none}.select--standard:not(.select--disabled).select--open .select__combobox,.select--standard:not(.select--disabled).select--focused .select__combobox{background-color:var(--cx-input-background-color-focus);border-color:var(--cx-input-border-color-focus)}.select--filled .select__combobox{background-color:var(--cx-input-filled-background-color);color:var(--cx-input-color);border:none}.select--filled:hover:not(.select--disabled) .select__combobox{background-color:var(--cx-input-filled-background-color-hover)}.select--filled.select--disabled .select__combobox{background-color:var(--cx-input-filled-background-color-disabled);opacity:.5;cursor:default}.select--filled:not(.select--disabled).select--open .select__combobox,.select--filled:not(.select--disabled).select--focused .select__combobox{background-color:var(--cx-input-filled-background-color-focus);outline:var(--cx-focus-ring)}.select--small .select__combobox{border-radius:var(--cx-input-border-radius-small);font-size:var(--cx-input-font-size-small);min-height:var(--cx-input-height-small);padding-block:0;padding-inline:var(--cx-input-spacing-small)}.form-control:not(.form-control--has-label) .select--small.select--multiple .select__combobox{padding-block:2px}.form-control:not(.form-control--has-label) .select--multiple .select__display-input{margin-top:0}.form-control:not(.form-control--has-label) .input-container{justify-content:center}.form-control:not(.form-control--has-label) .input-container .select__display-input{margin-top:0}.select--small .select__clear{margin-inline-start:var(--cx-input-spacing-small)}.select--small .select__prefix::slotted(*){margin-inline-end:var(--cx-input-spacing-small)}.select--small .select__tags{gap:2px}.select--medium .select__combobox{border-radius:var(--cx-input-border-radius-medium);font-size:var(--cx-input-font-size-small);min-height:var(--cx-input-height-medium);padding-block:0;padding-inline:var(--cx-input-spacing-medium)}.form-control:not(.form-control--has-label) .select--medium.select--multiple .select__combobox{padding-block:3px}.select--medium .select__clear{margin-inline-start:var(--cx-input-spacing-medium)}.select--medium .select__prefix::slotted(*){margin-inline-end:var(--cx-input-spacing-medium)}.select--medium .select__tags{gap:3px}.select--large .select__combobox{border-radius:var(--cx-input-border-radius-large);font-size:var(--cx-input-font-size-small);min-height:var(--cx-input-height-large);padding-block:0;padding-inline:var(--cx-input-spacing-large)}.form-control:not(.form-control--has-label) .select--large.select--multiple .select__combobox{padding-block:4px}.select--large .select__clear{margin-inline-start:var(--cx-input-spacing-large)}.select--large .select__prefix::slotted(*){margin-inline-end:var(--cx-input-spacing-large)}.select--large .select__tags{gap:4px}.select--pill.select--small .select__combobox{border-radius:var(--cx-input-height-small)}.select--pill.select--medium .select__combobox{border-radius:var(--cx-input-height-medium)}.select--pill.select--large .select__combobox{border-radius:var(--cx-input-height-large)}.select__prefix,.select__suffix{color:var(--cx-input-placeholder-color);flex:0;align-items:center;display:inline-flex}.select__clear{font-size:inherit;color:var(--cx-input-icon-color);transition:var(--cx-transition-fast) color;cursor:pointer;z-index:1;background:0 0;border:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.select__clear:hover{color:var(--cx-input-icon-color-hover)}.select__clear:focus{outline:none}.select__expand-icon{transition:var(--cx-transition-medium) rotate ease;rotate:0;font-size:var(--cx-font-size-large);flex:none;align-items:center;margin-inline-start:var(--cx-spacing-small);display:flex}.select--open .select__expand-icon{rotate:-180deg}.select__listbox{font-family:var(--cx-font-sans);font-size:var(--cx-font-size-medium);font-weight:var(--cx-font-weight-regular);box-shadow:var(--cx-shadow-large);background:var(--cx-panel-background-color);border:solid var(--cx-panel-border-width) var(--cx-panel-border-color);border-radius:var(--cx-border-radius-large);padding-block:var(--cx-spacing-x-small);overscroll-behavior:none;max-width:var(--auto-size-available-width);max-height:var(--auto-size-available-height);padding-inline:0;display:block;position:relative;overflow:auto}.select__listbox ::slotted(cx-divider){--spacing:var(--cx-spacing-x-small)}.select__listbox ::slotted(small){font-size:var(--cx-font-size-small);color:var(--cx-color-neutral-500);padding-block:var(--cx-spacing-2x-small);padding-inline:var(--cx-spacing-small);display:block}.select__no-options{font-size:var(--cx-font-size-small);color:var(--cx-color-neutral-500);padding-block:var(--cx-spacing-2x-small);padding-inline:var(--cx-spacing-small);text-align:left;cursor:default;user-select:none;display:block}.input-container{flex-direction:column;flex:1;align-self:stretch;width:0;display:inline-flex;position:relative}.input-container__display-value{column-gap:var(--cx-spacing-small);row-gap:var(--cx-spacing-3x-small);flex-flow:wrap;width:100%;height:100%;display:flex}.form-control__label{pointer-events:none;width:fit-content;line-height:1;-webkit-transition:transform .2s ease-in-out;-moz-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;position:relative}.select--small .form-control__label{transform:translateY(calc(( var(--cx-input-height-small) + 1.25rem - var(--cx-input-font-size-small) ) / 2));margin:0}.select--medium .form-control__label{transform:translateY(calc(( var(--cx-input-height-medium) / 2 + 1rem - var(--cx-input-font-size-medium) )));margin:0}.select--large .form-control__label{transform:translateY(calc(( var(--cx-input-height-large) + 1rem - var(--cx-input-font-size-large) ) / 2));margin:0}.form-control--has-label .select--small{min-height:calc(var(--cx-input-height-small) + 1rem)}.form-control--has-label .select--medium{min-height:calc(var(--cx-input-height-medium) + 1rem)}.form-control--has-label .select--large{min-height:calc(var(--cx-input-height-large) + 1rem)}.form-control--has-label .select--focused .form-control__label,.form-control--has-label .select--placeholder-visible .form-control__label,.form-control--has-label .select:not(.select--empty) .form-control__label{transform:translateY(calc(var(--cx-spacing-2x-small) + var(--cx-spacing-3x-small)))}.select__listbox slot{flex-direction:column;display:flex}:host([data-cx-input-group__input--first]:not([data-cx-input-group__input--last])) .select__combobox{border-start-end-radius:0;border-end-end-radius:0}:host([data-cx-input-group__input--inner]) .select__combobox{border-radius:0}:host([data-cx-input-group__input--last]:not([data-cx-input-group__input--first])) .select__combobox{border-start-start-radius:0;border-end-start-radius:0}:host([data-cx-input-group__input]:not([data-cx-input-group__input--first])){margin-inline-start:calc(-1 * var(--cx-input-border-width))}:host([data-cx-input-group__input--hover]){z-index:1}:host([data-cx-input-group__input--focus]),:host([data-cx-input-group__input][checked]){z-index:2}`;
|
|
29
|
+
var H = Object.defineProperty, q = Object.getOwnPropertyDescriptor, o = (t, e, l, n) => {
|
|
30
|
+
for (var s = n > 1 ? void 0 : n ? q(e, l) : e, r = t.length - 1, c; r >= 0; r--)
|
|
31
|
+
(c = t[r]) && (s = (n ? c(e, l, s) : c(s)) || s);
|
|
32
|
+
return n && s && H(e, l, s), s;
|
|
604
33
|
};
|
|
605
34
|
let i = class extends S {
|
|
606
35
|
constructor() {
|
|
607
|
-
super(...arguments), this.formControlController = new
|
|
36
|
+
super(...arguments), this.formControlController = new $(this, {
|
|
608
37
|
assumeInteractionOn: ["cx-input"]
|
|
609
38
|
}), this.hasSlotController = new E(
|
|
610
39
|
this,
|
|
611
40
|
"help-text",
|
|
612
41
|
"label"
|
|
613
|
-
), this.localize = new
|
|
614
|
-
const
|
|
615
|
-
this.handleTagRemove(r,
|
|
42
|
+
), this.localize = new I(this), this.typeToSelectString = "", this.hasFocus = !1, this.displayLabel = "", this.selectedOptions = [], this.name = "", this.value = "", this.fallbackOptionValue = "", this.defaultValue = "", this.size = "medium", this.placeholder = "", this.allowFreetext = !1, this.multiple = !1, this.maxOptionsVisible = 3, this.disabled = !1, this.clearable = !1, this.open = !1, this.hoist = !1, this.noFlip = !1, this.freeWidth = !1, this.autosizePadding = 10, this.filled = !1, this.pill = !1, this.label = "", this.placement = "bottom", this.helpText = "", this.form = void 0, this.required = !1, this.useTag = !1, this.noSelectOnEnter = !1, this.noResetCurrent = !1, this.noDropdown = !1, this.loading = !1, this.getTag = (t) => {
|
|
43
|
+
const e = this.hasSlotController.test("label"), n = (this.label ? !0 : !!e) ? this.size === "large" ? "medium" : "small" : this.size, s = (r) => {
|
|
44
|
+
this.handleTagRemove(r, t);
|
|
616
45
|
};
|
|
617
|
-
return
|
|
618
|
-
<cx-tag
|
|
619
|
-
part="tag"
|
|
620
|
-
exportparts="
|
|
46
|
+
return u`<cx-tag part="tag" exportparts="
|
|
621
47
|
base:tag__base,
|
|
622
48
|
content:tag__content,
|
|
623
49
|
remove-button:tag__remove-button,
|
|
624
50
|
remove-button__base:tag__remove-button__base
|
|
625
|
-
"
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
if (!(!e || !(e instanceof d)))
|
|
638
|
-
return e.selected;
|
|
639
|
-
}, this.getOptionDisabled = (e) => {
|
|
640
|
-
if (!(!e || !(e instanceof d)))
|
|
641
|
-
return e.disabled;
|
|
642
|
-
}, this.stayOpenOnSelect = !1, this.forceOnChange = !1, this.allowDefaultMouseDown = !1, this.noOptionText = "", this.handleDocumentFocusIn = (e) => {
|
|
643
|
-
const t = e.composedPath();
|
|
644
|
-
this && !t.includes(this) && !this.stayOpenOnSelect && this.hide();
|
|
645
|
-
}, this.handleDocumentKeyDown = (e) => {
|
|
646
|
-
const t = e.target, l = t.closest(".select__clear") !== null, n = t.closest("cx-icon-button") !== null;
|
|
51
|
+
" ?pill=${this.pill} size=${n} ?removable=${this.multiple} @cx-remove=${s}><cx-line-clamp lines="1">${this.getOptionLabel(t)}</cx-line-clamp></cx-tag>`;
|
|
52
|
+
}, this.inputBehavior = "filter", this.getOptionValue = (t) => !t || !(t instanceof d) ? "" : t.value, this.getOptionLabel = (t) => !t || !(t instanceof d) ? "" : t.getTextLabel(), this.getOptionSelected = (t) => {
|
|
53
|
+
if (!(!t || !(t instanceof d)))
|
|
54
|
+
return t.selected;
|
|
55
|
+
}, this.getOptionDisabled = (t) => {
|
|
56
|
+
if (!(!t || !(t instanceof d)))
|
|
57
|
+
return t.disabled;
|
|
58
|
+
}, this.stayOpenOnSelect = !1, this.forceOnChange = !1, this.allowDefaultMouseDown = !1, this.noOptionText = "", this.handleDocumentFocusIn = (t) => {
|
|
59
|
+
const e = t.composedPath();
|
|
60
|
+
this && !e.includes(this) && !this.stayOpenOnSelect && this.hide();
|
|
61
|
+
}, this.handleDocumentKeyDown = (t) => {
|
|
62
|
+
const e = t.target, l = e.closest(".select__clear") !== null, n = e.closest("cx-icon-button") !== null;
|
|
647
63
|
if (!(l || n)) {
|
|
648
|
-
if (
|
|
649
|
-
(this.shouldShowNoOptionsMessage || this.getVisibleOptions().length > 0) &&
|
|
64
|
+
if (t.key === "Escape" && this.open && !this.closeWatcher) {
|
|
65
|
+
(this.shouldShowNoOptionsMessage || this.getVisibleOptions().length > 0) && t.stopPropagation(), t.preventDefault(), this.hide(), this.displayInput.focus({ preventScroll: !0 });
|
|
650
66
|
return;
|
|
651
67
|
}
|
|
652
|
-
if (
|
|
653
|
-
if (
|
|
68
|
+
if (t.key === "Enter") {
|
|
69
|
+
if (t.preventDefault(), t.stopImmediatePropagation(), this.emit("cx-enter", {
|
|
654
70
|
detail: {
|
|
655
71
|
value: this.displayInput.value
|
|
656
72
|
}
|
|
@@ -679,17 +95,17 @@ let i = class extends S {
|
|
|
679
95
|
}
|
|
680
96
|
return;
|
|
681
97
|
}
|
|
682
|
-
if (["ArrowUp", "ArrowDown", "Home", "End"].includes(
|
|
683
|
-
const
|
|
98
|
+
if (["ArrowUp", "ArrowDown", "Home", "End"].includes(t.key)) {
|
|
99
|
+
const s = this.getAllOptions().filter((h) => this.inputBehavior === "filter" ? !h.hidden : !0), r = this.currentOption ? s.indexOf(this.currentOption) : -1;
|
|
684
100
|
let c = Math.max(0, r);
|
|
685
|
-
if (
|
|
101
|
+
if (t.preventDefault(), !this.open && (this.show(), this.currentOption))
|
|
686
102
|
return;
|
|
687
|
-
|
|
103
|
+
t.key === "ArrowDown" ? (c = r + 1, c > s.length - 1 && (c = 0)) : t.key === "ArrowUp" ? (c = r - 1, c < 0 && (c = s.length - 1)) : t.key === "Home" ? c = 0 : t.key === "End" && (c = s.length - 1), this.setCurrentOption(s[c]);
|
|
688
104
|
}
|
|
689
105
|
}
|
|
690
|
-
}, this.handleDocumentMouseDown = (
|
|
691
|
-
const
|
|
692
|
-
this && !
|
|
106
|
+
}, this.handleDocumentMouseDown = (t) => {
|
|
107
|
+
const e = t.composedPath();
|
|
108
|
+
this && !e.includes(this) && !this.stayOpenOnSelect && this.hide();
|
|
693
109
|
};
|
|
694
110
|
}
|
|
695
111
|
/**
|
|
@@ -717,13 +133,13 @@ let i = class extends S {
|
|
|
717
133
|
* @param selected If undefined, the option will be toggled. If true, the option will be selected. If false, the option will be unselected.
|
|
718
134
|
* @returns
|
|
719
135
|
*/
|
|
720
|
-
setOptionSelected(
|
|
721
|
-
if (!(!(
|
|
722
|
-
if (
|
|
723
|
-
|
|
136
|
+
setOptionSelected(t, e) {
|
|
137
|
+
if (!(!(t instanceof d) || t.getAttribute("role") !== "option")) {
|
|
138
|
+
if (e === void 0) {
|
|
139
|
+
t.selected = !t.selected;
|
|
724
140
|
return;
|
|
725
141
|
}
|
|
726
|
-
|
|
142
|
+
t.selected = e, e && this.setCurrentOption(t);
|
|
727
143
|
}
|
|
728
144
|
}
|
|
729
145
|
/**
|
|
@@ -733,13 +149,13 @@ let i = class extends S {
|
|
|
733
149
|
* @param current If undefined, the option will be toggled. If true, the option will be set as current. If false, the option will be unset.
|
|
734
150
|
* @returns
|
|
735
151
|
*/
|
|
736
|
-
setOptionCurrent(
|
|
737
|
-
if (
|
|
738
|
-
if (
|
|
739
|
-
|
|
152
|
+
setOptionCurrent(t, e) {
|
|
153
|
+
if (t instanceof d) {
|
|
154
|
+
if (e === void 0) {
|
|
155
|
+
t.current = !t.current;
|
|
740
156
|
return;
|
|
741
157
|
}
|
|
742
|
-
|
|
158
|
+
t.current = e;
|
|
743
159
|
}
|
|
744
160
|
}
|
|
745
161
|
/**
|
|
@@ -748,15 +164,15 @@ let i = class extends S {
|
|
|
748
164
|
* @param value The current input string
|
|
749
165
|
* @returns Whether this option should be displayed
|
|
750
166
|
*/
|
|
751
|
-
filterCallback(
|
|
752
|
-
return this.getOptionLabel(
|
|
167
|
+
filterCallback(t, e) {
|
|
168
|
+
return this.getOptionLabel(t).toLowerCase().includes(e);
|
|
753
169
|
}
|
|
754
170
|
// #endregion
|
|
755
171
|
connectedCallback() {
|
|
756
172
|
super.connectedCallback(), this.stayOpenOnSelect || (this.open = !1);
|
|
757
173
|
}
|
|
758
174
|
runFirstUpdated() {
|
|
759
|
-
|
|
175
|
+
T() && (this.contentEditable = "true");
|
|
760
176
|
}
|
|
761
177
|
addOpenListeners() {
|
|
762
178
|
document.addEventListener(
|
|
@@ -793,14 +209,14 @@ let i = class extends S {
|
|
|
793
209
|
handleFocus() {
|
|
794
210
|
this.hasFocus = !0, this.displayInput.setSelectionRange(0, this.displayInput.value.length), this.emit("cx-focus"), setTimeout(() => this.displayInput.focus(), 0);
|
|
795
211
|
}
|
|
796
|
-
handleBlur(
|
|
797
|
-
const
|
|
798
|
-
|
|
212
|
+
handleBlur(t) {
|
|
213
|
+
const e = t.relatedTarget;
|
|
214
|
+
e && this.contains(e) || (this.hasFocus = !1, this.allowFreetext || (this.displayInput.value = this.displayLabel, this.typeToSelectString = ""), this.emit("cx-blur"));
|
|
799
215
|
}
|
|
800
|
-
handleInput(
|
|
801
|
-
if (!this.open && (this.show(),
|
|
216
|
+
handleInput(t) {
|
|
217
|
+
if (!this.open && (this.show(), t.data === " "))
|
|
802
218
|
return;
|
|
803
|
-
const
|
|
219
|
+
const e = t.target, l = [
|
|
804
220
|
"ArrowUp",
|
|
805
221
|
"ArrowDown",
|
|
806
222
|
"Enter",
|
|
@@ -809,8 +225,8 @@ let i = class extends S {
|
|
|
809
225
|
"Home",
|
|
810
226
|
"End"
|
|
811
227
|
];
|
|
812
|
-
if (!(
|
|
813
|
-
switch (this.typeToSelectString =
|
|
228
|
+
if (!(t.data && l.includes(t.data)))
|
|
229
|
+
switch (this.typeToSelectString = e.value.toLowerCase(), this.displayLabel = e.value, this.emit("cx-input"), this.inputBehavior) {
|
|
814
230
|
case "filter": {
|
|
815
231
|
this.filterOptionsByInput();
|
|
816
232
|
break;
|
|
@@ -819,61 +235,64 @@ let i = class extends S {
|
|
|
819
235
|
this.selectOptionByInput();
|
|
820
236
|
}
|
|
821
237
|
}
|
|
822
|
-
handleComboboxMouseDown(
|
|
823
|
-
const
|
|
238
|
+
handleComboboxMouseDown(t) {
|
|
239
|
+
const e = t.composedPath();
|
|
824
240
|
let l = !1, n = !1;
|
|
825
|
-
|
|
826
|
-
if (
|
|
241
|
+
e.forEach((s) => {
|
|
242
|
+
if (s instanceof HTMLElement && s.classList.contains("select__expand-icon")) {
|
|
827
243
|
n = !0;
|
|
828
244
|
return;
|
|
829
245
|
}
|
|
830
|
-
|
|
831
|
-
}), !(this.disabled || l) && (n || this.inputBehavior !== "filter" || !this.open
|
|
246
|
+
s instanceof HTMLElement && s.tagName.toLowerCase() === "cx-icon-button" && (l = !0);
|
|
247
|
+
}), !(this.disabled || l) && (n || this.inputBehavior !== "filter" || !this.open || !this.multiple && !this.useTag ? (this.allowDefaultMouseDown ? requestAnimationFrame(() => {
|
|
832
248
|
this.displayInput.focus({ preventScroll: !0 });
|
|
833
|
-
}) : (
|
|
249
|
+
}) : (t.preventDefault(), this.displayInput.focus({ preventScroll: !0 })), this.open = !this.open) : (t.preventDefault(), this.displayInput.focus({ preventScroll: !0 })));
|
|
834
250
|
}
|
|
835
|
-
handleComboboxKeyDown(
|
|
836
|
-
|
|
251
|
+
handleComboboxKeyDown(t) {
|
|
252
|
+
t.key !== "Tab" && ((t.key !== "Escape" || this.open && (this.shouldShowNoOptionsMessage || this.getVisibleOptions().length > 0)) && t.stopPropagation(), this.handleDocumentKeyDown(t));
|
|
837
253
|
}
|
|
838
|
-
handleClearClick(
|
|
839
|
-
|
|
254
|
+
handleClearClick(t) {
|
|
255
|
+
t.stopPropagation(), (this.value !== "" || this.displayLabel !== "") && (this.setSelectedOptions([]), this.displayInput.focus({ preventScroll: !0 }), this.typeToSelectString = "", this.displayLabel = "", this.displayInput.value = "", this.inputBehavior === "filter" && this.filterOptionsByInput(), this.updateComplete.then(() => {
|
|
840
256
|
this.emit("cx-clear"), this.emit("cx-input"), this.emit("cx-change");
|
|
841
257
|
}));
|
|
842
258
|
}
|
|
843
|
-
handleClearMouseDown(
|
|
844
|
-
|
|
259
|
+
handleClearMouseDown(t) {
|
|
260
|
+
t.stopPropagation(), t.preventDefault();
|
|
845
261
|
}
|
|
846
|
-
handleOptionClick(
|
|
847
|
-
const l =
|
|
262
|
+
handleOptionClick(t) {
|
|
263
|
+
const l = t.target.closest('[role="option"], cx-option'), n = this.value, s = t.composedPath().some(
|
|
848
264
|
(c) => c?.classList?.contains("tree-item__expand-button")
|
|
849
|
-
), r =
|
|
265
|
+
), r = t.composedPath().some(
|
|
850
266
|
(c) => c?.classList?.contains("tree-item__actions")
|
|
851
267
|
);
|
|
852
|
-
l && !this.getOptionDisabled(l) && !
|
|
268
|
+
l && !this.getOptionDisabled(l) && !s && !r && (this.multiple ? this.toggleOptionSelection(l) : this.setSelectedOptions(l), this.updateComplete.then(
|
|
853
269
|
() => this.displayInput.focus({ preventScroll: !0 })
|
|
854
270
|
), (this.value !== n || this.forceOnChange) && this.updateComplete.then(() => {
|
|
855
271
|
this.emit("cx-input"), this.emit("cx-change");
|
|
856
272
|
}), !this.multiple && !this.stayOpenOnSelect && (this.hide(), this.displayInput.focus({ preventScroll: !0 })));
|
|
857
273
|
}
|
|
858
274
|
handleDefaultSlotChange() {
|
|
859
|
-
const
|
|
860
|
-
for (const
|
|
861
|
-
const
|
|
862
|
-
if (!
|
|
275
|
+
const t = this.getAllOptions(), e = Array.isArray(this.value) ? this.value : [this.value], l = [];
|
|
276
|
+
for (const r of t) {
|
|
277
|
+
const c = this.getOptionValue(r);
|
|
278
|
+
if (!c && !(r instanceof d))
|
|
863
279
|
return;
|
|
864
|
-
l.push(
|
|
865
|
-
const
|
|
866
|
-
if (!R(
|
|
867
|
-
customElements.whenDefined(
|
|
280
|
+
l.push(c);
|
|
281
|
+
const h = r.tagName.toLowerCase();
|
|
282
|
+
if (!R(r) && !customElements.get(h)) {
|
|
283
|
+
customElements.whenDefined(h).then(() => this.handleDefaultSlotChange());
|
|
868
284
|
return;
|
|
869
285
|
}
|
|
870
286
|
}
|
|
871
|
-
|
|
872
|
-
|
|
287
|
+
t.forEach((r) => l.push(this.getOptionValue(r)));
|
|
288
|
+
const { options: n, preserveValue: s } = this.getOptionsForValue(
|
|
289
|
+
e,
|
|
290
|
+
t
|
|
873
291
|
);
|
|
292
|
+
this.setSelectedOptions(n, s ? this.value : void 0);
|
|
874
293
|
}
|
|
875
|
-
handleTagRemove(
|
|
876
|
-
|
|
294
|
+
handleTagRemove(t, e) {
|
|
295
|
+
t.stopPropagation(), this.disabled || (this.toggleOptionSelection(e, !1), this.updateComplete.then(() => {
|
|
877
296
|
this.emit("cx-input"), this.emit("cx-change");
|
|
878
297
|
}));
|
|
879
298
|
}
|
|
@@ -895,65 +314,86 @@ let i = class extends S {
|
|
|
895
314
|
* Gets an array of all visible <cx-option> elements
|
|
896
315
|
*/
|
|
897
316
|
getVisibleOptions() {
|
|
898
|
-
return this.getAllOptions().filter((
|
|
317
|
+
return this.getAllOptions().filter((t) => !t.hidden);
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Resolves selected options for the current value and applies fallback selection
|
|
321
|
+
* when unmatched values exist and `fallbackOptionValue` is configured.
|
|
322
|
+
*/
|
|
323
|
+
getOptionsForValue(t, e = this.getAllOptions()) {
|
|
324
|
+
const l = [], n = this.fallbackOptionValue ? e.find(
|
|
325
|
+
(r) => this.getOptionValue(r) === this.fallbackOptionValue
|
|
326
|
+
) : void 0;
|
|
327
|
+
let s = !1;
|
|
328
|
+
return t.forEach((r) => {
|
|
329
|
+
if (r === "")
|
|
330
|
+
return;
|
|
331
|
+
const c = e.find(
|
|
332
|
+
(h) => this.getOptionValue(h) === r
|
|
333
|
+
);
|
|
334
|
+
c ? l.push(c) : s = !0;
|
|
335
|
+
}), s && n && l.push(n), {
|
|
336
|
+
options: l,
|
|
337
|
+
preserveValue: s && !!n
|
|
338
|
+
};
|
|
899
339
|
}
|
|
900
340
|
/**
|
|
901
341
|
* Sets the current option, which is the option the user is currently interacting with (e.g. via keyboard). Only one
|
|
902
342
|
* option may be "current" at a time.
|
|
903
343
|
*/
|
|
904
|
-
setCurrentOption(
|
|
344
|
+
setCurrentOption(t) {
|
|
905
345
|
this.getAllOptions().forEach((l) => {
|
|
906
346
|
this.setOptionCurrent(l, !1), l.tabIndex = -1;
|
|
907
|
-
}),
|
|
347
|
+
}), t && (this.currentOption = t, this.setOptionCurrent(t, !0), t.tabIndex = 0, t.scrollIntoView({ block: "nearest" }));
|
|
908
348
|
}
|
|
909
349
|
/**
|
|
910
350
|
* Sets the selected option(s)
|
|
911
351
|
*/
|
|
912
|
-
setSelectedOptions(e) {
|
|
913
|
-
const
|
|
914
|
-
|
|
352
|
+
setSelectedOptions(t, e) {
|
|
353
|
+
const l = this.getAllOptions(), n = Array.isArray(t) ? t : [t];
|
|
354
|
+
l.forEach((s) => this.setOptionSelected(s, !1)), n.length && n.forEach((s) => this.setOptionSelected(s, !0)), this.selectionChanged(e);
|
|
915
355
|
}
|
|
916
356
|
/**
|
|
917
357
|
* Toggles an option's selected state
|
|
918
358
|
*/
|
|
919
|
-
toggleOptionSelection(
|
|
920
|
-
this.setOptionSelected(
|
|
359
|
+
toggleOptionSelection(t, e) {
|
|
360
|
+
this.setOptionSelected(t, e), this.selectionChanged();
|
|
921
361
|
}
|
|
922
362
|
/**
|
|
923
363
|
* This method must be called whenever the selection changes. It will update the selected options cache, the current
|
|
924
364
|
* value, and the display value
|
|
925
365
|
*/
|
|
926
|
-
selectionChanged() {
|
|
366
|
+
selectionChanged(t) {
|
|
927
367
|
this.selectedOptions = this.getAllOptions().filter(
|
|
928
368
|
(e) => this.getOptionSelected(e)
|
|
929
|
-
), this.multiple ? (this.value = this.selectedOptions.map((e) => this.getOptionValue(e)), this.displayLabel = "") : (this.value = this.getOptionValue(this.selectedOptions[0]) ?? "", this.displayLabel = this.getOptionLabel(this.selectedOptions[0]) ?? ""), this.updateComplete.then(() => {
|
|
369
|
+
), this.multiple ? (this.value = t ?? this.selectedOptions.map((e) => this.getOptionValue(e)), this.displayLabel = "") : (this.value = t ?? this.getOptionValue(this.selectedOptions[0]) ?? "", this.displayLabel = this.getOptionLabel(this.selectedOptions[0]) ?? ""), this.updateComplete.then(() => {
|
|
930
370
|
this.formControlController.updateValidity();
|
|
931
371
|
});
|
|
932
372
|
}
|
|
933
373
|
get tags() {
|
|
934
|
-
const
|
|
935
|
-
return this.selectedOptions.map((n,
|
|
936
|
-
if (
|
|
937
|
-
const r = this.getTag(n,
|
|
938
|
-
return
|
|
939
|
-
} else if (
|
|
940
|
-
return
|
|
941
|
-
+${this.selectedOptions.length -
|
|
942
|
-
|
|
943
|
-
return A;
|
|
374
|
+
const t = this.hasSlotController.test("label"), l = (this.label ? !0 : !!t) ? this.size === "large" ? "medium" : "small" : this.size;
|
|
375
|
+
return this.selectedOptions.map((n, s) => {
|
|
376
|
+
if (s < this.maxOptionsVisible || this.maxOptionsVisible <= 0) {
|
|
377
|
+
const r = this.getTag(n, s);
|
|
378
|
+
return u`${typeof r == "string" ? A(r) : r}`;
|
|
379
|
+
} else if (s === this.maxOptionsVisible)
|
|
380
|
+
return u`<cx-tag ?pill=${this.pill} size=${l}>
|
|
381
|
+
+${this.selectedOptions.length - s}</cx-tag>`;
|
|
382
|
+
return F;
|
|
944
383
|
});
|
|
945
384
|
}
|
|
946
|
-
handleInvalid(
|
|
947
|
-
this.formControlController.setValidity(!1), this.formControlController.emitInvalidEvent(
|
|
385
|
+
handleInvalid(t) {
|
|
386
|
+
this.formControlController.setValidity(!1), this.formControlController.emitInvalidEvent(t);
|
|
948
387
|
}
|
|
949
388
|
handleDisabledChange() {
|
|
950
389
|
this.disabled && (this.open = !1, this.handleOpenChange());
|
|
951
390
|
}
|
|
952
391
|
handleValueChange() {
|
|
953
|
-
const
|
|
954
|
-
|
|
955
|
-
|
|
392
|
+
const t = this.getAllOptions(), e = Array.isArray(this.value) ? this.value : [this.value], { options: l, preserveValue: n } = this.getOptionsForValue(
|
|
393
|
+
e,
|
|
394
|
+
t
|
|
956
395
|
);
|
|
396
|
+
this.setSelectedOptions(l, n ? this.value : void 0);
|
|
957
397
|
}
|
|
958
398
|
async handleNoDropdownChange() {
|
|
959
399
|
await this.updateComplete, this.noDropdown ? this.open = !1 : this.handleOpenChange();
|
|
@@ -965,30 +405,30 @@ let i = class extends S {
|
|
|
965
405
|
this.inputBehavior === "filter" && this.filterOptionsByInput(), this.noResetCurrent || this.setCurrentOption(this.selectedOptions[0] || this.getFirstOption()), this.emit("cx-show"), this.addOpenListeners(), await x(this), this.listbox.hidden = !1, this.popup.active = !0, requestAnimationFrame(() => {
|
|
966
406
|
this.currentOption && this.setCurrentOption(this.currentOption);
|
|
967
407
|
});
|
|
968
|
-
const { keyframes:
|
|
408
|
+
const { keyframes: t, options: e } = _(this, "select.show", {
|
|
969
409
|
dir: this.localize.dir()
|
|
970
410
|
});
|
|
971
|
-
await y(this.popup.popup,
|
|
411
|
+
await y(this.popup.popup, t, e), this.currentOption && V(this.currentOption, this.listbox, "vertical", "auto"), this.emit("cx-after-show");
|
|
972
412
|
} else {
|
|
973
413
|
this.emit("cx-hide"), this.removeOpenListeners(), await x(this);
|
|
974
|
-
const { keyframes:
|
|
414
|
+
const { keyframes: t, options: e } = _(this, "select.hide", {
|
|
975
415
|
dir: this.localize.dir()
|
|
976
416
|
});
|
|
977
|
-
await y(this.popup.popup,
|
|
417
|
+
await y(this.popup.popup, t, e), this.listbox.hidden = !0, this.popup.active = !1, this.emit("cx-after-hide");
|
|
978
418
|
}
|
|
979
419
|
}
|
|
980
420
|
selectOptionByInput() {
|
|
981
|
-
const
|
|
982
|
-
for (const
|
|
983
|
-
if (this.getOptionLabel(
|
|
984
|
-
this.setCurrentOption(
|
|
421
|
+
const t = this.getAllOptions();
|
|
422
|
+
for (const e of t)
|
|
423
|
+
if (this.getOptionLabel(e).toLowerCase().startsWith(this.typeToSelectString)) {
|
|
424
|
+
this.setCurrentOption(e);
|
|
985
425
|
break;
|
|
986
426
|
}
|
|
987
427
|
}
|
|
988
428
|
filterOptionsByInput() {
|
|
989
|
-
const
|
|
990
|
-
for (const
|
|
991
|
-
this.filterCallback(
|
|
429
|
+
const t = this.getAllOptions();
|
|
430
|
+
for (const e of t)
|
|
431
|
+
this.filterCallback(e, this.typeToSelectString) ? (e.hidden = !1, e.style.display = "") : (e.hidden = !0, e.style.display = "none");
|
|
992
432
|
this.popup.style.removeProperty("--auto-size-available-width"), this.popup.style.removeProperty("--auto-size-available-height");
|
|
993
433
|
}
|
|
994
434
|
/** Shows the listbox. */
|
|
@@ -1020,36 +460,27 @@ let i = class extends S {
|
|
|
1020
460
|
return this.valueInput.reportValidity();
|
|
1021
461
|
}
|
|
1022
462
|
/** Sets a custom validation message. Pass an empty string to restore validity. */
|
|
1023
|
-
setCustomValidity(
|
|
1024
|
-
this.valueInput.setCustomValidity(
|
|
463
|
+
setCustomValidity(t) {
|
|
464
|
+
this.valueInput.setCustomValidity(t), this.formControlController.updateValidity();
|
|
1025
465
|
}
|
|
1026
466
|
/** Sets focus on the control. */
|
|
1027
|
-
focus(
|
|
1028
|
-
this.displayInput.focus(
|
|
467
|
+
focus(t) {
|
|
468
|
+
this.displayInput.focus(t);
|
|
1029
469
|
}
|
|
1030
470
|
/** Removes focus from the control. */
|
|
1031
471
|
blur() {
|
|
1032
472
|
this.displayInput.blur();
|
|
1033
473
|
}
|
|
1034
474
|
render() {
|
|
1035
|
-
const
|
|
1036
|
-
return
|
|
1037
|
-
<div
|
|
1038
|
-
part="form-control"
|
|
1039
|
-
class=${b({
|
|
475
|
+
const t = this.hasSlotController.test("label"), e = this.hasSlotController.test("help-text"), l = this.label ? !0 : !!t, n = this.helpText ? !0 : !!e, s = this.clearable && !this.disabled && (this.displayLabel.length > 0 || this.selectedOptions.length > 0), r = this.placeholder && this.value.length === 0 && this.displayLabel.length === 0, c = this.value.length === 0 && this.displayLabel.length === 0 || (this.multiple || this.useTag) && this.tags.length === 0, h = (this.multiple || this.useTag) && this.selectedOptions.length > 0;
|
|
476
|
+
return u`<div part="form-control" class=${b({
|
|
1040
477
|
"form-control": !0,
|
|
1041
478
|
"form-control--has-help-text": n,
|
|
1042
479
|
"form-control--has-label": l,
|
|
1043
480
|
"form-control--large": this.size === "large",
|
|
1044
481
|
"form-control--medium": this.size === "medium",
|
|
1045
482
|
"form-control--small": this.size === "small"
|
|
1046
|
-
})}
|
|
1047
|
-
>
|
|
1048
|
-
<div part="form-control-input" class="form-control-input">
|
|
1049
|
-
<cx-popup
|
|
1050
|
-
.active=${this.open && this.stayOpenOnSelect}
|
|
1051
|
-
.syncElement=${this.syncElement}
|
|
1052
|
-
class=${b({
|
|
483
|
+
})}><div part="form-control-input" class="form-control-input"><cx-popup .active=${this.open && this.stayOpenOnSelect} .syncElement=${this.syncElement} class=${b({
|
|
1053
484
|
select: !0,
|
|
1054
485
|
"select--bottom": this.placement === "bottom",
|
|
1055
486
|
"select--disabled": this.disabled,
|
|
@@ -1065,374 +496,236 @@ let i = class extends S {
|
|
|
1065
496
|
"select--small": this.size === "small",
|
|
1066
497
|
"select--standard": !0,
|
|
1067
498
|
"select--top": this.placement === "top"
|
|
1068
|
-
})}
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
shift
|
|
1073
|
-
sync=${this.freeWidth ? void 0 : "width"}
|
|
1074
|
-
auto-size="both"
|
|
1075
|
-
auto-size-padding=${this.autosizePadding}
|
|
1076
|
-
flip-padding="10"
|
|
1077
|
-
>
|
|
1078
|
-
<div
|
|
1079
|
-
part="combobox"
|
|
1080
|
-
class="select__combobox"
|
|
1081
|
-
slot="anchor"
|
|
1082
|
-
@keydown=${this.handleComboboxKeyDown}
|
|
1083
|
-
@mousedown=${this.handleComboboxMouseDown}
|
|
1084
|
-
>
|
|
1085
|
-
<slot part="prefix" name="prefix" class="select__prefix"></slot>
|
|
1086
|
-
|
|
1087
|
-
<span class="input-container" @click=${this.handleFocus}>
|
|
1088
|
-
<label
|
|
1089
|
-
id="label"
|
|
1090
|
-
part="form-control-label"
|
|
1091
|
-
class="form-control__label"
|
|
1092
|
-
aria-hidden=${l ? "false" : "true"}
|
|
1093
|
-
>
|
|
1094
|
-
<slot name="label">${this.label}</slot>
|
|
1095
|
-
</label>
|
|
1096
|
-
${m(
|
|
1097
|
-
g,
|
|
1098
|
-
() => p`
|
|
1099
|
-
<div
|
|
1100
|
-
part="tags"
|
|
1101
|
-
class="select__tags"
|
|
1102
|
-
@cx-remove=${this.handleTagRemove}
|
|
1103
|
-
>
|
|
1104
|
-
${this.tags}
|
|
1105
|
-
</div>
|
|
1106
|
-
`
|
|
1107
|
-
)}
|
|
1108
|
-
<input
|
|
1109
|
-
part="display-input"
|
|
1110
|
-
class=${b({
|
|
499
|
+
})} placement=${this.placement} strategy=${this.hoist ? "overlay" : "absolute"} ?flip=${!this.noFlip} shift sync=${this.freeWidth ? void 0 : "width"} auto-size="both" auto-size-padding=${this.autosizePadding} flip-padding="10"><div part="combobox" class="select__combobox" slot="anchor" @keydown=${this.handleComboboxKeyDown} @mousedown=${this.handleComboboxMouseDown}><slot part="prefix" name="prefix" class="select__prefix"></slot><span class="input-container" @click=${this.handleFocus}><label id="label" part="form-control-label" class="form-control__label" aria-hidden=${l ? "false" : "true"}><slot name="label">${this.label}</slot></label>${f(
|
|
500
|
+
h,
|
|
501
|
+
() => u`<div part="tags" class="select__tags" @cx-remove=${this.handleTagRemove}>${this.tags}</div>`
|
|
502
|
+
)}<input part="display-input" class=${b({
|
|
1111
503
|
"select__display-input": !0,
|
|
1112
|
-
"select__display-input--hidden": (this.multiple || this.useTag) && !this.hasFocus && !c,
|
|
504
|
+
"select__display-input--hidden": (this.multiple || this.useTag) && !this.hasFocus && !c && !(this.open && this.inputBehavior === "filter"),
|
|
1113
505
|
"select__display-input--large": this.size === "large",
|
|
1114
506
|
"select__display-input--medium": this.size === "medium",
|
|
1115
507
|
"select__display-input--small": this.size === "small"
|
|
1116
|
-
})}
|
|
1117
|
-
type="text"
|
|
1118
|
-
placeholder=${this.placeholder}
|
|
1119
|
-
.disabled=${this.disabled}
|
|
1120
|
-
?readonly=${this.inputBehavior === "none" && !this.allowFreetext}
|
|
1121
|
-
.value=${this.displayLabel}
|
|
1122
|
-
autocomplete="off"
|
|
1123
|
-
spellcheck="false"
|
|
1124
|
-
autocapitalize="off"
|
|
1125
|
-
aria-controls="listbox"
|
|
1126
|
-
aria-expanded=${this.open ? "true" : "false"}
|
|
1127
|
-
aria-haspopup="listbox"
|
|
1128
|
-
aria-label=${l ? void 0 : this.dataset.label}
|
|
1129
|
-
aria-labelledby="label"
|
|
1130
|
-
aria-disabled=${this.disabled ? "true" : "false"}
|
|
1131
|
-
aria-describedby="help-text"
|
|
1132
|
-
role="combobox"
|
|
1133
|
-
tabindex="0"
|
|
1134
|
-
@input=${this.handleInput}
|
|
1135
|
-
@blur=${this.handleBlur}
|
|
1136
|
-
/>
|
|
1137
|
-
</span>
|
|
1138
|
-
|
|
1139
|
-
<input
|
|
1140
|
-
class="select__value-input"
|
|
1141
|
-
type="text"
|
|
1142
|
-
?disabled=${this.disabled}
|
|
1143
|
-
?required=${this.required}
|
|
1144
|
-
.value=${Array.isArray(this.value) ? this.value.join(", ") : this.value}
|
|
1145
|
-
tabindex="-1"
|
|
1146
|
-
aria-hidden="true"
|
|
1147
|
-
@focus=${this.focus}
|
|
1148
|
-
@invalid=${this.handleInvalid}
|
|
1149
|
-
/>
|
|
1150
|
-
|
|
1151
|
-
${m(
|
|
508
|
+
})} type="text" placeholder=${this.placeholder} .disabled=${this.disabled} ?readonly=${this.inputBehavior === "none" && !this.allowFreetext} .value=${this.displayLabel} autocomplete="off" spellcheck="false" autocapitalize="off" aria-controls="listbox" aria-expanded=${this.open ? "true" : "false"} aria-haspopup="listbox" aria-label=${l ? void 0 : this.dataset.label} aria-labelledby="label" aria-disabled=${this.disabled ? "true" : "false"} aria-describedby="help-text" role="combobox" tabindex="0" @input=${this.handleInput} @blur=${this.handleBlur}></span><input class="select__value-input" type="text" ?disabled=${this.disabled} ?required=${this.required} .value=${Array.isArray(this.value) ? this.value.join(", ") : this.value} tabindex="-1" aria-hidden="true" @focus=${this.focus} @invalid=${this.handleInvalid}>${f(
|
|
1152
509
|
this.loading,
|
|
1153
|
-
() =>
|
|
1154
|
-
<cx-spinner
|
|
1155
|
-
part="spinner"
|
|
1156
|
-
role="status"
|
|
1157
|
-
aria-live="polite"
|
|
1158
|
-
></cx-spinner>
|
|
1159
|
-
`
|
|
1160
|
-
)}
|
|
1161
|
-
${m(
|
|
1162
|
-
a,
|
|
1163
|
-
() => p`
|
|
1164
|
-
<button
|
|
1165
|
-
part="clear-button"
|
|
1166
|
-
class="select__clear"
|
|
1167
|
-
type="button"
|
|
1168
|
-
aria-label=${this.localize.term("clearEntry")}
|
|
1169
|
-
@mousedown=${this.handleClearMouseDown}
|
|
1170
|
-
@click=${this.handleClearClick}
|
|
1171
|
-
tabindex="-1"
|
|
1172
|
-
>
|
|
1173
|
-
<slot name="clear-icon">
|
|
1174
|
-
<cx-icon name="cancel"></cx-icon>
|
|
1175
|
-
</slot>
|
|
1176
|
-
</button>
|
|
1177
|
-
`
|
|
510
|
+
() => u`<cx-spinner part="spinner" role="status" aria-live="polite"></cx-spinner>`
|
|
1178
511
|
)}
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
name="expand-icon"
|
|
1184
|
-
part="expand-icon"
|
|
1185
|
-
class="select__expand-icon"
|
|
1186
|
-
>
|
|
1187
|
-
<cx-icon name="arrow_drop_down"></cx-icon>
|
|
1188
|
-
</slot>
|
|
1189
|
-
</div>
|
|
1190
|
-
|
|
1191
|
-
<div
|
|
1192
|
-
id="listbox"
|
|
1193
|
-
role="listbox"
|
|
1194
|
-
aria-expanded=${this.open ? "true" : "false"}
|
|
1195
|
-
aria-multiselectable=${this.multiple ? "true" : "false"}
|
|
1196
|
-
aria-labelledby="label"
|
|
1197
|
-
part="listbox"
|
|
1198
|
-
class="select__listbox"
|
|
1199
|
-
tabindex="-1"
|
|
1200
|
-
@mouseup=${this.handleOptionClick}
|
|
1201
|
-
@slotchange=${this.handleDefaultSlotChange}
|
|
1202
|
-
>
|
|
1203
|
-
<slot></slot>
|
|
1204
|
-
${m(
|
|
512
|
+
${f(
|
|
513
|
+
s,
|
|
514
|
+
() => u`<button part="clear-button" class="select__clear" type="button" aria-label=${this.localize.term("clearEntry")} @mousedown=${this.handleClearMouseDown} @click=${this.handleClearClick} tabindex="-1"><slot name="clear-icon"><cx-icon name="cancel"></cx-icon></slot></button>`
|
|
515
|
+
)}<slot name="suffix" part="suffix" class="select__suffix"></slot><slot name="expand-icon" part="expand-icon" class="select__expand-icon"><cx-icon name="arrow_drop_down"></cx-icon></slot></div><div id="listbox" role="listbox" aria-expanded=${this.open ? "true" : "false"} aria-multiselectable=${this.multiple ? "true" : "false"} aria-labelledby="label" part="listbox" class="select__listbox" tabindex="-1" @mouseup=${this.handleOptionClick} @slotchange=${this.handleDefaultSlotChange}><slot></slot>${f(
|
|
1205
516
|
this.shouldShowNoOptionsMessage,
|
|
1206
|
-
() =>
|
|
1207
|
-
|
|
1208
|
-
variant="body3"
|
|
1209
|
-
class="select__no-options"
|
|
1210
|
-
role="option"
|
|
1211
|
-
>
|
|
1212
|
-
${this.noOptionText}
|
|
1213
|
-
</cx-typography>
|
|
1214
|
-
`
|
|
1215
|
-
)}
|
|
1216
|
-
</div>
|
|
1217
|
-
</cx-popup>
|
|
1218
|
-
</div>
|
|
1219
|
-
|
|
1220
|
-
<div
|
|
1221
|
-
part="form-control-help-text"
|
|
1222
|
-
id="help-text"
|
|
1223
|
-
class="form-control__help-text"
|
|
1224
|
-
aria-hidden=${n ? "false" : "true"}
|
|
1225
|
-
>
|
|
1226
|
-
<slot name="help-text">${this.helpText}</slot>
|
|
1227
|
-
</div>
|
|
1228
|
-
</div>
|
|
1229
|
-
`;
|
|
517
|
+
() => u`<cx-typography variant="body3" class="select__no-options" role="option">${this.noOptionText}</cx-typography>`
|
|
518
|
+
)}</div></cx-popup></div><div part="form-control-help-text" id="help-text" class="form-control__help-text" aria-hidden=${n ? "false" : "true"}><slot name="help-text">${this.helpText}</slot></div></div>`;
|
|
1230
519
|
}
|
|
1231
520
|
};
|
|
1232
521
|
i.styles = [
|
|
1233
522
|
k,
|
|
1234
|
-
|
|
523
|
+
D,
|
|
1235
524
|
W
|
|
1236
525
|
];
|
|
1237
526
|
i.dependencies = {
|
|
1238
527
|
"cx-icon": P,
|
|
1239
|
-
"cx-line-clamp":
|
|
1240
|
-
"cx-popup":
|
|
1241
|
-
"cx-spinner":
|
|
528
|
+
"cx-line-clamp": w,
|
|
529
|
+
"cx-popup": U,
|
|
530
|
+
"cx-spinner": M,
|
|
1242
531
|
"cx-tag": N,
|
|
1243
532
|
"cx-typography": C
|
|
1244
533
|
};
|
|
1245
|
-
|
|
1246
|
-
|
|
534
|
+
o([
|
|
535
|
+
m(".select")
|
|
1247
536
|
], i.prototype, "popup", 2);
|
|
1248
|
-
|
|
1249
|
-
|
|
537
|
+
o([
|
|
538
|
+
m(".select__combobox")
|
|
1250
539
|
], i.prototype, "combobox", 2);
|
|
1251
|
-
|
|
1252
|
-
|
|
540
|
+
o([
|
|
541
|
+
m(".select__display-input")
|
|
1253
542
|
], i.prototype, "displayInput", 2);
|
|
1254
|
-
|
|
1255
|
-
|
|
543
|
+
o([
|
|
544
|
+
m(".select__value-input")
|
|
1256
545
|
], i.prototype, "valueInput", 2);
|
|
1257
|
-
|
|
1258
|
-
|
|
546
|
+
o([
|
|
547
|
+
m(".select__listbox")
|
|
1259
548
|
], i.prototype, "listbox", 2);
|
|
1260
|
-
|
|
1261
|
-
|
|
549
|
+
o([
|
|
550
|
+
g()
|
|
1262
551
|
], i.prototype, "hasFocus", 2);
|
|
1263
|
-
|
|
1264
|
-
|
|
552
|
+
o([
|
|
553
|
+
g()
|
|
1265
554
|
], i.prototype, "displayLabel", 2);
|
|
1266
|
-
|
|
1267
|
-
|
|
555
|
+
o([
|
|
556
|
+
g()
|
|
1268
557
|
], i.prototype, "currentOption", 2);
|
|
1269
|
-
|
|
1270
|
-
|
|
558
|
+
o([
|
|
559
|
+
g()
|
|
1271
560
|
], i.prototype, "selectedOptions", 2);
|
|
1272
|
-
|
|
1273
|
-
|
|
561
|
+
o([
|
|
562
|
+
a()
|
|
1274
563
|
], i.prototype, "name", 2);
|
|
1275
|
-
|
|
1276
|
-
|
|
564
|
+
o([
|
|
565
|
+
a({
|
|
1277
566
|
converter: {
|
|
1278
|
-
fromAttribute: (
|
|
1279
|
-
toAttribute: (
|
|
567
|
+
fromAttribute: (t) => t.split(" "),
|
|
568
|
+
toAttribute: (t) => Array.isArray(t) ? t.join(" ") : t
|
|
1280
569
|
}
|
|
1281
570
|
})
|
|
1282
571
|
], i.prototype, "value", 2);
|
|
1283
|
-
|
|
1284
|
-
|
|
572
|
+
o([
|
|
573
|
+
a({ attribute: "fallback-option-value", type: String })
|
|
574
|
+
], i.prototype, "fallbackOptionValue", 2);
|
|
575
|
+
o([
|
|
576
|
+
L()
|
|
1285
577
|
], i.prototype, "defaultValue", 2);
|
|
1286
|
-
|
|
1287
|
-
|
|
578
|
+
o([
|
|
579
|
+
a({ reflect: !0 })
|
|
1288
580
|
], i.prototype, "size", 2);
|
|
1289
|
-
|
|
1290
|
-
|
|
581
|
+
o([
|
|
582
|
+
a()
|
|
1291
583
|
], i.prototype, "placeholder", 2);
|
|
1292
|
-
|
|
1293
|
-
|
|
584
|
+
o([
|
|
585
|
+
a({ attribute: "allow-freetext", reflect: !0, type: Boolean })
|
|
1294
586
|
], i.prototype, "allowFreetext", 2);
|
|
1295
|
-
|
|
1296
|
-
|
|
587
|
+
o([
|
|
588
|
+
a({ reflect: !0, type: Boolean })
|
|
1297
589
|
], i.prototype, "multiple", 2);
|
|
1298
|
-
|
|
1299
|
-
|
|
590
|
+
o([
|
|
591
|
+
a({ attribute: "max-options-visible", type: Number })
|
|
1300
592
|
], i.prototype, "maxOptionsVisible", 2);
|
|
1301
|
-
|
|
1302
|
-
|
|
593
|
+
o([
|
|
594
|
+
a({ reflect: !0, type: Boolean })
|
|
1303
595
|
], i.prototype, "disabled", 2);
|
|
1304
|
-
|
|
1305
|
-
|
|
596
|
+
o([
|
|
597
|
+
a({ type: Boolean })
|
|
1306
598
|
], i.prototype, "clearable", 2);
|
|
1307
|
-
|
|
1308
|
-
|
|
599
|
+
o([
|
|
600
|
+
a({ reflect: !0, type: Boolean })
|
|
1309
601
|
], i.prototype, "open", 2);
|
|
1310
|
-
|
|
1311
|
-
|
|
602
|
+
o([
|
|
603
|
+
a({ type: Boolean })
|
|
1312
604
|
], i.prototype, "hoist", 2);
|
|
1313
|
-
|
|
1314
|
-
|
|
605
|
+
o([
|
|
606
|
+
a({ attribute: "no-flip", reflect: !0, type: Boolean })
|
|
1315
607
|
], i.prototype, "noFlip", 2);
|
|
1316
|
-
|
|
1317
|
-
|
|
608
|
+
o([
|
|
609
|
+
a({ attribute: "sync-element" })
|
|
1318
610
|
], i.prototype, "syncElement", 2);
|
|
1319
|
-
|
|
1320
|
-
|
|
611
|
+
o([
|
|
612
|
+
a({ attribute: "free-width", reflect: !0, type: Boolean })
|
|
1321
613
|
], i.prototype, "freeWidth", 2);
|
|
1322
|
-
|
|
1323
|
-
|
|
614
|
+
o([
|
|
615
|
+
a({ attribute: "auto-size-padding", type: Number })
|
|
1324
616
|
], i.prototype, "autosizePadding", 2);
|
|
1325
|
-
|
|
1326
|
-
|
|
617
|
+
o([
|
|
618
|
+
a({ reflect: !0, type: Boolean })
|
|
1327
619
|
], i.prototype, "filled", 2);
|
|
1328
|
-
|
|
1329
|
-
|
|
620
|
+
o([
|
|
621
|
+
a({ reflect: !0, type: Boolean })
|
|
1330
622
|
], i.prototype, "pill", 2);
|
|
1331
|
-
|
|
1332
|
-
|
|
623
|
+
o([
|
|
624
|
+
a()
|
|
1333
625
|
], i.prototype, "label", 2);
|
|
1334
|
-
|
|
1335
|
-
|
|
626
|
+
o([
|
|
627
|
+
a({ reflect: !0 })
|
|
1336
628
|
], i.prototype, "placement", 2);
|
|
1337
|
-
|
|
1338
|
-
|
|
629
|
+
o([
|
|
630
|
+
a({ attribute: "help-text" })
|
|
1339
631
|
], i.prototype, "helpText", 2);
|
|
1340
|
-
|
|
1341
|
-
|
|
632
|
+
o([
|
|
633
|
+
a({ reflect: !1 })
|
|
1342
634
|
], i.prototype, "form", 2);
|
|
1343
|
-
|
|
1344
|
-
|
|
635
|
+
o([
|
|
636
|
+
a({ reflect: !0, type: Boolean })
|
|
1345
637
|
], i.prototype, "required", 2);
|
|
1346
|
-
|
|
1347
|
-
|
|
638
|
+
o([
|
|
639
|
+
a({ attribute: "use-tag", reflect: !0, type: Boolean })
|
|
1348
640
|
], i.prototype, "useTag", 2);
|
|
1349
|
-
|
|
1350
|
-
|
|
641
|
+
o([
|
|
642
|
+
a({
|
|
1351
643
|
attribute: "no-select-on-enter",
|
|
1352
644
|
reflect: !0,
|
|
1353
645
|
type: Boolean
|
|
1354
646
|
})
|
|
1355
647
|
], i.prototype, "noSelectOnEnter", 2);
|
|
1356
|
-
|
|
1357
|
-
|
|
648
|
+
o([
|
|
649
|
+
a({
|
|
1358
650
|
attribute: "no-reset-current",
|
|
1359
651
|
reflect: !0,
|
|
1360
652
|
type: Boolean
|
|
1361
653
|
})
|
|
1362
654
|
], i.prototype, "noResetCurrent", 2);
|
|
1363
|
-
|
|
1364
|
-
|
|
655
|
+
o([
|
|
656
|
+
a({
|
|
1365
657
|
attribute: "no-dropdown",
|
|
1366
658
|
reflect: !0,
|
|
1367
659
|
type: Boolean
|
|
1368
660
|
})
|
|
1369
661
|
], i.prototype, "noDropdown", 2);
|
|
1370
|
-
|
|
1371
|
-
|
|
662
|
+
o([
|
|
663
|
+
a({
|
|
1372
664
|
attribute: "loading",
|
|
1373
665
|
reflect: !0,
|
|
1374
666
|
type: Boolean
|
|
1375
667
|
})
|
|
1376
668
|
], i.prototype, "loading", 2);
|
|
1377
|
-
|
|
1378
|
-
|
|
669
|
+
o([
|
|
670
|
+
a({ attribute: "get-tag" })
|
|
1379
671
|
], i.prototype, "getTag", 2);
|
|
1380
|
-
|
|
1381
|
-
|
|
672
|
+
o([
|
|
673
|
+
a({ attribute: "input-behavior" })
|
|
1382
674
|
], i.prototype, "inputBehavior", 2);
|
|
1383
|
-
|
|
1384
|
-
|
|
675
|
+
o([
|
|
676
|
+
a({ attribute: "get-option-value" })
|
|
1385
677
|
], i.prototype, "getOptionValue", 2);
|
|
1386
|
-
|
|
1387
|
-
|
|
678
|
+
o([
|
|
679
|
+
a({ attribute: "get-option-label" })
|
|
1388
680
|
], i.prototype, "getOptionLabel", 2);
|
|
1389
|
-
|
|
1390
|
-
|
|
681
|
+
o([
|
|
682
|
+
a({ attribute: "get-option-selected" })
|
|
1391
683
|
], i.prototype, "getOptionSelected", 2);
|
|
1392
|
-
|
|
1393
|
-
|
|
684
|
+
o([
|
|
685
|
+
a({ attribute: "get-option-disabled" })
|
|
1394
686
|
], i.prototype, "getOptionDisabled", 2);
|
|
1395
|
-
|
|
1396
|
-
|
|
687
|
+
o([
|
|
688
|
+
a({ attribute: "stay-open-on-select", type: Boolean })
|
|
1397
689
|
], i.prototype, "stayOpenOnSelect", 2);
|
|
1398
|
-
|
|
1399
|
-
|
|
690
|
+
o([
|
|
691
|
+
a({ attribute: "force-on-change", type: Boolean })
|
|
1400
692
|
], i.prototype, "forceOnChange", 2);
|
|
1401
|
-
|
|
1402
|
-
|
|
693
|
+
o([
|
|
694
|
+
a({ attribute: "allow-default-mouse-down", type: Boolean })
|
|
1403
695
|
], i.prototype, "allowDefaultMouseDown", 2);
|
|
1404
|
-
|
|
1405
|
-
|
|
696
|
+
o([
|
|
697
|
+
a({ attribute: "no-option-text", type: String })
|
|
1406
698
|
], i.prototype, "noOptionText", 2);
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
699
|
+
o([
|
|
700
|
+
p("getOptionValue", { waitUntilFirstUpdate: !0 }),
|
|
701
|
+
p("getOptionLabel", { waitUntilFirstUpdate: !0 }),
|
|
702
|
+
p("getOptionSelected", { waitUntilFirstUpdate: !0 }),
|
|
703
|
+
p("getOptionDisabled", { waitUntilFirstUpdate: !0 }),
|
|
704
|
+
p("fallbackOptionValue", { waitUntilFirstUpdate: !0 })
|
|
1412
705
|
], i.prototype, "handleDefaultSlotChange", 1);
|
|
1413
|
-
|
|
1414
|
-
|
|
706
|
+
o([
|
|
707
|
+
p("disabled", { waitUntilFirstUpdate: !0 })
|
|
1415
708
|
], i.prototype, "handleDisabledChange", 1);
|
|
1416
|
-
|
|
1417
|
-
|
|
709
|
+
o([
|
|
710
|
+
p("value", { waitUntilFirstUpdate: !0 })
|
|
1418
711
|
], i.prototype, "handleValueChange", 1);
|
|
1419
|
-
|
|
1420
|
-
|
|
712
|
+
o([
|
|
713
|
+
p("noDropdown", { waitUntilFirstUpdate: !0 })
|
|
1421
714
|
], i.prototype, "handleNoDropdownChange", 1);
|
|
1422
|
-
|
|
1423
|
-
|
|
715
|
+
o([
|
|
716
|
+
p("open", { waitUntilFirstUpdate: !0 })
|
|
1424
717
|
], i.prototype, "handleOpenChange", 1);
|
|
1425
|
-
i =
|
|
1426
|
-
|
|
718
|
+
i = o([
|
|
719
|
+
z("cx-select")
|
|
1427
720
|
], i);
|
|
1428
|
-
|
|
721
|
+
O("select.show", {
|
|
1429
722
|
keyframes: [
|
|
1430
723
|
{ opacity: 0, scale: 0.9 },
|
|
1431
724
|
{ opacity: 1, scale: 1 }
|
|
1432
725
|
],
|
|
1433
726
|
options: { duration: 100, easing: "ease" }
|
|
1434
727
|
});
|
|
1435
|
-
|
|
728
|
+
O("select.hide", {
|
|
1436
729
|
keyframes: [
|
|
1437
730
|
{ opacity: 1, scale: 1 },
|
|
1438
731
|
{ opacity: 0, scale: 0.9 }
|