@fabio.caffarello/react-design-system 1.7.0 → 1.9.0
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/README.md +211 -10
- package/dist/App.d.ts +14 -3
- package/dist/docs/components/ComponentStatusTable.d.ts +12 -0
- package/dist/main.d.ts +7 -1
- package/dist/ui/a11y/AccessibilityStories.d.ts +35 -0
- package/dist/ui/atoms/Accordion/Accordion.d.ts +34 -0
- package/dist/ui/atoms/Accordion/Accordion.stories.d.ts +11 -0
- package/dist/ui/atoms/Accordion/Accordion.test.d.ts +1 -0
- package/dist/ui/atoms/Accordion/index.d.ts +2 -0
- package/dist/ui/atoms/Avatar/Avatar.d.ts +31 -0
- package/dist/ui/atoms/Avatar/Avatar.stories.d.ts +19 -0
- package/dist/ui/atoms/Avatar/Avatar.test.d.ts +1 -0
- package/dist/ui/atoms/Avatar/AvatarGroup.d.ts +26 -0
- package/dist/ui/atoms/Avatar/AvatarGroup.stories.d.ts +17 -0
- package/dist/ui/atoms/Avatar/index.d.ts +9 -0
- package/dist/ui/atoms/Badge/Badge.d.ts +12 -17
- package/dist/ui/atoms/Badge/Badge.stories.d.ts +15 -9
- package/dist/ui/atoms/BoxWrapper/BoxWrapper.d.ts +5 -3
- package/dist/ui/atoms/BoxWrapper/BoxWrapper.test.d.ts +1 -0
- package/dist/ui/atoms/Button/Button.d.ts +32 -10
- package/dist/ui/atoms/Button/Button.stories.d.ts +16 -0
- package/dist/ui/atoms/Button/Button.test.d.ts +1 -0
- package/dist/ui/atoms/Checkbox/Checkbox.d.ts +3 -1
- package/dist/ui/atoms/Checkbox/Checkbox.stories.d.ts +12 -0
- package/dist/ui/atoms/Chip/Chip.d.ts +17 -0
- package/dist/ui/atoms/Chip/Chip.stories.d.ts +20 -0
- package/dist/ui/atoms/Chip/index.d.ts +2 -0
- package/dist/ui/atoms/Collapsible/Collapsible.stories.d.ts +7 -0
- package/dist/ui/atoms/Drawer/Drawer.d.ts +44 -0
- package/dist/ui/atoms/Drawer/Drawer.stories.d.ts +11 -0
- package/dist/ui/atoms/Drawer/DrawerContent.d.ts +13 -0
- package/dist/ui/atoms/Drawer/DrawerContext.d.ts +15 -0
- package/dist/ui/atoms/Drawer/DrawerFooter.d.ts +18 -0
- package/dist/ui/atoms/Drawer/DrawerHeader.d.ts +17 -0
- package/dist/ui/atoms/Drawer/index.d.ts +8 -0
- package/dist/ui/atoms/ErrorMessage/ErrorMessage.stories.d.ts +2 -0
- package/dist/ui/atoms/Flow/FlowHandle.d.ts +12 -0
- package/dist/ui/atoms/Flow/FlowHandle.test.d.ts +1 -0
- package/dist/ui/atoms/Flow/FlowNodeWrapper.d.ts +14 -0
- package/dist/ui/atoms/Flow/index.d.ts +7 -0
- package/dist/ui/atoms/Info/Info.d.ts +2 -3
- package/dist/ui/atoms/Info/Info.stories.d.ts +11 -1
- package/dist/ui/atoms/Info/Info.test.d.ts +1 -0
- package/dist/ui/atoms/Input/Input.d.ts +14 -4
- package/dist/ui/atoms/Input/Input.stories.d.ts +16 -0
- package/dist/ui/atoms/Label/Label.d.ts +2 -2
- package/dist/ui/atoms/Label/Label.stories.d.ts +6 -0
- package/dist/ui/atoms/Menu/Menu.d.ts +41 -0
- package/dist/ui/atoms/Menu/Menu.stories.d.ts +14 -0
- package/dist/ui/atoms/Menu/MenuContent.d.ts +13 -0
- package/dist/ui/atoms/Menu/MenuContext.d.ts +13 -0
- package/dist/ui/atoms/Menu/MenuItem.d.ts +24 -0
- package/dist/ui/atoms/Menu/MenuSeparator.d.ts +14 -0
- package/dist/ui/atoms/Menu/MenuTrigger.d.ts +13 -0
- package/dist/ui/atoms/Menu/index.d.ts +10 -0
- package/dist/ui/atoms/NavLink/NavLink.d.ts +11 -12
- package/dist/ui/atoms/NavLink/NavLink.stories.d.ts +40 -7
- package/dist/ui/atoms/NavLink/hooks/useNavLink.d.ts +64 -0
- package/dist/ui/atoms/NavLink/index.d.ts +10 -0
- package/dist/ui/atoms/NavLink/types.d.ts +60 -0
- package/dist/ui/atoms/Popover/Popover.d.ts +35 -0
- package/dist/ui/atoms/Popover/Popover.stories.d.ts +11 -0
- package/dist/ui/atoms/Popover/Popover.test.d.ts +1 -0
- package/dist/ui/atoms/Popover/index.d.ts +2 -0
- package/dist/ui/atoms/Progress/Progress.d.ts +15 -0
- package/dist/ui/atoms/Progress/Progress.stories.d.ts +16 -0
- package/dist/ui/atoms/Progress/Progress.test.d.ts +1 -0
- package/dist/ui/atoms/Radio/Radio.d.ts +2 -1
- package/dist/ui/atoms/Radio/Radio.stories.d.ts +10 -0
- package/dist/ui/atoms/Select/Select.d.ts +18 -6
- package/dist/ui/atoms/Select/Select.stories.d.ts +22 -8
- package/dist/ui/atoms/Separator/Separator.d.ts +23 -0
- package/dist/ui/atoms/Separator/Separator.stories.d.ts +16 -0
- package/dist/ui/atoms/Separator/Separator.test.d.ts +1 -0
- package/dist/ui/atoms/Separator/index.d.ts +2 -0
- package/dist/ui/atoms/Skeleton/Skeleton.d.ts +1 -1
- package/dist/ui/atoms/Skeleton/Skeleton.stories.d.ts +28 -0
- package/dist/ui/atoms/Slider/Slider.d.ts +45 -0
- package/dist/ui/atoms/Slider/Slider.stories.d.ts +21 -0
- package/dist/ui/atoms/Slider/Slider.test.d.ts +1 -0
- package/dist/ui/atoms/Slider/index.d.ts +2 -0
- package/dist/ui/atoms/Spinner/Spinner.d.ts +10 -0
- package/dist/ui/atoms/Spinner/Spinner.stories.d.ts +15 -0
- package/dist/ui/atoms/Spinner/Spinner.test.d.ts +1 -0
- package/dist/ui/atoms/Switch/Switch.d.ts +28 -0
- package/dist/ui/atoms/Switch/Switch.stories.d.ts +18 -0
- package/dist/ui/atoms/Switch/Switch.test.d.ts +1 -0
- package/dist/ui/atoms/Switch/index.d.ts +2 -0
- package/dist/ui/atoms/Text/Text.d.ts +7 -3
- package/dist/ui/atoms/Text/Text.stories.d.ts +13 -1
- package/dist/ui/atoms/Textarea/Textarea.d.ts +2 -2
- package/dist/ui/atoms/Textarea/Textarea.stories.d.ts +15 -5
- package/dist/ui/atoms/Tooltip/Tooltip.d.ts +2 -1
- package/dist/ui/atoms/Tooltip/Tooltip.stories.d.ts +43 -0
- package/dist/ui/atoms/index.d.ts +21 -5
- package/dist/ui/builders/ComponentBuilder.d.ts +93 -0
- package/dist/ui/builders/ComponentFactory.d.ts +28 -0
- package/dist/ui/builders/ComponentRegistry.d.ts +57 -0
- package/dist/ui/builders/StorybookIntegration.d.ts +14 -0
- package/dist/ui/builders/builders/AtomBuilder.d.ts +53 -0
- package/dist/ui/builders/builders/MoleculeBuilder.d.ts +33 -0
- package/dist/ui/builders/builders/OrganismBuilder.d.ts +33 -0
- package/dist/ui/builders/builders/TemplateBuilder.d.ts +33 -0
- package/dist/ui/builders/index.d.ts +9 -0
- package/dist/ui/builders/types.d.ts +59 -0
- package/dist/ui/devtools/ContextDevTools.d.ts +33 -0
- package/dist/ui/extensions/ExtensionRegistry.d.ts +42 -0
- package/dist/ui/extensions/flow/atoms/FlowHandle.d.ts +28 -0
- package/dist/ui/extensions/flow/atoms/FlowNodeWrapper.d.ts +37 -0
- package/dist/ui/extensions/flow/atoms/index.d.ts +7 -0
- package/dist/ui/extensions/flow/components/AddNodeButton.d.ts +7 -0
- package/dist/ui/extensions/flow/components/BackgroundConfigPanel.d.ts +13 -0
- package/dist/ui/extensions/flow/components/CodePreview.d.ts +20 -0
- package/dist/ui/extensions/flow/components/DatasetSelector.d.ts +6 -0
- package/dist/ui/extensions/flow/components/DragNDropSidebar.d.ts +29 -0
- package/dist/ui/extensions/flow/components/EdgeEditor.d.ts +23 -0
- package/dist/ui/extensions/flow/components/EdgeTypesPanel.d.ts +9 -0
- package/dist/ui/extensions/flow/components/ExportPanel.d.ts +12 -0
- package/dist/ui/extensions/flow/components/FloatingEdgesCheckbox.d.ts +6 -0
- package/dist/ui/extensions/flow/components/HandlePositionsDropdown.d.ts +7 -0
- package/dist/ui/extensions/flow/components/LayoutApplier.d.ts +22 -0
- package/dist/ui/extensions/flow/components/LayoutConfigPanel.d.ts +12 -0
- package/dist/ui/extensions/flow/components/NodeEditor.d.ts +18 -0
- package/dist/ui/extensions/flow/components/NodeTypesPanel.d.ts +9 -0
- package/dist/ui/extensions/flow/components/NodesEdgesTabContent.d.ts +12 -0
- package/dist/ui/extensions/flow/components/PlaygroundBreadcrumbs.d.ts +12 -0
- package/dist/ui/extensions/flow/components/PlaygroundCanvas.d.ts +11 -0
- package/dist/ui/extensions/flow/components/PlaygroundCanvasFooter.d.ts +7 -0
- package/dist/ui/extensions/flow/components/PlaygroundDevTools.d.ts +13 -0
- package/dist/ui/extensions/flow/components/PlaygroundErrorBoundary.d.ts +22 -0
- package/dist/ui/extensions/flow/components/PlaygroundHeader.d.ts +7 -0
- package/dist/ui/extensions/flow/components/PlaygroundLayout.d.ts +16 -0
- package/dist/ui/extensions/flow/components/PlaygroundOnboarding.d.ts +22 -0
- package/dist/ui/extensions/flow/components/PlaygroundSearch.d.ts +14 -0
- package/dist/ui/extensions/flow/components/PlaygroundSidebar.d.ts +16 -0
- package/dist/ui/extensions/flow/components/PlaygroundSidebarContent.d.ts +13 -0
- package/dist/ui/extensions/flow/components/PlaygroundStepper.d.ts +17 -0
- package/dist/ui/extensions/flow/components/PlaygroundTabs.d.ts +25 -0
- package/dist/ui/extensions/flow/components/ReactFlowPropsPanel.d.ts +15 -0
- package/dist/ui/extensions/flow/components/SettingsPanel.d.ts +14 -0
- package/dist/ui/extensions/flow/components/ViewportLogger.d.ts +6 -0
- package/dist/ui/extensions/flow/components/index.d.ts +53 -0
- package/dist/ui/extensions/flow/context/FlowEventContext.d.ts +59 -0
- package/dist/ui/extensions/flow/context/FlowPerformanceContext.d.ts +66 -0
- package/dist/ui/extensions/flow/context/FlowStyleContext.d.ts +44 -0
- package/dist/ui/extensions/flow/context/PlaygroundContext.d.ts +60 -0
- package/dist/ui/extensions/flow/context/index.d.ts +14 -0
- package/dist/ui/extensions/flow/factories/FlowFactory.d.ts +81 -0
- package/dist/ui/extensions/flow/factories/builders/EdgeBuilder.d.ts +75 -0
- package/dist/ui/extensions/flow/factories/builders/NodeBuilder.d.ts +62 -0
- package/dist/ui/extensions/flow/factories/index.d.ts +12 -0
- package/dist/ui/extensions/flow/hooks/index.d.ts +29 -0
- package/dist/ui/extensions/flow/hooks/useAutoLayout.d.ts +17 -0
- package/dist/ui/extensions/flow/hooks/useFlowActions.d.ts +26 -0
- package/dist/ui/extensions/flow/hooks/useFlowEvents.d.ts +52 -0
- package/dist/ui/extensions/flow/hooks/useFlowPerformance.d.ts +33 -0
- package/dist/ui/extensions/flow/hooks/useFlowSelection.d.ts +36 -0
- package/dist/ui/extensions/flow/hooks/useFlowState.d.ts +28 -0
- package/dist/ui/extensions/flow/hooks/useFlowStyles.d.ts +33 -0
- package/dist/ui/extensions/flow/hooks/useFlowUtils.d.ts +47 -0
- package/dist/ui/extensions/flow/hooks/useFlowValidation.d.ts +19 -0
- package/dist/ui/extensions/flow/hooks/useFlowViewport.d.ts +64 -0
- package/dist/ui/extensions/flow/hooks/useFlowVirtualization.d.ts +17 -0
- package/dist/ui/extensions/flow/hooks/useKeyboardShortcuts.d.ts +130 -0
- package/dist/ui/extensions/flow/hooks/useNodeSelection.d.ts +18 -0
- package/dist/ui/extensions/flow/hooks/usePlaygroundHistory.d.ts +24 -0
- package/dist/ui/extensions/flow/hooks/usePlaygroundKeyboardNavigation.d.ts +18 -0
- package/dist/ui/extensions/flow/index.d.ts +50 -0
- package/dist/ui/extensions/flow/molecules/CardNode.d.ts +40 -0
- package/dist/ui/extensions/flow/molecules/ColorSelectorNode.d.ts +32 -0
- package/dist/ui/extensions/flow/molecules/CustomEdge.d.ts +100 -0
- package/dist/ui/extensions/flow/molecules/CustomNode.d.ts +88 -0
- package/dist/ui/extensions/flow/molecules/FloatingConnectionLine.d.ts +11 -0
- package/dist/ui/extensions/flow/molecules/FloatingEdge.d.ts +18 -0
- package/dist/ui/extensions/flow/molecules/FlowNodeContent.d.ts +22 -0
- package/dist/ui/extensions/flow/molecules/FlowNodeToolbar.d.ts +71 -0
- package/dist/ui/extensions/flow/molecules/InputNode.d.ts +11 -0
- package/dist/ui/extensions/flow/molecules/NoteNode.d.ts +17 -0
- package/dist/ui/extensions/flow/molecules/OutputNode.d.ts +11 -0
- package/dist/ui/extensions/flow/molecules/ResizableNode.d.ts +92 -0
- package/dist/ui/extensions/flow/molecules/SelectorNode.d.ts +40 -0
- package/dist/ui/extensions/flow/molecules/TextNode.d.ts +25 -0
- package/dist/ui/extensions/flow/molecules/index.d.ts +24 -0
- package/dist/ui/extensions/flow/organisms/FlowBackground.d.ts +52 -0
- package/dist/ui/extensions/flow/organisms/FlowCanvas.d.ts +60 -0
- package/dist/ui/extensions/flow/organisms/FlowContext.d.ts +49 -0
- package/dist/ui/extensions/flow/organisms/FlowControls.d.ts +13 -0
- package/dist/ui/extensions/flow/organisms/FlowDragHandle.d.ts +27 -0
- package/dist/ui/extensions/flow/organisms/FlowEdgeToolbar.d.ts +40 -0
- package/dist/ui/extensions/flow/organisms/FlowMinimap.d.ts +12 -0
- package/dist/ui/extensions/flow/organisms/FlowNodeResizer.d.ts +44 -0
- package/dist/ui/extensions/flow/organisms/FlowPanel.d.ts +11 -0
- package/dist/ui/extensions/flow/organisms/FlowPlayground.stories.d.ts +12 -0
- package/dist/ui/extensions/flow/organisms/FlowProvider.d.ts +39 -0
- package/dist/ui/extensions/flow/organisms/FlowTypes.d.ts +201 -0
- package/dist/ui/extensions/flow/providers/FlowDebugProvider.d.ts +62 -0
- package/dist/ui/extensions/flow/providers/FlowEventProvider.d.ts +8 -0
- package/dist/ui/extensions/flow/providers/FlowPerformanceProvider.d.ts +8 -0
- package/dist/ui/extensions/flow/providers/FlowProviderComposition.d.ts +46 -0
- package/dist/ui/extensions/flow/providers/FlowStyleProvider.d.ts +8 -0
- package/dist/ui/extensions/flow/providers/index.d.ts +11 -0
- package/dist/ui/extensions/flow/registries/LayoutRegistry.d.ts +61 -0
- package/dist/ui/extensions/flow/registries/PluginRegistry.d.ts +74 -0
- package/dist/ui/extensions/flow/registries/index.d.ts +13 -0
- package/dist/ui/extensions/flow/strategies/AnimationStrategy.d.ts +80 -0
- package/dist/ui/extensions/flow/strategies/EdgeRoutingStrategy.d.ts +104 -0
- package/dist/ui/extensions/flow/strategies/LayoutStrategy.d.ts +43 -0
- package/dist/ui/extensions/flow/strategies/index.d.ts +13 -0
- package/dist/ui/extensions/flow/styles/flow-theme.d.ts +80 -0
- package/dist/ui/extensions/flow/styles/index.d.ts +9 -0
- package/dist/ui/extensions/flow/types/playgroundTypes.d.ts +83 -0
- package/dist/ui/extensions/flow/utils/PlaygroundPersistence.d.ts +75 -0
- package/dist/ui/extensions/flow/utils/PlaygroundStateManager.d.ts +105 -0
- package/dist/ui/extensions/flow/utils/backgroundPresets.d.ts +63 -0
- package/dist/ui/extensions/flow/utils/codeGenerator.d.ts +25 -0
- package/dist/ui/extensions/flow/utils/cssUtils.d.ts +26 -0
- package/dist/ui/extensions/flow/utils/edgeDataHelpers.d.ts +55 -0
- package/dist/ui/extensions/flow/utils/edgeFactory.d.ts +36 -0
- package/dist/ui/extensions/flow/utils/edgeTypes.d.ts +82 -0
- package/dist/ui/extensions/flow/utils/floatingEdgeUtils.d.ts +27 -0
- package/dist/ui/extensions/flow/utils/geometryUtils.d.ts +67 -0
- package/dist/ui/extensions/flow/utils/index.d.ts +12 -0
- package/dist/ui/extensions/flow/utils/layoutEngine.d.ts +67 -0
- package/dist/ui/extensions/flow/utils/nodeDataHelpers.d.ts +49 -0
- package/dist/ui/extensions/flow/utils/nodeFactory.d.ts +35 -0
- package/dist/ui/extensions/flow/utils/nodeTypes.d.ts +81 -0
- package/dist/ui/extensions/flow/utils/performanceUtils.d.ts +50 -0
- package/dist/ui/extensions/flow/utils/playgroundHelpers.d.ts +85 -0
- package/dist/ui/extensions/flow/utils/playgroundRouting.d.ts +31 -0
- package/dist/ui/extensions/flow/utils/playgroundSteps.d.ts +11 -0
- package/dist/ui/extensions/flow/utils/playgroundStyles.d.ts +55 -0
- package/dist/ui/extensions/flow/utils/playgroundTemplates.d.ts +62 -0
- package/dist/ui/extensions/flow/utils/propFilters.d.ts +36 -0
- package/dist/ui/extensions/flow/utils/reactFlowPropsDefinitions.d.ts +18 -0
- package/dist/ui/extensions/flow/utils/shareUtils.d.ts +22 -0
- package/dist/ui/extensions/flow/utils/validation.d.ts +52 -0
- package/dist/ui/extensions/index.d.ts +8 -0
- package/dist/ui/extensions/types.d.ts +51 -0
- package/dist/ui/hooks/shallowEqual.d.ts +18 -0
- package/dist/ui/hooks/useContextSelector.d.ts +52 -0
- package/dist/ui/hooks/useProviderComposition.d.ts +73 -0
- package/dist/ui/index.d.ts +10 -1
- package/dist/ui/layouts/Container/Container.d.ts +34 -0
- package/dist/ui/layouts/Container/Container.stories.d.ts +15 -0
- package/dist/ui/layouts/Container/index.d.ts +1 -0
- package/dist/ui/layouts/Stack/Stack.d.ts +35 -0
- package/dist/ui/layouts/Stack/Stack.stories.d.ts +15 -0
- package/dist/ui/layouts/Stack/index.d.ts +1 -0
- package/dist/ui/layouts/index.d.ts +2 -0
- package/dist/ui/molecules/Accordion/Accordion.d.ts +34 -0
- package/dist/ui/molecules/Accordion/Accordion.stories.d.ts +16 -0
- package/dist/ui/molecules/Accordion/index.d.ts +2 -0
- package/dist/ui/molecules/Autocomplete/Autocomplete.d.ts +37 -0
- package/dist/ui/molecules/Autocomplete/Autocomplete.stories.d.ts +20 -0
- package/dist/ui/molecules/Autocomplete/AutocompleteList.d.ts +21 -0
- package/dist/ui/molecules/Autocomplete/AutocompleteOption.d.ts +20 -0
- package/dist/ui/molecules/Autocomplete/index.d.ts +7 -0
- package/dist/ui/molecules/Breadcrumb/Breadcrumb.stories.d.ts +5 -0
- package/dist/ui/molecules/ButtonGroup/ButtonGroup.d.ts +23 -0
- package/dist/ui/molecules/ButtonGroup/ButtonGroup.stories.d.ts +14 -0
- package/dist/ui/molecules/ButtonGroup/index.d.ts +2 -0
- package/dist/ui/molecules/Card/Card.d.ts +6 -2
- package/dist/ui/molecules/Card/Card.stories.d.ts +7 -0
- package/dist/ui/molecules/ColorPicker/ColorPicker.d.ts +28 -0
- package/dist/ui/molecules/ColorPicker/ColorPicker.stories.d.ts +19 -0
- package/dist/ui/molecules/ColorPicker/ColorPicker.test.d.ts +1 -0
- package/dist/ui/molecules/ColorPicker/index.d.ts +2 -0
- package/dist/ui/molecules/DatePicker/DatePicker.d.ts +74 -0
- package/dist/ui/molecules/DatePicker/DatePicker.stories.d.ts +20 -0
- package/dist/ui/molecules/DatePicker/DatePicker.test.d.ts +1 -0
- package/dist/ui/molecules/DatePicker/DatePickerCalendar.d.ts +6 -0
- package/dist/ui/molecules/DatePicker/DatePickerContext.d.ts +28 -0
- package/dist/ui/molecules/DatePicker/DatePickerInput.d.ts +9 -0
- package/dist/ui/molecules/DatePicker/DatePickerProvider.d.ts +23 -0
- package/dist/ui/molecules/DatePicker/index.d.ts +14 -0
- package/dist/ui/molecules/Drawer/Drawer.d.ts +45 -0
- package/dist/ui/molecules/Drawer/Drawer.stories.d.ts +14 -0
- package/dist/ui/molecules/Drawer/DrawerContent.d.ts +13 -0
- package/dist/ui/molecules/Drawer/DrawerContext.d.ts +15 -0
- package/dist/ui/molecules/Drawer/DrawerFooter.d.ts +18 -0
- package/dist/ui/molecules/Drawer/DrawerHeader.d.ts +17 -0
- package/dist/ui/molecules/Drawer/index.d.ts +8 -0
- package/dist/ui/molecules/Dropdown/Dropdown.d.ts +2 -1
- package/dist/ui/molecules/Dropdown/Dropdown.stories.d.ts +33 -0
- package/dist/ui/molecules/EmptyState/EmptyState.stories.d.ts +28 -0
- package/dist/ui/molecules/FileUpload/FileUpload.d.ts +37 -0
- package/dist/ui/molecules/FileUpload/FileUpload.stories.d.ts +20 -0
- package/dist/ui/molecules/FileUpload/FileUpload.test.d.ts +1 -0
- package/dist/ui/molecules/FileUpload/index.d.ts +2 -0
- package/dist/ui/molecules/Flow/CustomEdge.d.ts +12 -0
- package/dist/ui/molecules/Flow/CustomNode.d.ts +12 -0
- package/dist/ui/molecules/Flow/CustomNode.test.d.ts +1 -0
- package/dist/ui/molecules/Flow/FlowNodeContent.d.ts +22 -0
- package/dist/ui/molecules/Flow/FlowNodeToolbar.d.ts +18 -0
- package/dist/ui/molecules/Flow/index.d.ts +9 -0
- package/dist/ui/molecules/Form/Form.d.ts +29 -4
- package/dist/ui/molecules/Form/Form.stories.d.ts +11 -0
- package/dist/ui/molecules/Form/FormContext.d.ts +17 -0
- package/dist/ui/molecules/Form/FormField.d.ts +37 -0
- package/dist/ui/molecules/Form/FormProvider.d.ts +14 -0
- package/dist/ui/molecules/Form/index.d.ts +13 -0
- package/dist/ui/molecules/Form/useFormFieldArray.d.ts +28 -0
- package/dist/ui/molecules/InputWithLabel/InputWithLabel.test.d.ts +1 -0
- package/dist/ui/molecules/Menu/Menu.d.ts +44 -0
- package/dist/ui/molecules/Menu/Menu.stories.d.ts +17 -0
- package/dist/ui/molecules/Menu/MenuContent.d.ts +13 -0
- package/dist/ui/molecules/Menu/MenuContext.d.ts +13 -0
- package/dist/ui/molecules/Menu/MenuItem.d.ts +24 -0
- package/dist/ui/molecules/Menu/MenuSeparator.d.ts +14 -0
- package/dist/ui/molecules/Menu/MenuTrigger.d.ts +13 -0
- package/dist/ui/molecules/Menu/index.d.ts +10 -0
- package/dist/ui/molecules/MultiSelect/MultiSelect.d.ts +36 -0
- package/dist/ui/molecules/MultiSelect/MultiSelect.stories.d.ts +21 -0
- package/dist/ui/molecules/MultiSelect/index.d.ts +2 -0
- package/dist/ui/molecules/Pagination/Pagination.stories.d.ts +8 -0
- package/dist/ui/molecules/Popover/Popover.d.ts +35 -0
- package/dist/ui/molecules/Popover/Popover.stories.d.ts +16 -0
- package/dist/ui/molecules/Popover/index.d.ts +2 -0
- package/dist/ui/molecules/Rating/Rating.d.ts +33 -0
- package/dist/ui/molecules/Rating/Rating.stories.d.ts +20 -0
- package/dist/ui/molecules/Rating/Rating.test.d.ts +1 -0
- package/dist/ui/molecules/Rating/index.d.ts +2 -0
- package/dist/ui/molecules/SearchInput/SearchInput.d.ts +24 -0
- package/dist/ui/molecules/SearchInput/SearchInput.stories.d.ts +16 -0
- package/dist/ui/molecules/SearchInput/SearchInput.test.d.ts +1 -0
- package/dist/ui/molecules/SearchInput/index.d.ts +2 -0
- package/dist/ui/molecules/SidebarContent/SidebarContent.d.ts +39 -0
- package/dist/ui/molecules/SidebarContent/SidebarContent.stories.d.ts +10 -0
- package/dist/ui/molecules/SidebarContent/index.d.ts +2 -0
- package/dist/ui/molecules/SidebarHeader/SidebarHeader.test.d.ts +1 -0
- package/dist/ui/molecules/SidebarNavigation/SidebarNavigation.d.ts +51 -0
- package/dist/ui/molecules/SidebarNavigation/SidebarNavigation.stories.d.ts +9 -0
- package/dist/ui/molecules/SidebarNavigation/index.d.ts +2 -0
- package/dist/ui/molecules/TableActions/TableActions.d.ts +31 -0
- package/dist/ui/molecules/TableActions/TableActions.stories.d.ts +7 -0
- package/dist/ui/molecules/TableActions/TableActions.test.d.ts +1 -0
- package/dist/ui/molecules/TableFilters/TableFilters.d.ts +37 -0
- package/dist/ui/molecules/TableFilters/TableFilters.stories.d.ts +7 -0
- package/dist/ui/molecules/TableFilters/TableFilters.test.d.ts +1 -0
- package/dist/ui/molecules/TablePagination/TablePagination.d.ts +29 -0
- package/dist/ui/molecules/TablePagination/TablePagination.stories.d.ts +8 -0
- package/dist/ui/molecules/TablePagination/TablePagination.test.d.ts +1 -0
- package/dist/ui/molecules/Tabs/Tabs.d.ts +15 -0
- package/dist/ui/molecules/Tabs/Tabs.stories.d.ts +18 -0
- package/dist/ui/molecules/Tabs/Tabs.test.d.ts +1 -0
- package/dist/ui/molecules/Tabs/TabsContent.d.ts +14 -0
- package/dist/ui/molecules/Tabs/TabsContext.d.ts +18 -0
- package/dist/ui/molecules/Tabs/TabsList.d.ts +13 -0
- package/dist/ui/molecules/Tabs/TabsProvider.d.ts +16 -0
- package/dist/ui/molecules/Tabs/TabsTrigger.d.ts +13 -0
- package/dist/ui/molecules/Tabs/index.d.ts +17 -0
- package/dist/ui/molecules/TimePicker/TimePicker.d.ts +29 -0
- package/dist/ui/molecules/TimePicker/TimePicker.stories.d.ts +19 -0
- package/dist/ui/molecules/TimePicker/TimePicker.test.d.ts +1 -0
- package/dist/ui/molecules/TimePicker/index.d.ts +2 -0
- package/dist/ui/molecules/index.d.ts +25 -8
- package/dist/ui/organisms/CommandPalette/CommandPalette.d.ts +37 -0
- package/dist/ui/organisms/CommandPalette/CommandPalette.stories.d.ts +20 -0
- package/dist/ui/organisms/CommandPalette/CommandPalette.test.d.ts +1 -0
- package/dist/ui/organisms/CommandPalette/index.d.ts +2 -0
- package/dist/ui/organisms/DataGrid/DataGrid.d.ts +84 -0
- package/dist/ui/organisms/DataGrid/DataGrid.stories.d.ts +21 -0
- package/dist/ui/organisms/DataGrid/DataGrid.test.d.ts +1 -0
- package/dist/ui/organisms/DataGrid/index.d.ts +2 -0
- package/dist/ui/organisms/Dialog/AlertDialog.d.ts +34 -0
- package/dist/ui/organisms/Dialog/Dialog.d.ts +58 -0
- package/dist/ui/organisms/Dialog/Dialog.stories.d.ts +16 -0
- package/dist/ui/organisms/Dialog/Dialog.test.d.ts +1 -0
- package/dist/ui/organisms/Dialog/DialogClose.d.ts +8 -0
- package/dist/ui/organisms/Dialog/DialogContent.d.ts +8 -0
- package/dist/ui/organisms/Dialog/DialogContext.d.ts +10 -0
- package/dist/ui/organisms/Dialog/DialogDescription.d.ts +3 -0
- package/dist/ui/organisms/Dialog/DialogFooter.d.ts +5 -0
- package/dist/ui/organisms/Dialog/DialogHeader.d.ts +5 -0
- package/dist/ui/organisms/Dialog/DialogProvider.d.ts +10 -0
- package/dist/ui/organisms/Dialog/DialogTitle.d.ts +5 -0
- package/dist/ui/organisms/Dialog/DialogTrigger.d.ts +6 -0
- package/dist/ui/organisms/Dialog/index.d.ts +22 -0
- package/dist/ui/organisms/Flow/FlowBackground.d.ts +12 -0
- package/dist/ui/organisms/Flow/FlowCanvas.d.ts +30 -0
- package/dist/ui/organisms/Flow/FlowCanvas.stories.d.ts +7 -0
- package/dist/ui/organisms/Flow/FlowCanvas.test.d.ts +1 -0
- package/dist/ui/organisms/Flow/FlowContext.d.ts +49 -0
- package/dist/ui/organisms/Flow/FlowControls.d.ts +12 -0
- package/dist/ui/organisms/Flow/FlowMinimap.d.ts +12 -0
- package/dist/ui/organisms/Flow/FlowPanel.d.ts +11 -0
- package/dist/ui/organisms/Flow/FlowProvider.d.ts +30 -0
- package/dist/ui/organisms/Flow/FlowProvider.test.d.ts +1 -0
- package/dist/ui/organisms/Flow/FlowTypes.d.ts +168 -0
- package/dist/ui/organisms/Flow/hooks/index.d.ts +11 -0
- package/dist/ui/organisms/Flow/hooks/useAutoLayout.d.ts +17 -0
- package/dist/ui/organisms/Flow/hooks/useFlowActions.d.ts +26 -0
- package/dist/ui/organisms/Flow/hooks/useFlowState.d.ts +28 -0
- package/dist/ui/organisms/Flow/hooks/useFlowState.test.d.ts +1 -0
- package/dist/ui/organisms/Flow/hooks/useFlowValidation.d.ts +19 -0
- package/dist/ui/organisms/Flow/hooks/useFlowVirtualization.d.ts +17 -0
- package/dist/ui/organisms/Flow/hooks/useNodeSelection.d.ts +18 -0
- package/dist/ui/organisms/Flow/index.d.ts +20 -0
- package/dist/ui/organisms/Flow/utils/edgeFactory.d.ts +36 -0
- package/dist/ui/organisms/Flow/utils/edgeTypes.d.ts +57 -0
- package/dist/ui/organisms/Flow/utils/layoutEngine.d.ts +67 -0
- package/dist/ui/organisms/Flow/utils/nodeFactory.d.ts +35 -0
- package/dist/ui/organisms/Flow/utils/nodeTypes.d.ts +57 -0
- package/dist/ui/organisms/Flow/utils/validation.d.ts +52 -0
- package/dist/ui/organisms/LoginBox/LoginBox.stories.d.ts +2 -0
- package/dist/ui/organisms/Modal/Modal.stories.d.ts +7 -0
- package/dist/ui/organisms/SideNavbar/SideNavbar.d.ts +101 -0
- package/dist/ui/organisms/SideNavbar/SideNavbar.stories.d.ts +97 -0
- package/dist/ui/organisms/SideNavbar/SideNavbarContext.d.ts +88 -0
- package/dist/ui/organisms/SideNavbar/components/Navbar/Navbar.d.ts +28 -0
- package/dist/ui/organisms/SideNavbar/components/Navbar/NavbarGroup.d.ts +17 -0
- package/dist/ui/organisms/SideNavbar/components/Navbar/NavbarItem.d.ts +2 -0
- package/dist/ui/organisms/SideNavbar/components/Navbar/NavbarSeparator.d.ts +16 -0
- package/dist/ui/organisms/SideNavbar/components/Navbar/NavbarToggle.d.ts +16 -0
- package/dist/ui/organisms/SideNavbar/components/Navbar/index.d.ts +5 -0
- package/dist/ui/organisms/SideNavbar/components/SideNavbarBackdrop.d.ts +27 -0
- package/dist/ui/organisms/SideNavbar/components/SideNavbarContent.d.ts +56 -0
- package/dist/ui/organisms/SideNavbar/components/SideNavbarFooter.d.ts +24 -0
- package/dist/ui/organisms/SideNavbar/components/SideNavbarGroup.d.ts +63 -0
- package/dist/ui/organisms/SideNavbar/components/SideNavbarHeader.d.ts +27 -0
- package/dist/ui/organisms/SideNavbar/components/SideNavbarNavigation.d.ts +14 -0
- package/dist/ui/organisms/SideNavbar/components/SideNavbarResizeHandle.d.ts +18 -0
- package/dist/ui/organisms/SideNavbar/components/SideNavbarRoot.d.ts +31 -0
- package/dist/ui/organisms/SideNavbar/components/SideNavbarToggle.d.ts +31 -0
- package/dist/ui/organisms/SideNavbar/components/Sidebar/Sidebar.d.ts +38 -0
- package/dist/ui/organisms/SideNavbar/components/Sidebar/SidebarContent.d.ts +17 -0
- package/dist/ui/organisms/SideNavbar/components/Sidebar/SidebarFooter.d.ts +15 -0
- package/dist/ui/organisms/SideNavbar/components/Sidebar/SidebarGroup.d.ts +20 -0
- package/dist/ui/organisms/SideNavbar/components/Sidebar/SidebarHeader.d.ts +13 -0
- package/dist/ui/organisms/SideNavbar/components/Sidebar/SidebarSlot.d.ts +40 -0
- package/dist/ui/organisms/SideNavbar/components/Sidebar/SidebarSlotContent.d.ts +29 -0
- package/dist/ui/organisms/SideNavbar/components/Sidebar/index.d.ts +7 -0
- package/dist/ui/organisms/SideNavbar/components/index.d.ts +7 -0
- package/dist/ui/organisms/SideNavbar/contexts/NavbarContext.d.ts +18 -0
- package/dist/ui/organisms/SideNavbar/contexts/SideNavbarConfigContext.d.ts +17 -0
- package/dist/ui/organisms/SideNavbar/contexts/SideNavbarStateContext.d.ts +17 -0
- package/dist/ui/organisms/SideNavbar/contexts/SideNavbarThemeContext.d.ts +17 -0
- package/dist/ui/organisms/SideNavbar/contexts/SideNavbarToggleContext.d.ts +8 -0
- package/dist/ui/organisms/SideNavbar/contexts/SidebarContext.d.ts +18 -0
- package/dist/ui/organisms/SideNavbar/contexts/SidebarSlotContext.d.ts +18 -0
- package/dist/ui/organisms/SideNavbar/contexts/index.d.ts +8 -0
- package/dist/ui/organisms/SideNavbar/hooks/useFocusManagement.d.ts +36 -0
- package/dist/ui/organisms/SideNavbar/hooks/useGroupState.d.ts +27 -0
- package/dist/ui/organisms/SideNavbar/hooks/useKeyboardShortcut.d.ts +56 -0
- package/dist/ui/organisms/SideNavbar/hooks/useNavbar.d.ts +15 -0
- package/dist/ui/organisms/SideNavbar/hooks/useResize.d.ts +68 -0
- package/dist/ui/organisms/SideNavbar/hooks/useResponsiveSidebar.d.ts +40 -0
- package/dist/ui/organisms/SideNavbar/hooks/useSideNavbar.d.ts +35 -0
- package/dist/ui/organisms/SideNavbar/hooks/useSideNavbarContent.d.ts +25 -0
- package/dist/ui/organisms/SideNavbar/hooks/useSideNavbarNavigation.d.ts +24 -0
- package/dist/ui/organisms/SideNavbar/hooks/useSidebar.d.ts +15 -0
- package/dist/ui/organisms/SideNavbar/index.d.ts +24 -0
- package/dist/ui/organisms/SideNavbar/providers/SideNavbarConfigProvider.d.ts +18 -0
- package/dist/ui/organisms/SideNavbar/providers/SideNavbarProvider.d.ts +26 -0
- package/dist/ui/organisms/SideNavbar/providers/SideNavbarStateProvider.d.ts +22 -0
- package/dist/ui/organisms/SideNavbar/providers/SideNavbarThemeProvider.d.ts +20 -0
- package/dist/ui/organisms/SideNavbar/providers/SidebarSlotProvider.d.ts +34 -0
- package/dist/ui/organisms/SideNavbar/providers/index.d.ts +5 -0
- package/dist/ui/organisms/SideNavbar/types/index.d.ts +555 -0
- package/dist/ui/organisms/SideNavbar/utils/index.d.ts +3 -0
- package/dist/ui/organisms/SideNavbar/utils/parseKeyboardShortcut.d.ts +63 -0
- package/dist/ui/organisms/SideNavbar/utils/parseWidth.d.ts +31 -0
- package/dist/ui/organisms/Sidebar/Sidebar.d.ts +7 -4
- package/dist/ui/organisms/Sidebar/SidebarGroup/SidebarGroup.d.ts +27 -0
- package/dist/ui/organisms/Sidebar/SidebarGroup/SidebarGroup.stories.d.ts +11 -0
- package/dist/ui/organisms/Sidebar/SidebarGroup/SidebarGroup.test.d.ts +1 -0
- package/dist/ui/organisms/Sidebar/SidebarHeader/SidebarHeader.d.ts +50 -0
- package/dist/ui/organisms/Sidebar/SidebarHeader/SidebarHeader.test.d.ts +1 -0
- package/dist/ui/organisms/Sidebar/SidebarItem/SidebarItem.d.ts +23 -0
- package/dist/ui/organisms/Sidebar/SidebarItem/SidebarItem.stories.d.ts +10 -0
- package/dist/ui/organisms/Sidebar/SidebarItem/SidebarItem.test.d.ts +1 -0
- package/dist/ui/organisms/Sidebar/index.d.ts +8 -0
- package/dist/ui/organisms/SplitSidebar/SplitSidebar.d.ts +197 -0
- package/dist/ui/organisms/SplitSidebar/SplitSidebar.stories.d.ts +15 -0
- package/dist/ui/organisms/SplitSidebar/components/SplitSidebarLazyContent.d.ts +41 -0
- package/dist/ui/organisms/SplitSidebar/components/SplitSidebarResizeHandle.d.ts +49 -0
- package/dist/ui/organisms/SplitSidebar/components/SplitSidebarToggle.d.ts +42 -0
- package/dist/ui/organisms/SplitSidebar/components/index.d.ts +6 -0
- package/dist/ui/organisms/SplitSidebar/hooks/index.d.ts +9 -0
- package/dist/ui/organisms/SplitSidebar/hooks/useFocusManagement.d.ts +36 -0
- package/dist/ui/organisms/SplitSidebar/hooks/useKeyboardShortcut.d.ts +56 -0
- package/dist/ui/organisms/SplitSidebar/hooks/useResize.d.ts +68 -0
- package/dist/ui/organisms/SplitSidebar/hooks/useResponsiveSidebar.d.ts +40 -0
- package/dist/ui/organisms/SplitSidebar/hooks/useSplitSidebar.d.ts +12 -0
- package/dist/ui/organisms/SplitSidebar/index.d.ts +6 -0
- package/dist/ui/organisms/SplitSidebar/utils/splitSidebarHelpers.d.ts +21 -0
- package/dist/ui/organisms/Stepper/Stepper.d.ts +40 -0
- package/dist/ui/organisms/Stepper/Stepper.stories.d.ts +20 -0
- package/dist/ui/organisms/Stepper/Stepper.test.d.ts +1 -0
- package/dist/ui/organisms/Stepper/index.d.ts +2 -0
- package/dist/ui/organisms/Table/Table.d.ts +85 -16
- package/dist/ui/organisms/Table/Table.stories.d.ts +21 -0
- package/dist/ui/organisms/Table/TableActions/TableActions.d.ts +31 -0
- package/dist/ui/organisms/Table/TableActions/TableActions.stories.d.ts +13 -0
- package/dist/ui/organisms/Table/TableActions/TableActions.test.d.ts +1 -0
- package/dist/ui/organisms/Table/TableActions.d.ts +13 -0
- package/dist/ui/organisms/Table/TableBody.d.ts +13 -0
- package/dist/ui/organisms/Table/TableCell.d.ts +14 -0
- package/dist/ui/organisms/Table/TableContext.d.ts +75 -0
- package/dist/ui/organisms/Table/TableEmptyState.d.ts +10 -0
- package/dist/ui/organisms/Table/TableFilters/TableFilters.d.ts +37 -0
- package/dist/ui/organisms/Table/TableFilters/TableFilters.stories.d.ts +13 -0
- package/dist/ui/organisms/Table/TableFilters/TableFilters.test.d.ts +1 -0
- package/dist/ui/organisms/Table/TableFilters.d.ts +12 -0
- package/dist/ui/organisms/Table/TableHeader.d.ts +11 -0
- package/dist/ui/organisms/Table/TableHeaderCell.d.ts +18 -0
- package/dist/ui/organisms/Table/TableHeaderRow.d.ts +9 -0
- package/dist/ui/organisms/Table/TablePagination/TablePagination.d.ts +29 -0
- package/dist/ui/organisms/Table/TablePagination/TablePagination.stories.d.ts +15 -0
- package/dist/ui/organisms/Table/TablePagination/TablePagination.test.d.ts +1 -0
- package/dist/ui/organisms/Table/TablePagination.d.ts +14 -0
- package/dist/ui/organisms/Table/TableProvider.d.ts +55 -0
- package/dist/ui/organisms/Table/TableRow.d.ts +15 -0
- package/dist/ui/organisms/Table/TableTypes.d.ts +8 -0
- package/dist/ui/organisms/Table/index.d.ts +30 -0
- package/dist/ui/organisms/Table/useColumnResizing.d.ts +39 -0
- package/dist/ui/organisms/Table/useVirtualScrolling.d.ts +35 -0
- package/dist/ui/organisms/Timeline/Timeline.d.ts +34 -0
- package/dist/ui/organisms/Timeline/Timeline.stories.d.ts +21 -0
- package/dist/ui/organisms/Timeline/Timeline.test.d.ts +1 -0
- package/dist/ui/organisms/Timeline/index.d.ts +2 -0
- package/dist/ui/organisms/Toast/Toast.d.ts +8 -0
- package/dist/ui/organisms/Toast/Toast.stories.d.ts +23 -0
- package/dist/ui/organisms/Toast/Toast.test.d.ts +1 -0
- package/dist/ui/organisms/Toast/ToastContainer.d.ts +5 -0
- package/dist/ui/organisms/Toast/ToastContext.d.ts +21 -0
- package/dist/ui/organisms/Toast/ToastProvider.d.ts +7 -0
- package/dist/ui/organisms/Toast/index.d.ts +15 -0
- package/dist/ui/organisms/Toast/useToast.d.ts +36 -0
- package/dist/ui/organisms/index.d.ts +13 -4
- package/dist/ui/patterns/DataTablePattern/DataTablePattern.d.ts +73 -0
- package/dist/ui/patterns/DataTablePattern/DataTablePattern.stories.d.ts +18 -0
- package/dist/ui/patterns/DataTablePattern/index.d.ts +1 -0
- package/dist/ui/patterns/FormWizardPattern/FormWizardPattern.d.ts +51 -0
- package/dist/ui/patterns/FormWizardPattern/FormWizardPattern.stories.d.ts +11 -0
- package/dist/ui/patterns/FormWizardPattern/index.d.ts +1 -0
- package/dist/ui/patterns/SearchAndFilterPattern/SearchAndFilterPattern.d.ts +65 -0
- package/dist/ui/patterns/SearchAndFilterPattern/SearchAndFilterPattern.stories.d.ts +13 -0
- package/dist/ui/patterns/SearchAndFilterPattern/index.d.ts +1 -0
- package/dist/ui/patterns/index.d.ts +3 -0
- package/dist/ui/playgrounds/AppBuilderPlayground.d.ts +8 -0
- package/dist/ui/playgrounds/AppBuilderPlayground.stories.d.ts +29 -0
- package/dist/ui/playgrounds/ColorsPlayground.d.ts +12 -0
- package/dist/ui/playgrounds/ColorsPlayground.stories.d.ts +35 -0
- package/dist/ui/playgrounds/ComponentPlayground.d.ts +16 -0
- package/dist/ui/playgrounds/CompositionPlayground.d.ts +16 -0
- package/dist/ui/playgrounds/PatternPlayground.d.ts +16 -0
- package/dist/ui/playgrounds/SpacingPlayground.d.ts +12 -0
- package/dist/ui/playgrounds/SpacingPlayground.stories.d.ts +29 -0
- package/dist/ui/playgrounds/StorybookIntegration.d.ts +36 -0
- package/dist/ui/playgrounds/ThemePlayground.d.ts +12 -0
- package/dist/ui/playgrounds/ThemePlayground.stories.d.ts +30 -0
- package/dist/ui/playgrounds/TypographyPlayground.d.ts +12 -0
- package/dist/ui/playgrounds/TypographyPlayground.stories.d.ts +23 -0
- package/dist/ui/playgrounds/components/AppsSlot.d.ts +14 -0
- package/dist/ui/playgrounds/components/BaseSlot/BaseSlot.d.ts +30 -0
- package/dist/ui/playgrounds/components/BaseSlot/index.d.ts +3 -0
- package/dist/ui/playgrounds/components/BaseSlot/useBaseSlot.d.ts +22 -0
- package/dist/ui/playgrounds/components/ContentLayout/ContentLayout.d.ts +23 -0
- package/dist/ui/playgrounds/components/ContentLayout/index.d.ts +2 -0
- package/dist/ui/playgrounds/components/FeaturesSlot.d.ts +8 -0
- package/dist/ui/playgrounds/components/SettingsSlot.d.ts +9 -0
- package/dist/ui/playgrounds/components/StartComponents/ComponentConfigDrawer.d.ts +17 -0
- package/dist/ui/playgrounds/components/StartComponents/StartComponentsCatalog.d.ts +73 -0
- package/dist/ui/playgrounds/components/StartComponents/drawer/SchemaFieldRenderer.d.ts +15 -0
- package/dist/ui/playgrounds/components/StartComponents/drawer/index.d.ts +6 -0
- package/dist/ui/playgrounds/components/StartComponents/errors/index.d.ts +27 -0
- package/dist/ui/playgrounds/components/StartComponents/factory/StartComponentFactory.d.ts +44 -0
- package/dist/ui/playgrounds/components/StartComponents/features/FeatureRegistry.d.ts +65 -0
- package/dist/ui/playgrounds/components/StartComponents/features/featureDefinitions.d.ts +31 -0
- package/dist/ui/playgrounds/components/StartComponents/features/index.d.ts +7 -0
- package/dist/ui/playgrounds/components/StartComponents/index.d.ts +10 -0
- package/dist/ui/playgrounds/components/StartComponents/preview/ComponentRenderer.d.ts +21 -0
- package/dist/ui/playgrounds/components/StartComponents/preview/LiveStartComponentsPreview.d.ts +18 -0
- package/dist/ui/playgrounds/components/StartComponents/preview/SlotHighlighter.d.ts +14 -0
- package/dist/ui/playgrounds/components/StartComponents/preview/hooks/index.d.ts +4 -0
- package/dist/ui/playgrounds/components/StartComponents/preview/hooks/usePreviewInteractivity.d.ts +19 -0
- package/dist/ui/playgrounds/components/StartComponents/preview/hooks/usePreviewSync.d.ts +20 -0
- package/dist/ui/playgrounds/components/StartComponents/preview/index.d.ts +7 -0
- package/dist/ui/playgrounds/components/StartComponents/registry/StartComponentRegistry.d.ts +31 -0
- package/dist/ui/playgrounds/components/StartComponents/registry/index.d.ts +7 -0
- package/dist/ui/playgrounds/components/StartComponents/registry/registerDefaults.d.ts +15 -0
- package/dist/ui/playgrounds/components/StartComponents/schemas/card.schema.d.ts +8 -0
- package/dist/ui/playgrounds/components/StartComponents/schemas/container.schema.d.ts +8 -0
- package/dist/ui/playgrounds/components/StartComponents/schemas/footer.schema.d.ts +8 -0
- package/dist/ui/playgrounds/components/StartComponents/schemas/header.schema.d.ts +8 -0
- package/dist/ui/playgrounds/components/StartComponents/schemas/index.d.ts +10 -0
- package/dist/ui/playgrounds/components/StartComponents/schemas/sideNavbar.schema.d.ts +8 -0
- package/dist/ui/playgrounds/components/StartComponents/shared/SyncManager.d.ts +36 -0
- package/dist/ui/playgrounds/components/StartComponents/shared/Tooltip.d.ts +15 -0
- package/dist/ui/playgrounds/components/StartComponents/shared/animations.d.ts +43 -0
- package/dist/ui/playgrounds/components/StartComponents/shared/index.d.ts +10 -0
- package/dist/ui/playgrounds/components/StartComponents/shared/useAccessibility.d.ts +53 -0
- package/dist/ui/playgrounds/components/StartComponents/shared/useKeyboardShortcuts.d.ts +19 -0
- package/dist/ui/playgrounds/components/StartComponents/shared/useTooltip.d.ts +21 -0
- package/dist/ui/playgrounds/components/StartComponents/slots/SlotRegistry.d.ts +81 -0
- package/dist/ui/playgrounds/components/StartComponents/slots/index.d.ts +7 -0
- package/dist/ui/playgrounds/components/StartComponents/slots/slotDefinitions.d.ts +32 -0
- package/dist/ui/playgrounds/components/StartComponents/types.d.ts +169 -0
- package/dist/ui/playgrounds/components/StartComponentsSlot/StartComponentsSlot.d.ts +17 -0
- package/dist/ui/playgrounds/components/StartComponentsSlot/hooks/index.d.ts +4 -0
- package/dist/ui/playgrounds/components/StartComponentsSlot/hooks/useComponentTree.d.ts +31 -0
- package/dist/ui/playgrounds/components/StartComponentsSlot/hooks/useSlotManagement.d.ts +30 -0
- package/dist/ui/playgrounds/components/StartComponentsSlot/slot/ComponentFilters.d.ts +22 -0
- package/dist/ui/playgrounds/components/StartComponentsSlot/slot/ComponentTree.d.ts +21 -0
- package/dist/ui/playgrounds/components/StartComponentsSlot/slot/SlotVisualization.d.ts +18 -0
- package/dist/ui/playgrounds/components/StartComponentsSlot/slot/hooks/usePersistentFilters.d.ts +10 -0
- package/dist/ui/playgrounds/components/StartComponentsSlot/slot/index.d.ts +6 -0
- package/dist/ui/playgrounds/components/TemplatesSlot.d.ts +10 -0
- package/dist/ui/playgrounds/components/index.d.ts +8 -0
- package/dist/ui/playgrounds/hooks/index.d.ts +2 -0
- package/dist/ui/playgrounds/hooks/useAppBuilderNavigation.d.ts +28 -0
- package/dist/ui/playgrounds/hooks/usePlaygroundStateManager.d.ts +31 -0
- package/dist/ui/playgrounds/index.d.ts +13 -0
- package/dist/ui/playgrounds/shared/PlaygroundControls/CodeDisplay.d.ts +27 -0
- package/dist/ui/playgrounds/shared/PlaygroundControls/ColorPicker.d.ts +27 -0
- package/dist/ui/playgrounds/shared/PlaygroundControls/ControlGroup.d.ts +31 -0
- package/dist/ui/playgrounds/shared/PlaygroundControls/SliderControl.d.ts +33 -0
- package/dist/ui/playgrounds/shared/PlaygroundControls/TokenSelector.d.ts +36 -0
- package/dist/ui/playgrounds/shared/PlaygroundControls/index.d.ts +9 -0
- package/dist/ui/playgrounds/shared/PlaygroundHeader.d.ts +30 -0
- package/dist/ui/playgrounds/shared/PlaygroundLayout.d.ts +30 -0
- package/dist/ui/playgrounds/shared/PlaygroundPreview.d.ts +20 -0
- package/dist/ui/playgrounds/shared/PlaygroundSidebar.d.ts +21 -0
- package/dist/ui/playgrounds/shared/components/ComparisonView.d.ts +27 -0
- package/dist/ui/playgrounds/shared/components/ValidationFeedback.d.ts +20 -0
- package/dist/ui/playgrounds/shared/components/index.d.ts +7 -0
- package/dist/ui/playgrounds/shared/hooks/index.d.ts +11 -0
- package/dist/ui/playgrounds/shared/hooks/usePlaygroundCode.d.ts +33 -0
- package/dist/ui/playgrounds/shared/hooks/usePlaygroundDebounce.d.ts +11 -0
- package/dist/ui/playgrounds/shared/hooks/usePlaygroundExport.d.ts +32 -0
- package/dist/ui/playgrounds/shared/hooks/usePlaygroundHistory.d.ts +29 -0
- package/dist/ui/playgrounds/shared/hooks/usePlaygroundState.d.ts +34 -0
- package/dist/ui/playgrounds/shared/hooks/usePlaygroundURL.d.ts +32 -0
- package/dist/ui/playgrounds/shared/index.d.ts +12 -0
- package/dist/ui/playgrounds/shared/utils/codeGenerator.d.ts +32 -0
- package/dist/ui/playgrounds/shared/utils/contrastCalculator.d.ts +29 -0
- package/dist/ui/playgrounds/shared/utils/index.d.ts +8 -0
- package/dist/ui/playgrounds/shared/utils/playgroundValidation.d.ts +29 -0
- package/dist/ui/playgrounds/types/slot.types.d.ts +67 -0
- package/dist/ui/providers/AdvancedThemeProvider.d.ts +52 -0
- package/dist/ui/providers/AppProvider.d.ts +86 -0
- package/dist/ui/providers/AppProvider.stories.d.ts +23 -0
- package/dist/ui/providers/ConfigProvider.d.ts +123 -0
- package/dist/ui/providers/ThemeProvider.d.ts +1 -1
- package/dist/ui/providers/index.d.ts +8 -0
- package/dist/ui/shared/errors/RegistryErrors.d.ts +15 -0
- package/dist/ui/shared/errors/index.d.ts +4 -0
- package/dist/ui/shared/index.d.ts +7 -0
- package/dist/ui/shared/patterns/BaseRegistry.d.ts +153 -0
- package/dist/ui/shared/patterns/CategorizedRegistry.d.ts +31 -0
- package/dist/ui/shared/patterns/index.d.ts +5 -0
- package/dist/ui/shared/utils/comparators.d.ts +31 -0
- package/dist/ui/shared/utils/idGenerator.d.ts +54 -0
- package/dist/ui/shared/utils/index.d.ts +5 -0
- package/dist/ui/shared/validation/globalConfigSchemas.d.ts +507 -0
- package/dist/ui/shared/validation/index.d.ts +6 -0
- package/dist/ui/shared/validation/schemas.d.ts +92 -0
- package/dist/ui/shared/validation/startComponentSchemas.d.ts +881 -0
- package/dist/ui/stories/App/AppBuilder.stories.d.ts +35 -0
- package/dist/ui/stories/App/ComponentBuilder.stories.d.ts +9 -0
- package/dist/ui/stories/App/TokenBuilder.stories.d.ts +9 -0
- package/dist/ui/stories/App/index.d.ts +9 -0
- package/dist/ui/templates/DashboardLayout/DashboardLayout.d.ts +55 -0
- package/dist/ui/templates/DashboardLayout/DashboardLayout.stories.d.ts +14 -0
- package/dist/ui/templates/DashboardLayout/index.d.ts +1 -0
- package/dist/ui/templates/index.d.ts +1 -0
- package/dist/ui/themes/ThemeBuilder.d.ts +28 -0
- package/dist/ui/themes/ThemeRegistry.d.ts +55 -0
- package/dist/ui/themes/index.d.ts +9 -0
- package/dist/ui/themes/types.d.ts +48 -0
- package/dist/ui/themes/utils.d.ts +21 -0
- package/dist/ui/tokens/TokenVisualizations.d.ts +41 -0
- package/dist/ui/tokens/animations.d.ts +65 -0
- package/dist/ui/tokens/borders.d.ts +61 -0
- package/dist/ui/tokens/colors.d.ts +27 -3
- package/dist/ui/tokens/gradients.d.ts +55 -0
- package/dist/ui/tokens/index.d.ts +31 -0
- package/dist/ui/tokens/opacity.d.ts +51 -0
- package/dist/ui/tokens/radius.d.ts +45 -0
- package/dist/ui/tokens/shadows.d.ts +42 -0
- package/dist/ui/tokens/sidebar.d.ts +24 -0
- package/dist/ui/tokens/themes/dark.d.ts +26 -26
- package/dist/ui/tokens/themes/light.d.ts +26 -26
- package/dist/ui/tokens/tokens.factory.d.ts +42 -0
- package/dist/ui/tokens/typography.d.ts +22 -0
- package/dist/ui/tokens/versioning.d.ts +59 -0
- package/dist/ui/tokens/z-index.d.ts +44 -0
- package/dist/ui/tools/AppBuilder/AppBuilder.d.ts +24 -0
- package/dist/ui/tools/AppBuilder/ComponentPalette.d.ts +7 -0
- package/dist/ui/tools/AppBuilder/ComponentPropsEditor.d.ts +7 -0
- package/dist/ui/tools/AppBuilder/DataEditor.d.ts +7 -0
- package/dist/ui/tools/AppBuilder/ErrorBoundary.d.ts +22 -0
- package/dist/ui/tools/AppBuilder/ExportManager.d.ts +33 -0
- package/dist/ui/tools/AppBuilder/FeatureEditor.d.ts +7 -0
- package/dist/ui/tools/AppBuilder/FeatureManager.d.ts +7 -0
- package/dist/ui/tools/AppBuilder/LayoutEditor.d.ts +7 -0
- package/dist/ui/tools/AppBuilder/Preview.d.ts +8 -0
- package/dist/ui/tools/AppBuilder/codeGenerators/AppCodeGenerator.d.ts +10 -0
- package/dist/ui/tools/AppBuilder/codeGenerators/ContextCodeGenerator.d.ts +18 -0
- package/dist/ui/tools/AppBuilder/codeGenerators/FeatureCodeGenerator.d.ts +10 -0
- package/dist/ui/tools/AppBuilder/components/AddPropDialog.d.ts +13 -0
- package/dist/ui/tools/AppBuilder/components/AppBuilderCanvas.d.ts +17 -0
- package/dist/ui/tools/AppBuilder/components/AppBuilderHeader.d.ts +18 -0
- package/dist/ui/tools/AppBuilder/components/AppBuilderProperties.d.ts +15 -0
- package/dist/ui/tools/AppBuilder/components/AppBuilderSkeleton.d.ts +24 -0
- package/dist/ui/tools/AppBuilder/components/AppBuilderToolbar.d.ts +19 -0
- package/dist/ui/tools/AppBuilder/components/ComponentRenderer.d.ts +26 -0
- package/dist/ui/tools/AppBuilder/components/ContextProviderSelector.d.ts +17 -0
- package/dist/ui/tools/AppBuilder/components/FeatureConfigSidebar.d.ts +18 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/ColorsConfig.d.ts +13 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/GlobalConfigPreview.d.ts +13 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/GlobalConfigSidebar.d.ts +19 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/RadiusConfig.d.ts +13 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/ShadowsConfig.d.ts +13 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/SpacingConfig.d.ts +13 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/StartComponentsConfig.d.ts +12 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/TypographyConfig.d.ts +13 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/configurators/ColorPaletteConfigurator.d.ts +10 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/configurators/FontSizeConfigurator.d.ts +10 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/configurators/FontWeightConfigurator.d.ts +10 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/configurators/LineHeightConfigurator.d.ts +10 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/configurators/RadiusScaleConfigurator.d.ts +10 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/configurators/SemanticColorsConfigurator.d.ts +10 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/configurators/ShadowsGridConfigurator.d.ts +10 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/configurators/SpacingScaleConfigurator.d.ts +10 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/content/ColorsContent.d.ts +11 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/content/RadiusContent.d.ts +11 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/content/ShadowsContent.d.ts +11 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/content/SpacingContent.d.ts +11 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/content/StartComponentsContent.d.ts +13 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/content/TypographyContent.d.ts +11 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/content/index.d.ts +8 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/factory/ConfiguratorFactory.d.ts +7 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/factory/ContentComponentFactory.d.ts +6 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/factory/PreviewFactory.d.ts +6 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/factory/index.d.ts +3 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/index.d.ts +14 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/ColorsPreview.d.ts +13 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/RadiusPreview.d.ts +12 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/ShadowsPreview.d.ts +12 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/SpacingPreview.d.ts +12 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/StartComponentsPreview.d.ts +13 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/TypographyPreview.d.ts +15 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/registry/PreviewSectionFactory.d.ts +33 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/registry/PreviewSectionRegistry.d.ts +69 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/registry/index.d.ts +3 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/registry/registerPreviewSections.d.ts +12 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/sections/CombinedExamplePreview.d.ts +11 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/sections/FontFamiliesPreview.d.ts +12 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/sections/FontSizesPreview.d.ts +12 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/sections/FontWeightsPreview.d.ts +12 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/sections/LineHeightsPreview.d.ts +12 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/sections/colors/PalettePreview.d.ts +11 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/sections/colors/SemanticColorsPreview.d.ts +11 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/sections/colors/index.d.ts +4 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/sections/index.d.ts +10 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/sections/radius/RadiusScalePreview.d.ts +13 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/sections/radius/RadiusUsagePreview.d.ts +11 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/sections/radius/index.d.ts +4 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/sections/shadows/ShadowsGridPreview.d.ts +13 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/sections/shadows/ShadowsUsagePreview.d.ts +11 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/sections/shadows/index.d.ts +4 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/sections/spacing/SpacingModesPreview.d.ts +14 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/sections/spacing/SpacingScalePreview.d.ts +18 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/sections/spacing/index.d.ts +4 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/shared/ColorSwatch.d.ts +15 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/shared/PreviewCard.d.ts +16 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/shared/RadiusShape.d.ts +17 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/shared/ShadowCard.d.ts +16 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/shared/SpacingBar.d.ts +23 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/shared/SpacingVisualizer.d.ts +19 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/shared/TokenValue.d.ts +14 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/shared/index.d.ts +14 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/utils/index.d.ts +8 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/utils/radiusFormatter.d.ts +30 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/utils/shadowFormatter.d.ts +31 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/utils/spacingFormatter.d.ts +30 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/previews/utils/typographyFormatter.d.ts +46 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/registry/ConfiguratorRegistry.d.ts +13 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/registry/ContentComponentRegistry.d.ts +14 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/registry/PreviewRegistry.d.ts +14 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/registry/index.d.ts +4 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/registry/registerDefaults.d.ts +5 -0
- package/dist/ui/tools/AppBuilder/components/GlobalConfig/registry/types.d.ts +47 -0
- package/dist/ui/tools/AppBuilder/components/SortableComponentList.d.ts +17 -0
- package/dist/ui/tools/AppBuilder/components/SortableFeatureList.d.ts +15 -0
- package/dist/ui/tools/AppBuilder/components/index.d.ts +12 -0
- package/dist/ui/tools/AppBuilder/hooks/index.d.ts +3 -0
- package/dist/ui/tools/AppBuilder/hooks/useAccordionState.d.ts +16 -0
- package/dist/ui/tools/AppBuilder/hooks/useAppBuilder.d.ts +65 -0
- package/dist/ui/tools/AppBuilder/hooks/useGlobalConfigForm.d.ts +27 -0
- package/dist/ui/tools/AppBuilder/hooks/useKeyboardShortcuts.d.ts +25 -0
- package/dist/ui/tools/AppBuilder/hooks/useUndoRedo.d.ts +23 -0
- package/dist/ui/tools/AppBuilder/index.d.ts +18 -0
- package/dist/ui/tools/AppBuilder/templates/FeatureTemplates.d.ts +39 -0
- package/dist/ui/tools/AppBuilder/types.d.ts +249 -0
- package/dist/ui/tools/AppBuilder/utils/DataTemplates.d.ts +22 -0
- package/dist/ui/tools/AppBuilder/utils/DataValidator.d.ts +23 -0
- package/dist/ui/tools/AppBuilder/utils/GlobalConfigCache.d.ts +41 -0
- package/dist/ui/tools/AppBuilder/utils/GlobalConfigDefaults.d.ts +28 -0
- package/dist/ui/tools/AppBuilder/utils/GlobalConfigValidation.d.ts +19 -0
- package/dist/ui/tools/AppBuilder/utils/ProviderIntegration.d.ts +38 -0
- package/dist/ui/tools/AppBuilder/utils/RegistryIntegration.d.ts +31 -0
- package/dist/ui/tools/AppBuilder/utils/StartComponentsPopulator.d.ts +19 -0
- package/dist/ui/tools/AppBuilder/utils/StorageManager.d.ts +45 -0
- package/dist/ui/tools/AppBuilder/utils/Validation.d.ts +26 -0
- package/dist/ui/tools/CSSConfigurator/CSSConfigurator.d.ts +16 -0
- package/dist/ui/tools/CSSConfigurator/index.d.ts +1 -0
- package/dist/ui/tools/DesignSystemConfigurator/DesignSystemConfigurator.d.ts +22 -0
- package/dist/ui/tools/DesignSystemConfigurator/StorybookIntegration.d.ts +20 -0
- package/dist/ui/tools/DesignSystemConfigurator/components/CSSCodeGenerator/CSSCodeGenerator.d.ts +10 -0
- package/dist/ui/tools/DesignSystemConfigurator/components/CSSCodeGenerator/CodePreview.d.ts +10 -0
- package/dist/ui/tools/DesignSystemConfigurator/components/CSSCodeGenerator/ExportOptions.d.ts +11 -0
- package/dist/ui/tools/DesignSystemConfigurator/components/CSSCodeGenerator/index.d.ts +4 -0
- package/dist/ui/tools/DesignSystemConfigurator/components/ComponentConfigurator/ComponentConfigurator.d.ts +15 -0
- package/dist/ui/tools/DesignSystemConfigurator/components/ComponentConfigurator/ComponentCustomizer.d.ts +11 -0
- package/dist/ui/tools/DesignSystemConfigurator/components/ComponentConfigurator/ComponentSelector.d.ts +13 -0
- package/dist/ui/tools/DesignSystemConfigurator/components/ComponentConfigurator/index.d.ts +4 -0
- package/dist/ui/tools/DesignSystemConfigurator/components/ThemeConfigurator/ThemeConfigurator.d.ts +14 -0
- package/dist/ui/tools/DesignSystemConfigurator/components/ThemeConfigurator/index.d.ts +2 -0
- package/dist/ui/tools/DesignSystemConfigurator/components/TokenConfigurator/ColorTokenEditor.d.ts +11 -0
- package/dist/ui/tools/DesignSystemConfigurator/components/TokenConfigurator/SpacingTokenEditor.d.ts +11 -0
- package/dist/ui/tools/DesignSystemConfigurator/components/TokenConfigurator/TokenConfigurator.d.ts +11 -0
- package/dist/ui/tools/DesignSystemConfigurator/components/TokenConfigurator/TokenPreview.d.ts +10 -0
- package/dist/ui/tools/DesignSystemConfigurator/components/TokenConfigurator/TypographyTokenEditor.d.ts +11 -0
- package/dist/ui/tools/DesignSystemConfigurator/components/TokenConfigurator/index.d.ts +6 -0
- package/dist/ui/tools/DesignSystemConfigurator/hooks/useConfiguratorState.d.ts +21 -0
- package/dist/ui/tools/DesignSystemConfigurator/index.d.ts +10 -0
- package/dist/ui/tools/DesignSystemConfigurator/types.d.ts +147 -0
- package/dist/ui/tools/DesignSystemConfigurator/utils/configSerializer.d.ts +18 -0
- package/dist/ui/tools/DeveloperJourney/ComponentAssistant.d.ts +16 -0
- package/dist/ui/tools/DeveloperJourney/index.d.ts +6 -0
- package/dist/ui/tools/ThemeBuilder.d.ts +12 -0
- package/dist/ui/tools/ThemeBuilder.stories.d.ts +11 -0
- package/dist/ui/tools/index.d.ts +10 -0
- package/dist/ui/utilities/Portal/Portal.d.ts +30 -0
- package/dist/ui/utilities/Portal/Portal.stories.d.ts +12 -0
- package/dist/ui/utilities/Portal/index.d.ts +1 -0
- package/dist/ui/utilities/index.d.ts +1 -0
- package/dist/ui/utils/cn.d.ts +40 -0
- package/dist/ui/utils/css-variables.d.ts +55 -0
- package/dist/ui/utils/cva.d.ts +68 -0
- package/dist/ui/utils/index.d.ts +8 -0
- package/dist/ui/utils/tailwind-safelist.d.ts +43 -0
- package/dist/ui/utils/variants.d.ts +83 -0
- package/package.json +125 -8
- package/src/app.tsx +48 -0
- package/src/docs/ComponentStatus.mdx +192 -0
- package/src/docs/DesignSystem.mdx +121 -0
- package/src/docs/EventCatalog.mdx +253 -0
- package/src/docs/GettingStarted.mdx +284 -0
- package/src/docs/StateCatalog.mdx +301 -0
- package/src/docs/components/ComponentStatusTable.tsx +184 -0
- package/src/docs/guides/Accessibility.mdx +402 -0
- package/src/docs/guides/BestPractices.mdx +315 -0
- package/src/docs/guides/ComponentComposition.mdx +381 -0
- package/src/docs/guides/MigrationGuide.mdx +297 -0
- package/src/docs/guides/Performance.mdx +206 -0
- package/src/main.tsx +23 -13
- package/src/setupTests.ts +32 -0
- package/src/style.css +11 -30
- package/src/styles/index.css +65 -0
- package/src/styles/primitives/animations.css +286 -0
- package/src/styles/primitives/colors.css +343 -0
- package/src/styles/primitives/radius.css +93 -0
- package/src/styles/primitives/shadows.css +122 -0
- package/src/styles/primitives/spacing.css +105 -0
- package/src/styles/primitives/typography.css +187 -0
- package/src/styles/semantic/borders.css +106 -0
- package/src/styles/semantic/colors.css +218 -0
- package/src/styles/semantic/surfaces.css +227 -0
- package/src/styles/themes/base.css +237 -0
- package/src/styles/themes/dark.css +295 -0
- package/src/styles/themes/index.css +20 -0
- package/src/styles/themes/light.css +186 -0
- package/src/styles/themes/variants/creative.css +168 -0
- package/src/styles/themes/variants/minimal.css +187 -0
- package/src/styles/themes/variants/tech.css +123 -0
- package/src/styles/utilities/animations.css +200 -0
- package/src/styles/utilities/sr-only.css +46 -0
- package/src/ui/a11y/AccessibilityStories.tsx +407 -0
- package/src/ui/atoms/Avatar/Avatar.stories.tsx +377 -0
- package/src/ui/atoms/Avatar/Avatar.test.tsx +233 -0
- package/src/ui/atoms/Avatar/Avatar.tsx +135 -0
- package/src/ui/atoms/Avatar/AvatarGroup.stories.tsx +302 -0
- package/src/ui/atoms/Avatar/AvatarGroup.tsx +97 -0
- package/src/ui/atoms/Avatar/index.ts +11 -0
- package/src/ui/atoms/Badge/Badge.stories.tsx +250 -48
- package/src/ui/atoms/Badge/Badge.test.tsx +134 -45
- package/src/ui/atoms/Badge/Badge.tsx +127 -34
- package/src/ui/atoms/Button/Button.stories.tsx +479 -1
- package/src/ui/atoms/Button/Button.test.tsx +233 -0
- package/src/ui/atoms/Button/Button.tsx +241 -134
- package/src/ui/atoms/Checkbox/Checkbox.stories.tsx +619 -12
- package/src/ui/atoms/Checkbox/Checkbox.test.tsx +103 -0
- package/src/ui/atoms/Checkbox/Checkbox.tsx +97 -29
- package/src/ui/atoms/Chip/Chip.stories.tsx +533 -0
- package/src/ui/atoms/Chip/Chip.test.tsx +173 -0
- package/src/ui/atoms/Chip/Chip.tsx +224 -0
- package/src/ui/atoms/Chip/index.ts +2 -0
- package/src/ui/atoms/Collapsible/Collapsible.stories.tsx +237 -3
- package/src/ui/atoms/Collapsible/Collapsible.test.tsx +36 -24
- package/src/ui/atoms/Collapsible/Collapsible.tsx +21 -2
- package/src/ui/atoms/ErrorMessage/ErrorMessage.stories.tsx +59 -2
- package/src/ui/atoms/ErrorMessage/ErrorMessage.tsx +11 -20
- package/src/ui/atoms/Info/Info.stories.tsx +147 -4
- package/src/ui/atoms/Info/Info.test.tsx +45 -0
- package/src/ui/atoms/Info/Info.tsx +31 -22
- package/src/ui/atoms/Input/Input.stories.tsx +473 -0
- package/src/ui/atoms/Input/Input.test.tsx +190 -36
- package/src/ui/atoms/Input/Input.tsx +331 -68
- package/src/ui/atoms/Label/Label.stories.tsx +227 -2
- package/src/ui/atoms/Label/Label.tsx +38 -18
- package/src/ui/atoms/NavLink/NavLink.accessibility.test.tsx +131 -0
- package/src/ui/atoms/NavLink/NavLink.stories.tsx +208 -46
- package/src/ui/atoms/NavLink/NavLink.test.tsx +239 -31
- package/src/ui/atoms/NavLink/NavLink.tsx +264 -51
- package/src/ui/atoms/NavLink/hooks/useNavLink.ts +109 -0
- package/src/ui/atoms/NavLink/index.ts +13 -0
- package/src/ui/atoms/NavLink/types.ts +71 -0
- package/src/ui/atoms/Progress/Progress.css +17 -0
- package/src/ui/atoms/Progress/Progress.stories.tsx +255 -0
- package/src/ui/atoms/Progress/Progress.test.tsx +134 -0
- package/src/ui/atoms/Progress/Progress.tsx +179 -0
- package/src/ui/atoms/Radio/Radio.stories.tsx +819 -24
- package/src/ui/atoms/Radio/Radio.tsx +67 -28
- package/src/ui/atoms/Select/Select.stories.tsx +678 -51
- package/src/ui/atoms/Select/Select.test.tsx +162 -46
- package/src/ui/atoms/Select/Select.tsx +260 -51
- package/src/ui/atoms/Separator/Separator.stories.tsx +230 -0
- package/src/ui/atoms/Separator/Separator.test.tsx +34 -0
- package/src/ui/atoms/Separator/Separator.tsx +82 -0
- package/src/ui/atoms/Separator/index.ts +2 -0
- package/src/ui/atoms/Skeleton/Skeleton.stories.tsx +137 -0
- package/src/ui/atoms/Skeleton/Skeleton.test.tsx +2 -1
- package/src/ui/atoms/Skeleton/Skeleton.tsx +27 -10
- package/src/ui/atoms/Slider/Slider.stories.tsx +494 -0
- package/src/ui/atoms/Slider/Slider.test.tsx +53 -0
- package/src/ui/atoms/Slider/Slider.tsx +351 -0
- package/src/ui/atoms/Slider/index.ts +2 -0
- package/src/ui/atoms/Spinner/Spinner.stories.tsx +210 -0
- package/src/ui/atoms/Spinner/Spinner.test.tsx +35 -0
- package/src/ui/atoms/Spinner/Spinner.tsx +88 -0
- package/src/ui/atoms/Switch/Switch.stories.tsx +414 -0
- package/src/ui/atoms/Switch/Switch.test.tsx +90 -0
- package/src/ui/atoms/Switch/Switch.tsx +212 -0
- package/src/ui/atoms/Switch/index.ts +2 -0
- package/src/ui/atoms/Text/Text.stories.tsx +285 -4
- package/src/ui/atoms/Text/Text.test.tsx +48 -31
- package/src/ui/atoms/Text/Text.tsx +57 -9
- package/src/ui/atoms/Textarea/Textarea.stories.tsx +481 -20
- package/src/ui/atoms/Textarea/Textarea.tsx +58 -27
- package/src/ui/atoms/Tooltip/Tooltip.stories.tsx +276 -0
- package/src/ui/atoms/Tooltip/Tooltip.tsx +171 -19
- package/src/ui/atoms/__tests__/regression.test.tsx +253 -0
- package/src/ui/atoms/index.ts +32 -6
- package/src/ui/devtools/ContextDevTools.tsx +192 -0
- package/src/ui/extensions/ExtensionRegistry.ts +87 -0
- package/src/ui/extensions/flow/MIGRATION_STORIES.md +183 -0
- package/src/ui/extensions/flow/PLAYGROUND_GUIDE.md +267 -0
- package/src/ui/extensions/flow/README.md +204 -0
- package/src/ui/extensions/flow/atoms/FlowHandle.test.tsx +43 -0
- package/src/ui/extensions/flow/atoms/FlowHandle.tsx +120 -0
- package/src/ui/extensions/flow/atoms/FlowNodeWrapper.tsx +140 -0
- package/src/ui/extensions/flow/atoms/index.ts +8 -0
- package/src/ui/extensions/flow/components/AddNodeButton.tsx +95 -0
- package/src/ui/extensions/flow/components/BackgroundConfigPanel.tsx +427 -0
- package/src/ui/extensions/flow/components/CodePreview.tsx +143 -0
- package/src/ui/extensions/flow/components/DatasetSelector.tsx +277 -0
- package/src/ui/extensions/flow/components/DragNDropSidebar.tsx +118 -0
- package/src/ui/extensions/flow/components/EdgeEditor.test.tsx +151 -0
- package/src/ui/extensions/flow/components/EdgeEditor.tsx +462 -0
- package/src/ui/extensions/flow/components/EdgeTypesPanel.tsx +263 -0
- package/src/ui/extensions/flow/components/ExportPanel.tsx +463 -0
- package/src/ui/extensions/flow/components/FloatingEdgesCheckbox.tsx +40 -0
- package/src/ui/extensions/flow/components/HandlePositionsDropdown.tsx +48 -0
- package/src/ui/extensions/flow/components/LayoutApplier.tsx +56 -0
- package/src/ui/extensions/flow/components/LayoutConfigPanel.tsx +258 -0
- package/src/ui/extensions/flow/components/NodeEditor.test.tsx +153 -0
- package/src/ui/extensions/flow/components/NodeEditor.tsx +485 -0
- package/src/ui/extensions/flow/components/NodeTypesPanel.tsx +255 -0
- package/src/ui/extensions/flow/components/NodesEdgesTabContent.tsx +267 -0
- package/src/ui/extensions/flow/components/PlaygroundBreadcrumbs.tsx +60 -0
- package/src/ui/extensions/flow/components/PlaygroundCanvas.tsx +506 -0
- package/src/ui/extensions/flow/components/PlaygroundCanvasFooter.tsx +160 -0
- package/src/ui/extensions/flow/components/PlaygroundDevTools.tsx +316 -0
- package/src/ui/extensions/flow/components/PlaygroundErrorBoundary.tsx +121 -0
- package/src/ui/extensions/flow/components/PlaygroundHeader.tsx +177 -0
- package/src/ui/extensions/flow/components/PlaygroundLayout.tsx +161 -0
- package/src/ui/extensions/flow/components/PlaygroundOnboarding.tsx +305 -0
- package/src/ui/extensions/flow/components/PlaygroundSearch.tsx +249 -0
- package/src/ui/extensions/flow/components/PlaygroundSidebar.tsx +80 -0
- package/src/ui/extensions/flow/components/PlaygroundSidebarContent.tsx +110 -0
- package/src/ui/extensions/flow/components/PlaygroundTabs.tsx +240 -0
- package/src/ui/extensions/flow/components/ReactFlowPropsPanel.tsx +379 -0
- package/src/ui/extensions/flow/components/SettingsPanel.tsx +140 -0
- package/src/ui/extensions/flow/components/ViewportLogger.tsx +67 -0
- package/src/ui/extensions/flow/components/index.ts +70 -0
- package/src/ui/extensions/flow/context/FlowEventContext.tsx +251 -0
- package/src/ui/extensions/flow/context/FlowPerformanceContext.tsx +246 -0
- package/src/ui/extensions/flow/context/FlowStyleContext.tsx +171 -0
- package/src/ui/extensions/flow/context/PlaygroundContext.tsx +415 -0
- package/src/ui/extensions/flow/context/index.ts +17 -0
- package/src/ui/extensions/flow/factories/FlowFactory.ts +142 -0
- package/src/ui/extensions/flow/factories/builders/EdgeBuilder.ts +185 -0
- package/src/ui/extensions/flow/factories/builders/NodeBuilder.ts +172 -0
- package/src/ui/extensions/flow/factories/index.ts +13 -0
- package/src/ui/extensions/flow/hooks/index.ts +30 -0
- package/src/ui/extensions/flow/hooks/useAutoLayout.ts +49 -0
- package/src/ui/extensions/flow/hooks/useFlowActions.ts +71 -0
- package/src/ui/extensions/flow/hooks/useFlowEvents.ts +82 -0
- package/src/ui/extensions/flow/hooks/useFlowPerformance.ts +101 -0
- package/src/ui/extensions/flow/hooks/useFlowSelection.ts +201 -0
- package/src/ui/extensions/flow/hooks/useFlowState.ts +103 -0
- package/src/ui/extensions/flow/hooks/useFlowStyles.ts +119 -0
- package/src/ui/extensions/flow/hooks/useFlowUtils.ts +143 -0
- package/src/ui/extensions/flow/hooks/useFlowValidation.ts +60 -0
- package/src/ui/extensions/flow/hooks/useFlowViewport.ts +182 -0
- package/src/ui/extensions/flow/hooks/useFlowVirtualization.ts +92 -0
- package/src/ui/extensions/flow/hooks/useKeyboardShortcuts.test.ts +122 -0
- package/src/ui/extensions/flow/hooks/useKeyboardShortcuts.ts +96 -0
- package/src/ui/extensions/flow/hooks/useNodeSelection.ts +36 -0
- package/src/ui/extensions/flow/hooks/usePlaygroundHistory.test.ts +109 -0
- package/src/ui/extensions/flow/hooks/usePlaygroundHistory.ts +112 -0
- package/src/ui/extensions/flow/hooks/usePlaygroundKeyboardNavigation.ts +148 -0
- package/src/ui/extensions/flow/index.ts +81 -0
- package/src/ui/extensions/flow/molecules/CardNode.tsx +148 -0
- package/src/ui/extensions/flow/molecules/ColorSelectorNode.tsx +117 -0
- package/src/ui/extensions/flow/molecules/CustomEdge.test.tsx +168 -0
- package/src/ui/extensions/flow/molecules/CustomEdge.tsx +345 -0
- package/src/ui/extensions/flow/molecules/CustomNode.test.tsx +83 -0
- package/src/ui/extensions/flow/molecules/CustomNode.tsx +317 -0
- package/src/ui/extensions/flow/molecules/FloatingConnectionLine.tsx +86 -0
- package/src/ui/extensions/flow/molecules/FloatingEdge.test.tsx +85 -0
- package/src/ui/extensions/flow/molecules/FloatingEdge.tsx +124 -0
- package/src/ui/extensions/flow/molecules/FlowNodeContent.tsx +83 -0
- package/src/ui/extensions/flow/molecules/FlowNodeToolbar.test.tsx +112 -0
- package/src/ui/extensions/flow/molecules/FlowNodeToolbar.tsx +202 -0
- package/src/ui/extensions/flow/molecules/InputNode.tsx +70 -0
- package/src/ui/extensions/flow/molecules/NoteNode.tsx +59 -0
- package/src/ui/extensions/flow/molecules/OutputNode.tsx +70 -0
- package/src/ui/extensions/flow/molecules/ResizableNode.test.tsx +116 -0
- package/src/ui/extensions/flow/molecules/ResizableNode.tsx +294 -0
- package/src/ui/extensions/flow/molecules/SelectorNode.tsx +150 -0
- package/src/ui/extensions/flow/molecules/TextNode.tsx +75 -0
- package/src/ui/extensions/flow/molecules/index.ts +25 -0
- package/src/ui/extensions/flow/organisms/Flow.mdx +169 -0
- package/src/ui/extensions/flow/organisms/FlowBackground.tsx +182 -0
- package/src/ui/extensions/flow/organisms/FlowCanvas.test.tsx +69 -0
- package/src/ui/extensions/flow/organisms/FlowCanvas.tsx +193 -0
- package/src/ui/extensions/flow/organisms/FlowContext.tsx +106 -0
- package/src/ui/extensions/flow/organisms/FlowControls.tsx +67 -0
- package/src/ui/extensions/flow/organisms/FlowDragHandle.tsx +70 -0
- package/src/ui/extensions/flow/organisms/FlowEdgeToolbar.tsx +95 -0
- package/src/ui/extensions/flow/organisms/FlowMinimap.tsx +63 -0
- package/src/ui/extensions/flow/organisms/FlowNodeResizer.tsx +76 -0
- package/src/ui/extensions/flow/organisms/FlowPanel.tsx +50 -0
- package/src/ui/extensions/flow/organisms/FlowPlayground.mdx +185 -0
- package/src/ui/extensions/flow/organisms/FlowPlayground.stories.tsx +110 -0
- package/src/ui/extensions/flow/organisms/FlowProvider.test.tsx +64 -0
- package/src/ui/extensions/flow/organisms/FlowProvider.tsx +327 -0
- package/src/ui/extensions/flow/organisms/FlowTypes.ts +264 -0
- package/src/ui/extensions/flow/providers/FlowDebugProvider.tsx +195 -0
- package/src/ui/extensions/flow/providers/FlowEventProvider.tsx +9 -0
- package/src/ui/extensions/flow/providers/FlowPerformanceProvider.tsx +9 -0
- package/src/ui/extensions/flow/providers/FlowProviderComposition.tsx +265 -0
- package/src/ui/extensions/flow/providers/FlowStyleProvider.tsx +9 -0
- package/src/ui/extensions/flow/providers/index.ts +12 -0
- package/src/ui/extensions/flow/registries/LayoutRegistry.ts +181 -0
- package/src/ui/extensions/flow/registries/PluginRegistry.ts +159 -0
- package/src/ui/extensions/flow/registries/index.ts +14 -0
- package/src/ui/extensions/flow/strategies/AnimationStrategy.ts +204 -0
- package/src/ui/extensions/flow/strategies/EdgeRoutingStrategy.ts +211 -0
- package/src/ui/extensions/flow/strategies/LayoutStrategy.ts +69 -0
- package/src/ui/extensions/flow/strategies/index.ts +27 -0
- package/src/ui/extensions/flow/styles/flow-theme.ts +303 -0
- package/src/ui/extensions/flow/styles/flow-variables.css +666 -0
- package/src/ui/extensions/flow/styles/index.ts +23 -0
- package/src/ui/extensions/flow/styles/modules/CardNode.module.css +93 -0
- package/src/ui/extensions/flow/styles/modules/CustomEdge.module.css +47 -0
- package/src/ui/extensions/flow/styles/modules/CustomNode.module.css +41 -0
- package/src/ui/extensions/flow/styles/modules/DragNDropSidebar.module.css +73 -0
- package/src/ui/extensions/flow/styles/modules/FlowBackground.module.css +65 -0
- package/src/ui/extensions/flow/styles/modules/FlowControls.module.css +74 -0
- package/src/ui/extensions/flow/styles/modules/FlowHandle.module.css +69 -0
- package/src/ui/extensions/flow/styles/modules/FlowMinimap.module.css +44 -0
- package/src/ui/extensions/flow/styles/modules/FlowNodeWrapper.module.css +108 -0
- package/src/ui/extensions/flow/types/playgroundTypes.ts +95 -0
- package/src/ui/extensions/flow/utils/PlaygroundPersistence.ts +259 -0
- package/src/ui/extensions/flow/utils/PlaygroundStateManager.ts +276 -0
- package/src/ui/extensions/flow/utils/backgroundPresets.ts +210 -0
- package/src/ui/extensions/flow/utils/codeGenerator.ts +288 -0
- package/src/ui/extensions/flow/utils/cssUtils.ts +57 -0
- package/src/ui/extensions/flow/utils/edgeDataHelpers.ts +216 -0
- package/src/ui/extensions/flow/utils/edgeFactory.ts +99 -0
- package/src/ui/extensions/flow/utils/edgeTypes.ts +208 -0
- package/src/ui/extensions/flow/utils/floatingEdgeUtils.test.ts +105 -0
- package/src/ui/extensions/flow/utils/floatingEdgeUtils.ts +86 -0
- package/src/ui/extensions/flow/utils/geometryUtils.ts +230 -0
- package/src/ui/extensions/flow/utils/index.ts +26 -0
- package/src/ui/extensions/flow/utils/layoutEngine.ts +242 -0
- package/src/ui/extensions/flow/utils/nodeDataHelpers.ts +254 -0
- package/src/ui/extensions/flow/utils/nodeFactory.ts +91 -0
- package/src/ui/extensions/flow/utils/nodeTypes.ts +210 -0
- package/src/ui/extensions/flow/utils/performanceUtils.ts +156 -0
- package/src/ui/extensions/flow/utils/playgroundHelpers.ts +326 -0
- package/src/ui/extensions/flow/utils/playgroundRouting.ts +111 -0
- package/src/ui/extensions/flow/utils/playgroundSteps.tsx +348 -0
- package/src/ui/extensions/flow/utils/playgroundStyles.ts +117 -0
- package/src/ui/extensions/flow/utils/playgroundTemplates.ts +211 -0
- package/src/ui/extensions/flow/utils/propFilters.ts +95 -0
- package/src/ui/extensions/flow/utils/reactFlowPropsDefinitions.ts +191 -0
- package/src/ui/extensions/flow/utils/shareUtils.ts +76 -0
- package/src/ui/extensions/flow/utils/validation.ts +147 -0
- package/src/ui/extensions/index.ts +11 -0
- package/src/ui/extensions/types.ts +56 -0
- package/src/ui/hooks/shallowEqual.ts +77 -0
- package/src/ui/hooks/useContextSelector.ts +103 -0
- package/src/ui/hooks/useProviderComposition.tsx +98 -0
- package/src/ui/index.ts +21 -1
- package/src/ui/layouts/Container/Container.stories.tsx +215 -0
- package/src/ui/layouts/Container/Container.tsx +79 -0
- package/src/ui/layouts/Container/index.ts +1 -0
- package/src/ui/layouts/Stack/Stack.stories.tsx +247 -0
- package/src/ui/layouts/Stack/Stack.tsx +91 -0
- package/src/ui/layouts/Stack/index.ts +1 -0
- package/src/ui/layouts/index.ts +5 -0
- package/src/ui/molecules/Accordion/Accordion.stories.tsx +278 -0
- package/src/ui/molecules/Accordion/Accordion.test.tsx +86 -0
- package/src/ui/molecules/Accordion/Accordion.tsx +152 -0
- package/src/ui/molecules/Accordion/index.ts +2 -0
- package/src/ui/molecules/Autocomplete/Autocomplete.stories.tsx +556 -0
- package/src/ui/molecules/Autocomplete/Autocomplete.test.tsx +111 -0
- package/src/ui/molecules/Autocomplete/Autocomplete.tsx +268 -0
- package/src/ui/molecules/Autocomplete/AutocompleteList.tsx +145 -0
- package/src/ui/molecules/Autocomplete/AutocompleteOption.tsx +62 -0
- package/src/ui/molecules/Autocomplete/index.ts +9 -0
- package/src/ui/molecules/Breadcrumb/Breadcrumb.stories.tsx +235 -12
- package/src/ui/molecules/Breadcrumb/Breadcrumb.tsx +34 -14
- package/src/ui/molecules/ButtonGroup/ButtonGroup.stories.tsx +252 -0
- package/src/ui/molecules/ButtonGroup/ButtonGroup.test.tsx +47 -0
- package/src/ui/molecules/ButtonGroup/ButtonGroup.tsx +63 -0
- package/src/ui/molecules/ButtonGroup/index.ts +2 -0
- package/src/ui/molecules/Card/Card.stories.tsx +290 -14
- package/src/ui/molecules/Card/Card.test.tsx +2 -2
- package/src/ui/molecules/Card/Card.tsx +75 -30
- package/src/ui/molecules/ColorPicker/ColorPicker.stories.tsx +378 -0
- package/src/ui/molecules/ColorPicker/ColorPicker.test.tsx +47 -0
- package/src/ui/molecules/ColorPicker/ColorPicker.tsx +271 -0
- package/src/ui/molecules/ColorPicker/index.ts +2 -0
- package/src/ui/molecules/DatePicker/DatePicker.mdx +150 -0
- package/src/ui/molecules/DatePicker/DatePicker.stories.tsx +617 -0
- package/src/ui/molecules/DatePicker/DatePicker.test.tsx +381 -0
- package/src/ui/molecules/DatePicker/DatePicker.tsx +231 -0
- package/src/ui/molecules/DatePicker/DatePickerCalendar.tsx +277 -0
- package/src/ui/molecules/DatePicker/DatePickerContext.tsx +39 -0
- package/src/ui/molecules/DatePicker/DatePickerInput.tsx +147 -0
- package/src/ui/molecules/DatePicker/DatePickerProvider.tsx +100 -0
- package/src/ui/molecules/DatePicker/index.ts +16 -0
- package/src/ui/molecules/Drawer/Drawer.stories.tsx +342 -0
- package/src/ui/molecules/Drawer/Drawer.test.tsx +282 -0
- package/src/ui/molecules/Drawer/Drawer.tsx +92 -0
- package/src/ui/molecules/Drawer/DrawerContent.tsx +141 -0
- package/src/ui/molecules/Drawer/DrawerContext.tsx +33 -0
- package/src/ui/molecules/Drawer/DrawerFooter.tsx +45 -0
- package/src/ui/molecules/Drawer/DrawerHeader.tsx +41 -0
- package/src/ui/molecules/Drawer/index.ts +11 -0
- package/src/ui/molecules/Dropdown/Dropdown.stories.tsx +527 -10
- package/src/ui/molecules/Dropdown/Dropdown.test.tsx +272 -12
- package/src/ui/molecules/Dropdown/Dropdown.tsx +222 -23
- package/src/ui/molecules/EmptyState/EmptyState.stories.tsx +298 -19
- package/src/ui/molecules/EmptyState/EmptyState.tsx +39 -19
- package/src/ui/molecules/FileUpload/FileUpload.stories.tsx +629 -0
- package/src/ui/molecules/FileUpload/FileUpload.test.tsx +114 -0
- package/src/ui/molecules/FileUpload/FileUpload.tsx +371 -0
- package/src/ui/molecules/FileUpload/index.ts +2 -0
- package/src/ui/molecules/Form/Form.mdx +145 -0
- package/src/ui/molecules/Form/Form.stories.tsx +1445 -128
- package/src/ui/molecules/Form/Form.test.tsx +1 -3
- package/src/ui/molecules/Form/Form.tsx +137 -17
- package/src/ui/molecules/Form/FormContext.tsx +35 -0
- package/src/ui/molecules/Form/FormField.tsx +99 -0
- package/src/ui/molecules/Form/FormProvider.tsx +34 -0
- package/src/ui/molecules/Form/index.ts +21 -0
- package/src/ui/molecules/Form/useFormFieldArray.ts +46 -0
- package/src/ui/molecules/Header/Header.accessibility.test.tsx +229 -0
- package/src/ui/molecules/Header/Header.compatibility.test.tsx +434 -0
- package/src/ui/molecules/Header/Header.dashboard.test.tsx +228 -0
- package/src/ui/molecules/Header/Header.navigation-integration.test.tsx +73 -0
- package/src/ui/molecules/Header/Header.stories.tsx +256 -0
- package/src/ui/molecules/Header/Header.test.tsx +181 -0
- package/src/ui/molecules/Header/Header.tsx +126 -0
- package/src/ui/molecules/Header/Header.visual.test.tsx +215 -0
- package/src/ui/molecules/Header/components/HeaderActions.tsx +49 -0
- package/src/ui/molecules/Header/components/HeaderHamburger.tsx +85 -0
- package/src/ui/molecules/Header/components/HeaderLogo.tsx +59 -0
- package/src/ui/molecules/Header/components/HeaderMobileMenu.tsx +71 -0
- package/src/ui/molecules/Header/components/HeaderNavigation.tsx +56 -0
- package/src/ui/molecules/Header/contexts/HeaderContext.tsx +173 -0
- package/src/ui/molecules/Header/index.ts +25 -0
- package/src/ui/molecules/Header/types.ts +70 -0
- package/src/ui/molecules/Menu/Menu.stories.tsx +359 -0
- package/src/ui/molecules/Menu/Menu.test.tsx +436 -0
- package/src/ui/molecules/Menu/Menu.tsx +86 -0
- package/src/ui/molecules/Menu/MenuContent.tsx +157 -0
- package/src/ui/molecules/Menu/MenuContext.tsx +30 -0
- package/src/ui/molecules/Menu/MenuItem.tsx +111 -0
- package/src/ui/molecules/Menu/MenuSeparator.tsx +35 -0
- package/src/ui/molecules/Menu/MenuTrigger.tsx +46 -0
- package/src/ui/molecules/Menu/index.ts +14 -0
- package/src/ui/molecules/MultiSelect/MultiSelect.stories.tsx +645 -0
- package/src/ui/molecules/MultiSelect/MultiSelect.test.tsx +49 -0
- package/src/ui/molecules/MultiSelect/MultiSelect.tsx +313 -0
- package/src/ui/molecules/MultiSelect/index.ts +2 -0
- package/src/ui/molecules/Navigation/Navigation.accessibility.test.tsx +125 -0
- package/src/ui/molecules/Navigation/Navigation.active-state.test.tsx +67 -0
- package/src/ui/molecules/Navigation/Navigation.stories.tsx +267 -0
- package/src/ui/molecules/Navigation/Navigation.test.tsx +264 -0
- package/src/ui/molecules/Navigation/Navigation.tsx +203 -0
- package/src/ui/molecules/Navigation/hooks/useNavigationActiveState.ts +100 -0
- package/src/ui/molecules/Navigation/index.ts +9 -0
- package/src/ui/molecules/Navigation/types.ts +111 -0
- package/src/ui/molecules/PageHeader/PageHeader.stories.tsx +193 -0
- package/src/ui/molecules/PageHeader/PageHeader.test.tsx +142 -0
- package/src/ui/molecules/PageHeader/PageHeader.tsx +100 -0
- package/src/ui/molecules/PageHeader/index.ts +9 -0
- package/src/ui/molecules/PageHeader/types.ts +51 -0
- package/src/ui/molecules/Pagination/Pagination.stories.tsx +314 -9
- package/src/ui/molecules/Pagination/Pagination.test.tsx +1 -1
- package/src/ui/molecules/Pagination/Pagination.tsx +35 -25
- package/src/ui/molecules/Popover/Popover.stories.tsx +314 -0
- package/src/ui/molecules/Popover/Popover.test.tsx +80 -0
- package/src/ui/molecules/Popover/Popover.tsx +258 -0
- package/src/ui/molecules/Popover/index.ts +2 -0
- package/src/ui/molecules/Rating/Rating.stories.tsx +418 -0
- package/src/ui/molecules/Rating/Rating.test.tsx +60 -0
- package/src/ui/molecules/Rating/Rating.tsx +174 -0
- package/src/ui/molecules/Rating/index.ts +2 -0
- package/src/ui/molecules/SearchInput/SearchInput.stories.tsx +493 -0
- package/src/ui/molecules/SearchInput/SearchInput.test.tsx +82 -0
- package/src/ui/molecules/SearchInput/SearchInput.tsx +135 -0
- package/src/ui/molecules/SearchInput/index.ts +2 -0
- package/src/ui/molecules/Tabs/Tabs.stories.tsx +713 -0
- package/src/ui/molecules/Tabs/Tabs.test.tsx +505 -0
- package/src/ui/molecules/Tabs/Tabs.tsx +58 -0
- package/src/ui/molecules/Tabs/TabsContent.tsx +50 -0
- package/src/ui/molecules/Tabs/TabsContext.tsx +36 -0
- package/src/ui/molecules/Tabs/TabsList.tsx +107 -0
- package/src/ui/molecules/Tabs/TabsProvider.tsx +53 -0
- package/src/ui/molecules/Tabs/TabsTrigger.tsx +126 -0
- package/src/ui/molecules/Tabs/index.ts +23 -0
- package/src/ui/molecules/TimePicker/TimePicker.stories.tsx +301 -0
- package/src/ui/molecules/TimePicker/TimePicker.test.tsx +41 -0
- package/src/ui/molecules/TimePicker/TimePicker.tsx +264 -0
- package/src/ui/molecules/TimePicker/index.ts +2 -0
- package/src/ui/molecules/index.ts +48 -9
- package/src/ui/organisms/CommandPalette/CommandPalette.stories.tsx +653 -0
- package/src/ui/organisms/CommandPalette/CommandPalette.test.tsx +85 -0
- package/src/ui/organisms/CommandPalette/CommandPalette.tsx +333 -0
- package/src/ui/organisms/CommandPalette/index.ts +2 -0
- package/src/ui/organisms/DataGrid/DataGrid.stories.tsx +414 -0
- package/src/ui/organisms/DataGrid/DataGrid.test.tsx +53 -0
- package/src/ui/organisms/DataGrid/DataGrid.tsx +294 -0
- package/src/ui/organisms/DataGrid/index.ts +2 -0
- package/src/ui/organisms/Dialog/AlertDialog.tsx +92 -0
- package/src/ui/organisms/Dialog/Dialog.mdx +200 -0
- package/src/ui/organisms/Dialog/Dialog.stories.tsx +370 -0
- package/src/ui/organisms/Dialog/Dialog.test.tsx +435 -0
- package/src/ui/organisms/Dialog/Dialog.tsx +79 -0
- package/src/ui/organisms/Dialog/DialogClose.tsx +45 -0
- package/src/ui/organisms/Dialog/DialogContent.tsx +149 -0
- package/src/ui/organisms/Dialog/DialogContext.tsx +25 -0
- package/src/ui/organisms/Dialog/DialogDescription.tsx +28 -0
- package/src/ui/organisms/Dialog/DialogFooter.tsx +18 -0
- package/src/ui/organisms/Dialog/DialogHeader.tsx +18 -0
- package/src/ui/organisms/Dialog/DialogProvider.tsx +73 -0
- package/src/ui/organisms/Dialog/DialogTitle.tsx +31 -0
- package/src/ui/organisms/Dialog/DialogTrigger.tsx +34 -0
- package/src/ui/organisms/Dialog/index.ts +24 -0
- package/src/ui/organisms/LoginBox/LoginBox.stories.tsx +93 -2
- package/src/ui/organisms/LoginBox/LoginBox.tsx +33 -15
- package/src/ui/organisms/Modal/Modal.stories.tsx +189 -3
- package/src/ui/organisms/Modal/Modal.test.tsx +1 -1
- package/src/ui/organisms/Modal/Modal.tsx +3 -26
- package/src/ui/organisms/SideNavbar/SideNavbar.stories.tsx +1355 -0
- package/src/ui/organisms/SideNavbar/SideNavbar.test.tsx +481 -0
- package/src/ui/organisms/SideNavbar/SideNavbar.tsx +204 -0
- package/src/ui/organisms/SideNavbar/components/Navbar/Navbar.tsx +173 -0
- package/src/ui/organisms/SideNavbar/components/Navbar/NavbarGroup.tsx +69 -0
- package/src/ui/organisms/SideNavbar/components/Navbar/NavbarItem.tsx +287 -0
- package/src/ui/organisms/SideNavbar/components/Navbar/NavbarSeparator.tsx +63 -0
- package/src/ui/organisms/SideNavbar/components/Navbar/NavbarToggle.tsx +106 -0
- package/src/ui/organisms/SideNavbar/components/Navbar/index.ts +5 -0
- package/src/ui/organisms/SideNavbar/components/SideNavbarBackdrop.tsx +80 -0
- package/src/ui/organisms/SideNavbar/components/SideNavbarGroup.tsx +193 -0
- package/src/ui/organisms/SideNavbar/components/SideNavbarResizeHandle.tsx +98 -0
- package/src/ui/organisms/SideNavbar/components/SideNavbarRoot.tsx +188 -0
- package/src/ui/organisms/SideNavbar/components/SideNavbarToggle.tsx +263 -0
- package/src/ui/organisms/SideNavbar/components/Sidebar/Sidebar.tsx +133 -0
- package/src/ui/organisms/SideNavbar/components/Sidebar/SidebarContent.tsx +76 -0
- package/src/ui/organisms/SideNavbar/components/Sidebar/SidebarFooter.tsx +58 -0
- package/src/ui/organisms/SideNavbar/components/Sidebar/SidebarGroup.tsx +139 -0
- package/src/ui/organisms/SideNavbar/components/Sidebar/SidebarHeader.tsx +83 -0
- package/src/ui/organisms/SideNavbar/components/Sidebar/SidebarSlot.tsx +59 -0
- package/src/ui/organisms/SideNavbar/components/Sidebar/SidebarSlotContent.tsx +42 -0
- package/src/ui/organisms/SideNavbar/components/Sidebar/index.ts +7 -0
- package/src/ui/organisms/SideNavbar/components/index.ts +12 -0
- package/src/ui/organisms/SideNavbar/contexts/NavbarContext.tsx +33 -0
- package/src/ui/organisms/SideNavbar/contexts/SideNavbarConfigContext.tsx +48 -0
- package/src/ui/organisms/SideNavbar/contexts/SideNavbarStateContext.tsx +48 -0
- package/src/ui/organisms/SideNavbar/contexts/SideNavbarThemeContext.tsx +39 -0
- package/src/ui/organisms/SideNavbar/contexts/SideNavbarToggleContext.tsx +27 -0
- package/src/ui/organisms/SideNavbar/contexts/SidebarContext.tsx +33 -0
- package/src/ui/organisms/SideNavbar/contexts/SidebarSlotContext.tsx +32 -0
- package/src/ui/organisms/SideNavbar/contexts/index.ts +52 -0
- package/src/ui/organisms/SideNavbar/hooks/useFocusManagement.ts +114 -0
- package/src/ui/organisms/SideNavbar/hooks/useGroupState.ts +86 -0
- package/src/ui/organisms/SideNavbar/hooks/useKeyboardShortcut.ts +130 -0
- package/src/ui/organisms/SideNavbar/hooks/useNavbar.ts +17 -0
- package/src/ui/organisms/SideNavbar/hooks/useResize.ts +198 -0
- package/src/ui/organisms/SideNavbar/hooks/useResponsiveSidebar.ts +106 -0
- package/src/ui/organisms/SideNavbar/hooks/useSideNavbar.ts +63 -0
- package/src/ui/organisms/SideNavbar/hooks/useSideNavbarContent.ts +35 -0
- package/src/ui/organisms/SideNavbar/hooks/useSideNavbarNavigation.ts +45 -0
- package/src/ui/organisms/SideNavbar/hooks/useSidebar.ts +17 -0
- package/src/ui/organisms/SideNavbar/index.ts +148 -0
- package/src/ui/organisms/SideNavbar/providers/SideNavbarConfigProvider.tsx +81 -0
- package/src/ui/organisms/SideNavbar/providers/SideNavbarProvider.tsx +102 -0
- package/src/ui/organisms/SideNavbar/providers/SideNavbarStateProvider.tsx +253 -0
- package/src/ui/organisms/SideNavbar/providers/SideNavbarThemeProvider.tsx +50 -0
- package/src/ui/organisms/SideNavbar/providers/SidebarSlotProvider.tsx +70 -0
- package/src/ui/organisms/SideNavbar/providers/index.ts +5 -0
- package/src/ui/organisms/SideNavbar/types/index.ts +667 -0
- package/src/ui/organisms/SideNavbar/utils/index.ts +3 -0
- package/src/ui/organisms/SideNavbar/utils/parseKeyboardShortcut.ts +164 -0
- package/src/ui/organisms/SideNavbar/utils/parseWidth.ts +59 -0
- package/src/ui/organisms/Stepper/Stepper.stories.tsx +651 -0
- package/src/ui/organisms/Stepper/Stepper.test.tsx +76 -0
- package/src/ui/organisms/Stepper/Stepper.tsx +323 -0
- package/src/ui/organisms/Stepper/index.ts +2 -0
- package/src/ui/organisms/Table/Table.mdx +154 -0
- package/src/ui/organisms/Table/Table.stories.tsx +859 -5
- package/src/ui/organisms/Table/Table.test.tsx +86 -4
- package/src/ui/organisms/Table/Table.tsx +220 -99
- package/src/ui/organisms/Table/TableActions/TableActions.stories.tsx +299 -0
- package/src/ui/organisms/Table/TableActions/TableActions.test.tsx +64 -0
- package/src/ui/organisms/Table/TableActions/TableActions.tsx +71 -0
- package/src/ui/organisms/Table/TableActions.tsx +46 -0
- package/src/ui/organisms/Table/TableBody.tsx +137 -0
- package/src/ui/organisms/Table/TableCell.tsx +36 -0
- package/src/ui/organisms/Table/TableContext.tsx +111 -0
- package/src/ui/organisms/Table/TableEmptyState.tsx +51 -0
- package/src/ui/organisms/Table/TableFilters/TableFilters.stories.tsx +343 -0
- package/src/ui/organisms/Table/TableFilters/TableFilters.test.tsx +104 -0
- package/src/ui/organisms/Table/TableFilters/TableFilters.tsx +191 -0
- package/src/ui/organisms/Table/TableFilters.tsx +39 -0
- package/src/ui/organisms/Table/TableHeader.tsx +29 -0
- package/src/ui/organisms/Table/TableHeaderCell.tsx +142 -0
- package/src/ui/organisms/Table/TableHeaderRow.tsx +72 -0
- package/src/ui/organisms/Table/TablePagination/TablePagination.stories.tsx +297 -0
- package/src/ui/organisms/Table/TablePagination/TablePagination.test.tsx +90 -0
- package/src/ui/organisms/Table/TablePagination/TablePagination.tsx +207 -0
- package/src/ui/organisms/Table/TablePagination.tsx +48 -0
- package/src/ui/organisms/Table/TableProvider.mdx +74 -0
- package/src/ui/organisms/Table/TableProvider.tsx +429 -0
- package/src/ui/organisms/Table/TableRow.tsx +85 -0
- package/src/ui/organisms/Table/TableTypes.ts +11 -0
- package/src/ui/organisms/Table/index.ts +55 -0
- package/src/ui/organisms/Table/useColumnResizing.ts +134 -0
- package/src/ui/organisms/Table/useVirtualScrolling.ts +116 -0
- package/src/ui/organisms/Timeline/Timeline.stories.tsx +509 -0
- package/src/ui/organisms/Timeline/Timeline.test.tsx +47 -0
- package/src/ui/organisms/Timeline/Timeline.tsx +180 -0
- package/src/ui/organisms/Timeline/index.ts +2 -0
- package/src/ui/organisms/Toast/Toast.stories.tsx +570 -0
- package/src/ui/organisms/Toast/Toast.test.tsx +537 -0
- package/src/ui/organisms/Toast/Toast.tsx +144 -0
- package/src/ui/organisms/Toast/ToastContainer.tsx +54 -0
- package/src/ui/organisms/Toast/ToastContext.tsx +38 -0
- package/src/ui/organisms/Toast/ToastProvider.tsx +56 -0
- package/src/ui/organisms/Toast/index.ts +17 -0
- package/src/ui/organisms/Toast/useToast.ts +93 -0
- package/src/ui/organisms/index.ts +22 -4
- package/src/ui/patterns/DataTablePattern/DataTablePattern.stories.tsx +325 -0
- package/src/ui/patterns/DataTablePattern/DataTablePattern.tsx +203 -0
- package/src/ui/patterns/DataTablePattern/index.ts +1 -0
- package/src/ui/patterns/FormWizardPattern/FormWizardPattern.stories.tsx +541 -0
- package/src/ui/patterns/FormWizardPattern/FormWizardPattern.tsx +181 -0
- package/src/ui/patterns/FormWizardPattern/index.ts +1 -0
- package/src/ui/patterns/SearchAndFilterPattern/SearchAndFilterPattern.stories.tsx +338 -0
- package/src/ui/patterns/SearchAndFilterPattern/SearchAndFilterPattern.tsx +196 -0
- package/src/ui/patterns/SearchAndFilterPattern/index.ts +6 -0
- package/src/ui/patterns/index.ts +11 -0
- package/src/ui/providers/AdvancedThemeProvider.tsx +229 -0
- package/src/ui/providers/AppProvider.stories.tsx +145 -0
- package/src/ui/providers/AppProvider.tsx +156 -0
- package/src/ui/providers/ConfigProvider.tsx +256 -0
- package/src/ui/providers/ThemeProvider.tsx +1 -1
- package/src/ui/providers/index.ts +9 -0
- package/src/ui/shared/errors/RegistryErrors.ts +31 -0
- package/src/ui/shared/errors/index.ts +10 -0
- package/src/ui/shared/index.ts +8 -0
- package/src/ui/shared/patterns/BaseRegistry.ts +290 -0
- package/src/ui/shared/patterns/CategorizedRegistry.ts +48 -0
- package/src/ui/shared/patterns/index.ts +6 -0
- package/src/ui/shared/utils/comparators.ts +45 -0
- package/src/ui/shared/utils/idGenerator.ts +106 -0
- package/src/ui/shared/utils/index.ts +6 -0
- package/src/ui/shared/validation/globalConfigSchemas.ts +149 -0
- package/src/ui/shared/validation/index.ts +7 -0
- package/src/ui/shared/validation/schemas.ts +69 -0
- package/src/ui/shared/validation/startComponentSchemas.ts +163 -0
- package/src/ui/templates/DashboardLayout/DashboardLayout.stories.tsx +273 -0
- package/src/ui/templates/DashboardLayout/DashboardLayout.tsx +105 -0
- package/src/ui/templates/DashboardLayout/index.ts +1 -0
- package/src/ui/templates/index.ts +4 -0
- package/src/ui/themes/README.md +281 -0
- package/src/ui/themes/ThemeBuilder.ts +149 -0
- package/src/ui/themes/ThemeRegistry.ts +187 -0
- package/src/ui/themes/index.ts +20 -0
- package/src/ui/themes/types.ts +53 -0
- package/src/ui/themes/utils.ts +70 -0
- package/src/ui/tokens/COLOR_USAGE_GUIDE.md +248 -0
- package/src/ui/tokens/README.md +212 -0
- package/src/ui/tokens/TokenVisualizations.tsx +273 -0
- package/src/ui/tokens/Tokens.mdx +348 -0
- package/src/ui/tokens/animations.ts +157 -0
- package/src/ui/tokens/borders.ts +121 -0
- package/src/ui/tokens/colors/index.ts +105 -0
- package/src/ui/tokens/colors/primitives.ts +433 -0
- package/src/ui/tokens/colors/semantic.ts +148 -0
- package/src/ui/tokens/colors/types.ts +221 -0
- package/src/ui/tokens/colors/utils.ts +253 -0
- package/src/ui/tokens/colors.ts +168 -23
- package/src/ui/tokens/gradients.ts +154 -0
- package/src/ui/tokens/index.ts +62 -0
- package/src/ui/tokens/opacity.ts +107 -0
- package/src/ui/tokens/radius.ts +107 -0
- package/src/ui/tokens/shadows.ts +92 -0
- package/src/ui/tokens/sidebar.ts +30 -0
- package/src/ui/tokens/tokens.factory.ts +124 -0
- package/src/ui/tokens/typography.ts +37 -0
- package/src/ui/tokens/versioning.ts +199 -0
- package/src/ui/tokens/z-index.ts +113 -0
- package/src/ui/utilities/Portal/Portal.stories.tsx +319 -0
- package/src/ui/utilities/Portal/Portal.tsx +68 -0
- package/src/ui/utilities/Portal/index.ts +1 -0
- package/src/ui/utilities/index.ts +4 -0
- package/src/ui/utils/cn.test.ts +49 -0
- package/src/ui/utils/cn.ts +45 -0
- package/src/ui/utils/css-variables.ts +79 -0
- package/src/ui/utils/cva.test.ts +123 -0
- package/src/ui/utils/cva.ts +80 -0
- package/src/ui/utils/index.ts +17 -0
- package/src/ui/utils/tailwind-safelist.ts +90 -0
- package/src/ui/utils/variants.test.ts +105 -0
- package/src/ui/utils/variants.ts +167 -0
- package/src/App.css +0 -42
- package/src/App.tsx +0 -35
- package/src/index.css +0 -68
- package/src/ui/atoms/BoxWrapper/BoxWrapper.stories.tsx +0 -15
- package/src/ui/atoms/BoxWrapper/BoxWrapper.tsx +0 -9
- package/src/ui/atoms/SidebarItem/SidebarItem.stories.tsx +0 -99
- package/src/ui/atoms/SidebarItem/SidebarItem.test.tsx +0 -65
- package/src/ui/atoms/SidebarItem/SidebarItem.tsx +0 -81
- package/src/ui/molecules/InputWithLabel/InputWithLabel.stories.tsx +0 -17
- package/src/ui/molecules/InputWithLabel/InputWithLabel.tsx +0 -22
- package/src/ui/molecules/NavbarGroup/NavbarGroup.stories.tsx +0 -62
- package/src/ui/molecules/NavbarGroup/NavbarGroup.test.tsx +0 -32
- package/src/ui/molecules/NavbarGroup/NavbarGroup.tsx +0 -71
- package/src/ui/molecules/SidebarGroup/SidebarGroup.stories.tsx +0 -173
- package/src/ui/molecules/SidebarGroup/SidebarGroup.test.tsx +0 -131
- package/src/ui/molecules/SidebarGroup/SidebarGroup.tsx +0 -119
- package/src/ui/molecules/SidebarHeader/SidebarHeader.tsx +0 -80
- package/src/ui/organisms/Sidebar/Sidebar.stories.tsx +0 -117
- package/src/ui/organisms/Sidebar/Sidebar.test.tsx +0 -40
- package/src/ui/organisms/Sidebar/Sidebar.tsx +0 -84
|
@@ -1,14 +1,38 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { fn } from '@storybook/test';
|
|
3
|
+
import { expect, userEvent, within, waitFor } from '@storybook/test';
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
import { useForm } from "react-hook-form";
|
|
2
6
|
import Form from "./Form";
|
|
7
|
+
import { FormField } from "./FormField";
|
|
3
8
|
import { Input, Label, Button, Textarea, Select, ErrorMessage } from "../../atoms";
|
|
4
9
|
|
|
5
10
|
const meta: Meta<typeof Form> = {
|
|
6
|
-
title: "
|
|
11
|
+
title: "Molecules/Form",
|
|
7
12
|
component: Form,
|
|
8
13
|
parameters: {
|
|
9
14
|
docs: {
|
|
10
15
|
description: {
|
|
11
|
-
component:
|
|
16
|
+
component: `
|
|
17
|
+
## Form
|
|
18
|
+
|
|
19
|
+
A wrapper component for forms with validation states, error/success messages, and layout.
|
|
20
|
+
|
|
21
|
+
### Events
|
|
22
|
+
|
|
23
|
+
| Event | Description | Parameters | When Fired |
|
|
24
|
+
|-------|-------------|------------|------------|
|
|
25
|
+
| \`onSubmit\` | Formulário submetido | \`(event: FormEvent<HTMLFormElement>) => void\` | Quando o formulário é submetido |
|
|
26
|
+
|
|
27
|
+
### States
|
|
28
|
+
|
|
29
|
+
| State | Description | How to Activate | Visual |
|
|
30
|
+
|-------|-------------|-----------------|--------|
|
|
31
|
+
| \`default\` | Estado padrão | Estado inicial | Formulário normal |
|
|
32
|
+
| \`loading\` | Carregando | \`loading={true}\` | Indicador de loading visível |
|
|
33
|
+
| \`error\` | Com erro | \`error\` prop definida | Mensagem de erro visível |
|
|
34
|
+
| \`success\` | Com sucesso | \`success\` prop definida | Mensagem de sucesso visível |
|
|
35
|
+
`,
|
|
12
36
|
},
|
|
13
37
|
},
|
|
14
38
|
},
|
|
@@ -29,167 +53,1460 @@ const meta: Meta<typeof Form> = {
|
|
|
29
53
|
};
|
|
30
54
|
|
|
31
55
|
export const Default: StoryObj<typeof Form> = {
|
|
32
|
-
|
|
33
|
-
|
|
56
|
+
render: () => {
|
|
57
|
+
const [name, setName] = useState("");
|
|
58
|
+
const [email, setEmail] = useState("");
|
|
59
|
+
const [submitted, setSubmitted] = useState(false);
|
|
60
|
+
|
|
61
|
+
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
|
34
62
|
e.preventDefault();
|
|
35
|
-
|
|
63
|
+
setSubmitted(true);
|
|
64
|
+
setTimeout(() => {
|
|
65
|
+
setSubmitted(false);
|
|
66
|
+
setName("");
|
|
67
|
+
setEmail("");
|
|
68
|
+
}, 2000);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<div className="space-y-4">
|
|
73
|
+
<Form onSubmit={handleSubmit} className="max-w-md" success={submitted ? "Form submitted successfully!" : null}>
|
|
74
|
+
<div className="space-y-2">
|
|
75
|
+
<Label htmlFor="name" variant="required">
|
|
76
|
+
Name
|
|
77
|
+
</Label>
|
|
78
|
+
<Input
|
|
79
|
+
id="name"
|
|
80
|
+
name="name"
|
|
81
|
+
value={name}
|
|
82
|
+
onChange={(e) => setName(e.target.value)}
|
|
83
|
+
placeholder="Enter your name"
|
|
84
|
+
required
|
|
85
|
+
/>
|
|
86
|
+
</div>
|
|
87
|
+
<div className="space-y-2">
|
|
88
|
+
<Label htmlFor="email" variant="required">
|
|
89
|
+
Email
|
|
90
|
+
</Label>
|
|
91
|
+
<Input
|
|
92
|
+
id="email"
|
|
93
|
+
name="email"
|
|
94
|
+
type="email"
|
|
95
|
+
value={email}
|
|
96
|
+
onChange={(e) => setEmail(e.target.value)}
|
|
97
|
+
placeholder="Enter your email"
|
|
98
|
+
required
|
|
99
|
+
/>
|
|
100
|
+
</div>
|
|
101
|
+
<Button type="submit" variant="regular">
|
|
102
|
+
Submit
|
|
103
|
+
</Button>
|
|
104
|
+
</Form>
|
|
105
|
+
{submitted && (
|
|
106
|
+
<div className="max-w-md text-sm text-gray-600">
|
|
107
|
+
Form data: {JSON.stringify({ name, email })}
|
|
108
|
+
</div>
|
|
109
|
+
)}
|
|
110
|
+
</div>
|
|
111
|
+
);
|
|
112
|
+
},
|
|
113
|
+
parameters: {
|
|
114
|
+
docs: {
|
|
115
|
+
description: {
|
|
116
|
+
story: "Interactive form with real state management. Fill in the fields and submit to see the success message.",
|
|
117
|
+
},
|
|
36
118
|
},
|
|
37
119
|
},
|
|
38
|
-
render: (args) => (
|
|
39
|
-
<Form {...args} className="max-w-md">
|
|
40
|
-
<div className="space-y-2">
|
|
41
|
-
<Label htmlFor="name" variant="required">
|
|
42
|
-
Name
|
|
43
|
-
</Label>
|
|
44
|
-
<Input id="name" name="name" placeholder="Enter your name" required />
|
|
45
|
-
</div>
|
|
46
|
-
<div className="space-y-2">
|
|
47
|
-
<Label htmlFor="email" variant="required">
|
|
48
|
-
Email
|
|
49
|
-
</Label>
|
|
50
|
-
<Input id="email" name="email" type="email" placeholder="Enter your email" required />
|
|
51
|
-
</div>
|
|
52
|
-
<Button type="submit" variant="regular">
|
|
53
|
-
Submit
|
|
54
|
-
</Button>
|
|
55
|
-
</Form>
|
|
56
|
-
),
|
|
57
120
|
};
|
|
58
121
|
|
|
59
122
|
export const WithError: StoryObj<typeof Form> = {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
123
|
+
render: () => {
|
|
124
|
+
const [email, setEmail] = useState("");
|
|
125
|
+
const [emailError, setEmailError] = useState("");
|
|
126
|
+
const [formError, setFormError] = useState("");
|
|
127
|
+
|
|
128
|
+
const validateEmail = (value: string) => {
|
|
129
|
+
if (!value) {
|
|
130
|
+
setEmailError("Email is required");
|
|
131
|
+
return false;
|
|
132
|
+
}
|
|
133
|
+
if (!value.includes("@")) {
|
|
134
|
+
setEmailError("Please enter a valid email address");
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
setEmailError("");
|
|
138
|
+
return true;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
|
63
142
|
e.preventDefault();
|
|
143
|
+
if (!validateEmail(email)) {
|
|
144
|
+
setFormError("Please fix the errors below and try again.");
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
setFormError("");
|
|
148
|
+
alert("Form submitted successfully!");
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
return (
|
|
152
|
+
<Form
|
|
153
|
+
onSubmit={handleSubmit}
|
|
154
|
+
className="max-w-md"
|
|
155
|
+
error={formError || null}
|
|
156
|
+
>
|
|
157
|
+
<div className="space-y-2">
|
|
158
|
+
<Label htmlFor="email" variant="required">
|
|
159
|
+
Email
|
|
160
|
+
</Label>
|
|
161
|
+
<Input
|
|
162
|
+
id="email"
|
|
163
|
+
name="email"
|
|
164
|
+
type="email"
|
|
165
|
+
value={email}
|
|
166
|
+
onChange={(e) => {
|
|
167
|
+
setEmail(e.target.value);
|
|
168
|
+
if (emailError) validateEmail(e.target.value);
|
|
169
|
+
}}
|
|
170
|
+
onBlur={() => validateEmail(email)}
|
|
171
|
+
error={!!emailError}
|
|
172
|
+
aria-invalid={!!emailError}
|
|
173
|
+
aria-describedby={emailError ? "email-error" : undefined}
|
|
174
|
+
/>
|
|
175
|
+
{emailError && (
|
|
176
|
+
<ErrorMessage message={emailError} id="email-error" />
|
|
177
|
+
)}
|
|
178
|
+
</div>
|
|
179
|
+
<Button type="submit" variant="regular">
|
|
180
|
+
Submit
|
|
181
|
+
</Button>
|
|
182
|
+
</Form>
|
|
183
|
+
);
|
|
184
|
+
},
|
|
185
|
+
parameters: {
|
|
186
|
+
docs: {
|
|
187
|
+
description: {
|
|
188
|
+
story: "Form with real-time validation. Try submitting with an invalid email to see validation errors.",
|
|
189
|
+
},
|
|
64
190
|
},
|
|
65
191
|
},
|
|
66
|
-
render: (args) => (
|
|
67
|
-
<Form {...args} className="max-w-md">
|
|
68
|
-
<div className="space-y-2">
|
|
69
|
-
<Label htmlFor="email" variant="required">
|
|
70
|
-
Email
|
|
71
|
-
</Label>
|
|
72
|
-
<Input
|
|
73
|
-
id="email"
|
|
74
|
-
name="email"
|
|
75
|
-
type="email"
|
|
76
|
-
aria-invalid="true"
|
|
77
|
-
aria-describedby="email-error"
|
|
78
|
-
/>
|
|
79
|
-
<ErrorMessage message="Please enter a valid email address" id="email-error" />
|
|
80
|
-
</div>
|
|
81
|
-
<Button type="submit" variant="regular">
|
|
82
|
-
Submit
|
|
83
|
-
</Button>
|
|
84
|
-
</Form>
|
|
85
|
-
),
|
|
86
192
|
};
|
|
87
193
|
|
|
88
194
|
export const WithSuccess: StoryObj<typeof Form> = {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
195
|
+
render: () => {
|
|
196
|
+
const [name, setName] = useState("");
|
|
197
|
+
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
198
|
+
const [success, setSuccess] = useState<string | null>(null);
|
|
199
|
+
|
|
200
|
+
const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
|
|
92
201
|
e.preventDefault();
|
|
202
|
+
setIsSubmitting(true);
|
|
203
|
+
setSuccess(null);
|
|
204
|
+
|
|
205
|
+
// Simulate API call
|
|
206
|
+
await new Promise(resolve => setTimeout(resolve, 1500));
|
|
207
|
+
|
|
208
|
+
setIsSubmitting(false);
|
|
209
|
+
setSuccess("Form submitted successfully!");
|
|
210
|
+
setName("");
|
|
211
|
+
|
|
212
|
+
// Clear success message after 3 seconds
|
|
213
|
+
setTimeout(() => setSuccess(null), 3000);
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
return (
|
|
217
|
+
<Form
|
|
218
|
+
onSubmit={handleSubmit}
|
|
219
|
+
className="max-w-md"
|
|
220
|
+
loading={isSubmitting}
|
|
221
|
+
success={success}
|
|
222
|
+
>
|
|
223
|
+
<div className="space-y-2">
|
|
224
|
+
<Label htmlFor="name" variant="required">
|
|
225
|
+
Name
|
|
226
|
+
</Label>
|
|
227
|
+
<Input
|
|
228
|
+
id="name"
|
|
229
|
+
name="name"
|
|
230
|
+
value={name}
|
|
231
|
+
onChange={(e) => setName(e.target.value)}
|
|
232
|
+
disabled={isSubmitting}
|
|
233
|
+
/>
|
|
234
|
+
</div>
|
|
235
|
+
<Button type="submit" variant="regular" disabled={isSubmitting}>
|
|
236
|
+
{isSubmitting ? "Submitting..." : "Submit"}
|
|
237
|
+
</Button>
|
|
238
|
+
</Form>
|
|
239
|
+
);
|
|
240
|
+
},
|
|
241
|
+
parameters: {
|
|
242
|
+
docs: {
|
|
243
|
+
description: {
|
|
244
|
+
story: "Form with loading state and success message. Submit the form to see the loading state and then the success message.",
|
|
245
|
+
},
|
|
93
246
|
},
|
|
94
247
|
},
|
|
95
|
-
render: (args) => (
|
|
96
|
-
<Form {...args} className="max-w-md">
|
|
97
|
-
<div className="space-y-2">
|
|
98
|
-
<Label htmlFor="name" variant="required">
|
|
99
|
-
Name
|
|
100
|
-
</Label>
|
|
101
|
-
<Input id="name" name="name" />
|
|
102
|
-
</div>
|
|
103
|
-
<Button type="submit" variant="regular">
|
|
104
|
-
Submit
|
|
105
|
-
</Button>
|
|
106
|
-
</Form>
|
|
107
|
-
),
|
|
108
248
|
};
|
|
109
249
|
|
|
110
250
|
export const Loading: StoryObj<typeof Form> = {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
251
|
+
render: () => {
|
|
252
|
+
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
253
|
+
const [name, setName] = useState("");
|
|
254
|
+
|
|
255
|
+
const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
|
|
114
256
|
e.preventDefault();
|
|
257
|
+
setIsSubmitting(true);
|
|
258
|
+
|
|
259
|
+
// Simulate API call
|
|
260
|
+
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
261
|
+
|
|
262
|
+
setIsSubmitting(false);
|
|
263
|
+
alert("Form submitted!");
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
return (
|
|
267
|
+
<Form
|
|
268
|
+
onSubmit={handleSubmit}
|
|
269
|
+
className="max-w-md"
|
|
270
|
+
loading={isSubmitting}
|
|
271
|
+
>
|
|
272
|
+
<div className="space-y-2">
|
|
273
|
+
<Label htmlFor="name" variant="required">
|
|
274
|
+
Name
|
|
275
|
+
</Label>
|
|
276
|
+
<Input
|
|
277
|
+
id="name"
|
|
278
|
+
name="name"
|
|
279
|
+
value={name}
|
|
280
|
+
onChange={(e) => setName(e.target.value)}
|
|
281
|
+
disabled={isSubmitting}
|
|
282
|
+
/>
|
|
283
|
+
</div>
|
|
284
|
+
<Button type="submit" variant="regular" disabled={isSubmitting}>
|
|
285
|
+
{isSubmitting ? "Submitting..." : "Submit"}
|
|
286
|
+
</Button>
|
|
287
|
+
</Form>
|
|
288
|
+
);
|
|
289
|
+
},
|
|
290
|
+
parameters: {
|
|
291
|
+
docs: {
|
|
292
|
+
description: {
|
|
293
|
+
story: "Form with real loading state. Submit the form to see the loading state in action.",
|
|
294
|
+
},
|
|
115
295
|
},
|
|
116
296
|
},
|
|
117
|
-
render: (args) => (
|
|
118
|
-
<Form {...args} className="max-w-md">
|
|
119
|
-
<div className="space-y-2">
|
|
120
|
-
<Label htmlFor="name" variant="required">
|
|
121
|
-
Name
|
|
122
|
-
</Label>
|
|
123
|
-
<Input id="name" name="name" disabled />
|
|
124
|
-
</div>
|
|
125
|
-
<Button type="submit" variant="regular" disabled>
|
|
126
|
-
Submitting...
|
|
127
|
-
</Button>
|
|
128
|
-
</Form>
|
|
129
|
-
),
|
|
130
297
|
};
|
|
131
298
|
|
|
132
299
|
export const CompleteForm: StoryObj<typeof Form> = {
|
|
133
|
-
|
|
134
|
-
|
|
300
|
+
render: () => {
|
|
301
|
+
const [formData, setFormData] = useState({
|
|
302
|
+
title: "",
|
|
303
|
+
description: "",
|
|
304
|
+
status: "",
|
|
305
|
+
priority: "",
|
|
306
|
+
});
|
|
307
|
+
const [errors, setErrors] = useState<Record<string, string>>({});
|
|
308
|
+
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
309
|
+
const [success, setSuccess] = useState<string | null>(null);
|
|
310
|
+
|
|
311
|
+
const validate = () => {
|
|
312
|
+
const newErrors: Record<string, string> = {};
|
|
313
|
+
if (!formData.title) newErrors.title = "Title is required";
|
|
314
|
+
if (!formData.description) newErrors.description = "Description is required";
|
|
315
|
+
if (!formData.status) newErrors.status = "Status is required";
|
|
316
|
+
setErrors(newErrors);
|
|
317
|
+
return Object.keys(newErrors).length === 0;
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
|
|
135
321
|
e.preventDefault();
|
|
136
|
-
|
|
322
|
+
if (!validate()) return;
|
|
323
|
+
|
|
324
|
+
setIsSubmitting(true);
|
|
325
|
+
setSuccess(null);
|
|
326
|
+
|
|
327
|
+
// Simulate API call
|
|
328
|
+
await new Promise(resolve => setTimeout(resolve, 1500));
|
|
329
|
+
|
|
330
|
+
setIsSubmitting(false);
|
|
331
|
+
setSuccess("Task created successfully!");
|
|
332
|
+
|
|
333
|
+
// Reset form after 2 seconds
|
|
334
|
+
setTimeout(() => {
|
|
335
|
+
setFormData({ title: "", description: "", status: "", priority: "" });
|
|
336
|
+
setSuccess(null);
|
|
337
|
+
}, 2000);
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
return (
|
|
341
|
+
<div className="space-y-4">
|
|
342
|
+
<Form
|
|
343
|
+
onSubmit={handleSubmit}
|
|
344
|
+
className="max-w-md space-y-4"
|
|
345
|
+
loading={isSubmitting}
|
|
346
|
+
success={success}
|
|
347
|
+
error={Object.keys(errors).length > 0 ? "Please fix the errors below" : null}
|
|
348
|
+
>
|
|
349
|
+
<div className="space-y-2">
|
|
350
|
+
<Label htmlFor="title" variant="required">
|
|
351
|
+
Title
|
|
352
|
+
</Label>
|
|
353
|
+
<Input
|
|
354
|
+
id="title"
|
|
355
|
+
name="title"
|
|
356
|
+
value={formData.title}
|
|
357
|
+
onChange={(e) => {
|
|
358
|
+
setFormData({ ...formData, title: e.target.value });
|
|
359
|
+
if (errors.title) setErrors({ ...errors, title: "" });
|
|
360
|
+
}}
|
|
361
|
+
placeholder="Enter title"
|
|
362
|
+
error={!!errors.title}
|
|
363
|
+
disabled={isSubmitting}
|
|
364
|
+
/>
|
|
365
|
+
{errors.title && <ErrorMessage message={errors.title} />}
|
|
366
|
+
</div>
|
|
367
|
+
<div className="space-y-2">
|
|
368
|
+
<Label htmlFor="description" variant="required">
|
|
369
|
+
Description
|
|
370
|
+
</Label>
|
|
371
|
+
<Textarea
|
|
372
|
+
id="description"
|
|
373
|
+
name="description"
|
|
374
|
+
value={formData.description}
|
|
375
|
+
onChange={(e) => {
|
|
376
|
+
setFormData({ ...formData, description: e.target.value });
|
|
377
|
+
if (errors.description) setErrors({ ...errors, description: "" });
|
|
378
|
+
}}
|
|
379
|
+
rows={4}
|
|
380
|
+
placeholder="Enter description"
|
|
381
|
+
error={!!errors.description}
|
|
382
|
+
disabled={isSubmitting}
|
|
383
|
+
/>
|
|
384
|
+
{errors.description && <ErrorMessage message={errors.description} />}
|
|
385
|
+
</div>
|
|
386
|
+
<div className="space-y-2">
|
|
387
|
+
<Label htmlFor="status" variant="required">
|
|
388
|
+
Status
|
|
389
|
+
</Label>
|
|
390
|
+
<Select
|
|
391
|
+
id="status"
|
|
392
|
+
name="status"
|
|
393
|
+
value={formData.status}
|
|
394
|
+
onChange={(e) => {
|
|
395
|
+
setFormData({ ...formData, status: e.target.value });
|
|
396
|
+
if (errors.status) setErrors({ ...errors, status: "" });
|
|
397
|
+
}}
|
|
398
|
+
options={[
|
|
399
|
+
{ value: "DRAFT", label: "Draft" },
|
|
400
|
+
{ value: "ACTIVE", label: "Active" },
|
|
401
|
+
{ value: "COMPLETED", label: "Completed" },
|
|
402
|
+
]}
|
|
403
|
+
placeholder="Select status"
|
|
404
|
+
error={!!errors.status}
|
|
405
|
+
disabled={isSubmitting}
|
|
406
|
+
/>
|
|
407
|
+
{errors.status && <ErrorMessage message={errors.status} />}
|
|
408
|
+
</div>
|
|
409
|
+
<div className="space-y-2">
|
|
410
|
+
<Label htmlFor="priority" variant="optional">
|
|
411
|
+
Priority
|
|
412
|
+
</Label>
|
|
413
|
+
<Select
|
|
414
|
+
id="priority"
|
|
415
|
+
name="priority"
|
|
416
|
+
value={formData.priority}
|
|
417
|
+
onChange={(e) => setFormData({ ...formData, priority: e.target.value })}
|
|
418
|
+
options={[
|
|
419
|
+
{ value: "LOW", label: "Low" },
|
|
420
|
+
{ value: "MEDIUM", label: "Medium" },
|
|
421
|
+
{ value: "HIGH", label: "High" },
|
|
422
|
+
]}
|
|
423
|
+
placeholder="Select priority"
|
|
424
|
+
disabled={isSubmitting}
|
|
425
|
+
/>
|
|
426
|
+
</div>
|
|
427
|
+
<div className="flex gap-2">
|
|
428
|
+
<Button type="submit" variant="regular" disabled={isSubmitting}>
|
|
429
|
+
{isSubmitting ? "Creating..." : "Create Task"}
|
|
430
|
+
</Button>
|
|
431
|
+
<Button
|
|
432
|
+
type="button"
|
|
433
|
+
variant="secondary"
|
|
434
|
+
onClick={() => {
|
|
435
|
+
setFormData({ title: "", description: "", status: "", priority: "" });
|
|
436
|
+
setErrors({});
|
|
437
|
+
}}
|
|
438
|
+
disabled={isSubmitting}
|
|
439
|
+
>
|
|
440
|
+
Reset
|
|
441
|
+
</Button>
|
|
442
|
+
</div>
|
|
443
|
+
</Form>
|
|
444
|
+
{Object.keys(formData).some(key => formData[key as keyof typeof formData]) && (
|
|
445
|
+
<div className="max-w-md text-sm text-gray-600 p-4 bg-gray-50 rounded">
|
|
446
|
+
<strong>Form Data:</strong>
|
|
447
|
+
<pre className="mt-2 text-xs">{JSON.stringify(formData, null, 2)}</pre>
|
|
448
|
+
</div>
|
|
449
|
+
)}
|
|
450
|
+
</div>
|
|
451
|
+
);
|
|
452
|
+
},
|
|
453
|
+
parameters: {
|
|
454
|
+
docs: {
|
|
455
|
+
description: {
|
|
456
|
+
story: "Complete form with real validation, loading state, and success message. Try submitting with empty fields to see validation errors.",
|
|
457
|
+
},
|
|
137
458
|
},
|
|
138
459
|
},
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
460
|
+
};
|
|
461
|
+
|
|
462
|
+
export const RegistrationForm: StoryObj<typeof Form> = {
|
|
463
|
+
render: () => {
|
|
464
|
+
const [formData, setFormData] = useState({
|
|
465
|
+
firstName: "",
|
|
466
|
+
lastName: "",
|
|
467
|
+
email: "",
|
|
468
|
+
password: "",
|
|
469
|
+
country: "",
|
|
470
|
+
bio: "",
|
|
471
|
+
});
|
|
472
|
+
const [errors, setErrors] = useState<Record<string, string>>({});
|
|
473
|
+
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
474
|
+
const [success, setSuccess] = useState<string | null>(null);
|
|
475
|
+
|
|
476
|
+
const validate = () => {
|
|
477
|
+
const newErrors: Record<string, string> = {};
|
|
478
|
+
if (!formData.firstName) newErrors.firstName = "First name is required";
|
|
479
|
+
if (!formData.lastName) newErrors.lastName = "Last name is required";
|
|
480
|
+
if (!formData.email) {
|
|
481
|
+
newErrors.email = "Email is required";
|
|
482
|
+
} else if (!formData.email.includes("@")) {
|
|
483
|
+
newErrors.email = "Please enter a valid email";
|
|
484
|
+
}
|
|
485
|
+
if (!formData.password) {
|
|
486
|
+
newErrors.password = "Password is required";
|
|
487
|
+
} else if (formData.password.length < 8) {
|
|
488
|
+
newErrors.password = "Password must be at least 8 characters";
|
|
489
|
+
}
|
|
490
|
+
setErrors(newErrors);
|
|
491
|
+
return Object.keys(newErrors).length === 0;
|
|
492
|
+
};
|
|
493
|
+
|
|
494
|
+
const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
|
|
495
|
+
e.preventDefault();
|
|
496
|
+
if (!validate()) return;
|
|
497
|
+
|
|
498
|
+
setIsSubmitting(true);
|
|
499
|
+
setSuccess(null);
|
|
500
|
+
|
|
501
|
+
// Simulate API call
|
|
502
|
+
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
503
|
+
|
|
504
|
+
setIsSubmitting(false);
|
|
505
|
+
setSuccess("Registration successful! Welcome!");
|
|
506
|
+
|
|
507
|
+
// Reset form after 3 seconds
|
|
508
|
+
setTimeout(() => {
|
|
509
|
+
setFormData({ firstName: "", lastName: "", email: "", password: "", country: "", bio: "" });
|
|
510
|
+
setSuccess(null);
|
|
511
|
+
}, 3000);
|
|
512
|
+
};
|
|
513
|
+
|
|
514
|
+
return (
|
|
515
|
+
<Form
|
|
516
|
+
onSubmit={handleSubmit}
|
|
517
|
+
className="max-w-lg space-y-4"
|
|
518
|
+
loading={isSubmitting}
|
|
519
|
+
success={success}
|
|
520
|
+
error={Object.keys(errors).length > 0 ? "Please fix the errors below" : null}
|
|
521
|
+
>
|
|
522
|
+
<div className="space-y-2">
|
|
523
|
+
<Label htmlFor="firstName" variant="required">
|
|
524
|
+
First Name
|
|
525
|
+
</Label>
|
|
526
|
+
<Input
|
|
527
|
+
id="firstName"
|
|
528
|
+
name="firstName"
|
|
529
|
+
value={formData.firstName}
|
|
530
|
+
onChange={(e) => {
|
|
531
|
+
setFormData({ ...formData, firstName: e.target.value });
|
|
532
|
+
if (errors.firstName) setErrors({ ...errors, firstName: "" });
|
|
533
|
+
}}
|
|
534
|
+
placeholder="John"
|
|
535
|
+
error={!!errors.firstName}
|
|
536
|
+
disabled={isSubmitting}
|
|
537
|
+
/>
|
|
538
|
+
{errors.firstName && <ErrorMessage message={errors.firstName} />}
|
|
539
|
+
</div>
|
|
540
|
+
<div className="space-y-2">
|
|
541
|
+
<Label htmlFor="lastName" variant="required">
|
|
542
|
+
Last Name
|
|
543
|
+
</Label>
|
|
544
|
+
<Input
|
|
545
|
+
id="lastName"
|
|
546
|
+
name="lastName"
|
|
547
|
+
value={formData.lastName}
|
|
548
|
+
onChange={(e) => {
|
|
549
|
+
setFormData({ ...formData, lastName: e.target.value });
|
|
550
|
+
if (errors.lastName) setErrors({ ...errors, lastName: "" });
|
|
551
|
+
}}
|
|
552
|
+
placeholder="Doe"
|
|
553
|
+
error={!!errors.lastName}
|
|
554
|
+
disabled={isSubmitting}
|
|
555
|
+
/>
|
|
556
|
+
{errors.lastName && <ErrorMessage message={errors.lastName} />}
|
|
557
|
+
</div>
|
|
558
|
+
<div className="space-y-2">
|
|
559
|
+
<Label htmlFor="email" variant="required">
|
|
560
|
+
Email
|
|
561
|
+
</Label>
|
|
562
|
+
<Input
|
|
563
|
+
id="email"
|
|
564
|
+
name="email"
|
|
565
|
+
type="email"
|
|
566
|
+
value={formData.email}
|
|
567
|
+
onChange={(e) => {
|
|
568
|
+
setFormData({ ...formData, email: e.target.value });
|
|
569
|
+
if (errors.email) setErrors({ ...errors, email: "" });
|
|
570
|
+
}}
|
|
571
|
+
placeholder="john.doe@example.com"
|
|
572
|
+
error={!!errors.email}
|
|
573
|
+
disabled={isSubmitting}
|
|
574
|
+
/>
|
|
575
|
+
{errors.email && <ErrorMessage message={errors.email} />}
|
|
576
|
+
</div>
|
|
577
|
+
<div className="space-y-2">
|
|
578
|
+
<Label htmlFor="password" variant="required">
|
|
579
|
+
Password
|
|
580
|
+
</Label>
|
|
581
|
+
<Input
|
|
582
|
+
id="password"
|
|
583
|
+
name="password"
|
|
584
|
+
type="password"
|
|
585
|
+
value={formData.password}
|
|
586
|
+
onChange={(e) => {
|
|
587
|
+
setFormData({ ...formData, password: e.target.value });
|
|
588
|
+
if (errors.password) setErrors({ ...errors, password: "" });
|
|
589
|
+
}}
|
|
590
|
+
placeholder="Enter password (min 8 characters)"
|
|
591
|
+
error={!!errors.password}
|
|
592
|
+
disabled={isSubmitting}
|
|
593
|
+
/>
|
|
594
|
+
{errors.password && <ErrorMessage message={errors.password} />}
|
|
595
|
+
</div>
|
|
596
|
+
<div className="space-y-2">
|
|
597
|
+
<Label htmlFor="country" variant="optional">
|
|
598
|
+
Country
|
|
599
|
+
</Label>
|
|
600
|
+
<Select
|
|
601
|
+
id="country"
|
|
602
|
+
name="country"
|
|
603
|
+
value={formData.country}
|
|
604
|
+
onChange={(e) => setFormData({ ...formData, country: e.target.value })}
|
|
605
|
+
options={[
|
|
606
|
+
{ value: "US", label: "United States" },
|
|
607
|
+
{ value: "BR", label: "Brazil" },
|
|
608
|
+
{ value: "UK", label: "United Kingdom" },
|
|
609
|
+
]}
|
|
610
|
+
placeholder="Select country"
|
|
611
|
+
disabled={isSubmitting}
|
|
612
|
+
/>
|
|
613
|
+
</div>
|
|
614
|
+
<div className="space-y-2">
|
|
615
|
+
<Label htmlFor="bio" variant="optional">
|
|
616
|
+
Bio
|
|
617
|
+
</Label>
|
|
618
|
+
<Textarea
|
|
619
|
+
id="bio"
|
|
620
|
+
name="bio"
|
|
621
|
+
value={formData.bio}
|
|
622
|
+
onChange={(e) => setFormData({ ...formData, bio: e.target.value })}
|
|
623
|
+
rows={4}
|
|
624
|
+
placeholder="Tell us about yourself"
|
|
625
|
+
disabled={isSubmitting}
|
|
626
|
+
/>
|
|
627
|
+
</div>
|
|
628
|
+
<div className="flex gap-2">
|
|
629
|
+
<Button type="submit" variant="regular" disabled={isSubmitting}>
|
|
630
|
+
{isSubmitting ? "Registering..." : "Register"}
|
|
631
|
+
</Button>
|
|
632
|
+
<Button
|
|
633
|
+
type="button"
|
|
634
|
+
variant="secondary"
|
|
635
|
+
onClick={() => {
|
|
636
|
+
setFormData({ firstName: "", lastName: "", email: "", password: "", country: "", bio: "" });
|
|
637
|
+
setErrors({});
|
|
638
|
+
}}
|
|
639
|
+
disabled={isSubmitting}
|
|
640
|
+
>
|
|
641
|
+
Clear
|
|
642
|
+
</Button>
|
|
643
|
+
</div>
|
|
644
|
+
</Form>
|
|
645
|
+
);
|
|
646
|
+
},
|
|
647
|
+
parameters: {
|
|
648
|
+
docs: {
|
|
649
|
+
description: {
|
|
650
|
+
story: 'Complete registration form with real validation. Try submitting with invalid data to see validation errors, or fill all required fields to see success.',
|
|
651
|
+
},
|
|
652
|
+
},
|
|
653
|
+
},
|
|
654
|
+
};
|
|
655
|
+
|
|
656
|
+
export const ContactForm: StoryObj<typeof Form> = {
|
|
657
|
+
render: () => {
|
|
658
|
+
const [formData, setFormData] = useState({
|
|
659
|
+
name: "",
|
|
660
|
+
email: "",
|
|
661
|
+
subject: "",
|
|
662
|
+
message: "",
|
|
663
|
+
});
|
|
664
|
+
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
665
|
+
const [success, setSuccess] = useState<string | null>(null);
|
|
666
|
+
|
|
667
|
+
const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
|
|
668
|
+
e.preventDefault();
|
|
669
|
+
setIsSubmitting(true);
|
|
670
|
+
setSuccess(null);
|
|
671
|
+
|
|
672
|
+
// Simulate API call
|
|
673
|
+
await new Promise(resolve => setTimeout(resolve, 1500));
|
|
674
|
+
|
|
675
|
+
setIsSubmitting(false);
|
|
676
|
+
setSuccess("Message sent successfully! We'll get back to you soon.");
|
|
677
|
+
|
|
678
|
+
// Reset form after 3 seconds
|
|
679
|
+
setTimeout(() => {
|
|
680
|
+
setFormData({ name: "", email: "", subject: "", message: "" });
|
|
681
|
+
setSuccess(null);
|
|
682
|
+
}, 3000);
|
|
683
|
+
};
|
|
684
|
+
|
|
685
|
+
return (
|
|
686
|
+
<Form
|
|
687
|
+
onSubmit={handleSubmit}
|
|
688
|
+
className="max-w-md space-y-4"
|
|
689
|
+
loading={isSubmitting}
|
|
690
|
+
success={success}
|
|
691
|
+
>
|
|
692
|
+
<div className="space-y-2">
|
|
693
|
+
<Label htmlFor="contactName" variant="required">
|
|
694
|
+
Name
|
|
695
|
+
</Label>
|
|
696
|
+
<Input
|
|
697
|
+
id="contactName"
|
|
698
|
+
name="name"
|
|
699
|
+
value={formData.name}
|
|
700
|
+
onChange={(e) => setFormData({ ...formData, name: e.target.value })}
|
|
701
|
+
placeholder="Your name"
|
|
702
|
+
disabled={isSubmitting}
|
|
703
|
+
required
|
|
704
|
+
/>
|
|
705
|
+
</div>
|
|
706
|
+
<div className="space-y-2">
|
|
707
|
+
<Label htmlFor="contactEmail" variant="required">
|
|
708
|
+
Email
|
|
709
|
+
</Label>
|
|
710
|
+
<Input
|
|
711
|
+
id="contactEmail"
|
|
712
|
+
name="email"
|
|
713
|
+
type="email"
|
|
714
|
+
value={formData.email}
|
|
715
|
+
onChange={(e) => setFormData({ ...formData, email: e.target.value })}
|
|
716
|
+
placeholder="your.email@example.com"
|
|
717
|
+
disabled={isSubmitting}
|
|
718
|
+
required
|
|
719
|
+
/>
|
|
720
|
+
</div>
|
|
721
|
+
<div className="space-y-2">
|
|
722
|
+
<Label htmlFor="subject" variant="required">
|
|
723
|
+
Subject
|
|
724
|
+
</Label>
|
|
725
|
+
<Input
|
|
726
|
+
id="subject"
|
|
727
|
+
name="subject"
|
|
728
|
+
value={formData.subject}
|
|
729
|
+
onChange={(e) => setFormData({ ...formData, subject: e.target.value })}
|
|
730
|
+
placeholder="Message subject"
|
|
731
|
+
disabled={isSubmitting}
|
|
732
|
+
required
|
|
733
|
+
/>
|
|
734
|
+
</div>
|
|
735
|
+
<div className="space-y-2">
|
|
736
|
+
<Label htmlFor="message" variant="required">
|
|
737
|
+
Message
|
|
738
|
+
</Label>
|
|
739
|
+
<Textarea
|
|
740
|
+
id="message"
|
|
741
|
+
name="message"
|
|
742
|
+
value={formData.message}
|
|
743
|
+
onChange={(e) => setFormData({ ...formData, message: e.target.value })}
|
|
744
|
+
rows={6}
|
|
745
|
+
placeholder="Your message"
|
|
746
|
+
disabled={isSubmitting}
|
|
747
|
+
required
|
|
748
|
+
/>
|
|
749
|
+
</div>
|
|
750
|
+
<Button type="submit" variant="regular" fullWidth disabled={isSubmitting}>
|
|
751
|
+
{isSubmitting ? "Sending..." : "Send Message"}
|
|
752
|
+
</Button>
|
|
753
|
+
</Form>
|
|
754
|
+
);
|
|
755
|
+
},
|
|
756
|
+
parameters: {
|
|
757
|
+
docs: {
|
|
758
|
+
description: {
|
|
759
|
+
story: 'Contact form with real submission flow. Fill in the form and submit to see the loading state and success message.',
|
|
760
|
+
},
|
|
761
|
+
},
|
|
762
|
+
},
|
|
763
|
+
};
|
|
764
|
+
|
|
765
|
+
export const MultipleErrors: StoryObj<typeof Form> = {
|
|
766
|
+
render: () => {
|
|
767
|
+
const [formData, setFormData] = useState({
|
|
768
|
+
name: "",
|
|
769
|
+
email: "",
|
|
770
|
+
phone: "",
|
|
771
|
+
});
|
|
772
|
+
const [errors, setErrors] = useState<Record<string, string>>({});
|
|
773
|
+
const [touched, setTouched] = useState<Record<string, boolean>>({});
|
|
774
|
+
|
|
775
|
+
const validate = () => {
|
|
776
|
+
const newErrors: Record<string, string> = {};
|
|
777
|
+
if (!formData.name) newErrors.name = "Name is required";
|
|
778
|
+
if (!formData.email) {
|
|
779
|
+
newErrors.email = "Email is required";
|
|
780
|
+
} else if (!formData.email.includes("@")) {
|
|
781
|
+
newErrors.email = "Please enter a valid email";
|
|
782
|
+
}
|
|
783
|
+
if (!formData.phone) {
|
|
784
|
+
newErrors.phone = "Phone is required";
|
|
785
|
+
} else if (!/^\d{10,}$/.test(formData.phone.replace(/\D/g, ""))) {
|
|
786
|
+
newErrors.phone = "Please enter a valid phone number";
|
|
787
|
+
}
|
|
788
|
+
setErrors(newErrors);
|
|
789
|
+
return Object.keys(newErrors).length === 0;
|
|
790
|
+
};
|
|
791
|
+
|
|
792
|
+
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
|
793
|
+
e.preventDefault();
|
|
794
|
+
if (validate()) {
|
|
795
|
+
alert("Form is valid! Data: " + JSON.stringify(formData));
|
|
796
|
+
}
|
|
797
|
+
};
|
|
798
|
+
|
|
799
|
+
const handleBlur = (field: string) => {
|
|
800
|
+
setTouched({ ...touched, [field]: true });
|
|
801
|
+
validate();
|
|
802
|
+
};
|
|
803
|
+
|
|
804
|
+
return (
|
|
805
|
+
<Form
|
|
806
|
+
onSubmit={handleSubmit}
|
|
807
|
+
className="max-w-md"
|
|
808
|
+
error={Object.keys(errors).length > 0 && Object.values(touched).some(t => t) ? "Please fix all errors below" : null}
|
|
809
|
+
>
|
|
810
|
+
<div className="space-y-2">
|
|
811
|
+
<Label htmlFor="name" variant="required">
|
|
812
|
+
Name
|
|
813
|
+
</Label>
|
|
814
|
+
<Input
|
|
815
|
+
id="name"
|
|
816
|
+
name="name"
|
|
817
|
+
value={formData.name}
|
|
818
|
+
onChange={(e) => {
|
|
819
|
+
setFormData({ ...formData, name: e.target.value });
|
|
820
|
+
if (errors.name && touched.name) setErrors({ ...errors, name: "" });
|
|
821
|
+
}}
|
|
822
|
+
onBlur={() => handleBlur("name")}
|
|
823
|
+
error={!!errors.name && touched.name}
|
|
824
|
+
/>
|
|
825
|
+
{errors.name && touched.name && <ErrorMessage message={errors.name} />}
|
|
826
|
+
</div>
|
|
827
|
+
<div className="space-y-2">
|
|
828
|
+
<Label htmlFor="email" variant="required">
|
|
829
|
+
Email
|
|
830
|
+
</Label>
|
|
831
|
+
<Input
|
|
832
|
+
id="email"
|
|
833
|
+
name="email"
|
|
834
|
+
type="email"
|
|
835
|
+
value={formData.email}
|
|
836
|
+
onChange={(e) => {
|
|
837
|
+
setFormData({ ...formData, email: e.target.value });
|
|
838
|
+
if (errors.email && touched.email) setErrors({ ...errors, email: "" });
|
|
839
|
+
}}
|
|
840
|
+
onBlur={() => handleBlur("email")}
|
|
841
|
+
error={!!errors.email && touched.email}
|
|
842
|
+
/>
|
|
843
|
+
{errors.email && touched.email && <ErrorMessage message={errors.email} />}
|
|
844
|
+
</div>
|
|
845
|
+
<div className="space-y-2">
|
|
846
|
+
<Label htmlFor="phone" variant="required">
|
|
847
|
+
Phone
|
|
848
|
+
</Label>
|
|
849
|
+
<Input
|
|
850
|
+
id="phone"
|
|
851
|
+
name="phone"
|
|
852
|
+
type="tel"
|
|
853
|
+
value={formData.phone}
|
|
854
|
+
onChange={(e) => {
|
|
855
|
+
setFormData({ ...formData, phone: e.target.value });
|
|
856
|
+
if (errors.phone && touched.phone) setErrors({ ...errors, phone: "" });
|
|
857
|
+
}}
|
|
858
|
+
onBlur={() => handleBlur("phone")}
|
|
859
|
+
error={!!errors.phone && touched.phone}
|
|
860
|
+
placeholder="(123) 456-7890"
|
|
861
|
+
/>
|
|
862
|
+
{errors.phone && touched.phone && <ErrorMessage message={errors.phone} />}
|
|
863
|
+
</div>
|
|
864
|
+
<Button type="submit" variant="regular">
|
|
865
|
+
Submit
|
|
866
|
+
</Button>
|
|
867
|
+
</Form>
|
|
868
|
+
);
|
|
869
|
+
},
|
|
870
|
+
parameters: {
|
|
871
|
+
docs: {
|
|
872
|
+
description: {
|
|
873
|
+
story: "Form with multiple validation errors. Try submitting with empty fields or invalid data to see all validation errors at once.",
|
|
874
|
+
},
|
|
875
|
+
},
|
|
876
|
+
},
|
|
877
|
+
};
|
|
878
|
+
|
|
879
|
+
export const Accessibility: StoryObj<typeof Form> = {
|
|
880
|
+
render: () => {
|
|
881
|
+
const [name, setName] = useState("");
|
|
882
|
+
const [email, setEmail] = useState("");
|
|
883
|
+
const [emailError, setEmailError] = useState("");
|
|
884
|
+
|
|
885
|
+
const validateEmail = (value: string) => {
|
|
886
|
+
if (!value) {
|
|
887
|
+
setEmailError("Email is required");
|
|
888
|
+
return false;
|
|
889
|
+
}
|
|
890
|
+
if (!value.includes("@")) {
|
|
891
|
+
setEmailError("Please enter a valid email address");
|
|
892
|
+
return false;
|
|
893
|
+
}
|
|
894
|
+
setEmailError("");
|
|
895
|
+
return true;
|
|
896
|
+
};
|
|
897
|
+
|
|
898
|
+
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
|
899
|
+
e.preventDefault();
|
|
900
|
+
if (validateEmail(email)) {
|
|
901
|
+
alert("Form submitted! Try using keyboard navigation: Tab to navigate, Enter to submit.");
|
|
902
|
+
}
|
|
903
|
+
};
|
|
904
|
+
|
|
905
|
+
return (
|
|
906
|
+
<div className="space-y-4">
|
|
907
|
+
<Form onSubmit={handleSubmit} className="max-w-md">
|
|
908
|
+
<div className="space-y-2">
|
|
909
|
+
<Label htmlFor="acc-name" variant="required">
|
|
910
|
+
Name
|
|
911
|
+
</Label>
|
|
912
|
+
<Input
|
|
913
|
+
id="acc-name"
|
|
914
|
+
name="name"
|
|
915
|
+
value={name}
|
|
916
|
+
onChange={(e) => setName(e.target.value)}
|
|
917
|
+
placeholder="Enter your name"
|
|
918
|
+
required
|
|
919
|
+
/>
|
|
920
|
+
</div>
|
|
921
|
+
<div className="space-y-2">
|
|
922
|
+
<Label htmlFor="acc-email" variant="required">
|
|
923
|
+
Email
|
|
924
|
+
</Label>
|
|
925
|
+
<Input
|
|
926
|
+
id="acc-email"
|
|
927
|
+
name="email"
|
|
928
|
+
type="email"
|
|
929
|
+
value={email}
|
|
930
|
+
onChange={(e) => {
|
|
931
|
+
setEmail(e.target.value);
|
|
932
|
+
if (emailError) validateEmail(e.target.value);
|
|
933
|
+
}}
|
|
934
|
+
onBlur={() => validateEmail(email)}
|
|
935
|
+
error={!!emailError}
|
|
936
|
+
aria-invalid={!!emailError}
|
|
937
|
+
aria-describedby={emailError ? "acc-email-error" : undefined}
|
|
938
|
+
placeholder="Enter your email"
|
|
939
|
+
required
|
|
940
|
+
/>
|
|
941
|
+
{emailError && (
|
|
942
|
+
<ErrorMessage message={emailError} id="acc-email-error" />
|
|
943
|
+
)}
|
|
944
|
+
</div>
|
|
945
|
+
<Button type="submit" variant="regular">
|
|
946
|
+
Submit
|
|
947
|
+
</Button>
|
|
948
|
+
</Form>
|
|
949
|
+
<div className="max-w-md text-sm text-gray-600 space-y-2 p-4 bg-gray-50 rounded">
|
|
950
|
+
<p><strong>Accessibility Features:</strong></p>
|
|
951
|
+
<ul className="list-disc list-inside space-y-1">
|
|
952
|
+
<li>Tab navigation between fields</li>
|
|
953
|
+
<li>Enter key to submit form</li>
|
|
954
|
+
<li>ARIA attributes for error states</li>
|
|
955
|
+
<li>Labels properly associated with inputs</li>
|
|
956
|
+
<li>Error messages announced by screen readers</li>
|
|
957
|
+
</ul>
|
|
958
|
+
</div>
|
|
146
959
|
</div>
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
960
|
+
);
|
|
961
|
+
},
|
|
962
|
+
parameters: {
|
|
963
|
+
docs: {
|
|
964
|
+
description: {
|
|
965
|
+
story: "Form demonstrating accessibility features. Try keyboard navigation (Tab to move, Enter to submit) and screen reader compatibility.",
|
|
966
|
+
},
|
|
967
|
+
},
|
|
968
|
+
},
|
|
969
|
+
};
|
|
970
|
+
|
|
971
|
+
export const WithReactHookForm: StoryObj<typeof Form> = {
|
|
972
|
+
render: () => {
|
|
973
|
+
type FormData = {
|
|
974
|
+
name: string;
|
|
975
|
+
email: string;
|
|
976
|
+
message: string;
|
|
977
|
+
};
|
|
978
|
+
|
|
979
|
+
const form = useForm<FormData>({
|
|
980
|
+
defaultValues: {
|
|
981
|
+
name: '',
|
|
982
|
+
email: '',
|
|
983
|
+
message: '',
|
|
984
|
+
},
|
|
985
|
+
});
|
|
986
|
+
|
|
987
|
+
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
988
|
+
const [success, setSuccess] = useState<string | null>(null);
|
|
989
|
+
|
|
990
|
+
const onSubmit = async (data: FormData) => {
|
|
991
|
+
setIsSubmitting(true);
|
|
992
|
+
setSuccess(null);
|
|
993
|
+
|
|
994
|
+
// Simulate API call
|
|
995
|
+
await new Promise(resolve => setTimeout(resolve, 1500));
|
|
996
|
+
|
|
997
|
+
setIsSubmitting(false);
|
|
998
|
+
setSuccess(`Form submitted! Data: ${JSON.stringify(data)}`);
|
|
999
|
+
|
|
1000
|
+
// Reset form after 3 seconds
|
|
1001
|
+
setTimeout(() => {
|
|
1002
|
+
form.reset();
|
|
1003
|
+
setSuccess(null);
|
|
1004
|
+
}, 3000);
|
|
1005
|
+
};
|
|
1006
|
+
|
|
1007
|
+
return (
|
|
1008
|
+
<div className="space-y-4">
|
|
1009
|
+
<Form
|
|
1010
|
+
form={form}
|
|
1011
|
+
onSubmit={onSubmit}
|
|
1012
|
+
loading={isSubmitting}
|
|
1013
|
+
success={success}
|
|
1014
|
+
className="max-w-md"
|
|
1015
|
+
>
|
|
1016
|
+
<FormField<FormData>
|
|
1017
|
+
name="name"
|
|
1018
|
+
label="Name"
|
|
1019
|
+
rules={{ required: 'Name is required' }}
|
|
1020
|
+
>
|
|
1021
|
+
{({ register, error }) => (
|
|
1022
|
+
<>
|
|
1023
|
+
<Input
|
|
1024
|
+
id="name"
|
|
1025
|
+
{...register('name')}
|
|
1026
|
+
error={!!error}
|
|
1027
|
+
helperText={error}
|
|
1028
|
+
disabled={isSubmitting}
|
|
1029
|
+
/>
|
|
1030
|
+
</>
|
|
1031
|
+
)}
|
|
1032
|
+
</FormField>
|
|
1033
|
+
|
|
1034
|
+
<FormField<FormData>
|
|
1035
|
+
name="email"
|
|
1036
|
+
label="Email"
|
|
1037
|
+
rules={{
|
|
1038
|
+
required: 'Email is required',
|
|
1039
|
+
pattern: {
|
|
1040
|
+
value: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,
|
|
1041
|
+
message: 'Invalid email address',
|
|
1042
|
+
},
|
|
1043
|
+
}}
|
|
1044
|
+
>
|
|
1045
|
+
{({ register, error }) => (
|
|
1046
|
+
<>
|
|
1047
|
+
<Input
|
|
1048
|
+
id="email"
|
|
1049
|
+
type="email"
|
|
1050
|
+
{...register('email')}
|
|
1051
|
+
error={!!error}
|
|
1052
|
+
helperText={error}
|
|
1053
|
+
disabled={isSubmitting}
|
|
1054
|
+
/>
|
|
1055
|
+
</>
|
|
1056
|
+
)}
|
|
1057
|
+
</FormField>
|
|
1058
|
+
|
|
1059
|
+
<FormField<FormData>
|
|
1060
|
+
name="message"
|
|
1061
|
+
label="Message"
|
|
1062
|
+
rules={{
|
|
1063
|
+
required: 'Message is required',
|
|
1064
|
+
minLength: {
|
|
1065
|
+
value: 10,
|
|
1066
|
+
message: 'Message must be at least 10 characters',
|
|
1067
|
+
},
|
|
1068
|
+
}}
|
|
1069
|
+
>
|
|
1070
|
+
{({ register, error }) => (
|
|
1071
|
+
<>
|
|
1072
|
+
<Textarea
|
|
1073
|
+
id="message"
|
|
1074
|
+
{...register('message')}
|
|
1075
|
+
error={!!error}
|
|
1076
|
+
rows={4}
|
|
1077
|
+
disabled={isSubmitting}
|
|
1078
|
+
/>
|
|
1079
|
+
{error && <ErrorMessage message={error} />}
|
|
1080
|
+
</>
|
|
1081
|
+
)}
|
|
1082
|
+
</FormField>
|
|
1083
|
+
|
|
1084
|
+
<Button type="submit" variant="primary" disabled={isSubmitting}>
|
|
1085
|
+
{isSubmitting ? 'Submitting...' : 'Submit'}
|
|
1086
|
+
</Button>
|
|
1087
|
+
</Form>
|
|
1088
|
+
<div className="max-w-md text-sm text-gray-600 p-4 bg-gray-50 rounded">
|
|
1089
|
+
<strong>Form Values:</strong>
|
|
1090
|
+
<pre className="mt-2 text-xs">{JSON.stringify(form.watch(), null, 2)}</pre>
|
|
1091
|
+
</div>
|
|
152
1092
|
</div>
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
1093
|
+
);
|
|
1094
|
+
},
|
|
1095
|
+
parameters: {
|
|
1096
|
+
docs: {
|
|
1097
|
+
description: {
|
|
1098
|
+
story: 'Form with react-hook-form integration. Demonstrates validation rules, error handling, and form state management.',
|
|
1099
|
+
},
|
|
1100
|
+
},
|
|
1101
|
+
},
|
|
1102
|
+
};
|
|
1103
|
+
|
|
1104
|
+
export const ReactHookFormWithComplexValidation: StoryObj<typeof Form> = {
|
|
1105
|
+
render: () => {
|
|
1106
|
+
type RegistrationData = {
|
|
1107
|
+
firstName: string;
|
|
1108
|
+
lastName: string;
|
|
1109
|
+
email: string;
|
|
1110
|
+
password: string;
|
|
1111
|
+
confirmPassword: string;
|
|
1112
|
+
age: string;
|
|
1113
|
+
};
|
|
1114
|
+
|
|
1115
|
+
const form = useForm<RegistrationData>({
|
|
1116
|
+
defaultValues: {
|
|
1117
|
+
firstName: '',
|
|
1118
|
+
lastName: '',
|
|
1119
|
+
email: '',
|
|
1120
|
+
password: '',
|
|
1121
|
+
confirmPassword: '',
|
|
1122
|
+
age: '',
|
|
1123
|
+
},
|
|
1124
|
+
});
|
|
1125
|
+
|
|
1126
|
+
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
1127
|
+
const [success, setSuccess] = useState<string | null>(null);
|
|
1128
|
+
|
|
1129
|
+
const password = form.watch('password');
|
|
1130
|
+
|
|
1131
|
+
const onSubmit = async (data: RegistrationData) => {
|
|
1132
|
+
setIsSubmitting(true);
|
|
1133
|
+
setSuccess(null);
|
|
1134
|
+
|
|
1135
|
+
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
1136
|
+
|
|
1137
|
+
setIsSubmitting(false);
|
|
1138
|
+
setSuccess('Registration successful!');
|
|
1139
|
+
|
|
1140
|
+
setTimeout(() => {
|
|
1141
|
+
form.reset();
|
|
1142
|
+
setSuccess(null);
|
|
1143
|
+
}, 3000);
|
|
1144
|
+
};
|
|
1145
|
+
|
|
1146
|
+
return (
|
|
1147
|
+
<div className="space-y-4">
|
|
1148
|
+
<Form
|
|
1149
|
+
form={form}
|
|
1150
|
+
onSubmit={onSubmit}
|
|
1151
|
+
loading={isSubmitting}
|
|
1152
|
+
success={success}
|
|
1153
|
+
className="max-w-md"
|
|
1154
|
+
>
|
|
1155
|
+
<FormField<RegistrationData>
|
|
1156
|
+
name="firstName"
|
|
1157
|
+
label="First Name"
|
|
1158
|
+
rules={{ required: 'First name is required' }}
|
|
1159
|
+
>
|
|
1160
|
+
{({ register, error }) => (
|
|
1161
|
+
<Input
|
|
1162
|
+
id="firstName"
|
|
1163
|
+
{...register('firstName')}
|
|
1164
|
+
error={!!error}
|
|
1165
|
+
helperText={error}
|
|
1166
|
+
disabled={isSubmitting}
|
|
1167
|
+
/>
|
|
1168
|
+
)}
|
|
1169
|
+
</FormField>
|
|
1170
|
+
|
|
1171
|
+
<FormField<RegistrationData>
|
|
1172
|
+
name="lastName"
|
|
1173
|
+
label="Last Name"
|
|
1174
|
+
rules={{ required: 'Last name is required' }}
|
|
1175
|
+
>
|
|
1176
|
+
{({ register, error }) => (
|
|
1177
|
+
<Input
|
|
1178
|
+
id="lastName"
|
|
1179
|
+
{...register('lastName')}
|
|
1180
|
+
error={!!error}
|
|
1181
|
+
helperText={error}
|
|
1182
|
+
disabled={isSubmitting}
|
|
1183
|
+
/>
|
|
1184
|
+
)}
|
|
1185
|
+
</FormField>
|
|
1186
|
+
|
|
1187
|
+
<FormField<RegistrationData>
|
|
1188
|
+
name="email"
|
|
1189
|
+
label="Email"
|
|
1190
|
+
rules={{
|
|
1191
|
+
required: 'Email is required',
|
|
1192
|
+
pattern: {
|
|
1193
|
+
value: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,
|
|
1194
|
+
message: 'Invalid email address',
|
|
1195
|
+
},
|
|
1196
|
+
}}
|
|
1197
|
+
>
|
|
1198
|
+
{({ register, error }) => (
|
|
1199
|
+
<Input
|
|
1200
|
+
id="email"
|
|
1201
|
+
type="email"
|
|
1202
|
+
{...register('email')}
|
|
1203
|
+
error={!!error}
|
|
1204
|
+
helperText={error}
|
|
1205
|
+
disabled={isSubmitting}
|
|
1206
|
+
/>
|
|
1207
|
+
)}
|
|
1208
|
+
</FormField>
|
|
1209
|
+
|
|
1210
|
+
<FormField<RegistrationData>
|
|
1211
|
+
name="age"
|
|
1212
|
+
label="Age"
|
|
1213
|
+
rules={{
|
|
1214
|
+
required: 'Age is required',
|
|
1215
|
+
min: { value: 18, message: 'Must be at least 18 years old' },
|
|
1216
|
+
max: { value: 120, message: 'Invalid age' },
|
|
1217
|
+
valueAsNumber: true,
|
|
1218
|
+
}}
|
|
1219
|
+
>
|
|
1220
|
+
{({ register, error }) => (
|
|
1221
|
+
<Input
|
|
1222
|
+
id="age"
|
|
1223
|
+
type="number"
|
|
1224
|
+
{...register('age', { valueAsNumber: true })}
|
|
1225
|
+
error={!!error}
|
|
1226
|
+
helperText={error}
|
|
1227
|
+
disabled={isSubmitting}
|
|
1228
|
+
/>
|
|
1229
|
+
)}
|
|
1230
|
+
</FormField>
|
|
1231
|
+
|
|
1232
|
+
<FormField<RegistrationData>
|
|
1233
|
+
name="password"
|
|
1234
|
+
label="Password"
|
|
1235
|
+
rules={{
|
|
1236
|
+
required: 'Password is required',
|
|
1237
|
+
minLength: {
|
|
1238
|
+
value: 8,
|
|
1239
|
+
message: 'Password must be at least 8 characters',
|
|
1240
|
+
},
|
|
1241
|
+
pattern: {
|
|
1242
|
+
value: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/,
|
|
1243
|
+
message: 'Password must contain uppercase, lowercase, and number',
|
|
1244
|
+
},
|
|
1245
|
+
}}
|
|
1246
|
+
>
|
|
1247
|
+
{({ register, error }) => (
|
|
1248
|
+
<Input
|
|
1249
|
+
id="password"
|
|
1250
|
+
type="password"
|
|
1251
|
+
{...register('password')}
|
|
1252
|
+
error={!!error}
|
|
1253
|
+
helperText={error}
|
|
1254
|
+
disabled={isSubmitting}
|
|
1255
|
+
/>
|
|
1256
|
+
)}
|
|
1257
|
+
</FormField>
|
|
1258
|
+
|
|
1259
|
+
<FormField<RegistrationData>
|
|
1260
|
+
name="confirmPassword"
|
|
1261
|
+
label="Confirm Password"
|
|
1262
|
+
rules={{
|
|
1263
|
+
required: 'Please confirm your password',
|
|
1264
|
+
validate: (value) =>
|
|
1265
|
+
value === password || 'Passwords do not match',
|
|
1266
|
+
}}
|
|
1267
|
+
>
|
|
1268
|
+
{({ register, error }) => (
|
|
1269
|
+
<Input
|
|
1270
|
+
id="confirmPassword"
|
|
1271
|
+
type="password"
|
|
1272
|
+
{...register('confirmPassword')}
|
|
1273
|
+
error={!!error}
|
|
1274
|
+
helperText={error}
|
|
1275
|
+
disabled={isSubmitting}
|
|
1276
|
+
/>
|
|
1277
|
+
)}
|
|
1278
|
+
</FormField>
|
|
1279
|
+
|
|
1280
|
+
<Button type="submit" variant="primary" disabled={isSubmitting}>
|
|
1281
|
+
{isSubmitting ? 'Registering...' : 'Register'}
|
|
1282
|
+
</Button>
|
|
1283
|
+
</Form>
|
|
167
1284
|
</div>
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
1285
|
+
);
|
|
1286
|
+
},
|
|
1287
|
+
parameters: {
|
|
1288
|
+
docs: {
|
|
1289
|
+
description: {
|
|
1290
|
+
story: 'Complex form with react-hook-form showing advanced validation: password strength, password confirmation matching, and numeric validation.',
|
|
1291
|
+
},
|
|
1292
|
+
},
|
|
1293
|
+
},
|
|
1294
|
+
};
|
|
1295
|
+
|
|
1296
|
+
// Event Stories
|
|
1297
|
+
export const WithEvents: StoryObj<typeof Form> = {
|
|
1298
|
+
render: () => {
|
|
1299
|
+
const [name, setName] = useState("");
|
|
1300
|
+
const handleSubmit = fn((e: React.FormEvent<HTMLFormElement>) => {
|
|
1301
|
+
e.preventDefault();
|
|
1302
|
+
console.log('Form submitted:', { name });
|
|
1303
|
+
});
|
|
1304
|
+
|
|
1305
|
+
return (
|
|
1306
|
+
<div className="space-y-4">
|
|
1307
|
+
<p className="text-sm text-gray-600">
|
|
1308
|
+
Fill in the form and submit. Check the Actions panel to see events being fired.
|
|
1309
|
+
</p>
|
|
1310
|
+
<Form onSubmit={handleSubmit} className="max-w-md">
|
|
1311
|
+
<div className="space-y-2">
|
|
1312
|
+
<Label htmlFor="name" variant="required">
|
|
1313
|
+
Name
|
|
1314
|
+
</Label>
|
|
1315
|
+
<Input
|
|
1316
|
+
id="name"
|
|
1317
|
+
name="name"
|
|
1318
|
+
value={name}
|
|
1319
|
+
onChange={(e) => setName(e.target.value)}
|
|
1320
|
+
placeholder="Enter your name"
|
|
1321
|
+
required
|
|
1322
|
+
/>
|
|
1323
|
+
</div>
|
|
1324
|
+
<Button type="submit" variant="regular">
|
|
1325
|
+
Submit
|
|
1326
|
+
</Button>
|
|
1327
|
+
</Form>
|
|
182
1328
|
</div>
|
|
183
|
-
|
|
1329
|
+
);
|
|
1330
|
+
},
|
|
1331
|
+
play: async ({ canvasElement }) => {
|
|
1332
|
+
const canvas = within(canvasElement);
|
|
1333
|
+
const input = canvas.getByPlaceholderText('Enter your name');
|
|
1334
|
+
const button = canvas.getByText('Submit');
|
|
1335
|
+
|
|
1336
|
+
await userEvent.type(input, 'Test User');
|
|
1337
|
+
await userEvent.click(button);
|
|
1338
|
+
await waitFor(() => {
|
|
1339
|
+
expect(input).toHaveValue('Test User');
|
|
1340
|
+
});
|
|
1341
|
+
},
|
|
1342
|
+
parameters: {
|
|
1343
|
+
docs: {
|
|
1344
|
+
description: {
|
|
1345
|
+
story: 'Demonstrates form events. Fill in and submit the form, then check the Actions panel to see events being logged.',
|
|
1346
|
+
},
|
|
1347
|
+
},
|
|
1348
|
+
},
|
|
1349
|
+
};
|
|
1350
|
+
|
|
1351
|
+
// State Stories
|
|
1352
|
+
export const DefaultState: StoryObj<typeof Form> = {
|
|
1353
|
+
render: () => {
|
|
1354
|
+
const [name, setName] = useState("");
|
|
1355
|
+
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
|
1356
|
+
e.preventDefault();
|
|
1357
|
+
};
|
|
1358
|
+
|
|
1359
|
+
return (
|
|
1360
|
+
<Form onSubmit={handleSubmit} className="max-w-md">
|
|
1361
|
+
<div className="space-y-2">
|
|
1362
|
+
<Label htmlFor="name" variant="required">
|
|
1363
|
+
Name
|
|
1364
|
+
</Label>
|
|
1365
|
+
<Input
|
|
1366
|
+
id="name"
|
|
1367
|
+
name="name"
|
|
1368
|
+
value={name}
|
|
1369
|
+
onChange={(e) => setName(e.target.value)}
|
|
1370
|
+
placeholder="Enter your name"
|
|
1371
|
+
required
|
|
1372
|
+
/>
|
|
1373
|
+
</div>
|
|
184
1374
|
<Button type="submit" variant="regular">
|
|
185
1375
|
Submit
|
|
186
1376
|
</Button>
|
|
187
|
-
|
|
188
|
-
|
|
1377
|
+
</Form>
|
|
1378
|
+
);
|
|
1379
|
+
},
|
|
1380
|
+
parameters: {
|
|
1381
|
+
docs: {
|
|
1382
|
+
description: {
|
|
1383
|
+
story: 'Default state - form in normal state without loading, error, or success messages.',
|
|
1384
|
+
},
|
|
1385
|
+
},
|
|
1386
|
+
},
|
|
1387
|
+
};
|
|
1388
|
+
|
|
1389
|
+
export const LoadingState: StoryObj<typeof Form> = {
|
|
1390
|
+
render: () => {
|
|
1391
|
+
const [name, setName] = useState("");
|
|
1392
|
+
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
1393
|
+
|
|
1394
|
+
const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
|
|
1395
|
+
e.preventDefault();
|
|
1396
|
+
setIsSubmitting(true);
|
|
1397
|
+
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
1398
|
+
setIsSubmitting(false);
|
|
1399
|
+
};
|
|
1400
|
+
|
|
1401
|
+
return (
|
|
1402
|
+
<Form onSubmit={handleSubmit} className="max-w-md" loading={isSubmitting}>
|
|
1403
|
+
<div className="space-y-2">
|
|
1404
|
+
<Label htmlFor="name" variant="required">
|
|
1405
|
+
Name
|
|
1406
|
+
</Label>
|
|
1407
|
+
<Input
|
|
1408
|
+
id="name"
|
|
1409
|
+
name="name"
|
|
1410
|
+
value={name}
|
|
1411
|
+
onChange={(e) => setName(e.target.value)}
|
|
1412
|
+
disabled={isSubmitting}
|
|
1413
|
+
required
|
|
1414
|
+
/>
|
|
1415
|
+
</div>
|
|
1416
|
+
<Button type="submit" variant="regular" disabled={isSubmitting}>
|
|
1417
|
+
{isSubmitting ? "Submitting..." : "Submit"}
|
|
189
1418
|
</Button>
|
|
190
|
-
</
|
|
191
|
-
|
|
192
|
-
|
|
1419
|
+
</Form>
|
|
1420
|
+
);
|
|
1421
|
+
},
|
|
1422
|
+
parameters: {
|
|
1423
|
+
docs: {
|
|
1424
|
+
description: {
|
|
1425
|
+
story: 'Loading state - form shows loading indicator while submitting.',
|
|
1426
|
+
},
|
|
1427
|
+
},
|
|
1428
|
+
},
|
|
1429
|
+
};
|
|
1430
|
+
|
|
1431
|
+
export const ErrorState: StoryObj<typeof Form> = {
|
|
1432
|
+
render: () => {
|
|
1433
|
+
const [name, setName] = useState("");
|
|
1434
|
+
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
|
1435
|
+
e.preventDefault();
|
|
1436
|
+
};
|
|
1437
|
+
|
|
1438
|
+
return (
|
|
1439
|
+
<Form
|
|
1440
|
+
onSubmit={handleSubmit}
|
|
1441
|
+
className="max-w-md"
|
|
1442
|
+
error="Please fix the errors below and try again."
|
|
1443
|
+
>
|
|
1444
|
+
<div className="space-y-2">
|
|
1445
|
+
<Label htmlFor="name" variant="required">
|
|
1446
|
+
Name
|
|
1447
|
+
</Label>
|
|
1448
|
+
<Input
|
|
1449
|
+
id="name"
|
|
1450
|
+
name="name"
|
|
1451
|
+
value={name}
|
|
1452
|
+
onChange={(e) => setName(e.target.value)}
|
|
1453
|
+
error
|
|
1454
|
+
required
|
|
1455
|
+
/>
|
|
1456
|
+
</div>
|
|
1457
|
+
<Button type="submit" variant="regular">
|
|
1458
|
+
Submit
|
|
1459
|
+
</Button>
|
|
1460
|
+
</Form>
|
|
1461
|
+
);
|
|
1462
|
+
},
|
|
1463
|
+
parameters: {
|
|
1464
|
+
docs: {
|
|
1465
|
+
description: {
|
|
1466
|
+
story: 'Error state - form displays a global error message.',
|
|
1467
|
+
},
|
|
1468
|
+
},
|
|
1469
|
+
},
|
|
1470
|
+
};
|
|
1471
|
+
|
|
1472
|
+
export const SuccessState: StoryObj<typeof Form> = {
|
|
1473
|
+
render: () => {
|
|
1474
|
+
const [name, setName] = useState("");
|
|
1475
|
+
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
|
1476
|
+
e.preventDefault();
|
|
1477
|
+
};
|
|
1478
|
+
|
|
1479
|
+
return (
|
|
1480
|
+
<Form
|
|
1481
|
+
onSubmit={handleSubmit}
|
|
1482
|
+
className="max-w-md"
|
|
1483
|
+
success="Form submitted successfully!"
|
|
1484
|
+
>
|
|
1485
|
+
<div className="space-y-2">
|
|
1486
|
+
<Label htmlFor="name" variant="required">
|
|
1487
|
+
Name
|
|
1488
|
+
</Label>
|
|
1489
|
+
<Input
|
|
1490
|
+
id="name"
|
|
1491
|
+
name="name"
|
|
1492
|
+
value={name}
|
|
1493
|
+
onChange={(e) => setName(e.target.value)}
|
|
1494
|
+
required
|
|
1495
|
+
/>
|
|
1496
|
+
</div>
|
|
1497
|
+
<Button type="submit" variant="regular">
|
|
1498
|
+
Submit
|
|
1499
|
+
</Button>
|
|
1500
|
+
</Form>
|
|
1501
|
+
);
|
|
1502
|
+
},
|
|
1503
|
+
parameters: {
|
|
1504
|
+
docs: {
|
|
1505
|
+
description: {
|
|
1506
|
+
story: 'Success state - form displays a success message.',
|
|
1507
|
+
},
|
|
1508
|
+
},
|
|
1509
|
+
},
|
|
193
1510
|
};
|
|
194
1511
|
|
|
195
1512
|
export default meta;
|