@oliasoft-open-source/react-ui-library 3.12.0-beta-19 → 3.12.0-beta-21
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/common-enum.d.ts +73 -0
- package/dist/common-enum.js +81 -0
- package/dist/components/accordion/accordion.d.ts +4 -0
- package/dist/components/accordion/accordion.interface.d.ts +17 -0
- package/dist/components/accordion/accordion.interface.js +1 -0
- package/dist/components/accordion/accordion.js +17 -0
- package/dist/components/accordion/accordion.stories.d.ts +11 -0
- package/dist/components/accordion/accordion.stories.js +140 -0
- package/dist/components/accordion/chevron/chevron.d.ts +5 -0
- package/dist/components/accordion/chevron/chevron.js +8 -0
- package/dist/components/accordion/enum.d.ts +4 -0
- package/dist/components/accordion/enum.js +5 -0
- package/dist/components/accordion/helpers/accordion-with-default-toggle.d.ts +12 -0
- package/dist/components/accordion/helpers/accordion-with-default-toggle.js +35 -0
- package/dist/components/actions/actions.d.ts +14 -0
- package/dist/components/actions/actions.interface.d.ts +25 -0
- package/dist/components/actions/actions.interface.js +1 -0
- package/dist/components/actions/actions.js +66 -0
- package/dist/components/actions/actions.stories.d.ts +25 -0
- package/dist/components/actions/actions.stories.js +67 -0
- package/dist/components/badge/badge.d.ts +10 -0
- package/dist/components/badge/badge.js +21 -0
- package/dist/components/badge/badge.stories.d.ts +7 -0
- package/dist/components/badge/badge.stories.js +21 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +6 -0
- package/dist/components/breadcrumb/breadcrumb.js +11 -0
- package/dist/components/breadcrumb/breadcrumb.stories.d.ts +5 -0
- package/dist/components/breadcrumb/breadcrumb.stories.js +36 -0
- package/dist/components/breadcrumb/enum.d.ts +5 -0
- package/dist/components/breadcrumb/enum.js +6 -0
- package/dist/components/breadcrumb/link.d.ts +12 -0
- package/dist/components/breadcrumb/link.js +12 -0
- package/dist/components/button/button.d.ts +31 -0
- package/dist/components/button/button.js +52 -0
- package/dist/components/button/button.stories.d.ts +13 -0
- package/dist/components/button/button.stories.js +63 -0
- package/dist/components/button/enum.d.ts +5 -0
- package/dist/components/button/enum.js +6 -0
- package/dist/components/button-group/button-group.d.ts +38 -0
- package/dist/components/button-group/button-group.js +83 -0
- package/dist/components/button-group/button-group.stories-data.d.ts +6 -0
- package/dist/components/button-group/button-group.stories-data.js +61 -0
- package/dist/components/button-group/button-group.stories.d.ts +9 -0
- package/dist/components/button-group/button-group.stories.js +51 -0
- package/dist/components/card/card.d.ts +10 -0
- package/dist/components/card/card.js +6 -0
- package/dist/components/card/card.stories.d.ts +8 -0
- package/dist/components/card/card.stories.js +27 -0
- package/dist/components/check-box/check-box.d.ts +19 -0
- package/dist/components/check-box/check-box.js +19 -0
- package/dist/components/check-box/check-box.stories.d.ts +6 -0
- package/dist/components/check-box/check-box.stories.js +29 -0
- package/dist/components/color/color.stories-data.d.ts +9 -0
- package/dist/components/color/color.stories-data.js +55 -0
- package/dist/components/dialog/dialog.d.ts +17 -0
- package/dist/components/dialog/dialog.js +18 -0
- package/dist/components/divider/divider.d.ts +9 -0
- package/dist/components/divider/divider.js +19 -0
- package/dist/components/divider/divider.stories.d.ts +7 -0
- package/dist/components/divider/divider.stories.js +41 -0
- package/dist/components/drawer/drawer-resize-wrapper.d.ts +2 -0
- package/dist/components/drawer/drawer-resize-wrapper.js +33 -0
- package/dist/components/drawer/drawer-tabs.d.ts +2 -0
- package/dist/components/drawer/drawer-tabs.js +15 -0
- package/dist/components/drawer/drawer.constants.d.ts +2 -0
- package/dist/components/drawer/drawer.constants.js +2 -0
- package/dist/components/drawer/drawer.d.ts +2 -0
- package/dist/components/drawer/drawer.interface.d.ts +55 -0
- package/dist/components/drawer/drawer.interface.js +1 -0
- package/dist/components/drawer/drawer.js +80 -0
- package/dist/components/drawer/drawer.stories.d.ts +40 -0
- package/dist/components/drawer/drawer.stories.js +176 -0
- package/dist/components/empty/empty.d.ts +8 -0
- package/dist/components/empty/empty.js +6 -0
- package/dist/components/empty/empty.stories.d.ts +5 -0
- package/dist/components/empty/empty.stories.js +19 -0
- package/dist/components/file-input/enum.d.ts +6 -0
- package/dist/components/file-input/enum.js +7 -0
- package/dist/components/file-input/file-input.d.ts +18 -0
- package/dist/components/file-input/file-input.js +47 -0
- package/dist/components/file-input/file-input.stories.d.ts +7 -0
- package/dist/components/file-input/file-input.stories.js +65 -0
- package/dist/components/form/field.d.ts +16 -0
- package/dist/components/form/field.js +13 -0
- package/dist/components/form/field.stories.d.ts +12 -0
- package/dist/components/form/field.stories.js +51 -0
- package/dist/components/form/form.stories.d.ts +27 -0
- package/dist/components/form/form.stories.js +76 -0
- package/dist/components/heading/heading.d.ts +19 -0
- package/dist/components/heading/heading.js +9 -0
- package/dist/components/heading/heading.stories.d.ts +10 -0
- package/dist/components/heading/heading.stories.js +46 -0
- package/dist/components/help-icon/help-icon.d.ts +10 -0
- package/dist/components/help-icon/help-icon.js +19 -0
- package/dist/components/help-icon/help-icon.stories.d.ts +10 -0
- package/dist/components/help-icon/help-icon.stories.js +37 -0
- package/dist/components/icon/icon.d.ts +16 -0
- package/dist/components/icon/icon.js +31 -0
- package/dist/components/icon/icon.stories.d.ts +25 -0
- package/dist/components/icon/icon.stories.js +37 -0
- package/dist/components/icon/named-icon.d.ts +6 -0
- package/dist/components/icon/named-icon.js +418 -0
- package/dist/components/input/input.d.ts +26 -0
- package/dist/components/input/input.js +40 -0
- package/dist/components/input/input.stories.d.ts +5 -0
- package/dist/components/input/input.stories.js +22 -0
- package/dist/components/input-group/input-group-addon/input-group-addon.d.ts +8 -0
- package/dist/components/input-group/input-group-addon/input-group-addon.js +20 -0
- package/dist/components/input-group/input-group.d.ts +7 -0
- package/dist/components/input-group/input-group.js +27 -0
- package/dist/components/input-group/input-group.stories.d.ts +8 -0
- package/dist/components/input-group/input-group.stories.js +65 -0
- package/dist/components/label/label.d.ts +24 -0
- package/dist/components/label/label.js +14 -0
- package/dist/components/label/label.stories.d.ts +10 -0
- package/dist/components/label/label.stories.js +42 -0
- package/dist/components/layout/column/column.d.ts +18 -0
- package/dist/components/layout/column/column.js +13 -0
- package/dist/components/layout/column/styles.d.ts +15 -0
- package/dist/components/layout/column/styles.js +41 -0
- package/dist/components/layout/column.stories.d.ts +20 -0
- package/dist/components/layout/column.stories.js +53 -0
- package/dist/components/layout/flex/flex.d.ts +11 -0
- package/dist/components/layout/flex/flex.js +18 -0
- package/dist/components/layout/flex/flex.stories.d.ts +10 -0
- package/dist/components/layout/flex/flex.stories.js +52 -0
- package/dist/components/layout/form-row/form-row.d.ts +5 -0
- package/dist/components/layout/form-row/form-row.js +5 -0
- package/dist/components/layout/grid/grid.d.ts +11 -0
- package/dist/components/layout/grid/grid.js +41 -0
- package/dist/components/layout/grid/grid.stories.d.ts +9 -0
- package/dist/components/layout/grid/grid.stories.js +48 -0
- package/dist/components/layout/page/page.d.ts +9 -0
- package/dist/components/layout/page/page.js +11 -0
- package/dist/components/layout/page.stories.d.ts +9 -0
- package/dist/components/layout/page.stories.js +32 -0
- package/dist/components/layout/placeholder.d.ts +1 -0
- package/dist/components/layout/placeholder.js +1 -0
- package/dist/components/layout/print-header/print-header.d.ts +7 -0
- package/dist/components/layout/print-header/print-header.js +3 -0
- package/dist/components/layout/row/row.d.ts +15 -0
- package/dist/components/layout/row/row.js +24 -0
- package/dist/components/layout/spacer/spacer.d.ts +6 -0
- package/dist/components/layout/spacer/spacer.js +8 -0
- package/dist/components/list/list-row/item-content.d.ts +2 -0
- package/dist/components/list/list-row/item-content.js +9 -0
- package/dist/components/list/list-row/label.d.ts +2 -0
- package/dist/components/list/list-row/label.js +6 -0
- package/dist/components/list/list-row/list-heading.d.ts +3 -0
- package/dist/components/list/list-row/list-heading.js +10 -0
- package/dist/components/list/list-row/list-row.d.ts +3 -0
- package/dist/components/list/list-row/list-row.interface.d.ts +105 -0
- package/dist/components/list/list-row/list-row.interface.js +1 -0
- package/dist/components/list/list-row/list-row.js +56 -0
- package/dist/components/list/list-row/list-subheading.d.ts +3 -0
- package/dist/components/list/list-row/list-subheading.js +27 -0
- package/dist/components/list/list-row/meta-content.d.ts +2 -0
- package/dist/components/list/list-row/meta-content.js +12 -0
- package/dist/components/list/list-row/meta-count.d.ts +2 -0
- package/dist/components/list/list-row/meta-count.js +5 -0
- package/dist/components/list/list-row/name.d.ts +3 -0
- package/dist/components/list/list-row/name.js +12 -0
- package/dist/components/list/list.d.ts +2 -0
- package/dist/components/list/list.interface.d.ts +55 -0
- package/dist/components/list/list.interface.js +1 -0
- package/dist/components/list/list.js +86 -0
- package/dist/components/list/list.stories-data.d.ts +310 -0
- package/dist/components/list/list.stories-data.js +270 -0
- package/dist/components/list/list.stories.d.ts +22 -0
- package/dist/components/list/list.stories.js +411 -0
- package/dist/components/list/toggle-narrow.d.ts +2 -0
- package/dist/components/list/toggle-narrow.js +7 -0
- package/dist/components/loader/loader.d.ts +14 -0
- package/dist/components/loader/loader.js +15 -0
- package/dist/components/loader/loader.stories.d.ts +32 -0
- package/dist/components/loader/loader.stories.js +92 -0
- package/dist/components/menu/enum.d.ts +11 -0
- package/dist/components/menu/enum.js +13 -0
- package/dist/components/menu/index.d.ts +4 -0
- package/dist/components/menu/index.js +8 -0
- package/dist/components/menu/layer/divider.d.ts +1 -0
- package/dist/components/menu/layer/divider.js +3 -0
- package/dist/components/menu/layer/heading.d.ts +8 -0
- package/dist/components/menu/layer/heading.js +3 -0
- package/dist/components/menu/layer/layer.d.ts +15 -0
- package/dist/components/menu/layer/layer.js +47 -0
- package/dist/components/menu/layer/option.d.ts +19 -0
- package/dist/components/menu/layer/option.js +22 -0
- package/dist/components/menu/layer/path.d.ts +5 -0
- package/dist/components/menu/layer/path.js +30 -0
- package/dist/components/menu/layer/placementOptions.d.ts +3 -0
- package/dist/components/menu/layer/placementOptions.js +6 -0
- package/dist/components/menu/layer/section.d.ts +10 -0
- package/dist/components/menu/layer/section.js +23 -0
- package/dist/components/menu/menu.d.ts +3 -0
- package/dist/components/menu/menu.interface.d.ts +82 -0
- package/dist/components/menu/menu.interface.js +1 -0
- package/dist/components/menu/menu.js +92 -0
- package/dist/components/menu/menu.stories-data.d.ts +101 -0
- package/dist/components/menu/menu.stories-data.js +182 -0
- package/dist/components/menu/menu.stories.d.ts +31 -0
- package/dist/components/menu/menu.stories.js +104 -0
- package/dist/components/menu/menu.test.d.ts +1 -0
- package/dist/components/menu/menu.test.js +46 -0
- package/dist/components/menu/trigger/button.d.ts +14 -0
- package/dist/components/menu/trigger/button.js +13 -0
- package/dist/components/menu/trigger/component.d.ts +8 -0
- package/dist/components/menu/trigger/component.js +6 -0
- package/dist/components/menu/trigger/text.d.ts +10 -0
- package/dist/components/menu/trigger/text.js +9 -0
- package/dist/components/menu/trigger/trigger.d.ts +27 -0
- package/dist/components/menu/trigger/trigger.js +35 -0
- package/dist/components/message/dismiss.d.ts +8 -0
- package/dist/components/message/dismiss.js +17 -0
- package/dist/components/message/enum.d.ts +9 -0
- package/dist/components/message/enum.js +11 -0
- package/dist/components/message/message.d.ts +19 -0
- package/dist/components/message/message.js +49 -0
- package/dist/components/message/message.stories.d.ts +11 -0
- package/dist/components/message/message.stories.js +82 -0
- package/dist/components/modal/modal.d.ts +8 -0
- package/dist/components/modal/modal.js +7 -0
- package/dist/components/modal/modal.stories.d.ts +12 -0
- package/dist/components/modal/modal.stories.js +107 -0
- package/dist/components/number-input/number-input.d.ts +26 -0
- package/dist/components/number-input/number-input.js +66 -0
- package/dist/components/number-input/number-input.stories.d.ts +13 -0
- package/dist/components/number-input/number-input.stories.js +43 -0
- package/dist/components/option-dropdown/enum.d.ts +5 -0
- package/dist/components/option-dropdown/enum.js +6 -0
- package/dist/components/option-dropdown/heading.d.ts +4 -0
- package/dist/components/option-dropdown/heading.js +3 -0
- package/dist/components/option-dropdown/layer.d.ts +16 -0
- package/dist/components/option-dropdown/layer.js +43 -0
- package/dist/components/option-dropdown/option-dropdown.d.ts +19 -0
- package/dist/components/option-dropdown/option-dropdown.js +17 -0
- package/dist/components/option-dropdown/option-dropdown.stories.d.ts +5 -0
- package/dist/components/option-dropdown/option-dropdown.stories.js +35 -0
- package/dist/components/option-dropdown/option.d.ts +10 -0
- package/dist/components/option-dropdown/option.js +7 -0
- package/dist/components/pagination/pagination.d.ts +13 -0
- package/dist/components/pagination/pagination.interface.d.ts +15 -0
- package/dist/components/pagination/pagination.interface.js +1 -0
- package/dist/components/pagination/pagination.js +33 -0
- package/dist/components/pagination/pagination.stories.d.ts +7 -0
- package/dist/components/pagination/pagination.stories.js +62 -0
- package/dist/components/pagination/pagination.test.d.ts +1 -0
- package/dist/components/pagination/pagination.test.js +84 -0
- package/dist/components/pagination/pagination.viewdata.d.ts +17 -0
- package/dist/components/pagination/pagination.viewdata.js +53 -0
- package/dist/components/pop-confirm/content.d.ts +9 -0
- package/dist/components/pop-confirm/content.js +5 -0
- package/dist/components/pop-confirm/pop-confirm.d.ts +14 -0
- package/dist/components/pop-confirm/pop-confirm.js +7 -0
- package/dist/components/pop-confirm/pop-confirm.stories.d.ts +4 -0
- package/dist/components/pop-confirm/pop-confirm.stories.js +43 -0
- package/dist/components/popover/popover.d.ts +14 -0
- package/dist/components/popover/popover.js +39 -0
- package/dist/components/popover/popover.stories.d.ts +7 -0
- package/dist/components/popover/popover.stories.js +43 -0
- package/dist/components/portal/portal.d.ts +6 -0
- package/dist/components/portal/portal.js +11 -0
- package/dist/components/portal/portal.stories.d.ts +7 -0
- package/dist/components/portal/portal.stories.js +51 -0
- package/dist/components/progress-bar/progress-bar.d.ts +9 -0
- package/dist/components/progress-bar/progress-bar.js +21 -0
- package/dist/components/progress-bar/progress-bar.stories.d.ts +4 -0
- package/dist/components/progress-bar/progress-bar.stories.js +16 -0
- package/dist/components/radio-button/radio-button.d.ts +27 -0
- package/dist/components/radio-button/radio-button.js +45 -0
- package/dist/components/radio-button/radio-button.stories.d.ts +5 -0
- package/dist/components/radio-button/radio-button.stories.js +45 -0
- package/dist/components/radio-button/radio-input.d.ts +16 -0
- package/dist/components/radio-button/radio-input.js +9 -0
- package/dist/components/rich-text-input/rich-text-input.d.ts +10 -0
- package/dist/components/rich-text-input/rich-text-input.js +35 -0
- package/dist/components/rich-text-input/rich-text-input.stories.d.ts +9 -0
- package/dist/components/rich-text-input/rich-text-input.stories.js +60 -0
- package/dist/components/rich-text-input/rich-text-toolbar/enum.d.ts +7 -0
- package/dist/components/rich-text-input/rich-text-toolbar/enum.js +8 -0
- package/dist/components/rich-text-input/rich-text-toolbar/rich-text-toolbar.d.ts +7 -0
- package/dist/components/rich-text-input/rich-text-toolbar/rich-text-toolbar.js +42 -0
- package/dist/components/select/custom-select/custom-select.d.ts +2 -0
- package/dist/components/select/custom-select/custom-select.interface.d.ts +47 -0
- package/dist/components/select/custom-select/custom-select.interface.js +1 -0
- package/dist/components/select/custom-select/custom-select.js +51 -0
- package/dist/components/select/custom-select/custom-select.reducer.d.ts +6 -0
- package/dist/components/select/custom-select/custom-select.reducer.js +140 -0
- package/dist/components/select/custom-select/enum.d.ts +11 -0
- package/dist/components/select/custom-select/enum.js +12 -0
- package/dist/components/select/custom-select/helper.d.ts +3 -0
- package/dist/components/select/custom-select/helper.js +55 -0
- package/dist/components/select/custom-select/hooks/enum.d.ts +20 -0
- package/dist/components/select/custom-select/hooks/enum.js +22 -0
- package/dist/components/select/custom-select/hooks/use-custom-select-logic.d.ts +39 -0
- package/dist/components/select/custom-select/hooks/use-custom-select-logic.js +222 -0
- package/dist/components/select/custom-select/layer/heading.d.ts +3 -0
- package/dist/components/select/custom-select/layer/heading.js +5 -0
- package/dist/components/select/custom-select/layer/layer.d.ts +17 -0
- package/dist/components/select/custom-select/layer/layer.js +25 -0
- package/dist/components/select/custom-select/layer/option.d.ts +15 -0
- package/dist/components/select/custom-select/layer/option.js +10 -0
- package/dist/components/select/custom-select/layer/placementOptions.d.ts +10 -0
- package/dist/components/select/custom-select/layer/placementOptions.js +7 -0
- package/dist/components/select/custom-select/layer/section.d.ts +15 -0
- package/dist/components/select/custom-select/layer/section.js +16 -0
- package/dist/components/select/custom-select/reducer.interface.d.ts +34 -0
- package/dist/components/select/custom-select/reducer.interface.js +1 -0
- package/dist/components/select/custom-select/trigger/input.d.ts +14 -0
- package/dist/components/select/custom-select/trigger/input.js +21 -0
- package/dist/components/select/custom-select/trigger/multi-selected-options.d.ts +8 -0
- package/dist/components/select/custom-select/trigger/multi-selected-options.js +41 -0
- package/dist/components/select/custom-select/trigger/trigger.d.ts +34 -0
- package/dist/components/select/custom-select/trigger/trigger.js +53 -0
- package/dist/components/select/native-select/native-select.d.ts +29 -0
- package/dist/components/select/native-select/native-select.js +61 -0
- package/dist/components/select/select.d.ts +2 -0
- package/dist/components/select/select.input.d.ts +21 -0
- package/dist/components/select/select.input.js +114 -0
- package/dist/components/select/select.interface.d.ts +39 -0
- package/dist/components/select/select.interface.js +1 -0
- package/dist/components/select/select.js +61 -0
- package/dist/components/select/select.stories-data.d.ts +25 -0
- package/dist/components/select/select.stories-data.js +113 -0
- package/dist/components/select/select.stories.d.ts +30 -0
- package/dist/components/select/select.stories.js +93 -0
- package/dist/components/select/select.test.d.ts +1 -0
- package/dist/components/select/select.test.js +303 -0
- package/dist/components/side-bar/link.d.ts +17 -0
- package/dist/components/side-bar/link.js +20 -0
- package/dist/components/side-bar/sections.d.ts +21 -0
- package/dist/components/side-bar/sections.js +7 -0
- package/dist/components/side-bar/side-bar.d.ts +26 -0
- package/dist/components/side-bar/side-bar.js +28 -0
- package/dist/components/side-bar/side-bar.stories.d.ts +5 -0
- package/dist/components/side-bar/side-bar.stories.js +90 -0
- package/dist/components/slider/slider-tooltip.d.ts +5 -0
- package/dist/components/slider/slider-tooltip.js +13 -0
- package/dist/components/slider/slider.d.ts +37 -0
- package/dist/components/slider/slider.js +57 -0
- package/dist/components/slider/slider.stories.d.ts +16 -0
- package/dist/components/slider/slider.stories.js +85 -0
- package/dist/components/spinner/spinner.d.ts +7 -0
- package/dist/components/spinner/spinner.js +6 -0
- package/dist/components/spinner/spinner.stories.d.ts +4 -0
- package/dist/components/spinner/spinner.stories.js +14 -0
- package/dist/components/table/cell/cell-types/action-cell.d.ts +5 -0
- package/dist/components/table/cell/cell-types/action-cell.js +5 -0
- package/dist/components/table/cell/cell-types/cell-help-icon.d.ts +5 -0
- package/dist/components/table/cell/cell-types/cell-help-icon.js +7 -0
- package/dist/components/table/cell/cell-types/cell-library-icon.d.ts +5 -0
- package/dist/components/table/cell/cell-types/cell-library-icon.js +8 -0
- package/dist/components/table/cell/cell-types/cell-types.interface.d.ts +150 -0
- package/dist/components/table/cell/cell-types/cell-types.interface.js +1 -0
- package/dist/components/table/cell/cell-types/check-box-cell.d.ts +7 -0
- package/dist/components/table/cell/cell-types/check-box-cell.js +5 -0
- package/dist/components/table/cell/cell-types/icon-cell.d.ts +5 -0
- package/dist/components/table/cell/cell-types/icon-cell.js +9 -0
- package/dist/components/table/cell/cell-types/input-cell.d.ts +8 -0
- package/dist/components/table/cell/cell-types/input-cell.js +6 -0
- package/dist/components/table/cell/cell-types/link-cell.d.ts +7 -0
- package/dist/components/table/cell/cell-types/link-cell.js +23 -0
- package/dist/components/table/cell/cell-types/number-input-cell.d.ts +7 -0
- package/dist/components/table/cell/cell-types/number-input-cell.js +5 -0
- package/dist/components/table/cell/cell-types/popover-cell.d.ts +6 -0
- package/dist/components/table/cell/cell-types/popover-cell.js +8 -0
- package/dist/components/table/cell/cell-types/select-cell.d.ts +8 -0
- package/dist/components/table/cell/cell-types/select-cell.js +6 -0
- package/dist/components/table/cell/cell-types/slider-cell.d.ts +6 -0
- package/dist/components/table/cell/cell-types/slider-cell.js +6 -0
- package/dist/components/table/cell/cell-types/sort-cell.d.ts +5 -0
- package/dist/components/table/cell/cell-types/sort-cell.js +9 -0
- package/dist/components/table/cell/cell-types/static-cell.d.ts +7 -0
- package/dist/components/table/cell/cell-types/static-cell.js +16 -0
- package/dist/components/table/cell/cell-wrapper.d.ts +8 -0
- package/dist/components/table/cell/cell-wrapper.js +33 -0
- package/dist/components/table/cell/cell.d.ts +12 -0
- package/dist/components/table/cell/cell.js +45 -0
- package/dist/components/table/cell/cell.stories.d.ts +21 -0
- package/dist/components/table/cell/cell.stories.js +209 -0
- package/dist/components/table/cell/input-cell-wrapper.d.ts +7 -0
- package/dist/components/table/cell/input-cell-wrapper.js +8 -0
- package/dist/components/table/enum.d.ts +9 -0
- package/dist/components/table/enum.js +10 -0
- package/dist/components/table/footer/footer.d.ts +10 -0
- package/dist/components/table/footer/footer.js +18 -0
- package/dist/components/table/footer/footer.stories.d.ts +3 -0
- package/dist/components/table/footer/footer.stories.js +19 -0
- package/dist/components/table/helper.d.ts +22 -0
- package/dist/components/table/helper.js +49 -0
- package/dist/components/table/helper.test.d.ts +1 -0
- package/dist/components/table/helper.test.js +127 -0
- package/dist/components/table/row/expanded-content-row.d.ts +7 -0
- package/dist/components/table/row/expanded-content-row.js +6 -0
- package/dist/components/table/row/row.d.ts +37 -0
- package/dist/components/table/row/row.js +46 -0
- package/dist/components/table/row/row.stories.d.ts +9 -0
- package/dist/components/table/row/row.stories.js +132 -0
- package/dist/components/table/table-scroll-wrapper.d.ts +13 -0
- package/dist/components/table/table-scroll-wrapper.js +24 -0
- package/dist/components/table/table.d.ts +34 -0
- package/dist/components/table/table.js +91 -0
- package/dist/components/table/table.stories-data.d.ts +1970 -0
- package/dist/components/table/table.stories-data.js +996 -0
- package/dist/components/table/table.stories.d.ts +17 -0
- package/dist/components/table/table.stories.js +521 -0
- package/dist/components/table/table.test.d.ts +1 -0
- package/dist/components/table/table.test.js +27 -0
- package/dist/components/table/table.viewdata.d.ts +16 -0
- package/dist/components/table/table.viewdata.js +17 -0
- package/dist/components/table/title/title.d.ts +8 -0
- package/dist/components/table/title/title.js +22 -0
- package/dist/components/table/title/title.stories.d.ts +11 -0
- package/dist/components/table/title/title.stories.js +53 -0
- package/dist/components/tabs/content.d.ts +7 -0
- package/dist/components/tabs/content.js +6 -0
- package/dist/components/tabs/label.d.ts +14 -0
- package/dist/components/tabs/label.js +8 -0
- package/dist/components/tabs/tabs.d.ts +33 -0
- package/dist/components/tabs/tabs.js +64 -0
- package/dist/components/tabs/tabs.stories.d.ts +10 -0
- package/dist/components/tabs/tabs.stories.js +86 -0
- package/dist/components/text/text.d.ts +15 -0
- package/dist/components/text/text.js +6 -0
- package/dist/components/text/text.stories.d.ts +6 -0
- package/dist/components/text/text.stories.js +22 -0
- package/dist/components/text-link/text-link.d.ts +9 -0
- package/dist/components/text-link/text-link.js +5 -0
- package/dist/components/text-link/text-link.stories.d.ts +5 -0
- package/dist/components/text-link/text-link.stories.js +17 -0
- package/dist/components/textarea/textarea.d.ts +22 -0
- package/dist/components/textarea/textarea.js +15 -0
- package/dist/components/textarea/textarea.stories.d.ts +4 -0
- package/dist/components/textarea/textarea.stories.js +18 -0
- package/dist/components/toaster/toaster.d.ts +19 -0
- package/dist/components/toaster/toaster.js +51 -0
- package/dist/components/toaster/toaster.stories.d.ts +15 -0
- package/dist/components/toaster/toaster.stories.js +84 -0
- package/dist/components/toggle/toggle.d.ts +14 -0
- package/dist/components/toggle/toggle.js +17 -0
- package/dist/components/toggle/toggle.stories.d.ts +10 -0
- package/dist/components/toggle/toggle.stories.js +41 -0
- package/dist/components/tooltip/tooltip-layer.d.ts +16 -0
- package/dist/components/tooltip/tooltip-layer.js +19 -0
- package/dist/components/tooltip/tooltip.d.ts +19 -0
- package/dist/components/tooltip/tooltip.js +31 -0
- package/dist/components/tooltip/tooltip.stories.d.ts +11 -0
- package/dist/components/tooltip/tooltip.stories.js +50 -0
- package/dist/components/tooltip/tooltip.test-case.stories.d.ts +4 -0
- package/dist/components/tooltip/tooltip.test-case.stories.js +20 -0
- package/dist/components/top-bar/element/element.d.ts +32 -0
- package/dist/components/top-bar/element/element.js +28 -0
- package/dist/components/top-bar/element/enum.d.ts +6 -0
- package/dist/components/top-bar/element/enum.js +7 -0
- package/dist/components/top-bar/element/link.d.ts +11 -0
- package/dist/components/top-bar/element/link.js +15 -0
- package/dist/components/top-bar/title.d.ts +9 -0
- package/dist/components/top-bar/title.js +7 -0
- package/dist/components/top-bar/top-bar.d.ts +11 -0
- package/dist/components/top-bar/top-bar.js +19 -0
- package/dist/components/top-bar/top-bar.stories.d.ts +6 -0
- package/dist/components/top-bar/top-bar.stories.js +124 -0
- package/dist/components/top-bar/top-bar.testcase.stories.d.ts +5 -0
- package/dist/components/top-bar/top-bar.testcase.stories.js +53 -0
- package/dist/components/top-bar/warning.d.ts +5 -0
- package/dist/components/top-bar/warning.js +5 -0
- package/dist/components/tree/tree-item.d.ts +10 -0
- package/dist/components/tree/tree-item.js +27 -0
- package/dist/components/tree/tree-placeholder.d.ts +4 -0
- package/dist/components/tree/tree-placeholder.js +3 -0
- package/dist/components/tree/tree.d.ts +42 -0
- package/dist/components/tree/tree.js +50 -0
- package/dist/components/tree/tree.stories-data.d.ts +126 -0
- package/dist/components/tree/tree.stories-data.js +83 -0
- package/dist/components/tree/tree.stories.d.ts +11 -0
- package/dist/components/tree/tree.stories.js +98 -0
- package/dist/helpers/disabled-context.d.ts +2 -0
- package/dist/helpers/disabled-context.js +2 -0
- package/dist/helpers/text.d.ts +1 -0
- package/dist/helpers/text.js +9 -0
- package/dist/helpers/types.d.ts +3 -0
- package/dist/helpers/types.js +8 -0
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/index.js +4 -0
- package/dist/hooks/use-focus.d.ts +4 -0
- package/dist/hooks/use-focus.js +10 -0
- package/dist/hooks/use-fonts-ready.d.ts +1 -0
- package/dist/hooks/use-fonts-ready.js +13 -0
- package/dist/hooks/use-keyboard-event.d.ts +2 -0
- package/dist/hooks/use-keyboard-event.js +14 -0
- package/dist/hooks/use-window-width.d.ts +1 -0
- package/dist/hooks/use-window-width.js +16 -0
- package/dist/index.d.ts +79 -1466
- package/dist/index.js +86 -72363
- package/dist/my-dummy.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef, useState } from 'react';
|
|
3
|
+
import cx from 'classnames';
|
|
4
|
+
import { DragDropContext, Droppable } from 'react-beautiful-dnd';
|
|
5
|
+
import InfiniteScroll from 'react-infinite-scroll-component';
|
|
6
|
+
import { Card } from '../card/card';
|
|
7
|
+
import { ListHeading } from './list-row/list-heading';
|
|
8
|
+
import { ListRow } from './list-row/list-row';
|
|
9
|
+
import styles from './list.module.less';
|
|
10
|
+
import { Loader } from '../loader/loader';
|
|
11
|
+
export const List = ({ list, bordered = false, expanding = false, narrow = false, toggleNarrow = false, onToggleNarrow = () => { }, invokeEditOnRowClick = true, noHeader = false, stickyHeader, draggable = false, onListReorder = () => { }, marginBottom = 0, height, testId, scrollDetails = {
|
|
12
|
+
scrollable: false,
|
|
13
|
+
hideScrollbar: false,
|
|
14
|
+
triggerScrollToActiveItem: false,
|
|
15
|
+
infiniteScroll: false,
|
|
16
|
+
limit: 10,
|
|
17
|
+
infiniteScrollTarget: undefined,
|
|
18
|
+
}, }) => {
|
|
19
|
+
const { scrollable, hideScrollbar, triggerScrollToActiveItem, infiniteScroll, infiniteScrollTarget, } = scrollDetails;
|
|
20
|
+
const listHeadingRef = useRef(null);
|
|
21
|
+
const listRowRefs = useRef([]);
|
|
22
|
+
const listContainerRef = useRef(null);
|
|
23
|
+
const MIN_ITEM_HEIGHT = 44;
|
|
24
|
+
const pageSize = infiniteScroll
|
|
25
|
+
? Math.ceil(window.innerHeight / MIN_ITEM_HEIGHT)
|
|
26
|
+
: list.items.length;
|
|
27
|
+
const [numVisibleRows, setNumVisibleRows] = useState(pageSize);
|
|
28
|
+
const [hasMore, setHasMore] = useState(numVisibleRows < list?.items.length);
|
|
29
|
+
// update length of ref array if items are added or removed
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
listRowRefs.current = listRowRefs.current.slice(0, list.items.length);
|
|
32
|
+
}, [list.items.length]);
|
|
33
|
+
const loadMoreItems = () => {
|
|
34
|
+
if (numVisibleRows >= list.items.length) {
|
|
35
|
+
setHasMore(false);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const newVisibleRows = pageSize + numVisibleRows;
|
|
39
|
+
setNumVisibleRows(newVisibleRows);
|
|
40
|
+
};
|
|
41
|
+
const findFirstActiveItemIndex = (items) => items.findIndex((item) => item.active === true);
|
|
42
|
+
const setScrollToActiveItem = (activeItemIndex) => {
|
|
43
|
+
if (!listContainerRef.current || !listHeadingRef.current)
|
|
44
|
+
return;
|
|
45
|
+
// account for list row border length.
|
|
46
|
+
const itemBorderLength = 1;
|
|
47
|
+
if (triggerScrollToActiveItem && activeItemIndex >= 0) {
|
|
48
|
+
// add heights from div of items up until the active item
|
|
49
|
+
const itemOffsets = listRowRefs.current.reduce((acc, val, index) => {
|
|
50
|
+
if (index < activeItemIndex) {
|
|
51
|
+
return acc + val.clientHeight + itemBorderLength;
|
|
52
|
+
}
|
|
53
|
+
return acc;
|
|
54
|
+
}, 0);
|
|
55
|
+
// center active item
|
|
56
|
+
const centerOffset = listContainerRef.current.clientHeight / 2 -
|
|
57
|
+
listRowRefs.current[activeItemIndex].clientHeight / 2;
|
|
58
|
+
const scrollOffset = itemOffsets - centerOffset;
|
|
59
|
+
// if sticky header, offset by half of heading div height
|
|
60
|
+
if (stickyHeader) {
|
|
61
|
+
const headingOffset = listHeadingRef.current.clientHeight / 2;
|
|
62
|
+
listContainerRef.current.scrollTop = scrollOffset + headingOffset;
|
|
63
|
+
}
|
|
64
|
+
// if not sticky header, offset by heading div height
|
|
65
|
+
const headingOffset = listHeadingRef.current.clientHeight;
|
|
66
|
+
listContainerRef.current.scrollTop = scrollOffset + headingOffset;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
useEffect(() => {
|
|
70
|
+
if (triggerScrollToActiveItem) {
|
|
71
|
+
const activeItemIndex = findFirstActiveItemIndex(list?.items);
|
|
72
|
+
setScrollToActiveItem(activeItemIndex);
|
|
73
|
+
}
|
|
74
|
+
}, [
|
|
75
|
+
listContainerRef.current,
|
|
76
|
+
listHeadingRef.current,
|
|
77
|
+
triggerScrollToActiveItem,
|
|
78
|
+
]);
|
|
79
|
+
return (_jsx(DragDropContext, { onDragEnd: (result) => {
|
|
80
|
+
const from = result?.source?.index;
|
|
81
|
+
const to = result?.destination?.index;
|
|
82
|
+
onListReorder({ from, to });
|
|
83
|
+
}, children: _jsx(Droppable, { droppableId: "droppable", children: (provided, snapshot) => {
|
|
84
|
+
return (_jsx("div", { className: cx(narrow ? styles.narrow : '', scrollable ? styles.scrollableList : '', hideScrollbar ? styles.hideScrollbar : ''), "data-testid": testId, id: "scrollableDiv", style: { height, marginBottom }, ref: listContainerRef, children: _jsx("div", { ref: provided.innerRef, ...provided.droppableProps, children: _jsxs(Card, { bordered: bordered, padding: false, children: [!noHeader && (_jsx(ListHeading, { name: list.name, actions: list.actions, toggleNarrow: toggleNarrow, onToggleNarrow: onToggleNarrow, stickyHeader: stickyHeader, ref: listHeadingRef })), _jsx("div", { className: cx(styles.list, bordered ? styles.bordered : ''), children: infiniteScroll ? (_jsx(InfiniteScroll, { dataLength: numVisibleRows, next: loadMoreItems, hasMore: hasMore, scrollableTarget: infiniteScrollTarget || 'scrollableDiv', loader: _jsx(Loader, {}), children: _jsx(ListRow, { draggable: draggable, items: list.items.slice(0, numVisibleRows), expanding: expanding, invokeEditOnRowClick: invokeEditOnRowClick, onListReorder: onListReorder, provided: provided, snapshot: snapshot, ref: listRowRefs }) })) : (_jsx(ListRow, { draggable: draggable, items: list.items, expanding: expanding, invokeEditOnRowClick: invokeEditOnRowClick, onListReorder: onListReorder, provided: provided, snapshot: snapshot, ref: listRowRefs })) })] }) }) }));
|
|
85
|
+
} }) }));
|
|
86
|
+
};
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IListItem } from "./list-row/list-row.interface";
|
|
3
|
+
export declare const items: IListItem[];
|
|
4
|
+
export declare const list: {
|
|
5
|
+
items: IListItem[];
|
|
6
|
+
};
|
|
7
|
+
export declare const listHeader: {
|
|
8
|
+
name: string;
|
|
9
|
+
actions: ({
|
|
10
|
+
label: string;
|
|
11
|
+
subActions: {
|
|
12
|
+
label: string;
|
|
13
|
+
icon: string;
|
|
14
|
+
onClick: () => void;
|
|
15
|
+
}[];
|
|
16
|
+
primary?: undefined;
|
|
17
|
+
icon?: undefined;
|
|
18
|
+
onClick?: undefined;
|
|
19
|
+
} | {
|
|
20
|
+
label: string;
|
|
21
|
+
primary: boolean;
|
|
22
|
+
icon: string;
|
|
23
|
+
onClick: () => void;
|
|
24
|
+
subActions?: undefined;
|
|
25
|
+
})[];
|
|
26
|
+
items: IListItem[];
|
|
27
|
+
};
|
|
28
|
+
export declare const listSubheadings: {
|
|
29
|
+
items: IListItem[];
|
|
30
|
+
name: string;
|
|
31
|
+
actions: ({
|
|
32
|
+
label: string;
|
|
33
|
+
subActions: {
|
|
34
|
+
label: string;
|
|
35
|
+
icon: string;
|
|
36
|
+
onClick: () => void;
|
|
37
|
+
}[];
|
|
38
|
+
primary?: undefined;
|
|
39
|
+
icon?: undefined;
|
|
40
|
+
onClick?: undefined;
|
|
41
|
+
} | {
|
|
42
|
+
label: string;
|
|
43
|
+
primary: boolean;
|
|
44
|
+
icon: string;
|
|
45
|
+
onClick: () => void;
|
|
46
|
+
subActions?: undefined;
|
|
47
|
+
})[];
|
|
48
|
+
};
|
|
49
|
+
export declare const listJsx: {
|
|
50
|
+
name: import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
items: {
|
|
52
|
+
name: import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
cursor?: string | undefined;
|
|
54
|
+
url?: string | undefined;
|
|
55
|
+
active?: boolean | undefined;
|
|
56
|
+
disabled?: boolean | undefined;
|
|
57
|
+
onClick?: ((evt: any) => void) | undefined;
|
|
58
|
+
title?: string | undefined;
|
|
59
|
+
testId?: string | undefined;
|
|
60
|
+
level?: number | undefined;
|
|
61
|
+
label?: import("./list-row/list-row.interface").ILabel | undefined;
|
|
62
|
+
actions?: import("../actions/actions.interface").IAction[] | undefined;
|
|
63
|
+
id: string | number;
|
|
64
|
+
type?: string | undefined;
|
|
65
|
+
metaCount?: number | undefined;
|
|
66
|
+
}[];
|
|
67
|
+
actions: ({
|
|
68
|
+
label: string;
|
|
69
|
+
subActions: {
|
|
70
|
+
label: string;
|
|
71
|
+
icon: string;
|
|
72
|
+
onClick: () => void;
|
|
73
|
+
}[];
|
|
74
|
+
primary?: undefined;
|
|
75
|
+
icon?: undefined;
|
|
76
|
+
onClick?: undefined;
|
|
77
|
+
} | {
|
|
78
|
+
label: string;
|
|
79
|
+
primary: boolean;
|
|
80
|
+
icon: string;
|
|
81
|
+
onClick: () => void;
|
|
82
|
+
subActions?: undefined;
|
|
83
|
+
})[];
|
|
84
|
+
};
|
|
85
|
+
export declare const listSubcomponents: {
|
|
86
|
+
items: {
|
|
87
|
+
actions: {
|
|
88
|
+
childComponent: import("react/jsx-runtime").JSX.Element;
|
|
89
|
+
}[];
|
|
90
|
+
name?: string | React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
91
|
+
cursor?: string | undefined;
|
|
92
|
+
url?: string | undefined;
|
|
93
|
+
active?: boolean | undefined;
|
|
94
|
+
disabled?: boolean | undefined;
|
|
95
|
+
onClick?: ((evt: any) => void) | undefined;
|
|
96
|
+
title?: string | undefined;
|
|
97
|
+
testId?: string | undefined;
|
|
98
|
+
level?: number | undefined;
|
|
99
|
+
label?: import("./list-row/list-row.interface").ILabel | undefined;
|
|
100
|
+
id: string | number;
|
|
101
|
+
type?: string | undefined;
|
|
102
|
+
metaCount?: number | undefined;
|
|
103
|
+
}[];
|
|
104
|
+
};
|
|
105
|
+
export declare const listSubmenus: {
|
|
106
|
+
items: {
|
|
107
|
+
actions: {
|
|
108
|
+
label: string;
|
|
109
|
+
subActions: {
|
|
110
|
+
label: string;
|
|
111
|
+
icon: string;
|
|
112
|
+
onClick: () => void;
|
|
113
|
+
}[];
|
|
114
|
+
}[];
|
|
115
|
+
name?: string | React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
116
|
+
cursor?: string | undefined;
|
|
117
|
+
url?: string | undefined;
|
|
118
|
+
active?: boolean | undefined;
|
|
119
|
+
disabled?: boolean | undefined;
|
|
120
|
+
onClick?: ((evt: any) => void) | undefined;
|
|
121
|
+
title?: string | undefined;
|
|
122
|
+
testId?: string | undefined;
|
|
123
|
+
level?: number | undefined;
|
|
124
|
+
label?: import("./list-row/list-row.interface").ILabel | undefined;
|
|
125
|
+
id: string | number;
|
|
126
|
+
type?: string | undefined;
|
|
127
|
+
metaCount?: number | undefined;
|
|
128
|
+
}[];
|
|
129
|
+
};
|
|
130
|
+
export declare const listBadges: {
|
|
131
|
+
items: {
|
|
132
|
+
label: {
|
|
133
|
+
value: string;
|
|
134
|
+
color: string;
|
|
135
|
+
};
|
|
136
|
+
name?: string | React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
137
|
+
cursor?: string | undefined;
|
|
138
|
+
url?: string | undefined;
|
|
139
|
+
active?: boolean | undefined;
|
|
140
|
+
disabled?: boolean | undefined;
|
|
141
|
+
onClick?: ((evt: any) => void) | undefined;
|
|
142
|
+
title?: string | undefined;
|
|
143
|
+
testId?: string | undefined;
|
|
144
|
+
level?: number | undefined;
|
|
145
|
+
actions?: import("../actions/actions.interface").IAction[] | undefined;
|
|
146
|
+
id: string | number;
|
|
147
|
+
type?: string | undefined;
|
|
148
|
+
metaCount?: number | undefined;
|
|
149
|
+
}[];
|
|
150
|
+
};
|
|
151
|
+
export declare const listSubheadingsBadges: {
|
|
152
|
+
items: {
|
|
153
|
+
label: {
|
|
154
|
+
value: string;
|
|
155
|
+
color: string;
|
|
156
|
+
};
|
|
157
|
+
name?: string | React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
158
|
+
cursor?: string | undefined;
|
|
159
|
+
url?: string | undefined;
|
|
160
|
+
active?: boolean | undefined;
|
|
161
|
+
disabled?: boolean | undefined;
|
|
162
|
+
onClick?: ((evt: any) => void) | undefined;
|
|
163
|
+
title?: string | undefined;
|
|
164
|
+
testId?: string | undefined;
|
|
165
|
+
level?: number | undefined;
|
|
166
|
+
actions?: import("../actions/actions.interface").IAction[] | undefined;
|
|
167
|
+
id: string | number;
|
|
168
|
+
type?: string | undefined;
|
|
169
|
+
metaCount?: number | undefined;
|
|
170
|
+
}[];
|
|
171
|
+
name: string;
|
|
172
|
+
actions: ({
|
|
173
|
+
label: string;
|
|
174
|
+
subActions: {
|
|
175
|
+
label: string;
|
|
176
|
+
icon: string;
|
|
177
|
+
onClick: () => void;
|
|
178
|
+
}[];
|
|
179
|
+
primary?: undefined;
|
|
180
|
+
icon?: undefined;
|
|
181
|
+
onClick?: undefined;
|
|
182
|
+
} | {
|
|
183
|
+
label: string;
|
|
184
|
+
primary: boolean;
|
|
185
|
+
icon: string;
|
|
186
|
+
onClick: () => void;
|
|
187
|
+
subActions?: undefined;
|
|
188
|
+
})[];
|
|
189
|
+
};
|
|
190
|
+
export declare const listActions: {
|
|
191
|
+
items: {
|
|
192
|
+
actions: {
|
|
193
|
+
label: string;
|
|
194
|
+
icon: string;
|
|
195
|
+
onClick: () => void;
|
|
196
|
+
}[];
|
|
197
|
+
name?: string | React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
198
|
+
cursor?: string | undefined;
|
|
199
|
+
url?: string | undefined;
|
|
200
|
+
active?: boolean | undefined;
|
|
201
|
+
disabled?: boolean | undefined;
|
|
202
|
+
onClick?: ((evt: any) => void) | undefined;
|
|
203
|
+
title?: string | undefined;
|
|
204
|
+
testId?: string | undefined;
|
|
205
|
+
level?: number | undefined;
|
|
206
|
+
label?: import("./list-row/list-row.interface").ILabel | undefined;
|
|
207
|
+
id: string | number;
|
|
208
|
+
type?: string | undefined;
|
|
209
|
+
metaCount?: number | undefined;
|
|
210
|
+
}[];
|
|
211
|
+
};
|
|
212
|
+
export declare const listDetails: {
|
|
213
|
+
items: {
|
|
214
|
+
details: string;
|
|
215
|
+
metadata: string;
|
|
216
|
+
testId: string;
|
|
217
|
+
name?: string | React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
218
|
+
cursor?: string | undefined;
|
|
219
|
+
url?: string | undefined;
|
|
220
|
+
active?: boolean | undefined;
|
|
221
|
+
disabled?: boolean | undefined;
|
|
222
|
+
onClick?: ((evt: any) => void) | undefined;
|
|
223
|
+
title?: string | undefined;
|
|
224
|
+
level?: number | undefined;
|
|
225
|
+
label?: import("./list-row/list-row.interface").ILabel | undefined;
|
|
226
|
+
actions?: import("../actions/actions.interface").IAction[] | undefined;
|
|
227
|
+
id: string | number;
|
|
228
|
+
type?: string | undefined;
|
|
229
|
+
metaCount?: number | undefined;
|
|
230
|
+
}[];
|
|
231
|
+
};
|
|
232
|
+
export declare const listExpanding: {
|
|
233
|
+
items: {
|
|
234
|
+
content: import("react/jsx-runtime").JSX.Element;
|
|
235
|
+
name?: string | React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
236
|
+
cursor?: string | undefined;
|
|
237
|
+
url?: string | undefined;
|
|
238
|
+
active?: boolean | undefined;
|
|
239
|
+
disabled?: boolean | undefined;
|
|
240
|
+
onClick?: ((evt: any) => void) | undefined;
|
|
241
|
+
title?: string | undefined;
|
|
242
|
+
testId?: string | undefined;
|
|
243
|
+
level?: number | undefined;
|
|
244
|
+
label?: import("./list-row/list-row.interface").ILabel | undefined;
|
|
245
|
+
actions?: import("../actions/actions.interface").IAction[] | undefined;
|
|
246
|
+
id: string | number;
|
|
247
|
+
type?: string | undefined;
|
|
248
|
+
metaCount?: number | undefined;
|
|
249
|
+
}[];
|
|
250
|
+
};
|
|
251
|
+
export declare const listNested: {
|
|
252
|
+
items: IListItem[];
|
|
253
|
+
};
|
|
254
|
+
export declare const listInvalid: {
|
|
255
|
+
items: (IListItem | {
|
|
256
|
+
id: number;
|
|
257
|
+
name: string;
|
|
258
|
+
invalid: boolean;
|
|
259
|
+
})[];
|
|
260
|
+
};
|
|
261
|
+
export declare const listIconTooltip: {
|
|
262
|
+
items: {
|
|
263
|
+
icon: {
|
|
264
|
+
icon: string;
|
|
265
|
+
color: string;
|
|
266
|
+
tooltip: {
|
|
267
|
+
text: import("react/jsx-runtime").JSX.Element;
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
name?: string | React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
271
|
+
cursor?: string | undefined;
|
|
272
|
+
url?: string | undefined;
|
|
273
|
+
active?: boolean | undefined;
|
|
274
|
+
disabled?: boolean | undefined;
|
|
275
|
+
onClick?: ((evt: any) => void) | undefined;
|
|
276
|
+
title?: string | undefined;
|
|
277
|
+
testId?: string | undefined;
|
|
278
|
+
level?: number | undefined;
|
|
279
|
+
label?: import("./list-row/list-row.interface").ILabel | undefined;
|
|
280
|
+
actions?: import("../actions/actions.interface").IAction[] | undefined;
|
|
281
|
+
id: string | number;
|
|
282
|
+
type?: string | undefined;
|
|
283
|
+
metaCount?: number | undefined;
|
|
284
|
+
}[];
|
|
285
|
+
};
|
|
286
|
+
export declare const listCounts: {
|
|
287
|
+
items: {
|
|
288
|
+
metaCount: number;
|
|
289
|
+
name?: string | React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
290
|
+
cursor?: string | undefined;
|
|
291
|
+
url?: string | undefined;
|
|
292
|
+
active?: boolean | undefined;
|
|
293
|
+
disabled?: boolean | undefined;
|
|
294
|
+
onClick?: ((evt: any) => void) | undefined;
|
|
295
|
+
title?: string | undefined;
|
|
296
|
+
testId?: string | undefined;
|
|
297
|
+
level?: number | undefined;
|
|
298
|
+
label?: import("./list-row/list-row.interface").ILabel | undefined;
|
|
299
|
+
actions?: import("../actions/actions.interface").IAction[] | undefined;
|
|
300
|
+
id: string | number;
|
|
301
|
+
type?: string | undefined;
|
|
302
|
+
}[];
|
|
303
|
+
};
|
|
304
|
+
export declare const listLong: {
|
|
305
|
+
name: string;
|
|
306
|
+
items: {
|
|
307
|
+
id: number;
|
|
308
|
+
name: string;
|
|
309
|
+
}[];
|
|
310
|
+
};
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Flex } from "../layout/flex/flex";
|
|
3
|
+
import { Menu } from "../menu/menu";
|
|
4
|
+
import { Icon } from "../icon/icon";
|
|
5
|
+
import { IconType, TriggerType } from "../../common-enum";
|
|
6
|
+
import { MenuType } from "../menu/enum";
|
|
7
|
+
export const items = [
|
|
8
|
+
{
|
|
9
|
+
id: 1,
|
|
10
|
+
name: 'Aardvark',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
id: 2,
|
|
14
|
+
name: 'Kangaroo',
|
|
15
|
+
active: true,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: 3,
|
|
19
|
+
name: 'Jaguar',
|
|
20
|
+
disabled: true,
|
|
21
|
+
},
|
|
22
|
+
];
|
|
23
|
+
const itemsSubheadings = [
|
|
24
|
+
{
|
|
25
|
+
id: 1,
|
|
26
|
+
name: 'Marsupials',
|
|
27
|
+
type: 'Heading',
|
|
28
|
+
metaCount: 1,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: 2,
|
|
32
|
+
name: 'Aardvark',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: 3,
|
|
36
|
+
name: 'Kangaroo',
|
|
37
|
+
active: true,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
id: 4,
|
|
41
|
+
name: 'Mammals',
|
|
42
|
+
type: 'Heading',
|
|
43
|
+
metaCount: 1,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: 5,
|
|
47
|
+
name: 'Jaguar',
|
|
48
|
+
},
|
|
49
|
+
];
|
|
50
|
+
const itemsNested = [
|
|
51
|
+
{
|
|
52
|
+
id: 1,
|
|
53
|
+
name: 'Aardvark',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: 2,
|
|
57
|
+
name: 'Kangaroo',
|
|
58
|
+
active: true,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: 3,
|
|
62
|
+
name: 'Grey',
|
|
63
|
+
level: 1,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: 4,
|
|
67
|
+
name: 'Eastern',
|
|
68
|
+
level: 2,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: 5,
|
|
72
|
+
name: 'Macropus giganteus giganteus',
|
|
73
|
+
title: 'Macropus giganteus giganteus',
|
|
74
|
+
level: 3,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: 6,
|
|
78
|
+
name: 'Macropus giganteus tasmaniensis',
|
|
79
|
+
title: 'Macropus giganteus tasmaniensis',
|
|
80
|
+
level: 3,
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: 7,
|
|
84
|
+
name: 'Western',
|
|
85
|
+
level: 2,
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: 8,
|
|
89
|
+
name: 'Red',
|
|
90
|
+
level: 1,
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: 9,
|
|
94
|
+
name: 'Jaguar',
|
|
95
|
+
},
|
|
96
|
+
];
|
|
97
|
+
export const list = {
|
|
98
|
+
items,
|
|
99
|
+
};
|
|
100
|
+
export const listHeader = {
|
|
101
|
+
name: 'Animals',
|
|
102
|
+
actions: [
|
|
103
|
+
{
|
|
104
|
+
label: 'More',
|
|
105
|
+
subActions: [
|
|
106
|
+
{
|
|
107
|
+
label: 'Item',
|
|
108
|
+
icon: 'up',
|
|
109
|
+
onClick: () => { },
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
label: 'Item',
|
|
113
|
+
icon: 'down',
|
|
114
|
+
onClick: () => { },
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
label: 'Add',
|
|
120
|
+
primary: true,
|
|
121
|
+
icon: 'add',
|
|
122
|
+
onClick: () => { },
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
items,
|
|
126
|
+
};
|
|
127
|
+
export const listSubheadings = {
|
|
128
|
+
...listHeader,
|
|
129
|
+
items: itemsSubheadings,
|
|
130
|
+
};
|
|
131
|
+
export const listJsx = {
|
|
132
|
+
...listHeader,
|
|
133
|
+
name: (_jsxs(Flex, { gap: "8px", children: ["Animals", _jsx(Icon, { icon: IconType.STAR })] })),
|
|
134
|
+
items: items.map((item) => ({
|
|
135
|
+
...item,
|
|
136
|
+
name: (_jsxs(Flex, { gap: "8px", alignItems: "center", children: [item.name, _jsx(Icon, { icon: IconType.STAR })] })),
|
|
137
|
+
})),
|
|
138
|
+
};
|
|
139
|
+
export const listSubcomponents = {
|
|
140
|
+
// TODO - revisit after MENU component
|
|
141
|
+
items: items.map((item) => ({
|
|
142
|
+
...item,
|
|
143
|
+
actions: [
|
|
144
|
+
{
|
|
145
|
+
childComponent: (_jsx(Menu, { menu: {
|
|
146
|
+
trigger: TriggerType.COMPONENT,
|
|
147
|
+
component: _jsx(Icon, { icon: IconType.MENU }),
|
|
148
|
+
placement: 'bottom-end',
|
|
149
|
+
sections: [
|
|
150
|
+
{
|
|
151
|
+
type: MenuType.OPTION,
|
|
152
|
+
label: 'Item',
|
|
153
|
+
onClick: () => { },
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
type: MenuType.OPTION,
|
|
157
|
+
label: 'Item',
|
|
158
|
+
onClick: () => { },
|
|
159
|
+
},
|
|
160
|
+
],
|
|
161
|
+
} })),
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
})),
|
|
165
|
+
};
|
|
166
|
+
export const listSubmenus = {
|
|
167
|
+
items: items.map((item) => ({
|
|
168
|
+
...item,
|
|
169
|
+
actions: [
|
|
170
|
+
{
|
|
171
|
+
label: 'More',
|
|
172
|
+
subActions: [
|
|
173
|
+
{
|
|
174
|
+
label: 'Move Up',
|
|
175
|
+
icon: 'up',
|
|
176
|
+
onClick: () => { },
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
label: 'Move Down',
|
|
180
|
+
icon: 'down',
|
|
181
|
+
onClick: () => { },
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
},
|
|
185
|
+
],
|
|
186
|
+
})),
|
|
187
|
+
};
|
|
188
|
+
export const listBadges = {
|
|
189
|
+
items: items.map((item, index) => ({
|
|
190
|
+
...item,
|
|
191
|
+
label: {
|
|
192
|
+
value: String(index + 1),
|
|
193
|
+
color: 'var(--color-text-info)',
|
|
194
|
+
},
|
|
195
|
+
})),
|
|
196
|
+
};
|
|
197
|
+
export const listSubheadingsBadges = {
|
|
198
|
+
...listSubheadings,
|
|
199
|
+
items: listSubheadings.items.map((item, index) => ({
|
|
200
|
+
...item,
|
|
201
|
+
label: {
|
|
202
|
+
value: String(index + 1),
|
|
203
|
+
color: 'var(--color-text-info)',
|
|
204
|
+
},
|
|
205
|
+
})),
|
|
206
|
+
};
|
|
207
|
+
export const listActions = {
|
|
208
|
+
items: items.map((item) => ({
|
|
209
|
+
...item,
|
|
210
|
+
actions: [
|
|
211
|
+
{
|
|
212
|
+
label: 'Delete',
|
|
213
|
+
icon: 'delete',
|
|
214
|
+
onClick: () => { },
|
|
215
|
+
},
|
|
216
|
+
],
|
|
217
|
+
})),
|
|
218
|
+
};
|
|
219
|
+
export const listDetails = {
|
|
220
|
+
items: items.map((item, itemIx) => ({
|
|
221
|
+
...item,
|
|
222
|
+
details: 'Description goes here',
|
|
223
|
+
metadata: '2019-05-03 09:03:51',
|
|
224
|
+
testId: `story-list-item-${itemIx}`,
|
|
225
|
+
})),
|
|
226
|
+
};
|
|
227
|
+
export const listExpanding = {
|
|
228
|
+
items: items.map((item) => ({
|
|
229
|
+
...item,
|
|
230
|
+
content: _jsx("div", { children: "Example content element (for show/hide)." }),
|
|
231
|
+
})),
|
|
232
|
+
};
|
|
233
|
+
export const listNested = {
|
|
234
|
+
items: itemsNested,
|
|
235
|
+
};
|
|
236
|
+
export const listInvalid = {
|
|
237
|
+
items: [
|
|
238
|
+
...items,
|
|
239
|
+
{
|
|
240
|
+
id: 4,
|
|
241
|
+
name: 'Dodo',
|
|
242
|
+
invalid: true,
|
|
243
|
+
},
|
|
244
|
+
],
|
|
245
|
+
};
|
|
246
|
+
export const listIconTooltip = {
|
|
247
|
+
items: items.map((item) => ({
|
|
248
|
+
...item,
|
|
249
|
+
icon: {
|
|
250
|
+
icon: 'success',
|
|
251
|
+
color: 'var(--color-text-success)',
|
|
252
|
+
tooltip: {
|
|
253
|
+
text: _jsx(_Fragment, { children: "Tooltip goes here" }),
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
})),
|
|
257
|
+
};
|
|
258
|
+
export const listCounts = {
|
|
259
|
+
items: items.map((item) => ({
|
|
260
|
+
...item,
|
|
261
|
+
metaCount: 3,
|
|
262
|
+
})),
|
|
263
|
+
};
|
|
264
|
+
export const listLong = {
|
|
265
|
+
name: 'Animals',
|
|
266
|
+
items: [...Array(50)].map((item, index) => ({
|
|
267
|
+
id: index,
|
|
268
|
+
name: `Aardvark #${index + 1}`,
|
|
269
|
+
})),
|
|
270
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IListProps } from './list.interface';
|
|
2
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
|
3
|
+
export default _default;
|
|
4
|
+
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, IListProps>;
|
|
5
|
+
export declare const Actions: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, IListProps>;
|
|
6
|
+
export declare const Menus: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, IListProps>;
|
|
7
|
+
export declare const Details: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, IListProps>;
|
|
8
|
+
export declare const Expanding: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, IListProps>;
|
|
9
|
+
export declare const Header: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, IListProps>;
|
|
10
|
+
export declare const Badges: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, IListProps>;
|
|
11
|
+
export declare const Nested: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, IListProps>;
|
|
12
|
+
export declare const InvalidItems: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, IListProps>;
|
|
13
|
+
export declare const JSXTitles: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, IListProps>;
|
|
14
|
+
export declare const Bordered: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, IListProps>;
|
|
15
|
+
export declare const IconWithTooltip: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, IListProps>;
|
|
16
|
+
export declare const Metacount: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, IListProps>;
|
|
17
|
+
export declare const StickyHeader: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, IListProps>;
|
|
18
|
+
export declare const Scrollable: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, IListProps>;
|
|
19
|
+
export declare const InfiniteScroll: () => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const ScrollToActiveItem: () => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const HeadingsManaged: () => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const ManagedDragAndDrop: () => import("react/jsx-runtime").JSX.Element;
|