@orangelogic/design-system 3.49.0 → 3.51.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 (47) hide show
  1. package/library/chunks/{asset-link-format.BgLwVkjv.js → asset-link-format.DW4-Yf4S.js} +1 -1
  2. package/library/chunks/{bicolor-picker.D03k1yyx.js → bicolor-picker.DKcKLKki.js} +1 -1
  3. package/library/chunks/{block-width.CsW9WAor.js → block-width.BoB4DTSi.js} +16 -16
  4. package/library/chunks/{border-input-group.CEZXBhV6.js → border-input-group.Bo4n74DK.js} +1 -1
  5. package/library/chunks/{color-picker.BDko_QVl.js → color-picker.DJWwlNQc.js} +3 -3
  6. package/library/chunks/{color-swatch-group.D2X1lRH8.js → color-swatch-group.Dp778XL2.js} +2 -2
  7. package/library/chunks/{config-manager.CLN0bYHZ.js → config-manager.B17KFYlP.js} +13 -13
  8. package/library/chunks/{configs-controller.B1cUuAI_.js → configs-controller.CiNEXlyV.js} +4 -4
  9. package/library/chunks/{corner-position-input-group.dK3EENR2.js → corner-position-input-group.BAvx6UsV.js} +1 -1
  10. package/library/chunks/{dynamic-select.BHa_Q600.js → dynamic-select.o5G8iUV1.js} +1 -1
  11. package/library/chunks/{file-on-demand.BEq7qWZd.js → file-on-demand.D7bLG0JA.js} +3 -3
  12. package/library/chunks/{folder-select.BRJEfeyY.js → folder-select.DA7Ezy8P.js} +1 -1
  13. package/library/chunks/{header.qIpzHeNc.js → header.BaWpIXRz.js} +5 -5
  14. package/library/chunks/{pagination.CJV7WdJj.js → pagination.Cs-s_PTI.js} +1 -1
  15. package/library/chunks/{select.CM-1exjJ.js → select.DJ_bfkBn.js} +7 -2
  16. package/library/chunks/{shadow-input-group.CpjriMC3.js → shadow-input-group.DaDZTOGa.js} +1 -1
  17. package/library/chunks/{size-input-group.4NN5-92E.js → size-input-group.DvTF3TsD.js} +1 -1
  18. package/library/chunks/{src.CQL20PqB.js → src.CNvhakVg.js} +6 -6
  19. package/library/chunks/{tab-group.BVYwTGDS.js → tab-group._olfRqqQ.js} +676 -623
  20. package/library/chunks/{tab.BnFmdiPK.js → tab.CDVHHAgG.js} +14 -10
  21. package/library/components/asset-link-format.js +1 -1
  22. package/library/components/atoms.js +7 -7
  23. package/library/components/bicolor-picker.js +1 -1
  24. package/library/components/border-input-group.js +1 -1
  25. package/library/components/color-picker.js +1 -1
  26. package/library/components/color-swatch-group.js +1 -1
  27. package/library/components/corner-position-input-group.js +1 -1
  28. package/library/components/dynamic-select.js +1 -1
  29. package/library/components/file-on-demand.js +1 -1
  30. package/library/components/folder-select.js +1 -1
  31. package/library/components/header.js +1 -1
  32. package/library/components/molecules.js +7 -7
  33. package/library/components/organisms.js +3 -3
  34. package/library/components/pagination.js +1 -1
  35. package/library/components/select.js +1 -1
  36. package/library/components/shadow-input-group.js +1 -1
  37. package/library/components/size-input-group.js +1 -1
  38. package/library/components/tab-group.js +1 -1
  39. package/library/components/tab.js +1 -1
  40. package/library/components/types.js +786 -765
  41. package/library/package.json +1 -1
  42. package/library/packages/atoms/src/components/select/select.d.ts +5 -0
  43. package/library/packages/atoms/src/components/tab-group/tab-group.d.ts +97 -2
  44. package/library/packages/hybrid/rich-text/src/rich-text.d.ts +9 -0
  45. package/library/packages/molecules/src/data-tab-group/data-tab-group.d.ts +2 -0
  46. package/library/react-web-component.d.ts +16 -0
  47. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "3.49.0",
