@nuraly/runtime 0.1.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 +778 -0
- package/components/index.ts +13 -0
- package/components/ui/components/Event/EventAttribute/EventAttribute.style.ts +11 -0
- package/components/ui/components/Event/EventAttribute/EventAttribute.ts +28 -0
- package/components/ui/components/Event/EventLabel/EventLabel.ts +19 -0
- package/components/ui/components/Event/EventValue/EventValue.ts +79 -0
- package/components/ui/components/ToastContainer/ToastContainer.ts +126 -0
- package/components/ui/components/advanced/AIChat/AIChat.helper.ts +22 -0
- package/components/ui/components/advanced/AIChat/AIChat.style.ts +52 -0
- package/components/ui/components/advanced/AIChat/AIChat.ts +143 -0
- package/components/ui/components/advanced/CodeEditor/CodeEditor.ts +489 -0
- package/components/ui/components/advanced/Collapse/Collapse.ts +86 -0
- package/components/ui/components/advanced/Collections/Collections.style.ts +21 -0
- package/components/ui/components/advanced/Collections/Collections.ts +125 -0
- package/components/ui/components/advanced/MicroApp/MicroApp.ts +98 -0
- package/components/ui/components/advanced/RefComponent/RefComponent.ts +86 -0
- package/components/ui/components/advanced/RichText/RichText.ts +98 -0
- package/components/ui/components/advanced/RichText/RichTextEditor.ts +536 -0
- package/components/ui/components/base/BaseElement/base-change-detection.ts +18 -0
- package/components/ui/components/base/BaseElement/calculateStyles.ts +31 -0
- package/components/ui/components/base/BaseElement/drag-events.helpers.ts +71 -0
- package/components/ui/components/base/BaseElement/execute-event.helpers.ts +45 -0
- package/components/ui/components/base/BaseElement/handler-component-error.ts +28 -0
- package/components/ui/components/base/BaseElement/input-handler.helpers.ts +358 -0
- package/components/ui/components/base/BaseElement/interactions.helpers.ts +14 -0
- package/components/ui/components/base/BaseElement.ts +711 -0
- package/components/ui/components/display/Badge/Badge.ts +61 -0
- package/components/ui/components/display/BoxModel/BoxModel.ts +372 -0
- package/components/ui/components/display/Code/Code.ts +103 -0
- package/components/ui/components/display/Divider/Divider.ts +98 -0
- package/components/ui/components/display/Icon/Icon.ts +60 -0
- package/components/ui/components/display/Image/Image.ts +75 -0
- package/components/ui/components/display/Table/Table.style.ts +0 -0
- package/components/ui/components/display/Table/Table.ts +178 -0
- package/components/ui/components/display/Tag/Tag.ts +49 -0
- package/components/ui/components/display/TextLabel/TextLabel.style.ts +21 -0
- package/components/ui/components/display/TextLabel/TextLabel.ts +72 -0
- package/components/ui/components/display/Video/Video.ts +46 -0
- package/components/ui/components/inputs/Button/Button.style.ts +0 -0
- package/components/ui/components/inputs/Button/Button.ts +79 -0
- package/components/ui/components/inputs/Checkbox/Checkbox.ts +76 -0
- package/components/ui/components/inputs/ColorPicker/colorpicker.ts +65 -0
- package/components/ui/components/inputs/DatePicker/DatePicker.ts +60 -0
- package/components/ui/components/inputs/Dropdown/Dropdown.ts +128 -0
- package/components/ui/components/inputs/FileUpload/FileUpload.ts +43 -0
- package/components/ui/components/inputs/IconButton/iconbutton.ts +54 -0
- package/components/ui/components/inputs/IconPicker/IconPicker.style.ts +109 -0
- package/components/ui/components/inputs/IconPicker/IconPicker.ts +61 -0
- package/components/ui/components/inputs/InsertDropdown/InsertDropdown.ts +75 -0
- package/components/ui/components/inputs/NumberInput/NumberInput.ts +84 -0
- package/components/ui/components/inputs/RadioButton/Radio-button.ts +69 -0
- package/components/ui/components/inputs/Select/Select.ts +65 -0
- package/components/ui/components/inputs/Slider/Slider.ts +63 -0
- package/components/ui/components/inputs/TextInput/TextInput.style.ts +0 -0
- package/components/ui/components/inputs/TextInput/TextInput.ts +153 -0
- package/components/ui/components/inputs/Textarea/Textarea.ts +110 -0
- package/components/ui/components/inputs/UsersDropdown/UsersDropdown.ts +30 -0
- package/components/ui/components/layout/Card/Card.ts +46 -0
- package/components/ui/components/layout/Containers/Container.style.ts +34 -0
- package/components/ui/components/layout/Containers/Container.ts +127 -0
- package/components/ui/components/layout/Panel/Panel.ts +156 -0
- package/components/ui/components/layout/Panel/index.ts +1 -0
- package/components/ui/components/layout/Tabs/Tabs.style.ts +5 -0
- package/components/ui/components/layout/Tabs/Tabs.ts +120 -0
- package/components/ui/components/navigation/EmbedURL/EmbedURL.ts +108 -0
- package/components/ui/components/navigation/Link/Link.ts +83 -0
- package/components/ui/components/navigation/Menu/Menu.ts +92 -0
- package/components/ui/components/runtime/MicroApp/MicroApp.ts +485 -0
- package/components/ui/components/runtime/MicroApp/MicroAppDataLoader.ts +240 -0
- package/components/ui/components/utility/Border/Border.ts +643 -0
- package/components/ui/components/utility/BoxShadow/BoxShadow.ts +253 -0
- package/components/ui/components/utility/Document/Document.ts +47 -0
- package/components/ui/components/utility/Export-Import/Export-Import.ts +122 -0
- package/components/ui/components/utility/Function/InvokeFunction.ts +63 -0
- package/components/ui/components/utility/Handlers/Handlers.style.ts +0 -0
- package/components/ui/components/utility/Handlers/Handlers.ts +200 -0
- package/components/ui/components/wrappers/ComponentTitle/ComponentTitle.ts +95 -0
- package/components/ui/components/wrappers/GenerikWrapper/DragWrapper/DragWrapper.style.ts +17 -0
- package/components/ui/components/wrappers/GenerikWrapper/DragWrapper/DragWrapper.ts +230 -0
- package/components/ui/components/wrappers/GenerikWrapper/GenerikWrapper.style.ts +135 -0
- package/components/ui/components/wrappers/GenerikWrapper/GenerikWrapper.ts +230 -0
- package/components/ui/components/wrappers/GenerikWrapper/QuickActionWrapper/QuickActionWrapper.style.ts +99 -0
- package/components/ui/components/wrappers/GenerikWrapper/QuickActionWrapper/QuickActionWrapper.ts +94 -0
- package/components/ui/components/wrappers/GenerikWrapper/ResizeWrapper/ResizeWrapper.style.ts +102 -0
- package/components/ui/components/wrappers/GenerikWrapper/ResizeWrapper/ResizeWrapper.ts +258 -0
- package/components/ui/components/wrappers/PreviewWrapper.ts +28 -0
- package/components/ui/components/wrappers/RectangleSelection/RectangleSelection.ts +154 -0
- package/components/ui/nuraly-ui/.storybook/main.ts +31 -0
- package/components/ui/nuraly-ui/.storybook/manager.ts +17 -0
- package/components/ui/nuraly-ui/.storybook/preview.ts +94 -0
- package/components/ui/nuraly-ui/LICENSE +28 -0
- package/components/ui/nuraly-ui/README.md +248 -0
- package/components/ui/nuraly-ui/examples/README.md +413 -0
- package/components/ui/nuraly-ui/packages/common/README.md +137 -0
- package/components/ui/nuraly-ui/packages/common/dist/constants/index.js +2 -0
- package/components/ui/nuraly-ui/packages/common/dist/constants.js +7 -0
- package/components/ui/nuraly-ui/packages/common/dist/controllers/index.js +2 -0
- package/components/ui/nuraly-ui/packages/common/dist/controllers.js +22 -0
- package/components/ui/nuraly-ui/packages/common/dist/index.js +27 -0
- package/components/ui/nuraly-ui/packages/common/dist/mixins/index.js +3 -0
- package/components/ui/nuraly-ui/packages/common/dist/mixins.js +29 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/base-mixin.js +38 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/constants.js +2 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.controller.js +341 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.interface.js +2 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/index.js +4 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/theme.controller.js +133 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/dependency-mixin.js +141 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/event-handler-mixin.js +95 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/index.js +17 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/theme-mixin.js +194 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/themes.js +85 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/utils.js +85 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/validation.types.js +17 -0
- package/components/ui/nuraly-ui/packages/common/dist/themes/index.js +2 -0
- package/components/ui/nuraly-ui/packages/common/dist/themes.js +23 -0
- package/components/ui/nuraly-ui/packages/common/dist/utils/index.js +2 -0
- package/components/ui/nuraly-ui/packages/common/dist/utils.js +22 -0
- package/components/ui/nuraly-ui/packages/forms/README.md +84 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/LICENSE +15 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/README.md +294 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/copy/copy-sync.js +171 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/copy/copy.js +175 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/copy/index.js +7 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/empty/index.js +39 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/file.js +66 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/index.js +23 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/link.js +64 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/symlink-paths.js +101 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/symlink-type.js +34 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/symlink.js +67 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/fs/index.js +146 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/index.js +16 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/index.js +16 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/jsonfile.js +11 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/output-json-sync.js +12 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/output-json.js +12 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/mkdirs/index.js +14 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/mkdirs/make-dir.js +27 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/mkdirs/utils.js +21 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/move/index.js +7 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/move/move-sync.js +55 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/move/move.js +59 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/output-file/index.js +31 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/path-exists/index.js +12 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/remove/index.js +17 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/util/async.js +29 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/util/stat.js +159 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/util/utimes.js +36 -0
- package/components/ui/nuraly-ui/packages/layout/README.md +77 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/LICENSE +15 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/README.md +294 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/copy/copy-sync.js +171 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/copy/copy.js +175 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/copy/index.js +7 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/empty/index.js +39 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/file.js +66 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/index.js +23 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/link.js +64 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink-paths.js +101 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink-type.js +34 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink.js +67 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/fs/index.js +146 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/index.js +16 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/index.js +16 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/jsonfile.js +11 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/output-json-sync.js +12 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/output-json.js +12 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/mkdirs/index.js +14 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/mkdirs/make-dir.js +27 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/mkdirs/utils.js +21 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/move/index.js +7 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/move/move-sync.js +55 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/move/move.js +59 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/output-file/index.js +31 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/path-exists/index.js +12 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/remove/index.js +17 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/util/async.js +29 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/util/stat.js +159 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/util/utimes.js +36 -0
- package/components/ui/nuraly-ui/packages/themes/README.md +146 -0
- package/components/ui/nuraly-ui/packages/themes/scripts/build.js +444 -0
- package/components/ui/nuraly-ui/rollup.config.js +144 -0
- package/components/ui/nuraly-ui/src/components/alert/README.md +236 -0
- package/components/ui/nuraly-ui/src/components/alert/alert.component.ts +225 -0
- package/components/ui/nuraly-ui/src/components/alert/alert.stories.ts +466 -0
- package/components/ui/nuraly-ui/src/components/alert/alert.style.ts +192 -0
- package/components/ui/nuraly-ui/src/components/alert/alert.types.ts +57 -0
- package/components/ui/nuraly-ui/src/components/alert/index.ts +8 -0
- package/components/ui/nuraly-ui/src/components/alert/react.ts +17 -0
- package/components/ui/nuraly-ui/src/components/badge/README.md +319 -0
- package/components/ui/nuraly-ui/src/components/badge/badge.component.ts +314 -0
- package/components/ui/nuraly-ui/src/components/badge/badge.stories.ts +582 -0
- package/components/ui/nuraly-ui/src/components/badge/badge.style.ts +250 -0
- package/components/ui/nuraly-ui/src/components/badge/badge.types.ts +100 -0
- package/components/ui/nuraly-ui/src/components/badge/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/badge/react.ts +9 -0
- package/components/ui/nuraly-ui/src/components/breadcrumb/README.md +243 -0
- package/components/ui/nuraly-ui/src/components/breadcrumb/breadcrumb.component.ts +280 -0
- package/components/ui/nuraly-ui/src/components/breadcrumb/breadcrumb.stories.ts +389 -0
- package/components/ui/nuraly-ui/src/components/breadcrumb/breadcrumb.style.ts +154 -0
- package/components/ui/nuraly-ui/src/components/breadcrumb/breadcrumb.types.ts +66 -0
- package/components/ui/nuraly-ui/src/components/breadcrumb/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/breadcrumb/react.ts +11 -0
- package/components/ui/nuraly-ui/src/components/button/README.md +331 -0
- package/components/ui/nuraly-ui/src/components/button/button.component.ts +317 -0
- package/components/ui/nuraly-ui/src/components/button/button.stories.ts +861 -0
- package/components/ui/nuraly-ui/src/components/button/button.style.ts +520 -0
- package/components/ui/nuraly-ui/src/components/button/button.types.ts +68 -0
- package/components/ui/nuraly-ui/src/components/button/controllers/base.controller.ts +99 -0
- package/components/ui/nuraly-ui/src/components/button/controllers/index.ts +10 -0
- package/components/ui/nuraly-ui/src/components/button/controllers/keyboard.controller.ts +89 -0
- package/components/ui/nuraly-ui/src/components/button/controllers/link.controller.ts +86 -0
- package/components/ui/nuraly-ui/src/components/button/controllers/ripple.controller.ts +79 -0
- package/components/ui/nuraly-ui/src/components/button/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/button/interfaces/base-controller.interface.ts +67 -0
- package/components/ui/nuraly-ui/src/components/button/interfaces/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/button/react.ts +11 -0
- package/components/ui/nuraly-ui/src/components/button/test/nr-button_test.ts +90 -0
- package/components/ui/nuraly-ui/src/components/canvas/canvas.component.ts +306 -0
- package/components/ui/nuraly-ui/src/components/canvas/demo/canvas-demo.ts +18 -0
- package/components/ui/nuraly-ui/src/components/canvas/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/canvas/react.ts +13 -0
- package/components/ui/nuraly-ui/src/components/card/card.component.ts +50 -0
- package/components/ui/nuraly-ui/src/components/card/card.stories.ts +360 -0
- package/components/ui/nuraly-ui/src/components/card/card.style.ts +62 -0
- package/components/ui/nuraly-ui/src/components/card/card.types.ts +17 -0
- package/components/ui/nuraly-ui/src/components/card/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/card/react.ts +12 -0
- package/components/ui/nuraly-ui/src/components/carousel/carousel.component.ts +116 -0
- package/components/ui/nuraly-ui/src/components/carousel/carousel.style.ts +69 -0
- package/components/ui/nuraly-ui/src/components/carousel/demo/carousel-demo.ts +59 -0
- package/components/ui/nuraly-ui/src/components/carousel/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/carousel/react.ts +12 -0
- package/components/ui/nuraly-ui/src/components/chatbot/README.md +527 -0
- package/components/ui/nuraly-ui/src/components/chatbot/chatbot.component.ts +730 -0
- package/components/ui/nuraly-ui/src/components/chatbot/chatbot.stories.ts +2549 -0
- package/components/ui/nuraly-ui/src/components/chatbot/chatbot.style.ts +1272 -0
- package/components/ui/nuraly-ui/src/components/chatbot/chatbot.types.ts +269 -0
- package/components/ui/nuraly-ui/src/components/chatbot/controllers/index.ts +9 -0
- package/components/ui/nuraly-ui/src/components/chatbot/controllers/scroll.controller.ts +59 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/README.md +550 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/chatbot-core.controller.ts +918 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/event-bus.ts +104 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/handlers/file-handler.ts +79 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/handlers/index.ts +12 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/handlers/message-handler.ts +117 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/handlers/module-handler.ts +49 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/handlers/state-handler.ts +152 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/handlers/suggestion-handler.ts +38 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/handlers/thread-handler.ts +153 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/index.ts +47 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/services/index.ts +11 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/services/localization.service.ts +20 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/services/plugin.service.ts +103 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/services/provider.service.ts +342 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/services/storage.service.ts +122 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/services/validation.service.ts +107 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/types.ts +456 -0
- package/components/ui/nuraly-ui/src/components/chatbot/file-upload-validation.stories.ts +278 -0
- package/components/ui/nuraly-ui/src/components/chatbot/index.ts +27 -0
- package/components/ui/nuraly-ui/src/components/chatbot/locales/generated/ar.ts +19 -0
- package/components/ui/nuraly-ui/src/components/chatbot/locales/generated/fr.ts +19 -0
- package/components/ui/nuraly-ui/src/components/chatbot/locales/locale-codes.ts +25 -0
- package/components/ui/nuraly-ui/src/components/chatbot/plugins/analytics-plugin.ts +63 -0
- package/components/ui/nuraly-ui/src/components/chatbot/plugins/chat-plugin.ts +76 -0
- package/components/ui/nuraly-ui/src/components/chatbot/plugins/flight-card-plugin.ts +636 -0
- package/components/ui/nuraly-ui/src/components/chatbot/plugins/flight-card.stories.ts +929 -0
- package/components/ui/nuraly-ui/src/components/chatbot/plugins/index.ts +14 -0
- package/components/ui/nuraly-ui/src/components/chatbot/plugins/markdown-plugin.stories.ts +155 -0
- package/components/ui/nuraly-ui/src/components/chatbot/plugins/markdown-plugin.ts +103 -0
- package/components/ui/nuraly-ui/src/components/chatbot/plugins/persistence-plugin.ts +97 -0
- package/components/ui/nuraly-ui/src/components/chatbot/plugins/print-job-card-plugin.ts +537 -0
- package/components/ui/nuraly-ui/src/components/chatbot/plugins/print-job-card.stories.ts +649 -0
- package/components/ui/nuraly-ui/src/components/chatbot/providers/custom-api-provider.ts +239 -0
- package/components/ui/nuraly-ui/src/components/chatbot/providers/index.ts +11 -0
- package/components/ui/nuraly-ui/src/components/chatbot/providers/mock-provider.ts +433 -0
- package/components/ui/nuraly-ui/src/components/chatbot/providers/openai-provider.ts +239 -0
- package/components/ui/nuraly-ui/src/components/chatbot/react.ts +57 -0
- package/components/ui/nuraly-ui/src/components/chatbot/storage/index.ts +8 -0
- package/components/ui/nuraly-ui/src/components/chatbot/storage/storage-implementations.ts +167 -0
- package/components/ui/nuraly-ui/src/components/chatbot/templates/chatbot-main.template.ts +157 -0
- package/components/ui/nuraly-ui/src/components/chatbot/templates/file-preview-modal.template.ts +90 -0
- package/components/ui/nuraly-ui/src/components/chatbot/templates/file-upload-area.template.ts +43 -0
- package/components/ui/nuraly-ui/src/components/chatbot/templates/index.ts +14 -0
- package/components/ui/nuraly-ui/src/components/chatbot/templates/input-box.template.ts +267 -0
- package/components/ui/nuraly-ui/src/components/chatbot/templates/message.template.ts +240 -0
- package/components/ui/nuraly-ui/src/components/chatbot/templates/suggestion.template.ts +57 -0
- package/components/ui/nuraly-ui/src/components/chatbot/templates/thread-sidebar.template.ts +67 -0
- package/components/ui/nuraly-ui/src/components/chatbot/templates/url-modal.template.ts +121 -0
- package/components/ui/nuraly-ui/src/components/checkbox/checkbox.component.ts +173 -0
- package/components/ui/nuraly-ui/src/components/checkbox/checkbox.stories.ts +521 -0
- package/components/ui/nuraly-ui/src/components/checkbox/checkbox.style.ts +324 -0
- package/components/ui/nuraly-ui/src/components/checkbox/checkbox.types.ts +5 -0
- package/components/ui/nuraly-ui/src/components/checkbox/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/checkbox/mixins/checkbox-event-mixin.ts +180 -0
- package/components/ui/nuraly-ui/src/components/checkbox/mixins/checkbox-focus-mixin.ts +99 -0
- package/components/ui/nuraly-ui/src/components/checkbox/mixins/index.ts +27 -0
- package/components/ui/nuraly-ui/src/components/checkbox/react.ts +12 -0
- package/components/ui/nuraly-ui/src/components/checkbox/test/checkbox_test.ts +97 -0
- package/components/ui/nuraly-ui/src/components/collapse/collapse.component.ts +315 -0
- package/components/ui/nuraly-ui/src/components/collapse/collapse.stories.ts +738 -0
- package/components/ui/nuraly-ui/src/components/collapse/collapse.style.ts +236 -0
- package/components/ui/nuraly-ui/src/components/collapse/collapse.type.ts +95 -0
- package/components/ui/nuraly-ui/src/components/collapse/controllers/accordion.controller.ts +169 -0
- package/components/ui/nuraly-ui/src/components/collapse/controllers/animation.controller.ts +129 -0
- package/components/ui/nuraly-ui/src/components/collapse/controllers/base.controller.ts +114 -0
- package/components/ui/nuraly-ui/src/components/collapse/controllers/index.ts +15 -0
- package/components/ui/nuraly-ui/src/components/collapse/controllers/keyboard.controller.ts +212 -0
- package/components/ui/nuraly-ui/src/components/collapse/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/collapse/react.ts +13 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/color-holder.component.ts +104 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/color-holder.style.ts +46 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/color-picker.component.ts +398 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/color-picker.stories.ts +888 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/color-picker.style.ts +86 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/color-picker.types.ts +64 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/controllers/base.controller.ts +64 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/controllers/dropdown.controller.ts +268 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/controllers/event.controller.ts +147 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/controllers/index.ts +3 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/default-color-sets.component.ts +119 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/default-color-sets.style.ts +35 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/interfaces/index.ts +67 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/react.ts +13 -0
- package/components/ui/nuraly-ui/src/components/console/react.ts +12 -0
- package/components/ui/nuraly-ui/src/components/datepicker/README.md +60 -0
- package/components/ui/nuraly-ui/src/components/datepicker/controllers/calendar.controller.ts +252 -0
- package/components/ui/nuraly-ui/src/components/datepicker/controllers/index.ts +11 -0
- package/components/ui/nuraly-ui/src/components/datepicker/controllers/keyboard.controller.ts +290 -0
- package/components/ui/nuraly-ui/src/components/datepicker/controllers/month-year-dropdown.controller.ts +108 -0
- package/components/ui/nuraly-ui/src/components/datepicker/controllers/positioning.controller.ts +278 -0
- package/components/ui/nuraly-ui/src/components/datepicker/controllers/selection.controller.ts +303 -0
- package/components/ui/nuraly-ui/src/components/datepicker/datepicker.component.ts +659 -0
- package/components/ui/nuraly-ui/src/components/datepicker/datepicker.constant.ts +81 -0
- package/components/ui/nuraly-ui/src/components/datepicker/datepicker.stories.ts +461 -0
- package/components/ui/nuraly-ui/src/components/datepicker/datepicker.style.ts +456 -0
- package/components/ui/nuraly-ui/src/components/datepicker/datepicker.style.variables.ts +119 -0
- package/components/ui/nuraly-ui/src/components/datepicker/datepicker.types.ts +154 -0
- package/components/ui/nuraly-ui/src/components/datepicker/index.ts +3 -0
- package/components/ui/nuraly-ui/src/components/datepicker/interfaces/base-controller.interface.ts +42 -0
- package/components/ui/nuraly-ui/src/components/datepicker/interfaces/datepicker-controllers.interface.ts +128 -0
- package/components/ui/nuraly-ui/src/components/datepicker/interfaces/index.ts +15 -0
- package/components/ui/nuraly-ui/src/components/datepicker/react.ts +24 -0
- package/components/ui/nuraly-ui/src/components/datepicker/templates/days.template.ts +57 -0
- package/components/ui/nuraly-ui/src/components/datepicker/templates/dropdown.template.ts +61 -0
- package/components/ui/nuraly-ui/src/components/datepicker/templates/headers.template.ts +7 -0
- package/components/ui/nuraly-ui/src/components/datepicker/templates/months.template.ts +16 -0
- package/components/ui/nuraly-ui/src/components/datepicker/templates/years.template.ts +18 -0
- package/components/ui/nuraly-ui/src/components/datepicker/test/datepicker_test.ts +124 -0
- package/components/ui/nuraly-ui/src/components/datepicker/utils/day.helper.ts +56 -0
- package/components/ui/nuraly-ui/src/components/datepicker/utils/formatter.ts +8 -0
- package/components/ui/nuraly-ui/src/components/datepicker/utils/index.ts +11 -0
- package/components/ui/nuraly-ui/src/components/datepicker/utils/locale.helper.ts +152 -0
- package/components/ui/nuraly-ui/src/components/datepicker/utils/month.helper.ts +26 -0
- package/components/ui/nuraly-ui/src/components/datepicker/utils/string.helper.ts +3 -0
- package/components/ui/nuraly-ui/src/components/divider/divider.component.ts +172 -0
- package/components/ui/nuraly-ui/src/components/divider/divider.stories.ts +271 -0
- package/components/ui/nuraly-ui/src/components/divider/divider.style.ts +139 -0
- package/components/ui/nuraly-ui/src/components/divider/divider.types.ts +59 -0
- package/components/ui/nuraly-ui/src/components/divider/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/divider/react.ts +9 -0
- package/components/ui/nuraly-ui/src/components/document/demo/document-demo.ts +28 -0
- package/components/ui/nuraly-ui/src/components/document/document.component.ts +133 -0
- package/components/ui/nuraly-ui/src/components/document/document.stories.ts +266 -0
- package/components/ui/nuraly-ui/src/components/document/document.style.ts +210 -0
- package/components/ui/nuraly-ui/src/components/document/document.types.ts +83 -0
- package/components/ui/nuraly-ui/src/components/document/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/document/react.ts +15 -0
- package/components/ui/nuraly-ui/src/components/dropdown/controllers/base.controller.ts +85 -0
- package/components/ui/nuraly-ui/src/components/dropdown/controllers/dropdown.controller.ts +476 -0
- package/components/ui/nuraly-ui/src/components/dropdown/controllers/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/dropdown/dropdown.component.ts +348 -0
- package/components/ui/nuraly-ui/src/components/dropdown/dropdown.stories.ts +1271 -0
- package/components/ui/nuraly-ui/src/components/dropdown/dropdown.style.ts +462 -0
- package/components/ui/nuraly-ui/src/components/dropdown/dropdown.types.ts +109 -0
- package/components/ui/nuraly-ui/src/components/dropdown/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/dropdown/interfaces/controller-interfaces.ts +98 -0
- package/components/ui/nuraly-ui/src/components/dropdown/interfaces/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/dropdown/react.ts +14 -0
- package/components/ui/nuraly-ui/src/components/dropdown/templates/nr-dropdown-item.style.ts +35 -0
- package/components/ui/nuraly-ui/src/components/dropdown/templates/nr-dropdown-item.ts +47 -0
- package/components/ui/nuraly-ui/src/components/dropdown/templates/nr-dropdown-menu.style.ts +50 -0
- package/components/ui/nuraly-ui/src/components/dropdown/templates/nr-dropdown-menu.ts +52 -0
- package/components/ui/nuraly-ui/src/components/file-upload/demo/file-upload-demo.ts +151 -0
- package/components/ui/nuraly-ui/src/components/file-upload/file-upload.component.ts +371 -0
- package/components/ui/nuraly-ui/src/components/file-upload/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/file-upload/react.ts +14 -0
- package/components/ui/nuraly-ui/src/components/file-upload/readme.md +98 -0
- package/components/ui/nuraly-ui/src/components/file-upload/styles.ts +284 -0
- package/components/ui/nuraly-ui/src/components/file-upload/types.ts +10 -0
- package/components/ui/nuraly-ui/src/components/file-upload/utils.ts +23 -0
- package/components/ui/nuraly-ui/src/components/flex/README.md +235 -0
- package/components/ui/nuraly-ui/src/components/flex/flex.component.ts +186 -0
- package/components/ui/nuraly-ui/src/components/flex/flex.stories.ts +486 -0
- package/components/ui/nuraly-ui/src/components/flex/flex.style.ts +101 -0
- package/components/ui/nuraly-ui/src/components/flex/flex.types.ts +70 -0
- package/components/ui/nuraly-ui/src/components/flex/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/flex/react.ts +9 -0
- package/components/ui/nuraly-ui/src/components/form/README.md +152 -0
- package/components/ui/nuraly-ui/src/components/form/controllers/submission.controller.ts +243 -0
- package/components/ui/nuraly-ui/src/components/form/controllers/validation.controller.ts +268 -0
- package/components/ui/nuraly-ui/src/components/form/form.component.ts +699 -0
- package/components/ui/nuraly-ui/src/components/form/form.stories.ts +794 -0
- package/components/ui/nuraly-ui/src/components/form/form.style.ts +69 -0
- package/components/ui/nuraly-ui/src/components/form/form.types.ts +104 -0
- package/components/ui/nuraly-ui/src/components/form/index.ts +15 -0
- package/components/ui/nuraly-ui/src/components/form/interfaces/validation.interface.ts +139 -0
- package/components/ui/nuraly-ui/src/components/grid/README.md +196 -0
- package/components/ui/nuraly-ui/src/components/grid/col.component.ts +262 -0
- package/components/ui/nuraly-ui/src/components/grid/col.style.ts +117 -0
- package/components/ui/nuraly-ui/src/components/grid/grid.stories.ts +442 -0
- package/components/ui/nuraly-ui/src/components/grid/grid.types.ts +89 -0
- package/components/ui/nuraly-ui/src/components/grid/index.ts +3 -0
- package/components/ui/nuraly-ui/src/components/grid/react.ts +16 -0
- package/components/ui/nuraly-ui/src/components/grid/row.component.ts +203 -0
- package/components/ui/nuraly-ui/src/components/grid/row.style.ts +68 -0
- package/components/ui/nuraly-ui/src/components/icon/icon.component.ts +219 -0
- package/components/ui/nuraly-ui/src/components/icon/icon.stories.ts +160 -0
- package/components/ui/nuraly-ui/src/components/icon/icon.style.ts +214 -0
- package/components/ui/nuraly-ui/src/components/icon/icon.types.ts +4 -0
- package/components/ui/nuraly-ui/src/components/icon/icon.variables.ts +132 -0
- package/components/ui/nuraly-ui/src/components/icon/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/icon/mixins/clickable-mixin.ts +154 -0
- package/components/ui/nuraly-ui/src/components/icon/mixins/index.ts +7 -0
- package/components/ui/nuraly-ui/src/components/icon/react.ts +8 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/README.md +106 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/controllers/event.controller.ts +94 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/controllers/index.ts +9 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/controllers/search.controller.ts +76 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/controllers/selection.controller.ts +50 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/icon-picker.component.ts +324 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/icon-picker.constant.ts +33 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/icon-picker.stories.ts +255 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/icon-picker.style.ts +217 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/icon-picker.types.ts +56 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/index.ts +9 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/interfaces/icon-picker.interface.ts +14 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/interfaces/index.ts +7 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/react.ts +22 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/utils/icon-filter.utils.ts +119 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/utils/icon-loader.utils.ts +129 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/utils/index.ts +8 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/utils/lucide-icons.ts +1624 -0
- package/components/ui/nuraly-ui/src/components/image/image.component.ts +136 -0
- package/components/ui/nuraly-ui/src/components/image/image.stories.ts +236 -0
- package/components/ui/nuraly-ui/src/components/image/image.style.ts +83 -0
- package/components/ui/nuraly-ui/src/components/image/image.types.ts +83 -0
- package/components/ui/nuraly-ui/src/components/image/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/image/react.ts +15 -0
- package/components/ui/nuraly-ui/src/components/input/README.md +432 -0
- package/components/ui/nuraly-ui/src/components/input/controllers/base.controller.ts +114 -0
- package/components/ui/nuraly-ui/src/components/input/controllers/event.controller.ts +421 -0
- package/components/ui/nuraly-ui/src/components/input/controllers/index.ts +32 -0
- package/components/ui/nuraly-ui/src/components/input/controllers/state.controller.ts +313 -0
- package/components/ui/nuraly-ui/src/components/input/controllers/validation.controller.ts +806 -0
- package/components/ui/nuraly-ui/src/components/input/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/input/input.component.ts +557 -0
- package/components/ui/nuraly-ui/src/components/input/input.stories.ts +1759 -0
- package/components/ui/nuraly-ui/src/components/input/input.style.ts +812 -0
- package/components/ui/nuraly-ui/src/components/input/input.types.ts +195 -0
- package/components/ui/nuraly-ui/src/components/input/mixins/focus-mixin.ts +112 -0
- package/components/ui/nuraly-ui/src/components/input/mixins/index.ts +14 -0
- package/components/ui/nuraly-ui/src/components/input/mixins/number-mixin.ts +167 -0
- package/components/ui/nuraly-ui/src/components/input/mixins/selection-mixin.ts +125 -0
- package/components/ui/nuraly-ui/src/components/input/react.ts +15 -0
- package/components/ui/nuraly-ui/src/components/input/test/nr-input_test.ts +163 -0
- package/components/ui/nuraly-ui/src/components/input/utils/index.ts +8 -0
- package/components/ui/nuraly-ui/src/components/input/utils/input-renderers.ts +217 -0
- package/components/ui/nuraly-ui/src/components/input/utils/input-validation.utils.ts +133 -0
- package/components/ui/nuraly-ui/src/components/input/validation.ts +3 -0
- package/components/ui/nuraly-ui/src/components/label/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/label/label.component.ts +52 -0
- package/components/ui/nuraly-ui/src/components/label/label.stories.ts +311 -0
- package/components/ui/nuraly-ui/src/components/label/label.style.ts +70 -0
- package/components/ui/nuraly-ui/src/components/label/label.style.variables.ts +35 -0
- package/components/ui/nuraly-ui/src/components/label/label.types.ts +48 -0
- package/components/ui/nuraly-ui/src/components/label/react.ts +11 -0
- package/components/ui/nuraly-ui/src/components/layout/README.md +200 -0
- package/components/ui/nuraly-ui/src/components/layout/content.component.ts +45 -0
- package/components/ui/nuraly-ui/src/components/layout/content.style.ts +17 -0
- package/components/ui/nuraly-ui/src/components/layout/footer.component.ts +54 -0
- package/components/ui/nuraly-ui/src/components/layout/footer.style.ts +17 -0
- package/components/ui/nuraly-ui/src/components/layout/header.component.ts +55 -0
- package/components/ui/nuraly-ui/src/components/layout/header.style.ts +19 -0
- package/components/ui/nuraly-ui/src/components/layout/index.ts +18 -0
- package/components/ui/nuraly-ui/src/components/layout/layout.component.ts +87 -0
- package/components/ui/nuraly-ui/src/components/layout/layout.stories.ts +616 -0
- package/components/ui/nuraly-ui/src/components/layout/layout.style.ts +23 -0
- package/components/ui/nuraly-ui/src/components/layout/layout.types.ts +90 -0
- package/components/ui/nuraly-ui/src/components/layout/react.ts +41 -0
- package/components/ui/nuraly-ui/src/components/layout/sider.component.ts +294 -0
- package/components/ui/nuraly-ui/src/components/layout/sider.style.ts +104 -0
- package/components/ui/nuraly-ui/src/components/menu/README.md +390 -0
- package/components/ui/nuraly-ui/src/components/menu/controllers/accessibility.controller.ts +257 -0
- package/components/ui/nuraly-ui/src/components/menu/controllers/base.controller.ts +123 -0
- package/components/ui/nuraly-ui/src/components/menu/controllers/index.ts +10 -0
- package/components/ui/nuraly-ui/src/components/menu/controllers/keyboard.controller.ts +360 -0
- package/components/ui/nuraly-ui/src/components/menu/controllers/state.controller.ts +268 -0
- package/components/ui/nuraly-ui/src/components/menu/index.ts +3 -0
- package/components/ui/nuraly-ui/src/components/menu/interfaces/controller.interface.ts +56 -0
- package/components/ui/nuraly-ui/src/components/menu/interfaces/index.ts +7 -0
- package/components/ui/nuraly-ui/src/components/menu/menu.component.ts +341 -0
- package/components/ui/nuraly-ui/src/components/menu/menu.constants.ts +12 -0
- package/components/ui/nuraly-ui/src/components/menu/menu.stories.ts +807 -0
- package/components/ui/nuraly-ui/src/components/menu/menu.style.ts +358 -0
- package/components/ui/nuraly-ui/src/components/menu/menu.types.ts +60 -0
- package/components/ui/nuraly-ui/src/components/menu/react.ts +11 -0
- package/components/ui/nuraly-ui/src/components/modal/controllers/index.ts +8 -0
- package/components/ui/nuraly-ui/src/components/modal/controllers/modal-drag-controller.ts +139 -0
- package/components/ui/nuraly-ui/src/components/modal/controllers/modal-keyboard-controller.ts +152 -0
- package/components/ui/nuraly-ui/src/components/modal/index.ts +10 -0
- package/components/ui/nuraly-ui/src/components/modal/modal-manager.ts +209 -0
- package/components/ui/nuraly-ui/src/components/modal/modal.component.ts +475 -0
- package/components/ui/nuraly-ui/src/components/modal/modal.stories.ts +823 -0
- package/components/ui/nuraly-ui/src/components/modal/modal.style.ts +369 -0
- package/components/ui/nuraly-ui/src/components/modal/modal.types.ts +148 -0
- package/components/ui/nuraly-ui/src/components/modal/react.ts +16 -0
- package/components/ui/nuraly-ui/src/components/panel/README.md +218 -0
- package/components/ui/nuraly-ui/src/components/panel/controllers/index.ts +8 -0
- package/components/ui/nuraly-ui/src/components/panel/controllers/panel-drag-controller.ts +151 -0
- package/components/ui/nuraly-ui/src/components/panel/controllers/panel-resize-controller.ts +153 -0
- package/components/ui/nuraly-ui/src/components/panel/index.ts +9 -0
- package/components/ui/nuraly-ui/src/components/panel/panel.component.ts +760 -0
- package/components/ui/nuraly-ui/src/components/panel/panel.stories.ts +978 -0
- package/components/ui/nuraly-ui/src/components/panel/panel.style.ts +499 -0
- package/components/ui/nuraly-ui/src/components/panel/panel.types.ts +89 -0
- package/components/ui/nuraly-ui/src/components/panel/react.ts +18 -0
- package/components/ui/nuraly-ui/src/components/popconfirm/README.md +403 -0
- package/components/ui/nuraly-ui/src/components/popconfirm/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/popconfirm/popconfirm.component.ts +336 -0
- package/components/ui/nuraly-ui/src/components/popconfirm/popconfirm.stories.ts +491 -0
- package/components/ui/nuraly-ui/src/components/popconfirm/popconfirm.style.ts +207 -0
- package/components/ui/nuraly-ui/src/components/popconfirm/popconfirm.types.ts +66 -0
- package/components/ui/nuraly-ui/src/components/popconfirm/react.ts +14 -0
- package/components/ui/nuraly-ui/src/components/radio/README.md +95 -0
- package/components/ui/nuraly-ui/src/components/radio/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/radio/radio.component.ts +186 -0
- package/components/ui/nuraly-ui/src/components/radio/radio.stories.ts +317 -0
- package/components/ui/nuraly-ui/src/components/radio/radio.style.ts +150 -0
- package/components/ui/nuraly-ui/src/components/radio/radio.types.ts +14 -0
- package/components/ui/nuraly-ui/src/components/radio/react.ts +20 -0
- package/components/ui/nuraly-ui/src/components/radio-group/controllers/focus.controller.ts +251 -0
- package/components/ui/nuraly-ui/src/components/radio-group/controllers/group.controller.ts +198 -0
- package/components/ui/nuraly-ui/src/components/radio-group/controllers/index.ts +11 -0
- package/components/ui/nuraly-ui/src/components/radio-group/controllers/keyboard.controller.ts +122 -0
- package/components/ui/nuraly-ui/src/components/radio-group/controllers/ripple.controller.ts +248 -0
- package/components/ui/nuraly-ui/src/components/radio-group/controllers/validation.controller.ts +189 -0
- package/components/ui/nuraly-ui/src/components/radio-group/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/radio-group/interfaces/base-controller.interface.ts +87 -0
- package/components/ui/nuraly-ui/src/components/radio-group/interfaces/focus-controller.interface.ts +45 -0
- package/components/ui/nuraly-ui/src/components/radio-group/interfaces/index.ts +14 -0
- package/components/ui/nuraly-ui/src/components/radio-group/interfaces/ripple-controller.interface.ts +35 -0
- package/components/ui/nuraly-ui/src/components/radio-group/interfaces/selection-controller.interface.ts +51 -0
- package/components/ui/nuraly-ui/src/components/radio-group/interfaces/validation-controller.interface.ts +53 -0
- package/components/ui/nuraly-ui/src/components/radio-group/radio-group.component.ts +426 -0
- package/components/ui/nuraly-ui/src/components/radio-group/radio-group.stories.ts +1334 -0
- package/components/ui/nuraly-ui/src/components/radio-group/radio-group.style.ts +248 -0
- package/components/ui/nuraly-ui/src/components/radio-group/radio-group.types.ts +43 -0
- package/components/ui/nuraly-ui/src/components/radio-group/radio.constant.ts +1 -0
- package/components/ui/nuraly-ui/src/components/radio-group/react.ts +18 -0
- package/components/ui/nuraly-ui/src/components/radio-group/test/radio_test.ts +87 -0
- package/components/ui/nuraly-ui/src/components/select/README.md +316 -0
- package/components/ui/nuraly-ui/src/components/select/controllers/base.controller.ts +93 -0
- package/components/ui/nuraly-ui/src/components/select/controllers/dropdown.controller.ts +415 -0
- package/components/ui/nuraly-ui/src/components/select/controllers/event.controller.ts +118 -0
- package/components/ui/nuraly-ui/src/components/select/controllers/focus.controller.ts +255 -0
- package/components/ui/nuraly-ui/src/components/select/controllers/index.ts +8 -0
- package/components/ui/nuraly-ui/src/components/select/controllers/keyboard.controller.ts +407 -0
- package/components/ui/nuraly-ui/src/components/select/controllers/search.controller.ts +187 -0
- package/components/ui/nuraly-ui/src/components/select/controllers/selection.controller.ts +238 -0
- package/components/ui/nuraly-ui/src/components/select/controllers/validation.controller.ts +236 -0
- package/components/ui/nuraly-ui/src/components/select/index.ts +36 -0
- package/components/ui/nuraly-ui/src/components/select/interfaces/base-controller.interface.ts +155 -0
- package/components/ui/nuraly-ui/src/components/select/interfaces/controller-interfaces.ts +105 -0
- package/components/ui/nuraly-ui/src/components/select/interfaces/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/select/react.ts +30 -0
- package/components/ui/nuraly-ui/src/components/select/select.component.ts +804 -0
- package/components/ui/nuraly-ui/src/components/select/select.constant.ts +142 -0
- package/components/ui/nuraly-ui/src/components/select/select.stories.ts +1653 -0
- package/components/ui/nuraly-ui/src/components/select/select.style.ts +593 -0
- package/components/ui/nuraly-ui/src/components/select/select.types.ts +120 -0
- package/components/ui/nuraly-ui/src/components/skeleton/README.md +373 -0
- package/components/ui/nuraly-ui/src/components/skeleton/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/skeleton/react.ts +10 -0
- package/components/ui/nuraly-ui/src/components/skeleton/skeleton.component.ts +385 -0
- package/components/ui/nuraly-ui/src/components/skeleton/skeleton.stories.ts +425 -0
- package/components/ui/nuraly-ui/src/components/skeleton/skeleton.style.ts +224 -0
- package/components/ui/nuraly-ui/src/components/skeleton/skeleton.types.ts +90 -0
- package/components/ui/nuraly-ui/src/components/slider-input/README.md +145 -0
- package/components/ui/nuraly-ui/src/components/slider-input/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/slider-input/react.ts +12 -0
- package/components/ui/nuraly-ui/src/components/slider-input/slider-input.component.ts +184 -0
- package/components/ui/nuraly-ui/src/components/slider-input/slider-input.stories.ts +361 -0
- package/components/ui/nuraly-ui/src/components/slider-input/slider-input.style.ts +171 -0
- package/components/ui/nuraly-ui/src/components/slider-input/slider-input.style.variables.ts +59 -0
- package/components/ui/nuraly-ui/src/components/slider-input/slider-input.types.ts +24 -0
- package/components/ui/nuraly-ui/src/components/slider-input/utils/debounce.ts +7 -0
- package/components/ui/nuraly-ui/src/components/slider-input/utils/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/table/controllers/base.controller.ts +99 -0
- package/components/ui/nuraly-ui/src/components/table/controllers/filter.controller.ts +163 -0
- package/components/ui/nuraly-ui/src/components/table/controllers/index.ts +11 -0
- package/components/ui/nuraly-ui/src/components/table/controllers/pagination.controller.ts +83 -0
- package/components/ui/nuraly-ui/src/components/table/controllers/selection.controller.ts +143 -0
- package/components/ui/nuraly-ui/src/components/table/controllers/sort.controller.ts +115 -0
- package/components/ui/nuraly-ui/src/components/table/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/table/interfaces/index.ts +7 -0
- package/components/ui/nuraly-ui/src/components/table/interfaces/table-host.interface.ts +53 -0
- package/components/ui/nuraly-ui/src/components/table/react.ts +14 -0
- package/components/ui/nuraly-ui/src/components/table/table.component.ts +344 -0
- package/components/ui/nuraly-ui/src/components/table/table.stories.ts +1072 -0
- package/components/ui/nuraly-ui/src/components/table/table.style.ts +689 -0
- package/components/ui/nuraly-ui/src/components/table/table.types.ts +91 -0
- package/components/ui/nuraly-ui/src/components/table/templates/actions.template.ts +22 -0
- package/components/ui/nuraly-ui/src/components/table/templates/column-filter.template.ts +88 -0
- package/components/ui/nuraly-ui/src/components/table/templates/content.template.ts +257 -0
- package/components/ui/nuraly-ui/src/components/table/templates/empty.template.ts +49 -0
- package/components/ui/nuraly-ui/src/components/table/templates/filter.template.ts +35 -0
- package/components/ui/nuraly-ui/src/components/table/templates/index.ts +7 -0
- package/components/ui/nuraly-ui/src/components/table/templates/loading.template.ts +56 -0
- package/components/ui/nuraly-ui/src/components/table/templates/pagination.template.ts +70 -0
- package/components/ui/nuraly-ui/src/components/tabs/controllers/base.controller.ts +136 -0
- package/components/ui/nuraly-ui/src/components/tabs/controllers/dragdrop.controller.ts +251 -0
- package/components/ui/nuraly-ui/src/components/tabs/controllers/editable.controller.ts +292 -0
- package/components/ui/nuraly-ui/src/components/tabs/controllers/event.controller.ts +294 -0
- package/components/ui/nuraly-ui/src/components/tabs/controllers/index.ts +42 -0
- package/components/ui/nuraly-ui/src/components/tabs/controllers/keyboard.controller.ts +276 -0
- package/components/ui/nuraly-ui/src/components/tabs/controllers/popout.controller.ts +516 -0
- package/components/ui/nuraly-ui/src/components/tabs/index.ts +11 -0
- package/components/ui/nuraly-ui/src/components/tabs/react.ts +52 -0
- package/components/ui/nuraly-ui/src/components/tabs/tabs.component.ts +499 -0
- package/components/ui/nuraly-ui/src/components/tabs/tabs.constant.ts +30 -0
- package/components/ui/nuraly-ui/src/components/tabs/tabs.stories.ts +1334 -0
- package/components/ui/nuraly-ui/src/components/tabs/tabs.style.ts +569 -0
- package/components/ui/nuraly-ui/src/components/tabs/tabs.types.ts +261 -0
- package/components/ui/nuraly-ui/src/components/tag/README.md +22 -0
- package/components/ui/nuraly-ui/src/components/tag/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/tag/react.ts +13 -0
- package/components/ui/nuraly-ui/src/components/tag/tag.component.ts +167 -0
- package/components/ui/nuraly-ui/src/components/tag/tag.stories.ts +50 -0
- package/components/ui/nuraly-ui/src/components/tag/tag.style.ts +89 -0
- package/components/ui/nuraly-ui/src/components/tag/tag.types.ts +30 -0
- package/components/ui/nuraly-ui/src/components/textarea/README.md +314 -0
- package/components/ui/nuraly-ui/src/components/textarea/controllers/base.controller.ts +142 -0
- package/components/ui/nuraly-ui/src/components/textarea/controllers/event.controller.ts +484 -0
- package/components/ui/nuraly-ui/src/components/textarea/controllers/index.ts +16 -0
- package/components/ui/nuraly-ui/src/components/textarea/controllers/validation.controller.ts +347 -0
- package/components/ui/nuraly-ui/src/components/textarea/index.ts +19 -0
- package/components/ui/nuraly-ui/src/components/textarea/react.ts +16 -0
- package/components/ui/nuraly-ui/src/components/textarea/textarea.component.ts +716 -0
- package/components/ui/nuraly-ui/src/components/textarea/textarea.stories.ts +453 -0
- package/components/ui/nuraly-ui/src/components/textarea/textarea.style.ts +387 -0
- package/components/ui/nuraly-ui/src/components/textarea/textarea.types.ts +113 -0
- package/components/ui/nuraly-ui/src/components/timeline/README.md +340 -0
- package/components/ui/nuraly-ui/src/components/timeline/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/timeline/react.ts +9 -0
- package/components/ui/nuraly-ui/src/components/timeline/timeline.component.ts +235 -0
- package/components/ui/nuraly-ui/src/components/timeline/timeline.stories.ts +313 -0
- package/components/ui/nuraly-ui/src/components/timeline/timeline.style.ts +235 -0
- package/components/ui/nuraly-ui/src/components/timeline/timeline.types.ts +75 -0
- package/components/ui/nuraly-ui/src/components/timepicker/README.md +238 -0
- package/components/ui/nuraly-ui/src/components/timepicker/controllers/formatting.controller.ts +230 -0
- package/components/ui/nuraly-ui/src/components/timepicker/controllers/index.ts +9 -0
- package/components/ui/nuraly-ui/src/components/timepicker/controllers/selection.controller.ts +213 -0
- package/components/ui/nuraly-ui/src/components/timepicker/controllers/validation.controller.ts +240 -0
- package/components/ui/nuraly-ui/src/components/timepicker/index.ts +12 -0
- package/components/ui/nuraly-ui/src/components/timepicker/interfaces/timepicker.interface.ts +122 -0
- package/components/ui/nuraly-ui/src/components/timepicker/test/timepicker.test.ts +249 -0
- package/components/ui/nuraly-ui/src/components/timepicker/timepicker.component.ts +786 -0
- package/components/ui/nuraly-ui/src/components/timepicker/timepicker.constants.ts +94 -0
- package/components/ui/nuraly-ui/src/components/timepicker/timepicker.stories.ts +643 -0
- package/components/ui/nuraly-ui/src/components/timepicker/timepicker.style.ts +569 -0
- package/components/ui/nuraly-ui/src/components/timepicker/timepicker.style.variables.ts +122 -0
- package/components/ui/nuraly-ui/src/components/timepicker/timepicker.types.ts +183 -0
- package/components/ui/nuraly-ui/src/components/timepicker/utils/time.utils.ts +288 -0
- package/components/ui/nuraly-ui/src/components/toast/README.md +535 -0
- package/components/ui/nuraly-ui/src/components/toast/controllers/base.controller.ts +105 -0
- package/components/ui/nuraly-ui/src/components/toast/controllers/index.ts +8 -0
- package/components/ui/nuraly-ui/src/components/toast/index.ts +10 -0
- package/components/ui/nuraly-ui/src/components/toast/react.ts +19 -0
- package/components/ui/nuraly-ui/src/components/toast/toast.component.ts +394 -0
- package/components/ui/nuraly-ui/src/components/toast/toast.stories.ts +895 -0
- package/components/ui/nuraly-ui/src/components/toast/toast.style.ts +339 -0
- package/components/ui/nuraly-ui/src/components/toast/toast.types.ts +155 -0
- package/components/ui/nuraly-ui/src/components/tooltips/demo/tooltips-demo.ts +128 -0
- package/components/ui/nuraly-ui/src/components/tooltips/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/tooltips/react.ts +0 -0
- package/components/ui/nuraly-ui/src/components/tooltips/test/tooltips_test.ts +175 -0
- package/components/ui/nuraly-ui/src/components/tooltips/tooltips.component.ts +282 -0
- package/components/ui/nuraly-ui/src/components/tooltips/tooltips.constant.ts +15 -0
- package/components/ui/nuraly-ui/src/components/tooltips/tooltips.style.ts +103 -0
- package/components/ui/nuraly-ui/src/components/tooltips/tooltips.variables.ts +14 -0
- package/components/ui/nuraly-ui/src/components/video/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/video/react.ts +17 -0
- package/components/ui/nuraly-ui/src/components/video/video.component.ts +179 -0
- package/components/ui/nuraly-ui/src/components/video/video.stories.ts +289 -0
- package/components/ui/nuraly-ui/src/components/video/video.style.ts +124 -0
- package/components/ui/nuraly-ui/src/components/video/video.types.ts +102 -0
- package/components/ui/nuraly-ui/src/helpers/ThemeHandler.ts +68 -0
- package/components/ui/nuraly-ui/src/helpers/test.ts +8 -0
- package/components/ui/nuraly-ui/src/introduction.stories.ts +161 -0
- package/components/ui/nuraly-ui/src/shared/README.md +87 -0
- package/components/ui/nuraly-ui/src/shared/base-mixin.ts +48 -0
- package/components/ui/nuraly-ui/src/shared/constants.ts +0 -0
- package/components/ui/nuraly-ui/src/shared/controllers/dropdown.controller.ts +393 -0
- package/components/ui/nuraly-ui/src/shared/controllers/dropdown.interface.ts +39 -0
- package/components/ui/nuraly-ui/src/shared/controllers/index.ts +3 -0
- package/components/ui/nuraly-ui/src/shared/controllers/theme.controller.ts +158 -0
- package/components/ui/nuraly-ui/src/shared/dependency-mixin.ts +174 -0
- package/components/ui/nuraly-ui/src/shared/event-handler-mixin.ts +190 -0
- package/components/ui/nuraly-ui/src/shared/index.ts +20 -0
- package/components/ui/nuraly-ui/src/shared/theme-mixin.ts +227 -0
- package/components/ui/nuraly-ui/src/shared/themes/README.md +135 -0
- package/components/ui/nuraly-ui/src/shared/themes/editor/README.md +202 -0
- package/components/ui/nuraly-ui/src/shared/themes/editor.stories.ts +366 -0
- package/components/ui/nuraly-ui/src/shared/themes/index.ts +132 -0
- package/components/ui/nuraly-ui/src/shared/utils.ts +94 -0
- package/components/ui/nuraly-ui/src/shared/validation.types.ts +118 -0
- package/components/ui/nuraly-ui/tools/bump-versions.js +83 -0
- package/components/ui/nuraly-ui/web-dev-server.config.js +25 -0
- package/components/ui/nuraly-ui/web-test-runner.config.js +124 -0
- package/dist/CodeEditor-Ch2tv9BE.js +106211 -0
- package/dist/SmartAttributeHandler-hoSLpm1Y.js +153 -0
- package/dist/abap-B2diVmjb.js +1314 -0
- package/dist/apex-3NuJ-nsI.js +315 -0
- package/dist/assets/editor.worker-vBWydyGC.js +11 -0
- package/dist/assets/html.worker-BSmGlhXp.js +458 -0
- package/dist/assets/json.worker-Dqnoedz4.js +42 -0
- package/dist/assets/ts.worker-DyHHPhrh.js +37021 -0
- package/dist/azcli-XGXuUsMB.js +74 -0
- package/dist/bat-B8Vhm634.js +95 -0
- package/dist/bicep-Cc8X5S_k.js +108 -0
- package/dist/cameligo-Bo3wBh9T.js +168 -0
- package/dist/clojure-CPoQlpIK.js +754 -0
- package/dist/coffee-BxvTGz39.js +228 -0
- package/dist/cpp-5RpEV7vC.js +390 -0
- package/dist/csharp-slXXP3fo.js +320 -0
- package/dist/csp-B98p6-gH.js +57 -0
- package/dist/css-BDsDSAin.js +186 -0
- package/dist/cssMode-Bt2uK8XM.js +1446 -0
- package/dist/cypher-Dc4IMouD.js +262 -0
- package/dist/dart-LhvE3yD2.js +270 -0
- package/dist/dockerfile-CwzplJeZ.js +132 -0
- package/dist/ecl-DxW3FiJi.js +454 -0
- package/dist/elixir-BI40g7TU.js +489 -0
- package/dist/flow9-tR2v0bGz.js +141 -0
- package/dist/freemarker2-DNc2IxPf.js +643 -0
- package/dist/fsharp-BLAma0OT.js +210 -0
- package/dist/go-nYcD3y4Z.js +208 -0
- package/dist/graphql-Dp1cHWmP.js +141 -0
- package/dist/handlebars-CIbFckEw.js +391 -0
- package/dist/hcl-6NT8Kbna.js +177 -0
- package/dist/html-nRs_fneU.js +281 -0
- package/dist/htmlMode-BjehA1YF.js +1456 -0
- package/dist/ini-BZCOLrEc.js +68 -0
- package/dist/java-DAMcfJbX.js +221 -0
- package/dist/javascript-Bn0HduZA.js +75 -0
- package/dist/jsonMode-CfGfcJRX.js +1866 -0
- package/dist/julia-CQ46G71H.js +496 -0
- package/dist/kotlin-CEjVo_6E.js +245 -0
- package/dist/less-DreV99nP.js +168 -0
- package/dist/lexon-DBVJhqLb.js +151 -0
- package/dist/liquid-m4D_LCnC.js +238 -0
- package/dist/lua-Dcc_j6L-.js +157 -0
- package/dist/m3-B9SlZL4n.js +210 -0
- package/dist/markdown-CuGw9_MP.js +202 -0
- package/dist/mdx-CakMRbCr.js +171 -0
- package/dist/micro-app-entry-CI1Rupdh.js +17479 -0
- package/dist/micro-app.bundle.js +8 -0
- package/dist/mips-BUWqP-OH.js +194 -0
- package/dist/msdax-DtkouYCg.js +377 -0
- package/dist/mysql-IkAsWSmF.js +876 -0
- package/dist/objective-c-B2-ronfg.js +188 -0
- package/dist/pascal-Bsnz2eJA.js +245 -0
- package/dist/pascaligo-D_sMUn0Q.js +158 -0
- package/dist/perl-BPzHt9SS.js +599 -0
- package/dist/pgsql-DlTJB0PD.js +847 -0
- package/dist/php-Dmq5OjwK.js +471 -0
- package/dist/pla-HJcccrBy.js +131 -0
- package/dist/postiats-OQn6DKv-.js +544 -0
- package/dist/powerquery-DKaMYC8w.js +890 -0
- package/dist/powershell-DWeJHik1.js +233 -0
- package/dist/protobuf-CBn_IseU.js +422 -0
- package/dist/pug-BoRpCINl.js +393 -0
- package/dist/python-oJwaiPUY.js +259 -0
- package/dist/qsharp-4rGyVZOw.js +282 -0
- package/dist/r-DsgLhBOb.js +245 -0
- package/dist/razor-u_dd4rqc.js +512 -0
- package/dist/redis-B2fdL4Bg.js +298 -0
- package/dist/redshift-DoaeyCkH.js +806 -0
- package/dist/restructuredtext-D-6OFBY9.js +162 -0
- package/dist/ruby-D1DD6baV.js +444 -0
- package/dist/rust-DssUV39M.js +337 -0
- package/dist/sb-Dmb6tAdv.js +110 -0
- package/dist/scala-Co3ETaym.js +353 -0
- package/dist/scheme-CMrqXTty.js +114 -0
- package/dist/scss-DkGudv8Q.js +244 -0
- package/dist/shell-BHN2BI4L.js +224 -0
- package/dist/solidity-b-R-raGB.js +1351 -0
- package/dist/sophia-Y4GjyxNB.js +190 -0
- package/dist/sparql-CDAPZb88.js +193 -0
- package/dist/sql-DkkpPiUq.js +818 -0
- package/dist/st-CSPV91Ej.js +415 -0
- package/dist/style.css +1 -0
- package/dist/swift-DdSC5O48.js +315 -0
- package/dist/systemverilog-CI03XpAv.js +556 -0
- package/dist/tcl-B8DayMSI.js +232 -0
- package/dist/tsMode-DlZ38d3D.js +813 -0
- package/dist/twig-B1AUPVB_.js +323 -0
- package/dist/typescript-Bjs2N5Be.js +328 -0
- package/dist/vb-BIC7ccdG.js +364 -0
- package/dist/wgsl-Bv2xeo60.js +420 -0
- package/dist/xml-BCveATLl.js +95 -0
- package/dist/yaml-BfWQPJQi.js +184 -0
- package/handlers/compiler.ts +362 -0
- package/handlers/context-setup.ts +349 -0
- package/handlers/handler-executor.ts +348 -0
- package/handlers/index.ts +184 -0
- package/handlers/runtime-api/applications.ts +18 -0
- package/handlers/runtime-api/component-properties.ts +78 -0
- package/handlers/runtime-api/components.ts +63 -0
- package/handlers/runtime-api/editor.ts +29 -0
- package/handlers/runtime-api/functions.ts +42 -0
- package/handlers/runtime-api/index.ts +221 -0
- package/handlers/runtime-api/navigation.ts +52 -0
- package/handlers/runtime-api/pages.ts +45 -0
- package/handlers/runtime-api/storage.ts +95 -0
- package/handlers/runtime-api/toast.ts +108 -0
- package/handlers/runtime-api/variables.ts +400 -0
- package/index.ts +188 -0
- package/micro-app/README.md +565 -0
- package/micro-app/index.ts +29 -0
- package/micro-app/messaging/MicroAppMessageBus.ts +246 -0
- package/micro-app/state/MicroAppPageManager.ts +275 -0
- package/micro-app/state/MicroAppRuntimeContext.ts +423 -0
- package/micro-app/state/MicroAppStoreContext.ts +441 -0
- package/micro-app/state/SharedVariableRegistry.ts +187 -0
- package/micro-app/state/VariableScopeManager.ts +310 -0
- package/micro-app/utils/ComponentNamespaceManager.ts +88 -0
- package/micro-app-entry.ts +34 -0
- package/package.json +119 -0
- package/redux/actions/aitchat.ts +17 -0
- package/redux/actions/application/addPageToApplicationAction.ts +14 -0
- package/redux/actions/application/addTempApplication.ts +8 -0
- package/redux/actions/application/closeShareApplicationModalAction.ts +5 -0
- package/redux/actions/application/index.ts +20 -0
- package/redux/actions/application/loadApplicationPermissionAction.ts +10 -0
- package/redux/actions/application/resetPermissionMessage.ts +8 -0
- package/redux/actions/application/setApplication.ts +5 -0
- package/redux/actions/application/setApplicationPermissionAction.ts +6 -0
- package/redux/actions/application/setDefaultApplicationPageIfNotSet.ts +12 -0
- package/redux/actions/application/setPermissionMessage.ts +8 -0
- package/redux/actions/application/showCreateApplicationModalAction.ts +5 -0
- package/redux/actions/application/showShareApplicationModalAction.ts +5 -0
- package/redux/actions/application/updateApplication.ts +16 -0
- package/redux/actions/component/addComponentAction.ts +90 -0
- package/redux/actions/component/addComponentAsChildOf.ts +29 -0
- package/redux/actions/component/addComponentToCurrentPageAction.ts +32 -0
- package/redux/actions/component/copyComponentAction.ts +12 -0
- package/redux/actions/component/deleteComponentAction.ts +52 -0
- package/redux/actions/component/index.ts +22 -0
- package/redux/actions/component/moveDraggedComponent.ts +130 -0
- package/redux/actions/component/moveDraggedComponentInside.ts +64 -0
- package/redux/actions/component/moveDraggedComponentIntoCurrentPageRoot.ts +50 -0
- package/redux/actions/component/setCurrentComponentIdAction.ts +6 -0
- package/redux/actions/component/setDraggingComponentInfo.ts +14 -0
- package/redux/actions/component/setHoveredComponentAction.ts +5 -0
- package/redux/actions/component/setHoveredComponentIdAction.ts +5 -0
- package/redux/actions/component/update-component-name.ts +63 -0
- package/redux/actions/component/updateComponentAttributes.ts +192 -0
- package/redux/actions/component.ts +25 -0
- package/redux/actions/debug/index.ts +1 -0
- package/redux/actions/debug/store.ts +72 -0
- package/redux/actions/editor/closeCreateApplicationModalAction.ts +5 -0
- package/redux/actions/editor/closeEditorTab.ts +9 -0
- package/redux/actions/editor/index.ts +12 -0
- package/redux/actions/editor/openEditorTab.ts +12 -0
- package/redux/actions/editor/setCurrentEditorTab.ts +8 -0
- package/redux/actions/editor/setEnvirementMode.ts +8 -0
- package/redux/actions/environment.ts +5 -0
- package/redux/actions/index.ts +28 -0
- package/redux/actions/kernel/index.ts +1 -0
- package/redux/actions/kernel/set-property.ts +0 -0
- package/redux/actions/page/addPageAction.ts +7 -0
- package/redux/actions/page/deletePageAction.ts +13 -0
- package/redux/actions/page/index.ts +12 -0
- package/redux/actions/page/removeComponentToCurrentPageAction.ts +32 -0
- package/redux/actions/page/setContextMenuEvent.ts +5 -0
- package/redux/actions/page/setCurrentPageAction.ts +6 -0
- package/redux/actions/page/setCurrentPageViewPort.ts +5 -0
- package/redux/actions/page/setResizing.ts +5 -0
- package/redux/actions/page/setShowBorder.ts +5 -0
- package/redux/actions/page/updatePageAction.ts +20 -0
- package/redux/actions/page/updatePageInfo.ts +5 -0
- package/redux/actions/page/updatePageStyleAttributes.ts +13 -0
- package/redux/actions/page/updatePageZoom.ts +5 -0
- package/redux/handlers/aichat/create-chat.handler.ts +22 -0
- package/redux/handlers/api-urls.ts +8 -0
- package/redux/handlers/applications/handler.ts +78 -0
- package/redux/handlers/applications/index.ts +1 -0
- package/redux/handlers/components/add-component.handler.ts +30 -0
- package/redux/handlers/components/delete-component.handler.ts +21 -0
- package/redux/handlers/components/index.ts +6 -0
- package/redux/handlers/components/interfaces/add-component.request.ts +4 -0
- package/redux/handlers/components/interfaces/index.ts +2 -0
- package/redux/handlers/components/interfaces/update-component.reques.ts +3 -0
- package/redux/handlers/components/refresh-component.ts +25 -0
- package/redux/handlers/components/update-component.handler.ts +32 -0
- package/redux/handlers/components/validation-handler.ts +45 -0
- package/redux/handlers/functions/build-function-handler.ts +10 -0
- package/redux/handlers/functions/deploy-function-handler.ts +10 -0
- package/redux/handlers/functions/index.ts +13 -0
- package/redux/handlers/functions/invoke-function-handler.ts +13 -0
- package/redux/handlers/functions/load-functions-handler.ts +10 -0
- package/redux/handlers/functions/update-function-handler.ts +13 -0
- package/redux/handlers/index.ts +10 -0
- package/redux/handlers/pages/deletePageHandler.ts +23 -0
- package/redux/handlers/pages/handler.ts +59 -0
- package/redux/handlers/pages/index.ts +4 -0
- package/redux/handlers/pages/page.interface.ts +14 -0
- package/redux/handlers/pages/refresh-pages.ts +26 -0
- package/redux/handlers/providers/interface.ts +7 -0
- package/redux/index.ts +8 -0
- package/redux/store/actions/component.ts +9 -0
- package/redux/store/apps.ts +160 -0
- package/redux/store/component/component.interface.ts +90 -0
- package/redux/store/component/helper.ts +78 -0
- package/redux/store/component/index.ts +51 -0
- package/redux/store/component/runtime-store.ts +0 -0
- package/redux/store/component/store.ts +306 -0
- package/redux/store/context.ts +138 -0
- package/redux/store/debug.ts +28 -0
- package/redux/store/environment.ts +20 -0
- package/redux/store/index.ts +77 -0
- package/redux/store/interfaces/component.interfaces.ts +4 -0
- package/redux/store/page.ts +105 -0
- package/redux/store/provider.ts +24 -0
- package/redux/store/ssr/server-data.ts +4 -0
- package/redux/store/toast.ts +26 -0
- package/state/editor.ts +370 -0
- package/state/index.ts +27 -0
- package/state/runtime-context.ts +784 -0
- package/types/IRuntimeContext.ts +203 -0
- package/types/core.types.ts +28 -0
- package/types/database.types.ts +395 -0
- package/types/index.ts +7 -0
- package/utils/RuntimeContextHelpers.ts +454 -0
- package/utils/api-calls-utils.ts +9 -0
- package/utils/change-detection.ts +58 -0
- package/utils/clipboard-utils.ts +113 -0
- package/utils/constants.ts +2 -0
- package/utils/envirement.ts +2 -0
- package/utils/handler-security-rules.ts +153 -0
- package/utils/handler-validator.ts +447 -0
- package/utils/index.ts +67 -0
- package/utils/local-storage.ts +26 -0
- package/utils/logger.ts +90 -0
- package/utils/memoize.ts +15 -0
- package/utils/naming-generator.ts +6 -0
- package/utils/object.utils.ts +15 -0
- package/utils/performance-utils.ts +589 -0
- package/utils/randomness.ts +3 -0
- package/utils/register-components.ts +49 -0
- package/utils/render-util.ts +173 -0
- package/utils/runtime-helpers.ts +57 -0
- package/utils/styleUtil.ts +7 -0
- package/utils/time.ts +7 -0
- package/utils/validation-error-formatter.ts +11 -0
- package/vite.config.ts +83 -0
|
@@ -0,0 +1,1271 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/web-components';
|
|
2
|
+
import { html } from 'lit';
|
|
3
|
+
import './index.js';
|
|
4
|
+
import '../icon/index.js';
|
|
5
|
+
import '../button/index.js';
|
|
6
|
+
import type { DropdownItem } from './dropdown.types.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* ## Dropdown
|
|
10
|
+
*
|
|
11
|
+
* Flexible dropdown component with customizable trigger, content, and positioning.
|
|
12
|
+
* The dropdown provides a floating panel that can be triggered by various interactions
|
|
13
|
+
* (click, hover, focus) and positioned relative to its trigger element.
|
|
14
|
+
*
|
|
15
|
+
* ### When to use
|
|
16
|
+
* - Display additional options or content in a compact, space-efficient way
|
|
17
|
+
* - Create contextual menus and action lists
|
|
18
|
+
* - Show tooltips and informational content on demand
|
|
19
|
+
* - Provide navigation options without taking up permanent screen space
|
|
20
|
+
*
|
|
21
|
+
* ### When not to use
|
|
22
|
+
* - For primary navigation that should always be visible
|
|
23
|
+
* - When the content is critical and should not be hidden
|
|
24
|
+
* - For form inputs (use select component instead)
|
|
25
|
+
*
|
|
26
|
+
* ### Key Features
|
|
27
|
+
* - Multiple trigger modes (click, hover, focus, manual)
|
|
28
|
+
* - Flexible positioning with auto-placement
|
|
29
|
+
* - Customizable content through slots
|
|
30
|
+
* - Predefined item lists or completely custom content
|
|
31
|
+
* - Theme-aware styling with size variants
|
|
32
|
+
* - Keyboard navigation and accessibility support
|
|
33
|
+
* - Animation options and arrow indicators
|
|
34
|
+
*/
|
|
35
|
+
const meta: Meta = {
|
|
36
|
+
title: 'Navigation/Dropdown',
|
|
37
|
+
component: 'nr-dropdown',
|
|
38
|
+
parameters: {
|
|
39
|
+
layout: 'centered',
|
|
40
|
+
docs: {
|
|
41
|
+
description: {
|
|
42
|
+
component: 'Flexible dropdown component with customizable trigger, content, and positioning. Supports multiple trigger modes, custom content through slots, and comprehensive accessibility features.',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
tags: ['autodocs'],
|
|
47
|
+
argTypes: {
|
|
48
|
+
// Core Properties
|
|
49
|
+
open: {
|
|
50
|
+
control: { type: 'boolean' },
|
|
51
|
+
description: 'Controls dropdown visibility state',
|
|
52
|
+
table: {
|
|
53
|
+
category: 'State',
|
|
54
|
+
defaultValue: { summary: 'false' },
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
placement: {
|
|
58
|
+
control: { type: 'select' },
|
|
59
|
+
options: ['bottom', 'top', 'bottom-start', 'bottom-end', 'top-start', 'top-end', 'auto'],
|
|
60
|
+
description: 'Dropdown placement relative to trigger element',
|
|
61
|
+
table: {
|
|
62
|
+
category: 'Positioning',
|
|
63
|
+
defaultValue: { summary: 'bottom' },
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
trigger: {
|
|
67
|
+
control: { type: 'select' },
|
|
68
|
+
options: ['click', 'hover', 'focus', 'manual'],
|
|
69
|
+
description: 'How the dropdown is triggered to open',
|
|
70
|
+
table: {
|
|
71
|
+
category: 'Interaction',
|
|
72
|
+
defaultValue: { summary: 'click' },
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
size: {
|
|
76
|
+
control: { type: 'select' },
|
|
77
|
+
options: ['small', 'medium', 'large'],
|
|
78
|
+
description: 'Size variant affecting padding and font size',
|
|
79
|
+
table: {
|
|
80
|
+
category: 'Appearance',
|
|
81
|
+
defaultValue: { summary: 'medium' },
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
animation: {
|
|
85
|
+
control: { type: 'select' },
|
|
86
|
+
options: ['none', 'fade', 'slide', 'scale'],
|
|
87
|
+
description: 'Animation type when opening/closing',
|
|
88
|
+
table: {
|
|
89
|
+
category: 'Animation',
|
|
90
|
+
defaultValue: { summary: 'fade' },
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
// Behavior Properties
|
|
95
|
+
disabled: {
|
|
96
|
+
control: { type: 'boolean' },
|
|
97
|
+
description: 'Disables dropdown interaction',
|
|
98
|
+
table: {
|
|
99
|
+
category: 'State',
|
|
100
|
+
defaultValue: { summary: 'false' },
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
arrow: {
|
|
104
|
+
control: { type: 'boolean' },
|
|
105
|
+
description: 'Shows arrow pointing to trigger element',
|
|
106
|
+
table: {
|
|
107
|
+
category: 'Appearance',
|
|
108
|
+
defaultValue: { summary: 'false' },
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
autoClose: {
|
|
112
|
+
control: { type: 'boolean' },
|
|
113
|
+
description: 'Auto-close dropdown when item is selected',
|
|
114
|
+
table: {
|
|
115
|
+
category: 'Behavior',
|
|
116
|
+
defaultValue: { summary: 'true' },
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
closeOnOutsideClick: {
|
|
120
|
+
control: { type: 'boolean' },
|
|
121
|
+
description: 'Close dropdown when clicking outside',
|
|
122
|
+
table: {
|
|
123
|
+
category: 'Behavior',
|
|
124
|
+
defaultValue: { summary: 'true' },
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
closeOnEscape: {
|
|
128
|
+
control: { type: 'boolean' },
|
|
129
|
+
description: 'Close dropdown when pressing Escape key',
|
|
130
|
+
table: {
|
|
131
|
+
category: 'Behavior',
|
|
132
|
+
defaultValue: { summary: 'true' },
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
// Positioning Properties
|
|
137
|
+
offset: {
|
|
138
|
+
control: { type: 'number' },
|
|
139
|
+
description: 'Offset from trigger element in pixels',
|
|
140
|
+
table: {
|
|
141
|
+
category: 'Positioning',
|
|
142
|
+
defaultValue: { summary: '4' },
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
delay: {
|
|
146
|
+
control: { type: 'number' },
|
|
147
|
+
description: 'Delay before opening on hover (ms)',
|
|
148
|
+
table: {
|
|
149
|
+
category: 'Interaction',
|
|
150
|
+
defaultValue: { summary: '100' },
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
maxHeight: {
|
|
154
|
+
control: { type: 'text' },
|
|
155
|
+
description: 'Maximum height of dropdown content',
|
|
156
|
+
table: {
|
|
157
|
+
category: 'Sizing',
|
|
158
|
+
defaultValue: { summary: '300px' },
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
minWidth: {
|
|
162
|
+
control: { type: 'text' },
|
|
163
|
+
description: 'Minimum width of dropdown',
|
|
164
|
+
table: {
|
|
165
|
+
category: 'Sizing',
|
|
166
|
+
defaultValue: { summary: 'auto' },
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
|
|
170
|
+
// Cascading Properties
|
|
171
|
+
cascadeDirection: {
|
|
172
|
+
control: { type: 'select' },
|
|
173
|
+
options: ['right', 'left', 'auto'],
|
|
174
|
+
description: 'Direction for cascading submenus',
|
|
175
|
+
table: {
|
|
176
|
+
category: 'Cascading',
|
|
177
|
+
defaultValue: { summary: 'auto' },
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
cascadeDelay: {
|
|
181
|
+
control: { type: 'number' },
|
|
182
|
+
description: 'Delay before showing submenu on hover (ms)',
|
|
183
|
+
table: {
|
|
184
|
+
category: 'Cascading',
|
|
185
|
+
defaultValue: { summary: '300' },
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
cascadeOnHover: {
|
|
189
|
+
control: { type: 'boolean' },
|
|
190
|
+
description: 'Whether to show cascading submenus on hover',
|
|
191
|
+
table: {
|
|
192
|
+
category: 'Cascading',
|
|
193
|
+
defaultValue: { summary: 'true' },
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
args: {
|
|
198
|
+
open: false,
|
|
199
|
+
placement: 'bottom',
|
|
200
|
+
trigger: 'hover',
|
|
201
|
+
size: 'medium',
|
|
202
|
+
animation: 'fade',
|
|
203
|
+
disabled: false,
|
|
204
|
+
arrow: false,
|
|
205
|
+
autoClose: false,
|
|
206
|
+
closeOnOutsideClick: false,
|
|
207
|
+
closeOnEscape: true,
|
|
208
|
+
offset: 4,
|
|
209
|
+
delay: 50,
|
|
210
|
+
maxHeight: '300px',
|
|
211
|
+
minWidth: 'auto',
|
|
212
|
+
cascadeDirection: 'auto',
|
|
213
|
+
cascadeDelay: 300,
|
|
214
|
+
cascadeOnHover: true,
|
|
215
|
+
},
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
export default meta;
|
|
219
|
+
type Story = StoryObj;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Basic dropdown with click trigger and custom content.
|
|
223
|
+
* This is the most common dropdown configuration.
|
|
224
|
+
*/
|
|
225
|
+
export const Default: Story = {
|
|
226
|
+
parameters: {
|
|
227
|
+
docs: {
|
|
228
|
+
description: {
|
|
229
|
+
story: 'Basic dropdown with click trigger and custom content. Click the button to toggle the dropdown.',
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
render: (args: any) => html`
|
|
234
|
+
<nr-dropdown
|
|
235
|
+
placement="${args.placement}"
|
|
236
|
+
trigger="${args.trigger}"
|
|
237
|
+
size="${args.size}"
|
|
238
|
+
animation="${args.animation}"
|
|
239
|
+
?disabled="${args.disabled}"
|
|
240
|
+
?arrow="${args.arrow}"
|
|
241
|
+
?auto-close="${args.autoClose}"
|
|
242
|
+
?close-on-outside-click="${args.closeOnOutsideClick}"
|
|
243
|
+
?close-on-escape="${args.closeOnEscape}"
|
|
244
|
+
offset="${args.offset}"
|
|
245
|
+
delay="${args.delay}"
|
|
246
|
+
max-height="${args.maxHeight}"
|
|
247
|
+
min-width="${args.minWidth}"
|
|
248
|
+
>
|
|
249
|
+
<nr-button slot="trigger" >Toggle Dropdown</nr-button>
|
|
250
|
+
<div slot="content" style="padding: 12px; min-width: 200px;">
|
|
251
|
+
<h4 style="margin: 0 0 8px 0;">Dropdown Content</h4>
|
|
252
|
+
<p style="margin: 0 0 12px 0; color: var(--nuraly-color-text-secondary);">
|
|
253
|
+
This is custom content inside the dropdown panel.
|
|
254
|
+
</p>
|
|
255
|
+
<nr-button size="small" type="primary">Action</nr-button>
|
|
256
|
+
</div>
|
|
257
|
+
</nr-dropdown>
|
|
258
|
+
`,
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Dropdown with predefined items list.
|
|
263
|
+
* Perfect for menus and action lists.
|
|
264
|
+
*/
|
|
265
|
+
export const WithItems: Story = {
|
|
266
|
+
parameters: {
|
|
267
|
+
docs: {
|
|
268
|
+
description: {
|
|
269
|
+
story: 'Dropdown using the items property to display a list of selectable options.',
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
args: {
|
|
274
|
+
arrow: true,
|
|
275
|
+
},
|
|
276
|
+
render: (args: any) => html`
|
|
277
|
+
<nr-dropdown
|
|
278
|
+
placement="${args.placement}"
|
|
279
|
+
trigger="${args.trigger}"
|
|
280
|
+
size="${args.size}"
|
|
281
|
+
animation="${args.animation}"
|
|
282
|
+
?disabled="${args.disabled}"
|
|
283
|
+
?arrow="${args.arrow}"
|
|
284
|
+
?auto-close="${args.autoClose}"
|
|
285
|
+
?close-on-outside-click="${args.closeOnOutsideClick}"
|
|
286
|
+
?close-on-escape="${args.closeOnEscape}"
|
|
287
|
+
offset="${args.offset}"
|
|
288
|
+
delay="${args.delay}"
|
|
289
|
+
max-height="${args.maxHeight}"
|
|
290
|
+
min-width="180px"
|
|
291
|
+
.items="${[
|
|
292
|
+
{ id: '1', label: 'Edit', icon: 'edit', value: 'edit' },
|
|
293
|
+
{ id: '2', label: 'Copy', icon: 'copy', value: 'copy' },
|
|
294
|
+
{ id: '3', label: 'Share', icon: 'share', value: 'share' },
|
|
295
|
+
{ id: 'divider', label: '', divider: true },
|
|
296
|
+
{ id: '4', label: 'Delete', icon: 'delete', value: 'delete' },
|
|
297
|
+
]}"
|
|
298
|
+
@nr-dropdown-item-click="${(e: CustomEvent) => {
|
|
299
|
+
console.log('Item clicked:', e.detail.item);
|
|
300
|
+
}}"
|
|
301
|
+
>
|
|
302
|
+
<nr-button slot="trigger" >
|
|
303
|
+
Actions
|
|
304
|
+
<nr-icon name="chevron-down" slot="icon-after"></nr-icon>
|
|
305
|
+
</nr-button>
|
|
306
|
+
</nr-dropdown>
|
|
307
|
+
`,
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Hover-triggered dropdown for tooltips and quick info.
|
|
312
|
+
* Opens automatically when hovering over the trigger.
|
|
313
|
+
*/
|
|
314
|
+
export const HoverTrigger: Story = {
|
|
315
|
+
parameters: {
|
|
316
|
+
docs: {
|
|
317
|
+
description: {
|
|
318
|
+
story: 'Dropdown that opens on hover, perfect for tooltips and contextual information.',
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
args: {
|
|
323
|
+
trigger: 'hover',
|
|
324
|
+
arrow: true,
|
|
325
|
+
delay: 200,
|
|
326
|
+
placement: 'top',
|
|
327
|
+
},
|
|
328
|
+
render: (args: any) => html`
|
|
329
|
+
<nr-dropdown
|
|
330
|
+
placement="${args.placement}"
|
|
331
|
+
trigger="${args.trigger}"
|
|
332
|
+
size="${args.size}"
|
|
333
|
+
animation="${args.animation}"
|
|
334
|
+
?disabled="${args.disabled}"
|
|
335
|
+
?arrow="${args.arrow}"
|
|
336
|
+
?auto-close="${args.autoClose}"
|
|
337
|
+
?close-on-outside-click="${args.closeOnOutsideClick}"
|
|
338
|
+
?close-on-escape="${args.closeOnEscape}"
|
|
339
|
+
offset="${args.offset}"
|
|
340
|
+
delay="${args.delay}"
|
|
341
|
+
max-height="${args.maxHeight}"
|
|
342
|
+
min-width="250px"
|
|
343
|
+
>
|
|
344
|
+
<span slot="trigger" style="cursor: help; text-decoration: underline dotted;">
|
|
345
|
+
Hover for tooltip
|
|
346
|
+
</span>
|
|
347
|
+
<div slot="content" style="padding: 12px;">
|
|
348
|
+
<strong>Tooltip Information</strong><br>
|
|
349
|
+
This dropdown appears when you hover over the trigger element.
|
|
350
|
+
It automatically closes when you move the mouse away.
|
|
351
|
+
</div>
|
|
352
|
+
</nr-dropdown>
|
|
353
|
+
`,
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Dropdown with different size variants.
|
|
358
|
+
* Shows small, medium, and large size options.
|
|
359
|
+
*/
|
|
360
|
+
export const SizeVariants: Story = {
|
|
361
|
+
parameters: {
|
|
362
|
+
layout: 'centered',
|
|
363
|
+
docs: {
|
|
364
|
+
description: {
|
|
365
|
+
story: 'Dropdown components in different sizes showing how padding and typography scale.',
|
|
366
|
+
},
|
|
367
|
+
},
|
|
368
|
+
},
|
|
369
|
+
render: () => html`
|
|
370
|
+
<div style="display: flex; gap: 24px; align-items: flex-start;">
|
|
371
|
+
<nr-dropdown size="small" min-width="160px">
|
|
372
|
+
<nr-button slot="trigger" size="small">Small</nr-button>
|
|
373
|
+
<div slot="content" style="padding: 8px;">
|
|
374
|
+
<div>Small dropdown content with compact spacing and smaller text.</div>
|
|
375
|
+
</div>
|
|
376
|
+
</nr-dropdown>
|
|
377
|
+
|
|
378
|
+
<nr-dropdown size="medium" min-width="180px">
|
|
379
|
+
<nr-button slot="trigger" size="medium">Medium</nr-button>
|
|
380
|
+
<div slot="content" style="padding: 12px;">
|
|
381
|
+
<div>Medium dropdown content with standard spacing and text size.</div>
|
|
382
|
+
</div>
|
|
383
|
+
</nr-dropdown>
|
|
384
|
+
|
|
385
|
+
<nr-dropdown size="large" min-width="200px">
|
|
386
|
+
<nr-button slot="trigger" size="large">Large</nr-button>
|
|
387
|
+
<div slot="content" style="padding: 16px;">
|
|
388
|
+
<div>Large dropdown content with generous spacing and larger text.</div>
|
|
389
|
+
</div>
|
|
390
|
+
</nr-dropdown>
|
|
391
|
+
</div>
|
|
392
|
+
`,
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Dropdown with different placement options.
|
|
397
|
+
* Demonstrates various positioning relative to the trigger.
|
|
398
|
+
*/
|
|
399
|
+
export const PlacementVariants: Story = {
|
|
400
|
+
parameters: {
|
|
401
|
+
layout: 'fullscreen',
|
|
402
|
+
docs: {
|
|
403
|
+
description: {
|
|
404
|
+
story: 'Different placement options for positioning the dropdown relative to its trigger.',
|
|
405
|
+
},
|
|
406
|
+
},
|
|
407
|
+
},
|
|
408
|
+
render: () => html`
|
|
409
|
+
<div style="padding: 100px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; place-items: center;">
|
|
410
|
+
<nr-dropdown placement="top" ?arrow="${true}">
|
|
411
|
+
<nr-button slot="trigger">Top</nr-button>
|
|
412
|
+
<div slot="content" style="padding: 12px; min-width: 120px;">Top placement</div>
|
|
413
|
+
</nr-dropdown>
|
|
414
|
+
|
|
415
|
+
<nr-dropdown placement="top-start" ?arrow="${true}">
|
|
416
|
+
<nr-button slot="trigger">Top Start</nr-button>
|
|
417
|
+
<div slot="content" style="padding: 12px; min-width: 120px;">Top start</div>
|
|
418
|
+
</nr-dropdown>
|
|
419
|
+
|
|
420
|
+
<nr-dropdown placement="top-end" ?arrow="${true}">
|
|
421
|
+
<nr-button slot="trigger">Top End</nr-button>
|
|
422
|
+
<div slot="content" style="padding: 12px; min-width: 120px;">Top end</div>
|
|
423
|
+
</nr-dropdown>
|
|
424
|
+
|
|
425
|
+
<nr-dropdown placement="bottom" ?arrow="${true}">
|
|
426
|
+
<nr-button slot="trigger">Bottom</nr-button>
|
|
427
|
+
<div slot="content" style="padding: 12px; min-width: 120px;">Bottom placement</div>
|
|
428
|
+
</nr-dropdown>
|
|
429
|
+
|
|
430
|
+
<nr-dropdown placement="bottom-start" ?arrow="${true}">
|
|
431
|
+
<nr-button slot="trigger">Bottom Start</nr-button>
|
|
432
|
+
<div slot="content" style="padding: 12px; min-width: 120px;">Bottom start</div>
|
|
433
|
+
</nr-dropdown>
|
|
434
|
+
|
|
435
|
+
<nr-dropdown placement="bottom-end" ?arrow="${true}">
|
|
436
|
+
<nr-button slot="trigger">Bottom End</nr-button>
|
|
437
|
+
<div slot="content" style="padding: 12px; min-width: 120px;">Bottom end</div>
|
|
438
|
+
</nr-dropdown>
|
|
439
|
+
</div>
|
|
440
|
+
`,
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Dropdown with different animation types.
|
|
445
|
+
* Shows fade, slide, scale, and no animation options.
|
|
446
|
+
*/
|
|
447
|
+
export const AnimationVariants: Story = {
|
|
448
|
+
parameters: {
|
|
449
|
+
docs: {
|
|
450
|
+
description: {
|
|
451
|
+
story: 'Different animation types for dropdown open/close transitions.',
|
|
452
|
+
},
|
|
453
|
+
},
|
|
454
|
+
},
|
|
455
|
+
render: () => html`
|
|
456
|
+
<div style="display: flex; gap: 24px; align-items: flex-start;">
|
|
457
|
+
<nr-dropdown animation="none">
|
|
458
|
+
<nr-button slot="trigger">No Animation</nr-button>
|
|
459
|
+
<div slot="content" style="padding: 12px; min-width: 150px;">
|
|
460
|
+
Appears instantly without animation
|
|
461
|
+
</div>
|
|
462
|
+
</nr-dropdown>
|
|
463
|
+
|
|
464
|
+
<nr-dropdown animation="fade">
|
|
465
|
+
<nr-button slot="trigger">Fade</nr-button>
|
|
466
|
+
<div slot="content" style="padding: 12px; min-width: 150px;">
|
|
467
|
+
Fades in/out smoothly
|
|
468
|
+
</div>
|
|
469
|
+
</nr-dropdown>
|
|
470
|
+
|
|
471
|
+
<nr-dropdown animation="slide">
|
|
472
|
+
<nr-button slot="trigger">Slide</nr-button>
|
|
473
|
+
<div slot="content" style="padding: 12px; min-width: 150px;">
|
|
474
|
+
Slides in from above
|
|
475
|
+
</div>
|
|
476
|
+
</nr-dropdown>
|
|
477
|
+
|
|
478
|
+
<nr-dropdown animation="scale">
|
|
479
|
+
<nr-button slot="trigger">Scale</nr-button>
|
|
480
|
+
<div slot="content" style="padding: 12px; min-width: 150px;">
|
|
481
|
+
Scales up from small
|
|
482
|
+
</div>
|
|
483
|
+
</nr-dropdown>
|
|
484
|
+
</div>
|
|
485
|
+
`,
|
|
486
|
+
};
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Dropdown with complex content layout.
|
|
490
|
+
* Shows how to use header, content, and footer slots.
|
|
491
|
+
*/
|
|
492
|
+
export const ComplexContent: Story = {
|
|
493
|
+
parameters: {
|
|
494
|
+
docs: {
|
|
495
|
+
description: {
|
|
496
|
+
story: 'Dropdown with complex content using header, content, and footer slots.',
|
|
497
|
+
},
|
|
498
|
+
},
|
|
499
|
+
},
|
|
500
|
+
render: (args: any) => html`
|
|
501
|
+
<nr-dropdown
|
|
502
|
+
placement="bottom-start"
|
|
503
|
+
min-width="280px"
|
|
504
|
+
max-height="400px"
|
|
505
|
+
>
|
|
506
|
+
<nr-button slot="trigger" >
|
|
507
|
+
User Profile
|
|
508
|
+
<nr-icon name="user" slot="icon"></nr-icon>
|
|
509
|
+
</nr-button>
|
|
510
|
+
|
|
511
|
+
<div slot="header" style="padding: 16px; border-bottom: 1px solid var(--nuraly-color-border);">
|
|
512
|
+
<div style="display: flex; align-items: center; gap: 12px;">
|
|
513
|
+
<div style="width: 40px; height: 40px; border-radius: 50%; background: var(--nuraly-color-primary); display: flex; align-items: center; justify-content: center; color: white; font-weight: 600;">
|
|
514
|
+
JD
|
|
515
|
+
</div>
|
|
516
|
+
<div>
|
|
517
|
+
<div style="font-weight: 600;">John Doe</div>
|
|
518
|
+
<div style="font-size: 14px; color: var(--nuraly-color-text-secondary);">john.doe@example.com</div>
|
|
519
|
+
</div>
|
|
520
|
+
</div>
|
|
521
|
+
</div>
|
|
522
|
+
|
|
523
|
+
<div slot="content">
|
|
524
|
+
<div style="padding: 8px 0;">
|
|
525
|
+
<button style="display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 16px; border: none; background: none; cursor: pointer; font-size: 14px;">
|
|
526
|
+
<nr-icon name="settings"></nr-icon>
|
|
527
|
+
Account Settings
|
|
528
|
+
</button>
|
|
529
|
+
<button style="display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 16px; border: none; background: none; cursor: pointer; font-size: 14px;">
|
|
530
|
+
<nr-icon name="help"></nr-icon>
|
|
531
|
+
Help & Support
|
|
532
|
+
</button>
|
|
533
|
+
<button style="display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 16px; border: none; background: none; cursor: pointer; font-size: 14px;">
|
|
534
|
+
<nr-icon name="document"></nr-icon>
|
|
535
|
+
Documentation
|
|
536
|
+
</button>
|
|
537
|
+
</div>
|
|
538
|
+
</div>
|
|
539
|
+
|
|
540
|
+
<div slot="footer" style="padding: 12px 16px; border-top: 1px solid var(--nuraly-color-border);">
|
|
541
|
+
<nr-button type="text" size="small" style="width: 100%;">
|
|
542
|
+
<nr-icon name="logout" slot="icon"></nr-icon>
|
|
543
|
+
Sign Out
|
|
544
|
+
</nr-button>
|
|
545
|
+
</div>
|
|
546
|
+
</nr-dropdown>
|
|
547
|
+
`,
|
|
548
|
+
};
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* Interactive playground for testing all dropdown properties.
|
|
552
|
+
* Use the controls panel to experiment with different configurations.
|
|
553
|
+
*/
|
|
554
|
+
export const Playground: Story = {
|
|
555
|
+
parameters: {
|
|
556
|
+
docs: {
|
|
557
|
+
description: {
|
|
558
|
+
story: 'Interactive playground for experimenting with all dropdown properties and configurations.',
|
|
559
|
+
},
|
|
560
|
+
},
|
|
561
|
+
},
|
|
562
|
+
render: (args: any) => html`
|
|
563
|
+
<nr-dropdown
|
|
564
|
+
placement="${args.placement}"
|
|
565
|
+
trigger="${args.trigger}"
|
|
566
|
+
size="${args.size}"
|
|
567
|
+
animation="${args.animation}"
|
|
568
|
+
?disabled="${args.disabled}"
|
|
569
|
+
?arrow="${args.arrow}"
|
|
570
|
+
?auto-close="${args.autoClose}"
|
|
571
|
+
?close-on-outside-click="${args.closeOnOutsideClick}"
|
|
572
|
+
?close-on-escape="${args.closeOnEscape}"
|
|
573
|
+
offset="${args.offset}"
|
|
574
|
+
delay="${args.delay}"
|
|
575
|
+
max-height="${args.maxHeight}"
|
|
576
|
+
min-width="${args.minWidth}"
|
|
577
|
+
>
|
|
578
|
+
<nr-button slot="trigger" >
|
|
579
|
+
Playground Dropdown
|
|
580
|
+
</nr-button>
|
|
581
|
+
<div slot="content" style="padding: 16px; min-width: 200px;">
|
|
582
|
+
<h4 style="margin: 0 0 12px 0;">Playground Content</h4>
|
|
583
|
+
<p style="margin: 0 0 16px 0; color: var(--nuraly-color-text-secondary); font-size: 14px;">
|
|
584
|
+
Use the controls panel to test different dropdown configurations and behaviors.
|
|
585
|
+
</p>
|
|
586
|
+
<div style="display: flex; gap: 8px;">
|
|
587
|
+
<nr-button size="small" type="primary">Primary</nr-button>
|
|
588
|
+
<nr-button size="small" >Secondary</nr-button>
|
|
589
|
+
</div>
|
|
590
|
+
</div>
|
|
591
|
+
</nr-dropdown>
|
|
592
|
+
`,
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* Demonstrates dropdown behavior at viewport edges. Dropdowns automatically
|
|
597
|
+
* adjust their position when there's insufficient space to display below the trigger.
|
|
598
|
+
* This example shows dropdowns near the bottom of the viewport that flip upward.
|
|
599
|
+
*/
|
|
600
|
+
export const ViewportEdges: Story = {
|
|
601
|
+
parameters: {
|
|
602
|
+
docs: {
|
|
603
|
+
description: {
|
|
604
|
+
story: 'Dropdowns positioned near viewport edges automatically adjust their placement to remain visible. Try scrolling to see how dropdowns adapt when space is limited.',
|
|
605
|
+
},
|
|
606
|
+
},
|
|
607
|
+
layout: 'fullscreen',
|
|
608
|
+
},
|
|
609
|
+
render: () => html`
|
|
610
|
+
<div style="height: 100vh; padding: 20px; display: flex; flex-direction: column; justify-content: space-between;">
|
|
611
|
+
<!-- Top of viewport -->
|
|
612
|
+
<div style="display: flex; gap: 20px; align-items: flex-start;">
|
|
613
|
+
<nr-dropdown placement="bottom-start">
|
|
614
|
+
<nr-button slot="trigger" >Top Left</nr-button>
|
|
615
|
+
<div slot="content" style="padding: 16px; min-width: 200px;">
|
|
616
|
+
<h4 style="margin: 0 0 8px 0;">Top Dropdown</h4>
|
|
617
|
+
<p style="margin: 0 0 12px 0; color: var(--nuraly-color-text-secondary);">
|
|
618
|
+
This dropdown appears below the trigger as there's plenty of space.
|
|
619
|
+
</p>
|
|
620
|
+
<nr-button size="small" type="primary">Action</nr-button>
|
|
621
|
+
</div>
|
|
622
|
+
</nr-dropdown>
|
|
623
|
+
|
|
624
|
+
<nr-dropdown placement="bottom-end">
|
|
625
|
+
<nr-button slot="trigger" >Top Right</nr-button>
|
|
626
|
+
<div slot="content" style="padding: 16px; min-width: 200px;">
|
|
627
|
+
<h4 style="margin: 0 0 8px 0;">Right-aligned Dropdown</h4>
|
|
628
|
+
<p style="margin: 0 0 12px 0; color: var(--nuraly-color-text-secondary);">
|
|
629
|
+
This dropdown is right-aligned to the trigger.
|
|
630
|
+
</p>
|
|
631
|
+
<nr-button size="small" type="primary">Action</nr-button>
|
|
632
|
+
</div>
|
|
633
|
+
</nr-dropdown>
|
|
634
|
+
</div>
|
|
635
|
+
|
|
636
|
+
<!-- Center of viewport -->
|
|
637
|
+
<div style="display: flex; justify-content: center;">
|
|
638
|
+
<nr-dropdown placement="bottom">
|
|
639
|
+
<nr-button slot="trigger" >Center</nr-button>
|
|
640
|
+
<div slot="content" style="padding: 16px; min-width: 250px;">
|
|
641
|
+
<h4 style="margin: 0 0 8px 0;">Center Dropdown</h4>
|
|
642
|
+
<p style="margin: 0 0 12px 0; color: var(--nuraly-color-text-secondary);">
|
|
643
|
+
This dropdown appears in the center with normal positioning.
|
|
644
|
+
</p>
|
|
645
|
+
<div style="display: flex; gap: 8px;">
|
|
646
|
+
<nr-button size="small" type="primary">Primary</nr-button>
|
|
647
|
+
<nr-button size="small" >Secondary</nr-button>
|
|
648
|
+
</div>
|
|
649
|
+
</div>
|
|
650
|
+
</nr-dropdown>
|
|
651
|
+
</div>
|
|
652
|
+
|
|
653
|
+
<!-- Bottom of viewport - these should flip upward when space is limited -->
|
|
654
|
+
<div style="display: flex; gap: 20px; align-items: flex-end; justify-content: space-between;">
|
|
655
|
+
<nr-dropdown placement="top-start">
|
|
656
|
+
<nr-button slot="trigger" >Bottom Left (Manual Top)</nr-button>
|
|
657
|
+
<div slot="content" style="padding: 16px; min-width: 200px;">
|
|
658
|
+
<h4 style="margin: 0 0 8px 0;">Upward Dropdown</h4>
|
|
659
|
+
<p style="margin: 0 0 12px 0; color: var(--nuraly-color-text-secondary);">
|
|
660
|
+
This dropdown is manually set to appear above the trigger.
|
|
661
|
+
</p>
|
|
662
|
+
<nr-button size="small" type="primary">Action</nr-button>
|
|
663
|
+
</div>
|
|
664
|
+
</nr-dropdown>
|
|
665
|
+
|
|
666
|
+
<nr-dropdown placement="bottom" class="edge-dropdown">
|
|
667
|
+
<nr-button slot="trigger" >Bottom Center (Auto-flip)</nr-button>
|
|
668
|
+
<div slot="content" style="padding: 16px; min-width: 220px; max-height: 200px; overflow-y: auto;">
|
|
669
|
+
<h4 style="margin: 0 0 8px 0;">Smart Positioning</h4>
|
|
670
|
+
<p style="margin: 0 0 12px 0; color: var(--nuraly-color-text-secondary);">
|
|
671
|
+
This dropdown should automatically flip upward when there's insufficient space below.
|
|
672
|
+
</p>
|
|
673
|
+
<div style="margin-bottom: 8px;">
|
|
674
|
+
<nr-button size="small" type="primary" style="width: 100%; margin-bottom: 4px;">Item 1</nr-button>
|
|
675
|
+
<nr-button size="small" style="width: 100%; margin-bottom: 4px;">Item 2</nr-button>
|
|
676
|
+
<nr-button size="small" style="width: 100%; margin-bottom: 4px;">Item 3</nr-button>
|
|
677
|
+
<nr-button size="small" style="width: 100%;">Item 4</nr-button>
|
|
678
|
+
</div>
|
|
679
|
+
</div>
|
|
680
|
+
</nr-dropdown>
|
|
681
|
+
|
|
682
|
+
<nr-dropdown placement="top-end">
|
|
683
|
+
<nr-button slot="trigger" >Bottom Right (Manual Top)</nr-button>
|
|
684
|
+
<div slot="content" style="padding: 16px; min-width: 200px;">
|
|
685
|
+
<h4 style="margin: 0 0 8px 0;">Right-aligned Up</h4>
|
|
686
|
+
<p style="margin: 0 0 12px 0; color: var(--nuraly-color-text-secondary);">
|
|
687
|
+
This dropdown appears above and right-aligned.
|
|
688
|
+
</p>
|
|
689
|
+
<nr-button size="small" type="primary">Action</nr-button>
|
|
690
|
+
</div>
|
|
691
|
+
</nr-dropdown>
|
|
692
|
+
</div>
|
|
693
|
+
|
|
694
|
+
<!-- Extra content to ensure scrolling -->
|
|
695
|
+
<div style="margin-top: 20px; padding: 20px; background: var(--nuraly-color-background-secondary); border-radius: 8px;">
|
|
696
|
+
<h3 style="margin: 0 0 12px 0;">Scroll Testing Area</h3>
|
|
697
|
+
<p style="margin: 0 0 16px 0; color: var(--nuraly-color-text-secondary);">
|
|
698
|
+
Scroll up and down to see how dropdowns behave at different viewport positions.
|
|
699
|
+
The dropdown positioning should adapt based on available space.
|
|
700
|
+
</p>
|
|
701
|
+
|
|
702
|
+
<div style="display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0;">
|
|
703
|
+
<nr-dropdown placement="bottom-start">
|
|
704
|
+
<nr-button slot="trigger" size="small">Test 1</nr-button>
|
|
705
|
+
<div slot="content" style="padding: 12px; min-width: 150px;">
|
|
706
|
+
<p style="margin: 0;">Small dropdown content</p>
|
|
707
|
+
</div>
|
|
708
|
+
</nr-dropdown>
|
|
709
|
+
</div>
|
|
710
|
+
</div>
|
|
711
|
+
</div>
|
|
712
|
+
`,
|
|
713
|
+
};
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* Basic cascading dropdown demonstrating submenu functionality.
|
|
717
|
+
* Items with 'options' property automatically show cascading submenus.
|
|
718
|
+
*/
|
|
719
|
+
export const CascadingBasic: Story = {
|
|
720
|
+
parameters: {
|
|
721
|
+
docs: {
|
|
722
|
+
description: {
|
|
723
|
+
story: 'Basic cascading dropdown with submenus. Items with `options` property automatically show cascading submenus on hover or click.',
|
|
724
|
+
},
|
|
725
|
+
},
|
|
726
|
+
},
|
|
727
|
+
render: (args) => html`
|
|
728
|
+
<nr-dropdown
|
|
729
|
+
.items="${[
|
|
730
|
+
{
|
|
731
|
+
id: 'file',
|
|
732
|
+
label: 'File',
|
|
733
|
+
icon: 'folder',
|
|
734
|
+
options: [
|
|
735
|
+
{ id: 'new', label: 'New Document', icon: 'plus' },
|
|
736
|
+
{ id: 'open', label: 'Open...', icon: 'folder-open' },
|
|
737
|
+
{ id: 'divider1', label: '', divider: true },
|
|
738
|
+
{ id: 'save', label: 'Save', icon: 'save' },
|
|
739
|
+
{ id: 'save-as', label: 'Save As...', icon: 'save' }
|
|
740
|
+
]
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
id: 'edit',
|
|
744
|
+
label: 'Edit',
|
|
745
|
+
icon: 'edit',
|
|
746
|
+
options: [
|
|
747
|
+
{ id: 'copy', label: 'Copy', icon: 'copy' },
|
|
748
|
+
{ id: 'paste', label: 'Paste', icon: 'paste' },
|
|
749
|
+
{ id: 'cut', label: 'Cut', icon: 'scissors' },
|
|
750
|
+
{ id: 'divider-edit', label: '', divider: true },
|
|
751
|
+
{ id: 'select-all', label: 'Select All', icon: 'check-square' },
|
|
752
|
+
{ id: 'find', label: 'Find & Replace', icon: 'search' }
|
|
753
|
+
]
|
|
754
|
+
},
|
|
755
|
+
{ id: 'divider2', label: '', divider: true },
|
|
756
|
+
{ id: 'settings', label: 'Settings', icon: 'settings' },
|
|
757
|
+
{ id: 'help', label: 'Help', icon: 'help-circle' }
|
|
758
|
+
]}"
|
|
759
|
+
cascade-direction="${args.cascadeDirection}"
|
|
760
|
+
cascade-delay="${args.cascadeDelay}"
|
|
761
|
+
?cascade-on-hover="${args.cascadeOnHover}"
|
|
762
|
+
placement="${args.placement}"
|
|
763
|
+
trigger="${args.trigger}">
|
|
764
|
+
<nr-button slot="trigger">File Menu</nr-button>
|
|
765
|
+
</nr-dropdown>
|
|
766
|
+
`,
|
|
767
|
+
args: {
|
|
768
|
+
cascadeDirection: 'right',
|
|
769
|
+
cascadeDelay: 200,
|
|
770
|
+
cascadeOnHover: true,
|
|
771
|
+
},
|
|
772
|
+
};
|
|
773
|
+
|
|
774
|
+
/**
|
|
775
|
+
* Complex cascading dropdown with mixed content types.
|
|
776
|
+
* Demonstrates regular items mixed with cascading items in the same dropdown.
|
|
777
|
+
*/
|
|
778
|
+
export const CascadingComplex: Story = {
|
|
779
|
+
parameters: {
|
|
780
|
+
docs: {
|
|
781
|
+
description: {
|
|
782
|
+
story: 'Complex cascading dropdown mixing regular items with cascading submenus. Shows how different content types can coexist.',
|
|
783
|
+
},
|
|
784
|
+
},
|
|
785
|
+
},
|
|
786
|
+
render: (args) => html`
|
|
787
|
+
<nr-dropdown
|
|
788
|
+
.items="${[
|
|
789
|
+
{ id: 'profile', label: 'My Profile', icon: 'user' },
|
|
790
|
+
{ id: 'notifications', label: 'Notifications', icon: 'bell' },
|
|
791
|
+
{ id: 'divider1', label: '', divider: true },
|
|
792
|
+
{
|
|
793
|
+
id: 'workspace',
|
|
794
|
+
label: 'Workspace',
|
|
795
|
+
icon: 'layers',
|
|
796
|
+
options: [
|
|
797
|
+
{ id: 'dashboard', label: 'Dashboard', icon: 'layout-dashboard' },
|
|
798
|
+
{ id: 'projects', label: 'Projects', icon: 'folder' },
|
|
799
|
+
{ id: 'team', label: 'Team Members', icon: 'users' },
|
|
800
|
+
{ id: 'divider-workspace', label: '', divider: true },
|
|
801
|
+
{ id: 'analytics', label: 'Analytics', icon: 'bar-chart' }
|
|
802
|
+
]
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
id: 'settings',
|
|
806
|
+
label: 'Settings',
|
|
807
|
+
icon: 'settings',
|
|
808
|
+
options: [
|
|
809
|
+
{ id: 'general', label: 'General', icon: 'sliders' },
|
|
810
|
+
{ id: 'security', label: 'Security & Privacy', icon: 'shield' },
|
|
811
|
+
{ id: 'notifications-settings', label: 'Notifications', icon: 'bell' },
|
|
812
|
+
{ id: 'billing', label: 'Billing', icon: 'credit-card' },
|
|
813
|
+
{ id: 'divider-settings', label: '', divider: true },
|
|
814
|
+
{ id: 'integrations', label: 'Integrations', icon: 'plug' }
|
|
815
|
+
]
|
|
816
|
+
},
|
|
817
|
+
{ id: 'divider2', label: '', divider: true },
|
|
818
|
+
{ id: 'support', label: 'Help & Support', icon: 'help-circle' },
|
|
819
|
+
{ id: 'logout', label: 'Sign Out', icon: 'log-out' }
|
|
820
|
+
]}"
|
|
821
|
+
cascade-direction="${args.cascadeDirection}"
|
|
822
|
+
cascade-delay="${args.cascadeDelay}"
|
|
823
|
+
?cascade-on-hover="${args.cascadeOnHover}"
|
|
824
|
+
placement="${args.placement}"
|
|
825
|
+
trigger="${args.trigger}">
|
|
826
|
+
<nr-button slot="trigger" type="primary">
|
|
827
|
+
<nr-icon name="user" slot="prefix"></nr-icon>
|
|
828
|
+
Account Menu
|
|
829
|
+
</nr-button>
|
|
830
|
+
</nr-dropdown>
|
|
831
|
+
`,
|
|
832
|
+
args: {
|
|
833
|
+
cascadeDirection: 'right',
|
|
834
|
+
cascadeDelay: 300,
|
|
835
|
+
cascadeOnHover: true,
|
|
836
|
+
},
|
|
837
|
+
};
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* Cascading dropdown with different directions.
|
|
841
|
+
* Demonstrates left, right, and auto cascade directions.
|
|
842
|
+
*/
|
|
843
|
+
export const CascadingDirections: Story = {
|
|
844
|
+
parameters: {
|
|
845
|
+
docs: {
|
|
846
|
+
description: {
|
|
847
|
+
story: 'Cascading dropdowns with different cascade directions. Shows how submenus can cascade to the left, right, or auto-position.',
|
|
848
|
+
},
|
|
849
|
+
},
|
|
850
|
+
},
|
|
851
|
+
render: (args) => html`
|
|
852
|
+
<div style="display: flex; gap: 20px; justify-content: center; align-items: center; min-height: 300px;">
|
|
853
|
+
<!-- Left Cascade -->
|
|
854
|
+
<nr-dropdown
|
|
855
|
+
.items="${[
|
|
856
|
+
{
|
|
857
|
+
id: 'tools',
|
|
858
|
+
label: 'Tools',
|
|
859
|
+
options: [
|
|
860
|
+
{ id: 'calculator', label: 'Calculator', icon: 'calculator' },
|
|
861
|
+
{ id: 'calendar', label: 'Calendar', icon: 'calendar' },
|
|
862
|
+
{ id: 'divider-tools', label: '', divider: true },
|
|
863
|
+
{ id: 'notes', label: 'Notes', icon: 'file-text' }
|
|
864
|
+
]
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
id: 'utilities',
|
|
868
|
+
label: 'Utilities',
|
|
869
|
+
options: [
|
|
870
|
+
{ id: 'backup', label: 'Backup', icon: 'archive' },
|
|
871
|
+
{ id: 'restore', label: 'Restore', icon: 'refresh-cw' },
|
|
872
|
+
{ id: 'divider-utilities', label: '', divider: true },
|
|
873
|
+
{ id: 'cleanup', label: 'Cleanup', icon: 'trash-2' }
|
|
874
|
+
]
|
|
875
|
+
}
|
|
876
|
+
]}"
|
|
877
|
+
cascade-direction="left"
|
|
878
|
+
cascade-delay="200">
|
|
879
|
+
<nr-button slot="trigger" size="small">← Left Cascade</nr-button>
|
|
880
|
+
</nr-dropdown>
|
|
881
|
+
|
|
882
|
+
<!-- Auto Cascade -->
|
|
883
|
+
<nr-dropdown
|
|
884
|
+
.items="${[
|
|
885
|
+
{
|
|
886
|
+
id: 'recent',
|
|
887
|
+
label: 'Recent Files',
|
|
888
|
+
options: [
|
|
889
|
+
{ id: 'doc1', label: 'Document 1.pdf' },
|
|
890
|
+
{ id: 'doc2', label: 'Presentation.pptx' },
|
|
891
|
+
{ id: 'doc3', label: 'Spreadsheet.xlsx' }
|
|
892
|
+
]
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
id: 'templates',
|
|
896
|
+
label: 'Templates',
|
|
897
|
+
options: [
|
|
898
|
+
{ id: 'letter', label: 'Letter Template' },
|
|
899
|
+
{ id: 'invoice', label: 'Invoice Template' },
|
|
900
|
+
{ id: 'report', label: 'Report Template' }
|
|
901
|
+
]
|
|
902
|
+
}
|
|
903
|
+
]}"
|
|
904
|
+
cascade-direction="auto"
|
|
905
|
+
cascade-delay="200">
|
|
906
|
+
<nr-button slot="trigger" size="small">↕ Auto Cascade</nr-button>
|
|
907
|
+
</nr-dropdown>
|
|
908
|
+
|
|
909
|
+
<!-- Right Cascade -->
|
|
910
|
+
<nr-dropdown
|
|
911
|
+
.items="${[
|
|
912
|
+
{
|
|
913
|
+
id: 'export',
|
|
914
|
+
label: 'Export',
|
|
915
|
+
options: [
|
|
916
|
+
{ id: 'pdf', label: 'Export as PDF', icon: 'file' },
|
|
917
|
+
{ id: 'word', label: 'Export as Word', icon: 'file-text' },
|
|
918
|
+
{ id: 'divider-export', label: '', divider: true },
|
|
919
|
+
{ id: 'excel', label: 'Export as Excel', icon: 'grid' }
|
|
920
|
+
]
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
id: 'share',
|
|
924
|
+
label: 'Share',
|
|
925
|
+
options: [
|
|
926
|
+
{ id: 'email', label: 'Send via Email', icon: 'mail' },
|
|
927
|
+
{ id: 'link', label: 'Copy Link', icon: 'link' },
|
|
928
|
+
{ id: 'divider-share', label: '', divider: true },
|
|
929
|
+
{ id: 'embed', label: 'Embed Code', icon: 'code' }
|
|
930
|
+
]
|
|
931
|
+
}
|
|
932
|
+
]}"
|
|
933
|
+
cascade-direction="right"
|
|
934
|
+
cascade-delay="200">
|
|
935
|
+
<nr-button slot="trigger" size="small">Right Cascade →</nr-button>
|
|
936
|
+
</nr-dropdown>
|
|
937
|
+
</div>
|
|
938
|
+
`,
|
|
939
|
+
};
|
|
940
|
+
|
|
941
|
+
/**
|
|
942
|
+
* Cascading dropdown with click interaction.
|
|
943
|
+
* Demonstrates cascading behavior when hover is disabled.
|
|
944
|
+
*/
|
|
945
|
+
export const CascadingClickOnly: Story = {
|
|
946
|
+
parameters: {
|
|
947
|
+
docs: {
|
|
948
|
+
description: {
|
|
949
|
+
story: 'Cascading dropdown with click-only interaction. Submenus only open when clicked, not on hover.',
|
|
950
|
+
},
|
|
951
|
+
},
|
|
952
|
+
},
|
|
953
|
+
render: (args) => html`
|
|
954
|
+
<nr-dropdown
|
|
955
|
+
.items="${[
|
|
956
|
+
{
|
|
957
|
+
id: 'development',
|
|
958
|
+
label: 'Development',
|
|
959
|
+
icon: 'code',
|
|
960
|
+
options: [
|
|
961
|
+
{ id: 'frontend', label: 'Frontend', icon: 'monitor' },
|
|
962
|
+
{ id: 'backend', label: 'Backend', icon: 'server' },
|
|
963
|
+
{ id: 'mobile', label: 'Mobile', icon: 'smartphone' },
|
|
964
|
+
{ id: 'devops', label: 'DevOps', icon: 'cloud' }
|
|
965
|
+
]
|
|
966
|
+
},
|
|
967
|
+
{
|
|
968
|
+
id: 'design',
|
|
969
|
+
label: 'Design',
|
|
970
|
+
icon: 'palette',
|
|
971
|
+
options: [
|
|
972
|
+
{ id: 'ui', label: 'UI Design', icon: 'layout' },
|
|
973
|
+
{ id: 'ux', label: 'UX Research', icon: 'search' },
|
|
974
|
+
{ id: 'graphics', label: 'Graphics', icon: 'image' },
|
|
975
|
+
{ id: 'branding', label: 'Branding', icon: 'tag' }
|
|
976
|
+
]
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
id: 'marketing',
|
|
980
|
+
label: 'Marketing',
|
|
981
|
+
icon: 'megaphone',
|
|
982
|
+
options: [
|
|
983
|
+
{ id: 'social', label: 'Social Media', icon: 'share-2' },
|
|
984
|
+
{ id: 'email', label: 'Email Campaigns', icon: 'mail' },
|
|
985
|
+
{ id: 'seo', label: 'SEO', icon: 'trending-up' },
|
|
986
|
+
{ id: 'content', label: 'Content', icon: 'file-text' }
|
|
987
|
+
]
|
|
988
|
+
}
|
|
989
|
+
]}"
|
|
990
|
+
cascade-direction="right"
|
|
991
|
+
cascade-delay="300"
|
|
992
|
+
?cascade-on-hover="${false}">
|
|
993
|
+
<nr-button slot="trigger" >
|
|
994
|
+
<nr-icon name="menu" slot="prefix"></nr-icon>
|
|
995
|
+
Services (Click)
|
|
996
|
+
</nr-button>
|
|
997
|
+
</nr-dropdown>
|
|
998
|
+
`,
|
|
999
|
+
args: {
|
|
1000
|
+
cascadeOnHover: false,
|
|
1001
|
+
},
|
|
1002
|
+
};
|
|
1003
|
+
|
|
1004
|
+
/**
|
|
1005
|
+
* Cascading dropdown with custom content in submenus.
|
|
1006
|
+
* Demonstrates using customContent property for complex submenu layouts.
|
|
1007
|
+
*/
|
|
1008
|
+
export const CascadingCustomContent: Story = {
|
|
1009
|
+
parameters: {
|
|
1010
|
+
docs: {
|
|
1011
|
+
description: {
|
|
1012
|
+
story: 'Cascading dropdown with custom HTML content in submenus. Useful for forms, complex layouts, or rich content that goes beyond simple menu items.',
|
|
1013
|
+
},
|
|
1014
|
+
},
|
|
1015
|
+
},
|
|
1016
|
+
render: (args) => html`
|
|
1017
|
+
<nr-dropdown
|
|
1018
|
+
.items="${[
|
|
1019
|
+
{
|
|
1020
|
+
id: 'user-profile',
|
|
1021
|
+
label: 'User Profile',
|
|
1022
|
+
icon: 'user',
|
|
1023
|
+
customContent: `
|
|
1024
|
+
<div style="padding: 12px; min-width: 250px;">
|
|
1025
|
+
<h4 style="margin: 0 0 8px 0; color: #333;">John Doe</h4>
|
|
1026
|
+
<p style="margin: 0 0 12px 0; color: #666; font-size: 0.875rem;">john.doe@example.com</p>
|
|
1027
|
+
<div style="margin-bottom: 12px;">
|
|
1028
|
+
<button type="button" style="width: 100%; padding: 8px; margin-bottom: 6px; background: #007bff; color: white; border: none; border-radius: 4px; cursor: pointer;">Edit Profile</button>
|
|
1029
|
+
<button type="button" style="width: 100%; padding: 8px; background: #6c757d; color: white; border: none; border-radius: 4px; cursor: pointer;">Account Settings</button>
|
|
1030
|
+
</div>
|
|
1031
|
+
</div>
|
|
1032
|
+
`
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
id: 'search',
|
|
1036
|
+
label: 'Advanced Search',
|
|
1037
|
+
icon: 'search',
|
|
1038
|
+
customContent: `
|
|
1039
|
+
<div style="padding: 16px; min-width: 280px;">
|
|
1040
|
+
<h4 style="margin: 0 0 12px 0;">Search Options</h4>
|
|
1041
|
+
<div style="margin-bottom: 12px;">
|
|
1042
|
+
<label style="display: block; margin-bottom: 4px; font-size: 0.875rem;">Search in:</label>
|
|
1043
|
+
<select style="width: 100%; padding: 6px; border: 1px solid #ddd; border-radius: 4px;">
|
|
1044
|
+
<option>All Files</option>
|
|
1045
|
+
<option>Documents</option>
|
|
1046
|
+
<option>Images</option>
|
|
1047
|
+
<option>Videos</option>
|
|
1048
|
+
</select>
|
|
1049
|
+
</div>
|
|
1050
|
+
<div style="margin-bottom: 12px;">
|
|
1051
|
+
<label style="display: block; margin-bottom: 4px; font-size: 0.875rem;">Keywords:</label>
|
|
1052
|
+
<input type="text" placeholder="Enter keywords..." style="width: 100%; padding: 6px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box;">
|
|
1053
|
+
</div>
|
|
1054
|
+
<button type="button" style="width: 100%; padding: 8px; background: #28a745; color: white; border: none; border-radius: 4px; cursor: pointer;">Search</button>
|
|
1055
|
+
</div>
|
|
1056
|
+
`
|
|
1057
|
+
},
|
|
1058
|
+
{
|
|
1059
|
+
id: 'notifications',
|
|
1060
|
+
label: 'Notifications',
|
|
1061
|
+
icon: 'bell',
|
|
1062
|
+
customContent: `
|
|
1063
|
+
<div style="padding: 12px; min-width: 300px; max-height: 250px; overflow-y: auto;">
|
|
1064
|
+
<h4 style="margin: 0 0 12px 0;">Recent Notifications</h4>
|
|
1065
|
+
<div style="border-bottom: 1px solid #eee; padding-bottom: 8px; margin-bottom: 8px;">
|
|
1066
|
+
<div style="font-weight: 500; font-size: 0.875rem;">New message received</div>
|
|
1067
|
+
<div style="color: #666; font-size: 0.75rem;">2 minutes ago</div>
|
|
1068
|
+
</div>
|
|
1069
|
+
<div style="border-bottom: 1px solid #eee; padding-bottom: 8px; margin-bottom: 8px;">
|
|
1070
|
+
<div style="font-weight: 500; font-size: 0.875rem;">File upload completed</div>
|
|
1071
|
+
<div style="color: #666; font-size: 0.75rem;">15 minutes ago</div>
|
|
1072
|
+
</div>
|
|
1073
|
+
<div style="border-bottom: 1px solid #eee; padding-bottom: 8px; margin-bottom: 8px;">
|
|
1074
|
+
<div style="font-weight: 500; font-size: 0.875rem;">System maintenance scheduled</div>
|
|
1075
|
+
<div style="color: #666; font-size: 0.75rem;">1 hour ago</div>
|
|
1076
|
+
</div>
|
|
1077
|
+
<div style="text-align: center; margin-top: 12px;">
|
|
1078
|
+
<button type="button" style="padding: 6px 16px; background: #007bff; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 0.875rem;">View All</button>
|
|
1079
|
+
</div>
|
|
1080
|
+
</div>
|
|
1081
|
+
`
|
|
1082
|
+
},
|
|
1083
|
+
{ id: 'divider1', label: '', divider: true },
|
|
1084
|
+
{
|
|
1085
|
+
id: 'calculator',
|
|
1086
|
+
label: 'Quick Calculator',
|
|
1087
|
+
icon: 'calculator',
|
|
1088
|
+
customContent: `
|
|
1089
|
+
<div style="padding: 16px; min-width: 200px;">
|
|
1090
|
+
<h4 style="margin: 0 0 12px 0;">Calculator</h4>
|
|
1091
|
+
<input type="text" id="calc-display" readonly style="width: 100%; padding: 8px; margin-bottom: 8px; text-align: right; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box;">
|
|
1092
|
+
<div style="display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;">
|
|
1093
|
+
<button onclick="document.getElementById('calc-display').value=''" style="padding: 8px; border: 1px solid #ddd; background: #f8f9fa; cursor: pointer;">C</button>
|
|
1094
|
+
<button onclick="document.getElementById('calc-display').value+='/'" style="padding: 8px; border: 1px solid #ddd; background: #f8f9fa; cursor: pointer;">÷</button>
|
|
1095
|
+
<button onclick="document.getElementById('calc-display').value+='*'" style="padding: 8px; border: 1px solid #ddd; background: #f8f9fa; cursor: pointer;">×</button>
|
|
1096
|
+
<button onclick="document.getElementById('calc-display').value=document.getElementById('calc-display').value.slice(0,-1)" style="padding: 8px; border: 1px solid #ddd; background: #f8f9fa; cursor: pointer;">⌫</button>
|
|
1097
|
+
<button onclick="document.getElementById('calc-display').value+='7'" style="padding: 8px; border: 1px solid #ddd; background: white; cursor: pointer;">7</button>
|
|
1098
|
+
<button onclick="document.getElementById('calc-display').value+='8'" style="padding: 8px; border: 1px solid #ddd; background: white; cursor: pointer;">8</button>
|
|
1099
|
+
<button onclick="document.getElementById('calc-display').value+='9'" style="padding: 8px; border: 1px solid #ddd; background: white; cursor: pointer;">9</button>
|
|
1100
|
+
<button onclick="document.getElementById('calc-display').value+='-'" style="padding: 8px; border: 1px solid #ddd; background: #f8f9fa; cursor: pointer;">-</button>
|
|
1101
|
+
</div>
|
|
1102
|
+
</div>
|
|
1103
|
+
`
|
|
1104
|
+
},
|
|
1105
|
+
{
|
|
1106
|
+
id: 'regular-options',
|
|
1107
|
+
label: 'Standard Menu',
|
|
1108
|
+
icon: 'menu',
|
|
1109
|
+
options: [
|
|
1110
|
+
{ id: 'option1', label: 'Option 1', icon: 'check' },
|
|
1111
|
+
{ id: 'option2', label: 'Option 2', icon: 'star' },
|
|
1112
|
+
{ id: 'divider-regular', label: '', divider: true },
|
|
1113
|
+
{ id: 'option3', label: 'Option 3', icon: 'heart' }
|
|
1114
|
+
]
|
|
1115
|
+
}
|
|
1116
|
+
]}"
|
|
1117
|
+
cascade-direction="${args.cascadeDirection}"
|
|
1118
|
+
cascade-delay="${args.cascadeDelay}"
|
|
1119
|
+
?cascade-on-hover="${args.cascadeOnHover}">
|
|
1120
|
+
<nr-button slot="trigger" type="primary">
|
|
1121
|
+
<nr-icon name="layers" slot="prefix"></nr-icon>
|
|
1122
|
+
Custom Content Menu
|
|
1123
|
+
</nr-button>
|
|
1124
|
+
</nr-dropdown>
|
|
1125
|
+
`,
|
|
1126
|
+
args: {
|
|
1127
|
+
cascadeDirection: 'right',
|
|
1128
|
+
cascadeDelay: 200,
|
|
1129
|
+
cascadeOnHover: true,
|
|
1130
|
+
},
|
|
1131
|
+
};
|
|
1132
|
+
|
|
1133
|
+
/**
|
|
1134
|
+
* Interactive cascading dropdown with Lit templates.
|
|
1135
|
+
* Demonstrates fully interactive custom content with event handlers and state.
|
|
1136
|
+
*/
|
|
1137
|
+
export const CascadingInteractive: Story = {
|
|
1138
|
+
parameters: {
|
|
1139
|
+
docs: {
|
|
1140
|
+
description: {
|
|
1141
|
+
story: 'Interactive cascading dropdown using Lit templates for fully functional custom content with event handlers, state management, and real interactivity.',
|
|
1142
|
+
},
|
|
1143
|
+
},
|
|
1144
|
+
},
|
|
1145
|
+
render: (args) => html`
|
|
1146
|
+
<nr-dropdown
|
|
1147
|
+
trigger="hover"
|
|
1148
|
+
.items="${[
|
|
1149
|
+
{
|
|
1150
|
+
id: 'interactive-profile',
|
|
1151
|
+
label: 'User Profile',
|
|
1152
|
+
icon: 'user',
|
|
1153
|
+
customContent: html`
|
|
1154
|
+
<div style="padding: 16px; min-width: 280px;">
|
|
1155
|
+
<div style="display: flex; align-items: center; margin-bottom: 12px;">
|
|
1156
|
+
<div style="width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; color: white; font-weight: bold; margin-right: 12px;">
|
|
1157
|
+
JD
|
|
1158
|
+
</div>
|
|
1159
|
+
<div>
|
|
1160
|
+
<div style="font-weight: 600; color: #333;">John Doe</div>
|
|
1161
|
+
<div style="font-size: 0.875rem; color: #666;">Senior Developer</div>
|
|
1162
|
+
</div>
|
|
1163
|
+
</div>
|
|
1164
|
+
<div style="background: #f8f9fa; padding: 8px; border-radius: 4px; margin-bottom: 12px; font-size: 0.875rem;">
|
|
1165
|
+
<strong>Status:</strong> <span style="color: #28a745;">● Online</span>
|
|
1166
|
+
</div>
|
|
1167
|
+
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 8px;">
|
|
1168
|
+
<nr-button size="small" type="primary" @click="${() => alert('Edit Profile clicked!')}">
|
|
1169
|
+
Edit Profile
|
|
1170
|
+
</nr-button>
|
|
1171
|
+
<nr-button size="small" type="secondary" @click="${() => alert('Settings clicked!')}">
|
|
1172
|
+
Settings
|
|
1173
|
+
</nr-button>
|
|
1174
|
+
</div>
|
|
1175
|
+
<div style="margin-top: 12px; padding-top: 12px; border-top: 1px solid #eee;">
|
|
1176
|
+
<nr-button size="small" style="width: 100%;" @click="${() => alert('Logout clicked!')}">
|
|
1177
|
+
<nr-icon name="log-out" slot="prefix"></nr-icon>
|
|
1178
|
+
Sign Out
|
|
1179
|
+
</nr-button>
|
|
1180
|
+
</div>
|
|
1181
|
+
</div>
|
|
1182
|
+
`
|
|
1183
|
+
},
|
|
1184
|
+
{
|
|
1185
|
+
id: 'interactive-form',
|
|
1186
|
+
label: 'Contact Form',
|
|
1187
|
+
icon: 'mail',
|
|
1188
|
+
customContent: html`
|
|
1189
|
+
<div style="padding: 16px; min-width: 300px;">
|
|
1190
|
+
<h4 style="margin: 0 0 12px 0;">Quick Contact</h4>
|
|
1191
|
+
<div style="margin-bottom: 12px;">
|
|
1192
|
+
<label style="display: block; margin-bottom: 4px; font-size: 0.875rem; font-weight: 500;">Name:</label>
|
|
1193
|
+
<input
|
|
1194
|
+
type="text"
|
|
1195
|
+
id="contact-name"
|
|
1196
|
+
placeholder="Your name"
|
|
1197
|
+
style="width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box;"
|
|
1198
|
+
>
|
|
1199
|
+
</div>
|
|
1200
|
+
<div style="margin-bottom: 12px;">
|
|
1201
|
+
<label style="display: block; margin-bottom: 4px; font-size: 0.875rem; font-weight: 500;">Email:</label>
|
|
1202
|
+
<input
|
|
1203
|
+
type="email"
|
|
1204
|
+
id="contact-email"
|
|
1205
|
+
placeholder="your@email.com"
|
|
1206
|
+
style="width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box;"
|
|
1207
|
+
>
|
|
1208
|
+
</div>
|
|
1209
|
+
<div style="margin-bottom: 12px;">
|
|
1210
|
+
<label style="display: block; margin-bottom: 4px; font-size: 0.875rem; font-weight: 500;">Message:</label>
|
|
1211
|
+
<textarea
|
|
1212
|
+
id="contact-message"
|
|
1213
|
+
placeholder="Your message..."
|
|
1214
|
+
rows="3"
|
|
1215
|
+
style="width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; resize: vertical; box-sizing: border-box;"
|
|
1216
|
+
></textarea>
|
|
1217
|
+
</div>
|
|
1218
|
+
<div style="display: flex; gap: 8px;">
|
|
1219
|
+
<nr-button size="small" type="primary" style="flex: 1;" @click="${() => {
|
|
1220
|
+
const nameEl = document.querySelector('#contact-name') as HTMLInputElement;
|
|
1221
|
+
const emailEl = document.querySelector('#contact-email') as HTMLInputElement;
|
|
1222
|
+
const messageEl = document.querySelector('#contact-message') as HTMLTextAreaElement;
|
|
1223
|
+
const name = nameEl?.value || '';
|
|
1224
|
+
const email = emailEl?.value || '';
|
|
1225
|
+
const message = messageEl?.value || '';
|
|
1226
|
+
if (name && email && message) {
|
|
1227
|
+
alert('Message sent from: ' + name + ' (' + email + ')\\nMessage: ' + message);
|
|
1228
|
+
if (nameEl) nameEl.value = '';
|
|
1229
|
+
if (emailEl) emailEl.value = '';
|
|
1230
|
+
if (messageEl) messageEl.value = '';
|
|
1231
|
+
} else {
|
|
1232
|
+
alert('Please fill in all fields');
|
|
1233
|
+
}
|
|
1234
|
+
}}">
|
|
1235
|
+
<nr-icon name="send" slot="prefix"></nr-icon>
|
|
1236
|
+
Send
|
|
1237
|
+
</nr-button>
|
|
1238
|
+
<nr-button size="small" type="secondary" @click="${() => {
|
|
1239
|
+
const nameEl = document.querySelector('#contact-name') as HTMLInputElement;
|
|
1240
|
+
const emailEl = document.querySelector('#contact-email') as HTMLInputElement;
|
|
1241
|
+
const messageEl = document.querySelector('#contact-message') as HTMLTextAreaElement;
|
|
1242
|
+
if (nameEl) nameEl.value = '';
|
|
1243
|
+
if (emailEl) emailEl.value = '';
|
|
1244
|
+
if (messageEl) messageEl.value = '';
|
|
1245
|
+
}}">
|
|
1246
|
+
Clear
|
|
1247
|
+
</nr-button>
|
|
1248
|
+
</div>
|
|
1249
|
+
</div>
|
|
1250
|
+
`
|
|
1251
|
+
}
|
|
1252
|
+
] as DropdownItem[]}"
|
|
1253
|
+
cascade-direction="${args.cascadeDirection}"
|
|
1254
|
+
cascade-delay="${args.cascadeDelay}"
|
|
1255
|
+
?cascade-on-hover="${args.cascadeOnHover}"
|
|
1256
|
+
?auto-close="${args.autoClose}"
|
|
1257
|
+
?close-on-outside-click="${args.closeOnOutsideClick}">
|
|
1258
|
+
<nr-button slot="trigger" type="primary">
|
|
1259
|
+
<nr-icon name="zap" slot="prefix"></nr-icon>
|
|
1260
|
+
Interactive Menu
|
|
1261
|
+
</nr-button>
|
|
1262
|
+
</nr-dropdown>
|
|
1263
|
+
`,
|
|
1264
|
+
args: {
|
|
1265
|
+
cascadeDirection: 'right',
|
|
1266
|
+
cascadeDelay: 200,
|
|
1267
|
+
cascadeOnHover: true,
|
|
1268
|
+
autoClose: false,
|
|
1269
|
+
closeOnOutsideClick: false,
|
|
1270
|
+
},
|
|
1271
|
+
};
|