@nuraly/lumenui 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/LICENSE +28 -0
- package/README.md +248 -0
- package/dist/nuralyui.bundle.js +29209 -0
- package/dist/nuralyui.bundle.js.gz +0 -0
- package/dist/src/components/alert/alert.component.d.ts +103 -0
- package/dist/src/components/alert/alert.component.js +225 -0
- package/dist/src/components/alert/alert.style.d.ts +14 -0
- package/dist/src/components/alert/alert.style.js +191 -0
- package/dist/src/components/alert/alert.types.d.ts +46 -0
- package/dist/src/components/alert/alert.types.js +7 -0
- package/dist/src/components/alert/bundle.js +231 -0
- package/dist/src/components/alert/bundle.js.gz +0 -0
- package/dist/src/components/alert/index.d.ts +8 -0
- package/dist/src/components/alert/index.js +8 -0
- package/dist/src/components/alert/react.d.ts +5 -0
- package/dist/src/components/alert/react.js +17 -0
- package/dist/src/components/badge/badge.component.d.ts +148 -0
- package/dist/src/components/badge/badge.component.js +270 -0
- package/dist/src/components/badge/badge.style.d.ts +14 -0
- package/dist/src/components/badge/badge.style.js +250 -0
- package/dist/src/components/badge/badge.types.d.ts +84 -0
- package/dist/src/components/badge/badge.types.js +7 -0
- package/dist/src/components/badge/bundle.js +277 -0
- package/dist/src/components/badge/bundle.js.gz +0 -0
- package/dist/src/components/badge/index.d.ts +2 -0
- package/dist/src/components/badge/index.js +2 -0
- package/dist/src/components/badge/react.d.ts +3 -0
- package/dist/src/components/badge/react.js +10 -0
- package/dist/src/components/breadcrumb/breadcrumb.component.d.ts +121 -0
- package/dist/src/components/breadcrumb/breadcrumb.component.js +257 -0
- package/dist/src/components/breadcrumb/breadcrumb.style.d.ts +14 -0
- package/dist/src/components/breadcrumb/breadcrumb.style.js +153 -0
- package/dist/src/components/breadcrumb/breadcrumb.types.d.ts +63 -0
- package/dist/src/components/breadcrumb/breadcrumb.types.js +7 -0
- package/dist/src/components/breadcrumb/bundle.js +213 -0
- package/dist/src/components/breadcrumb/bundle.js.gz +0 -0
- package/dist/src/components/breadcrumb/index.d.ts +2 -0
- package/dist/src/components/breadcrumb/index.js +2 -0
- package/dist/src/components/breadcrumb/react.d.ts +5 -0
- package/dist/src/components/breadcrumb/react.js +12 -0
- package/dist/src/components/button/bundle.js +606 -0
- package/dist/src/components/button/bundle.js.gz +0 -0
- package/dist/src/components/button/button.component.d.ts +96 -0
- package/dist/src/components/button/button.component.js +312 -0
- package/dist/src/components/button/button.style.d.ts +10 -0
- package/dist/src/components/button/button.style.js +535 -0
- package/dist/src/components/button/button.types.d.ts +57 -0
- package/dist/src/components/button/button.types.js +2 -0
- package/dist/src/components/button/index.d.ts +2 -0
- package/dist/src/components/button/index.js +2 -0
- package/dist/src/components/button/react.d.ts +5 -0
- package/dist/src/components/button/react.js +12 -0
- package/dist/src/components/canvas/base-canvas.component.d.ts +177 -0
- package/dist/src/components/canvas/base-canvas.component.js +865 -0
- package/dist/src/components/canvas/bundle.js +16664 -0
- package/dist/src/components/canvas/bundle.js.gz +0 -0
- package/dist/src/components/canvas/canvas.component.d.ts +2 -0
- package/dist/src/components/canvas/canvas.component.js +295 -0
- package/dist/src/components/canvas/canvas.constants.d.ts +66 -0
- package/dist/src/components/canvas/canvas.constants.js +61 -0
- package/dist/src/components/canvas/chatbot-panel.style.d.ts +11 -0
- package/dist/src/components/canvas/chatbot-panel.style.js +189 -0
- package/dist/src/components/canvas/index.d.ts +13 -0
- package/dist/src/components/canvas/index.js +21 -0
- package/dist/src/components/canvas/react.d.ts +354 -0
- package/dist/src/components/canvas/react.js +41 -0
- package/dist/src/components/canvas/whiteboard-canvas.component.d.ts +63 -0
- package/dist/src/components/canvas/whiteboard-canvas.component.js +356 -0
- package/dist/src/components/canvas/whiteboard-canvas.style.d.ts +7 -0
- package/dist/src/components/canvas/whiteboard-canvas.style.js +1011 -0
- package/dist/src/components/canvas/whiteboard-node.component.d.ts +87 -0
- package/dist/src/components/canvas/whiteboard-node.component.js +809 -0
- package/dist/src/components/canvas/whiteboard-node.style.d.ts +7 -0
- package/dist/src/components/canvas/whiteboard-node.style.js +775 -0
- package/dist/src/components/canvas/workflow-canvas.component.d.ts +150 -0
- package/dist/src/components/canvas/workflow-canvas.component.js +1468 -0
- package/dist/src/components/canvas/workflow-canvas.style.d.ts +8 -0
- package/dist/src/components/canvas/workflow-canvas.style.js +2903 -0
- package/dist/src/components/canvas/workflow-canvas.types.d.ts +710 -0
- package/dist/src/components/canvas/workflow-canvas.types.js +2305 -0
- package/dist/src/components/canvas/workflow-node.component.d.ts +96 -0
- package/dist/src/components/canvas/workflow-node.component.js +752 -0
- package/dist/src/components/canvas/workflow-node.style.d.ts +8 -0
- package/dist/src/components/canvas/workflow-node.style.js +1053 -0
- package/dist/src/components/card/bundle.js +69 -0
- package/dist/src/components/card/bundle.js.gz +0 -0
- package/dist/src/components/card/card.component.d.ts +30 -0
- package/dist/src/components/card/card.component.js +64 -0
- package/dist/src/components/card/card.style.d.ts +2 -0
- package/dist/src/components/card/card.style.js +62 -0
- package/dist/src/components/card/card.types.d.ts +17 -0
- package/dist/src/components/card/card.types.js +2 -0
- package/dist/src/components/card/index.d.ts +3 -0
- package/dist/src/components/card/index.js +3 -0
- package/dist/src/components/card/react.d.ts +5 -0
- package/dist/src/components/card/react.js +12 -0
- package/dist/src/components/carousel/bundle.js +96 -0
- package/dist/src/components/carousel/bundle.js.gz +0 -0
- package/dist/src/components/carousel/carousel.component.d.ts +19 -0
- package/dist/src/components/carousel/carousel.component.js +128 -0
- package/dist/src/components/carousel/carousel.style.d.ts +2 -0
- package/dist/src/components/carousel/carousel.style.js +68 -0
- package/dist/src/components/carousel/index.d.ts +2 -0
- package/dist/src/components/carousel/index.js +2 -0
- package/dist/src/components/carousel/react.d.ts +5 -0
- package/dist/src/components/carousel/react.js +12 -0
- package/dist/src/components/chatbot/bundle.js +2527 -0
- package/dist/src/components/chatbot/bundle.js.gz +0 -0
- package/dist/src/components/chatbot/chatbot.component.d.ts +215 -0
- package/dist/src/components/chatbot/chatbot.component.js +1097 -0
- package/dist/src/components/chatbot/chatbot.style.d.ts +3 -0
- package/dist/src/components/chatbot/chatbot.style.js +1638 -0
- package/dist/src/components/chatbot/chatbot.types.d.ts +246 -0
- package/dist/src/components/chatbot/chatbot.types.js +124 -0
- package/dist/src/components/chatbot/index.d.ts +13 -0
- package/dist/src/components/chatbot/index.js +20 -0
- package/dist/src/components/chatbot/react.d.ts +54 -0
- package/dist/src/components/chatbot/react.js +55 -0
- package/dist/src/components/checkbox/bundle.js +352 -0
- package/dist/src/components/checkbox/bundle.js.gz +0 -0
- package/dist/src/components/checkbox/checkbox.component.d.ts +62 -0
- package/dist/src/components/checkbox/checkbox.component.js +178 -0
- package/dist/src/components/checkbox/checkbox.style.d.ts +2 -0
- package/dist/src/components/checkbox/checkbox.style.js +323 -0
- package/dist/src/components/checkbox/checkbox.types.d.ts +6 -0
- package/dist/src/components/checkbox/checkbox.types.js +2 -0
- package/dist/src/components/checkbox/index.d.ts +2 -0
- package/dist/src/components/checkbox/index.js +2 -0
- package/dist/src/components/checkbox/react.d.ts +5 -0
- package/dist/src/components/checkbox/react.js +12 -0
- package/dist/src/components/code-editor/bundle.js +55 -0
- package/dist/src/components/code-editor/bundle.js.gz +0 -0
- package/dist/src/components/code-editor/code-editor.component.d.ts +119 -0
- package/dist/src/components/code-editor/code-editor.component.js +532 -0
- package/dist/src/components/code-editor/code-editor.style.d.ts +7 -0
- package/dist/src/components/code-editor/code-editor.style.js +39 -0
- package/dist/src/components/code-editor/code-editor.types.d.ts +39 -0
- package/dist/src/components/code-editor/code-editor.types.js +22 -0
- package/dist/src/components/code-editor/index.d.ts +9 -0
- package/dist/src/components/code-editor/index.js +9 -0
- package/dist/src/components/collapse/bundle.js +308 -0
- package/dist/src/components/collapse/bundle.js.gz +0 -0
- package/dist/src/components/collapse/collapse.component.d.ts +93 -0
- package/dist/src/components/collapse/collapse.component.js +322 -0
- package/dist/src/components/collapse/collapse.style.d.ts +11 -0
- package/dist/src/components/collapse/collapse.style.js +234 -0
- package/dist/src/components/collapse/collapse.type.d.ts +79 -0
- package/dist/src/components/collapse/collapse.type.js +11 -0
- package/dist/src/components/collapse/index.d.ts +2 -0
- package/dist/src/components/collapse/index.js +2 -0
- package/dist/src/components/collapse/react.d.ts +6 -0
- package/dist/src/components/collapse/react.js +13 -0
- package/dist/src/components/colorpicker/bundle.js +242 -0
- package/dist/src/components/colorpicker/bundle.js.gz +0 -0
- package/dist/src/components/colorpicker/color-holder.component.d.ts +50 -0
- package/dist/src/components/colorpicker/color-holder.component.js +116 -0
- package/dist/src/components/colorpicker/color-holder.style.d.ts +2 -0
- package/dist/src/components/colorpicker/color-holder.style.js +45 -0
- package/dist/src/components/colorpicker/color-picker.component.d.ts +178 -0
- package/dist/src/components/colorpicker/color-picker.component.js +374 -0
- package/dist/src/components/colorpicker/color-picker.style.d.ts +10 -0
- package/dist/src/components/colorpicker/color-picker.style.js +86 -0
- package/dist/src/components/colorpicker/color-picker.types.d.ts +60 -0
- package/dist/src/components/colorpicker/color-picker.types.js +2 -0
- package/dist/src/components/colorpicker/default-color-sets.component.d.ts +45 -0
- package/dist/src/components/colorpicker/default-color-sets.component.js +121 -0
- package/dist/src/components/colorpicker/default-color-sets.style.d.ts +2 -0
- package/dist/src/components/colorpicker/default-color-sets.style.js +34 -0
- package/dist/src/components/colorpicker/index.d.ts +3 -0
- package/dist/src/components/colorpicker/index.js +3 -0
- package/dist/src/components/colorpicker/react.d.ts +6 -0
- package/dist/src/components/colorpicker/react.js +13 -0
- package/dist/src/components/console/react.d.ts +340 -0
- package/dist/src/components/console/react.js +13 -0
- package/dist/src/components/container/bundle.js +161 -0
- package/dist/src/components/container/bundle.js.gz +0 -0
- package/dist/src/components/container/container.component.d.ts +85 -0
- package/dist/src/components/container/container.component.js +223 -0
- package/dist/src/components/container/container.style.d.ts +6 -0
- package/dist/src/components/container/container.style.js +146 -0
- package/dist/src/components/container/container.types.d.ts +67 -0
- package/dist/src/components/container/container.types.js +5 -0
- package/dist/src/components/container/index.d.ts +3 -0
- package/dist/src/components/container/index.js +3 -0
- package/dist/src/components/container/react.d.ts +3 -0
- package/dist/src/components/container/react.js +10 -0
- package/dist/src/components/datepicker/bundle.js +706 -0
- package/dist/src/components/datepicker/bundle.js.gz +0 -0
- package/dist/src/components/datepicker/datepicker.component.d.ts +190 -0
- package/dist/src/components/datepicker/datepicker.component.js +673 -0
- package/dist/src/components/datepicker/datepicker.constant.d.ts +60 -0
- package/dist/src/components/datepicker/datepicker.constant.js +60 -0
- package/dist/src/components/datepicker/datepicker.style.d.ts +17 -0
- package/dist/src/components/datepicker/datepicker.style.js +453 -0
- package/dist/src/components/datepicker/datepicker.style.variables.d.ts +2 -0
- package/dist/src/components/datepicker/datepicker.style.variables.js +119 -0
- package/dist/src/components/datepicker/datepicker.types.d.ts +142 -0
- package/dist/src/components/datepicker/datepicker.types.js +75 -0
- package/dist/src/components/datepicker/index.d.ts +4 -0
- package/dist/src/components/datepicker/index.js +4 -0
- package/dist/src/components/datepicker/react.d.ts +16 -0
- package/dist/src/components/datepicker/react.js +23 -0
- package/dist/src/components/db-connection-select/bundle.js +308 -0
- package/dist/src/components/db-connection-select/bundle.js.gz +0 -0
- package/dist/src/components/db-connection-select/db-connection-select.component.d.ts +105 -0
- package/dist/src/components/db-connection-select/db-connection-select.component.js +573 -0
- package/dist/src/components/db-connection-select/index.d.ts +7 -0
- package/dist/src/components/db-connection-select/index.js +7 -0
- package/dist/src/components/divider/bundle.js +143 -0
- package/dist/src/components/divider/bundle.js.gz +0 -0
- package/dist/src/components/divider/divider.component.d.ts +90 -0
- package/dist/src/components/divider/divider.component.js +168 -0
- package/dist/src/components/divider/divider.style.d.ts +3 -0
- package/dist/src/components/divider/divider.style.js +139 -0
- package/dist/src/components/divider/divider.types.d.ts +55 -0
- package/dist/src/components/divider/divider.types.js +6 -0
- package/dist/src/components/divider/index.d.ts +3 -0
- package/dist/src/components/divider/index.js +3 -0
- package/dist/src/components/divider/react.d.ts +3 -0
- package/dist/src/components/divider/react.js +10 -0
- package/dist/src/components/document/bundle.js +242 -0
- package/dist/src/components/document/bundle.js.gz +0 -0
- package/dist/src/components/document/document.component.d.ts +27 -0
- package/dist/src/components/document/document.component.js +136 -0
- package/dist/src/components/document/document.style.d.ts +3 -0
- package/dist/src/components/document/document.style.js +210 -0
- package/dist/src/components/document/document.types.d.ts +68 -0
- package/dist/src/components/document/document.types.js +7 -0
- package/dist/src/components/document/index.d.ts +3 -0
- package/dist/src/components/document/index.js +3 -0
- package/dist/src/components/document/react.d.ts +8 -0
- package/dist/src/components/document/react.js +15 -0
- package/dist/src/components/dropdown/bundle.js +528 -0
- package/dist/src/components/dropdown/bundle.js.gz +0 -0
- package/dist/src/components/dropdown/dropdown.component.d.ts +120 -0
- package/dist/src/components/dropdown/dropdown.component.js +390 -0
- package/dist/src/components/dropdown/dropdown.style.d.ts +2 -0
- package/dist/src/components/dropdown/dropdown.style.js +460 -0
- package/dist/src/components/dropdown/dropdown.types.d.ts +99 -0
- package/dist/src/components/dropdown/dropdown.types.js +2 -0
- package/dist/src/components/dropdown/index.d.ts +3 -0
- package/dist/src/components/dropdown/index.js +3 -0
- package/dist/src/components/dropdown/react.d.ts +7 -0
- package/dist/src/components/dropdown/react.js +14 -0
- package/dist/src/components/file-upload/bundle.js +472 -0
- package/dist/src/components/file-upload/bundle.js.gz +0 -0
- package/dist/src/components/file-upload/file-upload.component.d.ts +43 -0
- package/dist/src/components/file-upload/file-upload.component.js +398 -0
- package/dist/src/components/file-upload/index.d.ts +2 -0
- package/dist/src/components/file-upload/index.js +2 -0
- package/dist/src/components/file-upload/react.d.ts +7 -0
- package/dist/src/components/file-upload/react.js +14 -0
- package/dist/src/components/file-upload/styles.d.ts +2 -0
- package/dist/src/components/file-upload/styles.js +373 -0
- package/dist/src/components/file-upload/types.d.ts +11 -0
- package/dist/src/components/file-upload/types.js +2 -0
- package/dist/src/components/file-upload/utils.d.ts +6 -0
- package/dist/src/components/file-upload/utils.js +24 -0
- package/dist/src/components/flex/bundle.js +114 -0
- package/dist/src/components/flex/bundle.js.gz +0 -0
- package/dist/src/components/flex/flex.component.d.ts +89 -0
- package/dist/src/components/flex/flex.component.js +178 -0
- package/dist/src/components/flex/flex.style.d.ts +6 -0
- package/dist/src/components/flex/flex.style.js +101 -0
- package/dist/src/components/flex/flex.types.d.ts +63 -0
- package/dist/src/components/flex/flex.types.js +5 -0
- package/dist/src/components/flex/index.d.ts +3 -0
- package/dist/src/components/flex/index.js +3 -0
- package/dist/src/components/flex/react.d.ts +3 -0
- package/dist/src/components/flex/react.js +10 -0
- package/dist/src/components/form/bundle.js +98 -0
- package/dist/src/components/form/bundle.js.gz +0 -0
- package/dist/src/components/form/form.component.d.ts +279 -0
- package/dist/src/components/form/form.component.js +644 -0
- package/dist/src/components/form/form.style.d.ts +7 -0
- package/dist/src/components/form/form.style.js +68 -0
- package/dist/src/components/form/form.types.d.ts +92 -0
- package/dist/src/components/form/form.types.js +38 -0
- package/dist/src/components/form/index.d.ts +10 -0
- package/dist/src/components/form/index.js +13 -0
- package/dist/src/components/grid/bundle.js +202 -0
- package/dist/src/components/grid/bundle.js.gz +0 -0
- package/dist/src/components/grid/col.component.d.ts +103 -0
- package/dist/src/components/grid/col.component.js +253 -0
- package/dist/src/components/grid/col.style.d.ts +6 -0
- package/dist/src/components/grid/col.style.js +117 -0
- package/dist/src/components/grid/grid.types.d.ts +80 -0
- package/dist/src/components/grid/grid.types.js +16 -0
- package/dist/src/components/grid/index.d.ts +4 -0
- package/dist/src/components/grid/index.js +4 -0
- package/dist/src/components/grid/react.d.ts +5 -0
- package/dist/src/components/grid/react.js +17 -0
- package/dist/src/components/grid/row.component.d.ts +83 -0
- package/dist/src/components/grid/row.component.js +197 -0
- package/dist/src/components/grid/row.style.d.ts +6 -0
- package/dist/src/components/grid/row.style.js +68 -0
- package/dist/src/components/icon/bundle.js +340 -0
- package/dist/src/components/icon/bundle.js.gz +0 -0
- package/dist/src/components/icon/icon.component.d.ts +64 -0
- package/dist/src/components/icon/icon.component.js +207 -0
- package/dist/src/components/icon/icon.style.d.ts +2 -0
- package/dist/src/components/icon/icon.style.js +211 -0
- package/dist/src/components/icon/icon.types.d.ts +5 -0
- package/dist/src/components/icon/icon.types.js +2 -0
- package/dist/src/components/icon/icon.variables.d.ts +17 -0
- package/dist/src/components/icon/icon.variables.js +132 -0
- package/dist/src/components/icon/index.d.ts +2 -0
- package/dist/src/components/icon/index.js +2 -0
- package/dist/src/components/icon/react.d.ts +3 -0
- package/dist/src/components/icon/react.js +9 -0
- package/dist/src/components/iconpicker/bundle.js +2811 -0
- package/dist/src/components/iconpicker/bundle.js.gz +0 -0
- package/dist/src/components/iconpicker/icon-picker.component.d.ts +119 -0
- package/dist/src/components/iconpicker/icon-picker.component.js +337 -0
- package/dist/src/components/iconpicker/icon-picker.constant.d.ts +15 -0
- package/dist/src/components/iconpicker/icon-picker.constant.js +31 -0
- package/dist/src/components/iconpicker/icon-picker.style.d.ts +8 -0
- package/dist/src/components/iconpicker/icon-picker.style.js +216 -0
- package/dist/src/components/iconpicker/icon-picker.types.d.ts +49 -0
- package/dist/src/components/iconpicker/icon-picker.types.js +7 -0
- package/dist/src/components/iconpicker/index.d.ts +9 -0
- package/dist/src/components/iconpicker/index.js +9 -0
- package/dist/src/components/iconpicker/react.d.ts +14 -0
- package/dist/src/components/iconpicker/react.js +21 -0
- package/dist/src/components/image/bundle.js +98 -0
- package/dist/src/components/image/bundle.js.gz +0 -0
- package/dist/src/components/image/image.component.d.ts +31 -0
- package/dist/src/components/image/image.component.js +143 -0
- package/dist/src/components/image/image.style.d.ts +3 -0
- package/dist/src/components/image/image.style.js +83 -0
- package/dist/src/components/image/image.types.d.ts +68 -0
- package/dist/src/components/image/image.types.js +7 -0
- package/dist/src/components/image/index.d.ts +3 -0
- package/dist/src/components/image/index.js +3 -0
- package/dist/src/components/image/react.d.ts +8 -0
- package/dist/src/components/image/react.js +15 -0
- package/dist/src/components/input/bundle.js +930 -0
- package/dist/src/components/input/bundle.js.gz +0 -0
- package/dist/src/components/input/index.d.ts +3 -0
- package/dist/src/components/input/index.js +3 -0
- package/dist/src/components/input/input.component.d.ts +174 -0
- package/dist/src/components/input/input.component.js +490 -0
- package/dist/src/components/input/input.style.d.ts +2 -0
- package/dist/src/components/input/input.style.js +810 -0
- package/dist/src/components/input/input.types.d.ts +127 -0
- package/dist/src/components/input/input.types.js +75 -0
- package/dist/src/components/input/react.d.ts +9 -0
- package/dist/src/components/input/react.js +16 -0
- package/dist/src/components/input/validation.d.ts +3 -0
- package/dist/src/components/input/validation.js +3 -0
- package/dist/src/components/kv-secret-select/bundle.js +183 -0
- package/dist/src/components/kv-secret-select/bundle.js.gz +0 -0
- package/dist/src/components/kv-secret-select/index.d.ts +2 -0
- package/dist/src/components/kv-secret-select/index.js +2 -0
- package/dist/src/components/kv-secret-select/kv-secret-select.component.d.ts +83 -0
- package/dist/src/components/kv-secret-select/kv-secret-select.component.js +360 -0
- package/dist/src/components/label/bundle.js +104 -0
- package/dist/src/components/label/bundle.js.gz +0 -0
- package/dist/src/components/label/index.d.ts +2 -0
- package/dist/src/components/label/index.js +2 -0
- package/dist/src/components/label/label.component.d.ts +18 -0
- package/dist/src/components/label/label.component.js +64 -0
- package/dist/src/components/label/label.style.d.ts +3 -0
- package/dist/src/components/label/label.style.js +70 -0
- package/dist/src/components/label/label.style.variables.d.ts +2 -0
- package/dist/src/components/label/label.style.variables.js +35 -0
- package/dist/src/components/label/label.types.d.ts +42 -0
- package/dist/src/components/label/label.types.js +2 -0
- package/dist/src/components/label/react.d.ts +339 -0
- package/dist/src/components/label/react.js +12 -0
- package/dist/src/components/layout/bundle.js +220 -0
- package/dist/src/components/layout/bundle.js.gz +0 -0
- package/dist/src/components/layout/content.component.d.ts +35 -0
- package/dist/src/components/layout/content.component.js +47 -0
- package/dist/src/components/layout/content.style.d.ts +2 -0
- package/dist/src/components/layout/content.style.js +17 -0
- package/dist/src/components/layout/footer.component.d.ts +38 -0
- package/dist/src/components/layout/footer.component.js +60 -0
- package/dist/src/components/layout/footer.style.d.ts +2 -0
- package/dist/src/components/layout/footer.style.js +17 -0
- package/dist/src/components/layout/header.component.d.ts +39 -0
- package/dist/src/components/layout/header.component.js +61 -0
- package/dist/src/components/layout/header.style.d.ts +2 -0
- package/dist/src/components/layout/header.style.js +19 -0
- package/dist/src/components/layout/index.d.ts +8 -0
- package/dist/src/components/layout/index.js +7 -0
- package/dist/src/components/layout/layout.component.d.ts +50 -0
- package/dist/src/components/layout/layout.component.js +89 -0
- package/dist/src/components/layout/layout.style.d.ts +2 -0
- package/dist/src/components/layout/layout.style.js +23 -0
- package/dist/src/components/layout/layout.types.d.ts +75 -0
- package/dist/src/components/layout/layout.types.js +12 -0
- package/dist/src/components/layout/react.d.ts +14 -0
- package/dist/src/components/layout/react.js +37 -0
- package/dist/src/components/layout/sider.component.d.ts +116 -0
- package/dist/src/components/layout/sider.component.js +273 -0
- package/dist/src/components/layout/sider.style.d.ts +2 -0
- package/dist/src/components/layout/sider.style.js +104 -0
- package/dist/src/components/menu/bundle.js +520 -0
- package/dist/src/components/menu/bundle.js.gz +0 -0
- package/dist/src/components/menu/index.d.ts +4 -0
- package/dist/src/components/menu/index.js +2 -0
- package/dist/src/components/menu/menu.component.d.ts +87 -0
- package/dist/src/components/menu/menu.component.js +596 -0
- package/dist/src/components/menu/menu.constants.d.ts +12 -0
- package/dist/src/components/menu/menu.constants.js +14 -0
- package/dist/src/components/menu/menu.style.d.ts +2 -0
- package/dist/src/components/menu/menu.style.js +372 -0
- package/dist/src/components/menu/menu.types.d.ts +66 -0
- package/dist/src/components/menu/menu.types.js +7 -0
- package/dist/src/components/menu/react.d.ts +5 -0
- package/dist/src/components/menu/react.js +12 -0
- package/dist/src/components/modal/bundle.js +442 -0
- package/dist/src/components/modal/bundle.js.gz +0 -0
- package/dist/src/components/modal/index.d.ts +10 -0
- package/dist/src/components/modal/index.js +10 -0
- package/dist/src/components/modal/modal-manager.d.ts +72 -0
- package/dist/src/components/modal/modal-manager.js +170 -0
- package/dist/src/components/modal/modal.component.d.ts +121 -0
- package/dist/src/components/modal/modal.component.js +461 -0
- package/dist/src/components/modal/modal.style.d.ts +9 -0
- package/dist/src/components/modal/modal.style.js +369 -0
- package/dist/src/components/modal/modal.types.d.ts +105 -0
- package/dist/src/components/modal/modal.types.js +93 -0
- package/dist/src/components/modal/react.d.ts +9 -0
- package/dist/src/components/modal/react.js +16 -0
- package/dist/src/components/panel/bundle.js +1075 -0
- package/dist/src/components/panel/bundle.js.gz +0 -0
- package/dist/src/components/panel/index.d.ts +9 -0
- package/dist/src/components/panel/index.js +9 -0
- package/dist/src/components/panel/panel.component.d.ts +199 -0
- package/dist/src/components/panel/panel.component.js +720 -0
- package/dist/src/components/panel/panel.style.d.ts +7 -0
- package/dist/src/components/panel/panel.style.js +497 -0
- package/dist/src/components/panel/panel.types.d.ts +94 -0
- package/dist/src/components/panel/panel.types.js +50 -0
- package/dist/src/components/panel/react.d.ts +11 -0
- package/dist/src/components/panel/react.js +18 -0
- package/dist/src/components/popconfirm/bundle.js +438 -0
- package/dist/src/components/popconfirm/bundle.js.gz +0 -0
- package/dist/src/components/popconfirm/index.d.ts +4 -0
- package/dist/src/components/popconfirm/index.js +4 -0
- package/dist/src/components/popconfirm/popconfirm-manager.component.d.ts +129 -0
- package/dist/src/components/popconfirm/popconfirm-manager.component.js +372 -0
- package/dist/src/components/popconfirm/popconfirm-manager.style.d.ts +2 -0
- package/dist/src/components/popconfirm/popconfirm-manager.style.js +137 -0
- package/dist/src/components/popconfirm/popconfirm.component.d.ts +179 -0
- package/dist/src/components/popconfirm/popconfirm.component.js +409 -0
- package/dist/src/components/popconfirm/popconfirm.style.d.ts +2 -0
- package/dist/src/components/popconfirm/popconfirm.style.js +207 -0
- package/dist/src/components/popconfirm/popconfirm.types.d.ts +104 -0
- package/dist/src/components/popconfirm/popconfirm.types.js +2 -0
- package/dist/src/components/popconfirm/react.d.ts +7 -0
- package/dist/src/components/popconfirm/react.js +14 -0
- package/dist/src/components/radio/bundle.js +180 -0
- package/dist/src/components/radio/bundle.js.gz +0 -0
- package/dist/src/components/radio/index.d.ts +3 -0
- package/dist/src/components/radio/index.js +3 -0
- package/dist/src/components/radio/radio.component.d.ts +70 -0
- package/dist/src/components/radio/radio.component.js +187 -0
- package/dist/src/components/radio/radio.style.d.ts +7 -0
- package/dist/src/components/radio/radio.style.js +149 -0
- package/dist/src/components/radio/radio.types.d.ts +14 -0
- package/dist/src/components/radio/radio.types.js +15 -0
- package/dist/src/components/radio/react.d.ts +12 -0
- package/dist/src/components/radio/react.js +19 -0
- package/dist/src/components/radio-group/bundle.js +430 -0
- package/dist/src/components/radio-group/bundle.js.gz +0 -0
- package/dist/src/components/radio-group/index.d.ts +3 -0
- package/dist/src/components/radio-group/index.js +3 -0
- package/dist/src/components/radio-group/radio-group.component.d.ts +165 -0
- package/dist/src/components/radio-group/radio-group.component.js +437 -0
- package/dist/src/components/radio-group/radio-group.style.d.ts +7 -0
- package/dist/src/components/radio-group/radio-group.style.js +270 -0
- package/dist/src/components/radio-group/radio-group.types.d.ts +39 -0
- package/dist/src/components/radio-group/radio-group.types.js +29 -0
- package/dist/src/components/radio-group/radio.constant.d.ts +2 -0
- package/dist/src/components/radio-group/radio.constant.js +2 -0
- package/dist/src/components/radio-group/react.d.ts +10 -0
- package/dist/src/components/radio-group/react.js +17 -0
- package/dist/src/components/select/bundle.js +721 -0
- package/dist/src/components/select/bundle.js.gz +0 -0
- package/dist/src/components/select/index.d.ts +17 -0
- package/dist/src/components/select/index.js +20 -0
- package/dist/src/components/select/react.d.ts +19 -0
- package/dist/src/components/select/react.js +26 -0
- package/dist/src/components/select/select.component.d.ts +359 -0
- package/dist/src/components/select/select.component.js +775 -0
- package/dist/src/components/select/select.constant.d.ts +133 -0
- package/dist/src/components/select/select.constant.js +136 -0
- package/dist/src/components/select/select.style.d.ts +2 -0
- package/dist/src/components/select/select.style.js +533 -0
- package/dist/src/components/select/select.types.d.ts +100 -0
- package/dist/src/components/select/select.types.js +73 -0
- package/dist/src/components/skeleton/bundle.js +293 -0
- package/dist/src/components/skeleton/bundle.js.gz +0 -0
- package/dist/src/components/skeleton/index.d.ts +3 -0
- package/dist/src/components/skeleton/index.js +3 -0
- package/dist/src/components/skeleton/react.d.ts +3 -0
- package/dist/src/components/skeleton/react.js +10 -0
- package/dist/src/components/skeleton/skeleton.component.d.ts +165 -0
- package/dist/src/components/skeleton/skeleton.component.js +387 -0
- package/dist/src/components/skeleton/skeleton.style.d.ts +2 -0
- package/dist/src/components/skeleton/skeleton.style.js +224 -0
- package/dist/src/components/skeleton/skeleton.types.d.ts +82 -0
- package/dist/src/components/skeleton/skeleton.types.js +2 -0
- package/dist/src/components/slider-input/bundle.js +241 -0
- package/dist/src/components/slider-input/bundle.js.gz +0 -0
- package/dist/src/components/slider-input/index.d.ts +3 -0
- package/dist/src/components/slider-input/index.js +3 -0
- package/dist/src/components/slider-input/react.d.ts +340 -0
- package/dist/src/components/slider-input/react.js +13 -0
- package/dist/src/components/slider-input/slider-input.component.d.ts +38 -0
- package/dist/src/components/slider-input/slider-input.component.js +191 -0
- package/dist/src/components/slider-input/slider-input.style.d.ts +3 -0
- package/dist/src/components/slider-input/slider-input.style.js +171 -0
- package/dist/src/components/slider-input/slider-input.style.variables.d.ts +2 -0
- package/dist/src/components/slider-input/slider-input.style.variables.js +59 -0
- package/dist/src/components/slider-input/slider-input.types.d.ts +21 -0
- package/dist/src/components/slider-input/slider-input.types.js +6 -0
- package/dist/src/components/table/bundle.js +987 -0
- package/dist/src/components/table/bundle.js.gz +0 -0
- package/dist/src/components/table/index.d.ts +2 -0
- package/dist/src/components/table/index.js +2 -0
- package/dist/src/components/table/react.d.ts +7 -0
- package/dist/src/components/table/react.js +14 -0
- package/dist/src/components/table/table.component.d.ts +140 -0
- package/dist/src/components/table/table.component.js +433 -0
- package/dist/src/components/table/table.style.d.ts +3 -0
- package/dist/src/components/table/table.style.js +702 -0
- package/dist/src/components/table/table.types.d.ts +103 -0
- package/dist/src/components/table/table.types.js +2 -0
- package/dist/src/components/tabs/bundle.js +1782 -0
- package/dist/src/components/tabs/bundle.js.gz +0 -0
- package/dist/src/components/tabs/index.d.ts +9 -0
- package/dist/src/components/tabs/index.js +10 -0
- package/dist/src/components/tabs/react.d.ts +50 -0
- package/dist/src/components/tabs/react.js +50 -0
- package/dist/src/components/tabs/tabs.component.d.ts +100 -0
- package/dist/src/components/tabs/tabs.component.js +461 -0
- package/dist/src/components/tabs/tabs.constant.d.ts +20 -0
- package/dist/src/components/tabs/tabs.constant.js +21 -0
- package/dist/src/components/tabs/tabs.style.d.ts +9 -0
- package/dist/src/components/tabs/tabs.style.js +577 -0
- package/dist/src/components/tabs/tabs.types.d.ts +241 -0
- package/dist/src/components/tabs/tabs.types.js +13 -0
- package/dist/src/components/tag/bundle.js +108 -0
- package/dist/src/components/tag/bundle.js.gz +0 -0
- package/dist/src/components/tag/index.d.ts +2 -0
- package/dist/src/components/tag/index.js +2 -0
- package/dist/src/components/tag/react.d.ts +6 -0
- package/dist/src/components/tag/react.js +13 -0
- package/dist/src/components/tag/tag.component.d.ts +57 -0
- package/dist/src/components/tag/tag.component.js +157 -0
- package/dist/src/components/tag/tag.style.d.ts +7 -0
- package/dist/src/components/tag/tag.style.js +88 -0
- package/dist/src/components/tag/tag.types.d.ts +28 -0
- package/dist/src/components/tag/tag.types.js +7 -0
- package/dist/src/components/textarea/bundle.js +404 -0
- package/dist/src/components/textarea/bundle.js.gz +0 -0
- package/dist/src/components/textarea/index.d.ts +8 -0
- package/dist/src/components/textarea/index.js +7 -0
- package/dist/src/components/textarea/react.d.ts +9 -0
- package/dist/src/components/textarea/react.js +16 -0
- package/dist/src/components/textarea/textarea.component.d.ts +203 -0
- package/dist/src/components/textarea/textarea.component.js +657 -0
- package/dist/src/components/textarea/textarea.style.d.ts +59 -0
- package/dist/src/components/textarea/textarea.style.js +386 -0
- package/dist/src/components/textarea/textarea.types.d.ts +102 -0
- package/dist/src/components/textarea/textarea.types.js +14 -0
- package/dist/src/components/timeline/bundle.js +261 -0
- package/dist/src/components/timeline/bundle.js.gz +0 -0
- package/dist/src/components/timeline/index.d.ts +2 -0
- package/dist/src/components/timeline/index.js +2 -0
- package/dist/src/components/timeline/react.d.ts +3 -0
- package/dist/src/components/timeline/react.js +10 -0
- package/dist/src/components/timeline/timeline.component.d.ts +109 -0
- package/dist/src/components/timeline/timeline.component.js +214 -0
- package/dist/src/components/timeline/timeline.style.d.ts +14 -0
- package/dist/src/components/timeline/timeline.style.js +234 -0
- package/dist/src/components/timeline/timeline.types.d.ts +62 -0
- package/dist/src/components/timeline/timeline.types.js +7 -0
- package/dist/src/components/timepicker/bundle.js +810 -0
- package/dist/src/components/timepicker/bundle.js.gz +0 -0
- package/dist/src/components/timepicker/index.d.ts +12 -0
- package/dist/src/components/timepicker/index.js +12 -0
- package/dist/src/components/timepicker/timepicker.component.d.ts +115 -0
- package/dist/src/components/timepicker/timepicker.component.js +743 -0
- package/dist/src/components/timepicker/timepicker.constants.d.ts +85 -0
- package/dist/src/components/timepicker/timepicker.constants.js +85 -0
- package/dist/src/components/timepicker/timepicker.style.d.ts +7 -0
- package/dist/src/components/timepicker/timepicker.style.js +568 -0
- package/dist/src/components/timepicker/timepicker.style.variables.d.ts +2 -0
- package/dist/src/components/timepicker/timepicker.style.variables.js +122 -0
- package/dist/src/components/timepicker/timepicker.types.d.ts +161 -0
- package/dist/src/components/timepicker/timepicker.types.js +125 -0
- package/dist/src/components/toast/bundle.js +393 -0
- package/dist/src/components/toast/bundle.js.gz +0 -0
- package/dist/src/components/toast/index.d.ts +9 -0
- package/dist/src/components/toast/index.js +9 -0
- package/dist/src/components/toast/react.d.ts +7 -0
- package/dist/src/components/toast/react.js +19 -0
- package/dist/src/components/toast/toast.component.d.ts +152 -0
- package/dist/src/components/toast/toast.component.js +368 -0
- package/dist/src/components/toast/toast.style.d.ts +14 -0
- package/dist/src/components/toast/toast.style.js +338 -0
- package/dist/src/components/toast/toast.types.d.ts +124 -0
- package/dist/src/components/toast/toast.types.js +9 -0
- package/dist/src/components/tooltips/bundle.js +123 -0
- package/dist/src/components/tooltips/bundle.js.gz +0 -0
- package/dist/src/components/tooltips/index.d.ts +2 -0
- package/dist/src/components/tooltips/index.js +2 -0
- package/dist/src/components/tooltips/react.d.ts +1 -0
- package/dist/src/components/tooltips/react.js +2 -0
- package/dist/src/components/tooltips/tooltips.component.d.ts +33 -0
- package/dist/src/components/tooltips/tooltips.component.js +313 -0
- package/dist/src/components/tooltips/tooltips.constant.d.ts +13 -0
- package/dist/src/components/tooltips/tooltips.constant.js +15 -0
- package/dist/src/components/tooltips/tooltips.style.d.ts +2 -0
- package/dist/src/components/tooltips/tooltips.style.js +103 -0
- package/dist/src/components/tooltips/tooltips.variables.d.ts +2 -0
- package/dist/src/components/tooltips/tooltips.variables.js +14 -0
- package/dist/src/components/video/bundle.js +171 -0
- package/dist/src/components/video/bundle.js.gz +0 -0
- package/dist/src/components/video/index.d.ts +3 -0
- package/dist/src/components/video/index.js +3 -0
- package/dist/src/components/video/react.d.ts +10 -0
- package/dist/src/components/video/react.js +17 -0
- package/dist/src/components/video/video.component.d.ts +34 -0
- package/dist/src/components/video/video.component.js +184 -0
- package/dist/src/components/video/video.style.d.ts +3 -0
- package/dist/src/components/video/video.style.js +124 -0
- package/dist/src/components/video/video.types.d.ts +80 -0
- package/dist/src/components/video/video.types.js +7 -0
- package/package.json +215 -0
- package/packages/common/README.md +137 -0
- package/packages/common/dist/LICENSE +28 -0
- package/packages/common/dist/README.md +137 -0
- package/packages/common/dist/VERSIONS.md +4 -0
- package/packages/common/dist/constants/index.d.ts +2 -0
- package/packages/common/dist/constants/index.d.ts.map +1 -0
- package/packages/common/dist/constants/index.js +2 -0
- package/packages/common/dist/constants/index.js.map +1 -0
- package/packages/common/dist/constants.d.ts +17 -0
- package/packages/common/dist/constants.d.ts.map +1 -0
- package/packages/common/dist/constants.js +7 -0
- package/packages/common/dist/constants.js.map +1 -0
- package/packages/common/dist/controllers/index.d.ts +2 -0
- package/packages/common/dist/controllers/index.d.ts.map +1 -0
- package/packages/common/dist/controllers/index.js +2 -0
- package/packages/common/dist/controllers/index.js.map +1 -0
- package/packages/common/dist/controllers.d.ts +21 -0
- package/packages/common/dist/controllers.d.ts.map +1 -0
- package/packages/common/dist/controllers.js +22 -0
- package/packages/common/dist/controllers.js.map +1 -0
- package/packages/common/dist/index.d.ts +25 -0
- package/packages/common/dist/index.d.ts.map +1 -0
- package/packages/common/dist/index.js +27 -0
- package/packages/common/dist/index.js.map +1 -0
- package/packages/common/dist/mixins/index.d.ts +2 -0
- package/packages/common/dist/mixins/index.d.ts.map +1 -0
- package/packages/common/dist/mixins/index.js +3 -0
- package/packages/common/dist/mixins/index.js.map +1 -0
- package/packages/common/dist/mixins.d.ts +26 -0
- package/packages/common/dist/mixins.d.ts.map +1 -0
- package/packages/common/dist/mixins.js +29 -0
- package/packages/common/dist/mixins.js.map +1 -0
- package/packages/common/dist/shared/base-mixin.d.ts +42 -0
- package/packages/common/dist/shared/base-mixin.d.ts.map +1 -0
- package/packages/common/dist/shared/base-mixin.js +38 -0
- package/packages/common/dist/shared/base-mixin.js.map +1 -0
- package/packages/common/dist/shared/constants.d.ts +1 -0
- package/packages/common/dist/shared/constants.d.ts.map +1 -0
- package/packages/common/dist/shared/constants.js +2 -0
- package/packages/common/dist/shared/constants.js.map +1 -0
- package/packages/common/dist/shared/controllers/base-validation.controller.d.ts +81 -0
- package/packages/common/dist/shared/controllers/base-validation.controller.d.ts.map +1 -0
- package/packages/common/dist/shared/controllers/base-validation.controller.js +104 -0
- package/packages/common/dist/shared/controllers/base-validation.controller.js.map +1 -0
- package/packages/common/dist/shared/controllers/base.controller.d.ts +76 -0
- package/packages/common/dist/shared/controllers/base.controller.d.ts.map +1 -0
- package/packages/common/dist/shared/controllers/base.controller.js +129 -0
- package/packages/common/dist/shared/controllers/base.controller.js.map +1 -0
- package/packages/common/dist/shared/controllers/dropdown.controller.d.ts +77 -0
- package/packages/common/dist/shared/controllers/dropdown.controller.d.ts.map +1 -0
- package/packages/common/dist/shared/controllers/dropdown.controller.js +341 -0
- package/packages/common/dist/shared/controllers/dropdown.controller.js.map +1 -0
- package/packages/common/dist/shared/controllers/dropdown.interface.d.ts +37 -0
- package/packages/common/dist/shared/controllers/dropdown.interface.d.ts.map +1 -0
- package/packages/common/dist/shared/controllers/dropdown.interface.js +2 -0
- package/packages/common/dist/shared/controllers/dropdown.interface.js.map +1 -0
- package/packages/common/dist/shared/controllers/index.d.ts +6 -0
- package/packages/common/dist/shared/controllers/index.d.ts.map +1 -0
- package/packages/common/dist/shared/controllers/index.js +6 -0
- package/packages/common/dist/shared/controllers/index.js.map +1 -0
- package/packages/common/dist/shared/controllers/theme.controller.d.ts +48 -0
- package/packages/common/dist/shared/controllers/theme.controller.d.ts.map +1 -0
- package/packages/common/dist/shared/controllers/theme.controller.js +133 -0
- package/packages/common/dist/shared/controllers/theme.controller.js.map +1 -0
- package/packages/common/dist/shared/dependency-mixin.d.ts +37 -0
- package/packages/common/dist/shared/dependency-mixin.d.ts.map +1 -0
- package/packages/common/dist/shared/dependency-mixin.js +141 -0
- package/packages/common/dist/shared/dependency-mixin.js.map +1 -0
- package/packages/common/dist/shared/event-handler-mixin.d.ts +64 -0
- package/packages/common/dist/shared/event-handler-mixin.d.ts.map +1 -0
- package/packages/common/dist/shared/event-handler-mixin.js +95 -0
- package/packages/common/dist/shared/event-handler-mixin.js.map +1 -0
- package/packages/common/dist/shared/index.d.ts +13 -0
- package/packages/common/dist/shared/index.d.ts.map +1 -0
- package/packages/common/dist/shared/index.js +17 -0
- package/packages/common/dist/shared/index.js.map +1 -0
- package/packages/common/dist/shared/render-utils.d.ts +103 -0
- package/packages/common/dist/shared/render-utils.d.ts.map +1 -0
- package/packages/common/dist/shared/render-utils.js +132 -0
- package/packages/common/dist/shared/render-utils.js.map +1 -0
- package/packages/common/dist/shared/theme-mixin.d.ts +78 -0
- package/packages/common/dist/shared/theme-mixin.d.ts.map +1 -0
- package/packages/common/dist/shared/theme-mixin.js +194 -0
- package/packages/common/dist/shared/theme-mixin.js.map +1 -0
- package/packages/common/dist/shared/themes.d.ts +44 -0
- package/packages/common/dist/shared/themes.d.ts.map +1 -0
- package/packages/common/dist/shared/themes.js +85 -0
- package/packages/common/dist/shared/themes.js.map +1 -0
- package/packages/common/dist/shared/utils.d.ts +60 -0
- package/packages/common/dist/shared/utils.d.ts.map +1 -0
- package/packages/common/dist/shared/utils.js +85 -0
- package/packages/common/dist/shared/utils.js.map +1 -0
- package/packages/common/dist/shared/validation.types.d.ts +108 -0
- package/packages/common/dist/shared/validation.types.d.ts.map +1 -0
- package/packages/common/dist/shared/validation.types.js +17 -0
- package/packages/common/dist/shared/validation.types.js.map +1 -0
- package/packages/common/dist/themes/index.d.ts +2 -0
- package/packages/common/dist/themes/index.d.ts.map +1 -0
- package/packages/common/dist/themes/index.js +2 -0
- package/packages/common/dist/themes/index.js.map +1 -0
- package/packages/common/dist/themes.d.ts +22 -0
- package/packages/common/dist/themes.d.ts.map +1 -0
- package/packages/common/dist/themes.js +23 -0
- package/packages/common/dist/themes.js.map +1 -0
- package/packages/common/dist/utils/index.d.ts +2 -0
- package/packages/common/dist/utils/index.d.ts.map +1 -0
- package/packages/common/dist/utils/index.js +2 -0
- package/packages/common/dist/utils/index.js.map +1 -0
- package/packages/common/dist/utils.d.ts +22 -0
- package/packages/common/dist/utils.d.ts.map +1 -0
- package/packages/common/dist/utils.js +24 -0
- package/packages/common/dist/utils.js.map +1 -0
- package/packages/themes/README.md +146 -0
- package/packages/themes/dist/README.md +146 -0
- package/packages/themes/dist/carbon.css +2987 -0
- package/packages/themes/dist/default.css +2757 -0
- package/packages/themes/dist/editor.css +1063 -0
- package/packages/themes/dist/index.cjs +46 -0
- package/packages/themes/dist/index.js +46 -0
- package/packages/themes/dist/package.json +59 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
7
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
9
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
10
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
11
|
+
};
|
|
12
|
+
import { html, LitElement } from 'lit';
|
|
13
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
14
|
+
import { styles } from './flex.style.js';
|
|
15
|
+
import { NuralyUIBaseMixin } from '@nuralyui/common/mixins';
|
|
16
|
+
import { EMPTY_STRING } from './flex.types.js';
|
|
17
|
+
/**
|
|
18
|
+
* Flex layout component for flexible box layouts
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```html
|
|
22
|
+
* <!-- Basic flex -->
|
|
23
|
+
* <nr-flex>
|
|
24
|
+
* <div>Item 1</div>
|
|
25
|
+
* <div>Item 2</div>
|
|
26
|
+
* <div>Item 3</div>
|
|
27
|
+
* </nr-flex>
|
|
28
|
+
*
|
|
29
|
+
* <!-- Flex with gap -->
|
|
30
|
+
* <nr-flex gap="medium">
|
|
31
|
+
* <div>Item 1</div>
|
|
32
|
+
* <div>Item 2</div>
|
|
33
|
+
* </nr-flex>
|
|
34
|
+
*
|
|
35
|
+
* <!-- Centered flex -->
|
|
36
|
+
* <nr-flex justify="center" align="center">
|
|
37
|
+
* <div>Centered content</div>
|
|
38
|
+
* </nr-flex>
|
|
39
|
+
*
|
|
40
|
+
* <!-- Column layout with gap -->
|
|
41
|
+
* <nr-flex vertical gap="16">
|
|
42
|
+
* <div>Item 1</div>
|
|
43
|
+
* <div>Item 2</div>
|
|
44
|
+
* </nr-flex>
|
|
45
|
+
*
|
|
46
|
+
* <!-- Responsive gap -->
|
|
47
|
+
* <nr-flex .gap=${[16, 24]}>
|
|
48
|
+
* <div>Item 1</div>
|
|
49
|
+
* <div>Item 2</div>
|
|
50
|
+
* </nr-flex>
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* @slot default - Flex items
|
|
54
|
+
*/
|
|
55
|
+
let NrFlexElement = class NrFlexElement extends NuralyUIBaseMixin(LitElement) {
|
|
56
|
+
constructor() {
|
|
57
|
+
super(...arguments);
|
|
58
|
+
/** Flex direction (shorthand: use vertical prop for column) */
|
|
59
|
+
this.direction = "row" /* FlexDirection.Row */;
|
|
60
|
+
/** Shorthand for flex-direction: column */
|
|
61
|
+
this.vertical = false;
|
|
62
|
+
/** Flex wrap behavior */
|
|
63
|
+
this.wrap = "nowrap" /* FlexWrap.NoWrap */;
|
|
64
|
+
/** Justify content alignment */
|
|
65
|
+
this.justify = EMPTY_STRING;
|
|
66
|
+
/** Align items alignment */
|
|
67
|
+
this.align = EMPTY_STRING;
|
|
68
|
+
/** Gap between flex items - can be preset string, number (px), or [horizontal, vertical] */
|
|
69
|
+
this.gap = 0;
|
|
70
|
+
/** Make flex container inline */
|
|
71
|
+
this.inline = false;
|
|
72
|
+
/** Custom flex CSS value (e.g., "1", "auto", "none") */
|
|
73
|
+
this.flex = EMPTY_STRING;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Get computed flex direction
|
|
77
|
+
*/
|
|
78
|
+
getFlexDirection() {
|
|
79
|
+
return this.vertical ? "column" /* FlexDirection.Column */ : this.direction;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Convert gap value to CSS value
|
|
83
|
+
*/
|
|
84
|
+
getGapValue(value) {
|
|
85
|
+
if (typeof value === 'number') {
|
|
86
|
+
return `${value}px`;
|
|
87
|
+
}
|
|
88
|
+
if (typeof value === 'string') {
|
|
89
|
+
// Check if it's a preset
|
|
90
|
+
switch (value) {
|
|
91
|
+
case "small" /* FlexGap.Small */:
|
|
92
|
+
return 'var(--nuraly-spacing-2, 8px)';
|
|
93
|
+
case "medium" /* FlexGap.Medium */:
|
|
94
|
+
return 'var(--nuraly-spacing-3, 16px)';
|
|
95
|
+
case "large" /* FlexGap.Large */:
|
|
96
|
+
return 'var(--nuraly-spacing-4, 24px)';
|
|
97
|
+
default:
|
|
98
|
+
return value; // Use as-is (could be CSS variable or custom value)
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return '0';
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Get gap styles for flex container
|
|
105
|
+
*/
|
|
106
|
+
getGapStyles() {
|
|
107
|
+
const styles = {};
|
|
108
|
+
if (Array.isArray(this.gap)) {
|
|
109
|
+
const [horizontal, vertical] = this.gap;
|
|
110
|
+
styles['column-gap'] = this.getGapValue(horizontal);
|
|
111
|
+
styles['row-gap'] = this.getGapValue(vertical);
|
|
112
|
+
}
|
|
113
|
+
else if (this.gap) {
|
|
114
|
+
styles['gap'] = this.getGapValue(this.gap);
|
|
115
|
+
}
|
|
116
|
+
return styles;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Get all inline styles for flex container
|
|
120
|
+
*/
|
|
121
|
+
getFlexStyles() {
|
|
122
|
+
const styles = Object.assign({}, this.getGapStyles());
|
|
123
|
+
if (this.flex) {
|
|
124
|
+
styles['flex'] = this.flex;
|
|
125
|
+
}
|
|
126
|
+
return Object.entries(styles)
|
|
127
|
+
.map(([key, value]) => `${key}: ${value}`)
|
|
128
|
+
.join('; ');
|
|
129
|
+
}
|
|
130
|
+
render() {
|
|
131
|
+
const flexDirection = this.getFlexDirection();
|
|
132
|
+
const flexStyles = this.getFlexStyles();
|
|
133
|
+
return html `
|
|
134
|
+
<div
|
|
135
|
+
class="nr-flex"
|
|
136
|
+
data-direction="${flexDirection}"
|
|
137
|
+
data-wrap="${this.wrap}"
|
|
138
|
+
data-justify="${this.justify}"
|
|
139
|
+
data-align="${this.align}"
|
|
140
|
+
data-inline="${this.inline}"
|
|
141
|
+
data-theme="${this.currentTheme}"
|
|
142
|
+
style="${flexStyles}"
|
|
143
|
+
>
|
|
144
|
+
<slot></slot>
|
|
145
|
+
</div>
|
|
146
|
+
`;
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
NrFlexElement.styles = styles;
|
|
150
|
+
__decorate([
|
|
151
|
+
property({ type: String })
|
|
152
|
+
], NrFlexElement.prototype, "direction", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
property({ type: Boolean })
|
|
155
|
+
], NrFlexElement.prototype, "vertical", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
property({ type: String })
|
|
158
|
+
], NrFlexElement.prototype, "wrap", void 0);
|
|
159
|
+
__decorate([
|
|
160
|
+
property({ type: String })
|
|
161
|
+
], NrFlexElement.prototype, "justify", void 0);
|
|
162
|
+
__decorate([
|
|
163
|
+
property({ type: String })
|
|
164
|
+
], NrFlexElement.prototype, "align", void 0);
|
|
165
|
+
__decorate([
|
|
166
|
+
property({ type: Object })
|
|
167
|
+
], NrFlexElement.prototype, "gap", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
property({ type: Boolean })
|
|
170
|
+
], NrFlexElement.prototype, "inline", void 0);
|
|
171
|
+
__decorate([
|
|
172
|
+
property({ type: String })
|
|
173
|
+
], NrFlexElement.prototype, "flex", void 0);
|
|
174
|
+
NrFlexElement = __decorate([
|
|
175
|
+
customElement('nr-flex')
|
|
176
|
+
], NrFlexElement);
|
|
177
|
+
export { NrFlexElement };
|
|
178
|
+
//# sourceMappingURL=flex.component.js.map
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* Flex component styles
|
|
4
|
+
* Using shared CSS variables from /src/shared/themes/
|
|
5
|
+
*/
|
|
6
|
+
export const styles = css `
|
|
7
|
+
:host {
|
|
8
|
+
display: block;
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.nr-flex {
|
|
13
|
+
display: flex;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
|
|
16
|
+
/* Theme-aware */
|
|
17
|
+
color: var(--nuraly-color-text);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* Inline flex */
|
|
21
|
+
.nr-flex[data-inline="true"] {
|
|
22
|
+
display: inline-flex;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Flex direction */
|
|
26
|
+
.nr-flex[data-direction="row"] {
|
|
27
|
+
flex-direction: row;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.nr-flex[data-direction="row-reverse"] {
|
|
31
|
+
flex-direction: row-reverse;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.nr-flex[data-direction="column"] {
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.nr-flex[data-direction="column-reverse"] {
|
|
39
|
+
flex-direction: column-reverse;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Flex wrap */
|
|
43
|
+
.nr-flex[data-wrap="nowrap"] {
|
|
44
|
+
flex-wrap: nowrap;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.nr-flex[data-wrap="wrap"] {
|
|
48
|
+
flex-wrap: wrap;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.nr-flex[data-wrap="wrap-reverse"] {
|
|
52
|
+
flex-wrap: wrap-reverse;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Justify content */
|
|
56
|
+
.nr-flex[data-justify="flex-start"] {
|
|
57
|
+
justify-content: flex-start;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.nr-flex[data-justify="flex-end"] {
|
|
61
|
+
justify-content: flex-end;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.nr-flex[data-justify="center"] {
|
|
65
|
+
justify-content: center;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.nr-flex[data-justify="space-between"] {
|
|
69
|
+
justify-content: space-between;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.nr-flex[data-justify="space-around"] {
|
|
73
|
+
justify-content: space-around;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.nr-flex[data-justify="space-evenly"] {
|
|
77
|
+
justify-content: space-evenly;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* Align items */
|
|
81
|
+
.nr-flex[data-align="flex-start"] {
|
|
82
|
+
align-items: flex-start;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.nr-flex[data-align="flex-end"] {
|
|
86
|
+
align-items: flex-end;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.nr-flex[data-align="center"] {
|
|
90
|
+
align-items: center;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.nr-flex[data-align="baseline"] {
|
|
94
|
+
align-items: baseline;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.nr-flex[data-align="stretch"] {
|
|
98
|
+
align-items: stretch;
|
|
99
|
+
}
|
|
100
|
+
`;
|
|
101
|
+
//# sourceMappingURL=flex.style.js.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flex component types and constants
|
|
3
|
+
*/
|
|
4
|
+
export declare const EMPTY_STRING = "";
|
|
5
|
+
/**
|
|
6
|
+
* Flex direction
|
|
7
|
+
*/
|
|
8
|
+
export declare const enum FlexDirection {
|
|
9
|
+
Row = "row",
|
|
10
|
+
RowReverse = "row-reverse",
|
|
11
|
+
Column = "column",
|
|
12
|
+
ColumnReverse = "column-reverse"
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Flex wrap behavior
|
|
16
|
+
*/
|
|
17
|
+
export declare const enum FlexWrap {
|
|
18
|
+
NoWrap = "nowrap",
|
|
19
|
+
Wrap = "wrap",
|
|
20
|
+
WrapReverse = "wrap-reverse"
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Justify content alignment
|
|
24
|
+
*/
|
|
25
|
+
export declare const enum FlexJustify {
|
|
26
|
+
FlexStart = "flex-start",
|
|
27
|
+
FlexEnd = "flex-end",
|
|
28
|
+
Center = "center",
|
|
29
|
+
SpaceBetween = "space-between",
|
|
30
|
+
SpaceAround = "space-around",
|
|
31
|
+
SpaceEvenly = "space-evenly"
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Align items alignment
|
|
35
|
+
*/
|
|
36
|
+
export declare const enum FlexAlign {
|
|
37
|
+
FlexStart = "flex-start",
|
|
38
|
+
FlexEnd = "flex-end",
|
|
39
|
+
Center = "center",
|
|
40
|
+
Baseline = "baseline",
|
|
41
|
+
Stretch = "stretch"
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Gap size presets
|
|
45
|
+
*/
|
|
46
|
+
export declare const enum FlexGap {
|
|
47
|
+
Small = "small",
|
|
48
|
+
Medium = "medium",
|
|
49
|
+
Large = "large"
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Gap configuration - can be string preset, number (px), or array [horizontal, vertical]
|
|
53
|
+
*/
|
|
54
|
+
export type Gap = FlexGap | number | string | [number | string, number | string];
|
|
55
|
+
/**
|
|
56
|
+
* Flex item configuration
|
|
57
|
+
*/
|
|
58
|
+
export interface FlexItemConfig {
|
|
59
|
+
flex?: string | number;
|
|
60
|
+
order?: number;
|
|
61
|
+
alignSelf?: FlexAlign | 'auto';
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=flex.types.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createComponent } from '@lit-labs/react';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { NrFlexElement } from './flex.component.js';
|
|
4
|
+
export const NrFlex = createComponent({
|
|
5
|
+
tagName: 'nr-flex',
|
|
6
|
+
elementClass: NrFlexElement,
|
|
7
|
+
react: React,
|
|
8
|
+
events: {},
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=react.js.map
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import{css as t,LitElement as i,html as s}from"lit";import{property as e,state as n,customElement as r}from"lit/decorators.js";import{NuralyUIBaseMixin as o}from"@nuralyui/common/mixins";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
5
|
+
* SPDX-License-Identifier: MIT
|
|
6
|
+
*/const a=t`
|
|
7
|
+
:host {
|
|
8
|
+
display: block;
|
|
9
|
+
width: 100%;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:host([disabled]) {
|
|
13
|
+
opacity: 0.6;
|
|
14
|
+
pointer-events: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.form-wrapper {
|
|
18
|
+
width: 100%;
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
gap: var(--nuraly-form-gap, 16px);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.form-wrapper[disabled] {
|
|
25
|
+
opacity: 0.6;
|
|
26
|
+
pointer-events: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Form validation states */
|
|
30
|
+
:host([data-validation-state="pristine"]) {
|
|
31
|
+
border-left: 3px solid transparent;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:host([data-validation-state="valid"]) {
|
|
35
|
+
border-left: 3px solid #52c41a;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:host([data-validation-state="invalid"]) {
|
|
39
|
+
border-left: 3px solid #ff4d4f;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:host([data-validation-state="pending"]) {
|
|
43
|
+
border-left: 3px solid #1890ff;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Form submission states */
|
|
47
|
+
:host([data-submission-state="submitting"]) {
|
|
48
|
+
opacity: 0.8;
|
|
49
|
+
pointer-events: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:host([data-submission-state="success"]) {
|
|
53
|
+
border-left: 3px solid #52c41a;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:host([data-submission-state="error"]) {
|
|
57
|
+
border-left: 3px solid #ff4d4f;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* Responsive design */
|
|
61
|
+
@media (max-width: 768px) {
|
|
62
|
+
.form-wrapper {
|
|
63
|
+
gap: var(--nuraly-form-gap-mobile, 12px);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
`
|
|
67
|
+
/**
|
|
68
|
+
* @license
|
|
69
|
+
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
70
|
+
* SPDX-License-Identifier: MIT
|
|
71
|
+
*/;var d,l;!function(t){t.Pristine="pristine",t.Pending="pending",t.Valid="valid",t.Invalid="invalid",t.Submitted="submitted"}(d||(d={})),function(t){t.Idle="idle",t.Submitting="submitting",t.Success="success",t.Error="error"}(l||(l={}));const h={VALIDATION_CHANGED:"nr-form-validation-changed",FIELD_CHANGED:"nr-form-field-changed",SUBMIT_ATTEMPT:"nr-form-submit-attempt",SUBMIT_SUCCESS:"nr-form-submit-success",SUBMIT_ERROR:"nr-form-submit-error",RESET:"nr-form-reset"};
|
|
72
|
+
/**
|
|
73
|
+
* @license
|
|
74
|
+
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
75
|
+
* SPDX-License-Identifier: MIT
|
|
76
|
+
*/var u=function(t,i,s,e){return new(s||(s=Promise))(function(n,r){function o(t){try{d(e.next(t))}catch(t){r(t)}}function a(t){try{d(e.throw(t))}catch(t){r(t)}}function d(t){var i;t.done?n(t.value):(i=t.value,i instanceof s?i:new s(function(t){t(i)})).then(o,a)}d((e=e.apply(t,i||[])).next())})};class c{constructor(t){this.host=t,this.fields=new Map,this.validationState=d.Pristine,this.validationPromise=null}registerField(t){var i;const s=t.name||t.getAttribute("name")||`field-${Date.now()}`,e={element:t,name:s,value:t.value,isValid:t.getValidationStatus().isValid,validationMessage:t.validationMessage||"",required:null!==(i=t.required)&&void 0!==i&&i,touched:!1,dirty:!1};this.fields.set(s,e),this.addFieldListeners(t,s)}unregisterField(t){const i=this.fields.get(t);i&&(this.removeFieldListeners(i.element),this.fields.delete(t))}addFieldListeners(t,i){t.addEventListener("nr-validation",t=>this.handleFieldValidation(i,t))}removeFieldListeners(t){}handleFieldValidation(t,i){const s=this.fields.get(t);if(s){if(i&&i.detail)s.isValid=i.detail.isValid||!1,s.validationMessage=i.detail.validationMessage||"";else{const t=s.element.getValidationStatus();s.isValid=t.isValid,s.validationMessage=s.element.validationMessage||""}this.updateFormValidationState()}}updateFormValidationState(){const t=this.getInvalidFields(),i=0===t.length;this.validationState=i?d.Valid:d.Invalid;const s={isValid:i,invalidFields:t,validationErrors:this.buildValidationErrors(),summary:i?"Form is valid":`${t.length} field(s) have errors`};this.dispatchValidationEvent(s)}buildValidationErrors(){const t={};for(const[i,s]of this.fields)!s.isValid&&s.validationMessage&&(t[i]=s.validationMessage);return t}validateForm(){return null!==this.validationPromise||(this.validationState=d.Pending,this.validationPromise=this.performValidation()),this.validationPromise}performValidation(){return u(this,void 0,void 0,function*(){const t=[],i={};for(const[s,e]of this.fields){const n=e.element.getValidationStatus().isValid;e.isValid=n,e.validationMessage=e.element.validationMessage||"",n||(t.push(e),i[s]=e.validationMessage)}const s=0===t.length;this.validationState=s?d.Valid:d.Invalid;const e={isValid:s,invalidFields:t,validationErrors:i,summary:s?"Form is valid":`${t.length} field(s) have errors`};return this.dispatchValidationEvent(e),this.validationPromise=null,e})}getValidationState(){return this.validationState}getFields(){return Array.from(this.fields.values())}getInvalidFields(){return Array.from(this.fields.values()).filter(t=>!t.isValid)}isValid(){return this.validationState===d.Valid&&Array.from(this.fields.values()).every(t=>t.isValid)}focusFirstInvalidField(){const t=Array.from(this.fields.values()).find(t=>!t.isValid);return!(!t||"function"!=typeof t.element.focus)&&(t.element.focus(),!0)}reset(){for(const t of this.fields.values())"clearValidation"in t.element&&"function"==typeof t.element.clearValidation&&t.element.clearValidation(),"value"in t.element&&(t.element.value=""),t.touched=!1,t.dirty=!1,t.isValid=!0,t.validationMessage="";this.validationState=d.Pristine,this.dispatchResetEvent()}dispatchValidationEvent(t){var i,s;null===(s=(i=this.host).dispatchCustomEvent)||void 0===s||s.call(i,h.VALIDATION_CHANGED,{validationResult:t})}dispatchResetEvent(){var t,i;null===(i=(t=this.host).dispatchCustomEvent)||void 0===i||i.call(t,h.RESET,{})}}
|
|
77
|
+
/**
|
|
78
|
+
* @license
|
|
79
|
+
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
80
|
+
* SPDX-License-Identifier: MIT
|
|
81
|
+
*/var v=function(t,i,s,e){return new(s||(s=Promise))(function(n,r){function o(t){try{d(e.next(t))}catch(t){r(t)}}function a(t){try{d(e.throw(t))}catch(t){r(t)}}function d(t){var i;t.done?n(t.value):(i=t.value,i instanceof s?i:new s(function(t){t(i)})).then(o,a)}d((e=e.apply(t,i||[])).next())})};class m{constructor(t){this.host=t,this.submissionState=l.Idle,this.lastSubmissionData=null}getSubmissionState(){return this.submissionState}isSubmitting(){return this.submissionState===l.Submitting}collectFormData(){const t=new FormData,i={},s={};return this.getFormFields().forEach(e=>{const n=e.name||e.getAttribute("name");if(!n)return;const r=e.value;null!=r&&t.append(n,String(r)),i[n]=r,s[n]={element:e,value:r,name:n,type:e.tagName.toLowerCase(),required:e.required||!1,disabled:e.disabled||!1}}),{formData:t,jsonData:i,fields:s}}submitForm(t){return v(this,void 0,void 0,function*(){if(this.isSubmitting())throw new Error("Form is already submitting");try{this.setSubmissionState(l.Submitting);const i=this.host.validationController;if(i){const t=yield i.validateForm();if(!t.isValid)throw i.focusFirstInvalidField(),this.dispatchSubmitAttemptEvent(t),new Error(`Form validation failed: ${t.summary}`)}const s=this.collectFormData();return t&&(Object.assign(s.jsonData,t),Object.entries(t).forEach(([t,i])=>{s.formData.append(t,String(i))})),this.lastSubmissionData=s,this.dispatchSubmitSuccessEvent(s),this.setSubmissionState(l.Success),s}catch(t){throw this.setSubmissionState(l.Error),this.dispatchSubmitErrorEvent(t),t}})}resetSubmission(){this.submissionState=l.Idle,this.lastSubmissionData=null}getLastSubmissionData(){return this.lastSubmissionData}getFormFields(){var t;const i=this.host,s=[],e=["nr-input","nr-select","nr-radio","nr-checkbox","nr-textarea","nr-timepicker","nr-datepicker","input","select","textarea"];e.forEach(t=>{i.querySelectorAll(t).forEach(t=>{(t.name||t.getAttribute("name"))&&s.push(t)})});return((null===(t=i.shadowRoot)||void 0===t?void 0:t.querySelectorAll("slot"))||[]).forEach(t=>{t.assignedElements({flatten:!0}).forEach(t=>{e.forEach(i=>{if(t.matches&&t.matches(i)){const i=t;(i.name||i.getAttribute("name"))&&s.push(i)}t.querySelectorAll(i).forEach(t=>{const i=t;(i.name||i.getAttribute("name"))&&s.push(i)})})})}),s}setSubmissionState(t){var i,s;this.submissionState=t,null===(s=(i=this.host).requestUpdate)||void 0===s||s.call(i)}dispatchSubmitAttemptEvent(t){var i,s;null===(s=(i=this.host).dispatchCustomEvent)||void 0===s||s.call(i,h.SUBMIT_ATTEMPT,{validationResult:t})}dispatchSubmitSuccessEvent(t){var i,s;null===(s=(i=this.host).dispatchCustomEvent)||void 0===s||s.call(i,h.SUBMIT_SUCCESS,{formData:t})}dispatchSubmitErrorEvent(t){var i,s;null===(s=(i=this.host).dispatchCustomEvent)||void 0===s||s.call(i,h.SUBMIT_ERROR,{error:t})}}
|
|
82
|
+
/**
|
|
83
|
+
* @license
|
|
84
|
+
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
85
|
+
* SPDX-License-Identifier: MIT
|
|
86
|
+
*/var f=function(t,i,s,e){for(var n,r=arguments.length,o=r<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e,a=t.length-1;a>=0;a--)(n=t[a])&&(o=(r<3?n(o):r>3?n(i,s,o):n(i,s))||o);return r>3&&o&&Object.defineProperty(i,s,o),o},p=function(t,i,s,e){return new(s||(s=Promise))(function(n,r){function o(t){try{d(e.next(t))}catch(t){r(t)}}function a(t){try{d(e.throw(t))}catch(t){r(t)}}function d(t){var i;t.done?n(t.value):(i=t.value,i instanceof s?i:new s(function(t){t(i)})).then(o,a)}d((e=e.apply(t,i||[])).next())})};let b=class extends(o(i)){constructor(){super(...arguments),this.config={validateOnChange:!1,validateOnBlur:!0,showErrorsImmediately:!1,preventInvalidSubmission:!0,resetOnSuccess:!1,validationDelay:300},this.validateOnChange=!1,this.validateOnBlur=!0,this.preventInvalidSubmission=!0,this.resetOnSuccess=!1,this.method="POST",this.enctype="multipart/form-data",this.disabled=!1,this._validationState=d.Pristine,this._submissionState=l.Idle,this.validationController=new c(this),this.submissionController=new m(this),this.handleValidationChanged=t=>{const i=t.detail.validationResult;i&&(this._validationState=i.isValid?d.Valid:d.Invalid)}}get validationState(){return this._validationState}get submissionState(){return this._submissionState}connectedCallback(){super.connectedCallback(),this.setupFormObserver()}disconnectedCallback(){super.disconnectedCallback(),this.cleanupFormObserver()}willUpdate(t){super.willUpdate(t),(t.has("validateOnChange")||t.has("validateOnBlur")||t.has("preventInvalidSubmission")||t.has("resetOnSuccess"))&&(this.config=Object.assign(Object.assign({},this.config),{validateOnChange:this.validateOnChange,validateOnBlur:this.validateOnBlur,preventInvalidSubmission:this.preventInvalidSubmission,resetOnSuccess:this.resetOnSuccess}))}firstUpdated(){this.registerExistingFields(),this.setupFormEvents()}setupFormObserver(){const t=new MutationObserver(t=>{t.forEach(t=>{t.addedNodes.forEach(t=>{t.nodeType===Node.ELEMENT_NODE&&this.registerFieldsInElement(t)})})});t.observe(this,{childList:!0,subtree:!0}),this._formObserver=t}cleanupFormObserver(){const t=this._formObserver;t&&t.disconnect()}registerExistingFields(){this.registerFieldsInElement(this)}registerFieldsInElement(t){["nr-input","nr-select","nr-radio","nr-checkbox","nr-textarea","nr-timepicker","nr-datepicker"].forEach(i=>{t.querySelectorAll(i).forEach(t=>{t.getAttribute("name")&&this.validationController.registerField(t)})})}setupFormEvents(){this.addEventListener("submit",this.handleFormSubmit),this.addEventListener("reset",this.handleFormReset),this.addEventListener(h.VALIDATION_CHANGED,this.handleValidationChanged)}handleFormSubmit(t){return p(this,void 0,void 0,function*(){if(t.preventDefault(),!this.disabled)try{const t=yield this.submissionController.submitForm();this.resetOnSuccess&&this.reset(),this.action&&this.performNativeSubmission(t.formData)}catch(t){console.error("Form submission failed:",t)}})}handleFormReset(t){t.preventDefault(),this.reset()}performNativeSubmission(t){const i=document.createElement("form");i.action=this.action,i.method=this.method,i.enctype=this.enctype,this.target&&(i.target=this.target);for(const[s,e]of t.entries()){const t=document.createElement("input");t.type="hidden",t.name=s,t.value=e,i.appendChild(t)}document.body.appendChild(i),i.submit(),document.body.removeChild(i)}validate(){return p(this,void 0,void 0,function*(){return(yield this.validationController.validateForm()).isValid})}submit(t){return p(this,void 0,void 0,function*(){yield this.submissionController.submitForm(t)})}reset(){this.validationController.reset(),this.submissionController.resetSubmission(),this._validationState=d.Pristine,this._submissionState=l.Idle}get isValid(){return this.validationController.isValid()}get isSubmitting(){return this.submissionController.isSubmitting()}getFormData(){return this.submissionController.collectFormData()}getInvalidFields(){return this.validationController.getInvalidFields()}getFieldsValue(t){const i=this.getFormData().jsonData;if(t&&t.length>0){const s={};return t.forEach(t=>{t in i&&(s[t]=i[t])}),s}return i}getFieldValue(t){return this.getFieldsValue()[t]}setFieldsValue(t){Object.entries(t).forEach(([t,i])=>{this.setFieldValue(t,i)})}setFieldValue(t,i){const s=this.validationController.getFields().find(i=>i.name===t);s&&s.element&&(s.element.value=i,s.value=i,s.element.dispatchEvent(new Event("change",{bubbles:!0})))}validateFields(t){return p(this,void 0,void 0,function*(){const i=yield this.validationController.validateForm();if(t&&t.length>0){const s={};if(t.forEach(t=>{i.validationErrors[t]&&(s[t]=i.validationErrors[t])}),Object.keys(s).length>0)throw new Error(JSON.stringify(s));return this.getFieldsValue(t)}if(!i.isValid)throw new Error(JSON.stringify(i.validationErrors));return this.getFieldsValue()})}resetFields(t){if(!t||0===t.length)return void this.reset();const i=this.validationController.getFields();t.forEach(t=>{const s=i.find(i=>i.name===t);s&&s.element&&(s.element.value="",s.value="",s.touched=!1,s.dirty=!1,s.isValid=!0,s.validationMessage="",s.element.dispatchEvent(new Event("change",{bubbles:!0})))})}getFieldError(t){const i=this.validationController.getFields().find(i=>i.name===t);return i&&!i.isValid?i.validationMessage:null}getFieldsError(t){const i=this.validationController.getFields(),s={};return(t?i.filter(i=>t.includes(i.name)):i).forEach(t=>{s[t.name]=t.isValid?null:t.validationMessage}),s}isFieldTouched(t){const i=this.validationController.getFields().find(i=>i.name===t);return!!i&&i.touched}isFieldsTouched(t){const i=this.validationController.getFields();return(t?i.filter(i=>t.includes(i.name)):i).some(t=>t.touched)}isFieldDirty(t){const i=this.validationController.getFields().find(i=>i.name===t);return!!i&&i.dirty}isFieldsDirty(t){const i=this.validationController.getFields();return(t?i.filter(i=>t.includes(i.name)):i).some(t=>t.dirty)}getFieldInstance(t){const i=this.validationController.getFields().find(i=>i.name===t);return i?i.element:null}scrollToField(t){if(t){const i=this.getFieldInstance(t);return!!i&&(i.scrollIntoView({behavior:"smooth",block:"center"}),"function"==typeof i.focus&&i.focus(),!0)}return this.validationController.focusFirstInvalidField()}finish(){return p(this,void 0,void 0,function*(){try{const t=yield this.validateFields();return yield this.submit(),t}catch(t){throw this.scrollToField(),t}})}getFieldsWithErrors(){return this.validationController.getFields().filter(t=>!t.isValid).map(t=>t.name)}hasErrors(){return this.getFieldsWithErrors().length>0}getFormState(){const t=this.validationController.getFields();return{isValid:this.isValid,isSubmitting:this.isSubmitting,hasErrors:this.hasErrors(),errorCount:this.getFieldsWithErrors().length,fieldCount:t.length,touchedFields:t.filter(t=>t.touched).map(t=>t.name),dirtyFields:t.filter(t=>t.dirty).map(t=>t.name),invalidFields:this.getFieldsWithErrors()}}setLoading(t){this.disabled=t,this.requestUpdate()}render(){return s`
|
|
87
|
+
<form
|
|
88
|
+
action="${this.action||""}"
|
|
89
|
+
method="${this.method.toLowerCase()}"
|
|
90
|
+
enctype="${this.enctype}"
|
|
91
|
+
target="${this.target||""}"
|
|
92
|
+
class="form-wrapper"
|
|
93
|
+
data-disabled="${this.disabled}"
|
|
94
|
+
novalidate
|
|
95
|
+
>
|
|
96
|
+
<slot></slot>
|
|
97
|
+
</form>
|
|
98
|
+
`}};b.styles=a,f([e({type:Object})],b.prototype,"config",void 0),f([e({type:Boolean,attribute:"validate-on-change"})],b.prototype,"validateOnChange",void 0),f([e({type:Boolean,attribute:"validate-on-blur"})],b.prototype,"validateOnBlur",void 0),f([e({type:Boolean,attribute:"prevent-invalid-submission"})],b.prototype,"preventInvalidSubmission",void 0),f([e({type:Boolean,attribute:"reset-on-success"})],b.prototype,"resetOnSuccess",void 0),f([e({type:String})],b.prototype,"action",void 0),f([e({type:String})],b.prototype,"method",void 0),f([e({type:String,attribute:"enctype"})],b.prototype,"enctype",void 0),f([e({type:String})],b.prototype,"target",void 0),f([e({type:Boolean,reflect:!0})],b.prototype,"disabled",void 0),f([n()],b.prototype,"_validationState",void 0),f([n()],b.prototype,"_submissionState",void 0),b=f([r("nr-form")],b);export{h as FORM_EVENTS,m as FormSubmissionController,l as FormSubmissionState,c as FormValidationController,d as FormValidationState,b as NrFormElement};
|
|
Binary file
|