@progressive-development/pd-content 1.0.3 → 1.1.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 (41) hide show
  1. package/dist/index.d.ts +2 -4
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +0 -4
  4. package/dist/pd-loading-state/PdLoadingState.d.ts +4 -1
  5. package/dist/pd-loading-state/PdLoadingState.d.ts.map +1 -1
  6. package/dist/pd-loading-state/pd-loading-state.d.ts +1 -1
  7. package/dist/pd-loading-state/pd-loading-state.d.ts.map +1 -1
  8. package/dist/pd-loading-state/pd-logo-loader.js +2 -2
  9. package/dist/pd-more-info/PdMoreInfo.d.ts +4 -0
  10. package/dist/pd-more-info/PdMoreInfo.d.ts.map +1 -1
  11. package/dist/pd-more-info/PdMoreInfo.js +14 -7
  12. package/dist/pd-notice-box/PdNoticeBox.d.ts +8 -1
  13. package/dist/pd-notice-box/PdNoticeBox.d.ts.map +1 -1
  14. package/dist/pd-notice-box/PdNoticeBox.js +40 -1
  15. package/dist/pd-panel-viewer/PdPanelViewer.d.ts +2 -0
  16. package/dist/pd-panel-viewer/PdPanelViewer.d.ts.map +1 -1
  17. package/dist/pd-panel-viewer/PdPanelViewer.js +17 -0
  18. package/dist/pd-tab/PdTab.d.ts +8 -5
  19. package/dist/pd-tab/PdTab.d.ts.map +1 -1
  20. package/dist/pd-tab/PdTab.js +110 -56
  21. package/dist/types.d.ts +1 -2
  22. package/dist/types.d.ts.map +1 -1
  23. package/package.json +6 -8
  24. package/dist/pd-gallery/PdGallery.d.ts +0 -72
  25. package/dist/pd-gallery/PdGallery.d.ts.map +0 -1
  26. package/dist/pd-gallery/PdGallery.js +0 -660
  27. package/dist/pd-gallery/PdGalleryLightbox.d.ts +0 -53
  28. package/dist/pd-gallery/PdGalleryLightbox.d.ts.map +0 -1
  29. package/dist/pd-gallery/PdGalleryLightbox.js +0 -530
  30. package/dist/pd-gallery/index.d.ts +0 -4
  31. package/dist/pd-gallery/index.d.ts.map +0 -1
  32. package/dist/pd-gallery/pd-gallery-lightbox.d.ts +0 -3
  33. package/dist/pd-gallery/pd-gallery-lightbox.d.ts.map +0 -1
  34. package/dist/pd-gallery/pd-gallery.d.ts +0 -3
  35. package/dist/pd-gallery/pd-gallery.d.ts.map +0 -1
  36. package/dist/pd-gallery/types.d.ts +0 -23
  37. package/dist/pd-gallery/types.d.ts.map +0 -1
  38. package/dist/pd-gallery-lightbox.d.ts +0 -2
  39. package/dist/pd-gallery-lightbox.js +0 -8
  40. package/dist/pd-gallery.d.ts +0 -2
  41. package/dist/pd-gallery.js +0 -8
package/dist/index.d.ts CHANGED
@@ -14,11 +14,9 @@ export { PdNoticeBox } from './pd-notice-box/pd-notice-box.js';
14
14
  export { PdCodeSnippet } from './pd-code-snippet/pd-code-snippet.js';
15
15
  export { PdBadgeOrder } from './pd-badge-order/pd-badge-order.js';
16
16
  export { PdBadgeItem } from './pd-badge-order/pd-badge-item.js';
17
- export { PdGallery } from './pd-gallery/pd-gallery.js';
18
- export { PdGalleryLightbox } from './pd-gallery/pd-gallery-lightbox.js';
19
- export type { LoadingState, LoadingSubTask, } from './pd-loading-state/pd-loading-state.js';
17
+ export type { LoaderStyle, LoadingState, LoadingSubTask, } from './pd-loading-state/pd-loading-state.js';
20
18
  export type { CodeLanguage } from './pd-code-snippet/pd-code-snippet.js';
21
- export type { PdCollapseToggleEventDetail, PdEditLink, PdCollapseElement, NoticeType, NoticeVariant, TabHeader, PdBadge, PdBadgeChangeDetail, PdBadgeReorderDetail, GalleryImage, GalleryMode, GalleryOpenDetail, GalleryCloseDetail, GalleryNavigateDetail, } from './types.js';
19
+ export type { PdCollapseToggleEventDetail, PdEditLink, PdCollapseElement, NoticeType, NoticeVariant, TabHeader, PdBadge, PdBadgeChangeDetail, PdBadgeReorderDetail, } from './types.js';
22
20
  export { templates as beTemplates } from './generated/locales/be.js';
23
21
  export { templates as deTemplates } from './generated/locales/de.js';
24
22
  export { templates as enT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,cAAc,GACf,MAAM,wCAAwC,CAAC;AAEhD,YAAY,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEzE,YAAY,EACV,2BAA2B,EAC3B,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,SAAS,EACT,OAAO,EACP,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,2BAA2B,CAAC"}
package/dist/index.js CHANGED
@@ -14,8 +14,6 @@ import './pd-notice-box/pd-notice-box.js';
14
14
  import './pd-code-snippet/pd-code-snippet.js';
15
15
  import './pd-badge-order.js';
16
16
  import './pd-badge-order/pd-badge-item.js';
17
- import './pd-gallery.js';
18
- import './pd-gallery-lightbox.js';
19
17
  export { templates as beTemplates } from './locales/be.js';
20
18
  export { templates as deTemplates } from './locales/de.js';
21
19
  export { templates as enTemplates } from './locales/en.js';
@@ -26,8 +24,6 @@ export { PdCodeSnippet } from './pd-code-snippet/PdCodeSnippet.js';
26
24
  export { PdCollapse } from './pd-collapse/PdCollapse.js';
27
25
  export { PdCollapseGroup } from './pd-collapse-group/PdCollapseGroup.js';
28
26
  export { PdEditContent } from './pd-edit-content/PdEditContent.js';
29
- export { PdGallery } from './pd-gallery/PdGallery.js';
30
- export { PdGalleryLightbox } from './pd-gallery/PdGalleryLightbox.js';
31
27
  export { PdLoadingState } from './pd-loading-state/PdLoadingState.js';
32
28
  export { PdMoreInfo } from './pd-more-info/PdMoreInfo.js';
33
29
  export { PdNoticeBox } from './pd-notice-box/PdNoticeBox.js';
@@ -13,6 +13,7 @@ export interface LoadingSubTask {
13
13
  /**
14
14
  * Loading state configuration object.
15
15
  */
16
+ export type LoaderStyle = "spinner" | "dots" | "pulse" | "logo";
16
17
  export interface LoadingState {
17
18
  /** Timestamp when loading started */
18
19
  creation?: Date;
@@ -28,6 +29,8 @@ export interface LoadingState {
28
29
  loadingTxt?: string;
29
30
  /** Optional sub-tasks to display progress */
30
31
  subTask?: LoadingSubTask[];
32
+ /** Override loader style for this specific action */
33
+ loaderStyle?: LoaderStyle;
31
34
  }
32
35
  /**
33
36
  * Loading state indicator component with modal and background modes.
@@ -59,7 +62,7 @@ export declare class PdLoadingState extends LitElement {
59
62
  * - `pulse`: expanding ring
60
63
  * - `logo`: animated PD logo symbol (stroke draw loop)
61
64
  */
62
- loaderStyle: "spinner" | "dots" | "pulse" | "logo";
65
+ loaderStyle: LoaderStyle;
63
66
  /**
64
67
  * When true, the content box stays in normal document flow instead of
65
68
  * using `position: fixed`. Useful for embedding multiple loaders on one page
@@ -1 +1 @@
1
- {"version":3,"file":"PdLoadingState.d.ts","sourceRoot":"","sources":["../../src/pd-loading-state/PdLoadingState.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAa,cAAc,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAKrE,OAAO,0CAA0C,CAAC;AAClD,OAAO,8BAA8B,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,SAAS,EAAE,OAAO,CAAC;IACnB,oCAAoC;IACpC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,qCAAqC;IACrC,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,gCAAgC;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,+DAA+D;IAC/D,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,6BAA6B;IAC7B,UAAU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AuC;IACvC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,+DAA+D;IAC/D,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,6BAA6B;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,qDAAqD;IACrD,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,qBACa,cAAe,SAAQ,UAAU;IAC5C;;;OAGG;IAEH,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B;;;;;;OAMG;IAEH,WAAW,EAAE,WAAW,CAAa;IAErC;;;;OAIG;IAEH,MAAM,UAAS;IAEf,OAAgB,MAAM,EAAE,cAAc,CA0MpC;IAEO,MAAM;IAsBf,OAAO,CAAC,aAAa;IAsCrB,OAAO,CAAC,eAAe;IA6BvB,OAAO,CAAC,cAAc;CA+CvB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,cAAc,CAAC;KACpC;CACF"}
@@ -2,5 +2,5 @@
2
2
  * @license
3
3
  * Copyright (c) 2021 PD Progressive Development UG. All rights reserved.
4
4
  */
5
- export { PdLoadingState, type LoadingState, type LoadingSubTask, } from './PdLoadingState.js';
5
+ export { PdLoadingState, type LoaderStyle, type LoadingState, type LoadingSubTask, } from './PdLoadingState.js';
6
6
  //# sourceMappingURL=pd-loading-state.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pd-loading-state.d.ts","sourceRoot":"","sources":["../../src/pd-loading-state/pd-loading-state.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EACL,cAAc,EACd,KAAK,YAAY,EACjB,KAAK,cAAc,GACpB,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"pd-loading-state.d.ts","sourceRoot":"","sources":["../../src/pd-loading-state/pd-loading-state.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EACL,cAAc,EACd,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,cAAc,GACpB,MAAM,qBAAqB,CAAC"}
@@ -26,7 +26,7 @@ class PdLogoLoader extends LitElement {
26
26
  stroke-miterlimit: 10;
27
27
  fill: none;
28
28
  stroke-dasharray: var(--_path-len);
29
- stroke-dashoffset: var(--_path-len);
29
+ stroke-dashoffset: 0;
30
30
  animation: logo-draw var(--pd-logo-loader-duration, 2.5s) ease-in-out
31
31
  infinite alternate;
32
32
  }
@@ -37,7 +37,7 @@ class PdLogoLoader extends LitElement {
37
37
 
38
38
  @keyframes logo-draw {
39
39
  to {
40
- stroke-dashoffset: 0;
40
+ stroke-dashoffset: var(--_path-len);
41
41
  }
42
42
  }
43
43
  `;
@@ -18,6 +18,10 @@ import { LitElement, CSSResultGroup } from 'lit';
18
18
  * @cssprop --pd-default-font-link-col-hover - Hoverfarbe für Link
19
19
  */
20
20
  export declare class PdMoreInfo extends LitElement {
21
+ /**
22
+ * When set, disables the automatic scroll-into-view when collapsing.
23
+ */
24
+ noAutoScroll: boolean;
21
25
  /** @ignore */
22
26
  private _lessInfo;
23
27
  static styles: CSSResultGroup;
@@ -1 +1 @@
1
- {"version":3,"file":"PdMoreInfo.d.ts","sourceRoot":"","sources":["../../src/pd-more-info/PdMoreInfo.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAa,cAAc,EAAE,MAAM,KAAK,CAAC;AAI5D;;;;;;;;;;;;;;;;;GAiBG;AACH,qBACa,UAAW,SAAQ,UAAU;IACxC,cAAc;IAEd,OAAO,CAAC,SAAS,CAAQ;IAEzB,OAAgB,MAAM,EAAE,cAAc,CAkCpC;IAEO,MAAM;IA8Bf,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,aAAa;CAWtB"}
1
+ {"version":3,"file":"PdMoreInfo.d.ts","sourceRoot":"","sources":["../../src/pd-more-info/PdMoreInfo.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAa,cAAc,EAAE,MAAM,KAAK,CAAC;AAI5D;;;;;;;;;;;;;;;;;GAiBG;AACH,qBACa,UAAW,SAAQ,UAAU;IACxC;;OAEG;IAEH,YAAY,UAAS;IAErB,cAAc;IAEd,OAAO,CAAC,SAAS,CAAQ;IAEzB,OAAgB,MAAM,EAAE,cAAc,CAmCpC;IAEO,MAAM;IA8Bf,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,aAAa;CAatB"}
@@ -1,5 +1,5 @@
1
1
  import { css, LitElement, html } from 'lit';
2
- import { state } from 'lit/decorators.js';
2
+ import { property, state } from 'lit/decorators.js';
3
3
  import { localized, msg } from '@lit/localize';
4
4
 
5
5
  var __defProp = Object.defineProperty;
@@ -15,6 +15,7 @@ var __decorateClass = (decorators, target, key, kind) => {
15
15
  let PdMoreInfo = class extends LitElement {
16
16
  constructor() {
17
17
  super(...arguments);
18
+ this.noAutoScroll = false;
18
19
  this._lessInfo = true;
19
20
  }
20
21
  render() {
@@ -55,12 +56,14 @@ let PdMoreInfo = class extends LitElement {
55
56
  }
56
57
  _showLessInfo() {
57
58
  this._lessInfo = true;
58
- const rect = this.getBoundingClientRect();
59
- window.scrollBy({
60
- top: rect.top - 150,
61
- left: 0,
62
- behavior: "smooth"
63
- });
59
+ if (!this.noAutoScroll) {
60
+ const rect = this.getBoundingClientRect();
61
+ window.scrollBy({
62
+ top: rect.top - 150,
63
+ left: 0,
64
+ behavior: "smooth"
65
+ });
66
+ }
64
67
  }
65
68
  };
66
69
  PdMoreInfo.styles = [
@@ -74,6 +77,7 @@ PdMoreInfo.styles = [
74
77
  font-family: var(--pd-default-font-content-family);
75
78
  font-size: var(--pd-default-font-content-size);
76
79
  line-height: var(--pd-default-font-content-line-height, 1.4em);
80
+ margin: 0;
77
81
  }
78
82
 
79
83
  a {
@@ -98,6 +102,9 @@ PdMoreInfo.styles = [
98
102
  }
99
103
  `
100
104
  ];
105
+ __decorateClass([
106
+ property({ type: Boolean, reflect: true })
107
+ ], PdMoreInfo.prototype, "noAutoScroll", 2);
101
108
  __decorateClass([
102
109
  state()
103
110
  ], PdMoreInfo.prototype, "_lessInfo", 2);
@@ -3,9 +3,10 @@ import { NoticeType, NoticeVariant } from '../types.js';
3
3
  /**
4
4
  * Notice box component for displaying contextual messages.
5
5
  *
6
- * Supports two visual variants:
6
+ * Supports three visual variants:
7
7
  * - **box**: Full-width box with icon, colored background (like Confluence info boxes)
8
8
  * - **sidebar**: Minimal variant with colored left border only
9
+ * - **compact**: Inline-optimized variant with small icon, subtle tint, and reduced spacing — designed for embedding in other components
9
10
  *
10
11
  * @tagname pd-notice-box
11
12
  * @summary Contextual notice box for info, note, success, warning, and error messages.
@@ -47,6 +48,11 @@ import { NoticeType, NoticeVariant } from '../types.js';
47
48
  * This is a warning message.
48
49
  * </pd-notice-box>
49
50
  *
51
+ * <!-- Compact variant (inline, small) -->
52
+ * <pd-notice-box type="note" variant="compact" icon="aiSparkleIcon">
53
+ * AI-generated suggestion text.
54
+ * </pd-notice-box>
55
+ *
50
56
  * <!-- Custom icon -->
51
57
  * <pd-notice-box type="success" icon="starIcon" title="Success">
52
58
  * Operation completed!
@@ -67,6 +73,7 @@ export declare class PdNoticeBox extends LitElement {
67
73
  * Visual variant of the notice box.
68
74
  * - `box`: Full box with icon and background color
69
75
  * - `sidebar`: Minimal with colored left border
76
+ * - `compact`: Inline-optimized with small icon, subtle tint, reduced spacing
70
77
  */
71
78
  variant: NoticeVariant;
72
79
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"PdNoticeBox.d.ts","sourceRoot":"","sources":["../../src/pd-notice-box/PdNoticeBox.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAO,cAAc,EAAQ,UAAU,EAAW,MAAM,KAAK,CAAC;AAIrE,OAAO,0CAA0C,CAAC;AAElD,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAa7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,qBAAa,WAAY,SAAQ,UAAU;IACzC;;OAEG;IAEH,IAAI,EAAE,UAAU,CAAU;IAE1B;;;;OAIG;IAEH,OAAO,EAAE,aAAa,CAAS;IAE/B;;OAEG;IAEH,KAAK,SAAM;IAEX;;;OAGG;IAEH,IAAI,SAAM;IAEV;;OAEG;IAEH,QAAQ,UAAS;IAEjB,OAAgB,MAAM,EAAE,cAAc,CA0JpC;IAEO,MAAM;CAsBhB"}
1
+ {"version":3,"file":"PdNoticeBox.d.ts","sourceRoot":"","sources":["../../src/pd-notice-box/PdNoticeBox.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAO,cAAc,EAAQ,UAAU,EAAW,MAAM,KAAK,CAAC;AAIrE,OAAO,0CAA0C,CAAC;AAElD,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAa7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,qBAAa,WAAY,SAAQ,UAAU;IACzC;;OAEG;IAEH,IAAI,EAAE,UAAU,CAAU;IAE1B;;;;;OAKG;IAEH,OAAO,EAAE,aAAa,CAAS;IAE/B;;OAEG;IAEH,KAAK,SAAM;IAEX;;;OAGG;IAEH,IAAI,SAAM;IAEV;;OAEG;IAEH,QAAQ,UAAS;IAEjB,OAAgB,MAAM,EAAE,cAAc,CAiMpC;IAEO,MAAM;CAuBhB"}
@@ -182,11 +182,50 @@ class PdNoticeBox extends LitElement {
182
182
  .body ::slotted(*:not(:last-child)) {
183
183
  margin-bottom: 0.5em;
184
184
  }
185
+
186
+ /* Compact variant – propagate sizing via CSS vars for slotted components (e.g. pd-more-info) */
187
+ :host([variant="compact"]) {
188
+ --pd-default-font-content-size: 0.8rem;
189
+ --pd-default-font-content-line-height: 1.3;
190
+ --pd-default-font-link-size: 0.75rem;
191
+ }
192
+
193
+ :host([variant="compact"]) .notice-box {
194
+ background-color: color-mix(in srgb, var(--_type-col) 4%, transparent);
195
+ border: none;
196
+ border-left: 3px solid var(--_type-col);
197
+ border-radius: 0;
198
+ padding: 6px 8px;
199
+ gap: 6px;
200
+ font-size: 0.8rem;
201
+ line-height: 1.3;
202
+ align-items: center;
203
+ }
204
+
205
+ :host([variant="compact"]) .icon-wrapper {
206
+ width: 22px;
207
+ height: 22px;
208
+ }
209
+
210
+ :host([variant="compact"]) .icon-wrapper pd-icon {
211
+ width: 22px;
212
+ height: 22px;
213
+ }
214
+
215
+ :host([variant="compact"]) .title {
216
+ display: inline;
217
+ font-size: 0.8rem;
218
+ margin: 0 4px 0 0;
219
+ }
220
+
221
+ :host([variant="compact"]) .body {
222
+ line-height: 1.3;
223
+ }
185
224
  `
186
225
  ];
187
226
  }
188
227
  render() {
189
- const showIcon = this.variant === "box" && !this.hideIcon;
228
+ const showIcon = (this.variant === "box" || this.variant === "compact") && !this.hideIcon;
190
229
  const iconName = this.icon || DEFAULT_ICONS[this.type];
191
230
  return html`
192
231
  <div class="notice-box" role="note" aria-label="${this.type} notice">
@@ -23,6 +23,8 @@ import { LitElement } from 'lit';
23
23
  */
24
24
  export declare class PdPanelViewer extends LitElement {
25
25
  withProgress: boolean;
26
+ /** When true, navigation arrows overlay the content instead of sitting beside it. */
27
+ overlayNav: boolean;
26
28
  deltaCalc: number;
27
29
  /** @ignore */
28
30
  _index: number;
@@ -1 +1 @@
1
- {"version":3,"file":"PdPanelViewer.d.ts","sourceRoot":"","sources":["../../src/pd-panel-viewer/PdPanelViewer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAa,UAAU,EAAW,MAAM,KAAK,CAAC;AAKrD,OAAO,0CAA0C,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,aAAc,SAAQ,U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YAAY,UAAS;IAErB,qFAAqF;IAErF,UAAU,UAAQ;IAGlB,SAAS,SAAK;IAEd,cAAc;IAEd,MAAM,SAAK;IAEX,cAAc;IAEd,QAAQ,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAM;IAEtD,cAAc;IAEd,OAAO,KAAM;IAEb,cAAc;IACd,OAAO,CAAC,eAAe,CAA+B;IACtD,cAAc;IACd,OAAO,CAAC,cAAc,CAAK;IAC3B,cAAc;IACd,OAAO,CAAC,cAAc,CAAK;IAC3B,cAAc;IACd,OAAO,CAAC,gBAAgB,CAAuB;IAC/C,cAAc;IACd,OAAO,CAAC,aAAa,CAAS;IAC9B,cAAc;IACd,OAAO,CAAC,cAAc,CAAK;IAC3B,cAAc;IACd,OAAO,CAAC,iBAAiB,CAAwB;IAEjD,MAAM,CAAC,MAAM,0BA4GX;IAEF,IAAI,KAAK,WAER;IAED,IAAI,KAAK,CAAC,KAAK,QAAA,EAId;IAED,MAAM;IA4EN,YAAY;IAQH,oBAAoB;IAS7B,MAAM,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAK9C;;;;;;OAMG;IACH,OAAO,CAAC,aAAa;IAsCrB,IAAI;IASJ,QAAQ;IAUR,OAAO,CAAC,cAAc,CAQpB;IAEF,OAAO,CAAC,cAAc,CAqCpB;IAEF,OAAO,CAAC,YAAY,CAWlB;IAEF,OAAO,CAAC,gBAAgB,CAMtB;IAIF,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,kBAAkB;CAY3B"}
@@ -17,6 +17,7 @@ class PdPanelViewer extends LitElement {
17
17
  constructor() {
18
18
  super(...arguments);
19
19
  this.withProgress = false;
20
+ this.overlayNav = true;
20
21
  this.deltaCalc = 3;
21
22
  this._index = 0;
22
23
  this._panData = {};
@@ -139,6 +140,17 @@ class PdPanelViewer extends LitElement {
139
140
  right: 0;
140
141
  }
141
142
 
143
+ :host([overlayNav]) .panel-container {
144
+ padding: 0;
145
+ }
146
+
147
+ :host([overlayNav]) pd-icon {
148
+ margin: 0 0.25rem;
149
+ --pd-icon-bg-col: rgba(0, 0, 0, 0.15);
150
+ --pd-icon-bg-col-hover: rgba(0, 0, 0, 0.3);
151
+ backdrop-filter: blur(4px);
152
+ }
153
+
142
154
  @media (max-width: 768px) {
143
155
  .panel-container {
144
156
  padding: 0 0.5rem;
@@ -217,6 +229,7 @@ class PdPanelViewer extends LitElement {
217
229
  </div>
218
230
  <pd-icon
219
231
  id="prev"
232
+ class=${classMap({ round: this.overlayNav })}
220
233
  icon="previousArrow"
221
234
  ?activeIcon="${true}"
222
235
  ?disabled="${this.index <= 0}"
@@ -228,6 +241,7 @@ class PdPanelViewer extends LitElement {
228
241
  ></pd-icon>
229
242
  <pd-icon
230
243
  id="next"
244
+ class=${classMap({ round: this.overlayNav })}
231
245
  icon="nextArrow"
232
246
  ?activeIcon="${true}"
233
247
  ?disabled="${this.index === this.children.length - 1}"
@@ -353,6 +367,9 @@ class PdPanelViewer extends LitElement {
353
367
  __decorateClass([
354
368
  property({ type: Boolean })
355
369
  ], PdPanelViewer.prototype, "withProgress");
370
+ __decorateClass([
371
+ property({ type: Boolean, reflect: true })
372
+ ], PdPanelViewer.prototype, "overlayNav");
356
373
  __decorateClass([
357
374
  property({ type: Number })
358
375
  ], PdPanelViewer.prototype, "deltaCalc");
@@ -3,11 +3,12 @@ import { TabHeader } from '../types';
3
3
  /**
4
4
  * Tab navigation component with header tabs and content slots.
5
5
  *
6
- * Supports responsive label switching (full short labels)
7
- * when tabs overflow their container.
6
+ * Supports horizontal (default) and vertical orientation, plus
7
+ * responsive label switching (full -> short labels) when tabs
8
+ * overflow their container.
8
9
  *
9
10
  * @tagname pd-tab
10
- * @summary Tab navigation with responsive label switching.
11
+ * @summary Tab navigation with horizontal/vertical orientation and responsive labels.
11
12
  *
12
13
  * @event tab-selected - Fired when a tab is selected. Emits the tab key.
13
14
  *
@@ -18,8 +19,8 @@ import { TabHeader } from '../types';
18
19
  * @cssprop --pd-tab-font-size-compact - Font size in compact mode. Default: `0.8rem`.
19
20
  * @cssprop --pd-tab-text-col - Tab text color.
20
21
  * @cssprop --pd-tab-active-text-col - Active tab text color.
21
- * @cssprop --pd-tab-active-indicator-col - Active tab underline color.
22
- * @cssprop --pd-tab-active-indicator-height - Active tab underline thickness. Default: `2px`.
22
+ * @cssprop --pd-tab-active-indicator-col - Active tab indicator color.
23
+ * @cssprop --pd-tab-active-indicator-height - Active tab indicator thickness. Default: `2px`.
23
24
  * @cssprop --pd-tab-hover-bg-col - Tab hover background.
24
25
  * @cssprop --pd-tab-disabled-text-col - Disabled tab text color.
25
26
  * @cssprop --pd-tab-icon-size - Icon size in tab headers. Default: `1.125em`.
@@ -32,6 +33,8 @@ export declare class PdTab extends LitElement {
32
33
  tabs: TabHeader[];
33
34
  /** Key of the initially active tab. */
34
35
  defaultTab?: string;
36
+ /** Tab orientation. Default: horizontal. */
37
+ orientation: "horizontal" | "vertical";
35
38
  private _activeTab?;
36
39
  private _headerContainer;
37
40
  private _resizeObserver;
@@ -1 +1 @@
1
- {"version":3,"file":"PdTab.d.ts","sourceRoot":"","sources":["../../src/pd-tab/PdTab.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAgB,cAAc,EAAE,MAAM,KAAK,CAAC;AAGrE,OAAO,0CAA0C,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,KAAM,SAAQ,UAAU;IACnC,uCAAuC;IAEvC,IAAI,EAAE,SAAS,EAAE,CAAM;IAEvB,uCAAuC;IAEvC,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,OAAO,CAAC,UAAU,CAAC,CAAS;IAG5B,OAAO,CAAC,gBAAgB,CAAe;IAEvC,OAAO,CAAC,eAAe,CAA+B;IAEtD,MAAM,CAAC,MAA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AO,CAAC,UAAU;IAiDlB,OAAO,CAAC,YAAY;CAcrB"}
@@ -15,6 +15,7 @@ class PdTab extends LitElement {
15
15
  constructor() {
16
16
  super(...arguments);
17
17
  this.tabs = [];
18
+ this.orientation = "horizontal";
18
19
  this._resizeObserver = null;
19
20
  }
20
21
  static {
@@ -32,6 +33,17 @@ class PdTab extends LitElement {
32
33
  --_icon-size: var(--pd-tab-icon-size, 1.125em);
33
34
  }
34
35
 
36
+ /* --- Wrapper --- */
37
+ .tab-wrapper {
38
+ display: flex;
39
+ flex-direction: column;
40
+ }
41
+
42
+ :host([orientation="vertical"]) .tab-wrapper {
43
+ flex-direction: row;
44
+ }
45
+
46
+ /* --- Header container --- */
35
47
  .header-container {
36
48
  display: flex;
37
49
  flex-wrap: nowrap;
@@ -39,6 +51,12 @@ class PdTab extends LitElement {
39
51
  font-size: var(--_font-size);
40
52
  }
41
53
 
54
+ :host([orientation="vertical"]) .header-container {
55
+ flex-direction: column;
56
+ border-bottom: none;
57
+ border-right: 1px solid var(--pd-default-disabled-light-col, #e5e7eb);
58
+ }
59
+
42
60
  /* --- Tab header --- */
43
61
  .tab-header {
44
62
  padding: var(--pd-tab-header-padding, 0.5em 1em);
@@ -60,6 +78,13 @@ class PdTab extends LitElement {
60
78
  flex-shrink: 0;
61
79
  }
62
80
 
81
+ :host([orientation="vertical"]) .tab-header {
82
+ border-bottom: none;
83
+ margin-bottom: 0;
84
+ border-left: var(--_active-height) solid transparent;
85
+ margin-left: calc(-1 * var(--_active-height) + 1px);
86
+ }
87
+
63
88
  .tab-header:hover {
64
89
  background-color: var(--pd-tab-hover-bg-col, rgba(0, 0, 0, 0.04));
65
90
  }
@@ -70,6 +95,11 @@ class PdTab extends LitElement {
70
95
  font-weight: 500;
71
96
  }
72
97
 
98
+ :host([orientation="vertical"]) .tab-header.active-header {
99
+ border-bottom-color: transparent;
100
+ border-left-color: var(--_active-col);
101
+ }
102
+
73
103
  .tab-header.disabled-header {
74
104
  pointer-events: none;
75
105
  color: var(
@@ -116,6 +146,13 @@ class PdTab extends LitElement {
116
146
  flex-shrink: 0;
117
147
  }
118
148
 
149
+ /* --- Panels container --- */
150
+ .panels-container {
151
+ flex: 1;
152
+ min-width: 0;
153
+ min-height: 0;
154
+ }
155
+
119
156
  /* --- Content panels --- */
120
157
  .slot-container {
121
158
  display: none;
@@ -130,6 +167,14 @@ class PdTab extends LitElement {
130
167
  );
131
168
  border-top: none;
132
169
  }
170
+
171
+ :host([orientation="vertical"]) .active-slot {
172
+ border-top: var(
173
+ --pd-tab-content-border,
174
+ 1px solid var(--pd-default-disabled-light-col, #e5e7eb)
175
+ );
176
+ border-left: none;
177
+ }
133
178
  `
134
179
  ];
135
180
  }
@@ -155,45 +200,54 @@ class PdTab extends LitElement {
155
200
  }
156
201
  }
157
202
  render() {
203
+ const isVertical = this.orientation === "vertical";
158
204
  return html`
159
- <div
160
- id="hc"
161
- class="header-container"
162
- role="tablist"
163
- @keydown=${this._onKeyDown}
164
- >
165
- ${this.tabs.map(
205
+ <div class="tab-wrapper">
206
+ <div
207
+ id="hc"
208
+ class="header-container"
209
+ role="tablist"
210
+ aria-orientation="${isVertical ? "vertical" : "horizontal"}"
211
+ @keydown=${this._onKeyDown}
212
+ >
213
+ ${this.tabs.map(
166
214
  (t) => html`
167
- <div
168
- class="tab-header ${this._activeTab === t.key ? "active-header" : ""} ${t.disabled ? "disabled-header" : ""}"
169
- data-key="${t.key}"
170
- @click="${this._tabSelected}"
171
- role="tab"
172
- id="${`tab-${t.key}`}"
173
- aria-selected="${this._activeTab === t.key}"
174
- aria-controls="${`panel-${t.key}`}"
175
- aria-disabled="${t.disabled || false}"
176
- tabindex="${this._activeTab === t.key && !t.disabled ? 0 : -1}"
177
- >
178
- ${t.pdIcon ? html`<pd-icon class="tab-icon" .icon="${t.pdIcon}"></pd-icon>` : nothing}
179
- <span class="full-label">${t.name}</span>
180
- <span class="short-label">${t.shortLabel ?? t.name}</span>
181
- </div>
182
- `
215
+ <div
216
+ class="tab-header ${this._activeTab === t.key ? "active-header" : ""} ${t.disabled ? "disabled-header" : ""}"
217
+ data-key="${t.key}"
218
+ @click="${this._tabSelected}"
219
+ role="tab"
220
+ id="${`tab-${t.key}`}"
221
+ aria-selected="${this._activeTab === t.key}"
222
+ aria-controls="${`panel-${t.key}`}"
223
+ aria-disabled="${t.disabled || false}"
224
+ tabindex="${this._activeTab === t.key && !t.disabled ? 0 : -1}"
225
+ >
226
+ ${t.pdIcon ? html`<pd-icon
227
+ class="tab-icon"
228
+ .icon="${t.pdIcon}"
229
+ ></pd-icon>` : nothing}
230
+ <span class="full-label">${t.name}</span>
231
+ <span class="short-label">${t.shortLabel ?? t.name}</span>
232
+ </div>
233
+ `
183
234
  )}
184
- </div>
185
- ${this.tabs.map(
235
+ </div>
236
+ <div class="panels-container">
237
+ ${this.tabs.map(
186
238
  (t) => html`
187
- <div
188
- id="${`panel-${t.key}`}"
189
- role="tabpanel"
190
- aria-labelledby="${`tab-${t.key}`}"
191
- class="slot-container ${this._activeTab === t.key ? "active-slot" : ""}"
192
- >
193
- <slot name="${t.key}"></slot>
194
- </div>
195
- `
239
+ <div
240
+ id="${`panel-${t.key}`}"
241
+ role="tabpanel"
242
+ aria-labelledby="${`tab-${t.key}`}"
243
+ class="slot-container ${this._activeTab === t.key ? "active-slot" : ""}"
244
+ >
245
+ <slot name="${t.key}"></slot>
246
+ </div>
247
+ `
196
248
  )}
249
+ </div>
250
+ </div>
197
251
  `;
198
252
  }
199
253
  reset() {
@@ -205,7 +259,8 @@ class PdTab extends LitElement {
205
259
  _checkOverflow() {
206
260
  this.removeAttribute("data-compact");
207
261
  const c = this._headerContainer;
208
- if (c.scrollWidth > c.clientWidth + 1 && this.tabs.some((t) => t.shortLabel)) {
262
+ const overflows = this.orientation === "vertical" ? c.scrollHeight > c.clientHeight + 1 : c.scrollWidth > c.clientWidth + 1;
263
+ if (overflows && this.tabs.some((t) => t.shortLabel)) {
209
264
  this.setAttribute("data-compact", "");
210
265
  }
211
266
  }
@@ -219,27 +274,23 @@ class PdTab extends LitElement {
219
274
  (t) => t.key === this._activeTab
220
275
  );
221
276
  let nextIndex = -1;
222
- switch (event.key) {
223
- case "ArrowRight":
224
- case "ArrowDown":
225
- event.preventDefault();
226
- nextIndex = currentIndex < enabledTabs.length - 1 ? currentIndex + 1 : 0;
227
- break;
228
- case "ArrowLeft":
229
- case "ArrowUp":
230
- event.preventDefault();
231
- nextIndex = currentIndex > 0 ? currentIndex - 1 : enabledTabs.length - 1;
232
- break;
233
- case "Home":
234
- event.preventDefault();
235
- nextIndex = 0;
236
- break;
237
- case "End":
238
- event.preventDefault();
239
- nextIndex = enabledTabs.length - 1;
240
- break;
241
- default:
242
- return;
277
+ const isVertical = this.orientation === "vertical";
278
+ const nextKeys = isVertical ? ["ArrowDown"] : ["ArrowRight"];
279
+ const prevKeys = isVertical ? ["ArrowUp"] : ["ArrowLeft"];
280
+ if (nextKeys.includes(event.key)) {
281
+ event.preventDefault();
282
+ nextIndex = currentIndex < enabledTabs.length - 1 ? currentIndex + 1 : 0;
283
+ } else if (prevKeys.includes(event.key)) {
284
+ event.preventDefault();
285
+ nextIndex = currentIndex > 0 ? currentIndex - 1 : enabledTabs.length - 1;
286
+ } else if (event.key === "Home") {
287
+ event.preventDefault();
288
+ nextIndex = 0;
289
+ } else if (event.key === "End") {
290
+ event.preventDefault();
291
+ nextIndex = enabledTabs.length - 1;
292
+ } else {
293
+ return;
243
294
  }
244
295
  if (nextIndex >= 0 && nextIndex < enabledTabs.length) {
245
296
  const nextTab = enabledTabs[nextIndex];
@@ -279,6 +330,9 @@ __decorateClass([
279
330
  __decorateClass([
280
331
  property({ type: String })
281
332
  ], PdTab.prototype, "defaultTab");
333
+ __decorateClass([
334
+ property({ type: String, reflect: true })
335
+ ], PdTab.prototype, "orientation");
282
336
  __decorateClass([
283
337
  state()
284
338
  ], PdTab.prototype, "_activeTab");
package/dist/types.d.ts CHANGED
@@ -49,7 +49,6 @@ export interface WizardStep {
49
49
  }
50
50
  export type { PdBadge, PdBadgeChangeDetail, PdBadgeReorderDetail, } from './pd-badge-order/types.js';
51
51
  export { TEXT_LIMIT_TITLE, TEXT_LIMIT_DESC, DEFAULT_BADGE_COLOR, } from './pd-badge-order/types.js';
52
- export type { GalleryImage, GalleryMode, GalleryOpenDetail, GalleryCloseDetail, GalleryNavigateDetail, } from './pd-gallery/types.js';
53
52
  /**
54
53
  * Notice types for different message contexts.
55
54
  */
@@ -57,5 +56,5 @@ export type NoticeType = "info" | "note" | "success" | "warning" | "error";
57
56
  /**
58
57
  * Visual variants for the notice box.
59
58
  */
60
- export type NoticeVariant = "box" | "sidebar";
59
+ export type NoticeVariant = "box" | "sidebar" | "compact";
61
60
  //# sourceMappingURL=types.d.ts.map