@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,15 +1,15 @@
|
|
|
1
|
-
import{css as e,
|
|
1
|
+
import{css as e,html as t,nothing as i,LitElement as n}from"lit";import{property as r,customElement as o}from"lit/decorators.js";import{classMap as s}from"lit/directives/class-map.js";import{map as l}from"lit/directives/map.js";import{styleMap as a}from"lit/directives/style-map.js";import{ifDefined as d}from"lit/directives/if-defined.js";
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
5
5
|
* SPDX-License-Identifier: MIT
|
|
6
|
-
*/const
|
|
6
|
+
*/const m=e`
|
|
7
7
|
:host {
|
|
8
8
|
display: block;
|
|
9
|
-
font-family:
|
|
10
|
-
font-size:
|
|
9
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
|
|
10
|
+
font-size: 14px;
|
|
11
11
|
line-height: 1.5715;
|
|
12
|
-
color: var(--
|
|
12
|
+
color: var(--nr-text, #161616);
|
|
13
13
|
min-height: 0;
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -19,137 +19,90 @@ import{css as e,LitElement as t,html as i,nothing as l}from"lit";import{property
|
|
|
19
19
|
list-style: none;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
/* Timeline Item */
|
|
23
22
|
.timeline-item {
|
|
24
23
|
position: relative;
|
|
25
|
-
padding-bottom:
|
|
24
|
+
padding-bottom: 20px;
|
|
26
25
|
list-style: none;
|
|
27
26
|
}
|
|
27
|
+
.timeline-item:last-child { padding-bottom: 0; }
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
padding-bottom: 0;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/* Timeline Tail (connecting line) */
|
|
29
|
+
/* Tail */
|
|
34
30
|
.timeline-item-tail {
|
|
35
31
|
position: absolute;
|
|
36
32
|
top: 10px;
|
|
37
33
|
left: 4px;
|
|
38
34
|
height: calc(100% - 10px);
|
|
39
|
-
border-left:
|
|
35
|
+
border-left: 2px solid rgba(5, 5, 5, 0.06);
|
|
40
36
|
}
|
|
37
|
+
.timeline-item:last-child .timeline-item-tail { display: none; }
|
|
38
|
+
.timeline-item.pending .timeline-item-tail { display: block; }
|
|
41
39
|
|
|
42
|
-
|
|
43
|
-
display: none;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.timeline-item.pending .timeline-item-tail {
|
|
47
|
-
display: block;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/* Timeline Head (dot container) */
|
|
40
|
+
/* Dot */
|
|
51
41
|
.timeline-item-head {
|
|
52
42
|
position: absolute;
|
|
53
43
|
top: 5.5px;
|
|
54
44
|
left: 0;
|
|
55
45
|
width: 10px;
|
|
56
46
|
height: 10px;
|
|
57
|
-
background-color: var(--
|
|
58
|
-
border:
|
|
47
|
+
background-color: var(--nr-bg, #ffffff);
|
|
48
|
+
border: 2px solid transparent;
|
|
59
49
|
border-radius: 50%;
|
|
60
50
|
}
|
|
61
51
|
|
|
62
|
-
|
|
63
|
-
.timeline-item-head.
|
|
64
|
-
|
|
65
|
-
}
|
|
52
|
+
.timeline-item-head.blue { border-color: var(--nr-primary, #7c3aed); }
|
|
53
|
+
.timeline-item-head.red { border-color: var(--nr-danger, #da1e28); }
|
|
54
|
+
.timeline-item-head.green { border-color: var(--nr-success, #198038); }
|
|
55
|
+
.timeline-item-head.gray { border-color: var(--nr-disabled, #c6c6c6); }
|
|
66
56
|
|
|
67
|
-
|
|
68
|
-
border-color: var(--nuraly-color-error, #ff4d4f);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.timeline-item-head.green {
|
|
72
|
-
border-color: var(--nuraly-color-success, #52c41a);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.timeline-item-head.gray {
|
|
76
|
-
border-color: var(--nuraly-color-text-disabled, #d9d9d9);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/* Custom Head (with icon or custom content) */
|
|
57
|
+
/* Custom head (icon) */
|
|
80
58
|
.timeline-item-head-custom {
|
|
81
59
|
position: absolute;
|
|
82
|
-
top:
|
|
83
|
-
left:
|
|
60
|
+
top: 10px;
|
|
61
|
+
left: 5px;
|
|
84
62
|
width: auto;
|
|
85
63
|
height: auto;
|
|
86
|
-
margin-top: 0;
|
|
87
64
|
padding: 3px 1px;
|
|
88
65
|
line-height: 1;
|
|
89
66
|
text-align: center;
|
|
90
67
|
border: 0;
|
|
91
68
|
border-radius: 0;
|
|
92
69
|
transform: translate(-50%, -50%);
|
|
93
|
-
top: 10px;
|
|
94
|
-
left: 5px;
|
|
95
70
|
}
|
|
96
|
-
|
|
97
71
|
.timeline-item-head-custom nr-icon {
|
|
98
72
|
font-size: 16px;
|
|
99
73
|
vertical-align: middle;
|
|
100
74
|
}
|
|
101
75
|
|
|
102
|
-
/*
|
|
76
|
+
/* Content */
|
|
103
77
|
.timeline-item-content {
|
|
104
78
|
position: relative;
|
|
105
79
|
margin: 0 0 0 26px;
|
|
106
80
|
word-break: break-word;
|
|
107
81
|
}
|
|
108
82
|
|
|
109
|
-
/*
|
|
83
|
+
/* Label */
|
|
110
84
|
.timeline-item-label {
|
|
111
85
|
position: absolute;
|
|
112
|
-
top: calc(-1 *
|
|
86
|
+
top: calc(-1 * 14px * 1.5715 / 2);
|
|
113
87
|
width: calc(50% - 12px);
|
|
114
88
|
text-align: right;
|
|
115
|
-
color: var(--
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/* Pending Item */
|
|
119
|
-
.timeline-item.pending .timeline-item-head {
|
|
120
|
-
border-color: var(--nuraly-color-primary, #1890ff);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.timeline-item.pending .timeline-item-content {
|
|
124
|
-
color: var(--nuraly-color-text-secondary, rgba(0, 0, 0, 0.45));
|
|
89
|
+
color: var(--nr-text-secondary, #525252);
|
|
125
90
|
}
|
|
126
91
|
|
|
127
|
-
/*
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
right: 4px;
|
|
131
|
-
}
|
|
92
|
+
/* Pending */
|
|
93
|
+
.timeline-item.pending .timeline-item-head { border-color: var(--nr-primary, #7c3aed); }
|
|
94
|
+
.timeline-item.pending .timeline-item-content { color: var(--nr-text-secondary, #525252); }
|
|
132
95
|
|
|
96
|
+
/* Right mode */
|
|
97
|
+
:host([mode="right"]) .timeline-item-tail { left: auto; right: 4px; }
|
|
133
98
|
:host([mode="right"]) .timeline-item-head,
|
|
134
|
-
:host([mode="right"]) .timeline-item-head-custom {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
:host([mode="right"]) .timeline-item-head-custom {
|
|
140
|
-
right: 5px;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
:host([mode="right"]) .timeline-item-content {
|
|
144
|
-
margin: 0 26px 0 0;
|
|
145
|
-
text-align: right;
|
|
146
|
-
}
|
|
99
|
+
:host([mode="right"]) .timeline-item-head-custom { left: auto; right: 0; }
|
|
100
|
+
:host([mode="right"]) .timeline-item-head-custom { right: 5px; }
|
|
101
|
+
:host([mode="right"]) .timeline-item-content { margin: 0 26px 0 0; text-align: right; }
|
|
147
102
|
|
|
148
|
-
/* Alternate
|
|
103
|
+
/* Alternate mode */
|
|
149
104
|
:host([mode="alternate"]) .timeline,
|
|
150
|
-
:host([mode="alternate"]) .timeline-item {
|
|
151
|
-
display: block;
|
|
152
|
-
}
|
|
105
|
+
:host([mode="alternate"]) .timeline-item { display: block; }
|
|
153
106
|
|
|
154
107
|
:host([mode="alternate"]) .timeline-item-tail,
|
|
155
108
|
:host([mode="alternate"]) .timeline-item-head,
|
|
@@ -157,21 +110,14 @@ import{css as e,LitElement as t,html as i,nothing as l}from"lit";import{property
|
|
|
157
110
|
left: 50%;
|
|
158
111
|
margin-left: -1px;
|
|
159
112
|
}
|
|
160
|
-
|
|
161
|
-
:host([mode="alternate"]) .timeline-item-head {
|
|
162
|
-
margin-left: -5px;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
:host([mode="alternate"]) .timeline-item-head-custom {
|
|
166
|
-
margin-left: -5px;
|
|
167
|
-
}
|
|
113
|
+
:host([mode="alternate"]) .timeline-item-head { margin-left: -5px; }
|
|
114
|
+
:host([mode="alternate"]) .timeline-item-head-custom { margin-left: -5px; }
|
|
168
115
|
|
|
169
116
|
:host([mode="alternate"]) .timeline-item-left .timeline-item-content {
|
|
170
117
|
left: calc(50% - 4px);
|
|
171
118
|
width: calc(50% - 14px);
|
|
172
119
|
text-align: left;
|
|
173
120
|
}
|
|
174
|
-
|
|
175
121
|
:host([mode="alternate"]) .timeline-item-right .timeline-item-content {
|
|
176
122
|
left: auto;
|
|
177
123
|
right: calc(50% - 4px);
|
|
@@ -179,83 +125,74 @@ import{css as e,LitElement as t,html as i,nothing as l}from"lit";import{property
|
|
|
179
125
|
text-align: right;
|
|
180
126
|
}
|
|
181
127
|
|
|
182
|
-
/* Alternate with Label */
|
|
183
128
|
:host([mode="alternate"]) .timeline-item-left .timeline-item-label {
|
|
184
129
|
left: calc(50% + 14px);
|
|
185
130
|
width: calc(50% - 14px);
|
|
186
131
|
text-align: left;
|
|
187
132
|
}
|
|
188
|
-
|
|
189
133
|
:host([mode="alternate"]) .timeline-item-right .timeline-item-label {
|
|
190
134
|
right: calc(50% + 14px);
|
|
191
135
|
width: calc(50% - 14px);
|
|
192
136
|
text-align: right;
|
|
193
137
|
}
|
|
194
138
|
|
|
195
|
-
/* Reverse
|
|
139
|
+
/* Reverse */
|
|
196
140
|
:host([reverse]) .timeline {
|
|
197
141
|
display: flex;
|
|
198
142
|
flex-direction: column-reverse;
|
|
199
143
|
}
|
|
200
144
|
|
|
201
|
-
/* RTL
|
|
202
|
-
:host([dir="rtl"]) .timeline-item-tail {
|
|
203
|
-
left: auto;
|
|
204
|
-
right: 4px;
|
|
205
|
-
}
|
|
206
|
-
|
|
145
|
+
/* RTL */
|
|
146
|
+
:host([dir="rtl"]) .timeline-item-tail { left: auto; right: 4px; }
|
|
207
147
|
:host([dir="rtl"]) .timeline-item-head,
|
|
208
|
-
:host([dir="rtl"]) .timeline-item-head-custom {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
:host([dir="rtl"]) .timeline-item-content {
|
|
214
|
-
margin: 0 26px 0 0;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
:host([dir="rtl"]) .timeline-item-label {
|
|
218
|
-
text-align: left;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/* Dark theme support */
|
|
222
|
-
:host([data-theme*="dark"]) .timeline-item-tail {
|
|
223
|
-
border-color: var(--nuraly-timeline-tail-color, rgba(255, 255, 255, 0.12));
|
|
224
|
-
}
|
|
148
|
+
:host([dir="rtl"]) .timeline-item-head-custom { left: auto; right: 0; }
|
|
149
|
+
:host([dir="rtl"]) .timeline-item-content { margin: 0 26px 0 0; }
|
|
150
|
+
:host([dir="rtl"]) .timeline-item-label { text-align: left; }
|
|
225
151
|
`
|
|
226
152
|
/**
|
|
227
153
|
* @license
|
|
228
154
|
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
229
155
|
* SPDX-License-Identifier: MIT
|
|
230
|
-
|
|
231
|
-
|
|
156
|
+
*/,h=e=>class extends e{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 e,t,i;super.disconnectedCallback(),null===(e=this.themeObserver)||void 0===e||e.disconnect(),null===(t=this.designSystemObserver)||void 0===t||t.disconnect(),null===(i=this.mediaQuery)||void 0===i||i.removeEventListener("change",this.handleSystemThemeChange)}get currentTheme(){var e,t;const i=(null===(e=this.closest("[data-theme]"))||void 0===e?void 0:e.getAttribute("data-theme"))||document.documentElement.getAttribute("data-theme");return i||((null===(t=window.matchMedia)||void 0===t?void 0:t.call(window,"(prefers-color-scheme: dark)").matches)?"dark":"light")}get currentDesignSystem(){var e;const t=(null===(e=this.closest("[design-system]"))||void 0===e?void 0:e.getAttribute("design-system"))||document.documentElement.getAttribute("design-system");return"carbon"===t?t:"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))}},c=()=>{var e;return void 0!==globalThis.litElementVersions||"undefined"!=typeof process&&"development"===(null===(e=process.env)||void 0===e?void 0:e.NODE_ENV)||"undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname)},p=e=>class extends e{constructor(){super(...arguments),this.requiredComponents=[]}validateDependencies(){if(c())for(const e of this.requiredComponents)if(!this.isComponentAvailable(e))throw new Error(`Required component "${e}" is not registered. Please import and register the component before using ${this.tagName.toLowerCase()}. Example: import '@nuralyui/${e}';`)}validateDependenciesWithHandler(e){if(!c())return!0;let t=!0;for(const i of this.requiredComponents)if(!this.isComponentAvailable(i)){t=!1;const n=new Error(`Required component "${i}" is not registered. Please import and register the component before using ${this.tagName.toLowerCase()}.`);e?e(i,n):console.error(n.message)}return t}isComponentAvailable(e){return!!customElements.get(e)}getMissingDependencies(){return this.requiredComponents.filter(e=>!this.isComponentAvailable(e))}areDependenciesAvailable(){return this.requiredComponents.every(e=>this.isComponentAvailable(e))}addRequiredComponent(e){this.requiredComponents.includes(e)||this.requiredComponents.push(e)}removeRequiredComponent(e){const t=this.requiredComponents.indexOf(e);t>-1&&this.requiredComponents.splice(t,1)}},u=e=>class extends e{dispatchCustomEvent(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}dispatchEventWithMetadata(e,t){var i;const n=Object.assign(Object.assign({},t),{timestamp:Date.now(),componentName:(null===(i=this.tagName)||void 0===i?void 0:i.toLowerCase())||"unknown"});this.dispatchCustomEvent(e,n)}dispatchInputEvent(e,t){const i=Object.assign({target:t.target||this,value:t.value,originalEvent:t.originalEvent},t);this.dispatchCustomEvent(e,i)}dispatchFocusEvent(e,t){const i=Object.assign({target:t.target||this,value:t.value,focused:t.focused,cursorPosition:t.cursorPosition,selectedText:t.selectedText},t);this.dispatchCustomEvent(e,i)}dispatchValidationEvent(e,t){var i;const n=Object.assign({target:t.target||this,value:t.value,isValid:null!==(i=t.isValid)&&void 0!==i&&i,error:t.error},t);this.dispatchCustomEvent(e,n)}dispatchActionEvent(e,t){const i=Object.assign({target:t.target||this,action:t.action,previousValue:t.previousValue,newValue:t.newValue},t);this.dispatchCustomEvent(e,i)}isReadonlyKeyAllowed(e){if(e.ctrlKey||e.metaKey){return["KeyA","KeyC"].includes(e.code)}return["Tab","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(e.key)}isActivationKey(e){return"Enter"===e.key||" "===e.key}},g=new Set,v=new Map;
|
|
157
|
+
/**
|
|
158
|
+
* @license
|
|
159
|
+
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
160
|
+
* SPDX-License-Identifier: MIT
|
|
161
|
+
*/
|
|
162
|
+
const f=e=>{class t extends e{constructor(){super(...arguments),this.t=null}createRenderRoot(){return this.constructor.useShadowDom?super.createRenderRoot():this}connectedCallback(){const e=this.constructor.useShadowDom;if(!e&&null===this.t)for(this.t=[];this.firstChild;)this.t.push(this.removeChild(this.firstChild));if(super.connectedCallback(),!e){const e=this.constructor,t=this.tagName.toLowerCase(),i=e.styles;if(i){const e=b(i);e&&function(e,t,i){var n;if(!v.has(e)){const i=new CSSStyleSheet;i.replaceSync(t),v.set(e,i)}const r=v.get(e),o=`doc:${e}`;if(g.has(o)||(document.adoptedStyleSheets=[...document.adoptedStyleSheets,r],g.add(o)),i){let t=i;for(;t;){const i=t.getRootNode();if(!(i instanceof ShadowRoot))break;{const o=`shadow:${((null===(n=i.host)||void 0===n?void 0:n.tagName)||"").toLowerCase()}:${e}`;g.has(o)||(i.adoptedStyleSheets=[...i.adoptedStyleSheets,r],g.add(o)),t=i.host}}}}(t,e,this)}}}get lightChildren(){return this.t?this.t.filter(e=>!(e instanceof Element&&e.hasAttribute("slot"))):[]}lightChildrenNamed(e){return this.t?this.t.filter(t=>t instanceof Element&&t.getAttribute("slot")===e):[]}}return t.useShadowDom=!1,t};function b(e){return Array.isArray(e)?e.map(e=>b(e)).filter(Boolean).join("\n"):e&&"string"==typeof e.cssText?e.cssText:"string"==typeof e?e:""}
|
|
163
|
+
/**
|
|
164
|
+
* @license
|
|
165
|
+
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
166
|
+
* SPDX-License-Identifier: MIT
|
|
167
|
+
*/var x=function(e,t,i,n){for(var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n,l=e.length-1;l>=0;l--)(r=e[l])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s};let y=class extends((e=>p(h(u(f(e)))))(n)){constructor(){super(...arguments),this.requiredComponents=["nr-icon"],this.mode="left",this.items=[],this.reverse=!1}getItemPosition(e,t){return"alternate"!==this.mode?"left":e.position?e.position:t%2==0?"left":"right"}isPresetColor(e){if(!e)return!1;return["blue","red","green","gray"].includes(e)}getCustomColorStyle(e){return!e||this.isPresetColor(e)?{}:{borderColor:e}}renderDot(e){const i=!!e.dot,n=e.color||"blue",r=this.isPresetColor(n);if(i)return t`
|
|
168
|
+
<div part="dot-custom" class="timeline-item-head-custom">
|
|
232
169
|
<nr-icon name="${d(e.dot)}"></nr-icon>
|
|
233
170
|
</div>
|
|
234
|
-
`;const
|
|
235
|
-
<div class=${o
|
|
236
|
-
`}renderItem(e,
|
|
237
|
-
<li class=${o
|
|
238
|
-
<div class="timeline-item-tail"></div>
|
|
171
|
+
`;const o={"timeline-item-head":!0,[n]:r},l=this.getCustomColorStyle(n);return t`
|
|
172
|
+
<div part="dot" class=${s(o)} style=${a(l)}></div>
|
|
173
|
+
`}renderItem(e,n){const r=this.getItemPosition(e,n),o={"timeline-item":!0,"timeline-item-left":"left"===r,"timeline-item-right":"right"===r,[e.className||""]:!!e.className};return t`
|
|
174
|
+
<li part="item" class=${s(o)}>
|
|
175
|
+
<div part="tail" class="timeline-item-tail"></div>
|
|
239
176
|
${this.renderDot(e)}
|
|
240
|
-
<div class="timeline-item-content">
|
|
241
|
-
${e.label&&"alternate"===this.mode?
|
|
177
|
+
<div part="content" class="timeline-item-content">
|
|
178
|
+
${e.label&&"alternate"===this.mode?t`<div part="label" class="timeline-item-label">${e.label}</div>`:i}
|
|
242
179
|
<div>${e.children}</div>
|
|
243
|
-
${e.label&&"alternate"!==this.mode?
|
|
180
|
+
${e.label&&"alternate"!==this.mode?t`<div part="label" style="color: #525252; margin-top: 4px;">${e.label}</div>`:i}
|
|
244
181
|
</div>
|
|
245
182
|
</li>
|
|
246
|
-
`}renderPendingItem(){const e="string"==typeof this.pending?this.pending:"Loading...",
|
|
183
|
+
`}renderPendingItem(){const e="string"==typeof this.pending?this.pending:"Loading...",i=this.pendingDot||"loading";return t`
|
|
247
184
|
<li class="timeline-item pending">
|
|
248
185
|
<div class="timeline-item-tail"></div>
|
|
249
186
|
<div class="timeline-item-head-custom">
|
|
250
|
-
<nr-icon name="${
|
|
187
|
+
<nr-icon name="${i}"></nr-icon>
|
|
251
188
|
</div>
|
|
252
189
|
<div class="timeline-item-content">
|
|
253
190
|
${e}
|
|
254
191
|
</div>
|
|
255
192
|
</li>
|
|
256
|
-
`}render(){return this.items&&0!==this.items.length?
|
|
257
|
-
<ul class="timeline">
|
|
258
|
-
${
|
|
259
|
-
${this.pending?this.renderPendingItem():
|
|
193
|
+
`}render(){return this.items&&0!==this.items.length?t`
|
|
194
|
+
<ul part="list" class="timeline">
|
|
195
|
+
${l(this.items,(e,t)=>this.renderItem(e,t))}
|
|
196
|
+
${this.pending?this.renderPendingItem():i}
|
|
260
197
|
</ul>
|
|
261
|
-
`:
|
|
198
|
+
`:i}};y.styles=m,y.useShadowDom=!0,x([r({type:String,reflect:!0})],y.prototype,"mode",void 0),x([r({type:Array})],y.prototype,"items",void 0),x([r({type:String})],y.prototype,"pending",void 0),x([r({type:String,attribute:"pending-dot"})],y.prototype,"pendingDot",void 0),x([r({type:Boolean,reflect:!0})],y.prototype,"reverse",void 0),y=x([o("nr-timeline")],y);export{y as NrTimelineElement};
|
|
Binary file
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { LitElement, nothing, TemplateResult } from 'lit';
|
|
7
7
|
import { TimelineMode, TimelineItem } from './timeline.types.js';
|
|
8
|
-
declare const NrTimelineElement_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;
|
|
8
|
+
declare const NrTimelineElement_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;
|
|
9
9
|
/**
|
|
10
10
|
* # Timeline Component
|
|
11
11
|
*
|
|
@@ -45,14 +45,17 @@ declare const NrTimelineElement_base: (new (...args: any[]) => import("@nuralyui
|
|
|
45
45
|
*
|
|
46
46
|
* @element nr-timeline
|
|
47
47
|
*
|
|
48
|
-
* @
|
|
49
|
-
* @
|
|
50
|
-
* @
|
|
51
|
-
* @
|
|
52
|
-
* @
|
|
48
|
+
* @csspart list - The root ul element containing all timeline items
|
|
49
|
+
* @csspart item - Each li element representing a single timeline event
|
|
50
|
+
* @csspart tail - The vertical connecting line below each item dot
|
|
51
|
+
* @csspart dot - The colored dot indicator for each item (when no custom icon)
|
|
52
|
+
* @csspart dot-custom - The custom icon wrapper for items with a custom dot icon
|
|
53
|
+
* @csspart content - The text content area of each timeline item
|
|
54
|
+
* @csspart label - The timestamp/label text of a timeline item
|
|
53
55
|
*/
|
|
54
56
|
export declare class NrTimelineElement extends NrTimelineElement_base {
|
|
55
57
|
static styles: import("lit").CSSResult;
|
|
58
|
+
static useShadowDom: boolean;
|
|
56
59
|
requiredComponents: string[];
|
|
57
60
|
/**
|
|
58
61
|
* Timeline display mode
|
|
@@ -56,11 +56,13 @@ import { NuralyUIBaseMixin } from '@nuralyui/common/mixins';
|
|
|
56
56
|
*
|
|
57
57
|
* @element nr-timeline
|
|
58
58
|
*
|
|
59
|
-
* @
|
|
60
|
-
* @
|
|
61
|
-
* @
|
|
62
|
-
* @
|
|
63
|
-
* @
|
|
59
|
+
* @csspart list - The root ul element containing all timeline items
|
|
60
|
+
* @csspart item - Each li element representing a single timeline event
|
|
61
|
+
* @csspart tail - The vertical connecting line below each item dot
|
|
62
|
+
* @csspart dot - The colored dot indicator for each item (when no custom icon)
|
|
63
|
+
* @csspart dot-custom - The custom icon wrapper for items with a custom dot icon
|
|
64
|
+
* @csspart content - The text content area of each timeline item
|
|
65
|
+
* @csspart label - The timestamp/label text of a timeline item
|
|
64
66
|
*/
|
|
65
67
|
let NrTimelineElement = class NrTimelineElement extends NuralyUIBaseMixin(LitElement) {
|
|
66
68
|
constructor() {
|
|
@@ -120,7 +122,7 @@ let NrTimelineElement = class NrTimelineElement extends NuralyUIBaseMixin(LitEle
|
|
|
120
122
|
const isPreset = this.isPresetColor(color);
|
|
121
123
|
if (hasCustomDot) {
|
|
122
124
|
return html `
|
|
123
|
-
<div class="timeline-item-head-custom">
|
|
125
|
+
<div part="dot-custom" class="timeline-item-head-custom">
|
|
124
126
|
<nr-icon name="${ifDefined(item.dot)}"></nr-icon>
|
|
125
127
|
</div>
|
|
126
128
|
`;
|
|
@@ -131,7 +133,7 @@ let NrTimelineElement = class NrTimelineElement extends NuralyUIBaseMixin(LitEle
|
|
|
131
133
|
};
|
|
132
134
|
const headStyle = this.getCustomColorStyle(color);
|
|
133
135
|
return html `
|
|
134
|
-
<div class=${classMap(headClasses)} style=${styleMap(headStyle)}></div>
|
|
136
|
+
<div part="dot" class=${classMap(headClasses)} style=${styleMap(headStyle)}></div>
|
|
135
137
|
`;
|
|
136
138
|
}
|
|
137
139
|
/**
|
|
@@ -146,16 +148,16 @@ let NrTimelineElement = class NrTimelineElement extends NuralyUIBaseMixin(LitEle
|
|
|
146
148
|
[item.className || '']: !!item.className,
|
|
147
149
|
};
|
|
148
150
|
return html `
|
|
149
|
-
<li class=${classMap(itemClasses)}>
|
|
150
|
-
<div class="timeline-item-tail"></div>
|
|
151
|
+
<li part="item" class=${classMap(itemClasses)}>
|
|
152
|
+
<div part="tail" class="timeline-item-tail"></div>
|
|
151
153
|
${this.renderDot(item)}
|
|
152
|
-
<div class="timeline-item-content">
|
|
154
|
+
<div part="content" class="timeline-item-content">
|
|
153
155
|
${item.label && this.mode === "alternate" /* TimelineMode.Alternate */
|
|
154
|
-
? html `<div class="timeline-item-label">${item.label}</div>`
|
|
156
|
+
? html `<div part="label" class="timeline-item-label">${item.label}</div>`
|
|
155
157
|
: nothing}
|
|
156
158
|
<div>${item.children}</div>
|
|
157
159
|
${item.label && this.mode !== "alternate" /* TimelineMode.Alternate */
|
|
158
|
-
? html `<div style="color:
|
|
160
|
+
? html `<div part="label" style="color: #525252; margin-top: 4px;">${item.label}</div>`
|
|
159
161
|
: nothing}
|
|
160
162
|
</div>
|
|
161
163
|
</li>
|
|
@@ -184,7 +186,7 @@ let NrTimelineElement = class NrTimelineElement extends NuralyUIBaseMixin(LitEle
|
|
|
184
186
|
return nothing;
|
|
185
187
|
}
|
|
186
188
|
return html `
|
|
187
|
-
<ul class="timeline">
|
|
189
|
+
<ul part="list" class="timeline">
|
|
188
190
|
${map(this.items, (item, index) => this.renderItem(item, index))}
|
|
189
191
|
${this.pending ? this.renderPendingItem() : nothing}
|
|
190
192
|
</ul>
|
|
@@ -192,6 +194,7 @@ let NrTimelineElement = class NrTimelineElement extends NuralyUIBaseMixin(LitEle
|
|
|
192
194
|
}
|
|
193
195
|
};
|
|
194
196
|
NrTimelineElement.styles = styles;
|
|
197
|
+
NrTimelineElement.useShadowDom = true;
|
|
195
198
|
__decorate([
|
|
196
199
|
property({ type: String, reflect: true })
|
|
197
200
|
], NrTimelineElement.prototype, "mode", void 0);
|
|
@@ -3,12 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
4
4
|
* SPDX-License-Identifier: MIT
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
7
|
-
* Timeline component styles for the Hybrid UI Library
|
|
8
|
-
* Using shared CSS variables from /src/shared/themes/
|
|
9
|
-
*
|
|
10
|
-
* This file contains all the styling for the nr-timeline component with
|
|
11
|
-
* clean CSS variable usage without local fallbacks and proper theme switching support.
|
|
12
|
-
*/
|
|
13
6
|
export declare const styles: import("lit").CSSResult;
|
|
14
7
|
//# sourceMappingURL=timeline.style.d.ts.map
|