@orangelogic/design-system 3.0.0 → 3.2.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 (120) hide show
  1. package/library/chunks/{asset-link-format.D--xQVgR.js → asset-link-format.BnIUG_vO.js} +19 -18
  2. package/library/chunks/{button.BnkkUqiI.js → button.CpY4FCwE.js} +1 -1
  3. package/library/chunks/{color-swatch-group.CCgwey9f.js → color-swatch-group.CTcv62MK.js} +367 -330
  4. package/library/chunks/{color-swatch.D6Gg5bpz.js → color-swatch.Caved2kL.js} +1 -1
  5. package/library/chunks/{confirm-popover.CrQKEChc.js → confirm-popover.BSS1VhB2.js} +3 -3
  6. package/library/chunks/content-builder.BX4pHujE.js +60 -0
  7. package/library/chunks/{dialog.CWGtufDA.js → dialog.ICoCAj6Z.js} +4 -4
  8. package/library/chunks/{document-viewer.C90j1Xrr.js → document-viewer.D6PxGcEL.js} +8 -7
  9. package/library/chunks/{dot-pagination.BqGFeFXK.js → dot-pagination.CzVpiv00.js} +1 -1
  10. package/library/chunks/{folder-select.CIqVGGFl.js → folder-select.DN-JomDt.js} +4 -4
  11. package/library/chunks/{header.CWlWNree.js → header.BQg_JjHw.js} +1 -1
  12. package/library/chunks/{i18n.DbXTTLXx.js → i18n.BA19xtyU.js} +6 -3
  13. package/library/chunks/{icon-button.CVrxJcZq.js → icon-button.BWJ1Vqn5.js} +17 -11
  14. package/library/chunks/{iframe.-GCTFas1.js → iframe.Dm-nXSBv.js} +1 -1
  15. package/library/chunks/{image.CTMzUqCC.js → image.B-4cVbol.js} +187 -188
  16. package/library/chunks/{input.33UmFGqR.js → input.xgeLCG8I.js} +1 -1
  17. package/library/chunks/{markdown.DOHru2Rz.js → markdown.bkEjjjS9.js} +2 -2
  18. package/library/chunks/menu-item.DgUMVYe5.js +493 -0
  19. package/library/chunks/{option.B6odSlS2.js → option.jeaj7_Lr.js} +1 -1
  20. package/library/chunks/{pagination.mzolTIpF.js → pagination.CSPKsj4y.js} +5 -5
  21. package/library/chunks/{tab-group.uSHlsFu8.js → tab-group.BSl6GdIO.js} +4 -4
  22. package/library/chunks/{toast.CXEAfCvN.js → toast.C5Ir5yKA.js} +1 -1
  23. package/library/chunks/transformation.CWKaoGaY.js +254 -0
  24. package/library/chunks/{tree.CmEdKtzK.js → tree.DYFFjW1-.js} +1 -1
  25. package/library/components/alert.js +2 -2
  26. package/library/components/asset-link-format.js +4 -4
  27. package/library/components/atoms.js +31 -31
  28. package/library/components/audio.js +2 -2
  29. package/library/components/border-input-group.js +2 -2
  30. package/library/components/breadcrumb.js +1 -1
  31. package/library/components/button.js +2 -2
  32. package/library/components/color-picker.js +3 -3
  33. package/library/components/color-swatch-group.js +5 -5
  34. package/library/components/color-swatch.js +2 -2
  35. package/library/components/confirm-popover.js +4 -4
  36. package/library/components/copy-button.js +1 -1
  37. package/library/components/corner-position-input-group.js +3 -3
  38. package/library/components/date-calendar.js +1 -1
  39. package/library/components/details.js +1 -1
  40. package/library/components/dialog.js +3 -3
  41. package/library/components/document-viewer.js +3 -3
  42. package/library/components/dot-pagination.js +2 -2
  43. package/library/components/drawer.js +4 -4
  44. package/library/components/dropdown.js +2 -2
  45. package/library/components/dynamic-select.js +4 -4
  46. package/library/components/e-chart.js +1 -1
  47. package/library/components/element-clamp.js +2 -2
  48. package/library/components/file-on-demand.js +9 -9
  49. package/library/components/folder-select.js +4 -4
  50. package/library/components/format-bytes.js +1 -1
  51. package/library/components/format-date.js +1 -1
  52. package/library/components/format-number.js +1 -1
  53. package/library/components/format-time.js +1 -1
  54. package/library/components/header.js +2 -2
  55. package/library/components/icon-button.js +2 -2
  56. package/library/components/iframe.js +2 -2
  57. package/library/components/image-comparer.js +1 -1
  58. package/library/components/image.js +3 -4
  59. package/library/components/input.js +2 -2
  60. package/library/components/line-clamp.js +1 -1
  61. package/library/components/markdown.js +3 -3
  62. package/library/components/masonry.js +113 -100
  63. package/library/components/menu-item.js +15 -483
  64. package/library/components/menu.js +20 -20
  65. package/library/components/molecules.js +3 -3
  66. package/library/components/option.js +2 -2
  67. package/library/components/organisms.js +2 -2
  68. package/library/components/padding-input-group.js +1 -1
  69. package/library/components/pagination.js +6 -6
  70. package/library/components/popup.js +101 -98
  71. package/library/components/position-picker.js +1 -1
  72. package/library/components/progress-bar.js +1 -1
  73. package/library/components/progress-ring.js +1 -1
  74. package/library/components/range.js +1 -1
  75. package/library/components/rating.js +1 -1
  76. package/library/components/relative-time.js +1 -1
  77. package/library/components/select.js +18 -13
  78. package/library/components/shadow-input-group.js +1 -1
  79. package/library/components/share-option-list.js +1 -1
  80. package/library/components/sidebar.js +1 -1
  81. package/library/components/size-input-group.js +3 -3
  82. package/library/components/spinner.js +1 -1
  83. package/library/components/split-panel.js +1 -1
  84. package/library/components/tab-group.js +5 -5
  85. package/library/components/tab.js +2 -2
  86. package/library/components/tag.js +2 -2
  87. package/library/components/tooltip.js +1 -1
  88. package/library/components/tree-item.js +2 -2
  89. package/library/components/tree.js +2 -2
  90. package/library/components/typeface.js +2 -2
  91. package/library/components/types.js +18617 -18388
  92. package/library/components/video.js +2 -2
  93. package/library/package.json +1 -1
  94. package/library/packages/atoms/src/components/icon-button/icon-button.d.ts +11 -0
  95. package/library/packages/atoms/src/components/image/image.d.ts +30 -4
  96. package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +5 -2
  97. package/library/packages/atoms/src/components/menu-item/submenu-controller.d.ts +1 -0
  98. package/library/packages/atoms/src/components/popup/popup.d.ts +11 -0
  99. package/library/packages/atoms/src/components/select/select.d.ts +8 -0
  100. package/library/packages/hybrid/table-core/src/table/styles/table-frozen.styles.d.ts +4 -4
  101. package/library/packages/hybrid/table-core/src/table/styles/table-overlay-scrollbar.styles.d.ts +8 -5
  102. package/library/packages/hybrid/table-core/src/table/table.d.ts +2 -12
  103. package/library/packages/hybrid/table-core/src/tabulator-tables/core/RowManager.d.ts +1 -0
  104. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/ResizeColumns/ResizeColumns.d.ts +5 -3
  105. package/library/packages/molecules/src/gallery-item/gallery-item.d.ts +10 -0
  106. package/library/packages/molecules/src/icon-picker/icon-picker.d.ts +1 -0
  107. package/library/packages/molecules/src/masonry/masonry.d.ts +9 -0
  108. package/library/packages/molecules/src/view-and-sort/view-and-sort.d.ts +8 -0
  109. package/library/packages/organisms/src/bento-grid/bento-grid.d.ts +88 -0
  110. package/library/packages/organisms/src/comment/components/comment-menu/comment-menu.d.ts +10 -0
  111. package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +11 -1
  112. package/library/packages/organisms/src/content-builder/content-builder.d.ts +31 -6
  113. package/library/packages/organisms/src/downloader/downloader.d.ts +1 -1
  114. package/library/packages/types/src/menu-item.d.ts +12 -1
  115. package/library/packages/utils/src/custom-element/i18n.d.ts +3 -0
  116. package/library/packages/utils/src/transformation/transformation.d.ts +52 -0
  117. package/library/react-web-component.d.ts +25 -1
  118. package/library/utils.js +173 -167
  119. package/package.json +1 -1
  120. package/library/chunks/transformation.8uLv6uwG.js +0 -264
