@orangelogic/design-system 2.78.0 → 2.79.0-ci.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.BTpA5dYy.js → AxisLabelRadial.Bs1P_q_F.js} +1 -1
- package/library/chunks/{BaseColumnSeries.hIO71GLG.js → BaseColumnSeries.C7jwOxIJ.js} +1 -1
- package/library/chunks/{CandlestickSeries.w9C0GR9v.js → CandlestickSeries.CkXGtRWE.js} +2 -2
- package/library/chunks/{Circle.tOnnO-F-.js → Circle.DBa5Ok8V.js} +1 -1
- package/library/chunks/{ColumnSeries.Ckz75x1M.js → ColumnSeries.DGazbfza.js} +2 -2
- package/library/chunks/{EditableAxisLabel.CCMTJT7K.js → EditableAxisLabel.wN0t_G2B.js} +2 -2
- package/library/chunks/{EditableLabel.DPmicdjK.js → EditableLabel.BWeq6fgX.js} +1 -1
- package/library/chunks/{Gradient.BrDBLm8v.js → Gradient.CdcsPIru.js} +1 -1
- package/library/chunks/{LinearGradient.CxfXxvMw.js → LinearGradient.B1z9AGUt.js} +2 -2
- package/library/chunks/{Picture.BNASYM-P.js → Picture.YSPC0l0Q.js} +1 -1
- package/library/chunks/{Polygon.Dr-GV2hn.js → Polygon.BwMvXN2H.js} +1 -1
- package/library/chunks/{ProgressPie.4mPA6xqm.js → ProgressPie.DlCwXN17.js} +5 -5
- package/library/chunks/{RadialLabel.HfsGiN4x.js → RadialLabel.DyVOf2K8.js} +1 -1
- package/library/chunks/{Scrollbar.Bgg-RhjP.js → Scrollbar.BdZVb_Z-.js} +1 -1
- package/library/chunks/{Slice.Dm56LTKj.js → Slice.DiEswWa6.js} +1 -1
- package/library/chunks/{Slider.FKJwoPq2.js → Slider.C20No2z5.js} +1 -1
- package/library/chunks/{SpriteResizer.-qJDgug8.js → SpriteResizer.DFnmcy0h.js} +1 -1
- package/library/chunks/{Triangle.BECgi7mc.js → Triangle.BaOef7HV.js} +1 -1
- package/library/chunks/{ZoomTools.cgwuIB0e.js → ZoomTools.D5JPehoL.js} +1 -1
- package/library/chunks/{am-chart.oZVBmpnn.js → am-chart.H2jnOzFc.js} +253 -261
- package/library/chunks/{animation.DU8t6mrk.js → animation.7ifl4x2S.js} +3 -7
- package/library/chunks/{button.DS64Tr8Z.js → button.B-ktz-w4.js} +7 -40
- package/library/chunks/button.styles.CKqn956w.js +5 -0
- package/library/chunks/{color-swatch-group.C7T6-sY7.js → color-swatch-group.DvllHUil.js} +46 -216
- package/library/chunks/{color-swatch.BuUP5yG4.js → color-swatch.Bx-HOp9f.js} +18 -202
- package/library/chunks/{colorPicker.C4w_vDjh.js → colorPicker.06n6P3aK.js} +5 -5
- package/library/chunks/component.styles.CRO4Odto.js +5 -0
- package/library/chunks/confirm-popover.BbHneK19.js +121 -0
- package/library/chunks/{cropper.D1lO3pl-.js → cropper.DTokTzP9.js} +2533 -2904
- package/library/chunks/{dialog.BdXQkCKY.js → dialog.B1nzoJak.js} +40 -251
- package/library/chunks/dot-pagination.C26bQ3vy.js +204 -0
- package/library/chunks/{exporting.BdjsEGF8.js → exporting.Chnl3UWi.js} +2 -2
- package/library/chunks/file-on-demand.D_Mia7M9.js +1956 -0
- package/library/chunks/{flow.D0FqdfOy.js → flow.D2CqFQa7.js} +5 -5
- package/library/chunks/{folder-select.B2qxSKA5.js → folder-select.DOsefkAC.js} +20 -226
- package/library/chunks/form-control.styles.CaGWmeAS.js +5 -0
- package/library/chunks/{gantt.DfUM7Gvb.js → gantt.DSHD2gjO.js} +8 -8
- package/library/chunks/header.D68fIfe2.js +170 -0
- package/library/chunks/{hierarchy.5kfBCoGt.js → hierarchy.DwVsMmsP.js} +5 -5
- package/library/chunks/icon-button.BuhCp--_.js +149 -0
- package/library/chunks/iframe.BQFZQMTe.js +73 -0
- package/library/chunks/{image.DHBgKeJp.js → image.4eLWAZ3-.js} +16 -272
- package/library/chunks/{index.BkoLctE9.js → index.C9khsiad.js} +17 -17
- package/library/chunks/{json.BjaT7cyo.js → json.zyETMOw-.js} +3 -3
- package/library/chunks/{list-editor.DluUZa06.js → list-editor.DNa6ROgr.js} +45 -360
- package/library/chunks/{map.DbgNAGxD.js → map.CqM2O6LB.js} +2 -2
- package/library/chunks/option.DljDoFx4.js +123 -0
- package/library/chunks/{overlayscrollbars.XhGWx9Zk.js → overlayscrollbars.BMav4RQ4.js} +252 -958
- package/library/chunks/{pagination.g4zErKN2.js → pagination.BiRyMwhM.js} +45 -141
- package/library/chunks/{percent.DO4FjAdu.js → percent.DuQwbCCg.js} +3 -3
- package/library/chunks/{radar.Dd5fJVMg.js → radar.FpYl3UH5.js} +4 -4
- package/library/chunks/{sliceGrouper.DA3aeuJ-.js → sliceGrouper.BsE7fGMt.js} +1 -1
- package/library/chunks/{stock.BfI5MUyK.js → stock.BR-ag4Pt.js} +9 -9
- package/library/chunks/{tab-group.Dg6a82ei.js → tab-group.9HbDE1AF.js} +30 -581
- package/library/chunks/{table.CcqrVieF.js → table.B8LpbiGE.js} +192 -2133
- package/library/chunks/{timeline.BxMLjB5J.js → timeline.DkzkmgEM.js} +5 -5
- package/library/chunks/{tree.OXvhEOjS.js → tree.q7xRVYyh.js} +31 -399
- package/library/chunks/typography.DJC_UXgs.js +52 -0
- package/library/chunks/{venn.CxFupTb9.js → venn.D739bOV3.js} +1 -1
- package/library/chunks/{wc.ThQubbN2.js → wc.DzW311D-.js} +1 -1
- package/library/chunks/{xy.q6e68du3.js → xy.DCRDfTsa.js} +10 -10
- package/library/components/alert.js +9 -177
- package/library/components/am-chart.js +2 -2
- package/library/components/animated-image.js +12 -100
- package/library/components/animation.js +2 -2
- package/library/components/array-line-clamp.js +7 -88
- package/library/components/asset-link-format.js +48 -626
- package/library/components/atoms.js +17 -17
- package/library/components/avatar.js +5 -94
- package/library/components/badge.js +11 -139
- package/library/components/bicolor-picker.js +4 -23
- package/library/components/border-input-group.js +4 -25
- package/library/components/breadcrumb-item.js +24 -155
- package/library/components/breadcrumb.js +3 -21
- package/library/components/button-group.js +3 -28
- package/library/components/button.js +3 -3
- package/library/components/card.js +4 -126
- package/library/components/checkbox.js +11 -252
- package/library/components/color-picker.js +54 -725
- package/library/components/color-swatch-group.js +5 -5
- package/library/components/color-swatch.js +3 -3
- package/library/components/confirm-popover.js +5 -5
- package/library/components/copy-button.js +9 -254
- package/library/components/corner-position-input-group.js +4 -57
- package/library/components/cropper.js +2 -2
- package/library/components/details.js +6 -152
- package/library/components/dialog.js +4 -4
- package/library/components/divider.js +5 -67
- package/library/components/dot-pagination.js +2 -2
- package/library/components/dot-status.js +25 -95
- package/library/components/drawer.js +8 -239
- package/library/components/dropdown.js +47 -149
- package/library/components/dynamic-select.js +7 -72
- package/library/components/e-chart.js +6 -49
- package/library/components/element-clamp.js +5 -78
- package/library/components/file-on-demand.js +9 -9
- package/library/components/folder-select.js +3 -3
- package/library/components/format-date.js +2 -6
- package/library/components/format-time.js +2 -12
- package/library/components/grid-item.js +4 -171
- package/library/components/grid.js +5 -41
- package/library/components/header.js +2 -2
- package/library/components/icon-button.js +2 -2
- package/library/components/icon.js +8 -2448
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +7 -127
- package/library/components/image.js +2 -2
- package/library/components/include.js +2 -6
- package/library/components/input-group.js +4 -29
- package/library/components/input.js +21 -715
- package/library/components/line-clamp.js +7 -83
- package/library/components/list-editor.js +7 -7
- package/library/components/markdown.js +1 -3
- package/library/components/masonry.js +22 -221
- package/library/components/menu-item.js +9 -309
- package/library/components/menu-label.js +3 -20
- package/library/components/menu-section.js +3 -17
- package/library/components/menu.js +4 -112
- package/library/components/molecules.js +5 -5
- package/library/components/mutation-observer.js +2 -6
- package/library/components/option.js +2 -2
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +5 -16
- package/library/components/pagination.js +5 -5
- package/library/components/popup.js +204 -538
- package/library/components/position-picker.js +3 -93
- package/library/components/progress-bar.js +18 -135
- package/library/components/progress-ring.js +3 -94
- package/library/components/qr-code.js +4 -16
- package/library/components/radio-button.js +4 -24
- package/library/components/radio-card.js +7 -175
- package/library/components/radio-group.js +20 -151
- package/library/components/radio.js +13 -170
- package/library/components/range.js +120 -657
- package/library/components/rating.js +56 -236
- package/library/components/relative-time.js +2 -12
- package/library/components/resize-observer.js +3 -7
- package/library/components/select.js +225 -933
- package/library/components/shadow-input-group.js +5 -24
- package/library/components/share-option-list.js +18 -310
- package/library/components/sidebar.js +14 -220
- package/library/components/size-input-group.js +10 -75
- package/library/components/skeleton.js +7 -80
- package/library/components/space.js +6 -143
- package/library/components/spinner.js +6 -75
- package/library/components/split-panel.js +16 -123
- package/library/components/step.js +21 -272
- package/library/components/stepper-wizard.js +9 -43
- package/library/components/stepper.js +16 -33
- package/library/components/switch.js +11 -274
- package/library/components/tab-group.js +4 -4
- package/library/components/tab-panel.js +4 -31
- package/library/components/tab.js +9 -255
- package/library/components/table.js +6 -6
- package/library/components/tag.js +14 -165
- package/library/components/textarea.js +14 -363
- package/library/components/timecode.js +4 -23
- package/library/components/tooltip.js +8 -92
- package/library/components/tree-item.js +2 -2
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +18 -117
- package/library/components/types.js +777 -12001
- package/library/components/typography.js +2 -2
- package/library/components/video.js +3522 -5919
- package/library/components/visually-hidden.js +3 -15
- package/library/package.json +4 -1
- package/library/packages/atoms/src/components/pagination/pagination.d.ts +2 -1
- package/library/packages/atoms/src/components/select/select.d.ts +11 -0
- 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/List.d.ts +32 -1
- package/library/packages/types/src/table.d.ts +2 -0
- package/library/react-web-component.d.ts +7 -3
- package/package.json +4 -1
- package/library/chunks/button.styles.Dl5IQLHU.js +0 -718
- package/library/chunks/component.styles.DMSLciL5.js +0 -71
- package/library/chunks/confirm-popover.BNjRvnN0.js +0 -288
- package/library/chunks/dot-pagination.CIVxMAAS.js +0 -325
- package/library/chunks/file-on-demand.BTTdth3o.js +0 -3802
- package/library/chunks/form-control.styles.CUGhvlfT.js +0 -67
- package/library/chunks/header.m7v3M94Z.js +0 -777
- package/library/chunks/icon-button.C3eqeQl9.js +0 -683
- package/library/chunks/iframe.CNEyWhcM.js +0 -160
- package/library/chunks/option.Csqefux_.js +0 -296
- package/library/chunks/typography.oDzoLbZS.js +0 -149
|
@@ -1,639 +1,54 @@
|
|
|
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.DgwYWi0O.js";
|
|
11
|
+
import { L as I } from "../chunks/i18n.BUW7B9hr.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.DljDoFx4.js";
|
|
25
|
+
import U from "./popup.js";
|
|
26
|
+
import M from "./spinner.js";
|
|
27
27
|
import N from "./tag.js";
|
|
28
|
-
const R = (t) => !(document.createElement(t.tagName).constructor === HTMLElement || customElements.get(t.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
|
-
align-self: stretch;
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
.input-container__display-value {
|
|
465
|
-
display: flex;
|
|
466
|
-
flex-direction: row;
|
|
467
|
-
flex-wrap: wrap;
|
|
468
|
-
column-gap: var(--cx-spacing-small);
|
|
469
|
-
row-gap: var(--cx-spacing-3x-small);
|
|
470
|
-
height: 100%;
|
|
471
|
-
width: 100%;
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
/* Center label vertically + same style as input value */
|
|
475
|
-
.form-control__label {
|
|
476
|
-
position: relative;
|
|
477
|
-
-webkit-transition: transform 0.2s ease-in-out;
|
|
478
|
-
-moz-transition: transform 0.2s ease-in-out;
|
|
479
|
-
transition: transform 0.2s ease-in-out;
|
|
480
|
-
pointer-events: none;
|
|
481
|
-
width: fit-content;
|
|
482
|
-
line-height: 1; /* use line-height: 1 for easier transform calculation */
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
/* when empty with no placeholder (initial state), transform label to vertical center
|
|
486
|
-
= (input height - label height) / 2
|
|
487
|
-
*/
|
|
488
|
-
.select--small .form-control__label {
|
|
489
|
-
transform: translateY(
|
|
490
|
-
calc(
|
|
491
|
-
(
|
|
492
|
-
var(--cx-input-height-small) +
|
|
493
|
-
1.25rem - var(--cx-input-font-size-small)
|
|
494
|
-
) /
|
|
495
|
-
2
|
|
496
|
-
)
|
|
497
|
-
);
|
|
498
|
-
margin: 0;
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
.select--medium .form-control__label {
|
|
502
|
-
transform: translateY(
|
|
503
|
-
calc(
|
|
504
|
-
(
|
|
505
|
-
var(--cx-input-height-medium) / 2 +
|
|
506
|
-
1rem - var(--cx-input-font-size-medium)
|
|
507
|
-
)
|
|
508
|
-
)
|
|
509
|
-
);
|
|
510
|
-
margin: 0;
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
.select--large .form-control__label {
|
|
514
|
-
transform: translateY(
|
|
515
|
-
calc(
|
|
516
|
-
(
|
|
517
|
-
var(--cx-input-height-large) +
|
|
518
|
-
1rem - var(--cx-input-font-size-large)
|
|
519
|
-
) /
|
|
520
|
-
2
|
|
521
|
-
)
|
|
522
|
-
);
|
|
523
|
-
margin: 0;
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
/* Increase input height if there's a label */
|
|
527
|
-
.form-control--has-label .select--small {
|
|
528
|
-
min-height: calc(var(--cx-input-height-small) + 1rem);
|
|
529
|
-
}
|
|
530
|
-
.form-control--has-label .select--medium {
|
|
531
|
-
min-height: calc(var(--cx-input-height-medium) + 1rem);
|
|
532
|
-
}
|
|
533
|
-
.form-control--has-label .select--large {
|
|
534
|
-
min-height: calc(var(--cx-input-height-large) + 1rem);
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
/* When focused or not empty, transform label to top
|
|
538
|
-
Instead of 0, use var(--cx-spacing-2x-small) to have a distance from top
|
|
539
|
-
*/
|
|
540
|
-
.form-control--has-label .select--focused .form-control__label,
|
|
541
|
-
.form-control--has-label .select--placeholder-visible .form-control__label,
|
|
542
|
-
.form-control--has-label .select:not(.select--empty) .form-control__label {
|
|
543
|
-
transform: translateY(
|
|
544
|
-
calc(var(--cx-spacing-2x-small) + var(--cx-spacing-3x-small))
|
|
545
|
-
); /* distance from top */
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
/* Display options in vertical direction */
|
|
549
|
-
.select__listbox slot {
|
|
550
|
-
display: flex;
|
|
551
|
-
flex-direction: column;
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
/*
|
|
555
|
-
* Input groups support a variety of input types (e.g. inputs with tooltips, inputs as dropdown triggers, etc.).
|
|
556
|
-
* This means inputs aren't always direct descendants of the input group, thus we can't target them with the
|
|
557
|
-
* ::slotted selector. To work around this, the input group component does some magic to add these special classes to
|
|
558
|
-
* inputs and we style them here instead.
|
|
559
|
-
*/
|
|
560
|
-
|
|
561
|
-
:host(
|
|
562
|
-
[data-cx-input-group__input--first]:not(
|
|
563
|
-
[data-cx-input-group__input--last]
|
|
564
|
-
)
|
|
565
|
-
)
|
|
566
|
-
.select__combobox {
|
|
567
|
-
border-start-end-radius: 0;
|
|
568
|
-
border-end-end-radius: 0;
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
:host([data-cx-input-group__input--inner]) .select__combobox {
|
|
572
|
-
border-radius: 0;
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
:host(
|
|
576
|
-
[data-cx-input-group__input--last]:not(
|
|
577
|
-
[data-cx-input-group__input--first]
|
|
578
|
-
)
|
|
579
|
-
)
|
|
580
|
-
.select__combobox {
|
|
581
|
-
border-start-start-radius: 0;
|
|
582
|
-
border-end-start-radius: 0;
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
/* All except the first */
|
|
586
|
-
:host([data-cx-input-group__input]:not([data-cx-input-group__input--first])) {
|
|
587
|
-
margin-inline-start: calc(-1 * var(--cx-input-border-width));
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
/* Bump hovered, focused, and checked inputs up so their focus ring isn't clipped */
|
|
591
|
-
:host([data-cx-input-group__input--hover]) {
|
|
592
|
-
z-index: 1;
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
/* Focus and checked are always on top */
|
|
596
|
-
:host([data-cx-input-group__input--focus]),
|
|
597
|
-
:host([data-cx-input-group__input][checked]) {
|
|
598
|
-
z-index: 2;
|
|
599
|
-
}
|
|
600
|
-
`;
|
|
601
|
-
var H = Object.defineProperty, q = Object.getOwnPropertyDescriptor, s = (t, e, l, n) => {
|
|
602
|
-
for (var a = n > 1 ? void 0 : n ? q(e, l) : e, r = t.length - 1, c; r >= 0; r--)
|
|
603
|
-
(c = t[r]) && (a = (n ? c(e, l, a) : c(a)) || a);
|
|
604
|
-
return n && a && H(e, 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;
|
|
605
33
|
};
|
|
606
34
|
let i = class extends S {
|
|
607
35
|
constructor() {
|
|
608
|
-
super(...arguments), this.formControlController = new
|
|
36
|
+
super(...arguments), this.formControlController = new $(this, {
|
|
609
37
|
assumeInteractionOn: ["cx-input"]
|
|
610
38
|
}), this.hasSlotController = new E(
|
|
611
39
|
this,
|
|
612
40
|
"help-text",
|
|
613
41
|
"label"
|
|
614
|
-
), this.localize = new
|
|
615
|
-
const e = this.hasSlotController.test("label"), n = (this.label ? !0 : !!e) ? this.size === "large" ? "medium" : "small" : this.size,
|
|
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) => {
|
|
616
44
|
this.handleTagRemove(r, t);
|
|
617
45
|
};
|
|
618
|
-
return
|
|
619
|
-
<cx-tag
|
|
620
|
-
part="tag"
|
|
621
|
-
exportparts="
|
|
46
|
+
return u`<cx-tag part="tag" exportparts="
|
|
622
47
|
base:tag__base,
|
|
623
48
|
content:tag__content,
|
|
624
49
|
remove-button:tag__remove-button,
|
|
625
50
|
remove-button__base:tag__remove-button__base
|
|
626
|
-
"
|
|
627
|
-
?pill=${this.pill}
|
|
628
|
-
size=${n}
|
|
629
|
-
?removable=${this.multiple}
|
|
630
|
-
@cx-remove=${a}
|
|
631
|
-
>
|
|
632
|
-
<cx-line-clamp lines="1">
|
|
633
|
-
${this.getOptionLabel(t)}
|
|
634
|
-
</cx-line-clamp>
|
|
635
|
-
</cx-tag>
|
|
636
|
-
`;
|
|
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>`;
|
|
637
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) => {
|
|
638
53
|
if (!(!t || !(t instanceof d)))
|
|
639
54
|
return t.selected;
|
|
@@ -681,11 +96,11 @@ let i = class extends S {
|
|
|
681
96
|
return;
|
|
682
97
|
}
|
|
683
98
|
if (["ArrowUp", "ArrowDown", "Home", "End"].includes(t.key)) {
|
|
684
|
-
const
|
|
99
|
+
const s = this.getAllOptions().filter((h) => this.inputBehavior === "filter" ? !h.hidden : !0), r = this.currentOption ? s.indexOf(this.currentOption) : -1;
|
|
685
100
|
let c = Math.max(0, r);
|
|
686
101
|
if (t.preventDefault(), !this.open && (this.show(), this.currentOption))
|
|
687
102
|
return;
|
|
688
|
-
t.key === "ArrowDown" ? (c = r + 1, c >
|
|
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]);
|
|
689
104
|
}
|
|
690
105
|
}
|
|
691
106
|
}, this.handleDocumentMouseDown = (t) => {
|
|
@@ -757,7 +172,7 @@ let i = class extends S {
|
|
|
757
172
|
super.connectedCallback(), this.stayOpenOnSelect || (this.open = !1);
|
|
758
173
|
}
|
|
759
174
|
runFirstUpdated() {
|
|
760
|
-
|
|
175
|
+
T() && (this.contentEditable = "true");
|
|
761
176
|
}
|
|
762
177
|
addOpenListeners() {
|
|
763
178
|
document.addEventListener(
|
|
@@ -823,12 +238,12 @@ let i = class extends S {
|
|
|
823
238
|
handleComboboxMouseDown(t) {
|
|
824
239
|
const e = t.composedPath();
|
|
825
240
|
let l = !1, n = !1;
|
|
826
|
-
e.forEach((
|
|
827
|
-
if (
|
|
241
|
+
e.forEach((s) => {
|
|
242
|
+
if (s instanceof HTMLElement && s.classList.contains("select__expand-icon")) {
|
|
828
243
|
n = !0;
|
|
829
244
|
return;
|
|
830
245
|
}
|
|
831
|
-
|
|
246
|
+
s instanceof HTMLElement && s.tagName.toLowerCase() === "cx-icon-button" && (l = !0);
|
|
832
247
|
}), !(this.disabled || l) && (n || this.inputBehavior !== "filter" || !this.open || !this.multiple && !this.useTag ? (this.allowDefaultMouseDown ? requestAnimationFrame(() => {
|
|
833
248
|
this.displayInput.focus({ preventScroll: !0 });
|
|
834
249
|
}) : (t.preventDefault(), this.displayInput.focus({ preventScroll: !0 })), this.open = !this.open) : (t.preventDefault(), this.displayInput.focus({ preventScroll: !0 })));
|
|
@@ -845,12 +260,12 @@ let i = class extends S {
|
|
|
845
260
|
t.stopPropagation(), t.preventDefault();
|
|
846
261
|
}
|
|
847
262
|
handleOptionClick(t) {
|
|
848
|
-
const l = t.target.closest('[role="option"], cx-option'), n = this.value,
|
|
263
|
+
const l = t.target.closest('[role="option"], cx-option'), n = this.value, s = t.composedPath().some(
|
|
849
264
|
(c) => c?.classList?.contains("tree-item__expand-button")
|
|
850
265
|
), r = t.composedPath().some(
|
|
851
266
|
(c) => c?.classList?.contains("tree-item__actions")
|
|
852
267
|
);
|
|
853
|
-
l && !this.getOptionDisabled(l) && !
|
|
268
|
+
l && !this.getOptionDisabled(l) && !s && !r && (this.multiple ? this.toggleOptionSelection(l) : this.setSelectedOptions(l), this.updateComplete.then(
|
|
854
269
|
() => this.displayInput.focus({ preventScroll: !0 })
|
|
855
270
|
), (this.value !== n || this.forceOnChange) && this.updateComplete.then(() => {
|
|
856
271
|
this.emit("cx-input"), this.emit("cx-change");
|
|
@@ -858,20 +273,23 @@ let i = class extends S {
|
|
|
858
273
|
}
|
|
859
274
|
handleDefaultSlotChange() {
|
|
860
275
|
const t = this.getAllOptions(), e = Array.isArray(this.value) ? this.value : [this.value], l = [];
|
|
861
|
-
for (const
|
|
862
|
-
const
|
|
863
|
-
if (!
|
|
276
|
+
for (const r of t) {
|
|
277
|
+
const c = this.getOptionValue(r);
|
|
278
|
+
if (!c && !(r instanceof d))
|
|
864
279
|
return;
|
|
865
|
-
l.push(
|
|
866
|
-
const
|
|
867
|
-
if (!R(
|
|
868
|
-
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());
|
|
869
284
|
return;
|
|
870
285
|
}
|
|
871
286
|
}
|
|
872
|
-
t.forEach((
|
|
873
|
-
|
|
287
|
+
t.forEach((r) => l.push(this.getOptionValue(r)));
|
|
288
|
+
const { options: n, preserveValue: s } = this.getOptionsForValue(
|
|
289
|
+
e,
|
|
290
|
+
t
|
|
874
291
|
);
|
|
292
|
+
this.setSelectedOptions(n, s ? this.value : void 0);
|
|
875
293
|
}
|
|
876
294
|
handleTagRemove(t, e) {
|
|
877
295
|
t.stopPropagation(), this.disabled || (this.toggleOptionSelection(e, !1), this.updateComplete.then(() => {
|
|
@@ -898,6 +316,27 @@ let i = class extends S {
|
|
|
898
316
|
getVisibleOptions() {
|
|
899
317
|
return this.getAllOptions().filter((t) => !t.hidden);
|
|
900
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
|
+
};
|
|
339
|
+
}
|
|
901
340
|
/**
|
|
902
341
|
* Sets the current option, which is the option the user is currently interacting with (e.g. via keyboard). Only one
|
|
903
342
|
* option may be "current" at a time.
|
|
@@ -910,9 +349,9 @@ let i = class extends S {
|
|
|
910
349
|
/**
|
|
911
350
|
* Sets the selected option(s)
|
|
912
351
|
*/
|
|
913
|
-
setSelectedOptions(t) {
|
|
914
|
-
const
|
|
915
|
-
|
|
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);
|
|
916
355
|
}
|
|
917
356
|
/**
|
|
918
357
|
* Toggles an option's selected state
|
|
@@ -924,24 +363,23 @@ let i = class extends S {
|
|
|
924
363
|
* This method must be called whenever the selection changes. It will update the selected options cache, the current
|
|
925
364
|
* value, and the display value
|
|
926
365
|
*/
|
|
927
|
-
selectionChanged() {
|
|
366
|
+
selectionChanged(t) {
|
|
928
367
|
this.selectedOptions = this.getAllOptions().filter(
|
|
929
|
-
(
|
|
930
|
-
), this.multiple ? (this.value = this.selectedOptions.map((
|
|
368
|
+
(e) => this.getOptionSelected(e)
|
|
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(() => {
|
|
931
370
|
this.formControlController.updateValidity();
|
|
932
371
|
});
|
|
933
372
|
}
|
|
934
373
|
get tags() {
|
|
935
374
|
const t = this.hasSlotController.test("label"), l = (this.label ? !0 : !!t) ? this.size === "large" ? "medium" : "small" : this.size;
|
|
936
|
-
return this.selectedOptions.map((n,
|
|
937
|
-
if (
|
|
938
|
-
const r = this.getTag(n,
|
|
939
|
-
return
|
|
940
|
-
} else if (
|
|
941
|
-
return
|
|
942
|
-
+${this.selectedOptions.length -
|
|
943
|
-
|
|
944
|
-
return A;
|
|
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;
|
|
945
383
|
});
|
|
946
384
|
}
|
|
947
385
|
handleInvalid(t) {
|
|
@@ -951,10 +389,11 @@ let i = class extends S {
|
|
|
951
389
|
this.disabled && (this.open = !1, this.handleOpenChange());
|
|
952
390
|
}
|
|
953
391
|
handleValueChange() {
|
|
954
|
-
const t = this.getAllOptions(), e = Array.isArray(this.value) ? this.value : [this.value]
|
|
955
|
-
|
|
956
|
-
t
|
|
392
|
+
const t = this.getAllOptions(), e = Array.isArray(this.value) ? this.value : [this.value], { options: l, preserveValue: n } = this.getOptionsForValue(
|
|
393
|
+
e,
|
|
394
|
+
t
|
|
957
395
|
);
|
|
396
|
+
this.setSelectedOptions(l, n ? this.value : void 0);
|
|
958
397
|
}
|
|
959
398
|
async handleNoDropdownChange() {
|
|
960
399
|
await this.updateComplete, this.noDropdown ? this.open = !1 : this.handleOpenChange();
|
|
@@ -969,7 +408,7 @@ let i = class extends S {
|
|
|
969
408
|
const { keyframes: t, options: e } = _(this, "select.show", {
|
|
970
409
|
dir: this.localize.dir()
|
|
971
410
|
});
|
|
972
|
-
await y(this.popup.popup, t, e), this.currentOption &&
|
|
411
|
+
await y(this.popup.popup, t, e), this.currentOption && V(this.currentOption, this.listbox, "vertical", "auto"), this.emit("cx-after-show");
|
|
973
412
|
} else {
|
|
974
413
|
this.emit("cx-hide"), this.removeOpenListeners(), await x(this);
|
|
975
414
|
const { keyframes: t, options: e } = _(this, "select.hide", {
|
|
@@ -1033,24 +472,15 @@ let i = class extends S {
|
|
|
1033
472
|
this.displayInput.blur();
|
|
1034
473
|
}
|
|
1035
474
|
render() {
|
|
1036
|
-
const t = this.hasSlotController.test("label"), e = this.hasSlotController.test("help-text"), l = this.label ? !0 : !!t, n = this.helpText ? !0 : !!e,
|
|
1037
|
-
return
|
|
1038
|
-
<div
|
|
1039
|
-
part="form-control"
|
|
1040
|
-
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({
|
|
1041
477
|
"form-control": !0,
|
|
1042
478
|
"form-control--has-help-text": n,
|
|
1043
479
|
"form-control--has-label": l,
|
|
1044
480
|
"form-control--large": this.size === "large",
|
|
1045
481
|
"form-control--medium": this.size === "medium",
|
|
1046
482
|
"form-control--small": this.size === "small"
|
|
1047
|
-
})}
|
|
1048
|
-
>
|
|
1049
|
-
<div part="form-control-input" class="form-control-input">
|
|
1050
|
-
<cx-popup
|
|
1051
|
-
.active=${this.open && this.stayOpenOnSelect}
|
|
1052
|
-
.syncElement=${this.syncElement}
|
|
1053
|
-
class=${b({
|
|
483
|
+
})}><div part="form-control-input" class="form-control-input"><cx-popup .active=${this.open && this.stayOpenOnSelect} .syncElement=${this.syncElement} class=${b({
|
|
1054
484
|
select: !0,
|
|
1055
485
|
"select--bottom": this.placement === "bottom",
|
|
1056
486
|
"select--disabled": this.disabled,
|
|
@@ -1066,374 +496,236 @@ let i = class extends S {
|
|
|
1066
496
|
"select--small": this.size === "small",
|
|
1067
497
|
"select--standard": !0,
|
|
1068
498
|
"select--top": this.placement === "top"
|
|
1069
|
-
})}
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
shift
|
|
1074
|
-
sync=${this.freeWidth ? void 0 : "width"}
|
|
1075
|
-
auto-size="both"
|
|
1076
|
-
auto-size-padding=${this.autosizePadding}
|
|
1077
|
-
flip-padding="10"
|
|
1078
|
-
>
|
|
1079
|
-
<div
|
|
1080
|
-
part="combobox"
|
|
1081
|
-
class="select__combobox"
|
|
1082
|
-
slot="anchor"
|
|
1083
|
-
@keydown=${this.handleComboboxKeyDown}
|
|
1084
|
-
@mousedown=${this.handleComboboxMouseDown}
|
|
1085
|
-
>
|
|
1086
|
-
<slot part="prefix" name="prefix" class="select__prefix"></slot>
|
|
1087
|
-
|
|
1088
|
-
<span class="input-container" @click=${this.handleFocus}>
|
|
1089
|
-
<label
|
|
1090
|
-
id="label"
|
|
1091
|
-
part="form-control-label"
|
|
1092
|
-
class="form-control__label"
|
|
1093
|
-
aria-hidden=${l ? "false" : "true"}
|
|
1094
|
-
>
|
|
1095
|
-
<slot name="label">${this.label}</slot>
|
|
1096
|
-
</label>
|
|
1097
|
-
${m(
|
|
1098
|
-
g,
|
|
1099
|
-
() => p`
|
|
1100
|
-
<div
|
|
1101
|
-
part="tags"
|
|
1102
|
-
class="select__tags"
|
|
1103
|
-
@cx-remove=${this.handleTagRemove}
|
|
1104
|
-
>
|
|
1105
|
-
${this.tags}
|
|
1106
|
-
</div>
|
|
1107
|
-
`
|
|
1108
|
-
)}
|
|
1109
|
-
<input
|
|
1110
|
-
part="display-input"
|
|
1111
|
-
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({
|
|
1112
503
|
"select__display-input": !0,
|
|
1113
504
|
"select__display-input--hidden": (this.multiple || this.useTag) && !this.hasFocus && !c && !(this.open && this.inputBehavior === "filter"),
|
|
1114
505
|
"select__display-input--large": this.size === "large",
|
|
1115
506
|
"select__display-input--medium": this.size === "medium",
|
|
1116
507
|
"select__display-input--small": this.size === "small"
|
|
1117
|
-
})}
|
|
1118
|
-
type="text"
|
|
1119
|
-
placeholder=${this.placeholder}
|
|
1120
|
-
.disabled=${this.disabled}
|
|
1121
|
-
?readonly=${this.inputBehavior === "none" && !this.allowFreetext}
|
|
1122
|
-
.value=${this.displayLabel}
|
|
1123
|
-
autocomplete="off"
|
|
1124
|
-
spellcheck="false"
|
|
1125
|
-
autocapitalize="off"
|
|
1126
|
-
aria-controls="listbox"
|
|
1127
|
-
aria-expanded=${this.open ? "true" : "false"}
|
|
1128
|
-
aria-haspopup="listbox"
|
|
1129
|
-
aria-label=${l ? void 0 : this.dataset.label}
|
|
1130
|
-
aria-labelledby="label"
|
|
1131
|
-
aria-disabled=${this.disabled ? "true" : "false"}
|
|
1132
|
-
aria-describedby="help-text"
|
|
1133
|
-
role="combobox"
|
|
1134
|
-
tabindex="0"
|
|
1135
|
-
@input=${this.handleInput}
|
|
1136
|
-
@blur=${this.handleBlur}
|
|
1137
|
-
/>
|
|
1138
|
-
</span>
|
|
1139
|
-
|
|
1140
|
-
<input
|
|
1141
|
-
class="select__value-input"
|
|
1142
|
-
type="text"
|
|
1143
|
-
?disabled=${this.disabled}
|
|
1144
|
-
?required=${this.required}
|
|
1145
|
-
.value=${Array.isArray(this.value) ? this.value.join(", ") : this.value}
|
|
1146
|
-
tabindex="-1"
|
|
1147
|
-
aria-hidden="true"
|
|
1148
|
-
@focus=${this.focus}
|
|
1149
|
-
@invalid=${this.handleInvalid}
|
|
1150
|
-
/>
|
|
1151
|
-
|
|
1152
|
-
${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(
|
|
1153
509
|
this.loading,
|
|
1154
|
-
() =>
|
|
1155
|
-
<cx-spinner
|
|
1156
|
-
part="spinner"
|
|
1157
|
-
role="status"
|
|
1158
|
-
aria-live="polite"
|
|
1159
|
-
></cx-spinner>
|
|
1160
|
-
`
|
|
1161
|
-
)}
|
|
1162
|
-
${m(
|
|
1163
|
-
a,
|
|
1164
|
-
() => p`
|
|
1165
|
-
<button
|
|
1166
|
-
part="clear-button"
|
|
1167
|
-
class="select__clear"
|
|
1168
|
-
type="button"
|
|
1169
|
-
aria-label=${this.localize.term("clearEntry")}
|
|
1170
|
-
@mousedown=${this.handleClearMouseDown}
|
|
1171
|
-
@click=${this.handleClearClick}
|
|
1172
|
-
tabindex="-1"
|
|
1173
|
-
>
|
|
1174
|
-
<slot name="clear-icon">
|
|
1175
|
-
<cx-icon name="cancel"></cx-icon>
|
|
1176
|
-
</slot>
|
|
1177
|
-
</button>
|
|
1178
|
-
`
|
|
510
|
+
() => u`<cx-spinner part="spinner" role="status" aria-live="polite"></cx-spinner>`
|
|
1179
511
|
)}
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
name="expand-icon"
|
|
1185
|
-
part="expand-icon"
|
|
1186
|
-
class="select__expand-icon"
|
|
1187
|
-
>
|
|
1188
|
-
<cx-icon name="arrow_drop_down"></cx-icon>
|
|
1189
|
-
</slot>
|
|
1190
|
-
</div>
|
|
1191
|
-
|
|
1192
|
-
<div
|
|
1193
|
-
id="listbox"
|
|
1194
|
-
role="listbox"
|
|
1195
|
-
aria-expanded=${this.open ? "true" : "false"}
|
|
1196
|
-
aria-multiselectable=${this.multiple ? "true" : "false"}
|
|
1197
|
-
aria-labelledby="label"
|
|
1198
|
-
part="listbox"
|
|
1199
|
-
class="select__listbox"
|
|
1200
|
-
tabindex="-1"
|
|
1201
|
-
@mouseup=${this.handleOptionClick}
|
|
1202
|
-
@slotchange=${this.handleDefaultSlotChange}
|
|
1203
|
-
>
|
|
1204
|
-
<slot></slot>
|
|
1205
|
-
${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(
|
|
1206
516
|
this.shouldShowNoOptionsMessage,
|
|
1207
|
-
() =>
|
|
1208
|
-
|
|
1209
|
-
variant="body3"
|
|
1210
|
-
class="select__no-options"
|
|
1211
|
-
role="option"
|
|
1212
|
-
>
|
|
1213
|
-
${this.noOptionText}
|
|
1214
|
-
</cx-typography>
|
|
1215
|
-
`
|
|
1216
|
-
)}
|
|
1217
|
-
</div>
|
|
1218
|
-
</cx-popup>
|
|
1219
|
-
</div>
|
|
1220
|
-
|
|
1221
|
-
<div
|
|
1222
|
-
part="form-control-help-text"
|
|
1223
|
-
id="help-text"
|
|
1224
|
-
class="form-control__help-text"
|
|
1225
|
-
aria-hidden=${n ? "false" : "true"}
|
|
1226
|
-
>
|
|
1227
|
-
<slot name="help-text">${this.helpText}</slot>
|
|
1228
|
-
</div>
|
|
1229
|
-
</div>
|
|
1230
|
-
`;
|
|
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>`;
|
|
1231
519
|
}
|
|
1232
520
|
};
|
|
1233
521
|
i.styles = [
|
|
1234
522
|
k,
|
|
1235
|
-
|
|
523
|
+
D,
|
|
1236
524
|
W
|
|
1237
525
|
];
|
|
1238
526
|
i.dependencies = {
|
|
1239
527
|
"cx-icon": P,
|
|
1240
|
-
"cx-line-clamp":
|
|
1241
|
-
"cx-popup":
|
|
1242
|
-
"cx-spinner":
|
|
528
|
+
"cx-line-clamp": w,
|
|
529
|
+
"cx-popup": U,
|
|
530
|
+
"cx-spinner": M,
|
|
1243
531
|
"cx-tag": N,
|
|
1244
532
|
"cx-typography": C
|
|
1245
533
|
};
|
|
1246
|
-
|
|
1247
|
-
|
|
534
|
+
o([
|
|
535
|
+
m(".select")
|
|
1248
536
|
], i.prototype, "popup", 2);
|
|
1249
|
-
|
|
1250
|
-
|
|
537
|
+
o([
|
|
538
|
+
m(".select__combobox")
|
|
1251
539
|
], i.prototype, "combobox", 2);
|
|
1252
|
-
|
|
1253
|
-
|
|
540
|
+
o([
|
|
541
|
+
m(".select__display-input")
|
|
1254
542
|
], i.prototype, "displayInput", 2);
|
|
1255
|
-
|
|
1256
|
-
|
|
543
|
+
o([
|
|
544
|
+
m(".select__value-input")
|
|
1257
545
|
], i.prototype, "valueInput", 2);
|
|
1258
|
-
|
|
1259
|
-
|
|
546
|
+
o([
|
|
547
|
+
m(".select__listbox")
|
|
1260
548
|
], i.prototype, "listbox", 2);
|
|
1261
|
-
|
|
1262
|
-
|
|
549
|
+
o([
|
|
550
|
+
g()
|
|
1263
551
|
], i.prototype, "hasFocus", 2);
|
|
1264
|
-
|
|
1265
|
-
|
|
552
|
+
o([
|
|
553
|
+
g()
|
|
1266
554
|
], i.prototype, "displayLabel", 2);
|
|
1267
|
-
|
|
1268
|
-
|
|
555
|
+
o([
|
|
556
|
+
g()
|
|
1269
557
|
], i.prototype, "currentOption", 2);
|
|
1270
|
-
|
|
1271
|
-
|
|
558
|
+
o([
|
|
559
|
+
g()
|
|
1272
560
|
], i.prototype, "selectedOptions", 2);
|
|
1273
|
-
|
|
1274
|
-
|
|
561
|
+
o([
|
|
562
|
+
a()
|
|
1275
563
|
], i.prototype, "name", 2);
|
|
1276
|
-
|
|
1277
|
-
|
|
564
|
+
o([
|
|
565
|
+
a({
|
|
1278
566
|
converter: {
|
|
1279
567
|
fromAttribute: (t) => t.split(" "),
|
|
1280
568
|
toAttribute: (t) => Array.isArray(t) ? t.join(" ") : t
|
|
1281
569
|
}
|
|
1282
570
|
})
|
|
1283
571
|
], i.prototype, "value", 2);
|
|
1284
|
-
|
|
1285
|
-
|
|
572
|
+
o([
|
|
573
|
+
a({ attribute: "fallback-option-value", type: String })
|
|
574
|
+
], i.prototype, "fallbackOptionValue", 2);
|
|
575
|
+
o([
|
|
576
|
+
L()
|
|
1286
577
|
], i.prototype, "defaultValue", 2);
|
|
1287
|
-
|
|
1288
|
-
|
|
578
|
+
o([
|
|
579
|
+
a({ reflect: !0 })
|
|
1289
580
|
], i.prototype, "size", 2);
|
|
1290
|
-
|
|
1291
|
-
|
|
581
|
+
o([
|
|
582
|
+
a()
|
|
1292
583
|
], i.prototype, "placeholder", 2);
|
|
1293
|
-
|
|
1294
|
-
|
|
584
|
+
o([
|
|
585
|
+
a({ attribute: "allow-freetext", reflect: !0, type: Boolean })
|
|
1295
586
|
], i.prototype, "allowFreetext", 2);
|
|
1296
|
-
|
|
1297
|
-
|
|
587
|
+
o([
|
|
588
|
+
a({ reflect: !0, type: Boolean })
|
|
1298
589
|
], i.prototype, "multiple", 2);
|
|
1299
|
-
|
|
1300
|
-
|
|
590
|
+
o([
|
|
591
|
+
a({ attribute: "max-options-visible", type: Number })
|
|
1301
592
|
], i.prototype, "maxOptionsVisible", 2);
|
|
1302
|
-
|
|
1303
|
-
|
|
593
|
+
o([
|
|
594
|
+
a({ reflect: !0, type: Boolean })
|
|
1304
595
|
], i.prototype, "disabled", 2);
|
|
1305
|
-
|
|
1306
|
-
|
|
596
|
+
o([
|
|
597
|
+
a({ type: Boolean })
|
|
1307
598
|
], i.prototype, "clearable", 2);
|
|
1308
|
-
|
|
1309
|
-
|
|
599
|
+
o([
|
|
600
|
+
a({ reflect: !0, type: Boolean })
|
|
1310
601
|
], i.prototype, "open", 2);
|
|
1311
|
-
|
|
1312
|
-
|
|
602
|
+
o([
|
|
603
|
+
a({ type: Boolean })
|
|
1313
604
|
], i.prototype, "hoist", 2);
|
|
1314
|
-
|
|
1315
|
-
|
|
605
|
+
o([
|
|
606
|
+
a({ attribute: "no-flip", reflect: !0, type: Boolean })
|
|
1316
607
|
], i.prototype, "noFlip", 2);
|
|
1317
|
-
|
|
1318
|
-
|
|
608
|
+
o([
|
|
609
|
+
a({ attribute: "sync-element" })
|
|
1319
610
|
], i.prototype, "syncElement", 2);
|
|
1320
|
-
|
|
1321
|
-
|
|
611
|
+
o([
|
|
612
|
+
a({ attribute: "free-width", reflect: !0, type: Boolean })
|
|
1322
613
|
], i.prototype, "freeWidth", 2);
|
|
1323
|
-
|
|
1324
|
-
|
|
614
|
+
o([
|
|
615
|
+
a({ attribute: "auto-size-padding", type: Number })
|
|
1325
616
|
], i.prototype, "autosizePadding", 2);
|
|
1326
|
-
|
|
1327
|
-
|
|
617
|
+
o([
|
|
618
|
+
a({ reflect: !0, type: Boolean })
|
|
1328
619
|
], i.prototype, "filled", 2);
|
|
1329
|
-
|
|
1330
|
-
|
|
620
|
+
o([
|
|
621
|
+
a({ reflect: !0, type: Boolean })
|
|
1331
622
|
], i.prototype, "pill", 2);
|
|
1332
|
-
|
|
1333
|
-
|
|
623
|
+
o([
|
|
624
|
+
a()
|
|
1334
625
|
], i.prototype, "label", 2);
|
|
1335
|
-
|
|
1336
|
-
|
|
626
|
+
o([
|
|
627
|
+
a({ reflect: !0 })
|
|
1337
628
|
], i.prototype, "placement", 2);
|
|
1338
|
-
|
|
1339
|
-
|
|
629
|
+
o([
|
|
630
|
+
a({ attribute: "help-text" })
|
|
1340
631
|
], i.prototype, "helpText", 2);
|
|
1341
|
-
|
|
1342
|
-
|
|
632
|
+
o([
|
|
633
|
+
a({ reflect: !1 })
|
|
1343
634
|
], i.prototype, "form", 2);
|
|
1344
|
-
|
|
1345
|
-
|
|
635
|
+
o([
|
|
636
|
+
a({ reflect: !0, type: Boolean })
|
|
1346
637
|
], i.prototype, "required", 2);
|
|
1347
|
-
|
|
1348
|
-
|
|
638
|
+
o([
|
|
639
|
+
a({ attribute: "use-tag", reflect: !0, type: Boolean })
|
|
1349
640
|
], i.prototype, "useTag", 2);
|
|
1350
|
-
|
|
1351
|
-
|
|
641
|
+
o([
|
|
642
|
+
a({
|
|
1352
643
|
attribute: "no-select-on-enter",
|
|
1353
644
|
reflect: !0,
|
|
1354
645
|
type: Boolean
|
|
1355
646
|
})
|
|
1356
647
|
], i.prototype, "noSelectOnEnter", 2);
|
|
1357
|
-
|
|
1358
|
-
|
|
648
|
+
o([
|
|
649
|
+
a({
|
|
1359
650
|
attribute: "no-reset-current",
|
|
1360
651
|
reflect: !0,
|
|
1361
652
|
type: Boolean
|
|
1362
653
|
})
|
|
1363
654
|
], i.prototype, "noResetCurrent", 2);
|
|
1364
|
-
|
|
1365
|
-
|
|
655
|
+
o([
|
|
656
|
+
a({
|
|
1366
657
|
attribute: "no-dropdown",
|
|
1367
658
|
reflect: !0,
|
|
1368
659
|
type: Boolean
|
|
1369
660
|
})
|
|
1370
661
|
], i.prototype, "noDropdown", 2);
|
|
1371
|
-
|
|
1372
|
-
|
|
662
|
+
o([
|
|
663
|
+
a({
|
|
1373
664
|
attribute: "loading",
|
|
1374
665
|
reflect: !0,
|
|
1375
666
|
type: Boolean
|
|
1376
667
|
})
|
|
1377
668
|
], i.prototype, "loading", 2);
|
|
1378
|
-
|
|
1379
|
-
|
|
669
|
+
o([
|
|
670
|
+
a({ attribute: "get-tag" })
|
|
1380
671
|
], i.prototype, "getTag", 2);
|
|
1381
|
-
|
|
1382
|
-
|
|
672
|
+
o([
|
|
673
|
+
a({ attribute: "input-behavior" })
|
|
1383
674
|
], i.prototype, "inputBehavior", 2);
|
|
1384
|
-
|
|
1385
|
-
|
|
675
|
+
o([
|
|
676
|
+
a({ attribute: "get-option-value" })
|
|
1386
677
|
], i.prototype, "getOptionValue", 2);
|
|
1387
|
-
|
|
1388
|
-
|
|
678
|
+
o([
|
|
679
|
+
a({ attribute: "get-option-label" })
|
|
1389
680
|
], i.prototype, "getOptionLabel", 2);
|
|
1390
|
-
|
|
1391
|
-
|
|
681
|
+
o([
|
|
682
|
+
a({ attribute: "get-option-selected" })
|
|
1392
683
|
], i.prototype, "getOptionSelected", 2);
|
|
1393
|
-
|
|
1394
|
-
|
|
684
|
+
o([
|
|
685
|
+
a({ attribute: "get-option-disabled" })
|
|
1395
686
|
], i.prototype, "getOptionDisabled", 2);
|
|
1396
|
-
|
|
1397
|
-
|
|
687
|
+
o([
|
|
688
|
+
a({ attribute: "stay-open-on-select", type: Boolean })
|
|
1398
689
|
], i.prototype, "stayOpenOnSelect", 2);
|
|
1399
|
-
|
|
1400
|
-
|
|
690
|
+
o([
|
|
691
|
+
a({ attribute: "force-on-change", type: Boolean })
|
|
1401
692
|
], i.prototype, "forceOnChange", 2);
|
|
1402
|
-
|
|
1403
|
-
|
|
693
|
+
o([
|
|
694
|
+
a({ attribute: "allow-default-mouse-down", type: Boolean })
|
|
1404
695
|
], i.prototype, "allowDefaultMouseDown", 2);
|
|
1405
|
-
|
|
1406
|
-
|
|
696
|
+
o([
|
|
697
|
+
a({ attribute: "no-option-text", type: String })
|
|
1407
698
|
], i.prototype, "noOptionText", 2);
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
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 })
|
|
1413
705
|
], i.prototype, "handleDefaultSlotChange", 1);
|
|
1414
|
-
|
|
1415
|
-
|
|
706
|
+
o([
|
|
707
|
+
p("disabled", { waitUntilFirstUpdate: !0 })
|
|
1416
708
|
], i.prototype, "handleDisabledChange", 1);
|
|
1417
|
-
|
|
1418
|
-
|
|
709
|
+
o([
|
|
710
|
+
p("value", { waitUntilFirstUpdate: !0 })
|
|
1419
711
|
], i.prototype, "handleValueChange", 1);
|
|
1420
|
-
|
|
1421
|
-
|
|
712
|
+
o([
|
|
713
|
+
p("noDropdown", { waitUntilFirstUpdate: !0 })
|
|
1422
714
|
], i.prototype, "handleNoDropdownChange", 1);
|
|
1423
|
-
|
|
1424
|
-
|
|
715
|
+
o([
|
|
716
|
+
p("open", { waitUntilFirstUpdate: !0 })
|
|
1425
717
|
], i.prototype, "handleOpenChange", 1);
|
|
1426
|
-
i =
|
|
1427
|
-
|
|
718
|
+
i = o([
|
|
719
|
+
z("cx-select")
|
|
1428
720
|
], i);
|
|
1429
|
-
|
|
721
|
+
O("select.show", {
|
|
1430
722
|
keyframes: [
|
|
1431
723
|
{ opacity: 0, scale: 0.9 },
|
|
1432
724
|
{ opacity: 1, scale: 1 }
|
|
1433
725
|
],
|
|
1434
726
|
options: { duration: 100, easing: "ease" }
|
|
1435
727
|
});
|
|
1436
|
-
|
|
728
|
+
O("select.hide", {
|
|
1437
729
|
keyframes: [
|
|
1438
730
|
{ opacity: 1, scale: 1 },
|
|
1439
731
|
{ opacity: 0, scale: 0.9 }
|