@pure-ds/storybook 0.7.23 → 0.7.26
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/htmlPreview.css +8 -0
- package/.storybook/preview.js +27 -5
- package/dist/pds-reference.json +2302 -1031
- package/package.json +2 -2
- package/public/assets/js/app.js +1 -1
- package/public/assets/js/pds-ask.js +6 -6
- package/public/assets/js/pds-enhancers.js +1 -1
- package/public/assets/js/pds-manager.js +129 -54
- package/public/assets/pds/components/pds-calendar.js +91 -159
- package/public/assets/pds/components/pds-daterange.js +683 -0
- package/public/assets/pds/components/pds-form.js +123 -21
- package/public/assets/pds/components/pds-live-edit.js +3 -8
- package/public/assets/pds/components/pds-omnibox.js +37 -1
- package/public/assets/pds/components/pds-rating.js +648 -0
- package/public/assets/pds/components/pds-tags.js +802 -0
- package/public/assets/pds/components/pds-toaster.js +35 -1
- package/public/assets/pds/core/pds-ask.js +6 -6
- package/public/assets/pds/core/pds-enhancers.js +1 -1
- package/public/assets/pds/core/pds-manager.js +129 -54
- package/public/assets/pds/custom-elements.json +1099 -74
- package/public/assets/pds/pds-css-complete.json +7 -2
- package/public/assets/pds/pds-runtime-config.json +1 -1
- package/public/assets/pds/pds.css-data.json +4 -4
- package/public/assets/pds/styles/pds-components.css +96 -24
- package/public/assets/pds/styles/pds-components.css.js +192 -48
- package/public/assets/pds/styles/pds-primitives.css +6 -3
- package/public/assets/pds/styles/pds-primitives.css.js +12 -6
- package/public/assets/pds/styles/pds-styles.css +104 -29
- package/public/assets/pds/styles/pds-styles.css.js +208 -58
- package/public/assets/pds/styles/pds-utilities.css +2 -2
- package/public/assets/pds/styles/pds-utilities.css.js +4 -4
- package/public/assets/pds/vscode-custom-data.json +97 -0
- package/src/js/common/ask.js +122 -12
- package/src/js/pds-core/pds-enhancers.js +53 -8
- package/src/js/pds-core/pds-generator.js +104 -29
- package/src/js/pds-core/pds-live.js +5 -0
- package/src/js/pds-core/pds-ontology.js +2 -2
- package/stories/WhatIsPDS.md +1 -1
- package/stories/components/PdsCalendar.stories.js +650 -168
- package/stories/components/PdsDaterange.stories.js +85 -0
- package/stories/components/PdsForm.Basics.stories.js +16 -0
- package/stories/components/PdsForm.ConditionalAndCalculated.stories.js +16 -0
- package/stories/components/PdsForm.CustomContent.stories.js +10 -0
- package/stories/components/PdsForm.Dialogs.stories.js +7 -0
- package/stories/components/PdsForm.Layout.stories.js +16 -0
- package/stories/components/PdsForm.SelectionAndArrays.stories.js +12 -0
- package/stories/components/PdsForm.stories.js +179 -235
- package/stories/components/PdsIcon.stories.js +17 -7
- package/stories/components/PdsOmnibox.stories.js +2 -133
- package/stories/components/PdsRating.stories.js +126 -0
- package/stories/components/PdsTags.stories.js +224 -0
- package/stories/components/PdsToaster.stories.js +37 -117
- package/stories/components/omnibox-countries-api-settings.js +63 -0
- package/stories/enhancements/Accordion.stories.js +34 -39
- package/stories/enhancements/_enhancement-header.js +1 -1
- package/stories/foundations/Colors.stories.js +6 -1
- package/stories/foundations/Dividers.stories.js +2 -2
- package/stories/foundations/HTMLDefaults.stories.js +16 -16
- package/stories/foundations/Icons.stories.js +14 -14
- package/stories/foundations/MeshGradients.stories.js +13 -3
- package/stories/foundations/SmartSurfaces.stories.js +50 -36
- package/stories/foundations/Typography.stories.js +30 -108
- package/stories/foundations/ZIndex.stories.js +9 -9
- package/stories/layout/LayoutOverview.stories.js +3 -3
- package/stories/layout/LayoutSystem.stories.js +37 -31
- package/stories/patterns/BorderEffects.stories.js +28 -16
- package/stories/patterns/InteractiveStates.stories.js +42 -27
- package/stories/patterns/Utilities.stories.js +45 -23
- package/stories/primitives/ArticleLayout.stories.js +176 -0
- package/stories/primitives/Badges.stories.js +24 -8
- package/stories/primitives/Buttons.stories.js +29 -9
- package/stories/primitives/Callouts.stories.js +13 -12
- package/stories/primitives/Cards.stories.js +17 -10
- package/stories/primitives/FormElements.stories.js +8 -2
- package/stories/primitives/HtmlFormElements.stories.js +8 -2
- package/stories/primitives/HtmlFormGroups.stories.js +5 -2
- package/stories/primitives/Media.stories.js +47 -33
- package/stories/primitives/Tables.stories.js +25 -7
- package/stories/utilities/Backdrop.stories.js +4 -4
- package/stories/utils/PdsAsk.stories.js +17 -5
- package/stories/utils/PdsObjectApi.stories.js +716 -0
- package/stories/utils/PdsParse.stories.js +14 -5
- package/stories/utils/PdsToast.stories.js +23 -9
package/.storybook/preview.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { addons } from '@storybook/preview-api';
|
|
2
2
|
import { SELECT_STORY, UPDATE_GLOBALS } from '@storybook/core-events';
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import { html } from 'lit';
|
|
4
5
|
import { Title, Subtitle, Description as DocsDescription, Controls } from '@storybook/blocks';
|
|
5
6
|
import { PDS } from '@pds-src/js/pds.js';
|
|
6
7
|
import { presets } from '@pds-src/js/pds-core/pds-config.js';
|
|
@@ -1424,6 +1425,26 @@ const withRelatedStories = (story, context) => {
|
|
|
1424
1425
|
return result;
|
|
1425
1426
|
};
|
|
1426
1427
|
|
|
1428
|
+
const withComponentStoryHeader = (story, context) => {
|
|
1429
|
+
if (context.viewMode !== 'story') return story();
|
|
1430
|
+
|
|
1431
|
+
const titlePath = context.title || '';
|
|
1432
|
+
if (!titlePath.startsWith('Components/')) return story();
|
|
1433
|
+
|
|
1434
|
+
const tagName = titlePath.split('/').pop() || 'component';
|
|
1435
|
+
const storyTitle = context.name || 'Story';
|
|
1436
|
+
|
|
1437
|
+
return html`
|
|
1438
|
+
<div class="stack-md">
|
|
1439
|
+
<header>
|
|
1440
|
+
<h2>${tagName}</h2>
|
|
1441
|
+
<small class="text-muted">${storyTitle}</small>
|
|
1442
|
+
</header>
|
|
1443
|
+
${story()}
|
|
1444
|
+
</div>
|
|
1445
|
+
`;
|
|
1446
|
+
};
|
|
1447
|
+
|
|
1427
1448
|
const DocsPage = () => React.createElement(
|
|
1428
1449
|
React.Fragment,
|
|
1429
1450
|
null,
|
|
@@ -1435,7 +1456,7 @@ const DocsPage = () => React.createElement(
|
|
|
1435
1456
|
|
|
1436
1457
|
/** @type { import('@storybook/web-components').Preview } */
|
|
1437
1458
|
const preview = {
|
|
1438
|
-
decorators: [withGlobalsHandler, withPDS, withHTMLExtractor, withDescription, withRelatedStories],
|
|
1459
|
+
decorators: [withGlobalsHandler, withPDS, withHTMLExtractor, withDescription, withComponentStoryHeader, withRelatedStories],
|
|
1439
1460
|
parameters: {
|
|
1440
1461
|
controls: {
|
|
1441
1462
|
matchers: {
|
|
@@ -1457,6 +1478,7 @@ const preview = {
|
|
|
1457
1478
|
},
|
|
1458
1479
|
options: {
|
|
1459
1480
|
storySort: {
|
|
1481
|
+
method: 'alphabetical',
|
|
1460
1482
|
order: [
|
|
1461
1483
|
'About PDS',
|
|
1462
1484
|
['What Is PDS', 'Getting Started'],
|
|
@@ -1467,7 +1489,7 @@ const preview = {
|
|
|
1467
1489
|
'Foundations',
|
|
1468
1490
|
['Colors', 'Typography', 'HTML Defaults', 'Icons', 'Spacing', 'Smart Surfaces'],
|
|
1469
1491
|
'Primitives',
|
|
1470
|
-
['Buttons', 'Forms', 'Form Groups', 'Alerts', 'Badges', 'Cards', 'Tables', 'Media', 'Accordion'],
|
|
1492
|
+
['Buttons', 'Forms', 'Form Groups', 'Alerts', 'Badges', 'Cards', 'Articles', 'Tables', 'Media', 'Accordion'],
|
|
1471
1493
|
'Layout',
|
|
1472
1494
|
['Overview', 'System'],
|
|
1473
1495
|
'Utilities',
|
|
@@ -1477,7 +1499,7 @@ const preview = {
|
|
|
1477
1499
|
'Enhancements',
|
|
1478
1500
|
['Mesh Gradients', 'Interactive States', 'Toggles', 'Dropdowns', 'Range Sliders', 'Required Fields'],
|
|
1479
1501
|
'Components',
|
|
1480
|
-
['
|
|
1502
|
+
['*'],
|
|
1481
1503
|
'Reference'
|
|
1482
1504
|
],
|
|
1483
1505
|
'About PDS',
|
|
@@ -1485,7 +1507,7 @@ const preview = {
|
|
|
1485
1507
|
'Foundations',
|
|
1486
1508
|
['Colors', 'Typography', 'HTML Defaults', 'Icons', 'Spacing', 'Smart Surfaces'],
|
|
1487
1509
|
'Primitives',
|
|
1488
|
-
['Buttons', 'Forms', 'Form Groups', 'Alerts', 'Badges', 'Cards', 'Tables', 'Media', 'Accordion'],
|
|
1510
|
+
['Buttons', 'Forms', 'Form Groups', 'Alerts', 'Badges', 'Cards', 'Articles', 'Tables', 'Media', 'Accordion'],
|
|
1489
1511
|
'Layout',
|
|
1490
1512
|
['Overview', 'System'],
|
|
1491
1513
|
'Utilities',
|
|
@@ -1495,7 +1517,7 @@ const preview = {
|
|
|
1495
1517
|
'Enhancements',
|
|
1496
1518
|
['Mesh Gradients', 'Interactive States', 'Toggles', 'Dropdowns', 'Range Sliders', 'Required Fields'],
|
|
1497
1519
|
'Components',
|
|
1498
|
-
['
|
|
1520
|
+
['*'],
|
|
1499
1521
|
'Reference',
|
|
1500
1522
|
'*'
|
|
1501
1523
|
]
|