@code0-tech/pictor 0.0.0-mvp.10
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/LICENSE +29 -0
- package/README.md +0 -0
- package/dist/_virtual/compiler-runtime.js +5 -0
- package/dist/_virtual/compiler-runtime2.js +4 -0
- package/dist/_virtual/react-compiler-runtime.development.js +4 -0
- package/dist/_virtual/react-compiler-runtime.production.js +4 -0
- package/dist/assets/components/avatar/Avatar.style.css +1 -0
- package/dist/assets/components/badge/Badge.style.css +1 -0
- package/dist/assets/components/breadcrumb/Breadcrumb.style.css +1 -0
- package/dist/assets/components/button/Button.style.css +1 -0
- package/dist/assets/components/button-group/ButtonGroup.style.css +1 -0
- package/dist/assets/components/card/Card.style.css +1 -0
- package/dist/assets/components/col/Col.style.css +1 -0
- package/dist/assets/components/command/Command.style.css +1 -0
- package/dist/assets/components/container/Container.style.css +1 -0
- package/dist/assets/components/d-flow/DFlow.style.css +1 -0
- package/dist/assets/components/d-flow/folder/DFlowFolder.style.css +1 -0
- package/dist/assets/components/d-flow/function/DFlowFunctionDefaultCard.style.css +1 -0
- package/dist/assets/components/d-flow/input/DFlowInputDataType.style.css +1 -0
- package/dist/assets/components/d-flow/minimap/DFlowMiniMap.style.css +1 -0
- package/dist/assets/components/d-flow/suggestion/DFlowSuggestionSearchInput.style.css +1 -0
- package/dist/assets/components/d-flow/validation/DFlowValidation.style.css +1 -0
- package/dist/assets/components/d-fullscreen/DFullScreen.style.css +1 -0
- package/dist/assets/components/d-layout/DLayout.style.css +1 -0
- package/dist/assets/components/d-resizable/DResizable.style.css +1 -0
- package/dist/assets/components/dialog/Dialog.style.css +1 -0
- package/dist/assets/components/file-tabs/FileTabs.style.css +1 -0
- package/dist/assets/components/flex/Flex.style.css +1 -0
- package/dist/assets/components/form/Input.style.css +1 -0
- package/dist/assets/components/menu/Menu.style.css +1 -0
- package/dist/assets/components/quote/Quote.style.css +1 -0
- package/dist/assets/components/row/Row.style.css +1 -0
- package/dist/assets/components/scroll-area/ScrollArea.style.css +1 -0
- package/dist/assets/components/segmented-control/SegmentedControl.style.css +1 -0
- package/dist/assets/components/spacing/Spacing.style.css +1 -0
- package/dist/assets/components/tab/Tab.style.css +1 -0
- package/dist/assets/components/text/Text.style.css +1 -0
- package/dist/assets/components/tooltip/Tooltip.style.css +1 -0
- package/dist/assets/node_modules/@xyflow/react/dist/style.css +1 -0
- package/dist/components/avatar/Avatar.d.ts +8 -0
- package/dist/components/avatar/Avatar.js +55 -0
- package/dist/components/badge/Badge.d.ts +7 -0
- package/dist/components/badge/Badge.js +22 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts +7 -0
- package/dist/components/breadcrumb/Breadcrumb.js +32 -0
- package/dist/components/button/Button.d.ts +10 -0
- package/dist/components/button/Button.js +29 -0
- package/dist/components/button-group/ButtonGroup.d.ts +7 -0
- package/dist/components/button-group/ButtonGroup.js +27 -0
- package/dist/components/card/Card.d.ts +14 -0
- package/dist/components/card/Card.js +39 -0
- package/dist/components/card/CardSection.d.ts +9 -0
- package/dist/components/card/CardSection.js +22 -0
- package/dist/components/col/Col.d.ts +13 -0
- package/dist/components/col/Col.js +27 -0
- package/dist/components/command/Command.d.ts +30 -0
- package/dist/components/command/Command.js +103 -0
- package/dist/components/container/Container.d.ts +6 -0
- package/dist/components/container/Container.js +21 -0
- package/dist/components/d-flow/DFlow.d.ts +5 -0
- package/dist/components/d-flow/DFlow.edges.hook.d.ts +4 -0
- package/dist/components/d-flow/DFlow.edges.hook.js +144 -0
- package/dist/components/d-flow/DFlow.js +375 -0
- package/dist/components/d-flow/DFlow.nodes.hook.d.ts +3 -0
- package/dist/components/d-flow/DFlow.nodes.hook.js +139 -0
- package/dist/components/d-flow/DFlow.service.d.ts +10 -0
- package/dist/components/d-flow/DFlow.service.js +11 -0
- package/dist/components/d-flow/DFlow.view.d.ts +109 -0
- package/dist/components/d-flow/DFlow.view.js +213 -0
- package/dist/components/d-flow/control/DFlowControl.d.ts +2 -0
- package/dist/components/d-flow/control/DFlowControl.js +77 -0
- package/dist/components/d-flow/control/index.d.ts +1 -0
- package/dist/components/d-flow/control/index.js +4 -0
- package/dist/components/d-flow/data-type/DFlowDataType.service.d.ts +10 -0
- package/dist/components/d-flow/data-type/DFlowDataType.service.js +91 -0
- package/dist/components/d-flow/data-type/DFlowDataType.validation.type.d.ts +2 -0
- package/dist/components/d-flow/data-type/DFlowDataType.validation.type.js +18 -0
- package/dist/components/d-flow/data-type/DFlowDataType.validation.value.d.ts +4 -0
- package/dist/components/d-flow/data-type/DFlowDataType.validation.value.js +20 -0
- package/dist/components/d-flow/data-type/DFlowDataType.view.d.ts +32 -0
- package/dist/components/d-flow/data-type/DFlowDataType.view.js +65 -0
- package/dist/components/d-flow/data-type/index.d.ts +2 -0
- package/dist/components/d-flow/data-type/index.js +6 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.d.ts +6 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.js +222 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.d.ts +6 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.js +229 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeItemOfCollectionRule.d.ts +7 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeItemOfCollectionRule.js +214 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeNumberRangeRule.d.ts +4 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeNumberRangeRule.js +214 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.d.ts +9 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.js +217 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRegexRule.d.ts +4 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRegexRule.js +214 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.d.ts +6 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.js +243 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRule.d.ts +8 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRule.js +10 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.d.ts +3 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.js +10 -0
- package/dist/components/d-flow/edge/DFlowEdge.d.ts +10 -0
- package/dist/components/d-flow/edge/DFlowEdge.js +48 -0
- package/dist/components/d-flow/folder/DFlowFolder.d.ts +19 -0
- package/dist/components/d-flow/folder/DFlowFolder.js +119 -0
- package/dist/components/d-flow/folder/index.d.ts +1 -0
- package/dist/components/d-flow/folder/index.js +6 -0
- package/dist/components/d-flow/function/DFlowFunction.input.hook.d.ts +4 -0
- package/dist/components/d-flow/function/DFlowFunction.input.hook.js +9 -0
- package/dist/components/d-flow/function/DFlowFunction.return.hook.d.ts +4 -0
- package/dist/components/d-flow/function/DFlowFunction.return.hook.js +11 -0
- package/dist/components/d-flow/function/DFlowFunction.service.d.ts +6 -0
- package/dist/components/d-flow/function/DFlowFunction.service.js +9 -0
- package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.d.ts +10 -0
- package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.js +74 -0
- package/dist/components/d-flow/function/DFlowFunction.view.d.ts +66 -0
- package/dist/components/d-flow/function/DFlowFunction.view.js +117 -0
- package/dist/components/d-flow/function/DFlowFunctionDefaultCard.d.ts +15 -0
- package/dist/components/d-flow/function/DFlowFunctionDefaultCard.js +158 -0
- package/dist/components/d-flow/function/DFlowFunctionGroupCard.d.ts +5 -0
- package/dist/components/d-flow/function/DFlowFunctionGroupCard.js +55 -0
- package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.d.ts +11 -0
- package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.js +26 -0
- package/dist/components/d-flow/function/DFlowFunctionTriggerCard.d.ts +9 -0
- package/dist/components/d-flow/function/DFlowFunctionTriggerCard.js +97 -0
- package/dist/components/d-flow/function/index.d.ts +2 -0
- package/dist/components/d-flow/function/index.js +7 -0
- package/dist/components/d-flow/index.d.ts +13 -0
- package/dist/components/d-flow/index.js +46 -0
- package/dist/components/d-flow/input/DFlowInputDataType.d.ts +8 -0
- package/dist/components/d-flow/input/DFlowInputDataType.js +422 -0
- package/dist/components/d-flow/minimap/DFlowMiniMap.d.ts +2 -0
- package/dist/components/d-flow/minimap/DFlowMiniMap.js +22 -0
- package/dist/components/d-flow/minimap/index.d.ts +1 -0
- package/dist/components/d-flow/minimap/index.js +4 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.d.ts +33 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.js +150 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.service.d.ts +5 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.service.js +18 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.view.d.ts +21 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.view.js +25 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.d.ts +8 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.js +67 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.util.d.ts +3 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.util.js +42 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.d.ts +2 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.js +69 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.d.ts +6 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.js +21 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.d.ts +7 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.js +22 -0
- package/dist/components/d-flow/suggestion/index.d.ts +2 -0
- package/dist/components/d-flow/suggestion/index.js +7 -0
- package/dist/components/d-flow/tab/DFlowTabDefault.d.ts +11 -0
- package/dist/components/d-flow/tab/DFlowTabDefault.js +97 -0
- package/dist/components/d-flow/tab/DFlowTabTrigger.d.ts +6 -0
- package/dist/components/d-flow/tab/DFlowTabTrigger.js +51 -0
- package/dist/components/d-flow/tab/DFlowTabs.d.ts +2 -0
- package/dist/components/d-flow/tab/DFlowTabs.js +105 -0
- package/dist/components/d-flow/type/DFlowType.service.d.ts +6 -0
- package/dist/components/d-flow/type/DFlowType.service.js +9 -0
- package/dist/components/d-flow/type/DFlowType.view.d.ts +35 -0
- package/dist/components/d-flow/type/DFlowType.view.js +69 -0
- package/dist/components/d-flow/type/index.d.ts +2 -0
- package/dist/components/d-flow/type/index.js +6 -0
- package/dist/components/d-flow/validation/DFlowValidation.d.ts +6 -0
- package/dist/components/d-flow/validation/DFlowValidation.hook.d.ts +3 -0
- package/dist/components/d-flow/validation/DFlowValidation.hook.js +10 -0
- package/dist/components/d-flow/validation/DFlowValidation.js +60 -0
- package/dist/components/d-flow/validation/index.d.ts +2 -0
- package/dist/components/d-flow/validation/index.js +6 -0
- package/dist/components/d-fullscreen/DFullScreen.d.ts +6 -0
- package/dist/components/d-fullscreen/DFullScreen.js +26 -0
- package/dist/components/d-layout/DLayout.d.ts +10 -0
- package/dist/components/d-layout/DLayout.js +52 -0
- package/dist/components/d-namespace/DNamespace.service.d.ts +6 -0
- package/dist/components/d-namespace/DNamespace.service.js +11 -0
- package/dist/components/d-namespace/DNamespace.view.d.ts +32 -0
- package/dist/components/d-namespace/DNamespace.view.js +65 -0
- package/dist/components/d-namespace/index.d.ts +12 -0
- package/dist/components/d-namespace/index.js +35 -0
- package/dist/components/d-namespace/license/DNamespaceLicense.service.d.ts +8 -0
- package/dist/components/d-namespace/license/DNamespaceLicense.service.js +11 -0
- package/dist/components/d-namespace/license/DNamespaceLicense.view.d.ts +26 -0
- package/dist/components/d-namespace/license/DNamespaceLicense.view.js +57 -0
- package/dist/components/d-namespace/member/DNamespaceMember.service.d.ts +9 -0
- package/dist/components/d-namespace/member/DNamespaceMember.service.js +11 -0
- package/dist/components/d-namespace/member/DNamespaceMember.view.d.ts +26 -0
- package/dist/components/d-namespace/member/DNamespaceMember.view.js +57 -0
- package/dist/components/d-namespace/project/DNamespaceProject.service.d.ts +9 -0
- package/dist/components/d-namespace/project/DNamespaceProject.service.js +11 -0
- package/dist/components/d-namespace/project/DNamespaceProject.view.d.ts +35 -0
- package/dist/components/d-namespace/project/DNamespaceProject.view.js +69 -0
- package/dist/components/d-namespace/project/DNamespaceProjectCard.d.ts +9 -0
- package/dist/components/d-namespace/project/DNamespaceProjectCard.js +57 -0
- package/dist/components/d-namespace/project/DNamespaceProjectMenu.d.ts +9 -0
- package/dist/components/d-namespace/project/DNamespaceProjectMenu.js +18 -0
- package/dist/components/d-namespace/role/DNamespaceRole.service.d.ts +10 -0
- package/dist/components/d-namespace/role/DNamespaceRole.service.js +11 -0
- package/dist/components/d-namespace/role/DNamespaceRole.view.d.ts +26 -0
- package/dist/components/d-namespace/role/DNamespaceRole.view.js +57 -0
- package/dist/components/d-organization/DOrganization.service.d.ts +8 -0
- package/dist/components/d-organization/DOrganization.service.js +11 -0
- package/dist/components/d-organization/DOrganization.view.d.ts +20 -0
- package/dist/components/d-organization/DOrganization.view.js +52 -0
- package/dist/components/d-organization/DOrganizationCard.d.ts +10 -0
- package/dist/components/d-organization/DOrganizationCard.js +63 -0
- package/dist/components/d-organization/DOrganizationMenu.d.ts +9 -0
- package/dist/components/d-organization/DOrganizationMenu.js +18 -0
- package/dist/components/d-organization/index.d.ts +4 -0
- package/dist/components/d-organization/index.js +19 -0
- package/dist/components/d-resizable/DResizable.d.ts +10 -0
- package/dist/components/d-resizable/DResizable.js +32 -0
- package/dist/components/d-runtime/DRuntime.service.d.ts +9 -0
- package/dist/components/d-runtime/DRuntime.service.js +11 -0
- package/dist/components/d-runtime/DRuntime.view.d.ts +38 -0
- package/dist/components/d-runtime/DRuntime.view.js +73 -0
- package/dist/components/d-runtime/index.d.ts +2 -0
- package/dist/components/d-runtime/index.js +6 -0
- package/dist/components/d-user/DUser.service.d.ts +21 -0
- package/dist/components/d-user/DUser.service.js +17 -0
- package/dist/components/d-user/DUser.view.d.ts +52 -0
- package/dist/components/d-user/DUser.view.js +100 -0
- package/dist/components/d-user/DUserMenu.d.ts +8 -0
- package/dist/components/d-user/DUserMenu.js +28 -0
- package/dist/components/d-user/index.d.ts +3 -0
- package/dist/components/d-user/index.js +17 -0
- package/dist/components/dialog/Dialog.d.ts +28 -0
- package/dist/components/dialog/Dialog.js +99 -0
- package/dist/components/file-tabs/FileTabs.d.ts +17 -0
- package/dist/components/file-tabs/FileTabs.js +71 -0
- package/dist/components/file-tabs/FileTabs.service.d.ts +13 -0
- package/dist/components/file-tabs/FileTabs.service.js +47 -0
- package/dist/components/file-tabs/FileTabs.view.d.ts +9 -0
- package/dist/components/file-tabs/FileTabs.view.js +1 -0
- package/dist/components/flex/Flex.d.ts +7 -0
- package/dist/components/flex/Flex.js +21 -0
- package/dist/components/form/CheckboxInput.d.ts +5 -0
- package/dist/components/form/CheckboxInput.js +67 -0
- package/dist/components/form/EmailInput.d.ts +8 -0
- package/dist/components/form/EmailInput.js +20 -0
- package/dist/components/form/Input.d.ts +22 -0
- package/dist/components/form/Input.js +153 -0
- package/dist/components/form/InputDescription.d.ts +5 -0
- package/dist/components/form/InputDescription.js +12 -0
- package/dist/components/form/InputLabel.d.ts +5 -0
- package/dist/components/form/InputLabel.js +12 -0
- package/dist/components/form/InputMessage.d.ts +5 -0
- package/dist/components/form/InputMessage.js +18 -0
- package/dist/components/form/InputSuggestion.d.ts +19 -0
- package/dist/components/form/InputSuggestion.js +102 -0
- package/dist/components/form/NumberInput.d.ts +6 -0
- package/dist/components/form/NumberInput.js +20 -0
- package/dist/components/form/PasswordInput.d.ts +8 -0
- package/dist/components/form/PasswordInput.js +18 -0
- package/dist/components/form/PinInput.d.ts +11 -0
- package/dist/components/form/PinInput.js +66 -0
- package/dist/components/form/RadioGroup.d.ts +5 -0
- package/dist/components/form/RadioGroup.js +48 -0
- package/dist/components/form/RadioInput.d.ts +7 -0
- package/dist/components/form/RadioInput.js +27 -0
- package/dist/components/form/SwitchInput.d.ts +6 -0
- package/dist/components/form/SwitchInput.js +19 -0
- package/dist/components/form/TextInput.d.ts +7 -0
- package/dist/components/form/TextInput.js +19 -0
- package/dist/components/form/index.d.ts +15 -0
- package/dist/components/form/index.js +37 -0
- package/dist/components/form/useForm.d.ts +25 -0
- package/dist/components/form/useForm.js +57 -0
- package/dist/components/menu/Menu.d.ts +27 -0
- package/dist/components/menu/Menu.js +104 -0
- package/dist/components/quote/Quote.d.ts +10 -0
- package/dist/components/quote/Quote.js +49 -0
- package/dist/components/row/Row.d.ts +6 -0
- package/dist/components/row/Row.js +21 -0
- package/dist/components/scroll-area/ScrollArea.d.ts +13 -0
- package/dist/components/scroll-area/ScrollArea.js +43 -0
- package/dist/components/segmented-control/SegmentedControl.d.ts +8 -0
- package/dist/components/segmented-control/SegmentedControl.js +24 -0
- package/dist/components/spacing/Spacing.d.ts +6 -0
- package/dist/components/spacing/Spacing.js +23 -0
- package/dist/components/tab/Tab.d.ts +11 -0
- package/dist/components/tab/Tab.js +40 -0
- package/dist/components/text/Text.d.ts +8 -0
- package/dist/components/text/Text.js +23 -0
- package/dist/components/tooltip/Tooltip.d.ts +13 -0
- package/dist/components/tooltip/Tooltip.js +48 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +226 -0
- package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +21 -0
- package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +14 -0
- package/dist/node_modules/react/compiler-runtime.js +10 -0
- package/dist/utils/arrayService.d.ts +10 -0
- package/dist/utils/arrayService.js +1 -0
- package/dist/utils/contextStore.d.ts +62 -0
- package/dist/utils/contextStore.js +60 -0
- package/dist/utils/generics.d.ts +17 -0
- package/dist/utils/generics.js +310 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.js +28 -0
- package/dist/utils/inspection.d.ts +13 -0
- package/dist/utils/inspection.js +4 -0
- package/dist/utils/nonReactiveArrayService.d.ts +19 -0
- package/dist/utils/nonReactiveArrayService.js +54 -0
- package/dist/utils/objectStore.d.ts +12 -0
- package/dist/utils/objectStore.js +34 -0
- package/dist/utils/reactiveArrayService.d.ts +22 -0
- package/dist/utils/reactiveArrayService.js +91 -0
- package/dist/utils/types.d.ts +57 -0
- package/dist/utils/types.js +4 -0
- package/dist/utils/utils.d.ts +68 -0
- package/dist/utils/utils.js +216 -0
- package/package.json +119 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FileTabsView } from './FileTabs.view';
|
|
2
|
+
import { ReactiveArrayService, ReactiveArrayStore } from '../../utils/reactiveArrayService';
|
|
3
|
+
export declare class FileTabsService extends ReactiveArrayService<FileTabsView> {
|
|
4
|
+
constructor(store: ReactiveArrayStore<FileTabsView>);
|
|
5
|
+
clearLeft(): void;
|
|
6
|
+
clearRight(): void;
|
|
7
|
+
clearWithoutActive(): void;
|
|
8
|
+
activateTab(id: string): void;
|
|
9
|
+
delete(index: number): void;
|
|
10
|
+
add(value: FileTabsView): void;
|
|
11
|
+
getActiveTab(): FileTabsView | undefined;
|
|
12
|
+
getActiveIndex(): number;
|
|
13
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ReactiveArrayService as a } from "../../utils/reactiveArrayService.js";
|
|
2
|
+
class v extends a {
|
|
3
|
+
constructor(t) {
|
|
4
|
+
super(t);
|
|
5
|
+
}
|
|
6
|
+
clearLeft() {
|
|
7
|
+
const t = this.getActiveIndex();
|
|
8
|
+
this.access.setState((e) => [...e.filter((i, s) => s >= t)]);
|
|
9
|
+
}
|
|
10
|
+
clearRight() {
|
|
11
|
+
const t = this.getActiveIndex();
|
|
12
|
+
this.access.setState((e) => [...e.filter((i, s) => s <= t)]);
|
|
13
|
+
}
|
|
14
|
+
clearWithoutActive() {
|
|
15
|
+
const t = this.getActiveTab();
|
|
16
|
+
t && this.access.setState((e) => [t]);
|
|
17
|
+
}
|
|
18
|
+
activateTab(t) {
|
|
19
|
+
this.values().forEach((i) => {
|
|
20
|
+
i.active = !1;
|
|
21
|
+
});
|
|
22
|
+
const e = this.values().find((i) => i.id === t);
|
|
23
|
+
e && (e.active = !0), this.update();
|
|
24
|
+
}
|
|
25
|
+
delete(t) {
|
|
26
|
+
const e = this.get(t);
|
|
27
|
+
e.active && this.has(t - 1) ? this.activateTab(this.get(t - 1).id) : e.active && this.has(t + 1) && this.activateTab(this.get(t + 1).id), super.delete(t);
|
|
28
|
+
}
|
|
29
|
+
add(t) {
|
|
30
|
+
if (this.values().some((e) => e.id == t.id)) {
|
|
31
|
+
this.activateTab(t.id);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
t.active && this.values().forEach((e) => {
|
|
35
|
+
e.active = !1;
|
|
36
|
+
}), super.add(t);
|
|
37
|
+
}
|
|
38
|
+
getActiveTab() {
|
|
39
|
+
return [...this.values()].reverse().find((e) => e.active);
|
|
40
|
+
}
|
|
41
|
+
getActiveIndex() {
|
|
42
|
+
return this.values().findIndex((t) => t.active);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
v as FileTabsService
|
|
47
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Code0Component } from '../../utils/types';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
interface FlexType extends Code0Component<HTMLDivElement> {
|
|
4
|
+
children: React.ReactNode | React.ReactNode[];
|
|
5
|
+
}
|
|
6
|
+
export declare const Flex: React.FC<FlexType>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { c as s } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import { mergeCode0Props as n } from "../../utils/utils.js";
|
|
4
|
+
import '../../assets/components/flex/Flex.style.css';/* empty css */
|
|
5
|
+
const h = (i) => {
|
|
6
|
+
const e = s.c(6);
|
|
7
|
+
let t, r;
|
|
8
|
+
if (e[0] !== i) {
|
|
9
|
+
const {
|
|
10
|
+
children: l,
|
|
11
|
+
...m
|
|
12
|
+
} = i;
|
|
13
|
+
t = l, r = n("flex", m), e[0] = i, e[1] = t, e[2] = r;
|
|
14
|
+
} else
|
|
15
|
+
t = e[1], r = e[2];
|
|
16
|
+
let o;
|
|
17
|
+
return e[3] !== t || e[4] !== r ? (o = /* @__PURE__ */ c("div", { ...r, children: t }), e[3] = t, e[4] = r, e[5] = o) : o = e[5], o;
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
h as Flex
|
|
21
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CheckboxProps, CheckedState } from '@radix-ui/react-checkbox';
|
|
3
|
+
import { InputProps } from './Input';
|
|
4
|
+
export type CheckboxInputProps = Omit<InputProps<CheckedState>, "wrapperComponent" | "type" | "left" | "right" | "leftType" | "rightType"> & Omit<CheckboxProps, 'defaultChecked' | 'value' | 'defaultValue'>;
|
|
5
|
+
export declare const CheckboxInput: React.FC<CheckboxInputProps>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx as r, jsxs as v, Fragment as N } from "react/jsx-runtime";
|
|
2
|
+
import { c as R } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import $ from "react";
|
|
4
|
+
import { Checkbox as D, CheckboxIndicator as E } from "@radix-ui/react-checkbox";
|
|
5
|
+
import { InputLabel as F } from "./InputLabel.js";
|
|
6
|
+
import { InputDescription as L } from "./InputDescription.js";
|
|
7
|
+
import { mergeCode0Props as j } from "../../utils/utils.js";
|
|
8
|
+
import { InputMessage as P } from "./InputMessage.js";
|
|
9
|
+
import '../../assets/components/form/Input.style.css';/* empty css */
|
|
10
|
+
import { IconMinus as S, IconCheck as T } from "@tabler/icons-react";
|
|
11
|
+
const U = (l) => {
|
|
12
|
+
const e = R.c(40), [i, z] = $.useState(l.initialValue ?? "indeterminate");
|
|
13
|
+
let a, t, s, d, n, o, c;
|
|
14
|
+
if (e[0] !== i || e[1] !== l) {
|
|
15
|
+
const {
|
|
16
|
+
title: g,
|
|
17
|
+
description: x,
|
|
18
|
+
formValidation: M,
|
|
19
|
+
...V
|
|
20
|
+
} = l;
|
|
21
|
+
t = M === void 0 ? {
|
|
22
|
+
valid: !0,
|
|
23
|
+
notValidMessage: null,
|
|
24
|
+
setValue: q
|
|
25
|
+
} : M, e[9] !== g ? (o = g ? /* @__PURE__ */ r(F, { children: g }) : null, e[9] = g, e[10] = o) : o = e[10], e[11] !== x ? (c = x ? /* @__PURE__ */ r(L, { children: x }) : null, e[11] = x, e[12] = c) : c = e[12];
|
|
26
|
+
const I = `input ${t?.valid ? "" : "input--not-valid"} checkbox-input`;
|
|
27
|
+
e[13] !== I ? (n = j(I, {}), e[13] = I, e[14] = n) : n = e[14], a = D, s = i, d = j("checkbox-input__button", {
|
|
28
|
+
...V,
|
|
29
|
+
onCheckedChange: (_) => {
|
|
30
|
+
V.onCheckedChange && V.onCheckedChange(_), z(_), t.setValue(_);
|
|
31
|
+
}
|
|
32
|
+
}), e[0] = i, e[1] = l, e[2] = a, e[3] = t, e[4] = s, e[5] = d, e[6] = n, e[7] = o, e[8] = c;
|
|
33
|
+
} else
|
|
34
|
+
a = e[2], t = e[3], s = e[4], d = e[5], n = e[6], o = e[7], c = e[8];
|
|
35
|
+
let m;
|
|
36
|
+
e[15] !== i ? (m = i === "indeterminate" && /* @__PURE__ */ r(S, { size: 10 }), e[15] = i, e[16] = m) : m = e[16];
|
|
37
|
+
let f;
|
|
38
|
+
e[17] !== i ? (f = i === !0 && /* @__PURE__ */ r(T, { size: 10 }), e[17] = i, e[18] = f) : f = e[18];
|
|
39
|
+
let h;
|
|
40
|
+
e[19] !== m || e[20] !== f ? (h = /* @__PURE__ */ v(E, { className: "checkbox-input__indicator", children: [
|
|
41
|
+
m,
|
|
42
|
+
f
|
|
43
|
+
] }), e[19] = m, e[20] = f, e[21] = h) : h = e[21];
|
|
44
|
+
let u;
|
|
45
|
+
e[22] !== a || e[23] !== s || e[24] !== d || e[25] !== h ? (u = /* @__PURE__ */ r(a, { defaultChecked: s, ...d, children: h }), e[22] = a, e[23] = s, e[24] = d, e[25] = h, e[26] = u) : u = e[26];
|
|
46
|
+
let p;
|
|
47
|
+
e[27] !== l.label ? (p = /* @__PURE__ */ r("div", { className: "input__right input__right--action}", children: l.label }), e[27] = l.label, e[28] = p) : p = e[28];
|
|
48
|
+
let k;
|
|
49
|
+
e[29] !== n || e[30] !== u || e[31] !== p ? (k = /* @__PURE__ */ v("div", { ...n, children: [
|
|
50
|
+
u,
|
|
51
|
+
p
|
|
52
|
+
] }), e[29] = n, e[30] = u, e[31] = p, e[32] = k) : k = e[32];
|
|
53
|
+
let C;
|
|
54
|
+
e[33] !== t ? (C = !t?.valid && t?.notValidMessage ? /* @__PURE__ */ r(P, { children: t.notValidMessage }) : null, e[33] = t, e[34] = C) : C = e[34];
|
|
55
|
+
let b;
|
|
56
|
+
return e[35] !== k || e[36] !== C || e[37] !== o || e[38] !== c ? (b = /* @__PURE__ */ v(N, { children: [
|
|
57
|
+
o,
|
|
58
|
+
c,
|
|
59
|
+
k,
|
|
60
|
+
C
|
|
61
|
+
] }), e[35] = k, e[36] = C, e[37] = o, e[38] = c, e[39] = b) : b = e[39], b;
|
|
62
|
+
};
|
|
63
|
+
function q(l) {
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
U as CheckboxInput
|
|
67
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { InputProps } from './Input';
|
|
3
|
+
interface EmailInputProps extends Omit<InputProps<string | null>, "wrapperComponent" | "type"> {
|
|
4
|
+
clearable?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const emailValidation: (email: string) => boolean;
|
|
7
|
+
export declare const EmailInput: React.ForwardRefExoticComponent<EmailInputProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import o from "react";
|
|
3
|
+
import { Input as l, setElementKey as m } from "./Input.js";
|
|
4
|
+
import { IconX as s } from "@tabler/icons-react";
|
|
5
|
+
import { Button as f } from "../button/Button.js";
|
|
6
|
+
const z = /(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/, d = (t) => z.test(t), g = o.forwardRef((t, x) => {
|
|
7
|
+
x = x || o.useRef(null);
|
|
8
|
+
const {
|
|
9
|
+
clearable: r = !1,
|
|
10
|
+
right: n,
|
|
11
|
+
...c
|
|
12
|
+
} = t, i = () => {
|
|
13
|
+
x.current && m(x.current, "value", "", "change");
|
|
14
|
+
}, a = [n];
|
|
15
|
+
return r && a.push(/* @__PURE__ */ e(f, { onClick: i, children: /* @__PURE__ */ e(s, { size: 13 }) })), /* @__PURE__ */ e(l, { right: a, type: "email", ref: x, ...c });
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
g as EmailInput,
|
|
19
|
+
d as emailValidation
|
|
20
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React, ForwardRefExoticComponent } from 'react';
|
|
2
|
+
import { Code0Component } from '../../utils/types';
|
|
3
|
+
import { ValidationProps } from './useForm';
|
|
4
|
+
import { InputSuggestion } from './InputSuggestion';
|
|
5
|
+
export declare const setElementKey: (element: HTMLElement, key: string, value: any, event: string) => void;
|
|
6
|
+
export type Code0Input = Omit<Omit<Omit<Code0Component<HTMLInputElement>, "left">, "right">, "title">;
|
|
7
|
+
export interface InputProps<T> extends Code0Input, ValidationProps<T> {
|
|
8
|
+
suggestions?: InputSuggestion[];
|
|
9
|
+
suggestionsHeader?: React.ReactNode;
|
|
10
|
+
suggestionsFooter?: React.ReactNode;
|
|
11
|
+
onSuggestionSelect?: (suggestion: InputSuggestion) => void;
|
|
12
|
+
transformValue?: (value: T) => React.ReactNode | T;
|
|
13
|
+
disableOnValue?: (value: T) => boolean;
|
|
14
|
+
wrapperComponent?: Code0Component<HTMLDivElement>;
|
|
15
|
+
right?: React.ReactNode;
|
|
16
|
+
left?: React.ReactNode;
|
|
17
|
+
leftType?: "action" | "placeholder" | "icon";
|
|
18
|
+
rightType?: "action" | "placeholder" | "icon";
|
|
19
|
+
title?: React.ReactNode;
|
|
20
|
+
description?: React.ReactNode;
|
|
21
|
+
}
|
|
22
|
+
export declare const Input: ForwardRefExoticComponent<InputProps<any>>;
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { jsxs as f, jsx as r, Fragment as T } from "react/jsx-runtime";
|
|
2
|
+
import h, { useRef as v, useState as x, useEffect as V, useMemo as k } from "react";
|
|
3
|
+
import { mergeCode0Props as y } from "../../utils/utils.js";
|
|
4
|
+
import '../../assets/components/form/Input.style.css';/* empty css */
|
|
5
|
+
import { InputLabel as A } from "./InputLabel.js";
|
|
6
|
+
import { InputDescription as K } from "./InputDescription.js";
|
|
7
|
+
import { InputMessage as H } from "./InputMessage.js";
|
|
8
|
+
import { Menu as J, MenuTrigger as U, MenuPortal as q } from "../menu/Menu.js";
|
|
9
|
+
import { InputSuggestionMenuContent as z, InputSuggestionMenuContentItems as B } from "./InputSuggestion.js";
|
|
10
|
+
const G = (t, s, n, a) => {
|
|
11
|
+
const o = Object.getOwnPropertyDescriptor(t, s)?.set, l = Object.getPrototypeOf(t), i = Object.getOwnPropertyDescriptor(l, s)?.set;
|
|
12
|
+
o && o !== i ? i?.call(t, n) : o?.call(t, n), t.dispatchEvent(new Event(a, {
|
|
13
|
+
bubbles: !0
|
|
14
|
+
}));
|
|
15
|
+
}, oe = h.forwardRef((t, s) => {
|
|
16
|
+
const n = s || v(null), a = v(null), [o, l] = x(!1), i = v(!0), [c, _] = x(t.defaultValue || t.initialValue || t.placeholder), {
|
|
17
|
+
wrapperComponent: P = {},
|
|
18
|
+
// Default empty wrapper props
|
|
19
|
+
title: b,
|
|
20
|
+
// Optional input label
|
|
21
|
+
description: M,
|
|
22
|
+
// Optional description below label
|
|
23
|
+
disabled: w = !1,
|
|
24
|
+
// Input disabled state
|
|
25
|
+
left: E,
|
|
26
|
+
// Left element (icon/button)
|
|
27
|
+
right: I,
|
|
28
|
+
// Right element (icon/button)
|
|
29
|
+
leftType: j = "icon",
|
|
30
|
+
// Visual hint for left
|
|
31
|
+
rightType: R = "action",
|
|
32
|
+
// Visual hint for right
|
|
33
|
+
formValidation: u = {
|
|
34
|
+
valid: !0,
|
|
35
|
+
notValidMessage: null,
|
|
36
|
+
setValue: null
|
|
37
|
+
},
|
|
38
|
+
// Validation config
|
|
39
|
+
suggestions: d,
|
|
40
|
+
// Optional suggestions array
|
|
41
|
+
suggestionsHeader: S,
|
|
42
|
+
// Optional header above suggestion list
|
|
43
|
+
suggestionsFooter: O,
|
|
44
|
+
// Optional footer below suggestion list
|
|
45
|
+
onSuggestionSelect: C = () => {
|
|
46
|
+
},
|
|
47
|
+
// Callback for suggestion selection,
|
|
48
|
+
disableOnValue: D = () => !1,
|
|
49
|
+
...m
|
|
50
|
+
// Remaining native input props
|
|
51
|
+
} = t;
|
|
52
|
+
V(() => {
|
|
53
|
+
const e = n.current;
|
|
54
|
+
if (!e || !u?.setValue) return;
|
|
55
|
+
const g = (L) => {
|
|
56
|
+
const N = m.type !== "checkbox" ? L.target.value : L.target.checked;
|
|
57
|
+
u.setValue?.(N);
|
|
58
|
+
};
|
|
59
|
+
return e.addEventListener("change", g), () => e.removeEventListener("change", g);
|
|
60
|
+
}, [u?.setValue]), V(() => {
|
|
61
|
+
if (!d) return;
|
|
62
|
+
const e = (g) => {
|
|
63
|
+
i.current = !!n.current?.contains(g.target);
|
|
64
|
+
};
|
|
65
|
+
return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
|
|
66
|
+
}, [d]);
|
|
67
|
+
const p = h.useMemo(() => D(c), [c, D]);
|
|
68
|
+
V(() => {
|
|
69
|
+
n.current && (n.current.addEventListener("change", (e) => {
|
|
70
|
+
p || _(e.target.value);
|
|
71
|
+
}), n.current.addEventListener("input", (e) => {
|
|
72
|
+
p || _(e.target.value);
|
|
73
|
+
}));
|
|
74
|
+
}, [n, p]);
|
|
75
|
+
const $ = h.useMemo(() => t.transformValue ? /* @__PURE__ */ f("div", { className: "input__syntax", children: [
|
|
76
|
+
t.transformValue(c),
|
|
77
|
+
" "
|
|
78
|
+
] }) : null, [t.transformValue, c]), F = k(() => /* @__PURE__ */ f(
|
|
79
|
+
J,
|
|
80
|
+
{
|
|
81
|
+
open: o,
|
|
82
|
+
modal: !1,
|
|
83
|
+
onOpenChange: (e) => {
|
|
84
|
+
if (!e && i.current) {
|
|
85
|
+
i.current = !1;
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
l(e), e && setTimeout(() => n.current?.focus(), 0);
|
|
89
|
+
},
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ r(U, { asChild: !0, children: /* @__PURE__ */ r(
|
|
92
|
+
"input",
|
|
93
|
+
{
|
|
94
|
+
ref: n,
|
|
95
|
+
...y(`input__control ${t.transformValue ? "input__control--syntax" : ""}`, m),
|
|
96
|
+
onFocus: () => !o && l(!0),
|
|
97
|
+
onKeyDown: (e) => {
|
|
98
|
+
e.key === "ArrowDown" ? (e.preventDefault(), a.current?.focusFirstItem()) : e.key === "ArrowUp" && (e.preventDefault(), a.current?.focusLastItem());
|
|
99
|
+
},
|
|
100
|
+
disabled: w || p
|
|
101
|
+
}
|
|
102
|
+
) }),
|
|
103
|
+
/* @__PURE__ */ r(q, { children: /* @__PURE__ */ f(z, { children: [
|
|
104
|
+
S,
|
|
105
|
+
" ",
|
|
106
|
+
/* @__PURE__ */ r(
|
|
107
|
+
B,
|
|
108
|
+
{
|
|
109
|
+
ref: a,
|
|
110
|
+
suggestions: d,
|
|
111
|
+
onSuggestionSelect: (e) => {
|
|
112
|
+
C || G(s.current, "value", typeof c == "object" ? JSON.stringify(e.value) : e.value, "change"), C(e), l(!1);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
),
|
|
116
|
+
O,
|
|
117
|
+
" "
|
|
118
|
+
] }) })
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
), [o, d, S, O]);
|
|
122
|
+
return /* @__PURE__ */ f(T, { children: [
|
|
123
|
+
b && /* @__PURE__ */ r(A, { children: b }),
|
|
124
|
+
" ",
|
|
125
|
+
M && /* @__PURE__ */ r(K, { children: M }),
|
|
126
|
+
" ",
|
|
127
|
+
/* @__PURE__ */ f("div", { ...y(
|
|
128
|
+
`input ${u?.valid ? "" : "input--not-valid"}`,
|
|
129
|
+
// Add error class if invalid
|
|
130
|
+
P
|
|
131
|
+
), children: [
|
|
132
|
+
E && /* @__PURE__ */ r("div", { className: `input__left input__left--${j}`, children: E }),
|
|
133
|
+
" ",
|
|
134
|
+
d ? F : /* @__PURE__ */ r(
|
|
135
|
+
"input",
|
|
136
|
+
{
|
|
137
|
+
tabIndex: 2,
|
|
138
|
+
ref: n,
|
|
139
|
+
disabled: w,
|
|
140
|
+
...y(`input__control ${t.transformValue ? "input__control--syntax" : ""}`, m)
|
|
141
|
+
}
|
|
142
|
+
),
|
|
143
|
+
$,
|
|
144
|
+
I && /* @__PURE__ */ r("div", { className: `input__right input__right--${R}`, children: I }),
|
|
145
|
+
" "
|
|
146
|
+
] }),
|
|
147
|
+
!u?.valid && u?.notValidMessage && /* @__PURE__ */ r(H, { children: u.notValidMessage })
|
|
148
|
+
] });
|
|
149
|
+
});
|
|
150
|
+
export {
|
|
151
|
+
oe as Input,
|
|
152
|
+
G as setElementKey
|
|
153
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { c as i } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
const p = (s) => {
|
|
4
|
+
const t = i.c(2), {
|
|
5
|
+
children: r
|
|
6
|
+
} = s;
|
|
7
|
+
let o;
|
|
8
|
+
return t[0] !== r ? (o = /* @__PURE__ */ e("span", { className: "input__description", children: r }), t[0] = r, t[1] = o) : o = t[1], o;
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
p as InputDescription
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { c as s } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
const i = (o) => {
|
|
4
|
+
const t = s.c(2), {
|
|
5
|
+
children: l
|
|
6
|
+
} = o;
|
|
7
|
+
let e;
|
|
8
|
+
return t[0] !== l ? (e = /* @__PURE__ */ r("label", { className: "input__label", children: l }), t[0] = l, t[1] = e) : e = t[1], e;
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
i as InputLabel
|
|
12
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as c, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { c as m } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import { IconExclamationCircle as n } from "@tabler/icons-react";
|
|
4
|
+
const f = (r) => {
|
|
5
|
+
const e = m.c(3), {
|
|
6
|
+
children: o
|
|
7
|
+
} = r;
|
|
8
|
+
let s;
|
|
9
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ c(n, { size: 16 }), e[0] = s) : s = e[0];
|
|
10
|
+
let t;
|
|
11
|
+
return e[1] !== o ? (t = /* @__PURE__ */ i("span", { className: "input__message", children: [
|
|
12
|
+
s,
|
|
13
|
+
o
|
|
14
|
+
] }), e[1] = o, e[2] = t) : t = e[2], t;
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
f as InputMessage
|
|
18
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { MenuContentProps } from '../menu/Menu';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
export interface InputSuggestion {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
value: any;
|
|
6
|
+
ref?: any;
|
|
7
|
+
groupLabel?: string;
|
|
8
|
+
}
|
|
9
|
+
export type InputSuggestionMenuContentProps = MenuContentProps;
|
|
10
|
+
export interface InputSuggestionMenuContentItemsProps {
|
|
11
|
+
suggestions?: InputSuggestion[];
|
|
12
|
+
onSuggestionSelect?: (suggestion: InputSuggestion) => void;
|
|
13
|
+
}
|
|
14
|
+
export interface InputSuggestionMenuContentItemsHandle {
|
|
15
|
+
focusFirstItem: () => void;
|
|
16
|
+
focusLastItem: () => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const InputSuggestionMenuContent: React.FC<InputSuggestionMenuContentProps>;
|
|
19
|
+
export declare const InputSuggestionMenuContentItems: React.FC<InputSuggestionMenuContentItemsProps>;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { jsx as p, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { c as I } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import { MenuContent as x, MenuLabel as M, MenuItem as w } from "../menu/Menu.js";
|
|
4
|
+
import l from "react";
|
|
5
|
+
import { ScrollArea as R, ScrollAreaViewport as G, ScrollAreaScrollbar as A, ScrollAreaThumb as D } from "../scroll-area/ScrollArea.js";
|
|
6
|
+
import { IconChevronDown as E, IconChevronUp as y } from "@tabler/icons-react";
|
|
7
|
+
const k = l.forwardRef((o, h) => {
|
|
8
|
+
const e = I.c(6);
|
|
9
|
+
let a, u;
|
|
10
|
+
e[0] !== o ? ({
|
|
11
|
+
children: a,
|
|
12
|
+
...u
|
|
13
|
+
} = o, e[0] = o, e[1] = a, e[2] = u) : (a = e[1], u = e[2]);
|
|
14
|
+
const i = l.useRef(null);
|
|
15
|
+
let c;
|
|
16
|
+
return e[3] !== a || e[4] !== u ? (c = /* @__PURE__ */ p(x, { ref: i, onContextMenuCapture: j, onInteractOutside: F, onCloseAutoFocus: O, align: "start", sideOffset: 8, ...u, children: a }), e[3] = a, e[4] = u, e[5] = c) : c = e[5], c;
|
|
17
|
+
}), U = l.forwardRef((o, h) => {
|
|
18
|
+
const {
|
|
19
|
+
suggestions: e,
|
|
20
|
+
onSuggestionSelect: a = () => {
|
|
21
|
+
},
|
|
22
|
+
...u
|
|
23
|
+
} = o, i = l.useRef([]), [c, m] = l.useState({});
|
|
24
|
+
l.useEffect(() => {
|
|
25
|
+
if (!e) {
|
|
26
|
+
m({});
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
m((r) => {
|
|
30
|
+
const t = {};
|
|
31
|
+
return e.forEach((n) => {
|
|
32
|
+
n.groupLabel && (r.hasOwnProperty(n.groupLabel) ? t[n.groupLabel] = r[n.groupLabel] : t[n.groupLabel] = !1);
|
|
33
|
+
}), t;
|
|
34
|
+
});
|
|
35
|
+
}, [e]);
|
|
36
|
+
const {
|
|
37
|
+
groupLabelCount: v,
|
|
38
|
+
visibleSuggestionCount: S
|
|
39
|
+
} = l.useMemo(() => {
|
|
40
|
+
if (!e) return {
|
|
41
|
+
groupLabelCount: 0,
|
|
42
|
+
visibleSuggestionCount: 0
|
|
43
|
+
};
|
|
44
|
+
let r = 0, t = 0;
|
|
45
|
+
return e.forEach((n, s, b) => {
|
|
46
|
+
const f = s > 0 ? b[s - 1]?.groupLabel : void 0;
|
|
47
|
+
n.groupLabel && n.groupLabel !== f && (r += 1), (n.groupLabel ? c[n.groupLabel] : !1) || (t += 1);
|
|
48
|
+
}), {
|
|
49
|
+
groupLabelCount: r,
|
|
50
|
+
visibleSuggestionCount: t
|
|
51
|
+
};
|
|
52
|
+
}, [c, e]), g = (r) => {
|
|
53
|
+
m((t) => ({
|
|
54
|
+
...t,
|
|
55
|
+
[r]: !t[r]
|
|
56
|
+
}));
|
|
57
|
+
};
|
|
58
|
+
return l.useImperativeHandle(h, () => ({
|
|
59
|
+
focusFirstItem: () => i.current[0]?.focus(),
|
|
60
|
+
// @ts-ignore
|
|
61
|
+
focusLastItem: () => i.current.at(-1)?.focus()
|
|
62
|
+
}), []), i.current = [], /* @__PURE__ */ d(R, { h: `${Math.max(S + v, 1) * 27}px`, mah: "calc(var(--radix-popper-available-height) - 3rem - 69px)", ...u, children: [
|
|
63
|
+
/* @__PURE__ */ p(G, { children: e?.map((r, t, n) => {
|
|
64
|
+
const s = t > 0 ? n[t - 1]?.groupLabel : void 0, b = r.groupLabel && r.groupLabel !== s, f = r.groupLabel ? c[r.groupLabel] : !1;
|
|
65
|
+
let C = i.current.length;
|
|
66
|
+
return /* @__PURE__ */ d(l.Fragment, { children: [
|
|
67
|
+
b && r.groupLabel && /* @__PURE__ */ d(M, { onPointerDown: (L) => L.preventDefault(), onClick: () => g(r.groupLabel), style: {
|
|
68
|
+
display: "flex",
|
|
69
|
+
alignItems: "center",
|
|
70
|
+
justifyContent: "space-between",
|
|
71
|
+
cursor: "pointer"
|
|
72
|
+
}, children: [
|
|
73
|
+
/* @__PURE__ */ p("span", { children: r.groupLabel }),
|
|
74
|
+
f ? /* @__PURE__ */ p(E, { size: 16 }) : /* @__PURE__ */ p(y, { size: 16 })
|
|
75
|
+
] }),
|
|
76
|
+
!f && /* @__PURE__ */ p(
|
|
77
|
+
w,
|
|
78
|
+
{
|
|
79
|
+
textValue: "",
|
|
80
|
+
onSelect: () => setTimeout(() => a(r), 0),
|
|
81
|
+
ref: (L) => i.current[C] = L,
|
|
82
|
+
children: r.children
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
] }, t);
|
|
86
|
+
}) }),
|
|
87
|
+
/* @__PURE__ */ p(A, { orientation: "vertical", children: /* @__PURE__ */ p(D, {}) })
|
|
88
|
+
] });
|
|
89
|
+
});
|
|
90
|
+
function j(o) {
|
|
91
|
+
return o.stopPropagation();
|
|
92
|
+
}
|
|
93
|
+
function F(o) {
|
|
94
|
+
return o.target instanceof HTMLInputElement && o.preventDefault();
|
|
95
|
+
}
|
|
96
|
+
function O(o) {
|
|
97
|
+
return o.preventDefault();
|
|
98
|
+
}
|
|
99
|
+
export {
|
|
100
|
+
k as InputSuggestionMenuContent,
|
|
101
|
+
U as InputSuggestionMenuContentItems
|
|
102
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { InputProps } from './Input';
|
|
3
|
+
interface NumberInputProps extends Omit<InputProps<string | null>, "wrapperComponent" | "type" | "left" | "right" | "leftType" | "rightType"> {
|
|
4
|
+
}
|
|
5
|
+
export declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import u from "react";
|
|
3
|
+
import { Input as i } from "./Input.js";
|
|
4
|
+
import { IconMinus as a, IconPlus as l } from "@tabler/icons-react";
|
|
5
|
+
import { Button as e } from "../button/Button.js";
|
|
6
|
+
const d = u.forwardRef((o, n) => {
|
|
7
|
+
n = n || u.useRef(null);
|
|
8
|
+
const {
|
|
9
|
+
step: r = 1,
|
|
10
|
+
...c
|
|
11
|
+
} = o;
|
|
12
|
+
return /* @__PURE__ */ t(i, { className: "number-input", right: /* @__PURE__ */ t(e, { variant: "none", onClick: () => {
|
|
13
|
+
n.current && (n.current.value || (n.current.value = "0"), n.current.value = (Number.parseInt(n.current.value) + r).toString());
|
|
14
|
+
}, children: /* @__PURE__ */ t(l, { size: 13 }) }), left: /* @__PURE__ */ t(e, { variant: "none", onClick: () => {
|
|
15
|
+
n.current && (n.current.value || (n.current.value = "0"), n.current.value = (Number.parseInt(n.current.value) - r).toString());
|
|
16
|
+
}, children: /* @__PURE__ */ t(a, { size: 13 }) }), leftType: "action", type: "number", ref: n, ...c });
|
|
17
|
+
});
|
|
18
|
+
export {
|
|
19
|
+
d as NumberInput
|
|
20
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { InputProps } from './Input';
|
|
3
|
+
interface PasswordInputProps extends Omit<InputProps<string | null>, "wrapperComponent" | "type"> {
|
|
4
|
+
clearable?: boolean;
|
|
5
|
+
visible?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const PasswordInput: React.ForwardRefExoticComponent<PasswordInputProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import o from "react";
|
|
3
|
+
import { Input as h, setElementKey as y } from "./Input.js";
|
|
4
|
+
import { IconEye as d, IconX as g } from "@tabler/icons-react";
|
|
5
|
+
import { Button as i } from "../button/Button.js";
|
|
6
|
+
const I = o.forwardRef((s, t) => {
|
|
7
|
+
t = t || o.useRef(null);
|
|
8
|
+
const {
|
|
9
|
+
clearable: a = !0,
|
|
10
|
+
visible: p = !0,
|
|
11
|
+
right: c,
|
|
12
|
+
...u
|
|
13
|
+
} = s, l = (r) => (t.current && y(t.current, "value", "", "change"), r.stopPropagation(), r.preventDefault(), !1), m = (r) => (t.current && t.current.type == "password" ? t.current.type = "text" : t.current && t.current.type == "text" && (t.current.type = "password"), r.stopPropagation(), r.preventDefault(), !1), n = [c];
|
|
14
|
+
return p && n.push(/* @__PURE__ */ e(i, { variant: "none", onClick: (r) => m(r), children: /* @__PURE__ */ e(d, { size: 13 }) })), a && n.push(/* @__PURE__ */ e(i, { variant: "none", onClick: (r) => l(r), children: /* @__PURE__ */ e(g, { size: 13 }) })), /* @__PURE__ */ e(h, { right: n, rightType: "action", type: "password", ref: t, ...u });
|
|
15
|
+
});
|
|
16
|
+
export {
|
|
17
|
+
I as PasswordInput
|
|
18
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OneTimePasswordFieldHiddenInputProps, OneTimePasswordFieldInputProps, OneTimePasswordFieldProps } from '@radix-ui/react-one-time-password-field';
|
|
2
|
+
import { Code0ComponentProps } from '../../utils/types';
|
|
3
|
+
import { default as React } from 'react';
|
|
4
|
+
import { InputProps } from './Input';
|
|
5
|
+
type PinInputProps = Omit<InputProps<string | null>, "wrapperComponent" | "type" | "left" | "right" | "leftType" | "rightType"> & OneTimePasswordFieldProps;
|
|
6
|
+
type PinInputFieldProps = Code0ComponentProps & OneTimePasswordFieldInputProps;
|
|
7
|
+
type PinInputHiddenFieldProps = Code0ComponentProps & OneTimePasswordFieldHiddenInputProps;
|
|
8
|
+
export declare const PinInput: React.FC<PinInputProps>;
|
|
9
|
+
export declare const PinInputField: React.FC<PinInputFieldProps>;
|
|
10
|
+
export declare const PinInputHiddenField: React.FC<PinInputHiddenFieldProps>;
|
|
11
|
+
export {};
|