4
+ "version": "3.51.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -99,6 +99,11 @@ export default class CxSelect extends CortexElement implements CortexFormControl
99
99
  * The original unmatched value is preserved for form submission.
100
100
  */
101
101
  fallbackOptionValue: string;
102
+ /**
103
+ * Lets an empty value select the option whose value is an empty string, such as a "None" option.
104
+ * Off by default because an option without a declared value also has an empty value.
105
+ */
106
+ matchEmptyValue: boolean;
102
107
  /**
103
108
  * The default value of the form control. Primarily used for resetting the form control.
104
109
  */
@@ -8,20 +8,30 @@ import { default as CxIconButton } from '../icon-button/icon-button';
8
8
  import { default as CxMenu } from '../menu/menu';
9
9
  import { default as CxMenuItem } from '../menu-item/menu-item';
10
10
  import { default as CxTab } from '../tab/tab';
11
+ import { default as CxTabPanel } from '../tab-panel/tab-panel';
11
12
  /**
12
13
  * @summary Tab groups organize content into a container that shows one section at a time.
13
14
  *
14
15
  * @description Tab groups make use of [tabs](?s=atoms&id=/tab) and [tab panels](?s=atoms&id=/tab-panel).
15
16
  * Each tab must be slotted into the `nav` slot and its `panel` must refer to a tab panel of the same name.
16
17
  *
18
+ * When tabs overflow the available width, `overflow-variant` controls how the rest are reached: `scroll`
19
+ * (default) adds scroll buttons, `dropdown` collapses the overflow into a trigger and menu, and `pagination`
20
+ * splits the tabs into fixed-size pages. With `overflow-variant="dropdown"`, `promote-active-overflow-tab`
21
+ * keeps a selected hidden tab visible next to the trigger by swapping it with the tab it displaces, without
22
+ * reordering either tab in the light DOM. The dropdown trigger sits outside the tablist as its own tab stop and
23
+ * follows the menu button pattern; arrow keys, Home and End in the tablist only move between the visible tabs.
24
+ *
17
25
  * @slot (default) - Used for grouping tab panels in the tab group. Must be `<cx-tab-panel>` elements.
18
26
  * @slot nav - Used for grouping tabs in the tab group. Must be `<cx-tab>` elements.
19
27
  *
20
- * @event {{ name: String }} cx-tab-show - Emitted when a tab is shown.
28
+ * @event {{ name: String }} cx-tab-show - Emitted when a tab is shown. With `force-on-change`, also emitted when
29
+ * the user selects the active tab again.
21
30
  * @event {{ name: String }} cx-tab-hide - Emitted when a tab is hidden.
22
31
  *
23
32
  * @csspart base - The component's base wrapper.
24
33
  * @csspart nav - The tab group's navigation container where tabs are slotted in.
34
+ * @csspart tab-group - The row holding the active-tab indicator, the tabs, and the overflow dropdown trigger.
25
35
  * @csspart tabs - The container that wraps the tabs.
26
36
  * @csspart active-tab-indicator - The line that highlights the currently selected tab.
27
37
  * @csspart body - The tab group's body where tab panels are slotted in.
@@ -29,12 +39,18 @@ import { default as CxTab } from '../tab/tab';
29
39
  * @csspart scroll-button--start - The starting scroll button.
30
40
  * @csspart scroll-button--end - The ending scroll button.
31
41
  * @csspart scroll-button__base - The scroll button's exported `base` part.
42
+ * @csspart dot - A pagination dot, shown when `overflow-variant="pagination"` overflows more than one page.
43
+ * @csspart dot--active - The pagination dot for the currently active page.
32
44
  *
33
45
  * @cssproperty --indicator-color - The color of the active tab indicator.
46
+ * @cssproperty [--indicator-width=2px] - The thickness of the active tab indicator.
34
47
  * @cssproperty --track-color - The color of the indicator's track (the line that separates tabs from panels).
35
48
  * @cssproperty --track-width - The width of the indicator's track (the line that separates tabs from panels).
36
49
  * @cssproperty [--tab-dropdown-trigger-max-width=150px] - The maximum width of the dropdown button.
50
+ * @cssproperty [--tab-dropdown-menu-max-width=300px] - The maximum width of each item in the dropdown menu, which the
51
+ * menu shrinks to. Longer tab labels are truncated with an ellipsis.
37
52
  * @cssproperty [--tab-group-nav-padding=0] - The padding around the tab group's navigation container.
53
+ * @cssproperty [--tab-group-tabs-gap=normal] - The horizontal gap between tabs.
38
54
  * @cssproperty [--tab-group-tabs-padding=var(--cx-spacing-2x-small)] - The padding around the tabs in the button variant.
39
55
  * @cssproperty [--tab-group-top-gap=var(--cx-spacing-small)] - The gap between the nav and body when placement is top.
40
56
  */
