@orangelogic/design-system 2.60.0 → 2.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/library/apps/cortex/src/types.d.ts +2 -0
- package/library/chunks/_baseRest.ClTMQtN1.js +67 -0
- package/library/chunks/{_baseUniq.BUihBa8c.js → _baseUniq.Df-fLIBx.js} +53 -56
- package/library/chunks/{amazon_s3.DeaMdPPn.js → amazon_s3.BEMtqafk.js} +1 -1
- package/library/chunks/animate.El-MpOws.js +37 -0
- package/library/chunks/animation-registry.HmpwNuGH.js +34 -0
- package/library/chunks/{animation.B7d72NVK.js → animation.DfUHRQry.js} +10 -8
- package/library/chunks/array.DCtvHiLS.js +81 -0
- package/library/chunks/asset.CG_yXtWK.js +288 -0
- package/library/chunks/{browser.Va59Ix3P.js → browser.BHOCIF_A.js} +18 -16
- package/library/chunks/{button.CtCSNRB3.js → button.P71VJ5xh.js} +75 -74
- package/library/chunks/{button.styles.C8AIO8fd.js → button.styles.Dl5IQLHU.js} +1 -1
- package/library/chunks/{capitalize.CNStXZBq.js → capitalize.WSkCXkNE.js} +1 -1
- package/library/chunks/{chatbot.sm4Rph1v.js → chatbot.BmpIu59L.js} +2 -2
- package/library/chunks/{class-map.CoZTSvbM.js → class-map.BiVq-cVR.js} +1 -1
- package/library/chunks/{color-swatch-group.qJevXs50.js → color-swatch-group.DlLmydlB.js} +116 -127
- package/library/chunks/color-swatch.Bpb_hW2H.js +407 -0
- package/library/chunks/color.vLD2sNTs.js +164 -0
- package/library/chunks/{component.styles.CI-v8BZa.js → component.styles.DMSLciL5.js} +1 -1
- package/library/chunks/{confirm-popover.D2TF1x6K.js → confirm-popover.C1uA36JR.js} +15 -13
- package/library/chunks/{content-builder.WranV3P4.js → content-builder.Bf7kqzDI.js} +1 -1
- package/library/chunks/converters.DkDtLstb.js +11 -0
- package/library/chunks/{cropper.aA0v16xS.js → cropper.BraEEykE.js} +5004 -5024
- package/library/chunks/custom-element.L4WJXn1j.js +14 -0
- package/library/chunks/debounce.DaHuiSGU.js +15 -0
- package/library/chunks/{default-value.CIKAvD5l.js → default-value.COZopaet.js} +1 -1
- package/library/chunks/{dialog.B1TORO6S.js → dialog.C_75RVVz.js} +52 -49
- package/library/chunks/{directive-helpers.DBHob-_L.js → directive-helpers.Dm4rc594.js} +1 -1
- package/library/chunks/dom.CZrJ64Dm.js +92 -0
- package/library/chunks/{dot-pagination.8f2oX_ge.js → dot-pagination.CoCIJsHC.js} +24 -22
- package/library/chunks/{endpoints.BgyupJys.js → endpoints.B7lcoc1N.js} +1 -3
- package/library/chunks/{file-on-demand.Cwgabdyw.js → file-on-demand.B2jNilAj.js} +1829 -1544
- package/library/chunks/{folder-select.DiWCwR-T.js → folder-select.CSEQxIXF.js} +380 -255
- package/library/chunks/{form-control.styles.NE2Q-quE.js → form-control.styles.CUGhvlfT.js} +1 -1
- package/library/chunks/{form.B8u0ywni.js → form.CO12-VK0.js} +1 -1
- package/library/chunks/{guard.BDP4A85K.js → guard.D4axKaMo.js} +1 -1
- package/library/chunks/{header.B_FD8uLt.js → header.Bd3G0-oA.js} +11 -9
- package/library/chunks/{hub-connection.CxfaT11o.js → hub-connection.BxT2b7Nq.js} +4 -3
- package/library/chunks/{i18n.BP2FRO1v.js → i18n.DrzK7TPf.js} +54 -7
- package/library/chunks/identity.ByMq8VxU.js +6 -0
- package/library/chunks/{if-defined.MfEgpxEN.js → if-defined.BRoBj_Rp.js} +1 -1
- package/library/chunks/{iframe.DZm7FiCl.js → iframe.UCj6Ze2A.js} +18 -16
- package/library/chunks/{image.Ycf8RudS.js → image.DZCRhE3G.js} +82 -79
- package/library/chunks/image.mbpyiQpQ.js +82 -0
- package/library/chunks/index.S0wy3rzm.js +373 -0
- package/library/chunks/isObjectLike.D3cpZO39.js +81 -0
- package/library/chunks/{isSymbol.L0C2ND_U.js → isSymbol.huJ_Cvxt.js} +1 -1
- package/library/chunks/lib-cortex-element.CVMmyPMC.js +146 -0
- package/library/chunks/{list-editor.COkw5JKG.js → list-editor.CrLntuM7.js} +75 -79
- package/library/chunks/{custom-element.vnXBMQxc.js → lit-element.jLBm65_O.js} +123 -277
- package/library/chunks/{live.LdB9xEhp.js → live.SCz6M8Gs.js} +2 -2
- package/library/chunks/{mailchimp.BjbPJfd-.js → mailchimp.Bs6uJVsf.js} +1 -1
- package/library/chunks/{modal.BqNLxgs1.js → modal.U1QltQKe.js} +25 -19
- package/library/chunks/{option.D9KJhzHs.js → option.D1u5-cTt.js} +21 -19
- package/library/chunks/{orangelogic.BgbQXkBv.js → orangelogic.TdFfoPUN.js} +1 -1
- package/library/chunks/{overlayscrollbars.aFuRG5Rs.js → overlayscrollbars.XhGWx9Zk.js} +1 -1
- package/library/chunks/{pagination.C2FN4fmO.js → pagination.BI3LONVU.js} +17 -15
- package/library/chunks/{ref.BaCjlzLO.js → ref.bzeTdX0K.js} +2 -2
- package/library/chunks/{repeat.CauKaXyy.js → repeat.DbF2p5ae.js} +2 -2
- package/library/chunks/responsive.CA6dcNiM.js +17 -0
- package/library/chunks/{scroll.DwPiX2Ox.js → scroll.xtO5yojm.js} +3 -2
- package/library/chunks/{slot.DJLm4Dig.js → slot.j5oheLJC.js} +12 -4
- package/library/chunks/{state.Cw55xXlb.js → state.CSDxrqLd.js} +1 -1
- package/library/chunks/{static.BjNkqt7_.js → static.UA3G1Deq.js} +1 -1
- package/library/chunks/string.Cp_XNbnV.js +160 -0
- package/library/chunks/{style-map.CZovMmo_.js → style-map.llVFPd__.js} +1 -1
- package/library/chunks/{tab-group.5fLnWflv.js → tab-group.DxSlcWK0.js} +20 -18
- package/library/chunks/{table.BAr8KKc6.js → table.CY-iMTWV.js} +457 -505
- package/library/chunks/template.CsJd8Pb_.js +20 -0
- package/library/chunks/time.D_uFZqqe.js +118 -0
- package/library/chunks/{toString.CL_lYXbK.js → toString.CRT5zqEU.js} +3 -3
- package/library/chunks/toast.BXNbwZV8.js +25 -0
- package/library/chunks/{tree.CUfvIDyA.js → tree.CNbrP8cY.js} +33 -36
- package/library/chunks/{typography.BFpl0WMA.js → typography.oDzoLbZS.js} +16 -14
- package/library/chunks/{unsafe-html.DyO9_Rsq.js → unsafe-html.Dff7-rCx.js} +1 -1
- package/library/chunks/url.LjsR2sB5.js +15 -0
- package/library/chunks/user-agent.D9aPuOyL.js +4 -0
- package/library/chunks/watch.q1sEjPWL.js +501 -0
- package/library/components/alert.js +38 -35
- package/library/components/animated-image.js +25 -23
- package/library/components/animation.js +7 -5
- package/library/components/array-line-clamp.d.ts +3 -0
- package/library/components/array-line-clamp.js +195 -0
- package/library/components/asset-link-format.js +223 -212
- package/library/components/atoms.js +164 -162
- package/library/components/avatar.js +28 -26
- package/library/components/badge.js +10 -8
- package/library/components/bicolor-picker.js +21 -19
- package/library/components/border-input-group.js +11 -9
- package/library/components/breadcrumb-item.js +14 -12
- package/library/components/breadcrumb.js +24 -22
- package/library/components/button-group.js +26 -24
- package/library/components/button.js +14 -13
- package/library/components/card.js +28 -19
- package/library/components/checkbox.js +29 -23
- package/library/components/color-picker.js +19 -17
- package/library/components/color-swatch-group.js +20 -17
- package/library/components/color-swatch.js +16 -13
- package/library/components/confirm-popover.js +11 -9
- package/library/components/copy-button.js +15 -13
- package/library/components/corner-position-input-group.js +13 -11
- package/library/components/cortex-element.d.ts +3 -0
- package/library/components/cortex-element.js +5 -0
- package/library/components/cropper.js +7 -5
- package/library/components/details.js +23 -20
- package/library/components/dialog.js +19 -16
- package/library/components/divider.js +13 -11
- package/library/components/dot-pagination.js +11 -9
- package/library/components/dot-status.js +10 -8
- package/library/components/drawer.js +63 -51
- package/library/components/dropdown.js +29 -26
- package/library/components/dynamic-select.js +12 -10
- package/library/components/element-clamp.js +28 -25
- package/library/components/file-on-demand.js +21 -20
- package/library/components/folder-select.js +12 -10
- package/library/components/format-bytes.js +11 -10
- package/library/components/format-date.js +11 -9
- package/library/components/format-number.js +16 -15
- package/library/components/format-time.js +118 -9
- package/library/components/grid-item.js +48 -46
- package/library/components/grid.js +31 -29
- package/library/components/header.js +10 -9
- package/library/components/hub-connection.js +6 -5
- package/library/components/icon-button.js +20 -18
- package/library/components/icon.js +17 -15
- package/library/components/iframe.js +10 -8
- package/library/components/image-comparer.js +27 -25
- package/library/components/image.js +14 -11
- package/library/components/include.js +26 -24
- package/library/components/input-group.js +15 -13
- package/library/components/input.js +23 -21
- package/library/components/line-clamp.js +12 -10
- package/library/components/list-editor.js +17 -15
- package/library/components/markdown.js +80 -78
- package/library/components/masonry.js +46 -44
- package/library/components/menu-item.js +151 -136
- package/library/components/menu-label.js +15 -13
- package/library/components/menu-section.js +18 -16
- package/library/components/menu.js +10 -8
- package/library/components/molecules.js +5 -5
- package/library/components/mutation-observer.js +12 -10
- package/library/components/option.js +10 -8
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +30 -28
- package/library/components/pagination.js +14 -12
- package/library/components/popup.js +3296 -9
- package/library/components/position-picker.js +12 -10
- package/library/components/progress-bar.js +13 -11
- package/library/components/progress-ring.js +15 -13
- package/library/components/qr-code.js +54 -52
- package/library/components/radio-button.js +19 -17
- package/library/components/radio-card.js +14 -12
- package/library/components/radio-group.js +20 -18
- package/library/components/radio.js +15 -13
- package/library/components/range.js +25 -23
- package/library/components/rating.js +17 -15
- package/library/components/relative-time.js +16 -14
- package/library/components/resize-observer.js +21 -19
- package/library/components/select.js +1442 -25
- package/library/components/shadow-input-group.js +19 -17
- package/library/components/share-option-list.js +20 -18
- package/library/components/sidebar.js +14 -12
- package/library/components/size-input-group.js +35 -33
- package/library/components/skeleton.js +12 -10
- package/library/components/space.js +12 -10
- package/library/components/spinner.js +17 -15
- package/library/components/split-panel.js +15 -13
- package/library/components/step.js +18 -16
- package/library/components/stepper-wizard.js +11 -9
- package/library/components/stepper.js +13 -11
- package/library/components/switch.js +21 -19
- package/library/components/tab-group.js +15 -13
- package/library/components/tab-panel.js +20 -18
- package/library/components/tab.js +18 -16
- package/library/components/table.js +69 -67
- package/library/components/tag.js +11 -9
- package/library/components/textarea.js +20 -18
- package/library/components/timecode.js +98 -8
- package/library/components/tooltip.js +24 -21
- package/library/components/tree-item.js +14 -11
- package/library/components/tree.js +12 -10
- package/library/components/typeface.js +13 -11
- package/library/components/types.js +15487 -15444
- package/library/components/typography.js +6 -4
- package/library/components/video.js +13 -11
- package/library/components/visually-hidden.js +15 -13
- package/library/events.d.ts +1 -0
- package/library/events.js +1 -0
- package/library/package.json +11 -2
- package/library/packages/atoms/src/components/array-line-clamp/array-line-clamp.d.ts +45 -0
- package/library/packages/atoms/src/components/array-line-clamp/array-line-clamp.styles.d.ts +2 -0
- package/library/packages/atoms/src/components/checkbox/checkbox.d.ts +2 -0
- package/library/packages/atoms/src/components/drawer/drawer.d.ts +7 -1
- package/library/packages/atoms/src/components/include/include.d.ts +1 -0
- package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +2 -0
- package/library/packages/atoms/src/components/tree/tree.d.ts +0 -4
- package/library/packages/atoms/src/index.d.ts +1 -0
- package/library/packages/events/src/cx-file-on-demand-load-more.d.ts +8 -0
- package/library/packages/events/src/cx-file-on-demand-pin.d.ts +8 -0
- package/library/packages/events/src/cx-file-on-demand-unpin.d.ts +8 -0
- package/library/packages/events/src/cx-folder-select-search-term-change.d.ts +8 -0
- package/library/packages/events/src/cx-share-option-list-item-selected.d.ts +8 -0
- package/library/packages/events/src/events.d.ts +6 -2
- package/library/packages/molecules/src/asset-picker/asset-picker.d.ts +2 -0
- package/library/packages/molecules/src/cropper/cropper.d.ts +1 -0
- package/library/packages/molecules/src/cropper/react/Cropper.d.ts +1 -0
- package/library/packages/molecules/src/download-format-picker/download-format-picker.d.ts +1 -0
- package/library/packages/molecules/src/folder-select/components/folder-select-tree/folder-select-tree.d.ts +8 -0
- package/library/packages/molecules/src/folder-select/components/folder-select-tree-item/folder-select-tree-item.d.ts +1 -0
- package/library/packages/molecules/src/folder-select/folder-select.d.ts +6 -1
- package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +3 -7
- package/library/packages/organisms/src/content-builder/styleController.d.ts +8 -8
- package/library/packages/organisms/src/file-on-demand/components/file-on-demand-asset/file-on-demand-asset.d.ts +80 -0
- package/library/packages/organisms/src/file-on-demand/components/file-on-demand-asset/file-on-demand-asset.styles.d.ts +2 -0
- package/library/packages/organisms/src/file-on-demand/components/file-on-demand-pinned-status.ts/file-on-demand-pinned-status.d.ts +44 -0
- package/library/packages/organisms/src/file-on-demand/file-on-demand.constants.d.ts +1 -0
- package/library/packages/organisms/src/file-on-demand/file-on-demand.d.ts +11 -18
- package/library/packages/organisms/src/file-on-demand/file-on-demand.utils.d.ts +6 -0
- package/library/packages/services/src/api/folder/folder.d.ts +4 -8
- package/library/packages/services/src/api/folder/folder.types.d.ts +2 -1
- package/library/packages/types/src/file-on-demand.d.ts +4 -0
- package/library/packages/types/src/folder-select.d.ts +9 -2
- package/library/packages/utils/src/custom-element/i18n.d.ts +40 -2
- package/library/packages/utils/src/drag-scroll/drag-scroll.d.ts +22 -0
- package/library/packages/utils/src/drag-scroll/index.d.ts +1 -0
- package/library/packages/utils/src/font/font.d.ts +26 -0
- package/library/packages/utils/src/font/index.d.ts +1 -0
- package/library/packages/utils/src/history-manager/history-manager.d.ts +13 -0
- package/library/packages/utils/src/history-manager/index.d.ts +1 -0
- package/library/packages/utils/src/index.d.ts +45 -0
- package/library/packages/utils/src/template/index.d.ts +1 -0
- package/library/packages/utils/src/template/template.d.ts +3 -0
- package/library/react-web-component.d.ts +418 -360
- package/library/utils.d.ts +1 -0
- package/library/utils.js +180 -0
- package/package.json +11 -2
- package/library/chunks/animation-registry.DavRkTTr.js +0 -69
- package/library/chunks/asset.Ba-CxnNM.js +0 -309
- package/library/chunks/color-swatch.DUe3iLLo.js +0 -558
- package/library/chunks/dom.C0OFx7ND.js +0 -78
- package/library/chunks/format-time.BW6-ZWCX.js +0 -226
- package/library/chunks/isObjectLike.z36Fu426.js +0 -34
- package/library/chunks/popup._w5T7x8f.js +0 -3307
- package/library/chunks/select.DfO4de04.js +0 -1441
- package/library/chunks/string.BCk3SmdZ.js +0 -144
- package/library/chunks/timecode.D7XTiQ_3.js +0 -105
- package/library/chunks/watch.BCJD77bD.js +0 -547
- package/library/packages/events/src/cx-load-more.d.ts +0 -8
|
@@ -1,36 +1,27 @@
|
|
|
1
1
|
import z from "../components/space.js";
|
|
2
|
-
import { C as $ } from "./table.
|
|
3
|
-
import { C as
|
|
4
|
-
import {
|
|
5
|
-
import { C, a as m } from "./color-swatch.
|
|
6
|
-
import { c as
|
|
7
|
-
import { D as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
2
|
+
import { C as $ } from "./table.CY-iMTWV.js";
|
|
3
|
+
import { C as k } from "./typography.oDzoLbZS.js";
|
|
4
|
+
import { n as h, C as F } from "./lib-cortex-element.CVMmyPMC.js";
|
|
5
|
+
import { C, a as m } from "./color-swatch.Bpb_hW2H.js";
|
|
6
|
+
import { c as A } from "./component.styles.DMSLciL5.js";
|
|
7
|
+
import { D as p } from "./content-builder.Bf7kqzDI.js";
|
|
8
|
+
import { c as S } from "./custom-element.L4WJXn1j.js";
|
|
9
|
+
import { d as T } from "./debounce.DaHuiSGU.js";
|
|
10
|
+
import { L as E } from "./i18n.DrzK7TPf.js";
|
|
11
|
+
import { w as x } from "./watch.q1sEjPWL.js";
|
|
12
|
+
import { g as D, a as R } from "./responsive.CA6dcNiM.js";
|
|
13
|
+
import { x as l, B as H, i as O } from "./lit-element.jLBm65_O.js";
|
|
14
|
+
import { r as d } from "./state.CSDxrqLd.js";
|
|
12
15
|
import { e as P } from "./query.BBf1UFkC.js";
|
|
13
|
-
import { r as
|
|
14
|
-
import { e as w } from "./class-map.
|
|
15
|
-
import { i as b } from "./guard.
|
|
16
|
-
import { o as
|
|
17
|
-
import { c as
|
|
18
|
-
import { o as f } from "./style-map.
|
|
19
|
-
import { n as
|
|
16
|
+
import { r as W } from "./query-all.i3PyvTUQ.js";
|
|
17
|
+
import { e as w } from "./class-map.BiVq-cVR.js";
|
|
18
|
+
import { i as b } from "./guard.D4axKaMo.js";
|
|
19
|
+
import { o as M } from "./if-defined.BRoBj_Rp.js";
|
|
20
|
+
import { c as G } from "./repeat.DbF2p5ae.js";
|
|
21
|
+
import { o as f } from "./style-map.llVFPd__.js";
|
|
22
|
+
import { n as L } from "./when.Dr1es41R.js";
|
|
20
23
|
var n = /* @__PURE__ */ ((e) => (e.Circles = "circles", e.Grid = "grid", e.Table = "table", e))(n || {});
|
|
21
|
-
|
|
22
|
-
const t = getComputedStyle(e), o = [
|
|
23
|
-
Number.parseFloat(t.getPropertyValue("--breakpoint-mobile").trim()),
|
|
24
|
-
Number.parseFloat(t.getPropertyValue("--breakpoint-tablet").trim()),
|
|
25
|
-
1 / 0
|
|
26
|
-
];
|
|
27
|
-
return Number.isNaN(o[0]) ? o[0] = r[0] : o[0]++, Number.isNaN(o[1]) ? o[1] = r[1] : o[1]++, o;
|
|
28
|
-
}
|
|
29
|
-
function G(e) {
|
|
30
|
-
const r = window.innerWidth;
|
|
31
|
-
return r > e[1] ? l.Desktop : r > e[0] && r <= e[1] ? l.Tablet : l.Mobile;
|
|
32
|
-
}
|
|
33
|
-
const y = 165, I = ["HEX", "RGB", "CMYK", "PMS"], L = {
|
|
24
|
+
const v = 165, B = ["HEX", "RGB", "CMYK", "PMS"], I = {
|
|
34
25
|
resizable: !1
|
|
35
26
|
}, _ = [
|
|
36
27
|
{
|
|
@@ -89,18 +80,18 @@ const y = 165, I = ["HEX", "RGB", "CMYK", "PMS"], L = {
|
|
|
89
80
|
}
|
|
90
81
|
];
|
|
91
82
|
function u(e, r, t) {
|
|
92
|
-
const
|
|
93
|
-
if (!
|
|
83
|
+
const i = r.getValue() ?? "";
|
|
84
|
+
if (!i)
|
|
94
85
|
return null;
|
|
95
|
-
const s =
|
|
86
|
+
const s = l`
|
|
96
87
|
<cx-copy-button
|
|
97
88
|
copy-label=${e.term("clickToCopy")}
|
|
98
89
|
focus-copy-label=${e.term("pressEnterOrCtrlCToCopy")}
|
|
99
90
|
hoist
|
|
100
|
-
label=${`${t}, ${r.getField()} ${e.term("code")} ${
|
|
91
|
+
label=${`${t}, ${r.getField()} ${e.term("code")} ${i}. ${e.term("clickOrPressCtrlCToCopy")}`}
|
|
101
92
|
no-icon
|
|
102
93
|
tooltip-distance="0"
|
|
103
|
-
value=${
|
|
94
|
+
value=${i}
|
|
104
95
|
style=${f({
|
|
105
96
|
"--button-background-color": "transparent",
|
|
106
97
|
"--button-font-size": "var(--cx-font-size-large)",
|
|
@@ -118,13 +109,13 @@ function u(e, r, t) {
|
|
|
118
109
|
whiteSpace: "nowrap"
|
|
119
110
|
})}
|
|
120
111
|
>
|
|
121
|
-
${
|
|
112
|
+
${i}
|
|
122
113
|
</span>
|
|
123
114
|
</cx-copy-button>
|
|
124
115
|
`, c = document.createDocumentFragment();
|
|
125
|
-
return
|
|
116
|
+
return H(s, c), c.firstElementChild;
|
|
126
117
|
}
|
|
127
|
-
const
|
|
118
|
+
const N = (e, r) => [
|
|
128
119
|
..._.slice(0, 2),
|
|
129
120
|
{
|
|
130
121
|
field: "hex",
|
|
@@ -162,7 +153,7 @@ const B = (e, r) => [
|
|
|
162
153
|
title: "PMS",
|
|
163
154
|
widthGrow: 2
|
|
164
155
|
}
|
|
165
|
-
], K =
|
|
156
|
+
], K = O`
|
|
166
157
|
:host {
|
|
167
158
|
--grid-gap: var(--cx-spacing-medium);
|
|
168
159
|
--padding: 0;
|
|
@@ -255,18 +246,18 @@ const B = (e, r) => [
|
|
|
255
246
|
background-color: transparent;
|
|
256
247
|
}
|
|
257
248
|
`;
|
|
258
|
-
var U = Object.defineProperty, j = Object.getOwnPropertyDescriptor,
|
|
259
|
-
for (var s =
|
|
260
|
-
(g = e[c]) && (s = (
|
|
261
|
-
return
|
|
249
|
+
var U = Object.defineProperty, j = Object.getOwnPropertyDescriptor, a = (e, r, t, i) => {
|
|
250
|
+
for (var s = i > 1 ? void 0 : i ? j(r, t) : r, c = e.length - 1, g; c >= 0; c--)
|
|
251
|
+
(g = e[c]) && (s = (i ? g(r, t, s) : g(s)) || s);
|
|
252
|
+
return i && s && U(r, t, s), s;
|
|
262
253
|
};
|
|
263
|
-
const
|
|
264
|
-
let
|
|
254
|
+
const y = "unnamed";
|
|
255
|
+
let o = class extends F {
|
|
265
256
|
constructor() {
|
|
266
|
-
super(), this.localize = new
|
|
257
|
+
super(), this.localize = new E(this), this.variant = n.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);
|
|
267
258
|
}
|
|
268
259
|
runFirstUpdated() {
|
|
269
|
-
this.breakpoints =
|
|
260
|
+
this.breakpoints = D(this, this.breakpoints), this.handleResize();
|
|
270
261
|
}
|
|
271
262
|
runConnectedCallback() {
|
|
272
263
|
this.setAttribute("role", "region"), this.setAttribute("aria-label", this.localize.term("colorSwatches")), this.setAttribute(
|
|
@@ -288,12 +279,12 @@ let a = class extends S {
|
|
|
288
279
|
getComputedStyle(this.containerEl).getPropertyValue("--grid-gap")
|
|
289
280
|
);
|
|
290
281
|
this.currentCol = Math.floor(
|
|
291
|
-
(e + r) / (
|
|
282
|
+
(e + r) / (v + r)
|
|
292
283
|
);
|
|
293
284
|
break;
|
|
294
285
|
}
|
|
295
286
|
case n.Circles: {
|
|
296
|
-
this.deviceType =
|
|
287
|
+
this.deviceType = R(this.breakpoints);
|
|
297
288
|
break;
|
|
298
289
|
}
|
|
299
290
|
}
|
|
@@ -315,7 +306,7 @@ let a = class extends S {
|
|
|
315
306
|
* Filter out the columns that are not in the showCodes
|
|
316
307
|
*/
|
|
317
308
|
getTableColumns(e) {
|
|
318
|
-
const r = this.canCopy ?
|
|
309
|
+
const r = this.canCopy ? N(this.localize, e) : _;
|
|
319
310
|
return [
|
|
320
311
|
...r.slice(0, 2),
|
|
321
312
|
...r.slice(2).filter(
|
|
@@ -329,7 +320,7 @@ let a = class extends S {
|
|
|
329
320
|
categorizeByPalette() {
|
|
330
321
|
return Object.values(
|
|
331
322
|
this.data.reduce((e, r) => {
|
|
332
|
-
const t = r.palette?.trim() ? r.palette :
|
|
323
|
+
const t = r.palette?.trim() ? r.palette : y;
|
|
333
324
|
return e[t] || (e[t] = { colors: [], palette: t }), e[t].colors.push(r), e;
|
|
334
325
|
}, {})
|
|
335
326
|
);
|
|
@@ -347,7 +338,7 @@ let a = class extends S {
|
|
|
347
338
|
* Get current direction of the color swatch group
|
|
348
339
|
*/
|
|
349
340
|
get currentDirection() {
|
|
350
|
-
return this.variant === n.Circles && this.deviceType !==
|
|
341
|
+
return this.variant === n.Circles && this.deviceType !== p.Desktop ? "vertical" : "horizontal";
|
|
351
342
|
}
|
|
352
343
|
/**
|
|
353
344
|
* Get the variant of the color swatch
|
|
@@ -355,7 +346,7 @@ let a = class extends S {
|
|
|
355
346
|
get swatchVariant() {
|
|
356
347
|
switch (this.variant) {
|
|
357
348
|
case n.Circles:
|
|
358
|
-
return this.deviceType ===
|
|
349
|
+
return this.deviceType === p.Tablet ? m.Oval : m.Circle;
|
|
359
350
|
case n.Grid:
|
|
360
351
|
return m.GridItem;
|
|
361
352
|
default:
|
|
@@ -364,10 +355,10 @@ let a = class extends S {
|
|
|
364
355
|
}
|
|
365
356
|
render() {
|
|
366
357
|
const e = this.currentDirection, r = this.localize.lang();
|
|
367
|
-
return
|
|
368
|
-
${
|
|
358
|
+
return l`
|
|
359
|
+
${L(
|
|
369
360
|
this.variant === n.Table,
|
|
370
|
-
() =>
|
|
361
|
+
() => l`
|
|
371
362
|
<cx-space
|
|
372
363
|
class="color-swatch-group__swatches"
|
|
373
364
|
direction="vertical"
|
|
@@ -377,13 +368,13 @@ let a = class extends S {
|
|
|
377
368
|
[this.data, this.canCopy],
|
|
378
369
|
() => this.categorizeByPalette().map(
|
|
379
370
|
(t) => {
|
|
380
|
-
const
|
|
371
|
+
const i = this.multiLanguage && r ? t.colors.map((s) => ({
|
|
381
372
|
...s,
|
|
382
373
|
name: s[`name-${r.toLowerCase()}`] ?? s.name
|
|
383
374
|
})) : t.colors;
|
|
384
|
-
return
|
|
375
|
+
return l`
|
|
385
376
|
<div
|
|
386
|
-
tabindex=${
|
|
377
|
+
tabindex=${M(
|
|
387
378
|
this.canFocusContainer ? "0" : void 0
|
|
388
379
|
)}
|
|
389
380
|
data-table-container
|
|
@@ -393,7 +384,7 @@ let a = class extends S {
|
|
|
393
384
|
@keydown=${this.handleKeyDown}
|
|
394
385
|
>
|
|
395
386
|
<cx-typography variant="h3">
|
|
396
|
-
${t.palette ===
|
|
387
|
+
${t.palette === y ? this.localize.term("noPalette") : this.localize.term("shadesPalette", t.palette)}
|
|
397
388
|
</cx-typography>
|
|
398
389
|
<cx-table
|
|
399
390
|
part="table"
|
|
@@ -404,9 +395,9 @@ let a = class extends S {
|
|
|
404
395
|
[this.showCodes, this.canCopy, this.localize],
|
|
405
396
|
() => this.getTableColumns(t.palette)
|
|
406
397
|
)}
|
|
407
|
-
.columnDefaults=${
|
|
398
|
+
.columnDefaults=${I}
|
|
408
399
|
.rowHeight=${48}
|
|
409
|
-
.data=${
|
|
400
|
+
.data=${i}
|
|
410
401
|
class="color-swatch-group__table"
|
|
411
402
|
></cx-table>
|
|
412
403
|
</div>
|
|
@@ -416,7 +407,7 @@ let a = class extends S {
|
|
|
416
407
|
)}
|
|
417
408
|
</cx-space>
|
|
418
409
|
`,
|
|
419
|
-
() =>
|
|
410
|
+
() => l`
|
|
420
411
|
<cx-space
|
|
421
412
|
part="color-swatch"
|
|
422
413
|
role="list"
|
|
@@ -431,18 +422,18 @@ let a = class extends S {
|
|
|
431
422
|
[`color-swatch-group__swatches--circles--${e}`]: this.variant === n.Circles
|
|
432
423
|
})}
|
|
433
424
|
style=${f({
|
|
434
|
-
gridTemplateColumns: this.currentCol >= this.maxCol ? `repeat(${this.maxCol}, 1fr)` : `repeat(auto-fit, minmax(${
|
|
425
|
+
gridTemplateColumns: this.currentCol >= this.maxCol ? `repeat(${this.maxCol}, 1fr)` : `repeat(auto-fit, minmax(${v}px, 1fr))`
|
|
435
426
|
})}
|
|
436
427
|
>
|
|
437
|
-
${
|
|
428
|
+
${G(
|
|
438
429
|
this.data,
|
|
439
430
|
(t) => t.name,
|
|
440
|
-
(t,
|
|
431
|
+
(t, i) => l`<cx-color-swatch
|
|
441
432
|
part="color-swatch-item"
|
|
442
433
|
role="listitem"
|
|
443
434
|
aria-label=${this.localize.term(
|
|
444
435
|
"colorOfTotal",
|
|
445
|
-
|
|
436
|
+
i + 1,
|
|
446
437
|
this.data.length
|
|
447
438
|
)}
|
|
448
439
|
hex=${t.hex}
|
|
@@ -457,7 +448,7 @@ let a = class extends S {
|
|
|
457
448
|
no-auto-convert
|
|
458
449
|
class=${w({
|
|
459
450
|
[`color-swatch-group__swatches--circles--${e}__item`]: this.variant === n.Circles,
|
|
460
|
-
"color-swatch-group__swatches--circles--vertical__item--mobile": this.variant === n.Circles && this.deviceType ===
|
|
451
|
+
"color-swatch-group__swatches--circles--vertical__item--mobile": this.variant === n.Circles && this.deviceType === p.Mobile
|
|
461
452
|
})}
|
|
462
453
|
@keydown=${this.handleKeyDown}
|
|
463
454
|
@focusout=${this.handleFocusOut}
|
|
@@ -469,77 +460,75 @@ let a = class extends S {
|
|
|
469
460
|
`;
|
|
470
461
|
}
|
|
471
462
|
};
|
|
472
|
-
|
|
473
|
-
|
|
463
|
+
o.styles = [A, K];
|
|
464
|
+
o.dependencies = {
|
|
474
465
|
"cx-color-swatch": C,
|
|
475
466
|
"cx-space": z,
|
|
476
467
|
"cx-table": $,
|
|
477
|
-
"cx-typography":
|
|
468
|
+
"cx-typography": k
|
|
478
469
|
};
|
|
479
|
-
|
|
470
|
+
a([
|
|
480
471
|
P(".color-swatch-group__swatches")
|
|
481
|
-
],
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
],
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
],
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
],
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
],
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
],
|
|
497
|
-
|
|
498
|
-
|
|
472
|
+
], o.prototype, "containerEl", 2);
|
|
473
|
+
a([
|
|
474
|
+
W("cx-table")
|
|
475
|
+
], o.prototype, "tableEls", 2);
|
|
476
|
+
a([
|
|
477
|
+
h({ reflect: !0, type: String })
|
|
478
|
+
], o.prototype, "variant", 2);
|
|
479
|
+
a([
|
|
480
|
+
h({ reflect: !0, type: Array })
|
|
481
|
+
], o.prototype, "data", 2);
|
|
482
|
+
a([
|
|
483
|
+
h({ attribute: "max-col", reflect: !0, type: Number })
|
|
484
|
+
], o.prototype, "maxCol", 2);
|
|
485
|
+
a([
|
|
486
|
+
h({ attribute: "can-copy", reflect: !0, type: Boolean })
|
|
487
|
+
], o.prototype, "canCopy", 2);
|
|
488
|
+
a([
|
|
489
|
+
h({
|
|
499
490
|
attribute: "show-codes",
|
|
500
491
|
converter: {
|
|
501
|
-
fromAttribute: (e) => (e?.split(" ") ?? []).filter((t) =>
|
|
492
|
+
fromAttribute: (e) => (e?.split(" ") ?? []).filter((t) => B.includes(t)),
|
|
502
493
|
toAttribute: (e) => e.join(" ")
|
|
503
494
|
},
|
|
504
495
|
reflect: !0
|
|
505
496
|
})
|
|
506
|
-
],
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
],
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
],
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
],
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
],
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
],
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
],
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
],
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
],
|
|
531
|
-
|
|
497
|
+
], o.prototype, "showCodes", 2);
|
|
498
|
+
a([
|
|
499
|
+
h({ attribute: "multi-language", reflect: !0, type: Boolean })
|
|
500
|
+
], o.prototype, "multiLanguage", 2);
|
|
501
|
+
a([
|
|
502
|
+
d()
|
|
503
|
+
], o.prototype, "breakpoints", 2);
|
|
504
|
+
a([
|
|
505
|
+
d()
|
|
506
|
+
], o.prototype, "deviceType", 2);
|
|
507
|
+
a([
|
|
508
|
+
d()
|
|
509
|
+
], o.prototype, "currentCol", 2);
|
|
510
|
+
a([
|
|
511
|
+
d()
|
|
512
|
+
], o.prototype, "isFocused", 2);
|
|
513
|
+
a([
|
|
514
|
+
d()
|
|
515
|
+
], o.prototype, "canFocusContainer", 2);
|
|
516
|
+
a([
|
|
517
|
+
d()
|
|
518
|
+
], o.prototype, "isContainerFocused", 2);
|
|
519
|
+
a([
|
|
520
|
+
T(100)
|
|
521
|
+
], o.prototype, "handleWindowResize", 1);
|
|
522
|
+
a([
|
|
532
523
|
x("variant", { waitUntilFirstUpdate: !0 })
|
|
533
|
-
],
|
|
534
|
-
|
|
524
|
+
], o.prototype, "handleResize", 1);
|
|
525
|
+
a([
|
|
535
526
|
x("isFocused", { waitUntilFirstUpdate: !0 })
|
|
536
|
-
],
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
],
|
|
527
|
+
], o.prototype, "handleIsFocusedChange", 1);
|
|
528
|
+
o = a([
|
|
529
|
+
S("cx-color-swatch-group")
|
|
530
|
+
], o);
|
|
540
531
|
export {
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
n as b,
|
|
544
|
-
M as g
|
|
532
|
+
o as C,
|
|
533
|
+
n as a
|
|
545
534
|
};
|