@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,299 +1,181 @@
|
|
|
1
|
-
import{css as
|
|
1
|
+
import{css as t,nothing as e,html as i,LitElement as o}from"lit";import{property as s,customElement as n}from"lit/decorators.js";import{ifDefined as r}from"lit/directives/if-defined.js";const a="",d=t`
|
|
2
2
|
:host {
|
|
3
3
|
display: inline-block;
|
|
4
4
|
vertical-align: middle;
|
|
5
|
-
|
|
6
|
-
/* Force CSS custom property inheritance to ensure theme switching works properly */
|
|
7
|
-
color: var(--nuraly-color-text);
|
|
8
|
-
background-color: var(--nuraly-color-background);
|
|
9
|
-
border-color: var(--nuraly-color-border);
|
|
10
|
-
|
|
11
|
-
/* Ensure clean state transitions when theme changes */
|
|
12
|
-
* {
|
|
13
|
-
transition: all var(--nuraly-transition-fast, 0.15s) ease;
|
|
14
|
-
}
|
|
15
5
|
}
|
|
16
6
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
color: inherit;
|
|
20
|
-
background-color: inherit;
|
|
7
|
+
:host([hidden]) {
|
|
8
|
+
display: none;
|
|
21
9
|
}
|
|
22
10
|
|
|
23
|
-
button
|
|
11
|
+
button,
|
|
12
|
+
a {
|
|
24
13
|
display: inline-flex;
|
|
25
14
|
align-items: center;
|
|
26
15
|
justify-content: center;
|
|
27
16
|
position: relative;
|
|
28
|
-
font-family:
|
|
29
|
-
font-size:
|
|
30
|
-
font-weight:
|
|
31
|
-
line-height: 1
|
|
32
|
-
|
|
33
|
-
height: 3rem;
|
|
34
|
-
padding: var(--nuraly-spacing-2) var(--nuraly-spacing-4);
|
|
17
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
|
|
18
|
+
font-size: 13px;
|
|
19
|
+
font-weight: 500;
|
|
20
|
+
line-height: 1;
|
|
21
|
+
padding: 6px 16px;
|
|
35
22
|
border: 1px solid transparent;
|
|
36
|
-
border-radius:
|
|
37
|
-
background-color:
|
|
38
|
-
color:
|
|
23
|
+
border-radius: 8px;
|
|
24
|
+
background-color: #fff;
|
|
25
|
+
color: #161616;
|
|
39
26
|
text-decoration: none;
|
|
40
27
|
cursor: pointer;
|
|
41
|
-
transition: all
|
|
28
|
+
transition: all 0.15s ease;
|
|
42
29
|
white-space: nowrap;
|
|
43
30
|
overflow: hidden;
|
|
44
31
|
text-overflow: ellipsis;
|
|
45
|
-
|
|
46
|
-
/* Reset any inherited styles that might interfere with theme switching */
|
|
47
32
|
box-shadow: none;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
&:focus {
|
|
51
|
-
/* outline: var(--nuraly-focus-outline); */
|
|
52
|
-
/* outline-offset: var(--nuraly-focus-outline-offset); */
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
&:disabled {
|
|
56
|
-
cursor: not-allowed;
|
|
57
|
-
/* Remove generic opacity - use specific disabled colors instead */
|
|
58
|
-
}
|
|
33
|
+
gap: 6px;
|
|
34
|
+
}
|
|
59
35
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
height: var(--nuraly-button-icon-size, 1rem);
|
|
65
|
-
display: inline-flex;
|
|
66
|
-
align-items: center;
|
|
67
|
-
justify-content: center;
|
|
68
|
-
/* Better text alignment */
|
|
69
|
-
vertical-align: middle;
|
|
70
|
-
line-height: 1;
|
|
71
|
-
/* Ensure icon inherits text color */
|
|
72
|
-
color: inherit;
|
|
73
|
-
/* Override any size attribute with CSS variable */
|
|
74
|
-
font-size: var(--nuraly-button-icon-size, 1rem) !important;
|
|
75
|
-
transition: all var(--nuraly-transition-fast, 0.15s) ease;
|
|
76
|
-
/* Inherit cursor from button */
|
|
77
|
-
cursor: inherit;
|
|
78
|
-
/* Prevent icon from being focusable */
|
|
79
|
-
pointer-events: none;
|
|
80
|
-
}
|
|
36
|
+
button:focus,
|
|
37
|
+
a:focus {
|
|
38
|
+
outline: none;
|
|
39
|
+
}
|
|
81
40
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
41
|
+
button:focus-visible,
|
|
42
|
+
a:focus-visible {
|
|
43
|
+
outline: 2px solid #0f62fe;
|
|
44
|
+
outline-offset: 2px;
|
|
45
|
+
}
|
|
87
46
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
47
|
+
button:disabled {
|
|
48
|
+
cursor: not-allowed;
|
|
49
|
+
opacity: 0.5;
|
|
50
|
+
}
|
|
93
51
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
52
|
+
/* Icon styling inside button */
|
|
53
|
+
button nr-icon,
|
|
54
|
+
a nr-icon {
|
|
55
|
+
flex-shrink: 0;
|
|
56
|
+
width: 1rem;
|
|
57
|
+
height: 1rem;
|
|
58
|
+
display: inline-flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
justify-content: center;
|
|
61
|
+
vertical-align: middle;
|
|
62
|
+
line-height: 1;
|
|
63
|
+
color: inherit;
|
|
64
|
+
font-size: 1rem !important;
|
|
65
|
+
cursor: inherit;
|
|
66
|
+
pointer-events: none;
|
|
67
|
+
}
|
|
98
68
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
align-items: center;
|
|
106
|
-
justify-content: center;
|
|
107
|
-
gap: inherit;
|
|
108
|
-
}
|
|
69
|
+
/* Container span */
|
|
70
|
+
.button-container {
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
gap: inherit;
|
|
109
75
|
}
|
|
110
76
|
|
|
111
|
-
/*
|
|
77
|
+
/* ======== Type: Primary ======== */
|
|
112
78
|
:host([type="primary"]) button {
|
|
113
|
-
background-color:
|
|
114
|
-
border-color:
|
|
115
|
-
color:
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
&:focus:not(:disabled) {
|
|
137
|
-
/* outline: 2px solid var(--nuraly-color-button-focus-outline, var(--nuraly-focus-color)); */
|
|
138
|
-
/* outline-offset: 2px; */
|
|
139
|
-
/* box-shadow: var(--nuraly-shadow-button-focus, 0 0 0 2px var(--nuraly-color-button-focus-ring)); */
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
&:disabled {
|
|
143
|
-
background-color: var(--nuraly-color-button-disabled);
|
|
144
|
-
border-color: var(--nuraly-color-button-disabled-border, var(--nuraly-color-button-disabled));
|
|
145
|
-
color: var(--nuraly-color-button-disabled-text);
|
|
146
|
-
cursor: not-allowed;
|
|
147
|
-
opacity: 1; /* Reset opacity for proper disabled state */
|
|
148
|
-
}
|
|
79
|
+
background-color: #7c3aed;
|
|
80
|
+
border-color: #7c3aed;
|
|
81
|
+
color: #fff;
|
|
82
|
+
font-weight: 500;
|
|
83
|
+
}
|
|
84
|
+
:host([type="primary"]) button nr-icon {
|
|
85
|
+
color: #fff !important;
|
|
86
|
+
}
|
|
87
|
+
:host([type="primary"]) button:hover:not(:disabled) {
|
|
88
|
+
background-color: #6d28d9;
|
|
89
|
+
border-color: #6d28d9;
|
|
90
|
+
}
|
|
91
|
+
:host([type="primary"]) button:active:not(:disabled) {
|
|
92
|
+
background-color: #6d28d9;
|
|
93
|
+
filter: brightness(0.9);
|
|
94
|
+
}
|
|
95
|
+
:host([type="primary"]) button:disabled {
|
|
96
|
+
background-color: #c6c6c6;
|
|
97
|
+
border-color: #c6c6c6;
|
|
98
|
+
color: #525252;
|
|
99
|
+
opacity: 0.5;
|
|
149
100
|
}
|
|
150
101
|
|
|
151
|
-
/*
|
|
102
|
+
/* ======== Type: Secondary ======== */
|
|
152
103
|
:host([type="secondary"]) button {
|
|
153
|
-
background-color:
|
|
154
|
-
border-color:
|
|
155
|
-
color:
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
&:focus:not(:disabled) {
|
|
170
|
-
/* outline: 2px solid var(--nuraly-color-button-focus-outline, var(--nuraly-focus-color)); */
|
|
171
|
-
/* outline-offset: 2px; */
|
|
172
|
-
box-shadow: var(--nuraly-shadow-button-focus, 0 0 0 2px var(--nuraly-color-button-focus-ring));
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
&:disabled {
|
|
176
|
-
background-color: var(--nuraly-color-button-disabled);
|
|
177
|
-
border-color: var(--nuraly-color-button-disabled-border, var(--nuraly-color-button-disabled));
|
|
178
|
-
color: var(--nuraly-color-button-disabled-text);
|
|
179
|
-
cursor: not-allowed;
|
|
180
|
-
opacity: 1; /* Reset opacity for proper disabled state */
|
|
181
|
-
}
|
|
104
|
+
background-color: #0f1419;
|
|
105
|
+
border-color: #0f1419;
|
|
106
|
+
color: #fff;
|
|
107
|
+
font-weight: 500;
|
|
108
|
+
}
|
|
109
|
+
:host([type="secondary"]) button:hover:not(:disabled) {
|
|
110
|
+
background-color: #272c30;
|
|
111
|
+
border-color: #272c30;
|
|
112
|
+
}
|
|
113
|
+
:host([type="secondary"]) button:active:not(:disabled) {
|
|
114
|
+
background-color: #3a3f44;
|
|
115
|
+
border-color: #3a3f44;
|
|
116
|
+
}
|
|
117
|
+
:host([type="secondary"]) button:disabled {
|
|
118
|
+
opacity: 0.5;
|
|
182
119
|
}
|
|
183
120
|
|
|
184
|
-
/*
|
|
121
|
+
/* ======== Type: Default ======== */
|
|
185
122
|
:host([type="default"]) button {
|
|
186
|
-
background-color:
|
|
187
|
-
border-color:
|
|
188
|
-
color:
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
&:focus:not(:disabled) {
|
|
203
|
-
/* outline: 2px solid var(--nuraly-color-button-focus-outline, var(--nuraly-focus-color)); */
|
|
204
|
-
/* outline-offset: 2px; */
|
|
205
|
-
box-shadow: var(--nuraly-shadow-button-focus, 0 0 0 2px var(--nuraly-color-button-focus-ring));
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
&:disabled {
|
|
209
|
-
background-color: var(--nuraly-color-button-disabled, #f4f4f4);
|
|
210
|
-
border-color: var(--nuraly-color-button-disabled-border, #c6c6c6);
|
|
211
|
-
color: var(--nuraly-color-button-disabled-text, #c6c6c6);
|
|
212
|
-
cursor: not-allowed;
|
|
213
|
-
opacity: 1; /* Reset opacity for proper disabled state */
|
|
214
|
-
}
|
|
123
|
+
background-color: #fff;
|
|
124
|
+
border-color: #eff3f4;
|
|
125
|
+
color: #536471;
|
|
126
|
+
font-weight: 500;
|
|
127
|
+
}
|
|
128
|
+
:host([type="default"]) button:hover:not(:disabled) {
|
|
129
|
+
border-color: #7c3aed;
|
|
130
|
+
color: #7c3aed;
|
|
131
|
+
}
|
|
132
|
+
:host([type="default"]) button:active:not(:disabled) {
|
|
133
|
+
background-color: #f7f9f9;
|
|
134
|
+
}
|
|
135
|
+
:host([type="default"]) button:disabled {
|
|
136
|
+
opacity: 0.5;
|
|
215
137
|
}
|
|
216
138
|
|
|
217
|
-
/*
|
|
139
|
+
/* ======== Type: Ghost ======== */
|
|
218
140
|
:host([type="ghost"]) button {
|
|
219
|
-
background-color:
|
|
220
|
-
border-color:
|
|
221
|
-
color:
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
color: var(--nuraly-color-button-outline-text-active, var(--nuraly-color-button-primary-active));
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
&:focus:not(:disabled) {
|
|
236
|
-
box-shadow: var(--nuraly-shadow-button-focus, 0 0 0 2px var(--nuraly-color-button-focus-ring));
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
&:disabled {
|
|
240
|
-
background-color: transparent;
|
|
241
|
-
border-color: var(--nuraly-color-button-disabled-border, var(--nuraly-color-button-disabled));
|
|
242
|
-
color: var(--nuraly-color-button-disabled-text);
|
|
243
|
-
cursor: not-allowed;
|
|
244
|
-
opacity: 1;
|
|
245
|
-
}
|
|
141
|
+
background-color: transparent;
|
|
142
|
+
border-color: #7c3aed;
|
|
143
|
+
color: #7c3aed;
|
|
144
|
+
font-weight: 500;
|
|
145
|
+
}
|
|
146
|
+
:host([type="ghost"]) button:hover:not(:disabled) {
|
|
147
|
+
background-color: rgba(124, 58, 237, 0.1);
|
|
148
|
+
}
|
|
149
|
+
:host([type="ghost"]) button:active:not(:disabled) {
|
|
150
|
+
background-color: rgba(124, 58, 237, 0.15);
|
|
151
|
+
}
|
|
152
|
+
:host([type="ghost"]) button:disabled {
|
|
153
|
+
opacity: 0.5;
|
|
246
154
|
}
|
|
247
155
|
|
|
248
|
-
/*
|
|
156
|
+
/* ======== Type: Danger ======== */
|
|
249
157
|
:host([type="danger"]) button {
|
|
250
|
-
background-color:
|
|
251
|
-
border-color:
|
|
252
|
-
color:
|
|
253
|
-
|
|
254
|
-
&:hover:not(:disabled) {
|
|
255
|
-
background-color: var(--nuraly-color-button-danger-hover);
|
|
256
|
-
border-color: var(--nuraly-color-button-danger-hover);
|
|
257
|
-
color: var(--nuraly-color-button-danger-text-hover, var(--nuraly-color-text-on-color));
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
&:active:not(:disabled) {
|
|
261
|
-
background-color: var(--nuraly-color-button-danger-active);
|
|
262
|
-
border-color: var(--nuraly-color-button-danger-active);
|
|
263
|
-
color: var(--nuraly-color-button-danger-text-active, var(--nuraly-color-text-on-color));
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
&:focus:not(:disabled) {
|
|
267
|
-
/* outline: 2px solid var(--nuraly-color-button-focus-outline, var(--nuraly-focus-color)); */
|
|
268
|
-
/* outline-offset: 2px; */
|
|
269
|
-
box-shadow: var(--nuraly-shadow-button-focus, 0 0 0 2px var(--nuraly-color-button-focus-ring));
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
&:disabled {
|
|
273
|
-
background-color: var(--nuraly-color-button-disabled);
|
|
274
|
-
border-color: var(--nuraly-color-button-disabled-border, var(--nuraly-color-button-disabled));
|
|
275
|
-
color: var(--nuraly-color-button-disabled-text);
|
|
276
|
-
cursor: not-allowed;
|
|
277
|
-
opacity: 1; /* Reset opacity for proper disabled state */
|
|
278
|
-
}
|
|
158
|
+
background-color: #dc2626;
|
|
159
|
+
border-color: #dc2626;
|
|
160
|
+
color: #fff;
|
|
161
|
+
font-weight: 500;
|
|
279
162
|
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
163
|
+
:host([type="danger"]) button:hover:not(:disabled) {
|
|
164
|
+
filter: brightness(0.9);
|
|
165
|
+
}
|
|
166
|
+
:host([type="danger"]) button:active:not(:disabled) {
|
|
167
|
+
filter: brightness(0.8);
|
|
168
|
+
}
|
|
169
|
+
:host([type="danger"]) button:disabled {
|
|
170
|
+
opacity: 0.5;
|
|
286
171
|
}
|
|
287
172
|
|
|
288
|
-
/*
|
|
173
|
+
/* ======== Sizes ======== */
|
|
289
174
|
:host([size="small"]) button {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
min-width: var(--nuraly-button-min-width, 4.5rem);
|
|
294
|
-
gap: 0.375rem;
|
|
175
|
+
padding: 5px 14px;
|
|
176
|
+
font-size: 13px;
|
|
177
|
+
gap: 4px;
|
|
295
178
|
}
|
|
296
|
-
|
|
297
179
|
:host([size="small"]) button nr-icon {
|
|
298
180
|
width: 0.875rem;
|
|
299
181
|
height: 0.875rem;
|
|
@@ -301,81 +183,65 @@ import{css as r,LitElement as t,nothing as o,html as a}from"lit";import{property
|
|
|
301
183
|
}
|
|
302
184
|
|
|
303
185
|
:host([size="medium"]) button {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
min-width: var(--nuraly-button-min-width, 5rem);
|
|
186
|
+
padding: 7px 18px;
|
|
187
|
+
font-size: 14px;
|
|
307
188
|
}
|
|
308
189
|
|
|
309
190
|
:host([size="large"]) button {
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
font-
|
|
313
|
-
min-width: var(--nuraly-button-min-width, 6rem);
|
|
191
|
+
padding: 0.875rem 2rem;
|
|
192
|
+
font-size: 1.0625rem;
|
|
193
|
+
font-weight: 500;
|
|
314
194
|
}
|
|
315
|
-
|
|
316
195
|
:host([size="large"]) button nr-icon {
|
|
317
196
|
width: 1.25rem;
|
|
318
197
|
height: 1.25rem;
|
|
319
198
|
font-size: 1.25rem !important;
|
|
320
199
|
}
|
|
321
200
|
|
|
322
|
-
/* Full width */
|
|
323
|
-
:host([full-width])
|
|
201
|
+
/* ======== Full width (block) ======== */
|
|
202
|
+
:host([full-width]),
|
|
203
|
+
:host([block]) {
|
|
324
204
|
width: 100%;
|
|
325
205
|
}
|
|
326
|
-
|
|
327
|
-
:host([
|
|
206
|
+
:host([full-width]) button,
|
|
207
|
+
:host([block]) button {
|
|
328
208
|
width: 100%;
|
|
329
209
|
}
|
|
330
210
|
|
|
331
|
-
/* Loading
|
|
211
|
+
/* ======== Loading ======== */
|
|
332
212
|
:host([loading]) button {
|
|
333
213
|
cursor: not-allowed;
|
|
334
|
-
opacity: 0.
|
|
214
|
+
opacity: 0.5;
|
|
335
215
|
}
|
|
336
216
|
|
|
337
|
-
/* Shape
|
|
338
|
-
|
|
339
|
-
/* Round - Pill-shaped with rounded ends */
|
|
217
|
+
/* ======== Shape: Round ======== */
|
|
340
218
|
:host([shape="round"]) button {
|
|
341
219
|
border-radius: 9999px;
|
|
342
|
-
padding: var(--nuraly-spacing-2) var(--nuraly-spacing-5);
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
:host([shape="round"][size="small"]) button {
|
|
346
|
-
padding: var(--nuraly-spacing-1-5) var(--nuraly-spacing-4);
|
|
347
220
|
}
|
|
348
221
|
|
|
349
|
-
:
|
|
350
|
-
padding: var(--nuraly-spacing-3) var(--nuraly-spacing-6);
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
/* Circle - Perfect circle for icon-only buttons */
|
|
222
|
+
/* ======== Shape: Circle ======== */
|
|
354
223
|
:host([shape="circle"]) button {
|
|
355
224
|
border-radius: 50%;
|
|
356
225
|
min-width: auto;
|
|
357
|
-
width:
|
|
358
|
-
height:
|
|
359
|
-
aspect-ratio: 1;
|
|
226
|
+
width: 36px;
|
|
227
|
+
height: 36px;
|
|
360
228
|
padding: 0;
|
|
361
229
|
}
|
|
362
|
-
|
|
363
230
|
:host([shape="circle"][size="small"]) button {
|
|
364
|
-
width:
|
|
365
|
-
height:
|
|
231
|
+
width: 28px;
|
|
232
|
+
height: 28px;
|
|
366
233
|
}
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
height: var(--nuraly-size-md);
|
|
234
|
+
:host([shape="circle"][size="large"]) button {
|
|
235
|
+
width: 44px;
|
|
236
|
+
height: 44px;
|
|
371
237
|
}
|
|
372
238
|
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
239
|
+
/* ======== Dashed ======== */
|
|
240
|
+
button.button-dashed {
|
|
241
|
+
border-style: dashed;
|
|
376
242
|
}
|
|
377
243
|
|
|
378
|
-
/*
|
|
244
|
+
/* ======== Ripple ======== */
|
|
379
245
|
.ripple {
|
|
380
246
|
position: absolute;
|
|
381
247
|
border-radius: 50%;
|
|
@@ -387,220 +253,105 @@ import{css as r,LitElement as t,nothing as o,html as a}from"lit";import{property
|
|
|
387
253
|
}
|
|
388
254
|
|
|
389
255
|
@keyframes ripple-animation {
|
|
390
|
-
0% {
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
}
|
|
394
|
-
70% {
|
|
395
|
-
transform: scale(3);
|
|
396
|
-
opacity: 0.5;
|
|
397
|
-
}
|
|
398
|
-
100% {
|
|
399
|
-
transform: scale(4);
|
|
400
|
-
opacity: 0;
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
/* Ripple effect for different button types - Carbon Design System compliant */
|
|
405
|
-
:host([type="primary"]) .ripple {
|
|
406
|
-
background: rgba(255, 255, 255, 0.4);
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
:host([type="secondary"]) .ripple {
|
|
410
|
-
background: rgba(255, 255, 255, 0.3);
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
:host([type="default"]) .ripple {
|
|
414
|
-
background: var(--nuraly-color-text, #161616);
|
|
415
|
-
opacity: 0.1;
|
|
256
|
+
0% { transform: scale(0); opacity: 1; }
|
|
257
|
+
70% { transform: scale(3); opacity: 0.5; }
|
|
258
|
+
100% { transform: scale(4); opacity: 0; }
|
|
416
259
|
}
|
|
417
260
|
|
|
418
|
-
:host([type="
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
background: rgba(255, 255, 255, 0.4);
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
/* Theme-specific ripple adjustments for dark theme */
|
|
428
|
-
[data-theme="carbon-dark"] :host([type="default"]) .ripple {
|
|
429
|
-
background: var(--nuraly-color-text, #f4f4f4);
|
|
430
|
-
opacity: 0.1;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
[data-theme="carbon-dark"] :host([type="ghost"]) .ripple {
|
|
434
|
-
background: var(--nuraly-color-button-primary, #78a9ff);
|
|
435
|
-
opacity: 0.2;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
[data-theme="carbon-dark"] :host([type="primary"]) .ripple {
|
|
439
|
-
background: rgba(22, 22, 22, 0.4); /* Dark ripple for light buttons */
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
[data-theme="carbon-dark"] :host([type="secondary"]) .ripple {
|
|
443
|
-
background: rgba(22, 22, 22, 0.3); /* Dark ripple for light buttons */
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
[data-theme="carbon-dark"] :host([type="danger"]) .ripple {
|
|
447
|
-
background: rgba(22, 22, 22, 0.4); /* Dark ripple for light buttons */
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
/* ========================================
|
|
451
|
-
* CARBON THEME SPECIFIC STYLING
|
|
452
|
-
* Enhanced padding and icon centering for Carbon Design System
|
|
453
|
-
* ======================================== */
|
|
454
|
-
|
|
455
|
-
/* Carbon theme button styling - apply to all carbon themes */
|
|
456
|
-
:host([data-theme*="carbon"]) button,
|
|
457
|
-
[data-theme*="carbon"] :host button {
|
|
458
|
-
/* Better baseline alignment for icon and text */
|
|
459
|
-
align-items: center;
|
|
460
|
-
|
|
461
|
-
/* Enhanced icon alignment and spacing for Carbon */
|
|
462
|
-
nr-icon {
|
|
463
|
-
width: var(--nuraly-button-icon-size, 1rem);
|
|
464
|
-
height: var(--nuraly-button-icon-size, 1rem);
|
|
465
|
-
display: inline-flex;
|
|
466
|
-
align-items: center;
|
|
467
|
-
justify-content: center;
|
|
468
|
-
flex-shrink: 0;
|
|
469
|
-
/* Perfect vertical alignment with text baseline */
|
|
470
|
-
vertical-align: middle;
|
|
471
|
-
line-height: 1;
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
/* Icon spacing for Carbon theme - improved approach */
|
|
475
|
-
gap: var(--nuraly-button-icon-spacing, var(--nuraly-spacing-03, 0.5rem));
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
/* Specific Carbon theme selectors for better targeting */
|
|
479
|
-
[data-theme="carbon-light"] nr-button button,
|
|
480
|
-
[data-theme="carbon-dark"] nr-button button,
|
|
481
|
-
[data-theme="carbon"] nr-button button {
|
|
482
|
-
/* Better baseline alignment for icon and text */
|
|
483
|
-
align-items: center;
|
|
484
|
-
|
|
485
|
-
/* Enhanced icon alignment and spacing for Carbon */
|
|
486
|
-
nr-icon {
|
|
487
|
-
width: var(--nuraly-button-icon-size, 1rem);
|
|
488
|
-
height: var(--nuraly-button-icon-size, 1rem);
|
|
489
|
-
display: inline-flex;
|
|
490
|
-
align-items: center;
|
|
491
|
-
justify-content: center;
|
|
492
|
-
flex-shrink: 0;
|
|
493
|
-
/* Perfect vertical alignment with text baseline */
|
|
494
|
-
vertical-align: middle;
|
|
495
|
-
line-height: 1;
|
|
496
|
-
/* Slight adjustment for perfect optical centering */
|
|
497
|
-
margin-top: -1px;
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
/* Target the SVG inside nr-icon for better alignment */
|
|
501
|
-
nr-icon svg {
|
|
502
|
-
display: block;
|
|
503
|
-
margin: 0 auto;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
/* Icon spacing for Carbon theme */
|
|
507
|
-
gap: var(--nuraly-button-icon-spacing, var(--nuraly-spacing-03, 0.5rem));
|
|
508
|
-
|
|
509
|
-
/* Ensure text is also properly centered */
|
|
510
|
-
span#container {
|
|
511
|
-
display: flex;
|
|
512
|
-
align-items: center;
|
|
513
|
-
justify-content: center;
|
|
514
|
-
width: 100%;
|
|
515
|
-
height: 100%;
|
|
516
|
-
line-height: 1;
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
/* Ensure slot content aligns properly */
|
|
520
|
-
slot#slot {
|
|
521
|
-
display: inline-block;
|
|
522
|
-
line-height: inherit;
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
`;
|
|
261
|
+
:host([type="primary"]) .ripple { background: rgba(255, 255, 255, 0.3); }
|
|
262
|
+
:host([type="secondary"]) .ripple { background: rgba(255, 255, 255, 0.3); }
|
|
263
|
+
:host([type="default"]) .ripple { background: rgba(0, 0, 0, 0.06); }
|
|
264
|
+
:host([type="ghost"]) .ripple { background: rgba(124, 58, 237, 0.15); }
|
|
265
|
+
:host([type="danger"]) .ripple { background: rgba(255, 255, 255, 0.3); }
|
|
266
|
+
`,h=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))}},l=()=>{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)},c=t=>class extends t{constructor(){super(...arguments),this.requiredComponents=[]}validateDependencies(){if(l())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(!l())return!0;let e=!0;for(const i of this.requiredComponents)if(!this.isComponentAvailable(i)){e=!1;const o=new Error(`Required component "${i}" is not registered. Please import and register the component before using ${this.tagName.toLowerCase()}.`);t?t(i,o):console.error(o.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)}},u=t=>class extends t{dispatchCustomEvent(t,e){this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}dispatchEventWithMetadata(t,e){var i;const o=Object.assign(Object.assign({},e),{timestamp:Date.now(),componentName:(null===(i=this.tagName)||void 0===i?void 0:i.toLowerCase())||"unknown"});this.dispatchCustomEvent(t,o)}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 o=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,o)}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}},p=new Set,b=new Map;
|
|
526
267
|
/**
|
|
527
268
|
* @license
|
|
528
269
|
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
529
270
|
* SPDX-License-Identifier: MIT
|
|
530
271
|
*/
|
|
531
|
-
class
|
|
272
|
+
const f=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 o;if(!b.has(t)){const i=new CSSStyleSheet;i.replaceSync(e),b.set(t,i)}const s=b.get(t),n=`doc:${t}`;if(p.has(n)||(document.adoptedStyleSheets=[...document.adoptedStyleSheets,s],p.add(n)),i){let e=i;for(;e;){const i=e.getRootNode();if(!(i instanceof ShadowRoot))break;{const n=`shadow:${((null===(o=i.host)||void 0===o?void 0:o.tagName)||"").toLowerCase()}:${t}`;p.has(n)||(i.adoptedStyleSheets=[...i.adoptedStyleSheets,s],p.add(n)),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};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:""}
|
|
273
|
+
/**
|
|
274
|
+
* @license
|
|
275
|
+
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
276
|
+
* SPDX-License-Identifier: MIT
|
|
277
|
+
*/class y{constructor(t){this._host=t,t.addController(this)}get host(){return this._host}hostConnected(){}hostDisconnected(){}hostUpdate(){}hostUpdated(){}requestUpdate(){try{this._host.requestUpdate()}catch(t){this.handleError(t,"requestUpdate")}}dispatchEvent(t){try{return this._host.dispatchEvent(t)}catch(t){return this.handleError(t,"dispatchEvent"),!1}}handleError(t,e){console.error(`[${this.constructor.name}] Error in ${e}:`,t);try{this._host.dispatchEvent(new CustomEvent("nr-controller-error",{detail:{error:t.message,context:e,controller:this.constructor.name},bubbles:!0,composed:!0}))}catch(t){}}safeExecute(t,e,i){try{return t()}catch(t){return this.handleError(t,e),i}}debounce(t,e){let i;const o=(...o)=>{void 0!==i&&clearTimeout(i),i=setTimeout(()=>{i=void 0,t.apply(this,o)},e)};return o.cancel=()=>{void 0!==i&&(clearTimeout(i),i=void 0)},o}}
|
|
278
|
+
/**
|
|
279
|
+
* @license
|
|
280
|
+
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
281
|
+
* SPDX-License-Identifier: MIT
|
|
282
|
+
*/class m extends y{}
|
|
532
283
|
/**
|
|
533
284
|
* @license
|
|
534
285
|
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
535
286
|
* SPDX-License-Identifier: MIT
|
|
536
|
-
*/class
|
|
287
|
+
*/class v extends m{createRipple(t){try{if(!this.host.ripple||this.host.disabled)return;const e=t.currentTarget,i=e.getBoundingClientRect(),o=2*Math.max(i.width,i.height),s=t.clientX-i.left-o/2,n=t.clientY-i.top-o/2,r=document.createElement("span");r.className="ripple",r.style.width=r.style.height=o+"px",r.style.left=s+"px",r.style.top=n+"px";e.querySelectorAll(".ripple").forEach(t=>t.remove()),e.appendChild(r),setTimeout(()=>{r.remove()},600)}catch(t){this.handleError(t,"createRipple")}}handleRippleClick(t){try{this.createRipple(t),this.dispatchEvent(new CustomEvent("button-click",{detail:{disabled:this.host.disabled,timestamp:Date.now(),coordinates:{x:t.clientX,y:t.clientY}},bubbles:!0,composed:!0}))}catch(t){this.handleError(t,"handleRippleClick")}}}
|
|
537
288
|
/**
|
|
538
289
|
* @license
|
|
539
290
|
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
540
291
|
* SPDX-License-Identifier: MIT
|
|
541
|
-
*/class
|
|
292
|
+
*/class w extends m{handleKeyboardActivation(t){try{if(this.host.disabled)return;this.isActivationKey(t)&&(t.preventDefault(),this.host.click(),this.dispatchEvent(new CustomEvent("keyboard-activation",{detail:{key:t.key,timestamp:Date.now(),target:this.host},bubbles:!0,composed:!0})))}catch(t){this.handleError(t,"handleKeyboardActivation")}}handleKeydown(t){try{if(this.host.disabled){if(!this.isReadonlyKeyAllowed(t))return void t.preventDefault()}this.handleKeyboardActivation(t)}catch(t){this.handleError(t,"handleKeydown")}}isActivationKey(t){return"Enter"===t.key||" "===t.key}isReadonlyKeyAllowed(t){return["Tab","Shift","Escape","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"].includes(t.key)}}
|
|
542
293
|
/**
|
|
543
294
|
* @license
|
|
544
295
|
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
545
296
|
* SPDX-License-Identifier: MIT
|
|
546
|
-
*/class
|
|
297
|
+
*/class k extends m{isLinkType(){return!!this.host.href}getElementTag(){return this.isLinkType()?"a":"button"}getLinkAttributes(){try{const t={};return this.isLinkType()?(t.href=this.host.href,this.host.target&&(t.target=this.host.target,"_blank"===this.host.target&&(t.rel="noopener noreferrer")),t.role="link"):t.role="button",t}catch(t){return this.handleError(t,"getLinkAttributes"),{role:"button"}}}handleLinkNavigation(t){try{this.isLinkType()&&this.dispatchEvent(new CustomEvent("link-navigation",{detail:{href:this.host.href,target:this.host.target,timestamp:Date.now(),originalEvent:t},bubbles:!0,composed:!0}))}catch(t){this.handleError(t,"handleLinkNavigation")}}}
|
|
547
298
|
/**
|
|
548
299
|
* @license
|
|
549
300
|
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
550
301
|
* SPDX-License-Identifier: MIT
|
|
551
|
-
*/var
|
|
552
|
-
name=${
|
|
302
|
+
*/var $=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};let x=class extends((t=>c(h(u(f(t)))))(o)){constructor(){super(...arguments),this.disabled=!1,this.loading=!1,this.size=a,this.type="default",this.shape="default",this.block=!1,this.dashed=!1,this.icon=[],this.iconPosition="left",this.href=a,this.target=a,this.ripple=!0,this.buttonAriaLabel=a,this.ariaDescribedBy=a,this.htmlType=a,this.requiredComponents=["nr-icon"],this.rippleController=new v(this),this.keyboardController=new w(this),this.linkController=new k(this)}connectedCallback(){super.connectedCallback(),this.validateDependencies()}getCommonAttributes(){return{"data-type":this.type,"data-shape":this.shape,"data-size":this.size||e,"data-state":this.loading?"loading":e,"data-block":this.block?"true":e,class:this.dashed?"button-dashed":"","aria-disabled":this.disabled?"true":"false","aria-label":this.buttonAriaLabel||e,"aria-describedby":this.ariaDescribedBy||e,tabindex:this.disabled?"-1":"0"}}renderIcon(t){if(!this.isComponentAvailable("nr-icon")){const i="string"==typeof t?t:t.name;return console.warn(`[nr-button] Icon component 'nr-icon' not available. Icon "${i}" will not render. Ensure the icon component is imported and registered.`),e}const o=()=>{switch(this.size){case"small":return"small";case"medium":default:return"medium";case"large":return"large"}};if("string"==typeof t){const e=o();return i`<nr-icon name=${t} size=${r(e)}></nr-icon>`}const{name:s,type:n="solid",size:a,color:d,alt:h}=t,l=a||o();return i`<nr-icon
|
|
303
|
+
name=${s}
|
|
553
304
|
type=${n}
|
|
554
|
-
alt=${
|
|
555
|
-
size=${
|
|
556
|
-
color=${
|
|
557
|
-
></nr-icon>`}handleClick(
|
|
558
|
-
<span
|
|
559
|
-
${n?this.renderIcon(n):
|
|
560
|
-
<slot
|
|
561
|
-
${
|
|
305
|
+
alt=${h||""}
|
|
306
|
+
size=${r(l)}
|
|
307
|
+
color=${d||""}
|
|
308
|
+
></nr-icon>`}handleClick(t){this.disabled?t.preventDefault():(this.rippleController.handleRippleClick(t),this.linkController.isLinkType()&&this.linkController.handleLinkNavigation(t),this.dispatchEventWithMetadata("button-clicked",{type:this.type,disabled:this.disabled,loading:this.loading,href:this.href||null}))}handleKeydown(t){this.keyboardController.handleKeydown(t)}getResolvedLeftIcon(){var t,e;return this.iconLeft?this.iconLeft:(null===(t=this.icons)||void 0===t?void 0:t.left)?this.icons.left:(null===(e=this.icon)||void 0===e?void 0:e.length)>0?this.icon[0]:void 0}getResolvedRightIcon(){var t,e;return this.iconRight?this.iconRight:(null===(t=this.icons)||void 0===t?void 0:t.right)?this.icons.right:2===(null===(e=this.icon)||void 0===e?void 0:e.length)?this.icon[1]:void 0}render(){const t=this.linkController.getElementTag(),o=this.getCommonAttributes(),s=this.linkController.getLinkAttributes(),n=this.getResolvedLeftIcon(),r=this.getResolvedRightIcon(),a=i`
|
|
309
|
+
<span part="container" class="button-container">
|
|
310
|
+
${n?this.renderIcon(n):e}
|
|
311
|
+
<slot></slot>
|
|
312
|
+
${r?this.renderIcon(r):e}
|
|
562
313
|
</span>
|
|
563
|
-
`;return"a"===
|
|
314
|
+
`;return"a"===t?i`
|
|
564
315
|
<a
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
data-
|
|
571
|
-
data-
|
|
572
|
-
data-
|
|
573
|
-
data-
|
|
574
|
-
data-block="${
|
|
575
|
-
class="${
|
|
316
|
+
part="button"
|
|
317
|
+
href="${s.href}"
|
|
318
|
+
target="${s.target||e}"
|
|
319
|
+
rel="${s.rel||e}"
|
|
320
|
+
role="${s.role}"
|
|
321
|
+
data-type="${o["data-type"]}"
|
|
322
|
+
data-shape="${o["data-shape"]}"
|
|
323
|
+
data-size="${o["data-size"]}"
|
|
324
|
+
data-state="${o["data-state"]}"
|
|
325
|
+
data-block="${o["data-block"]}"
|
|
326
|
+
class="${o.class}"
|
|
576
327
|
aria-disabled="${this.disabled}"
|
|
577
|
-
aria-label="${this.buttonAriaLabel||
|
|
578
|
-
aria-describedby="${this.ariaDescribedBy||
|
|
328
|
+
aria-label="${this.buttonAriaLabel||e}"
|
|
329
|
+
aria-describedby="${this.ariaDescribedBy||e}"
|
|
579
330
|
tabindex="${this.disabled?-1:0}"
|
|
580
331
|
@click="${this.handleClick}"
|
|
581
332
|
@keydown="${this.handleKeydown}"
|
|
582
333
|
>
|
|
583
|
-
${
|
|
334
|
+
${a}
|
|
584
335
|
</a>
|
|
585
|
-
`:
|
|
336
|
+
`:i`
|
|
586
337
|
<button
|
|
338
|
+
part="button"
|
|
587
339
|
?disabled="${this.disabled}"
|
|
588
340
|
type="${this.htmlType||"button"}"
|
|
589
|
-
role="${
|
|
590
|
-
data-type="${
|
|
591
|
-
data-shape="${
|
|
592
|
-
data-size="${
|
|
593
|
-
data-state="${
|
|
594
|
-
data-
|
|
595
|
-
|
|
596
|
-
class="${t.class}"
|
|
341
|
+
role="${s.role}"
|
|
342
|
+
data-type="${o["data-type"]}"
|
|
343
|
+
data-shape="${o["data-shape"]}"
|
|
344
|
+
data-size="${o["data-size"]}"
|
|
345
|
+
data-state="${o["data-state"]}"
|
|
346
|
+
data-block="${o["data-block"]}"
|
|
347
|
+
class="${o.class}"
|
|
597
348
|
aria-disabled="${this.disabled}"
|
|
598
|
-
aria-label="${this.buttonAriaLabel||
|
|
599
|
-
aria-describedby="${this.ariaDescribedBy||
|
|
349
|
+
aria-label="${this.buttonAriaLabel||e}"
|
|
350
|
+
aria-describedby="${this.ariaDescribedBy||e}"
|
|
600
351
|
tabindex="${this.disabled?-1:0}"
|
|
601
352
|
@click="${this.handleClick}"
|
|
602
353
|
@keydown="${this.handleKeydown}"
|
|
603
354
|
>
|
|
604
|
-
${
|
|
355
|
+
${a}
|
|
605
356
|
</button>
|
|
606
|
-
`}};
|
|
357
|
+
`}};x.styles=d,x.useShadowDom=!0,$([s({type:Boolean})],x.prototype,"disabled",void 0),$([s({type:Boolean})],x.prototype,"loading",void 0),$([s({type:String})],x.prototype,"size",void 0),$([s({type:String,reflect:!0})],x.prototype,"type",void 0),$([s({type:String})],x.prototype,"shape",void 0),$([s({type:Boolean})],x.prototype,"block",void 0),$([s({type:Boolean})],x.prototype,"dashed",void 0),$([s({type:Array})],x.prototype,"icon",void 0),$([s({type:Object})],x.prototype,"iconLeft",void 0),$([s({type:Object})],x.prototype,"iconRight",void 0),$([s({type:Object})],x.prototype,"icons",void 0),$([s({reflect:!0})],x.prototype,"iconPosition",void 0),$([s({type:String})],x.prototype,"href",void 0),$([s({type:String})],x.prototype,"target",void 0),$([s({type:Boolean})],x.prototype,"ripple",void 0),$([s({type:String})],x.prototype,"buttonAriaLabel",void 0),$([s({type:String})],x.prototype,"ariaDescribedBy",void 0),$([s({type:String})],x.prototype,"htmlType",void 0),x=$([n("nr-button")],x);export{x as NrButtonElement};
|