@pure-ds/core 0.3.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 (129) hide show
  1. package/CSS-INTELLISENSE-LIMITATION.md +98 -0
  2. package/CSS-INTELLISENSE-QUICK-REF.md +238 -0
  3. package/INTELLISENSE.md +384 -0
  4. package/LICENSE +15 -0
  5. package/custom-elements-manifest.config.js +30 -0
  6. package/custom-elements.json +2003 -0
  7. package/dist/types/index.d.ts +2 -0
  8. package/dist/types/packages/pds-configurator/src/figma-export.d.ts +13 -0
  9. package/dist/types/packages/pds-configurator/src/figma-export.d.ts.map +1 -0
  10. package/dist/types/packages/pds-configurator/src/pds-config-form.d.ts +2 -0
  11. package/dist/types/packages/pds-configurator/src/pds-config-form.d.ts.map +1 -0
  12. package/dist/types/packages/pds-configurator/src/pds-configurator.d.ts +2 -0
  13. package/dist/types/packages/pds-configurator/src/pds-configurator.d.ts.map +1 -0
  14. package/dist/types/packages/pds-configurator/src/pds-demo.d.ts +2 -0
  15. package/dist/types/packages/pds-configurator/src/pds-demo.d.ts.map +1 -0
  16. package/dist/types/pds.config.d.ts +13 -0
  17. package/dist/types/pds.config.d.ts.map +1 -0
  18. package/dist/types/pds.d.ts +408 -0
  19. package/dist/types/public/assets/js/app.d.ts +2 -0
  20. package/dist/types/public/assets/js/app.d.ts.map +1 -0
  21. package/dist/types/public/assets/js/pds.d.ts +23 -0
  22. package/dist/types/public/assets/js/pds.d.ts.map +1 -0
  23. package/dist/types/public/assets/pds/components/pds-calendar.d.ts +23 -0
  24. package/dist/types/public/assets/pds/components/pds-calendar.d.ts.map +1 -0
  25. package/dist/types/public/assets/pds/components/pds-drawer.d.ts +2 -0
  26. package/dist/types/public/assets/pds/components/pds-drawer.d.ts.map +1 -0
  27. package/dist/types/public/assets/pds/components/pds-icon.d.ts +53 -0
  28. package/dist/types/public/assets/pds/components/pds-icon.d.ts.map +1 -0
  29. package/dist/types/public/assets/pds/components/pds-jsonform.d.ts +104 -0
  30. package/dist/types/public/assets/pds/components/pds-jsonform.d.ts.map +1 -0
  31. package/dist/types/public/assets/pds/components/pds-richtext.d.ts +121 -0
  32. package/dist/types/public/assets/pds/components/pds-richtext.d.ts.map +1 -0
  33. package/dist/types/public/assets/pds/components/pds-scrollrow.d.ts +61 -0
  34. package/dist/types/public/assets/pds/components/pds-scrollrow.d.ts.map +1 -0
  35. package/dist/types/public/assets/pds/components/pds-splitpanel.d.ts +1 -0
  36. package/dist/types/public/assets/pds/components/pds-splitpanel.d.ts.map +1 -0
  37. package/dist/types/public/assets/pds/components/pds-tabstrip.d.ts +39 -0
  38. package/dist/types/public/assets/pds/components/pds-tabstrip.d.ts.map +1 -0
  39. package/dist/types/public/assets/pds/components/pds-toaster.d.ts +111 -0
  40. package/dist/types/public/assets/pds/components/pds-toaster.d.ts.map +1 -0
  41. package/dist/types/public/assets/pds/components/pds-upload.d.ts +83 -0
  42. package/dist/types/public/assets/pds/components/pds-upload.d.ts.map +1 -0
  43. package/dist/types/src/js/app.d.ts +2 -0
  44. package/dist/types/src/js/app.d.ts.map +1 -0
  45. package/dist/types/src/js/common/ask.d.ts +22 -0
  46. package/dist/types/src/js/common/ask.d.ts.map +1 -0
  47. package/dist/types/src/js/common/common.d.ts +3 -0
  48. package/dist/types/src/js/common/common.d.ts.map +1 -0
  49. package/dist/types/src/js/common/font-loader.d.ts +24 -0
  50. package/dist/types/src/js/common/font-loader.d.ts.map +1 -0
  51. package/dist/types/src/js/common/msg.d.ts +3 -0
  52. package/dist/types/src/js/common/msg.d.ts.map +1 -0
  53. package/dist/types/src/js/lit.d.ts +25 -0
  54. package/dist/types/src/js/lit.d.ts.map +1 -0
  55. package/dist/types/src/js/pds-configurator/figma-export.d.ts +13 -0
  56. package/dist/types/src/js/pds-configurator/figma-export.d.ts.map +1 -0
  57. package/dist/types/src/js/pds-configurator/pds-config-form.d.ts +2 -0
  58. package/dist/types/src/js/pds-configurator/pds-config-form.d.ts.map +1 -0
  59. package/dist/types/src/js/pds-configurator/pds-configurator.d.ts +2 -0
  60. package/dist/types/src/js/pds-configurator/pds-configurator.d.ts.map +1 -0
  61. package/dist/types/src/js/pds-configurator/pds-demo.d.ts +2 -0
  62. package/dist/types/src/js/pds-configurator/pds-demo.d.ts.map +1 -0
  63. package/dist/types/src/js/pds-core/pds-config.d.ts +758 -0
  64. package/dist/types/src/js/pds-core/pds-config.d.ts.map +1 -0
  65. package/dist/types/src/js/pds-core/pds-enhancer-metadata.d.ts +6 -0
  66. package/dist/types/src/js/pds-core/pds-enhancer-metadata.d.ts.map +1 -0
  67. package/dist/types/src/js/pds-core/pds-enhancers.d.ts +14 -0
  68. package/dist/types/src/js/pds-core/pds-enhancers.d.ts.map +1 -0
  69. package/dist/types/src/js/pds-core/pds-enums.d.ts +87 -0
  70. package/dist/types/src/js/pds-core/pds-enums.d.ts.map +1 -0
  71. package/dist/types/src/js/pds-core/pds-generator.d.ts +741 -0
  72. package/dist/types/src/js/pds-core/pds-generator.d.ts.map +1 -0
  73. package/dist/types/src/js/pds-core/pds-ontology.d.ts +48 -0
  74. package/dist/types/src/js/pds-core/pds-ontology.d.ts.map +1 -0
  75. package/dist/types/src/js/pds-core/pds-paths.d.ts +37 -0
  76. package/dist/types/src/js/pds-core/pds-paths.d.ts.map +1 -0
  77. package/dist/types/src/js/pds-core/pds-query.d.ts +102 -0
  78. package/dist/types/src/js/pds-core/pds-query.d.ts.map +1 -0
  79. package/dist/types/src/js/pds-core/pds-registry.d.ts +40 -0
  80. package/dist/types/src/js/pds-core/pds-registry.d.ts.map +1 -0
  81. package/dist/types/src/js/pds.d.ts +109 -0
  82. package/dist/types/src/js/pds.d.ts.map +1 -0
  83. package/dist/types/src/pds-core/pds-api.d.ts +31 -0
  84. package/dist/types/src/pds-core/pds-api.d.ts.map +1 -0
  85. package/package.json +104 -0
  86. package/packages/pds-cli/README.md +15 -0
  87. package/packages/pds-cli/bin/generate-css-data.js +565 -0
  88. package/packages/pds-cli/bin/generate-manifest.js +352 -0
  89. package/packages/pds-cli/bin/pds-build-icons.js +152 -0
  90. package/packages/pds-cli/bin/pds-dx.js +114 -0
  91. package/packages/pds-cli/bin/pds-static.js +556 -0
  92. package/packages/pds-cli/bin/pds.js +127 -0
  93. package/packages/pds-cli/bin/postinstall.js +380 -0
  94. package/packages/pds-cli/bin/sync-assets.js +252 -0
  95. package/packages/pds-cli/lib/asset-roots.js +47 -0
  96. package/packages/pds-cli/lib/fs-writer.js +75 -0
  97. package/pds.css-data.json +5 -0
  98. package/pds.html-data.json +5 -0
  99. package/public/assets/js/app.js +5719 -0
  100. package/public/assets/js/lit.js +131 -0
  101. package/public/assets/js/pds.js +3423 -0
  102. package/public/assets/pds/components/pds-calendar.js +837 -0
  103. package/public/assets/pds/components/pds-drawer.js +857 -0
  104. package/public/assets/pds/components/pds-icon.js +338 -0
  105. package/public/assets/pds/components/pds-jsonform.js +1775 -0
  106. package/public/assets/pds/components/pds-richtext.js +1035 -0
  107. package/public/assets/pds/components/pds-scrollrow.js +331 -0
  108. package/public/assets/pds/components/pds-splitpanel.js +401 -0
  109. package/public/assets/pds/components/pds-tabstrip.js +251 -0
  110. package/public/assets/pds/components/pds-toaster.js +446 -0
  111. package/public/assets/pds/components/pds-upload.js +657 -0
  112. package/public/assets/pds/custom-elements.json +2003 -0
  113. package/public/assets/pds/icons/pds-icons.svg +498 -0
  114. package/public/assets/pds/pds-css-complete.json +1861 -0
  115. package/public/assets/pds/pds.css-data.json +2152 -0
  116. package/public/assets/pds/vscode-custom-data.json +824 -0
  117. package/readme.md +1870 -0
  118. package/src/js/pds-core/pds-config.js +1162 -0
  119. package/src/js/pds-core/pds-enhancer-metadata.js +75 -0
  120. package/src/js/pds-core/pds-enhancers.js +357 -0
  121. package/src/js/pds-core/pds-enums.js +86 -0
  122. package/src/js/pds-core/pds-generator.js +5317 -0
  123. package/src/js/pds-core/pds-ontology.js +256 -0
  124. package/src/js/pds-core/pds-paths.js +109 -0
  125. package/src/js/pds-core/pds-query.js +571 -0
  126. package/src/js/pds-core/pds-registry.js +129 -0
  127. package/src/js/pds-core/pds.d.ts +129 -0
  128. package/src/js/pds.d.ts +408 -0
  129. package/src/js/pds.js +1579 -0
