@orangelogic/design-system 2.78.0 → 2.79.0-ci.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/library/chunks/{AxisLabelRadial.BTpA5dYy.js → AxisLabelRadial.Bs1P_q_F.js} +1 -1
- package/library/chunks/{BaseColumnSeries.hIO71GLG.js → BaseColumnSeries.C7jwOxIJ.js} +1 -1
- package/library/chunks/{CandlestickSeries.w9C0GR9v.js → CandlestickSeries.CkXGtRWE.js} +2 -2
- package/library/chunks/{Circle.tOnnO-F-.js → Circle.DBa5Ok8V.js} +1 -1
- package/library/chunks/{ColumnSeries.Ckz75x1M.js → ColumnSeries.DGazbfza.js} +2 -2
- package/library/chunks/{EditableAxisLabel.CCMTJT7K.js → EditableAxisLabel.wN0t_G2B.js} +2 -2
- package/library/chunks/{EditableLabel.DPmicdjK.js → EditableLabel.BWeq6fgX.js} +1 -1
- package/library/chunks/{Gradient.BrDBLm8v.js → Gradient.CdcsPIru.js} +1 -1
- package/library/chunks/{LinearGradient.CxfXxvMw.js → LinearGradient.B1z9AGUt.js} +2 -2
- package/library/chunks/{Picture.BNASYM-P.js → Picture.YSPC0l0Q.js} +1 -1
- package/library/chunks/{Polygon.Dr-GV2hn.js → Polygon.BwMvXN2H.js} +1 -1
- package/library/chunks/{ProgressPie.4mPA6xqm.js → ProgressPie.DlCwXN17.js} +5 -5
- package/library/chunks/{RadialLabel.HfsGiN4x.js → RadialLabel.DyVOf2K8.js} +1 -1
- package/library/chunks/{Scrollbar.Bgg-RhjP.js → Scrollbar.BdZVb_Z-.js} +1 -1
- package/library/chunks/{Slice.Dm56LTKj.js → Slice.DiEswWa6.js} +1 -1
- package/library/chunks/{Slider.FKJwoPq2.js → Slider.C20No2z5.js} +1 -1
- package/library/chunks/{SpriteResizer.-qJDgug8.js → SpriteResizer.DFnmcy0h.js} +1 -1
- package/library/chunks/{Triangle.BECgi7mc.js → Triangle.BaOef7HV.js} +1 -1
- package/library/chunks/{ZoomTools.cgwuIB0e.js → ZoomTools.D5JPehoL.js} +1 -1
- package/library/chunks/{am-chart.oZVBmpnn.js → am-chart.H2jnOzFc.js} +253 -261
- package/library/chunks/{animation.DU8t6mrk.js → animation.7ifl4x2S.js} +3 -7
- package/library/chunks/{button.DS64Tr8Z.js → button.B-ktz-w4.js} +7 -40
- package/library/chunks/button.styles.CKqn956w.js +5 -0
- package/library/chunks/{color-swatch-group.C7T6-sY7.js → color-swatch-group.DvllHUil.js} +46 -216
- package/library/chunks/{color-swatch.BuUP5yG4.js → color-swatch.Bx-HOp9f.js} +18 -202
- package/library/chunks/{colorPicker.C4w_vDjh.js → colorPicker.06n6P3aK.js} +5 -5
- package/library/chunks/component.styles.CRO4Odto.js +5 -0
- package/library/chunks/confirm-popover.BbHneK19.js +121 -0
- package/library/chunks/{cropper.D1lO3pl-.js → cropper.DTokTzP9.js} +2533 -2904
- package/library/chunks/{dialog.BdXQkCKY.js → dialog.B1nzoJak.js} +40 -251
- package/library/chunks/dot-pagination.C26bQ3vy.js +204 -0
- package/library/chunks/{exporting.BdjsEGF8.js → exporting.Chnl3UWi.js} +2 -2
- package/library/chunks/file-on-demand.D_Mia7M9.js +1956 -0
- package/library/chunks/{flow.D0FqdfOy.js → flow.D2CqFQa7.js} +5 -5
- package/library/chunks/{folder-select.B2qxSKA5.js → folder-select.DOsefkAC.js} +20 -226
- package/library/chunks/form-control.styles.CaGWmeAS.js +5 -0
- package/library/chunks/{gantt.DfUM7Gvb.js → gantt.DSHD2gjO.js} +8 -8
- package/library/chunks/header.D68fIfe2.js +170 -0
- package/library/chunks/{hierarchy.5kfBCoGt.js → hierarchy.DwVsMmsP.js} +5 -5
- package/library/chunks/icon-button.BuhCp--_.js +149 -0
- package/library/chunks/iframe.BQFZQMTe.js +73 -0
- package/library/chunks/{image.DHBgKeJp.js → image.4eLWAZ3-.js} +16 -272
- package/library/chunks/{index.BkoLctE9.js → index.C9khsiad.js} +17 -17
- package/library/chunks/{json.BjaT7cyo.js → json.zyETMOw-.js} +3 -3
- package/library/chunks/{list-editor.DluUZa06.js → list-editor.DNa6ROgr.js} +45 -360
- package/library/chunks/{map.DbgNAGxD.js → map.CqM2O6LB.js} +2 -2
- package/library/chunks/option.DljDoFx4.js +123 -0
- package/library/chunks/{overlayscrollbars.XhGWx9Zk.js → overlayscrollbars.BMav4RQ4.js} +252 -958
- package/library/chunks/{pagination.g4zErKN2.js → pagination.BiRyMwhM.js} +45 -141
- package/library/chunks/{percent.DO4FjAdu.js → percent.DuQwbCCg.js} +3 -3
- package/library/chunks/{radar.Dd5fJVMg.js → radar.FpYl3UH5.js} +4 -4
- package/library/chunks/{sliceGrouper.DA3aeuJ-.js → sliceGrouper.BsE7fGMt.js} +1 -1
- package/library/chunks/{stock.BfI5MUyK.js → stock.BR-ag4Pt.js} +9 -9
- package/library/chunks/{tab-group.Dg6a82ei.js → tab-group.9HbDE1AF.js} +30 -581
- package/library/chunks/{table.CcqrVieF.js → table.B8LpbiGE.js} +192 -2133
- package/library/chunks/{timeline.BxMLjB5J.js → timeline.DkzkmgEM.js} +5 -5
- package/library/chunks/{tree.OXvhEOjS.js → tree.q7xRVYyh.js} +31 -399
- package/library/chunks/typography.DJC_UXgs.js +52 -0
- package/library/chunks/{venn.CxFupTb9.js → venn.D739bOV3.js} +1 -1
- package/library/chunks/{wc.ThQubbN2.js → wc.DzW311D-.js} +1 -1
- package/library/chunks/{xy.q6e68du3.js → xy.DCRDfTsa.js} +10 -10
- package/library/components/alert.js +9 -177
- package/library/components/am-chart.js +2 -2
- package/library/components/animated-image.js +12 -100
- package/library/components/animation.js +2 -2
- package/library/components/array-line-clamp.js +7 -88
- package/library/components/asset-link-format.js +48 -626
- package/library/components/atoms.js +17 -17
- package/library/components/avatar.js +5 -94
- package/library/components/badge.js +11 -139
- package/library/components/bicolor-picker.js +4 -23
- package/library/components/border-input-group.js +4 -25
- package/library/components/breadcrumb-item.js +24 -155
- package/library/components/breadcrumb.js +3 -21
- package/library/components/button-group.js +3 -28
- package/library/components/button.js +3 -3
- package/library/components/card.js +4 -126
- package/library/components/checkbox.js +11 -252
- package/library/components/color-picker.js +54 -725
- package/library/components/color-swatch-group.js +5 -5
- package/library/components/color-swatch.js +3 -3
- package/library/components/confirm-popover.js +5 -5
- package/library/components/copy-button.js +9 -254
- package/library/components/corner-position-input-group.js +4 -57
- package/library/components/cropper.js +2 -2
- package/library/components/details.js +6 -152
- package/library/components/dialog.js +4 -4
- package/library/components/divider.js +5 -67
- package/library/components/dot-pagination.js +2 -2
- package/library/components/dot-status.js +25 -95
- package/library/components/drawer.js +8 -239
- package/library/components/dropdown.js +47 -149
- package/library/components/dynamic-select.js +7 -72
- package/library/components/e-chart.js +6 -49
- package/library/components/element-clamp.js +5 -78
- package/library/components/file-on-demand.js +9 -9
- package/library/components/folder-select.js +3 -3
- package/library/components/format-date.js +2 -6
- package/library/components/format-time.js +2 -12
- package/library/components/grid-item.js +4 -171
- package/library/components/grid.js +5 -41
- package/library/components/header.js +2 -2
- package/library/components/icon-button.js +2 -2
- package/library/components/icon.js +8 -2448
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +7 -127
- package/library/components/image.js +2 -2
- package/library/components/include.js +2 -6
- package/library/components/input-group.js +4 -29
- package/library/components/input.js +21 -715
- package/library/components/line-clamp.js +7 -83
- package/library/components/list-editor.js +7 -7
- package/library/components/markdown.js +1 -3
- package/library/components/masonry.js +22 -221
- package/library/components/menu-item.js +9 -309
- package/library/components/menu-label.js +3 -20
- package/library/components/menu-section.js +3 -17
- package/library/components/menu.js +4 -112
- package/library/components/molecules.js +5 -5
- package/library/components/mutation-observer.js +2 -6
- package/library/components/option.js +2 -2
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +5 -16
- package/library/components/pagination.js +5 -5
- package/library/components/popup.js +204 -538
- package/library/components/position-picker.js +3 -93
- package/library/components/progress-bar.js +18 -135
- package/library/components/progress-ring.js +3 -94
- package/library/components/qr-code.js +4 -16
- package/library/components/radio-button.js +4 -24
- package/library/components/radio-card.js +7 -175
- package/library/components/radio-group.js +20 -151
- package/library/components/radio.js +13 -170
- package/library/components/range.js +120 -657
- package/library/components/rating.js +56 -236
- package/library/components/relative-time.js +2 -12
- package/library/components/resize-observer.js +3 -7
- package/library/components/select.js +225 -933
- package/library/components/shadow-input-group.js +5 -24
- package/library/components/share-option-list.js +18 -310
- package/library/components/sidebar.js +14 -220
- package/library/components/size-input-group.js +10 -75
- package/library/components/skeleton.js +7 -80
- package/library/components/space.js +6 -143
- package/library/components/spinner.js +6 -75
- package/library/components/split-panel.js +16 -123
- package/library/components/step.js +21 -272
- package/library/components/stepper-wizard.js +9 -43
- package/library/components/stepper.js +16 -33
- package/library/components/switch.js +11 -274
- package/library/components/tab-group.js +4 -4
- package/library/components/tab-panel.js +4 -31
- package/library/components/tab.js +9 -255
- package/library/components/table.js +6 -6
- package/library/components/tag.js +14 -165
- package/library/components/textarea.js +14 -363
- package/library/components/timecode.js +4 -23
- package/library/components/tooltip.js +8 -92
- package/library/components/tree-item.js +2 -2
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +18 -117
- package/library/components/types.js +777 -12001
- package/library/components/typography.js +2 -2
- package/library/components/video.js +3522 -5919
- package/library/components/visually-hidden.js +3 -15
- package/library/package.json +4 -1
- package/library/packages/atoms/src/components/pagination/pagination.d.ts +2 -1
- package/library/packages/atoms/src/components/select/select.d.ts +11 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/Ajax/Ajax.d.ts +1 -1
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/Edit/List.d.ts +32 -1
- package/library/packages/types/src/table.d.ts +2 -0
- package/library/react-web-component.d.ts +7 -3
- package/package.json +4 -1
- package/library/chunks/button.styles.Dl5IQLHU.js +0 -718
- package/library/chunks/component.styles.DMSLciL5.js +0 -71
- package/library/chunks/confirm-popover.BNjRvnN0.js +0 -288
- package/library/chunks/dot-pagination.CIVxMAAS.js +0 -325
- package/library/chunks/file-on-demand.BTTdth3o.js +0 -3802
- package/library/chunks/form-control.styles.CUGhvlfT.js +0 -67
- package/library/chunks/header.m7v3M94Z.js +0 -777
- package/library/chunks/icon-button.C3eqeQl9.js +0 -683
- package/library/chunks/iframe.CNEyWhcM.js +0 -160
- package/library/chunks/option.Csqefux_.js +0 -296
- package/library/chunks/typography.oDzoLbZS.js +0 -149
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { n as a, C as p } from "./lib-cortex-element.CVMmyPMC.js";
|
|
2
|
-
import { c as m } from "./component.styles.
|
|
2
|
+
import { c as m } from "./component.styles.CRO4Odto.js";
|
|
3
3
|
import { c as y } from "./custom-element.L4WJXn1j.js";
|
|
4
4
|
import { w as d } from "./watch.BCJD77bD.js";
|
|
5
5
|
import { i as b, x as u } from "./lit-element.jLBm65_O.js";
|
|
6
6
|
import { r as g } from "./query-async.CTgXGyQ5.js";
|
|
7
|
-
const h = b
|
|
8
|
-
:host {
|
|
9
|
-
display: contents;
|
|
10
|
-
}
|
|
11
|
-
`, x = [
|
|
7
|
+
const h = b`:host{display:contents}`, x = [
|
|
12
8
|
{
|
|
13
9
|
easing: "cubic-bezier(0.215, 0.61, 0.355, 1)",
|
|
14
10
|
offset: 0,
|
|
@@ -928,7 +924,7 @@ let t = class extends p {
|
|
|
928
924
|
this.animation?.finish();
|
|
929
925
|
}
|
|
930
926
|
render() {
|
|
931
|
-
return u
|
|
927
|
+
return u`<slot @slotchange=${this.handleSlotChange}></slot>`;
|
|
932
928
|
}
|
|
933
929
|
};
|
|
934
930
|
t.styles = [m, h];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as i, C as v } from "./lib-cortex-element.CVMmyPMC.js";
|
|
2
|
-
import { c as g } from "./component.styles.
|
|
2
|
+
import { c as g } from "./component.styles.CRO4Odto.js";
|
|
3
3
|
import { c as C } from "./custom-element.L4WJXn1j.js";
|
|
4
4
|
import { F as x, v as w } from "./form.DgwYWi0O.js";
|
|
5
5
|
import { L as $ } from "./i18n.BUW7B9hr.js";
|
|
@@ -13,7 +13,7 @@ import { n as f } from "./when.Dr1es41R.js";
|
|
|
13
13
|
import { u as h, i as b } from "./static.UA3G1Deq.js";
|
|
14
14
|
import B from "../components/icon.js";
|
|
15
15
|
import F from "../components/spinner.js";
|
|
16
|
-
import { b as _ } from "./button.styles.
|
|
16
|
+
import { b as _ } from "./button.styles.CKqn956w.js";
|
|
17
17
|
var y = /* @__PURE__ */ ((t) => (t.Adaptive = "adaptive", t.Fill = "fill", t.Hug = "hug", t))(y || {}), l = /* @__PURE__ */ ((t) => (t.Custom = "custom", t.Large = "large", t.Medium = "medium", t.Small = "small", t.XLarge = "x-large", t))(l || {}), k = Object.defineProperty, V = Object.getOwnPropertyDescriptor, r = (t, s, p, n) => {
|
|
18
18
|
for (var a = n > 1 ? void 0 : n ? V(s, p) : s, d = t.length - 1, c; d >= 0; d--)
|
|
19
19
|
(c = t[d]) && (a = (n ? c(s, p, a) : c(a)) || a);
|
|
@@ -126,15 +126,11 @@ let e = class extends v {
|
|
|
126
126
|
this.isButton() && (this.button.setCustomValidity(t), this.formControlController.updateValidity());
|
|
127
127
|
}
|
|
128
128
|
renderLabel() {
|
|
129
|
-
return h
|
|
130
|
-
<slot part="label" class="button__label" @slotchange=${this.handleLabelSlotChange}></slot>
|
|
131
|
-
`;
|
|
129
|
+
return h`<slot part="label" class="button__label" @slotchange=${this.handleLabelSlotChange}></slot>`;
|
|
132
130
|
}
|
|
133
131
|
render() {
|
|
134
132
|
const t = this.isLink() && !this.forceButtonNavigation, s = t ? b`a` : b`button`;
|
|
135
|
-
return h`<${s}
|
|
136
|
-
part="base"
|
|
137
|
-
class=${D({
|
|
133
|
+
return h`<${s} part="base" class=${D({
|
|
138
134
|
button: !0,
|
|
139
135
|
"button--caret": this.caret,
|
|
140
136
|
"button--circle": this.circle,
|
|
@@ -161,40 +157,11 @@ let e = class extends v {
|
|
|
161
157
|
"button--text": this.variant === "text",
|
|
162
158
|
"button--warning": this.variant === "warning",
|
|
163
159
|
"button--x-large": this.size === l.XLarge
|
|
164
|
-
})}
|
|
165
|
-
?disabled=${o(t ? void 0 : this.disabled)}
|
|
166
|
-
type=${o(t ? void 0 : this.type)}
|
|
167
|
-
title=${o(this.title || void 0)}
|
|
168
|
-
name=${o(t ? void 0 : this.name)}
|
|
169
|
-
value=${o(t ? void 0 : this.value)}
|
|
170
|
-
href=${o(t ? this.link || this.href : void 0)}
|
|
171
|
-
target=${o(t ? this.target : void 0)}
|
|
172
|
-
download=${o(t ? this.download : void 0)}
|
|
173
|
-
rel=${o(t ? this.rel : void 0)}
|
|
174
|
-
role=${o(t ? void 0 : "button")}
|
|
175
|
-
aria-disabled=${this.disabled ? "true" : "false"}
|
|
176
|
-
aria-label=${o(this.mappedLabel || void 0)}
|
|
177
|
-
tabindex=${this.disabled ? "-1" : "0"}
|
|
178
|
-
@blur=${this.handleBlur}
|
|
179
|
-
@focus=${this.handleFocus}
|
|
180
|
-
@invalid=${this.isButton() ? this.handleInvalid : null}
|
|
181
|
-
@click=${this.handleClick}
|
|
182
|
-
>
|
|
183
|
-
<slot name="prefix" part="prefix" class="button__prefix"></slot>
|
|
184
|
-
${this.renderLabel()}
|
|
185
|
-
<slot name="suffix" part="suffix" class="button__suffix"></slot>
|
|
186
|
-
${f(
|
|
160
|
+
})} ?disabled=${o(t ? void 0 : this.disabled)} type=${o(t ? void 0 : this.type)} title=${o(this.title || void 0)} name=${o(t ? void 0 : this.name)} value=${o(t ? void 0 : this.value)} href=${o(t ? this.link || this.href : void 0)} target=${o(t ? this.target : void 0)} download=${o(t ? this.download : void 0)} rel=${o(t ? this.rel : void 0)} role=${o(t ? void 0 : "button")} aria-disabled=${this.disabled ? "true" : "false"} aria-label=${o(this.mappedLabel || void 0)} tabindex=${this.disabled ? "-1" : "0"} @blur=${this.handleBlur} @focus=${this.handleFocus} @invalid=${this.isButton() ? this.handleInvalid : null} @click=${this.handleClick}><slot name="prefix" part="prefix" class="button__prefix"></slot>${this.renderLabel()}<slot name="suffix" part="suffix" class="button__suffix"></slot>${f(
|
|
187
161
|
this.caret,
|
|
188
|
-
() => h`
|
|
189
|
-
<cx-icon
|
|
190
|
-
part="caret"
|
|
191
|
-
class="button__caret"
|
|
192
|
-
name=${`keyboard_arrow_${this.caretDirection}`}
|
|
193
|
-
></cx-icon>
|
|
194
|
-
`
|
|
162
|
+
() => h`<cx-icon part="caret" class="button__caret" name=${`keyboard_arrow_${this.caretDirection}`}></cx-icon>`
|
|
195
163
|
)}
|
|
196
|
-
${f(this.loading, () => h`<cx-spinner part="spinner"></cx-spinner>`)}
|
|
197
|
-
</${s}>`;
|
|
164
|
+
${f(this.loading, () => h`<cx-spinner part="spinner"></cx-spinner>`)}</${s}>`;
|
|
198
165
|
}
|
|
199
166
|
};
|
|
200
167
|
e.styles = [g, _];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { i as o } from "./lit-element.jLBm65_O.js";
|
|
2
|
+
const r = o`:host{--background-color:var(--cx-color-primary);--color:light-dark(var(--cx-color-neutral-0),var(--cx-color-neutral-1000));--font-size:var(--cx-font-size-medium);--height:var(--cx-input-height-medium);--padding:0;--button-custom-height:32px;--button-custom-padding:4px 8px 4px 8px;--button-custom-font-size:var(--cx-font-size-medium);cursor:pointer;width:auto;max-width:100%;line-height:normal;display:inline-block;position:relative}:host([width-type=fill]),:host([width-type=adaptive][device-type=tablet]),:host([width-type=adaptive][device-type=mobile]){width:100%}.button{border-style:solid;border-width:var(--cx-input-border-width);width:100%;font-family:var(--cx-input-font-family);font-weight:var(--cx-font-weight-regular);font-size:var(--font-size,var(--cx-font-size-medium));height:var(--height,var(--cx-input-height-medium));padding:var(--padding,0);text-transform:var(--cx-button-text-transform,none);-webkit-user-select:none;user-select:none;white-space:nowrap;vertical-align:middle;transition:var(--cx-transition-x-fast) background-color, var(--cx-transition-x-fast) color, var(--cx-transition-x-fast) border, var(--cx-transition-x-fast) box-shadow;cursor:inherit;justify-content:center;align-items:center;text-decoration:none;display:inline-flex}.button::-moz-focus-inner{border:0}.button:focus{outline:none}.button:focus-visible{outline:var(--cx-focus-ring);outline-offset:var(--cx-focus-ring-offset)}.button--disabled{opacity:.5;cursor:default}.button--disabled *{pointer-events:none}.button__prefix,.button__suffix{pointer-events:none;flex:none;align-items:center;display:flex}.button__label{white-space:nowrap;text-overflow:ellipsis;line-height:1.15;display:inline-block;overflow:hidden}.button__label::slotted(cx-icon){vertical-align:-2px}.button--standard.button--default{background-color:var(--cx-color-neutral-100);border-color:var(--cx-color-neutral-100);color:var(--cx-color-neutral)}.button--standard.button--default:hover:not(.button--disabled),.button--standard.button--default.button--focused:not(.button--disabled){background-color:var(--cx-color-neutral-200);border-color:var(--cx-color-neutral-200);color:var(--cx-color-neutral)}.button--standard.button--default:active:not(.button--disabled){background-color:var(--cx-color-neutral-300);border-color:var(--cx-color-neutral-300);color:var(--cx-color-neutral)}.button--standard.button--primary{background-color:var(--cx-color-primary);border-color:var(--cx-color-primary);color:var(--cx-color-neutral-0)}.button--standard.button--primary:hover:not(.button--disabled),.button--standard.button--primary.button--focused:not(.button--disabled){background-color:var(--cx-color-primary-500);border-color:var(--cx-color-primary-500);color:var(--cx-color-neutral-0)}.button--standard.button--primary:active:not(.button--disabled){background-color:var(--cx-color-primary-700);border-color:var(--cx-color-primary-700);color:var(--cx-color-neutral-0)}.button--standard.button--success{background-color:var(--cx-color-success);border-color:var(--cx-color-success);color:var(--cx-color-neutral-0)}.button--standard.button--success:hover:not(.button--disabled),.button--standard.button--success.button--focused:not(.button--disabled){background-color:var(--cx-color-success-500);border-color:var(--cx-color-success-500);color:var(--cx-color-neutral-0)}.button--standard.button--success:active:not(.button--disabled){background-color:var(--cx-color-success-700);border-color:var(--cx-color-success-700);color:var(--cx-color-neutral-0)}.button--standard.button--warning{background-color:var(--cx-color-warning);border-color:var(--cx-color-warning);color:var(--cx-color-neutral-0)}.button--standard.button--warning:hover:not(.button--disabled),.button--standard.button--warning.button--focused:not(.button--disabled){background-color:var(--cx-color-warning-500);border-color:var(--cx-color-warning-500);color:var(--cx-color-neutral-0)}.button--standard.button--warning:active:not(.button--disabled){background-color:var(--cx-color-warning-700);border-color:var(--cx-color-warning-700);color:var(--cx-color-neutral-0)}.button--standard.button--danger{background-color:var(--cx-color-danger);border-color:var(--cx-color-danger);color:var(--cx-color-neutral-0)}.button--standard.button--danger:hover:not(.button--disabled),.button--standard.button--danger.button--focused:not(.button--disabled){background-color:var(--cx-color-danger-500);border-color:var(--cx-color-danger-500);color:var(--cx-color-neutral-0)}.button--standard.button--danger:active:not(.button--disabled){background-color:var(--cx-color-danger-700);border-color:var(--cx-color-danger-700);color:var(--cx-color-neutral-0)}.button--standard.button--custom{background-color:var(--background-color);border-color:var(--background-color);color:var(--color)}.button--standard.button--custom:hover:not(.button--disabled),.button--standard.button--custom.button--focused:not(.button--disabled){background-color:var(--background-color-focus,var(--background-color));border-color:var(--background-color-focus,var(--background-color));color:var(--color-focus,var(--color))}.button--standard.button--custom:active:not(.button--disabled){background-color:var(--background-color-active,var(--background-color));border-color:var(--background-color-active,var(--background-color));color:var(--color-active,var(--color))}.button--outline{border:solid var(--cx-input-border-width);background:0 0}.button--outline.button--default{border-color:var(--cx-input-border-color);color:var(--cx-color-neutral)}.button--outline.button--default:hover:not(.button--disabled),.button--outline.button--default.button--focused:not(.button--disabled),.button--outline.button--default.button--checked:not(.button--disabled){border-color:var(--cx-color-neutral-300);background-color:var(--cx-color-neutral-100);color:var(--cx-color-neutral)}.button--outline.button--default:active:not(.button--disabled){border-color:var(--cx-color-neutral-300);background-color:var(--cx-color-neutral-200);color:var(--cx-color-neutral)}.button--outline.button--primary{border-color:var(--cx-color-primary);color:var(--cx-color-primary)}.button--outline.button--primary:hover:not(.button--disabled),.button--outline.button--primary.button--focused:not(.button--disabled),.button--outline.button--primary.button--checked:not(.button--disabled){background-color:var(--cx-color-primary-500);color:var(--cx-color-neutral-0)}.button--outline.button--primary:active:not(.button--disabled){border-color:var(--cx-color-primary-700);background-color:var(--cx-color-primary-700);color:var(--cx-color-neutral-0)}.button--outline.button--success{border-color:var(--cx-color-success);color:var(--cx-color-success)}.button--outline.button--success:hover:not(.button--disabled),.button--outline.button--success.button--focused:not(.button--disabled),.button--outline.button--success.button--checked:not(.button--disabled){background-color:var(--cx-color-success-500);color:var(--cx-color-neutral-0)}.button--outline.button--success:active:not(.button--disabled){border-color:var(--cx-color-success);background-color:var(--cx-color-success);color:var(--cx-color-neutral-0)}.button--outline.button--warning{border-color:var(--cx-color-warning);color:var(--cx-color-warning)}.button--outline.button--warning:hover:not(.button--disabled),.button--outline.button--warning.button--focused:not(.button--disabled),.button--outline.button--warning.button--checked:not(.button--disabled){background-color:var(--cx-color-warning-500);color:var(--cx-color-neutral-0)}.button--outline.button--warning:active:not(.button--disabled){border-color:var(--cx-color-warning-700);background-color:var(--cx-color-warning-700);color:var(--cx-color-neutral-0)}.button--outline.button--danger{border-color:var(--cx-color-danger);color:var(--cx-color-danger)}.button--outline.button--danger:hover:not(.button--disabled),.button--outline.button--danger.button--focused:not(.button--disabled),.button--outline.button--danger.button--checked:not(.button--disabled){background-color:var(--cx-color-danger-500);color:var(--cx-color-neutral-0)}.button--outline.button--danger:active:not(.button--disabled){border-color:var(--cx-color-danger-700);background-color:var(--cx-color-danger-700);color:var(--cx-color-neutral-0)}@media (forced-colors:active){.button.button--outline.button--checked:not(.button--disabled){outline:2px solid #0000}}.button--text{color:var(--cx-color-neutral);background-color:#0000;border-color:#0000}.button--text:hover:not(.button--disabled),.button--text.button--focused:not(.button--disabled){background-color:var(--cx-color-neutral-100);border-color:var(--cx-color-neutral-100);color:var(--cx-color-neutral)}.button--text:focus-visible:not(.button--disabled){color:var(--cx-color-neutral-800);background-color:#0000;border-color:#0000}.button--text:active:not(.button--disabled){background-color:var(--cx-color-neutral-200);border-color:var(--cx-color-neutral-200);color:var(--cx-color-neutral)}.button--tertiary{color:var(--cx-color-neutral);background-color:#0000;border-color:#0000}.button--tertiary:hover:not(.button--disabled),.button--tertiary.button--focused:not(.button--disabled){background-color:var(--cx-color-neutral-100);color:var(--cx-color-neutral);border-color:#0000}.button--tertiary:focus-visible:not(.button--disabled){background-color:var(--cx-color-neutral-200);color:var(--cx-color-neutral);border-color:#0000}.button--tertiary:active:not(.button--disabled){background-color:var(--cx-color-neutral-300);color:var(--cx-color-neutral);border-color:#0000}.button--small{height:auto;min-height:var(--cx-input-height-small);font-size:var(--cx-button-font-size-medium);border-radius:var(--cx-button-border-radius-small)}.button--small ::slotted(cx-icon){--font-size:var(--cx-font-size-medium)}.button--medium{height:auto;min-height:var(--cx-input-height-medium);font-size:var(--cx-button-font-size-medium);border-radius:var(--cx-button-border-radius-medium)}.button--large{height:auto;min-height:var(--cx-input-height-large);font-size:var(--cx-button-font-size-medium);border-radius:var(--cx-button-border-radius-large)}.button--x-large{height:auto;min-height:var(--cx-input-height-x-large);font-size:var(--cx-button-font-size-medium);border-radius:var(--cx-button-border-radius-large)}.button--custom-size{--height:var(--button-custom-height);--padding:var(--button-custom-padding);--font-size:var(--button-custom-font-size);border-radius:var(--cx-button-border-radius-medium)}.button--pill.button--small{border-radius:var(--cx-input-height-small)}.button--pill.button--medium{border-radius:var(--cx-input-height-medium)}.button--pill.button--large{border-radius:var(--cx-input-height-large)}.button--pill.button--x-large{border-radius:var(--cx-input-height-x-large)}.button--circle{padding-left:0;padding-right:0}.button--circle.button--small{width:var(--cx-input-height-small);border-radius:50%}.button--circle.button--medium{width:var(--cx-input-height-medium);border-radius:50%}.button--circle.button--large{width:var(--cx-input-height-large);border-radius:50%}.button--circle.button--x-large{width:var(--cx-input-height-x-large);border-radius:50%}.button--circle .button__prefix,.button--circle .button__suffix,.button--circle .button__caret{display:none}.button--circle .button__label{justify-content:center;align-items:center;line-height:1;display:inline-flex}.button--caret .button__caret{--font-size:var(--cx-font-size-large);margin-block:auto}.button--caret.button--small .button__caret{--font-size:var(--cx-font-size-medium)}.button--caret .button__suffix{display:none}.button--loading{cursor:wait;position:relative}.button--loading .button__prefix,.button--loading .button__label,.button--loading .button__suffix,.button--loading .button__caret{visibility:hidden}.button--loading cx-spinner{--indicator-color:currentColor;width:1em;height:1em;font-size:1em;position:absolute;top:calc(50% - .5em);left:calc(50% - .5em)}.button ::slotted(cx-badge){pointer-events:none;position:absolute;top:0;right:0;translate:50% -50%}.button--rtl ::slotted(cx-badge){left:0;right:auto;translate:-50% -50%}.button--has-label.button--small .button__label{padding:0 var(--cx-spacing-x-small)}.button--has-label.button--medium .button__label{padding:0 var(--cx-spacing-small)}.button--has-label.button--large .button__label{padding:0 var(--cx-spacing-medium)}.button--has-label.button--x-large .button__label{padding:0 var(--cx-spacing-large)}.button--has-prefix.button--small,.button--has-prefix.button--small .button__label,.button--has-prefix.button--medium,.button--has-prefix.button--medium .button__label{padding-inline-start:var(--cx-spacing-x-small)}.button--has-prefix.button--large{padding-inline-start:var(--cx-spacing-small)}.button--has-prefix.button--large .button__label{padding-inline-start:var(--cx-spacing-x-small)}.button--has-prefix.button--x-large,.button--has-prefix.button--x-large .button__label{padding-inline-start:var(--cx-spacing-medium)}.button--has-suffix.button--small,.button--caret.button--small,.button--has-suffix.button--small .button__label,.button--caret.button--small .button__label,.button--has-suffix.button--medium,.button--caret.button--medium,.button--has-suffix.button--medium .button__label,.button--caret.button--medium .button__label{padding-inline-end:var(--cx-spacing-x-small)}.button--has-suffix.button--large,.button--caret.button--large{padding-inline-end:var(--cx-spacing-small)}.button--has-suffix.button--large .button__label,.button--caret.button--large .button__label{padding-inline-end:var(--cx-spacing-x-small)}.button--has-suffix.button--x-large,.button--caret.button--x-large,.button--has-suffix.button--x-large .button__label,.button--caret.button--x-large .button__label{padding-inline-end:var(--cx-spacing-medium)}.button--caret cx-icon::part(span){height:auto}:host([data-cx-button-group__button--first]:not([data-cx-button-group__button--last])) .button{border-start-end-radius:0;border-end-end-radius:0}:host([data-cx-button-group__button--inner]) .button{border-radius:0}:host([data-cx-button-group__button--last]:not([data-cx-button-group__button--first])) .button{border-start-start-radius:0;border-end-start-radius:0}:host([data-cx-button-group__button]:not([data-cx-button-group__button--first])){margin-inline-start:calc(-1 * var(--cx-input-border-width))}:host([data-cx-button-group__button]:not([data-cx-button-group__button--first],[data-cx-button-group__button--radio],[variant=default]):not(:hover)) .button:after{content:"";top:0;inset-inline-start:0;mix-blend-mode:multiply;border-left:1px solid #80808054;position:absolute;bottom:0}:host([data-cx-button-group__button--hover]){z-index:1}:host([data-cx-button-group__button--focus]),:host([data-cx-button-group__button][checked]){z-index:2}`;
|
|
3
|
+
export {
|
|
4
|
+
r as b
|
|
5
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import z from "../components/space.js";
|
|
2
|
-
import { C as $ } from "./table.
|
|
3
|
-
import { C as k } from "./typography.
|
|
2
|
+
import { C as $ } from "./table.B8LpbiGE.js";
|
|
3
|
+
import { C as k } from "./typography.DJC_UXgs.js";
|
|
4
4
|
import { n as h, C as F } from "./lib-cortex-element.CVMmyPMC.js";
|
|
5
|
-
import { C, a as
|
|
6
|
-
import { c as A } from "./component.styles.
|
|
5
|
+
import { C, a as g } from "./color-swatch.Bx-HOp9f.js";
|
|
6
|
+
import { c as A } from "./component.styles.CRO4Odto.js";
|
|
7
7
|
import { D as p } from "./content-builder.B4Tqoc6M.js";
|
|
8
8
|
import { c as S } from "./custom-element.L4WJXn1j.js";
|
|
9
9
|
import { d as T } from "./debounce.DaHuiSGU.js";
|
|
@@ -20,8 +20,8 @@ import { o as M } from "./if-defined.BRoBj_Rp.js";
|
|
|
20
20
|
import { c as G } from "./repeat.DbF2p5ae.js";
|
|
21
21
|
import { o as f } from "./style-map.llVFPd__.js";
|
|
22
22
|
import { n as L } from "./when.Dr1es41R.js";
|
|
23
|
-
var
|
|
24
|
-
const
|
|
23
|
+
var c = /* @__PURE__ */ ((e) => (e.Circles = "circles", e.Grid = "grid", e.Table = "table", e))(c || {});
|
|
24
|
+
const y = 165, B = ["HEX", "RGB", "CMYK", "PMS"], I = {
|
|
25
25
|
resizable: !1
|
|
26
26
|
}, _ = [
|
|
27
27
|
{
|
|
@@ -83,39 +83,22 @@ function u(e, r, t) {
|
|
|
83
83
|
const i = r.getValue() ?? "";
|
|
84
84
|
if (!i)
|
|
85
85
|
return null;
|
|
86
|
-
const s = l`
|
|
87
|
-
<cx-copy-button
|
|
88
|
-
copy-label=${e.term("clickToCopy")}
|
|
89
|
-
focus-copy-label=${e.term("pressEnterOrCtrlCToCopy")}
|
|
90
|
-
hoist
|
|
91
|
-
label=${`${t}, ${r.getField()} ${e.term("code")} ${i}. ${e.term("clickOrPressCtrlCToCopy")}`}
|
|
92
|
-
no-icon
|
|
93
|
-
tooltip-distance="0"
|
|
94
|
-
value=${i}
|
|
95
|
-
style=${f({
|
|
86
|
+
const s = l`<cx-copy-button copy-label=${e.term("clickToCopy")} focus-copy-label=${e.term("pressEnterOrCtrlCToCopy")} hoist label=${`${t}, ${r.getField()} ${e.term("code")} ${i}. ${e.term("clickOrPressCtrlCToCopy")}`} no-icon tooltip-distance="0" value=${i} style=${f({
|
|
96
87
|
"--button-background-color": "transparent",
|
|
97
88
|
"--button-font-size": "var(--cx-font-size-large)",
|
|
98
89
|
"--button-padding": "0",
|
|
99
90
|
"max-width": "100%"
|
|
100
|
-
})}
|
|
101
|
-
>
|
|
102
|
-
<span
|
|
103
|
-
style=${f({
|
|
91
|
+
})}><span style=${f({
|
|
104
92
|
display: "inline-block",
|
|
105
93
|
maxWidth: "100%",
|
|
106
94
|
overflow: "hidden",
|
|
107
95
|
textOverflow: "ellipsis",
|
|
108
96
|
verticalAlign: "middle",
|
|
109
97
|
whiteSpace: "nowrap"
|
|
110
|
-
})}
|
|
111
|
-
|
|
112
|
-
${i}
|
|
113
|
-
</span>
|
|
114
|
-
</cx-copy-button>
|
|
115
|
-
`, c = document.createDocumentFragment();
|
|
116
|
-
return H(s, c), c.firstElementChild;
|
|
98
|
+
})}>${i}</span></cx-copy-button>`, n = document.createDocumentFragment();
|
|
99
|
+
return H(s, n), n.firstElementChild;
|
|
117
100
|
}
|
|
118
|
-
const
|
|
101
|
+
const K = (e, r) => [
|
|
119
102
|
..._.slice(0, 2),
|
|
120
103
|
{
|
|
121
104
|
field: "hex",
|
|
@@ -153,106 +136,16 @@ const N = (e, r) => [
|
|
|
153
136
|
title: "PMS",
|
|
154
137
|
widthGrow: 2
|
|
155
138
|
}
|
|
156
|
-
],
|
|
157
|
-
:host {
|
|
158
|
-
--grid-gap: var(--cx-spacing-medium);
|
|
159
|
-
--padding: 0;
|
|
160
|
-
|
|
161
|
-
display: block;
|
|
162
|
-
padding: var(--cx-focus-ring-width);
|
|
163
|
-
width: 100%;
|
|
164
|
-
min-width: 0;
|
|
165
|
-
overflow: auto;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.color-swatch-group__swatches {
|
|
169
|
-
padding: var(--padding, 0);
|
|
170
|
-
width: 100%;
|
|
171
|
-
height: 100%;
|
|
172
|
-
max-width: 100%;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.color-swatch-group__table-container {
|
|
176
|
-
max-width: 100%;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.color-swatch-group__table-container:focus-visible {
|
|
180
|
-
outline: var(--cx-focus-ring);
|
|
181
|
-
outline-offset: var(--cx-focus-ring-offset);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.color-swatch-group__swatches--circles--horizontal
|
|
185
|
-
> cx-color-swatch:not(:first-child) {
|
|
186
|
-
margin-left: var(--swatch-group-horizontal-gap, -100px);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.color-swatch-group__swatches--circles--vertical
|
|
190
|
-
> cx-color-swatch:not(:first-child) {
|
|
191
|
-
margin-top: var(--swatch-group-vertical-gap, -50px);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.color-swatch-group__swatches--circles--horizontal__item {
|
|
195
|
-
/** No padding for positive gap value - which give no overlapping */
|
|
196
|
-
--swatch-content-padding: 0
|
|
197
|
-
min(calc(var(--swatch-group-horizontal-gap, -100px) * -0.5), 0) 0 0;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.color-swatch-group__swatches--circles--vertical__item {
|
|
201
|
-
/** No padding for positive gap value - which give no overlapping */
|
|
202
|
-
--swatch-content-padding: 0 0
|
|
203
|
-
min(calc(var(--swatch-group-vertical-gap, -50px) * -0.5), 0) 0;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.color-swatch-group__swatches--circles--vertical__item--mobile {
|
|
207
|
-
--swatch-size: 100%;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.color-swatch-group__swatches--grid {
|
|
211
|
-
display: grid;
|
|
212
|
-
gap: var(--grid-gap, var(--cx-spacing-medium));
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.color-swatch-group__table {
|
|
216
|
-
--body-background-color: transparent;
|
|
217
|
-
--row-background-color: transparent;
|
|
218
|
-
--row-even-background-color: transparent;
|
|
219
|
-
--row-hover-background-color: var(--cx-color-neutral-50);
|
|
220
|
-
--row-even-hover-background-color: var(--cx-color-neutral-50);
|
|
221
|
-
--header-background-color: transparent;
|
|
222
|
-
--group-row-background-color: transparent;
|
|
223
|
-
--cell-border-color: transparent;
|
|
224
|
-
--cell-bottom-border-color: transparent;
|
|
225
|
-
|
|
226
|
-
--header-font-size: var(--cx-font-size-large);
|
|
227
|
-
--header-font-weight: var(--cx-font-weight-semibold);
|
|
228
|
-
--header-border-right: none;
|
|
229
|
-
|
|
230
|
-
--cell-font-size: var(--cx-font-size-large);
|
|
231
|
-
--cell-font-weight: var(--cx-font-weight-regular);
|
|
232
|
-
--cell-line-height: 40px;
|
|
233
|
-
--cell-hover-background-color: transparent;
|
|
234
|
-
|
|
235
|
-
--placeholder-font-size: var(--cx-font-size-medium-large);
|
|
236
|
-
--cell-horizontal-padding: var(--cx-spacing-2x-small);
|
|
237
|
-
--header-horizontal-padding: var(--cx-spacing-2x-small);
|
|
238
|
-
--header-border-bottom: 1px solid var(--cx-color-neutral-200);
|
|
239
|
-
--hover-menu-background-color: var(--row-hover-background-color);
|
|
240
|
-
--outer-border-color: transparent;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
.color-swatch-group__table::part(table) {
|
|
244
|
-
background-color: transparent;
|
|
245
|
-
}
|
|
246
|
-
`;
|
|
139
|
+
], N = O`:host{--grid-gap:var(--cx-spacing-medium);--padding:0;padding:var(--cx-focus-ring-width);width:100%;min-width:0;display:block;overflow:auto}.color-swatch-group__swatches{padding:var(--padding,0);width:100%;max-width:100%;height:100%}.color-swatch-group__table-container{max-width:100%}.color-swatch-group__table-container:focus-visible{outline:var(--cx-focus-ring);outline-offset:var(--cx-focus-ring-offset)}.color-swatch-group__swatches--circles--horizontal>cx-color-swatch:not(:first-child){margin-left:var(--swatch-group-horizontal-gap,-100px)}.color-swatch-group__swatches--circles--vertical>cx-color-swatch:not(:first-child){margin-top:var(--swatch-group-vertical-gap,-50px)}.color-swatch-group__swatches--circles--horizontal__item{--swatch-content-padding:0 min(calc(var(--swatch-group-horizontal-gap,-100px) * -.5), 0) 0 0}.color-swatch-group__swatches--circles--vertical__item{--swatch-content-padding:0 0 min(calc(var(--swatch-group-vertical-gap,-50px) * -.5), 0) 0}.color-swatch-group__swatches--circles--vertical__item--mobile{--swatch-size:100%}.color-swatch-group__swatches--grid{gap:var(--grid-gap,var(--cx-spacing-medium));display:grid}.color-swatch-group__table{--body-background-color:transparent;--row-background-color:transparent;--row-even-background-color:transparent;--row-hover-background-color:var(--cx-color-neutral-50);--row-even-hover-background-color:var(--cx-color-neutral-50);--header-background-color:transparent;--group-row-background-color:transparent;--cell-border-color:transparent;--cell-bottom-border-color:transparent;--header-font-size:var(--cx-font-size-large);--header-font-weight:var(--cx-font-weight-semibold);--header-border-right:none;--cell-font-size:var(--cx-font-size-large);--cell-font-weight:var(--cx-font-weight-regular);--cell-line-height:40px;--cell-hover-background-color:transparent;--placeholder-font-size:var(--cx-font-size-medium-large);--cell-horizontal-padding:var(--cx-spacing-2x-small);--header-horizontal-padding:var(--cx-spacing-2x-small);--header-border-bottom:1px solid var(--cx-color-neutral-200);--hover-menu-background-color:var(--row-hover-background-color);--outer-border-color:transparent}.color-swatch-group__table::part(table){background-color:#0000}`;
|
|
247
140
|
var U = Object.defineProperty, j = Object.getOwnPropertyDescriptor, a = (e, r, t, i) => {
|
|
248
|
-
for (var s = i > 1 ? void 0 : i ? j(r, t) : r,
|
|
249
|
-
(
|
|
141
|
+
for (var s = i > 1 ? void 0 : i ? j(r, t) : r, n = e.length - 1, m; n >= 0; n--)
|
|
142
|
+
(m = e[n]) && (s = (i ? m(r, t, s) : m(s)) || s);
|
|
250
143
|
return i && s && U(r, t, s), s;
|
|
251
144
|
};
|
|
252
|
-
const
|
|
145
|
+
const v = "unnamed";
|
|
253
146
|
let o = class extends F {
|
|
254
147
|
constructor() {
|
|
255
|
-
super(), this.localize = new E(this), this.variant =
|
|
148
|
+
super(), this.localize = new E(this), this.variant = c.Table, this.data = [], this.maxCol = 4, this.canCopy = !1, this.showCodes = ["HEX", "RGB", "CMYK", "PMS"], this.multiLanguage = !1, this.breakpoints = [350, 696, 1024], this.deviceType = p.Desktop, this.currentCol = 0, this.isFocused = !1, this.canFocusContainer = !0, this.isContainerFocused = !1, this.handleWindowResize = this.handleWindowResize.bind(this);
|
|
256
149
|
}
|
|
257
150
|
runFirstUpdated() {
|
|
258
151
|
this.breakpoints = D(this, this.breakpoints), this.handleResize();
|
|
@@ -272,16 +165,16 @@ let o = class extends F {
|
|
|
272
165
|
handleResize() {
|
|
273
166
|
const e = window.innerWidth;
|
|
274
167
|
switch (this.variant) {
|
|
275
|
-
case
|
|
168
|
+
case c.Grid: {
|
|
276
169
|
const r = Number.parseFloat(
|
|
277
170
|
getComputedStyle(this.containerEl).getPropertyValue("--grid-gap")
|
|
278
171
|
);
|
|
279
172
|
this.currentCol = Math.floor(
|
|
280
|
-
(e + r) / (
|
|
173
|
+
(e + r) / (y + r)
|
|
281
174
|
);
|
|
282
175
|
break;
|
|
283
176
|
}
|
|
284
|
-
case
|
|
177
|
+
case c.Circles: {
|
|
285
178
|
this.deviceType = R(this.breakpoints);
|
|
286
179
|
break;
|
|
287
180
|
}
|
|
@@ -304,7 +197,7 @@ let o = class extends F {
|
|
|
304
197
|
* Filter out the columns that are not in the showCodes
|
|
305
198
|
*/
|
|
306
199
|
getTableColumns(e) {
|
|
307
|
-
const r = this.canCopy ?
|
|
200
|
+
const r = this.canCopy ? K(this.localize, e) : _;
|
|
308
201
|
return [
|
|
309
202
|
...r.slice(0, 2),
|
|
310
203
|
...r.slice(2).filter(
|
|
@@ -318,7 +211,7 @@ let o = class extends F {
|
|
|
318
211
|
categorizeByPalette() {
|
|
319
212
|
return Object.values(
|
|
320
213
|
this.data.reduce((e, r) => {
|
|
321
|
-
const t = r.palette?.trim() ? r.palette :
|
|
214
|
+
const t = r.palette?.trim() ? r.palette : v;
|
|
322
215
|
return e[t] || (e[t] = { colors: [], palette: t }), e[t].colors.push(r), e;
|
|
323
216
|
}, {})
|
|
324
217
|
);
|
|
@@ -336,17 +229,17 @@ let o = class extends F {
|
|
|
336
229
|
* Get current direction of the color swatch group
|
|
337
230
|
*/
|
|
338
231
|
get currentDirection() {
|
|
339
|
-
return this.variant ===
|
|
232
|
+
return this.variant === c.Circles && this.deviceType !== p.Desktop ? "vertical" : "horizontal";
|
|
340
233
|
}
|
|
341
234
|
/**
|
|
342
235
|
* Get the variant of the color swatch
|
|
343
236
|
*/
|
|
344
237
|
get swatchVariant() {
|
|
345
238
|
switch (this.variant) {
|
|
346
|
-
case
|
|
347
|
-
return this.deviceType === p.Tablet ?
|
|
348
|
-
case
|
|
349
|
-
return
|
|
239
|
+
case c.Circles:
|
|
240
|
+
return this.deviceType === p.Tablet ? g.Oval : g.Circle;
|
|
241
|
+
case c.Grid:
|
|
242
|
+
return g.GridItem;
|
|
350
243
|
default:
|
|
351
244
|
return;
|
|
352
245
|
}
|
|
@@ -355,14 +248,8 @@ let o = class extends F {
|
|
|
355
248
|
const e = this.currentDirection, r = this.localize.lang();
|
|
356
249
|
return l`
|
|
357
250
|
${L(
|
|
358
|
-
this.variant ===
|
|
359
|
-
() => l
|
|
360
|
-
<cx-space
|
|
361
|
-
class="color-swatch-group__swatches"
|
|
362
|
-
direction="vertical"
|
|
363
|
-
spacing="2x-small"
|
|
364
|
-
>
|
|
365
|
-
${b(
|
|
251
|
+
this.variant === c.Table,
|
|
252
|
+
() => l`<cx-space class="color-swatch-group__swatches" direction="vertical" spacing="2x-small">${b(
|
|
366
253
|
[this.data, this.canCopy],
|
|
367
254
|
() => this.categorizeByPalette().map(
|
|
368
255
|
(t) => {
|
|
@@ -370,95 +257,38 @@ let o = class extends F {
|
|
|
370
257
|
...s,
|
|
371
258
|
name: s[`name-${r.toLowerCase()}`] ?? s.name
|
|
372
259
|
})) : t.colors;
|
|
373
|
-
return l
|
|
374
|
-
<div
|
|
375
|
-
tabindex=${M(
|
|
260
|
+
return l`<div tabindex=${M(
|
|
376
261
|
this.canFocusContainer ? "0" : void 0
|
|
377
|
-
)}
|
|
378
|
-
data-table-container
|
|
379
|
-
class="color-swatch-group__table-container"
|
|
380
|
-
@focusin=${this.handleFocusIn}
|
|
381
|
-
@focusout=${this.handleFocusOut}
|
|
382
|
-
@keydown=${this.handleKeyDown}
|
|
383
|
-
>
|
|
384
|
-
<cx-typography variant="h3">
|
|
385
|
-
${t.palette === y ? this.localize.term("noPalette") : this.localize.term("shadesPalette", t.palette)}
|
|
386
|
-
</cx-typography>
|
|
387
|
-
<cx-table
|
|
388
|
-
part="table"
|
|
389
|
-
tabindex=${this.isFocused ? void 0 : "-1"}
|
|
390
|
-
no-selectable
|
|
391
|
-
layout="fitColumns"
|
|
392
|
-
.columns=${b(
|
|
262
|
+
)} data-table-container class="color-swatch-group__table-container" @focusin=${this.handleFocusIn} @focusout=${this.handleFocusOut} @keydown=${this.handleKeyDown}><cx-typography variant="h3">${t.palette === v ? this.localize.term("noPalette") : this.localize.term("shadesPalette", t.palette)}</cx-typography><cx-table part="table" tabindex=${this.isFocused ? void 0 : "-1"} no-selectable layout="fitColumns" .columns=${b(
|
|
393
263
|
[this.showCodes, this.canCopy, this.localize],
|
|
394
264
|
() => this.getTableColumns(t.palette)
|
|
395
|
-
)}
|
|
396
|
-
.columnDefaults=${I}
|
|
397
|
-
.rowHeight=${48}
|
|
398
|
-
.data=${i}
|
|
399
|
-
class="color-swatch-group__table"
|
|
400
|
-
></cx-table>
|
|
401
|
-
</div>
|
|
402
|
-
`;
|
|
265
|
+
)} .columnDefaults=${I} .rowHeight=${48} .data=${i} class="color-swatch-group__table"></cx-table></div>`;
|
|
403
266
|
}
|
|
404
267
|
)
|
|
405
|
-
)}
|
|
406
|
-
|
|
407
|
-
`,
|
|
408
|
-
() => l`
|
|
409
|
-
<cx-space
|
|
410
|
-
part="color-swatch"
|
|
411
|
-
role="list"
|
|
412
|
-
aria-label=${this.localize.term("listOfColors")}
|
|
413
|
-
aria-roledescription=${this.localize.term("listOfColors")}
|
|
414
|
-
direction=${e}
|
|
415
|
-
justify-content="flex-start"
|
|
416
|
-
wrap=${this.variant === "circles" ? "nowrap" : "wrap"}
|
|
417
|
-
class=${w({
|
|
268
|
+
)}</cx-space>`,
|
|
269
|
+
() => l`<cx-space part="color-swatch" role="list" aria-label=${this.localize.term("listOfColors")} aria-roledescription=${this.localize.term("listOfColors")} direction=${e} justify-content="flex-start" wrap=${this.variant === "circles" ? "nowrap" : "wrap"} class=${w({
|
|
418
270
|
"color-swatch-group__swatches": !0,
|
|
419
|
-
"color-swatch-group__swatches--grid": this.variant ===
|
|
420
|
-
[`color-swatch-group__swatches--circles--${e}`]: this.variant ===
|
|
421
|
-
})}
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
})}
|
|
425
|
-
>
|
|
426
|
-
${G(
|
|
271
|
+
"color-swatch-group__swatches--grid": this.variant === c.Grid,
|
|
272
|
+
[`color-swatch-group__swatches--circles--${e}`]: this.variant === c.Circles
|
|
273
|
+
})} style=${f({
|
|
274
|
+
gridTemplateColumns: this.currentCol >= this.maxCol ? `repeat(${this.maxCol}, 1fr)` : `repeat(auto-fit, minmax(${y}px, 1fr))`
|
|
275
|
+
})}>${G(
|
|
427
276
|
this.data,
|
|
428
277
|
(t) => t.name,
|
|
429
|
-
(t, i) => l`<cx-color-swatch
|
|
430
|
-
part="color-swatch-item"
|
|
431
|
-
role="listitem"
|
|
432
|
-
aria-label=${this.localize.term(
|
|
278
|
+
(t, i) => l`<cx-color-swatch part="color-swatch-item" role="listitem" aria-label=${this.localize.term(
|
|
433
279
|
"colorOfTotal",
|
|
434
280
|
i + 1,
|
|
435
281
|
this.data.length
|
|
436
|
-
)}
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
name=${this.multiLanguage && r ? t[`name-${r.toLowerCase()}`] ?? t.name : t.name}
|
|
442
|
-
variant=${this.swatchVariant}
|
|
443
|
-
?can-copy=${this.canCopy}
|
|
444
|
-
?can-focus-code-only=${this.isFocused}
|
|
445
|
-
.showCodes=${this.showCodes}
|
|
446
|
-
no-auto-convert
|
|
447
|
-
class=${w({
|
|
448
|
-
[`color-swatch-group__swatches--circles--${e}__item`]: this.variant === n.Circles,
|
|
449
|
-
"color-swatch-group__swatches--circles--vertical__item--mobile": this.variant === n.Circles && this.deviceType === p.Mobile
|
|
450
|
-
})}
|
|
451
|
-
@keydown=${this.handleKeyDown}
|
|
452
|
-
@focusout=${this.handleFocusOut}
|
|
453
|
-
></cx-color-swatch>`
|
|
454
|
-
)}
|
|
455
|
-
</cx-space>
|
|
456
|
-
`
|
|
282
|
+
)} hex=${t.hex} rgb=${t.rgb} cmyk=${t.cmyk} pms=${t.pms} name=${this.multiLanguage && r ? t[`name-${r.toLowerCase()}`] ?? t.name : t.name} variant=${this.swatchVariant} ?can-copy=${this.canCopy} ?can-focus-code-only=${this.isFocused} .showCodes=${this.showCodes} no-auto-convert class=${w({
|
|
283
|
+
[`color-swatch-group__swatches--circles--${e}__item`]: this.variant === c.Circles,
|
|
284
|
+
"color-swatch-group__swatches--circles--vertical__item--mobile": this.variant === c.Circles && this.deviceType === p.Mobile
|
|
285
|
+
})} @keydown=${this.handleKeyDown} @focusout=${this.handleFocusOut}></cx-color-swatch>`
|
|
286
|
+
)}</cx-space>`
|
|
457
287
|
)}
|
|
458
288
|
`;
|
|
459
289
|
}
|
|
460
290
|
};
|
|
461
|
-
o.styles = [A,
|
|
291
|
+
o.styles = [A, N];
|
|
462
292
|
o.dependencies = {
|
|
463
293
|
"cx-color-swatch": C,
|
|
464
294
|
"cx-space": z,
|
|
@@ -528,5 +358,5 @@ o = a([
|
|
|
528
358
|
], o);
|
|
529
359
|
export {
|
|
530
360
|
o as C,
|
|
531
|
-
|
|
361
|
+
c as a
|
|
532
362
|
};
|