onekijs-ui 0.9.2 → 0.15.2
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/components/accordion/AccordionService.d.ts +7 -0
- package/dist/components/accordion/components/AccordionComponent.d.ts +16 -0
- package/dist/components/accordion/components/AccordionContainer.d.ts +4 -0
- package/dist/components/accordion/components/AccordionPanel.d.ts +4 -0
- package/dist/components/accordion/components/AccordionPanelTitle.d.ts +4 -0
- package/dist/components/accordion/hooks/useAccordionPanel.d.ts +3 -0
- package/dist/components/accordion/hooks/useAccordionService.d.ts +5 -0
- package/dist/components/accordion/hooks/useAccordionState.d.ts +4 -0
- package/dist/components/accordion/index.d.ts +16 -0
- package/dist/components/accordion/style.d.ts +3 -0
- package/dist/components/accordion/typings.d.ts +45 -0
- package/dist/components/button/DropdownButton.d.ts +3 -0
- package/dist/components/button/SubmitButton.d.ts +4 -0
- package/dist/components/button/components/ButtonComponent.d.ts +4 -0
- package/dist/components/button/components/DropdownButtonComponent.d.ts +4 -0
- package/dist/components/button/index.d.ts +3 -3
- package/dist/components/button/style.d.ts +5 -4
- package/dist/components/button/typings.d.ts +19 -4
- package/dist/components/card/FormCard.d.ts +4 -0
- package/dist/components/card/components/CardComponent.d.ts +4 -0
- package/dist/components/card/components/CardTitle.d.ts +4 -0
- package/dist/components/card/index.d.ts +2 -0
- package/dist/components/card/style.d.ts +3 -0
- package/dist/components/card/typings.d.ts +24 -0
- package/dist/components/checkbox/FormCheckbox.d.ts +4 -0
- package/dist/components/checkbox/components/CheckboxComponent.d.ts +4 -0
- package/dist/components/checkbox/index.d.ts +3 -0
- package/dist/components/checkbox/style.d.ts +4 -0
- package/dist/components/checkbox/typings.d.ts +14 -0
- package/dist/components/dashboard/DashboardService.d.ts +27 -0
- package/dist/components/dashboard/components/DashboardBody.d.ts +5 -0
- package/dist/components/dashboard/components/DashboardComponent.d.ts +7 -0
- package/dist/components/dashboard/components/DashboardContainer.d.ts +5 -0
- package/dist/components/dashboard/components/DashboardFooter.d.ts +2 -0
- package/dist/components/dashboard/components/DashboardHeader.d.ts +2 -0
- package/dist/components/dashboard/components/DashboardLeft.d.ts +2 -0
- package/dist/components/dashboard/components/DashboardOverlay.d.ts +6 -0
- package/dist/components/dashboard/components/DashboardRight.d.ts +2 -0
- package/dist/components/dashboard/components/DashboardToggler.d.ts +5 -0
- package/dist/components/dashboard/hoc/dashboardHorizontalPanel.d.ts +4 -0
- package/dist/components/dashboard/hoc/dashboardVerticalPanel.d.ts +4 -0
- package/dist/components/dashboard/hooks/useDashboard.d.ts +5 -0
- package/dist/components/dashboard/hooks/useDashboardService.d.ts +5 -0
- package/dist/components/dashboard/hooks/useDashboardState.d.ts +5 -0
- package/dist/components/dashboard/index.d.ts +4 -0
- package/dist/components/dashboard/typings.d.ts +96 -0
- package/dist/components/dashboard/utils/dashboardArea.d.ts +3 -0
- package/dist/components/dashboard/utils/dashboardLength.d.ts +5 -0
- package/dist/components/dropdown/components/DropdownComponent.d.ts +4 -4
- package/dist/components/dropdown/hooks/useDropdown.d.ts +5 -0
- package/dist/components/dropdown/index.d.ts +2 -3
- package/dist/components/dropdown/style.d.ts +4 -4
- package/dist/components/dropdown/typings.d.ts +24 -5
- package/dist/components/field/FieldDescription.d.ts +3 -0
- package/dist/components/field/FieldHelp.d.ts +3 -0
- package/dist/components/field/FieldLayout.d.ts +2 -0
- package/dist/components/field/components/FieldDescriptionComponent.d.ts +4 -0
- package/dist/components/field/components/FieldHelpComponent.d.ts +4 -0
- package/dist/components/field/components/FieldLayoutComponent.d.ts +4 -0
- package/dist/components/field/hooks/useFieldLayout.d.ts +4 -0
- package/dist/components/field/style.d.ts +5 -0
- package/dist/components/field/typings.d.ts +53 -0
- package/dist/components/field/util.d.ts +9 -0
- package/dist/components/grid/Col.d.ts +4 -0
- package/dist/components/grid/Row.d.ts +4 -0
- package/dist/components/grid/style.d.ts +4 -0
- package/dist/components/grid/typings.d.ts +33 -0
- package/dist/components/icon/CloseAllIcon.d.ts +4 -0
- package/dist/components/icon/CrossIcon.d.ts +3 -0
- package/dist/components/icon/FileIcon.d.ts +4 -0
- package/dist/components/icon/FolderIcon.d.ts +4 -0
- package/dist/components/icon/LoadingIcon.d.ts +4 -3
- package/dist/components/icon/MenuIcon.d.ts +4 -0
- package/dist/components/icon/RemoveIcon.d.ts +4 -0
- package/dist/components/icon/SearchIcon.d.ts +4 -0
- package/dist/components/icon/TogglerIcon.d.ts +4 -0
- package/dist/components/icon/typings.d.ts +14 -0
- package/dist/components/input/FormInput.d.ts +4 -0
- package/dist/components/input/components/InputComponent.d.ts +4 -0
- package/dist/components/input/index.d.ts +3 -0
- package/dist/components/input/style.d.ts +4 -0
- package/dist/components/input/typings.d.ts +14 -0
- package/dist/components/label/components/LabelComponent.d.ts +4 -0
- package/dist/components/label/index.d.ts +3 -0
- package/dist/components/label/style.d.ts +4 -0
- package/dist/components/label/typings.d.ts +16 -0
- package/dist/components/list/components/ArrayListComponent.d.ts +4 -0
- package/dist/components/list/components/CollectionListComponent.d.ts +4 -0
- package/dist/components/list/components/ListBodyComponent.d.ts +4 -0
- package/dist/components/list/components/ListComponent.d.ts +4 -4
- package/dist/components/list/components/ListItemComponent.d.ts +6 -4
- package/dist/components/list/components/LoadingItem.d.ts +5 -0
- package/dist/components/list/components/StandardListComponent.d.ts +4 -4
- package/dist/components/list/components/VirtualListComponent.d.ts +4 -4
- package/dist/components/list/hooks/useListController.d.ts +4 -0
- package/dist/components/list/hooks/useListService.d.ts +5 -0
- package/dist/components/list/hooks/useListState.d.ts +5 -0
- package/dist/components/list/hooks/useListView.d.ts +22 -0
- package/dist/components/list/index.d.ts +3 -3
- package/dist/components/list/style.d.ts +4 -4
- package/dist/components/list/typings.d.ts +121 -35
- package/dist/components/list/utils.d.ts +3 -4
- package/dist/components/modal/components/ModalComponent.d.ts +4 -0
- package/dist/components/modal/index.d.ts +2 -0
- package/dist/components/modal/style.d.ts +3 -0
- package/dist/components/modal/typings.d.ts +19 -0
- package/dist/components/properties/components/PropertiesComponent.d.ts +4 -0
- package/dist/components/properties/components/Property.d.ts +4 -0
- package/dist/components/properties/hooks/usePropertiesContext.d.ts +5 -0
- package/dist/components/properties/index.d.ts +3 -0
- package/dist/components/properties/style.d.ts +3 -0
- package/dist/components/properties/typings.d.ts +26 -0
- package/dist/components/resizer/ResizerService.d.ts +17 -0
- package/dist/components/resizer/components/ResizerComponent.d.ts +4 -0
- package/dist/components/resizer/components/ResizerHorizontalSplitter.d.ts +4 -0
- package/dist/components/resizer/components/ResizerVerticalSplitter.d.ts +4 -0
- package/dist/components/resizer/index.d.ts +2 -0
- package/dist/components/resizer/style.d.ts +4 -0
- package/dist/components/resizer/typings.d.ts +34 -0
- package/dist/components/select/FormSelect.d.ts +4 -0
- package/dist/components/select/SelectService.d.ts +5 -0
- package/dist/components/select/components/ArraySelectComponent.d.ts +4 -0
- package/dist/components/select/components/ControllerSelectComponent.d.ts +4 -0
- package/dist/components/select/components/SelectComponent.d.ts +4 -4
- package/dist/components/select/components/SelectIconComponent.d.ts +4 -4
- package/dist/components/select/components/SelectInputComponent.d.ts +4 -4
- package/dist/components/select/components/SelectNotFoundComponent.d.ts +4 -0
- package/dist/components/select/components/SelectOptionComponent.d.ts +6 -4
- package/dist/components/select/components/SelectTokenComponent.d.ts +4 -0
- package/dist/components/select/components/SelectTokensComponent.d.ts +4 -0
- package/dist/components/select/hooks/useSelectConfig.d.ts +4 -0
- package/dist/components/select/hooks/useSelectController.d.ts +6 -0
- package/dist/components/select/index.d.ts +3 -3
- package/dist/components/select/style.d.ts +4 -4
- package/dist/components/select/typings.d.ts +95 -37
- package/dist/components/tab/TabsService.d.ts +24 -0
- package/dist/components/tab/components/ControlledTabsComponent.d.ts +4 -0
- package/dist/components/tab/components/Tab.d.ts +4 -0
- package/dist/components/tab/components/TabTitle.d.ts +4 -0
- package/dist/components/tab/components/TabsComponent.d.ts +4 -0
- package/dist/components/tab/components/TabsContainer.d.ts +4 -0
- package/dist/components/tab/components/UncontrolledTabsComponent.d.ts +4 -0
- package/dist/components/tab/hooks/useTab.d.ts +5 -0
- package/dist/components/tab/hooks/useTabsController.d.ts +3 -0
- package/dist/components/tab/hooks/useTabsService.d.ts +5 -0
- package/dist/components/tab/hooks/useTabsState.d.ts +4 -0
- package/dist/components/tab/index.d.ts +2 -0
- package/dist/components/tab/style.d.ts +3 -0
- package/dist/components/tab/typings.d.ts +54 -0
- package/dist/components/table/FormTable.d.ts +4 -0
- package/dist/components/table/TableService.d.ts +18 -0
- package/dist/components/table/columns/useCheckboxColumn.d.ts +3 -0
- package/dist/components/table/columns/useColumn.d.ts +3 -0
- package/dist/components/table/columns/useInputColumn.d.ts +3 -0
- package/dist/components/table/columns/useLinkColumn.d.ts +3 -0
- package/dist/components/table/columns/useSelectColumn.d.ts +3 -0
- package/dist/components/table/components/ArrayTableComponent.d.ts +4 -0
- package/dist/components/table/components/ControllerTableComponent.d.ts +4 -0
- package/dist/components/table/components/FormTableComponent.d.ts +4 -0
- package/dist/components/table/components/TableBodyCellComponent.d.ts +4 -0
- package/dist/components/table/components/TableBodyComponent.d.ts +4 -0
- package/dist/components/table/components/TableBodyRowComponent.d.ts +4 -0
- package/dist/components/table/components/TableComponent.d.ts +4 -0
- package/dist/components/table/components/TableFooterCellComponent.d.ts +4 -0
- package/dist/components/table/components/TableFooterComponent.d.ts +4 -0
- package/dist/components/table/components/TableHeaderComponent.d.ts +4 -0
- package/dist/components/table/components/TableHeaderFilterComponent.d.ts +4 -0
- package/dist/components/table/components/TableHeaderTitleComponent.d.ts +5 -0
- package/dist/components/table/components/TableLoadingComponent.d.ts +3 -0
- package/dist/components/table/components/TableLoadingRowComponent.d.ts +3 -0
- package/dist/components/table/components/TableNotFoundComponent.d.ts +4 -0
- package/dist/components/table/components/TableSortComponent.d.ts +4 -0
- package/dist/components/table/components/cells/CheckboxCellComponent.d.ts +4 -0
- package/dist/components/table/components/cells/DefaultCellComponent.d.ts +4 -0
- package/dist/components/table/components/cells/ExpandedCellComponent.d.ts +4 -0
- package/dist/components/table/components/cells/InputCellComponent.d.ts +4 -0
- package/dist/components/table/components/cells/SelectCellComponent.d.ts +6 -0
- package/dist/components/table/components/filters/TableInputFilterComponent.d.ts +4 -0
- package/dist/components/table/components/hoc/linkCellComponent.d.ts +4 -0
- package/dist/components/table/hooks/useFormTableContext.d.ts +5 -0
- package/dist/components/table/hooks/useTableColumns.d.ts +3 -0
- package/dist/components/table/hooks/useTableConfig.d.ts +4 -0
- package/dist/components/table/hooks/useTableController.d.ts +5 -0
- package/dist/components/table/hooks/useTableInitialState.d.ts +3 -0
- package/dist/components/table/hooks/useTableItems.d.ts +3 -0
- package/dist/components/table/hooks/useTableService.d.ts +5 -0
- package/dist/components/table/hooks/useTableState.d.ts +4 -0
- package/dist/components/table/index.d.ts +3 -0
- package/dist/components/table/style.d.ts +3 -0
- package/dist/components/table/typings.d.ts +218 -0
- package/dist/components/table/util.d.ts +5 -0
- package/dist/components/tag/components/TagComponent.d.ts +4 -0
- package/dist/components/tag/index.d.ts +2 -0
- package/dist/components/tag/style.d.ts +3 -0
- package/dist/components/tag/typings.d.ts +16 -0
- package/dist/components/tooltip/components/TooltipComponent.d.ts +4 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/style.d.ts +4 -0
- package/dist/components/tooltip/typings.d.ts +10 -0
- package/dist/components/tree/TreeService.d.ts +23 -0
- package/dist/components/tree/components/ArrayTreeComponent.d.ts +4 -0
- package/dist/components/tree/components/ControllerTreeComponent.d.ts +4 -0
- package/dist/components/tree/components/TreeBodyComponent.d.ts +4 -0
- package/dist/components/tree/components/TreeComponent.d.ts +4 -0
- package/dist/components/tree/components/TreeItemComponent.d.ts +6 -0
- package/dist/components/tree/components/TreeListComponent.d.ts +4 -0
- package/dist/components/tree/components/VirtualTreeBodyComponent.d.ts +4 -0
- package/dist/components/tree/components/VirtualTreeListComponent.d.ts +4 -0
- package/dist/components/tree/hooks/useTreeConfig.d.ts +4 -0
- package/dist/components/tree/hooks/useTreeController.d.ts +5 -0
- package/dist/components/tree/hooks/useTreeInitialState.d.ts +5 -0
- package/dist/components/tree/hooks/useTreeItems.d.ts +3 -0
- package/dist/components/tree/hooks/useTreeService.d.ts +5 -0
- package/dist/components/tree/hooks/useTreeState.d.ts +4 -0
- package/dist/components/tree/index.d.ts +3 -0
- package/dist/components/tree/style.d.ts +3 -0
- package/dist/components/tree/typings.d.ts +87 -0
- package/dist/components/wizard/WizardModal.d.ts +2 -0
- package/dist/components/wizard/WizardService.d.ts +17 -0
- package/dist/components/wizard/components/ControlledWizardComponent.d.ts +4 -0
- package/dist/components/wizard/components/Step.d.ts +4 -0
- package/dist/components/wizard/components/StepTitle.d.ts +4 -0
- package/dist/components/wizard/components/UncontrolledWizardComponent.d.ts +4 -0
- package/dist/components/wizard/components/WizardComponent.d.ts +4 -0
- package/dist/components/wizard/components/WizardContainer.d.ts +4 -0
- package/dist/components/wizard/components/WizardModalComponent.d.ts +4 -0
- package/dist/components/wizard/hooks/useStep.d.ts +5 -0
- package/dist/components/wizard/hooks/useWizardController.d.ts +3 -0
- package/dist/components/wizard/hooks/useWizardService.d.ts +5 -0
- package/dist/components/wizard/hooks/useWizardState.d.ts +4 -0
- package/dist/components/wizard/index.d.ts +2 -0
- package/dist/components/wizard/style.d.ts +4 -0
- package/dist/components/wizard/typings.d.ts +41 -0
- package/dist/index.d.ts +167 -33
- package/dist/index.js +9945 -5
- package/dist/index.js.map +1 -0
- package/dist/index.module.js +9546 -0
- package/dist/index.module.js.map +1 -0
- package/dist/styles/alignment.d.ts +13 -13
- package/dist/styles/animation.d.ts +10 -9
- package/dist/styles/background.d.ts +11 -11
- package/dist/styles/border.d.ts +39 -39
- package/dist/styles/display.d.ts +6 -5
- package/dist/styles/effects.d.ts +2 -2
- package/dist/styles/flex.d.ts +9 -9
- package/dist/styles/fragmentation.d.ts +6 -6
- package/dist/styles/grid.d.ts +28 -28
- package/dist/styles/icon.d.ts +4 -0
- package/dist/styles/image.d.ts +5 -5
- package/dist/styles/interactivity.d.ts +16 -16
- package/dist/styles/list.d.ts +5 -5
- package/dist/styles/overflow.d.ts +6 -6
- package/dist/styles/position.d.ts +10 -9
- package/dist/styles/size.d.ts +12 -13
- package/dist/styles/spacing.d.ts +16 -16
- package/dist/styles/svg.d.ts +5 -4
- package/dist/styles/table.d.ts +8 -8
- package/dist/styles/transform.d.ts +8 -8
- package/dist/styles/transition.d.ts +5 -5
- package/dist/styles/typings.d.ts +528 -20
- package/dist/styles/typography.d.ts +49 -49
- package/dist/theme/base.d.ts +4 -0
- package/dist/theme/tailwind.d.ts +5 -0
- package/dist/utils/color.d.ts +10 -7
- package/dist/utils/dom.d.ts +9 -0
- package/dist/utils/event.d.ts +2 -1
- package/dist/utils/formatter.d.ts +7 -7
- package/dist/utils/popper.d.ts +4 -4
- package/dist/utils/size.d.ts +3 -0
- package/dist/utils/style.d.ts +9 -7
- package/package.json +36 -24
- package/src/components/accordion/AccordionService.ts +36 -0
- package/src/components/accordion/components/AccordionComponent.tsx +37 -0
- package/src/components/accordion/components/AccordionContainer.tsx +11 -0
- package/src/components/accordion/components/AccordionPanel.tsx +74 -0
- package/src/components/accordion/components/AccordionPanelTitle.tsx +14 -0
- package/src/components/accordion/hooks/useAccordionPanel.ts +19 -0
- package/src/components/accordion/hooks/useAccordionService.ts +11 -0
- package/src/components/accordion/hooks/useAccordionState.ts +7 -0
- package/src/components/accordion/index.ts +23 -0
- package/src/components/accordion/style.ts +72 -0
- package/src/components/accordion/typings.ts +50 -0
- package/src/components/button/DropdownButton.tsx +9 -0
- package/src/components/button/SubmitButton.tsx +58 -0
- package/src/components/button/components/ButtonComponent.tsx +24 -0
- package/src/components/button/components/DropdownButtonComponent.tsx +82 -0
- package/src/components/button/index.tsx +1 -1
- package/src/components/button/style.ts +84 -8
- package/src/components/button/typings.ts +19 -2
- package/src/components/card/FormCard.tsx +24 -0
- package/src/components/card/components/CardComponent.tsx +83 -0
- package/src/components/card/components/CardTitle.tsx +14 -0
- package/src/components/card/index.tsx +9 -0
- package/src/components/card/style.ts +68 -0
- package/src/components/card/typings.ts +28 -0
- package/src/components/checkbox/FormCheckbox.tsx +26 -0
- package/src/components/checkbox/components/CheckboxComponent.tsx +42 -0
- package/src/components/checkbox/index.tsx +9 -0
- package/src/components/checkbox/style.ts +103 -0
- package/src/components/checkbox/typings.ts +18 -0
- package/src/components/dashboard/DashboardService.ts +412 -0
- package/src/components/dashboard/components/DashboardBody.tsx +138 -0
- package/src/components/dashboard/components/DashboardComponent.tsx +36 -0
- package/src/components/dashboard/components/DashboardContainer.tsx +64 -0
- package/src/components/dashboard/components/DashboardFooter.tsx +4 -0
- package/src/components/dashboard/components/DashboardHeader.tsx +4 -0
- package/src/components/dashboard/components/DashboardLeft.tsx +4 -0
- package/src/components/dashboard/components/DashboardOverlay.tsx +29 -0
- package/src/components/dashboard/components/DashboardRight.tsx +4 -0
- package/src/components/dashboard/components/DashboardToggler.tsx +17 -0
- package/src/components/dashboard/hoc/dashboardHorizontalPanel.tsx +145 -0
- package/src/components/dashboard/hoc/dashboardVerticalPanel.tsx +148 -0
- package/src/components/dashboard/hooks/useDashboard.tsx +21 -0
- package/src/components/dashboard/hooks/useDashboardService.ts +11 -0
- package/src/components/dashboard/hooks/useDashboardState.ts +11 -0
- package/src/components/dashboard/index.tsx +13 -0
- package/src/components/dashboard/typings.ts +124 -0
- package/src/components/dashboard/utils/dashboardArea.ts +27 -0
- package/src/components/dashboard/utils/dashboardLength.ts +42 -0
- package/src/components/dropdown/components/DropdownComponent.tsx +201 -23
- package/src/components/dropdown/hooks/useDropdown.tsx +21 -0
- package/src/components/dropdown/style.ts +10 -28
- package/src/components/dropdown/typings.ts +26 -4
- package/src/components/field/FieldDescription.tsx +9 -0
- package/src/components/field/FieldHelp.tsx +9 -0
- package/src/components/field/FieldLayout.tsx +9 -0
- package/src/components/field/components/FieldDescriptionComponent.tsx +14 -0
- package/src/components/field/components/FieldHelpComponent.tsx +22 -0
- package/src/components/field/components/FieldLayoutComponent.tsx +174 -0
- package/src/components/field/hooks/useFieldLayout.ts +36 -0
- package/src/components/field/style.ts +59 -0
- package/src/components/field/typings.ts +67 -0
- package/src/components/field/util.ts +47 -0
- package/src/components/grid/Col.tsx +33 -0
- package/src/components/grid/Row.tsx +35 -0
- package/src/components/grid/style.ts +93 -0
- package/src/components/grid/typings.ts +35 -0
- package/src/components/icon/CloseAllIcon.tsx +38 -0
- package/src/components/icon/CrossIcon.tsx +30 -0
- package/src/components/icon/FileIcon.tsx +36 -0
- package/src/components/icon/FolderIcon.tsx +36 -0
- package/src/components/icon/LoadingIcon.tsx +26 -23
- package/src/components/icon/MenuIcon.tsx +34 -0
- package/src/components/icon/RemoveIcon.tsx +36 -0
- package/src/components/icon/SearchIcon.tsx +38 -0
- package/src/components/icon/TogglerIcon.tsx +126 -0
- package/src/components/icon/typings.ts +15 -0
- package/src/components/input/FormInput.tsx +26 -0
- package/src/components/input/components/InputComponent.tsx +46 -0
- package/src/components/input/index.tsx +9 -0
- package/src/components/input/style.ts +85 -0
- package/src/components/input/typings.ts +17 -0
- package/src/components/label/components/LabelComponent.tsx +39 -0
- package/src/components/label/index.tsx +9 -0
- package/src/components/label/style.ts +64 -0
- package/src/components/label/typings.ts +17 -0
- package/src/components/list/components/ArrayListComponent.tsx +11 -0
- package/src/components/list/components/CollectionListComponent.tsx +77 -0
- package/src/components/list/components/ListBodyComponent.tsx +250 -0
- package/src/components/list/components/ListComponent.tsx +11 -25
- package/src/components/list/components/ListItemComponent.tsx +16 -4
- package/src/components/list/components/LoadingItem.tsx +24 -0
- package/src/components/list/components/StandardListComponent.tsx +23 -21
- package/src/components/list/components/VirtualListComponent.tsx +93 -110
- package/src/components/list/hooks/useListController.ts +19 -0
- package/src/components/list/hooks/useListService.ts +15 -0
- package/src/components/list/hooks/useListState.ts +10 -0
- package/src/components/list/hooks/useListView.tsx +103 -0
- package/src/components/list/typings.ts +162 -24
- package/src/components/list/utils.ts +17 -55
- package/src/components/modal/components/ModalComponent.tsx +132 -0
- package/src/components/modal/index.tsx +9 -0
- package/src/components/modal/style.ts +135 -0
- package/src/components/modal/typings.ts +20 -0
- package/src/components/properties/components/PropertiesComponent.tsx +44 -0
- package/src/components/properties/components/Property.tsx +40 -0
- package/src/components/properties/hooks/usePropertiesContext.ts +10 -0
- package/src/components/properties/index.tsx +9 -0
- package/src/components/properties/style.ts +17 -0
- package/src/components/properties/typings.ts +30 -0
- package/src/components/resizer/ResizerService.ts +96 -0
- package/src/components/resizer/components/ResizerComponent.tsx +28 -0
- package/src/components/resizer/components/ResizerHorizontalSplitter.tsx +38 -0
- package/src/components/resizer/components/ResizerVerticalSplitter.tsx +37 -0
- package/src/components/resizer/index.tsx +9 -0
- package/src/components/resizer/style.ts +51 -0
- package/src/components/resizer/typings.ts +40 -0
- package/src/components/select/FormSelect.tsx +26 -0
- package/src/components/select/SelectService.ts +9 -0
- package/src/components/select/components/ArraySelectComponent.tsx +11 -0
- package/src/components/select/components/ControllerSelectComponent.tsx +441 -0
- package/src/components/select/components/SelectComponent.tsx +13 -121
- package/src/components/select/components/SelectIconComponent.tsx +4 -4
- package/src/components/select/components/SelectInputComponent.tsx +220 -76
- package/src/components/select/components/SelectNotFoundComponent.tsx +14 -0
- package/src/components/select/components/SelectOptionComponent.tsx +54 -20
- package/src/components/select/components/SelectTokenComponent.tsx +25 -0
- package/src/components/select/components/SelectTokensComponent.tsx +50 -0
- package/src/components/select/hooks/useSelectConfig.ts +7 -0
- package/src/components/select/hooks/useSelectController.ts +21 -0
- package/src/components/select/index.tsx +0 -89
- package/src/components/select/style.ts +336 -47
- package/src/components/select/typings.ts +130 -24
- package/src/components/tab/TabsService.ts +192 -0
- package/src/components/tab/components/ControlledTabsComponent.tsx +18 -0
- package/src/components/tab/components/Tab.tsx +55 -0
- package/src/components/tab/components/TabTitle.tsx +18 -0
- package/src/components/tab/components/TabsComponent.tsx +15 -0
- package/src/components/tab/components/TabsContainer.tsx +36 -0
- package/src/components/tab/components/UncontrolledTabsComponent.tsx +13 -0
- package/src/components/tab/hooks/useTab.ts +18 -0
- package/src/components/tab/hooks/useTabsController.ts +15 -0
- package/src/components/tab/hooks/useTabsService.ts +11 -0
- package/src/components/tab/hooks/useTabsState.ts +7 -0
- package/src/components/tab/index.tsx +9 -0
- package/src/components/tab/style.ts +78 -0
- package/src/components/tab/typings.ts +59 -0
- package/src/components/table/FormTable.tsx +38 -0
- package/src/components/table/TableService.ts +123 -0
- package/src/components/table/columns/useCheckboxColumn.ts +24 -0
- package/src/components/table/columns/useColumn.ts +23 -0
- package/src/components/table/columns/useInputColumn.ts +24 -0
- package/src/components/table/columns/useLinkColumn.ts +19 -0
- package/src/components/table/columns/useSelectColumn.ts +26 -0
- package/src/components/table/components/ArrayTableComponent.tsx +14 -0
- package/src/components/table/components/ControllerTableComponent.tsx +167 -0
- package/src/components/table/components/FormTableComponent.tsx +143 -0
- package/src/components/table/components/TableBodyCellComponent.tsx +36 -0
- package/src/components/table/components/TableBodyComponent.tsx +96 -0
- package/src/components/table/components/TableBodyRowComponent.tsx +125 -0
- package/src/components/table/components/TableComponent.tsx +17 -0
- package/src/components/table/components/TableFooterCellComponent.tsx +28 -0
- package/src/components/table/components/TableFooterComponent.tsx +34 -0
- package/src/components/table/components/TableHeaderComponent.tsx +81 -0
- package/src/components/table/components/TableHeaderFilterComponent.tsx +31 -0
- package/src/components/table/components/TableHeaderTitleComponent.tsx +62 -0
- package/src/components/table/components/TableLoadingComponent.tsx +18 -0
- package/src/components/table/components/TableLoadingRowComponent.tsx +21 -0
- package/src/components/table/components/TableNotFoundComponent.tsx +14 -0
- package/src/components/table/components/TableSortComponent.tsx +29 -0
- package/src/components/table/components/cells/CheckboxCellComponent.tsx +42 -0
- package/src/components/table/components/cells/DefaultCellComponent.tsx +9 -0
- package/src/components/table/components/cells/ExpandedCellComponent.tsx +16 -0
- package/src/components/table/components/cells/InputCellComponent.tsx +27 -0
- package/src/components/table/components/cells/SelectCellComponent.tsx +41 -0
- package/src/components/table/components/filters/TableInputFilterComponent.tsx +134 -0
- package/src/components/table/components/hoc/linkCellComponent.tsx +15 -0
- package/src/components/table/hooks/useFormTableContext.ts +10 -0
- package/src/components/table/hooks/useTableColumns.ts +9 -0
- package/src/components/table/hooks/useTableConfig.ts +7 -0
- package/src/components/table/hooks/useTableController.ts +26 -0
- package/src/components/table/hooks/useTableInitialState.ts +22 -0
- package/src/components/table/hooks/useTableItems.ts +9 -0
- package/src/components/table/hooks/useTableService.ts +10 -0
- package/src/components/table/hooks/useTableState.ts +7 -0
- package/src/components/table/index.tsx +9 -0
- package/src/components/table/style.ts +248 -0
- package/src/components/table/typings.ts +322 -0
- package/src/components/table/util.ts +52 -0
- package/src/components/tag/components/TagComponent.tsx +15 -0
- package/src/components/tag/index.tsx +9 -0
- package/src/components/tag/style.ts +62 -0
- package/src/components/tag/typings.ts +17 -0
- package/src/components/tooltip/components/TooltipComponent.tsx +38 -0
- package/src/components/tooltip/index.tsx +9 -0
- package/src/components/tooltip/style.ts +153 -0
- package/src/components/tooltip/typings.ts +10 -0
- package/src/components/tree/TreeService.ts +392 -0
- package/src/components/tree/components/ArrayTreeComponent.tsx +14 -0
- package/src/components/tree/components/ControllerTreeComponent.tsx +72 -0
- package/src/components/tree/components/TreeBodyComponent.tsx +25 -0
- package/src/components/tree/components/TreeComponent.tsx +17 -0
- package/src/components/tree/components/TreeItemComponent.tsx +100 -0
- package/src/components/tree/components/TreeListComponent.tsx +198 -0
- package/src/components/tree/components/VirtualTreeBodyComponent.tsx +34 -0
- package/src/components/tree/components/VirtualTreeListComponent.tsx +287 -0
- package/src/components/tree/hooks/useTreeConfig.ts +7 -0
- package/src/components/tree/hooks/useTreeController.ts +33 -0
- package/src/components/tree/hooks/useTreeInitialState.ts +12 -0
- package/src/components/tree/hooks/useTreeItems.ts +9 -0
- package/src/components/tree/hooks/useTreeService.ts +10 -0
- package/src/components/tree/hooks/useTreeState.ts +7 -0
- package/src/components/tree/index.tsx +9 -0
- package/src/components/tree/style.ts +57 -0
- package/src/components/tree/typings.ts +126 -0
- package/src/components/wizard/WizardModal.ts +9 -0
- package/src/components/wizard/WizardService.ts +123 -0
- package/src/components/wizard/components/ControlledWizardComponent.tsx +22 -0
- package/src/components/wizard/components/Step.tsx +82 -0
- package/src/components/wizard/components/StepTitle.tsx +26 -0
- package/src/components/wizard/components/UncontrolledWizardComponent.tsx +13 -0
- package/src/components/wizard/components/WizardComponent.tsx +15 -0
- package/src/components/wizard/components/WizardContainer.tsx +134 -0
- package/src/components/wizard/components/WizardModalComponent.tsx +15 -0
- package/src/components/wizard/hooks/useStep.ts +18 -0
- package/src/components/wizard/hooks/useWizardController.ts +27 -0
- package/src/components/wizard/hooks/useWizardService.ts +11 -0
- package/src/components/wizard/hooks/useWizardState.ts +7 -0
- package/src/components/wizard/index.tsx +9 -0
- package/src/components/wizard/style.ts +159 -0
- package/src/components/wizard/typings.ts +53 -0
- package/src/fonts.d.ts +1 -0
- package/src/index.ts +269 -9
- package/src/styles/border.ts +8 -11
- package/src/styles/flex.ts +3 -3
- package/src/styles/icon.ts +14 -0
- package/src/styles/position.ts +13 -2
- package/src/styles/size.ts +19 -13
- package/src/styles/svg.ts +4 -3
- package/src/styles/typings.ts +587 -63
- package/src/theme/base.tsx +507 -0
- package/src/theme/tailwind.tsx +112 -0
- package/src/utils/color.ts +35 -1
- package/src/utils/dom.ts +32 -0
- package/src/utils/event.ts +25 -4
- package/src/utils/formatter.ts +7 -10
- package/src/utils/popper.ts +1 -1
- package/src/utils/size.ts +12 -0
- package/src/utils/style.ts +6 -9
- package/src/vendor/reactVirtual.d.ts +76 -0
- package/src/vendor/reactVirtual.js +463 -0
- package/src/vendor/useIsomorphicLayoutEffect.js +3 -0
- package/src/vendor/useRect.js +49 -0
- package/CHANGELOG.md +0 -136
- package/dist/__tests__/mocks/handlers.d.ts +0 -1
- package/dist/__tests__/mocks/responses.d.ts +0 -4
- package/dist/__tests__/mocks/server.d.ts +0 -7
- package/dist/__tests__/setup.d.ts +0 -1
- package/dist/__tests__/setupTests.d.ts +0 -1
- package/dist/__tests__/utils/timeout.d.ts +0 -4
- package/dist/components/button/component.d.ts +0 -4
- package/dist/components/select/components/SelectOptionsComponent.d.ts +0 -4
- package/dist/onekijs-ui.cjs.development.js +0 -2115
- package/dist/onekijs-ui.cjs.development.js.map +0 -1
- package/dist/onekijs-ui.cjs.production.min.js +0 -2
- package/dist/onekijs-ui.cjs.production.min.js.map +0 -1
- package/dist/onekijs-ui.esm.js +0 -1853
- package/dist/onekijs-ui.esm.js.map +0 -1
- package/dist/styles/theme.d.ts +0 -2
- package/jest.config.js +0 -188
- package/postcss.config.js +0 -3
- package/src/__tests__/mocks/handlers.ts +0 -60
- package/src/__tests__/mocks/responses.ts +0 -7
- package/src/__tests__/mocks/server.ts +0 -4
- package/src/__tests__/setup.ts +0 -1
- package/src/__tests__/setupTests.ts +0 -12
- package/src/__tests__/utils/timeout.ts +0 -27
- package/src/components/button/component.tsx +0 -8
- package/src/components/select/components/SelectOptionsComponent.tsx +0 -14
- package/src/styles/index.css +0 -5
- package/src/styles/tailwind.css +0 -86923
- package/src/styles/theme.ts +0 -274
- package/src/utils/query.ts.old +0 -148
- package/tailwind.config.js +0 -8
- package/tsconfig.json +0 -37
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AnonymousObject,
|
|
3
|
+
ContainerValidation,
|
|
4
|
+
FieldValidation,
|
|
5
|
+
FormFieldProps,
|
|
6
|
+
FormLayout,
|
|
7
|
+
ValidationStatus,
|
|
8
|
+
} from 'onekijs-framework';
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { TshirtSize } from '../../styles/typings';
|
|
11
|
+
import { GridSize } from '../grid/typings';
|
|
12
|
+
import { LabelProps } from '../label/typings';
|
|
13
|
+
|
|
14
|
+
export type FieldComponentProps<T extends AnonymousObject> = T & {
|
|
15
|
+
name: string;
|
|
16
|
+
value?: T['value'];
|
|
17
|
+
onFocus?: T['onFocus'];
|
|
18
|
+
onBlur?: T['onBlur'];
|
|
19
|
+
onChange?: T['onChange'];
|
|
20
|
+
status?: ValidationStatus;
|
|
21
|
+
size?: T['size'];
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type FieldDescriptionProps = {
|
|
25
|
+
className?: string;
|
|
26
|
+
content: string | JSX.Element;
|
|
27
|
+
size?: TshirtSize;
|
|
28
|
+
layout?: FormLayout;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export type FieldHelpProps = {
|
|
32
|
+
className?: string;
|
|
33
|
+
content?: string | JSX.Element;
|
|
34
|
+
visible?: boolean;
|
|
35
|
+
size?: TshirtSize;
|
|
36
|
+
layout?: FormLayout;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export type FieldLayoutProps = {
|
|
40
|
+
className?: string;
|
|
41
|
+
description?: string | JSX.Element;
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
DescriptionComponent?: React.FC<FieldDescriptionProps>;
|
|
44
|
+
help?: string | JSX.Element;
|
|
45
|
+
HelpComponent?: React.FC<FieldHelpProps>;
|
|
46
|
+
id?: string | number;
|
|
47
|
+
label?: string;
|
|
48
|
+
LabelComponent?: React.FC<LabelProps>;
|
|
49
|
+
labelWidth?: GridSize;
|
|
50
|
+
xsLabelWidth?: GridSize;
|
|
51
|
+
smLabelWidth?: GridSize;
|
|
52
|
+
mdLabelWidth?: GridSize;
|
|
53
|
+
lgLabelWidth?: GridSize;
|
|
54
|
+
xlLabelWidth?: GridSize;
|
|
55
|
+
layout?: FormLayout;
|
|
56
|
+
required?: boolean;
|
|
57
|
+
size?: TshirtSize;
|
|
58
|
+
validation?: FieldValidation | ContainerValidation;
|
|
59
|
+
visible?: boolean;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export type UseFieldLayoutProps<T extends AnonymousObject> = T &
|
|
63
|
+
FormFieldProps &
|
|
64
|
+
FieldLayoutProps & {
|
|
65
|
+
defaultValue: T['value'];
|
|
66
|
+
FieldComponent?: React.FC<T>;
|
|
67
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { AnonymousObject, extractValidators, FieldOptions, Validator } from 'onekijs-framework';
|
|
2
|
+
import { FieldLayoutProps } from './typings';
|
|
3
|
+
// extract validators from props
|
|
4
|
+
export const extractFieldLayoutProps = (
|
|
5
|
+
props: AnonymousObject,
|
|
6
|
+
): {
|
|
7
|
+
validators: AnonymousObject<Validator>;
|
|
8
|
+
fieldLayoutProps: FieldLayoutProps;
|
|
9
|
+
name: string;
|
|
10
|
+
fieldOptions: FieldOptions;
|
|
11
|
+
fieldProps: AnonymousObject;
|
|
12
|
+
} => {
|
|
13
|
+
const [validators, nonValidatorProps] = extractValidators(props);
|
|
14
|
+
const fieldLayoutProps: FieldLayoutProps = {};
|
|
15
|
+
const fieldOptions: FieldOptions = {};
|
|
16
|
+
const fieldProps: AnonymousObject = {};
|
|
17
|
+
const fieldLayoutKeys = [
|
|
18
|
+
'className',
|
|
19
|
+
'description',
|
|
20
|
+
'DescriptionComponent',
|
|
21
|
+
'help',
|
|
22
|
+
'id',
|
|
23
|
+
'label',
|
|
24
|
+
'LabelComponent',
|
|
25
|
+
'labelWidth',
|
|
26
|
+
'layout',
|
|
27
|
+
'required',
|
|
28
|
+
'size',
|
|
29
|
+
];
|
|
30
|
+
const fieldOptionsKeys = ['defaultValue', 'touchedOn', 'disabled', 'visible'];
|
|
31
|
+
Object.keys(nonValidatorProps).forEach((k) => {
|
|
32
|
+
if (fieldLayoutKeys.includes(k)) {
|
|
33
|
+
(fieldLayoutProps as any)[k] = props[k];
|
|
34
|
+
} else if (fieldOptionsKeys.includes(k)) {
|
|
35
|
+
(fieldOptions as any)[k] = props[k];
|
|
36
|
+
} else if (k !== 'name') {
|
|
37
|
+
fieldProps[k] = props[k];
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
return {
|
|
41
|
+
name: props.name,
|
|
42
|
+
validators,
|
|
43
|
+
fieldOptions,
|
|
44
|
+
fieldLayoutProps,
|
|
45
|
+
fieldProps,
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { FCC } from 'onekijs-framework';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { addClassname } from '../../utils/style';
|
|
5
|
+
import { colStyle } from './style';
|
|
6
|
+
import { ColProps } from './typings';
|
|
7
|
+
|
|
8
|
+
const ColComponent: FCC<ColProps> = ({ className, size, xs, sm, md, lg, xl, offset, ...props }) => {
|
|
9
|
+
const classNames = [`o-col-${size}`, 'o-col'];
|
|
10
|
+
if (xs !== undefined) {
|
|
11
|
+
classNames.unshift(`o-col-xs-${xs}`);
|
|
12
|
+
}
|
|
13
|
+
if (sm !== undefined) {
|
|
14
|
+
classNames.unshift(`o-col-sm-${sm}`);
|
|
15
|
+
}
|
|
16
|
+
if (md !== undefined) {
|
|
17
|
+
classNames.unshift(`o-col-md-${md}`);
|
|
18
|
+
}
|
|
19
|
+
if (lg !== undefined) {
|
|
20
|
+
classNames.unshift(`o-col-lg-${lg}`);
|
|
21
|
+
}
|
|
22
|
+
if (xl !== undefined) {
|
|
23
|
+
classNames.unshift(`o-col-xl-${xl}`);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return <div className={addClassname(classNames.join(' '), className)} {...props}></div>;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const Col = styled(ColComponent)`
|
|
30
|
+
${colStyle}
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
export default Col;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { FCC } from 'onekijs-framework';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { addClassname } from '../../utils/style';
|
|
5
|
+
import { rowStyle } from './style';
|
|
6
|
+
import { RowProps } from './typings';
|
|
7
|
+
|
|
8
|
+
const RowComponent: FCC<RowProps> = ({
|
|
9
|
+
alignItems,
|
|
10
|
+
width,
|
|
11
|
+
xs,
|
|
12
|
+
sm,
|
|
13
|
+
md,
|
|
14
|
+
lg,
|
|
15
|
+
xl,
|
|
16
|
+
gap,
|
|
17
|
+
gapX,
|
|
18
|
+
gapY,
|
|
19
|
+
margin,
|
|
20
|
+
marginBottom,
|
|
21
|
+
marginLeft,
|
|
22
|
+
marginRight,
|
|
23
|
+
marginTop,
|
|
24
|
+
marginX,
|
|
25
|
+
marginY,
|
|
26
|
+
...props
|
|
27
|
+
}) => {
|
|
28
|
+
return <div {...props} className={addClassname('o-row', props.className)}></div>;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const Row = styled(RowComponent)`
|
|
32
|
+
${rowStyle}
|
|
33
|
+
`;
|
|
34
|
+
|
|
35
|
+
export default Row;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { WidthProperty } from 'csstype';
|
|
2
|
+
import { AnonymousObject } from 'onekijs-framework';
|
|
3
|
+
import { css } from 'styled-components';
|
|
4
|
+
import { alignItems } from '../../styles/alignment';
|
|
5
|
+
import { display } from '../../styles/display';
|
|
6
|
+
import { flexDirection, flexWrap } from '../../styles/flex';
|
|
7
|
+
import { boxSizing } from '../../styles/interactivity';
|
|
8
|
+
import { width } from '../../styles/size';
|
|
9
|
+
import { marginBottom, marginLeft, marginRight, marginTop, marginX, marginY } from '../../styles/spacing';
|
|
10
|
+
import { ComponentStyle, Theme, TLength } from '../../styles/typings';
|
|
11
|
+
import { ColProps, RowProps } from './typings';
|
|
12
|
+
|
|
13
|
+
const getColWidths = (gap: WidthProperty<TLength>, theme: Theme) => {
|
|
14
|
+
const getContent = (size: number, variant?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'): string => {
|
|
15
|
+
const content = `{ flex: 0 0 calc((100% / 12) * ${size} - ${gap}); max-width: calc((100% / 12) * ${size} - ${gap}); }`;
|
|
16
|
+
if (variant) {
|
|
17
|
+
const breakpoint = theme.breakpoints[variant];
|
|
18
|
+
return `@media (min-width: ${breakpoint}) { .o-col-${variant}-${size} ${content} }`;
|
|
19
|
+
} else {
|
|
20
|
+
return `.o-col-${size} ${content}`;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const colWidths: string[] = [];
|
|
24
|
+
([undefined, 'sm', 'md', 'lg', 'xl'] as any).forEach((variant?: 'sm' | 'md' | 'lg' | 'xl') => {
|
|
25
|
+
for (let i = 1; i <= 12; i++) {
|
|
26
|
+
colWidths.push(getContent(i, variant));
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return colWidths.join(' ');
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const formatSize = (value: TLength | undefined, defaultValue: string): string => {
|
|
33
|
+
return value === undefined ? defaultValue : value === 0 ? '0px' : value;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const rowStyle: ComponentStyle<RowProps> = ({
|
|
37
|
+
alignItems: align = 'stretch',
|
|
38
|
+
width: w = '100%',
|
|
39
|
+
xs,
|
|
40
|
+
sm,
|
|
41
|
+
md,
|
|
42
|
+
lg,
|
|
43
|
+
xl,
|
|
44
|
+
gap,
|
|
45
|
+
gapX,
|
|
46
|
+
gapY,
|
|
47
|
+
marginTop: mt,
|
|
48
|
+
marginBottom: mb,
|
|
49
|
+
marginRight: mr,
|
|
50
|
+
marginLeft: ml,
|
|
51
|
+
marginX: mx,
|
|
52
|
+
marginY: my,
|
|
53
|
+
margin: m,
|
|
54
|
+
reverse = false,
|
|
55
|
+
}) => {
|
|
56
|
+
const gapStr = formatSize(gap, '0px');
|
|
57
|
+
const gapXStr = formatSize(gapX, gapStr);
|
|
58
|
+
const gapYStr = formatSize(gapY, gapStr);
|
|
59
|
+
const marginStr = formatSize(m, '0px');
|
|
60
|
+
const marginXStr = formatSize(mx, marginStr);
|
|
61
|
+
const marginYStr = formatSize(my, marginStr);
|
|
62
|
+
const marginTopStr = formatSize(mt, marginYStr);
|
|
63
|
+
const marginBottomStr = formatSize(mb, marginYStr);
|
|
64
|
+
const marginRightStr = formatSize(mr, marginXStr);
|
|
65
|
+
const marginLeftStr = formatSize(ml, marginXStr);
|
|
66
|
+
const variantWidth: AnonymousObject = {};
|
|
67
|
+
if (xs !== undefined) variantWidth.xs = xs;
|
|
68
|
+
if (sm !== undefined) variantWidth.sm = sm;
|
|
69
|
+
if (md !== undefined) variantWidth.md = md;
|
|
70
|
+
if (lg !== undefined) variantWidth.lg = lg;
|
|
71
|
+
if (xl !== undefined) variantWidth.xl = xl;
|
|
72
|
+
return css`
|
|
73
|
+
${display('flex')}
|
|
74
|
+
${flexWrap('wrap')}
|
|
75
|
+
${alignItems(align)}
|
|
76
|
+
${boxSizing('border-box')}
|
|
77
|
+
${flexDirection(reverse ? 'row-reverse' : 'row')}
|
|
78
|
+
${width(w, variantWidth)}
|
|
79
|
+
${marginLeft(`calc(${marginLeftStr} - ${gapXStr}/2)`)}
|
|
80
|
+
${marginRight(`calc(${marginRightStr} - ${gapXStr}/2)`)}
|
|
81
|
+
${marginTop(`calc(${marginTopStr} - ${gapYStr}/2)`)}
|
|
82
|
+
${marginBottom(`calc(${marginBottomStr} - ${gapYStr}/2)`)}
|
|
83
|
+
& > .o-col {
|
|
84
|
+
${marginX(`calc(${gapXStr}/2)`)}
|
|
85
|
+
${marginY(`calc(${gapYStr}/2)`)}
|
|
86
|
+
}
|
|
87
|
+
${(props) => getColWidths(gapXStr, props.theme)}
|
|
88
|
+
`;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export const colStyle: ComponentStyle<ColProps> = () => {
|
|
92
|
+
return css``;
|
|
93
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { AlignItemsProperty, HeightProperty, MarginProperty, WidthProperty } from 'csstype';
|
|
2
|
+
import { TLength } from '../../styles/typings';
|
|
3
|
+
|
|
4
|
+
export type RowProps = Omit<React.InputHTMLAttributes<HTMLDivElement>, 'width'> & {
|
|
5
|
+
alignItems?: AlignItemsProperty;
|
|
6
|
+
gap?: WidthProperty<TLength>;
|
|
7
|
+
gapX?: WidthProperty<TLength>;
|
|
8
|
+
gapY?: HeightProperty<TLength>;
|
|
9
|
+
width?: WidthProperty<TLength>;
|
|
10
|
+
xs?: WidthProperty<TLength>;
|
|
11
|
+
sm?: WidthProperty<TLength>;
|
|
12
|
+
md?: WidthProperty<TLength>;
|
|
13
|
+
lg?: WidthProperty<TLength>;
|
|
14
|
+
xl?: WidthProperty<TLength>;
|
|
15
|
+
reverse?: boolean;
|
|
16
|
+
marginLeft?: MarginProperty<TLength>;
|
|
17
|
+
marginRight?: MarginProperty<TLength>;
|
|
18
|
+
marginX?: MarginProperty<TLength>;
|
|
19
|
+
marginTop?: MarginProperty<TLength>;
|
|
20
|
+
marginBottom?: MarginProperty<TLength>;
|
|
21
|
+
marginY?: MarginProperty<TLength>;
|
|
22
|
+
margin?: MarginProperty<TLength>;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export type ColProps = Omit<React.InputHTMLAttributes<HTMLDivElement>, 'size'> & {
|
|
26
|
+
size: GridSize;
|
|
27
|
+
xs?: GridSize;
|
|
28
|
+
sm?: GridSize;
|
|
29
|
+
md?: GridSize;
|
|
30
|
+
lg?: GridSize;
|
|
31
|
+
xl?: GridSize;
|
|
32
|
+
offset?: GridSize;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type GridSize = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
import { alignItems } from '../../styles/alignment';
|
|
4
|
+
import { display } from '../../styles/display';
|
|
5
|
+
import { color } from '../../styles/typography';
|
|
6
|
+
import { IconProps } from './typings';
|
|
7
|
+
|
|
8
|
+
const IconComponent: FC<IconProps> = ({ className, onClick }) => {
|
|
9
|
+
return (
|
|
10
|
+
<div className={className} onClick={onClick}>
|
|
11
|
+
<svg className="o-icon-close-all-svg" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
|
12
|
+
<path
|
|
13
|
+
fillRule="evenodd"
|
|
14
|
+
clipRule="evenodd"
|
|
15
|
+
d="M8.621 8.086l-.707-.707L6.5 8.793 5.086 7.379l-.707.707L5.793 9.5l-1.414 1.414.707.707L6.5 10.207l1.414 1.414.707-.707L7.207 9.5l1.414-1.414z"
|
|
16
|
+
/>
|
|
17
|
+
<path
|
|
18
|
+
fillRule="evenodd"
|
|
19
|
+
clipRule="evenodd"
|
|
20
|
+
d="M5 3l1-1h7l1 1v7l-1 1h-2v2l-1 1H3l-1-1V6l1-1h2V3zm1 2h4l1 1v4h2V3H6v2zm4 1H3v7h7V6z"
|
|
21
|
+
/>
|
|
22
|
+
</svg>
|
|
23
|
+
</div>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default styled(IconComponent)`
|
|
28
|
+
${({ width, height, color: cssColor = 'inherit' }) => css`
|
|
29
|
+
width: ${width};
|
|
30
|
+
height: ${height};
|
|
31
|
+
${display('flex')};
|
|
32
|
+
${alignItems('center')};
|
|
33
|
+
${color(cssColor)}
|
|
34
|
+
.o-icon-close-all-svg {
|
|
35
|
+
fill: currentColor;
|
|
36
|
+
}
|
|
37
|
+
`}
|
|
38
|
+
`;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region -- system import
|
|
2
|
+
import React, { FC } from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
//#endregion
|
|
5
|
+
|
|
6
|
+
const IconComponent: FC<React.InputHTMLAttributes<HTMLDivElement>> = ({ className }) => {
|
|
7
|
+
return (
|
|
8
|
+
<div className={className}>
|
|
9
|
+
<svg className="o-icon-close-svg" viewBox="0 0 100 100">
|
|
10
|
+
<path d="M35.6 34.4L28 26.8l7.6-7.6c.2-.2.2-.5 0-.7l-.5-.5c-.2-.2-.5-.2-.7 0l-7.6 7.6-7.5-7.6c-.2-.2-.5-.2-.7 0l-.6.6c-.2.2-.2.5 0 .7l7.6 7.6-7.6 7.5c-.2.2-.2.5 0 .7l.5.5c.2.2.5.2.7 0l7.6-7.6 7.6 7.6c.2.2.5.2.7 0l.5-.5c.2-.2.2-.5 0-.7z" />
|
|
11
|
+
</svg>
|
|
12
|
+
</div>
|
|
13
|
+
);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const CrossIcon = styled(IconComponent)`
|
|
17
|
+
width: ${(props) => props.width || '32px'};
|
|
18
|
+
height: ${(props) => props.height || '32px'};
|
|
19
|
+
.o-icon-close-svg {
|
|
20
|
+
display: inline-block;
|
|
21
|
+
stroke-width: 0;
|
|
22
|
+
stroke: currentColor;
|
|
23
|
+
fill: currentColor;
|
|
24
|
+
font-size: 3rem;
|
|
25
|
+
color: #666e6e;
|
|
26
|
+
opacity: 0.6;
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
29
|
+
|
|
30
|
+
export default CrossIcon;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
import { alignItems } from '../../styles/alignment';
|
|
4
|
+
import { display } from '../../styles/display';
|
|
5
|
+
import { addClassname } from '../../utils/style';
|
|
6
|
+
import { IconProps } from './typings';
|
|
7
|
+
|
|
8
|
+
const IconComponent: FC<IconProps> = (props) => {
|
|
9
|
+
const className = addClassname('o-icon-file', props.className);
|
|
10
|
+
return (
|
|
11
|
+
<div {...props} className={className}>
|
|
12
|
+
<svg
|
|
13
|
+
className="o-icon-file-svg"
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
viewBox="0 0 1024 1024"
|
|
16
|
+
width="16px"
|
|
17
|
+
height="16px"
|
|
18
|
+
>
|
|
19
|
+
<path d="M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494z" />
|
|
20
|
+
</svg>
|
|
21
|
+
</div>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default styled(IconComponent)`
|
|
26
|
+
${({ width = '16px', height = '16px', color: cssColor = 'currentColor' }) => css`
|
|
27
|
+
width: ${width};
|
|
28
|
+
height: ${height};
|
|
29
|
+
${display('flex')};
|
|
30
|
+
${alignItems('center')};
|
|
31
|
+
.o-icon-file-svg {
|
|
32
|
+
display: inline-block;
|
|
33
|
+
fill: ${cssColor};
|
|
34
|
+
}
|
|
35
|
+
`}
|
|
36
|
+
`;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
import { addClassname } from '../../utils/style';
|
|
4
|
+
import { alignItems } from '../../styles/alignment';
|
|
5
|
+
import { display } from '../../styles/display';
|
|
6
|
+
import { IconProps } from './typings';
|
|
7
|
+
|
|
8
|
+
const IconComponent: FC<IconProps> = (props) => {
|
|
9
|
+
const className = addClassname('o-icon-folder', props.className);
|
|
10
|
+
return (
|
|
11
|
+
<div {...props} className={className}>
|
|
12
|
+
<svg
|
|
13
|
+
className="o-icon-folder-svg"
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
viewBox="0 0 24 24"
|
|
16
|
+
width="24px"
|
|
17
|
+
height="24px"
|
|
18
|
+
>
|
|
19
|
+
<path d="M20,6h-8l-2-2H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8C22,6.9,21.1,6,20,6z" />
|
|
20
|
+
</svg>
|
|
21
|
+
</div>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default styled(IconComponent)`
|
|
26
|
+
${({ width = '24px', height = '24px', color: cssColor = 'currentColor' }) => css`
|
|
27
|
+
width: ${width};
|
|
28
|
+
height: ${height};
|
|
29
|
+
${display('flex')};
|
|
30
|
+
${alignItems('center')};
|
|
31
|
+
.o-icon-folder-svg {
|
|
32
|
+
display: inline-block;
|
|
33
|
+
fill: ${cssColor};
|
|
34
|
+
}
|
|
35
|
+
`}
|
|
36
|
+
`;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
-
import styled, { keyframes } from 'styled-components';
|
|
2
|
+
import styled, { css, keyframes } from 'styled-components';
|
|
3
|
+
import { stroke } from '../../styles/svg';
|
|
4
|
+
import { addClassname } from '../../utils/style';
|
|
5
|
+
import { IconProps } from './typings';
|
|
3
6
|
|
|
4
|
-
const IconComponent: FC<
|
|
7
|
+
const IconComponent: FC<IconProps> = ({ className }) => {
|
|
5
8
|
return (
|
|
6
|
-
<div className={className}>
|
|
9
|
+
<div className={addClassname('o-icon-loading-container', className)}>
|
|
7
10
|
<svg className="o-icon-loading-svg" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
|
|
8
11
|
<circle className="o-icon-loading-svg-circle" cx="50" cy="50" r="45" />
|
|
9
12
|
</svg>
|
|
@@ -38,25 +41,25 @@ const iconCircleKeyFrame = keyframes`
|
|
|
38
41
|
`;
|
|
39
42
|
|
|
40
43
|
export default styled(IconComponent)`
|
|
41
|
-
height:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
transform: translateY(-50%);
|
|
47
|
-
width: 100%;
|
|
48
|
-
|
|
49
|
-
.o-icon-loading-svg {
|
|
50
|
-
animation: 2s linear infinite both ${iconKeyFrame};
|
|
51
|
-
}
|
|
44
|
+
${({ width: cssWidth = '16px', height: cssHeight = '16px', color: cssColor = 'primary' }) => css`
|
|
45
|
+
height: ${cssHeight};
|
|
46
|
+
width: ${cssWidth};
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
align-items: center;
|
|
52
49
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
50
|
+
.o-icon-loading-svg {
|
|
51
|
+
animation: 2s linear infinite both ${iconKeyFrame};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.o-icon-loading-svg-circle {
|
|
55
|
+
animation: 1.4s ease-in-out infinite both ${iconCircleKeyFrame};
|
|
56
|
+
fill: transparent;
|
|
57
|
+
stroke: currentColor;
|
|
58
|
+
${stroke(cssColor)}
|
|
59
|
+
stroke-dasharray: 285;
|
|
60
|
+
stroke-linecap: round;
|
|
61
|
+
stroke-width: 10px;
|
|
62
|
+
transform-origin: 50% 50%;
|
|
63
|
+
}
|
|
64
|
+
`}
|
|
62
65
|
`;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
import { color } from '../../styles/typography';
|
|
4
|
+
import { alignItems } from '../../styles/alignment';
|
|
5
|
+
import { display } from '../../styles/display';
|
|
6
|
+
import { IconProps } from './typings';
|
|
7
|
+
import { cursor } from '../../styles/interactivity';
|
|
8
|
+
|
|
9
|
+
const IconComponent: FC<IconProps> = (props) => {
|
|
10
|
+
return (
|
|
11
|
+
<div {...props}>
|
|
12
|
+
<svg className="o-icon-menu-svg" viewBox="0 0 100 100">
|
|
13
|
+
<rect width="100" height="15" rx="15" ry="15"></rect>
|
|
14
|
+
<rect y="40" width="100" height="15" rx="15" ry="15"></rect>
|
|
15
|
+
<rect y="80" width="100" height="15" rx="15" ry="15"></rect>
|
|
16
|
+
</svg>
|
|
17
|
+
</div>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default styled(IconComponent)`
|
|
22
|
+
${({ width = '16px', height = '16px', color: cssColor = 'inherit' }) => css`
|
|
23
|
+
width: ${width};
|
|
24
|
+
height: ${height};
|
|
25
|
+
${display('flex')};
|
|
26
|
+
${alignItems('center')};
|
|
27
|
+
${color(cssColor)}
|
|
28
|
+
${cursor('pointer')}
|
|
29
|
+
.o-icon-menu-svg {
|
|
30
|
+
display: inline-block;
|
|
31
|
+
fill: currentColor;
|
|
32
|
+
}
|
|
33
|
+
`}
|
|
34
|
+
`;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
import { alignItems } from '../../styles/alignment';
|
|
4
|
+
import { display } from '../../styles/display';
|
|
5
|
+
import { color } from '../../styles/typography';
|
|
6
|
+
import { IconProps } from './typings';
|
|
7
|
+
|
|
8
|
+
const RemoveIcon: FC<IconProps> = ({ className, onClick }) => {
|
|
9
|
+
return (
|
|
10
|
+
<div className={className} onClick={onClick}>
|
|
11
|
+
<svg
|
|
12
|
+
version="1.1"
|
|
13
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
14
|
+
xmlnsXlink="http://www.w3.org/1999/xlink"
|
|
15
|
+
viewBox="0 0 16 16"
|
|
16
|
+
width="100%"
|
|
17
|
+
height="100%"
|
|
18
|
+
>
|
|
19
|
+
<path
|
|
20
|
+
fill="currentColor"
|
|
21
|
+
d="M15.854 12.854c-0-0-0-0-0-0l-4.854-4.854 4.854-4.854c0-0 0-0 0-0 0.052-0.052 0.090-0.113 0.114-0.178 0.066-0.178 0.028-0.386-0.114-0.529l-2.293-2.293c-0.143-0.143-0.351-0.181-0.529-0.114-0.065 0.024-0.126 0.062-0.178 0.114 0 0-0 0-0 0l-4.854 4.854-4.854-4.854c-0-0-0-0-0-0-0.052-0.052-0.113-0.090-0.178-0.114-0.178-0.066-0.386-0.029-0.529 0.114l-2.293 2.293c-0.143 0.143-0.181 0.351-0.114 0.529 0.024 0.065 0.062 0.126 0.114 0.178 0 0 0 0 0 0l4.854 4.854-4.854 4.854c-0 0-0 0-0 0-0.052 0.052-0.090 0.113-0.114 0.178-0.066 0.178-0.029 0.386 0.114 0.529l2.293 2.293c0.143 0.143 0.351 0.181 0.529 0.114 0.065-0.024 0.126-0.062 0.178-0.114 0-0 0-0 0-0l4.854-4.854 4.854 4.854c0 0 0 0 0 0 0.052 0.052 0.113 0.090 0.178 0.114 0.178 0.066 0.386 0.029 0.529-0.114l2.293-2.293c0.143-0.143 0.181-0.351 0.114-0.529-0.024-0.065-0.062-0.126-0.114-0.178z"
|
|
22
|
+
></path>
|
|
23
|
+
</svg>
|
|
24
|
+
</div>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default styled(RemoveIcon)`
|
|
29
|
+
${({ width = '16px', height = '16px', color: cssColor = 'inherit' }) => css`
|
|
30
|
+
width: ${width};
|
|
31
|
+
height: ${height};
|
|
32
|
+
${display('flex')};
|
|
33
|
+
${alignItems('center')};
|
|
34
|
+
${color(cssColor)}
|
|
35
|
+
`}
|
|
36
|
+
`;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
import { color } from '../../styles/typography';
|
|
4
|
+
import { alignItems } from '../../styles/alignment';
|
|
5
|
+
import { display } from '../../styles/display';
|
|
6
|
+
import { IconProps } from './typings';
|
|
7
|
+
|
|
8
|
+
const IconComponent: FC<IconProps> = ({ className, onClick }) => {
|
|
9
|
+
return (
|
|
10
|
+
<div className={className} onClick={onClick}>
|
|
11
|
+
<svg className="o-icon-search-svg" viewBox="0 0 118.783 118.783">
|
|
12
|
+
<path
|
|
13
|
+
d="M115.97,101.597L88.661,74.286c4.64-7.387,7.333-16.118,7.333-25.488c0-26.509-21.49-47.996-47.998-47.996
|
|
14
|
+
S0,22.289,0,48.798c0,26.51,21.487,47.995,47.996,47.995c10.197,0,19.642-3.188,27.414-8.605l26.984,26.986
|
|
15
|
+
c1.875,1.873,4.333,2.806,6.788,2.806c2.458,0,4.913-0.933,6.791-2.806C119.72,111.423,119.72,105.347,115.97,101.597z
|
|
16
|
+
M47.996,81.243c-17.917,0-32.443-14.525-32.443-32.443s14.526-32.444,32.443-32.444c17.918,0,32.443,14.526,32.443,32.444
|
|
17
|
+
S65.914,81.243,47.996,81.243z"
|
|
18
|
+
/>
|
|
19
|
+
</svg>
|
|
20
|
+
</div>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default styled(IconComponent)`
|
|
25
|
+
${({ width, height, color: cssColor = 'inherit' }) => css`
|
|
26
|
+
width: ${width};
|
|
27
|
+
height: ${height};
|
|
28
|
+
${display('flex')};
|
|
29
|
+
${alignItems('center')};
|
|
30
|
+
${color(cssColor)}
|
|
31
|
+
.o-icon-search-svg {
|
|
32
|
+
display: inline-block;
|
|
33
|
+
stroke-width: 0;
|
|
34
|
+
stroke: currentColor;
|
|
35
|
+
fill: currentColor;
|
|
36
|
+
}
|
|
37
|
+
`}
|
|
38
|
+
`;
|