@orangelogic/design-system 2.82.0 → 2.83.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.
@@ -1,5 +1,5 @@
1
1
  import z from "../components/space.js";
2
- import { C as $ } from "./table.DgYTOnso.js";
2
+ import { C as $ } from "./table.CR0X6Kbe.js";
3
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
5
  import { C, a as g } from "./color-swatch.Bx-HOp9f.js";
@@ -1,5 +1,5 @@
1
1
  import k from "../components/copy-button.js";
2
- import { n as c, C as b } from "./lib-cortex-element.CVMmyPMC.js";
2
+ import { n as s, C as b } from "./lib-cortex-element.CVMmyPMC.js";
3
3
  import { c as x } from "./component.styles.CRO4Odto.js";
4
4
  import { i as u } from "./lit-element.jLBm65_O.js";
5
5
  import { c as v } from "./custom-element.L4WJXn1j.js";
@@ -9,14 +9,14 @@ import { e as m } from "./query.BBf1UFkC.js";
9
9
  import { e as g } from "./class-map.BiVq-cVR.js";
10
10
  import { o as P } from "./style-map.llVFPd__.js";
11
11
  import { n as z } from "./when.Dr1es41R.js";
12
- import { i as l, u as h } from "./static.UA3G1Deq.js";
12
+ import { i as c, u as h } from "./static.UA3G1Deq.js";
13
13
  const C = u`.column-resize-handle{background-color:var(--editor-table-resize-handle-color);pointer-events:none;z-index:10000;width:4px;position:absolute;top:-2px;bottom:-2px;right:-4px;height:unset!important;max-height:unset!important}.column-resize-handle.bottom-handle{bottom:0}.column-resize-handle.top-handle{top:0}.row-resize-handle{background-color:var(--editor-table-resize-handle-color);pointer-events:none;height:4px;z-index:20, 10000;position:absolute;bottom:-4px;left:-2px;right:-2px;max-width:unset!important;width:unset!important}.row-resize-handle.left-handle{left:0}.row-resize-handle.right-handle{right:0}.ProseMirror{--editor-table-resize-handle-color:#adf;white-space:normal;outline:none}.ProseMirror p{margin:0}.ProseMirror .tableWrapper .floating-button{opacity:0;transition:opacity .2s ease-in-out;position:absolute}.ProseMirror .code-block-wrapper{background-color:var(--cx-color-neutral-50);border-radius:var(--cx-border-radius-medium);color:var(--cx-color-neutral-700);min-height:3rem;padding:var(--cx-spacing-x-small);white-space:normal;position:relative}.ProseMirror .code-block-wrapper cx-rte-code-block-toolbar{gap:var(--cx-spacing-small);right:var(--cx-spacing-2x-small);top:var(--cx-spacing-2x-small);display:flex;position:absolute}.ProseMirror .code-block-wrapper cx-rte-code-block-toolbar,.ProseMirror .code-block-wrapper cx-rte-code-block-toolbar.hidden{opacity:0;pointer-events:none}.ProseMirror .code-block-wrapper:hover cx-rte-code-block-toolbar:not(.hidden),.ProseMirror .code-block-wrapper cx-rte-code-block-toolbar.open{opacity:1;pointer-events:auto}.ProseMirror .floating-button{position:absolute}.ProseMirror .mce-item-anchor{position:relative;text-decoration:none!important}.ProseMirror .mce-item-anchor:before{color:var(--cx-color-neutral-700);content:"";font-family:FontAwesome;font-size:12px!important}.ProseMirror .tableWrapper{position:relative}.ProseMirror .tableWrapper:hover .floating-button,.ProseMirror .tableWrapper.ProseMirror-selectednode .floating-button{opacity:1}.ProseMirror blockquote{border-left:3px solid var(--cx-color-neutral-300);margin-block:1em;margin-inline:40px;padding-left:1rem;display:block}.ProseMirror p.is-editor-empty{position:relative}.ProseMirror p.is-editor-empty:first-child:before{color:var(--cx-color-neutral-1000);content:attr(data-placeholder);opacity:.25;pointer-events:none;text-overflow:ellipsis;white-space:nowrap;width:100%;height:100%;font-weight:400;display:block;position:absolute;overflow:hidden}.ProseMirror table .selectedCell:after{background:var(--cx-color-neutral-300);content:"";opacity:.4;pointer-events:none;z-index:2;height:100%;position:absolute;inset:0}.ProseMirror table td,.ProseMirror table th{border:1px dashed var(--cx-color-neutral-400);min-width:1rem;position:relative}.ProseMirror table[data-align=center]{margin-left:auto;margin-right:auto}.ProseMirror table[data-align=right]{margin-left:auto}.ProseMirror.cursor-col-resize{cursor:col-resize}.ProseMirror.cursor-row-resize{cursor:row-resize}pre[class*=language-],code[class*=language-]{color:#d4d4d4;font-size:var(--cx-font-size-x-small);text-shadow:none;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;tab-size:4;hyphens:none;direction:ltr;font-family:Menlo,Monaco,Consolas,Andale Mono,Ubuntu Mono,Courier New,monospace;line-height:1.5}pre[class*=language-]::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,code[class*=language-] ::selection{text-shadow:none;background:#75a7ca}@media print{pre[class*=language-],code[class*=language-]{text-shadow:none}}pre[class*=language-]{background:#1e1e1e;margin:.5em 0;padding:1em;overflow:auto}:not(pre)>code[class*=language-]{color:#db4c69;background:#f9f2f4;border-radius:.3em;padding:.1em .3em}.namespace{opacity:.7}.token.doctype .token.doctype-tag{color:#569cd6}.token.doctype .token.name{color:#9cdcfe}.token.comment,.token.prolog{color:#6a9955}.token.punctuation,.language-html .language-css .token.punctuation,.language-html .language-javascript .token.punctuation{color:#d4d4d4}.token.property,.token.tag,.token.boolean,.token.number,.token.constant,.token.symbol,.token.deleted,.token.unit{color:#b5cea8}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.inserted{color:#ce9178}.language-css .token.string.url{text-decoration:underline}.token.operator,.token.entity{color:#d4d4d4}.token.operator.arrow{color:#569cd6}.token.atrule{color:#ce9178}.token.atrule .token.rule{color:#c586c0}.token.atrule .token.url{color:#9cdcfe}.token.atrule .token.url .token.function{color:#dcdcaa}.token.atrule .token.url .token.punctuation{color:#d4d4d4}.token.keyword{color:#569cd6}.token.keyword.module,.token.keyword.control-flow{color:#c586c0}.token.function,.token.function .token.maybe-class-name{color:#dcdcaa}.token.regex{color:#d16969}.token.important{color:#569cd6}.token.italic{font-style:italic}.token.constant{color:#9cdcfe}.token.class-name,.token.maybe-class-name{color:#4ec9b0}.token.console,.token.parameter,.token.interpolation{color:#9cdcfe}.token.punctuation.interpolation-punctuation,.token.boolean{color:#569cd6}.token.property,.token.variable,.token.imports .token.maybe-class-name,.token.exports .token.maybe-class-name{color:#9cdcfe}.token.selector,.token.escape{color:#d7ba7d}.token.tag{color:#569cd6}.token.tag .token.punctuation,.token.cdata{color:gray}.token.attr-name{color:#9cdcfe}.token.attr-value,.token.attr-value .token.punctuation{color:#ce9178}.token.attr-value .token.punctuation.attr-equals{color:#d4d4d4}.token.entity{color:#569cd6}.token.namespace{color:#4ec9b0}pre[class*=language-javascript],code[class*=language-javascript],pre[class*=language-jsx],code[class*=language-jsx],pre[class*=language-typescript],code[class*=language-typescript],pre[class*=language-tsx],code[class*=language-tsx]{color:#9cdcfe}pre[class*=language-css],code[class*=language-css]{color:#ce9178}pre[class*=language-html],code[class*=language-html]{color:#d4d4d4}.language-regex .token.anchor{color:#dcdcaa}.language-html .token.punctuation{color:gray}pre[data-line]{position:relative}pre[class*=language-]>code[class*=language-]{z-index:1;position:relative}.line-highlight{z-index:0;pointer-events:none;line-height:inherit;white-space:pre;background:#f7ebc6;margin-top:1em;padding:0;position:absolute;left:0;right:0;box-shadow:inset 5px 0 #f7d87c}`;
