@powerhousedao/document-engineering 1.38.0 → 1.40.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.
- package/README.md +12 -0
- package/dist/setupTests.d.ts +2 -0
- package/dist/setupTests.d.ts.map +1 -0
- package/dist/setupTests.js +2 -0
- package/dist/setupTests.js.map +1 -0
- package/dist/src/scalars/components/aid-field/aid-field.stories.d.ts +71 -0
- package/dist/src/scalars/components/aid-field/aid-field.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/aid-field/aid-field.stories.js +495 -0
- package/dist/src/scalars/components/aid-field/aid-field.stories.js.map +1 -0
- package/dist/src/scalars/components/aid-field/aid-field.test.d.ts +2 -0
- package/dist/src/scalars/components/aid-field/aid-field.test.d.ts.map +1 -0
- package/dist/src/scalars/components/aid-field/aid-field.test.js +180 -0
- package/dist/src/scalars/components/aid-field/aid-field.test.js.map +1 -0
- package/dist/src/scalars/components/amount-field/amount-field.stories.d.ts +267 -0
- package/dist/src/scalars/components/amount-field/amount-field.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/amount-field/amount-field.stories.js +339 -0
- package/dist/src/scalars/components/amount-field/amount-field.stories.js.map +1 -0
- package/dist/src/scalars/components/amount-field/amount-field.test.d.ts +2 -0
- package/dist/src/scalars/components/amount-field/amount-field.test.d.ts.map +1 -0
- package/dist/src/scalars/components/amount-field/amount-field.test.js +53 -0
- package/dist/src/scalars/components/amount-field/amount-field.test.js.map +1 -0
- package/dist/src/scalars/components/boolean-field/boolean-field.stories.d.ts +85 -0
- package/dist/src/scalars/components/boolean-field/boolean-field.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/boolean-field/boolean-field.stories.js +113 -0
- package/dist/src/scalars/components/boolean-field/boolean-field.stories.js.map +1 -0
- package/dist/src/scalars/components/boolean-field/boolean-field.test.d.ts +2 -0
- package/dist/src/scalars/components/boolean-field/boolean-field.test.d.ts.map +1 -0
- package/dist/src/scalars/components/boolean-field/boolean-field.test.js +82 -0
- package/dist/src/scalars/components/boolean-field/boolean-field.test.js.map +1 -0
- package/dist/src/scalars/components/country-code-field/country-code-field.js +1 -1
- package/dist/src/scalars/components/country-code-field/country-code-field.js.map +1 -1
- package/dist/src/scalars/components/country-code-field/country-code-field.stories.d.ts +19 -0
- package/dist/src/scalars/components/country-code-field/country-code-field.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/country-code-field/country-code-field.stories.js +173 -0
- package/dist/src/scalars/components/country-code-field/country-code-field.stories.js.map +1 -0
- package/dist/src/scalars/components/country-code-field/country-code-field.test.d.ts +2 -0
- package/dist/src/scalars/components/country-code-field/country-code-field.test.d.ts.map +1 -0
- package/dist/src/scalars/components/country-code-field/country-code-field.test.js +116 -0
- package/dist/src/scalars/components/country-code-field/country-code-field.test.js.map +1 -0
- package/dist/src/scalars/components/currency-code-field/currency-code-field.stories.d.ts +12 -0
- package/dist/src/scalars/components/currency-code-field/currency-code-field.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/currency-code-field/currency-code-field.stories.js +160 -0
- package/dist/src/scalars/components/currency-code-field/currency-code-field.stories.js.map +1 -0
- package/dist/src/scalars/components/currency-code-field/currency-code-field.test.d.ts +2 -0
- package/dist/src/scalars/components/currency-code-field/currency-code-field.test.d.ts.map +1 -0
- package/dist/src/scalars/components/currency-code-field/currency-code-field.test.js +47 -0
- package/dist/src/scalars/components/currency-code-field/currency-code-field.test.js.map +1 -0
- package/dist/src/scalars/components/date-picker-field/date-picker-field.stories.d.ts +26 -0
- package/dist/src/scalars/components/date-picker-field/date-picker-field.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/date-picker-field/date-picker-field.stories.js +296 -0
- package/dist/src/scalars/components/date-picker-field/date-picker-field.stories.js.map +1 -0
- package/dist/src/scalars/components/date-picker-field/date-picker-field.test.d.ts +2 -0
- package/dist/src/scalars/components/date-picker-field/date-picker-field.test.d.ts.map +1 -0
- package/dist/src/scalars/components/date-picker-field/date-picker-field.test.js +119 -0
- package/dist/src/scalars/components/date-picker-field/date-picker-field.test.js.map +1 -0
- package/dist/src/scalars/components/date-time-picker-field/date-time-picker-field.stories.d.ts +19 -0
- package/dist/src/scalars/components/date-time-picker-field/date-time-picker-field.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/date-time-picker-field/date-time-picker-field.stories.js +218 -0
- package/dist/src/scalars/components/date-time-picker-field/date-time-picker-field.stories.js.map +1 -0
- package/dist/src/scalars/components/date-time-picker-field/date-time-picker-field.test.d.ts +2 -0
- package/dist/src/scalars/components/date-time-picker-field/date-time-picker-field.test.d.ts.map +1 -0
- package/dist/src/scalars/components/date-time-picker-field/date-time-picker-field.test.js +125 -0
- package/dist/src/scalars/components/date-time-picker-field/date-time-picker-field.test.js.map +1 -0
- package/dist/src/scalars/components/email-field/email-field.stories.d.ts +12 -0
- package/dist/src/scalars/components/email-field/email-field.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/email-field/email-field.stories.js +108 -0
- package/dist/src/scalars/components/email-field/email-field.stories.js.map +1 -0
- package/dist/src/scalars/components/email-field/email-field.test.d.ts +2 -0
- package/dist/src/scalars/components/email-field/email-field.test.d.ts.map +1 -0
- package/dist/src/scalars/components/email-field/email-field.test.js +162 -0
- package/dist/src/scalars/components/email-field/email-field.test.js.map +1 -0
- package/dist/src/scalars/components/enum-field/enum-field.stories.d.ts +46 -0
- package/dist/src/scalars/components/enum-field/enum-field.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/enum-field/enum-field.stories.js +360 -0
- package/dist/src/scalars/components/enum-field/enum-field.stories.js.map +1 -0
- package/dist/src/scalars/components/enum-field/enum-field.test.d.ts +2 -0
- package/dist/src/scalars/components/enum-field/enum-field.test.d.ts.map +1 -0
- package/dist/src/scalars/components/enum-field/enum-field.test.js +89 -0
- package/dist/src/scalars/components/enum-field/enum-field.test.js.map +1 -0
- package/dist/src/scalars/components/examples/enum-field-example/enum-field-example.stories.d.ts +21 -0
- package/dist/src/scalars/components/examples/enum-field-example/enum-field-example.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/examples/enum-field-example/enum-field-example.stories.js +76 -0
- package/dist/src/scalars/components/examples/enum-field-example/enum-field-example.stories.js.map +1 -0
- package/dist/src/scalars/components/examples/multiple-fields-with-complex-layout/multiple-fields-with-complex-layout.stories.d.ts +21 -0
- package/dist/src/scalars/components/examples/multiple-fields-with-complex-layout/multiple-fields-with-complex-layout.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/examples/multiple-fields-with-complex-layout/multiple-fields-with-complex-layout.stories.js +141 -0
- package/dist/src/scalars/components/examples/multiple-fields-with-complex-layout/multiple-fields-with-complex-layout.stories.js.map +1 -0
- package/dist/src/scalars/components/examples/reset-button/reset-button.stories.d.ts +21 -0
- package/dist/src/scalars/components/examples/reset-button/reset-button.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/examples/reset-button/reset-button.stories.js +48 -0
- package/dist/src/scalars/components/examples/reset-button/reset-button.stories.js.map +1 -0
- package/dist/src/scalars/components/examples/reset-on-successful-submit/reset-on-successful-submit.stories.d.ts +21 -0
- package/dist/src/scalars/components/examples/reset-on-successful-submit/reset-on-successful-submit.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/examples/reset-on-successful-submit/reset-on-successful-submit.stories.js +47 -0
- package/dist/src/scalars/components/examples/reset-on-successful-submit/reset-on-successful-submit.stories.js.map +1 -0
- package/dist/src/scalars/components/examples/submit-changes-only/submit-changes-only.stories.d.ts +21 -0
- package/dist/src/scalars/components/examples/submit-changes-only/submit-changes-only.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/examples/submit-changes-only/submit-changes-only.stories.js +19 -0
- package/dist/src/scalars/components/examples/submit-changes-only/submit-changes-only.stories.js.map +1 -0
- package/dist/src/scalars/components/file-field/file-field.stories.d.ts +15 -0
- package/dist/src/scalars/components/file-field/file-field.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/file-field/file-field.stories.js +199 -0
- package/dist/src/scalars/components/file-field/file-field.stories.js.map +1 -0
- package/dist/src/scalars/components/file-field/index.js +1 -0
- package/dist/src/scalars/components/file-field/index.js.map +1 -1
- package/dist/src/scalars/components/form/form.test.d.ts +2 -0
- package/dist/src/scalars/components/form/form.test.d.ts.map +1 -0
- package/dist/src/scalars/components/form/form.test.js +129 -0
- package/dist/src/scalars/components/form/form.test.js.map +1 -0
- package/dist/src/scalars/components/fragments/button/button.test.d.ts +2 -0
- package/dist/src/scalars/components/fragments/button/button.test.d.ts.map +1 -0
- package/dist/src/scalars/components/fragments/button/button.test.js +11 -0
- package/dist/src/scalars/components/fragments/button/button.test.js.map +1 -0
- package/dist/src/scalars/components/fragments/character-counter/character-counter.stories.d.ts +30 -0
- package/dist/src/scalars/components/fragments/character-counter/character-counter.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/fragments/character-counter/character-counter.stories.js +48 -0
- package/dist/src/scalars/components/fragments/character-counter/character-counter.stories.js.map +1 -0
- package/dist/src/scalars/components/fragments/character-counter/character-counter.test.d.ts +2 -0
- package/dist/src/scalars/components/fragments/character-counter/character-counter.test.d.ts.map +1 -0
- package/dist/src/scalars/components/fragments/character-counter/character-counter.test.js +36 -0
- package/dist/src/scalars/components/fragments/character-counter/character-counter.test.js.map +1 -0
- package/dist/src/scalars/components/fragments/checkbox-field/checkbox-field.test.d.ts +2 -0
- package/dist/src/scalars/components/fragments/checkbox-field/checkbox-field.test.d.ts.map +1 -0
- package/dist/src/scalars/components/fragments/checkbox-field/checkbox-field.test.js +53 -0
- package/dist/src/scalars/components/fragments/checkbox-field/checkbox-field.test.js.map +1 -0
- package/dist/src/scalars/components/fragments/command/command.d.ts +3 -3
- package/dist/src/scalars/components/fragments/command/command.d.ts.map +1 -1
- package/dist/src/scalars/components/fragments/command/command.test.d.ts +2 -0
- package/dist/src/scalars/components/fragments/command/command.test.d.ts.map +1 -0
- package/dist/src/scalars/components/fragments/command/command.test.js +11 -0
- package/dist/src/scalars/components/fragments/command/command.test.js.map +1 -0
- package/dist/src/scalars/components/fragments/form-description/form-description.stories.d.ts +18 -0
- package/dist/src/scalars/components/fragments/form-description/form-description.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/fragments/form-description/form-description.stories.js +25 -0
- package/dist/src/scalars/components/fragments/form-description/form-description.stories.js.map +1 -0
- package/dist/src/scalars/components/fragments/form-description/form-description.test.d.ts +2 -0
- package/dist/src/scalars/components/fragments/form-description/form-description.test.d.ts.map +1 -0
- package/dist/src/scalars/components/fragments/form-description/form-description.test.js +29 -0
- package/dist/src/scalars/components/fragments/form-description/form-description.test.js.map +1 -0
- package/dist/src/scalars/components/fragments/form-group/form-group.test.d.ts +2 -0
- package/dist/src/scalars/components/fragments/form-group/form-group.test.d.ts.map +1 -0
- package/dist/src/scalars/components/fragments/form-group/form-group.test.js +16 -0
- package/dist/src/scalars/components/fragments/form-group/form-group.test.js.map +1 -0
- package/dist/src/scalars/components/fragments/form-label/form-label.stories.d.ts +11 -0
- package/dist/src/scalars/components/fragments/form-label/form-label.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/fragments/form-label/form-label.stories.js +74 -0
- package/dist/src/scalars/components/fragments/form-label/form-label.stories.js.map +1 -0
- package/dist/src/scalars/components/fragments/form-label/form-label.test.d.ts +2 -0
- package/dist/src/scalars/components/fragments/form-label/form-label.test.d.ts.map +1 -0
- package/dist/src/scalars/components/fragments/form-label/form-label.test.js +53 -0
- package/dist/src/scalars/components/fragments/form-label/form-label.test.js.map +1 -0
- package/dist/src/scalars/components/fragments/form-message/form-message.stories.d.ts +9 -0
- package/dist/src/scalars/components/fragments/form-message/form-message.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/fragments/form-message/form-message.stories.js +43 -0
- package/dist/src/scalars/components/fragments/form-message/form-message.stories.js.map +1 -0
- package/dist/src/scalars/components/fragments/form-message/form-message.test.d.ts +2 -0
- package/dist/src/scalars/components/fragments/form-message/form-message.test.d.ts.map +1 -0
- package/dist/src/scalars/components/fragments/form-message/form-message.test.js +49 -0
- package/dist/src/scalars/components/fragments/form-message/form-message.test.js.map +1 -0
- package/dist/src/scalars/components/fragments/id-autocomplete/id-autocomplete-input-container.js +1 -1
- package/dist/src/scalars/components/fragments/id-autocomplete/id-autocomplete-input-container.js.map +1 -1
- package/dist/src/scalars/components/fragments/id-autocomplete/id-autocomplete-list.d.ts +1 -1
- package/dist/src/scalars/components/fragments/id-autocomplete/id-autocomplete-list.d.ts.map +1 -1
- package/dist/src/scalars/components/fragments/id-autocomplete/id-autocomplete.d.ts +1 -2
- package/dist/src/scalars/components/fragments/id-autocomplete/id-autocomplete.d.ts.map +1 -1
- package/dist/src/scalars/components/fragments/id-autocomplete/id-autocomplete.js +13 -13
- package/dist/src/scalars/components/fragments/id-autocomplete/id-autocomplete.js.map +1 -1
- package/dist/src/scalars/components/fragments/id-autocomplete/id-autocomplete.test.d.ts +2 -0
- package/dist/src/scalars/components/fragments/id-autocomplete/id-autocomplete.test.d.ts.map +1 -0
- package/dist/src/scalars/components/fragments/id-autocomplete/id-autocomplete.test.js +136 -0
- package/dist/src/scalars/components/fragments/id-autocomplete/id-autocomplete.test.js.map +1 -0
- package/dist/src/scalars/components/fragments/id-autocomplete/use-id-autocomplete.d.ts +1 -1
- package/dist/src/scalars/components/fragments/popover/popover.test.d.ts +2 -0
- package/dist/src/scalars/components/fragments/popover/popover.test.d.ts.map +1 -0
- package/dist/src/scalars/components/fragments/popover/popover.test.js +11 -0
- package/dist/src/scalars/components/fragments/popover/popover.test.js.map +1 -0
- package/dist/src/scalars/components/fragments/progress-bar/progress-bar.test.d.ts +2 -0
- package/dist/src/scalars/components/fragments/progress-bar/progress-bar.test.d.ts.map +1 -0
- package/dist/src/scalars/components/fragments/progress-bar/progress-bar.test.js +18 -0
- package/dist/src/scalars/components/fragments/progress-bar/progress-bar.test.js.map +1 -0
- package/dist/src/scalars/components/fragments/radio-group-field/radio-group-field.test.d.ts +2 -0
- package/dist/src/scalars/components/fragments/radio-group-field/radio-group-field.test.d.ts.map +1 -0
- package/dist/src/scalars/components/fragments/radio-group-field/radio-group-field.test.js +133 -0
- package/dist/src/scalars/components/fragments/radio-group-field/radio-group-field.test.js.map +1 -0
- package/dist/src/scalars/components/fragments/select-field/select-field.test.d.ts +2 -0
- package/dist/src/scalars/components/fragments/select-field/select-field.test.d.ts.map +1 -0
- package/dist/src/scalars/components/fragments/select-field/select-field.test.js +160 -0
- package/dist/src/scalars/components/fragments/select-field/select-field.test.js.map +1 -0
- package/dist/src/scalars/components/fragments/tabs/tabs.test.d.ts +2 -0
- package/dist/src/scalars/components/fragments/tabs/tabs.test.d.ts.map +1 -0
- package/dist/src/scalars/components/fragments/tabs/tabs.test.js +47 -0
- package/dist/src/scalars/components/fragments/tabs/tabs.test.js.map +1 -0
- package/dist/src/scalars/components/fragments/text-field/text-field.test.d.ts +2 -0
- package/dist/src/scalars/components/fragments/text-field/text-field.test.d.ts.map +1 -0
- package/dist/src/scalars/components/fragments/text-field/text-field.test.js +106 -0
- package/dist/src/scalars/components/fragments/text-field/text-field.test.js.map +1 -0
- package/dist/src/scalars/components/fragments/textarea-field/textarea-field.test.d.ts +2 -0
- package/dist/src/scalars/components/fragments/textarea-field/textarea-field.test.d.ts.map +1 -0
- package/dist/src/scalars/components/fragments/textarea-field/textarea-field.test.js +100 -0
- package/dist/src/scalars/components/fragments/textarea-field/textarea-field.test.js.map +1 -0
- package/dist/src/scalars/components/fragments/toggle-field/toggle-field.test.d.ts +2 -0
- package/dist/src/scalars/components/fragments/toggle-field/toggle-field.test.d.ts.map +1 -0
- package/dist/src/scalars/components/fragments/toggle-field/toggle-field.test.js +56 -0
- package/dist/src/scalars/components/fragments/toggle-field/toggle-field.test.js.map +1 -0
- package/dist/src/scalars/components/fragments/value-transformer/value-transformer.d.ts +1 -1
- package/dist/src/scalars/components/fragments/value-transformer/value-transformer.d.ts.map +1 -1
- package/dist/src/scalars/components/fragments/value-transformer/value-transformer.js +2 -1
- package/dist/src/scalars/components/fragments/value-transformer/value-transformer.js.map +1 -1
- package/dist/src/scalars/components/fragments/value-transformer/value-transformer.test.d.ts +2 -0
- package/dist/src/scalars/components/fragments/value-transformer/value-transformer.test.d.ts.map +1 -0
- package/dist/src/scalars/components/fragments/value-transformer/value-transformer.test.js +102 -0
- package/dist/src/scalars/components/fragments/value-transformer/value-transformer.test.js.map +1 -0
- package/dist/src/scalars/components/fragments/with-field-validation/with-field-validation.test.d.ts +2 -0
- package/dist/src/scalars/components/fragments/with-field-validation/with-field-validation.test.d.ts.map +1 -0
- package/dist/src/scalars/components/fragments/with-field-validation/with-field-validation.test.js +141 -0
- package/dist/src/scalars/components/fragments/with-field-validation/with-field-validation.test.js.map +1 -0
- package/dist/src/scalars/components/id-field/id-field.stories.d.ts +58 -0
- package/dist/src/scalars/components/id-field/id-field.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/id-field/id-field.stories.js +73 -0
- package/dist/src/scalars/components/id-field/id-field.stories.js.map +1 -0
- package/dist/src/scalars/components/id-field/id-field.test.d.ts +2 -0
- package/dist/src/scalars/components/id-field/id-field.test.d.ts.map +1 -0
- package/dist/src/scalars/components/id-field/id-field.test.js +80 -0
- package/dist/src/scalars/components/id-field/id-field.test.js.map +1 -0
- package/dist/src/scalars/components/number-field/number-field.d.ts +2 -1
- package/dist/src/scalars/components/number-field/number-field.d.ts.map +1 -1
- package/dist/src/scalars/components/number-field/number-field.js.map +1 -1
- package/dist/src/scalars/components/number-field/number-field.stories.d.ts +156 -0
- package/dist/src/scalars/components/number-field/number-field.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/number-field/number-field.stories.js +228 -0
- package/dist/src/scalars/components/number-field/number-field.stories.js.map +1 -0
- package/dist/src/scalars/components/number-field/number-field.test.d.ts +2 -0
- package/dist/src/scalars/components/number-field/number-field.test.d.ts.map +1 -0
- package/dist/src/scalars/components/number-field/number-field.test.js +336 -0
- package/dist/src/scalars/components/number-field/number-field.test.js.map +1 -0
- package/dist/src/scalars/components/oid-field/oid-field.stories.d.ts +69 -0
- package/dist/src/scalars/components/oid-field/oid-field.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/oid-field/oid-field.stories.js +447 -0
- package/dist/src/scalars/components/oid-field/oid-field.stories.js.map +1 -0
- package/dist/src/scalars/components/oid-field/oid-field.test.d.ts +2 -0
- package/dist/src/scalars/components/oid-field/oid-field.test.d.ts.map +1 -0
- package/dist/src/scalars/components/oid-field/oid-field.test.js +161 -0
- package/dist/src/scalars/components/oid-field/oid-field.test.js.map +1 -0
- package/dist/src/scalars/components/password-field/password-field.stories.d.ts +23 -0
- package/dist/src/scalars/components/password-field/password-field.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/password-field/password-field.stories.js +234 -0
- package/dist/src/scalars/components/password-field/password-field.stories.js.map +1 -0
- package/dist/src/scalars/components/password-field/password-field.test.d.ts +2 -0
- package/dist/src/scalars/components/password-field/password-field.test.d.ts.map +1 -0
- package/dist/src/scalars/components/password-field/password-field.test.js +112 -0
- package/dist/src/scalars/components/password-field/password-field.test.js.map +1 -0
- package/dist/src/scalars/components/phid-field/phid-field.stories.d.ts +69 -0
- package/dist/src/scalars/components/phid-field/phid-field.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/phid-field/phid-field.stories.js +476 -0
- package/dist/src/scalars/components/phid-field/phid-field.stories.js.map +1 -0
- package/dist/src/scalars/components/phid-field/phid-field.test.d.ts +2 -0
- package/dist/src/scalars/components/phid-field/phid-field.test.d.ts.map +1 -0
- package/dist/src/scalars/components/phid-field/phid-field.test.js +164 -0
- package/dist/src/scalars/components/phid-field/phid-field.test.js.map +1 -0
- package/dist/src/scalars/components/phone-number-field/phone-number-field.stories.d.ts +19 -0
- package/dist/src/scalars/components/phone-number-field/phone-number-field.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/phone-number-field/phone-number-field.stories.js +116 -0
- package/dist/src/scalars/components/phone-number-field/phone-number-field.stories.js.map +1 -0
- package/dist/src/scalars/components/phone-number-field/phone-number-field.test.d.ts +2 -0
- package/dist/src/scalars/components/phone-number-field/phone-number-field.test.d.ts.map +1 -0
- package/dist/src/scalars/components/phone-number-field/phone-number-field.test.js +225 -0
- package/dist/src/scalars/components/phone-number-field/phone-number-field.test.js.map +1 -0
- package/dist/src/scalars/components/string-field/string-field.stories.d.ts +18 -0
- package/dist/src/scalars/components/string-field/string-field.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/string-field/string-field.stories.js +143 -0
- package/dist/src/scalars/components/string-field/string-field.stories.js.map +1 -0
- package/dist/src/scalars/components/string-field/string-field.test.d.ts +2 -0
- package/dist/src/scalars/components/string-field/string-field.test.d.ts.map +1 -0
- package/dist/src/scalars/components/string-field/string-field.test.js +60 -0
- package/dist/src/scalars/components/string-field/string-field.test.js.map +1 -0
- package/dist/src/scalars/components/time-picker-field/time-picker-field.stories.d.ts +25 -0
- package/dist/src/scalars/components/time-picker-field/time-picker-field.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/time-picker-field/time-picker-field.stories.js +150 -0
- package/dist/src/scalars/components/time-picker-field/time-picker-field.stories.js.map +1 -0
- package/dist/src/scalars/components/time-picker-field/time-picker-field.test.d.ts +2 -0
- package/dist/src/scalars/components/time-picker-field/time-picker-field.test.d.ts.map +1 -0
- package/dist/src/scalars/components/time-picker-field/time-picker-field.test.js +123 -0
- package/dist/src/scalars/components/time-picker-field/time-picker-field.test.js.map +1 -0
- package/dist/src/scalars/components/url-field/url-field.stories.d.ts +17 -0
- package/dist/src/scalars/components/url-field/url-field.stories.d.ts.map +1 -0
- package/dist/src/scalars/components/url-field/url-field.stories.js +146 -0
- package/dist/src/scalars/components/url-field/url-field.stories.js.map +1 -0
- package/dist/src/scalars/components/url-field/url-field.test.d.ts +2 -0
- package/dist/src/scalars/components/url-field/url-field.test.d.ts.map +1 -0
- package/dist/src/scalars/components/url-field/url-field.test.js +131 -0
- package/dist/src/scalars/components/url-field/url-field.test.js.map +1 -0
- package/dist/src/scalars/graphql/test/Amount.test.d.ts +2 -0
- package/dist/src/scalars/graphql/test/Amount.test.d.ts.map +1 -0
- package/dist/src/scalars/graphql/test/Amount.test.js +135 -0
- package/dist/src/scalars/graphql/test/Amount.test.js.map +1 -0
- package/dist/src/scalars/graphql/test/AmountCrypto.test.d.ts +2 -0
- package/dist/src/scalars/graphql/test/AmountCrypto.test.d.ts.map +1 -0
- package/dist/src/scalars/graphql/test/AmountCrypto.test.js +138 -0
- package/dist/src/scalars/graphql/test/AmountCrypto.test.js.map +1 -0
- package/dist/src/scalars/graphql/test/AmountCurrency.test.d.ts +2 -0
- package/dist/src/scalars/graphql/test/AmountCurrency.test.d.ts.map +1 -0
- package/dist/src/scalars/graphql/test/AmountCurrency.test.js +141 -0
- package/dist/src/scalars/graphql/test/AmountCurrency.test.js.map +1 -0
- package/dist/src/scalars/graphql/test/AmountFiat.test.d.ts +2 -0
- package/dist/src/scalars/graphql/test/AmountFiat.test.d.ts.map +1 -0
- package/dist/src/scalars/graphql/test/AmountFiat.test.js +129 -0
- package/dist/src/scalars/graphql/test/AmountFiat.test.js.map +1 -0
- package/dist/src/scalars/graphql/test/AmountMoney.test.d.ts +2 -0
- package/dist/src/scalars/graphql/test/AmountMoney.test.d.ts.map +1 -0
- package/dist/src/scalars/graphql/test/AmountMoney.test.js +50 -0
- package/dist/src/scalars/graphql/test/AmountMoney.test.js.map +1 -0
- package/dist/src/scalars/graphql/test/AmountPercentage.test.d.ts +2 -0
- package/dist/src/scalars/graphql/test/AmountPercentage.test.d.ts.map +1 -0
- package/dist/src/scalars/graphql/test/AmountPercentage.test.js +50 -0
- package/dist/src/scalars/graphql/test/AmountPercentage.test.js.map +1 -0
- package/dist/src/scalars/graphql/test/AmountTokens.test.d.ts +2 -0
- package/dist/src/scalars/graphql/test/AmountTokens.test.d.ts.map +1 -0
- package/dist/src/scalars/graphql/test/AmountTokens.test.js +50 -0
- package/dist/src/scalars/graphql/test/AmountTokens.test.js.map +1 -0
- package/dist/src/scalars/graphql/test/Currency.test.d.ts +2 -0
- package/dist/src/scalars/graphql/test/Currency.test.d.ts.map +1 -0
- package/dist/src/scalars/graphql/test/Currency.test.js +35 -0
- package/dist/src/scalars/graphql/test/Currency.test.js.map +1 -0
- package/dist/src/scalars/graphql/test/Date.test.d.ts +2 -0
- package/dist/src/scalars/graphql/test/Date.test.d.ts.map +1 -0
- package/dist/src/scalars/graphql/test/Date.test.js +50 -0
- package/dist/src/scalars/graphql/test/Date.test.js.map +1 -0
- package/dist/src/scalars/graphql/test/DateTime.test.d.ts +2 -0
- package/dist/src/scalars/graphql/test/DateTime.test.d.ts.map +1 -0
- package/dist/src/scalars/graphql/test/DateTime.test.js +50 -0
- package/dist/src/scalars/graphql/test/DateTime.test.js.map +1 -0
- package/dist/src/scalars/graphql/test/EmailAddress.test.d.ts +2 -0
- package/dist/src/scalars/graphql/test/EmailAddress.test.d.ts.map +1 -0
- package/dist/src/scalars/graphql/test/EmailAddress.test.js +50 -0
- package/dist/src/scalars/graphql/test/EmailAddress.test.js.map +1 -0
- package/dist/src/scalars/graphql/test/EthereumAddress.test.d.ts +2 -0
- package/dist/src/scalars/graphql/test/EthereumAddress.test.d.ts.map +1 -0
- package/dist/src/scalars/graphql/test/EthereumAddress.test.js +50 -0
- package/dist/src/scalars/graphql/test/EthereumAddress.test.js.map +1 -0
- package/dist/src/scalars/graphql/test/OID.test.d.ts +2 -0
- package/dist/src/scalars/graphql/test/OID.test.d.ts.map +1 -0
- package/dist/src/scalars/graphql/test/OID.test.js +35 -0
- package/dist/src/scalars/graphql/test/OID.test.js.map +1 -0
- package/dist/src/scalars/graphql/test/OLabel.test.d.ts +2 -0
- package/dist/src/scalars/graphql/test/OLabel.test.d.ts.map +1 -0
- package/dist/src/scalars/graphql/test/OLabel.test.js +35 -0
- package/dist/src/scalars/graphql/test/OLabel.test.js.map +1 -0
- package/dist/src/scalars/graphql/test/PHID.test.d.ts +2 -0
- package/dist/src/scalars/graphql/test/PHID.test.d.ts.map +1 -0
- package/dist/src/scalars/graphql/test/PHID.test.js +35 -0
- package/dist/src/scalars/graphql/test/PHID.test.js.map +1 -0
- package/dist/src/scalars/graphql/test/URL.test.d.ts +2 -0
- package/dist/src/scalars/graphql/test/URL.test.d.ts.map +1 -0
- package/dist/src/scalars/graphql/test/URL.test.js +50 -0
- package/dist/src/scalars/graphql/test/URL.test.js.map +1 -0
- package/dist/src/scalars/hooks/useEllipsis.d.ts +1 -1
- package/dist/src/scalars/hooks/useEllipsis.d.ts.map +1 -1
- package/dist/src/scalars/hooks/useEllipsis.js.map +1 -1
- package/dist/src/scalars/lib/deep-equal.test.d.ts +2 -0
- package/dist/src/scalars/lib/deep-equal.test.d.ts.map +1 -0
- package/dist/src/scalars/lib/deep-equal.test.js +70 -0
- package/dist/src/scalars/lib/deep-equal.test.js.map +1 -0
- package/dist/src/scalars/lib/is-empty.test.d.ts +2 -0
- package/dist/src/scalars/lib/is-empty.test.d.ts.map +1 -0
- package/dist/src/scalars/lib/is-empty.test.js +87 -0
- package/dist/src/scalars/lib/is-empty.test.js.map +1 -0
- package/dist/src/table/components/cells/render-cell/use-cell-logic.d.ts +1 -1
- package/dist/src/table/components/default-cell-editors/amount-editor.js.map +1 -1
- package/dist/src/table/components/default-cell-renderers/country-render.js +1 -1
- package/dist/src/table/components/default-cell-renderers/country-render.js.map +1 -1
- package/dist/src/table/components/default-fns/default-cell-on-save.d.ts +11 -0
- package/dist/src/table/components/default-fns/default-cell-on-save.d.ts.map +1 -0
- package/dist/src/table/components/default-fns/default-cell-on-save.js +18 -0
- package/dist/src/table/components/default-fns/default-cell-on-save.js.map +1 -0
- package/dist/src/table/components/rows/row-actions.d.ts +1 -1
- package/dist/src/table/components/rows/row-actions.d.ts.map +1 -1
- package/dist/src/table/components/table-focus-trap.js.map +1 -1
- package/dist/src/table/components/table-provider/table-provider.d.ts +1 -1
- package/dist/src/table/components/table-provider/table-provider.d.ts.map +1 -1
- package/dist/src/table/components/table-provider/table-provider.js +1 -1
- package/dist/src/table/components/table-provider/table-provider.js.map +1 -1
- package/dist/src/table/components/table-provider/table-reducer.d.ts +1 -1
- package/dist/src/table/components/table-provider/table-reducer.d.ts.map +1 -1
- package/dist/src/table/examples/api-usage/api-usage.stories.d.ts +16 -0
- package/dist/src/table/examples/api-usage/api-usage.stories.d.ts.map +1 -0
- package/dist/src/table/examples/api-usage/api-usage.stories.js +15 -0
- package/dist/src/table/examples/api-usage/api-usage.stories.js.map +1 -0
- package/dist/src/table/examples/column-visibility/column-visibility.stories.d.ts +23 -0
- package/dist/src/table/examples/column-visibility/column-visibility.stories.d.ts.map +1 -0
- package/dist/src/table/examples/column-visibility/column-visibility.stories.js +127 -0
- package/dist/src/table/examples/column-visibility/column-visibility.stories.js.map +1 -0
- package/dist/src/table/examples/computed-columns/computed-columns.stories.d.ts +23 -0
- package/dist/src/table/examples/computed-columns/computed-columns.stories.d.ts.map +1 -0
- package/dist/src/table/examples/computed-columns/computed-columns.stories.js +89 -0
- package/dist/src/table/examples/computed-columns/computed-columns.stories.js.map +1 -0
- package/dist/src/table/examples/custom-cell-editors/custom-cell-editors.stories.d.ts +23 -0
- package/dist/src/table/examples/custom-cell-editors/custom-cell-editors.stories.d.ts.map +1 -0
- package/dist/src/table/examples/custom-cell-editors/custom-cell-editors.stories.js +332 -0
- package/dist/src/table/examples/custom-cell-editors/custom-cell-editors.stories.js.map +1 -0
- package/dist/src/table/examples/custom-rendering/custom-rendering.stories.d.ts +23 -0
- package/dist/src/table/examples/custom-rendering/custom-rendering.stories.d.ts.map +1 -0
- package/dist/src/table/examples/custom-rendering/custom-rendering.stories.js +112 -0
- package/dist/src/table/examples/custom-rendering/custom-rendering.stories.js.map +1 -0
- package/dist/src/table/examples/events/events.stories.d.ts +16 -0
- package/dist/src/table/examples/events/events.stories.d.ts.map +1 -0
- package/dist/src/table/examples/events/events.stories.js +15 -0
- package/dist/src/table/examples/events/events.stories.js.map +1 -0
- package/dist/src/table/examples/row-reordering/row-reordering.stories.d.ts +37 -0
- package/dist/src/table/examples/row-reordering/row-reordering.stories.d.ts.map +1 -0
- package/dist/src/table/examples/row-reordering/row-reordering.stories.js +143 -0
- package/dist/src/table/examples/row-reordering/row-reordering.stories.js.map +1 -0
- package/dist/src/table/examples/table-editing/table-editing.stories.d.ts +43 -0
- package/dist/src/table/examples/table-editing/table-editing.stories.d.ts.map +1 -0
- package/dist/src/table/examples/table-editing/table-editing.stories.js +163 -0
- package/dist/src/table/examples/table-editing/table-editing.stories.js.map +1 -0
- package/dist/src/table/logic/table-api.d.ts +1 -1
- package/dist/src/table/logic/table-api.d.ts.map +1 -1
- package/dist/src/table/logic/table-api.js.map +1 -1
- package/dist/src/table/table/object-set-table.d.ts.map +1 -1
- package/dist/src/table/table/object-set-table.js +2 -11
- package/dist/src/table/table/object-set-table.js.map +1 -1
- package/dist/src/table/table/object-set-table.stories.d.ts +97 -0
- package/dist/src/table/table/object-set-table.stories.d.ts.map +1 -0
- package/dist/src/table/table/object-set-table.stories.js +300 -0
- package/dist/src/table/table/object-set-table.stories.js.map +1 -0
- package/dist/src/table/table/utils.d.ts +1 -1
- package/dist/src/table/table/utils.d.ts.map +1 -1
- package/dist/src/table/table/utils.js.map +1 -1
- package/dist/src/table/tests/basic-rendering.test.d.ts +2 -0
- package/dist/src/table/tests/basic-rendering.test.d.ts.map +1 -0
- package/dist/src/table/tests/basic-rendering.test.js +332 -0
- package/dist/src/table/tests/basic-rendering.test.js.map +1 -0
- package/dist/src/table/tests/cell-selection.test.d.ts +2 -0
- package/dist/src/table/tests/cell-selection.test.d.ts.map +1 -0
- package/dist/src/table/tests/cell-selection.test.js +346 -0
- package/dist/src/table/tests/cell-selection.test.js.map +1 -0
- package/dist/src/table/tests/helpers/test-utils.d.ts +28 -0
- package/dist/src/table/tests/helpers/test-utils.d.ts.map +1 -0
- package/dist/src/table/tests/helpers/test-utils.js +85 -0
- package/dist/src/table/tests/helpers/test-utils.js.map +1 -0
- package/dist/src/table/tests/page-objects/base-table.page.d.ts +83 -0
- package/dist/src/table/tests/page-objects/base-table.page.d.ts.map +1 -0
- package/dist/src/table/tests/page-objects/base-table.page.js +146 -0
- package/dist/src/table/tests/page-objects/base-table.page.js.map +1 -0
- package/dist/src/table/tests/page-objects/table-cell.page.d.ts +58 -0
- package/dist/src/table/tests/page-objects/table-cell.page.d.ts.map +1 -0
- package/dist/src/table/tests/page-objects/table-cell.page.js +163 -0
- package/dist/src/table/tests/page-objects/table-cell.page.js.map +1 -0
- package/dist/src/table/tests/page-objects/table-header.page.d.ts +66 -0
- package/dist/src/table/tests/page-objects/table-header.page.d.ts.map +1 -0
- package/dist/src/table/tests/page-objects/table-header.page.js +156 -0
- package/dist/src/table/tests/page-objects/table-header.page.js.map +1 -0
- package/dist/src/table/tests/page-objects/table-row.page.d.ts +98 -0
- package/dist/src/table/tests/page-objects/table-row.page.d.ts.map +1 -0
- package/dist/src/table/tests/page-objects/table-row.page.js +240 -0
- package/dist/src/table/tests/page-objects/table-row.page.js.map +1 -0
- package/dist/src/table/tests/page-objects/table.page.d.ts +36 -0
- package/dist/src/table/tests/page-objects/table.page.d.ts.map +1 -0
- package/dist/src/table/tests/page-objects/table.page.js +46 -0
- package/dist/src/table/tests/page-objects/table.page.js.map +1 -0
- package/dist/src/table/tests/row-actions.test.d.ts +2 -0
- package/dist/src/table/tests/row-actions.test.d.ts.map +1 -0
- package/dist/src/table/tests/row-actions.test.js +601 -0
- package/dist/src/table/tests/row-actions.test.js.map +1 -0
- package/dist/src/table/tests/row-selection.test.d.ts +2 -0
- package/dist/src/table/tests/row-selection.test.d.ts.map +1 -0
- package/dist/src/table/tests/row-selection.test.js +272 -0
- package/dist/src/table/tests/row-selection.test.js.map +1 -0
- package/dist/src/table/tests/sorting.test.d.ts +2 -0
- package/dist/src/table/tests/sorting.test.d.ts.map +1 -0
- package/dist/src/table/tests/sorting.test.js +793 -0
- package/dist/src/table/tests/sorting.test.js.map +1 -0
- package/dist/src/ui/components/button/button.stories.d.ts +32 -0
- package/dist/src/ui/components/button/button.stories.d.ts.map +1 -0
- package/dist/src/ui/components/button/button.stories.js +121 -0
- package/dist/src/ui/components/button/button.stories.js.map +1 -0
- package/dist/src/ui/components/button/button.test.d.ts +2 -0
- package/dist/src/ui/components/button/button.test.d.ts.map +1 -0
- package/dist/src/ui/components/button/button.test.js +71 -0
- package/dist/src/ui/components/button/button.test.js.map +1 -0
- package/dist/src/ui/components/confirm/alert-dialog.test.d.ts +2 -0
- package/dist/src/ui/components/confirm/alert-dialog.test.d.ts.map +1 -0
- package/dist/src/ui/components/confirm/alert-dialog.test.js +20 -0
- package/dist/src/ui/components/confirm/alert-dialog.test.js.map +1 -0
- package/dist/src/ui/components/confirm/confirm.stories.d.ts +37 -0
- package/dist/src/ui/components/confirm/confirm.stories.d.ts.map +1 -0
- package/dist/src/ui/components/confirm/confirm.stories.js +75 -0
- package/dist/src/ui/components/confirm/confirm.stories.js.map +1 -0
- package/dist/src/ui/components/data-entry/aid-input/aid-input.stories.d.ts +74 -0
- package/dist/src/ui/components/data-entry/aid-input/aid-input.stories.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/aid-input/aid-input.stories.js +505 -0
- package/dist/src/ui/components/data-entry/aid-input/aid-input.stories.js.map +1 -0
- package/dist/src/ui/components/data-entry/aid-input/aid-input.test.d.ts +2 -0
- package/dist/src/ui/components/data-entry/aid-input/aid-input.test.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/aid-input/aid-input.test.js +191 -0
- package/dist/src/ui/components/data-entry/aid-input/aid-input.test.js.map +1 -0
- package/dist/src/ui/components/data-entry/amount-input/amount-input.d.ts +1 -1
- package/dist/src/ui/components/data-entry/amount-input/amount-input.d.ts.map +1 -1
- package/dist/src/ui/components/data-entry/amount-input/amount-input.stories.d.ts +269 -0
- package/dist/src/ui/components/data-entry/amount-input/amount-input.stories.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/amount-input/amount-input.stories.js +363 -0
- package/dist/src/ui/components/data-entry/amount-input/amount-input.stories.js.map +1 -0
- package/dist/src/ui/components/data-entry/amount-input/amount-input.test.d.ts +2 -0
- package/dist/src/ui/components/data-entry/amount-input/amount-input.test.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/amount-input/amount-input.test.js +98 -0
- package/dist/src/ui/components/data-entry/amount-input/amount-input.test.js.map +1 -0
- package/dist/src/ui/components/data-entry/amount-input/utils.test.d.ts +2 -0
- package/dist/src/ui/components/data-entry/amount-input/utils.test.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/amount-input/utils.test.js +64 -0
- package/dist/src/ui/components/data-entry/amount-input/utils.test.js.map +1 -0
- package/dist/src/ui/components/data-entry/checkbox/checkbox-base.test.d.ts +2 -0
- package/dist/src/ui/components/data-entry/checkbox/checkbox-base.test.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/checkbox/checkbox-base.test.js +57 -0
- package/dist/src/ui/components/data-entry/checkbox/checkbox-base.test.js.map +1 -0
- package/dist/src/ui/components/data-entry/checkbox/checkbox.stories.d.ts +73 -0
- package/dist/src/ui/components/data-entry/checkbox/checkbox.stories.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/checkbox/checkbox.stories.js +139 -0
- package/dist/src/ui/components/data-entry/checkbox/checkbox.stories.js.map +1 -0
- package/dist/src/ui/components/data-entry/checkbox/index.js +1 -0
- package/dist/src/ui/components/data-entry/checkbox/index.js.map +1 -1
- package/dist/src/ui/components/data-entry/country-code-picker/country-code-picker.js +1 -1
- package/dist/src/ui/components/data-entry/country-code-picker/country-code-picker.js.map +1 -1
- package/dist/src/ui/components/data-entry/country-code-picker/country-code-picker.stories.d.ts +33 -0
- package/dist/src/ui/components/data-entry/country-code-picker/country-code-picker.stories.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/country-code-picker/country-code-picker.stories.js +194 -0
- package/dist/src/ui/components/data-entry/country-code-picker/country-code-picker.stories.js.map +1 -0
- package/dist/src/ui/components/data-entry/country-code-picker/country-code-picker.test.d.ts +2 -0
- package/dist/src/ui/components/data-entry/country-code-picker/country-code-picker.test.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/country-code-picker/country-code-picker.test.js +173 -0
- package/dist/src/ui/components/data-entry/country-code-picker/country-code-picker.test.js.map +1 -0
- package/dist/src/ui/components/data-entry/currency-code-picker/currency-code-picker.stories.d.ts +28 -0
- package/dist/src/ui/components/data-entry/currency-code-picker/currency-code-picker.stories.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/currency-code-picker/currency-code-picker.stories.js +185 -0
- package/dist/src/ui/components/data-entry/currency-code-picker/currency-code-picker.stories.js.map +1 -0
- package/dist/src/ui/components/data-entry/currency-code-picker/currency-code-picker.test.d.ts +2 -0
- package/dist/src/ui/components/data-entry/currency-code-picker/currency-code-picker.test.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/currency-code-picker/currency-code-picker.test.js +161 -0
- package/dist/src/ui/components/data-entry/currency-code-picker/currency-code-picker.test.js.map +1 -0
- package/dist/src/ui/components/data-entry/date-picker/date-picker.js +1 -1
- package/dist/src/ui/components/data-entry/date-picker/date-picker.js.map +1 -1
- package/dist/src/ui/components/data-entry/date-picker/date-picker.stories.d.ts +104 -0
- package/dist/src/ui/components/data-entry/date-picker/date-picker.stories.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/date-picker/date-picker.stories.js +360 -0
- package/dist/src/ui/components/data-entry/date-picker/date-picker.stories.js.map +1 -0
- package/dist/src/ui/components/data-entry/date-picker/date-picker.test.d.ts +2 -0
- package/dist/src/ui/components/data-entry/date-picker/date-picker.test.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/date-picker/date-picker.test.js +225 -0
- package/dist/src/ui/components/data-entry/date-picker/date-picker.test.js.map +1 -0
- package/dist/src/ui/components/data-entry/date-picker/index.js +1 -0
- package/dist/src/ui/components/data-entry/date-picker/index.js.map +1 -1
- package/dist/src/ui/components/data-entry/date-picker/subcomponents/calendar-nav/calendar-nav.d.ts +1 -1
- package/dist/src/ui/components/data-entry/date-picker/subcomponents/calendar-nav/calendar-nav.d.ts.map +1 -1
- package/dist/src/ui/components/data-entry/date-picker/subcomponents/calendar-nav/calendar-nav.js.map +1 -1
- package/dist/src/ui/components/data-entry/date-picker/subcomponents/caption-label/caption-label.d.ts +1 -1
- package/dist/src/ui/components/data-entry/date-picker/subcomponents/caption-label/caption-label.d.ts.map +1 -1
- package/dist/src/ui/components/data-entry/date-time-picker/date-time-picker.stories.d.ts +152 -0
- package/dist/src/ui/components/data-entry/date-time-picker/date-time-picker.stories.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/date-time-picker/date-time-picker.stories.js +376 -0
- package/dist/src/ui/components/data-entry/date-time-picker/date-time-picker.stories.js.map +1 -0
- package/dist/src/ui/components/data-entry/date-time-picker/date-time-picker.test.d.ts +2 -0
- package/dist/src/ui/components/data-entry/date-time-picker/date-time-picker.test.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/date-time-picker/date-time-picker.test.js +241 -0
- package/dist/src/ui/components/data-entry/date-time-picker/date-time-picker.test.js.map +1 -0
- package/dist/src/ui/components/data-entry/date-time-picker/use-date-time-picker.d.ts.map +1 -1
- package/dist/src/ui/components/data-entry/date-time-picker/utils.test.d.ts +2 -0
- package/dist/src/ui/components/data-entry/date-time-picker/utils.test.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/date-time-picker/utils.test.js +38 -0
- package/dist/src/ui/components/data-entry/date-time-picker/utils.test.js.map +1 -0
- package/dist/src/ui/components/data-entry/email-input/email-input.stories.d.ts +17 -0
- package/dist/src/ui/components/data-entry/email-input/email-input.stories.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/email-input/email-input.stories.js +80 -0
- package/dist/src/ui/components/data-entry/email-input/email-input.stories.js.map +1 -0
- package/dist/src/ui/components/data-entry/email-input/index.js +1 -0
- package/dist/src/ui/components/data-entry/email-input/index.js.map +1 -1
- package/dist/src/ui/components/data-entry/file-input/examples/file-upload-item-example.stories.d.ts +31 -0
- package/dist/src/ui/components/data-entry/file-input/examples/file-upload-item-example.stories.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/file-input/examples/file-upload-item-example.stories.js +193 -0
- package/dist/src/ui/components/data-entry/file-input/examples/file-upload-item-example.stories.js.map +1 -0
- package/dist/src/ui/components/data-entry/file-input/file-input.stories.d.ts +16 -0
- package/dist/src/ui/components/data-entry/file-input/file-input.stories.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/file-input/file-input.stories.js +199 -0
- package/dist/src/ui/components/data-entry/file-input/file-input.stories.js.map +1 -0
- package/dist/src/ui/components/data-entry/file-input/file-input.test.d.ts +2 -0
- package/dist/src/ui/components/data-entry/file-input/file-input.test.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/file-input/file-input.test.js +114 -0
- package/dist/src/ui/components/data-entry/file-input/file-input.test.js.map +1 -0
- package/dist/src/ui/components/data-entry/file-input/index.js +1 -0
- package/dist/src/ui/components/data-entry/file-input/index.js.map +1 -1
- package/dist/src/ui/components/data-entry/file-input/sub-components/loading-bar.d.ts +1 -0
- package/dist/src/ui/components/data-entry/file-input/sub-components/loading-bar.d.ts.map +1 -1
- package/dist/src/ui/components/data-entry/file-input/sub-components/loading-bar.js.map +1 -1
- package/dist/src/ui/components/data-entry/input/input.stories.d.ts +41 -0
- package/dist/src/ui/components/data-entry/input/input.stories.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/input/input.stories.js +70 -0
- package/dist/src/ui/components/data-entry/input/input.stories.js.map +1 -0
- package/dist/src/ui/components/data-entry/input/input.test.d.ts +2 -0
- package/dist/src/ui/components/data-entry/input/input.test.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/input/input.test.js +46 -0
- package/dist/src/ui/components/data-entry/input/input.test.js.map +1 -0
- package/dist/src/ui/components/data-entry/input/splitted-input-diff.d.ts +1 -0
- package/dist/src/ui/components/data-entry/input/splitted-input-diff.d.ts.map +1 -1
- package/dist/src/ui/components/data-entry/input/splitted-input-diff.js.map +1 -1
- package/dist/src/ui/components/data-entry/input/subcomponent/text-diff.d.ts +1 -0
- package/dist/src/ui/components/data-entry/input/subcomponent/text-diff.d.ts.map +1 -1
- package/dist/src/ui/components/data-entry/input/subcomponent/text-diff.js.map +1 -1
- package/dist/src/ui/components/data-entry/number-input/number-input.stories.d.ts +173 -0
- package/dist/src/ui/components/data-entry/number-input/number-input.stories.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/number-input/number-input.stories.js +249 -0
- package/dist/src/ui/components/data-entry/number-input/number-input.stories.js.map +1 -0
- package/dist/src/ui/components/data-entry/number-input/number-input.test.d.ts +2 -0
- package/dist/src/ui/components/data-entry/number-input/number-input.test.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/number-input/number-input.test.js +234 -0
- package/dist/src/ui/components/data-entry/number-input/number-input.test.js.map +1 -0
- package/dist/src/ui/components/data-entry/number-input/use-number-input.d.ts +1 -1
- package/dist/src/ui/components/data-entry/oid-input/oid-input.stories.d.ts +72 -0
- package/dist/src/ui/components/data-entry/oid-input/oid-input.stories.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/oid-input/oid-input.stories.js +457 -0
- package/dist/src/ui/components/data-entry/oid-input/oid-input.stories.js.map +1 -0
- package/dist/src/ui/components/data-entry/oid-input/oid-input.test.d.ts +2 -0
- package/dist/src/ui/components/data-entry/oid-input/oid-input.test.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/oid-input/oid-input.test.js +176 -0
- package/dist/src/ui/components/data-entry/oid-input/oid-input.test.js.map +1 -0
- package/dist/src/ui/components/data-entry/password-input/password-input.stories.d.ts +21 -0
- package/dist/src/ui/components/data-entry/password-input/password-input.stories.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/password-input/password-input.stories.js +101 -0
- package/dist/src/ui/components/data-entry/password-input/password-input.stories.js.map +1 -0
- package/dist/src/ui/components/data-entry/password-input/password-input.test.d.ts +2 -0
- package/dist/src/ui/components/data-entry/password-input/password-input.test.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/password-input/password-input.test.js +92 -0
- package/dist/src/ui/components/data-entry/password-input/password-input.test.js.map +1 -0
- package/dist/src/ui/components/data-entry/phid-input/phid-input.stories.d.ts +72 -0
- package/dist/src/ui/components/data-entry/phid-input/phid-input.stories.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/phid-input/phid-input.stories.js +486 -0
- package/dist/src/ui/components/data-entry/phid-input/phid-input.stories.js.map +1 -0
- package/dist/src/ui/components/data-entry/phid-input/phid-input.test.d.ts +2 -0
- package/dist/src/ui/components/data-entry/phid-input/phid-input.test.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/phid-input/phid-input.test.js +179 -0
- package/dist/src/ui/components/data-entry/phid-input/phid-input.test.js.map +1 -0
- package/dist/src/ui/components/data-entry/phone-number-input/phone-number-input.stories.d.ts +21 -0
- package/dist/src/ui/components/data-entry/phone-number-input/phone-number-input.stories.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/phone-number-input/phone-number-input.stories.js +122 -0
- package/dist/src/ui/components/data-entry/phone-number-input/phone-number-input.stories.js.map +1 -0
- package/dist/src/ui/components/data-entry/phone-number-input/phone-number-input.test.d.ts +2 -0
- package/dist/src/ui/components/data-entry/phone-number-input/phone-number-input.test.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/phone-number-input/phone-number-input.test.js +190 -0
- package/dist/src/ui/components/data-entry/phone-number-input/phone-number-input.test.js.map +1 -0
- package/dist/src/ui/components/data-entry/phone-number-input/use-phone-number-input.d.ts +1 -1
- package/dist/src/ui/components/data-entry/phone-number-input/use-phone-number-input.js +1 -1
- package/dist/src/ui/components/data-entry/phone-number-input/use-phone-number-input.js.map +1 -1
- package/dist/src/ui/components/data-entry/radio-group/customizable-radio-group.test.d.ts +2 -0
- package/dist/src/ui/components/data-entry/radio-group/customizable-radio-group.test.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/radio-group/customizable-radio-group.test.js +76 -0
- package/dist/src/ui/components/data-entry/radio-group/customizable-radio-group.test.js.map +1 -0
- package/dist/src/ui/components/data-entry/radio-group/radio-group.stories.d.ts +86 -0
- package/dist/src/ui/components/data-entry/radio-group/radio-group.stories.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/radio-group/radio-group.stories.js +250 -0
- package/dist/src/ui/components/data-entry/radio-group/radio-group.stories.js.map +1 -0
- package/dist/src/ui/components/data-entry/radio-group/radio-group.test.d.ts +2 -0
- package/dist/src/ui/components/data-entry/radio-group/radio-group.test.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/radio-group/radio-group.test.js +136 -0
- package/dist/src/ui/components/data-entry/radio-group/radio-group.test.js.map +1 -0
- package/dist/src/ui/components/data-entry/radio-group/radio.test.d.ts +2 -0
- package/dist/src/ui/components/data-entry/radio-group/radio.test.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/radio-group/radio.test.js +63 -0
- package/dist/src/ui/components/data-entry/radio-group/radio.test.js.map +1 -0
- package/dist/src/ui/components/data-entry/select/content.d.ts +1 -1
- package/dist/src/ui/components/data-entry/select/content.d.ts.map +1 -1
- package/dist/src/ui/components/data-entry/select/select-diff.d.ts +1 -0
- package/dist/src/ui/components/data-entry/select/select-diff.d.ts.map +1 -1
- package/dist/src/ui/components/data-entry/select/select-diff.js.map +1 -1
- package/dist/src/ui/components/data-entry/select/select.stories.d.ts +75 -0
- package/dist/src/ui/components/data-entry/select/select.stories.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/select/select.stories.js +439 -0
- package/dist/src/ui/components/data-entry/select/select.stories.js.map +1 -0
- package/dist/src/ui/components/data-entry/select/select.test.d.ts +2 -0
- package/dist/src/ui/components/data-entry/select/select.test.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/select/select.test.js +218 -0
- package/dist/src/ui/components/data-entry/select/select.test.js.map +1 -0
- package/dist/src/ui/components/data-entry/select/use-select.d.ts +1 -1
- package/dist/src/ui/components/data-entry/select/use-select.js.map +1 -1
- package/dist/src/ui/components/data-entry/text-input/index.js +1 -0
- package/dist/src/ui/components/data-entry/text-input/index.js.map +1 -1
- package/dist/src/ui/components/data-entry/text-input/text-input.js +1 -1
- package/dist/src/ui/components/data-entry/text-input/text-input.js.map +1 -1
- package/dist/src/ui/components/data-entry/text-input/text-input.stories.d.ts +171 -0
- package/dist/src/ui/components/data-entry/text-input/text-input.stories.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/text-input/text-input.stories.js +133 -0
- package/dist/src/ui/components/data-entry/text-input/text-input.stories.js.map +1 -0
- package/dist/src/ui/components/data-entry/textarea/textarea.d.ts +2 -3
- package/dist/src/ui/components/data-entry/textarea/textarea.d.ts.map +1 -1
- package/dist/src/ui/components/data-entry/textarea/textarea.js +10 -10
- package/dist/src/ui/components/data-entry/textarea/textarea.js.map +1 -1
- package/dist/src/ui/components/data-entry/textarea/textarea.stories.d.ts +177 -0
- package/dist/src/ui/components/data-entry/textarea/textarea.stories.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/textarea/textarea.stories.js +167 -0
- package/dist/src/ui/components/data-entry/textarea/textarea.stories.js.map +1 -0
- package/dist/src/ui/components/data-entry/time-picker/index.js +1 -0
- package/dist/src/ui/components/data-entry/time-picker/index.js.map +1 -1
- package/dist/src/ui/components/data-entry/time-picker/subcomponents/time-selector.js +2 -2
- package/dist/src/ui/components/data-entry/time-picker/subcomponents/time-selector.js.map +1 -1
- package/dist/src/ui/components/data-entry/time-picker/subcomponents/use-time-selector.d.ts +2 -2
- package/dist/src/ui/components/data-entry/time-picker/subcomponents/use-time-selector.d.ts.map +1 -1
- package/dist/src/ui/components/data-entry/time-picker/time-picker.stories.d.ts +66 -0
- package/dist/src/ui/components/data-entry/time-picker/time-picker.stories.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/time-picker/time-picker.stories.js +228 -0
- package/dist/src/ui/components/data-entry/time-picker/time-picker.stories.js.map +1 -0
- package/dist/src/ui/components/data-entry/time-picker/time-picker.test.d.ts +2 -0
- package/dist/src/ui/components/data-entry/time-picker/time-picker.test.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/time-picker/time-picker.test.js +235 -0
- package/dist/src/ui/components/data-entry/time-picker/time-picker.test.js.map +1 -0
- package/dist/src/ui/components/data-entry/time-picker/utils.test.d.ts +2 -0
- package/dist/src/ui/components/data-entry/time-picker/utils.test.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/time-picker/utils.test.js +149 -0
- package/dist/src/ui/components/data-entry/time-picker/utils.test.js.map +1 -0
- package/dist/src/ui/components/data-entry/toggle/toggle-base.test.d.ts +2 -0
- package/dist/src/ui/components/data-entry/toggle/toggle-base.test.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/toggle/toggle-base.test.js +98 -0
- package/dist/src/ui/components/data-entry/toggle/toggle-base.test.js.map +1 -0
- package/dist/src/ui/components/data-entry/toggle/toggle.stories.d.ts +68 -0
- package/dist/src/ui/components/data-entry/toggle/toggle.stories.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/toggle/toggle.stories.js +131 -0
- package/dist/src/ui/components/data-entry/toggle/toggle.stories.js.map +1 -0
- package/dist/src/ui/components/data-entry/url-input/url-input.stories.d.ts +34 -0
- package/dist/src/ui/components/data-entry/url-input/url-input.stories.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/url-input/url-input.stories.js +156 -0
- package/dist/src/ui/components/data-entry/url-input/url-input.stories.js.map +1 -0
- package/dist/src/ui/components/data-entry/url-input/url-input.test.d.ts +2 -0
- package/dist/src/ui/components/data-entry/url-input/url-input.test.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/url-input/url-input.test.js +72 -0
- package/dist/src/ui/components/data-entry/url-input/url-input.test.js.map +1 -0
- package/dist/src/ui/components/dropdown/dropdown.stories.d.ts +169 -0
- package/dist/src/ui/components/dropdown/dropdown.stories.d.ts.map +1 -0
- package/dist/src/ui/components/dropdown/dropdown.stories.js +194 -0
- package/dist/src/ui/components/dropdown/dropdown.stories.js.map +1 -0
- package/dist/src/ui/components/icon/icon.stories.d.ts +16 -0
- package/dist/src/ui/components/icon/icon.stories.d.ts.map +1 -0
- package/dist/src/ui/components/icon/icon.stories.js +37 -0
- package/dist/src/ui/components/icon/icon.stories.js.map +1 -0
- package/dist/src/ui/components/icon/index.js +1 -0
- package/dist/src/ui/components/icon/index.js.map +1 -1
- package/dist/src/ui/components/sidebar/sidebar.stories.d.ts +147 -0
- package/dist/src/ui/components/sidebar/sidebar.stories.d.ts.map +1 -0
- package/dist/src/ui/components/sidebar/sidebar.stories.js +420 -0
- package/dist/src/ui/components/sidebar/sidebar.stories.js.map +1 -0
- package/dist/src/ui/components/sidebar/sidebar.test.d.ts +2 -0
- package/dist/src/ui/components/sidebar/sidebar.test.d.ts.map +1 -0
- package/dist/src/ui/components/sidebar/sidebar.test.js +357 -0
- package/dist/src/ui/components/sidebar/sidebar.test.js.map +1 -0
- package/dist/src/ui/components/sidebar/subcomponents/sidebar-item.d.ts.map +1 -1
- package/dist/src/ui/components/sidebar/subcomponents/sidebar-item.js +3 -1
- package/dist/src/ui/components/sidebar/subcomponents/sidebar-item.js.map +1 -1
- package/dist/src/ui/components/sidebar/subcomponents/sidebar-provider/sidebar-provider.d.ts +1 -1
- package/dist/src/ui/components/sidebar/subcomponents/sidebar-provider/sidebar-provider.d.ts.map +1 -1
- package/dist/src/ui/components/sidebar/subcomponents/status-icon.d.ts +1 -1
- package/dist/src/ui/components/sidebar/subcomponents/status-icon.d.ts.map +1 -1
- package/dist/src/ui/components/sidebar/use-sidebar-resize.d.ts +1 -1
- package/dist/src/ui/components/tooltip/tooltip.stories.d.ts +11 -0
- package/dist/src/ui/components/tooltip/tooltip.stories.d.ts.map +1 -0
- package/dist/src/ui/components/tooltip/tooltip.stories.js +87 -0
- package/dist/src/ui/components/tooltip/tooltip.stories.js.map +1 -0
- package/dist/src/ui/components/tooltip/tooltip.test.d.ts +2 -0
- package/dist/src/ui/components/tooltip/tooltip.test.d.ts.map +1 -0
- package/dist/src/ui/components/tooltip/tooltip.test.js +60 -0
- package/dist/src/ui/components/tooltip/tooltip.test.js.map +1 -0
- package/dist/style.css +19 -18
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/vitest.config.d.ts +3 -0
- package/dist/vitest.config.d.ts.map +1 -0
- package/dist/vitest.config.js +16 -0
- package/dist/vitest.config.js.map +1 -0
- package/package.json +90 -88
- package/dist/scripts/create-icon-components.d.ts +0 -2
- package/dist/scripts/create-icon-components.d.ts.map +0 -1
- package/dist/scripts/create-icon-components.js +0 -91
- package/dist/scripts/create-icon-components.js.map +0 -1
- package/dist/tsconfig.lib.tsbuildinfo +0 -1
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import DropdownExample from './dropdown-example.js';
|
|
3
|
+
/**
|
|
4
|
+
* The `Dropdown` component system provides a flexible way to create interactive menus.
|
|
5
|
+
* It follows a strict parent-child component structure where:
|
|
6
|
+
* - `Dropdown` is the root container
|
|
7
|
+
* - `DropdownTrigger` activates the menu
|
|
8
|
+
* - `DropdownContent` wraps the menu items
|
|
9
|
+
* - `DropdownItem` represents individual menu options
|
|
10
|
+
*
|
|
11
|
+
* ## How to setup the component
|
|
12
|
+
*
|
|
13
|
+
* First import the necessary components:
|
|
14
|
+
*
|
|
15
|
+
* ```tsx
|
|
16
|
+
* import { Dropdown, DropdownTrigger, DropdownContent, DropdownItem } from "@powerhousedao/document-engineering/ui";
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* Basic implementation:
|
|
20
|
+
*
|
|
21
|
+
* ```tsx
|
|
22
|
+
* function MyComponent() {
|
|
23
|
+
* return (
|
|
24
|
+
* <Dropdown>
|
|
25
|
+
* <DropdownTrigger>Open Menu</DropdownTrigger>
|
|
26
|
+
* <DropdownContent>
|
|
27
|
+
* <DropdownItem>Item 1</DropdownItem>
|
|
28
|
+
* <DropdownItem>Item 2</DropdownItem>
|
|
29
|
+
* </DropdownContent>
|
|
30
|
+
* </Dropdown>
|
|
31
|
+
* );
|
|
32
|
+
* }
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* Basic usage with icons:
|
|
36
|
+
*
|
|
37
|
+
* ```tsx
|
|
38
|
+
* <Dropdown>
|
|
39
|
+
* <DropdownTrigger className="w-[184px]">
|
|
40
|
+
* <DownloadIcon width={16} height={16} />
|
|
41
|
+
* Export Options
|
|
42
|
+
* </DropdownTrigger>
|
|
43
|
+
* <DropdownContent>
|
|
44
|
+
* <DropdownItem>
|
|
45
|
+
* <PDFIcon width={16} height={16} />
|
|
46
|
+
* Save as PDF
|
|
47
|
+
* </DropdownItem>
|
|
48
|
+
* <DropdownItem>
|
|
49
|
+
* <CSVIcon width={16} height={16} />
|
|
50
|
+
* Export CSV
|
|
51
|
+
* </DropdownItem>
|
|
52
|
+
* </DropdownContent>
|
|
53
|
+
* </Dropdown>
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* ## Component Structure Rules
|
|
57
|
+
* 1. `DropdownItem` must always be wrapped in `DropdownContent`
|
|
58
|
+
* 2. `DropdownContent` must be a direct child of `Dropdown`
|
|
59
|
+
* 3. Icons should be placed as direct children before text content
|
|
60
|
+
*
|
|
61
|
+
* ## Creating Different Menu Types
|
|
62
|
+
*
|
|
63
|
+
* Example 1: Export Menu (from current implementation)
|
|
64
|
+
*
|
|
65
|
+
* ```tsx
|
|
66
|
+
* <Dropdown>
|
|
67
|
+
* <DropdownTrigger>
|
|
68
|
+
* <DownloadFileIcon />
|
|
69
|
+
* Export Format
|
|
70
|
+
* </DropdownTrigger>
|
|
71
|
+
* <DropdownContent>
|
|
72
|
+
* <DropdownItem><ZipIcon /> ZIP Archive</DropdownItem>
|
|
73
|
+
* <DropdownItem><UBLIcon /> UBL Format</DropdownItem>
|
|
74
|
+
* <DropdownItem><PDFIcon /> PDF Document</DropdownItem>
|
|
75
|
+
* </DropdownContent>
|
|
76
|
+
* </Dropdown>
|
|
77
|
+
* ```
|
|
78
|
+
*
|
|
79
|
+
* Example 2: Settings Menu
|
|
80
|
+
*
|
|
81
|
+
* ```tsx
|
|
82
|
+
* <Dropdown>
|
|
83
|
+
* <DropdownTrigger>
|
|
84
|
+
* <SettingsIcon />
|
|
85
|
+
* Configuration
|
|
86
|
+
* </DropdownTrigger>
|
|
87
|
+
* <DropdownContent>
|
|
88
|
+
* <DropdownItem><UserIcon /> Profile</DropdownItem>
|
|
89
|
+
* <DropdownItem><SecurityIcon /> Privacy</DropdownItem>
|
|
90
|
+
* <DropdownItem><NotificationIcon /> Alerts</DropdownItem>
|
|
91
|
+
* </DropdownContent>
|
|
92
|
+
* </Dropdown>
|
|
93
|
+
* ```
|
|
94
|
+
*
|
|
95
|
+
* Example 3: Navigation Menu
|
|
96
|
+
*
|
|
97
|
+
* ```tsx
|
|
98
|
+
* <Dropdown>
|
|
99
|
+
* <DropdownTrigger>
|
|
100
|
+
* <MenuIcon />
|
|
101
|
+
* Quick Links
|
|
102
|
+
* </DropdownTrigger>
|
|
103
|
+
* <DropdownContent>
|
|
104
|
+
* <DropdownItem><HomeIcon /> Dashboard</DropdownItem>
|
|
105
|
+
* <DropdownItem><AnalyticsIcon /> Reports</DropdownItem>
|
|
106
|
+
* <DropdownItem><SupportIcon /> Help Center</DropdownItem>
|
|
107
|
+
* </DropdownContent>
|
|
108
|
+
* </Dropdown>
|
|
109
|
+
* ```
|
|
110
|
+
*
|
|
111
|
+
* ## Icon Implementation
|
|
112
|
+
* Icons can be used in two ways:
|
|
113
|
+
*
|
|
114
|
+
* ** Direct SVG Import** (Recommended for custom icons):
|
|
115
|
+
*
|
|
116
|
+
* ```tsx
|
|
117
|
+
* import DownloadFile from "@/assets/icon-components/DownloadFile";
|
|
118
|
+
* <DropdownItem>
|
|
119
|
+
* <DownloadFile width={16} height={16} /> Download File
|
|
120
|
+
* </DropdownItem>
|
|
121
|
+
* ```
|
|
122
|
+
*
|
|
123
|
+
*
|
|
124
|
+
* ** Using Icon Component** (Recommended for dynamic icons):
|
|
125
|
+
*
|
|
126
|
+
* ```tsx
|
|
127
|
+
* import { Icon } from "@/powerhouse";
|
|
128
|
+
* <Dropdown>
|
|
129
|
+
* <DropdownTrigger>
|
|
130
|
+
* <Icon name="DownloadFile" />
|
|
131
|
+
* Download File
|
|
132
|
+
* </DropdownTrigger>
|
|
133
|
+
* <DropdownContent>
|
|
134
|
+
* <DropdownItem>
|
|
135
|
+
* <Icon name="DownloadFile" />
|
|
136
|
+
* Download File
|
|
137
|
+
* </DropdownItem>
|
|
138
|
+
* <DropdownItem>
|
|
139
|
+
* <Icon name="Settings" />
|
|
140
|
+
* Configuration
|
|
141
|
+
* </DropdownItem>
|
|
142
|
+
* </DropdownContent>
|
|
143
|
+
* </Dropdown>
|
|
144
|
+
* ```
|
|
145
|
+
*
|
|
146
|
+
* ## Event Handling
|
|
147
|
+
* `DropdownItem` component extends `HTMLDivElement` attributes. To handle click events:
|
|
148
|
+
*
|
|
149
|
+
* **Inline implementation:**
|
|
150
|
+
*
|
|
151
|
+
* ```tsx
|
|
152
|
+
* <DropdownItem onClick={() => console.log('Item clicked')}>
|
|
153
|
+
* <SettingsIcon /> Configuration
|
|
154
|
+
* </DropdownItem>
|
|
155
|
+
* ```
|
|
156
|
+
*
|
|
157
|
+
* The component accepts all `div` element props including:
|
|
158
|
+
* - `onClick`: Mouse click handler
|
|
159
|
+
* - `onMouseEnter`: Hover handler
|
|
160
|
+
* - `data-*`: Custom data attributes
|
|
161
|
+
* - `aria-*`: Accessibility attributes
|
|
162
|
+
*
|
|
163
|
+
* TypeScript users get full type checking for native div element props.
|
|
164
|
+
*/
|
|
165
|
+
declare const meta: Meta<typeof DropdownExample>;
|
|
166
|
+
export default meta;
|
|
167
|
+
type Story = StoryObj<typeof DropdownExample>;
|
|
168
|
+
export declare const Default: Story;
|
|
169
|
+
//# sourceMappingURL=dropdown.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown.stories.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/dropdown/dropdown.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAEtD,OAAO,eAAe,MAAM,uBAAuB,CAAA;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiKG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,eAAe,CAuBC,CAAA;AAExC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,eAAe,CAAC,CAAA;AAC7C,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAA"}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { StorybookControlCategory } from '../../../scalars/lib/storybook-arg-types.js';
|
|
2
|
+
import DropdownExample from './dropdown-example.js';
|
|
3
|
+
/**
|
|
4
|
+
* The `Dropdown` component system provides a flexible way to create interactive menus.
|
|
5
|
+
* It follows a strict parent-child component structure where:
|
|
6
|
+
* - `Dropdown` is the root container
|
|
7
|
+
* - `DropdownTrigger` activates the menu
|
|
8
|
+
* - `DropdownContent` wraps the menu items
|
|
9
|
+
* - `DropdownItem` represents individual menu options
|
|
10
|
+
*
|
|
11
|
+
* ## How to setup the component
|
|
12
|
+
*
|
|
13
|
+
* First import the necessary components:
|
|
14
|
+
*
|
|
15
|
+
* ```tsx
|
|
16
|
+
* import { Dropdown, DropdownTrigger, DropdownContent, DropdownItem } from "@powerhousedao/document-engineering/ui";
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* Basic implementation:
|
|
20
|
+
*
|
|
21
|
+
* ```tsx
|
|
22
|
+
* function MyComponent() {
|
|
23
|
+
* return (
|
|
24
|
+
* <Dropdown>
|
|
25
|
+
* <DropdownTrigger>Open Menu</DropdownTrigger>
|
|
26
|
+
* <DropdownContent>
|
|
27
|
+
* <DropdownItem>Item 1</DropdownItem>
|
|
28
|
+
* <DropdownItem>Item 2</DropdownItem>
|
|
29
|
+
* </DropdownContent>
|
|
30
|
+
* </Dropdown>
|
|
31
|
+
* );
|
|
32
|
+
* }
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* Basic usage with icons:
|
|
36
|
+
*
|
|
37
|
+
* ```tsx
|
|
38
|
+
* <Dropdown>
|
|
39
|
+
* <DropdownTrigger className="w-[184px]">
|
|
40
|
+
* <DownloadIcon width={16} height={16} />
|
|
41
|
+
* Export Options
|
|
42
|
+
* </DropdownTrigger>
|
|
43
|
+
* <DropdownContent>
|
|
44
|
+
* <DropdownItem>
|
|
45
|
+
* <PDFIcon width={16} height={16} />
|
|
46
|
+
* Save as PDF
|
|
47
|
+
* </DropdownItem>
|
|
48
|
+
* <DropdownItem>
|
|
49
|
+
* <CSVIcon width={16} height={16} />
|
|
50
|
+
* Export CSV
|
|
51
|
+
* </DropdownItem>
|
|
52
|
+
* </DropdownContent>
|
|
53
|
+
* </Dropdown>
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* ## Component Structure Rules
|
|
57
|
+
* 1. `DropdownItem` must always be wrapped in `DropdownContent`
|
|
58
|
+
* 2. `DropdownContent` must be a direct child of `Dropdown`
|
|
59
|
+
* 3. Icons should be placed as direct children before text content
|
|
60
|
+
*
|
|
61
|
+
* ## Creating Different Menu Types
|
|
62
|
+
*
|
|
63
|
+
* Example 1: Export Menu (from current implementation)
|
|
64
|
+
*
|
|
65
|
+
* ```tsx
|
|
66
|
+
* <Dropdown>
|
|
67
|
+
* <DropdownTrigger>
|
|
68
|
+
* <DownloadFileIcon />
|
|
69
|
+
* Export Format
|
|
70
|
+
* </DropdownTrigger>
|
|
71
|
+
* <DropdownContent>
|
|
72
|
+
* <DropdownItem><ZipIcon /> ZIP Archive</DropdownItem>
|
|
73
|
+
* <DropdownItem><UBLIcon /> UBL Format</DropdownItem>
|
|
74
|
+
* <DropdownItem><PDFIcon /> PDF Document</DropdownItem>
|
|
75
|
+
* </DropdownContent>
|
|
76
|
+
* </Dropdown>
|
|
77
|
+
* ```
|
|
78
|
+
*
|
|
79
|
+
* Example 2: Settings Menu
|
|
80
|
+
*
|
|
81
|
+
* ```tsx
|
|
82
|
+
* <Dropdown>
|
|
83
|
+
* <DropdownTrigger>
|
|
84
|
+
* <SettingsIcon />
|
|
85
|
+
* Configuration
|
|
86
|
+
* </DropdownTrigger>
|
|
87
|
+
* <DropdownContent>
|
|
88
|
+
* <DropdownItem><UserIcon /> Profile</DropdownItem>
|
|
89
|
+
* <DropdownItem><SecurityIcon /> Privacy</DropdownItem>
|
|
90
|
+
* <DropdownItem><NotificationIcon /> Alerts</DropdownItem>
|
|
91
|
+
* </DropdownContent>
|
|
92
|
+
* </Dropdown>
|
|
93
|
+
* ```
|
|
94
|
+
*
|
|
95
|
+
* Example 3: Navigation Menu
|
|
96
|
+
*
|
|
97
|
+
* ```tsx
|
|
98
|
+
* <Dropdown>
|
|
99
|
+
* <DropdownTrigger>
|
|
100
|
+
* <MenuIcon />
|
|
101
|
+
* Quick Links
|
|
102
|
+
* </DropdownTrigger>
|
|
103
|
+
* <DropdownContent>
|
|
104
|
+
* <DropdownItem><HomeIcon /> Dashboard</DropdownItem>
|
|
105
|
+
* <DropdownItem><AnalyticsIcon /> Reports</DropdownItem>
|
|
106
|
+
* <DropdownItem><SupportIcon /> Help Center</DropdownItem>
|
|
107
|
+
* </DropdownContent>
|
|
108
|
+
* </Dropdown>
|
|
109
|
+
* ```
|
|
110
|
+
*
|
|
111
|
+
* ## Icon Implementation
|
|
112
|
+
* Icons can be used in two ways:
|
|
113
|
+
*
|
|
114
|
+
* ** Direct SVG Import** (Recommended for custom icons):
|
|
115
|
+
*
|
|
116
|
+
* ```tsx
|
|
117
|
+
* import DownloadFile from "@/assets/icon-components/DownloadFile";
|
|
118
|
+
* <DropdownItem>
|
|
119
|
+
* <DownloadFile width={16} height={16} /> Download File
|
|
120
|
+
* </DropdownItem>
|
|
121
|
+
* ```
|
|
122
|
+
*
|
|
123
|
+
*
|
|
124
|
+
* ** Using Icon Component** (Recommended for dynamic icons):
|
|
125
|
+
*
|
|
126
|
+
* ```tsx
|
|
127
|
+
* import { Icon } from "@/powerhouse";
|
|
128
|
+
* <Dropdown>
|
|
129
|
+
* <DropdownTrigger>
|
|
130
|
+
* <Icon name="DownloadFile" />
|
|
131
|
+
* Download File
|
|
132
|
+
* </DropdownTrigger>
|
|
133
|
+
* <DropdownContent>
|
|
134
|
+
* <DropdownItem>
|
|
135
|
+
* <Icon name="DownloadFile" />
|
|
136
|
+
* Download File
|
|
137
|
+
* </DropdownItem>
|
|
138
|
+
* <DropdownItem>
|
|
139
|
+
* <Icon name="Settings" />
|
|
140
|
+
* Configuration
|
|
141
|
+
* </DropdownItem>
|
|
142
|
+
* </DropdownContent>
|
|
143
|
+
* </Dropdown>
|
|
144
|
+
* ```
|
|
145
|
+
*
|
|
146
|
+
* ## Event Handling
|
|
147
|
+
* `DropdownItem` component extends `HTMLDivElement` attributes. To handle click events:
|
|
148
|
+
*
|
|
149
|
+
* **Inline implementation:**
|
|
150
|
+
*
|
|
151
|
+
* ```tsx
|
|
152
|
+
* <DropdownItem onClick={() => console.log('Item clicked')}>
|
|
153
|
+
* <SettingsIcon /> Configuration
|
|
154
|
+
* </DropdownItem>
|
|
155
|
+
* ```
|
|
156
|
+
*
|
|
157
|
+
* The component accepts all `div` element props including:
|
|
158
|
+
* - `onClick`: Mouse click handler
|
|
159
|
+
* - `onMouseEnter`: Hover handler
|
|
160
|
+
* - `data-*`: Custom data attributes
|
|
161
|
+
* - `aria-*`: Accessibility attributes
|
|
162
|
+
*
|
|
163
|
+
* TypeScript users get full type checking for native div element props.
|
|
164
|
+
*/
|
|
165
|
+
const meta = {
|
|
166
|
+
title: 'Data Display/Dropdown',
|
|
167
|
+
component: DropdownExample,
|
|
168
|
+
parameters: {
|
|
169
|
+
layout: 'centered',
|
|
170
|
+
chromatic: {
|
|
171
|
+
disableSnapshot: true,
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
tags: ['autodocs'],
|
|
175
|
+
argTypes: {
|
|
176
|
+
label: {
|
|
177
|
+
label: {
|
|
178
|
+
control: 'text',
|
|
179
|
+
description: 'Sets the visible label text for the input field',
|
|
180
|
+
table: {
|
|
181
|
+
type: { summary: 'string' },
|
|
182
|
+
category: StorybookControlCategory.COMPONENT_SPECIFIC,
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
};
|
|
188
|
+
export default meta;
|
|
189
|
+
export const Default = {
|
|
190
|
+
args: {
|
|
191
|
+
label: 'Export as',
|
|
192
|
+
},
|
|
193
|
+
};
|
|
194
|
+
//# sourceMappingURL=dropdown.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown.stories.js","sourceRoot":"","sources":["../../../../../src/ui/components/dropdown/dropdown.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAA;AACtF,OAAO,eAAe,MAAM,uBAAuB,CAAA;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiKG;AACH,MAAM,IAAI,GAAiC;IACzC,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,eAAe;IAC1B,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;QAClB,SAAS,EAAE;YACT,eAAe,EAAE,IAAI;SACtB;KACF;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,KAAK,EAAE;gBACL,OAAO,EAAE,MAAM;gBACf,WAAW,EAAE,iDAAiD;gBAC9D,KAAK,EAAE;oBACL,IAAI,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;oBAC3B,QAAQ,EAAE,wBAAwB,CAAC,kBAAkB;iBACtD;aACF;SACF;KACF;CACqC,CAAA;AAExC,eAAe,IAAI,CAAA;AAEnB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,KAAK,EAAE,WAAW;KACnB;CACF,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { Icon } from './icon.js';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ name, size, color, style, ...props }: import("./icon.js").IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof Icon>;
|
|
12
|
+
export declare const AllIcons: Story;
|
|
13
|
+
export declare const CustomColor: Story;
|
|
14
|
+
export declare const CustomSize: Story;
|
|
15
|
+
export declare const SingleIcon: Story;
|
|
16
|
+
//# sourceMappingURL=icon.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.stories.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/icon/icon.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAEtD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,QAAA,MAAM,IAAI;;;;;;CAMmB,CAAA;AAE7B,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,QAAQ,EAAE,KAqBtB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAKzB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAKxB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAIxB,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { iconNames } from '../icon-components/index.js';
|
|
3
|
+
import { Icon } from './icon.js';
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Data Display/Icon',
|
|
6
|
+
component: Icon,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'centered',
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
export const AllIcons = {
|
|
13
|
+
args: {
|
|
14
|
+
name: 'Circle',
|
|
15
|
+
},
|
|
16
|
+
render: () => {
|
|
17
|
+
return (_jsxs("div", { className: "bg-white p-8", children: [_jsx("h2", { className: "mb-6 text-xl font-semibold", children: "All Available Icons" }), _jsx("div", { className: "flex flex-wrap", children: iconNames.map((name) => (_jsxs("div", { className: "flex flex-col items-center gap-2 rounded-lg border border-gray-200 p-4", children: [_jsx("div", { className: "flex size-10 items-center justify-center", children: _jsx(Icon, { name: name, className: "text-gray-700" }) }), _jsx("span", { className: "text-xs text-gray-600", children: name })] }, name))) })] }));
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
export const CustomColor = {
|
|
21
|
+
args: {
|
|
22
|
+
name: 'Circle',
|
|
23
|
+
color: 'blue',
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
export const CustomSize = {
|
|
27
|
+
args: {
|
|
28
|
+
name: 'Circle',
|
|
29
|
+
size: 48,
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
export const SingleIcon = {
|
|
33
|
+
args: {
|
|
34
|
+
name: 'Circle',
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=icon.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.stories.js","sourceRoot":"","sources":["../../../../../src/ui/components/icon/icon.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAA;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;CAC0B,CAAA;AAE7B,eAAe,IAAI,CAAA;AAGnB,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;KACf;IACD,MAAM,EAAE,GAAG,EAAE;QACX,OAAO,CACL,eAAK,SAAS,EAAC,cAAc,aAC3B,aAAI,SAAS,EAAC,4BAA4B,oCAAyB,EACnE,cAAK,SAAS,EAAC,gBAAgB,YAC5B,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACvB,eAAgB,SAAS,EAAC,wEAAwE,aAChG,cAAK,SAAS,EAAC,0CAA0C,YACvD,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAC,eAAe,GAAG,GAC1C,EACN,eAAM,SAAS,EAAC,uBAAuB,YAAE,IAAI,GAAQ,KAJ7C,IAAI,CAKR,CACP,CAAC,GACE,IACF,CACP,CAAA;IACH,CAAC;CACF,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAU;IAChC,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,MAAM;KACd;CACF,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,EAAE;KACT;CACF,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;KACf;CACF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ui/components/icon/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ui/components/icon/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,OAAO,EAAiB,MAAM,6BAA6B,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAA"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Sidebar } from './sidebar.js';
|
|
3
|
+
/**
|
|
4
|
+
* The `Sidebar` component can be used within a page layout to provide a sidebar navigation.
|
|
5
|
+
* It provided a tree structure of nodes that can be used to navigate the application offering customization, search and more.
|
|
6
|
+
*
|
|
7
|
+
* The `Sidebar` component requires a `SidebarProvider` ancestor component to function correctly. The `SidebarProvider` accepts an optional `nodes` prop
|
|
8
|
+
* which defines the navigation tree structure. If `nodes` is not provided to the provider, the `Sidebar` component can accept its own `nodes` prop.
|
|
9
|
+
* If neither source provides nodes, the sidebar will render empty.
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
*
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <SidebarProvider nodes={nodes}>
|
|
15
|
+
* <Sidebar {...sidebarProps} />
|
|
16
|
+
* </SidebarProvider>
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* The sidebar nodes are defined as follows:
|
|
20
|
+
*
|
|
21
|
+
* ```tsx
|
|
22
|
+
* type SidebarNode = {
|
|
23
|
+
* id: string;
|
|
24
|
+
* title: string;
|
|
25
|
+
* children: SidebarNode[];
|
|
26
|
+
* icon?: IconName | ReactElement;
|
|
27
|
+
* expandedIcon?: IconName | ReactElement;
|
|
28
|
+
* status?: NodeStatus;
|
|
29
|
+
* };
|
|
30
|
+
* enum NodeStatus {
|
|
31
|
+
* CREATED = "CREATED",
|
|
32
|
+
* MODIFIED = "MODIFIED",
|
|
33
|
+
* REMOVED = "REMOVED",
|
|
34
|
+
* MOVED = "MOVED",
|
|
35
|
+
* DUPLICATED = "DUPLICATED",
|
|
36
|
+
* UNCHANGED = "UNCHANGED", // default status, no need to set it
|
|
37
|
+
* }
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* The `icon` and `expandedIcon` properties are optional and can be used to display an icon in the sidebar item.
|
|
41
|
+
* This icons must be one of the [available icons](?path=/docs/powerhouse-iconography--readme)
|
|
42
|
+
*
|
|
43
|
+
*
|
|
44
|
+
* ## Sidebar Events
|
|
45
|
+
*
|
|
46
|
+
* The `Sidebar` component emits the following custom events:
|
|
47
|
+
*
|
|
48
|
+
* - `sidebar:change`: it is triggered when the sidebar item is clicked.
|
|
49
|
+
* - Data: `{ node: SidebarNode }`
|
|
50
|
+
* - `sidebar:resize:start`: it is triggered when the sidebar resize starts at the moment the user clicks down in the resizing handle.
|
|
51
|
+
* - Data: `{ isSidebarOpen: boolean }`
|
|
52
|
+
* - `sidebar:resize:active`: it is triggered when the sidebar is being resized while the user is dragging the resizing handle.
|
|
53
|
+
* It could be triggered multiple times while the user is dragging the resizing handle.
|
|
54
|
+
* - Data: `{ isSidebarOpen: boolean, sidebarWidth: number }`
|
|
55
|
+
* - `sidebar:resize`: it is triggered when the sidebar resize stops at the moment the user releases the resizing handle.
|
|
56
|
+
* - Data: `{ isSidebarOpen: boolean, sidebarWidth: number }`
|
|
57
|
+
* - `sidebar:resize:toggle`: it is triggered when the sidebar is toggled (collapsed or expanded).
|
|
58
|
+
* - Data: `{ isSidebarOpen: boolean }`
|
|
59
|
+
*
|
|
60
|
+
* ### Example of listening to the events
|
|
61
|
+
*
|
|
62
|
+
* ```tsx
|
|
63
|
+
* useEffect(() => {
|
|
64
|
+
* const onResize = (event: Event) => {
|
|
65
|
+
* console.log("sidebar:resize", event);
|
|
66
|
+
* };
|
|
67
|
+
*
|
|
68
|
+
* // you can add the listener directly to the document or add a
|
|
69
|
+
* // `className`, get the sidebar element and add the listener to it.
|
|
70
|
+
* document.addEventListener("sidebar:resize", onResize);
|
|
71
|
+
*
|
|
72
|
+
* return () => {
|
|
73
|
+
* document.removeEventListener("sidebar:resize", onResize);
|
|
74
|
+
* };
|
|
75
|
+
* }, []);
|
|
76
|
+
* ```
|
|
77
|
+
* ## Customization
|
|
78
|
+
* The sidebar can be customized using the `className` prop which accepts a string of Tailwind classes.
|
|
79
|
+
* Each class should follow the format `[&_.sidebar\\_\\_{element}]:{tailwind-classes}`.
|
|
80
|
+
*
|
|
81
|
+
* Base classes available for customization:
|
|
82
|
+
* - .sidebar__container: Main sidebar container
|
|
83
|
+
* - .sidebar__item: Individual sidebar item
|
|
84
|
+
* - .sidebar__item--active: Active sidebar item
|
|
85
|
+
* - .sidebar__item-title: Item title text
|
|
86
|
+
* - .sidebar__item-caret: Expand/collapse caret button
|
|
87
|
+
* - .sidebar__item-caret--no-children: Caret for items without children
|
|
88
|
+
* - .sidebar__item-pin: Pin button for items
|
|
89
|
+
* - .sidebar__item-pin--active: Active pin button
|
|
90
|
+
* - .sidebar__header: Sidebar header container
|
|
91
|
+
* - .sidebar__header-title: Header title text
|
|
92
|
+
* - .sidebar__header-macro-item: Macro item in header
|
|
93
|
+
* - .sidebar__pinning-area: Pinned items area
|
|
94
|
+
*
|
|
95
|
+
* ## Example Usage
|
|
96
|
+
*
|
|
97
|
+
*
|
|
98
|
+
* ```tsx
|
|
99
|
+
* import { Sidebar } from './sidebar'
|
|
100
|
+
*
|
|
101
|
+
* function MyCustomSidebar() {
|
|
102
|
+
* return (
|
|
103
|
+
* <Sidebar
|
|
104
|
+
* className={String.raw`
|
|
105
|
+
* [&_.sidebar\\_\\_item]:bg-blue-500
|
|
106
|
+
* [&_.sidebar\\_\\_item]:text-white
|
|
107
|
+
* [&_.sidebar\\_\\_item--active]:bg-green-500
|
|
108
|
+
* [&_.sidebar\\_\\_item--active]:text-black
|
|
109
|
+
* [&_.sidebar\\_\\_item-caret]:bg-yellow-500
|
|
110
|
+
* [&_.sidebar\\_\\_item-pin]:fill-red-500
|
|
111
|
+
* [&_.sidebar\\_\\_header]:bg-red-500
|
|
112
|
+
* [&_.sidebar\\_\\_header-title]:text-white
|
|
113
|
+
* `}
|
|
114
|
+
* />
|
|
115
|
+
* )
|
|
116
|
+
* }
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
119
|
+
declare const meta: Meta<typeof Sidebar>;
|
|
120
|
+
export default meta;
|
|
121
|
+
type Story = StoryObj<typeof Sidebar>;
|
|
122
|
+
export declare const Default: Story;
|
|
123
|
+
/**
|
|
124
|
+
* The `Sidebar` component can be used within a page layout to provide a sidebar navigation.
|
|
125
|
+
* It can also be used to display additional content within the sidebar, such as authentication buttons.
|
|
126
|
+
* or any other react component.
|
|
127
|
+
*/
|
|
128
|
+
export declare const WithinLayoutAndContent: Story;
|
|
129
|
+
/**
|
|
130
|
+
* Example showing how to use the `handleOnTitleClick` callback to implement custom navigation.
|
|
131
|
+
* This allows developers to make the sidebar title clickable for custom navigation logic.
|
|
132
|
+
*/
|
|
133
|
+
export declare const WithCustomTitleNavigation: Story;
|
|
134
|
+
export declare const WithCustomStyles: Story;
|
|
135
|
+
export declare const WithCustomTargetElement: Story;
|
|
136
|
+
/**
|
|
137
|
+
* Demonstrates the loading state of the sidebar when data is being fetched.
|
|
138
|
+
* The sidebar displays skeleton items with animated placeholders while preserving
|
|
139
|
+
* all other functionality like header, search bar, and footer content.
|
|
140
|
+
*/
|
|
141
|
+
export declare const Loading: Story;
|
|
142
|
+
/**
|
|
143
|
+
* Demonstrates how to use a custom sorting function for nodes.
|
|
144
|
+
* This example shows sorting by string length (shorter titles first) then alphabetically if lengths are equal.
|
|
145
|
+
*/
|
|
146
|
+
export declare const WithCustomSorting: Story;
|
|
147
|
+
//# sourceMappingURL=sidebar.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar.stories.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/sidebar/sidebar.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAItD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAKtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmHG;AAEH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAwJ9B,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAA;AAErC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAA;AAEhC;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,KAqCpC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,KAqDvC,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAgF9B,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,KAsErC,CAAA;AACD;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,KAqCrB,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAoC/B,CAAA"}
|