@@ -3,6 +3,12 @@ export declare enum MenuItemCheckPlacement {
3
3
  Prefix = "prefix",
4
4
  Suffix = "suffix"
5
5
  }
6
+ /** The ARIA roles a menu item can expose, i.e. the roles allowed as children of `role="menu"`. */
7
+ export declare enum MenuItemRole {
8
+ Checkbox = "menuitemcheckbox",
9
+ Item = "menuitem",
10
+ Radio = "menuitemradio"
11
+ }
6
12
  /** Values accepted by the `aria-current` attribute, indicating what kind of "current" item this represents within a set. */
7
13
  export declare enum AriaCurrentValue {
8
14
  Date = "date",
@@ -11,6 +17,11 @@ export declare enum AriaCurrentValue {
11
17
  Step = "step",
12
18
  Time = "time"
13
19
  }
20
+ /** The kind of menu item to render. `Checkbox` is required before `checked` has any effect. */
21
+ export declare enum MenuItemType {
22
+ Checkbox = "checkbox",
23
+ Normal = "normal"
24
+ }
14
25
  /**
15
26
  * Interface for menu item data that can be shared between events and components
16
27
  * This breaks the circular dependency between events and atoms packages
@@ -37,7 +48,7 @@ export interface MenuItemData {
37
48
  /** The text content/label of the menu item */
38
49
  textContent?: string;
39
50
  /** The type of menu item */
40
- type?: 'normal' | 'checkbox';
51
+ type?: MenuItemType;
41
52
  /** The value associated with the menu item */
42
53
  value?: string;
43
54
  }
