@pure-ds/storybook 0.4.23 → 0.4.25
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/dist/pds-reference.json +3 -3
- package/package.json +4 -4
- package/public/assets/js/app.js +13 -8
- package/public/assets/js/pds.js +14 -9
- package/public/assets/pds/components/pds-form.js +29 -8
- package/src/js/common/toast.js +120 -0
- package/src/js/pds-configurator/pds-config-form.js +12 -26
- package/src/js/pds-configurator/pds-demo.js +17 -22
- package/src/js/pds-core/pds-config.js +1 -2
- package/src/js/pds.d.ts +62 -0
- package/src/js/pds.js +23 -4
- package/stories/GettingStarted.md +27 -3
- package/stories/components/PdsForm.stories.js +4902 -4676
- package/stories/components/PdsFormUiSchema.md +1 -1
- package/stories/utils/toast-utils.js +2 -11
|
@@ -434,7 +434,7 @@ Global form options that can be set via the `options` property:
|
|
|
434
434
|
```javascript
|
|
435
435
|
const options = {
|
|
436
436
|
widgets: {
|
|
437
|
-
booleans: "toggle", // "toggle"
|
|
437
|
+
booleans: "toggle", // "toggle" | "toggle-with-icons" | "checkbox"
|
|
438
438
|
numbers: "input", // "input" or "range"
|
|
439
439
|
selects: "standard" // "standard" or "dropdown"
|
|
440
440
|
},
|
|
@@ -123,17 +123,8 @@ export async function toastFormData(data) {
|
|
|
123
123
|
const truncated = truncateData(obj);
|
|
124
124
|
const formatted = JSON.stringify(truncated, null, 2);
|
|
125
125
|
|
|
126
|
-
//
|
|
127
|
-
|
|
128
|
-
if (!toaster) {
|
|
129
|
-
toaster = document.createElement('pds-toaster');
|
|
130
|
-
document.body.appendChild(toaster);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// Wait for the custom element to be defined before calling methods
|
|
134
|
-
await customElements.whenDefined('pds-toaster');
|
|
135
|
-
|
|
136
|
-
toaster.toast(formatted, {
|
|
126
|
+
// Use PDS.toast() to display the formatted data
|
|
127
|
+
await PDS.toast(formatted, {
|
|
137
128
|
type: 'success',
|
|
138
129
|
duration: 5000
|
|
139
130
|
});
|