@@ -48,6 +64,7 @@ export default class CxTabGroup extends CortexElement {
48
64
  'cx-menu-item': typeof CxMenuItem;
49
65
  'cx-resize-observer': typeof CxResizeObserver;
50
66
  'cx-tab': typeof CxTab;
67
+ 'cx-tab-panel': typeof CxTabPanel;
51
68
  };
52
69
  private readonly localize;
53
70
  private mutationObserver;
@@ -62,6 +79,15 @@ export default class CxTabGroup extends CortexElement {
62
79
  * dropdownOffset and the tabs' hidden marker with outdated results.
63
80
  */
64
81
  private overflowObserver?;
82
+ /**
83
+ * Waits for the group to become visible to apply the initial active tab. Tracked so disconnectedCallback() can
84
+ * release it when the group is removed before it was ever shown.
85
+ */
86
+ private initialTabObserver?;
87
+ /** Tab kept visible next to the dropdown trigger by promote-active-overflow-tab. */
88
+ private promotedTab?;
89
+ /** Tab to refocus once its promotion's fit-loop pass clears the hidden attribute (see restorePromotedTabFocus). */
90
+ private promotedTabPendingFocus?;
65
91
  private tabs;
66
92
  private focusableTabs;
67
93
  private panels;
@@ -118,6 +144,13 @@ export default class CxTabGroup extends CortexElement {
118
144
  tabsPerPage: number;
119
145
  /** The minimum width of the tab. */
120
146
  minTabWidth: number;
147
+ /** When overflow-variant is "dropdown", keeps a selected hidden tab visible next to the trigger. */
148
+ promoteActiveOverflowTab: boolean;
149
+ /**
150
+ * When set to true, the `cx-tab-show` event will be emitted when the user selects the active tab again,
151
+ * even if the active tab is not changed.
152
+ */
153
+ forceOnChange: boolean;
121
154
  /** Minimum clamp width - The minimum width of the tab not to be clamped */
122
155
  private static readonly MIN_CLAMP_WIDTH;
123
156
  private static readonly HIDDEN_TAB_ATTRIBUTE;
@@ -140,10 +173,22 @@ export default class CxTabGroup extends CortexElement {
140
173
  private getAllTabs;
141
174
  private getAllPanels;
142
175
  private getActiveTab;
176
+ /**
177
+ * The column gap between tabs (--tab-group-tabs-gap) in pixels; `normal` reads as 0.
178
+ */
179
+ private getTabGap;
143
180
  /**
144
181
  * If dropdown overflow but placement is start and end, count as scroll overflow
145
182
  */
146
183
  private get allowDropdownOverflow();
184
+ /**
185
+ * The promoted tab, but only while promotion is actually in effect. promotedTab is left untouched when
186
+ * placement or overflow-variant stops allowing a dropdown, so the selection resumes if they flip back;
187
+ * this getter is what the fit loop reads so a stale reservation can never keep the feature switched on.
188
+ */
189
+ private get activePromotedTab();
190
+ /** Whether promote-active-overflow-tab currently applies (it needs the dropdown overflow to be in effect). */
191
+ private get isPromotionEnabled();
147
192
  /**
148
193
  * Get the height of the body
149
194
  */
@@ -154,12 +199,54 @@ export default class CxTabGroup extends CortexElement {
154
199
  private get caretDirection();
155
200
  private handleClick;
156
201
  private handleKeyDown;
202
+ /**
203
+ * The tab that an arrow key, Home or End moves focus to: the first, last, previous or next enabled tab that is in
204
+ * the tablist, wrapping at both ends. Tabs hidden in the dropdown are menu items, not tabs, so they are skipped.
205
+ */
206
+ private getKeyboardTargetTab;
157
207
  private handleScrollToStart;
158
208
  private handleScrollToEnd;
159
- private handleDropdownAfterShow;
209
+ /**
210
+ * Promotes a tab that is already active when the group first renders (e.g. server-rendered after a round trip),
211
+ * so the first overflow pass never hides it. A display:none tab can't hold focus, so a host focusing it right
212
+ * after mount would otherwise lose focus. This can't wait for the first-load callback in connectedCallback():
213
+ * that callback runs a frame later, after the first overflow pass has already hidden the tab.
214
+ * Sets promotedTab only; the caller's syncTabsAndPanels() applies it.
215
+ */
216
+ private promoteInitialActiveTab;
217
+ /**
218
+ * The tab to select on first load: the first enabled `active` tab, else the first enabled tab. When a tab is
219
+ * explicitly active it matches what promoteInitialActiveTab() promoted.
220
+ * Skipping disabled tabs matters because setActiveTab() refuses them, which would leave nothing selected.
221
+ */
222
+ private findInitialTab;
223
+ /** Marks tab as promoted (see promotedTab) without moving it in the DOM. */
224
+ private promoteHiddenActiveTab;
225
+ /** Queues tab to be refocused in syncTabAndPanels() once promoteHiddenActiveTab()'s fit-loop pass makes it visible again. */
226
+ private restorePromotedTabFocus;
227
+ /**
228
+ * Single entry point for user and API activation, so every path keeps the promoted active tab visible.
229
+ * promoteHiddenActiveTab() only schedules the overflow pass, which runs later in an IntersectionObserver callback,
230
+ * so setActiveTab() still sees the tab hidden. restorePromotedTabFocus() must come first: promoteHiddenActiveTab()
231
+ * drops the refocus it queues when no pass is needed.
232
+ * Pass restoreFocus only when focus is on the tab itself (click, Enter/Space), not when it moves elsewhere.
233
+ * Pass isUserSelection only for an explicit pick (click, Enter/Space): with force-on-change it re-emits
234
+ * cx-tab-show for the active tab, which programmatic and arrow-key paths must not do.
235
+ */
236
+ private activateTab;
237
+ /**
238
+ * Roving tabindex: the active tab is the tablist's only tab stop. While the active tab is hidden in the dropdown,
239
+ * the first visible enabled tab takes its place so Tab can still reach the tablist.
240
+ */
241
+ private syncTabStop;
160
242
  private setActiveTab;
161
243
  private setAriaLabels;
162
244
  private repositionIndicator;
245
+ /**
246
+ * Returns this.tabs with promotedTab (if any) moved right after the first two entries, for the
247
+ * fit loop to walk — this.tabs itself is never reordered.
248
+ */
249
+ private buildPriorityOrder;
163
250
  /**
164
251
  * This stores tabs and panels so we can refer to a cache instead of calling querySelectorAll() multiple times.
165
252
  */
@@ -174,6 +261,7 @@ export default class CxTabGroup extends CortexElement {
174
261
  * overflow variant is dropdown and the direction is rtl
175
262
  */
176
263
  private syncScrollPosition;
264
+ /** Finds the next non-disabled, non-hidden tab. Forward returns null on overflow instead of guessing a hidden tab — promotion breaks the contiguous-hidden-suffix assumption. */
177
265
  private findNextFocusableTab;
178
266
  /**
179
267
  * The reality of the browser means that we can't expect the scroll position to be exactly what we want it to be, so
@@ -189,6 +277,7 @@ export default class CxTabGroup extends CortexElement {
189
277
  handleVariantChange(): Promise<void>;
190
278
  handleOverflowVariantChange(): void;
191
279
  handleDropdownLabelChange(): void;
280
+ handlePromoteActiveOverflowTabChange(): void;
192
281
  handleAbsoluteHeightChange(): void;
193
282
  handleTabAlignmentChange(): void;
194
283
  handleTabsPerPageChange(): Promise<void>;
@@ -210,6 +299,12 @@ export default class CxTabGroup extends CortexElement {
210
299
  private handlePaginationDotClick;
211
300
  private handlePaginationDotKeyDown;
212
301
  private renderPaginationDot;
302
+ /**
303
+ * The overflow trigger and its menu follow the menu button pattern and sit outside the tablist, which may only own
304
+ * tabs. cx-dropdown and cx-menu provide the keyboard behavior (arrow keys wrap, Home/End, Escape returns focus to
305
+ * the trigger).
306
+ */
307
+ private renderDropdown;
213
308
  render(): import('lit-html').TemplateResult<1>;
214
309
  }
215
310
  declare global {
@@ -19,6 +19,13 @@ import { RichTextMenuBarSpec, RichTextStyleFormat, RichTextToolbarSpec } from '.
19
19
  * @cssproperty --width - The width of the rich text editor
20
20
  * @cssproperty --rich-text-background-color - The background color of the rich text editor
21
21
  * @cssproperty --rich-text-font-family - The font family applied to the editor content area. Inherits from the page font when not set.
22
+ * @cssproperty --rich-text-border - The border around the rich text editor
23
+ * @cssproperty --rich-text-border-radius - The border radius of the rich text editor
24
+ * @cssproperty --rich-text-toolbar-background-color - The background color of the toolbar
25
+ * @cssproperty --rich-text-toolbar-border-color - The color of the line between the toolbar and the content
26
+ * @cssproperty --rich-text-table-resize-handle-color - The color of the table column and row resize handles
27
+ * @cssproperty --rich-text-inline-code-color - The text color of inline code
28
+ * @cssproperty --rich-text-inline-code-background-color - The background color of inline code
22
29
  *
23
30
  * @description When `editable` is true, a `cx-rich-text-toolbar` is rendered above the editor using the same `Editor`
24
31
  * instance for formatting commands. Set **`show-toolbar`** to false to hide only the formatting **icon row** (menu bar is unchanged).
@@ -99,6 +106,8 @@ export default class CxRichText extends CortexElement {
99
106
  * skipped when `getHTML()` is unchanged.
100
107
  */
101
108
  private lastContent;
109
+ /** False until this component's onCreate ran; updates before it are the editor normalising its own content. */
110
+ private editorCreated;
102
111
  content: string;
103
112
  editable: boolean;
104
113
  /**
@@ -55,6 +55,8 @@ export default class CxDataTabGroup extends CortexElement {
55
55
  */
56
56
  tabBorderSides: string;
57
57
  multiLanguage: boolean;
58
+ /** Forwarded to cx-tab-group. */
59
+ promoteActiveOverflowTab: boolean;
58
60
  render(): import('lit-html').TemplateResult<1>;
59
61
  }
60
62
  declare global {
@@ -1986,6 +1986,10 @@
1986
1986
  * The fallback option value used when the select value does not match any explicitly declared option. The original unmatched value is preserved for form submission.
1987
1987
  */
1988
1988
  fallbackOptionValue?: string;
1989
+ /**
1990
+ * Lets an empty value select the option whose value is an empty string, such as a "None" option. Off by default because an option without a declared value also has an empty value.
1991
+ */
1992
+ matchEmptyValue?: boolean;
1989
1993
  /**
1990
1994
  * The default value of the form control. Primarily used for resetting the form control.
1991
1995
  */
@@ -2264,6 +2268,14 @@
2264
2268
  * The minimum width of the tab.
2265
2269
  */
2266
2270
  minTabWidth?: number;
2271
+ /**
2272
+ * When overflow-variant is "dropdown", keeps a selected hidden tab visible next to the trigger.
2273
+ */
2274
+ promoteActiveOverflowTab?: boolean;
2275
+ /**
2276
+ * When set to true, the `cx-tab-show` event will be emitted when the user selects the active tab again, even if the active tab is not changed.
2277
+ */
2278
+ forceOnChange?: boolean;
2267
2279
  /**
2268
2280
  * Make localization attributes reactive eslint-disable-next-line lit/no-native-attributes
2269
2281
  */
@@ -5886,6 +5898,10 @@
5886
5898
  *
5887
5899
  */
5888
5900
  multiLanguage?: boolean;
5901
+ /**
5902
+ * Forwarded to cx-tab-group.
5903
+ */
5904
+ promoteActiveOverflowTab?: boolean;
5889
5905
  /**
5890
5906
  * Make localization attributes reactive eslint-disable-next-line lit/no-native-attributes
5891
5907
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "3.49.0",
4
+ "version": "3.51.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {