@progressive-development/pd-content 0.9.2 → 1.0.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 (119) hide show
  1. package/LICENSE +21 -2
  2. package/README.md +42 -57
  3. package/dist/_virtual/_commonjsHelpers.js +7 -0
  4. package/dist/_virtual/prism-java.js +3 -0
  5. package/dist/_virtual/prism-java2.js +3 -0
  6. package/dist/_virtual/prism-python.js +3 -0
  7. package/dist/_virtual/prism-python2.js +3 -0
  8. package/dist/_virtual/prism-typescript.js +3 -0
  9. package/dist/_virtual/prism-typescript2.js +3 -0
  10. package/dist/_virtual/prism.js +7 -0
  11. package/dist/_virtual/prism2.js +3 -0
  12. package/dist/generated/locales/be.d.ts +10 -0
  13. package/dist/generated/locales/be.d.ts.map +1 -1
  14. package/dist/generated/locales/de.d.ts +10 -0
  15. package/dist/generated/locales/de.d.ts.map +1 -1
  16. package/dist/generated/locales/en.d.ts +10 -0
  17. package/dist/generated/locales/en.d.ts.map +1 -1
  18. package/dist/index.d.ts +8 -1
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +9 -0
  21. package/dist/locales/be.js +11 -1
  22. package/dist/locales/de.js +11 -1
  23. package/dist/locales/en.js +11 -1
  24. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-bash.js +235 -0
  25. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-java.js +135 -0
  26. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-json.js +27 -0
  27. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-markdown.js +415 -0
  28. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-python.js +76 -0
  29. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-sql.js +32 -0
  30. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-typescript.js +71 -0
  31. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-yaml.js +83 -0
  32. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/prism.js +1959 -0
  33. package/dist/pd-box-view/PdBoxView.d.ts +9 -0
  34. package/dist/pd-box-view/PdBoxView.d.ts.map +1 -1
  35. package/dist/pd-box-view/pd-box-view.stories.d.ts +41 -8
  36. package/dist/pd-box-view/pd-box-view.stories.d.ts.map +1 -1
  37. package/dist/pd-code-snippet/PdCodeSnippet.d.ts +105 -0
  38. package/dist/pd-code-snippet/PdCodeSnippet.d.ts.map +1 -0
  39. package/dist/pd-code-snippet/PdCodeSnippet.js +504 -0
  40. package/dist/pd-code-snippet/pd-code-snippet.d.ts +4 -0
  41. package/dist/pd-code-snippet/pd-code-snippet.d.ts.map +1 -0
  42. package/dist/pd-code-snippet/pd-code-snippet.js +5 -0
  43. package/dist/pd-code-snippet/pd-code-snippet.stories.d.ts +55 -0
  44. package/dist/pd-code-snippet/pd-code-snippet.stories.d.ts.map +1 -0
  45. package/dist/pd-collapse/PdCollapse.d.ts +31 -7
  46. package/dist/pd-collapse/PdCollapse.d.ts.map +1 -1
  47. package/dist/pd-collapse/PdCollapse.js +73 -15
  48. package/dist/pd-collapse/pd-collapse.stories.d.ts +49 -21
  49. package/dist/pd-collapse/pd-collapse.stories.d.ts.map +1 -1
  50. package/dist/pd-collapse-group/PdCollapseGroup.d.ts +8 -7
  51. package/dist/pd-collapse-group/PdCollapseGroup.d.ts.map +1 -1
  52. package/dist/pd-collapse-group/PdCollapseGroup.js +7 -6
  53. package/dist/pd-collapse-group/pd-collapse-group.stories.d.ts +39 -4
  54. package/dist/pd-collapse-group/pd-collapse-group.stories.d.ts.map +1 -1
  55. package/dist/pd-edit-content/PdEditContent.d.ts +13 -0
  56. package/dist/pd-edit-content/PdEditContent.d.ts.map +1 -1
  57. package/dist/pd-edit-content/PdEditContent.js +33 -7
  58. package/dist/pd-edit-content/pd-edit-content.stories.d.ts +54 -10
  59. package/dist/pd-edit-content/pd-edit-content.stories.d.ts.map +1 -1
  60. package/dist/pd-loading-state/PdLoadingState.d.ts +64 -0
  61. package/dist/pd-loading-state/PdLoadingState.d.ts.map +1 -0
  62. package/dist/pd-loading-state/PdLoadingState.js +219 -0
  63. package/dist/pd-loading-state/pd-loading-state.d.ts +6 -0
  64. package/dist/pd-loading-state/pd-loading-state.d.ts.map +1 -0
  65. package/dist/pd-loading-state/pd-loading-state.stories.d.ts +48 -0
  66. package/dist/pd-loading-state/pd-loading-state.stories.d.ts.map +1 -0
  67. package/dist/pd-loading-state.d.ts +2 -0
  68. package/dist/pd-loading-state.js +1 -0
  69. package/dist/pd-more-info/PdMoreInfo.d.ts +6 -2
  70. package/dist/pd-more-info/PdMoreInfo.d.ts.map +1 -1
  71. package/dist/pd-more-info/PdMoreInfo.js +30 -2
  72. package/dist/pd-more-info/pd-more-info.stories.d.ts +41 -5
  73. package/dist/pd-more-info/pd-more-info.stories.d.ts.map +1 -1
  74. package/dist/pd-notice-box/PdNoticeBox.d.ts +88 -0
  75. package/dist/pd-notice-box/PdNoticeBox.d.ts.map +1 -0
  76. package/dist/pd-notice-box/PdNoticeBox.js +224 -0
  77. package/dist/pd-notice-box/pd-notice-box.d.ts +3 -0
  78. package/dist/pd-notice-box/pd-notice-box.d.ts.map +1 -0
  79. package/dist/pd-notice-box/pd-notice-box.js +8 -0
  80. package/dist/pd-notice-box/pd-notice-box.stories.d.ts +58 -0
  81. package/dist/pd-notice-box/pd-notice-box.stories.d.ts.map +1 -0
  82. package/dist/pd-panel-viewer/PdPanel.d.ts +5 -0
  83. package/dist/pd-panel-viewer/PdPanel.d.ts.map +1 -1
  84. package/dist/pd-panel-viewer/PdPanelViewer.d.ts +53 -2
  85. package/dist/pd-panel-viewer/PdPanelViewer.d.ts.map +1 -1
  86. package/dist/pd-panel-viewer/PdPanelViewer.js +188 -33
  87. package/dist/pd-panel-viewer/pd-panel-viewer.stories.d.ts +46 -0
  88. package/dist/pd-panel-viewer/pd-panel-viewer.stories.d.ts.map +1 -0
  89. package/dist/pd-resize-content/PdResizeContent.d.ts +12 -10
  90. package/dist/pd-resize-content/PdResizeContent.d.ts.map +1 -1
  91. package/dist/pd-resize-content/PdResizeContent.js +19 -9
  92. package/dist/pd-resize-content/pd-resize-content.stories.d.ts +36 -4
  93. package/dist/pd-resize-content/pd-resize-content.stories.d.ts.map +1 -1
  94. package/dist/pd-tab/PdTab.d.ts +35 -2
  95. package/dist/pd-tab/PdTab.d.ts.map +1 -1
  96. package/dist/pd-tab/PdTab.js +181 -68
  97. package/dist/pd-tab/pd-tab.stories.d.ts +51 -21
  98. package/dist/pd-tab/pd-tab.stories.d.ts.map +1 -1
  99. package/dist/pd-timeline/PdTimeline.d.ts +50 -0
  100. package/dist/pd-timeline/PdTimeline.d.ts.map +1 -0
  101. package/dist/pd-timeline/PdTimeline.js +315 -0
  102. package/dist/pd-timeline/pd-timeline.d.ts +3 -0
  103. package/dist/pd-timeline/pd-timeline.d.ts.map +1 -0
  104. package/dist/pd-timeline/pd-timeline.stories.d.ts +56 -0
  105. package/dist/pd-timeline/pd-timeline.stories.d.ts.map +1 -0
  106. package/dist/pd-timeline-wizard/PdTimelineWizard.d.ts +39 -0
  107. package/dist/pd-timeline-wizard/PdTimelineWizard.d.ts.map +1 -0
  108. package/dist/pd-timeline-wizard/PdTimelineWizard.js +150 -0
  109. package/dist/pd-timeline-wizard/pd-timeline-wizard.d.ts +3 -0
  110. package/dist/pd-timeline-wizard/pd-timeline-wizard.d.ts.map +1 -0
  111. package/dist/pd-timeline-wizard/pd-timeline-wizard.stories.d.ts +54 -0
  112. package/dist/pd-timeline-wizard/pd-timeline-wizard.stories.d.ts.map +1 -0
  113. package/dist/pd-timeline-wizard.d.ts +2 -0
  114. package/dist/pd-timeline-wizard.js +8 -0
  115. package/dist/pd-timeline.d.ts +2 -0
  116. package/dist/pd-timeline.js +8 -0
  117. package/dist/types.d.ts +25 -0
  118. package/dist/types.d.ts.map +1 -1
  119. package/package.json +16 -7
