@walkeros/explorer 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__mocks__/@monaco-editor/react.d.ts +3 -0
- package/dist/__mocks__/@monaco-editor/react.d.ts.map +1 -0
- package/dist/__mocks__/@monaco-editor/react.js +4 -0
- package/dist/__mocks__/@monaco-editor/react.js.map +1 -0
- package/dist/components/atoms/box.d.ts +27 -0
- package/dist/components/atoms/box.d.ts.map +1 -0
- package/dist/components/atoms/box.js +86 -0
- package/dist/components/atoms/box.js.map +1 -0
- package/dist/components/atoms/box.stories.d.ts +34 -0
- package/dist/components/atoms/box.stories.d.ts.map +1 -0
- package/dist/components/atoms/box.stories.js +104 -0
- package/dist/components/atoms/box.stories.js.map +1 -0
- package/dist/components/atoms/button-group.d.ts +17 -0
- package/dist/components/atoms/button-group.d.ts.map +1 -0
- package/dist/components/atoms/button-group.js +12 -0
- package/dist/components/atoms/button-group.js.map +1 -0
- package/dist/components/atoms/button-group.stories.d.ts +18 -0
- package/dist/components/atoms/button-group.stories.d.ts.map +1 -0
- package/dist/components/atoms/button-group.stories.js +39 -0
- package/dist/components/atoms/button-group.stories.js.map +1 -0
- package/dist/components/atoms/button-link.d.ts +12 -0
- package/dist/components/atoms/button-link.d.ts.map +1 -0
- package/dist/components/atoms/button-link.js +10 -0
- package/dist/components/atoms/button-link.js.map +1 -0
- package/dist/components/atoms/button-link.stories.d.ts +11 -0
- package/dist/components/atoms/button-link.stories.d.ts.map +1 -0
- package/dist/components/atoms/button-link.stories.js +50 -0
- package/dist/components/atoms/button-link.stories.js.map +1 -0
- package/dist/components/atoms/button.d.ts +15 -0
- package/dist/components/atoms/button.d.ts.map +1 -0
- package/dist/components/atoms/button.js +11 -0
- package/dist/components/atoms/button.js.map +1 -0
- package/dist/components/atoms/button.stories.d.ts +14 -0
- package/dist/components/atoms/button.stories.d.ts.map +1 -0
- package/dist/components/atoms/button.stories.js +25 -0
- package/dist/components/atoms/button.stories.js.map +1 -0
- package/dist/components/atoms/code.d.ts +92 -0
- package/dist/components/atoms/code.d.ts.map +1 -0
- package/dist/components/atoms/code.js +405 -0
- package/dist/components/atoms/code.js.map +1 -0
- package/dist/components/atoms/code.stories.d.ts +46 -0
- package/dist/components/atoms/code.stories.d.ts.map +1 -0
- package/dist/components/atoms/code.stories.js +156 -0
- package/dist/components/atoms/code.stories.js.map +1 -0
- package/dist/components/atoms/footer.d.ts +21 -0
- package/dist/components/atoms/footer.d.ts.map +1 -0
- package/dist/components/atoms/footer.js +19 -0
- package/dist/components/atoms/footer.js.map +1 -0
- package/dist/components/atoms/footer.stories.d.ts +14 -0
- package/dist/components/atoms/footer.stories.d.ts.map +1 -0
- package/dist/components/atoms/footer.stories.js +29 -0
- package/dist/components/atoms/footer.stories.js.map +1 -0
- package/dist/components/atoms/grid.d.ts +65 -0
- package/dist/components/atoms/grid.d.ts.map +1 -0
- package/dist/components/atoms/grid.js +169 -0
- package/dist/components/atoms/grid.js.map +1 -0
- package/dist/components/atoms/grid.stories.d.ts +18 -0
- package/dist/components/atoms/grid.stories.d.ts.map +1 -0
- package/dist/components/atoms/grid.stories.js +60 -0
- package/dist/components/atoms/grid.stories.js.map +1 -0
- package/dist/components/atoms/header.d.ts +7 -0
- package/dist/components/atoms/header.d.ts.map +1 -0
- package/dist/components/atoms/header.js +5 -0
- package/dist/components/atoms/header.js.map +1 -0
- package/dist/components/atoms/header.stories.d.ts +15 -0
- package/dist/components/atoms/header.stories.d.ts.map +1 -0
- package/dist/components/atoms/header.stories.js +37 -0
- package/dist/components/atoms/header.stories.js.map +1 -0
- package/dist/components/atoms/icons/icon.stories.d.ts +18 -0
- package/dist/components/atoms/icons/icon.stories.d.ts.map +1 -0
- package/dist/components/atoms/icons/icon.stories.js +37 -0
- package/dist/components/atoms/icons/icon.stories.js.map +1 -0
- package/dist/components/atoms/icons/icons.d.ts +2 -0
- package/dist/components/atoms/icons/icons.d.ts.map +1 -0
- package/dist/components/atoms/icons/icons.js +7 -0
- package/dist/components/atoms/icons/icons.js.map +1 -0
- package/dist/components/atoms/icons/index.d.ts +3 -0
- package/dist/components/atoms/icons/index.d.ts.map +1 -0
- package/dist/components/atoms/icons/index.js +3 -0
- package/dist/components/atoms/icons/index.js.map +1 -0
- package/dist/components/atoms/mdx-code.d.ts +33 -0
- package/dist/components/atoms/mdx-code.d.ts.map +1 -0
- package/dist/components/atoms/mdx-code.js +69 -0
- package/dist/components/atoms/mdx-code.js.map +1 -0
- package/dist/components/atoms/preview-footer.d.ts +32 -0
- package/dist/components/atoms/preview-footer.d.ts.map +1 -0
- package/dist/components/atoms/preview-footer.js +31 -0
- package/dist/components/atoms/preview-footer.js.map +1 -0
- package/dist/components/atoms/spinner.d.ts +17 -0
- package/dist/components/atoms/spinner.d.ts.map +1 -0
- package/dist/components/atoms/spinner.js +14 -0
- package/dist/components/atoms/spinner.js.map +1 -0
- package/dist/components/atoms/spinner.stories.d.ts +7 -0
- package/dist/components/atoms/spinner.stories.d.ts.map +1 -0
- package/dist/components/atoms/spinner.stories.js +9 -0
- package/dist/components/atoms/spinner.stories.js.map +1 -0
- package/dist/components/atoms/toggle.d.ts +9 -0
- package/dist/components/atoms/toggle.d.ts.map +1 -0
- package/dist/components/atoms/toggle.js +6 -0
- package/dist/components/atoms/toggle.js.map +1 -0
- package/dist/components/demos/DestinationDemo.d.ts +48 -0
- package/dist/components/demos/DestinationDemo.d.ts.map +1 -0
- package/dist/components/demos/DestinationDemo.js +105 -0
- package/dist/components/demos/DestinationDemo.js.map +1 -0
- package/dist/components/demos/DestinationDemo.stories.d.ts +17 -0
- package/dist/components/demos/DestinationDemo.stories.d.ts.map +1 -0
- package/dist/components/demos/DestinationDemo.stories.js +53 -0
- package/dist/components/demos/DestinationDemo.stories.js.map +1 -0
- package/dist/components/demos/DestinationInitDemo.d.ts +34 -0
- package/dist/components/demos/DestinationInitDemo.d.ts.map +1 -0
- package/dist/components/demos/DestinationInitDemo.js +73 -0
- package/dist/components/demos/DestinationInitDemo.js.map +1 -0
- package/dist/components/demos/DestinationInitDemo.stories.d.ts +17 -0
- package/dist/components/demos/DestinationInitDemo.stories.d.ts.map +1 -0
- package/dist/components/demos/DestinationInitDemo.stories.js +39 -0
- package/dist/components/demos/DestinationInitDemo.stories.js.map +1 -0
- package/dist/components/demos/PromotionPlayground.d.ts +30 -0
- package/dist/components/demos/PromotionPlayground.d.ts.map +1 -0
- package/dist/components/demos/PromotionPlayground.js +366 -0
- package/dist/components/demos/PromotionPlayground.js.map +1 -0
- package/dist/components/demos/PromotionPlayground.stories.d.ts +27 -0
- package/dist/components/demos/PromotionPlayground.stories.d.ts.map +1 -0
- package/dist/components/demos/PromotionPlayground.stories.js +32 -0
- package/dist/components/demos/PromotionPlayground.stories.js.map +1 -0
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.d.ts +24 -0
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.d.ts.map +1 -0
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.js +10 -0
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.js.map +1 -0
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.stories.d.ts +7 -0
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.stories.d.ts.map +1 -0
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.stories.js +71 -0
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.stories.js.map +1 -0
- package/dist/components/molecules/architecture-flow/index.d.ts +3 -0
- package/dist/components/molecules/architecture-flow/index.d.ts.map +1 -0
- package/dist/components/molecules/architecture-flow/index.js +2 -0
- package/dist/components/molecules/architecture-flow/index.js.map +1 -0
- package/dist/components/molecules/code-box.d.ts +75 -0
- package/dist/components/molecules/code-box.d.ts.map +1 -0
- package/dist/components/molecules/code-box.js +174 -0
- package/dist/components/molecules/code-box.js.map +1 -0
- package/dist/components/molecules/code-box.stories.d.ts +87 -0
- package/dist/components/molecules/code-box.stories.d.ts.map +1 -0
- package/dist/components/molecules/code-box.stories.js +300 -0
- package/dist/components/molecules/code-box.stories.js.map +1 -0
- package/dist/components/molecules/code-snippet.d.ts +58 -0
- package/dist/components/molecules/code-snippet.d.ts.map +1 -0
- package/dist/components/molecules/code-snippet.js +72 -0
- package/dist/components/molecules/code-snippet.js.map +1 -0
- package/dist/components/molecules/code-snippet.stories.d.ts +23 -0
- package/dist/components/molecules/code-snippet.stories.d.ts.map +1 -0
- package/dist/components/molecules/code-snippet.stories.js +87 -0
- package/dist/components/molecules/code-snippet.stories.js.map +1 -0
- package/dist/components/molecules/dropdown.d.ts +68 -0
- package/dist/components/molecules/dropdown.d.ts.map +1 -0
- package/dist/components/molecules/dropdown.js +47 -0
- package/dist/components/molecules/dropdown.js.map +1 -0
- package/dist/components/molecules/dropdown.stories.d.ts +7 -0
- package/dist/components/molecules/dropdown.stories.d.ts.map +1 -0
- package/dist/components/molecules/dropdown.stories.js +18 -0
- package/dist/components/molecules/dropdown.stories.js.map +1 -0
- package/dist/components/molecules/flow-map/FlowMap.d.ts +74 -0
- package/dist/components/molecules/flow-map/FlowMap.d.ts.map +1 -0
- package/dist/components/molecules/flow-map/FlowMap.js +1039 -0
- package/dist/components/molecules/flow-map/FlowMap.js.map +1 -0
- package/dist/components/molecules/flow-map/FlowMap.stories.d.ts +47 -0
- package/dist/components/molecules/flow-map/FlowMap.stories.d.ts.map +1 -0
- package/dist/components/molecules/flow-map/FlowMap.stories.js +355 -0
- package/dist/components/molecules/flow-map/FlowMap.stories.js.map +1 -0
- package/dist/components/molecules/flow-map/FlowMap.transformers.stories.d.ts +29 -0
- package/dist/components/molecules/flow-map/FlowMap.transformers.stories.d.ts.map +1 -0
- package/dist/components/molecules/flow-map/FlowMap.transformers.stories.js +117 -0
- package/dist/components/molecules/flow-map/FlowMap.transformers.stories.js.map +1 -0
- package/dist/components/molecules/flow-map/index.d.ts +3 -0
- package/dist/components/molecules/flow-map/index.d.ts.map +1 -0
- package/dist/components/molecules/flow-map/index.js +2 -0
- package/dist/components/molecules/flow-map/index.js.map +1 -0
- package/dist/components/molecules/preview.d.ts +23 -0
- package/dist/components/molecules/preview.d.ts.map +1 -0
- package/dist/components/molecules/preview.js +232 -0
- package/dist/components/molecules/preview.js.map +1 -0
- package/dist/components/molecules/preview.stories.d.ts +23 -0
- package/dist/components/molecules/preview.stories.d.ts.map +1 -0
- package/dist/components/molecules/preview.stories.js +186 -0
- package/dist/components/molecules/preview.stories.js.map +1 -0
- package/dist/components/molecules/property-table.d.ts +7 -0
- package/dist/components/molecules/property-table.d.ts.map +1 -0
- package/dist/components/molecules/property-table.js +88 -0
- package/dist/components/molecules/property-table.js.map +1 -0
- package/dist/components/molecules/property-table.stories.d.ts +24 -0
- package/dist/components/molecules/property-table.stories.d.ts.map +1 -0
- package/dist/components/molecules/property-table.stories.js +86 -0
- package/dist/components/molecules/property-table.stories.js.map +1 -0
- package/dist/components/organisms/browser-box.d.ts +31 -0
- package/dist/components/organisms/browser-box.d.ts.map +1 -0
- package/dist/components/organisms/browser-box.js +80 -0
- package/dist/components/organisms/browser-box.js.map +1 -0
- package/dist/components/organisms/browser-box.stories.d.ts +26 -0
- package/dist/components/organisms/browser-box.stories.d.ts.map +1 -0
- package/dist/components/organisms/browser-box.stories.js +102 -0
- package/dist/components/organisms/browser-box.stories.js.map +1 -0
- package/dist/components/organisms/collector-box.d.ts +24 -0
- package/dist/components/organisms/collector-box.d.ts.map +1 -0
- package/dist/components/organisms/collector-box.js +56 -0
- package/dist/components/organisms/collector-box.js.map +1 -0
- package/dist/components/organisms/collector-box.stories.d.ts +22 -0
- package/dist/components/organisms/collector-box.stories.d.ts.map +1 -0
- package/dist/components/organisms/collector-box.stories.js +59 -0
- package/dist/components/organisms/collector-box.stories.js.map +1 -0
- package/dist/components/organisms/live-code.d.ts +22 -0
- package/dist/components/organisms/live-code.d.ts.map +1 -0
- package/dist/components/organisms/live-code.js +50 -0
- package/dist/components/organisms/live-code.js.map +1 -0
- package/dist/components/organisms/live-code.stories.d.ts +24 -0
- package/dist/components/organisms/live-code.stories.d.ts.map +1 -0
- package/dist/components/organisms/live-code.stories.js +55 -0
- package/dist/components/organisms/live-code.stories.js.map +1 -0
- package/dist/components/ui/button.d.ts +4 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +6 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/icon.d.ts +5 -0
- package/dist/components/ui/icon.d.ts.map +1 -0
- package/dist/components/ui/icon.js +5 -0
- package/dist/components/ui/icon.js.map +1 -0
- package/dist/contexts/GridHeightContext.d.ts +11 -0
- package/dist/contexts/GridHeightContext.d.ts.map +1 -0
- package/dist/contexts/GridHeightContext.js +14 -0
- package/dist/contexts/GridHeightContext.js.map +1 -0
- package/dist/helpers/capture.d.ts +83 -0
- package/dist/helpers/capture.d.ts.map +1 -0
- package/dist/helpers/capture.js +125 -0
- package/dist/helpers/capture.js.map +1 -0
- package/dist/helpers/destinations.d.ts +21 -0
- package/dist/helpers/destinations.d.ts.map +1 -0
- package/dist/helpers/destinations.js +46 -0
- package/dist/helpers/destinations.js.map +1 -0
- package/dist/hooks/useDropdown.d.ts +34 -0
- package/dist/hooks/useDropdown.d.ts.map +1 -0
- package/dist/hooks/useDropdown.js +66 -0
- package/dist/hooks/useDropdown.js.map +1 -0
- package/dist/hooks/useMonacoHeight.d.ts +31 -0
- package/dist/hooks/useMonacoHeight.d.ts.map +1 -0
- package/dist/hooks/useMonacoHeight.js +83 -0
- package/dist/hooks/useMonacoHeight.js.map +1 -0
- package/dist/hooks/useTreeState.d.ts +32 -0
- package/dist/hooks/useTreeState.d.ts.map +1 -0
- package/dist/hooks/useTreeState.js +94 -0
- package/dist/hooks/useTreeState.js.map +1 -0
- package/dist/index.d.ts +69 -1338
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +59 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/utils.d.ts +7 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +10 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/providers/MDXProvider.d.ts +40 -0
- package/dist/providers/MDXProvider.d.ts.map +1 -0
- package/dist/providers/MDXProvider.js +57 -0
- package/dist/providers/MDXProvider.js.map +1 -0
- package/dist/themes/index.d.ts +23 -0
- package/dist/themes/index.d.ts.map +1 -0
- package/dist/themes/index.js +29 -0
- package/dist/themes/index.js.map +1 -0
- package/dist/themes/lighthouse.d.ts +26 -0
- package/dist/themes/lighthouse.d.ts.map +1 -0
- package/dist/themes/lighthouse.js +230 -0
- package/dist/themes/lighthouse.js.map +1 -0
- package/dist/themes/palenight.d.ts +31 -0
- package/dist/themes/palenight.d.ts.map +1 -0
- package/dist/themes/palenight.js +236 -0
- package/dist/themes/palenight.js.map +1 -0
- package/dist/themes/types.d.ts +103 -0
- package/dist/themes/types.d.ts.map +1 -0
- package/dist/themes/types.js +8 -0
- package/dist/themes/types.js.map +1 -0
- package/dist/types/intellisense.d.ts +33 -0
- package/dist/types/intellisense.d.ts.map +1 -0
- package/dist/types/intellisense.js +2 -0
- package/dist/types/intellisense.js.map +1 -0
- package/dist/utils/code-normalizer.d.ts +11 -0
- package/dist/utils/code-normalizer.d.ts.map +1 -0
- package/dist/utils/code-normalizer.js +21 -0
- package/dist/utils/code-normalizer.js.map +1 -0
- package/dist/utils/contract-path-walker.d.ts +27 -0
- package/dist/utils/contract-path-walker.d.ts.map +1 -0
- package/dist/utils/contract-path-walker.js +145 -0
- package/dist/utils/contract-path-walker.js.map +1 -0
- package/dist/utils/format-code.d.ts +9 -0
- package/dist/utils/format-code.d.ts.map +1 -0
- package/dist/utils/format-code.js +77 -0
- package/dist/utils/format-code.js.map +1 -0
- package/dist/utils/mapping-context-detector.d.ts +17 -0
- package/dist/utils/mapping-context-detector.d.ts.map +1 -0
- package/dist/utils/mapping-context-detector.js +22 -0
- package/dist/utils/mapping-context-detector.js.map +1 -0
- package/dist/utils/monaco-context-types.d.ts +39 -0
- package/dist/utils/monaco-context-types.d.ts.map +1 -0
- package/dist/utils/monaco-context-types.js +426 -0
- package/dist/utils/monaco-context-types.js.map +1 -0
- package/dist/utils/monaco-decorators.d.ts +17 -0
- package/dist/utils/monaco-decorators.d.ts.map +1 -0
- package/dist/utils/monaco-decorators.js +81 -0
- package/dist/utils/monaco-decorators.js.map +1 -0
- package/dist/utils/monaco-formatters.d.ts +16 -0
- package/dist/utils/monaco-formatters.d.ts.map +1 -0
- package/dist/utils/monaco-formatters.js +139 -0
- package/dist/utils/monaco-formatters.js.map +1 -0
- package/dist/utils/monaco-intellisense-flow-extractor.d.ts +13 -0
- package/dist/utils/monaco-intellisense-flow-extractor.d.ts.map +1 -0
- package/dist/utils/monaco-intellisense-flow-extractor.js +168 -0
- package/dist/utils/monaco-intellisense-flow-extractor.js.map +1 -0
- package/dist/utils/monaco-json-path.d.ts +12 -0
- package/dist/utils/monaco-json-path.d.ts.map +1 -0
- package/dist/utils/monaco-json-path.js +68 -0
- package/dist/utils/monaco-json-path.js.map +1 -0
- package/dist/utils/monaco-json-schema.d.ts +45 -0
- package/dist/utils/monaco-json-schema.d.ts.map +1 -0
- package/dist/utils/monaco-json-schema.js +90 -0
- package/dist/utils/monaco-json-schema.js.map +1 -0
- package/dist/utils/monaco-schema-contract.d.ts +8 -0
- package/dist/utils/monaco-schema-contract.d.ts.map +1 -0
- package/dist/utils/monaco-schema-contract.js +73 -0
- package/dist/utils/monaco-schema-contract.js.map +1 -0
- package/dist/utils/monaco-schema-enrichment.d.ts +26 -0
- package/dist/utils/monaco-schema-enrichment.d.ts.map +1 -0
- package/dist/utils/monaco-schema-enrichment.js +31 -0
- package/dist/utils/monaco-schema-enrichment.js.map +1 -0
- package/dist/utils/monaco-schema-flow-config.d.ts +10 -0
- package/dist/utils/monaco-schema-flow-config.d.ts.map +1 -0
- package/dist/utils/monaco-schema-flow-config.js +201 -0
- package/dist/utils/monaco-schema-flow-config.js.map +1 -0
- package/dist/utils/monaco-schema-variables.d.ts +4 -0
- package/dist/utils/monaco-schema-variables.d.ts.map +1 -0
- package/dist/utils/monaco-schema-variables.js +26 -0
- package/dist/utils/monaco-schema-variables.js.map +1 -0
- package/dist/utils/monaco-types.d.ts +174 -0
- package/dist/utils/monaco-types.d.ts.map +1 -0
- package/dist/utils/monaco-types.js +378 -0
- package/dist/utils/monaco-types.js.map +1 -0
- package/dist/utils/monaco-walkeros-completions.d.ts +23 -0
- package/dist/utils/monaco-walkeros-completions.d.ts.map +1 -0
- package/dist/utils/monaco-walkeros-completions.js +258 -0
- package/dist/utils/monaco-walkeros-completions.js.map +1 -0
- package/dist/utils/monaco-walkeros-decorations.d.ts +29 -0
- package/dist/utils/monaco-walkeros-decorations.d.ts.map +1 -0
- package/dist/utils/monaco-walkeros-decorations.js +87 -0
- package/dist/utils/monaco-walkeros-decorations.js.map +1 -0
- package/dist/utils/monaco-walkeros-markers.d.ts +13 -0
- package/dist/utils/monaco-walkeros-markers.d.ts.map +1 -0
- package/dist/utils/monaco-walkeros-markers.js +69 -0
- package/dist/utils/monaco-walkeros-markers.js.map +1 -0
- package/dist/utils/monaco-walkeros-providers.d.ts +19 -0
- package/dist/utils/monaco-walkeros-providers.d.ts.map +1 -0
- package/dist/utils/monaco-walkeros-providers.js +284 -0
- package/dist/utils/monaco-walkeros-providers.js.map +1 -0
- package/dist/utils/path-analyzer.d.ts +88 -0
- package/dist/utils/path-analyzer.d.ts.map +1 -0
- package/dist/utils/path-analyzer.js +215 -0
- package/dist/utils/path-analyzer.js.map +1 -0
- package/package.json +6 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/__mocks__/@monaco-editor/react.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,GAAI,qBAAqB,GAAG,4CAO9C,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export const Editor = ({ value, onChange }) => (_jsx("textarea", { "data-testid": "monaco-editor", value: value, onChange: (e) => onChange?.(e.target.value), readOnly: !onChange }));
|
|
3
|
+
export default Editor;
|
|
4
|
+
//# sourceMappingURL=react.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.js","sourceRoot":"","sources":["../../../src/__mocks__/@monaco-editor/react.tsx"],"names":[],"mappings":";AAEA,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAO,EAAE,EAAE,CAAC,CAClD,kCACc,eAAe,EAC3B,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAC3C,QAAQ,EAAE,CAAC,QAAQ,GACnB,CACH,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface BoxTab {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
content?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export interface BoxProps {
|
|
8
|
+
header?: string;
|
|
9
|
+
headerActions?: React.ReactNode;
|
|
10
|
+
footer?: React.ReactNode;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
|
+
height?: number | string;
|
|
15
|
+
minHeight?: number | string;
|
|
16
|
+
maxHeight?: number | string;
|
|
17
|
+
tiny?: boolean;
|
|
18
|
+
resizable?: boolean;
|
|
19
|
+
showHeader?: boolean;
|
|
20
|
+
tabs?: BoxTab[];
|
|
21
|
+
activeTab?: string;
|
|
22
|
+
onTabChange?: (id: string) => void;
|
|
23
|
+
defaultTab?: string;
|
|
24
|
+
showTrafficLights?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export declare function Box({ header, headerActions, footer, children, className, style, height, minHeight, maxHeight, tiny, resizable, showHeader, tabs, activeTab: controlledActiveTab, onTabChange, defaultTab, showTrafficLights, }: BoxProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
//# sourceMappingURL=box.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../../../src/components/atoms/box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,WAAW,QAAQ;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAE5B,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAkCD,wBAAgB,GAAG,CAAC,EAClB,MAAM,EACN,aAAa,EACb,MAAM,EACN,QAAQ,EACR,SAAc,EACd,KAAK,EACL,MAAM,EACN,SAAS,EACT,SAAS,EACT,IAAY,EACZ,SAAiB,EACjB,UAAiB,EACjB,IAAI,EACJ,SAAS,EAAE,mBAAmB,EAC9B,WAAW,EACX,UAAU,EACV,iBAAyB,GAC1B,EAAE,QAAQ,2CA8FV"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Header } from './header';
|
|
4
|
+
import { useGridHeight } from '../../contexts/GridHeightContext';
|
|
5
|
+
/**
|
|
6
|
+
* Box - Container atom component
|
|
7
|
+
*
|
|
8
|
+
* Provides a consistent box container with header and content area.
|
|
9
|
+
* Used across all explorer components for consistent styling.
|
|
10
|
+
*
|
|
11
|
+
* Height behavior:
|
|
12
|
+
* - Default: minHeight 100px, grows as needed
|
|
13
|
+
* - tiny prop: sets minHeight to 100px explicitly
|
|
14
|
+
* - Custom minHeight/maxHeight: override defaults
|
|
15
|
+
* - In Grid: fills row height (equal heights per row)
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* <Box header="Preview">
|
|
19
|
+
* <Preview html={html} css={css} />
|
|
20
|
+
* </Box>
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* <Box header="Code" minHeight={200} maxHeight={600}>
|
|
24
|
+
* <CodeBox ... />
|
|
25
|
+
* </Box>
|
|
26
|
+
*/
|
|
27
|
+
function TrafficLights() {
|
|
28
|
+
return (_jsxs("div", { className: "elb-explorer-traffic-lights", children: [_jsx("span", { className: "elb-explorer-traffic-light elb-explorer-traffic-light--red" }), _jsx("span", { className: "elb-explorer-traffic-light elb-explorer-traffic-light--yellow" }), _jsx("span", { className: "elb-explorer-traffic-light elb-explorer-traffic-light--green" })] }));
|
|
29
|
+
}
|
|
30
|
+
export function Box({ header, headerActions, footer, children, className = '', style, height, minHeight, maxHeight, tiny = false, resizable = false, showHeader = true, tabs, activeTab: controlledActiveTab, onTabChange, defaultTab, showTrafficLights = false, }) {
|
|
31
|
+
// Grid context for synchronized heights
|
|
32
|
+
const gridContext = useGridHeight();
|
|
33
|
+
// Uncontrolled tab state
|
|
34
|
+
const [internalActiveTab, setInternalActiveTab] = useState(defaultTab || (tabs?.[0]?.id ?? ''));
|
|
35
|
+
// Controlled vs uncontrolled
|
|
36
|
+
const isControlled = controlledActiveTab !== undefined;
|
|
37
|
+
const activeTabId = isControlled ? controlledActiveTab : internalActiveTab;
|
|
38
|
+
const handleTabClick = (tabId) => {
|
|
39
|
+
if (onTabChange) {
|
|
40
|
+
onTabChange(tabId);
|
|
41
|
+
}
|
|
42
|
+
if (!isControlled) {
|
|
43
|
+
setInternalActiveTab(tabId);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
// Height management: explicit > grid synced > default
|
|
47
|
+
const boxStyle = { ...style };
|
|
48
|
+
if (height !== undefined) {
|
|
49
|
+
boxStyle.height = typeof height === 'number' ? `${height}px` : height;
|
|
50
|
+
}
|
|
51
|
+
else if (gridContext?.syncedHeight) {
|
|
52
|
+
boxStyle.height = `${gridContext.syncedHeight}px`;
|
|
53
|
+
}
|
|
54
|
+
if (tiny) {
|
|
55
|
+
boxStyle.height = 'auto';
|
|
56
|
+
boxStyle.minHeight =
|
|
57
|
+
minHeight !== undefined
|
|
58
|
+
? typeof minHeight === 'number'
|
|
59
|
+
? `${minHeight}px`
|
|
60
|
+
: minHeight
|
|
61
|
+
: '100px';
|
|
62
|
+
}
|
|
63
|
+
else if (minHeight !== undefined) {
|
|
64
|
+
boxStyle.minHeight =
|
|
65
|
+
typeof minHeight === 'number' ? `${minHeight}px` : minHeight;
|
|
66
|
+
}
|
|
67
|
+
if (maxHeight !== undefined) {
|
|
68
|
+
boxStyle.maxHeight =
|
|
69
|
+
typeof maxHeight === 'number' ? `${maxHeight}px` : maxHeight;
|
|
70
|
+
}
|
|
71
|
+
if (resizable) {
|
|
72
|
+
boxStyle.resize = 'vertical';
|
|
73
|
+
boxStyle.overflow = 'auto';
|
|
74
|
+
}
|
|
75
|
+
// Auto-height class for grid context
|
|
76
|
+
const useContentHeight = !!gridContext?.enabled;
|
|
77
|
+
const autoHeightClass = useContentHeight ? 'elb-box--auto-height' : '';
|
|
78
|
+
// Determine content: tab content (if available) or children
|
|
79
|
+
const activeTabContent = tabs?.find((t) => t.id === activeTabId)?.content;
|
|
80
|
+
const content = activeTabContent ?? children;
|
|
81
|
+
// Render tabs header or regular header
|
|
82
|
+
const hasTabs = tabs && tabs.length > 0;
|
|
83
|
+
const showRegularHeader = showHeader && header && !hasTabs;
|
|
84
|
+
return (_jsxs("div", { className: `elb-explorer elb-explorer-box ${autoHeightClass} ${className}`.trim(), style: boxStyle, children: [hasTabs && (_jsxs("div", { className: "elb-explorer-tabs", children: [showTrafficLights && _jsx(TrafficLights, {}), tabs.map((tab) => (_jsx("button", { type: "button", className: `elb-explorer-tab ${activeTabId === tab.id ? 'elb-explorer-tab--active' : ''}`, onClick: () => handleTabClick(tab.id), children: tab.label }, tab.id))), headerActions && (_jsx("div", { className: "elb-explorer-tab-actions", children: headerActions }))] })), showRegularHeader && _jsx(Header, { label: header, children: headerActions }), _jsx("div", { className: "elb-explorer-content", children: content }), footer && _jsx("div", { className: "elb-explorer-footer", children: footer })] }));
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=box.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"box.js","sourceRoot":"","sources":["../../../src/components/atoms/box.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AA+BjE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,SAAS,aAAa;IACpB,OAAO,CACL,eAAK,SAAS,EAAC,6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Container component with header
|
|
5
|
+
*
|
|
6
|
+
* Basic container atom used throughout the explorer for consistent styling.
|
|
7
|
+
* Provides header, optional header actions, footer, and content area.
|
|
8
|
+
*/
|
|
9
|
+
declare const meta: Meta<typeof Box>;
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof Box>;
|
|
12
|
+
/**
|
|
13
|
+
* Default box with header and content
|
|
14
|
+
*/
|
|
15
|
+
export declare const Default: Story;
|
|
16
|
+
/**
|
|
17
|
+
* Box with tabs - uncontrolled mode
|
|
18
|
+
*
|
|
19
|
+
* Tabs replace the regular header. Click tabs to switch content.
|
|
20
|
+
*/
|
|
21
|
+
export declare const WithTabs: Story;
|
|
22
|
+
/**
|
|
23
|
+
* Box with traffic lights and a single file tab
|
|
24
|
+
*
|
|
25
|
+
* Mac-style decoration for code editor appearance.
|
|
26
|
+
*/
|
|
27
|
+
export declare const WithTrafficLights: Story;
|
|
28
|
+
/**
|
|
29
|
+
* Box with tabs and traffic lights
|
|
30
|
+
*
|
|
31
|
+
* Combines Mac decoration with multiple switchable tabs.
|
|
32
|
+
*/
|
|
33
|
+
export declare const TabsWithTrafficLights: Story;
|
|
34
|
+
//# sourceMappingURL=box.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"box.stories.d.ts","sourceRoot":"","sources":["../../../src/components/atoms/box.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B;;;;;GAKG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,GAAG,CAO1B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,GAAG,CAAC,CAAC;AAElC;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KAarB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,KAgCtB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAe/B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,KA0CnC,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from './box';
|
|
3
|
+
/**
|
|
4
|
+
* Box - Container component with header
|
|
5
|
+
*
|
|
6
|
+
* Basic container atom used throughout the explorer for consistent styling.
|
|
7
|
+
* Provides header, optional header actions, footer, and content area.
|
|
8
|
+
*/
|
|
9
|
+
const meta = {
|
|
10
|
+
component: Box,
|
|
11
|
+
title: 'Atoms/Box',
|
|
12
|
+
tags: ['autodocs'],
|
|
13
|
+
parameters: {
|
|
14
|
+
layout: 'padded',
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
/**
|
|
19
|
+
* Default box with header and content
|
|
20
|
+
*/
|
|
21
|
+
export const Default = {
|
|
22
|
+
args: {
|
|
23
|
+
header: 'Example Box',
|
|
24
|
+
children: (_jsxs("div", { style: { padding: '12px' }, children: [_jsx("p", { children: "This is the content area of the Box component." }), _jsx("p", { children: "It provides consistent styling across all explorer components with a header and optional actions." })] })),
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Box with tabs - uncontrolled mode
|
|
29
|
+
*
|
|
30
|
+
* Tabs replace the regular header. Click tabs to switch content.
|
|
31
|
+
*/
|
|
32
|
+
export const WithTabs = {
|
|
33
|
+
args: {
|
|
34
|
+
tabs: [
|
|
35
|
+
{
|
|
36
|
+
id: 'overview',
|
|
37
|
+
label: 'Overview',
|
|
38
|
+
content: (_jsx("div", { style: { padding: '12px' }, children: _jsx("p", { children: "Overview content goes here." }) })),
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: 'details',
|
|
42
|
+
label: 'Details',
|
|
43
|
+
content: (_jsx("div", { style: { padding: '12px' }, children: _jsx("p", { children: "Detailed information displayed here." }) })),
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: 'settings',
|
|
47
|
+
label: 'Settings',
|
|
48
|
+
content: (_jsx("div", { style: { padding: '12px' }, children: _jsx("p", { children: "Settings and configuration options." }) })),
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Box with traffic lights and a single file tab
|
|
55
|
+
*
|
|
56
|
+
* Mac-style decoration for code editor appearance.
|
|
57
|
+
*/
|
|
58
|
+
export const WithTrafficLights = {
|
|
59
|
+
args: {
|
|
60
|
+
showTrafficLights: true,
|
|
61
|
+
tabs: [{ id: 'file', label: 'config.ts' }],
|
|
62
|
+
children: (_jsx("div", { style: { padding: '12px', fontFamily: 'monospace', fontSize: '14px' }, children: _jsx("pre", { children: `export const config = {
|
|
63
|
+
tracking: true,
|
|
64
|
+
debug: false,
|
|
65
|
+
};` }) })),
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Box with tabs and traffic lights
|
|
70
|
+
*
|
|
71
|
+
* Combines Mac decoration with multiple switchable tabs.
|
|
72
|
+
*/
|
|
73
|
+
export const TabsWithTrafficLights = {
|
|
74
|
+
args: {
|
|
75
|
+
showTrafficLights: true,
|
|
76
|
+
tabs: [
|
|
77
|
+
{
|
|
78
|
+
id: 'event',
|
|
79
|
+
label: 'Event',
|
|
80
|
+
content: (_jsx("div", { style: {
|
|
81
|
+
padding: '12px',
|
|
82
|
+
fontFamily: 'monospace',
|
|
83
|
+
fontSize: '14px',
|
|
84
|
+
}, children: _jsx("pre", { children: `{
|
|
85
|
+
"event": "product view",
|
|
86
|
+
"data": { "id": "abc123" }
|
|
87
|
+
}` }) })),
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: 'mapping',
|
|
91
|
+
label: 'Mapping',
|
|
92
|
+
content: (_jsx("div", { style: {
|
|
93
|
+
padding: '12px',
|
|
94
|
+
fontFamily: 'monospace',
|
|
95
|
+
fontSize: '14px',
|
|
96
|
+
}, children: _jsx("pre", { children: `{
|
|
97
|
+
"name": "event",
|
|
98
|
+
"data": { "key": "data.id" }
|
|
99
|
+
}` }) })),
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=box.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"box.stories.js","sourceRoot":"","sources":["../../../src/components/atoms/box.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B;;;;;GAKG;AACH,MAAM,IAAI,GAAqB;IAC7B,SAAS,EAAE,GAAG;IACd,KAAK,EAAE,WAAW;IAClB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,MAAM,EAAE,QAAQ;KACjB;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,MAAM,EAAE,aAAa;QACrB,QAAQ,EAAE,CACR,eAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,aAC7B,yEAAqD,EACrD,4HAGI,IACA,CACP;KACF;CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ;gBACE,EAAE,EAAE,UAAU;gBACd,KAAK,EAAE,UAAU;gBACjB,OAAO,EAAE,CACP,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,YAC7B,sDAAkC,GAC9B,CACP;aACF;YACD;gBACE,EAAE,EAAE,SAAS;gBACb,KAAK,EAAE,SAAS;gBAChB,OAAO,EAAE,CACP,cAAK,KAAK,EAAE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
|
+
buttons: Array<{
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
active?: boolean;
|
|
6
|
+
}>;
|
|
7
|
+
onButtonClick: (value: string) => void;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* ButtonGroup - Segmented control for headers
|
|
12
|
+
*
|
|
13
|
+
* Displays multiple buttons in a grouped segmented control style.
|
|
14
|
+
* Commonly used for tab switching (HTML/CSS/JS, etc.)
|
|
15
|
+
*/
|
|
16
|
+
export declare function ButtonGroup({ buttons, onButtonClick, className, }: ButtonGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=button-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-group.d.ts","sourceRoot":"","sources":["../../../src/components/atoms/button-group.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,KAAK,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,OAAO,CAAC;KAClB,CAAC,CAAC;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,aAAa,EACb,SAAc,GACf,EAAE,gBAAgB,2CAclB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from './button';
|
|
3
|
+
/**
|
|
4
|
+
* ButtonGroup - Segmented control for headers
|
|
5
|
+
*
|
|
6
|
+
* Displays multiple buttons in a grouped segmented control style.
|
|
7
|
+
* Commonly used for tab switching (HTML/CSS/JS, etc.)
|
|
8
|
+
*/
|
|
9
|
+
export function ButtonGroup({ buttons, onButtonClick, className = '', }) {
|
|
10
|
+
return (_jsx("div", { className: `elb-explorer-button-group ${className}`, children: buttons.map((button) => (_jsx(Button, { active: button.active, onClick: () => onButtonClick(button.value), children: button.label }, button.value))) }));
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=button-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-group.js","sourceRoot":"","sources":["../../../src/components/atoms/button-group.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAYlC;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,OAAO,EACP,aAAa,EACb,SAAS,GAAG,EAAE,GACG;IACjB,OAAO,CACL,cAAK,SAAS,EAAE,6BAA6B,SAAS,EAAE,YACrD,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACvB,KAAC,MAAM,IAEL,MAAM,EAAE,MAAM,CAAC,MAAM,EACrB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,YAEzC,MAAM,CAAC,KAAK,IAJR,MAAM,CAAC,KAAK,CAKV,CACV,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ButtonGroup } from './button-group';
|
|
3
|
+
/**
|
|
4
|
+
* ButtonGroup - Segmented control for tab switching
|
|
5
|
+
*
|
|
6
|
+
* Displays multiple buttons in a grouped style. Commonly used for
|
|
7
|
+
* tab navigation (HTML/CSS/JS) or view switching (Visual/Code).
|
|
8
|
+
*/
|
|
9
|
+
declare const meta: Meta<typeof ButtonGroup>;
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof ButtonGroup>;
|
|
12
|
+
/**
|
|
13
|
+
* Default button group with tab selection
|
|
14
|
+
*
|
|
15
|
+
* Shows typical usage for tab switching with active state.
|
|
16
|
+
*/
|
|
17
|
+
export declare const Default: Story;
|
|
18
|
+
//# sourceMappingURL=button-group.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-group.stories.d.ts","sourceRoot":"","sources":["../../../src/components/atoms/button-group.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C;;;;;GAKG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAOlC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAC;AAE1C;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,KAoBrB,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ButtonGroup } from './button-group';
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
/**
|
|
5
|
+
* ButtonGroup - Segmented control for tab switching
|
|
6
|
+
*
|
|
7
|
+
* Displays multiple buttons in a grouped style. Commonly used for
|
|
8
|
+
* tab navigation (HTML/CSS/JS) or view switching (Visual/Code).
|
|
9
|
+
*/
|
|
10
|
+
const meta = {
|
|
11
|
+
component: ButtonGroup,
|
|
12
|
+
title: 'Atoms/ButtonGroup',
|
|
13
|
+
tags: ['autodocs'],
|
|
14
|
+
parameters: {
|
|
15
|
+
layout: 'centered',
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
/**
|
|
20
|
+
* Default button group with tab selection
|
|
21
|
+
*
|
|
22
|
+
* Shows typical usage for tab switching with active state.
|
|
23
|
+
*/
|
|
24
|
+
export const Default = {
|
|
25
|
+
render: () => {
|
|
26
|
+
const [activeTab, setActiveTab] = useState('html');
|
|
27
|
+
return (_jsx(ButtonGroup, { buttons: [
|
|
28
|
+
{
|
|
29
|
+
label: 'Preview',
|
|
30
|
+
value: 'preview',
|
|
31
|
+
active: activeTab === 'preview',
|
|
32
|
+
},
|
|
33
|
+
{ label: 'HTML', value: 'html', active: activeTab === 'html' },
|
|
34
|
+
{ label: 'CSS', value: 'css', active: activeTab === 'css' },
|
|
35
|
+
{ label: 'JS', value: 'js', active: activeTab === 'js' },
|
|
36
|
+
], onButtonClick: setActiveTab }));
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=button-group.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-group.stories.js","sourceRoot":"","sources":["../../../src/components/atoms/button-group.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC;;;;;GAKG;AACH,MAAM,IAAI,GAA6B;IACrC,SAAS,EAAE,WAAW;IACtB,KAAK,EAAE,mBAAmB;IAC1B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,MAAM,EAAE,GAAG,EAAE;QACX,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;QAEnD,OAAO,CACL,KAAC,WAAW,IACV,OAAO,EAAE;gBACP;oBACE,KAAK,EAAE,SAAS;oBAChB,KAAK,EAAE,SAAS;oBAChB,MAAM,EAAE,SAAS,KAAK,SAAS;iBAChC;gBACD,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,KAAK,MAAM,EAAE;gBAC9D,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,KAAK,KAAK,EAAE;gBAC3D,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,KAAK,IAAI,EAAE;aACzD,EACD,aAAa,EAAE,YAAY,GAC3B,CACH,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ButtonLinkProps {
|
|
3
|
+
variant?: 'default' | 'primary' | 'secondary';
|
|
4
|
+
size?: 'md' | 'lg';
|
|
5
|
+
href?: string;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function ButtonLink({ variant, size, href, onClick, children, className, disabled, }: ButtonLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=button-link.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-link.d.ts","sourceRoot":"","sources":["../../../src/components/atoms/button-link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,WAAW,CAAC;IAC9C,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,EACzB,OAAmB,EACnB,IAAW,EACX,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,SAAc,EACd,QAAgB,GACjB,EAAE,eAAe,2CAuBjB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export function ButtonLink({ variant = 'default', size = 'md', href, onClick, children, className = '', disabled = false, }) {
|
|
3
|
+
const baseClass = 'elb-button-link';
|
|
4
|
+
const classes = `${baseClass} ${baseClass}-${variant} ${baseClass}-${size} ${className}`.trim();
|
|
5
|
+
if (href && !disabled) {
|
|
6
|
+
return (_jsx("a", { href: href, className: classes, children: children }));
|
|
7
|
+
}
|
|
8
|
+
return (_jsx("button", { type: "button", className: classes, onClick: onClick, disabled: disabled, children: children }));
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=button-link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-link.js","sourceRoot":"","sources":["../../../src/components/atoms/button-link.tsx"],"names":[],"mappings":";AAYA,MAAM,UAAU,UAAU,CAAC,EACzB,OAAO,GAAG,SAAS,EACnB,IAAI,GAAG,IAAI,EACX,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,SAAS,GAAG,EAAE,EACd,QAAQ,GAAG,KAAK,GACA;IAChB,MAAM,SAAS,GAAG,iBAAiB,CAAC;IACpC,MAAM,OAAO,GACX,GAAG,SAAS,IAAI,SAAS,IAAI,OAAO,IAAI,SAAS,IAAI,IAAI,IAAI,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC;IAElF,IAAI,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QACtB,OAAO,CACL,YAAG,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,YAC9B,QAAQ,GACP,CACL,CAAC;IACJ,CAAC;IAED,OAAO,CACL,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,OAAO,EAClB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,YAEjB,QAAQ,GACF,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ButtonLink } from './button-link';
|
|
3
|
+
declare const meta: Meta<typeof ButtonLink>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ButtonLink>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Primary: Story;
|
|
8
|
+
export declare const Secondary: Story;
|
|
9
|
+
export declare const AsLink: Story;
|
|
10
|
+
export declare const GroupedLayout: Story;
|
|
11
|
+
//# sourceMappingURL=button-link.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-link.stories.d.ts","sourceRoot":"","sources":["../../../src/components/atoms/button-link.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAiBjC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC;AAEzC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAMpB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAO3B,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ButtonLink } from './button-link';
|
|
3
|
+
const meta = {
|
|
4
|
+
component: ButtonLink,
|
|
5
|
+
title: 'Atoms/ButtonLink',
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'centered',
|
|
9
|
+
},
|
|
10
|
+
argTypes: {
|
|
11
|
+
variant: {
|
|
12
|
+
control: 'select',
|
|
13
|
+
options: ['default', 'primary', 'secondary'],
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
control: 'select',
|
|
17
|
+
options: ['md', 'lg'],
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
export const Default = {
|
|
23
|
+
args: {
|
|
24
|
+
children: 'Button Link',
|
|
25
|
+
variant: 'default',
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
export const Primary = {
|
|
29
|
+
args: {
|
|
30
|
+
children: 'Get Started',
|
|
31
|
+
variant: 'primary',
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
export const Secondary = {
|
|
35
|
+
args: {
|
|
36
|
+
children: 'Learn More',
|
|
37
|
+
variant: 'secondary',
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
export const AsLink = {
|
|
41
|
+
args: {
|
|
42
|
+
children: 'Visit Documentation',
|
|
43
|
+
variant: 'primary',
|
|
44
|
+
href: 'https://example.com',
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
export const GroupedLayout = {
|
|
48
|
+
render: () => (_jsxs("div", { className: "elb-button-group", children: [_jsx(ButtonLink, { variant: "primary", children: "Primary Action" }), _jsx(ButtonLink, { variant: "secondary", children: "Secondary Action" })] })),
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=button-link.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-link.stories.js","sourceRoot":"","sources":["../../../src/components/atoms/button-link.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,IAAI,GAA4B;IACpC,SAAS,EAAE,UAAU;IACrB,KAAK,EAAE,kBAAkB;IACzB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;IACD,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC;SAC7C;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;SACtB;KACF;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,QAAQ,EAAE,aAAa;QACvB,OAAO,EAAE,SAAS;KACnB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,QAAQ,EAAE,aAAa;QACvB,OAAO,EAAE,SAAS;KACnB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAU;IAC9B,IAAI,EAAE;QACJ,QAAQ,EAAE,YAAY;QACtB,OAAO,EAAE,WAAW;KACrB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAU;IAC3B,IAAI,EAAE;QACJ,QAAQ,EAAE,qBAAqB;QAC/B,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,qBAAqB;KAC5B;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAU;IAClC,MAAM,EAAE,GAAG,EAAE,CAAC,CACZ,eAAK,SAAS,EAAC,kBAAkB,aAC/B,KAAC,UAAU,IAAC,OAAO,EAAC,SAAS,+BAA4B,EACzD,KAAC,UAAU,IAAC,OAAO,EAAC,WAAW,iCAA8B,IACzD,CACP;CACF,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ButtonProps {
|
|
3
|
+
active?: boolean;
|
|
4
|
+
onClick?: () => void;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Button - Button component for headers and controls
|
|
10
|
+
*
|
|
11
|
+
* Used in button groups or standalone in headers.
|
|
12
|
+
* Follows atomic design principles as a base atom.
|
|
13
|
+
*/
|
|
14
|
+
export declare function Button({ active, onClick, children, className, }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/atoms/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,EACrB,MAAc,EACd,OAAO,EACP,QAAQ,EACR,SAAc,GACf,EAAE,WAAW,2CAUb"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Button - Button component for headers and controls
|
|
4
|
+
*
|
|
5
|
+
* Used in button groups or standalone in headers.
|
|
6
|
+
* Follows atomic design principles as a base atom.
|
|
7
|
+
*/
|
|
8
|
+
export function Button({ active = false, onClick, children, className = '', }) {
|
|
9
|
+
return (_jsx("button", { className: `elb-explorer-btn ${active ? 'active' : ''} ${className}`, onClick: onClick, type: "button", children: children }));
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/components/atoms/button.tsx"],"names":[],"mappings":";AASA;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CAAC,EACrB,MAAM,GAAG,KAAK,EACd,OAAO,EACP,QAAQ,EACR,SAAS,GAAG,EAAE,GACF;IACZ,OAAO,CACL,iBACE,SAAS,EAAE,oBAAoB,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,SAAS,EAAE,EACpE,OAAO,EAAE,OAAO,EAChB,IAAI,EAAC,QAAQ,YAEZ,QAAQ,GACF,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Button } from './button';
|
|
3
|
+
/**
|
|
4
|
+
* Button - Base button component for headers and controls
|
|
5
|
+
*
|
|
6
|
+
* Used in button groups or standalone in headers.
|
|
7
|
+
* For form submissions, use SubmitButton instead.
|
|
8
|
+
*/
|
|
9
|
+
declare const meta: Meta<typeof Button>;
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof Button>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const Active: Story;
|
|
14
|
+
//# sourceMappingURL=button.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.stories.d.ts","sourceRoot":"","sources":["../../../src/components/atoms/button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC;;;;;GAKG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAI7B,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAC;AAErC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAKpB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Button } from './button';
|
|
2
|
+
/**
|
|
3
|
+
* Button - Base button component for headers and controls
|
|
4
|
+
*
|
|
5
|
+
* Used in button groups or standalone in headers.
|
|
6
|
+
* For form submissions, use SubmitButton instead.
|
|
7
|
+
*/
|
|
8
|
+
const meta = {
|
|
9
|
+
title: 'Atoms/Button',
|
|
10
|
+
component: Button,
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
};
|
|
13
|
+
export default meta;
|
|
14
|
+
export const Default = {
|
|
15
|
+
args: {
|
|
16
|
+
children: 'Click me',
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
export const Active = {
|
|
20
|
+
args: {
|
|
21
|
+
children: 'Active Button',
|
|
22
|
+
active: true,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=button.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.stories.js","sourceRoot":"","sources":["../../../src/components/atoms/button.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC;;;;;GAKG;AACH,MAAM,IAAI,GAAwB;IAChC,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,CAAC,UAAU,CAAC;CACnB,CAAC;AACF,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,QAAQ,EAAE,UAAU;KACrB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAU;IAC3B,IAAI,EAAE;QACJ,QAAQ,EAAE,eAAe;QACzB,MAAM,EAAE,IAAI;KACb;CACF,CAAC"}
|