14
14
  var t = /* @__PURE__ */ ((e) => (e.H1 = "h1", e.H2 = "h2", e.H3 = "h3", e.H4 = "h4", e.H5 = "h5", e.H6 = "h6", e))(t || {}), f = /* @__PURE__ */ ((e) => (e.Center = "center", e.Justify = "justify", e.Left = "left", e.Right = "right", e))(f || {});
15
15
  const M = u`:host{--color:light-dark(#000,#fff);--font-family:var(--cx-font-sans);--text-align:left;--line-height:1;--padding:0;width:100%;display:block}:host([alignment=center]) .container{--text-align:center;justify-content:center}:host([alignment=right]) .container{--text-align:right;flex-direction:row-reverse}:host([alignment=left]) .container{--text-align:left;justify-content:flex-start}:host([alignment=justify]) .container{--text-align:justify;justify-content:flex-start}.container{padding:var(--padding,0px);flex-direction:row;align-items:center;display:flex}.container ::slotted(p),.container p{word-wrap:break-word}.heading{color:var(--color);font-family:var(--font-family);text-align:var(--text-align,left);max-width:100%;min-height:calc(var(--line-height,1) * 1em);flex:auto;min-height:1lh;margin-block:0}.container.container--has-copy-button .heading{flex:none;max-width:calc(100% - 32px)}.copy-button{opacity:0;transition:opacity var(--cx-transition-fast);color:var(--cx-color-neutral-600);pointer-events:none;user-select:none;line-height:0}.container:hover .copy-button,.copy-button:focus-within{opacity:1;pointer-events:auto;user-select:auto}.heading-1{font-size:var(--cx-font-size-3x-large);font-weight:var(--cx-font-weight-semibold);line-height:var(--line-height,var(--cx-line-height-3x-large))}.heading-2{font-size:var(--cx-font-size-2x-large);font-weight:var(--cx-font-weight-semibold);line-height:var(--line-height,var(--cx-line-height-3x-large))}.heading-3{font-size:var(--cx-font-size-x-large);font-weight:var(--cx-font-weight-semibold);line-height:var(--line-height,var(--cx-line-height-2x-large))}.heading-4{font-size:var(--cx-font-size-large);font-weight:var(--cx-font-weight-semibold);line-height:var(--line-height,var(--cx-line-height-x-large))}.heading-5{font-size:var(--cx-font-size-medium);font-weight:var(--cx-font-weight-semibold);line-height:var(--line-height,var(--cx-line-height-large))}.heading-6{font-size:var(--cx-font-size-small);font-weight:var(--cx-font-weight-semibold);line-height:var(--line-height,var(--cx-line-height-medium))}`;
