@nuraly/lumenui 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/nuralyui.bundle.js +23024 -17355
- package/dist/nuralyui.bundle.js.gz +0 -0
- package/dist/src/components/alert/alert.component.d.ts +8 -5
- package/dist/src/components/alert/alert.component.js +24 -20
- package/dist/src/components/alert/alert.style.d.ts +0 -7
- package/dist/src/components/alert/alert.style.js +48 -90
- package/dist/src/components/alert/bundle.js +82 -108
- package/dist/src/components/alert/bundle.js.gz +0 -0
- package/dist/src/components/badge/badge.component.d.ts +9 -8
- package/dist/src/components/badge/badge.component.js +17 -14
- package/dist/src/components/badge/badge.style.d.ts +0 -7
- package/dist/src/components/badge/badge.style.js +49 -107
- package/dist/src/components/badge/bundle.js +81 -119
- package/dist/src/components/badge/bundle.js.gz +0 -0
- package/dist/src/components/breadcrumb/breadcrumb.component.d.ts +8 -10
- package/dist/src/components/breadcrumb/breadcrumb.component.js +16 -15
- package/dist/src/components/breadcrumb/breadcrumb.style.d.ts +0 -7
- package/dist/src/components/breadcrumb/breadcrumb.style.js +42 -60
- package/dist/src/components/breadcrumb/bundle.js +96 -93
- package/dist/src/components/breadcrumb/bundle.js.gz +0 -0
- package/dist/src/components/button/bundle.js +221 -470
- package/dist/src/components/button/bundle.js.gz +0 -0
- package/dist/src/components/button/button.component.d.ts +2 -1
- package/dist/src/components/button/button.component.js +6 -6
- package/dist/src/components/button/button.style.d.ts +0 -7
- package/dist/src/components/button/button.style.js +167 -433
- package/dist/src/components/canvas/base-canvas.component.d.ts +2 -1
- package/dist/src/components/canvas/base-canvas.component.js +1 -0
- package/dist/src/components/canvas/bundle.js +16919 -9595
- package/dist/src/components/canvas/bundle.js.gz +0 -0
- package/dist/src/components/canvas/canvas.constants.d.ts +1 -1
- package/dist/src/components/canvas/canvas.constants.js +1 -1
- package/dist/src/components/canvas/chatbot-panel.style.js +31 -31
- package/dist/src/components/canvas/index.d.ts +2 -0
- package/dist/src/components/canvas/index.js +3 -0
- package/dist/src/components/canvas/whiteboard-canvas.component.d.ts +3 -1
- package/dist/src/components/canvas/whiteboard-canvas.component.js +19 -1
- package/dist/src/components/canvas/whiteboard-canvas.style.js +159 -138
- package/dist/src/components/canvas/whiteboard-node.component.d.ts +2 -1
- package/dist/src/components/canvas/whiteboard-node.component.js +2 -1
- package/dist/src/components/canvas/whiteboard-node.style.js +44 -44
- package/dist/src/components/canvas/workflow-canvas-only.d.ts +4 -0
- package/dist/src/components/canvas/workflow-canvas-only.js +5 -0
- package/dist/src/components/canvas/workflow-canvas.component.d.ts +3 -1
- package/dist/src/components/canvas/workflow-canvas.component.js +24 -2
- package/dist/src/components/canvas/workflow-canvas.style.js +776 -648
- package/dist/src/components/canvas/workflow-canvas.types.d.ts +113 -4
- package/dist/src/components/canvas/workflow-canvas.types.js +646 -3
- package/dist/src/components/canvas/workflow-node.component.d.ts +3 -2
- package/dist/src/components/canvas/workflow-node.component.js +5 -5
- package/dist/src/components/canvas/workflow-node.style.js +183 -181
- package/dist/src/components/card/bundle.js +43 -35
- package/dist/src/components/card/bundle.js.gz +0 -0
- package/dist/src/components/card/card.component.d.ts +6 -1
- package/dist/src/components/card/card.component.js +8 -2
- package/dist/src/components/card/card.style.js +26 -30
- package/dist/src/components/carousel/bundle.js +8 -8
- package/dist/src/components/carousel/bundle.js.gz +0 -0
- package/dist/src/components/carousel/carousel.component.d.ts +12 -0
- package/dist/src/components/carousel/carousel.component.js +16 -4
- package/dist/src/components/chatbot/bundle.js +422 -406
- package/dist/src/components/chatbot/bundle.js.gz +0 -0
- package/dist/src/components/chatbot/chatbot.component.d.ts +2 -1
- package/dist/src/components/chatbot/chatbot.component.js +1 -0
- package/dist/src/components/chatbot/chatbot.style.js +277 -277
- package/dist/src/components/checkbox/bundle.js +86 -245
- package/dist/src/components/checkbox/bundle.js.gz +0 -0
- package/dist/src/components/checkbox/checkbox.component.d.ts +5 -2
- package/dist/src/components/checkbox/checkbox.component.js +11 -13
- package/dist/src/components/checkbox/checkbox.style.js +56 -231
- package/dist/src/components/code-editor/bundle.js +151 -25
- package/dist/src/components/code-editor/bundle.js.gz +0 -0
- package/dist/src/components/code-editor/code-editor.component.d.ts +18 -56
- package/dist/src/components/code-editor/code-editor.component.js +141 -394
- package/dist/src/components/code-editor/code-editor.style.js +139 -15
- package/dist/src/components/collapse/bundle.js +97 -84
- package/dist/src/components/collapse/bundle.js.gz +0 -0
- package/dist/src/components/collapse/collapse.component.d.ts +7 -1
- package/dist/src/components/collapse/collapse.component.js +11 -2
- package/dist/src/components/collapse/collapse.style.js +60 -60
- package/dist/src/components/colorpicker/bundle.js +85 -48
- package/dist/src/components/colorpicker/bundle.js.gz +0 -0
- package/dist/src/components/colorpicker/color-holder.component.d.ts +2 -4
- package/dist/src/components/colorpicker/color-holder.component.js +5 -6
- package/dist/src/components/colorpicker/color-holder.style.js +11 -11
- package/dist/src/components/colorpicker/color-picker.component.d.ts +2 -1
- package/dist/src/components/colorpicker/color-picker.component.js +1 -0
- package/dist/src/components/colorpicker/color-picker.style.js +12 -12
- package/dist/src/components/colorpicker/default-color-sets.component.d.ts +2 -2
- package/dist/src/components/colorpicker/default-color-sets.component.js +4 -3
- package/dist/src/components/colorpicker/default-color-sets.style.js +5 -5
- package/dist/src/components/container/bundle.js +24 -14
- package/dist/src/components/container/bundle.js.gz +0 -0
- package/dist/src/components/container/container.component.d.ts +4 -1
- package/dist/src/components/container/container.component.js +7 -5
- package/dist/src/components/container/container.style.js +9 -9
- package/dist/src/components/datepicker/bundle.js +193 -177
- package/dist/src/components/datepicker/bundle.js.gz +0 -0
- package/dist/src/components/datepicker/datepicker.component.d.ts +2 -1
- package/dist/src/components/datepicker/datepicker.component.js +1 -0
- package/dist/src/components/datepicker/datepicker.style.js +65 -65
- package/dist/src/components/datepicker/datepicker.style.variables.js +91 -91
- package/dist/src/components/db-connection-select/bundle.js +7 -6
- 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 +3 -0
- package/dist/src/components/db-connection-select/db-connection-select.component.js +4 -0
- package/dist/src/components/divider/bundle.js +61 -35
- package/dist/src/components/divider/bundle.js.gz +0 -0
- package/dist/src/components/divider/divider.component.d.ts +4 -6
- package/dist/src/components/divider/divider.component.js +10 -14
- package/dist/src/components/divider/divider.style.js +41 -31
- package/dist/src/components/document/bundle.js +50 -48
- package/dist/src/components/document/bundle.js.gz +0 -0
- package/dist/src/components/document/document.component.d.ts +12 -1
- package/dist/src/components/document/document.component.js +18 -6
- package/dist/src/components/document/document.style.js +21 -36
- package/dist/src/components/dropdown/bundle.js +117 -101
- package/dist/src/components/dropdown/bundle.js.gz +0 -0
- package/dist/src/components/dropdown/dropdown.component.d.ts +2 -1
- package/dist/src/components/dropdown/dropdown.component.js +1 -0
- package/dist/src/components/dropdown/dropdown.style.js +68 -68
- package/dist/src/components/file-upload/bundle.js +82 -76
- package/dist/src/components/file-upload/bundle.js.gz +0 -0
- package/dist/src/components/file-upload/file-upload.component.d.ts +2 -1
- package/dist/src/components/file-upload/file-upload.component.js +1 -0
- package/dist/src/components/file-upload/styles.js +59 -59
- package/dist/src/components/flex/bundle.js +18 -8
- package/dist/src/components/flex/bundle.js.gz +0 -0
- package/dist/src/components/flex/flex.component.d.ts +4 -1
- package/dist/src/components/flex/flex.component.js +7 -4
- package/dist/src/components/flex/flex.style.js +2 -2
- package/dist/src/components/form/bundle.js +22 -10
- package/dist/src/components/form/bundle.js.gz +0 -0
- package/dist/src/components/form/form.component.d.ts +4 -1
- package/dist/src/components/form/form.component.js +5 -1
- package/dist/src/components/form/form.style.js +2 -2
- package/dist/src/components/grid/bundle.js +26 -14
- package/dist/src/components/grid/bundle.js.gz +0 -0
- package/dist/src/components/grid/col.component.d.ts +4 -1
- package/dist/src/components/grid/col.component.js +4 -1
- package/dist/src/components/grid/col.style.js +2 -2
- package/dist/src/components/grid/row.component.d.ts +4 -1
- package/dist/src/components/grid/row.component.js +4 -1
- package/dist/src/components/grid/row.style.js +2 -2
- package/dist/src/components/icon/bundle.js +78 -252
- package/dist/src/components/icon/bundle.js.gz +0 -0
- package/dist/src/components/icon/icon-paths.d.ts +2 -0
- package/dist/src/components/icon/icon-paths.js +141 -0
- package/dist/src/components/icon/icon.component.d.ts +10 -12
- package/dist/src/components/icon/icon.component.js +42 -93
- package/dist/src/components/icon/icon.style.js +42 -130
- package/dist/src/components/icon/icon.variables.js +9 -9
- package/dist/src/components/iconpicker/bundle.js +859 -1511
- package/dist/src/components/iconpicker/bundle.js.gz +0 -0
- package/dist/src/components/iconpicker/icon-picker.component.d.ts +2 -1
- package/dist/src/components/iconpicker/icon-picker.component.js +1 -0
- package/dist/src/components/iconpicker/icon-picker.style.js +13 -13
- package/dist/src/components/image/bundle.js +43 -33
- package/dist/src/components/image/bundle.js.gz +0 -0
- package/dist/src/components/image/image.component.d.ts +10 -1
- package/dist/src/components/image/image.component.js +13 -3
- package/dist/src/components/image/image.style.js +19 -26
- package/dist/src/components/input/bundle.js +420 -644
- package/dist/src/components/input/bundle.js.gz +0 -0
- package/dist/src/components/input/input.component.d.ts +16 -3
- package/dist/src/components/input/input.component.js +43 -27
- package/dist/src/components/input/input.style.d.ts +1 -1
- package/dist/src/components/input/input.style.js +331 -634
- package/dist/src/components/kv-secret-select/bundle.js +2 -1
- package/dist/src/components/kv-secret-select/bundle.js.gz +0 -0
- package/dist/src/components/kv-secret-select/kv-secret-select.component.d.ts +3 -0
- package/dist/src/components/kv-secret-select/kv-secret-select.component.js +4 -0
- package/dist/src/components/label/bundle.js +37 -60
- package/dist/src/components/label/bundle.js.gz +0 -0
- package/dist/src/components/label/label.component.d.ts +8 -4
- package/dist/src/components/label/label.component.js +9 -14
- package/dist/src/components/label/label.style.js +17 -25
- package/dist/src/components/label/label.style.variables.js +18 -18
- package/dist/src/components/layout/bundle.js +86 -70
- package/dist/src/components/layout/bundle.js.gz +0 -0
- package/dist/src/components/layout/content.component.d.ts +2 -1
- package/dist/src/components/layout/content.component.js +2 -1
- package/dist/src/components/layout/content.style.js +3 -3
- package/dist/src/components/layout/footer.component.d.ts +2 -1
- package/dist/src/components/layout/footer.component.js +3 -2
- package/dist/src/components/layout/footer.style.js +7 -7
- package/dist/src/components/layout/header.component.d.ts +2 -1
- package/dist/src/components/layout/header.component.js +3 -2
- package/dist/src/components/layout/header.style.js +7 -7
- package/dist/src/components/layout/layout.component.d.ts +4 -7
- package/dist/src/components/layout/layout.component.js +9 -22
- package/dist/src/components/layout/layout.style.js +1 -1
- package/dist/src/components/layout/sider.component.d.ts +3 -1
- package/dist/src/components/layout/sider.component.js +3 -1
- package/dist/src/components/layout/sider.style.js +29 -29
- package/dist/src/components/menu/bundle.js +135 -125
- package/dist/src/components/menu/bundle.js.gz +0 -0
- package/dist/src/components/menu/menu.component.d.ts +2 -1
- package/dist/src/components/menu/menu.component.js +1 -0
- package/dist/src/components/menu/menu.style.js +87 -87
- package/dist/src/components/modal/bundle.js +105 -96
- package/dist/src/components/modal/bundle.js.gz +0 -0
- package/dist/src/components/modal/modal.component.d.ts +2 -1
- package/dist/src/components/modal/modal.component.js +1 -0
- package/dist/src/components/modal/modal.style.js +69 -71
- package/dist/src/components/panel/bundle.js +190 -391
- package/dist/src/components/panel/bundle.js.gz +0 -0
- package/dist/src/components/panel/panel.component.d.ts +2 -1
- package/dist/src/components/panel/panel.component.js +1 -0
- package/dist/src/components/panel/panel.style.js +65 -65
- package/dist/src/components/popconfirm/bundle.js +107 -93
- package/dist/src/components/popconfirm/bundle.js.gz +0 -0
- package/dist/src/components/popconfirm/popconfirm-manager.component.d.ts +2 -1
- package/dist/src/components/popconfirm/popconfirm-manager.component.js +1 -0
- package/dist/src/components/popconfirm/popconfirm-manager.style.js +16 -16
- package/dist/src/components/popconfirm/popconfirm.component.d.ts +2 -1
- package/dist/src/components/popconfirm/popconfirm.component.js +9 -5
- package/dist/src/components/popconfirm/popconfirm.style.js +43 -43
- package/dist/src/components/radio/bundle.js +56 -86
- package/dist/src/components/radio/bundle.js.gz +0 -0
- package/dist/src/components/radio/radio.component.d.ts +8 -2
- package/dist/src/components/radio/radio.component.js +17 -9
- package/dist/src/components/radio/radio.style.js +30 -77
- package/dist/src/components/radio-group/bundle.js +125 -89
- package/dist/src/components/radio-group/bundle.js.gz +0 -0
- package/dist/src/components/radio-group/radio-group.component.d.ts +5 -1
- package/dist/src/components/radio-group/radio-group.component.js +18 -10
- package/dist/src/components/radio-group/radio-group.style.js +44 -44
- package/dist/src/components/select/bundle.js +260 -367
- package/dist/src/components/select/bundle.js.gz +0 -0
- package/dist/src/components/select/select.component.d.ts +12 -17
- package/dist/src/components/select/select.component.js +35 -35
- package/dist/src/components/select/select.style.js +184 -324
- package/dist/src/components/skeleton/bundle.js +82 -162
- package/dist/src/components/skeleton/bundle.js.gz +0 -0
- package/dist/src/components/skeleton/skeleton.component.d.ts +10 -5
- package/dist/src/components/skeleton/skeleton.component.js +20 -7
- package/dist/src/components/skeleton/skeleton.style.js +34 -133
- package/dist/src/components/slider-input/bundle.js +89 -88
- package/dist/src/components/slider-input/bundle.js.gz +0 -0
- package/dist/src/components/slider-input/slider-input.component.d.ts +11 -0
- package/dist/src/components/slider-input/slider-input.component.js +20 -8
- package/dist/src/components/slider-input/slider-input.style.js +47 -47
- package/dist/src/components/slider-input/slider-input.style.variables.js +32 -32
- package/dist/src/components/table/bundle.js +149 -128
- package/dist/src/components/table/bundle.js.gz +0 -0
- package/dist/src/components/table/table.component.d.ts +2 -1
- package/dist/src/components/table/table.component.js +1 -0
- package/dist/src/components/table/table.style.js +79 -79
- package/dist/src/components/tabs/bundle.js +462 -663
- package/dist/src/components/tabs/bundle.js.gz +0 -0
- package/dist/src/components/tabs/tabs.component.d.ts +6 -1
- package/dist/src/components/tabs/tabs.component.js +8 -1
- package/dist/src/components/tabs/tabs.style.js +200 -201
- package/dist/src/components/tag/bundle.js +44 -36
- package/dist/src/components/tag/bundle.js.gz +0 -0
- package/dist/src/components/tag/tag.component.d.ts +7 -6
- package/dist/src/components/tag/tag.component.js +10 -19
- package/dist/src/components/tag/tag.style.js +20 -24
- package/dist/src/components/textarea/bundle.js +131 -94
- package/dist/src/components/textarea/bundle.js.gz +0 -0
- package/dist/src/components/textarea/textarea.component.d.ts +7 -1
- package/dist/src/components/textarea/textarea.component.js +10 -3
- package/dist/src/components/textarea/textarea.style.d.ts +1 -13
- package/dist/src/components/textarea/textarea.style.js +79 -91
- package/dist/src/components/timeline/bundle.js +71 -134
- package/dist/src/components/timeline/bundle.js.gz +0 -0
- package/dist/src/components/timeline/timeline.component.d.ts +9 -6
- package/dist/src/components/timeline/timeline.component.js +16 -13
- package/dist/src/components/timeline/timeline.style.d.ts +0 -7
- package/dist/src/components/timeline/timeline.style.js +41 -122
- package/dist/src/components/timepicker/bundle.js +196 -166
- package/dist/src/components/timepicker/bundle.js.gz +0 -0
- package/dist/src/components/timepicker/timepicker.component.d.ts +2 -1
- package/dist/src/components/timepicker/timepicker.component.js +1 -0
- package/dist/src/components/timepicker/timepicker.style.js +42 -42
- package/dist/src/components/timepicker/timepicker.style.variables.js +91 -91
- package/dist/src/components/toast/bundle.js +97 -81
- package/dist/src/components/toast/bundle.js.gz +0 -0
- package/dist/src/components/toast/toast.component.d.ts +2 -1
- package/dist/src/components/toast/toast.component.js +1 -0
- package/dist/src/components/toast/toast.style.js +62 -62
- package/dist/src/components/tooltips/bundle.js +10 -10
- package/dist/src/components/tooltips/bundle.js.gz +0 -0
- package/dist/src/components/tooltips/tooltips.component.d.ts +8 -0
- package/dist/src/components/tooltips/tooltips.component.js +9 -1
- package/dist/src/components/tooltips/tooltips.style.js +6 -6
- package/dist/src/components/video/bundle.js +47 -36
- package/dist/src/components/video/bundle.js.gz +0 -0
- package/dist/src/components/video/video.component.d.ts +12 -1
- package/dist/src/components/video/video.component.js +18 -6
- package/dist/src/components/video/video.style.js +18 -24
- package/package.json +25 -12
- package/packages/common/dist/VERSIONS.md +2 -2
- package/packages/common/dist/shared/base-mixin.d.ts +21 -19
- package/packages/common/dist/shared/base-mixin.d.ts.map +1 -1
- package/packages/common/dist/shared/base-mixin.js +102 -18
- package/packages/common/dist/shared/base-mixin.js.map +1 -1
- package/packages/common/dist/shared/index.d.ts +1 -0
- package/packages/common/dist/shared/index.d.ts.map +1 -1
- package/packages/common/dist/shared/index.js +2 -0
- package/packages/common/dist/shared/index.js.map +1 -1
- package/packages/common/dist/shared/style-injector.d.ts +11 -0
- package/packages/common/dist/shared/style-injector.d.ts.map +1 -0
- package/packages/common/dist/shared/style-injector.js +53 -0
- package/packages/common/dist/shared/style-injector.js.map +1 -0
- package/packages/common/dist/shared/theme-mixin.d.ts +2 -24
- package/packages/common/dist/shared/theme-mixin.d.ts.map +1 -1
- package/packages/common/dist/shared/theme-mixin.js +5 -38
- package/packages/common/dist/shared/theme-mixin.js.map +1 -1
- package/packages/themes/dist/default.css +0 -10
- package/packages/themes/dist/package.json +1 -1
|
@@ -1,10 +1,26 @@
|
|
|
1
|
-
import{css as
|
|
1
|
+
import{css as t,html as e,LitElement as i}from"lit";import{property as r,customElement as s,state as o}from"lit/decorators.js";import{classMap as n}from"lit/directives/class-map.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
5
|
+
* SPDX-License-Identifier: MIT
|
|
6
|
+
*/const l=t=>class extends t{constructor(){super(...arguments),this.handleSystemThemeChange=()=>{this.closest("[data-theme]")||document.documentElement.hasAttribute("data-theme")||this.requestUpdate()}}connectedCallback(){super.connectedCallback(),this.setupThemeObserver(),this.setupDesignSystemObserver(),this.setupSystemThemeListener()}disconnectedCallback(){var t,e,i;super.disconnectedCallback(),null===(t=this.themeObserver)||void 0===t||t.disconnect(),null===(e=this.designSystemObserver)||void 0===e||e.disconnect(),null===(i=this.mediaQuery)||void 0===i||i.removeEventListener("change",this.handleSystemThemeChange)}get currentTheme(){var t,e;const i=(null===(t=this.closest("[data-theme]"))||void 0===t?void 0:t.getAttribute("data-theme"))||document.documentElement.getAttribute("data-theme");return i||((null===(e=window.matchMedia)||void 0===e?void 0:e.call(window,"(prefers-color-scheme: dark)").matches)?"dark":"light")}get currentDesignSystem(){var t;const e=(null===(t=this.closest("[design-system]"))||void 0===t?void 0:t.getAttribute("design-system"))||document.documentElement.getAttribute("design-system");return"carbon"===e?e:"default"}setupThemeObserver(){this.themeObserver=new MutationObserver(()=>{this.requestUpdate()}),this.themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}setupDesignSystemObserver(){this.designSystemObserver=new MutationObserver(()=>{this.requestUpdate()}),this.designSystemObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["design-system"]})}setupSystemThemeListener(){window.matchMedia&&(this.mediaQuery=window.matchMedia("(prefers-color-scheme: dark)"),this.mediaQuery.addEventListener("change",this.handleSystemThemeChange))}},d=()=>{var t;return void 0!==globalThis.litElementVersions||"undefined"!=typeof process&&"development"===(null===(t=process.env)||void 0===t?void 0:t.NODE_ENV)||"undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname)},a=t=>class extends t{constructor(){super(...arguments),this.requiredComponents=[]}validateDependencies(){if(d())for(const t of this.requiredComponents)if(!this.isComponentAvailable(t))throw new Error(`Required component "${t}" is not registered. Please import and register the component before using ${this.tagName.toLowerCase()}. Example: import '@nuralyui/${t}';`)}validateDependenciesWithHandler(t){if(!d())return!0;let e=!0;for(const i of this.requiredComponents)if(!this.isComponentAvailable(i)){e=!1;const r=new Error(`Required component "${i}" is not registered. Please import and register the component before using ${this.tagName.toLowerCase()}.`);t?t(i,r):console.error(r.message)}return e}isComponentAvailable(t){return!!customElements.get(t)}getMissingDependencies(){return this.requiredComponents.filter(t=>!this.isComponentAvailable(t))}areDependenciesAvailable(){return this.requiredComponents.every(t=>this.isComponentAvailable(t))}addRequiredComponent(t){this.requiredComponents.includes(t)||this.requiredComponents.push(t)}removeRequiredComponent(t){const e=this.requiredComponents.indexOf(t);e>-1&&this.requiredComponents.splice(e,1)}},h=t=>class extends t{dispatchCustomEvent(t,e){this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}dispatchEventWithMetadata(t,e){var i;const r=Object.assign(Object.assign({},e),{timestamp:Date.now(),componentName:(null===(i=this.tagName)||void 0===i?void 0:i.toLowerCase())||"unknown"});this.dispatchCustomEvent(t,r)}dispatchInputEvent(t,e){const i=Object.assign({target:e.target||this,value:e.value,originalEvent:e.originalEvent},e);this.dispatchCustomEvent(t,i)}dispatchFocusEvent(t,e){const i=Object.assign({target:e.target||this,value:e.value,focused:e.focused,cursorPosition:e.cursorPosition,selectedText:e.selectedText},e);this.dispatchCustomEvent(t,i)}dispatchValidationEvent(t,e){var i;const r=Object.assign({target:e.target||this,value:e.value,isValid:null!==(i=e.isValid)&&void 0!==i&&i,error:e.error},e);this.dispatchCustomEvent(t,r)}dispatchActionEvent(t,e){const i=Object.assign({target:e.target||this,action:e.action,previousValue:e.previousValue,newValue:e.newValue},e);this.dispatchCustomEvent(t,i)}isReadonlyKeyAllowed(t){if(t.ctrlKey||t.metaKey){return["KeyA","KeyC"].includes(t.code)}return["Tab","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(t.key)}isActivationKey(t){return"Enter"===t.key||" "===t.key}},c=new Set,u=new Map;
|
|
7
|
+
/**
|
|
8
|
+
* @license
|
|
9
|
+
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
10
|
+
* SPDX-License-Identifier: MIT
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* @license
|
|
14
|
+
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
15
|
+
* SPDX-License-Identifier: MIT
|
|
16
|
+
*/
|
|
17
|
+
const p=t=>{class e extends t{constructor(){super(...arguments),this.t=null}createRenderRoot(){return this.constructor.useShadowDom?super.createRenderRoot():this}connectedCallback(){const t=this.constructor.useShadowDom;if(!t&&null===this.t)for(this.t=[];this.firstChild;)this.t.push(this.removeChild(this.firstChild));if(super.connectedCallback(),!t){const t=this.constructor,e=this.tagName.toLowerCase(),i=t.styles;if(i){const t=g(i);t&&function(t,e,i){var r;if(!u.has(t)){const i=new CSSStyleSheet;i.replaceSync(e),u.set(t,i)}const s=u.get(t),o=`doc:${t}`;if(c.has(o)||(document.adoptedStyleSheets=[...document.adoptedStyleSheets,s],c.add(o)),i){let e=i;for(;e;){const i=e.getRootNode();if(!(i instanceof ShadowRoot))break;{const o=`shadow:${((null===(r=i.host)||void 0===r?void 0:r.tagName)||"").toLowerCase()}:${t}`;c.has(o)||(i.adoptedStyleSheets=[...i.adoptedStyleSheets,s],c.add(o)),e=i.host}}}}(e,t,this)}}}get lightChildren(){return this.t?this.t.filter(t=>!(t instanceof Element&&t.hasAttribute("slot"))):[]}lightChildrenNamed(t){return this.t?this.t.filter(e=>e instanceof Element&&e.getAttribute("slot")===t):[]}}return e.useShadowDom=!1,e},f=t=>a(l(h(p(t))));function g(t){return Array.isArray(t)?t.map(t=>g(t)).filter(Boolean).join("\n"):t&&"string"==typeof t.cssText?t.cssText:"string"==typeof t?t:""}const v=t`
|
|
2
18
|
:host {
|
|
3
19
|
display: flex;
|
|
4
20
|
flex: auto;
|
|
5
21
|
flex-direction: column;
|
|
6
22
|
min-height: 0;
|
|
7
|
-
background:
|
|
23
|
+
background: #ffffff;
|
|
8
24
|
}
|
|
9
25
|
|
|
10
26
|
:host([has-sider]) {
|
|
@@ -18,11 +34,11 @@ import{css as r,LitElement as t,html as e}from"lit";import{property as i,queryAs
|
|
|
18
34
|
min-height: 0;
|
|
19
35
|
width: 100%;
|
|
20
36
|
}
|
|
21
|
-
`;var
|
|
22
|
-
<div
|
|
23
|
-
<slot
|
|
37
|
+
`;var m=function(t,e,i,r){for(var s,o=arguments.length,n=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(o<3?s(n):o>3?s(e,i,n):s(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};let b=class extends(f(i)){constructor(){super(...arguments),this.hasSider=!1}connectedCallback(){super.connectedCallback(),this.detectSider()}updated(t){super.updated(t),this.detectSider()}detectSider(){const t=!!this.renderRoot.querySelector("nr-sider");this.hasSider!==t&&(this.hasSider=t)}render(){return e`
|
|
38
|
+
<div part="layout" class="nr-layout">
|
|
39
|
+
<slot></slot>
|
|
24
40
|
</div>
|
|
25
|
-
`}};
|
|
41
|
+
`}};b.styles=v,b.useShadowDom=!0,m([r({type:Boolean,reflect:!0,attribute:"has-sider"})],b.prototype,"hasSider",void 0),b=m([s("nr-layout")],b);const w=t`
|
|
26
42
|
:host {
|
|
27
43
|
display: block;
|
|
28
44
|
}
|
|
@@ -30,45 +46,45 @@ import{css as r,LitElement as t,html as e}from"lit";import{property as i,queryAs
|
|
|
30
46
|
.nr-header {
|
|
31
47
|
display: flex;
|
|
32
48
|
align-items: center;
|
|
33
|
-
padding:
|
|
34
|
-
height:
|
|
35
|
-
line-height:
|
|
36
|
-
background:
|
|
37
|
-
color:
|
|
38
|
-
border-bottom: 1px solid
|
|
39
|
-
transition:
|
|
40
|
-
}
|
|
41
|
-
`;var
|
|
42
|
-
<header
|
|
43
|
-
class="nr-header"
|
|
49
|
+
padding: 0 1.5rem;
|
|
50
|
+
height: 64px;
|
|
51
|
+
line-height: 64px;
|
|
52
|
+
background: #ffffff;
|
|
53
|
+
color: #161616;
|
|
54
|
+
border-bottom: 1px solid #e0e0e0;
|
|
55
|
+
transition: all 0.2s;
|
|
56
|
+
}
|
|
57
|
+
`;var x=function(t,e,i,r){for(var s,o=arguments.length,n=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(o<3?s(n):o>3?s(e,i,n):s(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};let y=class extends(f(i)){constructor(){super(...arguments),this.height="64px"}render(){return e`
|
|
58
|
+
<header
|
|
44
59
|
part="header"
|
|
60
|
+
class="nr-header"
|
|
45
61
|
style="height: ${this.height}"
|
|
46
62
|
>
|
|
47
63
|
<slot></slot>
|
|
48
64
|
</header>
|
|
49
|
-
`}};y.styles=
|
|
65
|
+
`}};y.styles=w,y.useShadowDom=!0,x([r({type:String})],y.prototype,"height",void 0),y=x([s("nr-header")],y);const k=t`
|
|
50
66
|
:host {
|
|
51
67
|
display: block;
|
|
52
68
|
}
|
|
53
69
|
|
|
54
70
|
.nr-footer {
|
|
55
|
-
padding:
|
|
56
|
-
background:
|
|
57
|
-
color:
|
|
58
|
-
border-top: 1px solid
|
|
59
|
-
font-size:
|
|
60
|
-
line-height:
|
|
61
|
-
transition:
|
|
62
|
-
}
|
|
63
|
-
`;var
|
|
64
|
-
<footer
|
|
65
|
-
class="nr-footer"
|
|
71
|
+
padding: 1rem 1.5rem;
|
|
72
|
+
background: #ffffff;
|
|
73
|
+
color: #161616;
|
|
74
|
+
border-top: 1px solid #e0e0e0;
|
|
75
|
+
font-size: 0.875rem;
|
|
76
|
+
line-height: 1.5;
|
|
77
|
+
transition: all 0.2s;
|
|
78
|
+
}
|
|
79
|
+
`;var O=function(t,e,i,r){for(var s,o=arguments.length,n=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(o<3?s(n):o>3?s(e,i,n):s(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};let C=class extends(f(i)){constructor(){super(...arguments),this.padding="24px 50px"}render(){return e`
|
|
80
|
+
<footer
|
|
66
81
|
part="footer"
|
|
82
|
+
class="nr-footer"
|
|
67
83
|
style="padding: ${this.padding}"
|
|
68
84
|
>
|
|
69
85
|
<slot></slot>
|
|
70
86
|
</footer>
|
|
71
|
-
`}};
|
|
87
|
+
`}};C.styles=k,C.useShadowDom=!0,O([r({type:String})],C.prototype,"padding",void 0),C=O([s("nr-footer")],C);const E=t`
|
|
72
88
|
:host {
|
|
73
89
|
display: block;
|
|
74
90
|
position: relative;
|
|
@@ -79,16 +95,16 @@ import{css as r,LitElement as t,html as e}from"lit";import{property as i,queryAs
|
|
|
79
95
|
display: flex;
|
|
80
96
|
flex-direction: column;
|
|
81
97
|
min-width: 0;
|
|
82
|
-
background:
|
|
83
|
-
color:
|
|
84
|
-
border-right: 1px solid
|
|
85
|
-
transition:
|
|
98
|
+
background: #161616;
|
|
99
|
+
color: #ffffff;
|
|
100
|
+
border-right: 1px solid #e0e0e0;
|
|
101
|
+
transition: all 0.2s;
|
|
86
102
|
}
|
|
87
103
|
|
|
88
104
|
:host([theme='light']) .nr-sider {
|
|
89
|
-
background:
|
|
90
|
-
color:
|
|
91
|
-
border-right: 1px solid
|
|
105
|
+
background: #ffffff;
|
|
106
|
+
color: #161616;
|
|
107
|
+
border-right: 1px solid #e0e0e0;
|
|
92
108
|
}
|
|
93
109
|
|
|
94
110
|
.nr-sider-children {
|
|
@@ -102,57 +118,57 @@ import{css as r,LitElement as t,html as e}from"lit";import{property as i,queryAs
|
|
|
102
118
|
bottom: 0;
|
|
103
119
|
left: 0;
|
|
104
120
|
right: 0;
|
|
105
|
-
height:
|
|
121
|
+
height: 48px;
|
|
106
122
|
display: flex;
|
|
107
123
|
align-items: center;
|
|
108
124
|
justify-content: center;
|
|
109
|
-
background:
|
|
110
|
-
color:
|
|
125
|
+
background: #1f1f1f;
|
|
126
|
+
color: #ffffff;
|
|
111
127
|
cursor: pointer;
|
|
112
|
-
transition:
|
|
113
|
-
border-top: 1px solid
|
|
114
|
-
border-radius:
|
|
128
|
+
transition: all 0.2s;
|
|
129
|
+
border-top: 1px solid #e0e0e0;
|
|
130
|
+
border-radius: 0;
|
|
115
131
|
}
|
|
116
132
|
|
|
117
133
|
:host([theme='light']) .nr-sider-trigger {
|
|
118
|
-
background:
|
|
119
|
-
color:
|
|
120
|
-
border-top: 1px solid
|
|
134
|
+
background: #f4f4f4;
|
|
135
|
+
color: #161616;
|
|
136
|
+
border-top: 1px solid #e0e0e0;
|
|
121
137
|
}
|
|
122
138
|
|
|
123
139
|
.nr-sider-trigger:hover {
|
|
124
|
-
background:
|
|
140
|
+
background: #333333;
|
|
125
141
|
}
|
|
126
142
|
|
|
127
143
|
:host([theme='light']) .nr-sider-trigger:hover {
|
|
128
|
-
background:
|
|
144
|
+
background: #e8e8e8;
|
|
129
145
|
}
|
|
130
146
|
|
|
131
147
|
.nr-sider-zero-width-trigger {
|
|
132
148
|
position: absolute;
|
|
133
149
|
top: 64px;
|
|
134
|
-
right: calc(-1 *
|
|
135
|
-
width:
|
|
136
|
-
height:
|
|
150
|
+
right: calc(-1 * 36px);
|
|
151
|
+
width: 36px;
|
|
152
|
+
height: 42px;
|
|
137
153
|
display: flex;
|
|
138
154
|
align-items: center;
|
|
139
155
|
justify-content: center;
|
|
140
|
-
background:
|
|
141
|
-
color:
|
|
156
|
+
background: #1f1f1f;
|
|
157
|
+
color: #ffffff;
|
|
142
158
|
cursor: pointer;
|
|
143
|
-
transition:
|
|
144
|
-
border-radius:
|
|
145
|
-
box-shadow:
|
|
159
|
+
transition: all 0.2s;
|
|
160
|
+
border-radius: 0 6px 6px 0;
|
|
161
|
+
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
|
|
146
162
|
z-index: 1;
|
|
147
163
|
}
|
|
148
164
|
|
|
149
165
|
:host([theme='light']) .nr-sider-zero-width-trigger {
|
|
150
|
-
background:
|
|
151
|
-
color:
|
|
166
|
+
background: #1f1f1f;
|
|
167
|
+
color: #ffffff;
|
|
152
168
|
}
|
|
153
169
|
|
|
154
170
|
.nr-sider-zero-width-trigger:hover {
|
|
155
|
-
background:
|
|
171
|
+
background: #333333;
|
|
156
172
|
}
|
|
157
173
|
|
|
158
174
|
.trigger-icon {
|
|
@@ -169,7 +185,7 @@ import{css as r,LitElement as t,html as e}from"lit";import{property as i,queryAs
|
|
|
169
185
|
min-width: 0 !important;
|
|
170
186
|
flex: 0 0 0 !important;
|
|
171
187
|
}
|
|
172
|
-
|
|
188
|
+
`,$={xs:480,sm:576,md:768,lg:992,xl:1200,xxl:1600};var j=function(t,e,i,r){for(var s,o=arguments.length,n=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(o<3?s(n):o>3?s(e,i,n):s(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};let S=class extends(f(i)){constructor(){super(...arguments),this.collapsed=!1,this.collapsedWidth=80,this.collapsible=!1,this.defaultCollapsed=!1,this.reverseArrow=!1,this.theme="dark",this.trigger="default",this.width=200,this.zeroWidthTriggerStyle="",this.belowBreakpoint=!1}connectedCallback(){super.connectedCallback(),this.defaultCollapsed&&!this.hasAttribute("collapsed")&&(this.collapsed=!0),this.breakpoint&&this.setupResizeObserver()}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.resizeObserver)||void 0===t||t.disconnect()}updated(t){var e;super.updated(t),t.has("breakpoint")&&(null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.breakpoint&&this.setupResizeObserver())}setupResizeObserver(){if(!this.breakpoint)return;const t=$[this.breakpoint];this.resizeObserver=new ResizeObserver(e=>{for(const i of e){const e=i.contentRect.width<t;e!==this.belowBreakpoint&&(this.belowBreakpoint=e,this.collapsible&&e!==this.collapsed&&(this.collapsed=e,this.dispatchCollapseEvent("responsive")),this.dispatchBreakpointEvent(e))}});const e=this.closest("nr-layout")||document.body;this.resizeObserver.observe(e)}toggleCollapse(){this.collapsed=!this.collapsed,this.dispatchCollapseEvent("clickTrigger")}dispatchCollapseEvent(t){this.dispatchEvent(new CustomEvent("collapse",{detail:{collapsed:this.collapsed,type:t},bubbles:!0,composed:!0}))}dispatchBreakpointEvent(t){this.dispatchEvent(new CustomEvent("breakpoint",{detail:{broken:t},bubbles:!0,composed:!0}))}getCurrentWidth(){return this.collapsed?`${this.collapsedWidth}px`:"number"==typeof this.width?`${this.width}px`:this.width.toString()}renderTrigger(){if(null===this.trigger||!this.collapsible)return null;return this.querySelector('[slot="trigger"]')?e`<slot name="trigger"></slot>`:0===this.collapsedWidth&&this.collapsed?e`
|
|
173
189
|
<div
|
|
174
190
|
class="nr-sider-zero-width-trigger"
|
|
175
191
|
part="trigger"
|
|
@@ -188,18 +204,18 @@ import{css as r,LitElement as t,html as e}from"lit";import{property as i,queryAs
|
|
|
188
204
|
${this.collapsed?this.reverseArrow?"◀":"▶":this.reverseArrow?"▶":"◀"}
|
|
189
205
|
</span>
|
|
190
206
|
</div>
|
|
191
|
-
`}render(){const
|
|
207
|
+
`}render(){const t={"nr-sider":!0,"nr-sider-collapsed":this.collapsed,"nr-sider-has-trigger":this.collapsible&&null!==this.trigger,"nr-sider-below-breakpoint":this.belowBreakpoint,"nr-sider-zero-width":this.collapsed&&0===this.collapsedWidth};return e`
|
|
192
208
|
<aside
|
|
193
|
-
class=${
|
|
209
|
+
class=${n(t)}
|
|
194
210
|
part="sider"
|
|
195
211
|
style="width: ${this.getCurrentWidth()}; flex: 0 0 ${this.getCurrentWidth()};"
|
|
196
212
|
>
|
|
197
|
-
<div class="nr-sider-children">
|
|
213
|
+
<div class="nr-sider-children" part="children">
|
|
198
214
|
<slot></slot>
|
|
199
215
|
</div>
|
|
200
216
|
${this.renderTrigger()}
|
|
201
217
|
</aside>
|
|
202
|
-
`}};
|
|
218
|
+
`}};S.styles=E,S.useShadowDom=!0,j([r({type:String})],S.prototype,"breakpoint",void 0),j([r({type:Boolean,reflect:!0})],S.prototype,"collapsed",void 0),j([r({type:Number,attribute:"collapsed-width"})],S.prototype,"collapsedWidth",void 0),j([r({type:Boolean})],S.prototype,"collapsible",void 0),j([r({type:Boolean,attribute:"default-collapsed"})],S.prototype,"defaultCollapsed",void 0),j([r({type:Boolean,attribute:"reverse-arrow"})],S.prototype,"reverseArrow",void 0),j([r({type:String,reflect:!0})],S.prototype,"theme",void 0),j([r({type:String})],S.prototype,"trigger",void 0),j([r({type:String})],S.prototype,"width",void 0),j([r({type:String,attribute:"zero-width-trigger-style"})],S.prototype,"zeroWidthTriggerStyle",void 0),j([o()],S.prototype,"belowBreakpoint",void 0),S=j([s("nr-sider")],S);const z=t`
|
|
203
219
|
:host {
|
|
204
220
|
display: block;
|
|
205
221
|
flex: auto;
|
|
@@ -209,12 +225,12 @@ import{css as r,LitElement as t,html as e}from"lit";import{property as i,queryAs
|
|
|
209
225
|
.nr-content {
|
|
210
226
|
flex: auto;
|
|
211
227
|
min-height: 0;
|
|
212
|
-
background:
|
|
213
|
-
color:
|
|
214
|
-
transition:
|
|
228
|
+
background: #f4f4f4;
|
|
229
|
+
color: #161616;
|
|
230
|
+
transition: all 0.2s;
|
|
215
231
|
}
|
|
216
|
-
`;var
|
|
217
|
-
<main
|
|
232
|
+
`;var A=function(t,e,i,r){for(var s,o=arguments.length,n=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(o<3?s(n):o>3?s(e,i,n):s(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};let R=class extends(f(i)){render(){return e`
|
|
233
|
+
<main part="content" class="nr-content">
|
|
218
234
|
<slot></slot>
|
|
219
235
|
</main>
|
|
220
|
-
`}};
|
|
236
|
+
`}};R.styles=z,R.useShadowDom=!0,R=A([s("nr-content")],R);export{$ as BREAKPOINT_VALUES,R as NrContentElement,C as NrFooterElement,y as NrHeaderElement,b as NrLayoutElement,S as NrSiderElement};
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
declare const NrContentElement_base: (new (...args: any[]) => import("@nuralyui/common/mixins").DependencyAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").ThemeAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").EventHandlerCapable) & typeof LitElement;
|
|
2
|
+
declare const NrContentElement_base: (new (...args: any[]) => import("@nuralyui/common/mixins").DependencyAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").ThemeAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").EventHandlerCapable) & (new (...args: any[]) => import("packages/common/src/shared/base-mixin.js").LightDomContent) & typeof LitElement;
|
|
3
3
|
/**
|
|
4
4
|
* # Content Component
|
|
5
5
|
*
|
|
@@ -24,6 +24,7 @@ declare const NrContentElement_base: (new (...args: any[]) => import("@nuralyui/
|
|
|
24
24
|
*/
|
|
25
25
|
export declare class NrContentElement extends NrContentElement_base {
|
|
26
26
|
static styles: import("lit").CSSResult;
|
|
27
|
+
static useShadowDom: boolean;
|
|
27
28
|
render(): import("lit-html").TemplateResult<1>;
|
|
28
29
|
}
|
|
29
30
|
declare global {
|
|
@@ -33,13 +33,14 @@ import { contentStyles } from './content.style.js';
|
|
|
33
33
|
let NrContentElement = class NrContentElement extends NuralyUIBaseMixin(LitElement) {
|
|
34
34
|
render() {
|
|
35
35
|
return html `
|
|
36
|
-
<main
|
|
36
|
+
<main part="content" class="nr-content">
|
|
37
37
|
<slot></slot>
|
|
38
38
|
</main>
|
|
39
39
|
`;
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
NrContentElement.styles = contentStyles;
|
|
43
|
+
NrContentElement.useShadowDom = true;
|
|
43
44
|
NrContentElement = __decorate([
|
|
44
45
|
customElement('nr-content')
|
|
45
46
|
], NrContentElement);
|
|
@@ -9,9 +9,9 @@ export const contentStyles = css `
|
|
|
9
9
|
.nr-content {
|
|
10
10
|
flex: auto;
|
|
11
11
|
min-height: 0;
|
|
12
|
-
background:
|
|
13
|
-
color:
|
|
14
|
-
transition:
|
|
12
|
+
background: #f4f4f4;
|
|
13
|
+
color: #161616;
|
|
14
|
+
transition: all 0.2s;
|
|
15
15
|
}
|
|
16
16
|
`;
|
|
17
17
|
//# sourceMappingURL=content.style.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
declare const NrFooterElement_base: (new (...args: any[]) => import("@nuralyui/common/mixins").DependencyAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").ThemeAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").EventHandlerCapable) & typeof LitElement;
|
|
2
|
+
declare const NrFooterElement_base: (new (...args: any[]) => import("@nuralyui/common/mixins").DependencyAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").ThemeAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").EventHandlerCapable) & (new (...args: any[]) => import("packages/common/src/shared/base-mixin.js").LightDomContent) & typeof LitElement;
|
|
3
3
|
/**
|
|
4
4
|
* # Footer Component
|
|
5
5
|
*
|
|
@@ -23,6 +23,7 @@ declare const NrFooterElement_base: (new (...args: any[]) => import("@nuralyui/c
|
|
|
23
23
|
*/
|
|
24
24
|
export declare class NrFooterElement extends NrFooterElement_base {
|
|
25
25
|
static styles: import("lit").CSSResult;
|
|
26
|
+
static useShadowDom: boolean;
|
|
26
27
|
/**
|
|
27
28
|
* Padding of the footer. Default is "24px 50px".
|
|
28
29
|
*/
|
|
@@ -39,9 +39,9 @@ let NrFooterElement = class NrFooterElement extends NuralyUIBaseMixin(LitElement
|
|
|
39
39
|
}
|
|
40
40
|
render() {
|
|
41
41
|
return html `
|
|
42
|
-
<footer
|
|
43
|
-
class="nr-footer"
|
|
42
|
+
<footer
|
|
44
43
|
part="footer"
|
|
44
|
+
class="nr-footer"
|
|
45
45
|
style="padding: ${this.padding}"
|
|
46
46
|
>
|
|
47
47
|
<slot></slot>
|
|
@@ -50,6 +50,7 @@ let NrFooterElement = class NrFooterElement extends NuralyUIBaseMixin(LitElement
|
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
NrFooterElement.styles = footerStyles;
|
|
53
|
+
NrFooterElement.useShadowDom = true;
|
|
53
54
|
__decorate([
|
|
54
55
|
property({ type: String })
|
|
55
56
|
], NrFooterElement.prototype, "padding", void 0);
|
|
@@ -5,13 +5,13 @@ export const footerStyles = css `
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.nr-footer {
|
|
8
|
-
padding:
|
|
9
|
-
background:
|
|
10
|
-
color:
|
|
11
|
-
border-top: 1px solid
|
|
12
|
-
font-size:
|
|
13
|
-
line-height:
|
|
14
|
-
transition:
|
|
8
|
+
padding: 1rem 1.5rem;
|
|
9
|
+
background: #ffffff;
|
|
10
|
+
color: #161616;
|
|
11
|
+
border-top: 1px solid #e0e0e0;
|
|
12
|
+
font-size: 0.875rem;
|
|
13
|
+
line-height: 1.5;
|
|
14
|
+
transition: all 0.2s;
|
|
15
15
|
}
|
|
16
16
|
`;
|
|
17
17
|
//# sourceMappingURL=footer.style.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
declare const NrHeaderElement_base: (new (...args: any[]) => import("@nuralyui/common/mixins").DependencyAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").ThemeAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").EventHandlerCapable) & typeof LitElement;
|
|
2
|
+
declare const NrHeaderElement_base: (new (...args: any[]) => import("@nuralyui/common/mixins").DependencyAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").ThemeAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").EventHandlerCapable) & (new (...args: any[]) => import("packages/common/src/shared/base-mixin.js").LightDomContent) & typeof LitElement;
|
|
3
3
|
/**
|
|
4
4
|
* # Header Component
|
|
5
5
|
*
|
|
@@ -24,6 +24,7 @@ declare const NrHeaderElement_base: (new (...args: any[]) => import("@nuralyui/c
|
|
|
24
24
|
*/
|
|
25
25
|
export declare class NrHeaderElement extends NrHeaderElement_base {
|
|
26
26
|
static styles: import("lit").CSSResult;
|
|
27
|
+
static useShadowDom: boolean;
|
|
27
28
|
/**
|
|
28
29
|
* Height of the header. Default is 64px.
|
|
29
30
|
*/
|
|
@@ -40,9 +40,9 @@ let NrHeaderElement = class NrHeaderElement extends NuralyUIBaseMixin(LitElement
|
|
|
40
40
|
}
|
|
41
41
|
render() {
|
|
42
42
|
return html `
|
|
43
|
-
<header
|
|
44
|
-
class="nr-header"
|
|
43
|
+
<header
|
|
45
44
|
part="header"
|
|
45
|
+
class="nr-header"
|
|
46
46
|
style="height: ${this.height}"
|
|
47
47
|
>
|
|
48
48
|
<slot></slot>
|
|
@@ -51,6 +51,7 @@ let NrHeaderElement = class NrHeaderElement extends NuralyUIBaseMixin(LitElement
|
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
NrHeaderElement.styles = headerStyles;
|
|
54
|
+
NrHeaderElement.useShadowDom = true;
|
|
54
55
|
__decorate([
|
|
55
56
|
property({ type: String })
|
|
56
57
|
], NrHeaderElement.prototype, "height", void 0);
|
|
@@ -7,13 +7,13 @@ export const headerStyles = css `
|
|
|
7
7
|
.nr-header {
|
|
8
8
|
display: flex;
|
|
9
9
|
align-items: center;
|
|
10
|
-
padding:
|
|
11
|
-
height:
|
|
12
|
-
line-height:
|
|
13
|
-
background:
|
|
14
|
-
color:
|
|
15
|
-
border-bottom: 1px solid
|
|
16
|
-
transition:
|
|
10
|
+
padding: 0 1.5rem;
|
|
11
|
+
height: 64px;
|
|
12
|
+
line-height: 64px;
|
|
13
|
+
background: #ffffff;
|
|
14
|
+
color: #161616;
|
|
15
|
+
border-bottom: 1px solid #e0e0e0;
|
|
16
|
+
transition: all 0.2s;
|
|
17
17
|
}
|
|
18
18
|
`;
|
|
19
19
|
//# sourceMappingURL=header.style.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
declare const NrLayoutElement_base: (new (...args: any[]) => import("@nuralyui/common/mixins").DependencyAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").ThemeAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").EventHandlerCapable) & typeof LitElement;
|
|
2
|
+
declare const NrLayoutElement_base: (new (...args: any[]) => import("@nuralyui/common/mixins").DependencyAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").ThemeAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").EventHandlerCapable) & (new (...args: any[]) => import("packages/common/src/shared/base-mixin.js").LightDomContent) & typeof LitElement;
|
|
3
3
|
/**
|
|
4
4
|
* # Layout Component
|
|
5
5
|
*
|
|
@@ -10,8 +10,6 @@ declare const NrLayoutElement_base: (new (...args: any[]) => import("@nuralyui/c
|
|
|
10
10
|
*
|
|
11
11
|
* @slot - Default slot for layout children (Header, Sider, Content, Footer, or nested Layout)
|
|
12
12
|
*
|
|
13
|
-
* @csspart layout - The layout container element
|
|
14
|
-
*
|
|
15
13
|
* @example
|
|
16
14
|
* ```html
|
|
17
15
|
* <nr-layout>
|
|
@@ -20,9 +18,12 @@ declare const NrLayoutElement_base: (new (...args: any[]) => import("@nuralyui/c
|
|
|
20
18
|
* <nr-footer>Footer</nr-footer>
|
|
21
19
|
* </nr-layout>
|
|
22
20
|
* ```
|
|
21
|
+
*
|
|
22
|
+
* @csspart layout - The root div wrapping all slotted layout children
|
|
23
23
|
*/
|
|
24
24
|
export declare class NrLayoutElement extends NrLayoutElement_base {
|
|
25
25
|
static styles: import("lit").CSSResult;
|
|
26
|
+
static useShadowDom: boolean;
|
|
26
27
|
/**
|
|
27
28
|
* Whether the layout contains a Sider component.
|
|
28
29
|
* When true, the layout uses horizontal flex direction.
|
|
@@ -35,10 +36,6 @@ export declare class NrLayoutElement extends NrLayoutElement_base {
|
|
|
35
36
|
* Detects if the layout has a Sider component as a direct child
|
|
36
37
|
*/
|
|
37
38
|
private detectSider;
|
|
38
|
-
/**
|
|
39
|
-
* Handles slot changes to re-detect sider elements
|
|
40
|
-
*/
|
|
41
|
-
private handleSlotChange;
|
|
42
39
|
render(): import("lit-html").TemplateResult<1>;
|
|
43
40
|
}
|
|
44
41
|
declare global {
|
|
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { LitElement, html } from 'lit';
|
|
8
|
-
import { customElement, property
|
|
8
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
9
9
|
import { NuralyUIBaseMixin } from '@nuralyui/common/mixins';
|
|
10
10
|
import { layoutStyles } from './layout.style.js';
|
|
11
11
|
/**
|
|
@@ -18,8 +18,6 @@ import { layoutStyles } from './layout.style.js';
|
|
|
18
18
|
*
|
|
19
19
|
* @slot - Default slot for layout children (Header, Sider, Content, Footer, or nested Layout)
|
|
20
20
|
*
|
|
21
|
-
* @csspart layout - The layout container element
|
|
22
|
-
*
|
|
23
21
|
* @example
|
|
24
22
|
* ```html
|
|
25
23
|
* <nr-layout>
|
|
@@ -28,6 +26,8 @@ import { layoutStyles } from './layout.style.js';
|
|
|
28
26
|
* <nr-footer>Footer</nr-footer>
|
|
29
27
|
* </nr-layout>
|
|
30
28
|
* ```
|
|
29
|
+
*
|
|
30
|
+
* @csspart layout - The root div wrapping all slotted layout children
|
|
31
31
|
*/
|
|
32
32
|
let NrLayoutElement = class NrLayoutElement extends NuralyUIBaseMixin(LitElement) {
|
|
33
33
|
constructor() {
|
|
@@ -51,37 +51,24 @@ let NrLayoutElement = class NrLayoutElement extends NuralyUIBaseMixin(LitElement
|
|
|
51
51
|
* Detects if the layout has a Sider component as a direct child
|
|
52
52
|
*/
|
|
53
53
|
detectSider() {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const assignedElements = slot.assignedElements();
|
|
58
|
-
const hasSiderElement = assignedElements.some((el) => el.tagName.toLowerCase() === 'nr-sider');
|
|
59
|
-
if (this.hasSider !== hasSiderElement) {
|
|
60
|
-
this.hasSider = hasSiderElement;
|
|
61
|
-
}
|
|
54
|
+
const hasSiderElement = !!this.renderRoot.querySelector('nr-sider');
|
|
55
|
+
if (this.hasSider !== hasSiderElement) {
|
|
56
|
+
this.hasSider = hasSiderElement;
|
|
62
57
|
}
|
|
63
58
|
}
|
|
64
|
-
/**
|
|
65
|
-
* Handles slot changes to re-detect sider elements
|
|
66
|
-
*/
|
|
67
|
-
handleSlotChange() {
|
|
68
|
-
this.detectSider();
|
|
69
|
-
}
|
|
70
59
|
render() {
|
|
71
60
|
return html `
|
|
72
|
-
<div
|
|
73
|
-
<slot
|
|
61
|
+
<div part="layout" class="nr-layout">
|
|
62
|
+
<slot></slot>
|
|
74
63
|
</div>
|
|
75
64
|
`;
|
|
76
65
|
}
|
|
77
66
|
};
|
|
78
67
|
NrLayoutElement.styles = layoutStyles;
|
|
68
|
+
NrLayoutElement.useShadowDom = true;
|
|
79
69
|
__decorate([
|
|
80
70
|
property({ type: Boolean, reflect: true, attribute: 'has-sider' })
|
|
81
71
|
], NrLayoutElement.prototype, "hasSider", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
queryAssignedElements({ selector: 'nr-sider' })
|
|
84
|
-
], NrLayoutElement.prototype, "connectedCallback", null);
|
|
85
72
|
NrLayoutElement = __decorate([
|
|
86
73
|
customElement('nr-layout')
|
|
87
74
|
], NrLayoutElement);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement, type PropertyValues } from 'lit';
|
|
2
2
|
import { LayoutBreakpoint, SiderTheme } from './layout.types.js';
|
|
3
|
-
declare const NrSiderElement_base: (new (...args: any[]) => import("@nuralyui/common/mixins").DependencyAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").ThemeAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").EventHandlerCapable) & typeof LitElement;
|
|
3
|
+
declare const NrSiderElement_base: (new (...args: any[]) => import("@nuralyui/common/mixins").DependencyAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").ThemeAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").EventHandlerCapable) & (new (...args: any[]) => import("packages/common/src/shared/base-mixin.js").LightDomContent) & typeof LitElement;
|
|
4
4
|
/**
|
|
5
5
|
* # Sider Component
|
|
6
6
|
*
|
|
@@ -17,6 +17,7 @@ declare const NrSiderElement_base: (new (...args: any[]) => import("@nuralyui/co
|
|
|
17
17
|
*
|
|
18
18
|
* @csspart sider - The sider container element
|
|
19
19
|
* @csspart trigger - The collapse trigger element
|
|
20
|
+
* @csspart children - The inner content wrapper div
|
|
20
21
|
*
|
|
21
22
|
* @example
|
|
22
23
|
* ```html
|
|
@@ -30,6 +31,7 @@ declare const NrSiderElement_base: (new (...args: any[]) => import("@nuralyui/co
|
|
|
30
31
|
*/
|
|
31
32
|
export declare class NrSiderElement extends NrSiderElement_base {
|
|
32
33
|
static styles: import("lit").CSSResult;
|
|
34
|
+
static useShadowDom: boolean;
|
|
33
35
|
/**
|
|
34
36
|
* Breakpoint for responsive collapsing
|
|
35
37
|
*/
|
|
@@ -26,6 +26,7 @@ import { BREAKPOINT_VALUES, } from './layout.types.js';
|
|
|
26
26
|
*
|
|
27
27
|
* @csspart sider - The sider container element
|
|
28
28
|
* @csspart trigger - The collapse trigger element
|
|
29
|
+
* @csspart children - The inner content wrapper div
|
|
29
30
|
*
|
|
30
31
|
* @example
|
|
31
32
|
* ```html
|
|
@@ -224,7 +225,7 @@ let NrSiderElement = class NrSiderElement extends NuralyUIBaseMixin(LitElement)
|
|
|
224
225
|
part="sider"
|
|
225
226
|
style="width: ${this.getCurrentWidth()}; flex: 0 0 ${this.getCurrentWidth()};"
|
|
226
227
|
>
|
|
227
|
-
<div class="nr-sider-children">
|
|
228
|
+
<div class="nr-sider-children" part="children">
|
|
228
229
|
<slot></slot>
|
|
229
230
|
</div>
|
|
230
231
|
${this.renderTrigger()}
|
|
@@ -233,6 +234,7 @@ let NrSiderElement = class NrSiderElement extends NuralyUIBaseMixin(LitElement)
|
|
|
233
234
|
}
|
|
234
235
|
};
|
|
235
236
|
NrSiderElement.styles = siderStyles;
|
|
237
|
+
NrSiderElement.useShadowDom = true;
|
|
236
238
|
__decorate([
|
|
237
239
|
property({ type: String })
|
|
238
240
|
], NrSiderElement.prototype, "breakpoint", void 0);
|