@orangelogic/design-system 2.78.0 → 2.79.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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,19 +1,19 @@
|
|
|
1
|
-
import { C as _ } from "./button.
|
|
2
|
-
import { C as q, D as G } from "./dialog.
|
|
1
|
+
import { C as _ } from "./button.B-ktz-w4.js";
|
|
2
|
+
import { C as q, D as G } from "./dialog.B1nzoJak.js";
|
|
3
3
|
import j from "../components/grid.js";
|
|
4
4
|
import P from "../components/grid-item.js";
|
|
5
5
|
import S from "../components/input.js";
|
|
6
6
|
import R from "../components/line-clamp.js";
|
|
7
|
-
import { C as F } from "./option.
|
|
7
|
+
import { C as F } from "./option.DljDoFx4.js";
|
|
8
8
|
import B from "../components/radio.js";
|
|
9
9
|
import K from "../components/radio-group.js";
|
|
10
10
|
import U from "../components/select.js";
|
|
11
11
|
import E from "../components/space.js";
|
|
12
|
-
import { C as H, H as V } from "./table.
|
|
13
|
-
import { C as L } from "./typography.
|
|
12
|
+
import { C as H, H as V } from "./table.B8LpbiGE.js";
|
|
13
|
+
import { C as L } from "./typography.DJC_UXgs.js";
|
|
14
14
|
import { n as o, C as T } from "./lib-cortex-element.CVMmyPMC.js";
|
|
15
15
|
import W from "../components/dynamic-select.js";
|
|
16
|
-
import { c as D } from "./component.styles.
|
|
16
|
+
import { c as D } from "./component.styles.CRO4Odto.js";
|
|
17
17
|
import { c as M } from "./custom-element.L4WJXn1j.js";
|
|
18
18
|
import { d as J } from "./debounce.DaHuiSGU.js";
|
|
19
19
|
import { L as z } from "./i18n.BUW7B9hr.js";
|
|
@@ -28,8 +28,8 @@ import { o as Q } from "./map.D8heArFD.js";
|
|
|
28
28
|
import { c as b } from "./repeat.DbF2p5ae.js";
|
|
29
29
|
import { n as N } from "./when.Dr1es41R.js";
|
|
30
30
|
import { t as ee } from "./toString.CL_lYXbK.js";
|
|
31
|
-
import { C as ae } from "./icon-button.
|
|
32
|
-
import { C as te } from "./image.
|
|
31
|
+
import { C as ae } from "./icon-button.BuhCp--_.js";
|
|
32
|
+
import { C as te } from "./image.4eLWAZ3-.js";
|
|
33
33
|
import { a as ie, D as $ } from "./asset.DWZ2Lzb6.js";
|
|
34
34
|
import { a as ne } from "./index.Cpamj0jB.js";
|
|
35
35
|
import { A as v } from "./content-builder.B4Tqoc6M.js";
|
|
@@ -817,45 +817,7 @@ function pe(e) {
|
|
|
817
817
|
var a = ++de;
|
|
818
818
|
return ee(e) + a;
|
|
819
819
|
}
|
|
820
|
-
const ue = O
|
|
821
|
-
:host {
|
|
822
|
-
isolation: isolate;
|
|
823
|
-
}
|
|
824
|
-
|
|
825
|
-
.asset-picker__input[data-user-invalid] ~ .asset-picker__button::part(base) {
|
|
826
|
-
border-color: var(--cx-input-invalid-border-color);
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
.asset-picker__input[data-user-invalid]:focus-within
|
|
830
|
-
~ .asset-picker__button::part(base) {
|
|
831
|
-
border-color: var(--cx-input-invalid-border-color);
|
|
832
|
-
box-shadow: var(--cx-input-invalid-shadow);
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
.asset-picker__button-container {
|
|
836
|
-
position: relative;
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
.asset-picker__button {
|
|
840
|
-
position: relative;
|
|
841
|
-
z-index: 1;
|
|
842
|
-
}
|
|
843
|
-
|
|
844
|
-
.asset-picker__image {
|
|
845
|
-
--height: 150px;
|
|
846
|
-
--width: 200px;
|
|
847
|
-
border-radius: var(--cx-border-radius-medium);
|
|
848
|
-
}
|
|
849
|
-
|
|
850
|
-
.asset-picker__input {
|
|
851
|
-
position: absolute;
|
|
852
|
-
top: 0;
|
|
853
|
-
left: 0;
|
|
854
|
-
width: 100%;
|
|
855
|
-
height: 100%;
|
|
856
|
-
opacity: 0;
|
|
857
|
-
}
|
|
858
|
-
`;
|
|
820
|
+
const ue = O`:host{isolation:isolate}.asset-picker__input[data-user-invalid]~.asset-picker__button::part(base){border-color:var(--cx-input-invalid-border-color)}.asset-picker__input[data-user-invalid]:focus-within~.asset-picker__button::part(base){border-color:var(--cx-input-invalid-border-color);box-shadow:var(--cx-input-invalid-shadow)}.asset-picker__button-container{position:relative}.asset-picker__button{z-index:1;position:relative}.asset-picker__image{--height:150px;--width:200px;border-radius:var(--cx-border-radius-medium)}.asset-picker__input{opacity:0;width:100%;height:100%;position:absolute;top:0;left:0}`;
|
|
859
821
|
var he = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, u = (e, a, t, i) => {
|
|
860
822
|
for (var s = i > 1 ? void 0 : i ? ve(a, t) : a, d = e.length - 1, c; d >= 0; d--)
|
|
861
823
|
(c = e[d]) && (s = (i ? c(a, t, s) : c(s)) || s);
|
|
@@ -927,75 +889,29 @@ let p = class extends T {
|
|
|
927
889
|
}
|
|
928
890
|
renderAssetPreview() {
|
|
929
891
|
if (this.value && this.acceptsType(v.Image))
|
|
930
|
-
return l`<cx-image
|
|
931
|
-
part="image"
|
|
932
|
-
class="asset-picker__image"
|
|
933
|
-
src=${this.value}
|
|
934
|
-
alt=${this.name}
|
|
935
|
-
width="200px"
|
|
936
|
-
object-fit=${ne.Cover}
|
|
937
|
-
></cx-image>`;
|
|
892
|
+
return l`<cx-image part="image" class="asset-picker__image" src=${this.value} alt=${this.name} width="200px" object-fit=${ne.Cover}></cx-image>`;
|
|
938
893
|
if (this.name && this.acceptsType(v.Video))
|
|
939
|
-
return l
|
|
940
|
-
<cx-typography variant="body-2">
|
|
941
|
-
${w(this.name, 30, 11, 11)}
|
|
942
|
-
</cx-typography>
|
|
943
|
-
`;
|
|
894
|
+
return l`<cx-typography variant="body-2">${w(this.name, 30, 11, 11)}</cx-typography>`;
|
|
944
895
|
if (this.name && (this.acceptsType(v.Other) || this.acceptsType(v.All))) {
|
|
945
896
|
const e = this.name.split(",");
|
|
946
|
-
return l`<cx-typography variant="body-2"
|
|
947
|
-
${w(e[0], 30, 11, 11)}
|
|
897
|
+
return l`<cx-typography variant="body-2">${w(e[0], 30, 11, 11)}
|
|
948
898
|
${N(
|
|
949
899
|
e.length > 1,
|
|
950
900
|
() => l` ${this.localize.term("andOthers", e.length - 1)}`
|
|
951
|
-
)}
|
|
952
|
-
</cx-typography>`;
|
|
901
|
+
)}</cx-typography>`;
|
|
953
902
|
}
|
|
954
903
|
return null;
|
|
955
904
|
}
|
|
956
905
|
render() {
|
|
957
|
-
return l
|
|
958
|
-
<cx-space
|
|
959
|
-
part="base"
|
|
960
|
-
class="asset-picker"
|
|
961
|
-
spacing="2x-small"
|
|
962
|
-
direction="horizontal"
|
|
963
|
-
align-items=${this.acceptsType(v.Image) ? "flex-start" : "center"}
|
|
964
|
-
>
|
|
965
|
-
${this.renderAssetPreview()}
|
|
906
|
+
return l`<cx-space part="base" class="asset-picker" spacing="2x-small" direction="horizontal" align-items=${this.acceptsType(v.Image) ? "flex-start" : "center"}>${this.renderAssetPreview()}
|
|
966
907
|
${N(
|
|
967
908
|
!this.disabled,
|
|
968
|
-
() => l
|
|
969
|
-
<div class="asset-picker__button-container">
|
|
970
|
-
<cx-input
|
|
971
|
-
class="asset-picker__input"
|
|
972
|
-
aria-label=${this.localize.term("choose")}
|
|
973
|
-
name=${this.name}
|
|
974
|
-
value=${this.value}
|
|
975
|
-
?required=${this.required}
|
|
976
|
-
.form=${this.closest("form")}
|
|
977
|
-
></cx-input>
|
|
978
|
-
<cx-button
|
|
979
|
-
part="button"
|
|
980
|
-
class="asset-picker__button"
|
|
981
|
-
@click=${this.handleRequestAssetClick}
|
|
982
|
-
>
|
|
983
|
-
${this.localize.term("choose")}
|
|
984
|
-
</cx-button>
|
|
985
|
-
</div>
|
|
986
|
-
${N(
|
|
909
|
+
() => l`<div class="asset-picker__button-container"><cx-input class="asset-picker__input" aria-label=${this.localize.term("choose")} name=${this.name} value=${this.value} ?required=${this.required} .form=${this.closest("form")}></cx-input><cx-button part="button" class="asset-picker__button" @click=${this.handleRequestAssetClick}>${this.localize.term("choose")}</cx-button></div>${N(
|
|
987
910
|
this.value,
|
|
988
|
-
() => l`<cx-icon-button
|
|
989
|
-
label=${this.localize.term("delete")}
|
|
990
|
-
name="delete"
|
|
991
|
-
@click=${this.handleDeleteClick}
|
|
992
|
-
>
|
|
993
|
-
</cx-icon-button>`
|
|
911
|
+
() => l`<cx-icon-button label=${this.localize.term("delete")} name="delete" @click=${this.handleDeleteClick}></cx-icon-button>`
|
|
994
912
|
)}
|
|
995
913
|
`
|
|
996
|
-
)}
|
|
997
|
-
</cx-space>
|
|
998
|
-
`;
|
|
914
|
+
)}</cx-space>`;
|
|
999
915
|
}
|
|
1000
916
|
};
|
|
1001
917
|
p.styles = [D, ue];
|
|
@@ -1055,55 +971,7 @@ u([
|
|
|
1055
971
|
p = u([
|
|
1056
972
|
M("cx-asset-picker")
|
|
1057
973
|
], p);
|
|
1058
|
-
const ge = O
|
|
1059
|
-
:host {
|
|
1060
|
-
--overridden-min-height: var(--min-height, 160px);
|
|
1061
|
-
--overridden-max-height: var(--max-height, 260px);
|
|
1062
|
-
display: block;
|
|
1063
|
-
width: 100%;
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
|
-
.list-editor {
|
|
1067
|
-
width: 100%;
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
|
-
.list-editor__table {
|
|
1071
|
-
--cell-border-color: transparent;
|
|
1072
|
-
--cell-bottom-border-color: transparent;
|
|
1073
|
-
--header-font-size: var(--cx-font-size-small);
|
|
1074
|
-
--row-header-border-color: transparent;
|
|
1075
|
-
--cell-horizontal-padding: var(--cx-spacing-2x-small);
|
|
1076
|
-
--table-min-height: var(--overridden-min-height);
|
|
1077
|
-
--table-max-height: var(--overridden-max-height);
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
.list-editor__table--no-header {
|
|
1081
|
-
--cell-hover-background-color: transparent;
|
|
1082
|
-
}
|
|
1083
|
-
|
|
1084
|
-
.list-editor__item::part(expand-button) {
|
|
1085
|
-
display: none;
|
|
1086
|
-
}
|
|
1087
|
-
|
|
1088
|
-
.list-editor__item__text {
|
|
1089
|
-
--line-height: 1;
|
|
1090
|
-
}
|
|
1091
|
-
|
|
1092
|
-
.list-editor__item__text__description {
|
|
1093
|
-
color: var(--cx-color-neutral-600);
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
|
-
.list-editor__dialog {
|
|
1097
|
-
--body-spacing: 0;
|
|
1098
|
-
--header-spacing: var(--cx-spacing-small) var(--cx-spacing-large) 0;
|
|
1099
|
-
--width: 540px;
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
|
-
.list-editor__tab-group {
|
|
1103
|
-
--padding: 0;
|
|
1104
|
-
--tab-group-nav-padding: 0 var(--cx-spacing-large);
|
|
1105
|
-
}
|
|
1106
|
-
`;
|
|
974
|
+
const ge = O`:host{--overridden-min-height:var(--min-height,160px);--overridden-max-height:var(--max-height,260px);width:100%;display:block}.list-editor{width:100%}.list-editor__table{--cell-border-color:transparent;--cell-bottom-border-color:transparent;--header-font-size:var(--cx-font-size-small);--row-header-border-color:transparent;--cell-horizontal-padding:var(--cx-spacing-2x-small);--table-min-height:var(--overridden-min-height);--table-max-height:var(--overridden-max-height)}.list-editor__table--no-header{--cell-hover-background-color:transparent}.list-editor__item::part(expand-button){display:none}.list-editor__item__text{--line-height:1}.list-editor__item__text__description{color:var(--cx-color-neutral-600)}.list-editor__dialog{--body-spacing:0;--header-spacing:var(--cx-spacing-small) var(--cx-spacing-large) 0;--width:540px}.list-editor__tab-group{--padding:0;--tab-group-nav-padding:0 var(--cx-spacing-large)}`;
|
|
1107
975
|
var Ne = Object.defineProperty, be = Object.getOwnPropertyDescriptor, r = (e, a, t, i) => {
|
|
1108
976
|
for (var s = i > 1 ? void 0 : i ? be(a, t) : a, d = e.length - 1, c; d >= 0; d--)
|
|
1109
977
|
(c = e[d]) && (s = (i ? c(a, t, s) : c(s)) || s);
|
|
@@ -1262,21 +1130,7 @@ let n = class extends T {
|
|
|
1262
1130
|
${b(
|
|
1263
1131
|
this.translatableControls,
|
|
1264
1132
|
(t) => t.field,
|
|
1265
|
-
(t) => l
|
|
1266
|
-
<cx-grid
|
|
1267
|
-
columns="4"
|
|
1268
|
-
spacing="var(--cx-spacing-small)"
|
|
1269
|
-
column-spacing="0"
|
|
1270
|
-
use-flex-gap
|
|
1271
|
-
row-spacing="0"
|
|
1272
|
-
wrap="wrap"
|
|
1273
|
-
>
|
|
1274
|
-
<cx-grid-item xs="4" sm="1">
|
|
1275
|
-
<cx-typography variant="body2">${t.title}</cx-typography>
|
|
1276
|
-
</cx-grid-item>
|
|
1277
|
-
<cx-grid-item xs="4" sm="3">
|
|
1278
|
-
<cx-space direction="vertical" spacing="x-small" wrap="nowrap">
|
|
1279
|
-
${Q(this.supportedLanguages, (i) => {
|
|
1133
|
+
(t) => l`<cx-grid columns="4" spacing="var(--cx-spacing-small)" column-spacing="0" use-flex-gap row-spacing="0" wrap="wrap"><cx-grid-item xs="4" sm="1"><cx-typography variant="body2">${t.title}</cx-typography></cx-grid-item><cx-grid-item xs="4" sm="3"><cx-space direction="vertical" spacing="x-small" wrap="nowrap">${Q(this.supportedLanguages, (i) => {
|
|
1280
1134
|
const s = this.localize.languageName(i) || ce.getName(i) || i, d = (c) => {
|
|
1281
1135
|
const m = c.target.value;
|
|
1282
1136
|
this.editedItem = {
|
|
@@ -1284,43 +1138,21 @@ let n = class extends T {
|
|
|
1284
1138
|
[`${t.field}-${i}`]: m
|
|
1285
1139
|
};
|
|
1286
1140
|
};
|
|
1287
|
-
return l`
|
|
1288
|
-
|
|
1289
|
-
?disabled=${i.toLowerCase() === this.defaultLanguage?.toLowerCase()}
|
|
1290
|
-
label=${s}
|
|
1291
|
-
value=${this.editedItem?.[`${t.field}-${i}`] ?? this.editedItem?.[`${t.field}`] ?? ""}
|
|
1292
|
-
@cx-change=${d}
|
|
1293
|
-
></cx-input>
|
|
1294
|
-
`;
|
|
1295
|
-
})}
|
|
1296
|
-
</cx-space>
|
|
1297
|
-
</cx-grid-item>
|
|
1298
|
-
</cx-grid>`
|
|
1141
|
+
return l`<cx-input ?disabled=${i.toLowerCase() === this.defaultLanguage?.toLowerCase()} label=${s} value=${this.editedItem?.[`${t.field}-${i}`] ?? this.editedItem?.[`${t.field}`] ?? ""} @cx-change=${d}></cx-input>`;
|
|
1142
|
+
})}</cx-space></cx-grid-item></cx-grid>`
|
|
1299
1143
|
)}
|
|
1300
1144
|
`;
|
|
1301
1145
|
return l`<cx-space direction="vertical" wrap="nowrap">${a}</cx-space>`;
|
|
1302
1146
|
}
|
|
1303
|
-
return l
|
|
1304
|
-
<cx-grid columns="3" spacing="var(--cx-spacing-small)" wrap="wrap">
|
|
1305
|
-
${b(
|
|
1147
|
+
return l`<cx-grid columns="3" spacing="var(--cx-spacing-small)" wrap="wrap">${b(
|
|
1306
1148
|
this.sortedEntries,
|
|
1307
1149
|
([a]) => a,
|
|
1308
|
-
([a, t]) => l`<cx-grid-item xs="3" sm="1"
|
|
1309
|
-
<cx-typography variant="body2">
|
|
1310
|
-
${this.columnsMap[a].title}
|
|
1311
|
-
</cx-typography>
|
|
1312
|
-
</cx-grid-item>
|
|
1313
|
-
<cx-grid-item xs="3" sm="2">
|
|
1314
|
-
${Y(
|
|
1150
|
+
([a, t]) => l`<cx-grid-item xs="3" sm="1"><cx-typography variant="body2">${this.columnsMap[a].title}</cx-typography></cx-grid-item><cx-grid-item xs="3" sm="2">${Y(
|
|
1315
1151
|
this.columnsMap[a].controlType,
|
|
1316
1152
|
[
|
|
1317
1153
|
[
|
|
1318
1154
|
"image-picker",
|
|
1319
|
-
() => l`<cx-asset-picker
|
|
1320
|
-
value=${t}
|
|
1321
|
-
type="image"
|
|
1322
|
-
id=${a}
|
|
1323
|
-
@cx-content-builder-asset-select=${async (d) => {
|
|
1155
|
+
() => l`<cx-asset-picker value=${t} type="image" id=${a} @cx-content-builder-asset-select=${async (d) => {
|
|
1324
1156
|
if (Array.isArray(d.detail))
|
|
1325
1157
|
return;
|
|
1326
1158
|
const { src: c } = d.detail;
|
|
@@ -1328,200 +1160,53 @@ let n = class extends T {
|
|
|
1328
1160
|
...this.editedItem,
|
|
1329
1161
|
[a]: c
|
|
1330
1162
|
};
|
|
1331
|
-
}}
|
|
1332
|
-
@cx-content-builder-asset-delete=${async () => {
|
|
1163
|
+
}} @cx-content-builder-asset-delete=${async () => {
|
|
1333
1164
|
this.editedItem = {
|
|
1334
1165
|
...this.editedItem,
|
|
1335
1166
|
[a]: ""
|
|
1336
1167
|
};
|
|
1337
|
-
}}
|
|
1338
|
-
@cx-asset-request-status=${this.handleAssetRequestStatus}
|
|
1339
|
-
.onRequestAsset=${this.onRequestAsset}
|
|
1340
|
-
>
|
|
1341
|
-
</cx-asset-picker>`
|
|
1168
|
+
}} @cx-asset-request-status=${this.handleAssetRequestStatus} .onRequestAsset=${this.onRequestAsset}></cx-asset-picker>`
|
|
1342
1169
|
],
|
|
1343
1170
|
[
|
|
1344
1171
|
"radio-group",
|
|
1345
|
-
() => l
|
|
1346
|
-
<cx-radio-group
|
|
1347
|
-
data-id=${a}
|
|
1348
|
-
data-testid="radio-group-control"
|
|
1349
|
-
horizontal
|
|
1350
|
-
value=${(t || this.columnsMap[a].defaultValue) ?? ""}
|
|
1351
|
-
size="medium"
|
|
1352
|
-
@cx-change=${this.handleChange}
|
|
1353
|
-
>
|
|
1354
|
-
${b(
|
|
1172
|
+
() => l`<cx-radio-group data-id=${a} data-testid="radio-group-control" horizontal value=${(t || this.columnsMap[a].defaultValue) ?? ""} size="medium" @cx-change=${this.handleChange}>${b(
|
|
1355
1173
|
this.columnsMap[a].options ?? [],
|
|
1356
1174
|
(i) => i.value,
|
|
1357
|
-
(i) => l`<cx-radio value=${i.value}
|
|
1358
|
-
|
|
1359
|
-
</cx-radio>`
|
|
1360
|
-
)}
|
|
1361
|
-
</cx-radio-group>
|
|
1362
|
-
`
|
|
1175
|
+
(i) => l`<cx-radio value=${i.value}>${i.name}</cx-radio>`
|
|
1176
|
+
)}</cx-radio-group>`
|
|
1363
1177
|
],
|
|
1364
1178
|
[
|
|
1365
1179
|
"select",
|
|
1366
|
-
() => this.columnsMap[a].api ? l`<cx-dynamic-select
|
|
1367
|
-
data-id=${a}
|
|
1368
|
-
hoist
|
|
1369
|
-
value=${t}
|
|
1370
|
-
@cx-change=${this.handleChange}
|
|
1371
|
-
.api=${this.columnsMap[a].api}
|
|
1372
|
-
></cx-dynamic-select>` : l`<cx-select
|
|
1373
|
-
data-id=${a}
|
|
1374
|
-
hoist
|
|
1375
|
-
value=${t}
|
|
1376
|
-
@cx-change=${this.handleChange}
|
|
1377
|
-
>
|
|
1378
|
-
${b(
|
|
1180
|
+
() => this.columnsMap[a].api ? l`<cx-dynamic-select data-id=${a} hoist value=${t} @cx-change=${this.handleChange} .api=${this.columnsMap[a].api}></cx-dynamic-select>` : l`<cx-select data-id=${a} hoist value=${t} @cx-change=${this.handleChange}>${b(
|
|
1379
1181
|
this.columnsMap[a].options ?? [],
|
|
1380
1182
|
(i) => i.value,
|
|
1381
1183
|
(i) => l`<cx-option value=${i.value}>${i.name}</cx-option>`
|
|
1382
|
-
)}
|
|
1383
|
-
</cx-select>`
|
|
1184
|
+
)}</cx-select>`
|
|
1384
1185
|
]
|
|
1385
1186
|
],
|
|
1386
|
-
() => l
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
value=${t}
|
|
1390
|
-
@cx-change=${this.handleChange}
|
|
1391
|
-
></cx-input>
|
|
1392
|
-
`
|
|
1393
|
-
)}
|
|
1394
|
-
</cx-grid-item>`
|
|
1395
|
-
)}
|
|
1396
|
-
</cx-grid>
|
|
1397
|
-
`;
|
|
1187
|
+
() => l`<cx-input data-id=${a} value=${t} @cx-change=${this.handleChange}></cx-input>`
|
|
1188
|
+
)}</cx-grid-item>`
|
|
1189
|
+
)}</cx-grid>`;
|
|
1398
1190
|
}
|
|
1399
1191
|
render() {
|
|
1400
|
-
return l
|
|
1401
|
-
<cx-space direction="vertical" align-items="flex-start">
|
|
1402
|
-
<div class="list-editor">
|
|
1403
|
-
<cx-table
|
|
1404
|
-
part="table"
|
|
1405
|
-
class=${Z({
|
|
1192
|
+
return l`<cx-space direction="vertical" align-items="flex-start"><div class="list-editor"><cx-table part="table" class=${Z({
|
|
1406
1193
|
"list-editor__table": !0,
|
|
1407
1194
|
"list-editor__table--no-header": this.noHeader
|
|
1408
|
-
})}
|
|
1409
|
-
?movable-rows=${this.sortable}
|
|
1410
|
-
?no-header=${this.noHeader}
|
|
1411
|
-
layout="fitColumns"
|
|
1412
|
-
row-height=${this.rowHeight}
|
|
1413
|
-
.columns=${this.columns}
|
|
1414
|
-
.columnDefaults=${xe}
|
|
1415
|
-
.hoverMenu=${this.hoverMenu}
|
|
1416
|
-
.data=${this.data ?? []}
|
|
1417
|
-
no-selectable
|
|
1418
|
-
@cx-table.rowMoved=${this.handleTableRowMoved}
|
|
1419
|
-
@cx-table-row-action-click=${this.handleTableActions}
|
|
1420
|
-
></cx-table>
|
|
1421
|
-
<cx-dialog
|
|
1422
|
-
part="dialog"
|
|
1423
|
-
class="list-editor__dialog"
|
|
1424
|
-
divider-position=${G.Footer}
|
|
1425
|
-
use-overlay-scrollbar
|
|
1426
|
-
strategy="fixed"
|
|
1427
|
-
?open=${!!this.editedItem}
|
|
1428
|
-
.boundary=${this.boundary}
|
|
1429
|
-
@cx-request-close=${this.handleRequestClose}
|
|
1430
|
-
>
|
|
1431
|
-
<cx-space slot="label" direction="vertical" spacing="2x-small">
|
|
1432
|
-
<cx-typography variant="h4">
|
|
1433
|
-
${this.isAdding ? this.addDialogLabel : this.editDialogLabel}
|
|
1434
|
-
</cx-typography>
|
|
1435
|
-
${N(
|
|
1195
|
+
})} ?movable-rows=${this.sortable} ?no-header=${this.noHeader} layout="fitColumns" row-height=${this.rowHeight} .columns=${this.columns} .columnDefaults=${xe} .hoverMenu=${this.hoverMenu} .data=${this.data ?? []} no-selectable @cx-table.rowMoved=${this.handleTableRowMoved} @cx-table-row-action-click=${this.handleTableActions}></cx-table><cx-dialog part="dialog" class="list-editor__dialog" divider-position=${G.Footer} use-overlay-scrollbar strategy="fixed" ?open=${!!this.editedItem} .boundary=${this.boundary} @cx-request-close=${this.handleRequestClose}><cx-space slot="label" direction="vertical" spacing="2x-small"><cx-typography variant="h4">${this.isAdding ? this.addDialogLabel : this.editDialogLabel}</cx-typography>${N(
|
|
1436
1196
|
!this.isAdding && this.editedItem?.[this.displayField],
|
|
1437
|
-
() => l`<cx-typography variant="body3"
|
|
1438
|
-
|
|
1439
|
-
${this.editedItem?.[this.displayField]}
|
|
1440
|
-
</cx-line-clamp>
|
|
1441
|
-
</cx-typography>`
|
|
1442
|
-
)}
|
|
1443
|
-
</cx-space>
|
|
1444
|
-
${N(
|
|
1197
|
+
() => l`<cx-typography variant="body3"><cx-line-clamp lines="1">${this.editedItem?.[this.displayField]}</cx-line-clamp></cx-typography>`
|
|
1198
|
+
)}</cx-space>${N(
|
|
1445
1199
|
this.tabs.length >= 1,
|
|
1446
|
-
() => l
|
|
1447
|
-
<cx-tab-group
|
|
1448
|
-
class="list-editor__tab-group"
|
|
1449
|
-
placement="top"
|
|
1450
|
-
>
|
|
1451
|
-
${b(
|
|
1200
|
+
() => l`<cx-tab-group class="list-editor__tab-group" placement="top">${b(
|
|
1452
1201
|
this.tabs,
|
|
1453
1202
|
(e) => e,
|
|
1454
|
-
(e) => l
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
>
|
|
1459
|
-
${this.localize.term(e)}
|
|
1460
|
-
</cx-tab>
|
|
1461
|
-
<cx-tab-panel
|
|
1462
|
-
name=${e}
|
|
1463
|
-
>
|
|
1464
|
-
<cx-space
|
|
1465
|
-
direction="vertical"
|
|
1466
|
-
spacing="x-small"
|
|
1467
|
-
wrap="nowrap"
|
|
1468
|
-
>
|
|
1469
|
-
${this.renderControls(e)}
|
|
1470
|
-
</cx-space>
|
|
1471
|
-
</cx-tab-panel>
|
|
1472
|
-
`
|
|
1473
|
-
)}
|
|
1474
|
-
</cx-tab-group>`,
|
|
1475
|
-
() => l`
|
|
1476
|
-
<cx-space
|
|
1477
|
-
direction="vertical"
|
|
1478
|
-
spacing="x-small"
|
|
1479
|
-
wrap="nowrap"
|
|
1480
|
-
>
|
|
1481
|
-
${this.renderControls(this.tabs[0])}
|
|
1482
|
-
</cx-space>
|
|
1483
|
-
`
|
|
1484
|
-
)}
|
|
1485
|
-
<cx-space
|
|
1486
|
-
slot="footer"
|
|
1487
|
-
spacing="x-small"
|
|
1488
|
-
wrap="nowrap"
|
|
1489
|
-
justify-content="end"
|
|
1490
|
-
>
|
|
1491
|
-
<cx-button
|
|
1492
|
-
data-testid="cancel-button"
|
|
1493
|
-
variant="default"
|
|
1494
|
-
size="medium"
|
|
1495
|
-
@click=${this.handleCancelClick}
|
|
1496
|
-
>
|
|
1497
|
-
${this.localize.term("cancel")}
|
|
1498
|
-
</cx-button>
|
|
1499
|
-
<cx-button
|
|
1500
|
-
data-testid="save-button"
|
|
1501
|
-
variant="primary"
|
|
1502
|
-
size="medium"
|
|
1503
|
-
@click=${this.handleSaveClick}
|
|
1504
|
-
>
|
|
1505
|
-
${this.localize.term("save")}
|
|
1506
|
-
</cx-button>
|
|
1507
|
-
</cx-space>
|
|
1508
|
-
</cx-dialog>
|
|
1509
|
-
</div>
|
|
1510
|
-
${N(
|
|
1203
|
+
(e) => l`<cx-tab slot="nav" panel=${e}>${this.localize.term(e)}</cx-tab><cx-tab-panel name=${e}><cx-space direction="vertical" spacing="x-small" wrap="nowrap">${this.renderControls(e)}</cx-space></cx-tab-panel>`
|
|
1204
|
+
)}</cx-tab-group>`,
|
|
1205
|
+
() => l`<cx-space direction="vertical" spacing="x-small" wrap="nowrap">${this.renderControls(this.tabs[0])}</cx-space>`
|
|
1206
|
+
)}<cx-space slot="footer" spacing="x-small" wrap="nowrap" justify-content="end"><cx-button data-testid="cancel-button" variant="default" size="medium" @click=${this.handleCancelClick}>${this.localize.term("cancel")}</cx-button><cx-button data-testid="save-button" variant="primary" size="medium" @click=${this.handleSaveClick}>${this.localize.term("save")}</cx-button></cx-space></cx-dialog></div>${N(
|
|
1511
1207
|
this.canAdd,
|
|
1512
|
-
() => l
|
|
1513
|
-
|
|
1514
|
-
data-testid="add-button"
|
|
1515
|
-
variant="default"
|
|
1516
|
-
size="medium"
|
|
1517
|
-
@click=${this.handleAddClick}
|
|
1518
|
-
>
|
|
1519
|
-
${this.addItemText || this.localize.term("add")}
|
|
1520
|
-
</cx-button>
|
|
1521
|
-
`
|
|
1522
|
-
)}
|
|
1523
|
-
</cx-space>
|
|
1524
|
-
`;
|
|
1208
|
+
() => l`<cx-button data-testid="add-button" variant="default" size="medium" @click=${this.handleAddClick}>${this.addItemText || this.localize.term("add")}</cx-button>`
|
|
1209
|
+
)}</cx-space>`;
|
|
1525
1210
|
}
|
|
1526
1211
|
};
|
|
1527
1212
|
n.styles = [D, ge];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { J as Wi, e as N, a4 as fi, b4 as En, bc as Nn, ap as ri, G as we, P as Rn, a as gt, L as Ji, T as Vi, D as In, F as pi, I as gi, am as Se, aF as Hi, k as zn, bd as Bn, aZ as Ft, be as kn, m as jn, w as Yn, f as Xn, ax as di, y as mi, z as Ee, t as yi, bf as $n, aj as Gn, K as Zn, bg as xe, a2 as An, C as _i, az as On, b as Fn, bh as bn } from "./am-chart.
|
|
1
|
+
import { J as Wi, e as N, a4 as fi, b4 as En, bc as Nn, ap as ri, G as we, P as Rn, a as gt, L as Ji, T as Vi, D as In, F as pi, I as gi, am as Se, aF as Hi, k as zn, bd as Bn, aZ as Ft, be as kn, m as jn, w as Yn, f as Xn, ax as di, y as mi, z as Ee, t as yi, bf as $n, aj as Gn, K as Zn, bg as xe, a2 as An, C as _i, az as On, b as Fn, bh as bn } from "./am-chart.H2jnOzFc.js";
|
|
2
2
|
import { g as Wn, a as Jn } from "./_commonjsHelpers.DQNKXVTB.js";
|
|
3
3
|
import { i as Vn } from "./index.DU0XUO4k.js";
|
|
4
|
-
import { a as qi } from "./ZoomTools.
|
|
4
|
+
import { a as qi } from "./ZoomTools.D5JPehoL.js";
|
|
5
5
|
class b {
|
|
6
6
|
constructor() {
|
|
7
7
|
this._partials = new Float64Array(32), this._n = 0;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { n as s, C as x } from "./lib-cortex-element.CVMmyPMC.js";
|
|
2
|
+
import { c as m } from "./component.styles.CRO4Odto.js";
|
|
3
|
+
import { c as v } from "./custom-element.L4WJXn1j.js";
|
|
4
|
+
import { L as g } from "./i18n.BUW7B9hr.js";
|
|
5
|
+
import { w as d } from "./watch.BCJD77bD.js";
|
|
6
|
+
import { i as b, x as h } from "./lit-element.jLBm65_O.js";
|
|
7
|
+
import { r as f } from "./state.CSDxrqLd.js";
|
|
8
|
+
import { e as _ } from "./query.BBf1UFkC.js";
|
|
9
|
+
import { e as y } from "./class-map.BiVq-cVR.js";
|
|
10
|
+
import { n as u } from "./when.Dr1es41R.js";
|
|
11
|
+
import k from "../components/icon.js";
|
|
12
|
+
import w from "../components/space.js";
|
|
13
|
+
var r = /* @__PURE__ */ ((t) => (t.Left = "left", t.Right = "right", t))(r || {});
|
|
14
|
+
const C = b`:host{-webkit-user-select:none;user-select:none;display:block}:host(:focus){outline:none}.option{font-family:var(--cx-font-sans);font-size:var(--cx-font-size-small);font-weight:var(--option-font-weight,var(--cx-font-weight-regular));line-height:var(--cx-line-height-large);letter-spacing:var(--cx-letter-spacing-normal);color:var(--option-color,var(--cx-color-neutral-700));padding:var(--cx-spacing-x-small) var(--cx-spacing-medium) var(--cx-spacing-x-small) var(--cx-spacing-x-small);transition:var(--cx-transition-fast) fill;cursor:pointer;align-items:center;display:flex;position:relative}.option:not(.option--show-check){padding-inline:var(--cx-spacing-small)}.option--hover:not(.option--current):not(.option--disabled){background-color:var(--cx-menu-item-background-color-hover)}.option--current,.option--current.option--disabled{background-color:var(--cx-menu-item-background-color-hover);opacity:1}.option--selected{color:var(--option-selected-color,var(--cx-color-primary));font-weight:var(--option-selected-font-weight,var(--cx-font-weight-regular))}.option--disabled{opacity:.5;cursor:default;outline:none}.option__content{flex:1}.option__label{line-height:var(--cx-line-height-medium);flex:auto;display:inline-block}.option .option__check{visibility:hidden;flex:none;justify-content:center;align-items:center;padding-inline-end:var(--cx-spacing-2x-small);display:none}.option--show-check .option__check{display:block}.option--show-check.option--selected .option__check{visibility:visible}.option__help-text{color:var(--option-help-text-color,var(--cx-color-neutral-600));font-weight:var(--option-help-text-font-weight,var(--cx-font-weight-regular))}.option--selected .option__content .option__help-text{color:var(--option-selected-help-text-color,var(--cx-color-primary));font-weight:var(--option-selected-help-text-font-weight,var(--cx-font-weight-regular))}.option__prefix,.option__suffix{flex:none;align-items:center;display:flex}.option__prefix::slotted(*){margin-inline-end:var(--cx-spacing-x-small)}.option__suffix::slotted(*){margin-inline-start:var(--cx-spacing-x-small)}.option__prefix{align-self:var(--prefix-alignment,center)}.option__suffix{align-self:var(--suffix-alignment,center)}.option__check{align-self:var(--check-alignment,center)}@media (forced-colors:active){:host(:hover:not([aria-disabled=true])) .option{outline-offset:-1px;outline:1px dashed selecteditem}}`;
|
|
15
|
+
var L = Object.defineProperty, E = Object.getOwnPropertyDescriptor, o = (t, n, i, l) => {
|
|
16
|
+
for (var a = l > 1 ? void 0 : l ? E(n, i) : n, c = t.length - 1, p; c >= 0; c--)
|
|
17
|
+
(p = t[c]) && (a = (l ? p(n, i, a) : p(a)) || a);
|
|
18
|
+
return l && a && L(n, i, a), a;
|
|
19
|
+
};
|
|
20
|
+
let e = class extends x {
|
|
21
|
+
constructor() {
|
|
22
|
+
super(...arguments), this.localize = new g(this), this.current = !1, this.selected = !1, this.hasHover = !1, this.value = "", this.disabled = !1, this.showCheck = !1, this.checkPlacement = r.Left;
|
|
23
|
+
}
|
|
24
|
+
connectedCallback() {
|
|
25
|
+
super.connectedCallback(), this.setAttribute("role", "option"), this.setAttribute("aria-selected", "false");
|
|
26
|
+
}
|
|
27
|
+
handleDefaultSlotChange() {
|
|
28
|
+
const t = this.getTextLabel();
|
|
29
|
+
if (typeof this.cachedTextLabel > "u") {
|
|
30
|
+
this.cachedTextLabel = t;
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
t !== this.cachedTextLabel && (this.cachedTextLabel = t, this.emit("slotchange", {
|
|
34
|
+
bubbles: !0,
|
|
35
|
+
cancelable: !1,
|
|
36
|
+
composed: !1
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
handleMouseEnter() {
|
|
40
|
+
this.hasHover = !0;
|
|
41
|
+
}
|
|
42
|
+
handleMouseLeave() {
|
|
43
|
+
this.hasHover = !1;
|
|
44
|
+
}
|
|
45
|
+
handleDisabledChange() {
|
|
46
|
+
this.setAttribute("aria-disabled", this.disabled ? "true" : "false");
|
|
47
|
+
}
|
|
48
|
+
handleSelectedChange() {
|
|
49
|
+
this.setAttribute("aria-selected", this.selected ? "true" : "false");
|
|
50
|
+
}
|
|
51
|
+
handleValueChange() {
|
|
52
|
+
typeof this.value != "string" && (this.value = String(this.value)), this.value.includes(" ") && (console.error(
|
|
53
|
+
"Option values cannot include a space. All spaces have been replaced with underscores.",
|
|
54
|
+
this
|
|
55
|
+
), this.value = this.value.replace(/ /g, "_"));
|
|
56
|
+
}
|
|
57
|
+
/** Returns a plain text label based on the option's content. */
|
|
58
|
+
getTextLabel() {
|
|
59
|
+
const t = this.childNodes;
|
|
60
|
+
let n = "";
|
|
61
|
+
return [...t].forEach((i) => {
|
|
62
|
+
i.nodeType === Node.ELEMENT_NODE && (i.hasAttribute("slot") || (n += i.textContent)), i.nodeType === Node.TEXT_NODE && (n += i.textContent);
|
|
63
|
+
}), n.trim();
|
|
64
|
+
}
|
|
65
|
+
render() {
|
|
66
|
+
return h`<div part="base" class=${y({
|
|
67
|
+
option: !0,
|
|
68
|
+
"option--current": this.current,
|
|
69
|
+
"option--disabled": this.disabled,
|
|
70
|
+
"option--hover": this.hasHover,
|
|
71
|
+
"option--selected": this.selected,
|
|
72
|
+
"option--show-check": this.showCheck
|
|
73
|
+
})} @mouseenter=${this.handleMouseEnter} @mouseleave=${this.handleMouseLeave}>${u(
|
|
74
|
+
this.checkPlacement === r.Left,
|
|
75
|
+
() => h`<cx-icon part="checked-icon" class="option__check" name="check" library="system" aria-hidden="true"></cx-icon>`
|
|
76
|
+
)}<slot part="prefix" name="prefix" class="option__prefix"></slot><cx-space part="content" class="option__content" direction="vertical" spacing="3x-small"><slot part="label" class="option__label" @slotchange=${this.handleDefaultSlotChange}></slot><slot part="help-text" name="help-text" class="option__help-text"></slot></cx-space><slot part="suffix" name="suffix" class="option__suffix"></slot>${u(
|
|
77
|
+
this.checkPlacement === r.Right,
|
|
78
|
+
() => h`<cx-icon part="checked-icon" class="option__check" name="check" library="system" aria-hidden="true"></cx-icon>`
|
|
79
|
+
)}</div>`;
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
e.styles = [m, C];
|
|
83
|
+
e.dependencies = { "cx-icon": k, "cx-space": w };
|
|
84
|
+
o([
|
|
85
|
+
_(".option__label")
|
|
86
|
+
], e.prototype, "defaultSlot", 2);
|
|
87
|
+
o([
|
|
88
|
+
f()
|
|
89
|
+
], e.prototype, "current", 2);
|
|
90
|
+
o([
|
|
91
|
+
f()
|
|
92
|
+
], e.prototype, "selected", 2);
|
|
93
|
+
o([
|
|
94
|
+
f()
|
|
95
|
+
], e.prototype, "hasHover", 2);
|
|
96
|
+
o([
|
|
97
|
+
s({ reflect: !0 })
|
|
98
|
+
], e.prototype, "value", 2);
|
|
99
|
+
o([
|
|
100
|
+
s({ reflect: !0, type: Boolean })
|
|
101
|
+
], e.prototype, "disabled", 2);
|
|
102
|
+
o([
|
|
103
|
+
s({ attribute: "show-check", reflect: !0, type: Boolean })
|
|
104
|
+
], e.prototype, "showCheck", 2);
|
|
105
|
+
o([
|
|
106
|
+
s({ attribute: "check-placement", reflect: !0, type: String })
|
|
107
|
+
], e.prototype, "checkPlacement", 2);
|
|
108
|
+
o([
|
|
109
|
+
d("disabled")
|
|
110
|
+
], e.prototype, "handleDisabledChange", 1);
|
|
111
|
+
o([
|
|
112
|
+
d("selected")
|
|
113
|
+
], e.prototype, "handleSelectedChange", 1);
|
|
114
|
+
o([
|
|
115
|
+
d("value")
|
|
116
|
+
], e.prototype, "handleValueChange", 1);
|
|
117
|
+
e = o([
|
|
118
|
+
v("cx-option")
|
|
119
|
+
], e);
|
|
120
|
+
export {
|
|
121
|
+
e as C,
|
|
122
|
+
r as a
|
|
123
|
+
};
|