@byline/ui 0.9.3 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/components/admin-account/change-password.js +1 -1
- package/dist/admin/components/admin-account/container.js +1 -1
- package/dist/admin/components/admin-account/update.js +1 -1
- package/dist/admin/components/admin-permissions/inspector.js +1 -1
- package/dist/admin/components/admin-roles/create.js +1 -1
- package/dist/admin/components/admin-roles/permissions.js +1 -1
- package/dist/admin/components/admin-roles/update.js +1 -1
- package/dist/admin/components/admin-users/create.js +1 -1
- package/dist/admin/components/admin-users/roles.js +1 -1
- package/dist/admin/components/admin-users/set-password.js +1 -1
- package/dist/admin/components/admin-users/update.js +1 -1
- package/dist/admin/components/auth/sign-in-form.js +1 -1
- package/dist/admin/components/collections/diff-modal.js +1 -1
- package/dist/admin/components/collections/status-badge.js +1 -1
- package/dist/admin/tabs.js +1 -1
- package/dist/admin.d.ts +24 -0
- package/dist/admin.d.ts.map +1 -0
- package/dist/admin.js +18 -0
- package/dist/components/@types/shared.d.ts +61 -0
- package/dist/components/@types/shared.d.ts.map +1 -0
- package/dist/components/@types/shared.js +30 -0
- package/dist/components/accordion/accordion.d.ts +32 -0
- package/dist/components/accordion/accordion.d.ts.map +1 -0
- package/dist/components/accordion/accordion.js +51 -0
- package/dist/components/accordion/accordion.module.js +10 -0
- package/dist/components/accordion/accordion_module.css +53 -0
- package/dist/components/animation/fade-in-lift.d.ts +12 -0
- package/dist/components/animation/fade-in-lift.d.ts.map +1 -0
- package/dist/components/animation/fade-in-lift.js +27 -0
- package/dist/components/avatar/avatar.d.ts +5 -0
- package/dist/components/avatar/avatar.d.ts.map +1 -0
- package/dist/components/avatar/avatar.js +25 -0
- package/dist/components/avatar/avatar.module.js +12 -0
- package/dist/components/avatar/avatar_module.css +36 -0
- package/dist/components/badge/badge.d.ts +13 -0
- package/dist/components/badge/badge.d.ts.map +1 -0
- package/dist/components/badge/badge.js +18 -0
- package/dist/components/badge/badge.module.js +12 -0
- package/dist/components/badge/badge_module.css +51 -0
- package/dist/components/button/@types/button.d.ts +41 -0
- package/dist/components/button/@types/button.d.ts.map +1 -0
- package/dist/components/button/@types/button.js +8 -0
- package/dist/components/button/button-group.d.ts +39 -0
- package/dist/components/button/button-group.d.ts.map +1 -0
- package/dist/components/button/button-group.js +71 -0
- package/dist/components/button/button-group.module.js +6 -0
- package/dist/components/button/button-group_module.css +17 -0
- package/dist/components/button/button.d.ts +16 -0
- package/dist/components/button/button.d.ts.map +1 -0
- package/dist/components/button/button.js +29 -0
- package/dist/components/button/button.module.js +26 -0
- package/dist/components/button/button_module.css +382 -0
- package/dist/components/button/combo-button.d.ts +21 -0
- package/dist/components/button/combo-button.d.ts.map +1 -0
- package/dist/components/button/combo-button.js +54 -0
- package/dist/components/button/combo-button.module.js +12 -0
- package/dist/components/button/combo-button_module.css +52 -0
- package/dist/components/button/control-buttons.d.ts +17 -0
- package/dist/components/button/control-buttons.d.ts.map +1 -0
- package/dist/components/button/control-buttons.js +88 -0
- package/dist/components/button/control-buttons.module.js +20 -0
- package/dist/components/button/control-buttons_module.css +109 -0
- package/dist/components/button/copy-button.d.ts +12 -0
- package/dist/components/button/copy-button.d.ts.map +1 -0
- package/dist/components/button/copy-button.js +71 -0
- package/dist/components/button/copy-button.module.js +13 -0
- package/dist/components/button/copy-button_module.css +49 -0
- package/dist/components/button/icon-button.d.ts +8 -0
- package/dist/components/button/icon-button.d.ts.map +1 -0
- package/dist/components/button/icon-button.js +18 -0
- package/dist/components/button/index.d.ts +6 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/components/button/index.js +5 -0
- package/dist/components/card/card.d.ts +37 -0
- package/dist/components/card/card.d.ts.map +1 -0
- package/dist/components/card/card.js +56 -0
- package/dist/components/card/card.module.js +17 -0
- package/dist/components/card/card_module.css +62 -0
- package/dist/components/chips/@types/chip.d.ts +26 -0
- package/dist/components/chips/@types/chip.d.ts.map +1 -0
- package/dist/components/chips/@types/chip.js +7 -0
- package/dist/components/chips/chip.d.ts +26 -0
- package/dist/components/chips/chip.d.ts.map +1 -0
- package/dist/components/chips/chip.js +102 -0
- package/dist/components/chips/chip.module.js +27 -0
- package/dist/components/chips/chip_module.css +315 -0
- package/dist/components/chips/index.js +2 -0
- package/dist/components/container/container.d.ts +9 -0
- package/dist/components/container/container.d.ts.map +1 -0
- package/dist/components/container/container.js +12 -0
- package/dist/components/container/container.module.js +5 -0
- package/dist/components/container/container_module.css +29 -0
- package/dist/components/dropdown/dropdown.d.ts +74 -0
- package/dist/components/dropdown/dropdown.d.ts.map +1 -0
- package/dist/components/dropdown/dropdown.js +106 -0
- package/dist/components/dropdown/dropdown.module.js +16 -0
- package/dist/components/dropdown/dropdown_module.css +111 -0
- package/dist/components/hamburger/hamburger.d.ts +13 -0
- package/dist/components/hamburger/hamburger.d.ts.map +1 -0
- package/dist/components/hamburger/hamburger.js +46 -0
- package/dist/components/hamburger/hamburger.module.js +10 -0
- package/dist/components/hamburger/hamburger_module.css +169 -0
- package/dist/components/inputs/@types/autocomplete.d.ts +35 -0
- package/dist/components/inputs/@types/autocomplete.d.ts.map +1 -0
- package/dist/components/inputs/@types/autocomplete.js +11 -0
- package/dist/components/inputs/@types/checkbox.d.ts +40 -0
- package/dist/components/inputs/@types/checkbox.d.ts.map +1 -0
- package/dist/components/inputs/@types/checkbox.js +10 -0
- package/dist/components/inputs/@types/input.d.ts +41 -0
- package/dist/components/inputs/@types/input.d.ts.map +1 -0
- package/dist/components/inputs/@types/input.js +11 -0
- package/dist/components/inputs/autocomplete.d.ts +42 -0
- package/dist/components/inputs/autocomplete.d.ts.map +1 -0
- package/dist/components/inputs/autocomplete.js +87 -0
- package/dist/components/inputs/autocomplete.module.js +36 -0
- package/dist/components/inputs/autocomplete_module.css +312 -0
- package/dist/components/inputs/calendar.d.ts +38 -0
- package/dist/components/inputs/calendar.d.ts.map +1 -0
- package/dist/components/inputs/calendar.js +131 -0
- package/dist/components/inputs/calendar.module.js +45 -0
- package/dist/components/inputs/calendar_module.css +223 -0
- package/dist/components/inputs/checkbox-group.d.ts +16 -0
- package/dist/components/inputs/checkbox-group.d.ts.map +1 -0
- package/dist/components/inputs/checkbox-group.js +45 -0
- package/dist/components/inputs/checkbox-group.module.js +6 -0
- package/dist/components/inputs/checkbox-group_module.css +10 -0
- package/dist/components/inputs/checkbox.d.ts +29 -0
- package/dist/components/inputs/checkbox.d.ts.map +1 -0
- package/dist/components/inputs/checkbox.js +54 -0
- package/dist/components/inputs/checkbox.module.js +25 -0
- package/dist/components/inputs/checkbox_module.css +216 -0
- package/dist/components/inputs/error-text.d.ts +10 -0
- package/dist/components/inputs/error-text.d.ts.map +1 -0
- package/dist/components/inputs/error-text.js +11 -0
- package/dist/components/inputs/error-text.module.js +8 -0
- package/dist/components/inputs/error-text_module.css +21 -0
- package/dist/components/inputs/errors.d.ts +14 -0
- package/dist/components/inputs/errors.d.ts.map +1 -0
- package/dist/components/inputs/errors.js +30 -0
- package/dist/components/inputs/help-text.d.ts +9 -0
- package/dist/components/inputs/help-text.d.ts.map +1 -0
- package/dist/components/inputs/help-text.js +10 -0
- package/dist/components/inputs/help-text.module.js +8 -0
- package/dist/components/inputs/help-text_module.css +21 -0
- package/dist/components/inputs/index.js +9 -0
- package/dist/components/inputs/input-adornment.d.ts +11 -0
- package/dist/components/inputs/input-adornment.d.ts.map +1 -0
- package/dist/components/inputs/input-adornment.js +15 -0
- package/dist/components/inputs/input-adornment.module.js +7 -0
- package/dist/components/inputs/input-adornment_module.css +19 -0
- package/dist/components/inputs/input-password.d.ts +3 -0
- package/dist/components/inputs/input-password.d.ts.map +1 -0
- package/dist/components/inputs/input-password.js +22 -0
- package/dist/components/inputs/input.d.ts +25 -0
- package/dist/components/inputs/input.d.ts.map +1 -0
- package/dist/components/inputs/input.js +62 -0
- package/dist/components/inputs/input.module.js +34 -0
- package/dist/components/inputs/input_module.css +259 -0
- package/dist/components/inputs/label.d.ts +11 -0
- package/dist/components/inputs/label.d.ts.map +1 -0
- package/dist/components/inputs/label.js +18 -0
- package/dist/components/inputs/label.module.js +6 -0
- package/dist/components/inputs/label_module.css +14 -0
- package/dist/components/inputs/radio-group.d.ts +24 -0
- package/dist/components/inputs/radio-group.d.ts.map +1 -0
- package/dist/components/inputs/radio-group.js +37 -0
- package/dist/components/inputs/radio-group.module.js +20 -0
- package/dist/components/inputs/radio-group_module.css +160 -0
- package/dist/components/inputs/select.d.ts +33 -0
- package/dist/components/inputs/select.d.ts.map +1 -0
- package/dist/components/inputs/select.js +87 -0
- package/dist/components/inputs/select.module.js +23 -0
- package/dist/components/inputs/select_module.css +141 -0
- package/dist/components/inputs/text-area.d.ts +20 -0
- package/dist/components/inputs/text-area.d.ts.map +1 -0
- package/dist/components/inputs/text-area.js +45 -0
- package/dist/components/inputs/text-area.module.js +7 -0
- package/dist/components/inputs/text-area_module.css +19 -0
- package/dist/components/inputs/utils.d.ts +3 -0
- package/dist/components/inputs/utils.d.ts.map +1 -0
- package/dist/components/inputs/utils.js +10 -0
- package/dist/components/notifications/@types/alert.d.ts +21 -0
- package/dist/components/notifications/@types/alert.d.ts.map +1 -0
- package/dist/components/notifications/@types/alert.js +1 -0
- package/dist/components/notifications/@types/toast.d.ts +46 -0
- package/dist/components/notifications/@types/toast.d.ts.map +1 -0
- package/dist/components/notifications/@types/toast.js +1 -0
- package/dist/components/notifications/alert.d.ts +14 -0
- package/dist/components/notifications/alert.d.ts.map +1 -0
- package/dist/components/notifications/alert.js +99 -0
- package/dist/components/notifications/alert.module.js +20 -0
- package/dist/components/notifications/alert_module.css +119 -0
- package/dist/components/notifications/index.js +2 -0
- package/dist/components/notifications/toast.d.ts +17 -0
- package/dist/components/notifications/toast.d.ts.map +1 -0
- package/dist/components/notifications/toast.js +98 -0
- package/dist/components/notifications/toast.module.js +20 -0
- package/dist/components/notifications/toast_module.css +212 -0
- package/dist/components/pager/@types/index.d.ts +15 -0
- package/dist/components/pager/@types/index.d.ts.map +1 -0
- package/dist/components/pager/@types/index.js +6 -0
- package/dist/components/pager/ellipses.d.ts +3 -0
- package/dist/components/pager/ellipses.d.ts.map +1 -0
- package/dist/components/pager/ellipses.js +16 -0
- package/dist/components/pager/event-pager.js +15 -0
- package/dist/components/pager/first-button.d.ts +9 -0
- package/dist/components/pager/first-button.d.ts.map +1 -0
- package/dist/components/pager/first-button.js +38 -0
- package/dist/components/pager/hooks/types/usePagination.d.ts +75 -0
- package/dist/components/pager/hooks/types/usePagination.d.ts.map +1 -0
- package/dist/components/pager/hooks/types/usePagination.js +1 -0
- package/dist/components/pager/hooks/usePagination.d.ts +3 -0
- package/dist/components/pager/hooks/usePagination.d.ts.map +1 -0
- package/dist/components/pager/hooks/usePagination.js +80 -0
- package/dist/components/pager/icons/first.js +36 -0
- package/dist/components/pager/icons/index.js +4 -0
- package/dist/components/pager/icons/last.js +36 -0
- package/dist/components/pager/icons/next.js +24 -0
- package/dist/components/pager/icons/previous.js +24 -0
- package/dist/components/pager/index.js +4 -0
- package/dist/components/pager/last-button.d.ts +12 -0
- package/dist/components/pager/last-button.d.ts.map +1 -0
- package/dist/components/pager/last-button.js +38 -0
- package/dist/components/pager/next-button.d.ts +12 -0
- package/dist/components/pager/next-button.d.ts.map +1 -0
- package/dist/components/pager/next-button.js +42 -0
- package/dist/components/pager/number-button.d.ts +14 -0
- package/dist/components/pager/number-button.d.ts.map +1 -0
- package/dist/components/pager/number-button.js +45 -0
- package/dist/components/pager/pagination.d.ts +99 -0
- package/dist/components/pager/pagination.d.ts.map +1 -0
- package/dist/components/pager/pagination.js +134 -0
- package/dist/components/pager/pagination.module.js +29 -0
- package/dist/components/pager/pagination_module.css +103 -0
- package/dist/components/pager/previous-button.d.ts +9 -0
- package/dist/components/pager/previous-button.d.ts.map +1 -0
- package/dist/components/pager/previous-button.js +40 -0
- package/dist/components/scroll-area/scroll-area.d.ts +7 -0
- package/dist/components/scroll-area/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area/scroll-area.js +34 -0
- package/dist/components/scroll-area/scroll-area.module.js +9 -0
- package/dist/components/scroll-area/scroll-area_module.css +63 -0
- package/dist/components/scroll-to-top/scroll-to-top.d.ts +15 -0
- package/dist/components/scroll-to-top/scroll-to-top.d.ts.map +1 -0
- package/dist/components/scroll-to-top/scroll-to-top.js +67 -0
- package/dist/components/scroll-to-top/scroll-to-top.module.js +8 -0
- package/dist/components/scroll-to-top/scroll-to-top_module.css +100 -0
- package/dist/components/section/section.d.ts +9 -0
- package/dist/components/section/section.d.ts.map +1 -0
- package/dist/components/section/section.js +12 -0
- package/dist/components/section/section.module.js +5 -0
- package/dist/components/section/section_module.css +9 -0
- package/dist/components/shimmer/shimmer.d.ts +13 -0
- package/dist/components/shimmer/shimmer.d.ts.map +1 -0
- package/dist/components/shimmer/shimmer.js +41 -0
- package/dist/components/shimmer/shimmer.module.js +9 -0
- package/dist/components/shimmer/shimmer_module.css +47 -0
- package/dist/components/table/table.d.ts +37 -0
- package/dist/components/table/table.d.ts.map +1 -0
- package/dist/components/table/table.js +85 -0
- package/dist/components/table/table.module.js +19 -0
- package/dist/components/table/table_module.css +91 -0
- package/dist/components/tabs/tabs.d.ts +28 -0
- package/dist/components/tabs/tabs.d.ts.map +1 -0
- package/dist/components/tabs/tabs.js +34 -0
- package/dist/components/tabs/tabs.module.js +12 -0
- package/dist/components/tabs/tabs_module.css +56 -0
- package/dist/components/tooltip/tooltip.d.ts +14 -0
- package/dist/components/tooltip/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.js +63 -0
- package/dist/components/tooltip/tooltip.module.js +13 -0
- package/dist/components/tooltip/tooltip_module.css +73 -0
- package/dist/dnd/draggable-sortable/demo/draggable-list-demo.js +1 -1
- package/dist/dnd/draggable-sortable/draggable-sortable.d.ts +3 -3
- package/dist/dnd/draggable-sortable/draggable-sortable.d.ts.map +1 -1
- package/dist/dnd/draggable-sortable/types.d.ts +1 -1
- package/dist/dnd/draggable-sortable/types.d.ts.map +1 -1
- package/dist/fields/array/array-field.js +1 -1
- package/dist/fields/blocks/blocks-field.js +1 -1
- package/dist/fields/checkbox/checkbox-field.js +1 -1
- package/dist/fields/datetime/datetime-field.js +1 -1
- package/dist/fields/draggable-context-menu.js +1 -1
- package/dist/fields/file/file-field.js +1 -1
- package/dist/fields/group/group-field.js +1 -1
- package/dist/fields/image/image-field.js +1 -1
- package/dist/fields/numerical/numerical-field.js +1 -1
- package/dist/fields/relation/relation-field.js +1 -1
- package/dist/fields/relation/relation-picker.js +1 -1
- package/dist/fields/select/select-field.js +1 -1
- package/dist/fields/sortable-item.js +1 -1
- package/dist/fields/text/text-field.js +1 -1
- package/dist/fields/text-area/text-area-field.js +1 -1
- package/dist/fields.d.ts +28 -0
- package/dist/fields.d.ts.map +1 -0
- package/dist/fields.js +23 -0
- package/dist/forms/document-actions.js +1 -1
- package/dist/forms/form-renderer.js +1 -1
- package/dist/forms/path-widget.js +1 -1
- package/dist/forms.d.ts +10 -0
- package/dist/forms.d.ts.map +1 -0
- package/dist/forms.js +5 -0
- package/dist/hooks/use-focus-trap/index.js +1 -0
- package/dist/hooks/use-focus-trap/scope-tab.js +19 -0
- package/dist/hooks/use-focus-trap/tabbable.js +36 -0
- package/dist/hooks/use-focus-trap/use-focus-trap.js +45 -0
- package/dist/hooks/use-media-query.d.ts +2 -0
- package/dist/hooks/use-media-query.d.ts.map +1 -0
- package/dist/hooks/use-media-query.js +20 -0
- package/dist/icons/activity-icon.d.ts +7 -0
- package/dist/icons/activity-icon.d.ts.map +1 -0
- package/dist/icons/activity-icon.js +45 -0
- package/dist/icons/ai-icon.d.ts +7 -0
- package/dist/icons/ai-icon.d.ts.map +1 -0
- package/dist/icons/ai-icon.js +39 -0
- package/dist/icons/calendar-icon.d.ts +7 -0
- package/dist/icons/calendar-icon.d.ts.map +1 -0
- package/dist/icons/calendar-icon.js +26 -0
- package/dist/icons/check-icon.d.ts +7 -0
- package/dist/icons/check-icon.d.ts.map +1 -0
- package/dist/icons/check-icon.js +25 -0
- package/dist/icons/chevron-down-icon.d.ts +7 -0
- package/dist/icons/chevron-down-icon.d.ts.map +1 -0
- package/dist/icons/chevron-down-icon.js +27 -0
- package/dist/icons/chevron-left-double-icon.d.ts +27 -0
- package/dist/icons/chevron-left-double-icon.d.ts.map +1 -0
- package/dist/icons/chevron-left-double-icon.js +28 -0
- package/dist/icons/chevron-left-icon.d.ts +27 -0
- package/dist/icons/chevron-left-icon.d.ts.map +1 -0
- package/dist/icons/chevron-left-icon.js +28 -0
- package/dist/icons/chevron-right-double-icon.d.ts +27 -0
- package/dist/icons/chevron-right-double-icon.d.ts.map +1 -0
- package/dist/icons/chevron-right-double-icon.js +28 -0
- package/dist/icons/chevron-right-icon.d.ts +27 -0
- package/dist/icons/chevron-right-icon.d.ts.map +1 -0
- package/dist/icons/chevron-right-icon.js +28 -0
- package/dist/icons/chevron-up-icon.d.ts +7 -0
- package/dist/icons/chevron-up-icon.d.ts.map +1 -0
- package/dist/icons/chevron-up-icon.js +27 -0
- package/dist/icons/chevrons-up-down.d.ts +7 -0
- package/dist/icons/chevrons-up-down.d.ts.map +1 -0
- package/dist/icons/chevrons-up-down.js +34 -0
- package/dist/icons/close-icon.d.ts +7 -0
- package/dist/icons/close-icon.d.ts.map +1 -0
- package/dist/icons/close-icon.js +37 -0
- package/dist/icons/copy-icon.d.ts +7 -0
- package/dist/icons/copy-icon.d.ts.map +1 -0
- package/dist/icons/copy-icon.js +26 -0
- package/dist/icons/danger-icon.d.ts +4 -0
- package/dist/icons/danger-icon.d.ts.map +1 -0
- package/dist/icons/danger-icon.js +21 -0
- package/dist/icons/dashboard-icon.d.ts +7 -0
- package/dist/icons/dashboard-icon.d.ts.map +1 -0
- package/dist/icons/dashboard-icon.js +43 -0
- package/dist/icons/delete-icon.d.ts +7 -0
- package/dist/icons/delete-icon.d.ts.map +1 -0
- package/dist/icons/delete-icon.js +42 -0
- package/dist/icons/document-icon.d.ts +7 -0
- package/dist/icons/document-icon.d.ts.map +1 -0
- package/dist/icons/document-icon.js +36 -0
- package/dist/icons/download-icon.d.ts +7 -0
- package/dist/icons/download-icon.d.ts.map +1 -0
- package/dist/icons/download-icon.js +27 -0
- package/dist/icons/edit-icon.d.ts +7 -0
- package/dist/icons/edit-icon.d.ts.map +1 -0
- package/dist/icons/edit-icon.js +39 -0
- package/dist/icons/ellipsis-icon.d.ts +7 -0
- package/dist/icons/ellipsis-icon.d.ts.map +1 -0
- package/dist/icons/ellipsis-icon.js +40 -0
- package/dist/icons/email-icon.d.ts +7 -0
- package/dist/icons/email-icon.d.ts.map +1 -0
- package/dist/icons/email-icon.js +31 -0
- package/dist/icons/external-link-icon.d.ts +7 -0
- package/dist/icons/external-link-icon.d.ts.map +1 -0
- package/dist/icons/external-link-icon.js +27 -0
- package/dist/icons/eye-closed-icon.d.ts +7 -0
- package/dist/icons/eye-closed-icon.d.ts.map +1 -0
- package/dist/icons/eye-closed-icon.js +41 -0
- package/dist/icons/eye-open-icon.d.ts +7 -0
- package/dist/icons/eye-open-icon.d.ts.map +1 -0
- package/dist/icons/eye-open-icon.js +33 -0
- package/dist/icons/github-icon.d.ts +7 -0
- package/dist/icons/github-icon.d.ts.map +1 -0
- package/dist/icons/github-icon.js +24 -0
- package/dist/icons/globe-icon.d.ts +7 -0
- package/dist/icons/globe-icon.d.ts.map +1 -0
- package/dist/icons/globe-icon.js +44 -0
- package/dist/icons/google-icon.d.ts +7 -0
- package/dist/icons/google-icon.d.ts.map +1 -0
- package/dist/icons/google-icon.js +42 -0
- package/dist/icons/gripper-vertical-icon.d.ts +7 -0
- package/dist/icons/gripper-vertical-icon.d.ts.map +1 -0
- package/dist/icons/gripper-vertical-icon.js +49 -0
- package/dist/icons/history-icon.d.ts +7 -0
- package/dist/icons/history-icon.d.ts.map +1 -0
- package/dist/icons/history-icon.js +35 -0
- package/dist/icons/home-icon.d.ts +7 -0
- package/dist/icons/home-icon.d.ts.map +1 -0
- package/dist/icons/home-icon.js +37 -0
- package/dist/icons/icon-element.d.ts +11 -0
- package/dist/icons/icon-element.d.ts.map +1 -0
- package/dist/icons/icon-element.js +17 -0
- package/dist/icons/icon-sprite.js +15 -0
- package/dist/icons/icons.module.js +46 -0
- package/dist/icons/icons_module.css +163 -0
- package/dist/icons/index.d.ts +54 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/index.js +53 -0
- package/dist/icons/info-icon.d.ts +4 -0
- package/dist/icons/info-icon.d.ts.map +1 -0
- package/dist/icons/info-icon.js +21 -0
- package/dist/icons/infonomic-icon.d.ts +7 -0
- package/dist/icons/infonomic-icon.d.ts.map +1 -0
- package/dist/icons/infonomic-icon.js +211 -0
- package/dist/icons/light-icon.d.ts +7 -0
- package/dist/icons/light-icon.d.ts.map +1 -0
- package/dist/icons/light-icon.js +23 -0
- package/dist/icons/location-pin-icon.d.ts +7 -0
- package/dist/icons/location-pin-icon.d.ts.map +1 -0
- package/dist/icons/location-pin-icon.js +31 -0
- package/dist/icons/moon-icon.d.ts +7 -0
- package/dist/icons/moon-icon.d.ts.map +1 -0
- package/dist/icons/moon-icon.js +26 -0
- package/dist/icons/plus-icon.d.ts +7 -0
- package/dist/icons/plus-icon.d.ts.map +1 -0
- package/dist/icons/plus-icon.js +32 -0
- package/dist/icons/primary-icon.d.ts +4 -0
- package/dist/icons/primary-icon.d.ts.map +1 -0
- package/dist/icons/primary-icon.js +21 -0
- package/dist/icons/refresh-icon.d.ts +7 -0
- package/dist/icons/refresh-icon.d.ts.map +1 -0
- package/dist/icons/refresh-icon.js +31 -0
- package/dist/icons/return-icon.d.ts +7 -0
- package/dist/icons/return-icon.d.ts.map +1 -0
- package/dist/icons/return-icon.js +35 -0
- package/dist/icons/roles-icon.d.ts +7 -0
- package/dist/icons/roles-icon.d.ts.map +1 -0
- package/dist/icons/roles-icon.js +34 -0
- package/dist/icons/search-icon.d.ts +7 -0
- package/dist/icons/search-icon.d.ts.map +1 -0
- package/dist/icons/search-icon.js +23 -0
- package/dist/icons/search-menu-icon.d.ts +7 -0
- package/dist/icons/search-menu-icon.d.ts.map +1 -0
- package/dist/icons/search-menu-icon.js +42 -0
- package/dist/icons/settings-gear-icon.d.ts +7 -0
- package/dist/icons/settings-gear-icon.d.ts.map +1 -0
- package/dist/icons/settings-gear-icon.js +34 -0
- package/dist/icons/settings-sliders-icon.d.ts +7 -0
- package/dist/icons/settings-sliders-icon.d.ts.map +1 -0
- package/dist/icons/settings-sliders-icon.js +55 -0
- package/dist/icons/sign-out-icon.d.ts +7 -0
- package/dist/icons/sign-out-icon.d.ts.map +1 -0
- package/dist/icons/sign-out-icon.js +39 -0
- package/dist/icons/stop-icon.d.ts +7 -0
- package/dist/icons/stop-icon.d.ts.map +1 -0
- package/dist/icons/stop-icon.js +35 -0
- package/dist/icons/stopwatch-icon.d.ts +7 -0
- package/dist/icons/stopwatch-icon.d.ts.map +1 -0
- package/dist/icons/stopwatch-icon.js +26 -0
- package/dist/icons/success-icon.d.ts +4 -0
- package/dist/icons/success-icon.d.ts.map +1 -0
- package/dist/icons/success-icon.js +21 -0
- package/dist/icons/types/icon.d.ts +9 -0
- package/dist/icons/types/icon.d.ts.map +1 -0
- package/dist/icons/types/icon.js +1 -0
- package/dist/icons/user-icon.d.ts +7 -0
- package/dist/icons/user-icon.d.ts.map +1 -0
- package/dist/icons/user-icon.js +31 -0
- package/dist/icons/users-icon.d.ts +7 -0
- package/dist/icons/users-icon.d.ts.map +1 -0
- package/dist/icons/users-icon.js +37 -0
- package/dist/icons/wallet-icon.d.ts +7 -0
- package/dist/icons/wallet-icon.d.ts.map +1 -0
- package/dist/icons/wallet-icon.js +23 -0
- package/dist/icons/warning-icon.d.ts +4 -0
- package/dist/icons/warning-icon.d.ts.map +1 -0
- package/dist/icons/warning-icon.js +21 -0
- package/dist/icons/x-icon.d.ts +7 -0
- package/dist/icons/x-icon.d.ts.map +1 -0
- package/dist/icons/x-icon.js +25 -0
- package/dist/lib/ripple.d.ts +25 -0
- package/dist/lib/ripple.d.ts.map +1 -0
- package/dist/lib/ripple.js +53 -0
- package/dist/loaders/@types/index.d.ts +7 -0
- package/dist/loaders/@types/index.d.ts.map +1 -0
- package/dist/loaders/@types/index.js +1 -0
- package/dist/loaders/ellipses.d.ts +4 -0
- package/dist/loaders/ellipses.d.ts.map +1 -0
- package/dist/loaders/ellipses.js +22 -0
- package/dist/loaders/ellipses.module.js +14 -0
- package/dist/loaders/ellipses_module.css +73 -0
- package/dist/loaders/ring.d.ts +4 -0
- package/dist/loaders/ring.d.ts.map +1 -0
- package/dist/loaders/ring.js +22 -0
- package/dist/loaders/ring.module.js +8 -0
- package/dist/loaders/ring_module.css +49 -0
- package/dist/loaders/spinner.d.ts +4 -0
- package/dist/loaders/spinner.d.ts.map +1 -0
- package/dist/loaders/spinner.js +25 -0
- package/dist/loaders/spinner.module.js +10 -0
- package/dist/loaders/spinner_module.css +99 -0
- package/dist/react.d.ts +1 -49
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +1 -47
- package/dist/services.d.ts +10 -0
- package/dist/services.d.ts.map +1 -0
- package/dist/services.js +1 -0
- package/dist/styles/reset.css +209 -0
- package/dist/styles/styles.css +2922 -0
- package/dist/styles/typography.css +398 -0
- package/dist/uikit.d.ts +109 -0
- package/dist/uikit.d.ts.map +1 -0
- package/dist/uikit.js +104 -0
- package/dist/utils/capitalize.js +5 -0
- package/dist/utils/externalLinkProps.js +6 -0
- package/dist/utils/findMatch.js +6 -0
- package/dist/utils/getPortalRoot.js +4 -0
- package/dist/utils/isTouchDevice.js +3 -0
- package/dist/utils/objectsToArray.js +9 -0
- package/dist/utils/objectsToString.js +5 -0
- package/dist/utils/polymorphic.js +1 -0
- package/dist/utils/to-kebab-case.js +2 -0
- package/dist/widgets/datepicker/datepicker.d.ts +38 -0
- package/dist/widgets/datepicker/datepicker.d.ts.map +1 -0
- package/dist/widgets/datepicker/datepicker.js +262 -0
- package/dist/widgets/datepicker/datepicker.module.js +33 -0
- package/dist/widgets/datepicker/datepicker_module.css +188 -0
- package/dist/widgets/drawer/drawer-container.d.ts +10 -0
- package/dist/widgets/drawer/drawer-container.d.ts.map +1 -0
- package/dist/widgets/drawer/drawer-container.js +13 -0
- package/dist/widgets/drawer/drawer-content.d.ts +10 -0
- package/dist/widgets/drawer/drawer-content.d.ts.map +1 -0
- package/dist/widgets/drawer/drawer-content.js +13 -0
- package/dist/widgets/drawer/drawer-context.d.ts +14 -0
- package/dist/widgets/drawer/drawer-context.d.ts.map +1 -0
- package/dist/widgets/drawer/drawer-context.js +34 -0
- package/dist/widgets/drawer/drawer-header.d.ts +10 -0
- package/dist/widgets/drawer/drawer-header.d.ts.map +1 -0
- package/dist/widgets/drawer/drawer-header.js +17 -0
- package/dist/widgets/drawer/drawer-top-actions.d.ts +10 -0
- package/dist/widgets/drawer/drawer-top-actions.d.ts.map +1 -0
- package/dist/widgets/drawer/drawer-top-actions.js +17 -0
- package/dist/widgets/drawer/drawer.d.ts +27 -0
- package/dist/widgets/drawer/drawer.d.ts.map +1 -0
- package/dist/widgets/drawer/drawer.js +59 -0
- package/dist/widgets/drawer/drawer.module.js +27 -0
- package/dist/widgets/drawer/drawer_module.css +129 -0
- package/dist/widgets/drawer/motionDomAnimation.js +4 -0
- package/dist/widgets/drawer/motionDomMax.js +4 -0
- package/dist/widgets/modal/modal-actions.d.ts +10 -0
- package/dist/widgets/modal/modal-actions.d.ts.map +1 -0
- package/dist/widgets/modal/modal-actions.js +13 -0
- package/dist/widgets/modal/modal-container.d.ts +10 -0
- package/dist/widgets/modal/modal-container.d.ts.map +1 -0
- package/dist/widgets/modal/modal-container.js +13 -0
- package/dist/widgets/modal/modal-content.d.ts +10 -0
- package/dist/widgets/modal/modal-content.d.ts.map +1 -0
- package/dist/widgets/modal/modal-content.js +13 -0
- package/dist/widgets/modal/modal-header.d.ts +10 -0
- package/dist/widgets/modal/modal-header.d.ts.map +1 -0
- package/dist/widgets/modal/modal-header.js +17 -0
- package/dist/widgets/modal/modal.d.ts +35 -0
- package/dist/widgets/modal/modal.d.ts.map +1 -0
- package/dist/widgets/modal/modal.js +58 -0
- package/dist/widgets/modal/modal.module.js +15 -0
- package/dist/widgets/modal/modal_module.css +118 -0
- package/dist/widgets/modal/motionDomAnimation.js +4 -0
- package/dist/widgets/modal/motionDomMax.js +4 -0
- package/dist/widgets/search/index.js +1 -0
- package/dist/widgets/search/search.d.ts +21 -0
- package/dist/widgets/search/search.d.ts.map +1 -0
- package/dist/widgets/search/search.js +109 -0
- package/dist/widgets/timeline/timeline.d.ts +60 -0
- package/dist/widgets/timeline/timeline.d.ts.map +1 -0
- package/dist/widgets/timeline/timeline.js +74 -0
- package/dist/widgets/timeline/timeline.module.js +17 -0
- package/dist/widgets/timeline/timeline_module.css +83 -0
- package/package.json +37 -24
- package/src/.uikit-sync.json +9 -0
- package/src/admin/components/admin-account/change-password.tsx +1 -1
- package/src/admin/components/admin-account/container.tsx +1 -1
- package/src/admin/components/admin-account/update.tsx +1 -1
- package/src/admin/components/admin-permissions/inspector.tsx +1 -1
- package/src/admin/components/admin-roles/create.tsx +1 -1
- package/src/admin/components/admin-roles/permissions.tsx +1 -1
- package/src/admin/components/admin-roles/update.tsx +1 -1
- package/src/admin/components/admin-users/create.tsx +1 -1
- package/src/admin/components/admin-users/roles.tsx +1 -1
- package/src/admin/components/admin-users/set-password.tsx +1 -1
- package/src/admin/components/admin-users/update.tsx +1 -1
- package/src/admin/components/auth/sign-in-form.tsx +1 -1
- package/src/admin/components/collections/diff-modal.tsx +1 -1
- package/src/admin/components/collections/status-badge.tsx +1 -1
- package/src/admin/tabs.tsx +1 -1
- package/src/admin.ts +39 -0
- package/src/components/@types/shared.ts +79 -0
- package/src/components/accordion/accordion.module.css +56 -0
- package/src/components/accordion/accordion.tsx +125 -0
- package/src/components/animation/fade-in-lift.tsx +43 -0
- package/src/components/avatar/avatar.module.css +45 -0
- package/src/components/avatar/avatar.tsx +28 -0
- package/src/components/badge/badge.module.css +66 -0
- package/src/components/badge/badge.tsx +42 -0
- package/src/components/button/@types/button.ts +50 -0
- package/src/components/button/button-group.module.css +19 -0
- package/src/components/button/button-group.tsx +142 -0
- package/src/components/button/button.module.css +542 -0
- package/src/components/button/button.tsx +70 -0
- package/src/components/button/combo-button.module.css +52 -0
- package/src/components/button/combo-button.tsx +89 -0
- package/src/components/button/control-buttons.module.css +134 -0
- package/src/components/button/control-buttons.tsx +140 -0
- package/src/components/button/copy-button.module.css +61 -0
- package/src/components/button/copy-button.tsx +123 -0
- package/src/components/button/icon-button.tsx +43 -0
- package/src/components/button/index.ts +5 -0
- package/src/components/card/card.module.css +80 -0
- package/src/components/card/card.tsx +91 -0
- package/src/components/chips/@types/chip.ts +29 -0
- package/src/components/chips/chip.module.css +445 -0
- package/src/components/chips/chip.tsx +198 -0
- package/src/components/chips/index.ts +2 -0
- package/src/components/container/container.module.css +41 -0
- package/src/components/container/container.tsx +23 -0
- package/src/components/dropdown/dropdown.module.css +128 -0
- package/src/components/dropdown/dropdown.tsx +225 -0
- package/src/components/hamburger/hamburger.module.css +141 -0
- package/src/components/hamburger/hamburger.tsx +75 -0
- package/src/components/inputs/@types/autocomplete.ts +39 -0
- package/src/components/inputs/@types/checkbox.ts +50 -0
- package/src/components/inputs/@types/input.ts +51 -0
- package/src/components/inputs/autocomplete.module.css +370 -0
- package/src/components/inputs/autocomplete.tsx +179 -0
- package/src/components/inputs/calendar.module.css +274 -0
- package/src/components/inputs/calendar.tsx +185 -0
- package/src/components/inputs/checkbox-group.module.css +15 -0
- package/src/components/inputs/checkbox-group.tsx +86 -0
- package/src/components/inputs/checkbox.module.css +278 -0
- package/src/components/inputs/checkbox.tsx +109 -0
- package/src/components/inputs/error-text.module.css +29 -0
- package/src/components/inputs/error-text.tsx +20 -0
- package/src/components/inputs/errors.tsx +37 -0
- package/src/components/inputs/help-text.module.css +29 -0
- package/src/components/inputs/help-text.tsx +19 -0
- package/src/components/inputs/index.tsx +9 -0
- package/src/components/inputs/input-adornment.module.css +26 -0
- package/src/components/inputs/input-adornment.tsx +37 -0
- package/src/components/inputs/input-password.tsx +24 -0
- package/src/components/inputs/input.module.css +289 -0
- package/src/components/inputs/input.tsx +119 -0
- package/src/components/inputs/label.module.css +20 -0
- package/src/components/inputs/label.tsx +26 -0
- package/src/components/inputs/radio-group.module.css +175 -0
- package/src/components/inputs/radio-group.tsx +72 -0
- package/src/components/inputs/select.module.css +152 -0
- package/src/components/inputs/select.tsx +134 -0
- package/src/components/inputs/text-area.module.css +34 -0
- package/src/components/inputs/text-area.tsx +83 -0
- package/src/components/inputs/utils.ts +21 -0
- package/src/components/notifications/@types/alert.ts +25 -0
- package/src/components/notifications/@types/toast.ts +53 -0
- package/src/components/notifications/alert.module.css +136 -0
- package/src/components/notifications/alert.tsx +124 -0
- package/src/components/notifications/index.ts +2 -0
- package/src/components/notifications/toast.module.css +234 -0
- package/src/components/notifications/toast.tsx +121 -0
- package/src/components/pager/@types/index.ts +15 -0
- package/src/components/pager/ellipses.tsx +18 -0
- package/src/components/pager/event-pager.tsx +20 -0
- package/src/components/pager/first-button.tsx +56 -0
- package/src/components/pager/hooks/types/usePagination.ts +80 -0
- package/src/components/pager/hooks/usePagination.ts +140 -0
- package/src/components/pager/icons/first.tsx +33 -0
- package/src/components/pager/icons/index.tsx +4 -0
- package/src/components/pager/icons/last.tsx +33 -0
- package/src/components/pager/icons/next.tsx +20 -0
- package/src/components/pager/icons/previous.tsx +20 -0
- package/src/components/pager/index.ts +4 -0
- package/src/components/pager/last-button.tsx +61 -0
- package/src/components/pager/next-button.tsx +61 -0
- package/src/components/pager/number-button.tsx +87 -0
- package/src/components/pager/pagination.module.css +147 -0
- package/src/components/pager/pagination.tsx +265 -0
- package/src/components/pager/previous-button.tsx +56 -0
- package/src/components/scroll-area/scroll-area.module.css +74 -0
- package/src/components/scroll-area/scroll-area.tsx +32 -0
- package/src/components/scroll-to-top/scroll-to-top.module.css +86 -0
- package/src/components/scroll-to-top/scroll-to-top.tsx +87 -0
- package/src/components/section/section.module.css +14 -0
- package/src/components/section/section.tsx +23 -0
- package/src/components/shimmer/shimmer.module.css +61 -0
- package/src/components/shimmer/shimmer.tsx +71 -0
- package/src/components/table/table.module.css +120 -0
- package/src/components/table/table.tsx +171 -0
- package/src/components/tabs/tabs.module.css +64 -0
- package/src/components/tabs/tabs.tsx +76 -0
- package/src/components/tooltip/tooltip.module.css +80 -0
- package/src/components/tooltip/tooltip.tsx +83 -0
- package/src/dnd/draggable-sortable/demo/draggable-list-demo.tsx +1 -1
- package/src/dnd/draggable-sortable/draggable-sortable.tsx +3 -3
- package/src/dnd/draggable-sortable/types.ts +1 -1
- package/src/fields/array/array-field.tsx +1 -1
- package/src/fields/blocks/blocks-field.tsx +1 -1
- package/src/fields/checkbox/checkbox-field.tsx +1 -1
- package/src/fields/datetime/datetime-field.tsx +1 -1
- package/src/fields/draggable-context-menu.tsx +3 -3
- package/src/fields/file/file-field.tsx +1 -1
- package/src/fields/group/group-field.tsx +1 -1
- package/src/fields/image/image-field.tsx +1 -1
- package/src/fields/numerical/numerical-field.tsx +1 -1
- package/src/fields/relation/relation-field.tsx +1 -1
- package/src/fields/relation/relation-picker.tsx +1 -1
- package/src/fields/select/select-field.tsx +1 -1
- package/src/fields/sortable-item.tsx +1 -1
- package/src/fields/text/text-field.tsx +1 -1
- package/src/fields/text-area/text-area-field.tsx +1 -1
- package/src/fields.ts +28 -0
- package/src/forms/document-actions.tsx +3 -3
- package/src/forms/form-renderer.tsx +1 -1
- package/src/forms/path-widget.test.tsx +1 -1
- package/src/forms/path-widget.tsx +1 -1
- package/src/forms.ts +10 -0
- package/src/hooks/use-focus-trap/index.ts +1 -0
- package/src/hooks/use-focus-trap/scope-tab.ts +48 -0
- package/src/hooks/use-focus-trap/tabbable.ts +72 -0
- package/src/hooks/use-focus-trap/use-focus-trap.ts +83 -0
- package/src/hooks/use-media-query.ts +20 -0
- package/src/icons/activity-icon.tsx +41 -0
- package/src/icons/ai-icon.tsx +45 -0
- package/src/icons/calendar-icon.tsx +37 -0
- package/src/icons/check-icon.tsx +30 -0
- package/src/icons/chevron-down-icon.tsx +37 -0
- package/src/icons/chevron-left-double-icon.tsx +59 -0
- package/src/icons/chevron-left-icon.tsx +59 -0
- package/src/icons/chevron-right-double-icon.tsx +59 -0
- package/src/icons/chevron-right-icon.tsx +59 -0
- package/src/icons/chevron-up-icon.tsx +37 -0
- package/src/icons/chevrons-up-down.tsx +38 -0
- package/src/icons/close-icon.tsx +33 -0
- package/src/icons/copy-icon.tsx +32 -0
- package/src/icons/danger-icon.tsx +19 -0
- package/src/icons/dashboard-icon.tsx +39 -0
- package/src/icons/delete-icon.tsx +32 -0
- package/src/icons/document-icon.tsx +36 -0
- package/src/icons/download-icon.tsx +37 -0
- package/src/icons/edit-icon.tsx +33 -0
- package/src/icons/ellipsis-icon.tsx +36 -0
- package/src/icons/email-icon.tsx +31 -0
- package/src/icons/external-link-icon.tsx +37 -0
- package/src/icons/eye-closed-icon.tsx +39 -0
- package/src/icons/eye-open-icon.tsx +31 -0
- package/src/icons/github-icon.tsx +28 -0
- package/src/icons/globe-icon.tsx +48 -0
- package/src/icons/google-icon.tsx +43 -0
- package/src/icons/gripper-vertical-icon.tsx +41 -0
- package/src/icons/history-icon.tsx +33 -0
- package/src/icons/home-icon.tsx +32 -0
- package/src/icons/icon-element.tsx +31 -0
- package/src/icons/icon-sprite.tsx +18 -0
- package/src/icons/icons.module.css +165 -0
- package/src/icons/index.ts +53 -0
- package/src/icons/info-icon.tsx +19 -0
- package/src/icons/infonomic-icon.tsx +172 -0
- package/src/icons/light-icon.tsx +27 -0
- package/src/icons/location-pin-icon.tsx +34 -0
- package/src/icons/moon-icon.tsx +40 -0
- package/src/icons/plus-icon.tsx +32 -0
- package/src/icons/primary-icon.tsx +22 -0
- package/src/icons/refresh-icon.tsx +31 -0
- package/src/icons/return-icon.tsx +34 -0
- package/src/icons/roles-icon.tsx +32 -0
- package/src/icons/search-icon.tsx +27 -0
- package/src/icons/search-menu-icon.tsx +40 -0
- package/src/icons/settings-gear-icon.tsx +34 -0
- package/src/icons/settings-sliders-icon.tsx +41 -0
- package/src/icons/sign-out-icon.tsx +33 -0
- package/src/icons/source/icon-calendar.svg +1 -0
- package/src/icons/source/icon-check.svg +4 -0
- package/src/icons/source/icon-close.svg +3 -0
- package/src/icons/source/icon-coinbase.svg +9 -0
- package/src/icons/source/icon-copy.svg +4 -0
- package/src/icons/source/icon-document.svg +5 -0
- package/src/icons/source/icon-download.svg +4 -0
- package/src/icons/source/icon-edit.svg +6 -0
- package/src/icons/source/icon-eth-purple.svg +15 -0
- package/src/icons/source/icon-etherscan.svg +5 -0
- package/src/icons/source/icon-external-link.svg +4 -0
- package/src/icons/source/icon-globe.svg +7 -0
- package/src/icons/source/icon-gripper-vertical.svg +9 -0
- package/src/icons/source/icon-info.svg +4 -0
- package/src/icons/source/icon-infonomic.svg +43 -0
- package/src/icons/source/icon-ledger.svg +4 -0
- package/src/icons/source/icon-light.svg +3 -0
- package/src/icons/source/icon-location-pin.svg +8 -0
- package/src/icons/source/icon-logout.svg +6 -0
- package/src/icons/source/icon-metamask.svg +32 -0
- package/src/icons/source/icon-moon.svg +3 -0
- package/src/icons/source/icon-plus.svg +4 -0
- package/src/icons/source/icon-refresh.svg +4 -0
- package/src/icons/source/icon-return.svg +4 -0
- package/src/icons/source/icon-search-menu.svg +13 -0
- package/src/icons/source/icon-search.svg +3 -0
- package/src/icons/source/icon-settings-gear.svg +5 -0
- package/src/icons/source/icon-settings.svg +12 -0
- package/src/icons/source/icon-wallet.svg +3 -0
- package/src/icons/source/icon-walletconnect.svg +4 -0
- package/src/icons/source/icon-x.svg +4 -0
- package/src/icons/stop-icon.tsx +33 -0
- package/src/icons/stopwatch-icon.tsx +37 -0
- package/src/icons/success-icon.tsx +19 -0
- package/src/icons/types/icon.ts +8 -0
- package/src/icons/user-icon.tsx +31 -0
- package/src/icons/users-icon.tsx +33 -0
- package/src/icons/wallet-icon.tsx +27 -0
- package/src/icons/warning-icon.tsx +19 -0
- package/src/icons/x-icon.tsx +31 -0
- package/src/lib/ripple.ts +95 -0
- package/src/loaders/@types/index.ts +6 -0
- package/src/loaders/ellipses.module.css +79 -0
- package/src/loaders/ellipses.tsx +43 -0
- package/src/loaders/ring.module.css +55 -0
- package/src/loaders/ring.tsx +45 -0
- package/src/loaders/spinner.module.css +106 -0
- package/src/loaders/spinner.tsx +52 -0
- package/src/react.ts +11 -73
- package/src/services.ts +18 -0
- package/src/styles/base/animations.css +141 -0
- package/src/styles/base/base.css +11 -0
- package/src/styles/base/borders.css +30 -0
- package/src/styles/base/breakpoints.css +15 -0
- package/src/styles/base/colors.css +163 -0
- package/src/styles/base/opacity.css +12 -0
- package/src/styles/base/shadows.css +13 -0
- package/src/styles/base/size.css +24 -0
- package/src/styles/base/spacing.css +24 -0
- package/src/styles/base/transitions.css +7 -0
- package/src/styles/base/typography.css +46 -0
- package/src/styles/base/z-index.css +12 -0
- package/src/styles/components/components.css +4 -0
- package/src/styles/components/fade-in-lift.css +15 -0
- package/src/styles/components/hamburger.css +122 -0
- package/src/styles/components/loaders.css +198 -0
- package/src/styles/functional/README.md +67 -0
- package/src/styles/functional/borders.css +42 -0
- package/src/styles/functional/colors.css +1279 -0
- package/src/styles/functional/functional.css +6 -0
- package/src/styles/functional/grid-flex.css +52 -0
- package/src/styles/functional/shadcn-compat.css +90 -0
- package/src/styles/functional/surfaces.css +132 -0
- package/src/styles/functional/typography.css +54 -0
- package/src/styles/local-fonts.css +98 -0
- package/src/styles/reset.css +466 -0
- package/src/styles/styles.css +12 -0
- package/src/styles/theme/autofill.css +67 -0
- package/src/styles/theme/defaults.css +75 -0
- package/src/styles/theme/scrollers.css +54 -0
- package/src/styles/theme/theme.css +17 -0
- package/src/styles/typography/fonts.css +33 -0
- package/src/styles/typography/prose.css +414 -0
- package/src/styles/typography.css +24 -0
- package/src/styles/utils/scroll-layout-shift.css +9 -0
- package/src/styles/utils/utility-classes.css +1395 -0
- package/src/styles/utils/utils.css +2 -0
- package/src/uikit.ts +116 -0
- package/src/utils/capitalize.ts +6 -0
- package/src/utils/externalLinkProps.ts +6 -0
- package/src/utils/findMatch.ts +7 -0
- package/src/utils/getPortalRoot.ts +3 -0
- package/src/utils/isTouchDevice.ts +11 -0
- package/src/utils/objectsToArray.ts +13 -0
- package/src/utils/objectsToString.ts +5 -0
- package/src/utils/polymorphic.ts +16 -0
- package/src/utils/to-kebab-case.ts +5 -0
- package/src/widgets/datepicker/datepicker.module.css +207 -0
- package/src/widgets/datepicker/datepicker.tsx +355 -0
- package/src/widgets/drawer/drawer-container.tsx +31 -0
- package/src/widgets/drawer/drawer-content.tsx +31 -0
- package/src/widgets/drawer/drawer-context.tsx +47 -0
- package/src/widgets/drawer/drawer-header.tsx +28 -0
- package/src/widgets/drawer/drawer-top-actions.tsx +28 -0
- package/src/widgets/drawer/drawer.module.css +141 -0
- package/src/widgets/drawer/drawer.tsx +98 -0
- package/src/widgets/drawer/motionDomAnimation.ts +5 -0
- package/src/widgets/drawer/motionDomMax.ts +5 -0
- package/src/widgets/modal/modal-actions.tsx +31 -0
- package/src/widgets/modal/modal-container.tsx +31 -0
- package/src/widgets/modal/modal-content.tsx +31 -0
- package/src/widgets/modal/modal-header.tsx +28 -0
- package/src/widgets/modal/modal.module.css +127 -0
- package/src/widgets/modal/modal.tsx +88 -0
- package/src/widgets/modal/motionDomAnimation.ts +5 -0
- package/src/widgets/modal/motionDomMax.ts +5 -0
- package/src/widgets/search/index.ts +1 -0
- package/src/widgets/search/search.tsx +187 -0
- package/src/widgets/timeline/timeline.module.css +102 -0
- package/src/widgets/timeline/timeline.tsx +177 -0
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
import { useEffect, useState } from 'react'
|
|
10
10
|
|
|
11
11
|
import type { ArrayField as ArrayFieldType, Field } from '@byline/core'
|
|
12
|
-
import { IconButton, PlusIcon } from '@infonomic/uikit/react'
|
|
13
12
|
import cx from 'classnames'
|
|
14
13
|
|
|
15
14
|
import { DraggableSortable, moveItem } from '../../dnd/draggable-sortable'
|
|
@@ -17,6 +16,7 @@ import { defaultScalarForField } from '../../fields/field-helpers'
|
|
|
17
16
|
import { FieldRenderer } from '../../fields/field-renderer'
|
|
18
17
|
import { SortableItem } from '../../fields/sortable-item'
|
|
19
18
|
import { useFormContext } from '../../forms/form-context'
|
|
19
|
+
import { IconButton, PlusIcon } from '../../uikit.js'
|
|
20
20
|
import styles from './array-field.module.css'
|
|
21
21
|
|
|
22
22
|
// ---------------------------------------------------------------------------
|
|
@@ -13,7 +13,6 @@ import type {
|
|
|
13
13
|
Field,
|
|
14
14
|
GroupField as GroupFieldType,
|
|
15
15
|
} from '@byline/core'
|
|
16
|
-
import { Card, CloseIcon, IconButton, Modal, PlusIcon } from '@infonomic/uikit/react'
|
|
17
16
|
import cx from 'classnames'
|
|
18
17
|
|
|
19
18
|
import { DraggableSortable, moveItem } from '../../dnd/draggable-sortable'
|
|
@@ -21,6 +20,7 @@ import { defaultScalarForField } from '../../fields/field-helpers'
|
|
|
21
20
|
import { GroupField } from '../../fields/group/group-field'
|
|
22
21
|
import { SortableItem } from '../../fields/sortable-item'
|
|
23
22
|
import { useFormContext } from '../../forms/form-context'
|
|
23
|
+
import { Card, CloseIcon, IconButton, Modal, PlusIcon } from '../../uikit.js'
|
|
24
24
|
import styles from './blocks-field.module.css'
|
|
25
25
|
|
|
26
26
|
// ---------------------------------------------------------------------------
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import type { CheckboxField as FieldType } from '@byline/core'
|
|
10
|
-
import { Checkbox } from '@infonomic/uikit/react'
|
|
11
10
|
|
|
12
11
|
import { useFieldError, useFieldValue } from '../../forms/form-context'
|
|
12
|
+
import { Checkbox } from '../../uikit.js'
|
|
13
13
|
|
|
14
14
|
export const CheckboxField = ({
|
|
15
15
|
field,
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import type { DateTimeField as FieldType } from '@byline/core'
|
|
10
|
-
import { DatePicker, ErrorText } from '@infonomic/uikit/react'
|
|
11
10
|
import cx from 'classnames'
|
|
12
11
|
|
|
13
12
|
import { useFieldError, useFieldValue, useIsDirty } from '../../forms/form-context'
|
|
13
|
+
import { DatePicker, ErrorText } from '../../uikit.js'
|
|
14
14
|
import styles from './datetime-field.module.css'
|
|
15
15
|
|
|
16
16
|
export const DateTimeField = ({
|
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
* Copyright (c) Infonomic Company Limited
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
import cx from 'classnames'
|
|
12
|
+
|
|
11
13
|
import {
|
|
12
14
|
DeleteIcon,
|
|
13
15
|
Dropdown as DropdownMenu,
|
|
14
16
|
EllipsisIcon,
|
|
15
17
|
IconButton,
|
|
16
18
|
PlusIcon,
|
|
17
|
-
} from '
|
|
18
|
-
import cx from 'classnames'
|
|
19
|
-
|
|
19
|
+
} from '../uikit.js'
|
|
20
20
|
import styles from './draggable-context-menu.module.css'
|
|
21
21
|
|
|
22
22
|
interface DraggableContextMenuProps {
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import type { FileField as FieldType, StoredFileValue } from '@byline/core'
|
|
10
|
-
import { ErrorText } from '@infonomic/uikit/react'
|
|
11
10
|
import cx from 'classnames'
|
|
12
11
|
|
|
13
12
|
import { useFieldError, useFieldValue, useIsDirty } from '../../forms/form-context'
|
|
13
|
+
import { ErrorText } from '../../uikit.js'
|
|
14
14
|
import styles from './file-field.module.css'
|
|
15
15
|
|
|
16
16
|
interface FileFieldProps {
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
import { useMemo } from 'react'
|
|
10
10
|
|
|
11
11
|
import type { Field, GroupField as GroupFieldType } from '@byline/core'
|
|
12
|
-
import { ErrorText } from '@infonomic/uikit/react'
|
|
13
12
|
import cx from 'classnames'
|
|
14
13
|
|
|
15
14
|
import { placeholderForField } from '../../fields/field-helpers'
|
|
16
15
|
import { FieldRenderer } from '../../fields/field-renderer'
|
|
17
16
|
import { useFieldError } from '../../forms/form-context'
|
|
17
|
+
import { ErrorText } from '../../uikit.js'
|
|
18
18
|
import styles from './group-field.module.css'
|
|
19
19
|
|
|
20
20
|
// ---------------------------------------------------------------------------
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
isPendingStoredFileValue,
|
|
12
12
|
type StoredFileValue,
|
|
13
13
|
} from '@byline/core'
|
|
14
|
-
import { ErrorText } from '@infonomic/uikit/react'
|
|
15
14
|
import cx from 'classnames'
|
|
16
15
|
|
|
17
16
|
import { useFieldError, useFieldValue, useFormContext, useIsDirty } from '../../forms/form-context'
|
|
17
|
+
import { ErrorText } from '../../uikit.js'
|
|
18
18
|
import { useFieldChangeHandler } from '../use-field-change-handler'
|
|
19
19
|
import styles from './image-field.module.css'
|
|
20
20
|
import { ImageUploadField } from './image-upload-field'
|
|
@@ -13,9 +13,9 @@ import type {
|
|
|
13
13
|
FloatField,
|
|
14
14
|
IntegerField,
|
|
15
15
|
} from '@byline/core'
|
|
16
|
-
import { Input } from '@infonomic/uikit/react'
|
|
17
16
|
|
|
18
17
|
import { useFieldError, useFieldValue } from '../../forms/form-context'
|
|
18
|
+
import { Input } from '../../uikit.js'
|
|
19
19
|
|
|
20
20
|
export const NumericalField = ({
|
|
21
21
|
field,
|
|
@@ -15,10 +15,10 @@ import type {
|
|
|
15
15
|
RelatedDocumentValue,
|
|
16
16
|
} from '@byline/core'
|
|
17
17
|
import { getCollectionAdminConfig, getCollectionDefinition } from '@byline/core'
|
|
18
|
-
import { Button, ErrorText, Label } from '@infonomic/uikit/react'
|
|
19
18
|
import cx from 'classnames'
|
|
20
19
|
|
|
21
20
|
import { useFieldError, useFieldValue } from '../../forms/form-context'
|
|
21
|
+
import { Button, ErrorText, Label } from '../../uikit.js'
|
|
22
22
|
import styles from './relation-field.module.css'
|
|
23
23
|
import { RelationPicker } from './relation-picker'
|
|
24
24
|
import { RelationSummary } from './relation-summary'
|
|
@@ -10,10 +10,10 @@ import { useCallback, useEffect, useState } from 'react'
|
|
|
10
10
|
|
|
11
11
|
import type { CollectionAdminConfig, CollectionDefinition } from '@byline/core'
|
|
12
12
|
import { getCollectionAdminConfig } from '@byline/core'
|
|
13
|
-
import { Button, LoaderRing, Modal, Search } from '@infonomic/uikit/react'
|
|
14
13
|
import cx from 'classnames'
|
|
15
14
|
|
|
16
15
|
import { useBylineFieldServices } from '../../services/field-services-context'
|
|
16
|
+
import { Button, LoaderRing, Modal, Search } from '../../uikit.js'
|
|
17
17
|
import {
|
|
18
18
|
PickerCell,
|
|
19
19
|
resolveFallbackDisplayField,
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import type { SelectField as FieldType } from '@byline/core'
|
|
10
|
-
import { ErrorText, Select } from '@infonomic/uikit/react'
|
|
11
10
|
import cx from 'classnames'
|
|
12
11
|
|
|
13
12
|
import { useFieldError, useFieldValue, useIsDirty } from '../../forms/form-context'
|
|
13
|
+
import { ErrorText, Select } from '../../uikit.js'
|
|
14
14
|
import styles from './select-field.module.css'
|
|
15
15
|
|
|
16
16
|
export const SelectField = ({
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
|
|
9
9
|
import { type ReactNode, useState } from 'react'
|
|
10
10
|
|
|
11
|
-
import { ChevronDownIcon, GripperVerticalIcon } from '@infonomic/uikit/react'
|
|
12
11
|
import cx from 'classnames'
|
|
13
12
|
|
|
14
13
|
import { useSortable } from '../dnd/draggable-sortable'
|
|
14
|
+
import { ChevronDownIcon, GripperVerticalIcon } from '../uikit.js'
|
|
15
15
|
import { DraggableContextMenu } from './draggable-context-menu'
|
|
16
16
|
import styles from './sortable-item.module.css'
|
|
17
17
|
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
import { useCallback } from 'react'
|
|
10
10
|
|
|
11
11
|
import type { Field, FieldComponentSlots, TextField as FieldType } from '@byline/core'
|
|
12
|
-
import { Input, Label } from '@infonomic/uikit/react'
|
|
13
12
|
import cx from 'classnames'
|
|
14
13
|
|
|
15
14
|
import { useFieldError, useFieldValue } from '../../forms/form-context'
|
|
15
|
+
import { Input, Label } from '../../uikit.js'
|
|
16
16
|
import { LocaleBadge } from '../locale-badge'
|
|
17
17
|
import styles from './text-field.module.css'
|
|
18
18
|
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
import { useCallback } from 'react'
|
|
10
10
|
|
|
11
11
|
import type { Field, FieldComponentSlots, TextAreaField as FieldType } from '@byline/core'
|
|
12
|
-
import { Label, TextArea } from '@infonomic/uikit/react'
|
|
13
12
|
import cx from 'classnames'
|
|
14
13
|
|
|
15
14
|
import { useFieldError, useFieldValue } from '../../forms/form-context'
|
|
15
|
+
import { Label, TextArea } from '../../uikit.js'
|
|
16
16
|
import { LocaleBadge } from '../locale-badge'
|
|
17
17
|
import styles from './text-area-field.module.css'
|
|
18
18
|
|
package/src/fields.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE: We put a .js ending on imports here to satisfy
|
|
3
|
+
* TS / dist output
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export * from './fields/array/array-field.js'
|
|
7
|
+
export * from './fields/blocks/blocks-field.js'
|
|
8
|
+
export * from './fields/checkbox/checkbox-field.js'
|
|
9
|
+
export * from './fields/column-formatter.js'
|
|
10
|
+
export * from './fields/date-time-formatter.js'
|
|
11
|
+
export * from './fields/datetime/datetime-field.js'
|
|
12
|
+
export * from './fields/draggable-context-menu.js'
|
|
13
|
+
export * from './fields/field-helpers.js'
|
|
14
|
+
export * from './fields/field-renderer.js'
|
|
15
|
+
export * from './fields/file/file-field.js'
|
|
16
|
+
export * from './fields/group/group-field.js'
|
|
17
|
+
export * from './fields/image/image-field.js'
|
|
18
|
+
export * from './fields/image/image-upload-field.js'
|
|
19
|
+
export * from './fields/local-date-time.js'
|
|
20
|
+
export * from './fields/locale-badge.js'
|
|
21
|
+
export * from './fields/numerical/numerical-field.js'
|
|
22
|
+
export * from './fields/relation/relation-field.js'
|
|
23
|
+
export * from './fields/relation/relation-picker.js'
|
|
24
|
+
export * from './fields/select/select-field.js'
|
|
25
|
+
export * from './fields/sortable-item.js'
|
|
26
|
+
export * from './fields/text/text-field.js'
|
|
27
|
+
export * from './fields/text-area/text-area-field.js'
|
|
28
|
+
export * from './fields/use-field-change-handler.js'
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
import { useState } from 'react'
|
|
10
10
|
|
|
11
|
+
import cx from 'classnames'
|
|
12
|
+
|
|
11
13
|
import {
|
|
12
14
|
Button,
|
|
13
15
|
CloseIcon,
|
|
@@ -16,9 +18,7 @@ import {
|
|
|
16
18
|
EllipsisIcon,
|
|
17
19
|
IconButton,
|
|
18
20
|
Modal,
|
|
19
|
-
} from '
|
|
20
|
-
import cx from 'classnames'
|
|
21
|
-
|
|
21
|
+
} from '../uikit.js'
|
|
22
22
|
import styles from './document-actions.module.css'
|
|
23
23
|
import type { PublishedVersionInfo } from './form-renderer'
|
|
24
24
|
|
|
@@ -16,7 +16,6 @@ import type {
|
|
|
16
16
|
TabSetDefinition,
|
|
17
17
|
WorkflowStatus,
|
|
18
18
|
} from '@byline/core'
|
|
19
|
-
import { Button, ComboButton, Modal } from '@infonomic/uikit/react'
|
|
20
19
|
import cx from 'classnames'
|
|
21
20
|
|
|
22
21
|
import { Group } from '../admin/group'
|
|
@@ -25,6 +24,7 @@ import { Tabs } from '../admin/tabs'
|
|
|
25
24
|
import { FieldRenderer } from '../fields/field-renderer'
|
|
26
25
|
import { LocalDateTime } from '../fields/local-date-time'
|
|
27
26
|
import { useBylineFieldServices } from '../services/field-services-context'
|
|
27
|
+
import { Button, ComboButton, Modal } from '../uikit.js'
|
|
28
28
|
import { DocumentActions } from './document-actions'
|
|
29
29
|
import { FormProvider, useFieldValue, useFormContext } from './form-context'
|
|
30
30
|
import styles from './form-renderer.module.css'
|
|
@@ -13,7 +13,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
|
|
13
13
|
|
|
14
14
|
// Lightweight uikit stubs — we don't care about the visual rendering, only
|
|
15
15
|
// that the Input forwards props and the Label renders its htmlFor.
|
|
16
|
-
vi.mock('@
|
|
16
|
+
vi.mock('@byline/ui', () => ({
|
|
17
17
|
Label: ({ id, htmlFor, label }: { id?: string; htmlFor?: string; label?: string }) => (
|
|
18
18
|
<label id={id} htmlFor={htmlFor}>
|
|
19
19
|
{label}
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
import { useCallback, useMemo } from 'react'
|
|
10
10
|
|
|
11
11
|
import { slugify } from '@byline/core'
|
|
12
|
-
import { Input, Label } from '@infonomic/uikit/react'
|
|
13
12
|
import cx from 'classnames'
|
|
14
13
|
|
|
14
|
+
import { Input, Label } from '../uikit.js'
|
|
15
15
|
import { useFieldValue, useFormContext, useSystemPath } from './form-context'
|
|
16
16
|
import styles from './path-widget.module.css'
|
|
17
17
|
|
package/src/forms.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE: We put a .js ending on imports here to satisfy
|
|
3
|
+
* TS / dist output
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export * from './forms/document-actions.js'
|
|
7
|
+
export * from './forms/form-context.js'
|
|
8
|
+
export * from './forms/form-renderer.js'
|
|
9
|
+
export * from './forms/navigation-guard.js'
|
|
10
|
+
export * from './forms/path-widget.js'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useFocusTrap } from './use-focus-trap.js'
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scope tab key navigation within a container.
|
|
3
|
+
*
|
|
4
|
+
* Based on use-focus-trap from Mantine (https://github.com/mantinedev/mantine)
|
|
5
|
+
* Original work licensed under the MIT License.
|
|
6
|
+
* Copyright (c) 2021 Vitaly Rtishchev
|
|
7
|
+
*
|
|
8
|
+
* Adapted for use as an internal ESM/TypeScript module.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { findTabbableDescendants } from './tabbable.js'
|
|
12
|
+
|
|
13
|
+
export function scopeTab(node: HTMLElement, event: KeyboardEvent) {
|
|
14
|
+
const tabbable = findTabbableDescendants(node)
|
|
15
|
+
if (!tabbable.length) {
|
|
16
|
+
event.preventDefault()
|
|
17
|
+
return
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const finalTabbable = tabbable[event.shiftKey ? 0 : tabbable.length - 1]
|
|
21
|
+
const root = node.getRootNode() as unknown as DocumentOrShadowRoot
|
|
22
|
+
let leavingFinalTabbable = finalTabbable === root.activeElement || node === root.activeElement
|
|
23
|
+
|
|
24
|
+
const activeElement = root.activeElement as Element
|
|
25
|
+
const activeElementIsRadio =
|
|
26
|
+
activeElement.tagName === 'INPUT' && activeElement.getAttribute('type') === 'radio'
|
|
27
|
+
|
|
28
|
+
if (activeElementIsRadio) {
|
|
29
|
+
const activeRadioGroup = tabbable.filter(
|
|
30
|
+
(element) =>
|
|
31
|
+
element.getAttribute('type') === 'radio' &&
|
|
32
|
+
element.getAttribute('name') === activeElement.getAttribute('name')
|
|
33
|
+
)
|
|
34
|
+
leavingFinalTabbable = activeRadioGroup.includes(finalTabbable)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (!leavingFinalTabbable) {
|
|
38
|
+
return
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
event.preventDefault()
|
|
42
|
+
|
|
43
|
+
const target = tabbable[event.shiftKey ? tabbable.length - 1 : 0]
|
|
44
|
+
|
|
45
|
+
if (target) {
|
|
46
|
+
target.focus()
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Focus-trap tabbable element utilities.
|
|
3
|
+
*
|
|
4
|
+
* Based on use-focus-trap from Mantine (https://github.com/mantinedev/mantine)
|
|
5
|
+
* Original work licensed under the MIT License.
|
|
6
|
+
* Copyright (c) 2021 Vitaly Rtishchev
|
|
7
|
+
*
|
|
8
|
+
* Adapted for use as an internal ESM/TypeScript module.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const TABBABLE_NODES = /input|select|textarea|button|object/
|
|
12
|
+
|
|
13
|
+
export const FOCUS_SELECTOR = 'a, input, select, textarea, button, object, [tabindex]'
|
|
14
|
+
|
|
15
|
+
function hidden(element: HTMLElement) {
|
|
16
|
+
return element.style.display === 'none'
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function visible(element: HTMLElement) {
|
|
20
|
+
const isHidden =
|
|
21
|
+
element.getAttribute('aria-hidden') ||
|
|
22
|
+
element.getAttribute('hidden') ||
|
|
23
|
+
element.getAttribute('type') === 'hidden'
|
|
24
|
+
|
|
25
|
+
if (isHidden) {
|
|
26
|
+
return false
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
let parentElement: HTMLElement = element
|
|
30
|
+
while (parentElement) {
|
|
31
|
+
if (parentElement === document.body || parentElement.nodeType === 11) {
|
|
32
|
+
break
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (hidden(parentElement)) {
|
|
36
|
+
return false
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
parentElement = parentElement.parentNode as HTMLElement
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return true
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function getElementTabIndex(element: HTMLElement) {
|
|
46
|
+
let tabIndex: string | null | undefined = element.getAttribute('tabindex')
|
|
47
|
+
if (tabIndex === null) {
|
|
48
|
+
tabIndex = undefined
|
|
49
|
+
}
|
|
50
|
+
return Number.parseInt(tabIndex as string, 10)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function focusable(element: HTMLElement) {
|
|
54
|
+
const nodeName = element.nodeName.toLowerCase()
|
|
55
|
+
const isTabIndexNotNaN = !Number.isNaN(getElementTabIndex(element))
|
|
56
|
+
const res =
|
|
57
|
+
// @ts-expect-error function accepts any html element but if it is a button, it should not be disabled
|
|
58
|
+
(TABBABLE_NODES.test(nodeName) && !element.disabled) ||
|
|
59
|
+
(element instanceof HTMLAnchorElement ? element.href || isTabIndexNotNaN : isTabIndexNotNaN)
|
|
60
|
+
|
|
61
|
+
return res && visible(element)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function tabbable(element: HTMLElement) {
|
|
65
|
+
const tabIndex = getElementTabIndex(element)
|
|
66
|
+
const isTabIndexNaN = Number.isNaN(tabIndex)
|
|
67
|
+
return (isTabIndexNaN || tabIndex >= 0) && focusable(element)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function findTabbableDescendants(element: HTMLElement): HTMLElement[] {
|
|
71
|
+
return Array.from(element.querySelectorAll<HTMLElement>(FOCUS_SELECTOR)).filter(tabbable)
|
|
72
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Focus trap hook — traps keyboard focus within a container element.
|
|
3
|
+
*
|
|
4
|
+
* Based on use-focus-trap from Mantine (https://github.com/mantinedev/mantine)
|
|
5
|
+
* Original work licensed under the MIT License.
|
|
6
|
+
* Copyright (c) 2021 Vitaly Rtishchev
|
|
7
|
+
*
|
|
8
|
+
* Adapted for use as an internal ESM/TypeScript module.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { useCallback, useEffect, useRef } from 'react'
|
|
12
|
+
|
|
13
|
+
import { scopeTab } from './scope-tab.js'
|
|
14
|
+
import { FOCUS_SELECTOR, focusable, tabbable } from './tabbable.js'
|
|
15
|
+
|
|
16
|
+
export function useFocusTrap(active = true): React.RefCallback<HTMLElement | null> {
|
|
17
|
+
const ref = useRef<HTMLElement>(null)
|
|
18
|
+
|
|
19
|
+
const focusNode = useCallback((node: HTMLElement) => {
|
|
20
|
+
let focusElement: HTMLElement | null = node.querySelector('[data-autofocus]')
|
|
21
|
+
|
|
22
|
+
if (!focusElement) {
|
|
23
|
+
const children = Array.from<HTMLElement>(node.querySelectorAll(FOCUS_SELECTOR))
|
|
24
|
+
focusElement = children.find(tabbable) || children.find(focusable) || null
|
|
25
|
+
if (!focusElement && focusable(node)) {
|
|
26
|
+
focusElement = node
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (focusElement) {
|
|
31
|
+
focusElement.focus({ preventScroll: true })
|
|
32
|
+
}
|
|
33
|
+
}, [])
|
|
34
|
+
|
|
35
|
+
const setRef = useCallback(
|
|
36
|
+
(node: HTMLElement | null) => {
|
|
37
|
+
if (!active) {
|
|
38
|
+
return
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (node === null) {
|
|
42
|
+
return
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (ref.current === node) {
|
|
46
|
+
return
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (node) {
|
|
50
|
+
// Delay processing the HTML node by a frame. This ensures focus is assigned correctly.
|
|
51
|
+
setTimeout(() => {
|
|
52
|
+
if (node.getRootNode()) {
|
|
53
|
+
focusNode(node)
|
|
54
|
+
}
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
ref.current = node
|
|
58
|
+
} else {
|
|
59
|
+
ref.current = null
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
[active, focusNode]
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
if (!active) {
|
|
67
|
+
return undefined
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
ref.current && setTimeout(() => focusNode(ref.current!))
|
|
71
|
+
|
|
72
|
+
const handleKeyDown = (event: KeyboardEvent) => {
|
|
73
|
+
if (event.key === 'Tab' && ref.current) {
|
|
74
|
+
scopeTab(ref.current, event)
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
document.addEventListener('keydown', handleKeyDown)
|
|
79
|
+
return () => document.removeEventListener('keydown', handleKeyDown)
|
|
80
|
+
}, [active, focusNode])
|
|
81
|
+
|
|
82
|
+
return setRef
|
|
83
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react'
|
|
2
|
+
|
|
3
|
+
export const useMediaQuery = (query: string): boolean | null => {
|
|
4
|
+
const [matches, setMatches] = useState<boolean | null>(null)
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
const mediaMatch = window.matchMedia(query)
|
|
7
|
+
if (matches == null) {
|
|
8
|
+
setMatches(mediaMatch.matches)
|
|
9
|
+
}
|
|
10
|
+
const handler = (e: MediaQueryListEvent): void => {
|
|
11
|
+
setMatches(e.matches)
|
|
12
|
+
}
|
|
13
|
+
mediaMatch.addEventListener('change', handler)
|
|
14
|
+
return () => {
|
|
15
|
+
mediaMatch.removeEventListener('change', handler)
|
|
16
|
+
}
|
|
17
|
+
}, [matches, query])
|
|
18
|
+
|
|
19
|
+
return matches
|
|
20
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type React from 'react'
|
|
2
|
+
|
|
3
|
+
import cx from 'classnames'
|
|
4
|
+
|
|
5
|
+
import { IconElement } from './icon-element.js'
|
|
6
|
+
import styles from './icons.module.css'
|
|
7
|
+
import type { IconProps } from './types/icon.js'
|
|
8
|
+
|
|
9
|
+
export const ActivityIcon = ({
|
|
10
|
+
className,
|
|
11
|
+
svgClassName,
|
|
12
|
+
...rest
|
|
13
|
+
}: IconProps): React.JSX.Element => {
|
|
14
|
+
const applied = cx(styles['fill-none'], styles['stroke-current'], svgClassName)
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<IconElement className={cx('activity-icon', className)} {...rest}>
|
|
18
|
+
<svg
|
|
19
|
+
className={applied}
|
|
20
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
21
|
+
focusable="false"
|
|
22
|
+
aria-hidden="true"
|
|
23
|
+
viewBox="0 0 24 24"
|
|
24
|
+
fill="none"
|
|
25
|
+
stroke="currentColor"
|
|
26
|
+
strokeLinecap="round"
|
|
27
|
+
strokeLinejoin="round"
|
|
28
|
+
strokeWidth={1.75}
|
|
29
|
+
>
|
|
30
|
+
<path d="M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4" />
|
|
31
|
+
<path d="M2 6h4" />
|
|
32
|
+
<path d="M2 10h4" />
|
|
33
|
+
<path d="M2 14h4" />
|
|
34
|
+
<path d="M2 18h4" />
|
|
35
|
+
<path d="M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z" />
|
|
36
|
+
</svg>
|
|
37
|
+
</IconElement>
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
ActivityIcon.displayName = 'ActivityIcon'
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type React from 'react'
|
|
2
|
+
|
|
3
|
+
import cx from 'classnames'
|
|
4
|
+
|
|
5
|
+
import { IconElement } from './icon-element.jsx'
|
|
6
|
+
import styles from './icons.module.css'
|
|
7
|
+
import type { IconProps } from './types/icon.js'
|
|
8
|
+
|
|
9
|
+
export const AiIcon = ({ className, svgClassName, ...rest }: IconProps): React.JSX.Element => {
|
|
10
|
+
const _applied = cx(styles['stroke-current'], svgClassName)
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<IconElement className={cx('ai-icon', className)} {...rest}>
|
|
14
|
+
<svg
|
|
15
|
+
// className={applied}
|
|
16
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
17
|
+
focusable="false"
|
|
18
|
+
aria-hidden="true"
|
|
19
|
+
viewBox="0 0 24 24"
|
|
20
|
+
fill="none"
|
|
21
|
+
stroke="currentColor"
|
|
22
|
+
strokeLinecap="round"
|
|
23
|
+
strokeLinejoin="round"
|
|
24
|
+
strokeWidth={1.5}
|
|
25
|
+
>
|
|
26
|
+
<path
|
|
27
|
+
d="M14.0416 16.2219L13.5749 17.8284C13.1036 19.4508 12.868 20.262 12.5051 20.4675C12.1917 20.6449 11.8083 20.6449 11.4949 20.4675C11.132 20.262 10.8964 19.4508 10.4251 17.8284L9.95843 16.2219L9.95843 16.2219C9.77921 15.6049 9.68961 15.2965 9.52195 15.043C9.37356 14.8186 9.18142 14.6264 8.95705 14.478C8.70355 14.3104 8.39507 14.2208 7.77812 14.0416L7.77811 14.0416L6.1716 13.5749C4.5492 13.1036 3.738 12.868 3.5325 12.5051C3.35507 12.1917 3.35507 11.8083 3.5325 11.4949C3.738 11.132 4.5492 10.8964 6.1716 10.4251L7.77811 9.95843L7.77812 9.95843C8.39507 9.77922 8.70355 9.68961 8.95705 9.52195C9.18142 9.37356 9.37356 9.18142 9.52195 8.95705C9.68961 8.70355 9.77921 8.39507 9.95843 7.77812L9.95843 7.77811L10.4251 6.1716C10.8964 4.5492 11.132 3.738 11.4949 3.5325C11.8083 3.35507 12.1917 3.35507 12.5051 3.5325C12.868 3.738 13.1036 4.5492 13.5749 6.1716L14.0416 7.77811L14.0416 7.77812C14.2208 8.39507 14.3104 8.70355 14.478 8.95705C14.6264 9.18142 14.8186 9.37356 15.043 9.52195C15.2965 9.68961 15.6049 9.77921 16.2219 9.95843L16.2219 9.95843L17.8284 10.4251C19.4508 10.8964 20.262 11.132 20.4675 11.4949C20.6449 11.8083 20.6449 12.1917 20.4675 12.5051C20.262 12.868 19.4508 13.1036 17.8284 13.5749L16.2219 14.0416L16.2219 14.0416C15.6049 14.2208 15.2965 14.3104 15.043 14.478C14.8186 14.6264 14.6264 14.8186 14.478 15.043C14.3104 15.2965 14.2208 15.6049 14.0416 16.2219L14.0416 16.2219Z"
|
|
28
|
+
// stroke="#F5F5F5"
|
|
29
|
+
/>
|
|
30
|
+
<path
|
|
31
|
+
d="M5.42282 5.94949L5.01129 7.20368C4.92849 7.45603 4.57151 7.45603 4.48871 7.20368L4.07718 5.94949C3.99537 5.70017 3.79983 5.50463 3.55051 5.42282L2.29632 5.01129C2.04397 4.92849 2.04397 4.57151 2.29632 4.48871L3.55051 4.07718C3.79983 3.99537 3.99537 3.79983 4.07718 3.55051L4.48871 2.29632C4.57151 2.04397 4.92849 2.04397 5.01129 2.29632L5.42282 3.55051C5.50463 3.79983 5.70017 3.99537 5.94949 4.07718L7.20368 4.48871C7.45603 4.57151 7.45603 4.92849 7.20368 5.01129L5.94949 5.42282C5.70017 5.50463 5.50463 5.70017 5.42282 5.94949Z"
|
|
32
|
+
fill="#FFBC0F"
|
|
33
|
+
stroke="none"
|
|
34
|
+
/>
|
|
35
|
+
<path
|
|
36
|
+
d="M19.9228 20.4495L19.5113 21.7037C19.4285 21.956 19.0715 21.956 18.9887 21.7037L18.5772 20.4495C18.4954 20.2002 18.2998 20.0046 18.0505 19.9228L16.7963 19.5113C16.544 19.4285 16.544 19.0715 16.7963 18.9887L18.0505 18.5772C18.2998 18.4954 18.4954 18.2998 18.5772 18.0505L18.9887 16.7963C19.0715 16.544 19.4285 16.544 19.5113 16.7963L19.9228 18.0505C20.0046 18.2998 20.2002 18.4954 20.4495 18.5772L21.7037 18.9887C21.956 19.0715 21.956 19.4285 21.7037 19.5113L20.4495 19.9228C20.2002 20.0046 20.0046 20.2002 19.9228 20.4495Z"
|
|
37
|
+
fill="#FFBC0F"
|
|
38
|
+
stroke="none"
|
|
39
|
+
/>
|
|
40
|
+
</svg>
|
|
41
|
+
</IconElement>
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
AiIcon.displayName = 'AiIcon'
|