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,507 @@
|
|
|
1
|
+
import { FCC, get, set, simpleMergeDeep } from 'onekijs-framework';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ThemeProvider } from 'styled-components';
|
|
4
|
+
import { ColorKeys, Theme, ThemeProps } from '../styles/typings';
|
|
5
|
+
import { darken, lighten } from '../utils/color';
|
|
6
|
+
|
|
7
|
+
export const baseTheme = (customTheme: Partial<Theme> = {}): Theme => {
|
|
8
|
+
const theme: Partial<Theme> = {
|
|
9
|
+
breakpoints: {
|
|
10
|
+
xs: '576px',
|
|
11
|
+
sm: '768px',
|
|
12
|
+
md: '992px',
|
|
13
|
+
lg: '1200px',
|
|
14
|
+
xl: '1850px',
|
|
15
|
+
},
|
|
16
|
+
colors: {
|
|
17
|
+
white: 'white',
|
|
18
|
+
lightest: 'gray-100',
|
|
19
|
+
lighter: 'gray-200',
|
|
20
|
+
light: 'gray-400',
|
|
21
|
+
dark: 'gray-600',
|
|
22
|
+
darker: 'gray-700',
|
|
23
|
+
darkest: 'gray-900',
|
|
24
|
+
black: 'black',
|
|
25
|
+
success: 'green-500',
|
|
26
|
+
info: 'blue-500',
|
|
27
|
+
warning: 'yellow-500',
|
|
28
|
+
danger: 'red-500',
|
|
29
|
+
primary: 'blue-500',
|
|
30
|
+
secondary: 'blue-900',
|
|
31
|
+
blue: 'blue-500',
|
|
32
|
+
red: 'red-500',
|
|
33
|
+
purple: 'purple-500',
|
|
34
|
+
pink: 'pink-500',
|
|
35
|
+
indigo: 'indigo-500',
|
|
36
|
+
teal: 'teal-500',
|
|
37
|
+
orange: 'orange-500',
|
|
38
|
+
yellow: 'yellow-500',
|
|
39
|
+
green: 'green-500',
|
|
40
|
+
lightblue: 'blue-200',
|
|
41
|
+
lightred: 'red-200',
|
|
42
|
+
lightpurple: 'purple-200',
|
|
43
|
+
lightpink: 'pink-200',
|
|
44
|
+
lightindigo: 'indigo-200',
|
|
45
|
+
lightteal: 'teal-200',
|
|
46
|
+
lightorange: 'orange-200',
|
|
47
|
+
lightyellow: 'yellow-200',
|
|
48
|
+
lightgreen: 'green-200',
|
|
49
|
+
background: 'white',
|
|
50
|
+
},
|
|
51
|
+
palette: {},
|
|
52
|
+
spacings: {
|
|
53
|
+
none: '0',
|
|
54
|
+
'2xs': '0.125rem',
|
|
55
|
+
xs: '0.25rem',
|
|
56
|
+
sm: '0.5rem',
|
|
57
|
+
md: '0.75rem',
|
|
58
|
+
lg: '1rem',
|
|
59
|
+
xl: '1.25rem',
|
|
60
|
+
'2xl': '1.5rem',
|
|
61
|
+
'3xl': '2rem',
|
|
62
|
+
'4xl': '2.5rem',
|
|
63
|
+
'5xl': '3rem',
|
|
64
|
+
'6xl': '4rem',
|
|
65
|
+
'7xl': '5rem',
|
|
66
|
+
'8xl': '6rem',
|
|
67
|
+
'9xl': '8rem',
|
|
68
|
+
'10xl': '10rem',
|
|
69
|
+
'11xl': '12rem',
|
|
70
|
+
'12xl': '14rem',
|
|
71
|
+
'13xl': '16rem',
|
|
72
|
+
px: '1px',
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
font: {
|
|
76
|
+
families: {
|
|
77
|
+
sans: 'Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',
|
|
78
|
+
serif: 'Georgia, Cambria, "Times New Roman", Times, serif',
|
|
79
|
+
mono: 'Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
|
|
80
|
+
},
|
|
81
|
+
lineHeights: {
|
|
82
|
+
none: 1,
|
|
83
|
+
xs: 1.25,
|
|
84
|
+
sm: 1.375,
|
|
85
|
+
md: 1.5,
|
|
86
|
+
lg: 1.625,
|
|
87
|
+
xl: 2,
|
|
88
|
+
'2xl': 2.5,
|
|
89
|
+
'3xl': 3,
|
|
90
|
+
'4xl': 4,
|
|
91
|
+
},
|
|
92
|
+
sizes: {
|
|
93
|
+
'2xs': '.625rem',
|
|
94
|
+
xs: '.75rem',
|
|
95
|
+
sm: '.875rem',
|
|
96
|
+
md: '1rem',
|
|
97
|
+
lg: '1.125rem',
|
|
98
|
+
xl: '1.25rem',
|
|
99
|
+
'2xl': '1.5rem',
|
|
100
|
+
'3xl': '1.875rem',
|
|
101
|
+
'4xl': '2.25rem',
|
|
102
|
+
'5xl': '3rem',
|
|
103
|
+
'6xl': '4rem',
|
|
104
|
+
default: '.0875rem',
|
|
105
|
+
},
|
|
106
|
+
spacings: {
|
|
107
|
+
xs: '-0.05em',
|
|
108
|
+
sm: '-0.025em',
|
|
109
|
+
md: 0,
|
|
110
|
+
lg: '0.025em',
|
|
111
|
+
xl: '0.05em',
|
|
112
|
+
'2xl': '0.1em',
|
|
113
|
+
},
|
|
114
|
+
weights: {
|
|
115
|
+
hairline: 100,
|
|
116
|
+
thin: 200,
|
|
117
|
+
light: 300,
|
|
118
|
+
normal: 400,
|
|
119
|
+
medium: 500,
|
|
120
|
+
semibold: 600,
|
|
121
|
+
bold: 700,
|
|
122
|
+
extrabold: 800,
|
|
123
|
+
black: 900,
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
radius: {
|
|
127
|
+
none: 0,
|
|
128
|
+
'2xs': '0.625rem',
|
|
129
|
+
xs: '0.125rem',
|
|
130
|
+
sm: '0.25rem',
|
|
131
|
+
md: '0.375rem',
|
|
132
|
+
lg: '0.5rem',
|
|
133
|
+
xl: '0.625rem',
|
|
134
|
+
full: '9999px',
|
|
135
|
+
},
|
|
136
|
+
shadow: {
|
|
137
|
+
default: '0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)',
|
|
138
|
+
xs: '0 0 0 1px rgba(0, 0, 0, 0.05)',
|
|
139
|
+
sm: '1px 1px 5px hsl(198, 0%, 91%)',
|
|
140
|
+
md: ' 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)',
|
|
141
|
+
lg: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)',
|
|
142
|
+
xl: '0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)',
|
|
143
|
+
'2xl': '0 25px 50px -12px rgba(0, 0, 0, 0.25)',
|
|
144
|
+
inner: 'inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)',
|
|
145
|
+
outline: '0 0 0 3px rgba(66, 153, 225, 0.5)',
|
|
146
|
+
none: 'none',
|
|
147
|
+
},
|
|
148
|
+
|
|
149
|
+
sizes: {
|
|
150
|
+
0: 0,
|
|
151
|
+
1: '0.25rem',
|
|
152
|
+
2: '0.5rem',
|
|
153
|
+
3: '0.75rem',
|
|
154
|
+
4: '1rem',
|
|
155
|
+
5: '1.25rem',
|
|
156
|
+
6: '1.5rem',
|
|
157
|
+
8: '2rem',
|
|
158
|
+
10: '2.5rem',
|
|
159
|
+
12: '3rem',
|
|
160
|
+
16: '4rem',
|
|
161
|
+
20: '5rem',
|
|
162
|
+
24: '6rem',
|
|
163
|
+
32: '8rem',
|
|
164
|
+
40: '10rem',
|
|
165
|
+
48: '12rem',
|
|
166
|
+
56: '14rem',
|
|
167
|
+
64: '16rem',
|
|
168
|
+
px: '1px',
|
|
169
|
+
xs: '20rem',
|
|
170
|
+
sm: '24rem',
|
|
171
|
+
md: '28rem',
|
|
172
|
+
lg: '32rem',
|
|
173
|
+
xl: '36rem',
|
|
174
|
+
'2xl': '42rem',
|
|
175
|
+
'3xl': '48rem',
|
|
176
|
+
'4xl': '56rem',
|
|
177
|
+
'5xl': '64rem',
|
|
178
|
+
'6xl': '72rem',
|
|
179
|
+
'screen-sm': '640px',
|
|
180
|
+
'screen-md': '768px',
|
|
181
|
+
'screen-lg': '1024px',
|
|
182
|
+
'screen-xl': '1280px',
|
|
183
|
+
},
|
|
184
|
+
|
|
185
|
+
fieldLayout: {
|
|
186
|
+
marginY: 'xs',
|
|
187
|
+
helperColor: 'primary',
|
|
188
|
+
helperMarginLeft: 'sm',
|
|
189
|
+
helperMarginRight: 'xs',
|
|
190
|
+
descriptionFontSize: 'sm',
|
|
191
|
+
descriptionColor: 'gray-600',
|
|
192
|
+
},
|
|
193
|
+
|
|
194
|
+
table: {
|
|
195
|
+
bgColor: 'white',
|
|
196
|
+
shadow: 'none',
|
|
197
|
+
thPaddingX: 'md',
|
|
198
|
+
thPaddingY: 'md',
|
|
199
|
+
thBorderBottomWidth: '1px',
|
|
200
|
+
thBorderBottomColor: 'lightest',
|
|
201
|
+
thBgColor: 'lightest',
|
|
202
|
+
thFontWeigth: 'semibold',
|
|
203
|
+
thFontColor: 'darker',
|
|
204
|
+
thFontCase: 'uppercase',
|
|
205
|
+
thFontSize: 'xs',
|
|
206
|
+
thLetterSpacing: 'xl',
|
|
207
|
+
thFilterInputBgColor: 'lighter',
|
|
208
|
+
thFilterInputFontSize: 'sm',
|
|
209
|
+
thFilterInputPaddingX: 'xs',
|
|
210
|
+
thFilterInputPaddingY: 'xs',
|
|
211
|
+
tdFontColor: 'darkest',
|
|
212
|
+
tdPaddingX: 'md',
|
|
213
|
+
tdPaddingY: 'sm',
|
|
214
|
+
tdBorderBottomColor: 'lighter',
|
|
215
|
+
tdBorderBottomStyle: 'solid',
|
|
216
|
+
tdBorderBottomWidth: '1px',
|
|
217
|
+
tdStripBgColor: 'lightest',
|
|
218
|
+
tdHoverBgColor: 'primary',
|
|
219
|
+
tdHoverFontColor: 'inherit',
|
|
220
|
+
tdExpandedBgColor: 'lightest',
|
|
221
|
+
loadingRowBgColor: 'lightest',
|
|
222
|
+
loadingRowMinHeight: '40px',
|
|
223
|
+
},
|
|
224
|
+
|
|
225
|
+
input: {
|
|
226
|
+
bgColor: 'white',
|
|
227
|
+
width: 'full',
|
|
228
|
+
borderWidth: 1,
|
|
229
|
+
borderColor: 'light',
|
|
230
|
+
borderRadius: 'sm',
|
|
231
|
+
borderStyle: 'solid',
|
|
232
|
+
borderFocusColor: 'primary',
|
|
233
|
+
borderFocusWidth: 2,
|
|
234
|
+
paddingX: 'sm',
|
|
235
|
+
paddingY: 'xs',
|
|
236
|
+
xsPaddingX: 'sm',
|
|
237
|
+
xsPaddingY: 0,
|
|
238
|
+
xsFontSize: 'sm',
|
|
239
|
+
smPaddingX: 'sm',
|
|
240
|
+
smPaddingY: 'xs',
|
|
241
|
+
smFontSize: 'sm',
|
|
242
|
+
mdPaddingX: 'sm',
|
|
243
|
+
mdPaddingY: 'sm',
|
|
244
|
+
mdFontSize: 'default',
|
|
245
|
+
lgPaddingX: 'sm',
|
|
246
|
+
lgPaddingY: 'md',
|
|
247
|
+
lgFontSize: 'default',
|
|
248
|
+
xlPaddingX: 'sm',
|
|
249
|
+
xlPaddingY: 'lg',
|
|
250
|
+
xlFontSize: 'lg',
|
|
251
|
+
appearance: 'none',
|
|
252
|
+
outline: 'none',
|
|
253
|
+
fontColor: 'darkest',
|
|
254
|
+
placeholderColor: 'light',
|
|
255
|
+
},
|
|
256
|
+
|
|
257
|
+
label: {
|
|
258
|
+
fontWeight: 'medium',
|
|
259
|
+
fontCase: 'none',
|
|
260
|
+
fontColor: 'darker',
|
|
261
|
+
fontSize: 'inherit',
|
|
262
|
+
letterSpacing: 'md',
|
|
263
|
+
requiredColor: 'danger',
|
|
264
|
+
requiredWeight: 'bold',
|
|
265
|
+
requiredMarginLeft: 'xs',
|
|
266
|
+
helperIconColor: 'primary',
|
|
267
|
+
helperMarginLeft: 'sm',
|
|
268
|
+
},
|
|
269
|
+
|
|
270
|
+
link: {
|
|
271
|
+
fontWeight: 'normal',
|
|
272
|
+
fontColor: 'primary',
|
|
273
|
+
textDecoration: 'none',
|
|
274
|
+
fontWeightHover: 'normal',
|
|
275
|
+
fontColorHover: 'primary',
|
|
276
|
+
textDecorationHover: 'underline',
|
|
277
|
+
},
|
|
278
|
+
|
|
279
|
+
checkbox: {
|
|
280
|
+
color: 'primary',
|
|
281
|
+
bgColor: 'white',
|
|
282
|
+
},
|
|
283
|
+
|
|
284
|
+
dashboard: {
|
|
285
|
+
left: {
|
|
286
|
+
bgColor: 'lighter',
|
|
287
|
+
},
|
|
288
|
+
header: {
|
|
289
|
+
bgColor: 'secondary',
|
|
290
|
+
},
|
|
291
|
+
body: {
|
|
292
|
+
bgColor: 'background',
|
|
293
|
+
},
|
|
294
|
+
right: {
|
|
295
|
+
bgColor: 'lighter',
|
|
296
|
+
},
|
|
297
|
+
footer: {
|
|
298
|
+
bgColor: 'lighter',
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
tab: {
|
|
302
|
+
activeBgColor: 'inherit',
|
|
303
|
+
activeBorderColor: 'primary',
|
|
304
|
+
activeBorderStyle: 'solid',
|
|
305
|
+
activeBorderWidth: '2px',
|
|
306
|
+
activeFontSize: 'inherit',
|
|
307
|
+
activeFontColor: 'primary',
|
|
308
|
+
activeFontWeight: 'semibold',
|
|
309
|
+
bgColor: 'inherit',
|
|
310
|
+
borderColor: 'lighter',
|
|
311
|
+
borderRadius: 'sm',
|
|
312
|
+
borderStyle: 'solid',
|
|
313
|
+
borderWidth: '1px',
|
|
314
|
+
cursor: 'pointer',
|
|
315
|
+
fontColor: 'inherit',
|
|
316
|
+
fontSize: 'inherit',
|
|
317
|
+
fontWeight: 'inherit',
|
|
318
|
+
hoverBgColor: 'lightest',
|
|
319
|
+
hoverBorderColor: 'dark',
|
|
320
|
+
hoverBorderStyle: 'solid',
|
|
321
|
+
hoverBorderWidth: '2px',
|
|
322
|
+
hoverFontColor: 'inherit',
|
|
323
|
+
marginBefore: 'xs',
|
|
324
|
+
marginAfter: 'xs',
|
|
325
|
+
paddingX: 'md',
|
|
326
|
+
paddingY: 'xs',
|
|
327
|
+
},
|
|
328
|
+
|
|
329
|
+
card: {
|
|
330
|
+
borderColor: 'gray-300',
|
|
331
|
+
borderRadius: 'sm',
|
|
332
|
+
borderStyle: 'solid',
|
|
333
|
+
borderWidth: '1px',
|
|
334
|
+
shadow: 'sm',
|
|
335
|
+
bgColor: 'white',
|
|
336
|
+
fontColor: 'primary',
|
|
337
|
+
fontCase: 'uppercase',
|
|
338
|
+
fontSize: 'inherit',
|
|
339
|
+
fontWeight: 'bold',
|
|
340
|
+
paddingX: 'lg',
|
|
341
|
+
paddingY: 'lg',
|
|
342
|
+
iconColor: 'primary',
|
|
343
|
+
iconWidth: '16px',
|
|
344
|
+
iconHeight: '16px',
|
|
345
|
+
marginTop: '2xl',
|
|
346
|
+
letterSpacing: '2xl',
|
|
347
|
+
titleBorderBottomWidth: '1px',
|
|
348
|
+
},
|
|
349
|
+
|
|
350
|
+
properties: {
|
|
351
|
+
fontWeight: 'bold',
|
|
352
|
+
paddingY: 'xs',
|
|
353
|
+
},
|
|
354
|
+
|
|
355
|
+
modal: {
|
|
356
|
+
bgColor: 'background',
|
|
357
|
+
maskColor: 'darkest',
|
|
358
|
+
maskOpacity: '0.85',
|
|
359
|
+
zIndex: 1050,
|
|
360
|
+
xsmallSize: '20%',
|
|
361
|
+
smallSize: '30%',
|
|
362
|
+
mediumSize: '50%',
|
|
363
|
+
largeSize: '75%',
|
|
364
|
+
xlargeSize: '90%',
|
|
365
|
+
boxShadow: 'none',
|
|
366
|
+
borderRadius: 'sm',
|
|
367
|
+
},
|
|
368
|
+
|
|
369
|
+
wizard: {
|
|
370
|
+
activeBgColor: 'blue-100',
|
|
371
|
+
activeBorderColor: 'primary',
|
|
372
|
+
activeFontSize: 'inherit',
|
|
373
|
+
activeFontColor: 'primary',
|
|
374
|
+
activeFontWeight: 'bold',
|
|
375
|
+
bgColor: 'lighter',
|
|
376
|
+
borderColor: 'light',
|
|
377
|
+
borderRadius: 0,
|
|
378
|
+
borderStyle: 'solid',
|
|
379
|
+
borderWidth: '3px',
|
|
380
|
+
cursor: 'pointer',
|
|
381
|
+
disabledBgColor: 'inherit',
|
|
382
|
+
disabledBorderColor: 'inherit',
|
|
383
|
+
disabledFontSize: 'inherit',
|
|
384
|
+
disabledFontColor: 'light',
|
|
385
|
+
disabledFontWeight: 'inherit',
|
|
386
|
+
errorBgColor: 'red-100',
|
|
387
|
+
errorBorderColor: 'danger',
|
|
388
|
+
errorFontColor: 'danger',
|
|
389
|
+
fontColor: 'inherit',
|
|
390
|
+
fontSize: 'inherit',
|
|
391
|
+
fontWeight: 'medium',
|
|
392
|
+
hoverBgColor: 'light',
|
|
393
|
+
hoverBorderColor: 'inherit',
|
|
394
|
+
hoverBorderStyle: 'inherit',
|
|
395
|
+
hoverBorderWidth: 'inherit',
|
|
396
|
+
hoverFontColor: 'inherit',
|
|
397
|
+
marginBefore: 0,
|
|
398
|
+
marginAfter: 0,
|
|
399
|
+
paddingRight: 'lg',
|
|
400
|
+
paddingLeft: 'lg',
|
|
401
|
+
paddingTop: 'sm',
|
|
402
|
+
paddingBottom: 'sm',
|
|
403
|
+
stepsBgColor: 'lighter',
|
|
404
|
+
stepsBorderColor: 'light',
|
|
405
|
+
stepsBorderStyle: 'solid',
|
|
406
|
+
stepsBorderWidth: '1px',
|
|
407
|
+
stepsPaddingTop: 'lg',
|
|
408
|
+
stepsPaddingBottom: 'lg',
|
|
409
|
+
stepsPaddingLeft: 'xl',
|
|
410
|
+
stepsPaddingRight: 0,
|
|
411
|
+
successBgColor: 'green-100',
|
|
412
|
+
successBorderColor: 'success',
|
|
413
|
+
successFontColor: 'success',
|
|
414
|
+
warningBgColor: 'yellow-100',
|
|
415
|
+
warningBorderColor: 'warning',
|
|
416
|
+
warningFontColor: 'warning',
|
|
417
|
+
},
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
theme.accordion = {
|
|
421
|
+
fontWeight: 'bold',
|
|
422
|
+
fontColor: 'inherit',
|
|
423
|
+
activeFontColor: 'lightest',
|
|
424
|
+
hoverFontColor: 'inherit',
|
|
425
|
+
fontSize: 'inherit',
|
|
426
|
+
togglerIconWidth: 'md',
|
|
427
|
+
togglerIconHeight: 'md',
|
|
428
|
+
bgColor: 'inherit',
|
|
429
|
+
activeBgColor: 'primary',
|
|
430
|
+
hoverBgColor: lighten(get(theme.colors, 'primary', ''), 400),
|
|
431
|
+
borderColor: 'light',
|
|
432
|
+
borderRadius: 'xl',
|
|
433
|
+
borderStyle: 'solid',
|
|
434
|
+
borderWidth: '1px',
|
|
435
|
+
paddingX: 'sm',
|
|
436
|
+
paddingY: 'sm',
|
|
437
|
+
};
|
|
438
|
+
|
|
439
|
+
set(theme.table, 'thFilterInputBgColor', lighten(get(theme.colors, 'primary', ''), 400));
|
|
440
|
+
set(theme.table, 'tdHoverBgColor', lighten(get(theme.colors, 'primary', ''), 400));
|
|
441
|
+
|
|
442
|
+
Object.keys(ColorKeys).forEach((kind) => {
|
|
443
|
+
set(theme, `buttons.${kind}`, {
|
|
444
|
+
bgColor: kind,
|
|
445
|
+
bgColorFlat: 'transparent',
|
|
446
|
+
bgColorOutline: 'transparent',
|
|
447
|
+
borderColor: kind,
|
|
448
|
+
borderColorFlat: 'transparent',
|
|
449
|
+
borderColorOutline: kind,
|
|
450
|
+
borderRadius: 'sm',
|
|
451
|
+
borderStyle: 'solid',
|
|
452
|
+
borderWidth: 1,
|
|
453
|
+
color: ['light', 'lightest', 'lighter', 'white'].includes(kind) ? 'darker' : 'white',
|
|
454
|
+
colorFlat: kind,
|
|
455
|
+
colorOutline: ['light', 'lightest', 'lighter', 'white'].includes(kind) ? 'darkest' : kind,
|
|
456
|
+
cursor: 'pointer',
|
|
457
|
+
cursorDisabled: 'not-allowed',
|
|
458
|
+
fontSize: 'md',
|
|
459
|
+
fontWeight: 'bold',
|
|
460
|
+
hoverColor: ['light', 'lightest', 'lighter', 'white'].includes(kind) ? 'black' : 'white',
|
|
461
|
+
hoverColorFlat: lighten(get(theme.colors, kind, ''), 100),
|
|
462
|
+
hoverColorOutline: kind,
|
|
463
|
+
hoverBgColor: darken(get(theme.colors, kind, ''), 100),
|
|
464
|
+
hoverBgColorFlat: 'transparent',
|
|
465
|
+
hoverBgColorOutline: lighten(get(theme.colors, kind, ''), 400),
|
|
466
|
+
hoverBorderColor: darken(get(theme.colors, kind, ''), 100),
|
|
467
|
+
hoverBorderColorFlat: 'transparent',
|
|
468
|
+
hoverBorderColorOutline: kind,
|
|
469
|
+
letterSpacing: 'normal',
|
|
470
|
+
lineHeight: '3xl',
|
|
471
|
+
opacity: 1,
|
|
472
|
+
opacityDisabled: 0.6,
|
|
473
|
+
paddingY: 'none',
|
|
474
|
+
paddingX: 'lg',
|
|
475
|
+
textOverflow: 'ellipsis',
|
|
476
|
+
textTransform: 'none',
|
|
477
|
+
whiteSpace: 'nowrap',
|
|
478
|
+
});
|
|
479
|
+
|
|
480
|
+
set(theme, `tooltip.${kind}`, {
|
|
481
|
+
bgColor: kind,
|
|
482
|
+
color: ['light', 'lightest', 'white'].includes(kind) ? 'darkest' : 'white',
|
|
483
|
+
linkColor: ['light', 'lightest', 'white'].includes(kind)
|
|
484
|
+
? 'primary'
|
|
485
|
+
: lighten(get(theme.colors, 'primary', ''), 200),
|
|
486
|
+
borderColor: kind,
|
|
487
|
+
borderRadius: 'sm',
|
|
488
|
+
borderStyle: 'solid',
|
|
489
|
+
borderWidth: '1px',
|
|
490
|
+
boxShadow: 'lg',
|
|
491
|
+
padding: 'md',
|
|
492
|
+
fontSize: 'sm',
|
|
493
|
+
});
|
|
494
|
+
});
|
|
495
|
+
|
|
496
|
+
return simpleMergeDeep(customTheme, theme);
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
export const BaseTheme: FCC<ThemeProps> = ({ theme = baseTheme(), children }) => {
|
|
500
|
+
const GlobalStyles = theme.GlobalStyles;
|
|
501
|
+
return (
|
|
502
|
+
<>
|
|
503
|
+
{GlobalStyles && <GlobalStyles theme={theme} />}
|
|
504
|
+
<ThemeProvider theme={theme}>{children}</ThemeProvider>
|
|
505
|
+
</>
|
|
506
|
+
);
|
|
507
|
+
};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { FCC, simpleMergeDeep } from 'onekijs-framework';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Palette, Theme, ThemeProps } from '../styles/typings';
|
|
4
|
+
import { BaseTheme, baseTheme } from './base';
|
|
5
|
+
|
|
6
|
+
export const tailwindPalette: Palette = {
|
|
7
|
+
colors: {
|
|
8
|
+
transparent: 'transparent',
|
|
9
|
+
current: 'currentColor',
|
|
10
|
+
black: '#000',
|
|
11
|
+
white: '#fff',
|
|
12
|
+
'gray-100': '#f7fafc',
|
|
13
|
+
'gray-200': '#edf2f7',
|
|
14
|
+
'gray-300': '#e2e8f0',
|
|
15
|
+
'gray-400': '#cbd5e0',
|
|
16
|
+
'gray-500': '#a0aec0',
|
|
17
|
+
'gray-600': '#718096',
|
|
18
|
+
'gray-700': '#4a5568',
|
|
19
|
+
'gray-800': '#2d3748',
|
|
20
|
+
'gray-900': '#1a202c',
|
|
21
|
+
'red-100': '#fff5f5',
|
|
22
|
+
'red-200': '#fed7d7',
|
|
23
|
+
'red-300': '#feb2b2',
|
|
24
|
+
'red-400': '#fc8181',
|
|
25
|
+
'red-500': '#f56565',
|
|
26
|
+
'red-600': '#e53e3e',
|
|
27
|
+
'red-700': '#c53030',
|
|
28
|
+
'red-800': '#9b2c2c',
|
|
29
|
+
'red-900': '#742a2a',
|
|
30
|
+
'orange-100': '#fffaf0',
|
|
31
|
+
'orange-200': '#feebc8',
|
|
32
|
+
'orange-300': '#fbd38d',
|
|
33
|
+
'orange-400': '#f6ad55',
|
|
34
|
+
'orange-500': '#ed8936',
|
|
35
|
+
'orange-600': '#dd6b20',
|
|
36
|
+
'orange-700': '#c05621',
|
|
37
|
+
'orange-800': '#9c4221',
|
|
38
|
+
'orange-900': '#7b341e',
|
|
39
|
+
'yellow-100': '#fffff0',
|
|
40
|
+
'yellow-200': '#fefcbf',
|
|
41
|
+
'yellow-300': '#faf089',
|
|
42
|
+
'yellow-400': '#f6e05e',
|
|
43
|
+
'yellow-500': '#ecc94b',
|
|
44
|
+
'yellow-600': '#d69e2e',
|
|
45
|
+
'yellow-700': '#b7791f',
|
|
46
|
+
'yellow-800': '#975a16',
|
|
47
|
+
'yellow-900': '#744210',
|
|
48
|
+
'green-100': '#f0fff4',
|
|
49
|
+
'green-200': '#c6f6d5',
|
|
50
|
+
'green-300': '#9ae6b4',
|
|
51
|
+
'green-400': '#68d391',
|
|
52
|
+
'green-500': '#48bb78',
|
|
53
|
+
'green-600': '#38a169',
|
|
54
|
+
'green-700': '#2f855a',
|
|
55
|
+
'green-800': '#276749',
|
|
56
|
+
'green-900': '#22543d',
|
|
57
|
+
'teal-100': '#e6fffa',
|
|
58
|
+
'teal-200': '#b2f5ea',
|
|
59
|
+
'teal-300': '#81e6d9',
|
|
60
|
+
'teal-400': '#4fd1c5',
|
|
61
|
+
'teal-500': '#38b2ac',
|
|
62
|
+
'teal-600': '#319795',
|
|
63
|
+
'teal-700': '#2c7a7b',
|
|
64
|
+
'teal-800': '#285e61',
|
|
65
|
+
'teal-900': '#234e52',
|
|
66
|
+
'blue-100': '#ebf8ff',
|
|
67
|
+
'blue-200': '#bee3f8',
|
|
68
|
+
'blue-300': '#90cdf4',
|
|
69
|
+
'blue-400': '#63b3ed',
|
|
70
|
+
'blue-500': '#4299e1',
|
|
71
|
+
'blue-600': '#3182ce',
|
|
72
|
+
'blue-700': '#2b6cb0',
|
|
73
|
+
'blue-800': '#2c5282',
|
|
74
|
+
'blue-900': '#2a3042',
|
|
75
|
+
'indigo-100': '#ebf4ff',
|
|
76
|
+
'indigo-200': '#c3dafe',
|
|
77
|
+
'indigo-300': '#a3bffa',
|
|
78
|
+
'indigo-400': '#7f9cf5',
|
|
79
|
+
'indigo-500': '#667eea',
|
|
80
|
+
'indigo-600': '#5a67d8',
|
|
81
|
+
'indigo-700': '#4c51bf',
|
|
82
|
+
'indigo-800': '#434190',
|
|
83
|
+
'indigo-900': '#3c366b',
|
|
84
|
+
'purple-100': '#faf5ff',
|
|
85
|
+
'purple-200': '#e9d8fd',
|
|
86
|
+
'purple-300': '#d6bcfa',
|
|
87
|
+
'purple-400': '#b794f4',
|
|
88
|
+
'purple-500': '#9f7aea',
|
|
89
|
+
'purple-600': '#805ad5',
|
|
90
|
+
'purple-700': '#6b46c1',
|
|
91
|
+
'purple-800': '#553c9a',
|
|
92
|
+
'purple-900': '#44337a',
|
|
93
|
+
'pink-100': '#fff5f7',
|
|
94
|
+
'pink-200': '#fed7e2',
|
|
95
|
+
'pink-300': '#fbb6ce',
|
|
96
|
+
'pink-400': '#f687b3',
|
|
97
|
+
'pink-500': '#ed64a6',
|
|
98
|
+
'pink-600': '#d53f8c',
|
|
99
|
+
'pink-700': '#b83280',
|
|
100
|
+
'pink-800': '#97266d',
|
|
101
|
+
'pink-900': '#702459',
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export const tailwindTheme = (customTheme: Partial<Theme> = {}): Theme => {
|
|
106
|
+
const theme = simpleMergeDeep(customTheme, { palette: tailwindPalette });
|
|
107
|
+
return baseTheme(theme) as Theme;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export const TailwindTheme: FCC<ThemeProps> = (props) => {
|
|
111
|
+
return <BaseTheme theme={tailwindTheme()} {...props} />;
|
|
112
|
+
};
|
package/src/utils/color.ts
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const darken = (color: string, gap = 100, newColorValue?: string): string => {
|
|
2
|
+
const [colorValue, weight] = color.split('-');
|
|
3
|
+
newColorValue = newColorValue || colorValue;
|
|
4
|
+
if (weight === undefined) {
|
|
5
|
+
return newColorValue;
|
|
6
|
+
}
|
|
7
|
+
return `${newColorValue}-${Math.min(parseInt(weight) + gap, 900)}`;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const deriveColor = (color: string, gap = 100, dark: boolean, newColorValue?: string): string => {
|
|
2
11
|
const [colorValue, weight] = color.split('-');
|
|
3
12
|
newColorValue = newColorValue || colorValue;
|
|
4
13
|
if (weight === undefined) {
|
|
@@ -7,6 +16,15 @@ export const deriveColor = (color: string, gap: number, dark: boolean, newColorV
|
|
|
7
16
|
return `${newColorValue}-${parseInt(weight) + (dark ? -gap : gap)}`;
|
|
8
17
|
};
|
|
9
18
|
|
|
19
|
+
export const lighten = (color: string, gap: number, newColorValue?: string): string => {
|
|
20
|
+
const [colorValue, weight] = color.split('-');
|
|
21
|
+
newColorValue = newColorValue || colorValue;
|
|
22
|
+
if (weight === undefined) {
|
|
23
|
+
return newColorValue;
|
|
24
|
+
}
|
|
25
|
+
return `${newColorValue}-${Math.max(parseInt(weight) - gap, 0)}`;
|
|
26
|
+
};
|
|
27
|
+
|
|
10
28
|
// https://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb
|
|
11
29
|
export const hexToRgb = (hex: string): { r: number; g: number; b: number } | null => {
|
|
12
30
|
const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
|
@@ -28,3 +46,19 @@ export const hexToRgb = (hex: string): { r: number; g: number; b: number } | nul
|
|
|
28
46
|
export const rgbToHex = (r: number, g: number, b: number): string => {
|
|
29
47
|
return '#' + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
|
|
30
48
|
};
|
|
49
|
+
|
|
50
|
+
export const applyOpacity = (color: string, opacity: number | string): string => {
|
|
51
|
+
if (color.startsWith('#')) {
|
|
52
|
+
const rgb = hexToRgb(color);
|
|
53
|
+
if (rgb !== null) {
|
|
54
|
+
return `rgba(${rgb['r']},${rgb['g']},${rgb['b']},${opacity})`;
|
|
55
|
+
} else {
|
|
56
|
+
return color;
|
|
57
|
+
}
|
|
58
|
+
} else if (color.startsWith('rgb(')) {
|
|
59
|
+
return color.replace('rgb(', 'rgba(').replace(/.$/, `,${opacity})`);
|
|
60
|
+
} else if (color.startsWith('hsl(')) {
|
|
61
|
+
return color.replace('hsl(', 'hsla(').replace(/.$/, `,${opacity})`);
|
|
62
|
+
}
|
|
63
|
+
return color;
|
|
64
|
+
};
|
package/src/utils/dom.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CursorProperty } from 'csstype';
|
|
2
|
+
|
|
3
|
+
export const clearSelection = (): void => {
|
|
4
|
+
const getSelection = window.getSelection;
|
|
5
|
+
if (getSelection !== null) {
|
|
6
|
+
const selection = getSelection();
|
|
7
|
+
if (selection !== null) selection.removeAllRanges();
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const forceCursor = (cursor?: CursorProperty): void => {
|
|
12
|
+
document.body.style.cursor = cursor ? `${cursor}` : '';
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
//cursor: ${props.area === 'header' ? 's' : 'n'}-resize;
|
|
16
|
+
|
|
17
|
+
export const getTranslateXY = (element: Element): { x: number; y: number } => {
|
|
18
|
+
const style = window.getComputedStyle(element);
|
|
19
|
+
const matrix = new DOMMatrixReadOnly(style.transform);
|
|
20
|
+
return {
|
|
21
|
+
x: matrix.m41,
|
|
22
|
+
y: matrix.m42,
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const markBodyAsUnselectable = (): void => {
|
|
27
|
+
document.body.style.userSelect = 'none';
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const markBodyAsSelectable = (): void => {
|
|
31
|
+
document.body.style.userSelect = '';
|
|
32
|
+
};
|