@orangelogic/design-system 2.72.0 → 2.73.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/{button.D6S0sAOO.js → button.csCRiZzY.js} +1 -1
- package/library/chunks/{color-swatch-group.U2tGN6wW.js → color-swatch-group.DLgAN7p7.js} +3 -3
- package/library/chunks/{color-swatch.9fo7Prlq.js → color-swatch.BuUP5yG4.js} +1 -1
- package/library/chunks/{confirm-popover.DR2_O9i_.js → confirm-popover.Kx6YyQwp.js} +3 -3
- package/library/chunks/{dialog.n5g61iHs.js → dialog.BdXQkCKY.js} +2 -2
- package/library/chunks/{dot-pagination.CqpDMHMz.js → dot-pagination.CIVxMAAS.js} +1 -1
- package/library/chunks/{file-on-demand.DyPdfxfM.js → file-on-demand.BJZ5E8XT.js} +8 -8
- package/library/chunks/{folder-select.B4PPWsoq.js → folder-select.BqLmIlj6.js} +3 -3
- package/library/chunks/{header.tbXKX2yv.js → header.m7v3M94Z.js} +1 -1
- package/library/chunks/{i18n.BU7mYVLM.js → i18n.BUW7B9hr.js} +8 -7
- package/library/chunks/{icon-button.Dxz2J4cg.js → icon-button.C3eqeQl9.js} +1 -1
- package/library/chunks/{iframe.Dx7QScC8.js → iframe.CNEyWhcM.js} +1 -1
- package/library/chunks/{image.Q7doiTcu.js → image.DHBgKeJp.js} +1 -1
- package/library/chunks/{index.xnuklZH8.js → index.VbMreXxL.js} +1 -1
- package/library/chunks/{list-editor.QCj3oq9e.js → list-editor.0Yd4kvV6.js} +7 -7
- package/library/chunks/{option.CgM5bwtt.js → option.Csqefux_.js} +1 -1
- package/library/chunks/{pagination.I2BZVSB2.js → pagination.BXCr_5om.js} +4 -4
- package/library/chunks/{tab-group.euL1exrl.js → tab-group.G24wrely.js} +3 -3
- package/library/chunks/{table.DWTaNNnC.js → table.p6kMJx5q.js} +5 -5
- package/library/chunks/{tree.ClkS3oAg.js → tree.OXvhEOjS.js} +1 -1
- package/library/components/alert.js +2 -2
- package/library/components/asset-link-format.js +4 -4
- package/library/components/atoms.js +12 -12
- package/library/components/border-input-group.js +1 -1
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +2 -2
- package/library/components/color-picker.js +2 -2
- package/library/components/color-swatch-group.js +4 -4
- package/library/components/color-swatch.js +2 -2
- package/library/components/confirm-popover.js +4 -4
- package/library/components/copy-button.js +1 -1
- package/library/components/corner-position-input-group.js +2 -2
- package/library/components/details.js +1 -1
- package/library/components/dialog.js +3 -3
- package/library/components/dot-pagination.js +2 -2
- package/library/components/drawer.js +2 -2
- package/library/components/dropdown.js +1 -1
- package/library/components/dynamic-select.js +4 -4
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +2 -2
- package/library/components/file-on-demand.js +9 -9
- package/library/components/folder-select.js +3 -3
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +1 -1
- package/library/components/header.js +2 -2
- package/library/components/icon-button.js +2 -2
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +2 -2
- package/library/components/input.js +1 -1
- package/library/components/line-clamp.js +1 -1
- package/library/components/list-editor.js +6 -6
- package/library/components/masonry.js +2 -2
- package/library/components/menu-item.js +1 -1
- package/library/components/menu.js +1 -1
- package/library/components/molecules.js +4 -4
- package/library/components/option.js +2 -2
- package/library/components/organisms.js +2 -2
- package/library/components/pagination.js +5 -5
- package/library/components/popup.js +255 -218
- package/library/components/position-picker.js +1 -1
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/range.js +1 -1
- package/library/components/rating.js +1 -1
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +107 -106
- package/library/components/share-option-list.js +1 -1
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +2 -2
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/tab-group.js +4 -4
- package/library/components/tab.js +2 -2
- package/library/components/table.js +5 -5
- package/library/components/tag.js +2 -2
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +2 -2
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +2 -2
- package/library/components/types.js +27 -27
- package/library/components/video.js +2 -2
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/popup/overlay/Overlay.d.ts +10 -0
- package/library/packages/atoms/src/components/popup/popup.d.ts +1 -1
- package/library/packages/molecules/src/estimated-reading-time/estimated-reading-time.d.ts +3 -2
- package/library/packages/utils/src/custom-element/i18n.d.ts +1 -0
- package/library/react-web-component.d.ts +1 -1
- package/library/utils.js +2 -2
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import x from "./radio-group.js";
|
|
|
5
5
|
import { n as h, C as u } from "../chunks/lib-cortex-element.CVMmyPMC.js";
|
|
6
6
|
import { c as g } from "../chunks/component.styles.DMSLciL5.js";
|
|
7
7
|
import { c as _ } from "../chunks/custom-element.L4WJXn1j.js";
|
|
8
|
-
import { L as f } from "../chunks/i18n.
|
|
8
|
+
import { L as f } from "../chunks/i18n.BUW7B9hr.js";
|
|
9
9
|
import { i as v, x as C } from "../chunks/lit-element.jLBm65_O.js";
|
|
10
10
|
var r = /* @__PURE__ */ ((e) => (e.BottomCenter = "bottom-center", e.BottomLeft = "bottom-left", e.BottomRight = "bottom-right", e.CenterCenter = "center-center", e.CenterLeft = "center-left", e.CenterRight = "center-right", e.TopCenter = "top-center", e.TopLeft = "top-left", e.TopRight = "top-right", e))(r || {});
|
|
11
11
|
const b = v`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as i, C as d } from "../chunks/lib-cortex-element.CVMmyPMC.js";
|
|
2
2
|
import { c as m } from "../chunks/component.styles.DMSLciL5.js";
|
|
3
3
|
import { c as h } from "../chunks/custom-element.L4WJXn1j.js";
|
|
4
|
-
import { L as b } from "../chunks/i18n.
|
|
4
|
+
import { L as b } from "../chunks/i18n.BUW7B9hr.js";
|
|
5
5
|
import { i as g, x as c } from "../chunks/lit-element.jLBm65_O.js";
|
|
6
6
|
import { e as u } from "../chunks/class-map.BiVq-cVR.js";
|
|
7
7
|
import { o as v } from "../chunks/if-defined.BRoBj_Rp.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as l, C as p } from "../chunks/lib-cortex-element.CVMmyPMC.js";
|
|
2
2
|
import { c as d } from "../chunks/component.styles.DMSLciL5.js";
|
|
3
3
|
import { c as g } from "../chunks/custom-element.L4WJXn1j.js";
|
|
4
|
-
import { L as u } from "../chunks/i18n.
|
|
4
|
+
import { L as u } from "../chunks/i18n.BUW7B9hr.js";
|
|
5
5
|
import { i as f, x as v } from "../chunks/lit-element.jLBm65_O.js";
|
|
6
6
|
import { r as m } from "../chunks/state.CSDxrqLd.js";
|
|
7
7
|
import { e as h } from "../chunks/query.BBf1UFkC.js";
|
|
@@ -7,7 +7,7 @@ import { d as $ } from "../chunks/debounce.DaHuiSGU.js";
|
|
|
7
7
|
import { d as O } from "../chunks/default-value.COZopaet.js";
|
|
8
8
|
import { d as w } from "../chunks/drag.DXEXVXPv.js";
|
|
9
9
|
import { F as N } from "../chunks/form.DgwYWi0O.js";
|
|
10
|
-
import { L as S } from "../chunks/i18n.
|
|
10
|
+
import { L as S } from "../chunks/i18n.BUW7B9hr.js";
|
|
11
11
|
import { c as d } from "../chunks/math.DqTA6ya4.js";
|
|
12
12
|
import { H as A } from "../chunks/slot.j5oheLJC.js";
|
|
13
13
|
import { w as v } from "../chunks/watch.BCJD77bD.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as l, C as g } from "../chunks/lib-cortex-element.CVMmyPMC.js";
|
|
2
2
|
import { c as y } from "../chunks/component.styles.DMSLciL5.js";
|
|
3
3
|
import { c as b } from "../chunks/custom-element.L4WJXn1j.js";
|
|
4
|
-
import { L as f } from "../chunks/i18n.
|
|
4
|
+
import { L as f } from "../chunks/i18n.BUW7B9hr.js";
|
|
5
5
|
import { c as _ } from "../chunks/math.DqTA6ya4.js";
|
|
6
6
|
import { w as p } from "../chunks/watch.BCJD77bD.js";
|
|
7
7
|
import { i as x, x as c } from "../chunks/lit-element.jLBm65_O.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as l, C as h } from "../chunks/lib-cortex-element.CVMmyPMC.js";
|
|
2
2
|
import { c as p } from "../chunks/component.styles.DMSLciL5.js";
|
|
3
3
|
import { c as v } from "../chunks/custom-element.L4WJXn1j.js";
|
|
4
|
-
import { L as d } from "../chunks/i18n.
|
|
4
|
+
import { L as d } from "../chunks/i18n.BUW7B9hr.js";
|
|
5
5
|
import { i as f, x as y } from "../chunks/lit-element.jLBm65_O.js";
|
|
6
6
|
import { r as c } from "../chunks/state.CSDxrqLd.js";
|
|
7
7
|
const T = f`
|
|
@@ -8,7 +8,7 @@ import { c as D } from "../chunks/custom-element.L4WJXn1j.js";
|
|
|
8
8
|
import { d as I } from "../chunks/default-value.COZopaet.js";
|
|
9
9
|
import { w as v } from "../chunks/event.mFzZi4sr.js";
|
|
10
10
|
import { F as L } from "../chunks/form.DgwYWi0O.js";
|
|
11
|
-
import { L as $ } from "../chunks/i18n.
|
|
11
|
+
import { L as $ } from "../chunks/i18n.BUW7B9hr.js";
|
|
12
12
|
import { s as T } from "../chunks/scroll.xtO5yojm.js";
|
|
13
13
|
import { H as E } from "../chunks/slot.j5oheLJC.js";
|
|
14
14
|
import { i as B } from "../chunks/user-agent.D9aPuOyL.js";
|
|
@@ -21,11 +21,11 @@ import { o as V } from "../chunks/unsafe-html.Dff7-rCx.js";
|
|
|
21
21
|
import { n as m } from "../chunks/when.Dr1es41R.js";
|
|
22
22
|
import { s as w, g as _ } from "../chunks/animation-registry.HmpwNuGH.js";
|
|
23
23
|
import P from "./icon.js";
|
|
24
|
-
import { C as d } from "../chunks/option.
|
|
24
|
+
import { C as d } from "../chunks/option.Csqefux_.js";
|
|
25
25
|
import M from "./popup.js";
|
|
26
26
|
import U from "./spinner.js";
|
|
27
27
|
import N from "./tag.js";
|
|
28
|
-
const R = (
|
|
28
|
+
const R = (t) => !(document.createElement(t.tagName).constructor === HTMLElement || customElements.get(t.tagName.toLowerCase())), W = F`
|
|
29
29
|
:host {
|
|
30
30
|
display: block;
|
|
31
31
|
}
|
|
@@ -458,6 +458,7 @@ const R = (e) => !(document.createElement(e.tagName).constructor === HTMLElement
|
|
|
458
458
|
flex-direction: column;
|
|
459
459
|
flex: 1;
|
|
460
460
|
width: 0;
|
|
461
|
+
align-self: stretch;
|
|
461
462
|
}
|
|
462
463
|
|
|
463
464
|
.input-container__display-value {
|
|
@@ -597,10 +598,10 @@ const R = (e) => !(document.createElement(e.tagName).constructor === HTMLElement
|
|
|
597
598
|
z-index: 2;
|
|
598
599
|
}
|
|
599
600
|
`;
|
|
600
|
-
var H = Object.defineProperty, q = Object.getOwnPropertyDescriptor, s = (
|
|
601
|
-
for (var a = n > 1 ? void 0 : n ? q(
|
|
602
|
-
(c =
|
|
603
|
-
return n && a && H(
|
|
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;
|
|
604
605
|
};
|
|
605
606
|
let i = class extends S {
|
|
606
607
|
constructor() {
|
|
@@ -610,9 +611,9 @@ let i = class extends S {
|
|
|
610
611
|
this,
|
|
611
612
|
"help-text",
|
|
612
613
|
"label"
|
|
613
|
-
), this.localize = new $(this), this.typeToSelectString = "", this.hasFocus = !1, this.displayLabel = "", this.selectedOptions = [], this.name = "", this.value = "", 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 = (
|
|
614
|
-
const
|
|
615
|
-
this.handleTagRemove(r,
|
|
614
|
+
), this.localize = new $(this), this.typeToSelectString = "", this.hasFocus = !1, this.displayLabel = "", this.selectedOptions = [], this.name = "", this.value = "", 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) => {
|
|
615
|
+
const e = this.hasSlotController.test("label"), n = (this.label ? !0 : !!e) ? this.size === "large" ? "medium" : "small" : this.size, a = (r) => {
|
|
616
|
+
this.handleTagRemove(r, t);
|
|
616
617
|
};
|
|
617
618
|
return p`
|
|
618
619
|
<cx-tag
|
|
@@ -629,28 +630,28 @@ let i = class extends S {
|
|
|
629
630
|
@cx-remove=${a}
|
|
630
631
|
>
|
|
631
632
|
<cx-line-clamp lines="1">
|
|
632
|
-
${this.getOptionLabel(
|
|
633
|
+
${this.getOptionLabel(t)}
|
|
633
634
|
</cx-line-clamp>
|
|
634
635
|
</cx-tag>
|
|
635
636
|
`;
|
|
636
|
-
}, this.inputBehavior = "filter", this.getOptionValue = (
|
|
637
|
-
if (!(!
|
|
638
|
-
return
|
|
639
|
-
}, this.getOptionDisabled = (
|
|
640
|
-
if (!(!
|
|
641
|
-
return
|
|
642
|
-
}, this.stayOpenOnSelect = !1, this.forceOnChange = !1, this.allowDefaultMouseDown = !1, this.noOptionText = "", this.handleDocumentFocusIn = (
|
|
643
|
-
const
|
|
644
|
-
this && !
|
|
645
|
-
}, this.handleDocumentKeyDown = (
|
|
646
|
-
const
|
|
637
|
+
}, 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
|
+
if (!(!t || !(t instanceof d)))
|
|
639
|
+
return t.selected;
|
|
640
|
+
}, this.getOptionDisabled = (t) => {
|
|
641
|
+
if (!(!t || !(t instanceof d)))
|
|
642
|
+
return t.disabled;
|
|
643
|
+
}, this.stayOpenOnSelect = !1, this.forceOnChange = !1, this.allowDefaultMouseDown = !1, this.noOptionText = "", this.handleDocumentFocusIn = (t) => {
|
|
644
|
+
const e = t.composedPath();
|
|
645
|
+
this && !e.includes(this) && !this.stayOpenOnSelect && this.hide();
|
|
646
|
+
}, this.handleDocumentKeyDown = (t) => {
|
|
647
|
+
const e = t.target, l = e.closest(".select__clear") !== null, n = e.closest("cx-icon-button") !== null;
|
|
647
648
|
if (!(l || n)) {
|
|
648
|
-
if (
|
|
649
|
-
(this.shouldShowNoOptionsMessage || this.getVisibleOptions().length > 0) &&
|
|
649
|
+
if (t.key === "Escape" && this.open && !this.closeWatcher) {
|
|
650
|
+
(this.shouldShowNoOptionsMessage || this.getVisibleOptions().length > 0) && t.stopPropagation(), t.preventDefault(), this.hide(), this.displayInput.focus({ preventScroll: !0 });
|
|
650
651
|
return;
|
|
651
652
|
}
|
|
652
|
-
if (
|
|
653
|
-
if (
|
|
653
|
+
if (t.key === "Enter") {
|
|
654
|
+
if (t.preventDefault(), t.stopImmediatePropagation(), this.emit("cx-enter", {
|
|
654
655
|
detail: {
|
|
655
656
|
value: this.displayInput.value
|
|
656
657
|
}
|
|
@@ -679,17 +680,17 @@ let i = class extends S {
|
|
|
679
680
|
}
|
|
680
681
|
return;
|
|
681
682
|
}
|
|
682
|
-
if (["ArrowUp", "ArrowDown", "Home", "End"].includes(
|
|
683
|
+
if (["ArrowUp", "ArrowDown", "Home", "End"].includes(t.key)) {
|
|
683
684
|
const a = this.getAllOptions().filter((g) => this.inputBehavior === "filter" ? !g.hidden : !0), r = this.currentOption ? a.indexOf(this.currentOption) : -1;
|
|
684
685
|
let c = Math.max(0, r);
|
|
685
|
-
if (
|
|
686
|
+
if (t.preventDefault(), !this.open && (this.show(), this.currentOption))
|
|
686
687
|
return;
|
|
687
|
-
|
|
688
|
+
t.key === "ArrowDown" ? (c = r + 1, c > a.length - 1 && (c = 0)) : t.key === "ArrowUp" ? (c = r - 1, c < 0 && (c = a.length - 1)) : t.key === "Home" ? c = 0 : t.key === "End" && (c = a.length - 1), this.setCurrentOption(a[c]);
|
|
688
689
|
}
|
|
689
690
|
}
|
|
690
|
-
}, this.handleDocumentMouseDown = (
|
|
691
|
-
const
|
|
692
|
-
this && !
|
|
691
|
+
}, this.handleDocumentMouseDown = (t) => {
|
|
692
|
+
const e = t.composedPath();
|
|
693
|
+
this && !e.includes(this) && !this.stayOpenOnSelect && this.hide();
|
|
693
694
|
};
|
|
694
695
|
}
|
|
695
696
|
/**
|
|
@@ -717,13 +718,13 @@ let i = class extends S {
|
|
|
717
718
|
* @param selected If undefined, the option will be toggled. If true, the option will be selected. If false, the option will be unselected.
|
|
718
719
|
* @returns
|
|
719
720
|
*/
|
|
720
|
-
setOptionSelected(
|
|
721
|
-
if (!(!(
|
|
722
|
-
if (
|
|
723
|
-
|
|
721
|
+
setOptionSelected(t, e) {
|
|
722
|
+
if (!(!(t instanceof d) || t.getAttribute("role") !== "option")) {
|
|
723
|
+
if (e === void 0) {
|
|
724
|
+
t.selected = !t.selected;
|
|
724
725
|
return;
|
|
725
726
|
}
|
|
726
|
-
|
|
727
|
+
t.selected = e, e && this.setCurrentOption(t);
|
|
727
728
|
}
|
|
728
729
|
}
|
|
729
730
|
/**
|
|
@@ -733,13 +734,13 @@ let i = class extends S {
|
|
|
733
734
|
* @param current If undefined, the option will be toggled. If true, the option will be set as current. If false, the option will be unset.
|
|
734
735
|
* @returns
|
|
735
736
|
*/
|
|
736
|
-
setOptionCurrent(
|
|
737
|
-
if (
|
|
738
|
-
if (
|
|
739
|
-
|
|
737
|
+
setOptionCurrent(t, e) {
|
|
738
|
+
if (t instanceof d) {
|
|
739
|
+
if (e === void 0) {
|
|
740
|
+
t.current = !t.current;
|
|
740
741
|
return;
|
|
741
742
|
}
|
|
742
|
-
|
|
743
|
+
t.current = e;
|
|
743
744
|
}
|
|
744
745
|
}
|
|
745
746
|
/**
|
|
@@ -748,8 +749,8 @@ let i = class extends S {
|
|
|
748
749
|
* @param value The current input string
|
|
749
750
|
* @returns Whether this option should be displayed
|
|
750
751
|
*/
|
|
751
|
-
filterCallback(
|
|
752
|
-
return this.getOptionLabel(
|
|
752
|
+
filterCallback(t, e) {
|
|
753
|
+
return this.getOptionLabel(t).toLowerCase().includes(e);
|
|
753
754
|
}
|
|
754
755
|
// #endregion
|
|
755
756
|
connectedCallback() {
|
|
@@ -793,14 +794,14 @@ let i = class extends S {
|
|
|
793
794
|
handleFocus() {
|
|
794
795
|
this.hasFocus = !0, this.displayInput.setSelectionRange(0, this.displayInput.value.length), this.emit("cx-focus"), setTimeout(() => this.displayInput.focus(), 0);
|
|
795
796
|
}
|
|
796
|
-
handleBlur(
|
|
797
|
-
const
|
|
798
|
-
|
|
797
|
+
handleBlur(t) {
|
|
798
|
+
const e = t.relatedTarget;
|
|
799
|
+
e && this.contains(e) || (this.hasFocus = !1, this.allowFreetext || (this.displayInput.value = this.displayLabel, this.typeToSelectString = ""), this.emit("cx-blur"));
|
|
799
800
|
}
|
|
800
|
-
handleInput(
|
|
801
|
-
if (!this.open && (this.show(),
|
|
801
|
+
handleInput(t) {
|
|
802
|
+
if (!this.open && (this.show(), t.data === " "))
|
|
802
803
|
return;
|
|
803
|
-
const
|
|
804
|
+
const e = t.target, l = [
|
|
804
805
|
"ArrowUp",
|
|
805
806
|
"ArrowDown",
|
|
806
807
|
"Enter",
|
|
@@ -809,8 +810,8 @@ let i = class extends S {
|
|
|
809
810
|
"Home",
|
|
810
811
|
"End"
|
|
811
812
|
];
|
|
812
|
-
if (!(
|
|
813
|
-
switch (this.typeToSelectString =
|
|
813
|
+
if (!(t.data && l.includes(t.data)))
|
|
814
|
+
switch (this.typeToSelectString = e.value.toLowerCase(), this.displayLabel = e.value, this.emit("cx-input"), this.inputBehavior) {
|
|
814
815
|
case "filter": {
|
|
815
816
|
this.filterOptionsByInput();
|
|
816
817
|
break;
|
|
@@ -819,34 +820,34 @@ let i = class extends S {
|
|
|
819
820
|
this.selectOptionByInput();
|
|
820
821
|
}
|
|
821
822
|
}
|
|
822
|
-
handleComboboxMouseDown(
|
|
823
|
-
const
|
|
823
|
+
handleComboboxMouseDown(t) {
|
|
824
|
+
const e = t.composedPath();
|
|
824
825
|
let l = !1, n = !1;
|
|
825
|
-
|
|
826
|
+
e.forEach((a) => {
|
|
826
827
|
if (a instanceof HTMLElement && a.classList.contains("select__expand-icon")) {
|
|
827
828
|
n = !0;
|
|
828
829
|
return;
|
|
829
830
|
}
|
|
830
831
|
a instanceof HTMLElement && a.tagName.toLowerCase() === "cx-icon-button" && (l = !0);
|
|
831
|
-
}), !(this.disabled || l) && (n || this.inputBehavior !== "filter" || !this.open
|
|
832
|
+
}), !(this.disabled || l) && (n || this.inputBehavior !== "filter" || !this.open || !this.multiple && !this.useTag ? (this.allowDefaultMouseDown ? requestAnimationFrame(() => {
|
|
832
833
|
this.displayInput.focus({ preventScroll: !0 });
|
|
833
|
-
}) : (
|
|
834
|
+
}) : (t.preventDefault(), this.displayInput.focus({ preventScroll: !0 })), this.open = !this.open) : (t.preventDefault(), this.displayInput.focus({ preventScroll: !0 })));
|
|
834
835
|
}
|
|
835
|
-
handleComboboxKeyDown(
|
|
836
|
-
|
|
836
|
+
handleComboboxKeyDown(t) {
|
|
837
|
+
t.key !== "Tab" && ((t.key !== "Escape" || this.open && (this.shouldShowNoOptionsMessage || this.getVisibleOptions().length > 0)) && t.stopPropagation(), this.handleDocumentKeyDown(t));
|
|
837
838
|
}
|
|
838
|
-
handleClearClick(
|
|
839
|
-
|
|
839
|
+
handleClearClick(t) {
|
|
840
|
+
t.stopPropagation(), (this.value !== "" || this.displayLabel !== "") && (this.setSelectedOptions([]), this.displayInput.focus({ preventScroll: !0 }), this.typeToSelectString = "", this.displayLabel = "", this.displayInput.value = "", this.inputBehavior === "filter" && this.filterOptionsByInput(), this.updateComplete.then(() => {
|
|
840
841
|
this.emit("cx-clear"), this.emit("cx-input"), this.emit("cx-change");
|
|
841
842
|
}));
|
|
842
843
|
}
|
|
843
|
-
handleClearMouseDown(
|
|
844
|
-
|
|
844
|
+
handleClearMouseDown(t) {
|
|
845
|
+
t.stopPropagation(), t.preventDefault();
|
|
845
846
|
}
|
|
846
|
-
handleOptionClick(
|
|
847
|
-
const l =
|
|
847
|
+
handleOptionClick(t) {
|
|
848
|
+
const l = t.target.closest('[role="option"], cx-option'), n = this.value, a = t.composedPath().some(
|
|
848
849
|
(c) => c?.classList?.contains("tree-item__expand-button")
|
|
849
|
-
), r =
|
|
850
|
+
), r = t.composedPath().some(
|
|
850
851
|
(c) => c?.classList?.contains("tree-item__actions")
|
|
851
852
|
);
|
|
852
853
|
l && !this.getOptionDisabled(l) && !a && !r && (this.multiple ? this.toggleOptionSelection(l) : this.setSelectedOptions(l), this.updateComplete.then(
|
|
@@ -856,8 +857,8 @@ let i = class extends S {
|
|
|
856
857
|
}), !this.multiple && !this.stayOpenOnSelect && (this.hide(), this.displayInput.focus({ preventScroll: !0 })));
|
|
857
858
|
}
|
|
858
859
|
handleDefaultSlotChange() {
|
|
859
|
-
const
|
|
860
|
-
for (const n of
|
|
860
|
+
const t = this.getAllOptions(), e = Array.isArray(this.value) ? this.value : [this.value], l = [];
|
|
861
|
+
for (const n of t) {
|
|
861
862
|
const a = this.getOptionValue(n);
|
|
862
863
|
if (!a && !(n instanceof d))
|
|
863
864
|
return;
|
|
@@ -868,12 +869,12 @@ let i = class extends S {
|
|
|
868
869
|
return;
|
|
869
870
|
}
|
|
870
871
|
}
|
|
871
|
-
|
|
872
|
-
|
|
872
|
+
t.forEach((n) => l.push(this.getOptionValue(n))), this.setSelectedOptions(
|
|
873
|
+
t.filter((n) => e.includes(this.getOptionValue(n)))
|
|
873
874
|
);
|
|
874
875
|
}
|
|
875
|
-
handleTagRemove(
|
|
876
|
-
|
|
876
|
+
handleTagRemove(t, e) {
|
|
877
|
+
t.stopPropagation(), this.disabled || (this.toggleOptionSelection(e, !1), this.updateComplete.then(() => {
|
|
877
878
|
this.emit("cx-input"), this.emit("cx-change");
|
|
878
879
|
}));
|
|
879
880
|
}
|
|
@@ -895,29 +896,29 @@ let i = class extends S {
|
|
|
895
896
|
* Gets an array of all visible <cx-option> elements
|
|
896
897
|
*/
|
|
897
898
|
getVisibleOptions() {
|
|
898
|
-
return this.getAllOptions().filter((
|
|
899
|
+
return this.getAllOptions().filter((t) => !t.hidden);
|
|
899
900
|
}
|
|
900
901
|
/**
|
|
901
902
|
* Sets the current option, which is the option the user is currently interacting with (e.g. via keyboard). Only one
|
|
902
903
|
* option may be "current" at a time.
|
|
903
904
|
*/
|
|
904
|
-
setCurrentOption(
|
|
905
|
+
setCurrentOption(t) {
|
|
905
906
|
this.getAllOptions().forEach((l) => {
|
|
906
907
|
this.setOptionCurrent(l, !1), l.tabIndex = -1;
|
|
907
|
-
}),
|
|
908
|
+
}), t && (this.currentOption = t, this.setOptionCurrent(t, !0), t.tabIndex = 0, t.scrollIntoView({ block: "nearest" }));
|
|
908
909
|
}
|
|
909
910
|
/**
|
|
910
911
|
* Sets the selected option(s)
|
|
911
912
|
*/
|
|
912
|
-
setSelectedOptions(
|
|
913
|
-
const
|
|
914
|
-
|
|
913
|
+
setSelectedOptions(t) {
|
|
914
|
+
const e = this.getAllOptions(), l = Array.isArray(t) ? t : [t];
|
|
915
|
+
e.forEach((n) => this.setOptionSelected(n, !1)), l.length && l.forEach((n) => this.setOptionSelected(n, !0)), this.selectionChanged();
|
|
915
916
|
}
|
|
916
917
|
/**
|
|
917
918
|
* Toggles an option's selected state
|
|
918
919
|
*/
|
|
919
|
-
toggleOptionSelection(
|
|
920
|
-
this.setOptionSelected(
|
|
920
|
+
toggleOptionSelection(t, e) {
|
|
921
|
+
this.setOptionSelected(t, e), this.selectionChanged();
|
|
921
922
|
}
|
|
922
923
|
/**
|
|
923
924
|
* This method must be called whenever the selection changes. It will update the selected options cache, the current
|
|
@@ -925,13 +926,13 @@ let i = class extends S {
|
|
|
925
926
|
*/
|
|
926
927
|
selectionChanged() {
|
|
927
928
|
this.selectedOptions = this.getAllOptions().filter(
|
|
928
|
-
(
|
|
929
|
-
), this.multiple ? (this.value = this.selectedOptions.map((
|
|
929
|
+
(t) => this.getOptionSelected(t)
|
|
930
|
+
), this.multiple ? (this.value = this.selectedOptions.map((t) => this.getOptionValue(t)), this.displayLabel = "") : (this.value = this.getOptionValue(this.selectedOptions[0]) ?? "", this.displayLabel = this.getOptionLabel(this.selectedOptions[0]) ?? ""), this.updateComplete.then(() => {
|
|
930
931
|
this.formControlController.updateValidity();
|
|
931
932
|
});
|
|
932
933
|
}
|
|
933
934
|
get tags() {
|
|
934
|
-
const
|
|
935
|
+
const t = this.hasSlotController.test("label"), l = (this.label ? !0 : !!t) ? this.size === "large" ? "medium" : "small" : this.size;
|
|
935
936
|
return this.selectedOptions.map((n, a) => {
|
|
936
937
|
if (a < this.maxOptionsVisible || this.maxOptionsVisible <= 0) {
|
|
937
938
|
const r = this.getTag(n, a);
|
|
@@ -943,16 +944,16 @@ let i = class extends S {
|
|
|
943
944
|
return A;
|
|
944
945
|
});
|
|
945
946
|
}
|
|
946
|
-
handleInvalid(
|
|
947
|
-
this.formControlController.setValidity(!1), this.formControlController.emitInvalidEvent(
|
|
947
|
+
handleInvalid(t) {
|
|
948
|
+
this.formControlController.setValidity(!1), this.formControlController.emitInvalidEvent(t);
|
|
948
949
|
}
|
|
949
950
|
handleDisabledChange() {
|
|
950
951
|
this.disabled && (this.open = !1, this.handleOpenChange());
|
|
951
952
|
}
|
|
952
953
|
handleValueChange() {
|
|
953
|
-
const
|
|
954
|
+
const t = this.getAllOptions(), e = Array.isArray(this.value) ? this.value : [this.value];
|
|
954
955
|
this.setSelectedOptions(
|
|
955
|
-
|
|
956
|
+
t.filter((l) => e.includes(this.getOptionValue(l)))
|
|
956
957
|
);
|
|
957
958
|
}
|
|
958
959
|
async handleNoDropdownChange() {
|
|
@@ -965,30 +966,30 @@ let i = class extends S {
|
|
|
965
966
|
this.inputBehavior === "filter" && this.filterOptionsByInput(), this.noResetCurrent || this.setCurrentOption(this.selectedOptions[0] || this.getFirstOption()), this.emit("cx-show"), this.addOpenListeners(), await x(this), this.listbox.hidden = !1, this.popup.active = !0, requestAnimationFrame(() => {
|
|
966
967
|
this.currentOption && this.setCurrentOption(this.currentOption);
|
|
967
968
|
});
|
|
968
|
-
const { keyframes:
|
|
969
|
+
const { keyframes: t, options: e } = _(this, "select.show", {
|
|
969
970
|
dir: this.localize.dir()
|
|
970
971
|
});
|
|
971
|
-
await y(this.popup.popup,
|
|
972
|
+
await y(this.popup.popup, t, e), this.currentOption && T(this.currentOption, this.listbox, "vertical", "auto"), this.emit("cx-after-show");
|
|
972
973
|
} else {
|
|
973
974
|
this.emit("cx-hide"), this.removeOpenListeners(), await x(this);
|
|
974
|
-
const { keyframes:
|
|
975
|
+
const { keyframes: t, options: e } = _(this, "select.hide", {
|
|
975
976
|
dir: this.localize.dir()
|
|
976
977
|
});
|
|
977
|
-
await y(this.popup.popup,
|
|
978
|
+
await y(this.popup.popup, t, e), this.listbox.hidden = !0, this.popup.active = !1, this.emit("cx-after-hide");
|
|
978
979
|
}
|
|
979
980
|
}
|
|
980
981
|
selectOptionByInput() {
|
|
981
|
-
const
|
|
982
|
-
for (const
|
|
983
|
-
if (this.getOptionLabel(
|
|
984
|
-
this.setCurrentOption(
|
|
982
|
+
const t = this.getAllOptions();
|
|
983
|
+
for (const e of t)
|
|
984
|
+
if (this.getOptionLabel(e).toLowerCase().startsWith(this.typeToSelectString)) {
|
|
985
|
+
this.setCurrentOption(e);
|
|
985
986
|
break;
|
|
986
987
|
}
|
|
987
988
|
}
|
|
988
989
|
filterOptionsByInput() {
|
|
989
|
-
const
|
|
990
|
-
for (const
|
|
991
|
-
this.filterCallback(
|
|
990
|
+
const t = this.getAllOptions();
|
|
991
|
+
for (const e of t)
|
|
992
|
+
this.filterCallback(e, this.typeToSelectString) ? (e.hidden = !1, e.style.display = "") : (e.hidden = !0, e.style.display = "none");
|
|
992
993
|
this.popup.style.removeProperty("--auto-size-available-width"), this.popup.style.removeProperty("--auto-size-available-height");
|
|
993
994
|
}
|
|
994
995
|
/** Shows the listbox. */
|
|
@@ -1020,19 +1021,19 @@ let i = class extends S {
|
|
|
1020
1021
|
return this.valueInput.reportValidity();
|
|
1021
1022
|
}
|
|
1022
1023
|
/** Sets a custom validation message. Pass an empty string to restore validity. */
|
|
1023
|
-
setCustomValidity(
|
|
1024
|
-
this.valueInput.setCustomValidity(
|
|
1024
|
+
setCustomValidity(t) {
|
|
1025
|
+
this.valueInput.setCustomValidity(t), this.formControlController.updateValidity();
|
|
1025
1026
|
}
|
|
1026
1027
|
/** Sets focus on the control. */
|
|
1027
|
-
focus(
|
|
1028
|
-
this.displayInput.focus(
|
|
1028
|
+
focus(t) {
|
|
1029
|
+
this.displayInput.focus(t);
|
|
1029
1030
|
}
|
|
1030
1031
|
/** Removes focus from the control. */
|
|
1031
1032
|
blur() {
|
|
1032
1033
|
this.displayInput.blur();
|
|
1033
1034
|
}
|
|
1034
1035
|
render() {
|
|
1035
|
-
const
|
|
1036
|
+
const t = this.hasSlotController.test("label"), e = this.hasSlotController.test("help-text"), l = this.label ? !0 : !!t, n = this.helpText ? !0 : !!e, a = 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, g = (this.multiple || this.useTag) && this.selectedOptions.length > 0;
|
|
1036
1037
|
return p`
|
|
1037
1038
|
<div
|
|
1038
1039
|
part="form-control"
|
|
@@ -1109,7 +1110,7 @@ let i = class extends S {
|
|
|
1109
1110
|
part="display-input"
|
|
1110
1111
|
class=${b({
|
|
1111
1112
|
"select__display-input": !0,
|
|
1112
|
-
"select__display-input--hidden": (this.multiple || this.useTag) && !this.hasFocus && !c,
|
|
1113
|
+
"select__display-input--hidden": (this.multiple || this.useTag) && !this.hasFocus && !c && !(this.open && this.inputBehavior === "filter"),
|
|
1113
1114
|
"select__display-input--large": this.size === "large",
|
|
1114
1115
|
"select__display-input--medium": this.size === "medium",
|
|
1115
1116
|
"select__display-input--small": this.size === "small"
|
|
@@ -1275,8 +1276,8 @@ s([
|
|
|
1275
1276
|
s([
|
|
1276
1277
|
o({
|
|
1277
1278
|
converter: {
|
|
1278
|
-
fromAttribute: (
|
|
1279
|
-
toAttribute: (
|
|
1279
|
+
fromAttribute: (t) => t.split(" "),
|
|
1280
|
+
toAttribute: (t) => Array.isArray(t) ? t.join(" ") : t
|
|
1280
1281
|
}
|
|
1281
1282
|
})
|
|
1282
1283
|
], i.prototype, "value", 2);
|
|
@@ -4,7 +4,7 @@ import { n as h, C as P } from "../chunks/lib-cortex-element.CVMmyPMC.js";
|
|
|
4
4
|
import { c as C } from "../chunks/component.styles.DMSLciL5.js";
|
|
5
5
|
import { c as O } from "../chunks/animate.El-MpOws.js";
|
|
6
6
|
import { c as w } from "../chunks/custom-element.L4WJXn1j.js";
|
|
7
|
-
import { L as E } from "../chunks/i18n.
|
|
7
|
+
import { L as E } from "../chunks/i18n.BUW7B9hr.js";
|
|
8
8
|
import { c as b } from "../chunks/math.DqTA6ya4.js";
|
|
9
9
|
import { w as m } from "../chunks/watch.BCJD77bD.js";
|
|
10
10
|
import { c as x } from "../chunks/dom.BQVKDNd8.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import b from "./divider.js";
|
|
2
2
|
import v from "./icon.js";
|
|
3
|
-
import { C as u } from "../chunks/icon-button.
|
|
3
|
+
import { C as u } from "../chunks/icon-button.C3eqeQl9.js";
|
|
4
4
|
import _ from "./resize-observer.js";
|
|
5
5
|
import { n, C as m } from "../chunks/lib-cortex-element.CVMmyPMC.js";
|
|
6
6
|
import { c as f } from "../chunks/component.styles.DMSLciL5.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as x } from "../chunks/icon-button.
|
|
1
|
+
import { C as x } from "../chunks/icon-button.C3eqeQl9.js";
|
|
2
2
|
import d from "./input.js";
|
|
3
3
|
import g from "./select.js";
|
|
4
4
|
import v from "./space.js";
|
|
@@ -7,7 +7,7 @@ import { n as u, C as P } from "../chunks/lib-cortex-element.CVMmyPMC.js";
|
|
|
7
7
|
import { c as $ } from "../chunks/component.styles.DMSLciL5.js";
|
|
8
8
|
import { c as b } from "../chunks/custom-element.L4WJXn1j.js";
|
|
9
9
|
import { d as _ } from "../chunks/default-value.COZopaet.js";
|
|
10
|
-
import { L as y } from "../chunks/i18n.
|
|
10
|
+
import { L as y } from "../chunks/i18n.BUW7B9hr.js";
|
|
11
11
|
import { w as V } from "../chunks/watch.BCJD77bD.js";
|
|
12
12
|
import { i as w, x as h } from "../chunks/lit-element.jLBm65_O.js";
|
|
13
13
|
import { r as c } from "../chunks/state.CSDxrqLd.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { C as c } from "../chunks/lib-cortex-element.CVMmyPMC.js";
|
|
2
2
|
import { c as l } from "../chunks/component.styles.DMSLciL5.js";
|
|
3
3
|
import { c as m } from "../chunks/custom-element.L4WJXn1j.js";
|
|
4
|
-
import { L as p } from "../chunks/i18n.
|
|
4
|
+
import { L as p } from "../chunks/i18n.BUW7B9hr.js";
|
|
5
5
|
import { i as d, x as h } from "../chunks/lit-element.jLBm65_O.js";
|
|
6
6
|
const f = d`
|
|
7
7
|
:host {
|
|
@@ -2,7 +2,7 @@ import { n, C as v } from "../chunks/lib-cortex-element.CVMmyPMC.js";
|
|
|
2
2
|
import { c as m } from "../chunks/component.styles.DMSLciL5.js";
|
|
3
3
|
import { c as u } from "../chunks/custom-element.L4WJXn1j.js";
|
|
4
4
|
import { d as g } from "../chunks/drag.DXEXVXPv.js";
|
|
5
|
-
import { L as f } from "../chunks/i18n.
|
|
5
|
+
import { L as f } from "../chunks/i18n.BUW7B9hr.js";
|
|
6
6
|
import { c as p } from "../chunks/math.DqTA6ya4.js";
|
|
7
7
|
import { w as c } from "../chunks/watch.BCJD77bD.js";
|
|
8
8
|
import { i as y, x } from "../chunks/lit-element.jLBm65_O.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./resize-observer.js";
|
|
2
2
|
import "../chunks/lib-cortex-element.CVMmyPMC.js";
|
|
3
3
|
import "../chunks/component.styles.DMSLciL5.js";
|
|
4
|
-
import { C as A } from "../chunks/tab-group.
|
|
4
|
+
import { C as A } from "../chunks/tab-group.G24wrely.js";
|
|
5
5
|
import "../chunks/custom-element.L4WJXn1j.js";
|
|
6
|
-
import "../chunks/i18n.
|
|
6
|
+
import "../chunks/i18n.BUW7B9hr.js";
|
|
7
7
|
import "../chunks/scroll.xtO5yojm.js";
|
|
8
8
|
import "../chunks/watch.BCJD77bD.js";
|
|
9
9
|
import "../chunks/dom.BQVKDNd8.js";
|
|
@@ -18,9 +18,9 @@ import "../chunks/guard.D4axKaMo.js";
|
|
|
18
18
|
import "../chunks/map.D8heArFD.js";
|
|
19
19
|
import "../chunks/style-map.llVFPd__.js";
|
|
20
20
|
import "../chunks/when.Dr1es41R.js";
|
|
21
|
-
import "../chunks/button.
|
|
21
|
+
import "../chunks/button.csCRiZzY.js";
|
|
22
22
|
import "./dropdown.js";
|
|
23
|
-
import "../chunks/icon-button.
|
|
23
|
+
import "../chunks/icon-button.C3eqeQl9.js";
|
|
24
24
|
import "./menu.js";
|
|
25
25
|
import "./menu-item.js";
|
|
26
26
|
import "./tab.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { n as a, C as v } from "../chunks/lib-cortex-element.CVMmyPMC.js";
|
|
2
2
|
import { c as u } from "../chunks/component.styles.DMSLciL5.js";
|
|
3
3
|
import { c as h } from "../chunks/custom-element.L4WJXn1j.js";
|
|
4
|
-
import { L as x } from "../chunks/i18n.
|
|
4
|
+
import { L as x } from "../chunks/i18n.BUW7B9hr.js";
|
|
5
5
|
import { H as f } from "../chunks/slot.j5oheLJC.js";
|
|
6
6
|
import { w as p } from "../chunks/watch.BCJD77bD.js";
|
|
7
7
|
import { i as b, x as d } from "../chunks/lit-element.jLBm65_O.js";
|
|
8
8
|
import { e as _ } from "../chunks/query.BBf1UFkC.js";
|
|
9
9
|
import { e as n } from "../chunks/class-map.BiVq-cVR.js";
|
|
10
|
-
import { C as g } from "../chunks/icon-button.
|
|
10
|
+
import { C as g } from "../chunks/icon-button.C3eqeQl9.js";
|
|
11
11
|
import y from "./line-clamp.js";
|
|
12
12
|
const w = b`
|
|
13
13
|
.tab {
|