@everchron/ec-shards 8.11.1 → 8.11.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/dist/ec-shards.js CHANGED
@@ -3618,1599 +3618,348 @@ function zo(e, s, t, a, n, i) {
3618
3618
  ], 10, Bo);
3619
3619
  }
3620
3620
  const Os = /* @__PURE__ */ _(Co, [["render", zo], ["__scopeId", "data-v-3fdbdfeb"]]);
3621
- const Io = {
3622
- name: "ecs-button-context",
3623
- emits: ["click"],
3624
- components: {
3625
- EcsIcon: M,
3626
- EcsFocusRing: L
3627
- },
3628
- props: {
3629
- /** If set, an icon will be added to the left of the button. The list of available icon names can be found [here](https://github.com/everchron/ec-shards/tree/main/src/assets/icons). */
3630
- icon: {
3631
- type: String,
3632
- default: null
3633
- },
3634
- /** Turns the button into a loading state. */
3635
- loading: {
3636
- type: Boolean,
3637
- default: !1
3638
- },
3639
- /** Context buttons can be used to set a specific text or annotation color on the selection. Pass any color value (HEX, RGBA). */
3640
- selectedColor: {
3641
- type: String,
3642
- default: null
3643
- },
3644
- /** Aria-label is needed for iconOnly buttons to improve accessibility for screenreaders. */
3645
- ariaLabel: {
3646
- type: String
3647
- }
3648
- },
3649
- computed: {
3650
- iconType() {
3651
- return this.loading ? "loading" : (this.icon && this.icon, this.icon);
3652
- },
3653
- iconOnly() {
3654
- return this.icon && !this.$slots.default;
3655
- },
3656
- selectedColorBackground() {
3657
- if (this.selectedColor)
3658
- return `background-color:${this.selectedColor};`;
3659
- },
3660
- selectedColorText() {
3661
- if (this.selectedColor)
3662
- return `color:${this.selectedColor};`;
3663
- }
3664
- },
3665
- mounted() {
3666
- this.iconOnly && (!this.ariaLabel || this.ariaLabel.trim());
3667
- }
3668
- }, Eo = ["aria-label", "aria-busy"];
3669
- function $o(e, s, t, a, n, i) {
3670
- const r = p("ecs-icon"), c = p("ecs-focus-ring");
3671
- return o(), l("button", {
3672
- class: v(["ecs-context-button", [t.loading ? "loading" : "", i.iconOnly ? "ecs-context-button-icon-only" : ""]]),
3673
- "aria-label": t.ariaLabel,
3674
- "aria-busy": t.loading || null,
3675
- style: B(i.selectedColorText),
3676
- onClick: s[0] || (s[0] = (d) => e.$emit("click", d))
3677
- }, [
3678
- t.icon || t.loading ? (o(), y(r, {
3679
- key: 0,
3680
- type: i.iconType,
3681
- size: "20"
3682
- }, null, 8, ["type"])) : u("", !0),
3683
- t.selectedColor ? (o(), l("div", {
3684
- key: 1,
3685
- class: "ecs-context-button-color",
3686
- style: B(i.selectedColorBackground)
3687
- }, null, 4)) : u("", !0),
3688
- m(e.$slots, "default", {}, void 0, !0),
3689
- b(c)
3690
- ], 14, Eo);
3621
+ function ut(e) {
3622
+ "@babel/helpers - typeof";
3623
+ return ut = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(s) {
3624
+ return typeof s;
3625
+ } : function(s) {
3626
+ return s && typeof Symbol == "function" && s.constructor === Symbol && s !== Symbol.prototype ? "symbol" : typeof s;
3627
+ }, ut(e);
3691
3628
  }
3692
- const yy = /* @__PURE__ */ _(Io, [["render", $o], ["__scopeId", "data-v-bbc83578"]]);
3693
- const Po = {
3694
- name: "ecs-context-button-group"
3695
- }, To = { class: "ecs-context-button-group" };
3696
- function Mo(e, s, t, a, n, i) {
3697
- return o(), l("div", To, [
3698
- m(e.$slots, "default", {}, void 0, !0)
3699
- ]);
3629
+ var Io = /^\s+/, Eo = /\s+$/;
3630
+ function S(e, s) {
3631
+ if (e = e || "", s = s || {}, e instanceof S)
3632
+ return e;
3633
+ if (!(this instanceof S))
3634
+ return new S(e, s);
3635
+ var t = $o(e);
3636
+ this._originalInput = e, this._r = t.r, this._g = t.g, this._b = t.b, this._a = t.a, this._roundA = Math.round(100 * this._a) / 100, this._format = s.format || t.format, this._gradientType = s.gradientType, this._r < 1 && (this._r = Math.round(this._r)), this._g < 1 && (this._g = Math.round(this._g)), this._b < 1 && (this._b = Math.round(this._b)), this._ok = t.ok;
3700
3637
  }
3701
- const by = /* @__PURE__ */ _(Po, [["render", Mo], ["__scopeId", "data-v-94a53b69"]]);
3702
- const Lo = {
3703
- name: "ecs-button-dialog",
3704
- emits: ["click"],
3705
- components: {
3706
- EcsIcon: M,
3707
- EcsFocusRing: L
3638
+ S.prototype = {
3639
+ isDark: function() {
3640
+ return this.getBrightness() < 128;
3708
3641
  },
3709
- props: {
3710
- /** If set, an icon will be added to the left of the button. The list of available icon names can be found [here](https://github.com/everchron/ec-shards/tree/main/src/assets/icons). */
3711
- icon: {
3712
- type: String,
3713
- default: null
3714
- },
3715
- /** Defines the type and function of the button. If not set, the button will be neutral (used for Cancel actions). */
3716
- type: {
3717
- type: String,
3718
- validator: (e) => ["danger", "confirm", "cancel"].includes(e),
3719
- default: "cancel"
3720
- },
3721
- /** Turns the button into a loading state. */
3722
- loading: Boolean
3642
+ isLight: function() {
3643
+ return !this.isDark();
3723
3644
  },
3724
- computed: {
3725
- typeClass() {
3726
- return this.type && this.type !== "" ? `ecs-dialog-footer-button-${this.type}` : this.type;
3727
- },
3728
- iconType() {
3729
- return this.loading ? "loading" : this.icon;
3730
- }
3731
- }
3732
- }, Oo = ["aria-busy"];
3733
- function Ao(e, s, t, a, n, i) {
3734
- const r = p("ecs-icon"), c = p("ecs-focus-ring");
3735
- return o(), l("button", {
3736
- onClick: s[0] || (s[0] = (d) => e.$emit("click", d)),
3737
- class: v([[i.typeClass, t.loading ? "loading" : ""], "ecs-dialog-footer-button"]),
3738
- "aria-busy": t.loading || null
3739
- }, [
3740
- t.icon || t.loading ? (o(), y(r, {
3741
- key: 0,
3742
- type: i.iconType
3743
- }, null, 8, ["type"])) : u("", !0),
3744
- m(e.$slots, "default", {}, void 0, !0),
3745
- b(c, {
3746
- radius: 12,
3747
- danger: t.type == "danger"
3748
- }, null, 8, ["danger"])
3749
- ], 10, Oo);
3750
- }
3751
- const ky = /* @__PURE__ */ _(Lo, [["render", Ao], ["__scopeId", "data-v-fe031b71"]]);
3752
- const No = {
3753
- name: "ecs-button-more",
3754
- emits: ["click"],
3755
- components: {
3756
- EcsIcon: M,
3757
- EcsFocusRing: L
3645
+ isValid: function() {
3646
+ return this._ok;
3758
3647
  },
3759
- props: {
3760
- /** Displays the button slightly highlighted. Should be used when the state the button triggers is currently visible. */
3761
- active: Boolean,
3762
- /** Defines the type of the button: `dropdown` shows a simple dropdown button, `ellipsis` shows a tiny (...) button, and `expand` is supposed to be used at the end of expandable lists and tables. */
3763
- type: {
3764
- type: String,
3765
- validator: (e) => ["dropdown", "dropdown-round", "ellipsis", "expand"].includes(e),
3766
- default: "dropdown"
3767
- },
3768
- /** Provide a meaningful label for the button to improve accessibility for screenreaders. */
3769
- ariaLabel: {
3770
- type: String
3771
- },
3772
- /** Disables the button and prevent pointer events. */
3773
- disabled: {
3774
- type: Boolean
3775
- }
3648
+ getOriginalInput: function() {
3649
+ return this._originalInput;
3776
3650
  },
3777
- computed: {
3778
- typeClass() {
3779
- return this.type && this.type !== "" ? `ecs-button-more-${this.type}` : this.type;
3780
- }
3651
+ getFormat: function() {
3652
+ return this._format;
3781
3653
  },
3782
- mounted() {
3783
- this.$slots.default === void 0 && (!this.ariaLabel || this.ariaLabel.trim());
3784
- }
3785
- }, Do = ["aria-label", "aria-disabled", "aria-expanded", "aria-haspopup", "disabled"];
3786
- function Fo(e, s, t, a, n, i) {
3787
- const r = p("ecs-icon"), c = p("ecs-focus-ring");
3788
- return o(), l("button", {
3789
- onClick: s[0] || (s[0] = (d) => e.$emit("click", d)),
3790
- "aria-label": t.ariaLabel,
3791
- "aria-disabled": t.disabled || null,
3792
- "aria-expanded": t.active || null,
3793
- "aria-haspopup": t.type == "dropdown" || null,
3794
- disabled: t.disabled || null,
3795
- class: v([
3796
- t.active ? "active" : "",
3797
- i.typeClass
3798
- ])
3799
- }, [
3800
- t.type == "ellipsis" ? (o(), y(r, {
3801
- key: 0,
3802
- type: "more",
3803
- size: "20",
3804
- color: "#FFF"
3805
- })) : u("", !0),
3806
- t.type == "dropdown" || t.type == "dropdown-round" ? (o(), y(r, {
3807
- key: 1,
3808
- type: "chevron-down",
3809
- size: "12",
3810
- color: "var(--color-gray-9)"
3811
- })) : u("", !0),
3812
- t.type === "expand" ? m(e.$slots, "default", { key: 2 }, void 0, !0) : u("", !0),
3813
- b(c)
3814
- ], 10, Do);
3815
- }
3816
- const As = /* @__PURE__ */ _(No, [["render", Fo], ["__scopeId", "data-v-faa154dd"]]);
3817
- const Ro = {
3818
- name: "ecs-button-table",
3819
- emits: ["click", "mouseover", "mouseleave"],
3820
- components: {
3821
- EcsIcon: M,
3822
- EcsFocusRing: L
3654
+ getAlpha: function() {
3655
+ return this._a;
3823
3656
  },
3824
- props: {
3825
- /** Displays the button in an active state. */
3826
- active: Boolean,
3827
- /** Show the button without a background color. */
3828
- subtle: {
3829
- type: Boolean,
3830
- default: !1
3831
- },
3832
- /** Button is visually toned down (text and icon are more gray than black). */
3833
- pale: {
3834
- type: Boolean,
3835
- default: !1
3836
- },
3837
- /** Sets the size of the button. */
3838
- size: {
3839
- type: String,
3840
- validator: (e) => ["md", "sml", null].includes(e),
3841
- default: "md"
3842
- },
3843
- /** If set, an icon will be added to the left of the button. The list of available icon names can be found [here](https://github.com/everchron/ec-shards/tree/main/src/assets/icons). */
3844
- icon: {
3845
- type: String
3846
- },
3847
- /** Text text inside the button. */
3848
- label: {
3849
- type: [String, Number]
3850
- },
3851
- /** Turns the button into disabled state, which disables all interactions and hover effects. */
3852
- disabled: {
3853
- type: Boolean,
3854
- default: !1
3855
- },
3856
- /** If set, a small arrow will show up on the right side of the button, to indicate an collapse/expand state. The direction of the button is determined by the `active` prop. */
3857
- chevron: {
3858
- type: Boolean,
3859
- default: !1
3860
- },
3861
- /** If set, the button will not show any effects that would indicate that you could interact with the button. This is usefull when the button is only used to show a specific count/label instead of triggering any actions. */
3862
- unreactive: {
3863
- type: Boolean,
3864
- default: !1
3865
- },
3866
- /** Turns the button into a loading state, which makes it appear disabled and replaces the default icon (if set) with a spinner. */
3867
- loading: {
3868
- type: Boolean,
3869
- default: !1
3870
- }
3657
+ getBrightness: function() {
3658
+ var s = this.toRgb();
3659
+ return (s.r * 299 + s.g * 587 + s.b * 114) / 1e3;
3871
3660
  },
3872
- computed: {
3873
- hasLabel() {
3874
- return this.label && this.label !== "" || this.label != null ? "has-label" : this.label;
3875
- },
3876
- sizeClass() {
3877
- return this.size && this.size !== "" ? `ecs-button-table-${this.size}` : this.size;
3878
- },
3879
- iconSize() {
3880
- return this.size == "sml" ? "16" : "20";
3881
- },
3882
- iconType() {
3883
- return this.loading ? "loading" : this.icon;
3884
- },
3885
- ariaDisabled() {
3886
- return this.disabled || this.unreactive ? !0 : null;
3887
- }
3888
- }
3889
- }, Vo = ["disabled", "aria-disabled", "aria-expanded", "aria-busy"], Ho = {
3890
- key: 1,
3891
- class: "button-label"
3892
- };
3893
- function qo(e, s, t, a, n, i) {
3894
- const r = p("ecs-icon"), c = p("ecs-focus-ring");
3895
- return o(), l("button", {
3896
- class: v(["ecs-button-table", [
3897
- t.active ? "active" : "",
3898
- i.hasLabel,
3899
- t.subtle ? "subtle" : "",
3900
- t.pale ? "pale" : "",
3901
- t.unreactive ? "unreactive" : "",
3902
- t.loading ? "loading" : "",
3903
- i.sizeClass
3904
- ]]),
3905
- disabled: t.disabled || null,
3906
- "aria-disabled": i.ariaDisabled,
3907
- "aria-expanded": t.active || null,
3908
- "aria-busy": t.loading || null,
3909
- onClick: s[0] || (s[0] = (d) => e.$emit("click", d)),
3910
- onMouseover: s[1] || (s[1] = (d) => e.$emit("mouseover", d)),
3911
- onMouseleave: s[2] || (s[2] = (d) => e.$emit("mouseleave", d))
3912
- }, [
3913
- t.icon || t.loading ? (o(), y(r, {
3914
- key: 0,
3915
- type: i.iconType,
3916
- size: i.iconSize
3917
- }, null, 8, ["type", "size"])) : u("", !0),
3918
- t.label != null ? (o(), l("div", Ho, x(t.label), 1)) : u("", !0),
3919
- t.chevron ? (o(), l("div", {
3920
- key: 2,
3921
- class: v(["chevron", t.active ? "expand" : ""])
3922
- }, null, 2)) : u("", !0),
3923
- b(c)
3924
- ], 42, Vo);
3925
- }
3926
- const Ns = /* @__PURE__ */ _(Ro, [["render", qo], ["__scopeId", "data-v-f5a891fe"]]);
3927
- const Wo = {
3928
- name: "ecs-toolbar-button-group"
3929
- }, jo = { class: "ecs-toolbar-button-group" };
3930
- function Go(e, s, t, a, n, i) {
3931
- return o(), l("div", jo, [
3932
- m(e.$slots, "default", {}, void 0, !0)
3933
- ]);
3934
- }
3935
- const Ht = /* @__PURE__ */ _(Wo, [["render", Go], ["__scopeId", "data-v-743ca90b"]]);
3936
- const Uo = {
3937
- name: "ecs-toolbar-icon-button",
3938
- emits: ["click"],
3939
- components: { EcsIcon: M, EcsFocusRing: L },
3940
- props: {
3941
- /** The icon type of the button. The list of available icon names can be found [here](https://github.com/everchron/ec-shards/tree/main/src/assets/icons). Note that only icons prefixed with `toolbar-` should be used here. */
3942
- icon: {
3943
- type: String,
3944
- required: !0
3945
- },
3946
- /** Renders a small secondary icon in the bottom left of the button. Should only used under special conditions, eg. to reflect a specifc state that can not be handled by the `active` prop. The list of available icon names can be found [here](https://github.com/everchron/ec-shards/tree/main/src/assets/icons). */
3947
- subIcon: {
3948
- type: String
3949
- },
3950
- /** When set, the icon is spinning. Should really only be used when the `icon` is set to `toolbar-refresh`. */
3951
- refresh: {
3952
- type: Boolean,
3953
- default: !1
3954
- },
3955
- /** Indicates that the button is activated. */
3956
- active: {
3957
- type: Boolean,
3958
- default: !1
3959
- },
3960
- /** Show the button in loading state. */
3961
- loading: {
3962
- type: Boolean,
3963
- default: !1
3964
- },
3965
- /** Adds a small blue badge to the upper right of the button. */
3966
- hasBadge: {
3967
- type: Boolean,
3968
- default: !1
3969
- },
3970
- /** Sets the aria-label attribute to improve accessibility. */
3971
- ariaLabel: {
3972
- type: String
3973
- //required: true
3974
- }
3661
+ getLuminance: function() {
3662
+ var s = this.toRgb(), t, a, n, i, r, c;
3663
+ return t = s.r / 255, a = s.g / 255, n = s.b / 255, t <= 0.03928 ? i = t / 12.92 : i = Math.pow((t + 0.055) / 1.055, 2.4), a <= 0.03928 ? r = a / 12.92 : r = Math.pow((a + 0.055) / 1.055, 2.4), n <= 0.03928 ? c = n / 12.92 : c = Math.pow((n + 0.055) / 1.055, 2.4), 0.2126 * i + 0.7152 * r + 0.0722 * c;
3975
3664
  },
3976
- computed: {
3977
- ariaBusy() {
3978
- return this.refresh || this.loading ? !0 : null;
3979
- }
3980
- }
3981
- }, Ko = ["aria-busy", "aria-label"], Yo = {
3982
- key: 0,
3983
- class: "badge"
3984
- }, Xo = { class: "sub-icon" };
3985
- function Zo(e, s, t, a, n, i) {
3986
- const r = p("ecs-icon"), c = p("ecs-focus-ring");
3987
- return o(), l("button", {
3988
- onClick: s[0] || (s[0] = (d) => e.$emit("click", d)),
3989
- "aria-busy": i.ariaBusy,
3990
- "aria-label": t.ariaLabel,
3991
- class: v(["ecs-toolbar-icon-button", [
3992
- t.refresh ? "refreshing" : "",
3993
- t.active ? "active" : "",
3994
- t.loading ? "loading" : ""
3995
- ]])
3996
- }, [
3997
- b(r, { type: t.icon }, null, 8, ["type"]),
3998
- t.hasBadge ? (o(), l("span", Yo)) : u("", !0),
3999
- f("div", Xo, [
4000
- t.subIcon ? (o(), y(r, {
4001
- key: 0,
4002
- type: t.subIcon,
4003
- size: "14"
4004
- }, null, 8, ["type"])) : u("", !0)
4005
- ]),
4006
- b(c)
4007
- ], 10, Ko);
4008
- }
4009
- const xy = /* @__PURE__ */ _(Uo, [["render", Zo], ["__scopeId", "data-v-098e1030"]]);
4010
- const Jo = {
4011
- name: "ecs-card",
4012
- emits: ["click"],
4013
- props: {
4014
- /** Unique ID */
4015
- id: {
4016
- type: [String, Number],
4017
- default: null
4018
- },
4019
- /** Indicates that this card is currently selected (most likely via a checkbox that is contained in the card). */
4020
- selected: {
4021
- type: Boolean,
4022
- default: !1
4023
- },
4024
- /** Indicates that this card is currently expanded. Adds a bit of spacing and a stronger shadow. */
4025
- expanded: {
4026
- type: Boolean,
4027
- default: !1
4028
- },
4029
- /** Determines if the card should have a :hover state. This usually applies when the card is clickable, or expandable. */
4030
- hover: {
4031
- type: Boolean,
4032
- default: !1
4033
- },
4034
- /** Shows a full-height progress bar in the background of the card. Should only be used for single row cards. Pass the current percentage value as `Number`. */
4035
- progress: {
4036
- type: Number,
4037
- default: null
4038
- },
4039
- /** Turns the whole card into a disabled state. This also blocks all interactions on card content. */
4040
- disabled: {
4041
- type: Boolean,
4042
- default: !1
4043
- }
3665
+ setAlpha: function(s) {
3666
+ return this._a = As(s), this._roundA = Math.round(100 * this._a) / 100, this;
4044
3667
  },
4045
- computed: {
4046
- itemId() {
4047
- return `item-${this.id}`;
4048
- }
4049
- }
4050
- }, Qo = ["id"], er = { class: "ecs-card-inner" }, tr = { class: "ecs-card-background" };
4051
- function sr(e, s, t, a, n, i) {
4052
- return o(), l("div", {
4053
- onClick: s[0] || (s[0] = (r) => e.$emit("click", r)),
4054
- class: v(["ecs-card", [
4055
- t.selected ? "ecs-card-selected" : "",
4056
- t.expanded ? "ecs-card-expanded" : "",
4057
- t.hover ? "ecs-card-hover" : "",
4058
- t.disabled ? "ecs-card-disabled" : ""
4059
- ]]),
4060
- id: i.itemId
4061
- }, [
4062
- f("div", er, [
4063
- m(e.$slots, "default", {}, void 0, !0)
4064
- ]),
4065
- f("div", tr, [
4066
- t.progress ? (o(), l("div", {
4067
- key: 0,
4068
- class: "progress",
4069
- style: B({ width: t.progress + "%" })
4070
- }, null, 4)) : u("", !0)
4071
- ])
4072
- ], 10, Qo);
4073
- }
4074
- const wy = /* @__PURE__ */ _(Jo, [["render", sr], ["__scopeId", "data-v-8d449816"]]);
4075
- const ir = {
4076
- name: "ecs-citation-line",
4077
- emits: ["change", "blur", "focus"],
4078
- components: { EcsFlexRow: Me },
4079
- props: {
4080
- /** The citation range text. */
4081
- cite: {
4082
- type: String,
4083
- required: !0
4084
- },
4085
- /** Unique citation ID */
4086
- id: {
4087
- type: [String, Number],
4088
- required: !0
4089
- },
4090
- /** Determines the visual state of the citation line. */
4091
- state: {
4092
- type: String,
4093
- validator: (e) => ["default", "error", "warning", "edited", "skipped"].includes(e),
4094
- default: "default"
4095
- },
4096
- /** Makes the content of the citation line editable. */
4097
- editable: {
4098
- type: Boolean,
4099
- default: !0
4100
- }
3668
+ toHsv: function() {
3669
+ var s = ls(this._r, this._g, this._b);
3670
+ return {
3671
+ h: s.h * 360,
3672
+ s: s.s,
3673
+ v: s.v,
3674
+ a: this._a
3675
+ };
4101
3676
  },
4102
- data() {
3677
+ toHsvString: function() {
3678
+ var s = ls(this._r, this._g, this._b), t = Math.round(s.h * 360), a = Math.round(s.s * 100), n = Math.round(s.v * 100);
3679
+ return this._a == 1 ? "hsv(" + t + ", " + a + "%, " + n + "%)" : "hsva(" + t + ", " + a + "%, " + n + "%, " + this._roundA + ")";
3680
+ },
3681
+ toHsl: function() {
3682
+ var s = rs(this._r, this._g, this._b);
4103
3683
  return {
4104
- citeValue: this.cite
3684
+ h: s.h * 360,
3685
+ s: s.s,
3686
+ l: s.l,
3687
+ a: this._a
4105
3688
  };
4106
3689
  },
4107
- mounted() {
4108
- this.$refs.editable.innerText = this.citeValue;
3690
+ toHslString: function() {
3691
+ var s = rs(this._r, this._g, this._b), t = Math.round(s.h * 360), a = Math.round(s.s * 100), n = Math.round(s.l * 100);
3692
+ return this._a == 1 ? "hsl(" + t + ", " + a + "%, " + n + "%)" : "hsla(" + t + ", " + a + "%, " + n + "%, " + this._roundA + ")";
4109
3693
  },
4110
- methods: {
4111
- onInput(e) {
4112
- this.citeValue = e.target.innerText, this.$emit("change", this.citeValue, this.id);
4113
- }
4114
- }
4115
- }, nr = ["contenteditable"];
4116
- function ar(e, s, t, a, n, i) {
4117
- const r = p("ecs-flex-row");
4118
- return o(), y(r, { class: "ecs-citation-line" }, {
4119
- default: w(() => [
4120
- f("div", {
4121
- class: v(["ecs-citation-line-cite", [t.state, t.editable ? "editable" : ""]]),
4122
- ref: "editable",
4123
- onKeyup: s[0] || (s[0] = (...c) => i.onInput && i.onInput(...c)),
4124
- onBlur: s[1] || (s[1] = (c) => e.$emit("blur", c)),
4125
- onFocus: s[2] || (s[2] = (c) => e.$emit("focus", c)),
4126
- onKeydown: s[3] || (s[3] = U(G(() => {
4127
- }, ["prevent"]), ["enter"])),
4128
- contenteditable: t.editable
4129
- }, null, 42, nr),
4130
- e.$slots.actions ? (o(), y(r, {
4131
- key: 0,
4132
- justify: "end",
4133
- class: "ecs-citation-line-actions"
4134
- }, {
4135
- default: w(() => [
4136
- m(e.$slots, "actions", {}, void 0, !0)
4137
- ]),
4138
- _: 3
4139
- })) : u("", !0)
4140
- ]),
4141
- _: 3
4142
- });
4143
- }
4144
- const Sy = /* @__PURE__ */ _(ir, [["render", ar], ["__scopeId", "data-v-cfd8e718"]]);
4145
- var qt = {};
4146
- Object.defineProperty(qt, "__esModule", {
4147
- value: !0
4148
- });
4149
- var or = qt.clickOutSide = {
4150
- mounted: function(s, t, a) {
4151
- s.clickOutsideEvent = function(n) {
4152
- s == n.target || s.contains(n.target) || t.value(n, s);
4153
- }, document.addEventListener("click", s.clickOutsideEvent);
3694
+ toHex: function(s) {
3695
+ return cs(this._r, this._g, this._b, s);
4154
3696
  },
4155
- unmounted: function(s) {
4156
- document.removeEventListener("click", s.clickOutsideEvent);
4157
- }
4158
- }, rr = qt.default = or;
4159
- const lr = {
4160
- name: "ecs-context-menu",
4161
- emits: ["option-clicked", "menu-closed"],
4162
- components: { EcsIcon: M, EcsFocusRing: L, EcsButton: Se },
4163
- directives: {
4164
- clickOutSide: rr
3697
+ toHexString: function(s) {
3698
+ return "#" + this.toHex(s);
4165
3699
  },
4166
- props: {
4167
- /** Unique String that acts as the id for the menu. */
4168
- elementId: {
4169
- type: String,
4170
- required: !0
4171
- },
4172
- /** Array of menu options to show. Component will use the `name` parameter as the label. Array needs to contain objects with the following structure:
4173
- ```{
4174
- name: 'Duplicate',
4175
- slug: 'duplicate',
4176
- icon: 'evidence',
4177
- disabled: false,
4178
- type: '',
4179
- nested: { ... }
4180
- }``` */
4181
- options: {
4182
- type: Array,
4183
- required: !0
4184
- },
4185
- /** If passed, an icon will appear. The list of available icon names can be found [here](https://github.com/everchron/ec-shards/tree/main/src/assets/icons). */
4186
- icon: {
4187
- type: String
4188
- }
3700
+ toHex8: function(s) {
3701
+ return Lo(this._r, this._g, this._b, this._a, s);
4189
3702
  },
4190
- data() {
3703
+ toHex8String: function(s) {
3704
+ return "#" + this.toHex8(s);
3705
+ },
3706
+ toRgb: function() {
4191
3707
  return {
4192
- item: null,
4193
- menuWidth: null,
4194
- menuHeight: null,
4195
- opened: !1,
4196
- left: 0,
4197
- top: 0
3708
+ r: Math.round(this._r),
3709
+ g: Math.round(this._g),
3710
+ b: Math.round(this._b),
3711
+ a: this._a
4198
3712
  };
4199
3713
  },
4200
- computed: {
4201
- postionStyles() {
4202
- return { left: this.left + "px", top: this.top + "px" };
4203
- }
3714
+ toRgbString: function() {
3715
+ return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")";
4204
3716
  },
4205
- methods: {
4206
- showMenu(e, s) {
4207
- this.item = s;
4208
- let t = document.getElementById(this.elementId);
4209
- t && ((!this.menuWidth || !this.menuHeight) && (t.style.visibility = "hidden", t.style.display = "block", this.menuWidth = t.offsetWidth, this.menuHeight = t.offsetHeight, t.removeAttribute("style")), this.menuWidth + e.pageX >= window.innerWidth ? this.left = e.pageX - this.menuWidth + 2 : this.left = e.pageX - 2, this.menuHeight + e.pageY >= window.innerHeight ? this.top = e.pageY - this.menuHeight + 2 : this.top = e.pageY - 2, this.opened = !0, this.$emit("menu-opened", this.item), this.$nextTick(() => {
4210
- this.$refs.menu.focus();
4211
- }));
4212
- },
4213
- hideContextMenu() {
4214
- document.getElementById(this.elementId) && (this.opened = !1, this.$emit("menu-closed"));
4215
- },
4216
- onClickOutside() {
4217
- this.hideContextMenu();
4218
- },
4219
- optionClicked(e) {
4220
- this.hideContextMenu(), this.$emit("option-clicked", {
4221
- item: this.item,
4222
- option: e
4223
- });
4224
- },
4225
- onEscKeyRelease(e) {
4226
- e.keyCode === 27 && this.hideContextMenu();
4227
- },
4228
- // Focus the first menu item when the context menu opens
4229
- focusFirst() {
4230
- this.$refs.menu.children[0].focus();
4231
- },
4232
- // Focus the last menu item when the user presses the up arrow key on the first menu item
4233
- focusLast() {
4234
- const e = this.$refs.menu.children;
4235
- e[e.length - 1].focus();
4236
- },
4237
- // Focus the previous menu item when the user presses the up arrow key
4238
- focusPrevious(e) {
4239
- const s = this.$refs.menu.children, t = Array.prototype.indexOf.call(s, e.target);
4240
- if (t > 0) {
4241
- let a = t - 1;
4242
- for (; a >= 0 && s[a].getAttribute("tabindex") === "-1"; )
4243
- a--;
4244
- a >= 0 ? s[a].focus() : this.focusLast();
4245
- } else
4246
- this.focusLast();
4247
- },
4248
- focusNext(e) {
4249
- const s = this.$refs.menu.children;
4250
- let t = Array.prototype.indexOf.call(s, e.target);
4251
- for (; t < s.length - 1; )
4252
- if (t++, s[t].getAttribute("tabindex") !== "-1") {
4253
- s[t].focus();
4254
- return;
4255
- }
4256
- this.focusFirst();
4257
- }
3717
+ toPercentageRgb: function() {
3718
+ return {
3719
+ r: Math.round(H(this._r, 255) * 100) + "%",
3720
+ g: Math.round(H(this._g, 255) * 100) + "%",
3721
+ b: Math.round(H(this._b, 255) * 100) + "%",
3722
+ a: this._a
3723
+ };
4258
3724
  },
4259
- mounted() {
4260
- document.body.addEventListener("keyup", this.onEscKeyRelease), this.$refs.menu.addEventListener("keydown", (e) => {
4261
- e.keyCode === 9 && (e.preventDefault(), this.focusFirst());
4262
- });
3725
+ toPercentageRgbString: function() {
3726
+ return this._a == 1 ? "rgb(" + Math.round(H(this._r, 255) * 100) + "%, " + Math.round(H(this._g, 255) * 100) + "%, " + Math.round(H(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(H(this._r, 255) * 100) + "%, " + Math.round(H(this._g, 255) * 100) + "%, " + Math.round(H(this._b, 255) * 100) + "%, " + this._roundA + ")";
4263
3727
  },
4264
- beforeUnmount() {
4265
- document.removeEventListener("keyup", this.onEscKeyRelease);
4266
- }
4267
- }, cr = ["id"], dr = ["onClick", "role", "tabindex", "aria-disabled"], ur = { key: 1 };
4268
- function fr(e, s, t, a, n, i) {
4269
- const r = p("ecs-icon"), c = p("ecs-button"), d = p("ecs-focus-ring"), g = oi("click-out-side");
4270
- return Ge((o(), l("div", {
4271
- class: v(["ecs-context-menu", n.opened ? " opened" : ""]),
4272
- id: t.elementId,
4273
- style: B([i.postionStyles])
4274
- }, [
4275
- f("ul", {
4276
- role: "menu",
4277
- "aria-orientation": "vertical",
4278
- tabindex: "0",
4279
- onKeydown: [
4280
- s[0] || (s[0] = U(G((...h) => i.focusPrevious && i.focusPrevious(...h), ["prevent"]), ["up"])),
4281
- s[1] || (s[1] = U(G((...h) => i.focusNext && i.focusNext(...h), ["prevent"]), ["down"]))
4282
- ],
4283
- ref: "menu",
4284
- id: "my-menu"
4285
- }, [
4286
- (o(!0), l(Z, null, ge(t.options, (h, k) => (o(), l("li", {
4287
- key: k,
4288
- onClick: G((z) => i.optionClicked(h), ["stop"]),
4289
- role: h.type === "divider" ? "separator" : "menuitem",
4290
- tabindex: h.type === "divider" || h.disabled ? "-1" : "0",
4291
- "aria-disabled": h.disabled || null,
4292
- class: v([
4293
- h.type === "divider" ? "ecs-context-menu-divider" : "ecs-context-menu-item",
4294
- h.type === "danger" ? "danger" : "",
4295
- h.disabled ? "disabled" : ""
4296
- ])
4297
- }, [
4298
- h.icon ? (o(), y(r, {
4299
- key: 0,
4300
- type: h.icon,
4301
- size: "20"
4302
- }, null, 8, ["type"])) : u("", !0),
4303
- h.type != "divider" ? (o(), l("span", ur, x(h.name), 1)) : u("", !0),
4304
- h.nested ? (o(), y(c, {
4305
- key: 2,
4306
- onClick: G((z) => i.optionClicked(h.nested), ["stop"]),
4307
- icon: h.nested.icon,
4308
- title: h.nested.name,
4309
- "aria-label": h.nested.name,
4310
- disabled: h.nested.disabled || null,
4311
- type: "secondary",
4312
- "icon-only": "",
4313
- size: "sml"
4314
- }, null, 8, ["onClick", "icon", "title", "aria-label", "disabled"])) : u("", !0),
4315
- b(d, {
4316
- danger: h.type == "danger"
4317
- }, null, 8, ["danger"])
4318
- ], 10, dr))), 128))
4319
- ], 544)
4320
- ], 14, cr)), [
4321
- [g, i.onClickOutside]
4322
- ]);
4323
- }
4324
- const Cy = /* @__PURE__ */ _(lr, [["render", fr], ["__scopeId", "data-v-7a99d0e5"]]);
4325
- const pr = {
4326
- name: "ecs-collapse",
4327
- emits: ["toggled", "remove"],
4328
- components: { EcsButton: Se, EcsFocusRing: L, EcsFlexRow: Me },
4329
- props: {
4330
- /** Unique ID, is required to handle persist states. */
4331
- id: {
4332
- type: String,
4333
- required: !0
4334
- },
4335
- /** The headline of the collapse control. */
4336
- title: {
4337
- type: String,
4338
- required: !0
4339
- },
4340
- /** Determines the padding of the headline and content sections. */
4341
- indent: {
4342
- type: String,
4343
- validator: (e) => ["sml", "md", null].includes(e),
4344
- default: null
4345
- },
4346
- /** Determines the padding of the headline section alone. */
4347
- headlineIndent: {
4348
- type: String,
4349
- validator: (e) => ["sml", "md", null].includes(e),
4350
- default: null
4351
- },
4352
- /** Displays a border above the headline section. */
4353
- borderTop: {
4354
- type: Boolean
4355
- },
4356
- /** Displays a border below the content section. */
4357
- borderBottom: {
4358
- type: Boolean
4359
- },
4360
- /** Makes the headline to render in font-weight bold. */
4361
- headlineBold: {
4362
- type: Boolean
4363
- },
4364
- /** Determines the initial state of the control. If set to `true`, the collapse is expanded on mount. */
4365
- visible: {
4366
- type: Boolean
4367
- },
4368
- /** If set, a small (-) remove button is rendered in the headline section. */
4369
- removable: {
4370
- type: Boolean
4371
- },
4372
- /** Sets the tooltip title of the remove button. */
4373
- removableTooltip: {
4374
- type: String
4375
- },
4376
- /** Saves the state of the collapse control in localstorage and reads the state on next mount, to automatically set it to expanded or collapsed. */
4377
- persist: {
4378
- type: Boolean,
4379
- default: !0
4380
- },
4381
- /** Sets the top and bottom padding of the content section. */
4382
- contentPadding: {
4383
- type: String,
4384
- validator: (e) => ["none", "sml", "md"].includes(e),
4385
- default: "md"
4386
- },
4387
- /** Sets the count of the collapse control in parenthese next to the headline. */
4388
- count: {
4389
- type: Number
3728
+ toName: function() {
3729
+ return this._a === 0 ? "transparent" : this._a < 1 ? !1 : Go[cs(this._r, this._g, this._b, !0)] || !1;
3730
+ },
3731
+ toFilter: function(s) {
3732
+ var t = "#" + ds(this._r, this._g, this._b, this._a), a = t, n = this._gradientType ? "GradientType = 1, " : "";
3733
+ if (s) {
3734
+ var i = S(s);
3735
+ a = "#" + ds(i._r, i._g, i._b, i._a);
4390
3736
  }
3737
+ return "progid:DXImageTransform.Microsoft.gradient(" + n + "startColorstr=" + t + ",endColorstr=" + a + ")";
4391
3738
  },
4392
- data() {
4393
- return {
4394
- isVisible: this.visible
4395
- };
3739
+ toString: function(s) {
3740
+ var t = !!s;
3741
+ s = s || this._format;
3742
+ var a = !1, n = this._a < 1 && this._a >= 0, i = !t && n && (s === "hex" || s === "hex6" || s === "hex3" || s === "hex4" || s === "hex8" || s === "name");
3743
+ return i ? s === "name" && this._a === 0 ? this.toName() : this.toRgbString() : (s === "rgb" && (a = this.toRgbString()), s === "prgb" && (a = this.toPercentageRgbString()), (s === "hex" || s === "hex6") && (a = this.toHexString()), s === "hex3" && (a = this.toHexString(!0)), s === "hex4" && (a = this.toHex8String(!0)), s === "hex8" && (a = this.toHex8String()), s === "name" && (a = this.toName()), s === "hsl" && (a = this.toHslString()), s === "hsv" && (a = this.toHsvString()), a || this.toHexString());
4396
3744
  },
4397
- computed: {
4398
- indentation() {
4399
- return this.indent && this.indent !== "" ? `ecs-collapsable-indent-${this.indent}` : this.indent;
4400
- },
4401
- headlineIndentation() {
4402
- return this.headlineIndent && this.headlineIndent !== "" ? `ecs-collapsable-headline-indent-${this.headlineIndent}` : this.headlineIndent;
4403
- },
4404
- removeButtonIndentation() {
4405
- return this.headlineIndent && this.headlineIndent !== "" ? `remove-button-indent-${this.headlineIndent}` : this.indent && this.indent !== "" ? `remove-button-indent-${this.indent}` : this.headlineIndent;
4406
- },
4407
- contentPaddingClass() {
4408
- return `ecs-collapsable-content-padding-${this.contentPadding}`;
4409
- }
3745
+ clone: function() {
3746
+ return S(this.toString());
4410
3747
  },
4411
- mounted() {
4412
- this.$nextTick(() => {
4413
- this.persist && (localStorage.getItem(`collapse-${this.id}`) === null ? (this.isVisible = this.visible, localStorage.setItem(`collapse-${this.id}`, this.isVisible)) : this.isVisible = localStorage.getItem(`collapse-${this.id}`) == "true");
4414
- });
3748
+ _applyModification: function(s, t) {
3749
+ var a = s.apply(null, [this].concat([].slice.call(t)));
3750
+ return this._r = a._r, this._g = a._g, this._b = a._b, this.setAlpha(a._a), this;
4415
3751
  },
4416
- methods: {
4417
- toggleCollapse() {
4418
- this.isVisible = !this.isVisible, this.persist && localStorage.setItem(`collapse-${this.id}`, this.isVisible), this.$emit("toggled", this.id, this.isVisible);
4419
- }
3752
+ lighten: function() {
3753
+ return this._applyModification(Do, arguments);
4420
3754
  },
4421
- watch: {
4422
- visible() {
4423
- this.isVisible = this.visible;
4424
- }
4425
- }
4426
- }, gr = { class: "wrap" }, mr = ["aria-expanded", "aria-controls"], hr = {
4427
- key: 0,
4428
- class: "ecs-collapsable-headline-count"
4429
- }, vr = {
4430
- key: 0,
4431
- class: "ecs-collapsable-headline-controls"
4432
- }, _r = ["id", "aria-hidden"];
4433
- function yr(e, s, t, a, n, i) {
4434
- const r = p("ecs-button"), c = p("ecs-flex-row"), d = p("ecs-focus-ring");
4435
- return o(), l("div", {
4436
- class: v(["ecs-collapsable", [
4437
- t.borderTop ? "ecs-collapsable-border-top" : "",
4438
- t.borderBottom ? "ecs-collapsable-border-bottom" : "",
4439
- i.indentation,
4440
- i.headlineIndentation
4441
- ]])
4442
- }, [
4443
- f("div", gr, [
4444
- t.removable ? (o(), y(r, {
4445
- key: 0,
4446
- onClick: s[0] || (s[0] = (g) => e.$emit("remove", t.id)),
4447
- type: "secondary",
4448
- "icon-only": "",
4449
- icon: "minus",
4450
- size: "sml",
4451
- class: v(["remove-button", i.removeButtonIndentation]),
4452
- title: t.removableTooltip,
4453
- "aria-label": t.removableTooltip
4454
- }, null, 8, ["class", "title", "aria-label"])) : u("", !0),
4455
- f("h3", {
4456
- onClick: s[1] || (s[1] = (...g) => i.toggleCollapse && i.toggleCollapse(...g)),
4457
- onKeydown: s[2] || (s[2] = U(G((...g) => i.toggleCollapse && i.toggleCollapse(...g), ["prevent"]), ["space"])),
4458
- role: "button",
4459
- class: v(["ecs-collapsable-headline", [t.headlineBold ? "ecs-headline-section-bold" : "ecs-headline-section", n.isVisible ? "" : "collapsed"]]),
4460
- tabindex: "0",
4461
- "aria-expanded": n.isVisible ? "true" : "false",
4462
- "aria-controls": `collapse-${this.id}`
4463
- }, [
4464
- b(c, { gap: 4 }, {
4465
- default: w(() => [
4466
- D(x(t.title) + " ", 1),
4467
- t.count ? (o(), l("span", hr, "(" + x(t.count) + ")", 1)) : u("", !0)
4468
- ]),
4469
- _: 1
4470
- }),
4471
- b(d, {
4472
- inset: 0,
4473
- radius: 0
4474
- }),
4475
- e.$slots.controls ? (o(), l("div", vr, [
4476
- m(e.$slots, "controls", {}, void 0, !0)
4477
- ])) : u("", !0)
4478
- ], 42, mr)
4479
- ]),
4480
- f("div", {
4481
- class: v([n.isVisible ? "collapse-show" : "collapse-hide", "collapse"]),
4482
- id: `collapse-${this.id}`,
4483
- "aria-hidden": n.isVisible ? "false" : "true"
4484
- }, [
4485
- f("div", {
4486
- class: v(["ecs-collapsable-content", i.contentPaddingClass])
4487
- }, [
4488
- m(e.$slots, "default", {}, void 0, !0)
4489
- ], 2)
4490
- ], 10, _r)
4491
- ], 2);
4492
- }
4493
- const By = /* @__PURE__ */ _(pr, [["render", yr], ["__scopeId", "data-v-4bf981c8"]]);
4494
- const br = {
4495
- name: "ecs-collection-control",
4496
- emits: ["toggled", "collectionTooltip"],
4497
- components: { EcsIcon: M, EcsFocusRing: L },
4498
- mixins: [de],
4499
- props: {
4500
- /** Icon representing the type of selection. The list of available icon names can be found [here](https://github.com/everchron/ec-shards/tree/main/src/assets/icons). */
4501
- icon: {
4502
- type: String
4503
- },
4504
- /** The size of the collection control. */
4505
- size: {
4506
- type: String,
4507
- validator: (e) => ["md", "lg"].includes(e),
4508
- default: "lg"
4509
- },
4510
- /** If set to true, the control will appear expanded by default. */
4511
- visible: {
4512
- type: Boolean,
4513
- default: !1
4514
- },
4515
- /** The label that describes the type of selected objects. E.g. "Users: " */
4516
- label: {
4517
- type: String
4518
- },
4519
- /** Option to disable the outer borders of the control. */
4520
- noBorder: {
4521
- type: Boolean,
4522
- default: !1
4523
- },
4524
- /** Array of the currently selected objects. Must contain `name` and `value` for each object. */
4525
- collection: {
4526
- type: Array,
4527
- required: !0
4528
- },
4529
- /** Optional maximum height of the object list in pixels. If the list exceeds the maximum height, a scrollbar appears. */
4530
- maxHeight: {
4531
- type: Number,
4532
- default: null
4533
- },
4534
- /** Makes the control non-interactive and removes all checkboxes from the list items. */
4535
- nonInteractive: {
4536
- type: Boolean,
4537
- default: !1
4538
- }
3755
+ brighten: function() {
3756
+ return this._applyModification(Fo, arguments);
4539
3757
  },
4540
- data() {
4541
- return {
4542
- isVisible: this.visible,
4543
- expandId: ""
4544
- };
3758
+ darken: function() {
3759
+ return this._applyModification(Ro, arguments);
4545
3760
  },
4546
- computed: {
4547
- iconSize() {
4548
- return this.size === "md" ? "24px" : "30px";
4549
- },
4550
- fullTooltip() {
4551
- return this.collection.filter((s) => s.value).map((s) => s.name).join(", ");
4552
- },
4553
- listMaxHeight() {
4554
- return this.maxHeight ? `max-height: ${this.maxHeight}px` : null;
4555
- }
3761
+ desaturate: function() {
3762
+ return this._applyModification(Oo, arguments);
4556
3763
  },
4557
- methods: {
4558
- toggleCollapse() {
4559
- this.nonInteractive || (this.isVisible = !this.isVisible), this.$emit("toggled", this.id, this.isVisible);
4560
- },
4561
- toggleTooltip() {
4562
- this.$emit("collectionTooltip", this.fullTooltip);
4563
- }
3764
+ saturate: function() {
3765
+ return this._applyModification(Ao, arguments);
4564
3766
  },
4565
- watch: {
4566
- visible() {
4567
- this.isVisible = this.visible;
4568
- }
3767
+ greyscale: function() {
3768
+ return this._applyModification(No, arguments);
4569
3769
  },
4570
- created() {
4571
- this.expandId = this.generateUniqueId();
3770
+ spin: function() {
3771
+ return this._applyModification(Vo, arguments);
3772
+ },
3773
+ _applyCombination: function(s, t) {
3774
+ return s.apply(null, [this].concat([].slice.call(t)));
3775
+ },
3776
+ analogous: function() {
3777
+ return this._applyCombination(Wo, arguments);
3778
+ },
3779
+ complement: function() {
3780
+ return this._applyCombination(Ho, arguments);
3781
+ },
3782
+ monochromatic: function() {
3783
+ return this._applyCombination(jo, arguments);
3784
+ },
3785
+ splitcomplement: function() {
3786
+ return this._applyCombination(qo, arguments);
3787
+ },
3788
+ // Disabled until https://github.com/bgrins/TinyColor/issues/254
3789
+ // polyad: function (number) {
3790
+ // return this._applyCombination(polyad, [number]);
3791
+ // },
3792
+ triad: function() {
3793
+ return this._applyCombination(us, [3]);
3794
+ },
3795
+ tetrad: function() {
3796
+ return this._applyCombination(us, [4]);
4572
3797
  }
4573
- }, kr = ["tabindex", "role", "aria-expanded", "aria-controls"], xr = {
4574
- key: 1,
4575
- class: "description"
4576
- }, wr = ["title"], Sr = { key: 0 }, Cr = ["id", "aria-hidden"];
4577
- function Br(e, s, t, a, n, i) {
4578
- const r = p("ecs-focus-ring"), c = p("ecs-icon");
4579
- return o(), l("div", {
4580
- class: v(["ecs-collection-control", [
4581
- t.noBorder ? "" : "bordered",
4582
- n.isVisible || t.nonInteractive ? "" : "collapsed",
4583
- t.size
4584
- ]])
4585
- }, [
4586
- f("div", {
4587
- onClick: s[2] || (s[2] = (...d) => i.toggleCollapse && i.toggleCollapse(...d)),
4588
- onKeydown: [
4589
- s[3] || (s[3] = U(G((...d) => i.toggleCollapse && i.toggleCollapse(...d), ["prevent"]), ["enter"])),
4590
- s[4] || (s[4] = U(G((...d) => i.toggleCollapse && i.toggleCollapse(...d), ["prevent"]), ["space"]))
4591
- ],
4592
- class: v(["ecs-collection-control-header", [
4593
- n.isVisible || t.nonInteractive ? "" : "collapsed",
4594
- t.nonInteractive ? "" : "interactive"
4595
- ]]),
4596
- tabindex: t.nonInteractive ? "-1" : "0",
4597
- role: t.nonInteractive ? !1 : "button",
4598
- "aria-expanded": t.nonInteractive ? "false" : n.isVisible ? "true" : "false",
4599
- "aria-controls": t.nonInteractive ? !1 : n.expandId
4600
- }, [
4601
- b(r),
4602
- t.icon ? (o(), y(c, {
4603
- key: 0,
4604
- type: t.icon,
4605
- color: "#858E9E",
4606
- size: i.iconSize
4607
- }, null, 8, ["type", "size"])) : u("", !0),
4608
- t.label ? (o(), l("div", xr, x(t.label), 1)) : u("", !0),
4609
- f("div", {
4610
- class: "collection",
4611
- onMouseover: s[0] || (s[0] = (...d) => i.toggleTooltip && i.toggleTooltip(...d)),
4612
- onMouseleave: s[1] || (s[1] = (...d) => i.toggleTooltip && i.toggleTooltip(...d)),
4613
- title: i.fullTooltip
4614
- }, [
4615
- (o(!0), l(Z, null, ge(t.collection, (d) => (o(), l("span", {
4616
- key: d.name
4617
- }, [
4618
- d.value ? (o(), l("span", Sr, x(d.name), 1)) : u("", !0)
4619
- ]))), 128))
4620
- ], 40, wr)
4621
- ], 42, kr),
4622
- f("div", {
4623
- class: v([n.isVisible || t.nonInteractive ? "collapse-show" : "collapse-hide", "collapse"]),
4624
- id: t.nonInteractive ? !1 : n.expandId,
4625
- "aria-hidden": n.isVisible ? "false" : "true"
4626
- }, [
4627
- f("div", {
4628
- class: "ecs-collection-control-list scrollbar scrollbar-sml",
4629
- style: B(i.listMaxHeight)
4630
- }, [
4631
- m(e.$slots, "default")
4632
- ], 4)
4633
- ], 10, Cr)
4634
- ], 2);
4635
- }
4636
- const zy = /* @__PURE__ */ _(br, [["render", Br], ["__scopeId", "data-v-5e5716bc"]]);
4637
- const zr = {
4638
- name: "ecs-skeleton-loader",
4639
- props: {
4640
- /** Determines the type of skeleton shape: `single` replicates a single line of text, `multi` a multi line text, and `rect` a generic rectangle shape. */
4641
- type: {
4642
- type: String,
4643
- validator: (e) => ["single", "multi", "rect", "circle"].includes(e),
4644
- default: "single"
4645
- },
4646
- /** Only used together with the `multi` type. Determines the amount of text lines. */
4647
- count: {
4648
- type: Number,
4649
- default: 3
4650
- },
4651
- /** Sets the width of the `single` type in percentage. Sets the width of the `rect` type in pixels. */
4652
- width: {
4653
- type: Number,
4654
- default: 20
4655
- },
4656
- /** Sets the height of the `rect` and `circle` type in pixels. */
4657
- height: {
4658
- type: Number,
4659
- default: 20
4660
- },
4661
- /** Aligns the height and size of the single & multi types with our common line-height type scales. */
4662
- lineHeight: {
4663
- type: Number,
4664
- validator: (e) => [1, 2, 3, 4, 5, 6].includes(e),
4665
- default: 2
4666
- }
4667
- },
4668
- computed: {
4669
- rectClass() {
4670
- return this.type && this.type !== "" ? `skeleton-${this.type}` : this.type;
4671
- }
3798
+ };
3799
+ S.fromRatio = function(e, s) {
3800
+ if (ut(e) == "object") {
3801
+ var t = {};
3802
+ for (var a in e)
3803
+ e.hasOwnProperty(a) && (a === "a" ? t[a] = e[a] : t[a] = Ze(e[a]));
3804
+ e = t;
4672
3805
  }
4673
- }, Ir = (e) => (ve("data-v-75354c78"), e = e(), _e(), e), Er = {
4674
- key: 1,
4675
- class: "ecs-skeleton skeletons"
4676
- }, $r = /* @__PURE__ */ Ir(() => /* @__PURE__ */ f("div", { class: "skeleton skeleton-single" }, null, -1)), Pr = [
4677
- $r
4678
- ];
4679
- function Tr(e, s, t, a, n, i) {
4680
- return t.type === "rect" || t.type === "circle" ? (o(), l("div", {
4681
- key: 0,
4682
- class: v(["ecs-skeleton skeleton", i.rectClass]),
4683
- style: B({ width: t.width + "px", height: t.height + "px" })
4684
- }, null, 6)) : t.type === "multi" ? (o(), l("div", Er, [
4685
- (o(!0), l(Z, null, ge(parseInt(t.count), (r) => (o(), l("div", {
4686
- key: r,
4687
- class: v(["skeleton-wrap", "skeleton-line-height-" + t.lineHeight])
4688
- }, Pr, 2))), 128))
4689
- ])) : (o(), l("div", {
4690
- key: 2,
4691
- class: v(["ecs-skeleton skeleton-wrap", "skeleton-line-height-" + t.lineHeight])
4692
- }, [
4693
- f("div", {
4694
- class: "skeleton skeleton-single",
4695
- style: B({ width: t.width + "%" })
4696
- }, null, 4)
4697
- ], 2));
3806
+ return S(e, s);
3807
+ };
3808
+ function $o(e) {
3809
+ var s = {
3810
+ r: 0,
3811
+ g: 0,
3812
+ b: 0
3813
+ }, t = 1, a = null, n = null, i = null, r = !1, c = !1;
3814
+ return typeof e == "string" && (e = Xo(e)), ut(e) == "object" && (Ie(e.r) && Ie(e.g) && Ie(e.b) ? (s = Po(e.r, e.g, e.b), r = !0, c = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : Ie(e.h) && Ie(e.s) && Ie(e.v) ? (a = Ze(e.s), n = Ze(e.v), s = Mo(e.h, a, n), r = !0, c = "hsv") : Ie(e.h) && Ie(e.s) && Ie(e.l) && (a = Ze(e.s), i = Ze(e.l), s = To(e.h, a, i), r = !0, c = "hsl"), e.hasOwnProperty("a") && (t = e.a)), t = As(t), {
3815
+ ok: r,
3816
+ format: e.format || c,
3817
+ r: Math.min(255, Math.max(s.r, 0)),
3818
+ g: Math.min(255, Math.max(s.g, 0)),
3819
+ b: Math.min(255, Math.max(s.b, 0)),
3820
+ a: t
3821
+ };
4698
3822
  }
4699
- const Ce = /* @__PURE__ */ _(zr, [["render", Tr], ["__scopeId", "data-v-75354c78"]]);
4700
- const Mr = {
4701
- name: "ecs-formatted",
4702
- components: { EcsSkeletonLoader: Ce },
4703
- mixins: [de],
4704
- props: {
4705
- /** Sets the general font size of the formatted text component to small. */
4706
- small: {
4707
- type: Boolean,
4708
- default: !1
4709
- },
4710
- /** Turns the formatted text component into a skeleton loader. */
4711
- loading: {
4712
- type: Boolean,
4713
- default: !1
4714
- },
4715
- /** Used to customize the line count of the skeleton loader. */
4716
- skeletonCount: {
4717
- type: Number,
4718
- default: 4
3823
+ function Po(e, s, t) {
3824
+ return {
3825
+ r: H(e, 255) * 255,
3826
+ g: H(s, 255) * 255,
3827
+ b: H(t, 255) * 255
3828
+ };
3829
+ }
3830
+ function rs(e, s, t) {
3831
+ e = H(e, 255), s = H(s, 255), t = H(t, 255);
3832
+ var a = Math.max(e, s, t), n = Math.min(e, s, t), i, r, c = (a + n) / 2;
3833
+ if (a == n)
3834
+ i = r = 0;
3835
+ else {
3836
+ var d = a - n;
3837
+ switch (r = c > 0.5 ? d / (2 - a - n) : d / (a + n), a) {
3838
+ case e:
3839
+ i = (s - t) / d + (s < t ? 6 : 0);
3840
+ break;
3841
+ case s:
3842
+ i = (t - e) / d + 2;
3843
+ break;
3844
+ case t:
3845
+ i = (e - s) / d + 4;
3846
+ break;
4719
3847
  }
4720
- },
4721
- created() {
4722
- this.formattedId = this.generateUniqueId();
4723
- },
4724
- mounted() {
4725
- this.$el.querySelectorAll(`#${this.formattedId} a`).forEach((s) => {
4726
- const t = s.getAttribute("href");
4727
- s.setAttribute("title", `Open ${t}`);
4728
- });
3848
+ i /= 6;
4729
3849
  }
4730
- }, Lr = ["id"];
4731
- function Or(e, s, t, a, n, i) {
4732
- const r = p("ecs-skeleton-loader");
4733
- return o(), l("div", {
4734
- class: v(["ecs-formatted", [t.small ? "ecs-formatted-sml" : ""]]),
4735
- id: e.formattedId
4736
- }, [
4737
- t.loading ? (o(), y(r, {
4738
- key: 1,
4739
- type: "multi",
4740
- "line-height": t.small ? 1 : 2,
4741
- count: t.skeletonCount
4742
- }, null, 8, ["line-height", "count"])) : m(e.$slots, "default", {
4743
- key: 0,
4744
- ref: "slot"
4745
- })
4746
- ], 10, Lr);
3850
+ return {
3851
+ h: i,
3852
+ s: r,
3853
+ l: c
3854
+ };
4747
3855
  }
4748
- const Ds = /* @__PURE__ */ _(Mr, [["render", Or]]);
4749
- const Ar = {
4750
- name: "ecs-comment",
4751
- emits: ["edit", "delete"],
4752
- components: { EcsAvatar: Mi, EcsButton: Se, EcsFormatted: Ds, EcsSkeletonLoader: Ce },
4753
- props: {
4754
- /** Name of the user that is the comment author. */
4755
- userName: {
4756
- type: String,
4757
- required: !0
4758
- },
4759
- /** Avatar image of the user that is the comment author. */
4760
- userImage: {
4761
- type: String,
4762
- default: null
4763
- },
4764
- /** Determines if controls to edit or delete the comment should be available. */
4765
- canEdit: {
4766
- type: Boolean,
4767
- default: !1
4768
- },
4769
- /** Shows the whole comment in skeleton loading state. */
4770
- loading: {
4771
- type: Boolean,
4772
- default: !1
3856
+ function To(e, s, t) {
3857
+ var a, n, i;
3858
+ e = H(e, 360), s = H(s, 100), t = H(t, 100);
3859
+ function r(g, h, k) {
3860
+ return k < 0 && (k += 1), k > 1 && (k -= 1), k < 1 / 6 ? g + (h - g) * 6 * k : k < 1 / 2 ? h : k < 2 / 3 ? g + (h - g) * (2 / 3 - k) * 6 : g;
3861
+ }
3862
+ if (s === 0)
3863
+ a = n = i = t;
3864
+ else {
3865
+ var c = t < 0.5 ? t * (1 + s) : t + s - t * s, d = 2 * t - c;
3866
+ a = r(d, c, e + 1 / 3), n = r(d, c, e), i = r(d, c, e - 1 / 3);
3867
+ }
3868
+ return {
3869
+ r: a * 255,
3870
+ g: n * 255,
3871
+ b: i * 255
3872
+ };
3873
+ }
3874
+ function ls(e, s, t) {
3875
+ e = H(e, 255), s = H(s, 255), t = H(t, 255);
3876
+ var a = Math.max(e, s, t), n = Math.min(e, s, t), i, r, c = a, d = a - n;
3877
+ if (r = a === 0 ? 0 : d / a, a == n)
3878
+ i = 0;
3879
+ else {
3880
+ switch (a) {
3881
+ case e:
3882
+ i = (s - t) / d + (s < t ? 6 : 0);
3883
+ break;
3884
+ case s:
3885
+ i = (t - e) / d + 2;
3886
+ break;
3887
+ case t:
3888
+ i = (e - s) / d + 4;
3889
+ break;
4773
3890
  }
3891
+ i /= 6;
4774
3892
  }
4775
- }, Nr = ["aria-busy"], Dr = { class: "ecs-comment-header" }, Fr = { class: "ecs-comment-autor" }, Rr = {
4776
- key: 2,
4777
- class: "ecs-comment-meta"
4778
- }, Vr = { class: "ecs-comment-meta-name" }, Hr = { class: "ecs-comment-meta-time" }, qr = {
4779
- key: 3,
4780
- class: "ecs-comment-meta loading"
4781
- }, Wr = {
4782
- key: 0,
4783
- class: "ecs-comment-actions"
4784
- }, jr = {
4785
- key: 2,
4786
- class: "ecs-comment-edit"
3893
+ return {
3894
+ h: i,
3895
+ s: r,
3896
+ v: c
3897
+ };
3898
+ }
3899
+ function Mo(e, s, t) {
3900
+ e = H(e, 360) * 6, s = H(s, 100), t = H(t, 100);
3901
+ var a = Math.floor(e), n = e - a, i = t * (1 - s), r = t * (1 - n * s), c = t * (1 - (1 - n) * s), d = a % 6, g = [t, r, i, i, c, t][d], h = [c, t, t, r, i, i][d], k = [i, i, c, t, t, r][d];
3902
+ return {
3903
+ r: g * 255,
3904
+ g: h * 255,
3905
+ b: k * 255
3906
+ };
3907
+ }
3908
+ function cs(e, s, t, a) {
3909
+ var n = [pe(Math.round(e).toString(16)), pe(Math.round(s).toString(16)), pe(Math.round(t).toString(16))];
3910
+ return a && n[0].charAt(0) == n[0].charAt(1) && n[1].charAt(0) == n[1].charAt(1) && n[2].charAt(0) == n[2].charAt(1) ? n[0].charAt(0) + n[1].charAt(0) + n[2].charAt(0) : n.join("");
3911
+ }
3912
+ function Lo(e, s, t, a, n) {
3913
+ var i = [pe(Math.round(e).toString(16)), pe(Math.round(s).toString(16)), pe(Math.round(t).toString(16)), pe(Ns(a))];
3914
+ return n && i[0].charAt(0) == i[0].charAt(1) && i[1].charAt(0) == i[1].charAt(1) && i[2].charAt(0) == i[2].charAt(1) && i[3].charAt(0) == i[3].charAt(1) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) + i[3].charAt(0) : i.join("");
3915
+ }
3916
+ function ds(e, s, t, a) {
3917
+ var n = [pe(Ns(a)), pe(Math.round(e).toString(16)), pe(Math.round(s).toString(16)), pe(Math.round(t).toString(16))];
3918
+ return n.join("");
3919
+ }
3920
+ S.equals = function(e, s) {
3921
+ return !e || !s ? !1 : S(e).toRgbString() == S(s).toRgbString();
4787
3922
  };
4788
- function Gr(e, s, t, a, n, i) {
4789
- const r = p("ecs-skeleton-loader"), c = p("ecs-avatar"), d = p("ecs-button"), g = p("ecs-formatted");
4790
- return o(), l("div", {
4791
- class: "ecs-comment",
4792
- role: "comment",
4793
- "aria-busy": t.loading || null
4794
- }, [
4795
- f("div", Dr, [
4796
- f("div", Fr, [
4797
- t.loading ? (o(), y(r, {
4798
- key: 0,
4799
- type: "circle",
4800
- width: 32,
4801
- height: 32
4802
- })) : (o(), y(c, {
4803
- key: 1,
4804
- name: t.userName,
4805
- image: t.userImage,
4806
- size: 32,
4807
- rounded: ""
4808
- }, null, 8, ["name", "image"])),
4809
- t.loading ? (o(), l("div", qr, [
4810
- b(r, {
4811
- type: "single",
4812
- "line-height": 3,
4813
- width: 50
4814
- }),
4815
- b(r, {
4816
- type: "single",
4817
- "line-height": 2,
4818
- width: 60
4819
- })
4820
- ])) : (o(), l("div", Rr, [
4821
- f("span", Vr, x(t.userName), 1),
4822
- f("span", Hr, [
4823
- m(e.$slots, "commentdate", {}, void 0, !0)
4824
- ])
4825
- ]))
4826
- ]),
4827
- t.canEdit ? (o(), l("div", Wr, [
4828
- b(d, {
4829
- onClick: s[0] || (s[0] = (h) => e.$emit("edit", h)),
4830
- type: "secondary",
4831
- size: "sml",
4832
- icon: "edit",
4833
- "icon-only": "",
4834
- title: "Edit Comment"
4835
- }),
4836
- b(d, {
4837
- onClick: s[1] || (s[1] = (h) => e.$emit("delete", h)),
4838
- type: "danger",
4839
- size: "sml",
4840
- icon: "delete",
4841
- "icon-only": "",
4842
- title: "Delete Comment"
4843
- })
4844
- ])) : u("", !0)
4845
- ]),
4846
- !e.$slots.editform && !t.loading ? (o(), y(g, {
4847
- key: 0,
4848
- class: "ecs-comment-body"
4849
- }, {
4850
- default: w(() => [
4851
- m(e.$slots, "default", {}, void 0, !0)
4852
- ]),
4853
- _: 3
4854
- })) : t.loading ? (o(), y(r, {
4855
- key: 1,
4856
- type: "multi",
4857
- count: 2,
4858
- class: "ecs-comment-body"
4859
- })) : (o(), l("div", jr, [
4860
- m(e.$slots, "editform", {}, void 0, !0)
4861
- ]))
4862
- ], 8, Nr);
3923
+ S.random = function() {
3924
+ return S.fromRatio({
3925
+ r: Math.random(),
3926
+ g: Math.random(),
3927
+ b: Math.random()
3928
+ });
3929
+ };
3930
+ function Oo(e, s) {
3931
+ s = s === 0 ? 0 : s || 10;
3932
+ var t = S(e).toHsl();
3933
+ return t.s -= s / 100, t.s = mt(t.s), S(t);
4863
3934
  }
4864
- const Iy = /* @__PURE__ */ _(Ar, [["render", Gr], ["__scopeId", "data-v-cf696f66"]]);
4865
- const Ur = {}, Kr = { class: "ecs-comment-list" };
4866
- function Yr(e, s) {
4867
- return o(), l("div", Kr, [
4868
- m(e.$slots, "default")
4869
- ]);
3935
+ function Ao(e, s) {
3936
+ s = s === 0 ? 0 : s || 10;
3937
+ var t = S(e).toHsl();
3938
+ return t.s += s / 100, t.s = mt(t.s), S(t);
4870
3939
  }
4871
- const Ey = /* @__PURE__ */ _(Ur, [["render", Yr]]);
4872
- function ut(e) {
4873
- "@babel/helpers - typeof";
4874
- return ut = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(s) {
4875
- return typeof s;
4876
- } : function(s) {
4877
- return s && typeof Symbol == "function" && s.constructor === Symbol && s !== Symbol.prototype ? "symbol" : typeof s;
4878
- }, ut(e);
3940
+ function No(e) {
3941
+ return S(e).desaturate(100);
4879
3942
  }
4880
- var Xr = /^\s+/, Zr = /\s+$/;
4881
- function S(e, s) {
4882
- if (e = e || "", s = s || {}, e instanceof S)
4883
- return e;
4884
- if (!(this instanceof S))
4885
- return new S(e, s);
4886
- var t = Jr(e);
4887
- this._originalInput = e, this._r = t.r, this._g = t.g, this._b = t.b, this._a = t.a, this._roundA = Math.round(100 * this._a) / 100, this._format = s.format || t.format, this._gradientType = s.gradientType, this._r < 1 && (this._r = Math.round(this._r)), this._g < 1 && (this._g = Math.round(this._g)), this._b < 1 && (this._b = Math.round(this._b)), this._ok = t.ok;
3943
+ function Do(e, s) {
3944
+ s = s === 0 ? 0 : s || 10;
3945
+ var t = S(e).toHsl();
3946
+ return t.l += s / 100, t.l = mt(t.l), S(t);
4888
3947
  }
4889
- S.prototype = {
4890
- isDark: function() {
4891
- return this.getBrightness() < 128;
4892
- },
4893
- isLight: function() {
4894
- return !this.isDark();
4895
- },
4896
- isValid: function() {
4897
- return this._ok;
4898
- },
4899
- getOriginalInput: function() {
4900
- return this._originalInput;
4901
- },
4902
- getFormat: function() {
4903
- return this._format;
4904
- },
4905
- getAlpha: function() {
4906
- return this._a;
4907
- },
4908
- getBrightness: function() {
4909
- var s = this.toRgb();
4910
- return (s.r * 299 + s.g * 587 + s.b * 114) / 1e3;
4911
- },
4912
- getLuminance: function() {
4913
- var s = this.toRgb(), t, a, n, i, r, c;
4914
- return t = s.r / 255, a = s.g / 255, n = s.b / 255, t <= 0.03928 ? i = t / 12.92 : i = Math.pow((t + 0.055) / 1.055, 2.4), a <= 0.03928 ? r = a / 12.92 : r = Math.pow((a + 0.055) / 1.055, 2.4), n <= 0.03928 ? c = n / 12.92 : c = Math.pow((n + 0.055) / 1.055, 2.4), 0.2126 * i + 0.7152 * r + 0.0722 * c;
4915
- },
4916
- setAlpha: function(s) {
4917
- return this._a = Fs(s), this._roundA = Math.round(100 * this._a) / 100, this;
4918
- },
4919
- toHsv: function() {
4920
- var s = ls(this._r, this._g, this._b);
4921
- return {
4922
- h: s.h * 360,
4923
- s: s.s,
4924
- v: s.v,
4925
- a: this._a
4926
- };
4927
- },
4928
- toHsvString: function() {
4929
- var s = ls(this._r, this._g, this._b), t = Math.round(s.h * 360), a = Math.round(s.s * 100), n = Math.round(s.v * 100);
4930
- return this._a == 1 ? "hsv(" + t + ", " + a + "%, " + n + "%)" : "hsva(" + t + ", " + a + "%, " + n + "%, " + this._roundA + ")";
4931
- },
4932
- toHsl: function() {
4933
- var s = rs(this._r, this._g, this._b);
4934
- return {
4935
- h: s.h * 360,
4936
- s: s.s,
4937
- l: s.l,
4938
- a: this._a
4939
- };
4940
- },
4941
- toHslString: function() {
4942
- var s = rs(this._r, this._g, this._b), t = Math.round(s.h * 360), a = Math.round(s.s * 100), n = Math.round(s.l * 100);
4943
- return this._a == 1 ? "hsl(" + t + ", " + a + "%, " + n + "%)" : "hsla(" + t + ", " + a + "%, " + n + "%, " + this._roundA + ")";
4944
- },
4945
- toHex: function(s) {
4946
- return cs(this._r, this._g, this._b, s);
4947
- },
4948
- toHexString: function(s) {
4949
- return "#" + this.toHex(s);
4950
- },
4951
- toHex8: function(s) {
4952
- return sl(this._r, this._g, this._b, this._a, s);
4953
- },
4954
- toHex8String: function(s) {
4955
- return "#" + this.toHex8(s);
4956
- },
4957
- toRgb: function() {
4958
- return {
4959
- r: Math.round(this._r),
4960
- g: Math.round(this._g),
4961
- b: Math.round(this._b),
4962
- a: this._a
4963
- };
4964
- },
4965
- toRgbString: function() {
4966
- return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")";
4967
- },
4968
- toPercentageRgb: function() {
4969
- return {
4970
- r: Math.round(H(this._r, 255) * 100) + "%",
4971
- g: Math.round(H(this._g, 255) * 100) + "%",
4972
- b: Math.round(H(this._b, 255) * 100) + "%",
4973
- a: this._a
4974
- };
4975
- },
4976
- toPercentageRgbString: function() {
4977
- return this._a == 1 ? "rgb(" + Math.round(H(this._r, 255) * 100) + "%, " + Math.round(H(this._g, 255) * 100) + "%, " + Math.round(H(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(H(this._r, 255) * 100) + "%, " + Math.round(H(this._g, 255) * 100) + "%, " + Math.round(H(this._b, 255) * 100) + "%, " + this._roundA + ")";
4978
- },
4979
- toName: function() {
4980
- return this._a === 0 ? "transparent" : this._a < 1 ? !1 : gl[cs(this._r, this._g, this._b, !0)] || !1;
4981
- },
4982
- toFilter: function(s) {
4983
- var t = "#" + ds(this._r, this._g, this._b, this._a), a = t, n = this._gradientType ? "GradientType = 1, " : "";
4984
- if (s) {
4985
- var i = S(s);
4986
- a = "#" + ds(i._r, i._g, i._b, i._a);
4987
- }
4988
- return "progid:DXImageTransform.Microsoft.gradient(" + n + "startColorstr=" + t + ",endColorstr=" + a + ")";
4989
- },
4990
- toString: function(s) {
4991
- var t = !!s;
4992
- s = s || this._format;
4993
- var a = !1, n = this._a < 1 && this._a >= 0, i = !t && n && (s === "hex" || s === "hex6" || s === "hex3" || s === "hex4" || s === "hex8" || s === "name");
4994
- return i ? s === "name" && this._a === 0 ? this.toName() : this.toRgbString() : (s === "rgb" && (a = this.toRgbString()), s === "prgb" && (a = this.toPercentageRgbString()), (s === "hex" || s === "hex6") && (a = this.toHexString()), s === "hex3" && (a = this.toHexString(!0)), s === "hex4" && (a = this.toHex8String(!0)), s === "hex8" && (a = this.toHex8String()), s === "name" && (a = this.toName()), s === "hsl" && (a = this.toHslString()), s === "hsv" && (a = this.toHsvString()), a || this.toHexString());
4995
- },
4996
- clone: function() {
4997
- return S(this.toString());
4998
- },
4999
- _applyModification: function(s, t) {
5000
- var a = s.apply(null, [this].concat([].slice.call(t)));
5001
- return this._r = a._r, this._g = a._g, this._b = a._b, this.setAlpha(a._a), this;
5002
- },
5003
- lighten: function() {
5004
- return this._applyModification(ol, arguments);
5005
- },
5006
- brighten: function() {
5007
- return this._applyModification(rl, arguments);
5008
- },
5009
- darken: function() {
5010
- return this._applyModification(ll, arguments);
5011
- },
5012
- desaturate: function() {
5013
- return this._applyModification(il, arguments);
5014
- },
5015
- saturate: function() {
5016
- return this._applyModification(nl, arguments);
5017
- },
5018
- greyscale: function() {
5019
- return this._applyModification(al, arguments);
5020
- },
5021
- spin: function() {
5022
- return this._applyModification(cl, arguments);
5023
- },
5024
- _applyCombination: function(s, t) {
5025
- return s.apply(null, [this].concat([].slice.call(t)));
5026
- },
5027
- analogous: function() {
5028
- return this._applyCombination(fl, arguments);
5029
- },
5030
- complement: function() {
5031
- return this._applyCombination(dl, arguments);
5032
- },
5033
- monochromatic: function() {
5034
- return this._applyCombination(pl, arguments);
5035
- },
5036
- splitcomplement: function() {
5037
- return this._applyCombination(ul, arguments);
5038
- },
5039
- // Disabled until https://github.com/bgrins/TinyColor/issues/254
5040
- // polyad: function (number) {
5041
- // return this._applyCombination(polyad, [number]);
5042
- // },
5043
- triad: function() {
5044
- return this._applyCombination(us, [3]);
5045
- },
5046
- tetrad: function() {
5047
- return this._applyCombination(us, [4]);
5048
- }
5049
- };
5050
- S.fromRatio = function(e, s) {
5051
- if (ut(e) == "object") {
5052
- var t = {};
5053
- for (var a in e)
5054
- e.hasOwnProperty(a) && (a === "a" ? t[a] = e[a] : t[a] = Ze(e[a]));
5055
- e = t;
5056
- }
5057
- return S(e, s);
5058
- };
5059
- function Jr(e) {
5060
- var s = {
5061
- r: 0,
5062
- g: 0,
5063
- b: 0
5064
- }, t = 1, a = null, n = null, i = null, r = !1, c = !1;
5065
- return typeof e == "string" && (e = _l(e)), ut(e) == "object" && (Ie(e.r) && Ie(e.g) && Ie(e.b) ? (s = Qr(e.r, e.g, e.b), r = !0, c = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : Ie(e.h) && Ie(e.s) && Ie(e.v) ? (a = Ze(e.s), n = Ze(e.v), s = tl(e.h, a, n), r = !0, c = "hsv") : Ie(e.h) && Ie(e.s) && Ie(e.l) && (a = Ze(e.s), i = Ze(e.l), s = el(e.h, a, i), r = !0, c = "hsl"), e.hasOwnProperty("a") && (t = e.a)), t = Fs(t), {
5066
- ok: r,
5067
- format: e.format || c,
5068
- r: Math.min(255, Math.max(s.r, 0)),
5069
- g: Math.min(255, Math.max(s.g, 0)),
5070
- b: Math.min(255, Math.max(s.b, 0)),
5071
- a: t
5072
- };
3948
+ function Fo(e, s) {
3949
+ s = s === 0 ? 0 : s || 10;
3950
+ var t = S(e).toRgb();
3951
+ return t.r = Math.max(0, Math.min(255, t.r - Math.round(255 * -(s / 100)))), t.g = Math.max(0, Math.min(255, t.g - Math.round(255 * -(s / 100)))), t.b = Math.max(0, Math.min(255, t.b - Math.round(255 * -(s / 100)))), S(t);
5073
3952
  }
5074
- function Qr(e, s, t) {
5075
- return {
5076
- r: H(e, 255) * 255,
5077
- g: H(s, 255) * 255,
5078
- b: H(t, 255) * 255
5079
- };
3953
+ function Ro(e, s) {
3954
+ s = s === 0 ? 0 : s || 10;
3955
+ var t = S(e).toHsl();
3956
+ return t.l -= s / 100, t.l = mt(t.l), S(t);
5080
3957
  }
5081
- function rs(e, s, t) {
5082
- e = H(e, 255), s = H(s, 255), t = H(t, 255);
5083
- var a = Math.max(e, s, t), n = Math.min(e, s, t), i, r, c = (a + n) / 2;
5084
- if (a == n)
5085
- i = r = 0;
5086
- else {
5087
- var d = a - n;
5088
- switch (r = c > 0.5 ? d / (2 - a - n) : d / (a + n), a) {
5089
- case e:
5090
- i = (s - t) / d + (s < t ? 6 : 0);
5091
- break;
5092
- case s:
5093
- i = (t - e) / d + 2;
5094
- break;
5095
- case t:
5096
- i = (e - s) / d + 4;
5097
- break;
5098
- }
5099
- i /= 6;
5100
- }
5101
- return {
5102
- h: i,
5103
- s: r,
5104
- l: c
5105
- };
5106
- }
5107
- function el(e, s, t) {
5108
- var a, n, i;
5109
- e = H(e, 360), s = H(s, 100), t = H(t, 100);
5110
- function r(g, h, k) {
5111
- return k < 0 && (k += 1), k > 1 && (k -= 1), k < 1 / 6 ? g + (h - g) * 6 * k : k < 1 / 2 ? h : k < 2 / 3 ? g + (h - g) * (2 / 3 - k) * 6 : g;
5112
- }
5113
- if (s === 0)
5114
- a = n = i = t;
5115
- else {
5116
- var c = t < 0.5 ? t * (1 + s) : t + s - t * s, d = 2 * t - c;
5117
- a = r(d, c, e + 1 / 3), n = r(d, c, e), i = r(d, c, e - 1 / 3);
5118
- }
5119
- return {
5120
- r: a * 255,
5121
- g: n * 255,
5122
- b: i * 255
5123
- };
5124
- }
5125
- function ls(e, s, t) {
5126
- e = H(e, 255), s = H(s, 255), t = H(t, 255);
5127
- var a = Math.max(e, s, t), n = Math.min(e, s, t), i, r, c = a, d = a - n;
5128
- if (r = a === 0 ? 0 : d / a, a == n)
5129
- i = 0;
5130
- else {
5131
- switch (a) {
5132
- case e:
5133
- i = (s - t) / d + (s < t ? 6 : 0);
5134
- break;
5135
- case s:
5136
- i = (t - e) / d + 2;
5137
- break;
5138
- case t:
5139
- i = (e - s) / d + 4;
5140
- break;
5141
- }
5142
- i /= 6;
5143
- }
5144
- return {
5145
- h: i,
5146
- s: r,
5147
- v: c
5148
- };
5149
- }
5150
- function tl(e, s, t) {
5151
- e = H(e, 360) * 6, s = H(s, 100), t = H(t, 100);
5152
- var a = Math.floor(e), n = e - a, i = t * (1 - s), r = t * (1 - n * s), c = t * (1 - (1 - n) * s), d = a % 6, g = [t, r, i, i, c, t][d], h = [c, t, t, r, i, i][d], k = [i, i, c, t, t, r][d];
5153
- return {
5154
- r: g * 255,
5155
- g: h * 255,
5156
- b: k * 255
5157
- };
5158
- }
5159
- function cs(e, s, t, a) {
5160
- var n = [pe(Math.round(e).toString(16)), pe(Math.round(s).toString(16)), pe(Math.round(t).toString(16))];
5161
- return a && n[0].charAt(0) == n[0].charAt(1) && n[1].charAt(0) == n[1].charAt(1) && n[2].charAt(0) == n[2].charAt(1) ? n[0].charAt(0) + n[1].charAt(0) + n[2].charAt(0) : n.join("");
5162
- }
5163
- function sl(e, s, t, a, n) {
5164
- var i = [pe(Math.round(e).toString(16)), pe(Math.round(s).toString(16)), pe(Math.round(t).toString(16)), pe(Rs(a))];
5165
- return n && i[0].charAt(0) == i[0].charAt(1) && i[1].charAt(0) == i[1].charAt(1) && i[2].charAt(0) == i[2].charAt(1) && i[3].charAt(0) == i[3].charAt(1) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) + i[3].charAt(0) : i.join("");
5166
- }
5167
- function ds(e, s, t, a) {
5168
- var n = [pe(Rs(a)), pe(Math.round(e).toString(16)), pe(Math.round(s).toString(16)), pe(Math.round(t).toString(16))];
5169
- return n.join("");
5170
- }
5171
- S.equals = function(e, s) {
5172
- return !e || !s ? !1 : S(e).toRgbString() == S(s).toRgbString();
5173
- };
5174
- S.random = function() {
5175
- return S.fromRatio({
5176
- r: Math.random(),
5177
- g: Math.random(),
5178
- b: Math.random()
5179
- });
5180
- };
5181
- function il(e, s) {
5182
- s = s === 0 ? 0 : s || 10;
5183
- var t = S(e).toHsl();
5184
- return t.s -= s / 100, t.s = mt(t.s), S(t);
5185
- }
5186
- function nl(e, s) {
5187
- s = s === 0 ? 0 : s || 10;
5188
- var t = S(e).toHsl();
5189
- return t.s += s / 100, t.s = mt(t.s), S(t);
5190
- }
5191
- function al(e) {
5192
- return S(e).desaturate(100);
5193
- }
5194
- function ol(e, s) {
5195
- s = s === 0 ? 0 : s || 10;
5196
- var t = S(e).toHsl();
5197
- return t.l += s / 100, t.l = mt(t.l), S(t);
5198
- }
5199
- function rl(e, s) {
5200
- s = s === 0 ? 0 : s || 10;
5201
- var t = S(e).toRgb();
5202
- return t.r = Math.max(0, Math.min(255, t.r - Math.round(255 * -(s / 100)))), t.g = Math.max(0, Math.min(255, t.g - Math.round(255 * -(s / 100)))), t.b = Math.max(0, Math.min(255, t.b - Math.round(255 * -(s / 100)))), S(t);
5203
- }
5204
- function ll(e, s) {
5205
- s = s === 0 ? 0 : s || 10;
5206
- var t = S(e).toHsl();
5207
- return t.l -= s / 100, t.l = mt(t.l), S(t);
5208
- }
5209
- function cl(e, s) {
3958
+ function Vo(e, s) {
5210
3959
  var t = S(e).toHsl(), a = (t.h + s) % 360;
5211
3960
  return t.h = a < 0 ? 360 + a : a, S(t);
5212
3961
  }
5213
- function dl(e) {
3962
+ function Ho(e) {
5214
3963
  var s = S(e).toHsl();
5215
3964
  return s.h = (s.h + 180) % 360, S(s);
5216
3965
  }
@@ -5225,7 +3974,7 @@ function us(e, s) {
5225
3974
  }));
5226
3975
  return a;
5227
3976
  }
5228
- function ul(e) {
3977
+ function qo(e) {
5229
3978
  var s = S(e).toHsl(), t = s.h;
5230
3979
  return [S(e), S({
5231
3980
  h: (t + 72) % 360,
@@ -5237,14 +3986,14 @@ function ul(e) {
5237
3986
  l: s.l
5238
3987
  })];
5239
3988
  }
5240
- function fl(e, s, t) {
3989
+ function Wo(e, s, t) {
5241
3990
  s = s || 6, t = t || 30;
5242
3991
  var a = S(e).toHsl(), n = 360 / t, i = [S(e)];
5243
3992
  for (a.h = (a.h - (n * s >> 1) + 720) % 360; --s; )
5244
3993
  a.h = (a.h + n) % 360, i.push(S(a));
5245
3994
  return i;
5246
3995
  }
5247
- function pl(e, s) {
3996
+ function jo(e, s) {
5248
3997
  s = s || 6;
5249
3998
  for (var t = S(e).toHsv(), a = t.h, n = t.s, i = t.v, r = [], c = 1 / s; s--; )
5250
3999
  r.push(S({
@@ -5270,7 +4019,7 @@ S.readability = function(e, s) {
5270
4019
  };
5271
4020
  S.isReadable = function(e, s, t) {
5272
4021
  var a = S.readability(e, s), n, i;
5273
- switch (i = !1, n = yl(t), n.level + n.size) {
4022
+ switch (i = !1, n = Zo(t), n.level + n.size) {
5274
4023
  case "AAsmall":
5275
4024
  case "AAAlarge":
5276
4025
  i = a >= 4.5;
@@ -5444,19 +4193,19 @@ var $t = S.names = {
5444
4193
  whitesmoke: "f5f5f5",
5445
4194
  yellow: "ff0",
5446
4195
  yellowgreen: "9acd32"
5447
- }, gl = S.hexNames = ml($t);
5448
- function ml(e) {
4196
+ }, Go = S.hexNames = Uo($t);
4197
+ function Uo(e) {
5449
4198
  var s = {};
5450
4199
  for (var t in e)
5451
4200
  e.hasOwnProperty(t) && (s[e[t]] = t);
5452
4201
  return s;
5453
4202
  }
5454
- function Fs(e) {
4203
+ function As(e) {
5455
4204
  return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
5456
4205
  }
5457
4206
  function H(e, s) {
5458
- hl(e) && (e = "100%");
5459
- var t = vl(e);
4207
+ Ko(e) && (e = "100%");
4208
+ var t = Yo(e);
5460
4209
  return e = Math.min(s, Math.max(0, parseFloat(e))), t && (e = parseInt(e * s, 10) / 100), Math.abs(e - s) < 1e-6 ? 1 : e % s / parseFloat(s);
5461
4210
  }
5462
4211
  function mt(e) {
@@ -5465,10 +4214,10 @@ function mt(e) {
5465
4214
  function se(e) {
5466
4215
  return parseInt(e, 16);
5467
4216
  }
5468
- function hl(e) {
4217
+ function Ko(e) {
5469
4218
  return typeof e == "string" && e.indexOf(".") != -1 && parseFloat(e) === 1;
5470
4219
  }
5471
- function vl(e) {
4220
+ function Yo(e) {
5472
4221
  return typeof e == "string" && e.indexOf("%") != -1;
5473
4222
  }
5474
4223
  function pe(e) {
@@ -5477,7 +4226,7 @@ function pe(e) {
5477
4226
  function Ze(e) {
5478
4227
  return e <= 1 && (e = e * 100 + "%"), e;
5479
4228
  }
5480
- function Rs(e) {
4229
+ function Ns(e) {
5481
4230
  return Math.round(parseFloat(e) * 255).toString(16);
5482
4231
  }
5483
4232
  function fs(e) {
@@ -5502,8 +4251,8 @@ var fe = function() {
5502
4251
  function Ie(e) {
5503
4252
  return !!fe.CSS_UNIT.exec(e);
5504
4253
  }
5505
- function _l(e) {
5506
- e = e.replace(Xr, "").replace(Zr, "").toLowerCase();
4254
+ function Xo(e) {
4255
+ e = e.replace(Io, "").replace(Eo, "").toLowerCase();
5507
4256
  var s = !1;
5508
4257
  if ($t[e])
5509
4258
  e = $t[e], s = !0;
@@ -5567,7 +4316,7 @@ function _l(e) {
5567
4316
  format: s ? "name" : "hex"
5568
4317
  } : !1;
5569
4318
  }
5570
- function yl(e) {
4319
+ function Zo(e) {
5571
4320
  var s, t;
5572
4321
  return e = e || {
5573
4322
  level: "AA",
@@ -5577,6 +4326,1264 @@ function yl(e) {
5577
4326
  size: t
5578
4327
  };
5579
4328
  }
4329
+ const Jo = {
4330
+ name: "ecs-button-context",
4331
+ emits: ["click"],
4332
+ components: {
4333
+ EcsIcon: M,
4334
+ EcsFocusRing: L
4335
+ },
4336
+ props: {
4337
+ /** If set, an icon will be added to the left of the button. The list of available icon names can be found [here](https://github.com/everchron/ec-shards/tree/main/src/assets/icons). */
4338
+ icon: {
4339
+ type: String,
4340
+ default: null
4341
+ },
4342
+ /** Turns the button into a loading state. */
4343
+ loading: {
4344
+ type: Boolean,
4345
+ default: !1
4346
+ },
4347
+ /** Context buttons can be used to set a specific text or annotation color on the selection. Pass any color value (HEX, RGBA). */
4348
+ selectedColor: {
4349
+ type: String,
4350
+ default: null
4351
+ },
4352
+ /** Aria-label is needed for iconOnly buttons to improve accessibility for screenreaders. */
4353
+ ariaLabel: {
4354
+ type: String
4355
+ }
4356
+ },
4357
+ computed: {
4358
+ iconType() {
4359
+ return this.loading ? "loading" : (this.icon && this.icon, this.icon);
4360
+ },
4361
+ iconOnly() {
4362
+ return this.icon && !this.$slots.default;
4363
+ },
4364
+ colorIsDark() {
4365
+ return this.selectedColor && this.selectedColor !== "" ? S(this.selectedColor).isDark() : null;
4366
+ },
4367
+ selectedColorBackground() {
4368
+ if (this.selectedColor && this.selectedColor !== "")
4369
+ return `background-color:${this.selectedColor};`;
4370
+ },
4371
+ selectedColorText() {
4372
+ if (this.selectedColor && this.selectedColor !== "")
4373
+ return this.colorIsDark ? {
4374
+ color: S(this.selectedColor).lighten(65).toRgbString()
4375
+ } : {
4376
+ color: S(this.selectedColor).lighten(10).toRgbString()
4377
+ };
4378
+ }
4379
+ },
4380
+ mounted() {
4381
+ this.iconOnly && (!this.ariaLabel || this.ariaLabel.trim());
4382
+ }
4383
+ }, Qo = ["aria-label", "aria-busy"];
4384
+ function er(e, s, t, a, n, i) {
4385
+ const r = p("ecs-icon"), c = p("ecs-focus-ring");
4386
+ return o(), l("button", {
4387
+ class: v(["ecs-context-button", [t.loading ? "loading" : "", i.iconOnly ? "ecs-context-button-icon-only" : ""]]),
4388
+ "aria-label": t.ariaLabel,
4389
+ "aria-busy": t.loading || null,
4390
+ style: B(i.selectedColorText),
4391
+ onClick: s[0] || (s[0] = (d) => e.$emit("click", d))
4392
+ }, [
4393
+ t.icon || t.loading ? (o(), y(r, {
4394
+ key: 0,
4395
+ type: i.iconType,
4396
+ size: "20"
4397
+ }, null, 8, ["type"])) : u("", !0),
4398
+ t.selectedColor ? (o(), l("div", {
4399
+ key: 1,
4400
+ class: "ecs-context-button-color",
4401
+ style: B(i.selectedColorBackground)
4402
+ }, null, 4)) : u("", !0),
4403
+ m(e.$slots, "default", {}, void 0, !0),
4404
+ b(c)
4405
+ ], 14, Qo);
4406
+ }
4407
+ const yy = /* @__PURE__ */ _(Jo, [["render", er], ["__scopeId", "data-v-3a382207"]]);
4408
+ const tr = {
4409
+ name: "ecs-context-button-group"
4410
+ }, sr = { class: "ecs-context-button-group" };
4411
+ function ir(e, s, t, a, n, i) {
4412
+ return o(), l("div", sr, [
4413
+ m(e.$slots, "default", {}, void 0, !0)
4414
+ ]);
4415
+ }
4416
+ const by = /* @__PURE__ */ _(tr, [["render", ir], ["__scopeId", "data-v-94a53b69"]]);
4417
+ const nr = {
4418
+ name: "ecs-button-dialog",
4419
+ emits: ["click"],
4420
+ components: {
4421
+ EcsIcon: M,
4422
+ EcsFocusRing: L
4423
+ },
4424
+ props: {
4425
+ /** If set, an icon will be added to the left of the button. The list of available icon names can be found [here](https://github.com/everchron/ec-shards/tree/main/src/assets/icons). */
4426
+ icon: {
4427
+ type: String,
4428
+ default: null
4429
+ },
4430
+ /** Defines the type and function of the button. If not set, the button will be neutral (used for Cancel actions). */
4431
+ type: {
4432
+ type: String,
4433
+ validator: (e) => ["danger", "confirm", "cancel"].includes(e),
4434
+ default: "cancel"
4435
+ },
4436
+ /** Turns the button into a loading state. */
4437
+ loading: Boolean
4438
+ },
4439
+ computed: {
4440
+ typeClass() {
4441
+ return this.type && this.type !== "" ? `ecs-dialog-footer-button-${this.type}` : this.type;
4442
+ },
4443
+ iconType() {
4444
+ return this.loading ? "loading" : this.icon;
4445
+ }
4446
+ }
4447
+ }, ar = ["aria-busy"];
4448
+ function or(e, s, t, a, n, i) {
4449
+ const r = p("ecs-icon"), c = p("ecs-focus-ring");
4450
+ return o(), l("button", {
4451
+ onClick: s[0] || (s[0] = (d) => e.$emit("click", d)),
4452
+ class: v([[i.typeClass, t.loading ? "loading" : ""], "ecs-dialog-footer-button"]),
4453
+ "aria-busy": t.loading || null
4454
+ }, [
4455
+ t.icon || t.loading ? (o(), y(r, {
4456
+ key: 0,
4457
+ type: i.iconType
4458
+ }, null, 8, ["type"])) : u("", !0),
4459
+ m(e.$slots, "default", {}, void 0, !0),
4460
+ b(c, {
4461
+ radius: 12,
4462
+ danger: t.type == "danger"
4463
+ }, null, 8, ["danger"])
4464
+ ], 10, ar);
4465
+ }
4466
+ const ky = /* @__PURE__ */ _(nr, [["render", or], ["__scopeId", "data-v-fe031b71"]]);
4467
+ const rr = {
4468
+ name: "ecs-button-more",
4469
+ emits: ["click"],
4470
+ components: {
4471
+ EcsIcon: M,
4472
+ EcsFocusRing: L
4473
+ },
4474
+ props: {
4475
+ /** Displays the button slightly highlighted. Should be used when the state the button triggers is currently visible. */
4476
+ active: Boolean,
4477
+ /** Defines the type of the button: `dropdown` shows a simple dropdown button, `ellipsis` shows a tiny (...) button, and `expand` is supposed to be used at the end of expandable lists and tables. */
4478
+ type: {
4479
+ type: String,
4480
+ validator: (e) => ["dropdown", "dropdown-round", "ellipsis", "expand"].includes(e),
4481
+ default: "dropdown"
4482
+ },
4483
+ /** Provide a meaningful label for the button to improve accessibility for screenreaders. */
4484
+ ariaLabel: {
4485
+ type: String
4486
+ },
4487
+ /** Disables the button and prevent pointer events. */
4488
+ disabled: {
4489
+ type: Boolean
4490
+ }
4491
+ },
4492
+ computed: {
4493
+ typeClass() {
4494
+ return this.type && this.type !== "" ? `ecs-button-more-${this.type}` : this.type;
4495
+ }
4496
+ },
4497
+ mounted() {
4498
+ this.$slots.default === void 0 && (!this.ariaLabel || this.ariaLabel.trim());
4499
+ }
4500
+ }, lr = ["aria-label", "aria-disabled", "aria-expanded", "aria-haspopup", "disabled"];
4501
+ function cr(e, s, t, a, n, i) {
4502
+ const r = p("ecs-icon"), c = p("ecs-focus-ring");
4503
+ return o(), l("button", {
4504
+ onClick: s[0] || (s[0] = (d) => e.$emit("click", d)),
4505
+ "aria-label": t.ariaLabel,
4506
+ "aria-disabled": t.disabled || null,
4507
+ "aria-expanded": t.active || null,
4508
+ "aria-haspopup": t.type == "dropdown" || null,
4509
+ disabled: t.disabled || null,
4510
+ class: v([
4511
+ t.active ? "active" : "",
4512
+ i.typeClass
4513
+ ])
4514
+ }, [
4515
+ t.type == "ellipsis" ? (o(), y(r, {
4516
+ key: 0,
4517
+ type: "more",
4518
+ size: "20",
4519
+ color: "#FFF"
4520
+ })) : u("", !0),
4521
+ t.type == "dropdown" || t.type == "dropdown-round" ? (o(), y(r, {
4522
+ key: 1,
4523
+ type: "chevron-down",
4524
+ size: "12",
4525
+ color: "var(--color-gray-9)"
4526
+ })) : u("", !0),
4527
+ t.type === "expand" ? m(e.$slots, "default", { key: 2 }, void 0, !0) : u("", !0),
4528
+ b(c)
4529
+ ], 10, lr);
4530
+ }
4531
+ const Ds = /* @__PURE__ */ _(rr, [["render", cr], ["__scopeId", "data-v-faa154dd"]]);
4532
+ const dr = {
4533
+ name: "ecs-button-table",
4534
+ emits: ["click", "mouseover", "mouseleave"],
4535
+ components: {
4536
+ EcsIcon: M,
4537
+ EcsFocusRing: L
4538
+ },
4539
+ props: {
4540
+ /** Displays the button in an active state. */
4541
+ active: Boolean,
4542
+ /** Show the button without a background color. */
4543
+ subtle: {
4544
+ type: Boolean,
4545
+ default: !1
4546
+ },
4547
+ /** Button is visually toned down (text and icon are more gray than black). */
4548
+ pale: {
4549
+ type: Boolean,
4550
+ default: !1
4551
+ },
4552
+ /** Sets the size of the button. */
4553
+ size: {
4554
+ type: String,
4555
+ validator: (e) => ["md", "sml", null].includes(e),
4556
+ default: "md"
4557
+ },
4558
+ /** If set, an icon will be added to the left of the button. The list of available icon names can be found [here](https://github.com/everchron/ec-shards/tree/main/src/assets/icons). */
4559
+ icon: {
4560
+ type: String
4561
+ },
4562
+ /** Text text inside the button. */
4563
+ label: {
4564
+ type: [String, Number]
4565
+ },
4566
+ /** Turns the button into disabled state, which disables all interactions and hover effects. */
4567
+ disabled: {
4568
+ type: Boolean,
4569
+ default: !1
4570
+ },
4571
+ /** If set, a small arrow will show up on the right side of the button, to indicate an collapse/expand state. The direction of the button is determined by the `active` prop. */
4572
+ chevron: {
4573
+ type: Boolean,
4574
+ default: !1
4575
+ },
4576
+ /** If set, the button will not show any effects that would indicate that you could interact with the button. This is usefull when the button is only used to show a specific count/label instead of triggering any actions. */
4577
+ unreactive: {
4578
+ type: Boolean,
4579
+ default: !1
4580
+ },
4581
+ /** Turns the button into a loading state, which makes it appear disabled and replaces the default icon (if set) with a spinner. */
4582
+ loading: {
4583
+ type: Boolean,
4584
+ default: !1
4585
+ }
4586
+ },
4587
+ computed: {
4588
+ hasLabel() {
4589
+ return this.label && this.label !== "" || this.label != null ? "has-label" : this.label;
4590
+ },
4591
+ sizeClass() {
4592
+ return this.size && this.size !== "" ? `ecs-button-table-${this.size}` : this.size;
4593
+ },
4594
+ iconSize() {
4595
+ return this.size == "sml" ? "16" : "20";
4596
+ },
4597
+ iconType() {
4598
+ return this.loading ? "loading" : this.icon;
4599
+ },
4600
+ ariaDisabled() {
4601
+ return this.disabled || this.unreactive ? !0 : null;
4602
+ }
4603
+ }
4604
+ }, ur = ["disabled", "aria-disabled", "aria-expanded", "aria-busy"], fr = {
4605
+ key: 1,
4606
+ class: "button-label"
4607
+ };
4608
+ function pr(e, s, t, a, n, i) {
4609
+ const r = p("ecs-icon"), c = p("ecs-focus-ring");
4610
+ return o(), l("button", {
4611
+ class: v(["ecs-button-table", [
4612
+ t.active ? "active" : "",
4613
+ i.hasLabel,
4614
+ t.subtle ? "subtle" : "",
4615
+ t.pale ? "pale" : "",
4616
+ t.unreactive ? "unreactive" : "",
4617
+ t.loading ? "loading" : "",
4618
+ i.sizeClass
4619
+ ]]),
4620
+ disabled: t.disabled || null,
4621
+ "aria-disabled": i.ariaDisabled,
4622
+ "aria-expanded": t.active || null,
4623
+ "aria-busy": t.loading || null,
4624
+ onClick: s[0] || (s[0] = (d) => e.$emit("click", d)),
4625
+ onMouseover: s[1] || (s[1] = (d) => e.$emit("mouseover", d)),
4626
+ onMouseleave: s[2] || (s[2] = (d) => e.$emit("mouseleave", d))
4627
+ }, [
4628
+ t.icon || t.loading ? (o(), y(r, {
4629
+ key: 0,
4630
+ type: i.iconType,
4631
+ size: i.iconSize
4632
+ }, null, 8, ["type", "size"])) : u("", !0),
4633
+ t.label != null ? (o(), l("div", fr, x(t.label), 1)) : u("", !0),
4634
+ t.chevron ? (o(), l("div", {
4635
+ key: 2,
4636
+ class: v(["chevron", t.active ? "expand" : ""])
4637
+ }, null, 2)) : u("", !0),
4638
+ b(c)
4639
+ ], 42, ur);
4640
+ }
4641
+ const Fs = /* @__PURE__ */ _(dr, [["render", pr], ["__scopeId", "data-v-f5a891fe"]]);
4642
+ const gr = {
4643
+ name: "ecs-toolbar-button-group"
4644
+ }, mr = { class: "ecs-toolbar-button-group" };
4645
+ function hr(e, s, t, a, n, i) {
4646
+ return o(), l("div", mr, [
4647
+ m(e.$slots, "default", {}, void 0, !0)
4648
+ ]);
4649
+ }
4650
+ const Ht = /* @__PURE__ */ _(gr, [["render", hr], ["__scopeId", "data-v-743ca90b"]]);
4651
+ const vr = {
4652
+ name: "ecs-toolbar-icon-button",
4653
+ emits: ["click"],
4654
+ components: { EcsIcon: M, EcsFocusRing: L },
4655
+ props: {
4656
+ /** The icon type of the button. The list of available icon names can be found [here](https://github.com/everchron/ec-shards/tree/main/src/assets/icons). Note that only icons prefixed with `toolbar-` should be used here. */
4657
+ icon: {
4658
+ type: String,
4659
+ required: !0
4660
+ },
4661
+ /** Renders a small secondary icon in the bottom left of the button. Should only used under special conditions, eg. to reflect a specifc state that can not be handled by the `active` prop. The list of available icon names can be found [here](https://github.com/everchron/ec-shards/tree/main/src/assets/icons). */
4662
+ subIcon: {
4663
+ type: String
4664
+ },
4665
+ /** When set, the icon is spinning. Should really only be used when the `icon` is set to `toolbar-refresh`. */
4666
+ refresh: {
4667
+ type: Boolean,
4668
+ default: !1
4669
+ },
4670
+ /** Indicates that the button is activated. */
4671
+ active: {
4672
+ type: Boolean,
4673
+ default: !1
4674
+ },
4675
+ /** Show the button in loading state. */
4676
+ loading: {
4677
+ type: Boolean,
4678
+ default: !1
4679
+ },
4680
+ /** Adds a small blue badge to the upper right of the button. */
4681
+ hasBadge: {
4682
+ type: Boolean,
4683
+ default: !1
4684
+ },
4685
+ /** Sets the aria-label attribute to improve accessibility. */
4686
+ ariaLabel: {
4687
+ type: String
4688
+ //required: true
4689
+ }
4690
+ },
4691
+ computed: {
4692
+ ariaBusy() {
4693
+ return this.refresh || this.loading ? !0 : null;
4694
+ }
4695
+ }
4696
+ }, _r = ["aria-busy", "aria-label"], yr = {
4697
+ key: 0,
4698
+ class: "badge"
4699
+ }, br = { class: "sub-icon" };
4700
+ function kr(e, s, t, a, n, i) {
4701
+ const r = p("ecs-icon"), c = p("ecs-focus-ring");
4702
+ return o(), l("button", {
4703
+ onClick: s[0] || (s[0] = (d) => e.$emit("click", d)),
4704
+ "aria-busy": i.ariaBusy,
4705
+ "aria-label": t.ariaLabel,
4706
+ class: v(["ecs-toolbar-icon-button", [
4707
+ t.refresh ? "refreshing" : "",
4708
+ t.active ? "active" : "",
4709
+ t.loading ? "loading" : ""
4710
+ ]])
4711
+ }, [
4712
+ b(r, { type: t.icon }, null, 8, ["type"]),
4713
+ t.hasBadge ? (o(), l("span", yr)) : u("", !0),
4714
+ f("div", br, [
4715
+ t.subIcon ? (o(), y(r, {
4716
+ key: 0,
4717
+ type: t.subIcon,
4718
+ size: "14"
4719
+ }, null, 8, ["type"])) : u("", !0)
4720
+ ]),
4721
+ b(c)
4722
+ ], 10, _r);
4723
+ }
4724
+ const xy = /* @__PURE__ */ _(vr, [["render", kr], ["__scopeId", "data-v-098e1030"]]);
4725
+ const xr = {
4726
+ name: "ecs-card",
4727
+ emits: ["click"],
4728
+ props: {
4729
+ /** Unique ID */
4730
+ id: {
4731
+ type: [String, Number],
4732
+ default: null
4733
+ },
4734
+ /** Indicates that this card is currently selected (most likely via a checkbox that is contained in the card). */
4735
+ selected: {
4736
+ type: Boolean,
4737
+ default: !1
4738
+ },
4739
+ /** Indicates that this card is currently expanded. Adds a bit of spacing and a stronger shadow. */
4740
+ expanded: {
4741
+ type: Boolean,
4742
+ default: !1
4743
+ },
4744
+ /** Determines if the card should have a :hover state. This usually applies when the card is clickable, or expandable. */
4745
+ hover: {
4746
+ type: Boolean,
4747
+ default: !1
4748
+ },
4749
+ /** Shows a full-height progress bar in the background of the card. Should only be used for single row cards. Pass the current percentage value as `Number`. */
4750
+ progress: {
4751
+ type: Number,
4752
+ default: null
4753
+ },
4754
+ /** Turns the whole card into a disabled state. This also blocks all interactions on card content. */
4755
+ disabled: {
4756
+ type: Boolean,
4757
+ default: !1
4758
+ }
4759
+ },
4760
+ computed: {
4761
+ itemId() {
4762
+ return `item-${this.id}`;
4763
+ }
4764
+ }
4765
+ }, wr = ["id"], Sr = { class: "ecs-card-inner" }, Cr = { class: "ecs-card-background" };
4766
+ function Br(e, s, t, a, n, i) {
4767
+ return o(), l("div", {
4768
+ onClick: s[0] || (s[0] = (r) => e.$emit("click", r)),
4769
+ class: v(["ecs-card", [
4770
+ t.selected ? "ecs-card-selected" : "",
4771
+ t.expanded ? "ecs-card-expanded" : "",
4772
+ t.hover ? "ecs-card-hover" : "",
4773
+ t.disabled ? "ecs-card-disabled" : ""
4774
+ ]]),
4775
+ id: i.itemId
4776
+ }, [
4777
+ f("div", Sr, [
4778
+ m(e.$slots, "default", {}, void 0, !0)
4779
+ ]),
4780
+ f("div", Cr, [
4781
+ t.progress ? (o(), l("div", {
4782
+ key: 0,
4783
+ class: "progress",
4784
+ style: B({ width: t.progress + "%" })
4785
+ }, null, 4)) : u("", !0)
4786
+ ])
4787
+ ], 10, wr);
4788
+ }
4789
+ const wy = /* @__PURE__ */ _(xr, [["render", Br], ["__scopeId", "data-v-8d449816"]]);
4790
+ const zr = {
4791
+ name: "ecs-citation-line",
4792
+ emits: ["change", "blur", "focus"],
4793
+ components: { EcsFlexRow: Me },
4794
+ props: {
4795
+ /** The citation range text. */
4796
+ cite: {
4797
+ type: String,
4798
+ required: !0
4799
+ },
4800
+ /** Unique citation ID */
4801
+ id: {
4802
+ type: [String, Number],
4803
+ required: !0
4804
+ },
4805
+ /** Determines the visual state of the citation line. */
4806
+ state: {
4807
+ type: String,
4808
+ validator: (e) => ["default", "error", "warning", "edited", "skipped"].includes(e),
4809
+ default: "default"
4810
+ },
4811
+ /** Makes the content of the citation line editable. */
4812
+ editable: {
4813
+ type: Boolean,
4814
+ default: !0
4815
+ }
4816
+ },
4817
+ data() {
4818
+ return {
4819
+ citeValue: this.cite
4820
+ };
4821
+ },
4822
+ mounted() {
4823
+ this.$refs.editable.innerText = this.citeValue;
4824
+ },
4825
+ methods: {
4826
+ onInput(e) {
4827
+ this.citeValue = e.target.innerText, this.$emit("change", this.citeValue, this.id);
4828
+ }
4829
+ }
4830
+ }, Ir = ["contenteditable"];
4831
+ function Er(e, s, t, a, n, i) {
4832
+ const r = p("ecs-flex-row");
4833
+ return o(), y(r, { class: "ecs-citation-line" }, {
4834
+ default: w(() => [
4835
+ f("div", {
4836
+ class: v(["ecs-citation-line-cite", [t.state, t.editable ? "editable" : ""]]),
4837
+ ref: "editable",
4838
+ onKeyup: s[0] || (s[0] = (...c) => i.onInput && i.onInput(...c)),
4839
+ onBlur: s[1] || (s[1] = (c) => e.$emit("blur", c)),
4840
+ onFocus: s[2] || (s[2] = (c) => e.$emit("focus", c)),
4841
+ onKeydown: s[3] || (s[3] = U(G(() => {
4842
+ }, ["prevent"]), ["enter"])),
4843
+ contenteditable: t.editable
4844
+ }, null, 42, Ir),
4845
+ e.$slots.actions ? (o(), y(r, {
4846
+ key: 0,
4847
+ justify: "end",
4848
+ class: "ecs-citation-line-actions"
4849
+ }, {
4850
+ default: w(() => [
4851
+ m(e.$slots, "actions", {}, void 0, !0)
4852
+ ]),
4853
+ _: 3
4854
+ })) : u("", !0)
4855
+ ]),
4856
+ _: 3
4857
+ });
4858
+ }
4859
+ const Sy = /* @__PURE__ */ _(zr, [["render", Er], ["__scopeId", "data-v-cfd8e718"]]);
4860
+ var qt = {};
4861
+ Object.defineProperty(qt, "__esModule", {
4862
+ value: !0
4863
+ });
4864
+ var $r = qt.clickOutSide = {
4865
+ mounted: function(s, t, a) {
4866
+ s.clickOutsideEvent = function(n) {
4867
+ s == n.target || s.contains(n.target) || t.value(n, s);
4868
+ }, document.addEventListener("click", s.clickOutsideEvent);
4869
+ },
4870
+ unmounted: function(s) {
4871
+ document.removeEventListener("click", s.clickOutsideEvent);
4872
+ }
4873
+ }, Pr = qt.default = $r;
4874
+ const Tr = {
4875
+ name: "ecs-context-menu",
4876
+ emits: ["option-clicked", "menu-closed"],
4877
+ components: { EcsIcon: M, EcsFocusRing: L, EcsButton: Se },
4878
+ directives: {
4879
+ clickOutSide: Pr
4880
+ },
4881
+ props: {
4882
+ /** Unique String that acts as the id for the menu. */
4883
+ elementId: {
4884
+ type: String,
4885
+ required: !0
4886
+ },
4887
+ /** Array of menu options to show. Component will use the `name` parameter as the label. Array needs to contain objects with the following structure:
4888
+ ```{
4889
+ name: 'Duplicate',
4890
+ slug: 'duplicate',
4891
+ icon: 'evidence',
4892
+ disabled: false,
4893
+ type: '',
4894
+ nested: { ... }
4895
+ }``` */
4896
+ options: {
4897
+ type: Array,
4898
+ required: !0
4899
+ },
4900
+ /** If passed, an icon will appear. The list of available icon names can be found [here](https://github.com/everchron/ec-shards/tree/main/src/assets/icons). */
4901
+ icon: {
4902
+ type: String
4903
+ }
4904
+ },
4905
+ data() {
4906
+ return {
4907
+ item: null,
4908
+ menuWidth: null,
4909
+ menuHeight: null,
4910
+ opened: !1,
4911
+ left: 0,
4912
+ top: 0
4913
+ };
4914
+ },
4915
+ computed: {
4916
+ postionStyles() {
4917
+ return { left: this.left + "px", top: this.top + "px" };
4918
+ }
4919
+ },
4920
+ methods: {
4921
+ showMenu(e, s) {
4922
+ this.item = s;
4923
+ let t = document.getElementById(this.elementId);
4924
+ t && ((!this.menuWidth || !this.menuHeight) && (t.style.visibility = "hidden", t.style.display = "block", this.menuWidth = t.offsetWidth, this.menuHeight = t.offsetHeight, t.removeAttribute("style")), this.menuWidth + e.pageX >= window.innerWidth ? this.left = e.pageX - this.menuWidth + 2 : this.left = e.pageX - 2, this.menuHeight + e.pageY >= window.innerHeight ? this.top = e.pageY - this.menuHeight + 2 : this.top = e.pageY - 2, this.opened = !0, this.$emit("menu-opened", this.item), this.$nextTick(() => {
4925
+ this.$refs.menu.focus();
4926
+ }));
4927
+ },
4928
+ hideContextMenu() {
4929
+ document.getElementById(this.elementId) && (this.opened = !1, this.$emit("menu-closed"));
4930
+ },
4931
+ onClickOutside() {
4932
+ this.hideContextMenu();
4933
+ },
4934
+ optionClicked(e) {
4935
+ this.hideContextMenu(), this.$emit("option-clicked", {
4936
+ item: this.item,
4937
+ option: e
4938
+ });
4939
+ },
4940
+ onEscKeyRelease(e) {
4941
+ e.keyCode === 27 && this.hideContextMenu();
4942
+ },
4943
+ // Focus the first menu item when the context menu opens
4944
+ focusFirst() {
4945
+ this.$refs.menu.children[0].focus();
4946
+ },
4947
+ // Focus the last menu item when the user presses the up arrow key on the first menu item
4948
+ focusLast() {
4949
+ const e = this.$refs.menu.children;
4950
+ e[e.length - 1].focus();
4951
+ },
4952
+ // Focus the previous menu item when the user presses the up arrow key
4953
+ focusPrevious(e) {
4954
+ const s = this.$refs.menu.children, t = Array.prototype.indexOf.call(s, e.target);
4955
+ if (t > 0) {
4956
+ let a = t - 1;
4957
+ for (; a >= 0 && s[a].getAttribute("tabindex") === "-1"; )
4958
+ a--;
4959
+ a >= 0 ? s[a].focus() : this.focusLast();
4960
+ } else
4961
+ this.focusLast();
4962
+ },
4963
+ focusNext(e) {
4964
+ const s = this.$refs.menu.children;
4965
+ let t = Array.prototype.indexOf.call(s, e.target);
4966
+ for (; t < s.length - 1; )
4967
+ if (t++, s[t].getAttribute("tabindex") !== "-1") {
4968
+ s[t].focus();
4969
+ return;
4970
+ }
4971
+ this.focusFirst();
4972
+ }
4973
+ },
4974
+ mounted() {
4975
+ document.body.addEventListener("keyup", this.onEscKeyRelease), this.$refs.menu.addEventListener("keydown", (e) => {
4976
+ e.keyCode === 9 && (e.preventDefault(), this.focusFirst());
4977
+ });
4978
+ },
4979
+ beforeUnmount() {
4980
+ document.removeEventListener("keyup", this.onEscKeyRelease);
4981
+ }
4982
+ }, Mr = ["id"], Lr = ["onClick", "role", "tabindex", "aria-disabled"], Or = { key: 1 };
4983
+ function Ar(e, s, t, a, n, i) {
4984
+ const r = p("ecs-icon"), c = p("ecs-button"), d = p("ecs-focus-ring"), g = oi("click-out-side");
4985
+ return Ge((o(), l("div", {
4986
+ class: v(["ecs-context-menu", n.opened ? " opened" : ""]),
4987
+ id: t.elementId,
4988
+ style: B([i.postionStyles])
4989
+ }, [
4990
+ f("ul", {
4991
+ role: "menu",
4992
+ "aria-orientation": "vertical",
4993
+ tabindex: "0",
4994
+ onKeydown: [
4995
+ s[0] || (s[0] = U(G((...h) => i.focusPrevious && i.focusPrevious(...h), ["prevent"]), ["up"])),
4996
+ s[1] || (s[1] = U(G((...h) => i.focusNext && i.focusNext(...h), ["prevent"]), ["down"]))
4997
+ ],
4998
+ ref: "menu",
4999
+ id: "my-menu"
5000
+ }, [
5001
+ (o(!0), l(Z, null, ge(t.options, (h, k) => (o(), l("li", {
5002
+ key: k,
5003
+ onClick: G((z) => i.optionClicked(h), ["stop"]),
5004
+ role: h.type === "divider" ? "separator" : "menuitem",
5005
+ tabindex: h.type === "divider" || h.disabled ? "-1" : "0",
5006
+ "aria-disabled": h.disabled || null,
5007
+ class: v([
5008
+ h.type === "divider" ? "ecs-context-menu-divider" : "ecs-context-menu-item",
5009
+ h.type === "danger" ? "danger" : "",
5010
+ h.disabled ? "disabled" : ""
5011
+ ])
5012
+ }, [
5013
+ h.icon ? (o(), y(r, {
5014
+ key: 0,
5015
+ type: h.icon,
5016
+ size: "20"
5017
+ }, null, 8, ["type"])) : u("", !0),
5018
+ h.type != "divider" ? (o(), l("span", Or, x(h.name), 1)) : u("", !0),
5019
+ h.nested ? (o(), y(c, {
5020
+ key: 2,
5021
+ onClick: G((z) => i.optionClicked(h.nested), ["stop"]),
5022
+ icon: h.nested.icon,
5023
+ title: h.nested.name,
5024
+ "aria-label": h.nested.name,
5025
+ disabled: h.nested.disabled || null,
5026
+ type: "secondary",
5027
+ "icon-only": "",
5028
+ size: "sml"
5029
+ }, null, 8, ["onClick", "icon", "title", "aria-label", "disabled"])) : u("", !0),
5030
+ b(d, {
5031
+ danger: h.type == "danger"
5032
+ }, null, 8, ["danger"])
5033
+ ], 10, Lr))), 128))
5034
+ ], 544)
5035
+ ], 14, Mr)), [
5036
+ [g, i.onClickOutside]
5037
+ ]);
5038
+ }
5039
+ const Cy = /* @__PURE__ */ _(Tr, [["render", Ar], ["__scopeId", "data-v-7a99d0e5"]]);
5040
+ const Nr = {
5041
+ name: "ecs-collapse",
5042
+ emits: ["toggled", "remove"],
5043
+ components: { EcsButton: Se, EcsFocusRing: L, EcsFlexRow: Me },
5044
+ props: {
5045
+ /** Unique ID, is required to handle persist states. */
5046
+ id: {
5047
+ type: String,
5048
+ required: !0
5049
+ },
5050
+ /** The headline of the collapse control. */
5051
+ title: {
5052
+ type: String,
5053
+ required: !0
5054
+ },
5055
+ /** Determines the padding of the headline and content sections. */
5056
+ indent: {
5057
+ type: String,
5058
+ validator: (e) => ["sml", "md", null].includes(e),
5059
+ default: null
5060
+ },
5061
+ /** Determines the padding of the headline section alone. */
5062
+ headlineIndent: {
5063
+ type: String,
5064
+ validator: (e) => ["sml", "md", null].includes(e),
5065
+ default: null
5066
+ },
5067
+ /** Displays a border above the headline section. */
5068
+ borderTop: {
5069
+ type: Boolean
5070
+ },
5071
+ /** Displays a border below the content section. */
5072
+ borderBottom: {
5073
+ type: Boolean
5074
+ },
5075
+ /** Makes the headline to render in font-weight bold. */
5076
+ headlineBold: {
5077
+ type: Boolean
5078
+ },
5079
+ /** Determines the initial state of the control. If set to `true`, the collapse is expanded on mount. */
5080
+ visible: {
5081
+ type: Boolean
5082
+ },
5083
+ /** If set, a small (-) remove button is rendered in the headline section. */
5084
+ removable: {
5085
+ type: Boolean
5086
+ },
5087
+ /** Sets the tooltip title of the remove button. */
5088
+ removableTooltip: {
5089
+ type: String
5090
+ },
5091
+ /** Saves the state of the collapse control in localstorage and reads the state on next mount, to automatically set it to expanded or collapsed. */
5092
+ persist: {
5093
+ type: Boolean,
5094
+ default: !0
5095
+ },
5096
+ /** Sets the top and bottom padding of the content section. */
5097
+ contentPadding: {
5098
+ type: String,
5099
+ validator: (e) => ["none", "sml", "md"].includes(e),
5100
+ default: "md"
5101
+ },
5102
+ /** Sets the count of the collapse control in parenthese next to the headline. */
5103
+ count: {
5104
+ type: Number
5105
+ }
5106
+ },
5107
+ data() {
5108
+ return {
5109
+ isVisible: this.visible
5110
+ };
5111
+ },
5112
+ computed: {
5113
+ indentation() {
5114
+ return this.indent && this.indent !== "" ? `ecs-collapsable-indent-${this.indent}` : this.indent;
5115
+ },
5116
+ headlineIndentation() {
5117
+ return this.headlineIndent && this.headlineIndent !== "" ? `ecs-collapsable-headline-indent-${this.headlineIndent}` : this.headlineIndent;
5118
+ },
5119
+ removeButtonIndentation() {
5120
+ return this.headlineIndent && this.headlineIndent !== "" ? `remove-button-indent-${this.headlineIndent}` : this.indent && this.indent !== "" ? `remove-button-indent-${this.indent}` : this.headlineIndent;
5121
+ },
5122
+ contentPaddingClass() {
5123
+ return `ecs-collapsable-content-padding-${this.contentPadding}`;
5124
+ }
5125
+ },
5126
+ mounted() {
5127
+ this.$nextTick(() => {
5128
+ this.persist && (localStorage.getItem(`collapse-${this.id}`) === null ? (this.isVisible = this.visible, localStorage.setItem(`collapse-${this.id}`, this.isVisible)) : this.isVisible = localStorage.getItem(`collapse-${this.id}`) == "true");
5129
+ });
5130
+ },
5131
+ methods: {
5132
+ toggleCollapse() {
5133
+ this.isVisible = !this.isVisible, this.persist && localStorage.setItem(`collapse-${this.id}`, this.isVisible), this.$emit("toggled", this.id, this.isVisible);
5134
+ }
5135
+ },
5136
+ watch: {
5137
+ visible() {
5138
+ this.isVisible = this.visible;
5139
+ }
5140
+ }
5141
+ }, Dr = { class: "wrap" }, Fr = ["aria-expanded", "aria-controls"], Rr = {
5142
+ key: 0,
5143
+ class: "ecs-collapsable-headline-count"
5144
+ }, Vr = {
5145
+ key: 0,
5146
+ class: "ecs-collapsable-headline-controls"
5147
+ }, Hr = ["id", "aria-hidden"];
5148
+ function qr(e, s, t, a, n, i) {
5149
+ const r = p("ecs-button"), c = p("ecs-flex-row"), d = p("ecs-focus-ring");
5150
+ return o(), l("div", {
5151
+ class: v(["ecs-collapsable", [
5152
+ t.borderTop ? "ecs-collapsable-border-top" : "",
5153
+ t.borderBottom ? "ecs-collapsable-border-bottom" : "",
5154
+ i.indentation,
5155
+ i.headlineIndentation
5156
+ ]])
5157
+ }, [
5158
+ f("div", Dr, [
5159
+ t.removable ? (o(), y(r, {
5160
+ key: 0,
5161
+ onClick: s[0] || (s[0] = (g) => e.$emit("remove", t.id)),
5162
+ type: "secondary",
5163
+ "icon-only": "",
5164
+ icon: "minus",
5165
+ size: "sml",
5166
+ class: v(["remove-button", i.removeButtonIndentation]),
5167
+ title: t.removableTooltip,
5168
+ "aria-label": t.removableTooltip
5169
+ }, null, 8, ["class", "title", "aria-label"])) : u("", !0),
5170
+ f("h3", {
5171
+ onClick: s[1] || (s[1] = (...g) => i.toggleCollapse && i.toggleCollapse(...g)),
5172
+ onKeydown: s[2] || (s[2] = U(G((...g) => i.toggleCollapse && i.toggleCollapse(...g), ["prevent"]), ["space"])),
5173
+ role: "button",
5174
+ class: v(["ecs-collapsable-headline", [t.headlineBold ? "ecs-headline-section-bold" : "ecs-headline-section", n.isVisible ? "" : "collapsed"]]),
5175
+ tabindex: "0",
5176
+ "aria-expanded": n.isVisible ? "true" : "false",
5177
+ "aria-controls": `collapse-${this.id}`
5178
+ }, [
5179
+ b(c, { gap: 4 }, {
5180
+ default: w(() => [
5181
+ D(x(t.title) + " ", 1),
5182
+ t.count ? (o(), l("span", Rr, "(" + x(t.count) + ")", 1)) : u("", !0)
5183
+ ]),
5184
+ _: 1
5185
+ }),
5186
+ b(d, {
5187
+ inset: 0,
5188
+ radius: 0
5189
+ }),
5190
+ e.$slots.controls ? (o(), l("div", Vr, [
5191
+ m(e.$slots, "controls", {}, void 0, !0)
5192
+ ])) : u("", !0)
5193
+ ], 42, Fr)
5194
+ ]),
5195
+ f("div", {
5196
+ class: v([n.isVisible ? "collapse-show" : "collapse-hide", "collapse"]),
5197
+ id: `collapse-${this.id}`,
5198
+ "aria-hidden": n.isVisible ? "false" : "true"
5199
+ }, [
5200
+ f("div", {
5201
+ class: v(["ecs-collapsable-content", i.contentPaddingClass])
5202
+ }, [
5203
+ m(e.$slots, "default", {}, void 0, !0)
5204
+ ], 2)
5205
+ ], 10, Hr)
5206
+ ], 2);
5207
+ }
5208
+ const By = /* @__PURE__ */ _(Nr, [["render", qr], ["__scopeId", "data-v-4bf981c8"]]);
5209
+ const Wr = {
5210
+ name: "ecs-collection-control",
5211
+ emits: ["toggled", "collectionTooltip"],
5212
+ components: { EcsIcon: M, EcsFocusRing: L },
5213
+ mixins: [de],
5214
+ props: {
5215
+ /** Icon representing the type of selection. The list of available icon names can be found [here](https://github.com/everchron/ec-shards/tree/main/src/assets/icons). */
5216
+ icon: {
5217
+ type: String
5218
+ },
5219
+ /** The size of the collection control. */
5220
+ size: {
5221
+ type: String,
5222
+ validator: (e) => ["md", "lg"].includes(e),
5223
+ default: "lg"
5224
+ },
5225
+ /** If set to true, the control will appear expanded by default. */
5226
+ visible: {
5227
+ type: Boolean,
5228
+ default: !1
5229
+ },
5230
+ /** The label that describes the type of selected objects. E.g. "Users: " */
5231
+ label: {
5232
+ type: String
5233
+ },
5234
+ /** Option to disable the outer borders of the control. */
5235
+ noBorder: {
5236
+ type: Boolean,
5237
+ default: !1
5238
+ },
5239
+ /** Array of the currently selected objects. Must contain `name` and `value` for each object. */
5240
+ collection: {
5241
+ type: Array,
5242
+ required: !0
5243
+ },
5244
+ /** Optional maximum height of the object list in pixels. If the list exceeds the maximum height, a scrollbar appears. */
5245
+ maxHeight: {
5246
+ type: Number,
5247
+ default: null
5248
+ },
5249
+ /** Makes the control non-interactive and removes all checkboxes from the list items. */
5250
+ nonInteractive: {
5251
+ type: Boolean,
5252
+ default: !1
5253
+ }
5254
+ },
5255
+ data() {
5256
+ return {
5257
+ isVisible: this.visible,
5258
+ expandId: ""
5259
+ };
5260
+ },
5261
+ computed: {
5262
+ iconSize() {
5263
+ return this.size === "md" ? "24px" : "30px";
5264
+ },
5265
+ fullTooltip() {
5266
+ return this.collection.filter((s) => s.value).map((s) => s.name).join(", ");
5267
+ },
5268
+ listMaxHeight() {
5269
+ return this.maxHeight ? `max-height: ${this.maxHeight}px` : null;
5270
+ }
5271
+ },
5272
+ methods: {
5273
+ toggleCollapse() {
5274
+ this.nonInteractive || (this.isVisible = !this.isVisible), this.$emit("toggled", this.id, this.isVisible);
5275
+ },
5276
+ toggleTooltip() {
5277
+ this.$emit("collectionTooltip", this.fullTooltip);
5278
+ }
5279
+ },
5280
+ watch: {
5281
+ visible() {
5282
+ this.isVisible = this.visible;
5283
+ }
5284
+ },
5285
+ created() {
5286
+ this.expandId = this.generateUniqueId();
5287
+ }
5288
+ }, jr = ["tabindex", "role", "aria-expanded", "aria-controls"], Gr = {
5289
+ key: 1,
5290
+ class: "description"
5291
+ }, Ur = ["title"], Kr = { key: 0 }, Yr = ["id", "aria-hidden"];
5292
+ function Xr(e, s, t, a, n, i) {
5293
+ const r = p("ecs-focus-ring"), c = p("ecs-icon");
5294
+ return o(), l("div", {
5295
+ class: v(["ecs-collection-control", [
5296
+ t.noBorder ? "" : "bordered",
5297
+ n.isVisible || t.nonInteractive ? "" : "collapsed",
5298
+ t.size
5299
+ ]])
5300
+ }, [
5301
+ f("div", {
5302
+ onClick: s[2] || (s[2] = (...d) => i.toggleCollapse && i.toggleCollapse(...d)),
5303
+ onKeydown: [
5304
+ s[3] || (s[3] = U(G((...d) => i.toggleCollapse && i.toggleCollapse(...d), ["prevent"]), ["enter"])),
5305
+ s[4] || (s[4] = U(G((...d) => i.toggleCollapse && i.toggleCollapse(...d), ["prevent"]), ["space"]))
5306
+ ],
5307
+ class: v(["ecs-collection-control-header", [
5308
+ n.isVisible || t.nonInteractive ? "" : "collapsed",
5309
+ t.nonInteractive ? "" : "interactive"
5310
+ ]]),
5311
+ tabindex: t.nonInteractive ? "-1" : "0",
5312
+ role: t.nonInteractive ? !1 : "button",
5313
+ "aria-expanded": t.nonInteractive ? "false" : n.isVisible ? "true" : "false",
5314
+ "aria-controls": t.nonInteractive ? !1 : n.expandId
5315
+ }, [
5316
+ b(r),
5317
+ t.icon ? (o(), y(c, {
5318
+ key: 0,
5319
+ type: t.icon,
5320
+ color: "#858E9E",
5321
+ size: i.iconSize
5322
+ }, null, 8, ["type", "size"])) : u("", !0),
5323
+ t.label ? (o(), l("div", Gr, x(t.label), 1)) : u("", !0),
5324
+ f("div", {
5325
+ class: "collection",
5326
+ onMouseover: s[0] || (s[0] = (...d) => i.toggleTooltip && i.toggleTooltip(...d)),
5327
+ onMouseleave: s[1] || (s[1] = (...d) => i.toggleTooltip && i.toggleTooltip(...d)),
5328
+ title: i.fullTooltip
5329
+ }, [
5330
+ (o(!0), l(Z, null, ge(t.collection, (d) => (o(), l("span", {
5331
+ key: d.name
5332
+ }, [
5333
+ d.value ? (o(), l("span", Kr, x(d.name), 1)) : u("", !0)
5334
+ ]))), 128))
5335
+ ], 40, Ur)
5336
+ ], 42, jr),
5337
+ f("div", {
5338
+ class: v([n.isVisible || t.nonInteractive ? "collapse-show" : "collapse-hide", "collapse"]),
5339
+ id: t.nonInteractive ? !1 : n.expandId,
5340
+ "aria-hidden": n.isVisible ? "false" : "true"
5341
+ }, [
5342
+ f("div", {
5343
+ class: "ecs-collection-control-list scrollbar scrollbar-sml",
5344
+ style: B(i.listMaxHeight)
5345
+ }, [
5346
+ m(e.$slots, "default")
5347
+ ], 4)
5348
+ ], 10, Yr)
5349
+ ], 2);
5350
+ }
5351
+ const zy = /* @__PURE__ */ _(Wr, [["render", Xr], ["__scopeId", "data-v-5e5716bc"]]);
5352
+ const Zr = {
5353
+ name: "ecs-skeleton-loader",
5354
+ props: {
5355
+ /** Determines the type of skeleton shape: `single` replicates a single line of text, `multi` a multi line text, and `rect` a generic rectangle shape. */
5356
+ type: {
5357
+ type: String,
5358
+ validator: (e) => ["single", "multi", "rect", "circle"].includes(e),
5359
+ default: "single"
5360
+ },
5361
+ /** Only used together with the `multi` type. Determines the amount of text lines. */
5362
+ count: {
5363
+ type: Number,
5364
+ default: 3
5365
+ },
5366
+ /** Sets the width of the `single` type in percentage. Sets the width of the `rect` type in pixels. */
5367
+ width: {
5368
+ type: Number,
5369
+ default: 20
5370
+ },
5371
+ /** Sets the height of the `rect` and `circle` type in pixels. */
5372
+ height: {
5373
+ type: Number,
5374
+ default: 20
5375
+ },
5376
+ /** Aligns the height and size of the single & multi types with our common line-height type scales. */
5377
+ lineHeight: {
5378
+ type: Number,
5379
+ validator: (e) => [1, 2, 3, 4, 5, 6].includes(e),
5380
+ default: 2
5381
+ }
5382
+ },
5383
+ computed: {
5384
+ rectClass() {
5385
+ return this.type && this.type !== "" ? `skeleton-${this.type}` : this.type;
5386
+ }
5387
+ }
5388
+ }, Jr = (e) => (ve("data-v-75354c78"), e = e(), _e(), e), Qr = {
5389
+ key: 1,
5390
+ class: "ecs-skeleton skeletons"
5391
+ }, el = /* @__PURE__ */ Jr(() => /* @__PURE__ */ f("div", { class: "skeleton skeleton-single" }, null, -1)), tl = [
5392
+ el
5393
+ ];
5394
+ function sl(e, s, t, a, n, i) {
5395
+ return t.type === "rect" || t.type === "circle" ? (o(), l("div", {
5396
+ key: 0,
5397
+ class: v(["ecs-skeleton skeleton", i.rectClass]),
5398
+ style: B({ width: t.width + "px", height: t.height + "px" })
5399
+ }, null, 6)) : t.type === "multi" ? (o(), l("div", Qr, [
5400
+ (o(!0), l(Z, null, ge(parseInt(t.count), (r) => (o(), l("div", {
5401
+ key: r,
5402
+ class: v(["skeleton-wrap", "skeleton-line-height-" + t.lineHeight])
5403
+ }, tl, 2))), 128))
5404
+ ])) : (o(), l("div", {
5405
+ key: 2,
5406
+ class: v(["ecs-skeleton skeleton-wrap", "skeleton-line-height-" + t.lineHeight])
5407
+ }, [
5408
+ f("div", {
5409
+ class: "skeleton skeleton-single",
5410
+ style: B({ width: t.width + "%" })
5411
+ }, null, 4)
5412
+ ], 2));
5413
+ }
5414
+ const Ce = /* @__PURE__ */ _(Zr, [["render", sl], ["__scopeId", "data-v-75354c78"]]);
5415
+ const il = {
5416
+ name: "ecs-formatted",
5417
+ components: { EcsSkeletonLoader: Ce },
5418
+ mixins: [de],
5419
+ props: {
5420
+ /** Sets the general font size of the formatted text component to small. */
5421
+ small: {
5422
+ type: Boolean,
5423
+ default: !1
5424
+ },
5425
+ /** Turns the formatted text component into a skeleton loader. */
5426
+ loading: {
5427
+ type: Boolean,
5428
+ default: !1
5429
+ },
5430
+ /** Used to customize the line count of the skeleton loader. */
5431
+ skeletonCount: {
5432
+ type: Number,
5433
+ default: 4
5434
+ }
5435
+ },
5436
+ created() {
5437
+ this.formattedId = this.generateUniqueId();
5438
+ },
5439
+ mounted() {
5440
+ this.$el.querySelectorAll(`#${this.formattedId} a`).forEach((s) => {
5441
+ const t = s.getAttribute("href");
5442
+ s.setAttribute("title", `Open ${t}`);
5443
+ });
5444
+ }
5445
+ }, nl = ["id"];
5446
+ function al(e, s, t, a, n, i) {
5447
+ const r = p("ecs-skeleton-loader");
5448
+ return o(), l("div", {
5449
+ class: v(["ecs-formatted", [t.small ? "ecs-formatted-sml" : ""]]),
5450
+ id: e.formattedId
5451
+ }, [
5452
+ t.loading ? (o(), y(r, {
5453
+ key: 1,
5454
+ type: "multi",
5455
+ "line-height": t.small ? 1 : 2,
5456
+ count: t.skeletonCount
5457
+ }, null, 8, ["line-height", "count"])) : m(e.$slots, "default", {
5458
+ key: 0,
5459
+ ref: "slot"
5460
+ })
5461
+ ], 10, nl);
5462
+ }
5463
+ const Rs = /* @__PURE__ */ _(il, [["render", al]]);
5464
+ const ol = {
5465
+ name: "ecs-comment",
5466
+ emits: ["edit", "delete"],
5467
+ components: { EcsAvatar: Mi, EcsButton: Se, EcsFormatted: Rs, EcsSkeletonLoader: Ce },
5468
+ props: {
5469
+ /** Name of the user that is the comment author. */
5470
+ userName: {
5471
+ type: String,
5472
+ required: !0
5473
+ },
5474
+ /** Avatar image of the user that is the comment author. */
5475
+ userImage: {
5476
+ type: String,
5477
+ default: null
5478
+ },
5479
+ /** Determines if controls to edit or delete the comment should be available. */
5480
+ canEdit: {
5481
+ type: Boolean,
5482
+ default: !1
5483
+ },
5484
+ /** Shows the whole comment in skeleton loading state. */
5485
+ loading: {
5486
+ type: Boolean,
5487
+ default: !1
5488
+ }
5489
+ }
5490
+ }, rl = ["aria-busy"], ll = { class: "ecs-comment-header" }, cl = { class: "ecs-comment-autor" }, dl = {
5491
+ key: 2,
5492
+ class: "ecs-comment-meta"
5493
+ }, ul = { class: "ecs-comment-meta-name" }, fl = { class: "ecs-comment-meta-time" }, pl = {
5494
+ key: 3,
5495
+ class: "ecs-comment-meta loading"
5496
+ }, gl = {
5497
+ key: 0,
5498
+ class: "ecs-comment-actions"
5499
+ }, ml = {
5500
+ key: 2,
5501
+ class: "ecs-comment-edit"
5502
+ };
5503
+ function hl(e, s, t, a, n, i) {
5504
+ const r = p("ecs-skeleton-loader"), c = p("ecs-avatar"), d = p("ecs-button"), g = p("ecs-formatted");
5505
+ return o(), l("div", {
5506
+ class: "ecs-comment",
5507
+ role: "comment",
5508
+ "aria-busy": t.loading || null
5509
+ }, [
5510
+ f("div", ll, [
5511
+ f("div", cl, [
5512
+ t.loading ? (o(), y(r, {
5513
+ key: 0,
5514
+ type: "circle",
5515
+ width: 32,
5516
+ height: 32
5517
+ })) : (o(), y(c, {
5518
+ key: 1,
5519
+ name: t.userName,
5520
+ image: t.userImage,
5521
+ size: 32,
5522
+ rounded: ""
5523
+ }, null, 8, ["name", "image"])),
5524
+ t.loading ? (o(), l("div", pl, [
5525
+ b(r, {
5526
+ type: "single",
5527
+ "line-height": 3,
5528
+ width: 50
5529
+ }),
5530
+ b(r, {
5531
+ type: "single",
5532
+ "line-height": 2,
5533
+ width: 60
5534
+ })
5535
+ ])) : (o(), l("div", dl, [
5536
+ f("span", ul, x(t.userName), 1),
5537
+ f("span", fl, [
5538
+ m(e.$slots, "commentdate", {}, void 0, !0)
5539
+ ])
5540
+ ]))
5541
+ ]),
5542
+ t.canEdit ? (o(), l("div", gl, [
5543
+ b(d, {
5544
+ onClick: s[0] || (s[0] = (h) => e.$emit("edit", h)),
5545
+ type: "secondary",
5546
+ size: "sml",
5547
+ icon: "edit",
5548
+ "icon-only": "",
5549
+ title: "Edit Comment"
5550
+ }),
5551
+ b(d, {
5552
+ onClick: s[1] || (s[1] = (h) => e.$emit("delete", h)),
5553
+ type: "danger",
5554
+ size: "sml",
5555
+ icon: "delete",
5556
+ "icon-only": "",
5557
+ title: "Delete Comment"
5558
+ })
5559
+ ])) : u("", !0)
5560
+ ]),
5561
+ !e.$slots.editform && !t.loading ? (o(), y(g, {
5562
+ key: 0,
5563
+ class: "ecs-comment-body"
5564
+ }, {
5565
+ default: w(() => [
5566
+ m(e.$slots, "default", {}, void 0, !0)
5567
+ ]),
5568
+ _: 3
5569
+ })) : t.loading ? (o(), y(r, {
5570
+ key: 1,
5571
+ type: "multi",
5572
+ count: 2,
5573
+ class: "ecs-comment-body"
5574
+ })) : (o(), l("div", ml, [
5575
+ m(e.$slots, "editform", {}, void 0, !0)
5576
+ ]))
5577
+ ], 8, rl);
5578
+ }
5579
+ const Iy = /* @__PURE__ */ _(ol, [["render", hl], ["__scopeId", "data-v-cf696f66"]]);
5580
+ const vl = {}, _l = { class: "ecs-comment-list" };
5581
+ function yl(e, s) {
5582
+ return o(), l("div", _l, [
5583
+ m(e.$slots, "default")
5584
+ ]);
5585
+ }
5586
+ const Ey = /* @__PURE__ */ _(vl, [["render", yl]]);
5580
5587
  function wt(e = {}, s = 0) {
5581
5588
  const t = e && e.a;
5582
5589
  let a;
@@ -6415,7 +6422,7 @@ function xd(e, s, t, a, n, i) {
6415
6422
  const $y = /* @__PURE__ */ _(kd, [["render", xd], ["__scopeId", "data-v-d6450b05"]]);
6416
6423
  const wd = {
6417
6424
  name: "ecs-data-card",
6418
- components: { EcsIcon: M, EcsSkeletonLoader: Ce, EcsButtonTable: Ns, EcsButton: Se, EcsFocusRing: L },
6425
+ components: { EcsIcon: M, EcsSkeletonLoader: Ce, EcsButtonTable: Fs, EcsButton: Se, EcsFocusRing: L },
6419
6426
  mixins: [de],
6420
6427
  props: {
6421
6428
  /** If passed, an icon will be displayed in the data card. The icon prop must match a specific icons name. The list of available icon names can be found [here](https://github.com/everchron/ec-shards/tree/main/src/assets/icons). */
@@ -7479,7 +7486,7 @@ const Dy = /* @__PURE__ */ _(zu, [["render", Eu]]);
7479
7486
  const $u = {
7480
7487
  name: "ecs-data-list-item",
7481
7488
  emits: ["toggled"],
7482
- components: { EcsButtonMore: As, EcsSkeletonLoader: Ce },
7489
+ components: { EcsButtonMore: Ds, EcsSkeletonLoader: Ce },
7483
7490
  mixins: [de],
7484
7491
  props: {
7485
7492
  /** The label that shows up to the left of the list item. Usually describes the content to the left, e.g.: "Type", "Profiles", etc. */
@@ -8476,7 +8483,7 @@ const Ef = {
8476
8483
  components: {
8477
8484
  EcsIcon: M,
8478
8485
  EcsSticker: Re,
8479
- EcsButtonMore: As,
8486
+ EcsButtonMore: Ds,
8480
8487
  EcsFocusRing: L
8481
8488
  },
8482
8489
  props: {
@@ -8587,7 +8594,7 @@ function Lf(e, s, t, a, n, i) {
8587
8594
  const Gy = /* @__PURE__ */ _(Ef, [["render", Lf], ["__scopeId", "data-v-00b5ab33"]]);
8588
8595
  const Of = {
8589
8596
  name: "ecs-excerpt-snippet",
8590
- components: { EcsIcon: M, EcsSkeletonLoader: Ce, EcsFormatted: Ds },
8597
+ components: { EcsIcon: M, EcsSkeletonLoader: Ce, EcsFormatted: Rs },
8591
8598
  props: {
8592
8599
  /** Determines how the content of the excerpt should be rendered. */
8593
8600
  type: {
@@ -8780,7 +8787,7 @@ const Kf = {
8780
8787
  EcsIcon: M,
8781
8788
  EcsFileIcon: Ls,
8782
8789
  EcsSticker: Re,
8783
- EcsButtonTable: Ns,
8790
+ EcsButtonTable: Fs,
8784
8791
  EcsFocusRing: L
8785
8792
  },
8786
8793
  mixins: [de],
@@ -14122,8 +14129,8 @@ export {
14122
14129
  by as EcsButtonContextGroup,
14123
14130
  ky as EcsButtonDialog,
14124
14131
  _y as EcsButtonGroup,
14125
- As as EcsButtonMore,
14126
- Ns as EcsButtonTable,
14132
+ Ds as EcsButtonMore,
14133
+ Fs as EcsButtonTable,
14127
14134
  gt as EcsButtonToolbar,
14128
14135
  Ht as EcsButtonToolbarGroup,
14129
14136
  xy as EcsButtonToolbarIcon,
@@ -14170,7 +14177,7 @@ export {
14170
14177
  $p as EcsFormGroup,
14171
14178
  Qy as EcsFormHeadline,
14172
14179
  eb as EcsFormSet,
14173
- Ds as EcsFormatted,
14180
+ Rs as EcsFormatted,
14174
14181
  M as EcsIcon,
14175
14182
  tb as EcsIndexToolbar,
14176
14183
  sb as EcsInfoTooltip,