@orangelogic/design-system 2.77.0 → 2.78.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.
Files changed (40) hide show
  1. package/library/chunks/{button.csCRiZzY.js → button.DS64Tr8Z.js} +2 -4
  2. package/library/chunks/{color-swatch-group.CKdXj10T.js → color-swatch-group.C7T6-sY7.js} +1 -1
  3. package/library/chunks/{confirm-popover.Kx6YyQwp.js → confirm-popover.BNjRvnN0.js} +1 -1
  4. package/library/chunks/{file-on-demand.BJZ5E8XT.js → file-on-demand.BTTdth3o.js} +4 -4
  5. package/library/chunks/{folder-select.BqLmIlj6.js → folder-select.B2qxSKA5.js} +1 -1
  6. package/library/chunks/{index.VbMreXxL.js → index.Bx0otwQo.js} +1 -1
  7. package/library/chunks/{list-editor.BzzQoZe1.js → list-editor.DluUZa06.js} +2 -2
  8. package/library/chunks/{pagination.BXCr_5om.js → pagination.g4zErKN2.js} +1 -1
  9. package/library/chunks/{tab-group.G24wrely.js → tab-group.Dg6a82ei.js} +1 -1
  10. package/library/chunks/{table.34yySlt-.js → table.CcqrVieF.js} +530 -484
  11. package/library/chunks/url.Cj9cIQXJ.js +27 -0
  12. package/library/components/asset-link-format.js +1 -1
  13. package/library/components/atoms.js +4 -4
  14. package/library/components/button.js +1 -1
  15. package/library/components/color-picker.js +1 -1
  16. package/library/components/color-swatch-group.js +2 -2
  17. package/library/components/confirm-popover.js +2 -2
  18. package/library/components/dynamic-select.js +1 -1
  19. package/library/components/element-clamp.js +1 -1
  20. package/library/components/file-on-demand.js +5 -5
  21. package/library/components/folder-select.js +1 -1
  22. package/library/components/line-clamp.js +1 -1
  23. package/library/components/list-editor.js +3 -3
  24. package/library/components/molecules.js +3 -3
  25. package/library/components/organisms.js +2 -2
  26. package/library/components/pagination.js +2 -2
  27. package/library/components/tab-group.js +2 -2
  28. package/library/components/table.js +3 -3
  29. package/library/components/textarea.js +198 -170
  30. package/library/components/types.js +10217 -10205
  31. package/library/package.json +1 -1
  32. package/library/packages/atoms/src/components/table/tabulator-tables/modules/Edit/Edit.d.ts +1 -0
  33. package/library/packages/atoms/src/components/textarea/textarea.d.ts +19 -4
  34. package/library/packages/organisms/src/carousel/carousel.d.ts +2 -0
  35. package/library/packages/types/src/textarea.d.ts +4 -0
  36. package/library/packages/utils/src/url/url.d.ts +9 -0
  37. package/library/react-web-component.d.ts +3 -3
  38. package/library/utils.js +34 -33
  39. package/package.json +1 -1
  40. package/library/chunks/url.LjsR2sB5.js +0 -15
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "2.77.0",
4
+ "version": "2.78.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -43,6 +43,7 @@ export default class Edit extends Module {
43
43
  clearEditor(cancel: boolean): void;
44
44
  cancelEdit(): void;
45
45
  bindEditor(cell: Cell): void;
46
+ addListEditorTrigger(cell: Cell): void;
46
47
  focusCellNoEvent(cell: Cell, block?: boolean): void;
47
48
  editCell(cell: ICellComponent | null, forceEdit?: boolean): void;
48
49
  focusScrollAdjust(cell: Cell): void;
@@ -1,4 +1,5 @@
1
1
  import { CortexFormControl, default as CortexElement } from '../../../../base/src/cortex-element.ts';
2
+ import { TextareaRows } from '../../../../types/src/textarea';
2
3
  import { CSSResultGroup } from 'lit';
3
4
 
4
5
  /**
@@ -20,6 +21,8 @@ import { CSSResultGroup } from 'lit';
20
21
  * @csspart base - The component's base wrapper.
21
22
  * @csspart textarea - The internal `<textarea>` control.
22
23
  * @csspart character-count - The container that wraps the character count.
24
+ *
25
+ * @typedef {number | 'max'} TextareaRows - Use a number for a fixed row count. Use `'max'` to fill the parent container height (parent must have a definite height). With `'max'`, `resize="vertical"` and `resize="none"` work; `resize="auto"` does not (it is disabled).
23
26
  */
