@pure-ds/storybook 0.7.1 → 0.7.19

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 (83) hide show
  1. package/.storybook/addons/html-preview/preview.js +1 -1
  2. package/.storybook/main.js +19 -12
  3. package/dist/pds-reference.json +205 -234
  4. package/package.json +2 -2
  5. package/public/assets/js/app.js +4 -4
  6. package/public/assets/js/pds-auto-definer.js +306 -1
  7. package/public/assets/js/pds-manager.js +156 -172
  8. package/public/assets/js/pds.js +2 -2
  9. package/public/assets/pds/components/pds-calendar.js +19 -11
  10. package/public/assets/pds/components/pds-form.js +85 -2
  11. package/public/assets/pds/components/pds-omnibox.js +9 -6
  12. package/public/assets/pds/components/pds-scrollrow.js +2 -4
  13. package/public/assets/pds/components/pds-treeview.js +321 -24
  14. package/public/assets/pds/core/pds-manager.js +156 -172
  15. package/public/assets/pds/core.js +2 -2
  16. package/public/assets/pds/custom-elements.json +77 -46
  17. package/public/assets/pds/pds-css-complete.json +2 -2
  18. package/public/assets/pds/pds-runtime-config.json +12 -12
  19. package/public/assets/pds/pds.css-data.json +1 -1
  20. package/public/assets/pds/styles/pds-styles.css +4 -65
  21. package/public/assets/pds/styles/pds-styles.css.js +8 -130
  22. package/public/assets/pds/styles/pds-tokens.css +3 -3
  23. package/public/assets/pds/styles/pds-tokens.css.js +6 -6
  24. package/public/assets/pds/styles/pds-utilities.css +1 -62
  25. package/public/assets/pds/styles/pds-utilities.css.js +2 -124
  26. package/public/assets/pds/vscode-custom-data.json +9 -13
  27. package/src/js/common/pds-core/pds.d.ts +1 -0
  28. package/src/js/pds-core/pds-config.js +1 -0
  29. package/src/js/pds-core/pds-generator.js +10 -8
  30. package/src/js/pds-core/pds-live.js +1 -16
  31. package/src/js/pds-core/pds-ontology.js +2 -2
  32. package/src/js/pds-core/pds-runtime.js +18 -2
  33. package/src/js/pds-core/pds-start-helpers.js +53 -27
  34. package/src/js/pds.d.ts +1 -1
  35. package/src/js/pds.js +0 -4
  36. package/stories/components/PdsCalendar.stories.js +1 -1
  37. package/stories/components/PdsDrawer.stories.js +1 -1
  38. package/stories/components/PdsFab.stories.js +2 -1
  39. package/stories/components/PdsForm.stories.js +157 -71
  40. package/stories/components/PdsIcon.stories.js +2 -2
  41. package/stories/components/PdsOmnibox.stories.js +212 -40
  42. package/stories/components/PdsRichtext.stories.js +2 -2
  43. package/stories/components/PdsScrollrow.stories.js +5 -5
  44. package/stories/components/PdsSplitpanel.stories.js +5 -5
  45. package/stories/components/PdsTabstrip.stories.js +7 -7
  46. package/stories/components/PdsTheme/PdsTheme.stories.js +1 -1
  47. package/stories/components/PdsToaster.stories.js +1 -1
  48. package/stories/components/PdsTreeview.stories.js +202 -21
  49. package/stories/components/PdsUpload.stories.js +1 -1
  50. package/stories/enhancements/Accordion.stories.js +8 -8
  51. package/stories/enhancements/ButtonWorking.stories.js +1 -1
  52. package/stories/enhancements/Clip.stories.js +1 -1
  53. package/stories/enhancements/ColorInput.stories.js +3 -3
  54. package/stories/enhancements/Dropdowns.stories.js +4 -4
  55. package/stories/enhancements/OpenGroups.stories.js +5 -5
  56. package/stories/enhancements/RangeSliders.stories.js +6 -6
  57. package/stories/enhancements/RequiredFields.stories.js +1 -1
  58. package/stories/enhancements/Toggles.stories.js +2 -2
  59. package/stories/foundations/Dividers.stories.js +12 -12
  60. package/stories/foundations/Icons.stories.js +29 -29
  61. package/stories/foundations/MeshGradients.stories.js +2 -2
  62. package/stories/foundations/SmartSurfaces.stories.js +36 -36
  63. package/stories/foundations/Typography.stories.js +87 -227
  64. package/stories/foundations/ZIndex.stories.js +3 -3
  65. package/stories/layout/LayoutSystem.stories.js +1 -1
  66. package/stories/patterns/BorderEffects.stories.js +4 -4
  67. package/stories/patterns/InteractiveStates.stories.js +1 -1
  68. package/stories/patterns/Utilities.stories.js +3 -3
  69. package/stories/primitives/Badges.stories.js +5 -5
  70. package/stories/primitives/Buttons.stories.js +6 -6
  71. package/stories/primitives/Callouts.stories.js +13 -13
  72. package/stories/primitives/Cards.stories.js +6 -6
  73. package/stories/primitives/FormElements.stories.js +1 -1
  74. package/stories/primitives/HtmlFormElements.stories.js +6 -4
  75. package/stories/primitives/HtmlFormGroups.stories.js +10 -10
  76. package/stories/primitives/Media.stories.js +1 -1
  77. package/stories/primitives/Tables.stories.js +5 -5
  78. package/stories/utils/PdsParse.stories.js +2 -8
  79. package/stories/utils/PdsToast.stories.js +3 -7
  80. package/stories/utils/toast-utils.js +2 -0
  81. package/public/assets/pds/core/pds-auto-definer.js +0 -1
  82. package/src/js/pds-auto-definer.js +0 -1
  83. package/stories/foundations/Spacing.stories.js +0 -179
