@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,861 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/web-components';
|
|
2
|
+
import { html } from 'lit';
|
|
3
|
+
import './index.js';
|
|
4
|
+
import '../icon/index.js';
|
|
5
|
+
import type { ButtonIconConfig } from './button.types.js';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* ## Button
|
|
10
|
+
*
|
|
11
|
+
* Buttons are clickable elements that are used to trigger actions. They communicate calls to action
|
|
12
|
+
* to the user and allow users to interact with pages in a variety of ways. Button labels express
|
|
13
|
+
* what action will occur when the user interacts with it.
|
|
14
|
+
*
|
|
15
|
+
* ### When to use
|
|
16
|
+
* - Use buttons to communicate actions users can take and to allow users to interact with the page
|
|
17
|
+
* - Each page should have only one primary button
|
|
18
|
+
* - Any remaining calls to action should be represented as lower emphasis buttons
|
|
19
|
+
*
|
|
20
|
+
* ### When not to use
|
|
21
|
+
* - Do not use buttons as navigational elements. Instead, use links when the desired action is to take the user to a new page
|
|
22
|
+
*
|
|
23
|
+
* ### Variants
|
|
24
|
+
* Each button variant has a particular function and its design signals that function to the user.
|
|
25
|
+
* It is important that the different variants are implemented consistently across products.
|
|
26
|
+
*
|
|
27
|
+
* - **Primary**: For the principal call to action on the page
|
|
28
|
+
* - **Secondary**: For secondary actions on each page. Can only be used in conjunction with a primary button
|
|
29
|
+
* - **Tertiary**: For less prominent, and sometimes independent, actions
|
|
30
|
+
* - **Ghost**: For the least pronounced actions; often used in conjunction with a primary button
|
|
31
|
+
* - **Danger**: For actions that could have destructive effects on the user's data
|
|
32
|
+
*/
|
|
33
|
+
const meta: Meta = {
|
|
34
|
+
title: 'General/Button',
|
|
35
|
+
component: 'nr-button',
|
|
36
|
+
parameters: {
|
|
37
|
+
layout: 'centered',
|
|
38
|
+
docs: {
|
|
39
|
+
description: {
|
|
40
|
+
component: 'Buttons are clickable elements that are used to trigger actions. They communicate calls to action to the user and allow users to interact with pages in a variety of ways. Button labels express what action will occur when the user interacts with it. This component follows IBM Carbon Design System patterns and specifications.',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
tags: ['autodocs'],
|
|
45
|
+
argTypes: {
|
|
46
|
+
// Core Properties
|
|
47
|
+
type: {
|
|
48
|
+
control: { type: 'select' },
|
|
49
|
+
options: ['default', 'primary', 'secondary', 'danger', 'ghost', 'text', 'link'],
|
|
50
|
+
description: 'Button variant that determines the visual style and semantic meaning',
|
|
51
|
+
table: {
|
|
52
|
+
category: 'Appearance',
|
|
53
|
+
defaultValue: { summary: 'default' },
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
size: {
|
|
57
|
+
control: { type: 'select' },
|
|
58
|
+
options: ['', 'small', 'medium', 'large'],
|
|
59
|
+
description: 'Button size following Carbon Design System specifications',
|
|
60
|
+
table: {
|
|
61
|
+
category: 'Appearance',
|
|
62
|
+
defaultValue: { summary: 'medium (default)' },
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
shape: {
|
|
66
|
+
control: { type: 'select' },
|
|
67
|
+
options: ['default', 'circle', 'round'],
|
|
68
|
+
description: 'Button shape for different use cases',
|
|
69
|
+
table: {
|
|
70
|
+
category: 'Appearance',
|
|
71
|
+
defaultValue: { summary: 'default' },
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
// State Properties
|
|
76
|
+
disabled: {
|
|
77
|
+
control: { type: 'boolean' },
|
|
78
|
+
description: 'Disables the button and prevents interaction',
|
|
79
|
+
table: {
|
|
80
|
+
category: 'State',
|
|
81
|
+
defaultValue: { summary: 'false' },
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
loading: {
|
|
85
|
+
control: { type: 'boolean' },
|
|
86
|
+
description: 'Shows loading spinner and disables interaction',
|
|
87
|
+
table: {
|
|
88
|
+
category: 'State',
|
|
89
|
+
defaultValue: { summary: 'false' },
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
// Layout Properties
|
|
94
|
+
block: {
|
|
95
|
+
control: { type: 'boolean' },
|
|
96
|
+
description: 'Makes button full width of its container',
|
|
97
|
+
table: {
|
|
98
|
+
category: 'Layout',
|
|
99
|
+
defaultValue: { summary: 'false' },
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
dashed: {
|
|
103
|
+
control: { type: 'boolean' },
|
|
104
|
+
description: 'Applies dashed border style',
|
|
105
|
+
table: {
|
|
106
|
+
category: 'Appearance',
|
|
107
|
+
defaultValue: { summary: 'false' },
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
|
|
111
|
+
// Icon Properties
|
|
112
|
+
icon: {
|
|
113
|
+
control: { type: 'object' },
|
|
114
|
+
description: 'Array of icons (strings or enhanced icon config objects) - supports 1-2 icons',
|
|
115
|
+
table: {
|
|
116
|
+
category: 'Icons',
|
|
117
|
+
defaultValue: { summary: '[]' },
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
iconPosition: {
|
|
121
|
+
control: { type: 'select' },
|
|
122
|
+
options: ['left', 'right'],
|
|
123
|
+
description: 'Position of icons relative to text content',
|
|
124
|
+
table: {
|
|
125
|
+
category: 'Icons',
|
|
126
|
+
defaultValue: { summary: 'left' },
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
|
|
130
|
+
// Link Properties
|
|
131
|
+
href: {
|
|
132
|
+
control: { type: 'text' },
|
|
133
|
+
description: 'URL for link-type buttons (automatically set to example.com when type is "link")',
|
|
134
|
+
table: {
|
|
135
|
+
category: 'Link',
|
|
136
|
+
defaultValue: { summary: '""' },
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
target: {
|
|
140
|
+
control: { type: 'text' },
|
|
141
|
+
description: 'Target attribute for link buttons',
|
|
142
|
+
table: {
|
|
143
|
+
category: 'Link',
|
|
144
|
+
defaultValue: { summary: '""' },
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
|
|
148
|
+
// Accessibility Properties
|
|
149
|
+
buttonAriaLabel: {
|
|
150
|
+
control: { type: 'text' },
|
|
151
|
+
description: 'Custom aria-label for improved accessibility',
|
|
152
|
+
table: {
|
|
153
|
+
category: 'Accessibility',
|
|
154
|
+
defaultValue: { summary: '""' },
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
ariaDescribedBy: {
|
|
158
|
+
control: { type: 'text' },
|
|
159
|
+
description: 'References to elements that describe the button',
|
|
160
|
+
table: {
|
|
161
|
+
category: 'Accessibility',
|
|
162
|
+
defaultValue: { summary: '""' },
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
|
|
166
|
+
// Technical Properties
|
|
167
|
+
htmlType: {
|
|
168
|
+
control: { type: 'select' },
|
|
169
|
+
options: ['button', 'submit', 'reset'],
|
|
170
|
+
description: 'HTML button type attribute',
|
|
171
|
+
table: {
|
|
172
|
+
category: 'Technical',
|
|
173
|
+
defaultValue: { summary: 'button' },
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
ripple: {
|
|
177
|
+
control: { type: 'boolean' },
|
|
178
|
+
description: 'Enables ripple effect on click',
|
|
179
|
+
table: {
|
|
180
|
+
category: 'Interaction',
|
|
181
|
+
defaultValue: { summary: 'true' },
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
|
|
185
|
+
// Slot
|
|
186
|
+
default: {
|
|
187
|
+
control: { type: 'text' },
|
|
188
|
+
description: 'Button text content',
|
|
189
|
+
table: {
|
|
190
|
+
category: 'Content',
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
args: {
|
|
195
|
+
type: 'default',
|
|
196
|
+
size: 'medium',
|
|
197
|
+
shape: 'default',
|
|
198
|
+
disabled: false,
|
|
199
|
+
loading: false,
|
|
200
|
+
block: false,
|
|
201
|
+
dashed: false,
|
|
202
|
+
icon: [],
|
|
203
|
+
iconPosition: 'left',
|
|
204
|
+
href: '',
|
|
205
|
+
target: '',
|
|
206
|
+
buttonAriaLabel: '',
|
|
207
|
+
ariaDescribedBy: '',
|
|
208
|
+
htmlType: 'button',
|
|
209
|
+
ripple: true,
|
|
210
|
+
default: 'Button',
|
|
211
|
+
},
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
export default meta;
|
|
215
|
+
type Story = StoryObj;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* The default button provides a neutral appearance for general actions.
|
|
219
|
+
* Use this for standard actions that don't require strong visual emphasis.
|
|
220
|
+
* This is the most common button variant in software products.
|
|
221
|
+
*/
|
|
222
|
+
export const Default: Story = {
|
|
223
|
+
parameters: {
|
|
224
|
+
layout: 'centered',
|
|
225
|
+
docs: {
|
|
226
|
+
description: {
|
|
227
|
+
story: 'The default button variant for standard actions and interactions.',
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
args: {
|
|
232
|
+
default: 'Default',
|
|
233
|
+
},
|
|
234
|
+
render: (args: any) => html`
|
|
235
|
+
<nr-button
|
|
236
|
+
type="${args.type}"
|
|
237
|
+
size="${args.size}"
|
|
238
|
+
shape="${args.shape}"
|
|
239
|
+
?disabled="${args.disabled}"
|
|
240
|
+
?loading="${args.loading}"
|
|
241
|
+
?block="${args.block}"
|
|
242
|
+
?dashed="${args.dashed}"
|
|
243
|
+
.icon="${args.icon}"
|
|
244
|
+
icon-position="${args.iconPosition}"
|
|
245
|
+
href="${args.type === 'link' ? (args.href || 'https://example.com') : args.href}"
|
|
246
|
+
target="${args.target}"
|
|
247
|
+
button-aria-label="${args.buttonAriaLabel}"
|
|
248
|
+
aria-described-by="${args.ariaDescribedBy}"
|
|
249
|
+
html-type="${args.htmlType}"
|
|
250
|
+
?ripple="${args.ripple}"
|
|
251
|
+
>
|
|
252
|
+
${args.default}
|
|
253
|
+
</nr-button>
|
|
254
|
+
`,
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* ## Button Variants
|
|
259
|
+
*
|
|
260
|
+
* Each button variant has a particular function and its design signals that function to the user.
|
|
261
|
+
* It is important that the different variants are implemented consistently across products.
|
|
262
|
+
*/
|
|
263
|
+
export const AllVariants: Story = {
|
|
264
|
+
parameters: {
|
|
265
|
+
layout: 'centered',
|
|
266
|
+
docs: {
|
|
267
|
+
description: {
|
|
268
|
+
story: 'All available button variants following Carbon Design System hierarchy and emphasis patterns.',
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
render: () => html`
|
|
273
|
+
<div style="display: flex; flex-direction: column; gap: 2rem; align-items: flex-start;">
|
|
274
|
+
<div style="display: flex; flex-direction: column; gap: 1.5rem;">
|
|
275
|
+
<h3 style="margin: 0; font-size: 1.125rem; font-weight: 600;">Primary Actions</h3>
|
|
276
|
+
<div style="display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;">
|
|
277
|
+
<nr-button type="primary">Primary</nr-button>
|
|
278
|
+
<span style="font-size: 0.875rem; color: #6f6f6f;">Principal call to action - use once per screen</span>
|
|
279
|
+
</div>
|
|
280
|
+
</div>
|
|
281
|
+
|
|
282
|
+
<div style="display: flex; flex-direction: column; gap: 1.5rem;">
|
|
283
|
+
<h3 style="margin: 0; font-size: 1.125rem; font-weight: 600;">Secondary Actions</h3>
|
|
284
|
+
<div style="display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;">
|
|
285
|
+
<nr-button type="secondary">Secondary</nr-button>
|
|
286
|
+
<span style="font-size: 0.875rem; color: #6f6f6f;">Use with primary - negative actions like Cancel/Back</span>
|
|
287
|
+
</div>
|
|
288
|
+
<div style="display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;">
|
|
289
|
+
<nr-button type="default">Tertiary</nr-button>
|
|
290
|
+
<span style="font-size: 0.875rem; color: #6f6f6f;">Less prominent actions - can be independent</span>
|
|
291
|
+
</div>
|
|
292
|
+
<div style="display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;">
|
|
293
|
+
<nr-button type="ghost">Ghost</nr-button>
|
|
294
|
+
<span style="font-size: 0.875rem; color: #6f6f6f;">Least pronounced - subtle supplementary actions</span>
|
|
295
|
+
</div>
|
|
296
|
+
</div>
|
|
297
|
+
|
|
298
|
+
<div style="display: flex; flex-direction: column; gap: 1.5rem;">
|
|
299
|
+
<h3 style="margin: 0; font-size: 1.125rem; font-weight: 600;">Specialized Actions</h3>
|
|
300
|
+
<div style="display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;">
|
|
301
|
+
<nr-button type="danger">Danger</nr-button>
|
|
302
|
+
<span style="font-size: 0.875rem; color: #6f6f6f;">Destructive actions - delete, remove, stop</span>
|
|
303
|
+
</div>
|
|
304
|
+
<div style="display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;">
|
|
305
|
+
<nr-button type="text">Text</nr-button>
|
|
306
|
+
<span style="font-size: 0.875rem; color: #6f6f6f;">Text-only actions</span>
|
|
307
|
+
</div>
|
|
308
|
+
<div style="display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;">
|
|
309
|
+
<nr-button type="link" href="https://example.com">Link</nr-button>
|
|
310
|
+
<span style="font-size: 0.875rem; color: #6f6f6f;">Navigation actions</span>
|
|
311
|
+
</div>
|
|
312
|
+
</div>
|
|
313
|
+
</div>
|
|
314
|
+
`,
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Primary buttons are for the principal call to action on the page.
|
|
319
|
+
* Primary buttons should only appear once per screen (not including the application header, modal dialog, or side panel).
|
|
320
|
+
* This high-emphasis button commands the most attention.
|
|
321
|
+
*/
|
|
322
|
+
export const Primary: Story = {
|
|
323
|
+
parameters: {
|
|
324
|
+
layout: 'centered',
|
|
325
|
+
docs: {
|
|
326
|
+
description: {
|
|
327
|
+
story: 'For the principal call to action on the page. Should only appear once per screen.',
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
},
|
|
331
|
+
args: {
|
|
332
|
+
type: 'primary',
|
|
333
|
+
default: 'Primary',
|
|
334
|
+
},
|
|
335
|
+
render: (args: any) => html`
|
|
336
|
+
<nr-button
|
|
337
|
+
type="${args.type}"
|
|
338
|
+
size="${args.size}"
|
|
339
|
+
?disabled="${args.disabled}"
|
|
340
|
+
?loading="${args.loading}"
|
|
341
|
+
>
|
|
342
|
+
${args.default}
|
|
343
|
+
</nr-button>
|
|
344
|
+
`,
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Secondary buttons are for secondary actions on each page.
|
|
349
|
+
* Secondary buttons can only be used in conjunction with a primary button.
|
|
350
|
+
* As part of a pair, the secondary button's function is to perform the negative action of the set, such as "Cancel" or "Back".
|
|
351
|
+
*/
|
|
352
|
+
export const Secondary: Story = {
|
|
353
|
+
parameters: {
|
|
354
|
+
layout: 'centered',
|
|
355
|
+
docs: {
|
|
356
|
+
description: {
|
|
357
|
+
story: 'For secondary actions on each page. Can only be used in conjunction with a primary button.',
|
|
358
|
+
},
|
|
359
|
+
},
|
|
360
|
+
},
|
|
361
|
+
args: {
|
|
362
|
+
type: 'secondary',
|
|
363
|
+
default: 'Secondary',
|
|
364
|
+
},
|
|
365
|
+
render: (args: any) => html`
|
|
366
|
+
<nr-button
|
|
367
|
+
type="${args.type}"
|
|
368
|
+
size="${args.size}"
|
|
369
|
+
?disabled="${args.disabled}"
|
|
370
|
+
?loading="${args.loading}"
|
|
371
|
+
>
|
|
372
|
+
${args.default}
|
|
373
|
+
</nr-button>
|
|
374
|
+
`,
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Tertiary buttons are for less prominent, and sometimes independent, actions.
|
|
379
|
+
* Tertiary buttons can be used in isolation or paired with a primary button when there are multiple calls to action.
|
|
380
|
+
* They can also be used for sub-tasks on a page where a primary button for the main and final action is present.
|
|
381
|
+
*/
|
|
382
|
+
export const Tertiary: Story = {
|
|
383
|
+
parameters: {
|
|
384
|
+
layout: 'centered',
|
|
385
|
+
docs: {
|
|
386
|
+
description: {
|
|
387
|
+
story: 'For less prominent actions. Can be used independently or with primary buttons.',
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
args: {
|
|
392
|
+
type: 'default', // Using 'default' as our tertiary equivalent
|
|
393
|
+
default: 'Tertiary',
|
|
394
|
+
},
|
|
395
|
+
render: (args: any) => html`
|
|
396
|
+
<nr-button
|
|
397
|
+
type="${args.type}"
|
|
398
|
+
size="${args.size}"
|
|
399
|
+
?disabled="${args.disabled}"
|
|
400
|
+
?loading="${args.loading}"
|
|
401
|
+
>
|
|
402
|
+
${args.default}
|
|
403
|
+
</nr-button>
|
|
404
|
+
`,
|
|
405
|
+
};
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Ghost buttons are for the least pronounced actions; often used in conjunction with a primary button.
|
|
409
|
+
* In a situation such as a progress flow, a ghost button may be paired with a primary and secondary button set,
|
|
410
|
+
* where the primary button is for forward action, the secondary button is for "Back", and the ghost button is for "Cancel".
|
|
411
|
+
*/
|
|
412
|
+
export const Ghost: Story = {
|
|
413
|
+
parameters: {
|
|
414
|
+
layout: 'centered',
|
|
415
|
+
docs: {
|
|
416
|
+
description: {
|
|
417
|
+
story: 'For the least pronounced actions. Often used for cancel or back actions.',
|
|
418
|
+
},
|
|
419
|
+
},
|
|
420
|
+
},
|
|
421
|
+
args: {
|
|
422
|
+
type: 'ghost',
|
|
423
|
+
default: 'Ghost',
|
|
424
|
+
},
|
|
425
|
+
render: (args: any) => html`
|
|
426
|
+
<nr-button
|
|
427
|
+
type="${args.type}"
|
|
428
|
+
size="${args.size}"
|
|
429
|
+
?disabled="${args.disabled}"
|
|
430
|
+
?loading="${args.loading}"
|
|
431
|
+
>
|
|
432
|
+
${args.default}
|
|
433
|
+
</nr-button>
|
|
434
|
+
`,
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Danger buttons are for actions that could have destructive effects on the user's data (for example, delete or remove).
|
|
439
|
+
* Determining which danger button style to use will depend on the level of emphasis you want to give to the destructive action.
|
|
440
|
+
*/
|
|
441
|
+
export const Danger: Story = {
|
|
442
|
+
parameters: {
|
|
443
|
+
layout: 'centered',
|
|
444
|
+
docs: {
|
|
445
|
+
description: {
|
|
446
|
+
story: 'For actions that could have destructive effects on the user\'s data.',
|
|
447
|
+
},
|
|
448
|
+
},
|
|
449
|
+
},
|
|
450
|
+
args: {
|
|
451
|
+
type: 'danger',
|
|
452
|
+
default: 'Delete',
|
|
453
|
+
},
|
|
454
|
+
render: (args: any) => html`
|
|
455
|
+
<nr-button
|
|
456
|
+
type="${args.type}"
|
|
457
|
+
size="${args.size}"
|
|
458
|
+
?disabled="${args.disabled}"
|
|
459
|
+
?loading="${args.loading}"
|
|
460
|
+
>
|
|
461
|
+
${args.default}
|
|
462
|
+
</nr-button>
|
|
463
|
+
`,
|
|
464
|
+
};
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Icon buttons can be placed next to labels to clarify an action and call attention to a button.
|
|
468
|
+
* Icons should be used sparingly, as overuse can create visual noise. Icons must match the color value of the label within a button.
|
|
469
|
+
* Icons should always appear to the right of the label.
|
|
470
|
+
*/
|
|
471
|
+
export const IconButton: Story = {
|
|
472
|
+
parameters: {
|
|
473
|
+
layout: 'centered',
|
|
474
|
+
docs: {
|
|
475
|
+
description: {
|
|
476
|
+
story: 'Buttons with icons to clarify actions. Icons appear to the right of the label.',
|
|
477
|
+
},
|
|
478
|
+
},
|
|
479
|
+
},
|
|
480
|
+
render: () => html`
|
|
481
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap; align-items: center;">
|
|
482
|
+
<nr-button type="primary" .icon="${['plus']}">Add item</nr-button>
|
|
483
|
+
<nr-button type="secondary" .icon="${['pen']}">Edit</nr-button>
|
|
484
|
+
<nr-button type="default" .icon="${['download']}">Download</nr-button>
|
|
485
|
+
<nr-button type="danger" .icon="${['trash']}">Delete</nr-button>
|
|
486
|
+
<nr-button type="ghost" .icon="${['external-link']}">Launch</nr-button>
|
|
487
|
+
</div>
|
|
488
|
+
`,
|
|
489
|
+
};
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* ## Button Groups
|
|
493
|
+
*
|
|
494
|
+
* Button groups are useful for aligning buttons that have a relationship. Group buttons logically
|
|
495
|
+
* into sets based on usage and importance. Follow Carbon's guidelines for proper button combinations.
|
|
496
|
+
*/
|
|
497
|
+
export const ButtonGroups: Story = {
|
|
498
|
+
parameters: {
|
|
499
|
+
layout: 'centered',
|
|
500
|
+
docs: {
|
|
501
|
+
description: {
|
|
502
|
+
story: 'Proper button group combinations following Carbon Design System guidelines.',
|
|
503
|
+
},
|
|
504
|
+
},
|
|
505
|
+
},
|
|
506
|
+
render: () => html`
|
|
507
|
+
<div style="display: flex; flex-direction: column; gap: 3rem; align-items: flex-start;">
|
|
508
|
+
<div>
|
|
509
|
+
<h4 style="margin: 0 0 1rem 0; font-size: 1rem; font-weight: 600;">✅ Recommended Combinations</h4>
|
|
510
|
+
|
|
511
|
+
<div style="display: flex; flex-direction: column; gap: 1.5rem;">
|
|
512
|
+
<div>
|
|
513
|
+
<p style="margin: 0 0 0.5rem 0; font-size: 0.875rem; color: #6f6f6f;">Primary + Secondary (for cancel/back actions)</p>
|
|
514
|
+
<div style="display: flex; gap: 1rem;">
|
|
515
|
+
<nr-button type="primary">Save</nr-button>
|
|
516
|
+
<nr-button type="secondary">Cancel</nr-button>
|
|
517
|
+
</div>
|
|
518
|
+
</div>
|
|
519
|
+
|
|
520
|
+
<div>
|
|
521
|
+
<p style="margin: 0 0 0.5rem 0; font-size: 0.875rem; color: #6f6f6f;">Primary + Tertiary (for alternative actions)</p>
|
|
522
|
+
<div style="display: flex; gap: 1rem;">
|
|
523
|
+
<nr-button type="primary">Continue</nr-button>
|
|
524
|
+
<nr-button type="default">Save as Draft</nr-button>
|
|
525
|
+
</div>
|
|
526
|
+
</div>
|
|
527
|
+
|
|
528
|
+
<div>
|
|
529
|
+
<p style="margin: 0 0 0.5rem 0; font-size: 0.875rem; color: #6f6f6f;">Primary + Ghost (for less prominent alternatives)</p>
|
|
530
|
+
<div style="display: flex; gap: 1rem;">
|
|
531
|
+
<nr-button type="primary">Submit</nr-button>
|
|
532
|
+
<nr-button type="ghost">Preview</nr-button>
|
|
533
|
+
</div>
|
|
534
|
+
</div>
|
|
535
|
+
|
|
536
|
+
<div>
|
|
537
|
+
<p style="margin: 0 0 0.5rem 0; font-size: 0.875rem; color: #6f6f6f;">Multiple Tertiary buttons (without primary)</p>
|
|
538
|
+
<div style="display: flex; gap: 1rem;">
|
|
539
|
+
<nr-button type="default">Filter</nr-button>
|
|
540
|
+
<nr-button type="default">Sort</nr-button>
|
|
541
|
+
<nr-button type="default">Export</nr-button>
|
|
542
|
+
</div>
|
|
543
|
+
</div>
|
|
544
|
+
</div>
|
|
545
|
+
</div>
|
|
546
|
+
|
|
547
|
+
<div>
|
|
548
|
+
<h4 style="margin: 0 0 1rem 0; font-size: 1rem; font-weight: 600; color: #d63939;">❌ Avoid These Combinations</h4>
|
|
549
|
+
|
|
550
|
+
<div style="display: flex; flex-direction: column; gap: 1rem;">
|
|
551
|
+
<div>
|
|
552
|
+
<p style="margin: 0 0 0.5rem 0; font-size: 0.875rem; color: #6f6f6f;">Multiple primary buttons (confusing hierarchy)</p>
|
|
553
|
+
<div style="display: flex; gap: 1rem; opacity: 0.6;">
|
|
554
|
+
<nr-button type="primary">Save</nr-button>
|
|
555
|
+
<nr-button type="primary">Publish</nr-button>
|
|
556
|
+
</div>
|
|
557
|
+
</div>
|
|
558
|
+
|
|
559
|
+
<div>
|
|
560
|
+
<p style="margin: 0 0 0.5rem 0; font-size: 0.875rem; color: #6f6f6f;">Secondary without primary (secondary needs primary context)</p>
|
|
561
|
+
<div style="display: flex; gap: 1rem; opacity: 0.6;">
|
|
562
|
+
<nr-button type="secondary">Cancel</nr-button>
|
|
563
|
+
<nr-button type="default">Close</nr-button>
|
|
564
|
+
</div>
|
|
565
|
+
</div>
|
|
566
|
+
</div>
|
|
567
|
+
</div>
|
|
568
|
+
</div>
|
|
569
|
+
`,
|
|
570
|
+
};
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* ## Enhanced Icon Features
|
|
574
|
+
*
|
|
575
|
+
* The button component supports enhanced icon configuration beyond simple icon names.
|
|
576
|
+
* You can pass detailed icon configuration objects with properties like type, size, color, and custom styles.
|
|
577
|
+
*/
|
|
578
|
+
export const EnhancedIcons: Story = {
|
|
579
|
+
parameters: {
|
|
580
|
+
layout: 'centered',
|
|
581
|
+
docs: {
|
|
582
|
+
description: {
|
|
583
|
+
story: 'Demonstrate enhanced icon capabilities with custom sizes, colors, and types.',
|
|
584
|
+
},
|
|
585
|
+
},
|
|
586
|
+
},
|
|
587
|
+
render: () => html`
|
|
588
|
+
<div style="display: flex; flex-direction: column; gap: 2rem;">
|
|
589
|
+
<div>
|
|
590
|
+
<h4 style="margin: 0 0 1rem 0; font-size: 1rem; font-weight: 600;">Simple String Icons (Backward Compatible)</h4>
|
|
591
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap;">
|
|
592
|
+
<nr-button type="primary" .icon="${['plus']}">Add Simple</nr-button>
|
|
593
|
+
<nr-button type="secondary" .icon="${['pen']}">Edit Simple</nr-button>
|
|
594
|
+
</div>
|
|
595
|
+
</div>
|
|
596
|
+
|
|
597
|
+
<div>
|
|
598
|
+
<h4 style="margin: 0 0 1rem 0; font-size: 1rem; font-weight: 600;">Enhanced Icon Configuration with New Properties</h4>
|
|
599
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap;">
|
|
600
|
+
<nr-button type="primary" .icon="${[{name: 'add', type: 'solid', size: '1.2em', color: '#ffffff'} as ButtonIconConfig]}">Add Enhanced</nr-button>
|
|
601
|
+
<nr-button type="secondary" .icon="${[{name: 'edit', type: 'regular', size: '1.1em', color: '#0056ff'} as ButtonIconConfig]}">Edit Regular</nr-button>
|
|
602
|
+
<nr-button type="default" .icon="${[{name: 'download', type: 'solid', color: '#28a745'} as ButtonIconConfig]}">Custom Color</nr-button>
|
|
603
|
+
<nr-button type="danger" .icon="${[{name: 'trash', type: 'solid', size: '1.3em'} as ButtonIconConfig]}">Large Icon</nr-button>
|
|
604
|
+
</div>
|
|
605
|
+
<p style="margin: 0.5rem 0 0 0; font-size: 0.875rem; color: #6f6f6f;">
|
|
606
|
+
Icons now accept size and color properties directly, no need for CSS overrides!
|
|
607
|
+
</p>
|
|
608
|
+
</div>
|
|
609
|
+
|
|
610
|
+
<div>
|
|
611
|
+
<h4 style="margin: 0 0 1rem 0; font-size: 1rem; font-weight: 600;">Mixed Icon Types</h4>
|
|
612
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap;">
|
|
613
|
+
<nr-button type="primary" .icon="${['home', {name: 'external-link', type: 'solid', size: '0.9em'} as ButtonIconConfig]}">Home & Link</nr-button>
|
|
614
|
+
<nr-button type="secondary" .icon="${[{name: 'user', type: 'regular'} as ButtonIconConfig, 'settings']}">User & Settings</nr-button>
|
|
615
|
+
</div>
|
|
616
|
+
</div>
|
|
617
|
+
|
|
618
|
+
<div>
|
|
619
|
+
<h4 style="margin: 0 0 1rem 0; font-size: 1rem; font-weight: 600;">Icon-only Buttons with Enhanced Properties</h4>
|
|
620
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap;">
|
|
621
|
+
<nr-button type="primary" shape="circle" .icon="${[{name: 'plus', type: 'solid', color: '#ffffff', alt: 'Add new item'} as ButtonIconConfig]}" button-aria-label="Add"></nr-button>
|
|
622
|
+
<nr-button type="secondary" shape="circle" .icon="${[{name: 'edit', type: 'regular', size: '1.1em', alt: 'Edit item'} as ButtonIconConfig]}" button-aria-label="Edit"></nr-button>
|
|
623
|
+
<nr-button type="danger" shape="circle" .icon="${[{name: 'trash', type: 'solid', size: '1.2em', alt: 'Delete item'} as ButtonIconConfig]}" button-aria-label="Delete"></nr-button>
|
|
624
|
+
</div>
|
|
625
|
+
<p style="margin: 0.5rem 0 0 0; font-size: 0.875rem; color: #6f6f6f;">
|
|
626
|
+
Icon-only buttons with enhanced size, color, and accessibility properties
|
|
627
|
+
</p>
|
|
628
|
+
</div>
|
|
629
|
+
|
|
630
|
+
<div>
|
|
631
|
+
<h4 style="margin: 0 0 1rem 0; font-size: 1rem; font-weight: 600;">Advanced Icon Styling Examples</h4>
|
|
632
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap;">
|
|
633
|
+
<nr-button type="primary" .icon="${[{name: 'star', type: 'solid', color: '#ffd700', size: '1.2em'} as ButtonIconConfig]}">Gold Star</nr-button>
|
|
634
|
+
<nr-button type="secondary" .icon="${[{name: 'heart', type: 'regular', color: '#ff6b6b', size: '1.1em'} as ButtonIconConfig]}">Love It</nr-button>
|
|
635
|
+
<nr-button type="default" .icon="${[{name: 'shield', type: 'solid', color: '#28a745', size: '1.15em'} as ButtonIconConfig]}">Secure</nr-button>
|
|
636
|
+
<nr-button type="ghost" .icon="${[{name: 'lightning-bolt', type: 'solid', color: '#6f42c1', size: '1.25em'} as ButtonIconConfig]}">Fast</nr-button>
|
|
637
|
+
</div>
|
|
638
|
+
<p style="margin: 0.5rem 0 0 0; font-size: 0.875rem; color: #6f6f6f;">
|
|
639
|
+
Custom colors and sizes showcase the flexibility of the enhanced icon system
|
|
640
|
+
</p>
|
|
641
|
+
</div>
|
|
642
|
+
</div>
|
|
643
|
+
`,
|
|
644
|
+
};
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* ## Alternative Icon APIs
|
|
648
|
+
*
|
|
649
|
+
* Multiple intuitive ways to specify icons with enhanced properties (size, color, type, alt text)
|
|
650
|
+
* without relying on arrays for better developer experience and more precise control.
|
|
651
|
+
*/
|
|
652
|
+
export const AlternativeIconAPIs: Story = {
|
|
653
|
+
parameters: {
|
|
654
|
+
layout: 'centered',
|
|
655
|
+
docs: {
|
|
656
|
+
description: {
|
|
657
|
+
story: 'Demonstrate alternative APIs for icon positioning that are more intuitive than arrays.',
|
|
658
|
+
},
|
|
659
|
+
},
|
|
660
|
+
},
|
|
661
|
+
render: () => html`
|
|
662
|
+
<div style="display: flex; flex-direction: column; gap: 2rem;">
|
|
663
|
+
<div>
|
|
664
|
+
<h4 style="margin: 0 0 1rem 0; font-size: 1rem; font-weight: 600;">1. Separate Properties (Most Intuitive)</h4>
|
|
665
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap;">
|
|
666
|
+
<nr-button type="primary" iconLeft="home">Home Only</nr-button>
|
|
667
|
+
<nr-button type="secondary" iconRight="arrow-right">Next</nr-button>
|
|
668
|
+
<nr-button type="default" iconLeft="home" iconRight="arrow-right">Navigate</nr-button>
|
|
669
|
+
</div>
|
|
670
|
+
</div>
|
|
671
|
+
|
|
672
|
+
<div>
|
|
673
|
+
<h4 style="margin: 0 0 1rem 0; font-size: 1rem; font-weight: 600;">2. Enhanced Separate Properties</h4>
|
|
674
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap;">
|
|
675
|
+
<nr-button type="primary" .iconLeft="${{name: 'user', type: 'solid', color: '#ffffff', size: '1.1em'} as ButtonIconConfig}">Enhanced Profile</nr-button>
|
|
676
|
+
<nr-button type="secondary" .iconRight="${{name: 'external-link', type: 'regular', size: '0.9em', color: '#0056ff'} as ButtonIconConfig}">Launch App</nr-button>
|
|
677
|
+
<nr-button type="default"
|
|
678
|
+
.iconLeft="${{name: 'download', type: 'solid', color: '#28a745'} as ButtonIconConfig}"
|
|
679
|
+
.iconRight="${{name: 'check', type: 'regular', color: '#28a745', size: '0.9em'} as ButtonIconConfig}">
|
|
680
|
+
Download & Verify
|
|
681
|
+
</nr-button>
|
|
682
|
+
</div>
|
|
683
|
+
<p style="margin: 0.5rem 0 0 0; font-size: 0.875rem; color: #6f6f6f;">
|
|
684
|
+
Individual icon properties with enhanced styling - size and color per icon!
|
|
685
|
+
</p>
|
|
686
|
+
</div>
|
|
687
|
+
|
|
688
|
+
<div>
|
|
689
|
+
<h4 style="margin: 0 0 1rem 0; font-size: 1rem; font-weight: 600;">3. Object-based Configuration</h4>
|
|
690
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap;">
|
|
691
|
+
<nr-button type="primary" .icons="${{left: 'home'}}">Home Only</nr-button>
|
|
692
|
+
<nr-button type="secondary" .icons="${{right: 'arrow-right'}}">Next</nr-button>
|
|
693
|
+
<nr-button type="default" .icons="${{left: 'search', right: 'filter'}}">Search & Filter</nr-button>
|
|
694
|
+
</div>
|
|
695
|
+
</div>
|
|
696
|
+
|
|
697
|
+
<div>
|
|
698
|
+
<h4 style="margin: 0 0 1rem 0; font-size: 1rem; font-weight: 600;">4. Enhanced Object Configuration</h4>
|
|
699
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap;">
|
|
700
|
+
<nr-button type="primary" .icons="${{
|
|
701
|
+
left: {name: 'star', type: 'solid', color: '#ffd700', size: '1.1em'} as ButtonIconConfig,
|
|
702
|
+
right: {name: 'arrow-right', type: 'regular', size: '0.9em'} as ButtonIconConfig
|
|
703
|
+
}}">Star & Go</nr-button>
|
|
704
|
+
<nr-button type="danger" .icons="${{
|
|
705
|
+
left: {name: 'warning', type: 'solid', size: '1.1em', color: '#ffc107'} as ButtonIconConfig,
|
|
706
|
+
right: {name: 'trash', type: 'solid', color: '#dc3545', size: '1.1em'} as ButtonIconConfig
|
|
707
|
+
}}">Warn & Delete</nr-button>
|
|
708
|
+
</div>
|
|
709
|
+
<p style="margin: 0.5rem 0 0 0; font-size: 0.875rem; color: #6f6f6f;">
|
|
710
|
+
Object configuration with custom colors and sizes for both left and right icons
|
|
711
|
+
</p>
|
|
712
|
+
</div>
|
|
713
|
+
|
|
714
|
+
<div>
|
|
715
|
+
<h4 style="margin: 0 0 1rem 0; font-size: 1rem; font-weight: 600;">5. Priority Demonstration & Complete Feature Showcase</h4>
|
|
716
|
+
<p style="margin: 0 0 0.5rem 0; font-size: 0.875rem; color: #6f6f6f;">
|
|
717
|
+
When multiple icon properties are set, priority is: iconLeft/iconRight > icons.left/right > icon[0]/icon[1]
|
|
718
|
+
</p>
|
|
719
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap;">
|
|
720
|
+
<nr-button type="primary"
|
|
721
|
+
.icon="${['background-left', 'background-right']}"
|
|
722
|
+
iconLeft="priority-left"
|
|
723
|
+
.icons="${{right: 'priority-right'}}">
|
|
724
|
+
Priority Test
|
|
725
|
+
</nr-button>
|
|
726
|
+
</div>
|
|
727
|
+
<p style="margin: 1rem 0 0.5rem 0; font-size: 0.875rem; color: #6f6f6f; font-weight: 600;">
|
|
728
|
+
Complete Icon Feature Showcase:
|
|
729
|
+
</p>
|
|
730
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap;">
|
|
731
|
+
<nr-button type="primary"
|
|
732
|
+
.iconLeft="${{name: 'rocket', type: 'solid', color: '#ffffff', size: '1.2em', alt: 'Launch rocket'} as ButtonIconConfig}"
|
|
733
|
+
.iconRight="${{name: 'star', type: 'regular', color: '#ffd700', size: '1.1em', alt: 'Favorite'} as ButtonIconConfig}">
|
|
734
|
+
Full Featured
|
|
735
|
+
</nr-button>
|
|
736
|
+
<nr-button type="secondary"
|
|
737
|
+
.icons="${{
|
|
738
|
+
left: {name: 'shield', type: 'solid', color: '#28a745', size: '1.15em', alt: 'Security'} as ButtonIconConfig,
|
|
739
|
+
right: {name: 'lightning-bolt', type: 'solid', color: '#6f42c1', size: '1.1em', alt: 'Fast'} as ButtonIconConfig
|
|
740
|
+
}}">
|
|
741
|
+
Secure & Fast
|
|
742
|
+
</nr-button>
|
|
743
|
+
</div>
|
|
744
|
+
<p style="margin: 0.5rem 0 0 0; font-size: 0.875rem; color: #6f6f6f;">
|
|
745
|
+
Complete control: name, type, size, color, and alt text for each icon
|
|
746
|
+
</p>
|
|
747
|
+
</div>
|
|
748
|
+
</div>
|
|
749
|
+
`,
|
|
750
|
+
};
|
|
751
|
+
|
|
752
|
+
/**
|
|
753
|
+
* ## Button Sizes
|
|
754
|
+
*
|
|
755
|
+
* Carbon Design System defines three button sizes: small (32px), medium (40px), and large (48px).
|
|
756
|
+
* Choose the appropriate size based on your UI density and context. Medium is the default size for most interfaces.
|
|
757
|
+
*/
|
|
758
|
+
export const AllSizes: Story = {
|
|
759
|
+
parameters: {
|
|
760
|
+
layout: 'centered',
|
|
761
|
+
docs: {
|
|
762
|
+
description: {
|
|
763
|
+
story: 'Button sizes following Carbon Design System specifications. Medium is the default size.',
|
|
764
|
+
},
|
|
765
|
+
},
|
|
766
|
+
},
|
|
767
|
+
render: () => html`
|
|
768
|
+
<div style="display: flex; flex-direction: column; gap: 2rem; align-items: flex-start;">
|
|
769
|
+
<div style="display: flex; gap: 1rem; align-items: center;">
|
|
770
|
+
<nr-button type="primary" size="small">Small (32px)</nr-button>
|
|
771
|
+
<span style="font-size: 0.875rem; color: #6f6f6f;">Use when vertical space is limited or in areas with a confined layout</span>
|
|
772
|
+
</div>
|
|
773
|
+
<div style="display: flex; gap: 1rem; align-items: center;">
|
|
774
|
+
<nr-button type="primary" size="medium">Medium (40px)</nr-button>
|
|
775
|
+
<span style="font-size: 0.875rem; color: #6f6f6f;">Default size - most common button size in software products</span>
|
|
776
|
+
</div>
|
|
777
|
+
<div style="display: flex; gap: 1rem; align-items: center;">
|
|
778
|
+
<nr-button type="primary" size="large">Large (48px)</nr-button>
|
|
779
|
+
<span style="font-size: 0.875rem; color: #6f6f6f;">Use for mobile interfaces and when buttons need more prominence</span>
|
|
780
|
+
</div>
|
|
781
|
+
</div>
|
|
782
|
+
`,
|
|
783
|
+
};
|
|
784
|
+
|
|
785
|
+
/**
|
|
786
|
+
* ## Button States
|
|
787
|
+
*
|
|
788
|
+
* Buttons can exist in different states to provide feedback and prevent unwanted interactions.
|
|
789
|
+
* Use appropriate states to enhance user experience and provide clear feedback.
|
|
790
|
+
*/
|
|
791
|
+
export const AllStates: Story = {
|
|
792
|
+
parameters: {
|
|
793
|
+
layout: 'centered',
|
|
794
|
+
docs: {
|
|
795
|
+
description: {
|
|
796
|
+
story: 'Different button states for various interaction scenarios.',
|
|
797
|
+
},
|
|
798
|
+
},
|
|
799
|
+
},
|
|
800
|
+
render: () => html`
|
|
801
|
+
<div style="display: flex; flex-direction: column; gap: 1.5rem; align-items: center;">
|
|
802
|
+
<div style="display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;">
|
|
803
|
+
<nr-button type="primary">Normal</nr-button>
|
|
804
|
+
<span style="font-size: 0.875rem; color: #6f6f6f;">Default interactive state</span>
|
|
805
|
+
</div>
|
|
806
|
+
<div style="display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;">
|
|
807
|
+
<nr-button type="primary" disabled>Disabled</nr-button>
|
|
808
|
+
<span style="font-size: 0.875rem; color: #6f6f6f;">Cannot be interacted with</span>
|
|
809
|
+
</div>
|
|
810
|
+
<div style="display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;">
|
|
811
|
+
<nr-button type="primary" loading>Loading</nr-button>
|
|
812
|
+
<span style="font-size: 0.875rem; color: #6f6f6f;">Processing state with spinner</span>
|
|
813
|
+
</div>
|
|
814
|
+
</div>
|
|
815
|
+
`,
|
|
816
|
+
};
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* ## Layout and Shapes
|
|
820
|
+
*
|
|
821
|
+
* Buttons can be configured for different layout needs and visual styles.
|
|
822
|
+
* Choose appropriate shapes and layouts based on your design requirements.
|
|
823
|
+
*/
|
|
824
|
+
export const LayoutVariations: Story = {
|
|
825
|
+
parameters: {
|
|
826
|
+
layout: 'centered',
|
|
827
|
+
docs: {
|
|
828
|
+
description: {
|
|
829
|
+
story: 'Different button layouts and shapes for various design contexts.',
|
|
830
|
+
},
|
|
831
|
+
},
|
|
832
|
+
},
|
|
833
|
+
render: () => html`
|
|
834
|
+
<div style="display: flex; flex-direction: column; gap: 2rem; align-items: center;">
|
|
835
|
+
<div>
|
|
836
|
+
<h4 style="margin: 0 0 0.5rem 0; font-size: 1rem;">Block buttons (full width):</h4>
|
|
837
|
+
<div style="width: 300px;">
|
|
838
|
+
<nr-button type="primary" block>Block Primary Button</nr-button>
|
|
839
|
+
<br><br>
|
|
840
|
+
<nr-button type="secondary" block>Block Secondary Button</nr-button>
|
|
841
|
+
</div>
|
|
842
|
+
</div>
|
|
843
|
+
<div>
|
|
844
|
+
<h4 style="margin: 0 0 0.5rem 0; font-size: 1rem;">Button shapes:</h4>
|
|
845
|
+
<div style="display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;">
|
|
846
|
+
<nr-button type="primary" shape="default">Default</nr-button>
|
|
847
|
+
<nr-button type="primary" shape="round">Round</nr-button>
|
|
848
|
+
<nr-button type="primary" shape="circle" .icon="${['plus']}" button-aria-label="Add"></nr-button>
|
|
849
|
+
</div>
|
|
850
|
+
</div>
|
|
851
|
+
<div>
|
|
852
|
+
<h4 style="margin: 0 0 0.5rem 0; font-size: 1rem;">Dashed border style:</h4>
|
|
853
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap;">
|
|
854
|
+
<nr-button type="primary" dashed>Dashed Primary</nr-button>
|
|
855
|
+
<nr-button type="secondary" dashed>Dashed Secondary</nr-button>
|
|
856
|
+
<nr-button type="default" dashed>Dashed Default</nr-button>
|
|
857
|
+
</div>
|
|
858
|
+
</div>
|
|
859
|
+
</div>
|
|
860
|
+
`,
|
|
861
|
+
};
|