24
27
  export default class CxTextarea extends CortexElement implements CortexFormControl {
25
28
  static styles: CSSResultGroup;
@@ -27,6 +30,7 @@ export default class CxTextarea extends CortexElement implements CortexFormContr
27
30
  private readonly hasSlotController;
28
31
  private resizeObserver;
29
32
  input: HTMLTextAreaElement;
33
+ private formControlRoot;
30
34
  private hasFocus;
31
35
  title: string;
32
36
  /** The name of the textarea, submitted as a name/value pair with form data. */
@@ -43,9 +47,17 @@ export default class CxTextarea extends CortexElement implements CortexFormContr
43
47
  helpText: string;
44
48
  /** Placeholder text to show as a hint when the input is empty. */
45
49
  placeholder: string;
46
- /** The number of rows to display by default. */
47
- rows: number;
48
- /** Controls how the textarea can be resized. */
50
+ /**
51
+ * The number of rows to display by default.
52
+ * Set to `"max"` (or `TextareaRows.Max`) to make the textarea fill its parent container height.
53
+ * The parent element must have a definite height (e.g. via flex, grid, or an explicit `height`) for `"max"` to take effect.
54
+ * With `"max"`, `resize="vertical"` (default) and `resize="none"` are supported; `resize="auto"` is not (fill height and auto-grow conflict, so auto resize is disabled).
55
+ */
56
+ rows: number | TextareaRows;
57
+ /**
58
+ * Controls how the textarea can be resized.
59
+ * When `rows` is `"max"`, `auto` is ignored; use `vertical` or `none`.
60
+ */
49
61
  resize: 'none' | 'vertical' | 'auto';
50
62
  /** Disables the textarea. */
51
63
  disabled: boolean;
@@ -87,13 +99,16 @@ export default class CxTextarea extends CortexElement implements CortexFormContr
87
99
  inputMode: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
88
100
  /** The default value of the form control. Primarily used for resetting the form control. */
89
101
  defaultValue: string;
102
+ /** Tracks the px height applied by fill-mode so we can distinguish a host resize (recalculate) from a user drag (preserve). */
103
+ private _fillHeightPx;
90
104
  /** Gets the validity state object */
91
105
  get validity(): ValidityState;
92
106
  /** Gets the validation message */
93
107
  get validationMessage(): string;
94
- connectedCallback(): void;
108
+ connectedUpdatedCallback(): void;
95
109
  runFirstUpdated(): void;
96
110
  disconnectedCallback(): void;
111
+ private updateResizeObserver;
97
112
  private handleBlur;
98
113
  private handleChange;
99
114
  private handleFocus;
@@ -205,6 +205,7 @@ export default class CxCarousel extends CortexElement {
205
205
  * The timeout for the fade transition. (Only for programmatically scroll by gsap)
206
206
  */
207
207
  fadeTimeout: ReturnType<typeof setTimeout> | null;
208
+ private fadeTransitionToken;
208
209
  /**
209
210
  * The range of the carousel. Presenting current visible slides index range.
210
211
  */
@@ -339,6 +340,7 @@ export default class CxCarousel extends CortexElement {
339
340
  */
340
341
  goToSlide(index: number, behavior?: ScrollBehavior): void;
341
342
  private removeCloneContainer;
343
+ private finishFadeTransition;
342
344
  /**
343
345
  * Scrolls to the given slide, allowing an optional duration (in ms) for the scroll animation.
344
346
  * If duration is provided and behavior is 'smooth', a custom smooth scroll is performed.
@@ -0,0 +1,4 @@
1
+ /** Special value for the `rows` property that makes the textarea fill its parent container height. */
2
+ export declare enum TextareaRows {
3
+ Max = "max"
4
+ }
@@ -1,3 +1,12 @@
1
+ /**
2
+ * Returns the relative portion of a URL when it shares the same origin as the
3
+ * current page (or the provided `origin`). Returns the original value unchanged
4
+ * when the URL is cross-origin, already relative, or falsy.
5
+ *
6
+ * @param url - The URL to normalise.
7
+ * @param origin - Origin to compare against (defaults to `window.location.origin`).
8
+ */
9
+ export declare function toRelativeUrl(url: string | null | undefined, origin?: string): string | undefined;
1
10
  export declare const appendProtocol: (inputUrl: string, defaultProtocol?: string, ignoreRelativeUrl?: boolean) => string;
2
11
  export declare const isValidUrl: (urlString: string) => boolean;
3
12
  export declare const RELATIVE_URL_REGEX: string;
@@ -892,11 +892,11 @@
892
892
  */
893
893
  placeholder?: string;
894
894
  /**
895
- * The number of rows to display by default.
895
+ * The number of rows to display by default. Set to `"max"` (or `TextareaRows.Max`) to make the textarea fill its parent container height. The parent element must have a definite height (e.g. via flex, grid, or an explicit `height`) for `"max"` to take effect. With `"max"`, `resize="vertical"` (default) and `resize="none"` are supported; `resize="auto"` is not (fill height and auto-grow conflict, so auto resize is disabled).
896
896
  */
897
- rows?: number;
897
+ rows?: 'max' | number;
898
898
  /**
899
- * Controls how the textarea can be resized.
899
+ * Controls how the textarea can be resized. When `rows` is `"max"`, `auto` is ignored; use `vertical` or `none`.
900
900
  */
901
901
  resize?: 'none' | 'auto' | 'vertical';
902
902
  /**
package/library/utils.js CHANGED
@@ -1,7 +1,7 @@
1
- import { C as s, D as t, H as o, P as r, m as i, e as l, f as n, u as m, x as p, g as c, h as g, p as d, d as f, i as x, o as u, j as C, k as A, l as T, y as I, r as E, v, s as y, q as S, n as L, t as R, w as F } from "./chunks/index.VbMreXxL.js";
1
+ import { C as t, D as s, H as o, P as r, m as i, e as l, f as n, u as m, x as p, g as c, h as g, p as d, d as f, i as x, o as u, j as C, k as A, l as T, y as I, r as E, v, s as y, q as S, n as L, t as R, w as F } from "./chunks/index.Bx0otwQo.js";
2
2
  import { l as b, f as h, g as D, j as P, i as _, e as B, k as M, m as O, h as w, r as H } from "./chunks/content-builder.B4Tqoc6M.js";
3
- import { e as G, a as N, f as X, g as U, d as z, b as j, c as K, i as W, p as Z, s as q } from "./chunks/browser.BHOCIF_A.js";
4
- import { d as J, C as Q, e as $, H as aa, R as ea, c as sa, h as ta, f as oa, g as ra, l as ia, p as la, a as na, b as ma } from "./chunks/color.vLD2sNTs.js";
3
+ import { e as G, a as N, f as U, g as X, d as z, b as j, c as K, i as W, p as Z, s as q } from "./chunks/browser.BHOCIF_A.js";
4
+ import { d as J, C as Q, e as $, H as aa, R as ea, c as ta, h as sa, f as oa, g as ra, l as ia, p as la, a as na, b as ma } from "./chunks/color.vLD2sNTs.js";
5
5
  import { a as ca, b as ga, g as da } from "./chunks/modal.U1QltQKe.js";
6
6
  import { a as xa, p as ua, c as Ca, b as Aa, s as Ta } from "./chunks/animate.El-MpOws.js";
7
7
  import { t as Ea } from "./chunks/converters.DkDtLstb.js";
@@ -12,11 +12,11 @@ import { d as ba } from "./chunks/drag.DXEXVXPv.js";
12
12
  import { w as Da } from "./chunks/event.mFzZi4sr.js";
13
13
  import { F as _a, c as Ba, f as Ma, v as Oa, a as wa } from "./chunks/form.DgwYWi0O.js";
14
14
  import { L as ka, r as Ga } from "./chunks/i18n.BUW7B9hr.js";
15
- import { c as Xa } from "./chunks/math.DqTA6ya4.js";
15
+ import { c as Ua } from "./chunks/math.DqTA6ya4.js";
16
16
  import { g as za, l as ja, s as Ka, u as Wa } from "./chunks/scroll.xtO5yojm.js";
17
17
  import { H as qa, a as Ya, g as Ja } from "./chunks/slot.j5oheLJC.js";
18
18
  import { g as $a, a as ae } from "./chunks/tabbable.CcMz3mIL.js";
19
- import { i as se } from "./chunks/user-agent.D9aPuOyL.js";
19
+ import { i as te } from "./chunks/user-agent.D9aPuOyL.js";
20
20
  import { w as oe } from "./chunks/watch.BCJD77bD.js";
21
21
  import { c as ie, d as le, k as ne, j as me, a as pe, g as ce, h as ge, b as de, f as fe, i as xe, e as ue, l as Ce, s as Ae } from "./chunks/dom.BQVKDNd8.js";
22
22
  import { f as Ie, t as Ee } from "./chunks/toast.BXNbwZV8.js";
@@ -24,15 +24,15 @@ import { c as ye, b as Se, g as Le, r as Re, a as Fe } from "./chunks/image.mbpy
24
24
  import { a as be, b as he, c as De, e as Pe, f as _e, r as Be, s as Me } from "./chunks/number.CjNxU7Xs.js";
25
25
  import { s as we } from "./chunks/parse.Cu5nBDTb.js";
26
26
  import { g as ke, a as Ge } from "./chunks/responsive.DL-wBD4P.js";
27
- import { a as Xe, e as Ue, f as ze, h as je, i as Ke, p as We, b as Ze, s as qe, g as Ye, l as Je, j as Qe, k as $e, m as as, t as es, u as ss } from "./chunks/string.B_rEG27K.js";
28
- import { g as os } from "./chunks/template.CsJd8Pb_.js";
29
- import { c as is, a as ls, f as ns, g as ms } from "./chunks/time.D_uFZqqe.js";
30
- import { R as cs, U as gs, c as ds, b as fs, a as xs, i as us } from "./chunks/url.LjsR2sB5.js";
27
+ import { a as Ue, e as Xe, f as ze, h as je, i as Ke, p as We, b as Ze, s as qe, g as Ye, l as Je, j as Qe, k as $e, m as at, t as et, u as tt } from "./chunks/string.B_rEG27K.js";
28
+ import { g as ot } from "./chunks/template.CsJd8Pb_.js";
29
+ import { c as it, a as lt, f as nt, g as mt } from "./chunks/time.D_uFZqqe.js";
30
+ import { R as ct, U as gt, c as dt, b as ft, a as xt, i as ut, t as Ct } from "./chunks/url.Cj9cIQXJ.js";
31
31
  export {
32
32
  J as CMYK_VALIDATION_REGEX,
33
33
  Q as ColorType,
34
- s as CortexPopupController,
35
- t as DragScroll,
34
+ t as CortexPopupController,
35
+ s as DragScroll,
36
36
  _a as FormControlController,
37
37
  $ as HEX_ALPHA_VALIDATION_REGEX,
38
38
  aa as HEX_VALIDATION_REGEX,
@@ -40,19 +40,19 @@ export {
40
40
  o as HistoryManager,
41
41
  ka as LocalizeController,
42
42
  r as PRECISION,
43
- cs as RELATIVE_URL_REGEX,
43
+ ct as RELATIVE_URL_REGEX,
44
44
  ea as RGB_VALIDATION_REGEX,
45
- gs as URL_DOMAIN_VALIDATION_REGEX,
46
- ds as URL_PROTOCOL_VALIDATION_REGEX,
47
- fs as URL_VALIDATION_REGEX,
45
+ gt as URL_DOMAIN_VALIDATION_REGEX,
46
+ dt as URL_PROTOCOL_VALIDATION_REGEX,
47
+ ft as URL_VALIDATION_REGEX,
48
48
  ca as activeElements,
49
49
  b as adjustRelativeValues,
50
50
  xa as animateTo,
51
- xs as appendProtocol,
51
+ xt as appendProtocol,
52
52
  ye as calculateAspectRatioFit,
53
- Xa as clamp,
54
- is as clearZeroDurationParts,
55
- sa as convertColor,
53
+ Ua as clamp,
54
+ it as clearZeroDurationParts,
55
+ ta as convertColor,
56
56
  be as convertDataUnits,
57
57
  he as convertDurationToMilliseconds,
58
58
  De as convertPixelsToAspectRatio,
@@ -64,23 +64,23 @@ export {
64
64
  Fa as defaultValue,
65
65
  i as downloadAsset,
66
66
  ba as drag,
67
- Xe as emptyToSpace,
68
- ta as extractColor,
69
- Ue as extractExtension,
67
+ Ue as emptyToSpace,
68
+ sa as extractColor,
69
+ Xe as extractExtension,
70
70
  l as extractFrames,
71
71
  Pe as extractValueAndUnit,
72
72
  Ie as fetchCortexApi,
73
73
  G as findAncestorWithBuggyStyle,
74
74
  N as findContainingBlock,
75
- X as findCuttingAncestor,
75
+ U as findCuttingAncestor,
76
76
  n as findFrameByColAndRow,
77
77
  h as findIndexByProp,
78
78
  Ma as formCollections,
79
- ls as formatDurationPartsManually,
79
+ lt as formatDurationPartsManually,
80
80
  _e as formatNumberWithGrouping,
81
81
  ze as formatSecondsToTime,
82
82
  je as formatTimeToSeconds,
83
- ns as formatWithIntlDurationFormat,
83
+ nt as formatWithIntlDurationFormat,
84
84
  le as getActiveElement,
85
85
  ga as getActiveModals,
86
86
  ke as getBreakpointsFromCSS,
@@ -91,16 +91,16 @@ export {
91
91
  me as getCurrentZIndex,
92
92
  da as getDeepestActiveElement,
93
93
  Ge as getDeviceType,
94
- ms as getDurationPartsByUnitsFormat,
94
+ mt as getDurationPartsByUnitsFormat,
95
95
  pe as getElementFromHTMLString,
96
96
  ce as getElementFromTemplate,
97
97
  p as getFormControls,
98
- os as getHighlightedTitle,
98
+ ot as getHighlightedTitle,
99
99
  Ya as getInnerHTML,
100
100
  c as getInterval,
101
101
  ra as getLightDarkCssString,
102
102
  ge as getNeededPaddingForBoxShadow,
103
- U as getNextAncestor,
103
+ X as getNextAncestor,
104
104
  za as getOffset,
105
105
  de as getRelativeClickPercentage,
106
106
  $a as getTabbableBoundary,
@@ -111,7 +111,7 @@ export {
111
111
  g as insertFrameToCache,
112
112
  _ as insertMultipleAtIndex,
113
113
  z as isChrome,
114
- se as isCortexAdobePlugin,
114
+ te as isCortexAdobePlugin,
115
115
  fe as isDomElement,
116
116
  xe as isElementInHorizontalView,
117
117
  j as isFirefox,
@@ -122,7 +122,7 @@ export {
122
122
  ue as isInElement,
123
123
  x as isModKey,
124
124
  W as isSafari,
125
- us as isValidUrl,
125
+ ut as isValidUrl,
126
126
  Ce as loadScript,
127
127
  ja as lockBodyScrolling,
128
128
  ia as luminanceTextColor,
@@ -167,11 +167,12 @@ export {
167
167
  R as toGalleryEventClick,
168
168
  Qe as toKebabCase,
169
169
  $e as toPascalCase,
170
- as as toTitleCase,
170
+ Ct as toRelativeUrl,
171
+ at as toTitleCase,
171
172
  Ee as toast,
172
- es as truncateTextMiddle,
173
+ et as truncateTextMiddle,
173
174
  Wa as unlockBodyScrolling,
174
- ss as upperFirst,
175
+ tt as upperFirst,
175
176
  Oa as validValidityState,
176
177
  wa as valueMissingValidityState,
177
178
  Da as waitForEvent,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "2.77.0",
4
+ "version": "2.78.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -1,15 +0,0 @@
1
- const c = (a, t = "https://", d = !1) => d && a.match(s) || a.match(/^[a-zA-Z][a-zA-Z\d+\-.]*:\/\//) ? a : `${t}${a}`, _ = (a) => {
2
- try {
3
- return new URL(a), new RegExp(z, "i").test(a);
4
- } catch {
5
- return !1;
6
- }
7
- }, s = "^(?![a-zA-Z][a-zA-Z\\d+\\-.]*:\\/\\/)(?!([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,}($|\\/))[^\\s]+$", z = "^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[^\\s]*)?$", e = "^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.){2,}[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[^\\s]*)?$", r = "^(https?:\\/\\/)((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[^\\s]*)?$";
8
- export {
9
- s as R,
10
- e as U,
11
- c as a,
12
- z as b,
13
- r as c,
14
- _ as i
15
- };