@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,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const widthOfCharacters: (characterCount: number) => string;
|
|
3
|
+
export interface IInputProps {
|
|
4
|
+
error?: string | number | React.ReactNode;
|
|
5
|
+
warning?: string | number | React.ReactNode;
|
|
6
|
+
tooltip?: string | number | React.ReactNode;
|
|
7
|
+
name?: string;
|
|
8
|
+
type?: string;
|
|
9
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
10
|
+
onKeyPress?: React.KeyboardEventHandler<HTMLInputElement>;
|
|
11
|
+
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
12
|
+
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
13
|
+
small?: boolean;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
tabIndex?: number;
|
|
16
|
+
value?: string | number;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
right?: boolean;
|
|
19
|
+
groupOrder?: string;
|
|
20
|
+
maxTooltipWidth?: string | number;
|
|
21
|
+
width?: string | number;
|
|
22
|
+
testId?: string;
|
|
23
|
+
size?: number;
|
|
24
|
+
isInTable?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export declare const Input: React.ForwardRefExoticComponent<IInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useContext } from 'react';
|
|
3
|
+
import cx from 'classnames';
|
|
4
|
+
import styles from './input.module.less';
|
|
5
|
+
import { Tooltip } from '../tooltip/tooltip';
|
|
6
|
+
import { isStringNumberOrNode } from '../../helpers/types';
|
|
7
|
+
import { DisabledContext } from '../../helpers/disabled-context';
|
|
8
|
+
/*
|
|
9
|
+
Gets the width when you want to set it based on the number of characters
|
|
10
|
+
Replacement for input size property which is hard to style
|
|
11
|
+
*/
|
|
12
|
+
export const widthOfCharacters = (characterCount) => {
|
|
13
|
+
const padding = '15px';
|
|
14
|
+
const multiplier = '0.675em';
|
|
15
|
+
return `calc((${characterCount} * ${multiplier}) + (2 * ${padding}))`;
|
|
16
|
+
};
|
|
17
|
+
export const Input = forwardRef(({ error = null, tooltip = null, isInTable, width: propWidth = undefined, small = false, onChange = () => { }, placeholder = '', value = '', onKeyPress = () => { }, onFocus = () => { }, onBlur = () => { }, name = undefined, type = 'text', tabIndex = 0, disabled = false, right = false, warning = null, groupOrder = null, maxTooltipWidth = undefined, testId = undefined,
|
|
18
|
+
//deprecated props
|
|
19
|
+
size = null, //use width instead
|
|
20
|
+
}, ref) => {
|
|
21
|
+
const disabledContext = useContext(DisabledContext);
|
|
22
|
+
const order = (() => {
|
|
23
|
+
if (groupOrder) {
|
|
24
|
+
switch (groupOrder) {
|
|
25
|
+
case 'first':
|
|
26
|
+
return styles.groupOrderFirst;
|
|
27
|
+
case 'last':
|
|
28
|
+
return styles.groupOrderLast;
|
|
29
|
+
default:
|
|
30
|
+
return styles.groupOrderMiddle;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return '';
|
|
34
|
+
})();
|
|
35
|
+
const width = propWidth || (size ? 'auto' : '100%');
|
|
36
|
+
return (_jsx("div", { style: { width }, className: order, children: _jsx(Tooltip, { error: !!error, warning: !!warning, text: tooltip || error || warning, enabled: (tooltip && isStringNumberOrNode(tooltip)) ||
|
|
37
|
+
(error && isStringNumberOrNode(error)) ||
|
|
38
|
+
(warning && isStringNumberOrNode(warning)) ||
|
|
39
|
+
false, maxWidth: maxTooltipWidth, display: "block", placement: "bottom-center", children: _jsx("input", { ref: ref, type: type || 'text', size: size || 20, placeholder: placeholder, value: value, onChange: onChange, onKeyPress: onKeyPress, onFocus: onFocus, onBlur: onBlur, name: name, tabIndex: tabIndex, autoComplete: "off", disabled: disabled || disabledContext, className: cx(styles.input, error ? styles.error : warning ? styles.warning : '', right ? styles.right : '', small ? styles.small : '', isInTable ? styles.isInTable : ''), style: { width }, "data-testid": testId }) }) }));
|
|
40
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IInputProps } from './input';
|
|
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, IInputProps>;
|
|
5
|
+
export declare const Date: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, IInputProps>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useArgs } from '@storybook/addons';
|
|
3
|
+
import { Input } from './input';
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Forms/Input',
|
|
6
|
+
component: Input,
|
|
7
|
+
args: {
|
|
8
|
+
disabled: false,
|
|
9
|
+
small: false,
|
|
10
|
+
placeholder: 'Placeholder',
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
const Template = (args) => {
|
|
14
|
+
const [_, updateArgs] = useArgs();
|
|
15
|
+
const handleChange = (evt) => {
|
|
16
|
+
updateArgs({ value: evt.target.value });
|
|
17
|
+
};
|
|
18
|
+
return _jsx(Input, { ...args, onChange: handleChange });
|
|
19
|
+
};
|
|
20
|
+
export const Default = Template.bind({});
|
|
21
|
+
export const Date = Template.bind({});
|
|
22
|
+
Date.args = { type: 'date', value: '2020-01-01' };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import { GroupOrder } from "../../../common-enum";
|
|
3
|
+
export interface IInputGroupAddonProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
groupOrder?: GroupOrder | null;
|
|
6
|
+
small?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const InputGroupAddon: ({ children, groupOrder, small, }: IInputGroupAddonProps) => React.ReactElement;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import cx from "classnames";
|
|
3
|
+
import styles from "./input-group-addon.module.less";
|
|
4
|
+
import { GroupOrder } from "../../../common-enum";
|
|
5
|
+
export const InputGroupAddon = ({ children, groupOrder = null, small = false, }) => {
|
|
6
|
+
const order = (() => {
|
|
7
|
+
if (groupOrder) {
|
|
8
|
+
switch (groupOrder) {
|
|
9
|
+
case GroupOrder.FIRST:
|
|
10
|
+
return styles.groupOrderFirst;
|
|
11
|
+
case GroupOrder.LAST:
|
|
12
|
+
return styles.groupOrderLast;
|
|
13
|
+
default:
|
|
14
|
+
return styles.groupOrderMiddle;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return '';
|
|
18
|
+
})();
|
|
19
|
+
return (_jsx("span", { className: cx(styles.addon, order, small ? styles.small : ''), children: children }));
|
|
20
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React, { Fragment, isValidElement } from "react";
|
|
3
|
+
import cx from "classnames";
|
|
4
|
+
import styles from "./input-group.module.less";
|
|
5
|
+
import { GroupOrder } from "../../common-enum";
|
|
6
|
+
const isDOMTypeElement = (element) => {
|
|
7
|
+
return isValidElement(element) && typeof element.type === 'string';
|
|
8
|
+
};
|
|
9
|
+
export const InputGroup = ({ children, small = false, width = '100%', }) => {
|
|
10
|
+
const childElements = children instanceof Array
|
|
11
|
+
? children.filter((c) => isValidElement(c))
|
|
12
|
+
: [children];
|
|
13
|
+
const elements = childElements.map((item, index) => {
|
|
14
|
+
const isDOMType = isDOMTypeElement(item);
|
|
15
|
+
const { groupOrder: groupOrderProp } = !isDOMType
|
|
16
|
+
? item.props
|
|
17
|
+
: { groupOrder: null };
|
|
18
|
+
const count = childElements.length;
|
|
19
|
+
const isFirst = index === 0;
|
|
20
|
+
const isLast = index === count - 1;
|
|
21
|
+
const isOnly = !count || count === 1;
|
|
22
|
+
const groupOrder = groupOrderProp ||
|
|
23
|
+
(isOnly ? null : isFirst ? GroupOrder.FIRST : isLast ? GroupOrder.LAST : GroupOrder.MIDDLE);
|
|
24
|
+
return isDOMType ? (item) : (_jsx(Fragment, { children: React.cloneElement(item, { groupOrder, small }) }, index));
|
|
25
|
+
});
|
|
26
|
+
return (_jsx("div", { className: cx(styles.inputGroup), style: { width: width }, children: elements }));
|
|
27
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StoryFn } from '@storybook/react';
|
|
2
|
+
import { IInputGroupProps } from './input-group';
|
|
3
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, IInputGroupProps>;
|
|
6
|
+
export declare const FixedWidth: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, IInputGroupProps>;
|
|
7
|
+
export declare const Small: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, IInputGroupProps>;
|
|
8
|
+
export declare const SelectWithButton: StoryFn<IInputGroupProps>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { InputGroup } from './input-group';
|
|
3
|
+
import { InputGroupAddon } from './input-group-addon/input-group-addon';
|
|
4
|
+
import { Input } from '../input/input';
|
|
5
|
+
import { Button } from '../button/button';
|
|
6
|
+
import { Menu } from '../menu/menu';
|
|
7
|
+
import { Select } from '../select/select';
|
|
8
|
+
import { Tooltip } from '../tooltip/tooltip';
|
|
9
|
+
import { TriggerType } from "../../common-enum";
|
|
10
|
+
import { MenuType } from "../menu/enum";
|
|
11
|
+
export default {
|
|
12
|
+
title: 'Forms/InputGroup',
|
|
13
|
+
component: InputGroup,
|
|
14
|
+
args: {},
|
|
15
|
+
};
|
|
16
|
+
const Template = (args) => {
|
|
17
|
+
return (_jsxs(InputGroup
|
|
18
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
19
|
+
, { ...args, children: [_jsx(InputGroupAddon, { children: "$" }), _jsx(Input, { width: "100%", name: "example", value: "123", onChange: () => { } }), _jsx(Select, { options: [
|
|
20
|
+
{ label: 'Aardvarks', value: 'termites' },
|
|
21
|
+
{ label: 'Kangaroos', value: 'grass' },
|
|
22
|
+
{ label: 'Monkeys', value: 'bananas' },
|
|
23
|
+
{ label: 'Possums', value: 'slugs' },
|
|
24
|
+
], onChange: () => { }, value: { label: 'Monkeys', value: 'bananas' }, width: "auto", native: true }), _jsx(Menu, { menu: {
|
|
25
|
+
label: 'E-06/degC',
|
|
26
|
+
trigger: TriggerType.DROP_DOWN_BUTTON,
|
|
27
|
+
small: args.small,
|
|
28
|
+
sections: [
|
|
29
|
+
{
|
|
30
|
+
type: MenuType.OPTION,
|
|
31
|
+
label: '403.5433',
|
|
32
|
+
description: 'ft',
|
|
33
|
+
inline: true,
|
|
34
|
+
onClick: () => { },
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
type: MenuType.OPTION,
|
|
38
|
+
label: '0.123',
|
|
39
|
+
description: 'km',
|
|
40
|
+
inline: true,
|
|
41
|
+
onClick: () => { },
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
type: MenuType.OPTION,
|
|
45
|
+
label: '4842.4608',
|
|
46
|
+
description: 'in',
|
|
47
|
+
inline: true,
|
|
48
|
+
onClick: () => { },
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
} }), _jsx(Button, { name: "example", label: "Confirm", colored: true, onClick: () => { } })] }));
|
|
52
|
+
};
|
|
53
|
+
export const Default = Template.bind({});
|
|
54
|
+
export const FixedWidth = Template.bind({});
|
|
55
|
+
FixedWidth.args = { width: '480px' };
|
|
56
|
+
export const Small = Template.bind({});
|
|
57
|
+
Small.args = { small: true };
|
|
58
|
+
export const SelectWithButton = (args) => {
|
|
59
|
+
return (_jsxs(InputGroup, { children: [_jsx(Select, { options: [
|
|
60
|
+
{ label: 'Aardvarks', value: 'termites' },
|
|
61
|
+
{ label: 'Kangaroos', value: 'grass' },
|
|
62
|
+
{ label: 'Monkeys', value: 'bananas' },
|
|
63
|
+
{ label: 'Possums', value: 'slugs' },
|
|
64
|
+
], onChange: () => { }, value: { label: 'Monkeys', value: 'bananas' } }), _jsx(Tooltip, { text: "This is a tooltip", children: _jsx(Button, { name: "example", label: "Confirm", colored: true, onClick: () => { }, groupOrder: "last" }) })] }));
|
|
65
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { MouseEvent, ReactNode } from 'react';
|
|
2
|
+
export interface ILabelLockProps {
|
|
3
|
+
visible?: boolean;
|
|
4
|
+
active?: boolean;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
tooltip?: string;
|
|
7
|
+
testId?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ILabelIcon {
|
|
10
|
+
onClick: () => void;
|
|
11
|
+
tooltip?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ILabelProps {
|
|
14
|
+
label?: string | number | ReactNode;
|
|
15
|
+
helpText?: string | number | ReactNode;
|
|
16
|
+
helpTextMaxWidth?: string | number;
|
|
17
|
+
width?: string | number;
|
|
18
|
+
info?: string;
|
|
19
|
+
onClickHelp?: (event?: MouseEvent<HTMLDivElement>) => void;
|
|
20
|
+
lock?: ILabelLockProps;
|
|
21
|
+
libraryIcon?: ILabelIcon;
|
|
22
|
+
labelLeft?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare const Label: ({ label, width, helpText, helpTextMaxWidth, onClickHelp, lock, info, libraryIcon, labelLeft, }: ILabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import cx from 'classnames';
|
|
3
|
+
import styles from './label.module.less';
|
|
4
|
+
import { HelpIcon } from '../help-icon/help-icon';
|
|
5
|
+
import { IconType } from "../../common-enum";
|
|
6
|
+
export const Label = ({ label = null, width = 'auto', helpText = '', helpTextMaxWidth = '300px', onClickHelp = undefined, lock = {
|
|
7
|
+
visible: false,
|
|
8
|
+
active: false,
|
|
9
|
+
onClick: () => { },
|
|
10
|
+
tooltip: '',
|
|
11
|
+
testId: undefined,
|
|
12
|
+
}, info, libraryIcon, labelLeft = false, }) => {
|
|
13
|
+
return (_jsx("div", { className: cx(styles.label, labelLeft ? styles.labelLeft : ''), children: _jsxs("label", { style: { width: width || '' }, children: [label, _jsxs("div", { className: styles.icons, children: [(helpText || onClickHelp) && (_jsx(HelpIcon, { text: helpText, onClick: onClickHelp, maxWidth: helpTextMaxWidth })), info && _jsx(HelpIcon, { text: info, icon: IconType.INFO }), lock && lock.visible && lock.onClick && (_jsx(HelpIcon, { onClick: lock.onClick, icon: lock.active ? IconType.LOCK : IconType.UNLOCK, active: lock.active, testId: lock.testId })), libraryIcon && (_jsx(HelpIcon, { text: libraryIcon?.tooltip ?? '', onClick: libraryIcon.onClick, icon: IconType.LIBRARY }))] })] }) }));
|
|
14
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StoryFn } from '@storybook/react';
|
|
2
|
+
import { ILabelProps } from './label';
|
|
3
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ILabelProps>;
|
|
6
|
+
export declare const HelpIconTooltip: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ILabelProps>;
|
|
7
|
+
export declare const HelpIconClickable: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ILabelProps>;
|
|
8
|
+
export declare const InfoIcon: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ILabelProps>;
|
|
9
|
+
export declare const LockIcon: StoryFn<ILabelProps>;
|
|
10
|
+
export declare const LibraryIcon: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ILabelProps>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Label } from './label';
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Forms/Label',
|
|
6
|
+
component: Label,
|
|
7
|
+
args: {
|
|
8
|
+
label: 'Label',
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
const Template = (args) => (_jsx(Label, { ...args }));
|
|
12
|
+
export const Default = Template.bind({});
|
|
13
|
+
export const HelpIconTooltip = Template.bind({});
|
|
14
|
+
HelpIconTooltip.args = {
|
|
15
|
+
helpText: 'Tooltip goes here',
|
|
16
|
+
};
|
|
17
|
+
export const HelpIconClickable = Template.bind({});
|
|
18
|
+
HelpIconClickable.args = {
|
|
19
|
+
onClickHelp: () => { },
|
|
20
|
+
};
|
|
21
|
+
export const InfoIcon = Template.bind({});
|
|
22
|
+
InfoIcon.args = {
|
|
23
|
+
info: 'Info goes here',
|
|
24
|
+
};
|
|
25
|
+
export const LockIcon = () => {
|
|
26
|
+
const [locked, setLocked] = useState(false);
|
|
27
|
+
const handleToggleLock = () => setLocked(!locked);
|
|
28
|
+
return (_jsx(Label, { label: "Label", lock: {
|
|
29
|
+
visible: true,
|
|
30
|
+
active: locked,
|
|
31
|
+
onClick: handleToggleLock,
|
|
32
|
+
tooltip: locked ? 'Unlock' : 'Lock',
|
|
33
|
+
testId: 'testId',
|
|
34
|
+
} }));
|
|
35
|
+
};
|
|
36
|
+
export const LibraryIcon = Template.bind({});
|
|
37
|
+
LibraryIcon.args = {
|
|
38
|
+
libraryIcon: {
|
|
39
|
+
onClick: () => { },
|
|
40
|
+
tooltip: 'View in library',
|
|
41
|
+
},
|
|
42
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ILayoutColumnProps {
|
|
3
|
+
background?: string;
|
|
4
|
+
borderLeft?: boolean | string;
|
|
5
|
+
borderRight?: boolean | string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
flex?: boolean;
|
|
8
|
+
flexbox?: boolean;
|
|
9
|
+
padding?: boolean | string;
|
|
10
|
+
scroll?: boolean;
|
|
11
|
+
showScrollbar?: boolean;
|
|
12
|
+
spacing?: number | string;
|
|
13
|
+
width?: number | string;
|
|
14
|
+
widthMobile?: number | string;
|
|
15
|
+
widthTablet?: number | string;
|
|
16
|
+
testId?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const Column: ({ background, borderLeft, borderRight, children, flex, flexbox, padding, scroll, showScrollbar, spacing, width, widthMobile, widthTablet, testId, }: ILayoutColumnProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { StyledColumn as ImportedStyledColumn } from './styles';
|
|
3
|
+
export const Column = ({ background = 'transparent', borderLeft, borderRight, children = null, flex = true, flexbox = false, padding = false, scroll = false, showScrollbar = true, spacing = 20, width, widthMobile, widthTablet, testId, }) => {
|
|
4
|
+
const getWidthString = (w) => {
|
|
5
|
+
return typeof w === 'string'
|
|
6
|
+
? w
|
|
7
|
+
: typeof w === 'number'
|
|
8
|
+
? `${w}px`
|
|
9
|
+
: undefined;
|
|
10
|
+
};
|
|
11
|
+
const StyledColumn = ImportedStyledColumn;
|
|
12
|
+
return (_jsx(StyledColumn, { background: background, borderLeft: borderLeft, borderRight: borderRight, flex: flex, flexbox: flexbox, padding: padding, scroll: scroll, showScrollbar: showScrollbar, spacing: spacing, width: getWidthString(width), widthTablet: getWidthString(widthTablet), widthMobile: getWidthString(widthMobile), children: _jsx("div", { className: "inner", "data-testid": testId, children: children }) }));
|
|
13
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface ILayoutStyledColumnProps {
|
|
2
|
+
width?: string;
|
|
3
|
+
flex?: boolean;
|
|
4
|
+
scroll?: boolean;
|
|
5
|
+
background?: string;
|
|
6
|
+
borderLeft?: boolean | string;
|
|
7
|
+
borderRight?: boolean | string;
|
|
8
|
+
spacing?: number;
|
|
9
|
+
showScrollbar?: boolean;
|
|
10
|
+
widthTablet?: string;
|
|
11
|
+
widthMobile?: string;
|
|
12
|
+
flexbox?: boolean;
|
|
13
|
+
padding?: boolean | string;
|
|
14
|
+
}
|
|
15
|
+
export declare const StyledColumn: import("styled-components").StyledComponent<"div", any, ILayoutStyledColumnProps, never>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
const noScrollbars = css `
|
|
3
|
+
scrollbar-width: none;
|
|
4
|
+
-ms-overflow-style: none;
|
|
5
|
+
&::-webkit-scrollbar {
|
|
6
|
+
display: none;
|
|
7
|
+
}
|
|
8
|
+
`;
|
|
9
|
+
export const StyledColumn = styled.div `
|
|
10
|
+
position: relative; // for react-laag
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
min-width: 0;
|
|
14
|
+
flex-basis: ${(p) => p.width || 'auto'};
|
|
15
|
+
flex-grow: ${(p) => (!p.width && p.flex ? '1' : '0')};
|
|
16
|
+
flex-shrink: ${(p) => (p.width || !p.flex ? '0' : '1')};
|
|
17
|
+
overflow: ${(p) => (p.scroll ? 'auto' : 'initial')};
|
|
18
|
+
background: ${(p) => p.background};
|
|
19
|
+
border-left: ${(p) => p.borderLeft === true ? '1px solid var(--color-border)' : p.borderLeft};
|
|
20
|
+
border-right: ${(p) => p.borderRight === true ? '1px solid var(--color-border)' : p.borderRight};
|
|
21
|
+
padding: ${(p) => (p.spacing ? `0 ${p.spacing / 2}px` : '0')};
|
|
22
|
+
${(p) => !p.showScrollbar && noScrollbars}
|
|
23
|
+
|
|
24
|
+
@media (max-width: 992px) {
|
|
25
|
+
${(p) => p.widthTablet && `flex-basis: ${p.widthTablet};`}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@media (max-width: 575px) {
|
|
29
|
+
${(p) => p.widthMobile && `flex-basis: ${p.widthMobile};`}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
> .inner {
|
|
33
|
+
flex-basis: 100%;
|
|
34
|
+
position: relative;
|
|
35
|
+
z-index: 0;
|
|
36
|
+
min-height: 0;
|
|
37
|
+
display: ${(p) => (p.flexbox && !p.scroll ? 'flex' : 'block')};
|
|
38
|
+
${(p) => p.flexbox && `flex-direction: column;`}
|
|
39
|
+
padding: ${(p) => (p.padding === true ? '16px 20px' : p.padding)};
|
|
40
|
+
}
|
|
41
|
+
`;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
interface TemplateArgs {
|
|
2
|
+
height?: string;
|
|
3
|
+
wrap?: boolean;
|
|
4
|
+
width?: string;
|
|
5
|
+
padding?: boolean | string;
|
|
6
|
+
borderRight?: boolean;
|
|
7
|
+
scroll?: boolean;
|
|
8
|
+
showScrollbar?: boolean;
|
|
9
|
+
widthTablet?: string;
|
|
10
|
+
widthMobile?: string;
|
|
11
|
+
borderLeft?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
|
14
|
+
export default _default;
|
|
15
|
+
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, TemplateArgs>;
|
|
16
|
+
export declare const NoPadding: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, TemplateArgs>;
|
|
17
|
+
export declare const FixedWidth: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, TemplateArgs>;
|
|
18
|
+
export declare const Scroll: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, TemplateArgs>;
|
|
19
|
+
export declare const HideScrollbar: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, TemplateArgs>;
|
|
20
|
+
export declare const ResponsiveWidth: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, TemplateArgs>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Column } from './column/column';
|
|
3
|
+
import { Row } from './row/row';
|
|
4
|
+
import { Heading } from '../heading/heading';
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Layout/Columns & Rows',
|
|
7
|
+
component: Column,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'fullscreen',
|
|
10
|
+
},
|
|
11
|
+
args: {
|
|
12
|
+
width: '50%',
|
|
13
|
+
padding: true,
|
|
14
|
+
borderRight: true,
|
|
15
|
+
},
|
|
16
|
+
argTypes: {
|
|
17
|
+
width: { control: { type: 'text' } },
|
|
18
|
+
padding: { control: { type: 'text' } },
|
|
19
|
+
borderLeft: { control: { type: 'boolean' } },
|
|
20
|
+
borderRight: { control: { type: 'boolean' } },
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
const Template = (args) => {
|
|
24
|
+
const { height, wrap, ...columnArgs } = args;
|
|
25
|
+
return (_jsxs(Row, { spacing: 0, height: height, wrap: wrap, children: [_jsxs(Column, { ...columnArgs, children: [_jsx(Heading, { top: true, children: "Column" }), 'Example content goes here lorem ipsum. '.repeat(20)] }), _jsx(Column, { padding: "20px", background: "var(--color-background)" })] }));
|
|
26
|
+
};
|
|
27
|
+
export const Default = Template.bind({});
|
|
28
|
+
export const NoPadding = Template.bind({});
|
|
29
|
+
NoPadding.args = {
|
|
30
|
+
padding: false,
|
|
31
|
+
};
|
|
32
|
+
export const FixedWidth = Template.bind({});
|
|
33
|
+
FixedWidth.args = {
|
|
34
|
+
width: '400px',
|
|
35
|
+
};
|
|
36
|
+
export const Scroll = Template.bind({});
|
|
37
|
+
Scroll.args = {
|
|
38
|
+
scroll: true,
|
|
39
|
+
height: '200px',
|
|
40
|
+
};
|
|
41
|
+
export const HideScrollbar = Template.bind({});
|
|
42
|
+
HideScrollbar.args = {
|
|
43
|
+
scroll: true,
|
|
44
|
+
showScrollbar: false,
|
|
45
|
+
height: '200px',
|
|
46
|
+
};
|
|
47
|
+
export const ResponsiveWidth = Template.bind({});
|
|
48
|
+
ResponsiveWidth.args = {
|
|
49
|
+
wrap: true,
|
|
50
|
+
widthTablet: '50%',
|
|
51
|
+
widthMobile: '100%',
|
|
52
|
+
borderRight: false,
|
|
53
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ILayoutFlexProps {
|
|
3
|
+
alignItems?: string;
|
|
4
|
+
justifyContent?: string;
|
|
5
|
+
direction?: string;
|
|
6
|
+
height?: string | number;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
wrap?: boolean;
|
|
9
|
+
gap?: boolean | string | number;
|
|
10
|
+
}
|
|
11
|
+
export declare const Flex: ({ alignItems, justifyContent, direction, height, children, wrap, gap, }: ILayoutFlexProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export const Flex = ({ alignItems = 'initial', justifyContent = 'initial', direction = 'initial', height = 'initial', children = null, wrap = true, gap = false, }) => {
|
|
3
|
+
return (_jsx("div", { style: {
|
|
4
|
+
display: 'flex',
|
|
5
|
+
flexDirection: direction,
|
|
6
|
+
alignItems,
|
|
7
|
+
justifyContent,
|
|
8
|
+
height: typeof height === 'number' ? `${height}px` : height,
|
|
9
|
+
flexWrap: wrap ? 'wrap' : 'nowrap',
|
|
10
|
+
gap: gap === false
|
|
11
|
+
? 0
|
|
12
|
+
: gap === true
|
|
13
|
+
? '20px'
|
|
14
|
+
: typeof gap === 'number'
|
|
15
|
+
? `${gap}px`
|
|
16
|
+
: gap,
|
|
17
|
+
}, children: children }));
|
|
18
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ILayoutFlexProps } from './flex';
|
|
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, ILayoutFlexProps>;
|
|
5
|
+
export declare const DefaultGap: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ILayoutFlexProps>;
|
|
6
|
+
export declare const CustomGap: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ILayoutFlexProps>;
|
|
7
|
+
export declare const Center: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ILayoutFlexProps>;
|
|
8
|
+
export declare const SpaceBetween: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ILayoutFlexProps>;
|
|
9
|
+
export declare const JustifyEnd: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ILayoutFlexProps>;
|
|
10
|
+
export declare const Column: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ILayoutFlexProps>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Flex } from './flex';
|
|
3
|
+
import { Button } from '../../button/button';
|
|
4
|
+
import { Text } from '../../text/text';
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Layout/Flex',
|
|
7
|
+
component: Flex,
|
|
8
|
+
argTypes: {
|
|
9
|
+
alignItems: {
|
|
10
|
+
control: {
|
|
11
|
+
type: 'inline-radio',
|
|
12
|
+
},
|
|
13
|
+
options: ['flex-start', 'center', 'flex-end'],
|
|
14
|
+
},
|
|
15
|
+
justifyContent: {
|
|
16
|
+
control: {
|
|
17
|
+
type: 'inline-radio',
|
|
18
|
+
},
|
|
19
|
+
options: ['flex-start', 'center', 'flex-end', 'space-between'],
|
|
20
|
+
},
|
|
21
|
+
gap: { control: { type: 'boolean' } },
|
|
22
|
+
},
|
|
23
|
+
args: {
|
|
24
|
+
alignItems: undefined,
|
|
25
|
+
justifyContent: undefined,
|
|
26
|
+
children: (_jsxs(_Fragment, { children: [_jsx(Button, { label: "Button" }), _jsx(Text, { children: "Text" })] })),
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
const Template = (args) => (_jsx(Flex
|
|
30
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
31
|
+
, { ...args }));
|
|
32
|
+
export const Default = Template.bind({});
|
|
33
|
+
export const DefaultGap = Template.bind({});
|
|
34
|
+
DefaultGap.args = { gap: true };
|
|
35
|
+
export const CustomGap = Template.bind({});
|
|
36
|
+
CustomGap.args = { gap: '50px' };
|
|
37
|
+
export const Center = Template.bind({});
|
|
38
|
+
Center.args = {
|
|
39
|
+
height: '200px',
|
|
40
|
+
alignItems: 'center',
|
|
41
|
+
justifyContent: 'center',
|
|
42
|
+
};
|
|
43
|
+
export const SpaceBetween = Template.bind({});
|
|
44
|
+
SpaceBetween.args = {
|
|
45
|
+
justifyContent: 'space-between',
|
|
46
|
+
};
|
|
47
|
+
export const JustifyEnd = Template.bind({});
|
|
48
|
+
JustifyEnd.args = {
|
|
49
|
+
justifyContent: 'flex-end',
|
|
50
|
+
};
|
|
51
|
+
export const Column = Template.bind({});
|
|
52
|
+
Column.args = { direction: 'column' };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export interface ILayoutGridProps {
|
|
3
|
+
rows?: string;
|
|
4
|
+
columns?: string;
|
|
5
|
+
columnsTablet?: string | null;
|
|
6
|
+
columnsMobile?: string | null;
|
|
7
|
+
gap?: boolean | string | number;
|
|
8
|
+
height?: string | number;
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare const Grid: ({ rows, columns, columnsTablet, columnsMobile, gap, height, children, }: ILayoutGridProps) => import("react/jsx-runtime").JSX.Element;
|