@pure-ds/storybook 0.5.48 → 0.5.50

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/.storybook/addons/description/register.js +60 -61
  2. package/.storybook/addons/html-preview/preview.js +418 -426
  3. package/.storybook/addons/html-preview/register.js +16 -41
  4. package/.storybook/addons/pds-configurator/SearchTool.js +12 -14
  5. package/.storybook/addons/pds-configurator/Tool.js +11 -15
  6. package/.storybook/addons/pds-configurator/register.js +4 -3
  7. package/.storybook/main.js +4 -35
  8. package/.storybook/manager.js +866 -874
  9. package/.storybook/preview.js +22 -2
  10. package/bin/index.js +135 -135
  11. package/dist/pds-reference.json +70 -41
  12. package/package.json +2 -2
  13. package/public/assets/js/app.js +12 -12
  14. package/public/assets/js/lit.js +3 -3
  15. package/public/assets/js/pds-manager.js +4 -4
  16. package/public/assets/js/pds.js +6 -6
  17. package/public/assets/pds/core/pds-manager.js +4 -4
  18. package/public/assets/pds/external/lit.js +3 -3
  19. package/src/js/common/common.js +112 -123
  20. package/src/js/lit.js +93 -40
  21. package/src/js/pds.js +0 -22
  22. package/stories/components/PdsFab.stories.js +625 -617
  23. package/stories/getting-started.md +194 -196
  24. package/stories/reference/reference-helpers.js +278 -278
  25. package/stories/utilities/Backdrop.stories.js +238 -238
  26. package/stories/utils/PdsAsk.stories.js +5 -18
  27. package/stories/utils/PdsParse.stories.js +1 -1
  28. package/stories/utils/PdsToast.stories.js +1 -1
  29. package/.storybook/addons/description/register.cjs +0 -61
  30. package/.storybook/addons/html-preview/constants.cjs +0 -12
  31. package/.storybook/addons/html-preview/register.cjs +0 -41
  32. package/.storybook/addons/package.json +0 -3
  33. package/.storybook/addons/pds-configurator/SearchTool.cjs +0 -47
  34. package/.storybook/addons/pds-configurator/Tool.cjs +0 -36
  35. package/.storybook/addons/pds-configurator/constants.cjs +0 -16
  36. package/.storybook/addons/pds-configurator/register.cjs +0 -12
  37. package/public/assets/pds/external/lit-lazy-props.js +0 -47
  38. package/public/assets/pds/external/lit-msg.js +0 -1
  39. package/src/js/lit-lazy-props.js +0 -54
  40. package/src/js/lit-msg.js +0 -1
  41. package/stories/utils/PdsRuntime.stories.js +0 -312
@@ -1,61 +1,60 @@
1
- const React = require('react');
2
- const { addons, types } = require('@storybook/manager-api');
3
- const { AddonPanel } = require('@storybook/components');
4
- const { Markdown } = require('@storybook/blocks');
5
-
6
- const ADDON_ID = 'pds-description';
7
- const PANEL_ID = `${ADDON_ID}/panel`;
8
-
9
- const DescriptionPanel = () => {
10
- const [description, setDescription] = React.useState('');
11
- const [title, setTitle] = React.useState('');
12
-
13
- React.useEffect(() => {
14
- const channel = addons.getChannel();
15
-
16
- const updateDescription = (data) => {
17
- setTitle(data.title || '');
18
- setDescription(data.description || 'No description available.');
19
- };
20
-
21
- channel.on('pds-description/update', updateDescription);
22
-
23
- return () => {
24
- channel.removeListener('pds-description/update', updateDescription);
25
- };
26
- }, []);
27
-
28
- return React.createElement(
29
- 'div',
30
- {
31
- style: {
32
- padding: '1rem',
33
- height: '100%',
34
- overflow: 'auto'
35
- }
36
- },
37
- React.createElement(
38
- 'div',
39
- { style: { marginBottom: '0.5rem' } },
40
- React.createElement(
41
- 'strong',
42
- { style: { fontSize: '1rem' } },
43
- title
44
- )
45
- ),
46
- React.createElement(Markdown, null, description)
47
- );
48
- };
49
-
50
- addons.register(ADDON_ID, () => {
51
- addons.add(PANEL_ID, {
52
- type: types.PANEL,
53
- title: 'Description',
54
- render: ({ active }) =>
55
- React.createElement(
56
- AddonPanel,
57
- { active },
58
- React.createElement(DescriptionPanel)
59
- )
60
- });
61
- });
1
+ import { addons, types } from '@storybook/manager-api';
2
+ import { AddonPanel } from '@storybook/components';
3
+ import React, { useEffect, useState } from 'react';
4
+ import { Markdown } from '@storybook/blocks';
5
+
6
+ const ADDON_ID = 'pds-description';
7
+ const PANEL_ID = `${ADDON_ID}/panel`;
8
+
9
+ const DescriptionPanel = () => {
10
+ const [description, setDescription] = useState('');
11
+ const [title, setTitle] = useState('');
12
+
13
+ useEffect(() => {
14
+ const channel = addons.getChannel();
15
+
16
+ const updateDescription = (data) => {
17
+ setTitle(data.title || '');
18
+ setDescription(data.description || 'No description available.');
19
+ };
20
+
21
+ channel.on('pds-description/update', updateDescription);
22
+
23
+ return () => {
24
+ channel.removeListener('pds-description/update', updateDescription);
25
+ };
26
+ }, []);
27
+
28
+ return React.createElement('div', {
29
+ style: {
30
+ padding: '1rem',
31
+ height: '100%',
32
+ overflow: 'auto'
33
+ }
34
+ },
35
+ React.createElement('div', {
36
+ style: {
37
+ marginBottom: '0.5rem'
38
+ }
39
+ },
40
+ React.createElement('strong', {
41
+ style: {
42
+ fontSize: '1rem'
43
+ }
44
+ }, title)
45
+ ),
46
+ React.createElement(Markdown, null, description)
47
+ );
48
+ };
49
+
50
+ addons.register(ADDON_ID, () => {
51
+ addons.add(PANEL_ID, {
52
+ type: types.PANEL,
53
+ title: 'Description',
54
+ render: ({ active }) => {
55
+ return React.createElement(AddonPanel, { active },
56
+ React.createElement(DescriptionPanel)
57
+ );
58
+ }
59
+ });
60
+ });