@pure-ds/storybook 0.3.19 → 0.4.1
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/pds-configurator/SearchTool.js +44 -44
- package/.storybook/preview.js +6 -2
- package/dist/pds-reference.json +65 -13
- package/package.json +50 -50
- package/stories/components/PdsCalendar.stories.js +266 -263
- package/stories/components/PdsDrawer.stories.js +2 -2
- package/stories/components/PdsIcon.stories.js +2 -2
- package/stories/components/PdsJsonform.stories.js +2 -2
- package/stories/components/PdsRichtext.stories.js +367 -367
- package/stories/components/PdsScrollrow.stories.js +140 -140
- package/stories/components/PdsSplitpanel.stories.js +502 -502
- package/stories/components/PdsTabstrip.stories.js +2 -2
- package/stories/components/PdsToaster.stories.js +186 -186
- package/stories/components/PdsUpload.stories.js +66 -66
- package/stories/enhancements/Dropdowns.stories.js +185 -185
- package/stories/enhancements/InteractiveStates.stories.js +625 -625
- package/stories/enhancements/MeshGradients.stories.js +321 -320
- package/stories/enhancements/OpenGroups.stories.js +227 -227
- package/stories/enhancements/RangeSliders.stories.js +232 -232
- package/stories/enhancements/RequiredFields.stories.js +189 -189
- package/stories/enhancements/Toggles.stories.js +167 -167
- package/stories/foundations/Colors.stories.js +2 -1
- package/stories/foundations/Icons.stories.js +4 -0
- package/stories/foundations/SmartSurfaces.stories.js +485 -367
- package/stories/foundations/Spacing.stories.js +5 -1
- package/stories/foundations/Typography.stories.js +4 -0
- package/stories/foundations/ZIndex.stories.js +329 -325
- package/stories/layout/LayoutOverview.stories.js +247 -0
- package/stories/layout/LayoutSystem.stories.js +852 -0
- package/stories/patterns/BorderEffects.stories.js +74 -72
- package/stories/primitives/Accordion.stories.js +5 -3
- package/stories/primitives/Alerts.stories.js +261 -46
- package/stories/primitives/Badges.stories.js +4 -0
- package/stories/primitives/Buttons.stories.js +2 -2
- package/stories/primitives/Cards.stories.js +98 -170
- package/stories/primitives/Media.stories.js +442 -203
- package/stories/primitives/Tables.stories.js +358 -232
- package/stories/utilities/Backdrop.stories.js +197 -0
- package/stories/patterns/Layout.stories.js +0 -99
- package/stories/utilities/GridSystem.stories.js +0 -208
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import React, { useState, useCallback } from 'react';
|
|
2
|
-
import { useChannel } from '@storybook/manager-api';
|
|
3
|
-
import { IconButton } from '@storybook/components';
|
|
4
|
-
import { EVENTS } from './constants.js';
|
|
5
|
-
|
|
6
|
-
export const SearchTool = () => {
|
|
7
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
8
|
-
|
|
9
|
-
const channel = useChannel({
|
|
10
|
-
[EVENTS.QUERY_EXECUTED + '_RESPONSE']: (data) => {
|
|
11
|
-
console.log('Query response received:', data);
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
const toggleSearch = useCallback(() => {
|
|
16
|
-
const newState = !isOpen;
|
|
17
|
-
console.log('Toggle search - current isOpen:', isOpen, 'newState:', newState);
|
|
18
|
-
|
|
19
|
-
if (newState) {
|
|
20
|
-
// Emit event to open search in preview
|
|
21
|
-
const searchQuery = prompt('Enter search query (e.g., "primary color", "spacing", "button"):');
|
|
22
|
-
if (searchQuery) {
|
|
23
|
-
console.log('Executing search query:', searchQuery);
|
|
24
|
-
channel.emit(EVENTS.QUERY_EXECUTED, { query: searchQuery });
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
setIsOpen(newState);
|
|
29
|
-
}, [isOpen, channel]);
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<IconButton
|
|
33
|
-
key="search-tool"
|
|
34
|
-
active={isOpen}
|
|
35
|
-
title="Quick Search PDS"
|
|
36
|
-
onClick={toggleSearch}
|
|
37
|
-
>
|
|
38
|
-
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
|
39
|
-
<circle cx="11" cy="11" r="8" />
|
|
40
|
-
<path d="m21 21-4.35-4.35" />
|
|
41
|
-
</svg>
|
|
42
|
-
</IconButton>
|
|
43
|
-
);
|
|
44
|
-
};
|
|
1
|
+
import React, { useState, useCallback } from 'react';
|
|
2
|
+
import { useChannel } from '@storybook/manager-api';
|
|
3
|
+
import { IconButton } from '@storybook/components';
|
|
4
|
+
import { EVENTS } from './constants.js';
|
|
5
|
+
|
|
6
|
+
export const SearchTool = () => {
|
|
7
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
8
|
+
|
|
9
|
+
const channel = useChannel({
|
|
10
|
+
[EVENTS.QUERY_EXECUTED + '_RESPONSE']: (data) => {
|
|
11
|
+
console.log('Query response received:', data);
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const toggleSearch = useCallback(() => {
|
|
16
|
+
const newState = !isOpen;
|
|
17
|
+
console.log('Toggle search - current isOpen:', isOpen, 'newState:', newState);
|
|
18
|
+
|
|
19
|
+
if (newState) {
|
|
20
|
+
// Emit event to open search in preview
|
|
21
|
+
const searchQuery = prompt('Enter search query (e.g., "primary color", "spacing", "button"):');
|
|
22
|
+
if (searchQuery) {
|
|
23
|
+
console.log('Executing search query:', searchQuery);
|
|
24
|
+
channel.emit(EVENTS.QUERY_EXECUTED, { query: searchQuery });
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
setIsOpen(newState);
|
|
29
|
+
}, [isOpen, channel]);
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<IconButton
|
|
33
|
+
key="search-tool"
|
|
34
|
+
active={isOpen}
|
|
35
|
+
title="Quick Search PDS"
|
|
36
|
+
onClick={toggleSearch}
|
|
37
|
+
>
|
|
38
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
|
39
|
+
<circle cx="11" cy="11" r="8" />
|
|
40
|
+
<path d="m21 21-4.35-4.35" />
|
|
41
|
+
</svg>
|
|
42
|
+
</IconButton>
|
|
43
|
+
);
|
|
44
|
+
};
|
package/.storybook/preview.js
CHANGED
|
@@ -1300,10 +1300,12 @@ const preview = {
|
|
|
1300
1300
|
['Colors', 'Typography', 'Icons', 'Spacing', 'Smart Surfaces'],
|
|
1301
1301
|
'Primitives',
|
|
1302
1302
|
['Buttons', 'Forms', 'Form Groups', 'Alerts', 'Badges', 'Cards', 'Tables', 'Media', 'Accordion'],
|
|
1303
|
+
'Layout',
|
|
1304
|
+
['Overview', 'System'],
|
|
1303
1305
|
'Utilities',
|
|
1304
1306
|
['Grid System'],
|
|
1305
1307
|
'Patterns',
|
|
1306
|
-
['
|
|
1308
|
+
['Border Effects', 'Utilities'],
|
|
1307
1309
|
'Enhancements',
|
|
1308
1310
|
['Mesh Gradients', 'Interactive States', 'Toggles', 'Dropdowns', 'Range Sliders', 'Required Fields'],
|
|
1309
1311
|
'Components',
|
|
@@ -1316,10 +1318,12 @@ const preview = {
|
|
|
1316
1318
|
['Colors', 'Typography', 'Icons', 'Spacing', 'Smart Surfaces'],
|
|
1317
1319
|
'Primitives',
|
|
1318
1320
|
['Buttons', 'Forms', 'Form Groups', 'Alerts', 'Badges', 'Cards', 'Tables', 'Media', 'Accordion'],
|
|
1321
|
+
'Layout',
|
|
1322
|
+
['Overview', 'System'],
|
|
1319
1323
|
'Utilities',
|
|
1320
1324
|
['Grid System'],
|
|
1321
1325
|
'Patterns',
|
|
1322
|
-
['
|
|
1326
|
+
['Border Effects', 'Utilities'],
|
|
1323
1327
|
'Enhancements',
|
|
1324
1328
|
['Mesh Gradients', 'Interactive States', 'Toggles', 'Dropdowns', 'Range Sliders', 'Required Fields'],
|
|
1325
1329
|
'Components',
|
package/dist/pds-reference.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2025-12-
|
|
2
|
+
"generatedAt": "2025-12-22T14:04:57.776Z",
|
|
3
3
|
"sources": {
|
|
4
4
|
"customElements": "custom-elements.json",
|
|
5
5
|
"ontology": "src\\js\\pds-core\\pds-ontology.js",
|
|
@@ -16,7 +16,13 @@
|
|
|
16
16
|
"description": null,
|
|
17
17
|
"docsDescription": "A fully featured calendar component with month navigation, event display, and expandable day views",
|
|
18
18
|
"pdsTags": [
|
|
19
|
-
"autodocs"
|
|
19
|
+
"autodocs",
|
|
20
|
+
"calendar",
|
|
21
|
+
"date",
|
|
22
|
+
"datepicker",
|
|
23
|
+
"event",
|
|
24
|
+
"pds-calendar",
|
|
25
|
+
"schedule"
|
|
20
26
|
],
|
|
21
27
|
"ontology": null,
|
|
22
28
|
"stories": [
|
|
@@ -121,10 +127,16 @@
|
|
|
121
127
|
"docsDescription": "Slide-out panels from any edge",
|
|
122
128
|
"pdsTags": [
|
|
123
129
|
"autodocs",
|
|
130
|
+
"drawer",
|
|
124
131
|
"grouping",
|
|
125
132
|
"interaction",
|
|
126
133
|
"layout",
|
|
127
|
-
"
|
|
134
|
+
"modal",
|
|
135
|
+
"navigation",
|
|
136
|
+
"overlay",
|
|
137
|
+
"panel",
|
|
138
|
+
"pds-drawer",
|
|
139
|
+
"sidebar"
|
|
128
140
|
],
|
|
129
141
|
"ontology": {
|
|
130
142
|
"id": "pds-drawer",
|
|
@@ -320,10 +332,14 @@
|
|
|
320
332
|
"docsDescription": "SVG sprite icons with fallbacks",
|
|
321
333
|
"pdsTags": [
|
|
322
334
|
"autodocs",
|
|
323
|
-
"
|
|
335
|
+
"graphic",
|
|
336
|
+
"icon",
|
|
324
337
|
"icons",
|
|
338
|
+
"pds-icon",
|
|
339
|
+
"phosphor",
|
|
325
340
|
"sprite",
|
|
326
|
-
"svg"
|
|
341
|
+
"svg",
|
|
342
|
+
"symbol"
|
|
327
343
|
],
|
|
328
344
|
"ontology": null,
|
|
329
345
|
"stories": [
|
|
@@ -459,9 +475,14 @@
|
|
|
459
475
|
"docsDescription": "**⭐ Recommended for modern applications** - Automatically generate complete forms from JSON Schema definitions.\n\n### Key Features\n- 🎯 **Zero boilerplate** - Define form structure in JSON, get a working form with validation\n- ✅ **Built-in validation** - Automatic validation based on schema rules (required, min/max, patterns, etc.)\n- 🔄 **Data binding** - Two-way data binding with form state management\n- 🎨 **PDS styled** - Uses all PDS design tokens automatically\n- 📱 **Responsive** - Mobile-friendly layouts out of the box\n- 🧩 **Conditional logic** - Show/hide fields based on other field values\n- 🌐 **Nested objects** - Support for complex nested data structures\n- 🔧 **Extensible** - Custom field types and validators\n\n### Why JSON Schema Forms?\nInstead of manually writing HTML for every form field, validation rule, and error message, you define your data schema once and get:\n- Form UI generation\n- Client-side validation\n- Server-side validation (same schema)\n- API documentation\n- Type definitions\n- Database schemas\n\nSee the examples below to get started, or check the [primitive forms](/story/primitives-forms--default) for manual form building.",
|
|
460
476
|
"pdsTags": [
|
|
461
477
|
"autodocs",
|
|
462
|
-
"
|
|
478
|
+
"form",
|
|
463
479
|
"forms",
|
|
464
|
-
"
|
|
480
|
+
"input",
|
|
481
|
+
"interaction",
|
|
482
|
+
"json-schema",
|
|
483
|
+
"jsonform",
|
|
484
|
+
"pds-jsonform",
|
|
485
|
+
"validation"
|
|
465
486
|
],
|
|
466
487
|
"ontology": null,
|
|
467
488
|
"stories": [
|
|
@@ -935,9 +956,13 @@
|
|
|
935
956
|
"docsDescription": "Rich text editor with markdown support and formatting toolbar. Provide a #showdown import-map entry for best performance; set format=\"markdown\" to keep submitted values as Markdown.",
|
|
936
957
|
"pdsTags": [
|
|
937
958
|
"autodocs",
|
|
959
|
+
"content",
|
|
938
960
|
"editor",
|
|
939
961
|
"forms",
|
|
940
|
-
"richtext"
|
|
962
|
+
"pds-richtext",
|
|
963
|
+
"richtext",
|
|
964
|
+
"text",
|
|
965
|
+
"wysiwyg"
|
|
941
966
|
],
|
|
942
967
|
"ontology": null,
|
|
943
968
|
"stories": [
|
|
@@ -1153,7 +1178,13 @@
|
|
|
1153
1178
|
"docsDescription": "Horizontal scrolling container with navigation buttons",
|
|
1154
1179
|
"pdsTags": [
|
|
1155
1180
|
"autodocs",
|
|
1156
|
-
"
|
|
1181
|
+
"carousel",
|
|
1182
|
+
"horizontal",
|
|
1183
|
+
"layout",
|
|
1184
|
+
"overflow",
|
|
1185
|
+
"pds-scrollrow",
|
|
1186
|
+
"scroll",
|
|
1187
|
+
"scrollrow"
|
|
1157
1188
|
],
|
|
1158
1189
|
"ontology": null,
|
|
1159
1190
|
"stories": [],
|
|
@@ -1240,7 +1271,12 @@
|
|
|
1240
1271
|
"autodocs",
|
|
1241
1272
|
"interaction",
|
|
1242
1273
|
"layout",
|
|
1243
|
-
"
|
|
1274
|
+
"panel",
|
|
1275
|
+
"pds-splitpanel",
|
|
1276
|
+
"resizable",
|
|
1277
|
+
"sizing",
|
|
1278
|
+
"split",
|
|
1279
|
+
"splitpanel"
|
|
1244
1280
|
],
|
|
1245
1281
|
"ontology": null,
|
|
1246
1282
|
"stories": [],
|
|
@@ -1441,7 +1477,12 @@
|
|
|
1441
1477
|
"autodocs",
|
|
1442
1478
|
"grouping",
|
|
1443
1479
|
"layout",
|
|
1444
|
-
"navigation"
|
|
1480
|
+
"navigation",
|
|
1481
|
+
"panels",
|
|
1482
|
+
"pds-tabstrip",
|
|
1483
|
+
"tab",
|
|
1484
|
+
"tabs",
|
|
1485
|
+
"tabstrip"
|
|
1445
1486
|
],
|
|
1446
1487
|
"ontology": {
|
|
1447
1488
|
"id": "pds-tabstrip",
|
|
@@ -1511,9 +1552,15 @@
|
|
|
1511
1552
|
"description": null,
|
|
1512
1553
|
"docsDescription": "Toast notification system with auto-dismiss and stacking. Toast notifications appear in the top-right corner and auto-dismiss after a few seconds based on message length.",
|
|
1513
1554
|
"pdsTags": [
|
|
1555
|
+
"alert",
|
|
1514
1556
|
"autodocs",
|
|
1557
|
+
"feedback",
|
|
1515
1558
|
"interaction",
|
|
1516
|
-
"
|
|
1559
|
+
"message",
|
|
1560
|
+
"notification",
|
|
1561
|
+
"pds-toaster",
|
|
1562
|
+
"toast",
|
|
1563
|
+
"toaster"
|
|
1517
1564
|
],
|
|
1518
1565
|
"ontology": null,
|
|
1519
1566
|
"stories": [],
|
|
@@ -1699,7 +1746,12 @@
|
|
|
1699
1746
|
"docsDescription": "File upload with preview and validation",
|
|
1700
1747
|
"pdsTags": [
|
|
1701
1748
|
"autodocs",
|
|
1702
|
-
"
|
|
1749
|
+
"dropzone",
|
|
1750
|
+
"file",
|
|
1751
|
+
"forms",
|
|
1752
|
+
"input",
|
|
1753
|
+
"pds-upload",
|
|
1754
|
+
"upload"
|
|
1703
1755
|
],
|
|
1704
1756
|
"ontology": {
|
|
1705
1757
|
"id": "pds-upload",
|
package/package.json
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@pure-ds/storybook",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Storybook showcase for Pure Design System with live configuration",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"private": false,
|
|
7
|
-
"bin": {
|
|
8
|
-
"pds-storybook": "./bin/index.js"
|
|
9
|
-
},
|
|
10
|
-
"publishConfig": {
|
|
11
|
-
"access": "public",
|
|
12
|
-
"registry": "https://registry.npmjs.org/"
|
|
13
|
-
},
|
|
14
|
-
"files": [
|
|
15
|
-
"bin",
|
|
16
|
-
".storybook",
|
|
17
|
-
"scripts",
|
|
18
|
-
"src",
|
|
19
|
-
"public",
|
|
20
|
-
"stories",
|
|
21
|
-
"dist",
|
|
22
|
-
"pds.config.js",
|
|
23
|
-
"default-pds.config.js"
|
|
24
|
-
],
|
|
25
|
-
"scripts": {
|
|
26
|
-
"generate-stories": "node scripts/generate-stories.js",
|
|
27
|
-
"build-reference": "node scripts/build-pds-reference.mjs",
|
|
28
|
-
"package-build": "node scripts/package-build.js",
|
|
29
|
-
"storybook": "npm run build-reference && storybook dev -p 6006",
|
|
30
|
-
"build-storybook": "npm run build-reference && storybook build --output-dir storybook-static",
|
|
31
|
-
"storybook:dev": "npm run storybook",
|
|
32
|
-
"storybook:build": "npm run build-storybook"
|
|
33
|
-
},
|
|
34
|
-
"peerDependencies": {
|
|
35
|
-
"@pure-ds/core": "^0.3.18"
|
|
36
|
-
},
|
|
37
|
-
"dependencies": {
|
|
38
|
-
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
39
|
-
"@storybook/addon-docs": "^8.3.0",
|
|
40
|
-
"@storybook/addon-essentials": "^8.3.0",
|
|
41
|
-
"@storybook/addon-links": "^8.3.0",
|
|
42
|
-
"@storybook/blocks": "^8.3.0",
|
|
43
|
-
"@storybook/web-components": "^8.3.0",
|
|
44
|
-
"@storybook/web-components-vite": "^8.3.0",
|
|
45
|
-
"lit": "^3.3.1",
|
|
46
|
-
"showdown": "^2.1.0",
|
|
47
|
-
"storybook": "^8.3.0",
|
|
48
|
-
"vite": "^5.4.0"
|
|
49
|
-
}
|
|
50
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@pure-ds/storybook",
|
|
3
|
+
"version": "0.4.1",
|
|
4
|
+
"description": "Storybook showcase for Pure Design System with live configuration",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"private": false,
|
|
7
|
+
"bin": {
|
|
8
|
+
"pds-storybook": "./bin/index.js"
|
|
9
|
+
},
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public",
|
|
12
|
+
"registry": "https://registry.npmjs.org/"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"bin",
|
|
16
|
+
".storybook",
|
|
17
|
+
"scripts",
|
|
18
|
+
"src",
|
|
19
|
+
"public",
|
|
20
|
+
"stories",
|
|
21
|
+
"dist",
|
|
22
|
+
"pds.config.js",
|
|
23
|
+
"default-pds.config.js"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"generate-stories": "node scripts/generate-stories.js",
|
|
27
|
+
"build-reference": "node scripts/build-pds-reference.mjs",
|
|
28
|
+
"package-build": "node scripts/package-build.js",
|
|
29
|
+
"storybook": "npm run build-reference && storybook dev -p 6006",
|
|
30
|
+
"build-storybook": "npm run build-reference && storybook build --output-dir storybook-static",
|
|
31
|
+
"storybook:dev": "npm run storybook",
|
|
32
|
+
"storybook:build": "npm run build-storybook"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"@pure-ds/core": "^0.3.18"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
39
|
+
"@storybook/addon-docs": "^8.3.0",
|
|
40
|
+
"@storybook/addon-essentials": "^8.3.0",
|
|
41
|
+
"@storybook/addon-links": "^8.3.0",
|
|
42
|
+
"@storybook/blocks": "^8.3.0",
|
|
43
|
+
"@storybook/web-components": "^8.3.0",
|
|
44
|
+
"@storybook/web-components-vite": "^8.3.0",
|
|
45
|
+
"lit": "^3.3.1",
|
|
46
|
+
"showdown": "^2.1.0",
|
|
47
|
+
"storybook": "^8.3.0",
|
|
48
|
+
"vite": "^5.4.0"
|
|
49
|
+
}
|
|
50
|
+
}
|