@pure-ds/storybook 0.5.41 → 0.5.42
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.
- package/.storybook/addons/html-preview/preview.js +13 -5
- package/.storybook/manager.js +8 -0
- package/.storybook/preview.js +2 -22
- package/dist/pds-reference.json +41 -38
- package/package.json +2 -2
- package/public/assets/js/app.js +12 -12
- package/public/assets/js/lit-lazy-props.js +47 -0
- package/public/assets/js/lit-msg.js +1 -0
- package/public/assets/js/lit.js +3 -3
- package/public/assets/js/pds-manager.js +4 -4
- package/public/assets/js/pds.js +6 -6
- package/public/assets/pds/core/pds-manager.js +4 -4
- package/public/assets/pds/external/lit-lazy-props.js +47 -0
- package/public/assets/pds/external/lit-msg.js +1 -0
- package/public/assets/pds/external/lit.js +3 -3
- package/src/js/common/common.js +11 -0
- package/src/js/lit-lazy-props.js +54 -0
- package/src/js/lit-msg.js +1 -0
- package/src/js/lit.js +2 -55
- package/src/js/pds.d.ts +4 -0
- package/src/js/pds.js +22 -0
- package/stories/components/PdsFab.stories.js +1 -9
- package/stories/getting-started.md +2 -0
- package/stories/reference/reference-helpers.js +2 -2
- package/stories/utilities/Backdrop.stories.js +1 -1
- package/stories/utils/PdsAsk.stories.js +18 -5
- package/stories/utils/PdsParse.stories.js +67 -0
- package/stories/utils/PdsRuntime.stories.js +312 -0
- package/stories/utils/PdsToast.stories.js +79 -0
|
@@ -256,11 +256,7 @@ function generatePdsFabMarkup(fabElement) {
|
|
|
256
256
|
});
|
|
257
257
|
|
|
258
258
|
if (Array.isArray(fabElement.satellites) && fabElement.satellites.length > 0) {
|
|
259
|
-
|
|
260
|
-
fabElement.getAttribute?.('data-satellites-source') ||
|
|
261
|
-
fabElement.dataset?.satellitesSource ||
|
|
262
|
-
null;
|
|
263
|
-
attrs.push(satellitesSource || '.satellites=${satellites}');
|
|
259
|
+
attrs.push('${lazyProps({ satellites })}');
|
|
264
260
|
}
|
|
265
261
|
|
|
266
262
|
const formattedAttrs = attrs.length > 0
|
|
@@ -280,6 +276,7 @@ function generatePdsFabMarkup(fabElement) {
|
|
|
280
276
|
export const withHTMLExtractor = (storyFn, context) => {
|
|
281
277
|
const story = storyFn();
|
|
282
278
|
const channel = addons.getChannel();
|
|
279
|
+
let fabRetryCount = 0;
|
|
283
280
|
|
|
284
281
|
// Function to extract and send HTML
|
|
285
282
|
const extractAndSendHTML = async () => {
|
|
@@ -302,6 +299,17 @@ export const withHTMLExtractor = (storyFn, context) => {
|
|
|
302
299
|
const alerts = Array.from(container.querySelectorAll('.callout'));
|
|
303
300
|
let markup = '';
|
|
304
301
|
|
|
302
|
+
if (pdsFabElements.length > 0) {
|
|
303
|
+
const missingSatellites = pdsFabElements.some((fab) => !fab.satellites || fab.satellites.length === 0);
|
|
304
|
+
if (missingSatellites && fabRetryCount < 3) {
|
|
305
|
+
fabRetryCount += 1;
|
|
306
|
+
customElements.whenDefined('pds-fab').then(() => {
|
|
307
|
+
setTimeout(extractAndSendHTML, 100 * fabRetryCount);
|
|
308
|
+
});
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
305
313
|
// Include any alert/info boxes before the form
|
|
306
314
|
if (alerts.length > 0) {
|
|
307
315
|
alerts.forEach(alert => {
|
package/.storybook/manager.js
CHANGED
|
@@ -605,6 +605,8 @@ function matchesOntology(item, expandedTerms) {
|
|
|
605
605
|
addons.register(ADDON_ID, (api) => {
|
|
606
606
|
let currentQuery = '';
|
|
607
607
|
|
|
608
|
+
const reorderPdsObjectChildren = () => {};
|
|
609
|
+
|
|
608
610
|
const updateIndicator = (active, terms, noMatches = false) => {
|
|
609
611
|
let indicator = document.getElementById('pds-ontology-indicator');
|
|
610
612
|
if (!indicator) {
|
|
@@ -736,6 +738,8 @@ addons.register(ADDON_ID, (api) => {
|
|
|
736
738
|
const tree = document.getElementById('storybook-explorer-tree');
|
|
737
739
|
const hasVisibleItems = tree && tree.querySelector('[data-highlightable="true"]');
|
|
738
740
|
updateIndicator(true, expandedTerms, !hasVisibleItems);
|
|
741
|
+
|
|
742
|
+
reorderPdsObjectChildren();
|
|
739
743
|
|
|
740
744
|
document.querySelectorAll('#storybook-explorer-menu ol').forEach(ol => {
|
|
741
745
|
ol.style.display = 'none';
|
|
@@ -743,6 +747,10 @@ addons.register(ADDON_ID, (api) => {
|
|
|
743
747
|
}, 100);
|
|
744
748
|
};
|
|
745
749
|
|
|
750
|
+
api.on(STORY_CHANGED, () => {
|
|
751
|
+
setTimeout(reorderPdsObjectChildren, 0);
|
|
752
|
+
});
|
|
753
|
+
|
|
746
754
|
const hookSearch = () => {
|
|
747
755
|
const searchField = document.getElementById('storybook-explorer-searchfield');
|
|
748
756
|
if (!searchField) {
|
package/.storybook/preview.js
CHANGED
|
@@ -1391,29 +1391,9 @@ const preview = {
|
|
|
1391
1391
|
'About PDS',
|
|
1392
1392
|
['What Is PDS', 'Getting Started'],
|
|
1393
1393
|
'PDS',
|
|
1394
|
-
[
|
|
1395
|
-
'About PDS',
|
|
1396
|
-
['What Is PDS', 'Getting Started'],
|
|
1397
|
-
'Foundations',
|
|
1398
|
-
['Colors', 'Typography', 'HTML Defaults', 'Icons', 'Spacing', 'Smart Surfaces'],
|
|
1399
|
-
'Primitives',
|
|
1400
|
-
['Buttons', 'Forms', 'Form Groups', 'Alerts', 'Badges', 'Cards', 'Tables', 'Media', 'Accordion'],
|
|
1401
|
-
'Layout',
|
|
1402
|
-
['Overview', 'System'],
|
|
1403
|
-
'Utilities',
|
|
1404
|
-
['Grid System'],
|
|
1405
|
-
'Patterns',
|
|
1406
|
-
['Border Effects', 'Utilities'],
|
|
1407
|
-
'Enhancements',
|
|
1408
|
-
['Mesh Gradients', 'Interactive States', 'Toggles', 'Dropdowns', 'Range Sliders', 'Required Fields'],
|
|
1409
|
-
'Components',
|
|
1410
|
-
['pds-form', 'Pds Icon', 'Pds Drawer', 'Pds Toaster', 'Pds Tabstrip', 'Pds Splitpanel', 'Pds Scrollrow', 'Pds Richtext', 'Pds Upload'],
|
|
1411
|
-
'Reference'
|
|
1412
|
-
],
|
|
1413
|
-
'About PDS',
|
|
1414
|
-
['What is PDS', 'Getting Started'],
|
|
1394
|
+
['PDS Object', ['Docs', 'PDS.ask()', 'PDS.toast()', 'PDS.parse()']],
|
|
1415
1395
|
'Foundations',
|
|
1416
|
-
['Colors', 'Typography', 'HTML Defaults', 'Icons', 'Spacing', 'Smart Surfaces'],
|
|
1396
|
+
['Colors', 'Typography', 'HTML Defaults', 'Icons', 'Spacing', 'Smart Surfaces', 'Backdrop'],
|
|
1417
1397
|
'Primitives',
|
|
1418
1398
|
['Buttons', 'Forms', 'Form Groups', 'Alerts', 'Badges', 'Cards', 'Tables', 'Media', 'Accordion'],
|
|
1419
1399
|
'Layout',
|
package/dist/pds-reference.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-01-
|
|
2
|
+
"generatedAt": "2026-01-31T10:14:59.283Z",
|
|
3
3
|
"sources": {
|
|
4
4
|
"customElements": "custom-elements.json",
|
|
5
5
|
"ontology": "src\\js\\pds-core\\pds-ontology.js",
|
|
@@ -6767,8 +6767,8 @@
|
|
|
6767
6767
|
},
|
|
6768
6768
|
"backdrop": {
|
|
6769
6769
|
"slug": "backdrop",
|
|
6770
|
-
"storyTitle": "
|
|
6771
|
-
"category": "
|
|
6770
|
+
"storyTitle": "Foundations/Backdrop",
|
|
6771
|
+
"category": "Foundations",
|
|
6772
6772
|
"name": "Backdrop",
|
|
6773
6773
|
"description": "Backdrop utilities for modal overlays, drawers, and lightboxes. Provides consistent blur and dimming effects with light/dark variants.",
|
|
6774
6774
|
"tags": [
|
|
@@ -6791,73 +6791,76 @@
|
|
|
6791
6791
|
"packages\\pds-storybook\\stories\\utilities\\Backdrop.stories.js"
|
|
6792
6792
|
]
|
|
6793
6793
|
},
|
|
6794
|
-
"pds-
|
|
6795
|
-
"slug": "pds-
|
|
6796
|
-
"storyTitle": "
|
|
6797
|
-
"category": "
|
|
6798
|
-
"name": "PDS
|
|
6799
|
-
"description": "
|
|
6794
|
+
"pds-object": {
|
|
6795
|
+
"slug": "pds-object",
|
|
6796
|
+
"storyTitle": "PDS/PDS Object",
|
|
6797
|
+
"category": "PDS",
|
|
6798
|
+
"name": "PDS Object",
|
|
6799
|
+
"description": "Use <code>PDS.toast()</code> to show non-blocking notifications. The helper ensures a <code>pds-toaster</code> instance exists before displaying the message.",
|
|
6800
6800
|
"tags": [
|
|
6801
6801
|
"alert",
|
|
6802
|
+
"api",
|
|
6803
|
+
"autodocs",
|
|
6802
6804
|
"confirm",
|
|
6803
6805
|
"dialog",
|
|
6804
6806
|
"dialogs",
|
|
6807
|
+
"feedback",
|
|
6805
6808
|
"forms",
|
|
6806
6809
|
"interaction",
|
|
6807
6810
|
"modal",
|
|
6811
|
+
"notifications",
|
|
6808
6812
|
"overlay",
|
|
6813
|
+
"parse",
|
|
6814
|
+
"pds",
|
|
6809
6815
|
"pds-ask",
|
|
6816
|
+
"pds-parse",
|
|
6817
|
+
"pds-toast",
|
|
6810
6818
|
"popup",
|
|
6811
|
-
"prompt"
|
|
6819
|
+
"prompt",
|
|
6820
|
+
"reference",
|
|
6821
|
+
"runtime",
|
|
6822
|
+
"toast",
|
|
6823
|
+
"utilities"
|
|
6812
6824
|
],
|
|
6813
6825
|
"pdsParameters": {
|
|
6814
6826
|
"tags": [
|
|
6815
|
-
"
|
|
6816
|
-
"
|
|
6817
|
-
"
|
|
6818
|
-
"pds-
|
|
6819
|
-
"modal",
|
|
6820
|
-
"alert",
|
|
6821
|
-
"confirm",
|
|
6822
|
-
"prompt"
|
|
6827
|
+
"toast",
|
|
6828
|
+
"notifications",
|
|
6829
|
+
"feedback",
|
|
6830
|
+
"pds-toast"
|
|
6823
6831
|
]
|
|
6824
6832
|
},
|
|
6825
6833
|
"stories": [
|
|
6826
6834
|
{
|
|
6827
|
-
"exportName": "
|
|
6828
|
-
"name": "
|
|
6829
|
-
"id": "
|
|
6835
|
+
"exportName": "PDSAsk",
|
|
6836
|
+
"name": "PDS.ask()",
|
|
6837
|
+
"id": "pds-pds-object--pdsask",
|
|
6830
6838
|
"tags": [],
|
|
6831
6839
|
"description": null,
|
|
6832
6840
|
"source": "packages\\pds-storybook\\stories\\utils\\PdsAsk.stories.js"
|
|
6833
6841
|
},
|
|
6834
6842
|
{
|
|
6835
|
-
"exportName": "
|
|
6836
|
-
"name": "
|
|
6837
|
-
"id": "
|
|
6843
|
+
"exportName": "PDSParse",
|
|
6844
|
+
"name": "PDS.parse()",
|
|
6845
|
+
"id": "pds-pds-object--pdsparse",
|
|
6838
6846
|
"tags": [],
|
|
6839
6847
|
"description": null,
|
|
6840
|
-
"source": "packages\\pds-storybook\\stories\\utils\\
|
|
6848
|
+
"source": "packages\\pds-storybook\\stories\\utils\\PdsParse.stories.js"
|
|
6841
6849
|
},
|
|
6842
6850
|
{
|
|
6843
|
-
"exportName": "
|
|
6844
|
-
"name": "
|
|
6845
|
-
"id": "
|
|
6851
|
+
"exportName": "PDSToast",
|
|
6852
|
+
"name": "PDS.toast()",
|
|
6853
|
+
"id": "pds-pds-object--pdstoast",
|
|
6846
6854
|
"tags": [],
|
|
6847
6855
|
"description": null,
|
|
6848
|
-
"source": "packages\\pds-storybook\\stories\\utils\\
|
|
6849
|
-
},
|
|
6850
|
-
{
|
|
6851
|
-
"exportName": "MiniForm",
|
|
6852
|
-
"name": "Mini form submission",
|
|
6853
|
-
"id": "utilities-pds-ask--mini-form",
|
|
6854
|
-
"tags": [],
|
|
6855
|
-
"description": null,
|
|
6856
|
-
"source": "packages\\pds-storybook\\stories\\utils\\PdsAsk.stories.js"
|
|
6856
|
+
"source": "packages\\pds-storybook\\stories\\utils\\PdsToast.stories.js"
|
|
6857
6857
|
}
|
|
6858
6858
|
],
|
|
6859
6859
|
"files": [
|
|
6860
|
-
"packages\\pds-storybook\\stories\\utils\\PdsAsk.stories.js"
|
|
6860
|
+
"packages\\pds-storybook\\stories\\utils\\PdsAsk.stories.js",
|
|
6861
|
+
"packages\\pds-storybook\\stories\\utils\\PdsParse.stories.js",
|
|
6862
|
+
"packages\\pds-storybook\\stories\\utils\\PdsRuntime.stories.js",
|
|
6863
|
+
"packages\\pds-storybook\\stories\\utils\\PdsToast.stories.js"
|
|
6861
6864
|
]
|
|
6862
6865
|
},
|
|
6863
6866
|
"what-is-pds": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pure-ds/storybook",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.42",
|
|
4
4
|
"description": "Storybook showcase for Pure Design System with live configuration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"pds:build-icons": "pds-build-icons"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@pure-ds/core": "^0.5.
|
|
41
|
+
"@pure-ds/core": "^0.5.42"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|