@@ -315,9 +315,12 @@ export interface Translation extends DefaultTranslation {
315
315
  defaultWidth: string;
316
316
  definition: string;
317
317
  delete: string;
318
+ deleteAllTransitions: string;
318
319
  deleteColumn: string;
320
+ deleteOptions: string;
319
321
  deleteRow: string;
320
322
  deleteTable: string;
323
+ deleteTransition: string;
321
324
  deployStacks: string;
322
325
  descending: string;
323
326
  description: string;
@@ -1,5 +1,12 @@
1
1
  import { Asset, Parameter, Transformation } from '../../../types/src/asset-link-format';
2
2
 
3
+ /**
4
+ * Width ladder used for `srcset` candidates, in CSS pixels.
5
+ *
6
+ * Kept as a small fixed ladder rather than a per-item computed width so that many
7
+ * items sharing a display size resolve to the same URLs and stay CDN-cache friendly.
8
+ */
9
+ export declare const SRCSET_WIDTH_LADDER: readonly [400, 800, 1200, 1600, 2400];
3
10
  export declare function buildTransformationString({ asset, baseUrl, extension, options, parameters, transformations, useSession, }: {
4
11
  asset?: Asset;
5
12
  baseUrl?: string;
@@ -19,3 +26,48 @@ export declare function buildTransformationString({ asset, baseUrl, extension, o
19
26
  * and merged into an existing `/t/`. Other URLs keep the plain append behavior.
20
27
  */
21
28
  export declare function applyTransformationsToUrl(url: string, transformations: Transformation[]): string;
29
+ /**
30
+ * Inserts a width-only resize into an asset-link URL, preserving any transformations
31
+ * already present.
32
+ *
33
+ * `applyTransformationsToUrl` is deliberately not reused here: it *replaces* an existing
34
+ * `/t/` segment (dropping a configured crop/rotate/quality) and drops the prettyName tail
35
+ * when doing so. This function prepends the resize to an existing segment instead, so a
36
+ * user's configured transformations survive.
37
+ *
38
+ * Returns the URL unchanged when it is not an asset-link URL, so arbitrary external
39
+ * sources are never rewritten.
40
+ */
41
+ export declare function applyWidthToAssetUrl(url: string, width: number): string;
42
+ /**
43
+ * Whether the URL already carries a transformation segment.
44
+ *
45
+ * An existing `/t/` means a width was already chosen deliberately (a configured resize,
46
+ * crop or proxy format), so a ladder must not add a competing one.
47
+ */
48
+ export declare function hasTransformSegment(url: string): boolean;
49
+ /**
50
+ * Builds a `srcset` value for an asset-link URL by emitting one width-only resize
51
+ * candidate per ladder entry, letting the browser fetch and decode only the pixels
52
+ * the layout actually needs.
53
+ *
54
+ * Candidates wider than `maxWidth` are dropped so the backend is never asked to
55
+ * upscale past the asset's real dimensions. When `maxWidth` falls below the whole
56
+ * ladder, the smallest candidate is still emitted so a `srcset` is always produced
57
+ * for an eligible URL.
58
+ *
59
+ * Returns an empty string when the URL is not an asset link, or when it already carries
60
+ * a transformation — signalling the caller to omit the attribute and honour the width
61
+ * that was configured upstream.
62
+ */
63
+ export declare function buildAssetSrcset(url: string, options?: {
64
+ maxWidth?: number;
65
+ widths?: readonly number[];
66
+ }): string;
67
+ /**
68
+ * Builds a `sizes` value from a known display width in CSS pixels.
69
+ *
70
+ * Rounded up to `step` so small layout changes (a resize that shifts a grid cell by a
71
+ * few pixels) do not produce a new value on every frame.
72
+ */
73
+ export declare function buildSizesFromDisplayWidth(displayWidth: number, step?: number): string;
@@ -213,6 +213,14 @@
213
213
  * Draws a circular icon button.
214
214
  */
215
215
  circle?: boolean;
216
+ /**
217
+ * Marks this button as a toggle control and reflects its state via `aria-pressed`. Leave unset for buttons that are not toggles (the default `role="button"` stays unchanged either way).
218
+ */
219
+ pressed?: boolean;
220
+ /**
221
+ * Overrides the button's tabindex (e.g. for a roving-tabindex toolbar). Leave unset to keep the default behavior: `0` when enabled, `-1` when `disabled` or `loading`. Attribute is `tab-index` (not the derived `tab-index-value`) to mirror the native `tabindex` attribute.
222
+ */
223
+ tabIndexValue?: number;
216
224
  /**
217
225
  * Make localization attributes reactive eslint-disable-next-line lit/no-native-attributes
218
226
  */
@@ -536,7 +544,11 @@
536
544
  /**
537
545
  * The type of menu item to render. To use `checked`, this value must be set to `checkbox`.
538
546
  */
539
- type?: 'normal' | 'checkbox';
547
+ type?: 'checkbox' | 'normal';
548
+ /**
549
+ * Overrides the ARIA role derived from `type`. Use `menuitemradio` for a checkbox item that is one choice out of a set.
550
+ */
551
+ itemRole?: 'menuitemcheckbox' | 'menuitem' | 'menuitemradio';
540
552
  /**
541
553
  * The trigger type for the submenu.
542
554
  */
@@ -2503,6 +2515,14 @@
2503
2515
  * The path to the image to load.
2504
2516
  */
2505
2517
  src?: string;
2518
+ /**
2519
+ * Candidate sources for the underlying `img`, as a standard `srcset` value (e.g. `"…/re_w_400/img.jpg 400w, …/re_w_800/img.jpg 800w"`). <br/> Lets the browser fetch and decode only the pixels the layout needs, which is what bounds memory on image-heavy pages — a large original decodes to `naturalWidth × naturalHeight × 4` bytes regardless of its display size. Pair with `sizes`; without it the browser assumes the image is `100vw` wide.
2520
+ */
2521
+ srcset?: string;
2522
+ /**
2523
+ * The `sizes` attribute for the underlying `img`, describing the rendered width (e.g. `"400px"`). Only meaningful together with `srcset`.
2524
+ */
2525
+ sizes?: string;
2506
2526
  /**
2507
2527
  * The path to the placeholder image to be shown if src is not available.
2508
2528
  */
@@ -8027,6 +8047,10 @@
8027
8047
  * Total number of items in the dataset, including those not yet loaded. When set, the scroll container height is extended to reflect the full dataset size so the scrollbar is accurate from the first render. Unloaded slots are approximated as 1×1 items.
8028
8048
  */
8029
8049
  totalItems?: number;
8050
+ /**
8051
+ * Delay in milliseconds between releasing one row of images and the next. <br/> Images are held back until their row is released, so the browser opens roughly one row's worth of requests at a time instead of one per rendered item. Each transform URL is an uncached backend render, and enough of them in parallel returns 503. <br/> A row also waits for the previous row's images to finish (capped by `ROW_RELEASE_TIMEOUT`), so this is the floor between releases rather than the exact cadence. Set to `0` to disable gating and let every rendered row load immediately.
8052
+ */
8053
+ rowReleaseDelay?: number;
8030
8054
  /**
8031
8055
  * The show content type.
8032
8056
  */