16
- var A = Object.defineProperty, H = Object.getOwnPropertyDescriptor, r = (e, n, a, s) => {
17
- for (var i = s > 1 ? void 0 : s ? H(n, a) : n, d = e.length - 1, p; d >= 0; d--)
18
- (p = e[d]) && (i = (s ? p(n, a, i) : p(i)) || i);
19
- return s && i && A(n, a, i), i;
16
+ var A = Object.defineProperty, H = Object.getOwnPropertyDescriptor, r = (e, n, a, i) => {
17
+ for (var l = i > 1 ? void 0 : i ? H(n, a) : n, d = e.length - 1, p; d >= 0; d--)
18
+ (p = e[d]) && (l = (i ? p(n, a, l) : p(l)) || l);
19
+ return i && l && A(n, a, l), l;
20
20
  };
21
21
  const L = {
22
22
  [t.H1]: "heading-1",
@@ -25,13 +25,13 @@ const L = {
25
25
  [t.H4]: "heading-4",
26
26
  [t.H5]: "heading-5",
27
27
  [t.H6]: "heading-6"
28
- }, T = {
29
- [t.H1]: l`h1`,
30
- [t.H2]: l`h2`,
31
- [t.H3]: l`h3`,
32
- [t.H4]: l`h4`,
33
- [t.H5]: l`h5`,
34
- [t.H6]: l`h6`
28
+ }, S = {
29
+ [t.H1]: c`h1`,
30
+ [t.H2]: c`h2`,
31
+ [t.H3]: c`h3`,
32
+ [t.H4]: c`h4`,
33
+ [t.H5]: c`h5`,
34
+ [t.H6]: c`h6`
35
35
  };
36
36
  let o = class extends b {
37
37
  constructor() {
@@ -111,9 +111,16 @@ let o = class extends b {
111
111
  e.stopPropagation();
112
112
  }
113
113
  renderHeading(e) {
114
- const n = L[this.variant], a = T[this.variant];
114
+ const n = L[this.variant], a = S[this.variant], i = /\d/.test(this.fontSize || "");
115
115
  return h`<${a} part="heading" class=${g({ heading: !0, [n]: !0 })} style=${P({
116
- fontSize: /\d/.test(this.fontSize || "") ? this.fontSize : void 0
116
+ fontSize: i ? this.fontSize : void 0,
117
+ /**
118
+ * Reset line-height to the font's natural value so descenders fit
119
+ * inside the heading box; the host's tight `--line-height: 1`
120
+ * truncates glyph metrics at large custom font sizes and triggers a
121
+ * scrollbar in overflow:auto parents (e.g. cx-column).
122
+ */
123
+ lineHeight: i ? "normal" : void 0
117
124
  })}>${e}</${a}>`;
118
125
  }
119
126
  render() {
@@ -140,22 +147,22 @@ r([
140
147
  m(".heading")
141
148
  ], o.prototype, "heading", 2);
142
149
  r([
143
- c({ reflect: !0, type: String })
150
+ s({ reflect: !0, type: String })
144
151
  ], o.prototype, "variant", 2);
145
152
  r([
146
- c({ attribute: "font-size", reflect: !0, type: String })
153
+ s({ attribute: "font-size", reflect: !0, type: String })
147
154
  ], o.prototype, "fontSize", 2);
148
155
  r([
149
- c({ attribute: "has-anchor-link", type: Boolean })
156
+ s({ attribute: "has-anchor-link", type: Boolean })
150
157
  ], o.prototype, "hasAnchorLink", 2);
151
158
  r([
152
- c({ attribute: "anchor-link", type: String })
159
+ s({ attribute: "anchor-link", type: String })
153
160
  ], o.prototype, "anchorLink", 2);
154
161
  r([
155
- c({ type: String })
162
+ s({ type: String })
156
163
  ], o.prototype, "alignment", 2);
157
164
  r([
158
- c({ attribute: "disabled-copy-button", reflect: !0, type: Boolean })
165
+ s({ attribute: "disabled-copy-button", reflect: !0, type: Boolean })
159
166
  ], o.prototype, "disabledCopyButton", 2);
160
167
  r([
161
168
  w("variant")
@@ -9,7 +9,7 @@ import B from "../components/radio.js";
9
9
  import K from "../components/radio-group.js";
10
10
  import U from "../components/select.js";
11
11
  import E from "../components/space.js";
12
- import { C as H, H as V } from "./table.DgYTOnso.js";
12
+ import { C as H, H as V } from "./table.CR0X6Kbe.js";
13
13
  import { C as L } from "./typography.DJC_UXgs.js";
14
14
  import { n as o, C as T } from "./lib-cortex-element.CVMmyPMC.js";
15
15
  import W from "../components/dynamic-select.js";