@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,1653 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { Meta, StoryObj } from '@storybook/web-components';
|
|
3
|
+
import '../icon/index.js';
|
|
4
|
+
import '../input/index.js';
|
|
5
|
+
import './index.js';
|
|
6
|
+
|
|
7
|
+
const meta: Meta = {
|
|
8
|
+
title: 'Data Entry/Select',
|
|
9
|
+
component: 'nr-select',
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: 'centered',
|
|
12
|
+
docs: {
|
|
13
|
+
description: {
|
|
14
|
+
component: `
|
|
15
|
+
A versatile select component with comprehensive functionality including:
|
|
16
|
+
- Single and multiple selection modes
|
|
17
|
+
- Rich options with icons and descriptions
|
|
18
|
+
- Searchable/filterable options
|
|
19
|
+
- Status states (success, warning, error)
|
|
20
|
+
- Keyboard navigation
|
|
21
|
+
- Accessibility support
|
|
22
|
+
- Custom styling with CSS properties
|
|
23
|
+
|
|
24
|
+
## Features
|
|
25
|
+
- **Single Selection**: Choose one option from the dropdown
|
|
26
|
+
- **Multiple Selection**: Select multiple options displayed as removable tags
|
|
27
|
+
- **Rich Options**: Support for icons, descriptions, and disabled states
|
|
28
|
+
- **Search & Filter**: Built-in search functionality for large datasets
|
|
29
|
+
- **Validation States**: Visual feedback for form validation
|
|
30
|
+
- **Keyboard Navigation**: Full keyboard support with arrow keys, Enter, Esc
|
|
31
|
+
- **Accessibility**: ARIA labels, focus management, screen reader support
|
|
32
|
+
|
|
33
|
+
## CSS Custom Properties
|
|
34
|
+
- \`--nuraly-select-border-color\`: Border color
|
|
35
|
+
- \`--nuraly-select-focus-color\`: Focus state color
|
|
36
|
+
- \`--nuraly-select-error-color\`: Error state color
|
|
37
|
+
- \`--nuraly-select-success-color\`: Success state color
|
|
38
|
+
- \`--nuraly-select-background\`: Background color
|
|
39
|
+
- \`--nuraly-select-text-color\`: Text color
|
|
40
|
+
- \`--nuraly-select-dropdown-shadow\`: Dropdown shadow
|
|
41
|
+
`
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
tags: ['autodocs'],
|
|
46
|
+
argTypes: {
|
|
47
|
+
options: {
|
|
48
|
+
control: { type: 'object' },
|
|
49
|
+
description: 'Array of option objects with label, value, icon, description, disabled properties',
|
|
50
|
+
},
|
|
51
|
+
value: {
|
|
52
|
+
control: { type: 'text' },
|
|
53
|
+
description: 'Selected value(s) - string for single, array for multiple',
|
|
54
|
+
},
|
|
55
|
+
placeholder: {
|
|
56
|
+
control: 'text',
|
|
57
|
+
description: 'Placeholder text shown when no option is selected',
|
|
58
|
+
},
|
|
59
|
+
multiple: {
|
|
60
|
+
control: 'boolean',
|
|
61
|
+
description: 'Enable multiple selection mode with tags',
|
|
62
|
+
},
|
|
63
|
+
disabled: {
|
|
64
|
+
control: 'boolean',
|
|
65
|
+
description: 'Disable the entire component',
|
|
66
|
+
},
|
|
67
|
+
searchable: {
|
|
68
|
+
control: 'boolean',
|
|
69
|
+
description: 'Enable search/filter functionality',
|
|
70
|
+
},
|
|
71
|
+
searchPlaceholder: {
|
|
72
|
+
control: 'text',
|
|
73
|
+
description: 'Placeholder text for search input',
|
|
74
|
+
},
|
|
75
|
+
loading: {
|
|
76
|
+
control: 'boolean',
|
|
77
|
+
description: 'Show loading state',
|
|
78
|
+
},
|
|
79
|
+
valid: {
|
|
80
|
+
control: 'boolean',
|
|
81
|
+
description: 'Show valid/success state',
|
|
82
|
+
},
|
|
83
|
+
invalid: {
|
|
84
|
+
control: 'boolean',
|
|
85
|
+
description: 'Show invalid/error state',
|
|
86
|
+
},
|
|
87
|
+
errorMessage: {
|
|
88
|
+
control: 'text',
|
|
89
|
+
description: 'Error message to display in invalid state',
|
|
90
|
+
},
|
|
91
|
+
size: {
|
|
92
|
+
control: 'select',
|
|
93
|
+
options: ['small', 'medium', 'large'],
|
|
94
|
+
description: 'Component size variant',
|
|
95
|
+
},
|
|
96
|
+
maxHeight: {
|
|
97
|
+
control: 'text',
|
|
98
|
+
description: 'Maximum height of dropdown (CSS value)',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
args: {
|
|
102
|
+
placeholder: 'Select an option...',
|
|
103
|
+
multiple: false,
|
|
104
|
+
disabled: false,
|
|
105
|
+
searchable: false,
|
|
106
|
+
loading: false,
|
|
107
|
+
valid: false,
|
|
108
|
+
invalid: false,
|
|
109
|
+
errorMessage: '',
|
|
110
|
+
size: 'medium',
|
|
111
|
+
maxHeight: '200px',
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export default meta;
|
|
116
|
+
type Story = StoryObj;
|
|
117
|
+
|
|
118
|
+
// Common options used across stories
|
|
119
|
+
const basicOptions = [
|
|
120
|
+
{ label: 'Apple', value: 'apple' },
|
|
121
|
+
{ label: 'Banana', value: 'banana' },
|
|
122
|
+
{ label: 'Cherry', value: 'cherry' },
|
|
123
|
+
{ label: 'Date', value: 'date' }
|
|
124
|
+
];
|
|
125
|
+
|
|
126
|
+
// Basic single selection example
|
|
127
|
+
export const Default: Story = {
|
|
128
|
+
args: {
|
|
129
|
+
placeholder: 'Select a fruit',
|
|
130
|
+
multiple: false,
|
|
131
|
+
disabled: false,
|
|
132
|
+
searchable: false,
|
|
133
|
+
size: 'medium',
|
|
134
|
+
},
|
|
135
|
+
render: (args) => html`
|
|
136
|
+
<nr-select
|
|
137
|
+
.options=${[
|
|
138
|
+
{ label: 'Apple', value: 'apple' },
|
|
139
|
+
{ label: 'Banana', value: 'banana' },
|
|
140
|
+
{ label: 'Cherry', value: 'cherry' },
|
|
141
|
+
{ label: 'Date', value: 'date' },
|
|
142
|
+
{ label: 'Elderberry', value: 'elderberry' },
|
|
143
|
+
{ label: 'Fig', value: 'fig' }
|
|
144
|
+
]}
|
|
145
|
+
placeholder=${args.placeholder}
|
|
146
|
+
?multiple=${args.multiple}
|
|
147
|
+
?disabled=${args.disabled}
|
|
148
|
+
?searchable=${args.searchable}
|
|
149
|
+
size=${args.size}
|
|
150
|
+
@change=${(e: any) => {
|
|
151
|
+
console.log('Selection changed:', e.detail);
|
|
152
|
+
}}
|
|
153
|
+
></nr-select>
|
|
154
|
+
`,
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
// Empty states with different placeholder variations
|
|
158
|
+
export const EmptyStates: Story = {
|
|
159
|
+
parameters: {
|
|
160
|
+
docs: {
|
|
161
|
+
description: {
|
|
162
|
+
story: 'Examples of select components in empty state with different placeholder texts. This demonstrates how placeholders appear when no option is selected.'
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
render: () => html`
|
|
167
|
+
<div style="display: flex; flex-direction: column; gap: 20px; max-width: 400px;">
|
|
168
|
+
<div>
|
|
169
|
+
<h4>Default placeholder</h4>
|
|
170
|
+
<nr-select .options=${basicOptions}></nr-select>
|
|
171
|
+
</div>
|
|
172
|
+
|
|
173
|
+
<div>
|
|
174
|
+
<h4>Custom placeholder</h4>
|
|
175
|
+
<nr-select
|
|
176
|
+
.options=${basicOptions}
|
|
177
|
+
placeholder="Choose your favorite fruit...">
|
|
178
|
+
</nr-select>
|
|
179
|
+
</div>
|
|
180
|
+
|
|
181
|
+
<div>
|
|
182
|
+
<h4>Short placeholder</h4>
|
|
183
|
+
<nr-select
|
|
184
|
+
.options=${basicOptions}
|
|
185
|
+
placeholder="Pick one">
|
|
186
|
+
</nr-select>
|
|
187
|
+
</div>
|
|
188
|
+
|
|
189
|
+
<div>
|
|
190
|
+
<h4>Empty placeholder (no text)</h4>
|
|
191
|
+
<nr-select
|
|
192
|
+
.options=${basicOptions}
|
|
193
|
+
placeholder="">
|
|
194
|
+
</nr-select>
|
|
195
|
+
</div>
|
|
196
|
+
|
|
197
|
+
<div>
|
|
198
|
+
<h4>Multiple select placeholder</h4>
|
|
199
|
+
<nr-select
|
|
200
|
+
.options=${basicOptions}
|
|
201
|
+
placeholder="Select multiple fruits..."
|
|
202
|
+
multiple>
|
|
203
|
+
</nr-select>
|
|
204
|
+
</div>
|
|
205
|
+
|
|
206
|
+
<div>
|
|
207
|
+
<h4>Required field placeholder</h4>
|
|
208
|
+
<nr-select
|
|
209
|
+
.options=${basicOptions}
|
|
210
|
+
placeholder="Please select a required option *"
|
|
211
|
+
required>
|
|
212
|
+
</nr-select>
|
|
213
|
+
</div>
|
|
214
|
+
|
|
215
|
+
<div>
|
|
216
|
+
<h4>Disabled with placeholder</h4>
|
|
217
|
+
<nr-select
|
|
218
|
+
.options=${basicOptions}
|
|
219
|
+
placeholder="This select is disabled"
|
|
220
|
+
disabled>
|
|
221
|
+
</nr-select>
|
|
222
|
+
</div>
|
|
223
|
+
</div>
|
|
224
|
+
`,
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
// No options available scenarios
|
|
228
|
+
export const NoOptions: Story = {
|
|
229
|
+
parameters: {
|
|
230
|
+
docs: {
|
|
231
|
+
description: {
|
|
232
|
+
story: 'Examples of select components with no options available. This demonstrates how the component behaves when the options array is empty or when data is still loading.'
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
render: () => html`
|
|
237
|
+
<div style="display: flex; flex-direction: column; gap: 20px; max-width: 400px;">
|
|
238
|
+
<div>
|
|
239
|
+
<h4>Empty options array (default message)</h4>
|
|
240
|
+
<nr-select
|
|
241
|
+
.options=${[]}
|
|
242
|
+
placeholder="Click to see empty state">
|
|
243
|
+
</nr-select>
|
|
244
|
+
<small style="color: #666; margin-top: 8px; display: block;">
|
|
245
|
+
Component with empty options array - dropdown shows "No options available" message
|
|
246
|
+
</small>
|
|
247
|
+
</div>
|
|
248
|
+
|
|
249
|
+
<div>
|
|
250
|
+
<h4>Custom no-options message</h4>
|
|
251
|
+
<nr-select
|
|
252
|
+
.options=${[]}
|
|
253
|
+
placeholder="Custom empty state"
|
|
254
|
+
no-options-message="No items found">
|
|
255
|
+
</nr-select>
|
|
256
|
+
<small style="color: #666; margin-top: 8px; display: block;">
|
|
257
|
+
Using custom no-options-message property
|
|
258
|
+
</small>
|
|
259
|
+
</div>
|
|
260
|
+
|
|
261
|
+
<div>
|
|
262
|
+
<h4>Loading state (no options yet)</h4>
|
|
263
|
+
<nr-select
|
|
264
|
+
.options=${[]}
|
|
265
|
+
placeholder="Loading options..."
|
|
266
|
+
no-options-message="Loading..."
|
|
267
|
+
disabled>
|
|
268
|
+
</nr-select>
|
|
269
|
+
<small style="color: #666; margin-top: 8px; display: block;">
|
|
270
|
+
Disabled while options are being loaded from an API
|
|
271
|
+
</small>
|
|
272
|
+
</div>
|
|
273
|
+
|
|
274
|
+
<div>
|
|
275
|
+
<h4>No results found state</h4>
|
|
276
|
+
<nr-select
|
|
277
|
+
.options=${[]}
|
|
278
|
+
placeholder="Search returned no results"
|
|
279
|
+
no-options-message="No results found">
|
|
280
|
+
</nr-select>
|
|
281
|
+
<small style="color: #666; margin-top: 8px; display: block;">
|
|
282
|
+
When search/filter returns no results
|
|
283
|
+
</small>
|
|
284
|
+
</div>
|
|
285
|
+
|
|
286
|
+
<div>
|
|
287
|
+
<h4>Multiple select with no options</h4>
|
|
288
|
+
<nr-select
|
|
289
|
+
.options=${[]}
|
|
290
|
+
placeholder="No options to select"
|
|
291
|
+
no-options-message="No items available for selection"
|
|
292
|
+
multiple>
|
|
293
|
+
</nr-select>
|
|
294
|
+
<small style="color: #666; margin-top: 8px; display: block;">
|
|
295
|
+
Multiple selection mode with empty options
|
|
296
|
+
</small>
|
|
297
|
+
</div>
|
|
298
|
+
|
|
299
|
+
<div>
|
|
300
|
+
<h4>Dynamic options (simulate loading)</h4>
|
|
301
|
+
<nr-select
|
|
302
|
+
.options=${[]}
|
|
303
|
+
placeholder="Click to simulate loading..."
|
|
304
|
+
@click=${(e: any) => {
|
|
305
|
+
const select = e.target;
|
|
306
|
+
if (select.options.length === 0) {
|
|
307
|
+
// Simulate async loading
|
|
308
|
+
setTimeout(() => {
|
|
309
|
+
select.options = [
|
|
310
|
+
{ label: 'Loaded Option 1', value: '1' },
|
|
311
|
+
{ label: 'Loaded Option 2', value: '2' },
|
|
312
|
+
{ label: 'Loaded Option 3', value: '3' }
|
|
313
|
+
];
|
|
314
|
+
select.placeholder = 'Options loaded! Select one...';
|
|
315
|
+
select.requestUpdate();
|
|
316
|
+
}, 1000);
|
|
317
|
+
select.placeholder = 'Loading...';
|
|
318
|
+
select.disabled = true;
|
|
319
|
+
setTimeout(() => {
|
|
320
|
+
select.disabled = false;
|
|
321
|
+
}, 1000);
|
|
322
|
+
}
|
|
323
|
+
}}>
|
|
324
|
+
</nr-select>
|
|
325
|
+
<small style="color: #666; margin-top: 8px; display: block;">
|
|
326
|
+
Click to simulate loading options dynamically
|
|
327
|
+
</small>
|
|
328
|
+
</div>
|
|
329
|
+
|
|
330
|
+
<div>
|
|
331
|
+
<h4>Error state with no options</h4>
|
|
332
|
+
<nr-select
|
|
333
|
+
.options=${[]}
|
|
334
|
+
placeholder="Failed to load options"
|
|
335
|
+
status="error">
|
|
336
|
+
</nr-select>
|
|
337
|
+
<small style="color: #666; margin-top: 8px; display: block;">
|
|
338
|
+
Error state when options failed to load
|
|
339
|
+
</small>
|
|
340
|
+
</div>
|
|
341
|
+
</div>
|
|
342
|
+
`,
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
// Search and filter functionality
|
|
346
|
+
export const SearchableSelect: Story = {
|
|
347
|
+
parameters: {
|
|
348
|
+
docs: {
|
|
349
|
+
description: {
|
|
350
|
+
story: 'Searchable select allows users to filter options by typing. Includes single and multiple selection modes with search.'
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
render: () => html`
|
|
355
|
+
<div style="display: flex; flex-direction: column; gap: 20px; max-width: 500px;">
|
|
356
|
+
<div>
|
|
357
|
+
<h4>Single select with search</h4>
|
|
358
|
+
<nr-select
|
|
359
|
+
.options=${[
|
|
360
|
+
{ label: 'Apple', value: 'apple' },
|
|
361
|
+
{ label: 'Apricot', value: 'apricot' },
|
|
362
|
+
{ label: 'Banana', value: 'banana' },
|
|
363
|
+
{ label: 'Blueberry', value: 'blueberry' },
|
|
364
|
+
{ label: 'Cherry', value: 'cherry' },
|
|
365
|
+
{ label: 'Cranberry', value: 'cranberry' },
|
|
366
|
+
{ label: 'Date', value: 'date' },
|
|
367
|
+
{ label: 'Elderberry', value: 'elderberry' },
|
|
368
|
+
{ label: 'Fig', value: 'fig' },
|
|
369
|
+
{ label: 'Grape', value: 'grape' },
|
|
370
|
+
{ label: 'Kiwi', value: 'kiwi' },
|
|
371
|
+
{ label: 'Lemon', value: 'lemon' },
|
|
372
|
+
{ label: 'Mango', value: 'mango' },
|
|
373
|
+
{ label: 'Orange', value: 'orange' },
|
|
374
|
+
{ label: 'Papaya', value: 'papaya' },
|
|
375
|
+
{ label: 'Pear', value: 'pear' },
|
|
376
|
+
{ label: 'Pineapple', value: 'pineapple' },
|
|
377
|
+
{ label: 'Strawberry', value: 'strawberry' },
|
|
378
|
+
{ label: 'Watermelon', value: 'watermelon' }
|
|
379
|
+
]}
|
|
380
|
+
placeholder="Search for fruits..."
|
|
381
|
+
searchable
|
|
382
|
+
search-placeholder="Type to search fruits..."
|
|
383
|
+
@nr-change=${(e: any) => {
|
|
384
|
+
console.log('Searchable select changed:', e.detail.value);
|
|
385
|
+
}}>
|
|
386
|
+
</nr-select>
|
|
387
|
+
<small style="color: #666; margin-top: 8px; display: block;">
|
|
388
|
+
Type to filter options (try "app", "berry", etc.)
|
|
389
|
+
</small>
|
|
390
|
+
</div>
|
|
391
|
+
|
|
392
|
+
<div>
|
|
393
|
+
<h4>Multiple select with search</h4>
|
|
394
|
+
<nr-select
|
|
395
|
+
.options=${[
|
|
396
|
+
{ label: 'JavaScript', value: 'js' },
|
|
397
|
+
{ label: 'TypeScript', value: 'ts' },
|
|
398
|
+
{ label: 'Python', value: 'python' },
|
|
399
|
+
{ label: 'Java', value: 'java' },
|
|
400
|
+
{ label: 'C++', value: 'cpp' },
|
|
401
|
+
{ label: 'C#', value: 'csharp' },
|
|
402
|
+
{ label: 'Ruby', value: 'ruby' },
|
|
403
|
+
{ label: 'PHP', value: 'php' },
|
|
404
|
+
{ label: 'Go', value: 'go' },
|
|
405
|
+
{ label: 'Rust', value: 'rust' },
|
|
406
|
+
{ label: 'Swift', value: 'swift' },
|
|
407
|
+
{ label: 'Kotlin', value: 'kotlin' },
|
|
408
|
+
{ label: 'Dart', value: 'dart' },
|
|
409
|
+
{ label: 'Scala', value: 'scala' },
|
|
410
|
+
{ label: 'Haskell', value: 'haskell' }
|
|
411
|
+
]}
|
|
412
|
+
placeholder="Search programming languages..."
|
|
413
|
+
searchable
|
|
414
|
+
multiple
|
|
415
|
+
search-placeholder="Filter languages..."
|
|
416
|
+
@nr-change=${(e: any) => {
|
|
417
|
+
console.log('Multiple searchable select changed:', e.detail.value);
|
|
418
|
+
}}>
|
|
419
|
+
</nr-select>
|
|
420
|
+
<small style="color: #666; margin-top: 8px; display: block;">
|
|
421
|
+
Search and select multiple programming languages
|
|
422
|
+
</small>
|
|
423
|
+
</div>
|
|
424
|
+
|
|
425
|
+
<div>
|
|
426
|
+
<h4>Search with no results</h4>
|
|
427
|
+
<nr-select
|
|
428
|
+
.options=${[
|
|
429
|
+
{ label: 'Red', value: 'red' },
|
|
430
|
+
{ label: 'Green', value: 'green' },
|
|
431
|
+
{ label: 'Blue', value: 'blue' }
|
|
432
|
+
]}
|
|
433
|
+
placeholder="Try searching for 'yellow'..."
|
|
434
|
+
searchable
|
|
435
|
+
search-placeholder="Search colors..."
|
|
436
|
+
no-options-message="No colors found"
|
|
437
|
+
@nr-change=${(e: any) => {
|
|
438
|
+
console.log('No results select changed:', e.detail.value);
|
|
439
|
+
}}>
|
|
440
|
+
</nr-select>
|
|
441
|
+
<small style="color: #666; margin-top: 8px; display: block;">
|
|
442
|
+
Type "yellow" to see the no results message
|
|
443
|
+
</small>
|
|
444
|
+
</div>
|
|
445
|
+
</div>
|
|
446
|
+
`,
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
// Multiple selection with tags
|
|
450
|
+
export const Multiple: Story = {
|
|
451
|
+
parameters: {
|
|
452
|
+
docs: {
|
|
453
|
+
description: {
|
|
454
|
+
story: 'Multiple selection mode allows users to select multiple options. Selected items are displayed as removable tags.'
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
args: {
|
|
459
|
+
multiple: true,
|
|
460
|
+
placeholder: 'Select programming languages',
|
|
461
|
+
searchable: true,
|
|
462
|
+
},
|
|
463
|
+
render: (args) => html`
|
|
464
|
+
<nr-select
|
|
465
|
+
.options=${[
|
|
466
|
+
{ label: 'JavaScript', value: 'js' },
|
|
467
|
+
{ label: 'TypeScript', value: 'ts' },
|
|
468
|
+
{ label: 'Python', value: 'py' },
|
|
469
|
+
{ label: 'Java', value: 'java' },
|
|
470
|
+
{ label: 'C++', value: 'cpp' },
|
|
471
|
+
{ label: 'Rust', value: 'rust' },
|
|
472
|
+
{ label: 'Go', value: 'go' },
|
|
473
|
+
{ label: 'PHP', value: 'php' },
|
|
474
|
+
{ label: 'Ruby', value: 'ruby' },
|
|
475
|
+
{ label: 'Swift', value: 'swift' }
|
|
476
|
+
]}
|
|
477
|
+
placeholder=${args.placeholder}
|
|
478
|
+
?multiple=${args.multiple}
|
|
479
|
+
?searchable=${args.searchable}
|
|
480
|
+
@change=${(e: any) => {
|
|
481
|
+
console.log('Multiple selection changed:', e.detail);
|
|
482
|
+
}}
|
|
483
|
+
></nr-select>
|
|
484
|
+
`,
|
|
485
|
+
};
|
|
486
|
+
|
|
487
|
+
// Pre-selected values
|
|
488
|
+
export const WithDefaults: Story = {
|
|
489
|
+
parameters: {
|
|
490
|
+
docs: {
|
|
491
|
+
description: {
|
|
492
|
+
story: 'Select component with a pre-selected default value. The component displays the selected option on initial render.'
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
},
|
|
496
|
+
args: {
|
|
497
|
+
value: 'md',
|
|
498
|
+
placeholder: 'Select size',
|
|
499
|
+
},
|
|
500
|
+
render: (args) => html`
|
|
501
|
+
<div style="display: flex; flex-direction: column; gap: 1rem;">
|
|
502
|
+
<label>Single with default:</label>
|
|
503
|
+
<nr-select
|
|
504
|
+
.options=${[
|
|
505
|
+
{ label: 'Small', value: 'sm' },
|
|
506
|
+
{ label: 'Medium', value: 'md' },
|
|
507
|
+
{ label: 'Large', value: 'lg' },
|
|
508
|
+
{ label: 'Extra Large', value: 'xl' }
|
|
509
|
+
]}
|
|
510
|
+
.value=${args.value}
|
|
511
|
+
placeholder=${args.placeholder}
|
|
512
|
+
></nr-select>
|
|
513
|
+
|
|
514
|
+
<label>Multiple with defaults:</label>
|
|
515
|
+
<nr-select
|
|
516
|
+
.options=${[
|
|
517
|
+
{ label: 'Red', value: 'red' },
|
|
518
|
+
{ label: 'Green', value: 'green' },
|
|
519
|
+
{ label: 'Blue', value: 'blue' },
|
|
520
|
+
{ label: 'Yellow', value: 'yellow' },
|
|
521
|
+
{ label: 'Purple', value: 'purple' }
|
|
522
|
+
]}
|
|
523
|
+
.value=${['red', 'blue']}
|
|
524
|
+
placeholder="Select colors"
|
|
525
|
+
multiple
|
|
526
|
+
></nr-select>
|
|
527
|
+
</div>
|
|
528
|
+
`,
|
|
529
|
+
};
|
|
530
|
+
|
|
531
|
+
// Interactive placeholder behavior
|
|
532
|
+
export const PlaceholderBehavior: Story = {
|
|
533
|
+
parameters: {
|
|
534
|
+
docs: {
|
|
535
|
+
description: {
|
|
536
|
+
story: 'Interactive examples showing how placeholders behave during selection and clearing. Try selecting and clearing values to see how the placeholder reappears.'
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
render: () => html`
|
|
541
|
+
<div style="display: flex; flex-direction: column; gap: 20px; max-width: 500px;">
|
|
542
|
+
<div>
|
|
543
|
+
<h4>Single select - placeholder returns after clearing</h4>
|
|
544
|
+
<nr-select
|
|
545
|
+
.options=${[
|
|
546
|
+
{ label: 'Option 1', value: '1' },
|
|
547
|
+
{ label: 'Option 2', value: '2' },
|
|
548
|
+
{ label: 'Option 3', value: '3' }
|
|
549
|
+
]}
|
|
550
|
+
placeholder="Choose an option (will reappear when cleared)"
|
|
551
|
+
@nr-change=${(e: any) => {
|
|
552
|
+
console.log('Single select changed:', e.detail.value);
|
|
553
|
+
}}>
|
|
554
|
+
</nr-select>
|
|
555
|
+
<small style="color: #666; margin-top: 8px; display: block;">
|
|
556
|
+
Select an option, then click the clear button to see placeholder return
|
|
557
|
+
</small>
|
|
558
|
+
</div>
|
|
559
|
+
|
|
560
|
+
<div>
|
|
561
|
+
<h4>Multiple select - placeholder behavior with tags</h4>
|
|
562
|
+
<nr-select
|
|
563
|
+
.options=${[
|
|
564
|
+
{ label: 'Red', value: 'red' },
|
|
565
|
+
{ label: 'Green', value: 'green' },
|
|
566
|
+
{ label: 'Blue', value: 'blue' },
|
|
567
|
+
{ label: 'Yellow', value: 'yellow' }
|
|
568
|
+
]}
|
|
569
|
+
placeholder="Select colors (placeholder hidden when tags appear)"
|
|
570
|
+
multiple
|
|
571
|
+
@nr-change=${(e: any) => {
|
|
572
|
+
console.log('Multiple select changed:', e.detail.value);
|
|
573
|
+
}}>
|
|
574
|
+
</nr-select>
|
|
575
|
+
<small style="color: #666; margin-top: 8px; display: block;">
|
|
576
|
+
Select multiple options to see tags replace placeholder, remove all to see placeholder return
|
|
577
|
+
</small>
|
|
578
|
+
</div>
|
|
579
|
+
|
|
580
|
+
<div>
|
|
581
|
+
<h4>Long placeholder text behavior</h4>
|
|
582
|
+
<nr-select
|
|
583
|
+
.options=${basicOptions}
|
|
584
|
+
placeholder="This is a very long placeholder text that demonstrates how the component handles lengthy placeholder content gracefully"
|
|
585
|
+
@nr-change=${(e: any) => {
|
|
586
|
+
console.log('Long placeholder select changed:', e.detail.value);
|
|
587
|
+
}}>
|
|
588
|
+
</nr-select>
|
|
589
|
+
<small style="color: #666; margin-top: 8px; display: block;">
|
|
590
|
+
Long placeholder text should be properly truncated or wrapped based on CSS
|
|
591
|
+
</small>
|
|
592
|
+
</div>
|
|
593
|
+
</div>
|
|
594
|
+
`,
|
|
595
|
+
};
|
|
596
|
+
|
|
597
|
+
// Different validation states
|
|
598
|
+
export const ValidationStates: Story = {
|
|
599
|
+
parameters: {
|
|
600
|
+
docs: {
|
|
601
|
+
description: {
|
|
602
|
+
story: 'Various validation and status states including valid, invalid with error message, and loading state.'
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
render: () => html`
|
|
607
|
+
<div style="display: grid; gap: 1.5rem; max-width: 400px;">
|
|
608
|
+
<div>
|
|
609
|
+
<label style="display: block; margin-bottom: 0.5rem; font-weight: 500;">Valid State</label>
|
|
610
|
+
<nr-select
|
|
611
|
+
.options=${basicOptions}
|
|
612
|
+
placeholder="Valid selection"
|
|
613
|
+
valid
|
|
614
|
+
></nr-select>
|
|
615
|
+
</div>
|
|
616
|
+
|
|
617
|
+
<div>
|
|
618
|
+
<label style="display: block; margin-bottom: 0.5rem; font-weight: 500;">Invalid State</label>
|
|
619
|
+
<nr-select
|
|
620
|
+
.options=${basicOptions}
|
|
621
|
+
placeholder="Invalid selection"
|
|
622
|
+
.invalid=${true}
|
|
623
|
+
.errorMessage=${'Please select a valid option'}
|
|
624
|
+
></nr-select>
|
|
625
|
+
</div>
|
|
626
|
+
|
|
627
|
+
<div>
|
|
628
|
+
<label style="display: block; margin-bottom: 0.5rem; font-weight: 500;">Loading State</label>
|
|
629
|
+
<nr-select
|
|
630
|
+
.options=${basicOptions}
|
|
631
|
+
placeholder="Loading state"
|
|
632
|
+
.loading=${true}
|
|
633
|
+
></nr-select>
|
|
634
|
+
</div>
|
|
635
|
+
</div>
|
|
636
|
+
`,
|
|
637
|
+
};
|
|
638
|
+
|
|
639
|
+
// Disabled options and component
|
|
640
|
+
export const DisabledStates: Story = {
|
|
641
|
+
parameters: {
|
|
642
|
+
docs: {
|
|
643
|
+
description: {
|
|
644
|
+
story: 'Examples of disabled functionality including individual disabled options within the dropdown and entire component disabled state.'
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
},
|
|
648
|
+
args: {
|
|
649
|
+
disabled: false,
|
|
650
|
+
},
|
|
651
|
+
render: (args) => html`
|
|
652
|
+
<div style="display: grid; gap: 1.5rem; max-width: 400px;">
|
|
653
|
+
<div>
|
|
654
|
+
<label style="display: block; margin-bottom: 0.5rem; font-weight: 500;">Individual Disabled Options</label>
|
|
655
|
+
<nr-select
|
|
656
|
+
.options=${[
|
|
657
|
+
{ label: 'Available Option', value: 'available' },
|
|
658
|
+
{ label: 'Disabled Option', value: 'disabled', disabled: true },
|
|
659
|
+
{ label: 'Another Available', value: 'available2' },
|
|
660
|
+
{ label: 'Also Disabled', value: 'disabled2', disabled: true },
|
|
661
|
+
{ label: 'Final Available', value: 'available3' }
|
|
662
|
+
]}
|
|
663
|
+
placeholder="Some options disabled"
|
|
664
|
+
></nr-select>
|
|
665
|
+
<small style="color: #666; font-size: 0.875rem;">Try opening - some options are disabled</small>
|
|
666
|
+
</div>
|
|
667
|
+
|
|
668
|
+
<div>
|
|
669
|
+
<label style="display: block; margin-bottom: 0.5rem; font-weight: 500;">Entire Component Disabled</label>
|
|
670
|
+
<nr-select
|
|
671
|
+
.options=${basicOptions}
|
|
672
|
+
placeholder="Entire component disabled"
|
|
673
|
+
?disabled=${args.disabled || true}
|
|
674
|
+
></nr-select>
|
|
675
|
+
<small style="color: #666; font-size: 0.875rem;">Cannot be opened or interacted with</small>
|
|
676
|
+
</div>
|
|
677
|
+
</div>
|
|
678
|
+
`,
|
|
679
|
+
};
|
|
680
|
+
|
|
681
|
+
// Rich options with icons and descriptions
|
|
682
|
+
export const RichOptions: Story = {
|
|
683
|
+
parameters: {
|
|
684
|
+
docs: {
|
|
685
|
+
description: {
|
|
686
|
+
story: 'Select options enhanced with icons and descriptions for richer visual presentation and better user experience.'
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
},
|
|
690
|
+
args: {
|
|
691
|
+
placeholder: 'Select an action',
|
|
692
|
+
searchable: true,
|
|
693
|
+
},
|
|
694
|
+
render: (args) => html`
|
|
695
|
+
<div style="display: grid; gap: 1.5rem; max-width: 400px;">
|
|
696
|
+
<div>
|
|
697
|
+
<label style="display: block; margin-bottom: 0.5rem; font-weight: 500;">Actions with Icons & Descriptions</label>
|
|
698
|
+
<nr-select
|
|
699
|
+
.options=${[
|
|
700
|
+
{
|
|
701
|
+
label: 'User Profile',
|
|
702
|
+
value: 'profile',
|
|
703
|
+
icon: '👤',
|
|
704
|
+
description: 'Manage your account settings and preferences'
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
label: 'Dashboard',
|
|
708
|
+
value: 'dashboard',
|
|
709
|
+
icon: '📊',
|
|
710
|
+
description: 'View analytics and key metrics'
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
label: 'Settings',
|
|
714
|
+
value: 'settings',
|
|
715
|
+
icon: '⚙️',
|
|
716
|
+
description: 'Configure application preferences'
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
label: 'Messages',
|
|
720
|
+
value: 'messages',
|
|
721
|
+
icon: '💬',
|
|
722
|
+
description: 'Read and send messages'
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
label: 'Help & Support',
|
|
726
|
+
value: 'help',
|
|
727
|
+
icon: '❓',
|
|
728
|
+
description: 'Get assistance and documentation'
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
label: 'Logout',
|
|
732
|
+
value: 'logout',
|
|
733
|
+
icon: '🚪',
|
|
734
|
+
description: 'Sign out of your account'
|
|
735
|
+
}
|
|
736
|
+
]}
|
|
737
|
+
placeholder=${args.placeholder}
|
|
738
|
+
?searchable=${args.searchable}
|
|
739
|
+
></nr-select>
|
|
740
|
+
</div>
|
|
741
|
+
|
|
742
|
+
<div>
|
|
743
|
+
<label style="display: block; margin-bottom: 0.5rem; font-weight: 500;">File Types</label>
|
|
744
|
+
<nr-select
|
|
745
|
+
.options=${[
|
|
746
|
+
{ label: 'Document', value: 'doc', icon: '📄', description: 'Word documents and PDFs' },
|
|
747
|
+
{ label: 'Spreadsheet', value: 'xls', icon: '📊', description: 'Excel and CSV files' },
|
|
748
|
+
{ label: 'Image', value: 'img', icon: '🖼️', description: 'Photos and graphics' },
|
|
749
|
+
{ label: 'Video', value: 'vid', icon: '🎥', description: 'Movies and recordings' },
|
|
750
|
+
{ label: 'Audio', value: 'aud', icon: '🎵', description: 'Music and sound files' }
|
|
751
|
+
]}
|
|
752
|
+
placeholder="Select file type"
|
|
753
|
+
multiple
|
|
754
|
+
></nr-select>
|
|
755
|
+
</div>
|
|
756
|
+
</div>
|
|
757
|
+
`,
|
|
758
|
+
};
|
|
759
|
+
|
|
760
|
+
// Large dataset for performance testing
|
|
761
|
+
export const LargeDataset: Story = {
|
|
762
|
+
parameters: {
|
|
763
|
+
docs: {
|
|
764
|
+
description: {
|
|
765
|
+
story: 'Performance test with large datasets. Demonstrates search functionality and how the component handles many options efficiently.'
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
},
|
|
769
|
+
args: {
|
|
770
|
+
searchable: true,
|
|
771
|
+
multiple: false,
|
|
772
|
+
placeholder: 'Search through many options',
|
|
773
|
+
},
|
|
774
|
+
render: (args) => html`
|
|
775
|
+
<div style="display: grid; gap: 1.5rem; max-width: 500px;">
|
|
776
|
+
<div>
|
|
777
|
+
<label style="display: block; margin-bottom: 0.5rem; font-weight: 500;">Countries (100+ options)</label>
|
|
778
|
+
<nr-select
|
|
779
|
+
.options=${[
|
|
780
|
+
'Afghanistan', 'Albania', 'Algeria', 'Argentina', 'Australia', 'Austria',
|
|
781
|
+
'Bangladesh', 'Belgium', 'Brazil', 'Bulgaria', 'Canada', 'Chile',
|
|
782
|
+
'China', 'Colombia', 'Croatia', 'Czech Republic', 'Denmark', 'Egypt',
|
|
783
|
+
'Finland', 'France', 'Germany', 'Greece', 'Hungary', 'Iceland',
|
|
784
|
+
'India', 'Indonesia', 'Iran', 'Iraq', 'Ireland', 'Israel', 'Italy',
|
|
785
|
+
'Japan', 'Jordan', 'Kazakhstan', 'Kenya', 'South Korea', 'Kuwait',
|
|
786
|
+
'Latvia', 'Lithuania', 'Malaysia', 'Mexico', 'Morocco', 'Netherlands',
|
|
787
|
+
'New Zealand', 'Nigeria', 'Norway', 'Pakistan', 'Peru', 'Philippines',
|
|
788
|
+
'Poland', 'Portugal', 'Romania', 'Russia', 'Saudi Arabia', 'Singapore',
|
|
789
|
+
'South Africa', 'Spain', 'Sweden', 'Switzerland', 'Thailand', 'Turkey',
|
|
790
|
+
'Ukraine', 'United Kingdom', 'United States', 'Vietnam', 'Zimbabwe'
|
|
791
|
+
].map(country => ({
|
|
792
|
+
label: country,
|
|
793
|
+
value: country.toLowerCase().replace(/\s+/g, '-'),
|
|
794
|
+
description: `Country: ${country}`
|
|
795
|
+
}))}
|
|
796
|
+
placeholder=${args.placeholder}
|
|
797
|
+
?searchable=${args.searchable}
|
|
798
|
+
?multiple=${args.multiple}
|
|
799
|
+
></nr-select>
|
|
800
|
+
<small style="color: #666; font-size: 0.875rem;">Type to search through options</small>
|
|
801
|
+
</div>
|
|
802
|
+
|
|
803
|
+
<div>
|
|
804
|
+
<label style="display: block; margin-bottom: 0.5rem; font-weight: 500;">Generated Items (200 options)</label>
|
|
805
|
+
<nr-select
|
|
806
|
+
.options=${Array.from({ length: 200 }, (_, i) => ({
|
|
807
|
+
label: `Item ${i + 1} - ${['Alpha', 'Beta', 'Gamma', 'Delta', 'Epsilon', 'Zeta', 'Eta', 'Theta', 'Iota', 'Kappa'][i % 10]}`,
|
|
808
|
+
value: `item${i + 1}`,
|
|
809
|
+
description: `Generated item ${i + 1} for testing`
|
|
810
|
+
}))}
|
|
811
|
+
placeholder="Search through 200 generated items"
|
|
812
|
+
searchable
|
|
813
|
+
multiple
|
|
814
|
+
></nr-select>
|
|
815
|
+
<small style="color: #666; font-size: 0.875rem;">Stress test with many options</small>
|
|
816
|
+
</div>
|
|
817
|
+
</div>
|
|
818
|
+
`,
|
|
819
|
+
};
|
|
820
|
+
|
|
821
|
+
// Max height examples for dropdown control
|
|
822
|
+
export const MaxHeightExamples: Story = {
|
|
823
|
+
parameters: {
|
|
824
|
+
docs: {
|
|
825
|
+
description: {
|
|
826
|
+
story: 'Demonstrates how to control the maximum height of the dropdown options list. Useful for large datasets where you want to limit the dropdown size and add scrolling.'
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
},
|
|
830
|
+
args: {
|
|
831
|
+
searchable: true,
|
|
832
|
+
multiple: false,
|
|
833
|
+
placeholder: 'Select an option',
|
|
834
|
+
},
|
|
835
|
+
render: (args) => html`
|
|
836
|
+
<div style="display: grid; gap: 2rem; max-width: 600px;">
|
|
837
|
+
<div>
|
|
838
|
+
<h4 style="margin-bottom: 1rem; color: #333;">Default Height (200px)</h4>
|
|
839
|
+
<nr-select
|
|
840
|
+
.options=${Array.from({ length: 20 }, (_, i) => ({
|
|
841
|
+
label: `Option ${i + 1} - ${['Short', 'Medium length option', 'Very long option with lots of text'][i % 3]}`,
|
|
842
|
+
value: `option${i + 1}`,
|
|
843
|
+
description: `Description for option ${i + 1}`
|
|
844
|
+
}))}
|
|
845
|
+
placeholder=${args.placeholder}
|
|
846
|
+
?searchable=${args.searchable}
|
|
847
|
+
?multiple=${args.multiple}
|
|
848
|
+
max-height="200px"
|
|
849
|
+
|
|
850
|
+
></nr-select>
|
|
851
|
+
<small style="color: #666; font-size: 0.875rem;">Default max-height: 200px</small>
|
|
852
|
+
</div>
|
|
853
|
+
|
|
854
|
+
<div>
|
|
855
|
+
<h4 style="margin-bottom: 1rem; color: #333;">Compact Height (120px)</h4>
|
|
856
|
+
<nr-select
|
|
857
|
+
.options=${Array.from({ length: 20 }, (_, i) => ({
|
|
858
|
+
label: `Compact Option ${i + 1}`,
|
|
859
|
+
value: `compact${i + 1}`,
|
|
860
|
+
icon: ['star', 'heart', 'bookmark'][i % 3],
|
|
861
|
+
description: `Compact option ${i + 1}`
|
|
862
|
+
}))}
|
|
863
|
+
placeholder=${args.placeholder}
|
|
864
|
+
?searchable=${args.searchable}
|
|
865
|
+
?multiple=${args.multiple}
|
|
866
|
+
max-height="120px"
|
|
867
|
+
></nr-select>
|
|
868
|
+
<small style="color: #666; font-size: 0.875rem;">max-height: 120px - More compact dropdown</small>
|
|
869
|
+
</div>
|
|
870
|
+
|
|
871
|
+
<div>
|
|
872
|
+
<h4 style="margin-bottom: 1rem; color: #333;">Tall Height (350px)</h4>
|
|
873
|
+
<nr-select
|
|
874
|
+
.options=${Array.from({ length: 30 }, (_, i) => ({
|
|
875
|
+
label: `Extended Option ${i + 1}`,
|
|
876
|
+
value: `extended${i + 1}`,
|
|
877
|
+
icon: ['settings', 'user', 'folder', 'file', 'database'][i % 5],
|
|
878
|
+
description: `This is an extended option ${i + 1} with more detailed information`
|
|
879
|
+
}))}
|
|
880
|
+
placeholder=${args.placeholder}
|
|
881
|
+
?searchable=${args.searchable}
|
|
882
|
+
?multiple=${args.multiple}
|
|
883
|
+
max-height="350px"
|
|
884
|
+
></nr-select>
|
|
885
|
+
<small style="color: #666; font-size: 0.875rem;">max-height: 350px - Taller dropdown shows more options</small>
|
|
886
|
+
</div>
|
|
887
|
+
|
|
888
|
+
<div>
|
|
889
|
+
<h4 style="margin-bottom: 1rem; color: #333;">CSS Units Examples</h4>
|
|
890
|
+
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;">
|
|
891
|
+
<div>
|
|
892
|
+
<label style="display: block; margin-bottom: 0.5rem; font-weight: 500;">rem units (8rem)</label>
|
|
893
|
+
<nr-select
|
|
894
|
+
.options=${Array.from({ length: 15 }, (_, i) => ({
|
|
895
|
+
label: `Rem Option ${i + 1}`,
|
|
896
|
+
value: `rem${i + 1}`
|
|
897
|
+
}))}
|
|
898
|
+
placeholder="8rem height"
|
|
899
|
+
max-height="8rem"
|
|
900
|
+
></nr-select>
|
|
901
|
+
</div>
|
|
902
|
+
|
|
903
|
+
<div>
|
|
904
|
+
<label style="display: block; margin-bottom: 0.5rem; font-weight: 500;">vh units (20vh)</label>
|
|
905
|
+
<nr-select
|
|
906
|
+
.options=${Array.from({ length: 15 }, (_, i) => ({
|
|
907
|
+
label: `Viewport Option ${i + 1}`,
|
|
908
|
+
value: `vh${i + 1}`
|
|
909
|
+
}))}
|
|
910
|
+
placeholder="20vh height"
|
|
911
|
+
max-height="20vh"
|
|
912
|
+
></nr-select>
|
|
913
|
+
</div>
|
|
914
|
+
</div>
|
|
915
|
+
<small style="color: #666; font-size: 0.875rem;">Supports any CSS unit: px, rem, em, vh, %</small>
|
|
916
|
+
</div>
|
|
917
|
+
</div>
|
|
918
|
+
`,
|
|
919
|
+
};
|
|
920
|
+
|
|
921
|
+
// Interactive example with events
|
|
922
|
+
export const EventHandling: Story = {
|
|
923
|
+
parameters: {
|
|
924
|
+
docs: {
|
|
925
|
+
description: {
|
|
926
|
+
story: 'Event handling demonstration. Open browser console to see events fired during user interactions. Shows change, focus, blur, and dropdown events.'
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
},
|
|
930
|
+
render: () => html`
|
|
931
|
+
<div style="display: grid; gap: 1.5rem; max-width: 500px;">
|
|
932
|
+
<div style="padding: 1rem; background: #f8f9fa; border-radius: 8px; border-left: 4px solid #007bff;">
|
|
933
|
+
<strong>📝 Instructions:</strong>
|
|
934
|
+
<ul style="margin: 0.5rem 0 0 1rem; font-size: 0.875rem;">
|
|
935
|
+
<li>Open browser console (F12)</li>
|
|
936
|
+
<li>Interact with the selects below</li>
|
|
937
|
+
<li>Watch for logged events</li>
|
|
938
|
+
</ul>
|
|
939
|
+
</div>
|
|
940
|
+
|
|
941
|
+
<div>
|
|
942
|
+
<label style="display: block; margin-bottom: 0.5rem; font-weight: 500;">Single Selection Events</label>
|
|
943
|
+
<nr-select
|
|
944
|
+
.options=${[
|
|
945
|
+
{ label: 'Option A', value: 'a' },
|
|
946
|
+
{ label: 'Option B', value: 'b' },
|
|
947
|
+
{ label: 'Option C', value: 'c' }
|
|
948
|
+
]}
|
|
949
|
+
placeholder="Select to see events"
|
|
950
|
+
@change=${(e: any) => {
|
|
951
|
+
console.log('✅ Change event:', e.detail);
|
|
952
|
+
// You can also show a notification or update UI here
|
|
953
|
+
}}
|
|
954
|
+
@dropdown-open=${() => console.log('🔽 Dropdown opened')}
|
|
955
|
+
@dropdown-close=${() => console.log('🔼 Dropdown closed')}
|
|
956
|
+
></nr-select>
|
|
957
|
+
</div>
|
|
958
|
+
|
|
959
|
+
<div>
|
|
960
|
+
<label style="display: block; margin-bottom: 0.5rem; font-weight: 500;">Multiple Selection Events</label>
|
|
961
|
+
<nr-select
|
|
962
|
+
.options=${[
|
|
963
|
+
{ label: 'React', value: 'react' },
|
|
964
|
+
{ label: 'Vue', value: 'vue' },
|
|
965
|
+
{ label: 'Angular', value: 'angular' },
|
|
966
|
+
{ label: 'Svelte', value: 'svelte' }
|
|
967
|
+
]}
|
|
968
|
+
placeholder="Select frameworks"
|
|
969
|
+
multiple
|
|
970
|
+
@change=${(e: any) => {
|
|
971
|
+
console.log('🔄 Multiple selection changed:', e.detail);
|
|
972
|
+
console.log('Current values:', e.detail.value);
|
|
973
|
+
}}
|
|
974
|
+
@tag-remove=${(e: any) => {
|
|
975
|
+
console.log('🗑️ Tag removed:', e.detail);
|
|
976
|
+
}}
|
|
977
|
+
></nr-select>
|
|
978
|
+
</div>
|
|
979
|
+
</div>
|
|
980
|
+
`,
|
|
981
|
+
};
|
|
982
|
+
|
|
983
|
+
// Interactive playground with all controls
|
|
984
|
+
export const Playground: Story = {
|
|
985
|
+
parameters: {
|
|
986
|
+
docs: {
|
|
987
|
+
description: {
|
|
988
|
+
story: 'Interactive playground to test all select component features. Use the controls panel below to experiment with different properties and configurations.'
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
},
|
|
992
|
+
args: {
|
|
993
|
+
placeholder: 'Choose your options...',
|
|
994
|
+
multiple: false,
|
|
995
|
+
disabled: false,
|
|
996
|
+
searchable: false,
|
|
997
|
+
searchPlaceholder: 'Type to search...',
|
|
998
|
+
loading: false,
|
|
999
|
+
valid: false,
|
|
1000
|
+
invalid: false,
|
|
1001
|
+
errorMessage: 'Please make a valid selection',
|
|
1002
|
+
size: 'medium',
|
|
1003
|
+
maxHeight: '200px',
|
|
1004
|
+
},
|
|
1005
|
+
render: (args) => html`
|
|
1006
|
+
<div style="max-width: 400px;">
|
|
1007
|
+
<nr-select
|
|
1008
|
+
.options=${[
|
|
1009
|
+
{ label: '🍎 Apple', value: 'apple', description: 'Fresh red apples' },
|
|
1010
|
+
{ label: '🍌 Banana', value: 'banana', description: 'Yellow bananas' },
|
|
1011
|
+
{ label: '🍒 Cherry', value: 'cherry', description: 'Sweet cherries' },
|
|
1012
|
+
{ label: '🥝 Kiwi', value: 'kiwi', description: 'Exotic kiwi fruit' },
|
|
1013
|
+
{ label: '🍓 Strawberry', value: 'strawberry', description: 'Juicy strawberries' },
|
|
1014
|
+
{ label: '🥭 Mango', value: 'mango', description: 'Tropical mangoes' },
|
|
1015
|
+
{ label: '🍇 Grapes', value: 'grapes', description: 'Purple grapes' },
|
|
1016
|
+
{ label: '🍊 Orange', value: 'orange', description: 'Citrus oranges' },
|
|
1017
|
+
{ label: '🍑 Peach', value: 'peach', description: 'Soft peaches' },
|
|
1018
|
+
{ label: '🥥 Coconut', value: 'coconut', description: 'Fresh coconuts', disabled: true }
|
|
1019
|
+
]}
|
|
1020
|
+
placeholder=${args.placeholder}
|
|
1021
|
+
?multiple=${args.multiple}
|
|
1022
|
+
?disabled=${args.disabled}
|
|
1023
|
+
?searchable=${args.searchable}
|
|
1024
|
+
search-placeholder=${args.searchPlaceholder}
|
|
1025
|
+
?loading=${args.loading}
|
|
1026
|
+
?valid=${args.valid}
|
|
1027
|
+
?invalid=${args.invalid}
|
|
1028
|
+
.errorMessage=${args.errorMessage}
|
|
1029
|
+
size=${args.size}
|
|
1030
|
+
max-height=${args.maxHeight}
|
|
1031
|
+
@change=${(e: any) => {
|
|
1032
|
+
console.log('Playground selection changed:', e.detail);
|
|
1033
|
+
}}
|
|
1034
|
+
></nr-select>
|
|
1035
|
+
</div>
|
|
1036
|
+
`,
|
|
1037
|
+
};
|
|
1038
|
+
|
|
1039
|
+
// Font selection example - practical use case with common fonts
|
|
1040
|
+
export const FontSelection: Story = {
|
|
1041
|
+
parameters: {
|
|
1042
|
+
docs: {
|
|
1043
|
+
description: {
|
|
1044
|
+
story: 'A practical example showing font family selection with searchable options and preview functionality.'
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
},
|
|
1048
|
+
render: () => html`
|
|
1049
|
+
<style>
|
|
1050
|
+
/* Make disabled category headers stand out */
|
|
1051
|
+
.category-font-select .option[disabled] {
|
|
1052
|
+
font-weight: bold;
|
|
1053
|
+
background-color: #f5f5f5;
|
|
1054
|
+
font-family: inherit;
|
|
1055
|
+
}
|
|
1056
|
+
</style>
|
|
1057
|
+
<div style="padding: 20px; max-width: 600px;">
|
|
1058
|
+
<h2>Font Family Selection</h2>
|
|
1059
|
+
<p>Select fonts with live preview and search functionality - uses rich options to display font names in their actual typefaces</p>
|
|
1060
|
+
|
|
1061
|
+
<div style="display: grid; gap: 20px;">
|
|
1062
|
+
<!-- Single Font Selection with Preview -->
|
|
1063
|
+
<div>
|
|
1064
|
+
<h3>Choose Your Font</h3>
|
|
1065
|
+
<nr-select
|
|
1066
|
+
.options=${[
|
|
1067
|
+
{
|
|
1068
|
+
label: 'Arial',
|
|
1069
|
+
value: 'Arial, sans-serif',
|
|
1070
|
+
htmlContent: '<span style="font-family: Arial, sans-serif;">Arial</span>'
|
|
1071
|
+
},
|
|
1072
|
+
{
|
|
1073
|
+
label: 'Times New Roman',
|
|
1074
|
+
value: 'Times New Roman, serif',
|
|
1075
|
+
htmlContent: '<span style="font-family: Times New Roman, serif;">Times New Roman</span>'
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
label: 'Helvetica',
|
|
1079
|
+
value: 'Helvetica, Arial, sans-serif',
|
|
1080
|
+
htmlContent: '<span style="font-family: Helvetica, Arial, sans-serif;">Helvetica</span>'
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
label: 'Georgia',
|
|
1084
|
+
value: 'Georgia, serif',
|
|
1085
|
+
htmlContent: '<span style="font-family: Georgia, serif;">Georgia</span>'
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
label: 'Verdana',
|
|
1089
|
+
value: 'Verdana, sans-serif',
|
|
1090
|
+
htmlContent: '<span style="font-family: Verdana, sans-serif;">Verdana</span>'
|
|
1091
|
+
},
|
|
1092
|
+
{
|
|
1093
|
+
label: 'Courier New',
|
|
1094
|
+
value: 'Courier New, monospace',
|
|
1095
|
+
htmlContent: '<span style="font-family: Courier New, monospace;">Courier New</span>'
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
label: 'Trebuchet MS',
|
|
1099
|
+
value: 'Trebuchet MS, sans-serif',
|
|
1100
|
+
htmlContent: '<span style="font-family: Trebuchet MS, sans-serif;">Trebuchet MS</span>'
|
|
1101
|
+
},
|
|
1102
|
+
{
|
|
1103
|
+
label: 'Palatino',
|
|
1104
|
+
value: 'Palatino, serif',
|
|
1105
|
+
htmlContent: '<span style="font-family: Palatino, serif;">Palatino</span>'
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
label: 'Impact',
|
|
1109
|
+
value: 'Impact, sans-serif',
|
|
1110
|
+
htmlContent: '<span style="font-family: Impact, sans-serif;">Impact</span>'
|
|
1111
|
+
},
|
|
1112
|
+
{
|
|
1113
|
+
label: 'Comic Sans MS',
|
|
1114
|
+
value: 'Comic Sans MS, cursive',
|
|
1115
|
+
htmlContent: '<span style="font-family: Comic Sans MS, cursive;">Comic Sans MS</span>'
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
label: 'Lucida Console',
|
|
1119
|
+
value: 'Lucida Console, monospace',
|
|
1120
|
+
htmlContent: '<span style="font-family: Lucida Console, monospace;">Lucida Console</span>'
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
label: 'Tahoma',
|
|
1124
|
+
value: 'Tahoma, sans-serif',
|
|
1125
|
+
htmlContent: '<span style="font-family: Tahoma, sans-serif;">Tahoma</span>'
|
|
1126
|
+
},
|
|
1127
|
+
{
|
|
1128
|
+
label: 'System UI',
|
|
1129
|
+
value: 'system-ui, -apple-system, sans-serif',
|
|
1130
|
+
htmlContent: '<span style="font-family: system-ui, -apple-system, sans-serif;">System UI</span>'
|
|
1131
|
+
},
|
|
1132
|
+
{
|
|
1133
|
+
label: 'Inter',
|
|
1134
|
+
value: 'Inter, sans-serif',
|
|
1135
|
+
htmlContent: '<span style="font-family: Inter, sans-serif;">Inter</span>'
|
|
1136
|
+
},
|
|
1137
|
+
{
|
|
1138
|
+
label: 'Roboto',
|
|
1139
|
+
value: 'Roboto, sans-serif',
|
|
1140
|
+
htmlContent: '<span style="font-family: Roboto, sans-serif;">Roboto</span>'
|
|
1141
|
+
}
|
|
1142
|
+
]}
|
|
1143
|
+
placeholder="Select a font family..."
|
|
1144
|
+
searchable
|
|
1145
|
+
search-placeholder="Search fonts..."
|
|
1146
|
+
@change=${(e: any) => {
|
|
1147
|
+
const selectedFont = e.detail?.value;
|
|
1148
|
+
const previewText = document.getElementById('font-preview');
|
|
1149
|
+
if (previewText && selectedFont) {
|
|
1150
|
+
previewText.style.fontFamily = selectedFont;
|
|
1151
|
+
previewText.textContent = `This text is displayed in ${e.detail.label}`;
|
|
1152
|
+
console.log('Font changed to:', selectedFont);
|
|
1153
|
+
}
|
|
1154
|
+
}}
|
|
1155
|
+
></nr-select>
|
|
1156
|
+
|
|
1157
|
+
<div
|
|
1158
|
+
id="font-preview"
|
|
1159
|
+
style="
|
|
1160
|
+
margin-top: 16px;
|
|
1161
|
+
padding: 20px;
|
|
1162
|
+
border: 2px dashed #ddd;
|
|
1163
|
+
border-radius: 8px;
|
|
1164
|
+
font-size: 18px;
|
|
1165
|
+
line-height: 1.5;
|
|
1166
|
+
min-height: 60px;
|
|
1167
|
+
display: flex;
|
|
1168
|
+
align-items: center;
|
|
1169
|
+
justify-content: center;
|
|
1170
|
+
text-align: center;
|
|
1171
|
+
background: #fafafa;
|
|
1172
|
+
color: #333;
|
|
1173
|
+
transition: font-family 0.3s ease;
|
|
1174
|
+
"
|
|
1175
|
+
>
|
|
1176
|
+
Select a font to see the preview here
|
|
1177
|
+
</div>
|
|
1178
|
+
</div>
|
|
1179
|
+
|
|
1180
|
+
<!-- Multiple Font Stack Selection -->
|
|
1181
|
+
<div>
|
|
1182
|
+
<h3>Font Stack Selection</h3>
|
|
1183
|
+
<p>Select multiple fonts to create a fallback stack</p>
|
|
1184
|
+
<nr-select
|
|
1185
|
+
.options=${[
|
|
1186
|
+
{
|
|
1187
|
+
label: 'Arial',
|
|
1188
|
+
value: 'Arial',
|
|
1189
|
+
content: html`<span style="font-family: Arial, sans-serif;">Arial</span>`
|
|
1190
|
+
},
|
|
1191
|
+
{
|
|
1192
|
+
label: 'Helvetica',
|
|
1193
|
+
value: 'Helvetica',
|
|
1194
|
+
content: html`<span style="font-family: Helvetica, Arial, sans-serif;">Helvetica</span>`
|
|
1195
|
+
},
|
|
1196
|
+
{
|
|
1197
|
+
label: 'Times New Roman',
|
|
1198
|
+
value: 'Times New Roman',
|
|
1199
|
+
content: html`<span style="font-family: Times New Roman, serif;">Times New Roman</span>`
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
label: 'Georgia',
|
|
1203
|
+
value: 'Georgia',
|
|
1204
|
+
content: html`<span style="font-family: Georgia, serif;">Georgia</span>`
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
label: 'Verdana',
|
|
1208
|
+
value: 'Verdana',
|
|
1209
|
+
content: html`<span style="font-family: Verdana, sans-serif;">Verdana</span>`
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
label: 'Courier New',
|
|
1213
|
+
value: 'Courier New',
|
|
1214
|
+
content: html`<span style="font-family: Courier New, monospace;">Courier New</span>`
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
label: 'Trebuchet MS',
|
|
1218
|
+
value: 'Trebuchet MS',
|
|
1219
|
+
content: html`<span style="font-family: Trebuchet MS, sans-serif;">Trebuchet MS</span>`
|
|
1220
|
+
},
|
|
1221
|
+
{
|
|
1222
|
+
label: 'Palatino',
|
|
1223
|
+
value: 'Palatino',
|
|
1224
|
+
content: html`<span style="font-family: Palatino, serif;">Palatino</span>`
|
|
1225
|
+
},
|
|
1226
|
+
{
|
|
1227
|
+
label: 'sans-serif',
|
|
1228
|
+
value: 'sans-serif',
|
|
1229
|
+
content: html`<span style="font-family: sans-serif; font-style: italic; opacity: 0.8;">sans-serif</span>`
|
|
1230
|
+
},
|
|
1231
|
+
{
|
|
1232
|
+
label: 'serif',
|
|
1233
|
+
value: 'serif',
|
|
1234
|
+
content: html`<span style="font-family: serif; font-style: italic; opacity: 0.8;">serif</span>`
|
|
1235
|
+
},
|
|
1236
|
+
{
|
|
1237
|
+
label: 'monospace',
|
|
1238
|
+
value: 'monospace',
|
|
1239
|
+
content: html`<span style="font-family: monospace; font-style: italic; opacity: 0.8;">monospace</span>`
|
|
1240
|
+
},
|
|
1241
|
+
{
|
|
1242
|
+
label: 'cursive',
|
|
1243
|
+
value: 'cursive',
|
|
1244
|
+
content: html`<span style="font-family: cursive; font-style: italic; opacity: 0.8;">cursive</span>`
|
|
1245
|
+
},
|
|
1246
|
+
{
|
|
1247
|
+
label: 'fantasy',
|
|
1248
|
+
value: 'fantasy',
|
|
1249
|
+
content: html`<span style="font-family: fantasy; font-style: italic; opacity: 0.8;">fantasy</span>`
|
|
1250
|
+
}
|
|
1251
|
+
]}
|
|
1252
|
+
placeholder="Build your font stack..."
|
|
1253
|
+
multiple
|
|
1254
|
+
searchable
|
|
1255
|
+
search-placeholder="Search font families..."
|
|
1256
|
+
@change=${(e: any) => {
|
|
1257
|
+
const selectedFonts = e.detail?.value || [];
|
|
1258
|
+
const stackPreview = document.getElementById('stack-preview');
|
|
1259
|
+
const stackDisplay = document.getElementById('stack-display');
|
|
1260
|
+
|
|
1261
|
+
if (stackPreview && stackDisplay && selectedFonts.length > 0) {
|
|
1262
|
+
const fontStack = selectedFonts.join(', ');
|
|
1263
|
+
stackPreview.style.fontFamily = fontStack;
|
|
1264
|
+
stackPreview.textContent = `Font stack: ${fontStack}`;
|
|
1265
|
+
stackDisplay.textContent = `CSS: font-family: ${fontStack};`;
|
|
1266
|
+
} else if (stackPreview && stackDisplay) {
|
|
1267
|
+
stackPreview.textContent = 'Select fonts to build your stack';
|
|
1268
|
+
stackDisplay.textContent = 'CSS: font-family: /* your stack will appear here */';
|
|
1269
|
+
}
|
|
1270
|
+
}}
|
|
1271
|
+
></nr-select>
|
|
1272
|
+
|
|
1273
|
+
<div
|
|
1274
|
+
id="stack-preview"
|
|
1275
|
+
style="
|
|
1276
|
+
margin-top: 16px;
|
|
1277
|
+
padding: 16px;
|
|
1278
|
+
border: 1px solid #ddd;
|
|
1279
|
+
border-radius: 6px;
|
|
1280
|
+
font-size: 16px;
|
|
1281
|
+
background: white;
|
|
1282
|
+
transition: font-family 0.3s ease;
|
|
1283
|
+
"
|
|
1284
|
+
>
|
|
1285
|
+
Select fonts to build your stack
|
|
1286
|
+
</div>
|
|
1287
|
+
|
|
1288
|
+
<code
|
|
1289
|
+
id="stack-display"
|
|
1290
|
+
style="
|
|
1291
|
+
display: block;
|
|
1292
|
+
margin-top: 8px;
|
|
1293
|
+
padding: 12px;
|
|
1294
|
+
background: #f5f5f5;
|
|
1295
|
+
border-radius: 4px;
|
|
1296
|
+
font-size: 14px;
|
|
1297
|
+
color: #666;
|
|
1298
|
+
border: 1px solid #e0e0e0;
|
|
1299
|
+
"
|
|
1300
|
+
>
|
|
1301
|
+
CSS: font-family: /* your stack will appear here */
|
|
1302
|
+
</code>
|
|
1303
|
+
</div>
|
|
1304
|
+
|
|
1305
|
+
<!-- Web-Safe Fonts Category -->
|
|
1306
|
+
<div>
|
|
1307
|
+
<h3>Web-Safe Font Categories</h3>
|
|
1308
|
+
<nr-select
|
|
1309
|
+
.options=${[
|
|
1310
|
+
{
|
|
1311
|
+
label: 'Sans-Serif Fonts',
|
|
1312
|
+
value: 'sans-serif',
|
|
1313
|
+
description: 'Clean, modern fonts without decorative strokes',
|
|
1314
|
+
disabled: true,
|
|
1315
|
+
content: html`<strong style="color: #666;">Sans-Serif Fonts</strong>`
|
|
1316
|
+
},
|
|
1317
|
+
{
|
|
1318
|
+
label: '→ Arial',
|
|
1319
|
+
value: 'Arial, sans-serif',
|
|
1320
|
+
content: html`<span style="font-family: Arial, sans-serif;">→ Arial</span>`
|
|
1321
|
+
},
|
|
1322
|
+
{
|
|
1323
|
+
label: '→ Helvetica',
|
|
1324
|
+
value: 'Helvetica, Arial, sans-serif',
|
|
1325
|
+
content: html`<span style="font-family: Helvetica, Arial, sans-serif;">→ Helvetica</span>`
|
|
1326
|
+
},
|
|
1327
|
+
{
|
|
1328
|
+
label: '→ Verdana',
|
|
1329
|
+
value: 'Verdana, sans-serif',
|
|
1330
|
+
content: html`<span style="font-family: Verdana, sans-serif;">→ Verdana</span>`
|
|
1331
|
+
},
|
|
1332
|
+
{
|
|
1333
|
+
label: '→ Tahoma',
|
|
1334
|
+
value: 'Tahoma, sans-serif',
|
|
1335
|
+
content: html`<span style="font-family: Tahoma, sans-serif;">→ Tahoma</span>`
|
|
1336
|
+
},
|
|
1337
|
+
{
|
|
1338
|
+
label: '→ Trebuchet MS',
|
|
1339
|
+
value: 'Trebuchet MS, sans-serif',
|
|
1340
|
+
content: html`<span style="font-family: Trebuchet MS, sans-serif;">→ Trebuchet MS</span>`
|
|
1341
|
+
},
|
|
1342
|
+
{
|
|
1343
|
+
label: 'Serif Fonts',
|
|
1344
|
+
value: 'serif',
|
|
1345
|
+
description: 'Traditional fonts with decorative strokes',
|
|
1346
|
+
disabled: true,
|
|
1347
|
+
content: html`<strong style="color: #666;">Serif Fonts</strong>`
|
|
1348
|
+
},
|
|
1349
|
+
{
|
|
1350
|
+
label: '→ Times New Roman',
|
|
1351
|
+
value: 'Times New Roman, serif',
|
|
1352
|
+
content: html`<span style="font-family: Times New Roman, serif;">→ Times New Roman</span>`
|
|
1353
|
+
},
|
|
1354
|
+
{
|
|
1355
|
+
label: '→ Georgia',
|
|
1356
|
+
value: 'Georgia, serif',
|
|
1357
|
+
content: html`<span style="font-family: Georgia, serif;">→ Georgia</span>`
|
|
1358
|
+
},
|
|
1359
|
+
{
|
|
1360
|
+
label: '→ Palatino',
|
|
1361
|
+
value: 'Palatino, serif',
|
|
1362
|
+
content: html`<span style="font-family: Palatino, serif;">→ Palatino</span>`
|
|
1363
|
+
},
|
|
1364
|
+
{
|
|
1365
|
+
label: 'Monospace Fonts',
|
|
1366
|
+
value: 'monospace',
|
|
1367
|
+
description: 'Fixed-width fonts for code and data',
|
|
1368
|
+
disabled: true,
|
|
1369
|
+
content: html`<strong style="color: #666;">Monospace Fonts</strong>`
|
|
1370
|
+
},
|
|
1371
|
+
{
|
|
1372
|
+
label: '→ Courier New',
|
|
1373
|
+
value: 'Courier New, monospace',
|
|
1374
|
+
content: html`<span style="font-family: Courier New, monospace;">→ Courier New</span>`
|
|
1375
|
+
},
|
|
1376
|
+
{
|
|
1377
|
+
label: '→ Lucida Console',
|
|
1378
|
+
value: 'Lucida Console, monospace',
|
|
1379
|
+
content: html`<span style="font-family: Lucida Console, monospace;">→ Lucida Console</span>`
|
|
1380
|
+
},
|
|
1381
|
+
{
|
|
1382
|
+
label: 'Display Fonts',
|
|
1383
|
+
value: 'display',
|
|
1384
|
+
description: 'Bold fonts for headlines and emphasis',
|
|
1385
|
+
disabled: true,
|
|
1386
|
+
content: html`<strong style="color: #666;">Display Fonts</strong>`
|
|
1387
|
+
},
|
|
1388
|
+
{
|
|
1389
|
+
label: '→ Impact',
|
|
1390
|
+
value: 'Impact, sans-serif',
|
|
1391
|
+
content: html`<span style="font-family: Impact, sans-serif;">→ Impact</span>`
|
|
1392
|
+
},
|
|
1393
|
+
{
|
|
1394
|
+
label: '→ Comic Sans MS',
|
|
1395
|
+
value: 'Comic Sans MS, cursive',
|
|
1396
|
+
content: html`<span style="font-family: Comic Sans MS, cursive;">→ Comic Sans MS</span>`
|
|
1397
|
+
}
|
|
1398
|
+
]}
|
|
1399
|
+
placeholder="Browse fonts by category..."
|
|
1400
|
+
searchable
|
|
1401
|
+
search-placeholder="Search font categories..."
|
|
1402
|
+
@change=${(e: any) => {
|
|
1403
|
+
const selectedFont = e.detail?.value;
|
|
1404
|
+
const categoryPreview = document.getElementById('category-preview');
|
|
1405
|
+
if (categoryPreview && selectedFont && !e.detail?.disabled) {
|
|
1406
|
+
categoryPreview.style.fontFamily = selectedFont;
|
|
1407
|
+
categoryPreview.innerHTML = `
|
|
1408
|
+
<strong>${e.detail.label.replace('→ ', '')}</strong><br>
|
|
1409
|
+
<span style="font-size: 14px; opacity: 0.8;">${selectedFont}</span><br>
|
|
1410
|
+
<span style="font-size: 16px; margin-top: 8px; display: block;">
|
|
1411
|
+
The quick brown fox jumps over the lazy dog
|
|
1412
|
+
</span>
|
|
1413
|
+
`;
|
|
1414
|
+
}
|
|
1415
|
+
}}
|
|
1416
|
+
></nr-select>
|
|
1417
|
+
|
|
1418
|
+
<div
|
|
1419
|
+
id="category-preview"
|
|
1420
|
+
style="
|
|
1421
|
+
margin-top: 16px;
|
|
1422
|
+
padding: 20px;
|
|
1423
|
+
border: 1px solid #ddd;
|
|
1424
|
+
border-radius: 6px;
|
|
1425
|
+
background: white;
|
|
1426
|
+
min-height: 80px;
|
|
1427
|
+
display: flex;
|
|
1428
|
+
flex-direction: column;
|
|
1429
|
+
justify-content: center;
|
|
1430
|
+
transition: font-family 0.3s ease;
|
|
1431
|
+
"
|
|
1432
|
+
>
|
|
1433
|
+
Select a font to see the preview
|
|
1434
|
+
</div>
|
|
1435
|
+
</div>
|
|
1436
|
+
</div>
|
|
1437
|
+
</div>
|
|
1438
|
+
`,
|
|
1439
|
+
};
|
|
1440
|
+
|
|
1441
|
+
// Comprehensive showcase of all select component features
|
|
1442
|
+
export const AllFeatures: Story = {
|
|
1443
|
+
parameters: {
|
|
1444
|
+
docs: {
|
|
1445
|
+
description: {
|
|
1446
|
+
story: 'Comprehensive showcase demonstrating all select component features, states, and interactions in a single organized layout.'
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
},
|
|
1450
|
+
render: () => html`
|
|
1451
|
+
<div style="padding: 20px; display: grid; gap: 30px;">
|
|
1452
|
+
<h2>Select Component</h2>
|
|
1453
|
+
|
|
1454
|
+
<!-- Basic Single Selection -->
|
|
1455
|
+
<section>
|
|
1456
|
+
<h3>1. Basic Single Selection</h3>
|
|
1457
|
+
<p>Click to open, select an option, dropdown should close automatically</p>
|
|
1458
|
+
<nr-select
|
|
1459
|
+
.options=${[
|
|
1460
|
+
{ label: 'Apple', value: 'apple' },
|
|
1461
|
+
{ label: 'Banana', value: 'banana' },
|
|
1462
|
+
{ label: 'Cherry', value: 'cherry' },
|
|
1463
|
+
{ label: 'Date', value: 'date' }
|
|
1464
|
+
]}
|
|
1465
|
+
placeholder="Select a fruit"
|
|
1466
|
+
@change=${(e: any) => console.log('Single selection:', e.detail)}
|
|
1467
|
+
></nr-select>
|
|
1468
|
+
</section>
|
|
1469
|
+
|
|
1470
|
+
<!-- Multiple Selection -->
|
|
1471
|
+
<section>
|
|
1472
|
+
<h3>2. Multiple Selection</h3>
|
|
1473
|
+
<p>Multiple selection - dropdown stays open, shows tags for selected items</p>
|
|
1474
|
+
<nr-select
|
|
1475
|
+
.options=${[
|
|
1476
|
+
{ label: 'JavaScript', value: 'js' },
|
|
1477
|
+
{ label: 'TypeScript', value: 'ts' },
|
|
1478
|
+
{ label: 'Python', value: 'py' },
|
|
1479
|
+
{ label: 'Rust', value: 'rust' },
|
|
1480
|
+
{ label: 'Go', value: 'go' }
|
|
1481
|
+
]}
|
|
1482
|
+
placeholder="Select programming languages"
|
|
1483
|
+
multiple
|
|
1484
|
+
@change=${(e: any) => console.log('Multiple selection:', e.detail)}
|
|
1485
|
+
></nr-select>
|
|
1486
|
+
</section>
|
|
1487
|
+
|
|
1488
|
+
<!-- Pre-selected Values -->
|
|
1489
|
+
<section>
|
|
1490
|
+
<h3>3. Pre-selected Values</h3>
|
|
1491
|
+
<p>Single and multiple with default selections</p>
|
|
1492
|
+
<div style="display: grid; gap: 15px; grid-template-columns: 1fr 1fr;">
|
|
1493
|
+
<nr-select
|
|
1494
|
+
.options=${[
|
|
1495
|
+
{ label: 'Small', value: 'sm' },
|
|
1496
|
+
{ label: 'Medium', value: 'md' },
|
|
1497
|
+
{ label: 'Large', value: 'lg' }
|
|
1498
|
+
]}
|
|
1499
|
+
.value=${['md']}
|
|
1500
|
+
placeholder="Size (pre-selected)"
|
|
1501
|
+
></nr-select>
|
|
1502
|
+
<nr-select
|
|
1503
|
+
.options=${[
|
|
1504
|
+
{ label: 'Red', value: 'red' },
|
|
1505
|
+
{ label: 'Green', value: 'green' },
|
|
1506
|
+
{ label: 'Blue', value: 'blue' },
|
|
1507
|
+
{ label: 'Yellow', value: 'yellow' }
|
|
1508
|
+
]}
|
|
1509
|
+
.value=${['red', 'blue']}
|
|
1510
|
+
placeholder="Colors (multiple pre-selected)"
|
|
1511
|
+
multiple
|
|
1512
|
+
></nr-select>
|
|
1513
|
+
</div>
|
|
1514
|
+
</section>
|
|
1515
|
+
|
|
1516
|
+
<!-- Positioning Test -->
|
|
1517
|
+
<section>
|
|
1518
|
+
<h3>4. Positioning Test</h3>
|
|
1519
|
+
<p>Multiple selects to test positioning (second should not go to left: 0)</p>
|
|
1520
|
+
<div style="display: grid; gap: 15px; grid-template-columns: 1fr 1fr 1fr;">
|
|
1521
|
+
<nr-select
|
|
1522
|
+
.options=${[
|
|
1523
|
+
{ label: 'Option A1', value: 'a1' },
|
|
1524
|
+
{ label: 'Option A2', value: 'a2' },
|
|
1525
|
+
{ label: 'Option A3', value: 'a3' }
|
|
1526
|
+
]}
|
|
1527
|
+
placeholder="First Select"
|
|
1528
|
+
></nr-select>
|
|
1529
|
+
<nr-select
|
|
1530
|
+
.options=${[
|
|
1531
|
+
{ label: 'Option B1', value: 'b1' },
|
|
1532
|
+
{ label: 'Option B2', value: 'b2' },
|
|
1533
|
+
{ label: 'Option B3', value: 'b3' }
|
|
1534
|
+
]}
|
|
1535
|
+
placeholder="Second Select"
|
|
1536
|
+
></nr-select>
|
|
1537
|
+
<nr-select
|
|
1538
|
+
.options=${[
|
|
1539
|
+
{ label: 'Option C1', value: 'c1' },
|
|
1540
|
+
{ label: 'Option C2', value: 'c2' },
|
|
1541
|
+
{ label: 'Option C3', value: 'c3' }
|
|
1542
|
+
]}
|
|
1543
|
+
placeholder="Third Select"
|
|
1544
|
+
></nr-select>
|
|
1545
|
+
</div>
|
|
1546
|
+
</section>
|
|
1547
|
+
|
|
1548
|
+
<!-- Disabled Options -->
|
|
1549
|
+
<section>
|
|
1550
|
+
<h3>5. Disabled Options</h3>
|
|
1551
|
+
<p>Some options are disabled and cannot be selected</p>
|
|
1552
|
+
<nr-select
|
|
1553
|
+
.options=${[
|
|
1554
|
+
{ label: 'Available Option 1', value: 'av1' },
|
|
1555
|
+
{ label: 'Disabled Option', value: 'dis1', disabled: true },
|
|
1556
|
+
{ label: 'Available Option 2', value: 'av2' },
|
|
1557
|
+
{ label: 'Another Disabled', value: 'dis2', disabled: true },
|
|
1558
|
+
{ label: 'Available Option 3', value: 'av3' }
|
|
1559
|
+
]}
|
|
1560
|
+
placeholder="Select with disabled options"
|
|
1561
|
+
></nr-select>
|
|
1562
|
+
</section>
|
|
1563
|
+
|
|
1564
|
+
<!-- Status States -->
|
|
1565
|
+
<section>
|
|
1566
|
+
<h3>6. Status States</h3>
|
|
1567
|
+
<p>Different status states: success, warning, error</p>
|
|
1568
|
+
<div style="display: grid; gap: 15px; grid-template-columns: 1fr 1fr 1fr;">
|
|
1569
|
+
<nr-select
|
|
1570
|
+
.options=${[
|
|
1571
|
+
{ label: 'Valid Choice 1', value: 'v1' },
|
|
1572
|
+
{ label: 'Valid Choice 2', value: 'v2' }
|
|
1573
|
+
]}
|
|
1574
|
+
placeholder="Success State"
|
|
1575
|
+
status="success"
|
|
1576
|
+
></nr-select>
|
|
1577
|
+
<nr-select
|
|
1578
|
+
.options=${[
|
|
1579
|
+
{ label: 'Warning Choice 1', value: 'w1' },
|
|
1580
|
+
{ label: 'Warning Choice 2', value: 'w2' }
|
|
1581
|
+
]}
|
|
1582
|
+
placeholder="Warning State"
|
|
1583
|
+
status="warning"
|
|
1584
|
+
></nr-select>
|
|
1585
|
+
<nr-select
|
|
1586
|
+
.options=${[
|
|
1587
|
+
{ label: 'Error Choice 1', value: 'e1' },
|
|
1588
|
+
{ label: 'Error Choice 2', value: 'e2' }
|
|
1589
|
+
]}
|
|
1590
|
+
placeholder="Error State"
|
|
1591
|
+
status="error"
|
|
1592
|
+
></nr-select>
|
|
1593
|
+
</div>
|
|
1594
|
+
</section>
|
|
1595
|
+
|
|
1596
|
+
<!-- Disabled Component -->
|
|
1597
|
+
<section>
|
|
1598
|
+
<h3>7. Disabled Component</h3>
|
|
1599
|
+
<p>Entire component is disabled</p>
|
|
1600
|
+
<nr-select
|
|
1601
|
+
.options=${[
|
|
1602
|
+
{ label: 'Cannot Select 1', value: 'cs1' },
|
|
1603
|
+
{ label: 'Cannot Select 2', value: 'cs2' }
|
|
1604
|
+
]}
|
|
1605
|
+
placeholder="Disabled select"
|
|
1606
|
+
disabled
|
|
1607
|
+
></nr-select>
|
|
1608
|
+
</section>
|
|
1609
|
+
|
|
1610
|
+
<!-- Click Outside Test -->
|
|
1611
|
+
<section>
|
|
1612
|
+
<h3>8. Click Outside Test</h3>
|
|
1613
|
+
<p>Open any dropdown above, then click here to test outside click closing</p>
|
|
1614
|
+
<div style="padding: 20px; background: #f0f0f0; border-radius: 8px; text-align: center;">
|
|
1615
|
+
Click here to test outside click behavior
|
|
1616
|
+
</div>
|
|
1617
|
+
</section>
|
|
1618
|
+
|
|
1619
|
+
<!-- Event Testing -->
|
|
1620
|
+
<section>
|
|
1621
|
+
<h3>9. Event Testing</h3>
|
|
1622
|
+
<p>Check console for change events when selecting options</p>
|
|
1623
|
+
<nr-select
|
|
1624
|
+
.options=${[
|
|
1625
|
+
{ label: 'Event Test 1', value: 'et1' },
|
|
1626
|
+
{ label: 'Event Test 2', value: 'et2' },
|
|
1627
|
+
{ label: 'Event Test 3', value: 'et3' }
|
|
1628
|
+
]}
|
|
1629
|
+
placeholder="Select to see events in console"
|
|
1630
|
+
@change=${(e: any) => {
|
|
1631
|
+
console.log('✅ Change event fired:', e.detail);
|
|
1632
|
+
alert('Selection changed! Check console for details.');
|
|
1633
|
+
}}
|
|
1634
|
+
@dropdown-open=${() => console.log('🔽 Dropdown opened')}
|
|
1635
|
+
@dropdown-close=${() => console.log('🔼 Dropdown closed')}
|
|
1636
|
+
></nr-select>
|
|
1637
|
+
</section>
|
|
1638
|
+
|
|
1639
|
+
<!-- Large Option List -->
|
|
1640
|
+
<section>
|
|
1641
|
+
<h3>10. Large Option List</h3>
|
|
1642
|
+
<p>Test with many options to check scrolling and performance</p>
|
|
1643
|
+
<nr-select
|
|
1644
|
+
.options=${Array.from({ length: 20 }, (_, i) => ({
|
|
1645
|
+
label: `Option ${i + 1} - ${['Alpha', 'Beta', 'Gamma', 'Delta', 'Epsilon', 'Zeta'][i % 6]}`,
|
|
1646
|
+
value: `opt${i + 1}`
|
|
1647
|
+
}))}
|
|
1648
|
+
placeholder="Select from many options"
|
|
1649
|
+
></nr-select>
|
|
1650
|
+
</section>
|
|
1651
|
+
</div>
|
|
1652
|
+
`,
|
|
1653
|
+
};
|