@smartsoft001/react 2.193.0 → 2.194.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +99 -7
- package/package.json +5 -5
- package/src/lib/components/accordion/accordion.d.ts +3 -4
- package/src/lib/components/accordion/accordion.js +3 -4
- package/src/lib/components/accordion/accordion.js.map +1 -1
- package/src/lib/components/accordion/accordion.types.d.ts +5 -6
- package/src/lib/components/accordion/body/accordion-body.d.ts +1 -1
- package/src/lib/components/accordion/body/accordion-body.js +1 -1
- package/src/lib/components/accordion/body/accordion-body.js.map +1 -1
- package/src/lib/components/accordion/default/accordion-default.d.ts +3 -3
- package/src/lib/components/accordion/default/accordion-default.js +3 -3
- package/src/lib/components/accordion/header/accordion-header.d.ts +2 -3
- package/src/lib/components/accordion/header/accordion-header.js +2 -3
- package/src/lib/components/accordion/header/accordion-header.js.map +1 -1
- package/src/lib/components/accordion/preset/accordion-preset.d.ts +6 -6
- package/src/lib/components/accordion/preset/accordion-preset.js +6 -6
- package/src/lib/components/accordion/use-accordion.d.ts +8 -9
- package/src/lib/components/accordion/use-accordion.js +9 -10
- package/src/lib/components/accordion/use-accordion.js.map +1 -1
- package/src/lib/components/action-panel/action-panel.d.ts +3 -4
- package/src/lib/components/action-panel/action-panel.js +3 -4
- package/src/lib/components/action-panel/action-panel.js.map +1 -1
- package/src/lib/components/action-panel/action-panel.types.d.ts +1 -1
- package/src/lib/components/action-panel/standard/action-panel-standard.d.ts +4 -5
- package/src/lib/components/action-panel/standard/action-panel-standard.js +4 -5
- package/src/lib/components/action-panel/standard/action-panel-standard.js.map +1 -1
- package/src/lib/components/alert/alert.d.ts +3 -5
- package/src/lib/components/alert/alert.js +3 -5
- package/src/lib/components/alert/alert.js.map +1 -1
- package/src/lib/components/alert/alert.types.d.ts +4 -4
- package/src/lib/components/alert/standard/alert-standard.d.ts +3 -3
- package/src/lib/components/alert/standard/alert-standard.js +3 -3
- package/src/lib/components/alert/use-alert.d.ts +4 -5
- package/src/lib/components/alert/use-alert.js +4 -5
- package/src/lib/components/alert/use-alert.js.map +1 -1
- package/src/lib/components/app/app.d.ts +3 -3
- package/src/lib/components/app/app.js +3 -3
- package/src/lib/components/app/app.types.d.ts +1 -1
- package/src/lib/components/app/standard/app-standard.d.ts +1 -2
- package/src/lib/components/app/standard/app-standard.js +1 -2
- package/src/lib/components/app/standard/app-standard.js.map +1 -1
- package/src/lib/components/app/use-app.d.ts +2 -3
- package/src/lib/components/app/use-app.js +2 -3
- package/src/lib/components/app/use-app.js.map +1 -1
- package/src/lib/components/avatar/avatar.d.ts +2 -3
- package/src/lib/components/avatar/avatar.js +2 -3
- package/src/lib/components/avatar/avatar.js.map +1 -1
- package/src/lib/components/avatar/preset/avatar-preset.d.ts +2 -3
- package/src/lib/components/avatar/preset/avatar-preset.js +2 -3
- package/src/lib/components/avatar/preset/avatar-preset.js.map +1 -1
- package/src/lib/components/avatar/standard/avatar-standard.d.ts +3 -3
- package/src/lib/components/avatar/standard/avatar-standard.js +3 -3
- package/src/lib/components/avatar/use-avatar.d.ts +2 -2
- package/src/lib/components/avatar/use-avatar.js +2 -2
- package/src/lib/components/badge/badge.d.ts +2 -3
- package/src/lib/components/badge/badge.js +2 -3
- package/src/lib/components/badge/badge.js.map +1 -1
- package/src/lib/components/badge/badge.types.d.ts +1 -1
- package/src/lib/components/badge/preset/badge-preset.d.ts +2 -3
- package/src/lib/components/badge/preset/badge-preset.js +2 -3
- package/src/lib/components/badge/preset/badge-preset.js.map +1 -1
- package/src/lib/components/badge/standard/badge-standard.d.ts +3 -3
- package/src/lib/components/badge/standard/badge-standard.js +3 -3
- package/src/lib/components/badge/use-badge.d.ts +2 -3
- package/src/lib/components/badge/use-badge.js +2 -3
- package/src/lib/components/badge/use-badge.js.map +1 -1
- package/src/lib/components/breadcrumbs/breadcrumbs.d.ts +2 -4
- package/src/lib/components/breadcrumbs/breadcrumbs.js +2 -4
- package/src/lib/components/breadcrumbs/breadcrumbs.js.map +1 -1
- package/src/lib/components/breadcrumbs/breadcrumbs.types.d.ts +1 -1
- package/src/lib/components/breadcrumbs/preset/breadcrumbs-preset.d.ts +2 -2
- package/src/lib/components/breadcrumbs/preset/breadcrumbs-preset.js +2 -2
- package/src/lib/components/breadcrumbs/standard/breadcrumbs-standard.d.ts +3 -3
- package/src/lib/components/breadcrumbs/standard/breadcrumbs-standard.js +3 -3
- package/src/lib/components/breadcrumbs/use-breadcrumbs.d.ts +2 -4
- package/src/lib/components/breadcrumbs/use-breadcrumbs.js +2 -4
- package/src/lib/components/breadcrumbs/use-breadcrumbs.js.map +1 -1
- package/src/lib/components/button/button.d.ts +2 -3
- package/src/lib/components/button/button.js +2 -3
- package/src/lib/components/button/button.js.map +1 -1
- package/src/lib/components/button/standard/button-standard.d.ts +1 -1
- package/src/lib/components/button/standard/button-standard.js +1 -1
- package/src/lib/components/button/standard/button-standard.js.map +1 -1
- package/src/lib/components/button/use-button.d.ts +3 -4
- package/src/lib/components/button/use-button.js +3 -4
- package/src/lib/components/button/use-button.js.map +1 -1
- package/src/lib/components/button-group/button-group.d.ts +2 -4
- package/src/lib/components/button-group/button-group.js +2 -4
- package/src/lib/components/button-group/button-group.js.map +1 -1
- package/src/lib/components/button-group/button-group.types.d.ts +4 -4
- package/src/lib/components/button-group/standard/button-group-standard.d.ts +2 -2
- package/src/lib/components/button-group/standard/button-group-standard.js +2 -2
- package/src/lib/components/button-group/use-button-group.d.ts +3 -4
- package/src/lib/components/button-group/use-button-group.js +3 -4
- package/src/lib/components/button-group/use-button-group.js.map +1 -1
- package/src/lib/components/calendar/calendar.d.ts +4 -5
- package/src/lib/components/calendar/calendar.js +4 -5
- package/src/lib/components/calendar/calendar.js.map +1 -1
- package/src/lib/components/calendar/calendar.types.d.ts +9 -13
- package/src/lib/components/calendar/preset/calendar-preset.d.ts +4 -4
- package/src/lib/components/calendar/preset/calendar-preset.js +4 -4
- package/src/lib/components/calendar/standard/calendar-standard.d.ts +5 -5
- package/src/lib/components/calendar/standard/calendar-standard.js +5 -5
- package/src/lib/components/calendar/use-calendar.d.ts +5 -6
- package/src/lib/components/calendar/use-calendar.js +9 -10
- package/src/lib/components/calendar/use-calendar.js.map +1 -1
- package/src/lib/components/card/card.d.ts +4 -6
- package/src/lib/components/card/card.js +4 -6
- package/src/lib/components/card/card.js.map +1 -1
- package/src/lib/components/card/card.types.d.ts +6 -7
- package/src/lib/components/card/standard/card-standard.d.ts +2 -2
- package/src/lib/components/card/standard/card-standard.js +2 -2
- package/src/lib/components/card/use-card.d.ts +2 -3
- package/src/lib/components/card/use-card.js +2 -3
- package/src/lib/components/card/use-card.js.map +1 -1
- package/src/lib/components/card-heading/card-heading.d.ts +2 -4
- package/src/lib/components/card-heading/card-heading.js +2 -4
- package/src/lib/components/card-heading/card-heading.js.map +1 -1
- package/src/lib/components/card-heading/standard/card-heading-standard.d.ts +3 -3
- package/src/lib/components/card-heading/standard/card-heading-standard.js +3 -3
- package/src/lib/components/command-palette/command-palette.d.ts +4 -5
- package/src/lib/components/command-palette/command-palette.js +4 -5
- package/src/lib/components/command-palette/command-palette.js.map +1 -1
- package/src/lib/components/command-palette/command-palette.types.d.ts +5 -7
- package/src/lib/components/command-palette/standard/command-palette-standard.d.ts +4 -4
- package/src/lib/components/command-palette/standard/command-palette-standard.js +4 -4
- package/src/lib/components/command-palette/use-command-palette.d.ts +4 -5
- package/src/lib/components/command-palette/use-command-palette.js +5 -7
- package/src/lib/components/command-palette/use-command-palette.js.map +1 -1
- package/src/lib/components/container/container.d.ts +2 -3
- package/src/lib/components/container/container.js +2 -3
- package/src/lib/components/container/container.js.map +1 -1
- package/src/lib/components/container/standard/container-standard.d.ts +3 -3
- package/src/lib/components/container/standard/container-standard.js +3 -3
- package/src/lib/components/date-edit/date-edit.d.ts +3 -4
- package/src/lib/components/date-edit/date-edit.js +6 -7
- package/src/lib/components/date-edit/date-edit.js.map +1 -1
- package/src/lib/components/date-edit/date-edit.types.d.ts +10 -12
- package/src/lib/components/date-edit/preset/date-edit-preset.d.ts +2 -3
- package/src/lib/components/date-edit/preset/date-edit-preset.js +8 -10
- package/src/lib/components/date-edit/preset/date-edit-preset.js.map +1 -1
- package/src/lib/components/date-edit/standard/date-edit-standard.d.ts +2 -3
- package/src/lib/components/date-edit/standard/date-edit-standard.js +3 -4
- package/src/lib/components/date-edit/standard/date-edit-standard.js.map +1 -1
- package/src/lib/components/date-edit/use-date-edit.d.ts +4 -5
- package/src/lib/components/date-edit/use-date-edit.js +18 -19
- package/src/lib/components/date-edit/use-date-edit.js.map +1 -1
- package/src/lib/components/date-range/date-range.d.ts +3 -4
- package/src/lib/components/date-range/date-range.js +5 -7
- package/src/lib/components/date-range/date-range.js.map +1 -1
- package/src/lib/components/date-range/date-range.types.d.ts +8 -14
- package/src/lib/components/date-range/preset/date-range-preset.d.ts +2 -2
- package/src/lib/components/date-range/preset/date-range-preset.js +2 -2
- package/src/lib/components/date-range/standard/date-range-modal-standard.d.ts +3 -4
- package/src/lib/components/date-range/standard/date-range-modal-standard.js +3 -4
- package/src/lib/components/date-range/standard/date-range-modal-standard.js.map +1 -1
- package/src/lib/components/date-range/standard/date-range-standard.d.ts +2 -3
- package/src/lib/components/date-range/standard/date-range-standard.js +2 -3
- package/src/lib/components/date-range/standard/date-range-standard.js.map +1 -1
- package/src/lib/components/date-range/use-date-range-modal.d.ts +2 -3
- package/src/lib/components/date-range/use-date-range-modal.js +9 -14
- package/src/lib/components/date-range/use-date-range-modal.js.map +1 -1
- package/src/lib/components/date-range/use-date-range.d.ts +2 -3
- package/src/lib/components/date-range/use-date-range.js +20 -21
- package/src/lib/components/date-range/use-date-range.js.map +1 -1
- package/src/lib/components/description-list/description-list.d.ts +2 -4
- package/src/lib/components/description-list/description-list.js +2 -4
- package/src/lib/components/description-list/description-list.js.map +1 -1
- package/src/lib/components/description-list/preset/description-list-preset.d.ts +3 -4
- package/src/lib/components/description-list/preset/description-list-preset.js +3 -4
- package/src/lib/components/description-list/preset/description-list-preset.js.map +1 -1
- package/src/lib/components/description-list/standard/description-list-standard.d.ts +3 -4
- package/src/lib/components/description-list/standard/description-list-standard.js +3 -4
- package/src/lib/components/description-list/standard/description-list-standard.js.map +1 -1
- package/src/lib/components/detail/address/detail-address.d.ts +2 -2
- package/src/lib/components/detail/address/detail-address.js +2 -2
- package/src/lib/components/detail/address/preset/detail-address-preset.d.ts +1 -2
- package/src/lib/components/detail/address/preset/detail-address-preset.js +1 -2
- package/src/lib/components/detail/address/preset/detail-address-preset.js.map +1 -1
- package/src/lib/components/detail/address/use-detail-address.d.ts +2 -2
- package/src/lib/components/detail/address/use-detail-address.js +2 -2
- package/src/lib/components/detail/array/detail-array.d.ts +2 -3
- package/src/lib/components/detail/array/detail-array.js +2 -3
- package/src/lib/components/detail/array/detail-array.js.map +1 -1
- package/src/lib/components/detail/array/preset/detail-array-preset.d.ts +2 -2
- package/src/lib/components/detail/array/preset/detail-array-preset.js +2 -2
- package/src/lib/components/detail/array/use-detail-array.d.ts +2 -3
- package/src/lib/components/detail/array/use-detail-array.js +2 -3
- package/src/lib/components/detail/array/use-detail-array.js.map +1 -1
- package/src/lib/components/detail/attachment/detail-attachment.d.ts +1 -1
- package/src/lib/components/detail/attachment/detail-attachment.js +1 -1
- package/src/lib/components/detail/attachment/detail-attachment.js.map +1 -1
- package/src/lib/components/detail/attachment/preset/detail-attachment-preset.d.ts +2 -2
- package/src/lib/components/detail/attachment/preset/detail-attachment-preset.js +2 -2
- package/src/lib/components/detail/attachment/use-detail-attachment.d.ts +3 -4
- package/src/lib/components/detail/attachment/use-detail-attachment.js +3 -4
- package/src/lib/components/detail/attachment/use-detail-attachment.js.map +1 -1
- package/src/lib/components/detail/color/detail-color.d.ts +1 -1
- package/src/lib/components/detail/color/detail-color.js +1 -1
- package/src/lib/components/detail/color/detail-color.js.map +1 -1
- package/src/lib/components/detail/color/preset/detail-color-preset.d.ts +1 -2
- package/src/lib/components/detail/color/preset/detail-color-preset.js +1 -2
- package/src/lib/components/detail/color/preset/detail-color-preset.js.map +1 -1
- package/src/lib/components/detail/date-range/detail-date-range.d.ts +1 -1
- package/src/lib/components/detail/date-range/detail-date-range.js +1 -1
- package/src/lib/components/detail/date-range/detail-date-range.js.map +1 -1
- package/src/lib/components/detail/date-range/preset/detail-date-range-preset.d.ts +1 -2
- package/src/lib/components/detail/date-range/preset/detail-date-range-preset.js +1 -2
- package/src/lib/components/detail/date-range/preset/detail-date-range-preset.js.map +1 -1
- package/src/lib/components/detail/default-field-components.d.ts +4 -5
- package/src/lib/components/detail/default-field-components.js +4 -5
- package/src/lib/components/detail/default-field-components.js.map +1 -1
- package/src/lib/components/detail/detail.d.ts +6 -7
- package/src/lib/components/detail/detail.js +6 -7
- package/src/lib/components/detail/detail.js.map +1 -1
- package/src/lib/components/detail/detail.types.d.ts +2 -5
- package/src/lib/components/detail/email/detail-email.d.ts +1 -1
- package/src/lib/components/detail/email/detail-email.js +1 -1
- package/src/lib/components/detail/email/detail-email.js.map +1 -1
- package/src/lib/components/detail/email/preset/detail-email-preset.d.ts +1 -2
- package/src/lib/components/detail/email/preset/detail-email-preset.js +1 -2
- package/src/lib/components/detail/email/preset/detail-email-preset.js.map +1 -1
- package/src/lib/components/detail/enum/detail-enum.d.ts +1 -2
- package/src/lib/components/detail/enum/detail-enum.js +1 -2
- package/src/lib/components/detail/enum/detail-enum.js.map +1 -1
- package/src/lib/components/detail/enum/preset/detail-enum-preset.d.ts +1 -2
- package/src/lib/components/detail/enum/preset/detail-enum-preset.js +1 -2
- package/src/lib/components/detail/enum/preset/detail-enum-preset.js.map +1 -1
- package/src/lib/components/detail/enum/use-detail-enum.d.ts +2 -2
- package/src/lib/components/detail/enum/use-detail-enum.js +2 -2
- package/src/lib/components/detail/flag/detail-flag.d.ts +1 -2
- package/src/lib/components/detail/flag/detail-flag.js +1 -2
- package/src/lib/components/detail/flag/detail-flag.js.map +1 -1
- package/src/lib/components/detail/flag/preset/detail-flag-preset.d.ts +2 -2
- package/src/lib/components/detail/flag/preset/detail-flag-preset.js +2 -2
- package/src/lib/components/detail/image/detail-image.d.ts +1 -1
- package/src/lib/components/detail/image/detail-image.js +1 -1
- package/src/lib/components/detail/image/detail-image.js.map +1 -1
- package/src/lib/components/detail/image/preset/detail-image-preset.d.ts +1 -2
- package/src/lib/components/detail/image/preset/detail-image-preset.js +1 -2
- package/src/lib/components/detail/image/preset/detail-image-preset.js.map +1 -1
- package/src/lib/components/detail/image/use-detail-image.d.ts +2 -2
- package/src/lib/components/detail/image/use-detail-image.js +2 -2
- package/src/lib/components/detail/logo/detail-logo.d.ts +1 -1
- package/src/lib/components/detail/logo/detail-logo.js +1 -1
- package/src/lib/components/detail/logo/detail-logo.js.map +1 -1
- package/src/lib/components/detail/logo/preset/detail-logo-preset.d.ts +1 -1
- package/src/lib/components/detail/logo/preset/detail-logo-preset.js +1 -1
- package/src/lib/components/detail/logo/preset/detail-logo-preset.js.map +1 -1
- package/src/lib/components/detail/object/detail-object.d.ts +2 -3
- package/src/lib/components/detail/object/detail-object.js +2 -3
- package/src/lib/components/detail/object/detail-object.js.map +1 -1
- package/src/lib/components/detail/object/preset/detail-object-preset.d.ts +2 -2
- package/src/lib/components/detail/object/preset/detail-object-preset.js +2 -2
- package/src/lib/components/detail/object/use-detail-object.d.ts +3 -3
- package/src/lib/components/detail/object/use-detail-object.js +3 -3
- package/src/lib/components/detail/pdf/detail-pdf.d.ts +1 -1
- package/src/lib/components/detail/pdf/detail-pdf.js +1 -1
- package/src/lib/components/detail/pdf/detail-pdf.js.map +1 -1
- package/src/lib/components/detail/pdf/preset/detail-pdf-preset.d.ts +2 -2
- package/src/lib/components/detail/pdf/preset/detail-pdf-preset.js +2 -2
- package/src/lib/components/detail/pdf/use-detail-pdf.d.ts +3 -3
- package/src/lib/components/detail/pdf/use-detail-pdf.js +3 -3
- package/src/lib/components/detail/phone-number-pl/detail-phone-number-pl.d.ts +2 -3
- package/src/lib/components/detail/phone-number-pl/detail-phone-number-pl.js +2 -3
- package/src/lib/components/detail/phone-number-pl/detail-phone-number-pl.js.map +1 -1
- package/src/lib/components/detail/phone-number-pl/preset/detail-phone-number-pl-preset.d.ts +1 -2
- package/src/lib/components/detail/phone-number-pl/preset/detail-phone-number-pl-preset.js +1 -2
- package/src/lib/components/detail/phone-number-pl/preset/detail-phone-number-pl-preset.js.map +1 -1
- package/src/lib/components/detail/preset-fields.d.ts +2 -2
- package/src/lib/components/detail/preset-fields.js +2 -2
- package/src/lib/components/detail/text/detail-text.d.ts +3 -3
- package/src/lib/components/detail/text/detail-text.js +3 -3
- package/src/lib/components/detail/text/preset/detail-text-preset.d.ts +2 -2
- package/src/lib/components/detail/text/preset/detail-text-preset.js +2 -2
- package/src/lib/components/detail/use-detail.d.ts +4 -4
- package/src/lib/components/detail/use-detail.js +4 -4
- package/src/lib/components/detail/video/detail-video.d.ts +1 -1
- package/src/lib/components/detail/video/detail-video.js +1 -1
- package/src/lib/components/detail/video/detail-video.js.map +1 -1
- package/src/lib/components/detail/video/preset/detail-video-preset.d.ts +1 -2
- package/src/lib/components/detail/video/preset/detail-video-preset.js +1 -2
- package/src/lib/components/detail/video/preset/detail-video-preset.js.map +1 -1
- package/src/lib/components/detail/video/use-detail-video.d.ts +2 -2
- package/src/lib/components/detail/video/use-detail-video.js +2 -2
- package/src/lib/components/details/details.d.ts +3 -5
- package/src/lib/components/details/details.js +3 -5
- package/src/lib/components/details/details.js.map +1 -1
- package/src/lib/components/details/standard/details-standard.d.ts +3 -3
- package/src/lib/components/details/standard/details-standard.js +3 -3
- package/src/lib/components/details/use-details-modal.d.ts +6 -7
- package/src/lib/components/details/use-details-modal.js +2 -3
- package/src/lib/components/details/use-details-modal.js.map +1 -1
- package/src/lib/components/details/use-details.d.ts +1 -1
- package/src/lib/components/details/use-details.js +1 -1
- package/src/lib/components/divider/divider.d.ts +2 -3
- package/src/lib/components/divider/divider.js +2 -3
- package/src/lib/components/divider/divider.js.map +1 -1
- package/src/lib/components/divider/divider.types.d.ts +1 -1
- package/src/lib/components/divider/standard/divider-standard.d.ts +2 -2
- package/src/lib/components/divider/standard/divider-standard.js +2 -2
- package/src/lib/components/drawer/drawer.d.ts +4 -5
- package/src/lib/components/drawer/drawer.js +4 -5
- package/src/lib/components/drawer/drawer.js.map +1 -1
- package/src/lib/components/drawer/drawer.types.d.ts +3 -3
- package/src/lib/components/drawer/standard/drawer-standard.d.ts +1 -1
- package/src/lib/components/drawer/standard/drawer-standard.js +1 -1
- package/src/lib/components/drawer/standard/drawer-standard.js.map +1 -1
- package/src/lib/components/drawer/use-drawer.d.ts +3 -4
- package/src/lib/components/drawer/use-drawer.js +3 -4
- package/src/lib/components/drawer/use-drawer.js.map +1 -1
- package/src/lib/components/dropdown/dropdown.d.ts +4 -5
- package/src/lib/components/dropdown/dropdown.js +4 -5
- package/src/lib/components/dropdown/dropdown.js.map +1 -1
- package/src/lib/components/dropdown/dropdown.types.d.ts +4 -4
- package/src/lib/components/dropdown/preset/dropdown-preset.d.ts +6 -7
- package/src/lib/components/dropdown/preset/dropdown-preset.js +6 -7
- package/src/lib/components/dropdown/preset/dropdown-preset.js.map +1 -1
- package/src/lib/components/dropdown/standard/dropdown-standard.d.ts +1 -1
- package/src/lib/components/dropdown/standard/dropdown-standard.js +1 -1
- package/src/lib/components/dropdown/standard/dropdown-standard.js.map +1 -1
- package/src/lib/components/dropdown/use-dropdown.d.ts +4 -5
- package/src/lib/components/dropdown/use-dropdown.js +4 -5
- package/src/lib/components/dropdown/use-dropdown.js.map +1 -1
- package/src/lib/components/empty-state/empty-state.d.ts +3 -5
- package/src/lib/components/empty-state/empty-state.js +3 -5
- package/src/lib/components/empty-state/empty-state.js.map +1 -1
- package/src/lib/components/empty-state/empty-state.types.d.ts +2 -2
- package/src/lib/components/empty-state/standard/empty-state-standard.d.ts +4 -4
- package/src/lib/components/empty-state/standard/empty-state-standard.js +4 -4
- package/src/lib/components/export/export.d.ts +4 -5
- package/src/lib/components/export/export.js +4 -5
- package/src/lib/components/export/export.js.map +1 -1
- package/src/lib/components/export/export.types.d.ts +1 -1
- package/src/lib/components/export/use-export.d.ts +2 -2
- package/src/lib/components/export/use-export.js +2 -2
- package/src/lib/components/feed/feed.d.ts +2 -3
- package/src/lib/components/feed/feed.js +2 -3
- package/src/lib/components/feed/feed.js.map +1 -1
- package/src/lib/components/feed/standard/feed-standard.d.ts +4 -4
- package/src/lib/components/feed/standard/feed-standard.js +4 -4
- package/src/lib/components/form/form.d.ts +10 -14
- package/src/lib/components/form/form.js +20 -26
- package/src/lib/components/form/form.js.map +1 -1
- package/src/lib/components/form/form.types.d.ts +6 -7
- package/src/lib/components/form/preset/form-preset.d.ts +1 -1
- package/src/lib/components/form/preset/form-preset.js +1 -1
- package/src/lib/components/form/standard/form-standard.d.ts +1 -1
- package/src/lib/components/form/standard/form-standard.js +1 -1
- package/src/lib/components/form/standard/form-standard.js.map +1 -1
- package/src/lib/components/form/use-form-base.d.ts +5 -6
- package/src/lib/components/form/use-form-base.js +9 -13
- package/src/lib/components/form/use-form-base.js.map +1 -1
- package/src/lib/components/grid-list/grid-list.d.ts +2 -3
- package/src/lib/components/grid-list/grid-list.js +2 -3
- package/src/lib/components/grid-list/grid-list.js.map +1 -1
- package/src/lib/components/grid-list/preset/grid-list-preset.d.ts +2 -3
- package/src/lib/components/grid-list/preset/grid-list-preset.js +2 -3
- package/src/lib/components/grid-list/preset/grid-list-preset.js.map +1 -1
- package/src/lib/components/grid-list/standard/grid-list-standard.d.ts +3 -4
- package/src/lib/components/grid-list/standard/grid-list-standard.js +3 -4
- package/src/lib/components/grid-list/standard/grid-list-standard.js.map +1 -1
- package/src/lib/components/icon/icon.d.ts +1 -1
- package/src/lib/components/icon/icon.js +1 -1
- package/src/lib/components/icon/icon.js.map +1 -1
- package/src/lib/components/icon/icon.types.d.ts +1 -1
- package/src/lib/components/icon/preset/preset-classes.d.ts +1 -1
- package/src/lib/components/icon/preset/preset-classes.js +2 -2
- package/src/lib/components/icon/preset/preset-classes.js.map +1 -1
- package/src/lib/components/import/import.d.ts +4 -5
- package/src/lib/components/import/import.js +4 -5
- package/src/lib/components/import/import.js.map +1 -1
- package/src/lib/components/import/import.types.d.ts +2 -2
- package/src/lib/components/import/use-import.d.ts +3 -3
- package/src/lib/components/import/use-import.js +4 -4
- package/src/lib/components/import/use-import.js.map +1 -1
- package/src/lib/components/info/info.d.ts +2 -3
- package/src/lib/components/info/info.js +2 -3
- package/src/lib/components/info/info.js.map +1 -1
- package/src/lib/components/info/standard/info-standard.d.ts +3 -3
- package/src/lib/components/info/standard/info-standard.js +3 -3
- package/src/lib/components/info/use-info.d.ts +2 -2
- package/src/lib/components/info/use-info.js +2 -2
- package/src/lib/components/input/address/input-address.d.ts +4 -4
- package/src/lib/components/input/address/input-address.js +4 -4
- package/src/lib/components/input/address/preset/input-address-preset.d.ts +4 -5
- package/src/lib/components/input/address/preset/input-address-preset.js +4 -5
- package/src/lib/components/input/address/preset/input-address-preset.js.map +1 -1
- package/src/lib/components/input/address/use-input-address.d.ts +4 -5
- package/src/lib/components/input/address/use-input-address.js +4 -5
- package/src/lib/components/input/address/use-input-address.js.map +1 -1
- package/src/lib/components/input/array/input-array.d.ts +4 -5
- package/src/lib/components/input/array/input-array.js +4 -5
- package/src/lib/components/input/array/input-array.js.map +1 -1
- package/src/lib/components/input/array/preset/input-array-preset.d.ts +3 -3
- package/src/lib/components/input/array/preset/input-array-preset.js +3 -3
- package/src/lib/components/input/array/use-input-array.d.ts +3 -5
- package/src/lib/components/input/array/use-input-array.js +9 -11
- package/src/lib/components/input/array/use-input-array.js.map +1 -1
- package/src/lib/components/input/attachment/input-attachment.d.ts +2 -3
- package/src/lib/components/input/attachment/input-attachment.js +2 -3
- package/src/lib/components/input/attachment/input-attachment.js.map +1 -1
- package/src/lib/components/input/attachment/preset/input-attachment-preset.d.ts +1 -2
- package/src/lib/components/input/attachment/preset/input-attachment-preset.js +1 -2
- package/src/lib/components/input/attachment/preset/input-attachment-preset.js.map +1 -1
- package/src/lib/components/input/base/use-input-file.d.ts +4 -5
- package/src/lib/components/input/base/use-input-file.js +4 -5
- package/src/lib/components/input/base/use-input-file.js.map +1 -1
- package/src/lib/components/input/base/use-input-possibilities.d.ts +1 -2
- package/src/lib/components/input/base/use-input-possibilities.js +1 -2
- package/src/lib/components/input/base/use-input-possibilities.js.map +1 -1
- package/src/lib/components/input/base/use-input.d.ts +4 -5
- package/src/lib/components/input/base/use-input.js +6 -7
- package/src/lib/components/input/base/use-input.js.map +1 -1
- package/src/lib/components/input/check/input-check.d.ts +3 -4
- package/src/lib/components/input/check/input-check.js +3 -4
- package/src/lib/components/input/check/input-check.js.map +1 -1
- package/src/lib/components/input/check/preset/input-check-preset.d.ts +2 -3
- package/src/lib/components/input/check/preset/input-check-preset.js +2 -3
- package/src/lib/components/input/check/preset/input-check-preset.js.map +1 -1
- package/src/lib/components/input/check/use-input-check.d.ts +9 -12
- package/src/lib/components/input/check/use-input-check.js +9 -12
- package/src/lib/components/input/check/use-input-check.js.map +1 -1
- package/src/lib/components/input/color/input-color.d.ts +2 -4
- package/src/lib/components/input/color/input-color.js +2 -4
- package/src/lib/components/input/color/input-color.js.map +1 -1
- package/src/lib/components/input/color/preset/input-color-preset.d.ts +2 -3
- package/src/lib/components/input/color/preset/input-color-preset.js +2 -3
- package/src/lib/components/input/color/preset/input-color-preset.js.map +1 -1
- package/src/lib/components/input/color/use-input-color.d.ts +4 -4
- package/src/lib/components/input/color/use-input-color.js +5 -5
- package/src/lib/components/input/color/use-input-color.js.map +1 -1
- package/src/lib/components/input/currency/input-currency.d.ts +2 -4
- package/src/lib/components/input/currency/input-currency.js +2 -4
- package/src/lib/components/input/currency/input-currency.js.map +1 -1
- package/src/lib/components/input/currency/preset/input-currency-preset.d.ts +2 -3
- package/src/lib/components/input/currency/preset/input-currency-preset.js +2 -3
- package/src/lib/components/input/currency/preset/input-currency-preset.js.map +1 -1
- package/src/lib/components/input/date/input-date.d.ts +4 -7
- package/src/lib/components/input/date/input-date.js +4 -7
- package/src/lib/components/input/date/input-date.js.map +1 -1
- package/src/lib/components/input/date/preset/input-date-preset.d.ts +4 -5
- package/src/lib/components/input/date/preset/input-date-preset.js +4 -5
- package/src/lib/components/input/date/preset/input-date-preset.js.map +1 -1
- package/src/lib/components/input/date-range/input-date-range.d.ts +5 -8
- package/src/lib/components/input/date-range/input-date-range.js +5 -8
- package/src/lib/components/input/date-range/input-date-range.js.map +1 -1
- package/src/lib/components/input/date-range/preset/input-date-range-preset.d.ts +6 -8
- package/src/lib/components/input/date-range/preset/input-date-range-preset.js +6 -8
- package/src/lib/components/input/date-range/preset/input-date-range-preset.js.map +1 -1
- package/src/lib/components/input/date-with-edit/input-date-with-edit.d.ts +6 -9
- package/src/lib/components/input/date-with-edit/input-date-with-edit.js +6 -9
- package/src/lib/components/input/date-with-edit/input-date-with-edit.js.map +1 -1
- package/src/lib/components/input/date-with-edit/preset/input-date-with-edit-preset.d.ts +7 -8
- package/src/lib/components/input/date-with-edit/preset/input-date-with-edit-preset.js +7 -8
- package/src/lib/components/input/date-with-edit/preset/input-date-with-edit-preset.js.map +1 -1
- package/src/lib/components/input/default-field-components.js +4 -5
- package/src/lib/components/input/default-field-components.js.map +1 -1
- package/src/lib/components/input/email/input-email.d.ts +2 -3
- package/src/lib/components/input/email/input-email.js +2 -3
- package/src/lib/components/input/email/input-email.js.map +1 -1
- package/src/lib/components/input/email/preset/input-email-preset.d.ts +2 -3
- package/src/lib/components/input/email/preset/input-email-preset.js +2 -3
- package/src/lib/components/input/email/preset/input-email-preset.js.map +1 -1
- package/src/lib/components/input/enum/input-enum.d.ts +3 -4
- package/src/lib/components/input/enum/input-enum.js +3 -4
- package/src/lib/components/input/enum/input-enum.js.map +1 -1
- package/src/lib/components/input/enum/preset/input-enum-preset.d.ts +4 -5
- package/src/lib/components/input/enum/preset/input-enum-preset.js +4 -5
- package/src/lib/components/input/enum/preset/input-enum-preset.js.map +1 -1
- package/src/lib/components/input/error/input-error-messages.d.ts +3 -3
- package/src/lib/components/input/error/input-error-messages.js +3 -3
- package/src/lib/components/input/error/input-error.d.ts +1 -1
- package/src/lib/components/input/error/input-error.js +1 -1
- package/src/lib/components/input/error/input-error.js.map +1 -1
- package/src/lib/components/input/field-options.d.ts +2 -3
- package/src/lib/components/input/field-options.js +2 -3
- package/src/lib/components/input/field-options.js.map +1 -1
- package/src/lib/components/input/file/input-file.d.ts +4 -5
- package/src/lib/components/input/file/input-file.js +4 -5
- package/src/lib/components/input/file/input-file.js.map +1 -1
- package/src/lib/components/input/file/preset/input-file-preset.d.ts +4 -5
- package/src/lib/components/input/file/preset/input-file-preset.js +4 -5
- package/src/lib/components/input/file/preset/input-file-preset.js.map +1 -1
- package/src/lib/components/input/file/use-input-file-drop-zone.d.ts +4 -6
- package/src/lib/components/input/file/use-input-file-drop-zone.js +4 -6
- package/src/lib/components/input/file/use-input-file-drop-zone.js.map +1 -1
- package/src/lib/components/input/flag/input-flag.d.ts +1 -2
- package/src/lib/components/input/flag/input-flag.js +1 -2
- package/src/lib/components/input/flag/input-flag.js.map +1 -1
- package/src/lib/components/input/flag/preset/input-flag-preset.d.ts +2 -2
- package/src/lib/components/input/flag/preset/input-flag-preset.js +2 -2
- package/src/lib/components/input/float/input-float.d.ts +1 -2
- package/src/lib/components/input/float/input-float.js +1 -2
- package/src/lib/components/input/float/input-float.js.map +1 -1
- package/src/lib/components/input/float/preset/input-float-preset.d.ts +2 -3
- package/src/lib/components/input/float/preset/input-float-preset.js +2 -3
- package/src/lib/components/input/float/preset/input-float-preset.js.map +1 -1
- package/src/lib/components/input/image/input-image.d.ts +4 -5
- package/src/lib/components/input/image/input-image.js +4 -5
- package/src/lib/components/input/image/input-image.js.map +1 -1
- package/src/lib/components/input/image/preset/input-image-preset.d.ts +3 -4
- package/src/lib/components/input/image/preset/input-image-preset.js +3 -4
- package/src/lib/components/input/image/preset/input-image-preset.js.map +1 -1
- package/src/lib/components/input/image/use-input-image.d.ts +3 -4
- package/src/lib/components/input/image/use-input-image.js +3 -4
- package/src/lib/components/input/image/use-input-image.js.map +1 -1
- package/src/lib/components/input/input.d.ts +6 -8
- package/src/lib/components/input/input.js +6 -8
- package/src/lib/components/input/input.js.map +1 -1
- package/src/lib/components/input/input.types.d.ts +4 -5
- package/src/lib/components/input/int/input-int.d.ts +2 -3
- package/src/lib/components/input/int/input-int.js +2 -3
- package/src/lib/components/input/int/input-int.js.map +1 -1
- package/src/lib/components/input/int/number-value.d.ts +2 -3
- package/src/lib/components/input/int/number-value.js +2 -3
- package/src/lib/components/input/int/number-value.js.map +1 -1
- package/src/lib/components/input/int/preset/input-int-preset.d.ts +2 -2
- package/src/lib/components/input/int/preset/input-int-preset.js +2 -2
- package/src/lib/components/input/ints/input-ints.d.ts +2 -3
- package/src/lib/components/input/ints/input-ints.js +2 -3
- package/src/lib/components/input/ints/input-ints.js.map +1 -1
- package/src/lib/components/input/ints/preset/input-ints-preset.d.ts +3 -4
- package/src/lib/components/input/ints/preset/input-ints-preset.js +3 -4
- package/src/lib/components/input/ints/preset/input-ints-preset.js.map +1 -1
- package/src/lib/components/input/ints/use-input-ints.d.ts +6 -7
- package/src/lib/components/input/ints/use-input-ints.js +4 -5
- package/src/lib/components/input/ints/use-input-ints.js.map +1 -1
- package/src/lib/components/input/logo/input-logo.d.ts +5 -7
- package/src/lib/components/input/logo/input-logo.js +5 -7
- package/src/lib/components/input/logo/input-logo.js.map +1 -1
- package/src/lib/components/input/logo/preset/input-logo-preset.d.ts +5 -6
- package/src/lib/components/input/logo/preset/input-logo-preset.js +5 -6
- package/src/lib/components/input/logo/preset/input-logo-preset.js.map +1 -1
- package/src/lib/components/input/long-text/input-long-text.d.ts +3 -5
- package/src/lib/components/input/long-text/input-long-text.js +3 -5
- package/src/lib/components/input/long-text/input-long-text.js.map +1 -1
- package/src/lib/components/input/long-text/preset/input-long-text-preset.d.ts +3 -4
- package/src/lib/components/input/long-text/preset/input-long-text-preset.js +3 -4
- package/src/lib/components/input/long-text/preset/input-long-text-preset.js.map +1 -1
- package/src/lib/components/input/long-text/rich-text-commands.d.ts +3 -4
- package/src/lib/components/input/long-text/rich-text-commands.js +3 -4
- package/src/lib/components/input/long-text/rich-text-commands.js.map +1 -1
- package/src/lib/components/input/long-text/rich-text-editor.d.ts +3 -5
- package/src/lib/components/input/long-text/rich-text-editor.js +5 -7
- package/src/lib/components/input/long-text/rich-text-editor.js.map +1 -1
- package/src/lib/components/input/long-text/rich-text-menu.d.ts +4 -5
- package/src/lib/components/input/long-text/rich-text-menu.js +5 -6
- package/src/lib/components/input/long-text/rich-text-menu.js.map +1 -1
- package/src/lib/components/input/long-text/rich-text-popups.d.ts +7 -9
- package/src/lib/components/input/long-text/rich-text-popups.js +7 -9
- package/src/lib/components/input/long-text/rich-text-popups.js.map +1 -1
- package/src/lib/components/input/long-text/rich-text-toolbar.d.ts +9 -17
- package/src/lib/components/input/long-text/rich-text-toolbar.js +8 -16
- package/src/lib/components/input/long-text/rich-text-toolbar.js.map +1 -1
- package/src/lib/components/input/nip/input-nip.d.ts +3 -4
- package/src/lib/components/input/nip/input-nip.js +3 -4
- package/src/lib/components/input/nip/input-nip.js.map +1 -1
- package/src/lib/components/input/nip/preset/input-nip-preset.d.ts +3 -3
- package/src/lib/components/input/nip/preset/input-nip-preset.js +3 -3
- package/src/lib/components/input/nip/use-input-nip.d.ts +6 -6
- package/src/lib/components/input/nip/use-input-nip.js +6 -6
- package/src/lib/components/input/object/input-object.d.ts +1 -3
- package/src/lib/components/input/object/input-object.js +1 -3
- package/src/lib/components/input/object/input-object.js.map +1 -1
- package/src/lib/components/input/object/preset/input-object-preset.d.ts +2 -2
- package/src/lib/components/input/object/preset/input-object-preset.js +2 -2
- package/src/lib/components/input/object/use-input-object.d.ts +3 -3
- package/src/lib/components/input/object/use-input-object.js +3 -3
- package/src/lib/components/input/password/input-password.d.ts +4 -5
- package/src/lib/components/input/password/input-password.js +4 -5
- package/src/lib/components/input/password/input-password.js.map +1 -1
- package/src/lib/components/input/password/preset/input-password-preset.d.ts +4 -6
- package/src/lib/components/input/password/preset/input-password-preset.js +4 -6
- package/src/lib/components/input/password/preset/input-password-preset.js.map +1 -1
- package/src/lib/components/input/password/use-input-password.d.ts +4 -5
- package/src/lib/components/input/password/use-input-password.js +4 -5
- package/src/lib/components/input/password/use-input-password.js.map +1 -1
- package/src/lib/components/input/pdf/input-pdf.d.ts +4 -5
- package/src/lib/components/input/pdf/input-pdf.js +4 -5
- package/src/lib/components/input/pdf/input-pdf.js.map +1 -1
- package/src/lib/components/input/pdf/preset/input-pdf-preset.d.ts +5 -6
- package/src/lib/components/input/pdf/preset/input-pdf-preset.js +5 -6
- package/src/lib/components/input/pdf/preset/input-pdf-preset.js.map +1 -1
- package/src/lib/components/input/pesel/input-pesel.d.ts +3 -5
- package/src/lib/components/input/pesel/input-pesel.js +3 -5
- package/src/lib/components/input/pesel/input-pesel.js.map +1 -1
- package/src/lib/components/input/pesel/preset/input-pesel-preset.d.ts +4 -6
- package/src/lib/components/input/pesel/preset/input-pesel-preset.js +4 -6
- package/src/lib/components/input/pesel/preset/input-pesel-preset.js.map +1 -1
- package/src/lib/components/input/phone-number/input-phone-number.d.ts +3 -4
- package/src/lib/components/input/phone-number/input-phone-number.js +3 -4
- package/src/lib/components/input/phone-number/input-phone-number.js.map +1 -1
- package/src/lib/components/input/phone-number/preset/input-phone-number-preset.d.ts +1 -2
- package/src/lib/components/input/phone-number/preset/input-phone-number-preset.js +1 -2
- package/src/lib/components/input/phone-number/preset/input-phone-number-preset.js.map +1 -1
- package/src/lib/components/input/phone-number-pl/input-phone-number-pl.d.ts +2 -3
- package/src/lib/components/input/phone-number-pl/input-phone-number-pl.js +2 -3
- package/src/lib/components/input/phone-number-pl/input-phone-number-pl.js.map +1 -1
- package/src/lib/components/input/phone-number-pl/preset/input-phone-number-pl-preset.d.ts +3 -4
- package/src/lib/components/input/phone-number-pl/preset/input-phone-number-pl-preset.js +3 -4
- package/src/lib/components/input/phone-number-pl/preset/input-phone-number-pl-preset.js.map +1 -1
- package/src/lib/components/input/phone-number-pl/use-input-phone-number-pl.d.ts +7 -7
- package/src/lib/components/input/phone-number-pl/use-input-phone-number-pl.js +7 -7
- package/src/lib/components/input/preset-fields.d.ts +3 -4
- package/src/lib/components/input/preset-fields.js +3 -4
- package/src/lib/components/input/preset-fields.js.map +1 -1
- package/src/lib/components/input/radio/input-radio.d.ts +2 -3
- package/src/lib/components/input/radio/input-radio.js +2 -3
- package/src/lib/components/input/radio/input-radio.js.map +1 -1
- package/src/lib/components/input/radio/preset/input-radio-preset.d.ts +3 -3
- package/src/lib/components/input/radio/preset/input-radio-preset.js +3 -3
- package/src/lib/components/input/radio/use-input-radio.d.ts +8 -9
- package/src/lib/components/input/radio/use-input-radio.js +8 -9
- package/src/lib/components/input/radio/use-input-radio.js.map +1 -1
- package/src/lib/components/input/strings/input-strings.d.ts +6 -7
- package/src/lib/components/input/strings/input-strings.js +6 -7
- package/src/lib/components/input/strings/input-strings.js.map +1 -1
- package/src/lib/components/input/strings/preset/input-strings-preset.d.ts +4 -5
- package/src/lib/components/input/strings/preset/input-strings-preset.js +4 -5
- package/src/lib/components/input/strings/preset/input-strings-preset.js.map +1 -1
- package/src/lib/components/input/text/input-text.d.ts +2 -3
- package/src/lib/components/input/text/input-text.js +2 -3
- package/src/lib/components/input/text/input-text.js.map +1 -1
- package/src/lib/components/input/text/preset/input-text-preset.d.ts +2 -3
- package/src/lib/components/input/text/preset/input-text-preset.js +2 -3
- package/src/lib/components/input/text/preset/input-text-preset.js.map +1 -1
- package/src/lib/components/input/video/input-video.d.ts +4 -6
- package/src/lib/components/input/video/input-video.js +4 -6
- package/src/lib/components/input/video/input-video.js.map +1 -1
- package/src/lib/components/input/video/preset/input-video-preset.d.ts +6 -6
- package/src/lib/components/input/video/preset/input-video-preset.js +6 -6
- package/src/lib/components/input/video/use-input-video.d.ts +3 -5
- package/src/lib/components/input/video/use-input-video.js +4 -6
- package/src/lib/components/input/video/use-input-video.js.map +1 -1
- package/src/lib/components/list/desktop/list-desktop.d.ts +4 -5
- package/src/lib/components/list/desktop/list-desktop.js +4 -5
- package/src/lib/components/list/desktop/list-desktop.js.map +1 -1
- package/src/lib/components/list/desktop/preset/list-desktop-preset.d.ts +6 -7
- package/src/lib/components/list/desktop/preset/list-desktop-preset.js +6 -7
- package/src/lib/components/list/desktop/preset/list-desktop-preset.js.map +1 -1
- package/src/lib/components/list/desktop/use-list-desktop.d.ts +4 -8
- package/src/lib/components/list/desktop/use-list-desktop.js +4 -8
- package/src/lib/components/list/desktop/use-list-desktop.js.map +1 -1
- package/src/lib/components/list/list-title-key.d.ts +2 -3
- package/src/lib/components/list/list-title-key.js +2 -3
- package/src/lib/components/list/list-title-key.js.map +1 -1
- package/src/lib/components/list/list.d.ts +8 -10
- package/src/lib/components/list/list.js +8 -10
- package/src/lib/components/list/list.js.map +1 -1
- package/src/lib/components/list/list.types.d.ts +3 -4
- package/src/lib/components/list/masonry-grid/list-masonry-grid.d.ts +3 -5
- package/src/lib/components/list/masonry-grid/list-masonry-grid.js +3 -5
- package/src/lib/components/list/masonry-grid/list-masonry-grid.js.map +1 -1
- package/src/lib/components/list/masonry-grid/preset/list-masonry-grid-preset.d.ts +5 -6
- package/src/lib/components/list/masonry-grid/preset/list-masonry-grid-preset.js +5 -6
- package/src/lib/components/list/masonry-grid/preset/list-masonry-grid-preset.js.map +1 -1
- package/src/lib/components/list/masonry-grid/use-list-masonry-grid.d.ts +1 -2
- package/src/lib/components/list/masonry-grid/use-list-masonry-grid.js +1 -2
- package/src/lib/components/list/masonry-grid/use-list-masonry-grid.js.map +1 -1
- package/src/lib/components/list/mobile/list-mobile.d.ts +2 -3
- package/src/lib/components/list/mobile/list-mobile.js +2 -3
- package/src/lib/components/list/mobile/list-mobile.js.map +1 -1
- package/src/lib/components/list/mobile/preset/list-mobile-preset.d.ts +5 -6
- package/src/lib/components/list/mobile/preset/list-mobile-preset.js +5 -6
- package/src/lib/components/list/mobile/preset/list-mobile-preset.js.map +1 -1
- package/src/lib/components/list/preset-modes.d.ts +1 -2
- package/src/lib/components/list/preset-modes.js +1 -2
- package/src/lib/components/list/preset-modes.js.map +1 -1
- package/src/lib/components/list/use-list.d.ts +6 -6
- package/src/lib/components/list/use-list.js +9 -9
- package/src/lib/components/list/use-list.js.map +1 -1
- package/src/lib/components/list-container/list-container.d.ts +3 -5
- package/src/lib/components/list-container/list-container.js +3 -5
- package/src/lib/components/list-container/list-container.js.map +1 -1
- package/src/lib/components/list-container/list-container.types.d.ts +1 -1
- package/src/lib/components/list-container/standard/list-container-standard.d.ts +2 -3
- package/src/lib/components/list-container/standard/list-container-standard.js +2 -3
- package/src/lib/components/list-container/standard/list-container-standard.js.map +1 -1
- package/src/lib/components/loader/loader.d.ts +2 -3
- package/src/lib/components/loader/loader.js +2 -3
- package/src/lib/components/loader/loader.js.map +1 -1
- package/src/lib/components/loader/standard/loader-standard.d.ts +1 -1
- package/src/lib/components/loader/standard/loader-standard.js +1 -1
- package/src/lib/components/loader/standard/loader-standard.js.map +1 -1
- package/src/lib/components/loader/use-loader.d.ts +2 -3
- package/src/lib/components/loader/use-loader.js +4 -5
- package/src/lib/components/loader/use-loader.js.map +1 -1
- package/src/lib/components/media-object/media-object.d.ts +3 -5
- package/src/lib/components/media-object/media-object.js +3 -5
- package/src/lib/components/media-object/media-object.js.map +1 -1
- package/src/lib/components/media-object/media-object.types.d.ts +1 -1
- package/src/lib/components/media-object/standard/media-object-standard.d.ts +4 -4
- package/src/lib/components/media-object/standard/media-object-standard.js +4 -4
- package/src/lib/components/modal/modal.d.ts +5 -6
- package/src/lib/components/modal/modal.js +5 -6
- package/src/lib/components/modal/modal.js.map +1 -1
- package/src/lib/components/modal/modal.types.d.ts +4 -4
- package/src/lib/components/modal/standard/modal-standard.d.ts +3 -3
- package/src/lib/components/modal/standard/modal-standard.js +3 -3
- package/src/lib/components/modal/use-modal.d.ts +4 -5
- package/src/lib/components/modal/use-modal.js +4 -5
- package/src/lib/components/modal/use-modal.js.map +1 -1
- package/src/lib/components/multi-column-layout/multi-column-layout.d.ts +3 -5
- package/src/lib/components/multi-column-layout/multi-column-layout.js +3 -5
- package/src/lib/components/multi-column-layout/multi-column-layout.js.map +1 -1
- package/src/lib/components/multi-column-layout/multi-column-layout.types.d.ts +1 -1
- package/src/lib/components/multi-column-layout/standard/multi-column-layout-standard.d.ts +3 -3
- package/src/lib/components/multi-column-layout/standard/multi-column-layout-standard.js +3 -3
- package/src/lib/components/navbar/nav-link.d.ts +5 -5
- package/src/lib/components/navbar/nav-link.js +5 -5
- package/src/lib/components/navbar/navbar.d.ts +2 -3
- package/src/lib/components/navbar/navbar.js +2 -3
- package/src/lib/components/navbar/navbar.js.map +1 -1
- package/src/lib/components/navbar/navbar.types.d.ts +2 -2
- package/src/lib/components/navbar/standard/navbar-standard.d.ts +1 -1
- package/src/lib/components/navbar/standard/navbar-standard.js +1 -1
- package/src/lib/components/navbar/standard/navbar-standard.js.map +1 -1
- package/src/lib/components/navbar/use-navbar.d.ts +3 -4
- package/src/lib/components/navbar/use-navbar.js +3 -4
- package/src/lib/components/navbar/use-navbar.js.map +1 -1
- package/src/lib/components/notification/notification.d.ts +4 -5
- package/src/lib/components/notification/notification.js +4 -5
- package/src/lib/components/notification/notification.js.map +1 -1
- package/src/lib/components/notification/notification.types.d.ts +1 -1
- package/src/lib/components/notification/preset/notification-preset.d.ts +4 -5
- package/src/lib/components/notification/preset/notification-preset.js +4 -5
- package/src/lib/components/notification/preset/notification-preset.js.map +1 -1
- package/src/lib/components/notification/standard/notification-standard.d.ts +1 -1
- package/src/lib/components/notification/standard/notification-standard.js +1 -1
- package/src/lib/components/notification/standard/notification-standard.js.map +1 -1
- package/src/lib/components/notification/use-notification.d.ts +3 -4
- package/src/lib/components/notification/use-notification.js +3 -4
- package/src/lib/components/notification/use-notification.js.map +1 -1
- package/src/lib/components/page/page.d.ts +7 -8
- package/src/lib/components/page/page.js +7 -8
- package/src/lib/components/page/page.js.map +1 -1
- package/src/lib/components/page/page.types.d.ts +4 -4
- package/src/lib/components/page/preset/page-preset.d.ts +2 -2
- package/src/lib/components/page/preset/page-preset.js +2 -2
- package/src/lib/components/page/preset-variants.d.ts +3 -4
- package/src/lib/components/page/preset-variants.js +3 -4
- package/src/lib/components/page/preset-variants.js.map +1 -1
- package/src/lib/components/page/standard/page-standard.d.ts +5 -5
- package/src/lib/components/page/standard/page-standard.js +5 -5
- package/src/lib/components/page/use-page.d.ts +3 -4
- package/src/lib/components/page/use-page.js +3 -4
- package/src/lib/components/page/use-page.js.map +1 -1
- package/src/lib/components/page-heading/page-heading.d.ts +2 -4
- package/src/lib/components/page-heading/page-heading.js +2 -4
- package/src/lib/components/page-heading/page-heading.js.map +1 -1
- package/src/lib/components/page-heading/preset/page-heading-preset.d.ts +3 -4
- package/src/lib/components/page-heading/preset/page-heading-preset.js +3 -4
- package/src/lib/components/page-heading/preset/page-heading-preset.js.map +1 -1
- package/src/lib/components/page-heading/standard/page-heading-standard.d.ts +3 -3
- package/src/lib/components/page-heading/standard/page-heading-standard.js +3 -3
- package/src/lib/components/paging/paging.d.ts +3 -4
- package/src/lib/components/paging/paging.js +3 -4
- package/src/lib/components/paging/paging.js.map +1 -1
- package/src/lib/components/paging/paging.types.d.ts +1 -1
- package/src/lib/components/paging/preset/paging-preset.d.ts +3 -3
- package/src/lib/components/paging/preset/paging-preset.js +3 -3
- package/src/lib/components/paging/standard/paging-standard.d.ts +3 -3
- package/src/lib/components/paging/standard/paging-standard.js +3 -3
- package/src/lib/components/paging/use-paging.d.ts +5 -6
- package/src/lib/components/paging/use-paging.js +5 -6
- package/src/lib/components/paging/use-paging.js.map +1 -1
- package/src/lib/components/password-strength/password-strength.d.ts +2 -4
- package/src/lib/components/password-strength/password-strength.js +2 -4
- package/src/lib/components/password-strength/password-strength.js.map +1 -1
- package/src/lib/components/password-strength/password-strength.types.d.ts +2 -5
- package/src/lib/components/password-strength/standard/password-strength-standard.d.ts +1 -1
- package/src/lib/components/password-strength/standard/password-strength-standard.js +1 -1
- package/src/lib/components/password-strength/standard/password-strength-standard.js.map +1 -1
- package/src/lib/components/password-strength/use-password-strength.d.ts +1 -2
- package/src/lib/components/password-strength/use-password-strength.js +3 -4
- package/src/lib/components/password-strength/use-password-strength.js.map +1 -1
- package/src/lib/components/presets/presets.d.ts +3 -5
- package/src/lib/components/presets/presets.js +3 -5
- package/src/lib/components/presets/presets.js.map +1 -1
- package/src/lib/components/progress-bars/progress-bars.d.ts +2 -4
- package/src/lib/components/progress-bars/progress-bars.js +2 -4
- package/src/lib/components/progress-bars/progress-bars.js.map +1 -1
- package/src/lib/components/progress-bars/standard/progress-bars-standard.d.ts +2 -2
- package/src/lib/components/progress-bars/standard/progress-bars-standard.js +3 -3
- package/src/lib/components/progress-bars/standard/progress-bars-standard.js.map +1 -1
- package/src/lib/components/searchbar/searchbar.d.ts +2 -3
- package/src/lib/components/searchbar/searchbar.js +2 -3
- package/src/lib/components/searchbar/searchbar.js.map +1 -1
- package/src/lib/components/searchbar/searchbar.types.d.ts +7 -7
- package/src/lib/components/searchbar/standard/searchbar-standard.d.ts +3 -5
- package/src/lib/components/searchbar/standard/searchbar-standard.js +3 -5
- package/src/lib/components/searchbar/standard/searchbar-standard.js.map +1 -1
- package/src/lib/components/searchbar/use-searchbar.d.ts +1 -2
- package/src/lib/components/searchbar/use-searchbar.js +1 -2
- package/src/lib/components/searchbar/use-searchbar.js.map +1 -1
- package/src/lib/components/section-heading/preset/section-heading-preset.d.ts +1 -2
- package/src/lib/components/section-heading/preset/section-heading-preset.js +1 -2
- package/src/lib/components/section-heading/preset/section-heading-preset.js.map +1 -1
- package/src/lib/components/section-heading/section-heading.d.ts +2 -4
- package/src/lib/components/section-heading/section-heading.js +2 -4
- package/src/lib/components/section-heading/section-heading.js.map +1 -1
- package/src/lib/components/section-heading/standard/section-heading-standard.d.ts +3 -3
- package/src/lib/components/section-heading/standard/section-heading-standard.js +3 -3
- package/src/lib/components/select-menu/select-menu.d.ts +2 -4
- package/src/lib/components/select-menu/select-menu.js +2 -4
- package/src/lib/components/select-menu/select-menu.js.map +1 -1
- package/src/lib/components/select-menu/select-menu.types.d.ts +3 -3
- package/src/lib/components/select-menu/standard/select-menu-standard.d.ts +2 -3
- package/src/lib/components/select-menu/standard/select-menu-standard.js +2 -3
- package/src/lib/components/select-menu/standard/select-menu-standard.js.map +1 -1
- package/src/lib/components/select-menu/use-select-menu.d.ts +3 -4
- package/src/lib/components/select-menu/use-select-menu.js +3 -4
- package/src/lib/components/select-menu/use-select-menu.js.map +1 -1
- package/src/lib/components/sidebar-layout/preset/sidebar-layout-preset.d.ts +1 -1
- package/src/lib/components/sidebar-layout/preset/sidebar-layout-preset.js +1 -1
- package/src/lib/components/sidebar-layout/sidebar-layout.d.ts +3 -4
- package/src/lib/components/sidebar-layout/sidebar-layout.js +3 -4
- package/src/lib/components/sidebar-layout/sidebar-layout.js.map +1 -1
- package/src/lib/components/sidebar-layout/sidebar-layout.types.d.ts +1 -1
- package/src/lib/components/sidebar-layout/standard/sidebar-layout-standard.d.ts +3 -4
- package/src/lib/components/sidebar-layout/standard/sidebar-layout-standard.js +3 -4
- package/src/lib/components/sidebar-layout/standard/sidebar-layout-standard.js.map +1 -1
- package/src/lib/components/sidebar-navigation/sidebar-navigation.d.ts +2 -4
- package/src/lib/components/sidebar-navigation/sidebar-navigation.js +2 -4
- package/src/lib/components/sidebar-navigation/sidebar-navigation.js.map +1 -1
- package/src/lib/components/sidebar-navigation/standard/sidebar-navigation-standard.d.ts +1 -1
- package/src/lib/components/sidebar-navigation/standard/sidebar-navigation-standard.js +1 -1
- package/src/lib/components/sidebar-navigation/standard/sidebar-navigation-standard.js.map +1 -1
- package/src/lib/components/sidebar-navigation/use-sidebar-navigation.d.ts +5 -5
- package/src/lib/components/sidebar-navigation/use-sidebar-navigation.js +5 -5
- package/src/lib/components/sign-in-form/sign-in-form.d.ts +2 -4
- package/src/lib/components/sign-in-form/sign-in-form.js +2 -4
- package/src/lib/components/sign-in-form/sign-in-form.js.map +1 -1
- package/src/lib/components/sign-in-form/sign-in-form.types.d.ts +2 -2
- package/src/lib/components/sign-in-form/standard/sign-in-form-standard.d.ts +1 -1
- package/src/lib/components/sign-in-form/standard/sign-in-form-standard.js +1 -1
- package/src/lib/components/sign-in-form/standard/sign-in-form-standard.js.map +1 -1
- package/src/lib/components/sign-in-form/use-sign-in-form.d.ts +3 -4
- package/src/lib/components/sign-in-form/use-sign-in-form.js +3 -4
- package/src/lib/components/sign-in-form/use-sign-in-form.js.map +1 -1
- package/src/lib/components/stacked-layout/stacked-layout.d.ts +3 -4
- package/src/lib/components/stacked-layout/stacked-layout.js +3 -4
- package/src/lib/components/stacked-layout/stacked-layout.js.map +1 -1
- package/src/lib/components/stacked-layout/stacked-layout.types.d.ts +1 -1
- package/src/lib/components/stacked-layout/standard/stacked-layout-standard.d.ts +1 -1
- package/src/lib/components/stacked-layout/standard/stacked-layout-standard.js +1 -1
- package/src/lib/components/stacked-list/stacked-list.d.ts +2 -4
- package/src/lib/components/stacked-list/stacked-list.js +2 -4
- package/src/lib/components/stacked-list/stacked-list.js.map +1 -1
- package/src/lib/components/stacked-list/standard/stacked-list-standard.d.ts +5 -5
- package/src/lib/components/stacked-list/standard/stacked-list-standard.js +5 -5
- package/src/lib/components/stats/preset/stats-preset.d.ts +2 -3
- package/src/lib/components/stats/preset/stats-preset.js +2 -3
- package/src/lib/components/stats/preset/stats-preset.js.map +1 -1
- package/src/lib/components/stats/standard/stats-standard.d.ts +3 -3
- package/src/lib/components/stats/standard/stats-standard.js +3 -3
- package/src/lib/components/stats/stats.d.ts +2 -3
- package/src/lib/components/stats/stats.js +2 -3
- package/src/lib/components/stats/stats.js.map +1 -1
- package/src/lib/components/table/preset/table-preset.d.ts +3 -4
- package/src/lib/components/table/preset/table-preset.js +5 -6
- package/src/lib/components/table/preset/table-preset.js.map +1 -1
- package/src/lib/components/table/standard/table-standard.d.ts +5 -5
- package/src/lib/components/table/standard/table-standard.js +5 -5
- package/src/lib/components/table/table-cell.d.ts +1 -1
- package/src/lib/components/table/table-cell.js +1 -1
- package/src/lib/components/table/table.d.ts +2 -3
- package/src/lib/components/table/table.js +2 -3
- package/src/lib/components/table/table.js.map +1 -1
- package/src/lib/components/table/table.types.d.ts +3 -7
- package/src/lib/components/tabs/standard/tabs-standard.d.ts +2 -2
- package/src/lib/components/tabs/standard/tabs-standard.js +2 -2
- package/src/lib/components/tabs/tabs.d.ts +2 -3
- package/src/lib/components/tabs/tabs.js +2 -3
- package/src/lib/components/tabs/tabs.js.map +1 -1
- package/src/lib/components/tabs/tabs.types.d.ts +2 -2
- package/src/lib/components/tabs/use-tabs.d.ts +1 -2
- package/src/lib/components/tabs/use-tabs.js +1 -2
- package/src/lib/components/tabs/use-tabs.js.map +1 -1
- package/src/lib/components/textarea/preset/textarea-preset.js +1 -1
- package/src/lib/components/textarea/preset/textarea-preset.js.map +1 -1
- package/src/lib/components/textarea/standard/textarea-standard.d.ts +1 -1
- package/src/lib/components/textarea/standard/textarea-standard.js +1 -1
- package/src/lib/components/textarea/standard/textarea-standard.js.map +1 -1
- package/src/lib/components/textarea/textarea.d.ts +2 -3
- package/src/lib/components/textarea/textarea.js +2 -3
- package/src/lib/components/textarea/textarea.js.map +1 -1
- package/src/lib/components/textarea/textarea.types.d.ts +5 -5
- package/src/lib/components/textarea/use-textarea.d.ts +4 -5
- package/src/lib/components/textarea/use-textarea.js +4 -5
- package/src/lib/components/textarea/use-textarea.js.map +1 -1
- package/src/lib/components/toggle/standard/toggle-standard.d.ts +2 -3
- package/src/lib/components/toggle/standard/toggle-standard.js +2 -3
- package/src/lib/components/toggle/standard/toggle-standard.js.map +1 -1
- package/src/lib/components/toggle/toggle.d.ts +2 -3
- package/src/lib/components/toggle/toggle.js +2 -3
- package/src/lib/components/toggle/toggle.js.map +1 -1
- package/src/lib/components/toggle/toggle.types.d.ts +3 -3
- package/src/lib/components/toggle/use-toggle.d.ts +3 -4
- package/src/lib/components/toggle/use-toggle.js +3 -4
- package/src/lib/components/toggle/use-toggle.js.map +1 -1
- package/src/lib/components/vertical-navigation/standard/vertical-navigation-standard.d.ts +1 -1
- package/src/lib/components/vertical-navigation/standard/vertical-navigation-standard.js +1 -1
- package/src/lib/components/vertical-navigation/standard/vertical-navigation-standard.js.map +1 -1
- package/src/lib/components/vertical-navigation/use-vertical-navigation.d.ts +3 -3
- package/src/lib/components/vertical-navigation/use-vertical-navigation.js +3 -3
- package/src/lib/components/vertical-navigation/vertical-navigation.d.ts +2 -4
- package/src/lib/components/vertical-navigation/vertical-navigation.js +2 -4
- package/src/lib/components/vertical-navigation/vertical-navigation.js.map +1 -1
- package/src/lib/factories/form/form.factory.d.ts +1 -2
- package/src/lib/factories/form/form.factory.js +5 -6
- package/src/lib/factories/form/form.factory.js.map +1 -1
- package/src/lib/forms/abstract-control.d.ts +14 -8
- package/src/lib/forms/abstract-control.js +14 -8
- package/src/lib/forms/abstract-control.js.map +1 -1
- package/src/lib/forms/emitter.d.ts +4 -3
- package/src/lib/forms/emitter.js +4 -3
- package/src/lib/forms/emitter.js.map +1 -1
- package/src/lib/forms/form-control.d.ts +2 -3
- package/src/lib/forms/form-control.js +2 -3
- package/src/lib/forms/form-control.js.map +1 -1
- package/src/lib/forms/form-group.d.ts +5 -3
- package/src/lib/forms/form-group.js +5 -3
- package/src/lib/forms/form-group.js.map +1 -1
- package/src/lib/forms/hooks.d.ts +2 -3
- package/src/lib/forms/hooks.js +5 -6
- package/src/lib/forms/hooks.js.map +1 -1
- package/src/lib/forms/validators.d.ts +7 -6
- package/src/lib/forms/validators.js +8 -7
- package/src/lib/forms/validators.js.map +1 -1
- package/src/lib/i18n/translate.d.ts +9 -4
- package/src/lib/i18n/translate.js +5 -1
- package/src/lib/i18n/translate.js.map +1 -1
- package/src/lib/i18n/translations-default.d.ts +3 -3
- package/src/lib/models/interfaces.d.ts +22 -20
- package/src/lib/models/interfaces.js.map +1 -1
- package/src/lib/pages/details/details-page.d.ts +5 -5
- package/src/lib/pages/details/details-page.js +3 -3
- package/src/lib/pages/details/use-details-page-options.d.ts +2 -2
- package/src/lib/pages/details/use-details-page-options.js +2 -2
- package/src/lib/providers/hooks.d.ts +1 -1
- package/src/lib/providers/hooks.js +1 -1
- package/src/lib/providers/hooks.js.map +1 -1
- package/src/lib/providers/smart-context.d.ts +7 -8
- package/src/lib/providers/smart-context.js.map +1 -1
- package/src/lib/providers/smart-provider.d.ts +3 -3
- package/src/lib/providers/smart-provider.js +3 -3
- package/src/lib/services/alert/alert.service.d.ts +2 -3
- package/src/lib/services/alert/alert.service.js +2 -3
- package/src/lib/services/alert/alert.service.js.map +1 -1
- package/src/lib/services/app/app.service.d.ts +3 -2
- package/src/lib/services/app/app.service.js +3 -2
- package/src/lib/services/app/app.service.js.map +1 -1
- package/src/lib/services/http/http.client.d.ts +1 -1
- package/src/lib/services/style/style.service.d.ts +2 -2
- package/src/lib/services/style/style.service.js +2 -2
- package/src/lib/store/store.d.ts +3 -2
- package/src/lib/store/store.js +3 -2
- package/src/lib/store/store.js.map +1 -1
- package/src/lib/utils/class-names.d.ts +2 -2
- package/src/lib/utils/class-names.js +2 -2
- package/src/lib/utils/hooks.d.ts +3 -3
- package/src/lib/utils/hooks.js +3 -3
- package/src/lib/utils/hooks.js.map +1 -1
- package/src/lib/utils/html.d.ts +4 -5
- package/src/lib/utils/html.js +2 -3
- package/src/lib/utils/html.js.map +1 -1
- package/src/lib/utils/model.d.ts +7 -7
- package/src/lib/utils/model.js +9 -9
- package/src/lib/utils/model.js.map +1 -1
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SmartCardHeadingStandard = SmartCardHeadingStandard;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
/**
|
|
6
|
-
* The default card heading rendering
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* The default card heading rendering: the avatar, the title, description and
|
|
7
|
+
* meta, and the actions of `options`, each only when given. Unstyled;
|
|
8
|
+
* `options.presentation` is ignored.
|
|
9
9
|
*/
|
|
10
10
|
function SmartCardHeadingStandard({ options, className, }) {
|
|
11
11
|
return ((0, jsx_runtime_1.jsxs)("div", { className: className || undefined, children: [options?.avatarTpl ? ((0, jsx_runtime_1.jsx)("div", { className: "avatar", children: options.avatarTpl })) : null, (0, jsx_runtime_1.jsxs)("div", { className: "content", children: [options?.title ? (0, jsx_runtime_1.jsx)("h3", { children: options.title }) : null, options?.description ? ((0, jsx_runtime_1.jsx)("p", { className: "description", children: options.description })) : null, options?.metaTpl ? ((0, jsx_runtime_1.jsx)("div", { className: "meta", children: options.metaTpl })) : null] }), options?.actionsTpl ? ((0, jsx_runtime_1.jsx)("div", { className: "actions", children: options.actionsTpl })) : null] }));
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { SmartCommandPaletteProps } from './command-palette.types';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* `
|
|
5
|
-
* `
|
|
6
|
-
*
|
|
7
|
-
* `onRunCommand`, is passed through to the implementation.
|
|
3
|
+
* Renders the implementation registered as `components['command-palette']` on
|
|
4
|
+
* `SmartProvider`, `SmartCommandPaletteStandard` by default. Every prop,
|
|
5
|
+
* including `onOpenChange`, `onQueryChange` and `onRunCommand`, is passed
|
|
6
|
+
* through to the implementation.
|
|
8
7
|
*/
|
|
9
8
|
export declare function SmartCommandPalette(props: SmartCommandPaletteProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,11 +5,10 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const command_palette_standard_1 = require("./standard/command-palette-standard");
|
|
6
6
|
const hooks_1 = require("../../providers/hooks");
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* `
|
|
10
|
-
* `
|
|
11
|
-
*
|
|
12
|
-
* `onRunCommand`, is passed through to the implementation.
|
|
8
|
+
* Renders the implementation registered as `components['command-palette']` on
|
|
9
|
+
* `SmartProvider`, `SmartCommandPaletteStandard` by default. Every prop,
|
|
10
|
+
* including `onOpenChange`, `onQueryChange` and `onRunCommand`, is passed
|
|
11
|
+
* through to the implementation.
|
|
13
12
|
*/
|
|
14
13
|
function SmartCommandPalette(props) {
|
|
15
14
|
const Component = (0, hooks_1.useSmartComponent)('command-palette', command_palette_standard_1.SmartCommandPaletteStandard);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-palette.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/react/src/lib/components/command-palette/command-palette.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"command-palette.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/react/src/lib/components/command-palette/command-palette.tsx"],"names":[],"mappings":";;AAUA,kDAOC;;AAhBD,kFAAkF;AAClF,iDAA0D;AAE1D;;;;;GAKG;AACH,SAAgB,mBAAmB,CAAC,KAA+B;IACjE,MAAM,SAAS,GAAG,IAAA,yBAAiB,EACjC,iBAAiB,EACjB,sDAA2B,CAC5B,CAAC;IAEF,OAAO,uBAAC,SAAS,OAAK,KAAK,GAAI,CAAC;AAClC,CAAC"}
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import { ICommand, ICommandPaletteOptions } from '../../models';
|
|
2
|
-
/**
|
|
2
|
+
/** Passed to `onRunCommand` when a command is chosen. */
|
|
3
3
|
export interface ICommandPaletteRunCommand {
|
|
4
4
|
commandId: string;
|
|
5
5
|
}
|
|
6
6
|
export interface SmartCommandPaletteProps {
|
|
7
7
|
commands?: ICommand[];
|
|
8
8
|
/**
|
|
9
|
-
* Whether the palette is open
|
|
10
|
-
*
|
|
11
|
-
* from `defaultOpen`.
|
|
9
|
+
* Whether the palette is open. Controlled when set; leave it `undefined` to
|
|
10
|
+
* let the palette keep its own state, starting from `defaultOpen`.
|
|
12
11
|
*/
|
|
13
12
|
open?: boolean;
|
|
14
13
|
defaultOpen?: boolean;
|
|
15
14
|
onOpenChange?: (open: boolean) => void;
|
|
16
15
|
/**
|
|
17
|
-
* The search text
|
|
18
|
-
*
|
|
19
|
-
* `defaultQuery`.
|
|
16
|
+
* The search text. Controlled when set; leave it `undefined` to let the
|
|
17
|
+
* palette keep its own state, starting from `defaultQuery`.
|
|
20
18
|
*/
|
|
21
19
|
query?: string;
|
|
22
20
|
defaultQuery?: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SmartCommandPaletteProps } from '../command-palette.types';
|
|
2
2
|
/**
|
|
3
|
-
* The default command palette
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* The default command palette: a native `<dialog>` with a search input and a
|
|
4
|
+
* `listbox` of the filtered commands. Clicking an option runs it and closes the
|
|
5
|
+
* palette; the dialog's `close` event (e.g. Escape on a modal dialog) closes it
|
|
6
|
+
* too.
|
|
7
7
|
*/
|
|
8
8
|
export declare function SmartCommandPaletteStandard(props: SmartCommandPaletteProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,10 +4,10 @@ exports.SmartCommandPaletteStandard = SmartCommandPaletteStandard;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const use_command_palette_1 = require("../use-command-palette");
|
|
6
6
|
/**
|
|
7
|
-
* The default command palette
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* The default command palette: a native `<dialog>` with a search input and a
|
|
8
|
+
* `listbox` of the filtered commands. Clicking an option runs it and closes the
|
|
9
|
+
* palette; the dialog's `close` event (e.g. Escape on a modal dialog) closes it
|
|
10
|
+
* too.
|
|
11
11
|
*/
|
|
12
12
|
function SmartCommandPaletteStandard(props) {
|
|
13
13
|
const { options, className = '' } = props;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { SmartCommandPaletteProps } from './command-palette.types';
|
|
2
2
|
import { ICommand } from '../../models';
|
|
3
3
|
/**
|
|
4
|
-
* The behaviour every command-palette variant shares
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* `onRunCommand` and closes the palette.
|
|
4
|
+
* The behaviour every command-palette variant shares: the `open` and `query`
|
|
5
|
+
* models (controlled or uncontrolled), the commands filtered by a
|
|
6
|
+
* case-insensitive label substring, and `selectCommand`, which reports the
|
|
7
|
+
* command through `onRunCommand` and closes the palette.
|
|
9
8
|
*/
|
|
10
9
|
export declare function useCommandPalette({ commands, open, defaultOpen, onOpenChange, query, defaultQuery, onQueryChange, onRunCommand, }: SmartCommandPaletteProps): {
|
|
11
10
|
open: boolean;
|
|
@@ -4,8 +4,7 @@ exports.useCommandPalette = useCommandPalette;
|
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
/**
|
|
6
6
|
* A value that is controlled when `value` is defined and kept in state
|
|
7
|
-
* otherwise; `onChange` is called only when the value actually changes
|
|
8
|
-
* an Angular `model()`.
|
|
7
|
+
* otherwise; `onChange` is called only when the value actually changes.
|
|
9
8
|
*/
|
|
10
9
|
function useModel(value, defaultValue, onChange) {
|
|
11
10
|
const [internal, setInternal] = (0, react_1.useState)(defaultValue);
|
|
@@ -21,11 +20,10 @@ function useModel(value, defaultValue, onChange) {
|
|
|
21
20
|
return [current, set];
|
|
22
21
|
}
|
|
23
22
|
/**
|
|
24
|
-
* The behaviour every command-palette variant shares
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* `onRunCommand` and closes the palette.
|
|
23
|
+
* The behaviour every command-palette variant shares: the `open` and `query`
|
|
24
|
+
* models (controlled or uncontrolled), the commands filtered by a
|
|
25
|
+
* case-insensitive label substring, and `selectCommand`, which reports the
|
|
26
|
+
* command through `onRunCommand` and closes the palette.
|
|
29
27
|
*/
|
|
30
28
|
function useCommandPalette({ commands = [], open, defaultOpen = false, onOpenChange, query, defaultQuery = '', onQueryChange, onRunCommand, }) {
|
|
31
29
|
const [currentOpen, setOpen] = useModel(open, defaultOpen, onOpenChange);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-command-palette.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/react/src/lib/components/command-palette/use-command-palette.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"use-command-palette.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/react/src/lib/components/command-palette/use-command-palette.ts"],"names":[],"mappings":";;AAqCA,8CAqCC;AA1ED,iCAAuD;AAKvD;;;GAGG;AACH,SAAS,QAAQ,CACf,KAAoB,EACpB,YAAe,EACf,QAA0C;IAE1C,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,IAAA,gBAAQ,EAAI,YAAY,CAAC,CAAC;IAC1D,MAAM,UAAU,GAAG,KAAK,KAAK,SAAS,CAAC;IACvC,MAAM,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC;IAE9C,MAAM,GAAG,GAAG,IAAA,mBAAW,EACrB,CAAC,IAAO,EAAE,EAAE;QACV,IAAI,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC;YAAE,OAAO;QAErC,IAAI,CAAC,UAAU;YAAE,WAAW,CAAC,IAAI,CAAC,CAAC;QACnC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC;IACnB,CAAC,EACD,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC,CAChC,CAAC;IAEF,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AACxB,CAAC;AAED;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAC,EAChC,QAAQ,GAAG,EAAE,EACb,IAAI,EACJ,WAAW,GAAG,KAAK,EACnB,YAAY,EACZ,KAAK,EACL,YAAY,GAAG,EAAE,EACjB,aAAa,EACb,YAAY,GACa;IACzB,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,IAAI,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;IACzE,MAAM,CAAC,YAAY,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC;IAE9E,MAAM,gBAAgB,GAAG,IAAA,eAAO,EAAa,GAAG,EAAE;QAChD,MAAM,CAAC,GAAG,YAAY,CAAC,WAAW,EAAE,CAAC;QACrC,IAAI,CAAC,CAAC;YAAE,OAAO,QAAQ,CAAC;QACxB,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IACnE,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC;IAE7B,MAAM,aAAa,GAAG,IAAA,mBAAW,EAC/B,CAAC,SAAiB,EAAE,EAAE;QACpB,YAAY,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;QAC9B,OAAO,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC,EACD,CAAC,YAAY,EAAE,OAAO,CAAC,CACxB,CAAC;IAEF,MAAM,KAAK,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAE3D,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,YAAY;QACnB,QAAQ;QACR,gBAAgB;QAChB,aAAa;QACb,KAAK;KACN,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SmartContainerProps } from './container.types';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* `
|
|
5
|
-
* `CONTAINER_STANDARD_COMPONENT_TOKEN`), `SmartContainerStandard` by default.
|
|
3
|
+
* Renders the implementation registered as `components.container` on
|
|
4
|
+
* `SmartProvider`, `SmartContainerStandard` by default.
|
|
6
5
|
*/
|
|
7
6
|
export declare function SmartContainer(props: SmartContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,9 +5,8 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const container_standard_1 = require("./standard/container-standard");
|
|
6
6
|
const hooks_1 = require("../../providers/hooks");
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* `
|
|
10
|
-
* `CONTAINER_STANDARD_COMPONENT_TOKEN`), `SmartContainerStandard` by default.
|
|
8
|
+
* Renders the implementation registered as `components.container` on
|
|
9
|
+
* `SmartProvider`, `SmartContainerStandard` by default.
|
|
11
10
|
*/
|
|
12
11
|
function SmartContainer(props) {
|
|
13
12
|
const Component = (0, hooks_1.useSmartComponent)('container', container_standard_1.SmartContainerStandard);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/react/src/lib/components/container/container.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"container.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/react/src/lib/components/container/container.tsx"],"names":[],"mappings":";;AAQA,wCAIC;;AAXD,sEAAuE;AACvE,iDAA0D;AAE1D;;;GAGG;AACH,SAAgB,cAAc,CAAC,KAA0B;IACvD,MAAM,SAAS,GAAG,IAAA,yBAAiB,EAAC,WAAW,EAAE,2CAAsB,CAAC,CAAC;IAEzE,OAAO,uBAAC,SAAS,OAAK,KAAK,GAAI,CAAC;AAClC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SmartContainerProps } from '../container.types';
|
|
2
2
|
/**
|
|
3
|
-
* The default container rendering
|
|
4
|
-
* `
|
|
5
|
-
*
|
|
3
|
+
* The default container rendering: a neutral `div` exposing `options.mode` /
|
|
4
|
+
* `options.padding` as `data-mode` / `data-padding` for the application's own
|
|
5
|
+
* styling.
|
|
6
6
|
*/
|
|
7
7
|
export declare function SmartContainerStandard({ options, className, children, }: SmartContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SmartContainerStandard = SmartContainerStandard;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
/**
|
|
6
|
-
* The default container rendering
|
|
7
|
-
* `
|
|
8
|
-
*
|
|
6
|
+
* The default container rendering: a neutral `div` exposing `options.mode` /
|
|
7
|
+
* `options.padding` as `data-mode` / `data-padding` for the application's own
|
|
8
|
+
* styling.
|
|
9
9
|
*/
|
|
10
10
|
function SmartContainerStandard({ options, className, children, }) {
|
|
11
11
|
return ((0, jsx_runtime_1.jsx)("div", { className: className || undefined, "data-mode": options?.mode, "data-padding": options?.padding, children: children }));
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { SmartDateEditProps } from './date-edit.types';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* pass a form `control` (the Angular `[formControl]`).
|
|
3
|
+
* The date editor in the `variant` rendering (`standard`, eight digit inputs,
|
|
4
|
+
* by default; or `preset`, a calendar popover). Bind it with `value` +
|
|
5
|
+
* `onValueChange`, or pass a form `control`.
|
|
7
6
|
*/
|
|
8
7
|
export declare function SmartDateEdit({ control, ...props }: SmartDateEditProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -17,9 +17,9 @@ function SmartDateEditVariant({ variant = 'standard', ...props }) {
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
20
|
+
* Binds the editor to a form control: the control's value is shown; an edit
|
|
21
|
+
* (even an invalid date) sets the value and marks the control dirty and
|
|
22
|
+
* touched.
|
|
23
23
|
*/
|
|
24
24
|
function SmartDateEditBound({ control, onValueChange, ...props }) {
|
|
25
25
|
const binding = (0, forms_1.useControlBinding)(control);
|
|
@@ -32,10 +32,9 @@ function SmartDateEditBound({ control, onValueChange, ...props }) {
|
|
|
32
32
|
return ((0, jsx_runtime_1.jsx)(SmartDateEditVariant, { ...props, value: binding.value ?? null, onValueChange: onInnerChange }));
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* pass a form `control` (the Angular `[formControl]`).
|
|
35
|
+
* The date editor in the `variant` rendering (`standard`, eight digit inputs,
|
|
36
|
+
* by default; or `preset`, a calendar popover). Bind it with `value` +
|
|
37
|
+
* `onValueChange`, or pass a form `control`.
|
|
39
38
|
*/
|
|
40
39
|
function SmartDateEdit({ control, ...props }) {
|
|
41
40
|
if (control)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-edit.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/react/src/lib/components/date-edit/date-edit.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"date-edit.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/react/src/lib/components/date-edit/date-edit.tsx"],"names":[],"mappings":";;AA6DA,sCAIC;;AAjED,iCAAoC;AAGpC,gEAAgE;AAChE,sEAAsE;AACtE,uCAAsE;AAMtE,SAAS,oBAAoB,CAAC,EAC5B,OAAO,GAAG,UAAU,EACpB,GAAG,KAAK,EAC4B;IACpC,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,UAAU;YACb,OAAO,uBAAC,0CAAqB,OAAK,KAAK,GAAI,CAAC;QAC9C,KAAK,QAAQ;YACX,OAAO,uBAAC,sCAAmB,OAAK,KAAK,GAAI,CAAC;QAC5C;YACE,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAS,kBAAkB,CAAC,EAC1B,OAAO,EACP,aAAa,EACb,GAAG,KAAK,EACgB;IACxB,MAAM,OAAO,GAAG,IAAA,yBAAiB,EAAC,OAAO,CAAC,CAAC;IAC3C,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAErC,MAAM,aAAa,GAAG,IAAA,mBAAW,EAC/B,CAAC,KAAa,EAAE,EAAE;QAChB,QAAQ,CAAC,KAAK,CAAC,CAAC;QAChB,MAAM,EAAE,CAAC;QACT,aAAa,EAAE,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC,EACD,CAAC,QAAQ,EAAE,MAAM,EAAE,aAAa,CAAC,CAClC,CAAC;IAEF,OAAO,CACL,uBAAC,oBAAoB,OACf,KAAK,EACT,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,IAAI,EAC5B,aAAa,EAAE,aAAa,GAC5B,CACH,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,SAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,GAAG,KAAK,EAAsB;IACrE,IAAI,OAAO;QAAE,OAAO,uBAAC,kBAAkB,OAAK,KAAK,EAAE,OAAO,EAAE,OAAO,GAAI,CAAC;IAExE,OAAO,uBAAC,oBAAoB,OAAK,KAAK,GAAI,CAAC;AAC7C,CAAC"}
|
|
@@ -1,31 +1,29 @@
|
|
|
1
1
|
import { SmartAbstractControl } from '../../forms';
|
|
2
2
|
export type DateEditVariantName = 'standard' | 'preset';
|
|
3
3
|
/**
|
|
4
|
-
* Props of the date-edit variants
|
|
5
|
-
* `
|
|
4
|
+
* Props of the date-edit variants: the date as a controlled `value` +
|
|
5
|
+
* `onValueChange` pair, or kept internally from `defaultValue`.
|
|
6
6
|
*/
|
|
7
7
|
export interface SmartDateEditVariantProps {
|
|
8
8
|
/**
|
|
9
|
-
* The date as `YYYY-MM-DD
|
|
10
|
-
*
|
|
11
|
-
* controlled value.
|
|
9
|
+
* The date as `YYYY-MM-DD`. `undefined` leaves the component uncontrolled,
|
|
10
|
+
* starting from `defaultValue`; `null` is an empty controlled value.
|
|
12
11
|
*/
|
|
13
12
|
value?: string | null;
|
|
14
|
-
/** The initial value when uncontrolled
|
|
13
|
+
/** The initial value when uncontrolled. */
|
|
15
14
|
defaultValue?: string | null;
|
|
16
|
-
/** Emits the edited date, even an invalid one
|
|
15
|
+
/** Emits the edited date, even an invalid one. */
|
|
17
16
|
onValueChange?: (value: string) => void;
|
|
18
|
-
/** Emits whether the edited date is valid
|
|
17
|
+
/** Emits whether the edited date is valid. */
|
|
19
18
|
onValidChange?: (valid: boolean) => void;
|
|
20
19
|
className?: string;
|
|
21
20
|
}
|
|
22
|
-
/** Props of `<SmartDateEdit
|
|
21
|
+
/** Props of `<SmartDateEdit>`. */
|
|
23
22
|
export interface SmartDateEditProps extends SmartDateEditVariantProps {
|
|
24
23
|
variant?: DateEditVariantName;
|
|
25
24
|
/**
|
|
26
|
-
* Binds the date to a form control
|
|
27
|
-
*
|
|
28
|
-
* it and marks the control dirty and touched.
|
|
25
|
+
* Binds the date to a form control: the control's value is shown, an edit
|
|
26
|
+
* sets it and marks the control dirty and touched.
|
|
29
27
|
*/
|
|
30
28
|
control?: SmartAbstractControl;
|
|
31
29
|
}
|
|
@@ -7,9 +7,8 @@ export interface DateEditDay {
|
|
|
7
7
|
selected: boolean;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* Styled date-edit variation (preset) — a Preline single datepicker
|
|
11
|
-
*
|
|
12
|
-
* `variant="preset"`, or usable directly.
|
|
10
|
+
* Styled date-edit variation (preset) — a Preline single datepicker.
|
|
11
|
+
* Rendered by `<SmartDateEdit>` for `variant="preset"`, or usable directly.
|
|
13
12
|
*
|
|
14
13
|
* A read-only trigger shows the date and toggles a calendar popover (month
|
|
15
14
|
* navigation, month / year selects, day grid); a click outside closes it.
|
|
@@ -46,24 +46,23 @@ function getWeeks(year, month, selected) {
|
|
|
46
46
|
return weeks;
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
|
-
* Styled date-edit variation (preset) — a Preline single datepicker
|
|
50
|
-
*
|
|
51
|
-
* `variant="preset"`, or usable directly.
|
|
49
|
+
* Styled date-edit variation (preset) — a Preline single datepicker.
|
|
50
|
+
* Rendered by `<SmartDateEdit>` for `variant="preset"`, or usable directly.
|
|
52
51
|
*
|
|
53
52
|
* A read-only trigger shows the date and toggles a calendar popover (month
|
|
54
53
|
* navigation, month / year selects, day grid); a click outside closes it.
|
|
55
54
|
*/
|
|
56
55
|
function SmartDateEditPreset(props) {
|
|
57
56
|
const { className, onValidChange } = props;
|
|
58
|
-
const {
|
|
57
|
+
const { value, setValue, setValidDate } = (0, use_date_edit_1.useDateEdit)(props);
|
|
59
58
|
const rootRef = (0, react_1.useRef)(null);
|
|
60
59
|
const [open, setOpen] = (0, react_1.useState)(false);
|
|
61
60
|
const [viewYear, setViewYear] = (0, react_1.useState)(() => (0, moment_1.default)(use_date_edit_1.DATE_EDIT_DEFAULT_DATE).year());
|
|
62
61
|
const [viewMonth, setViewMonth] = (0, react_1.useState)(() => (0, moment_1.default)(use_date_edit_1.DATE_EDIT_DEFAULT_DATE).month());
|
|
63
62
|
// Validity is derived from the value, so a bad value written by a parent
|
|
64
63
|
// shows at once. Picking a day always yields a valid date.
|
|
65
|
-
const isInvalid = !
|
|
66
|
-
const weeks = (0, react_1.useMemo)(() => getWeeks(viewYear, viewMonth,
|
|
64
|
+
const isInvalid = !value || !(0, moment_1.default)(value, 'YYYY-MM-DD', true).isValid();
|
|
65
|
+
const weeks = (0, react_1.useMemo)(() => getWeeks(viewYear, viewMonth, value), [viewYear, viewMonth, value]);
|
|
67
66
|
const years = [];
|
|
68
67
|
for (let y = viewYear - 10; y <= viewYear + 10; y++)
|
|
69
68
|
years.push(y);
|
|
@@ -78,7 +77,7 @@ function SmartDateEditPreset(props) {
|
|
|
78
77
|
return () => document.removeEventListener('click', onDocumentClick);
|
|
79
78
|
}, [open]);
|
|
80
79
|
const syncViewToModel = () => {
|
|
81
|
-
const parsed = (0, moment_1.default)(
|
|
80
|
+
const parsed = (0, moment_1.default)(value, 'YYYY-MM-DD');
|
|
82
81
|
const base = parsed.isValid() ? parsed : (0, moment_1.default)();
|
|
83
82
|
setViewYear(base.year());
|
|
84
83
|
setViewMonth(base.month());
|
|
@@ -96,14 +95,13 @@ function SmartDateEditPreset(props) {
|
|
|
96
95
|
const nextMonth = () => showMonth((0, moment_1.default)([viewYear, viewMonth, 1]).add(1, 'month'));
|
|
97
96
|
const selectDay = (day) => {
|
|
98
97
|
const date = (0, moment_1.default)(day.date, 'YYYY-MM-DD');
|
|
99
|
-
const value = date.format('YYYY-MM-DD');
|
|
100
98
|
const valid = date.isValid();
|
|
101
|
-
|
|
99
|
+
setValue(date.format('YYYY-MM-DD'));
|
|
102
100
|
setValidDate(valid);
|
|
103
101
|
showMonth(date);
|
|
104
102
|
onValidChange?.(valid);
|
|
105
103
|
setOpen(false);
|
|
106
104
|
};
|
|
107
|
-
return ((0, jsx_runtime_1.jsxs)("div", { ref: rootRef, className: (0, class_names_1.cn)(preset_classes_1.DATE_EDIT_TRIGGER_WRAPPER, className), children: [(0, jsx_runtime_1.jsx)("span", { className: preset_classes_1.DATE_EDIT_TRIGGER_ICON, children: (0, jsx_runtime_1.jsxs)("svg", { className: "smart:shrink-0 smart:size-4", xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [(0, jsx_runtime_1.jsx)("path", { d: "M8 2v4" }), (0, jsx_runtime_1.jsx)("path", { d: "M16 2v4" }), (0, jsx_runtime_1.jsx)("rect", { width: "18", height: "18", x: "3", y: "4", rx: "2" }), (0, jsx_runtime_1.jsx)("path", { d: "M3 10h18" })] }) }), (0, jsx_runtime_1.jsx)("input", { type: "text", readOnly: true, value:
|
|
105
|
+
return ((0, jsx_runtime_1.jsxs)("div", { ref: rootRef, className: (0, class_names_1.cn)(preset_classes_1.DATE_EDIT_TRIGGER_WRAPPER, className), children: [(0, jsx_runtime_1.jsx)("span", { className: preset_classes_1.DATE_EDIT_TRIGGER_ICON, children: (0, jsx_runtime_1.jsxs)("svg", { className: "smart:shrink-0 smart:size-4", xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [(0, jsx_runtime_1.jsx)("path", { d: "M8 2v4" }), (0, jsx_runtime_1.jsx)("path", { d: "M16 2v4" }), (0, jsx_runtime_1.jsx)("rect", { width: "18", height: "18", x: "3", y: "4", rx: "2" }), (0, jsx_runtime_1.jsx)("path", { d: "M3 10h18" })] }) }), (0, jsx_runtime_1.jsx)("input", { type: "text", readOnly: true, value: value ?? '', className: (0, class_names_1.cn)(preset_classes_1.DATE_EDIT_TRIGGER_INPUT, isInvalid && preset_classes_1.DATE_EDIT_TRIGGER_INVALID), onClick: toggleOpen, "aria-label": "Open date picker", "aria-expanded": open }), open && ((0, jsx_runtime_1.jsx)("div", { className: preset_classes_1.DATE_EDIT_POPOVER, role: "dialog", "aria-label": "Choose date", children: (0, jsx_runtime_1.jsxs)("div", { className: "smart:p-3 smart:space-y-0.5", children: [(0, jsx_runtime_1.jsxs)("div", { className: "smart:grid smart:grid-cols-5 smart:items-center smart:gap-x-3 smart:mx-1.5 smart:pb-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "smart:col-span-1", children: (0, jsx_runtime_1.jsx)("button", { type: "button", className: preset_classes_1.DATE_EDIT_NAV_BUTTON, "aria-label": "Previous", onClick: prevMonth, children: (0, jsx_runtime_1.jsx)("svg", { className: "smart:shrink-0 smart:size-4", xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: (0, jsx_runtime_1.jsx)("path", { d: "m15 18-6-6 6-6" }) }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "smart:col-span-3 smart:flex smart:justify-center smart:items-center smart:gap-x-1", children: [(0, jsx_runtime_1.jsx)("select", { className: preset_classes_1.DATE_EDIT_SELECT, "aria-label": "Select month", value: viewMonth, onChange: (event) => setViewMonth(Number(event.target.value)), children: MONTHS.map((month, index) => ((0, jsx_runtime_1.jsx)("option", { value: index, children: month }, index))) }), (0, jsx_runtime_1.jsx)("span", { className: "smart:text-gray-900 smart:dark:text-white", children: "/" }), (0, jsx_runtime_1.jsx)("select", { className: preset_classes_1.DATE_EDIT_SELECT, "aria-label": "Select year", value: viewYear, onChange: (event) => setViewYear(Number(event.target.value)), children: years.map((year) => ((0, jsx_runtime_1.jsx)("option", { value: year, children: year }, year))) })] }), (0, jsx_runtime_1.jsx)("div", { className: "smart:col-span-1 smart:flex smart:justify-end", children: (0, jsx_runtime_1.jsx)("button", { type: "button", className: preset_classes_1.DATE_EDIT_NAV_BUTTON, "aria-label": "Next", onClick: nextMonth, children: (0, jsx_runtime_1.jsx)("svg", { className: "smart:shrink-0 smart:size-4", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: (0, jsx_runtime_1.jsx)("path", { d: "m9 18 6-6-6-6" }) }) }) })] }), (0, jsx_runtime_1.jsx)("div", { className: "smart:flex smart:pb-1.5", children: WEEKDAYS.map((weekday) => ((0, jsx_runtime_1.jsx)("span", { className: preset_classes_1.DATE_EDIT_WEEKDAY, children: weekday }, weekday))) }), weeks.map((week, index) => ((0, jsx_runtime_1.jsx)("div", { className: "smart:flex", children: week.map((day) => ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("button", { type: "button", "data-role": "day", className: (0, preset_classes_1.getDateEditDayClasses)(day.selected, day.inMonth), "aria-pressed": day.selected, onClick: () => selectDay(day), children: day.day }) }, day.date))) }, index)))] }) }))] }));
|
|
108
106
|
}
|
|
109
107
|
//# sourceMappingURL=date-edit-preset.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-edit-preset.js","sourceRoot":"","sources":["../../../../../../../../../packages/shared/react/src/lib/components/date-edit/preset/date-edit-preset.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"date-edit-preset.js","sourceRoot":"","sources":["../../../../../../../../../packages/shared/react/src/lib/components/date-edit/preset/date-edit-preset.tsx"],"names":[],"mappings":";;AA8EA,kDAkOC;;;AAhTD,4DAA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CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACjB,0CACE,mCACE,IAAI,EAAC,QAAQ,eACH,KAAK,EACf,SAAS,EAAE,IAAA,sCAAqB,EAC9B,GAAG,CAAC,QAAQ,EACZ,GAAG,CAAC,OAAO,CACZ,kBACa,GAAG,CAAC,QAAQ,EAC1B,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,YAE5B,GAAG,CAAC,GAAG,GACD,IAZD,GAAG,CAAC,IAAI,CAaZ,CACP,CAAC,IAhBM,KAAK,CAiBT,CACP,CAAC,IACE,GACF,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SmartDateEditVariantProps } from '../date-edit.types';
|
|
2
2
|
/**
|
|
3
|
-
* The default date-edit rendering
|
|
4
|
-
*
|
|
5
|
-
* next input.
|
|
3
|
+
* The default date-edit rendering: eight single-digit inputs spelling
|
|
4
|
+
* DD-MM-RRRR. A digit moves the focus to the next input.
|
|
6
5
|
*/
|
|
7
6
|
export declare function SmartDateEditStandard(props: SmartDateEditVariantProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,7 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const class_names_1 = require("../../../utils/class-names");
|
|
7
7
|
const use_date_edit_1 = require("../use-date-edit");
|
|
8
|
-
/**
|
|
8
|
+
/** The number in a digit input: an emptied input is `null`. */
|
|
9
9
|
function toNumber(value) {
|
|
10
10
|
return value === '' ? null : parseFloat(value);
|
|
11
11
|
}
|
|
@@ -16,9 +16,8 @@ function DigitLabel({ validDate, children, }) {
|
|
|
16
16
|
return ((0, jsx_runtime_1.jsx)("span", { className: (0, class_names_1.cn)('smart:text-xs smart:text-gray-400 smart:dark:text-gray-500', !validDate && 'smart:text-red-500'), children: children }));
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* The default date-edit rendering
|
|
20
|
-
*
|
|
21
|
-
* next input.
|
|
19
|
+
* The default date-edit rendering: eight single-digit inputs spelling
|
|
20
|
+
* DD-MM-RRRR. A digit moves the focus to the next input.
|
|
22
21
|
*/
|
|
23
22
|
function SmartDateEditStandard(props) {
|
|
24
23
|
const { className } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-edit-standard.js","sourceRoot":"","sources":["../../../../../../../../../packages/shared/react/src/lib/components/date-edit/standard/date-edit-standard.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"date-edit-standard.js","sourceRoot":"","sources":["../../../../../../../../../packages/shared/react/src/lib/components/date-edit/standard/date-edit-standard.tsx"],"names":[],"mappings":";;AAwEA,sDA4HC;;AApMD,iCAA+B;AAG/B,4DAAgD;AAEhD,oDAA+C;AAE/C,+DAA+D;AAC/D,SAAS,QAAQ,CAAC,KAAa;IAC7B,OAAO,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AACjD,CAAC;AAWD,SAAS,UAAU,CAAC,EAClB,KAAK,EACL,SAAS,EACT,QAAQ,EACR,aAAa,EACb,OAAO,EACP,OAAO,GACS;IAChB,OAAO,CACL,kCACE,GAAG,EAAE,QAAQ,EACb,IAAI,EAAC,QAAQ,EACb,GAAG,EAAC,GAAG,EACP,GAAG,EAAC,GAAG,EACP,SAAS,EAAE,CAAC,EACZ,KAAK,EAAE,KAAK,IAAI,EAAE,EAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAChE,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,IAAA,gBAAE,EACX,qSAAqS,EACrS,CAAC,SAAS,IAAI,sBAAsB,EACpC,CAAC,SAAS,IAAI,oBAAoB,CACnC,GACD,CACH,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GAAG,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC,EAC1C,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,EACxC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC,OAAO,CAAC,GACpD,EACF,uBAAC,UAAU,IACT,KAAK,EAAE,EAAE,EACT,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,SAAS,EACnB,aAAa,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC,EAC1C,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,EACxC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,GACxC,IACE,EACN,uBAAC,UAAU,IAAC,SAAS,EAAE,SAAS,qBAAmB,IAC/C,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -13,13 +13,12 @@ declare function select(el: HTMLInputElement | null): void;
|
|
|
13
13
|
*/
|
|
14
14
|
declare function moveTo(event: KeyboardEvent<HTMLInputElement>, el: HTMLInputElement | null): void;
|
|
15
15
|
/**
|
|
16
|
-
* The behaviour every date-edit variant shares
|
|
17
|
-
*
|
|
18
|
-
* the validity of the edited date.
|
|
16
|
+
* The behaviour every date-edit variant shares: the `YYYY-MM-DD` value, its
|
|
17
|
+
* single digits and the validity of the edited date.
|
|
19
18
|
*/
|
|
20
19
|
export declare function useDateEdit({ value, defaultValue, onValueChange, onValidChange, }: SmartDateEditVariantProps): {
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
value: string | null;
|
|
21
|
+
setValue: (next: string) => void;
|
|
23
22
|
validDate: boolean;
|
|
24
23
|
setValidDate: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
25
24
|
setValueAt: (val: string | number | null, index: number) => void;
|
|
@@ -12,25 +12,25 @@ function setCharAt(str, index, chr) {
|
|
|
12
12
|
return str.substring(0, index) + chr + str.substring(index + 1);
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* The
|
|
16
|
-
*
|
|
17
|
-
*
|
|
15
|
+
* The date value: controlled while `value` is defined, otherwise kept here.
|
|
16
|
+
* A new `value` from the parent always wins, so resetting the parent's state
|
|
17
|
+
* to `undefined` also clears the date.
|
|
18
18
|
*/
|
|
19
|
-
function
|
|
19
|
+
function useControllableValue(value, defaultValue, onValueChange) {
|
|
20
20
|
const [innerValue, setInnerValue] = (0, react_1.useState)(value === undefined ? defaultValue : value);
|
|
21
21
|
const [prevValue, setPrevValue] = (0, react_1.useState)(value);
|
|
22
22
|
if (prevValue !== value) {
|
|
23
23
|
setPrevValue(value);
|
|
24
24
|
setInnerValue(value);
|
|
25
25
|
}
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
if (next ===
|
|
26
|
+
const currentValue = value === undefined ? innerValue : value;
|
|
27
|
+
const setValue = (0, react_1.useCallback)((next) => {
|
|
28
|
+
if (next === currentValue)
|
|
29
29
|
return;
|
|
30
30
|
setInnerValue(next);
|
|
31
31
|
onValueChange?.(next);
|
|
32
|
-
}, [
|
|
33
|
-
return [
|
|
32
|
+
}, [currentValue, onValueChange]);
|
|
33
|
+
return [currentValue ?? null, setValue];
|
|
34
34
|
}
|
|
35
35
|
const DIGIT_KEYS = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
|
|
36
36
|
/**
|
|
@@ -68,14 +68,13 @@ function moveTo(event, el) {
|
|
|
68
68
|
select(el);
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
71
|
-
* The behaviour every date-edit variant shares
|
|
72
|
-
*
|
|
73
|
-
* the validity of the edited date.
|
|
71
|
+
* The behaviour every date-edit variant shares: the `YYYY-MM-DD` value, its
|
|
72
|
+
* single digits and the validity of the edited date.
|
|
74
73
|
*/
|
|
75
74
|
function useDateEdit({ value, defaultValue = exports.DATE_EDIT_DEFAULT_DATE, onValueChange, onValidChange, }) {
|
|
76
|
-
const [
|
|
75
|
+
const [currentValue, setValue] = useControllableValue(value, defaultValue, onValueChange);
|
|
77
76
|
const [validDate, setValidDate] = (0, react_1.useState)(true);
|
|
78
|
-
const digitAt = (index) =>
|
|
77
|
+
const digitAt = (index) => currentValue ? currentValue[index] : null;
|
|
79
78
|
/**
|
|
80
79
|
* Replaces the digit at `index` with the first digit of `val` (`null`, an
|
|
81
80
|
* emptied input, is ignored). An empty model starts from 2001-01-01.
|
|
@@ -84,18 +83,18 @@ function useDateEdit({ value, defaultValue = exports.DATE_EDIT_DEFAULT_DATE, onV
|
|
|
84
83
|
if (val === null)
|
|
85
84
|
return;
|
|
86
85
|
const digit = Number(val.toString().substring(0, 1));
|
|
87
|
-
let next =
|
|
86
|
+
let next = currentValue;
|
|
88
87
|
if (!next || digit > 9 || digit < 0)
|
|
89
88
|
next = exports.DATE_EDIT_DEFAULT_DATE;
|
|
90
89
|
next = setCharAt(next, index, digit);
|
|
91
90
|
const valid = (0, moment_1.default)(next).isValid();
|
|
92
91
|
setValidDate(valid);
|
|
93
|
-
|
|
92
|
+
setValue(next);
|
|
94
93
|
onValidChange?.(valid);
|
|
95
|
-
}, [
|
|
94
|
+
}, [currentValue, setValue, onValidChange]);
|
|
96
95
|
return {
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
value: currentValue,
|
|
97
|
+
setValue,
|
|
99
98
|
validDate,
|
|
100
99
|
setValidDate,
|
|
101
100
|
setValueAt,
|