@powerhousedao/document-engineering 1.38.0 → 1.39.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/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/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.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/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.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 +15 -13
- 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,199 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getDefaultArgTypes, getValidationArgTypes, PrebuiltArgTypes, StorybookControlCategory, } from '@powerhousedao/document-engineering/scalars/lib/storybook-arg-types.js';
|
|
3
|
+
import { FileField } from './file-field.js';
|
|
4
|
+
import { withForm } from '@powerhousedao/document-engineering/scalars/lib/decorators.js';
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* `FileField` is an enhanced file picker component that wraps `FileInput` with built-in validation support.
|
|
8
|
+
* It provides automatic validation for file types and file size limits.
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
const meta = {
|
|
12
|
+
title: 'Scalars/File Field',
|
|
13
|
+
component: FileField,
|
|
14
|
+
decorators: [
|
|
15
|
+
withForm,
|
|
16
|
+
(Story) => (_jsx("div", { className: "w-[247px]", children: _jsx(Story, {}) })),
|
|
17
|
+
],
|
|
18
|
+
parameters: {
|
|
19
|
+
layout: 'centered',
|
|
20
|
+
form: {
|
|
21
|
+
resetBehavior: 'unmount',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
tags: ['autodocs'],
|
|
25
|
+
argTypes: {
|
|
26
|
+
...getDefaultArgTypes(),
|
|
27
|
+
...PrebuiltArgTypes.className,
|
|
28
|
+
value: {
|
|
29
|
+
control: 'file',
|
|
30
|
+
description: 'Current value of the input field',
|
|
31
|
+
table: {
|
|
32
|
+
type: { summary: 'File | null' },
|
|
33
|
+
category: StorybookControlCategory.DEFAULT,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
defaultValue: {
|
|
37
|
+
control: 'file',
|
|
38
|
+
description: 'Default value for the input field',
|
|
39
|
+
table: {
|
|
40
|
+
type: { summary: 'File | null' },
|
|
41
|
+
category: StorybookControlCategory.DEFAULT,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
allowedFileTypes: {
|
|
45
|
+
control: 'object',
|
|
46
|
+
description: 'Array of allowed MIME types for file uploads',
|
|
47
|
+
table: {
|
|
48
|
+
type: { summary: 'string[]' },
|
|
49
|
+
category: StorybookControlCategory.VALIDATION,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
maxFileSize: {
|
|
53
|
+
control: 'number',
|
|
54
|
+
description: 'Maximum file size in bytes',
|
|
55
|
+
table: {
|
|
56
|
+
type: { summary: 'number' },
|
|
57
|
+
category: StorybookControlCategory.VALIDATION,
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
dragAndDropEnabled: {
|
|
61
|
+
control: 'boolean',
|
|
62
|
+
defaultValue: true,
|
|
63
|
+
description: 'Enable or disable drag-and-drop functionality',
|
|
64
|
+
table: {
|
|
65
|
+
defaultValue: { summary: 'true' },
|
|
66
|
+
type: { summary: 'boolean' },
|
|
67
|
+
category: StorybookControlCategory.DEFAULT,
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
status: {
|
|
71
|
+
control: 'select',
|
|
72
|
+
options: ['idle', 'uploading', 'success', 'error'],
|
|
73
|
+
description: 'Controls the visual state of the upload item, determining which UI is rendered.',
|
|
74
|
+
defaultValue: 'idle',
|
|
75
|
+
table: {
|
|
76
|
+
type: { summary: "'idle' | 'uploading' | 'success' | 'error'" },
|
|
77
|
+
category: StorybookControlCategory.COMPONENT_SPECIFIC,
|
|
78
|
+
defaultValue: { summary: 'idle' },
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
fileName: {
|
|
82
|
+
control: 'text',
|
|
83
|
+
description: 'The name of the file to display. Must be provided once the file is selected.',
|
|
84
|
+
table: {
|
|
85
|
+
type: { summary: 'string' },
|
|
86
|
+
category: StorybookControlCategory.COMPONENT_SPECIFIC,
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
fileSize: {
|
|
90
|
+
control: 'number',
|
|
91
|
+
description: 'The file size in bytes. The component formats it automatically (KB, MB).',
|
|
92
|
+
table: {
|
|
93
|
+
type: { summary: 'number' },
|
|
94
|
+
category: StorybookControlCategory.COMPONENT_SPECIFIC,
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
mimeType: {
|
|
98
|
+
control: 'text',
|
|
99
|
+
description: 'The MIME type of the file (e.g., "image/png"), used to display the correct icon.',
|
|
100
|
+
table: {
|
|
101
|
+
type: { summary: 'string' },
|
|
102
|
+
category: StorybookControlCategory.COMPONENT_SPECIFIC,
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
progress: {
|
|
106
|
+
control: { type: 'range', min: 0, max: 100, step: 1 },
|
|
107
|
+
if: { arg: 'status', eq: 'uploading' },
|
|
108
|
+
description: 'The upload progress (0-100). Only visible when status is "uploading".',
|
|
109
|
+
table: {
|
|
110
|
+
type: { summary: 'number' },
|
|
111
|
+
category: StorybookControlCategory.COMPONENT_SPECIFIC,
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
showPreview: {
|
|
115
|
+
control: 'boolean',
|
|
116
|
+
description: 'If true, displays the "Preview" button when the status is "success".',
|
|
117
|
+
defaultValue: false,
|
|
118
|
+
table: {
|
|
119
|
+
type: { summary: 'boolean' },
|
|
120
|
+
category: StorybookControlCategory.COMPONENT_SPECIFIC,
|
|
121
|
+
defaultValue: { summary: 'false' },
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
errorsUpload: {
|
|
125
|
+
control: 'object',
|
|
126
|
+
description: 'List of error messages to display if status is "error".',
|
|
127
|
+
table: {
|
|
128
|
+
type: { summary: 'string[]' },
|
|
129
|
+
category: StorybookControlCategory.COMPONENT_SPECIFIC,
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
onCancel: {
|
|
133
|
+
action: 'cancel',
|
|
134
|
+
description: 'Callback function invoked when the cancel button (X) is pressed.',
|
|
135
|
+
table: {
|
|
136
|
+
category: StorybookControlCategory.COMPONENT_SPECIFIC,
|
|
137
|
+
type: { summary: '(e: MouseEvent) => void' },
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
onReload: {
|
|
141
|
+
action: 'reload',
|
|
142
|
+
description: 'Callback function to retry the upload. Only visible if status is "error".',
|
|
143
|
+
table: {
|
|
144
|
+
category: StorybookControlCategory.COMPONENT_SPECIFIC,
|
|
145
|
+
type: { summary: '(e: MouseEvent) => void' },
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
submitAsBase64: {
|
|
149
|
+
control: 'boolean',
|
|
150
|
+
description: 'If true, the file is encoded in base64.',
|
|
151
|
+
table: {
|
|
152
|
+
type: { summary: 'boolean' },
|
|
153
|
+
defaultValue: { summary: 'false' },
|
|
154
|
+
category: StorybookControlCategory.COMPONENT_SPECIFIC,
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
...getValidationArgTypes({
|
|
158
|
+
enabledArgTypes: {
|
|
159
|
+
validators: false,
|
|
160
|
+
showErrorOnBlur: false,
|
|
161
|
+
},
|
|
162
|
+
}),
|
|
163
|
+
},
|
|
164
|
+
};
|
|
165
|
+
export default meta;
|
|
166
|
+
export const Default = {
|
|
167
|
+
args: {
|
|
168
|
+
name: 'file-input',
|
|
169
|
+
label: 'Upload File',
|
|
170
|
+
description: 'Click to chose files',
|
|
171
|
+
allowedFileTypes: ['image/png', 'image/jpg', 'image/jpeg', 'application/pdf', 'text/plain', 'application/epub+zip'],
|
|
172
|
+
maxFileSize: 15728640,
|
|
173
|
+
fileName: 'example.png',
|
|
174
|
+
fileSize: 256000,
|
|
175
|
+
status: 'idle',
|
|
176
|
+
},
|
|
177
|
+
};
|
|
178
|
+
export const WithUploadedFile = {
|
|
179
|
+
args: {
|
|
180
|
+
...Default.args,
|
|
181
|
+
fileName: 'example.png',
|
|
182
|
+
fileSize: 256000,
|
|
183
|
+
status: 'uploading',
|
|
184
|
+
mimeType: 'image/png',
|
|
185
|
+
progress: 90,
|
|
186
|
+
},
|
|
187
|
+
};
|
|
188
|
+
export const WithPreview = {
|
|
189
|
+
args: {
|
|
190
|
+
...Default.args,
|
|
191
|
+
fileName: 'example.png',
|
|
192
|
+
fileSize: 256000,
|
|
193
|
+
status: 'success',
|
|
194
|
+
mimeType: 'image/png',
|
|
195
|
+
progress: 100,
|
|
196
|
+
showPreview: true,
|
|
197
|
+
},
|
|
198
|
+
};
|
|
199
|
+
//# sourceMappingURL=file-field.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-field.stories.js","sourceRoot":"","sources":["../../../../../src/scalars/components/file-field/file-field.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,wEAAwE,CAAA;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,+DAA+D,CAAA;AAExF;;;;;GAKG;AACH,MAAM,IAAI,GAA2B;IACnC,KAAK,EAAE,oBAAo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BAAwB,CAAC,kBAAkB;aACtD;SACF;QACD,GAAG,qBAAqB,CAAC;YACvB,eAAe,EAAE;gBACf,UAAU,EAAE,KAAK;gBACjB,eAAe,EAAE,KAAK;aACvB;SACF,CAAC;KACH;CACF,CAAA;AAED,eAAe,IAAI,CAAA;AAGnB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,aAAa;QACpB,WAAW,EAAE,sBAAsB;QACnC,gBAAgB,EAAE,CAAC,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,sBAAsB,CAAC;QACnH,WAAW,EAAE,QAAQ;QACrB,QAAQ,EAAE,aAAa;QACvB,QAAQ,EAAE,MAAM;QAChB,MAAM,EAAE,MAAM;KACf;CACF,CAAA;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAU;IACrC,IAAI,EAAE;QACJ,GAAG,OAAO,CAAC,IAAI;QACf,QAAQ,EAAE,aAAa;QACvB,QAAQ,EAAE,MAAM;QAChB,MAAM,EAAE,WAAW;QACnB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,EAAE;KACb;CACF,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAU;IAChC,IAAI,EAAE;QACJ,GAAG,OAAO,CAAC,IAAI;QACf,QAAQ,EAAE,aAAa;QACvB,QAAQ,EAAE,MAAM;QAChB,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,GAAG;QACb,WAAW,EAAE,IAAI;KAClB;CACF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/scalars/components/file-field/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/scalars/components/file-field/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAuB,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.test.d.ts","sourceRoot":"","sources":["../../../../../src/scalars/components/form/form.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { fireEvent, render, screen, waitFor } from '@testing-library/react';
|
|
3
|
+
import { userEvent } from '@testing-library/user-event';
|
|
4
|
+
import { describe, expect, it, vi } from 'vitest';
|
|
5
|
+
import { StringField } from '../string-field/index.js';
|
|
6
|
+
import { Form } from './form.js';
|
|
7
|
+
import { PasswordField } from '../password-field/index.js';
|
|
8
|
+
import { EmailField } from '../email-field/index.js';
|
|
9
|
+
describe('Form', () => {
|
|
10
|
+
it('should render children as React nodes', () => {
|
|
11
|
+
render(_jsx(Form, { onSubmit: () => undefined, children: _jsx("div", { "data-testid": "child", children: "Test Child" }) }));
|
|
12
|
+
expect(screen.getByTestId('child')).toBeInTheDocument();
|
|
13
|
+
});
|
|
14
|
+
it('should render children as function with form methods', () => {
|
|
15
|
+
render(_jsx(Form, { onSubmit: () => undefined, children: (methods) => _jsx("div", { "data-testid": "child", children: methods.formState.isSubmitting ? 'Submitting' : 'Not Submitting' }) }));
|
|
16
|
+
expect(screen.getByTestId('child')).toHaveTextContent('Not Submitting');
|
|
17
|
+
});
|
|
18
|
+
it('should call onSubmit with form data', async () => {
|
|
19
|
+
const handleSubmit = vi.fn();
|
|
20
|
+
render(_jsxs(Form, { onSubmit: handleSubmit, children: [_jsx(StringField, { name: "test", defaultValue: "test-value" }), _jsx("button", { type: "submit", children: "Submit" })] }));
|
|
21
|
+
fireEvent.click(screen.getByText('Submit'));
|
|
22
|
+
await waitFor(() => {
|
|
23
|
+
expect(handleSubmit).toHaveBeenCalledWith({
|
|
24
|
+
test: 'test-value',
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
it('should reset form after successful submit when resetOnSuccessfulSubmit is true', async () => {
|
|
29
|
+
const user = userEvent.setup();
|
|
30
|
+
const handleSubmit = vi.fn();
|
|
31
|
+
render(_jsxs(Form, { onSubmit: handleSubmit, resetOnSuccessfulSubmit: true, defaultValues: { test: 'hello' }, children: [_jsx(StringField, { name: "test" }), _jsx("button", { type: "submit", children: "Submit" })] }));
|
|
32
|
+
// type something in the input
|
|
33
|
+
const stringField = screen.getByRole('textbox');
|
|
34
|
+
await user.type(stringField, ' world');
|
|
35
|
+
expect(stringField).toHaveValue('hello world');
|
|
36
|
+
const input = screen.getByRole('textbox');
|
|
37
|
+
fireEvent.click(screen.getByText('Submit'));
|
|
38
|
+
await waitFor(() => {
|
|
39
|
+
expect(input).toHaveValue('hello');
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
it('should submit only changed values when submitChangesOnly is true', async () => {
|
|
43
|
+
const handleSubmit = vi.fn();
|
|
44
|
+
const user = userEvent.setup();
|
|
45
|
+
const defaultValues = { unchanged: 'default', changed: 'old' };
|
|
46
|
+
render(_jsxs(Form, { onSubmit: handleSubmit, defaultValues: defaultValues, submitChangesOnly: true, children: [_jsx(StringField, { name: "unchanged" }), _jsx(StringField, { name: "changed" }), _jsx("button", { type: "submit", children: "Submit" })] }));
|
|
47
|
+
const changedInput = screen.getByDisplayValue('old');
|
|
48
|
+
await user.clear(changedInput);
|
|
49
|
+
await user.type(changedInput, 'new');
|
|
50
|
+
fireEvent.click(screen.getByText('Submit'));
|
|
51
|
+
await waitFor(() => {
|
|
52
|
+
expect(handleSubmit).toHaveBeenCalledWith({
|
|
53
|
+
changed: 'new',
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
it('should submit null for empty values', async () => {
|
|
58
|
+
const handleSubmit = vi.fn();
|
|
59
|
+
render(_jsxs(Form, { onSubmit: handleSubmit, children: [_jsx(StringField, { name: "empty" }), _jsx("button", { type: "submit", children: "Submit" })] }));
|
|
60
|
+
fireEvent.click(screen.getByText('Submit'));
|
|
61
|
+
await waitFor(() => {
|
|
62
|
+
expect(handleSubmit).toHaveBeenCalledWith({
|
|
63
|
+
empty: null,
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
it('should apply className to form element', () => {
|
|
68
|
+
render(
|
|
69
|
+
// disable tailwind custom classname rule for this test
|
|
70
|
+
_jsx(Form, { onSubmit: () => undefined, className: "test-class", children: "Test" }));
|
|
71
|
+
expect(screen.getByText('Test')).toHaveClass('test-class');
|
|
72
|
+
});
|
|
73
|
+
describe('PasswordField with matchFieldName', () => {
|
|
74
|
+
it('should not submit field when it has matchFieldName set', async () => {
|
|
75
|
+
const handleSubmit = vi.fn();
|
|
76
|
+
render(_jsxs(Form, { onSubmit: handleSubmit, children: [_jsx(PasswordField, { name: "password", defaultValue: "@A1a" }), _jsx(PasswordField, { name: "confirmPassword", defaultValue: "@A1a", matchFieldName: "password" }), _jsx("button", { type: "submit", children: "Submit" })] }));
|
|
77
|
+
fireEvent.click(screen.getByText('Submit'));
|
|
78
|
+
await waitFor(() => {
|
|
79
|
+
expect(handleSubmit).toHaveBeenCalledWith({
|
|
80
|
+
password: '@A1a',
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
it('should submit fields when matchFieldName is not set', async () => {
|
|
85
|
+
const handleSubmit = vi.fn();
|
|
86
|
+
render(_jsxs(Form, { onSubmit: handleSubmit, children: [_jsx(PasswordField, { name: "password", defaultValue: "@A1a" }), _jsx(PasswordField, { name: "confirmPassword", defaultValue: "@A1a" }), _jsx("button", { type: "submit", children: "Submit" })] }));
|
|
87
|
+
fireEvent.click(screen.getByText('Submit'));
|
|
88
|
+
await waitFor(() => {
|
|
89
|
+
expect(handleSubmit).toHaveBeenCalledWith({
|
|
90
|
+
password: '@A1a',
|
|
91
|
+
confirmPassword: '@A1a',
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
describe('EmailField with matchFieldName', () => {
|
|
97
|
+
it('should submit field when it has matchFieldName set', async () => {
|
|
98
|
+
const handleSubmit = vi.fn();
|
|
99
|
+
render(_jsxs(Form, { onSubmit: handleSubmit, children: [_jsx(EmailField, { name: "email", defaultValue: "test@example.com" }), _jsx(EmailField, { name: "confirmEmail", defaultValue: "test@example.com", matchFieldName: "email" }), _jsx("button", { type: "submit", children: "Submit" })] }));
|
|
100
|
+
fireEvent.click(screen.getByText('Submit'));
|
|
101
|
+
await waitFor(() => {
|
|
102
|
+
expect(handleSubmit).toHaveBeenCalledWith({
|
|
103
|
+
email: 'test@example.com',
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
it('should submit fields when matchFieldName is not set', async () => {
|
|
108
|
+
const handleSubmit = vi.fn();
|
|
109
|
+
render(_jsxs(Form, { onSubmit: handleSubmit, children: [_jsx(EmailField, { name: "email", defaultValue: "test@example.com" }), _jsx(EmailField, { name: "confirmEmail", defaultValue: "test@example.com" }), _jsx("button", { type: "submit", children: "Submit" })] }));
|
|
110
|
+
fireEvent.click(screen.getByText('Submit'));
|
|
111
|
+
await waitFor(() => {
|
|
112
|
+
expect(handleSubmit).toHaveBeenCalledWith({
|
|
113
|
+
email: 'test@example.com',
|
|
114
|
+
confirmEmail: 'test@example.com',
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
it('should show validation error when matchFieldName values do not match', async () => {
|
|
119
|
+
const user = userEvent.setup();
|
|
120
|
+
const handleSubmit = vi.fn();
|
|
121
|
+
render(_jsxs(Form, { onSubmit: handleSubmit, children: [_jsx(EmailField, { name: "email", label: "Email", value: "test@example.com" }), _jsx(EmailField, { name: "confirmEmail", label: "Confirm Email", matchFieldName: "email", showErrorOnBlur: true }), _jsx("button", { type: "submit", children: "Submit" })] }));
|
|
122
|
+
const confirmInput = screen.getByLabelText('Confirm Email');
|
|
123
|
+
await user.type(confirmInput, 'different@example.com');
|
|
124
|
+
await user.tab();
|
|
125
|
+
expect(screen.getByText('Email must match the "Email" field')).toBeInTheDocument();
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
//# sourceMappingURL=form.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.test.js","sourceRoot":"","sources":["../../../../../src/scalars/components/form/form.test.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEpD,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;IACpB,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;QAC/C,MAAM,CACJ,KAAC,IAAI,IAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,SAAS,YAC7B,6BAAiB,OAAO,2BAAiB,GACpC,CACR,CAAA;QACD,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAA;IACzD,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,sDAAsD,EAAE,GAAG,EAAE;QAC9D,MAAM,CACJ,KAAC,IAAI,IAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,SAAS,YAC5B,CAAC,OAAO,EAAE,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AAkB;iBACjC,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,sEAAsE,EAAE,KAAK,IAAI,EAAE;YACpF,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,EAAE,CAAA;YAC9B,MAAM,YAAY,GAAG,EAAE,CAAC,EAAE,EAAE,CAAA;YAE5B,MAAM,CACJ,MAAC,IAAI,IAAC,QAAQ,EAAE,YAAY,aAC1B,KAAC,UAAU,IAAC,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,OAAO,EAAC,KAAK,EAAC,kBAAkB,GAAG,EAClE,KAAC,UAAU,IAAC,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,eAAe,EAAC,cAAc,EAAC,OAAO,EAAC,eAAe,SAAG,EAC/F,iBAAQ,IAAI,EAAC,QAAQ,uBAAgB,IAChC,CACR,CAAA;YAED,MAAM,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC,eAAe,CAAC,CAAA;YAC3D,MAAM,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,uBAAuB,CAAC,CAAA;YACtD,MAAM,IAAI,CAAC,GAAG,EAAE,CAAA;YAEhB,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,oCAAoC,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAA;QACpF,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.test.d.ts","sourceRoot":"","sources":["../../../../../../src/scalars/components/fragments/button/button.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { describe, expect, it } from 'vitest';
|
|
3
|
+
import { render } from '@testing-library/react';
|
|
4
|
+
import { Button } from './button.js';
|
|
5
|
+
describe('Button Component', () => {
|
|
6
|
+
it('should match snapshot', () => {
|
|
7
|
+
const { asFragment } = render(_jsx(Button, {}));
|
|
8
|
+
expect(asFragment()).toMatchSnapshot();
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=button.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.test.js","sourceRoot":"","sources":["../../../../../../src/scalars/components/fragments/button/button.test.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,uBAAuB,EAAE,GAAG,EAAE;QAC/B,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC,KAAC,MAAM,KAAG,CAAC,CAAA;QACzC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,eAAe,EAAE,CAAA;IACxC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
package/dist/src/scalars/components/fragments/character-counter/character-counter.stories.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { CharacterCounter } from './character-counter.js';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("react").FC<import("./character-counter.js").CharacterCounterProps>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
chromatic: {
|
|
9
|
+
disableSnapshot: boolean;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
tags: string[];
|
|
13
|
+
argTypes: {
|
|
14
|
+
maxLength: {
|
|
15
|
+
control: "number";
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
value: {
|
|
19
|
+
control: "text";
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export default meta;
|
|
25
|
+
type Story = StoryObj<typeof CharacterCounter>;
|
|
26
|
+
export declare const Default: Story;
|
|
27
|
+
export declare const AtLimit: Story;
|
|
28
|
+
export declare const ExceedingLimit: Story;
|
|
29
|
+
export declare const LargeLimit: Story;
|
|
30
|
+
//# sourceMappingURL=character-counter.stories.d.ts.map
|
package/dist/src/scalars/components/fragments/character-counter/character-counter.stories.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"character-counter.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/scalars/components/fragments/character-counter/character-counter.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAEzD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;CAoB+B,CAAA;AAEzC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAE9C,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAK5B,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAKxB,CAAA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { CharacterCounter } from './character-counter.js';
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Fragments/CharacterCounter',
|
|
4
|
+
component: CharacterCounter,
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: 'centered',
|
|
7
|
+
chromatic: {
|
|
8
|
+
disableSnapshot: true,
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
argTypes: {
|
|
13
|
+
maxLength: {
|
|
14
|
+
control: 'number',
|
|
15
|
+
description: 'Maximum number of characters allowed',
|
|
16
|
+
},
|
|
17
|
+
value: {
|
|
18
|
+
control: 'text',
|
|
19
|
+
description: 'Current text value to count characters from',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
export default meta;
|
|
24
|
+
export const Default = {
|
|
25
|
+
args: {
|
|
26
|
+
maxLength: 10,
|
|
27
|
+
value: '',
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
export const AtLimit = {
|
|
31
|
+
args: {
|
|
32
|
+
maxLength: 10,
|
|
33
|
+
value: 'HelloWorld',
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
export const ExceedingLimit = {
|
|
37
|
+
args: {
|
|
38
|
+
maxLength: 10,
|
|
39
|
+
value: 'Hello World!',
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
export const LargeLimit = {
|
|
43
|
+
args: {
|
|
44
|
+
maxLength: 100,
|
|
45
|
+
value: 'This is a longer text that demonstrates the counter with a larger character limit',
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=character-counter.stories.js.map
|
package/dist/src/scalars/components/fragments/character-counter/character-counter.stories.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"character-counter.stories.js","sourceRoot":"","sources":["../../../../../../src/scalars/components/fragments/character-counter/character-counter.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAEzD,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,4BAA4B;IACnC,SAAS,EAAE,gBAAgB;IAC3B,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;QAClB,SAAS,EAAE;YACT,eAAe,EAAE,IAAI;SACtB;KACF;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,SAAS,EAAE;YACT,OAAO,EAAE,QAAQ;YACjB,WAAW,EAAE,sCAAsC;SACpD;QACD,KAAK,EAAE;YACL,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,6CAA6C;SAC3D;KACF;CACsC,CAAA;AAEzC,eAAe,IAAI,CAAA;AAGnB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,SAAS,EAAE,EAAE;QACb,KAAK,EAAE,EAAE;KACV;CACF,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,SAAS,EAAE,EAAE;QACb,KAAK,EAAE,YAAY;KACpB;CACF,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAU;IACnC,IAAI,EAAE;QACJ,SAAS,EAAE,EAAE;QACb,KAAK,EAAE,cAAc;KACtB;CACF,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,IAAI,EAAE;QACJ,SAAS,EAAE,GAAG;QACd,KAAK,EAAE,mFAAmF;KAC3F;CACF,CAAA"}
|
package/dist/src/scalars/components/fragments/character-counter/character-counter.test.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"character-counter.test.d.ts","sourceRoot":"","sources":["../../../../../../src/scalars/components/fragments/character-counter/character-counter.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { describe, expect, it } from 'vitest';
|
|
3
|
+
import { render, screen } from '@testing-library/react';
|
|
4
|
+
import { CharacterCounter } from './character-counter.js';
|
|
5
|
+
describe('CharacterCounter', () => {
|
|
6
|
+
it('should match snapshot', () => {
|
|
7
|
+
const { container } = render(_jsx(CharacterCounter, { maxLength: 10, value: "Hello" }));
|
|
8
|
+
expect(container).toMatchSnapshot();
|
|
9
|
+
});
|
|
10
|
+
it('should display correct character count and max length', () => {
|
|
11
|
+
render(_jsx(CharacterCounter, { maxLength: 10, value: "Hello" }));
|
|
12
|
+
expect(screen.getByText('5')).toBeInTheDocument();
|
|
13
|
+
expect(screen.getByText('/10')).toBeInTheDocument();
|
|
14
|
+
});
|
|
15
|
+
it('should show normal state when under 90% of max length', () => {
|
|
16
|
+
render(_jsx(CharacterCounter, { maxLength: 10, value: "Hello" }));
|
|
17
|
+
expect(screen.getByText('5')).toHaveClass('text-gray-500');
|
|
18
|
+
expect(screen.getByText('/10')).toHaveClass('text-gray-300');
|
|
19
|
+
});
|
|
20
|
+
it('should show warning state when between 90% and 100% of max length', () => {
|
|
21
|
+
render(_jsx(CharacterCounter, { maxLength: 10, value: "Hello Wor" }));
|
|
22
|
+
expect(screen.getByText('9')).toHaveClass('text-yellow-900');
|
|
23
|
+
expect(screen.getByText('/10')).toHaveClass('text-yellow-400');
|
|
24
|
+
});
|
|
25
|
+
it('should show error state when at or exceeding max length', () => {
|
|
26
|
+
render(_jsx(CharacterCounter, { maxLength: 10, value: "Hello World" }));
|
|
27
|
+
expect(screen.getByText('11')).toHaveClass('text-red-900');
|
|
28
|
+
expect(screen.getByText('/10')).toHaveClass('text-red-400');
|
|
29
|
+
});
|
|
30
|
+
it('should handle empty string value', () => {
|
|
31
|
+
render(_jsx(CharacterCounter, { maxLength: 10, value: "" }));
|
|
32
|
+
expect(screen.getByText('0')).toBeInTheDocument();
|
|
33
|
+
expect(screen.getByText('0')).toHaveClass('text-gray-500');
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=character-counter.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"character-counter.test.js","sourceRoot":"","sources":["../../../../../../src/scalars/components/fragments/character-counter/character-counter.test.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAEzD,QAAQ,C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A;QAC5D,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAA;IAChE,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,yDAAyD,EAAE,GAAG,EAAE;QACjE,MAAM,CAAC,KAAC,gBAAgB,IAAC,SAAS,EAAE,EAAE,EAAE,KAAK,EAAC,aAAa,GAAG,CAAC,CAAA;QAC/D,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,cAAc,CAAC,CAAA;QAC1D,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,cAAc,CAAC,CAAA;IAC7D,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;QAC1C,MAAM,CAAC,KAAC,gBAAgB,IAAC,SAAS,EAAE,EAAE,EAAE,KAAK,EAAC,EAAE,GAAG,CAAC,CAAA;QACpD,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAA;QACjD,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,eAAe,CAAC,CAAA;IAC5D,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-field.test.d.ts","sourceRoot":"","sources":["../../../../../../src/scalars/components/fragments/checkbox-field/checkbox-field.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { fireEvent, screen, waitFor } from '@testing-library/react';
|
|
3
|
+
import { describe, expect, it, vi } from 'vitest';
|
|
4
|
+
import { renderWithForm } from '../../../lib/testing.js';
|
|
5
|
+
import { CheckboxField } from './checkbox-field.js';
|
|
6
|
+
describe('CheckboxField Component', () => {
|
|
7
|
+
it('should match snapshot', () => {
|
|
8
|
+
const { container } = renderWithForm(_jsx(CheckboxField, { name: "test", label: "Test Label" }));
|
|
9
|
+
expect(container).toMatchSnapshot();
|
|
10
|
+
});
|
|
11
|
+
it('should render with label', () => {
|
|
12
|
+
renderWithForm(_jsx(CheckboxField, { name: "test", label: "Test checkbox" }));
|
|
13
|
+
expect(screen.getByText('Test checkbox')).toBeInTheDocument();
|
|
14
|
+
});
|
|
15
|
+
it('should render with description icon', () => {
|
|
16
|
+
renderWithForm(_jsx(CheckboxField, { name: "test", label: "Test checkbox", description: "This is a description" }));
|
|
17
|
+
expect(screen.getByTestId('icon-fallback')).toBeInTheDocument();
|
|
18
|
+
});
|
|
19
|
+
it('should handle checked state', () => {
|
|
20
|
+
const handleChange = vi.fn();
|
|
21
|
+
renderWithForm(_jsx(CheckboxField, { name: "test", label: "Test checkbox", value: false, onChange: handleChange }));
|
|
22
|
+
const checkbox = screen.getByRole('checkbox');
|
|
23
|
+
fireEvent.click(checkbox);
|
|
24
|
+
expect(handleChange).toHaveBeenCalledWith(true);
|
|
25
|
+
expect(checkbox).toHaveAttribute('data-state', 'checked');
|
|
26
|
+
});
|
|
27
|
+
it('should be disabled when disabled prop is true', () => {
|
|
28
|
+
renderWithForm(_jsx(CheckboxField, { name: "test", label: "Test checkbox", disabled: true }));
|
|
29
|
+
const checkbox = screen.getByRole('checkbox');
|
|
30
|
+
expect(checkbox).toBeDisabled();
|
|
31
|
+
});
|
|
32
|
+
it('should show required indicator when required', () => {
|
|
33
|
+
renderWithForm(_jsx(CheckboxField, { name: "test", label: "Test checkbox", required: true }));
|
|
34
|
+
const checkbox = screen.getByRole('checkbox');
|
|
35
|
+
expect(checkbox).toBeRequired();
|
|
36
|
+
expect(checkbox).toHaveAttribute('aria-required', 'true');
|
|
37
|
+
expect(screen.getByText('*')).toBeInTheDocument();
|
|
38
|
+
});
|
|
39
|
+
it('should render with errors', async () => {
|
|
40
|
+
renderWithForm(_jsx(CheckboxField, { name: "test", label: "Test checkbox", errors: ['This is an error'] }));
|
|
41
|
+
await waitFor(() => {
|
|
42
|
+
expect(screen.getByText('This is an error')).toBeInTheDocument();
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
it('should render with warnings and errors', async () => {
|
|
46
|
+
renderWithForm(_jsx(CheckboxField, { name: "test", label: "Test checkbox", warnings: ['This is a warning'], errors: ['This is an error'] }));
|
|
47
|
+
expect(screen.getByText('This is a warning')).toBeInTheDocument();
|
|
48
|
+
await waitFor(() => {
|
|
49
|
+
expect(screen.getByText('This is an error')).toBeInTheDocument();
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
//# sourceMappingURL=checkbox-field.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-field.test.js","sourceRoot":"","sources":["../../../../../../src/scalars/components/fragments/checkbox-field/checkbox-field.test.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACvC,EAAE,CAAC,uBAAuB,EAAE,GAAG,EAAE;QAC/B,MAAM,EAAE,SAAS,EAAE,GAAG,cAAc,CAAC,KAAC,aAAa,IAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,YAAY,GAAG,CAAC,CAAA;QACtF,MAAM,CAAC,SAAS,CAAC,CAAC,eAAe,EAAE,CAAA;IACrC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;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,CAAA;QACjE,MAAM,OAAO,CAAC,GAAG,EAAE;YACjB,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAA;QAClE,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -20,7 +20,7 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
|
|
|
20
20
|
ref?: React.Ref<HTMLInputElement>;
|
|
21
21
|
} & {
|
|
22
22
|
asChild?: boolean;
|
|
23
|
-
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "
|
|
23
|
+
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "onChange" | "value"> & {
|
|
24
24
|
value?: string;
|
|
25
25
|
onValueChange?: (search: string) => void;
|
|
26
26
|
} & React.RefAttributes<HTMLInputElement>, "ref"> & {
|
|
@@ -58,7 +58,7 @@ declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
|
58
58
|
ref?: React.Ref<HTMLDivElement>;
|
|
59
59
|
} & {
|
|
60
60
|
asChild?: boolean;
|
|
61
|
-
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "
|
|
61
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "heading" | "value"> & {
|
|
62
62
|
heading?: React.ReactNode;
|
|
63
63
|
value?: string;
|
|
64
64
|
forceMount?: boolean;
|
|
@@ -69,7 +69,7 @@ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
|
69
69
|
ref?: React.Ref<HTMLDivElement>;
|
|
70
70
|
} & {
|
|
71
71
|
asChild?: boolean;
|
|
72
|
-
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "
|
|
72
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "onSelect" | "disabled" | "value"> & {
|
|
73
73
|
disabled?: boolean;
|
|
74
74
|
onSelect?: (value: string) => void;
|
|
75
75
|
value?: string;
|