@@ -247,7 +247,7 @@ function generatePdsOmniboxMarkup(omniboxElement) {
247
247
  function generatePdsTreeviewMarkup(treeviewElement) {
248
248
  const attrs = [];
249
249
 
250
- const stringAttrs = ['name', 'value', 'src'];
250
+ const stringAttrs = ['name', 'value', 'src', 'multiselect'];
251
251
  stringAttrs.forEach((attr) => {
252
252
  const value = treeviewElement.getAttribute(attr);
253
253
  if (value !== null && value !== undefined && value !== '') {
@@ -67,12 +67,19 @@ const config = {
67
67
  process.cwd()
68
68
  ];
69
69
 
70
- // Ensure Lit import alias is resolved to PDS bundle
71
- const aliases = {
72
- ...config.resolve.alias,
73
- '#pds': resolve(pdsSrcPath, 'js/pds.js'),
74
- '#pds/lit': resolve(pdsSrcPath, 'js/lit.js'),
75
- };
70
+ config.resolve = config.resolve || {};
71
+
72
+ // Ensure virtual import aliases resolve consistently.
73
+ // Use exact-match regex for #pds so it does not capture #pds/lit.
74
+ const existingAliases = Array.isArray(config.resolve.alias)
75
+ ? [...config.resolve.alias]
76
+ : Object.entries(config.resolve.alias || {}).map(([find, replacement]) => ({ find, replacement }));
77
+
78
+ const aliases = [
79
+ { find: '#pds/lit', replacement: resolve(pdsSrcPath, 'js/lit.js') },
80
+ { find: /^#pds$/, replacement: resolve(pdsSrcPath, 'js/pds.js') },
81
+ ...existingAliases,
82
+ ];
76
83
 
77
84
  // In monorepo, map the local src folder to the monorepo root src folder
78
85
  // This eliminates the need for a copied src folder during development
@@ -80,15 +87,15 @@ const config = {
80
87
  aliases[resolve(currentDirname, '../src')] = pdsSrcPath;
81
88
  }
82
89
 
83
- aliases['@pds-src'] = pdsSrcPath;
90
+ aliases.push({ find: '@pds-src', replacement: pdsSrcPath });
84
91
  config.resolve.alias = aliases;
85
92
 
86
93
  // Alias for relative paths to src (handles ../../../src in stories)
87
94
  // This allows stories to work in both monorepo (where ../../../src is valid)
88
95
  // and package (where it needs to be mapped to the local src folder)
89
96
  // Note: We use a regex to catch varying depths of ../
90
- config.resolve.alias['../../../src'] = pdsSrcPath;
91
- config.resolve.alias['../../../../src'] = pdsSrcPath;
97
+ config.resolve.alias.push({ find: '../../../src', replacement: pdsSrcPath });
98
+ config.resolve.alias.push({ find: '../../../../src', replacement: pdsSrcPath });
92
99
 
93
100
  // Also handle the case where the import is exactly 'D:\Code\pure\pure-ds\packages\src\js\common\ask.js'
94
101
  // which seems to be happening in the error log:
@@ -169,15 +176,15 @@ const config = {
169
176
 
170
177
  // I will change it back to `../../../../src`.
171
178
 
172
- config.resolve.alias['../../../../src'] = pdsSrcPath;
179
+ config.resolve.alias.push({ find: '../../../../src', replacement: pdsSrcPath });
173
180
 
174
181
  // Try to resolve user's pds.config.js
175
182
  const userConfigPath = resolve(process.cwd(), 'pds.config.js');
176
183
  if (fs.existsSync(userConfigPath)) {
177
- config.resolve.alias['@user/pds-config'] = userConfigPath;
184
+ config.resolve.alias.push({ find: '@user/pds-config', replacement: userConfigPath });
178
185
  } else {
179
186
  // Fallback to a default config file if user config doesn't exist
180
- config.resolve.alias['@user/pds-config'] = resolve(currentDirname, '../default-pds.config.js');
187
+ config.resolve.alias.push({ find: '@user/pds-config', replacement: resolve(currentDirname, '../default-pds.config.js') });
181
188
  }
182
189
 
183
190
  // Support absolute path imports like: import { html } from '/assets/pds/external/lit.js';