@@ -0,0 +1,88 @@
1
+ import { CSSResultGroup, LitElement } from 'lit';
2
+ import { NoticeType, NoticeVariant } from '../types.js';
3
+ /**
4
+ * Notice box component for displaying contextual messages.
5
+ *
6
+ * Supports two visual variants:
7
+ * - **box**: Full-width box with icon, colored background (like Confluence info boxes)
8
+ * - **sidebar**: Minimal variant with colored left border only
9
+ *
10
+ * @tagname pd-notice-box
11
+ * @summary Contextual notice box for info, note, success, warning, and error messages.
12
+ *
13
+ * @slot - Default slot for notice content.
14
+ *
15
+ * @cssprop --pd-notice-box-width - Width of the notice box. Default: `100%`.
16
+ * @cssprop --pd-notice-box-border-radius - Border radius. Default: `--pd-radius-md`.
17
+ * @cssprop --pd-notice-box-padding - Content padding. Default: `--pd-spacing-sm`.
18
+ * @cssprop --pd-notice-box-gap - Gap between icon and content. Default: `--pd-spacing-sm`.
19
+ * @cssprop --pd-notice-box-font-size - Font size. Default: `--pd-default-font-content-size`.
20
+ * @cssprop --pd-notice-box-title-font-size - Title font size. Default: `--pd-default-font-input-size`.
21
+ * @cssprop --pd-notice-box-text-col - Text color. Default: `--pd-default-font-content-col`.
22
+ * @cssprop --pd-notice-box-title-font-weight - Title font weight. Default: `600`.
23
+ * @cssprop --pd-notice-box-icon-size - Icon size. Default: `24px`.
24
+ * @cssprop --pd-notice-box-sidebar-width - Left border width for sidebar variant. Default: `4px`.
25
+ *
26
+ * Type-specific colors (with defaults from pd-shared-styles):
27
+ * @cssprop --pd-notice-box-info-col - Info type main color. Default: `--pd-default-info-col`.
28
+ * @cssprop --pd-notice-box-info-bg-col - Info type background. Default: light blue.
29
+ * @cssprop --pd-notice-box-note-col - Note type main color. Default: `--pd-default-col` (teal).
30
+ * @cssprop --pd-notice-box-note-bg-col - Note type background. Default: light teal.
31
+ * @cssprop --pd-notice-box-success-col - Success type main color. Default: `--pd-default-success-col`.
32
+ * @cssprop --pd-notice-box-success-bg-col - Success type background. Default: `--pd-default-success-light-col`.
33
+ * @cssprop --pd-notice-box-warning-col - Warning type main color. Default: `--pd-default-warning-col`.
34
+ * @cssprop --pd-notice-box-warning-bg-col - Warning type background. Default: light yellow.
35
+ * @cssprop --pd-notice-box-error-col - Error type main color. Default: `--pd-default-error-col`.
36
+ * @cssprop --pd-notice-box-error-bg-col - Error type background. Default: `--pd-default-error-light-col`.
37
+ *
38
+ * @example
39
+ * ```html
40
+ * <!-- Box variant with icon -->
41
+ * <pd-notice-box type="info" title="Information">
42
+ * This is an informational message.
43
+ * </pd-notice-box>
44
+ *
45
+ * <!-- Sidebar variant (no icon) -->
46
+ * <pd-notice-box type="warning" variant="sidebar" title="Warning">
47
+ * This is a warning message.
48
+ * </pd-notice-box>
49
+ *
50
+ * <!-- Custom icon -->
51
+ * <pd-notice-box type="success" icon="starIcon" title="Success">
52
+ * Operation completed!
53
+ * </pd-notice-box>
54
+ *
55
+ * <!-- Without icon -->
56
+ * <pd-notice-box type="error" hideIcon title="Error">
57
+ * Something went wrong.
58
+ * </pd-notice-box>
59
+ * ```
60
+ */
61
+ export declare class PdNoticeBox extends LitElement {
62
+ /**
63
+ * The type of notice. Determines the color scheme and default icon.
64
+ */
65
+ type: NoticeType;
66
+ /**
67
+ * Visual variant of the notice box.
68
+ * - `box`: Full box with icon and background color
69
+ * - `sidebar`: Minimal with colored left border
70
+ */
71
+ variant: NoticeVariant;
72
+ /**
73
+ * Title text displayed prominently at the top.
74
+ */
75
+ title: string;
76
+ /**
77
+ * Custom icon name to override the default type icon.
78
+ * Uses pd-icon iconset names.
79
+ */
80
+ icon: string;
81
+ /**
82
+ * Whether to hide the icon (box variant only).
83
+ */
84
+ hideIcon: boolean;
85
+ static styles: CSSResultGroup;
86
+ render(): import('lit').TemplateResult<1>;
87
+ }
88
+ //# sourceMappingURL=PdNoticeBox.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,224 @@
1
+ import { LitElement, css, nothing, html } from 'lit';
2
+ import { property } from 'lit/decorators.js';
3
+ import { pdIcons } from '@progressive-development/pd-icon';
4
+ import '@progressive-development/pd-icon/pd-icon';
5
+
6
+ var __defProp = Object.defineProperty;
7
+ var __decorateClass = (decorators, target, key, kind) => {
8
+ var result = void 0 ;
9
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
10
+ if (decorator = decorators[i])
11
+ result = (decorator(target, key, result) ) || result;
12
+ if (result) __defProp(target, key, result);
13
+ return result;
14
+ };
15
+ const DEFAULT_ICONS = {
16
+ info: pdIcons.ICON_INFO_FLD,
17
+ note: pdIcons.ICON_INFO_FLD,
18
+ success: pdIcons.ICON_CHECKBOX,
19
+ warning: pdIcons.ICON_WARNING_FLD,
20
+ error: pdIcons.ICON_ERROR_FLD
21
+ };
22
+ class PdNoticeBox extends LitElement {
23
+ constructor() {
24
+ super(...arguments);
25
+ this.type = "info";
26
+ this.variant = "box";
27
+ this.title = "";
28
+ this.icon = "";
29
+ this.hideIcon = false;
30
+ }
31
+ static {
32
+ this.styles = [
33
+ css`
34
+ :host {
35
+ /* Layout */
36
+ --_width: var(--pd-notice-box-width, 100%);
37
+ --_radius: var(--pd-notice-box-border-radius, var(--pd-radius-md, 8px));
38
+ --_padding: var(--pd-notice-box-padding, var(--pd-spacing-sm, 12px));
39
+ --_gap: var(--pd-notice-box-gap, var(--pd-spacing-sm, 12px));
40
+
41
+ /* Typography */
42
+ --_font-size: var(
43
+ --pd-notice-box-font-size,
44
+ var(--pd-default-font-content-size, 1rem)
45
+ );
46
+ --_title-font-size: var(
47
+ --pd-notice-box-title-font-size,
48
+ var(--pd-default-font-input-size, 1.05rem)
49
+ );
50
+ --_title-font-weight: var(--pd-notice-box-title-font-weight, 600);
51
+
52
+ /* Icon */
53
+ --_icon-size: var(--pd-notice-box-icon-size, 24px);
54
+
55
+ /* Sidebar */
56
+ --_sidebar-width: var(--pd-notice-box-sidebar-width, 4px);
57
+
58
+ /* Type colors - will be overridden per type */
59
+ --_type-col: var(--pd-default-info-col, #6b86ff);
60
+ --_type-bg-col: #e8f0ff;
61
+ --_type-text-col: var(
62
+ --pd-notice-box-text-col,
63
+ var(--pd-default-font-content-col, #353738)
64
+ );
65
+
66
+ display: block;
67
+ width: var(--_width);
68
+ }
69
+
70
+ /* Type-specific color overrides */
71
+ :host([type="info"]) {
72
+ --_type-col: var(
73
+ --pd-notice-box-info-col,
74
+ var(--pd-default-info-col, #6b86ff)
75
+ );
76
+ --_type-bg-col: var(--pd-notice-box-info-bg-col, #e8f0ff);
77
+ }
78
+
79
+ :host([type="note"]) {
80
+ --_type-col: var(
81
+ --pd-notice-box-note-col,
82
+ var(--pd-default-col, #067394)
83
+ );
84
+ --_type-bg-col: var(
85
+ --pd-notice-box-note-bg-col,
86
+ var(--pd-default-lightest-col, #cde2eb)
87
+ );
88
+ }
89
+
90
+ :host([type="success"]) {
91
+ --_type-col: var(
92
+ --pd-notice-box-success-col,
93
+ var(--pd-default-success-col, #348b11)
94
+ );
95
+ --_type-bg-col: var(
96
+ --pd-notice-box-success-bg-col,
97
+ var(--pd-default-success-light-col, #f5ffe8)
98
+ );
99
+ }
100
+
101
+ :host([type="warning"]) {
102
+ --_type-col: var(
103
+ --pd-notice-box-warning-col,
104
+ var(--pd-default-warning-col, #ffbf00)
105
+ );
106
+ --_type-bg-col: var(--pd-notice-box-warning-bg-col, #fff8e0);
107
+ }
108
+
109
+ :host([type="error"]) {
110
+ --_type-col: var(
111
+ --pd-notice-box-error-col,
112
+ var(--pd-default-error-col, #a1141b)
113
+ );
114
+ --_type-bg-col: var(
115
+ --pd-notice-box-error-bg-col,
116
+ var(--pd-default-error-light-col, #ffe8e8)
117
+ );
118
+ }
119
+
120
+ /* Box variant */
121
+ .notice-box {
122
+ display: flex;
123
+ align-items: flex-start;
124
+ gap: var(--_gap);
125
+ padding: var(--_padding);
126
+ border-radius: var(--_radius);
127
+ background-color: var(--_type-bg-col);
128
+ border: 1px solid var(--_type-col);
129
+ font-size: var(--_font-size);
130
+ color: var(--_type-text-col);
131
+ }
132
+
133
+ /* Sidebar variant */
134
+ :host([variant="sidebar"]) .notice-box {
135
+ background-color: transparent;
136
+ border: none;
137
+ border-left: var(--_sidebar-width) solid var(--_type-col);
138
+ border-radius: 0;
139
+ padding-left: var(--_padding);
140
+ }
141
+
142
+ /* Icon wrapper */
143
+ .icon-wrapper {
144
+ flex-shrink: 0;
145
+ display: flex;
146
+ align-items: center;
147
+ justify-content: center;
148
+ width: var(--_icon-size);
149
+ height: var(--_icon-size);
150
+ }
151
+
152
+ .icon-wrapper pd-icon {
153
+ --pd-icon-primary-col: var(--_type-col);
154
+ --pd-icon-col-primary-active: var(--_type-col);
155
+ width: var(--_icon-size);
156
+ height: var(--_icon-size);
157
+ }
158
+
159
+ /* Content area */
160
+ .content {
161
+ flex: 1;
162
+ min-width: 0;
163
+ }
164
+
165
+ .title {
166
+ margin: 0 0 0.25em 0;
167
+ font-size: var(--_title-font-size);
168
+ font-weight: var(--_title-font-weight);
169
+ font-family: var(--pd-default-font-title-family, inherit);
170
+ color: var(--_type-col);
171
+ line-height: 1.3;
172
+ }
173
+
174
+ .body {
175
+ line-height: 1.5;
176
+ }
177
+
178
+ .body ::slotted(*) {
179
+ margin: 0;
180
+ }
181
+
182
+ .body ::slotted(*:not(:last-child)) {
183
+ margin-bottom: 0.5em;
184
+ }
185
+ `
186
+ ];
187
+ }
188
+ render() {
189
+ const showIcon = this.variant === "box" && !this.hideIcon;
190
+ const iconName = this.icon || DEFAULT_ICONS[this.type];
191
+ return html`
192
+ <div class="notice-box" role="note" aria-label="${this.type} notice">
193
+ ${showIcon ? html`
194
+ <div class="icon-wrapper" aria-hidden="true">
195
+ <pd-icon icon="${iconName}" class="primary"></pd-icon>
196
+ </div>
197
+ ` : nothing}
198
+ <div class="content">
199
+ ${this.title ? html`<h4 class="title">${this.title}</h4>` : nothing}
200
+ <div class="body">
201
+ <slot></slot>
202
+ </div>
203
+ </div>
204
+ </div>
205
+ `;
206
+ }
207
+ }
208
+ __decorateClass([
209
+ property({ type: String, reflect: true })
210
+ ], PdNoticeBox.prototype, "type");
211
+ __decorateClass([
212
+ property({ type: String, reflect: true })
213
+ ], PdNoticeBox.prototype, "variant");
214
+ __decorateClass([
215
+ property({ type: String })
216
+ ], PdNoticeBox.prototype, "title");
217
+ __decorateClass([
218
+ property({ type: String })
219
+ ], PdNoticeBox.prototype, "icon");
220
+ __decorateClass([
221
+ property({ type: Boolean })
222
+ ], PdNoticeBox.prototype, "hideIcon");
223
+
224
+ export { PdNoticeBox };
@@ -0,0 +1,3 @@
1
+ import { PdNoticeBox } from './PdNoticeBox.js';
2
+ export { PdNoticeBox };
3
+ //# sourceMappingURL=pd-notice-box.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pd-notice-box.d.ts","sourceRoot":"","sources":["../../src/pd-notice-box/pd-notice-box.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAO/C,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { PdNoticeBox } from './PdNoticeBox.js';
2
+
3
+ const tag = "pd-notice-box";
4
+ if (!customElements.get(tag)) {
5
+ customElements.define(tag, PdNoticeBox);
6
+ }
7
+
8
+ export { PdNoticeBox };
@@ -0,0 +1,58 @@
1
+ import { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ import { NoticeType, NoticeVariant } from '../types.js';
3
+ /**
4
+ * Story arguments interface for pd-notice-box component.
5
+ * Maps to the component's public API.
6
+ */
7
+ interface PdNoticeBoxArgs {
8
+ /** Notice type */
9
+ type: NoticeType;
10
+ /** Visual variant */
11
+ variant: NoticeVariant;
12
+ /** Title text */
13
+ title: string;
14
+ /** Custom icon (optional) */
15
+ icon: string;
16
+ /** Hide icon */
17
+ hideIcon: boolean;
18
+ /** Content text */
19
+ content: string;
20
+ }
21
+ /**
22
+ * ## pd-notice-box
23
+ *
24
+ * A notice box component for displaying contextual messages like
25
+ * informational notes, warnings, errors, and success messages.
26
+ *
27
+ * ### Features
28
+ * - Five notice types: info, note, success, warning, error
29
+ * - Two visual variants: box (with icon and background) or sidebar (minimal with left border)
30
+ * - Customizable icons: override default icons or hide them completely
31
+ * - Rich HTML content support via default slot
32
+ * - Full theme support with extensive CSS Custom Properties
33
+ *
34
+ * ### Accessibility
35
+ * - Uses `role="note"` for semantic meaning
36
+ * - `aria-label` announces the notice type (e.g. "warning notice")
37
+ * - Icons are `aria-hidden="true"` (decorative only)
38
+ * - Color contrast meets WCAG AA standards
39
+ * - Types are distinguishable by icon and text, not just color
40
+ */
41
+ declare const meta: Meta<PdNoticeBoxArgs>;
42
+ export default meta;
43
+ type Story = StoryObj<PdNoticeBoxArgs>;
44
+ /** Default info notice with box variant. Interactive via Controls panel. */
45
+ export declare const Default: Story;
46
+ /** All five notice types with box variant at a glance. */
47
+ export declare const AllTypesBox: Story;
48
+ /** All five notice types with sidebar variant. Minimal styling with colored left border. */
49
+ export declare const AllTypesSidebar: Story;
50
+ /** Side-by-side comparison of box and sidebar variants. */
51
+ export declare const VariantComparison: Story;
52
+ /** Icon customization: default icon, custom icon, and no icon. */
53
+ export declare const IconOptions: Story;
54
+ /** Notice box with rich HTML content including lists, code, and links. */
55
+ export declare const RichContent: Story;
56
+ /** CSS Custom Properties -- Branded and Redesigned variants. */
57
+ export declare const CustomStyling: Story;
58
+ //# sourceMappingURL=pd-notice-box.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pd-notice-box.stories.d.ts","sourceRoot":"","sources":["../../src/pd-notice-box/pd-notice-box.stories.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAGrE,OAAO,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAM7D;;;GAGG;AACH,UAAU,eAAe;IACvB,kBAAkB;IAClB,IAAI,EAAE,UAAU,CAAC;IACjB,qBAAqB;IACrB,OAAO,EAAE,aAAa,CAAC;IACvB,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,mBAAmB;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAMD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,eAAe,CAiE/B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;AAMvC,4EAA4E;AAC5E,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAC;AAMF,0DAA0D;AAC1D,eAAO,MAAM,WAAW,EAAE,KAkCzB,CAAC;AAMF,4FAA4F;AAC5F,eAAO,MAAM,eAAe,EAAE,KAuC7B,CAAC;AAMF,2DAA2D;AAC3D,eAAO,MAAM,iBAAiB,EAAE,KA0C/B,CAAC;AAMF,kEAAkE;AAClE,eAAO,MAAM,WAAW,EAAE,KA6CzB,CAAC;AAMF,0EAA0E;AAC1E,eAAO,MAAM,WAAW,EAAE,KA8BzB,CAAC;AAMF,gEAAgE;AAChE,eAAO,MAAM,aAAa,EAAE,KAqG3B,CAAC"}
@@ -1,6 +1,11 @@
1
1
  import { LitElement } from 'lit';
2
2
  /**
3
3
  * @tagname pd-panel
4
+ *
5
+ * @slot - Default slot for panel content.
6
+ *
7
+ * @cssprop --pd-panel-bg - Panel background color. Default: `#afc1d2`.
8
+ * @cssprop --pd-panel-border-radius - Panel border radius. Default: `0.2em`.
4
9
  */
5
10
  export declare class PdPanel extends LitElement {
6
11
  static styles: import('lit').CSSResult;
@@ -1 +1 @@
1
- {"version":3,"file":"PdPanel.d.ts","sourceRoot":"","sources":["../../src/pd-panel-viewer/PdPanel.ts"],"names":[],"mappings":"AAEA,OAAO,EAAQ,UAAU,EAAO,MAAM,KAAK,CAAC;AAE5C;;GAEG;AACH,qBAAa,OAAQ,SAAQ,UAAU;IACrC,MAAM,CAAC,MAAM,0BAsBX;IAEF,MAAM;CAOP"}
1
+ {"version":3,"file":"PdPanel.d.ts","sourceRoot":"","sources":["../../src/pd-panel-viewer/PdPanel.ts"],"names":[],"mappings":"AAEA,OAAO,EAAQ,UAAU,EAAO,MAAM,KAAK,CAAC;AAE5C;;;;;;;GAOG;AACH,qBAAa,OAAQ,SAAQ,UAAU;IACrC,MAAM,CAAC,MAAM,0BAsBX;IAEF,MAAM;CAOP"}
@@ -1,20 +1,71 @@
1
1
  import { LitElement } from 'lit';
2
2
  /**
3
3
  * @tagname pd-panel-viewer
4
+ *
5
+ * @slot - Default slot for pd-panel children.
6
+ *
7
+ * @event exited - Dispatched on a child panel element when the viewer navigates away from it.
8
+ * @event entered - Dispatched on a child panel element when the viewer navigates to it.
9
+ *
10
+ * @cssprop --pd-panel-viewer-bg-col - Viewer background color. Default: `var(--pd-default-col)`.
11
+ * @cssprop --pd-panel-width - Max width of the panel viewer. Default: `1170px`.
12
+ * @cssprop --pd-panel-height - Height of the panel viewer. Default: `60vh`.
13
+ * @cssprop --pd-panel-overflow - Overflow behavior. Default: `hidden`.
14
+ * @cssprop --pd-panel-nav-top - Top position of navigation arrows. Default: `calc(50% - 25px)`.
15
+ * @cssprop --pd-panel-icon-col - Navigation icon color. Default: `var(--pd-on-primary-col)`.
16
+ * @cssprop --pd-panel-icon-col-hover - Navigation icon hover color. Default: `var(--pd-on-primary-col)`.
17
+ * @cssprop --pd-panel-icon-col-disabled - Navigation icon disabled color. Default: `var(--pd-default-disabled-col)`.
18
+ * @cssprop --pd-panel-progress-col - Progress bar background color. Default: `rgba(255, 255, 255, 0.4)`.
19
+ * @cssprop --pd-panel-progress-watched-col - Progress bar watched segment color. Default: `var(--pd-on-primary-col)`.
4
20
  */
5
21
  export declare class PdPanelViewer extends LitElement {
6
22
  withProgress: boolean;
7
23
  deltaCalc: number;
24
+ /** @ignore */
8
25
  _index: number;
9
- _panData: any;
26
+ /** @ignore */
27
+ _panData: {
28
+ deltaX?: number;
29
+ isFinal?: boolean;
30
+ };
31
+ /** @ignore */
10
32
  _update: {};
33
+ /** @ignore */
34
+ private _resizeObserver;
35
+ /** @ignore */
36
+ private _pointerStartX;
37
+ /** @ignore */
38
+ private _pointerStartY;
39
+ /** @ignore */
40
+ private _activePointerId;
41
+ /** @ignore */
42
+ private _pointerMoved;
43
+ /** @ignore */
44
+ private _dragThreshold;
45
+ /** @ignore */
46
+ private _isHorizontalDrag;
11
47
  static styles: import('lit').CSSResult;
12
48
  get index(): number;
13
49
  set index(value: number);
14
50
  render(): import('lit').TemplateResult<1>;
15
51
  firstUpdated(): void;
16
- update(changedProperties: any): void;
52
+ disconnectedCallback(): void;
53
+ update(changedProperties: Map<string, unknown>): void;
54
+ /**
55
+ * Positions all panels using translate3d + scale based on current index and pan delta.
56
+ * Handles snap-to-panel decision when pan gesture ends (isFinal).
57
+ *
58
+ * Historical note: Layout-Berechnung aus dem original StackBlitz-Beispiel übernommen.
59
+ * @see https://stackblitz.com/edit/lit-story-viewer?file=story-viewer.ts
60
+ */
61
+ private _updateLayout;
17
62
  next(): void;
18
63
  previous(): void;
64
+ private _onPointerDown;
65
+ private _onPointerMove;
66
+ private _onPointerUp;
67
+ private _onPointerCancel;
68
+ private _onNavKeyDown;
69
+ private _onProgressKeyDown;
19
70
  }
20
71
  //# sourceMappingURL=PdPanelViewer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PdPanelViewer.d.ts","sourceRoot":"","sources":["../../src/pd-panel-viewer/PdPanelViewer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAM5C,OAAO,0CAA0C,CAAC;AAIlD;;GAEG;AACH,qBAAa,aAAc,SAAQ,UAAU;IAE3C,YAAY,UAAS;IAGrB,SAAS,SAAK;IAGd,MAAM,SAAK;IAIX,QAAQ,EAAE,GAAG,CAAM;IAGnB,OAAO,KAAM;IAEb,MAAM,CAAC,MAAM,0BAkEX;IAEF,IAAI,KAAK,WAER;IAED,IAAI,KAAK,CAAC,KAAK,QAAA,EAId;IAED,MAAM;IAmCN,YAAY;IAoBZ,MAAM,CAAC,iBAAiB,EAAE,GAAG;IAkC7B,IAAI;IASJ,QAAQ;CAOT"}
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;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,aAAc,SAAQ,UAAU;IAE3C,YAAY,UAAS;IAGrB,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,0BAwFX;IAEF,IAAI,KAAK,WAER;IAED,IAAI,KAAK,CAAC,KAAK,QAAA,EAId;IAED,MAAM;IAiEN,YAAY;IAqBH,oBAAoB;IAc7B,MAAM,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAK9C;;;;;;OAMG;IACH,OAAO,CAAC,aAAa;IAsCrB,IAAI;IASJ,QAAQ;IAUR,OAAO,CAAC,cAAc,CAYpB;IAEF,OAAO,CAAC,cAAc,CAsCpB;IAEF,OAAO,CAAC,YAAY,CAWlB;IAEF,OAAO,CAAC,gBAAgB,CAMtB;IAIF,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,kBAAkB;CAY3B"}