@@ -0,0 +1,98 @@
1
+ # ⚠️ CSS IntelliSense - Important Information
2
+
3
+ ## Where CSS IntelliSense Works
4
+
5
+ ✅ **CSS Files (.css)**
6
+ ```css
7
+ /* Full autocomplete available */
8
+ .my-class {
9
+ color: var(--color-primary-500); /* ← Type var(-- to see all tokens */
10
+ padding: var(--spacing-4);
11
+ }
12
+ ```
13
+
14
+ ✅ **HTML `<style>` Tags**
15
+ ```html
16
+ <style>
17
+ .custom {
18
+ /* Full autocomplete available */
19
+ background: var(--color-primary-500);
20
+ }
21
+ </style>
22
+ ```
23
+
24
+ ## Where It Does NOT Work
25
+
26
+ ❌ **Inline `style` Attributes**
27
+ ```html
28
+ <!-- NO IntelliSense here - This is a VS Code limitation -->
29
+ <div style="padding: var(--)"></div>
30
+ ```
31
+
32
+ This is not a PDS bug - it's a VS Code limitation. The `css.customData` setting only applies to CSS files and `<style>` tags, not inline style attributes.
33
+
34
+ ## Workarounds
35
+
36
+ ### 1. Use `<style>` Tags
37
+ ```html
38
+ <style>
39
+ .my-padding {
40
+ padding: var(--spacing-4); /* Full IntelliSense works here */
41
+ }
42
+ </style>
43
+ <div class="my-padding"></div>
44
+ ```
45
+
46
+ ### 2. Use Utility Classes
47
+ PDS provides comprehensive utility classes:
48
+ ```html
49
+ <div class="flex gap-4 items-center">
50
+ <div class="card surface-elevated">
51
+ Content
52
+ </div>
53
+ </div>
54
+ ```
55
+
56
+ ### 3. Use External CSS File
57
+ ```css
58
+ /* styles.css - Full IntelliSense */
59
+ .hero {
60
+ background: var(--color-primary-500);
61
+ padding: var(--spacing-8);
62
+ }
63
+ ```
64
+
65
+ ```html
66
+ <div class="hero">Content</div>
67
+ ```
68
+
69
+ ## Verify It's Working
70
+
71
+ 1. **Create a test CSS file** (like `test.css`)
72
+ 2. **Type**: `color: var(--`
73
+ 3. **You should see**: All 165 CSS custom properties with descriptions
74
+ 4. **Hover over a token**: See the actual color/value
75
+
76
+ If this doesn't work:
77
+ 1. Check `.vscode/settings.json` has `css.customData` configured
78
+ 2. Reload VS Code (Ctrl+Shift+P → "Developer: Reload Window")
79
+ 3. Make sure `pds.css-data.json` exists in `public/assets/pds/`
80
+
81
+ ## For Class Autocomplete
82
+
83
+ Class autocomplete in HTML `class` attributes also has limitations in VS Code's HTML extension. For best class discovery:
84
+
85
+ 1. **Use Storybook** - Browse all available classes and components
86
+ 2. **Check documentation** - See [CSS-INTELLISENSE-QUICK-REF.md](./CSS-INTELLISENSE-QUICK-REF.md)
87
+ 3. **Use TypeScript** - Better autocomplete in JS/TS files
88
+
89
+ ## Summary
90
+
91
+ | Location | CSS Tokens | Utility Classes | Works? |
92
+ |----------|-----------|----------------|---------|
93
+ | `.css` files | ✅ Yes | N/A | ✅ Full Support |
94
+ | `<style>` tags | ✅ Yes | N/A | ✅ Full Support |
95
+ | `style=""` attribute | ❌ No | N/A | ❌ VS Code Limitation |
96
+ | `class=""` attribute | N/A | ⚠️ Limited | ⚠️ VS Code Limitation |
97
+
98
+ **Bottom line**: Use CSS files or `<style>` tags for the best IntelliSense experience with PDS tokens!
@@ -0,0 +1,238 @@
1
+ # CSS IntelliSense Quick Reference
2
+
3
+ Quick reference for using PDS IntelliSense in your projects.
4
+
5
+ ## Setup (VS Code)
6
+
7
+ ```json
8
+ // .vscode/settings.json
9
+ {
10
+ "html.customData": ["node_modules/pure-ds/public/assets/pds/vscode-custom-data.json"],
11
+ "css.customData": ["node_modules/pure-ds/public/assets/pds/pds.css-data.json"]
12
+ }
13
+ ```
14
+
15
+ Reload: `Ctrl+Shift+P` → **Developer: Reload Window**
16
+
17
+ ## CSS Tokens
18
+
19
+ ### Colors (900+ generated)
20
+ ```css
21
+ --color-primary-{50-900} /* Primary brand colors */
22
+ --color-secondary-{50-900} /* Secondary/neutral colors */
23
+ --color-accent-{50-900} /* Accent colors */
24
+ --color-gray-{50-900} /* Gray scale */
25
+ --color-success-{50-900} /* Success states */
26
+ --color-warning-{50-900} /* Warning states */
27
+ --color-danger-{50-900} /* Error states */
28
+ --color-info-{50-900} /* Info states */
29
+ ```
30
+
31
+ ### Spacing
32
+ ```css
33
+ --spacing-0 /* 0 */
34
+ --spacing-1 /* Base unit (8px default) */
35
+ --spacing-2 /* 1.5x base */
36
+ --spacing-3 /* 2.25x base */
37
+ --spacing-4 /* 3.375x base */
38
+ /* ... continues up to spacing-12 */
39
+ ```
40
+
41
+ ### Typography
42
+ ```css
43
+ --font-family-heading /* Headings font */
44
+ --font-family-body /* Body text font */
45
+ --font-family-mono /* Monospace font */
46
+
47
+ --font-size-xs /* Extra small */
48
+ --font-size-sm /* Small */
49
+ --font-size-base /* Base size */
50
+ --font-size-lg /* Large */
51
+ --font-size-xl /* Extra large */
52
+ /* ... continues to 5xl */
53
+
54
+ --font-weight-thin /* 100 */
55
+ --font-weight-normal /* 400 */
56
+ --font-weight-medium /* 500 */
57
+ --font-weight-semibold /* 600 */
58
+ --font-weight-bold /* 700 */
59
+
60
+ --line-height-tight /* 1.25 */
61
+ --line-height-normal /* 1.5 */
62
+ --line-height-relaxed /* 1.75 */
63
+ ```
64
+
65
+ ### Borders
66
+ ```css
67
+ --radius-sm /* Small radius */
68
+ --radius-md /* Medium radius */
69
+ --radius-lg /* Large radius */
70
+ --radius-xl /* Extra large */
71
+ --radius-full /* Fully rounded */
72
+
73
+ --border-width-thin /* 1px */
74
+ --border-width-medium /* 2px */
75
+ --border-width-thick /* 3px */
76
+ ```
77
+
78
+ ### Shadows
79
+ ```css
80
+ --shadow-sm /* Small shadow */
81
+ --shadow-md /* Medium shadow */
82
+ --shadow-lg /* Large shadow */
83
+ --shadow-xl /* Extra large */
84
+ --shadow-2xl /* 2x extra large */
85
+ ```
86
+
87
+ ### Surfaces (Semantic)
88
+ ```css
89
+ --surface-bg /* Surface background */
90
+ --surface-text /* Surface text color */
91
+ --surface-text-secondary /* Secondary text */
92
+ --surface-border /* Surface border */
93
+ --surface-shadow /* Surface shadow */
94
+ --surface-hover /* Hover state */
95
+ ```
96
+
97
+ ### Transitions
98
+ ```css
99
+ --transition-fast /* 150ms */
100
+ --transition-normal /* 300ms */
101
+ --transition-slow /* 500ms */
102
+ ```
103
+
104
+ ### Layout
105
+ ```css
106
+ --breakpoint-sm /* 640px */
107
+ --breakpoint-md /* 768px */
108
+ --breakpoint-lg /* 1024px */
109
+ --breakpoint-xl /* 1280px */
110
+
111
+ --z-dropdown /* 1000 */
112
+ --z-sticky /* 1020 */
113
+ --z-fixed /* 1030 */
114
+ --z-modal-backdrop /* 1040 */
115
+ --z-modal /* 1050 */
116
+ --z-notification /* 9999 */
117
+ ```
118
+
119
+ ## CSS Classes
120
+
121
+ ### Primitives
122
+ ```css
123
+ .badge, .pill, .tag, .chip /* Badge variants */
124
+ .card /* Card container */
125
+ .surface /* Surface container */
126
+ .alert /* Alert box */
127
+ .dialog /* Dialog element */
128
+ ```
129
+
130
+ ### Layout
131
+ ```css
132
+ .flex /* Flexbox container */
133
+ .flex-wrap /* Wrapped flex */
134
+ .grid /* Grid container */
135
+ .grid-cols-{1-6} /* Fixed columns */
136
+ .grid-auto-{sm|md|lg|xl} /* Auto-fit grid */
137
+ .container /* Max-width container */
138
+ ```
139
+
140
+ ### Spacing Utilities
141
+ ```css
142
+ .gap-{0-12} /* Flexbox/Grid gap */
143
+ ```
144
+
145
+ ### Alignment
146
+ ```css
147
+ .items-start /* align-items: flex-start */
148
+ .items-end /* align-items: flex-end */
149
+ .items-center /* align-items: center */
150
+ .items-baseline /* align-items: baseline */
151
+ .items-stretch /* align-items: stretch */
152
+
153
+ .justify-start /* justify-content: flex-start */
154
+ .justify-end /* justify-content: flex-end */
155
+ .justify-center /* justify-content: center */
156
+ .justify-between /* justify-content: space-between */
157
+ .justify-around /* justify-content: space-around */
158
+ .justify-evenly /* justify-content: space-evenly */
159
+ ```
160
+
161
+ ### Effects
162
+ ```css
163
+ .border-gradient /* Gradient border */
164
+ .border-gradient-primary /* Primary gradient */
165
+ .border-gradient-accent /* Accent gradient */
166
+ .border-gradient-secondary /* Secondary gradient */
167
+
168
+ .border-glow /* Glow effect */
169
+ .border-glow-sm /* Small glow */
170
+ .border-glow-lg /* Large glow */
171
+ .border-glow-{color} /* Colored glow */
172
+ ```
173
+
174
+ ## Data Attributes
175
+
176
+ Progressive enhancement attributes (with IntelliSense):
177
+
178
+ ```html
179
+ <!-- Type data-dr to see autocomplete with example code -->
180
+ <nav data-dropdown> <!-- Dropdown navigation -->
181
+ <button>Menu</button>
182
+ <menu>
183
+ <li><a href="#">Item</a></li>
184
+ </menu>
185
+ </nav>
186
+
187
+ <!-- Type data-to to see autocomplete with example code -->
188
+ <label data-toggle> <!-- Toggle switch -->
189
+ <span>Enable</span>
190
+ <input type="checkbox">
191
+ </label>
192
+
193
+ <!-- Other enhancements -->
194
+ <div data-tabs> <!-- Tab interface -->
195
+ <div data-modal> <!-- Modal dialog -->
196
+ <span data-tooltip> <!-- Tooltip -->
197
+ ```
198
+
199
+ **IntelliSense Features:**
200
+ - Shows attribute name while typing
201
+ - Displays description of enhancement
202
+ - Includes complete example markup from `demoHtml`
203
+
204
+ ## Web Components
205
+
206
+ ```html
207
+ <!-- Type <pds- to see all -->
208
+ <pds-drawer position="right|left|top|bottom">
209
+ <pds-icon icon="star|heart|bell|...">
210
+ <pds-upload accept="image/*">
211
+ <pds-jsonform>
212
+ <pds-tabstrip>
213
+ <pds-toaster>
214
+ <pds-richtext>
215
+ <pds-scrollrow>
216
+ <pds-splitpanel>
217
+ ```
218
+
219
+ ## Usage Tips
220
+
221
+ 1. **Type `--` in CSS** to see all tokens
222
+ 2. **Type `.` in HTML class** to browse all classes
223
+ 3. **Hover over tokens** to see actual values
224
+ 4. **Type `<pds-`** to see all components
225
+ 5. **Type `icon="`** to browse all icon names
226
+
227
+ ## Generation
228
+
229
+ ```bash
230
+ npm run pds:dx # Generate all IntelliSense
231
+ npm run pds:export # Full export including IntelliSense
232
+ ```
233
+
234
+ ## More Info
235
+
236
+ - [Full IntelliSense Guide](./INTELLISENSE.md)
237
+ - [Main README](./readme.md)
238
+ - [Storybook Documentation](./packages/pds-storybook/README.md)