@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
|
@@ -305,25 +305,27 @@ let NrPopconfirmElement = class NrPopconfirmElement extends NuralyUIBaseMixin(Li
|
|
|
305
305
|
const iconClass = this.getIconClass();
|
|
306
306
|
const iconColor = this.getIconColor();
|
|
307
307
|
return html `
|
|
308
|
-
<div class="popconfirm-content">
|
|
309
|
-
<div class="popconfirm-message">
|
|
308
|
+
<div class="popconfirm-content" part="content">
|
|
309
|
+
<div class="popconfirm-message" part="message">
|
|
310
310
|
<div
|
|
311
311
|
class="popconfirm-icon popconfirm-icon--${iconClass}"
|
|
312
|
+
part="icon"
|
|
312
313
|
style=${iconColor ? `color: ${iconColor}` : ''}>
|
|
313
314
|
<nr-icon name=${this.icon}></nr-icon>
|
|
314
315
|
</div>
|
|
315
|
-
<div class="popconfirm-text">
|
|
316
|
+
<div class="popconfirm-text" part="text">
|
|
316
317
|
${this.title ? html `<nr-label class="popconfirm-title" size="medium">${this.title}</nr-label>` : ''}
|
|
317
318
|
${this.description
|
|
318
319
|
? html `<nr-label class="popconfirm-description" size="small" variant="secondary">${this.description}</nr-label>`
|
|
319
320
|
: ''}
|
|
320
321
|
</div>
|
|
321
322
|
</div>
|
|
322
|
-
<div class="popconfirm-buttons">
|
|
323
|
+
<div class="popconfirm-buttons" part="buttons">
|
|
323
324
|
${this.showCancel
|
|
324
325
|
? html `
|
|
325
326
|
<nr-button
|
|
326
327
|
size="small"
|
|
328
|
+
part="cancel-button"
|
|
327
329
|
@click=${this.handleCancel}>
|
|
328
330
|
${this.cancelText}
|
|
329
331
|
</nr-button>
|
|
@@ -331,6 +333,7 @@ let NrPopconfirmElement = class NrPopconfirmElement extends NuralyUIBaseMixin(Li
|
|
|
331
333
|
: ''}
|
|
332
334
|
<nr-button
|
|
333
335
|
size="small"
|
|
336
|
+
part="confirm-button"
|
|
334
337
|
type=${this.okType === 'danger' ? 'danger' : this.okType === 'primary' ? 'primary' : 'default'}
|
|
335
338
|
?loading=${this.okLoading}
|
|
336
339
|
?disabled=${this.okLoading}
|
|
@@ -351,7 +354,7 @@ let NrPopconfirmElement = class NrPopconfirmElement extends NuralyUIBaseMixin(Li
|
|
|
351
354
|
?arrow=${this.arrow}
|
|
352
355
|
.closeOnOutsideClick=${false}
|
|
353
356
|
.closeOnEscape=${false}>
|
|
354
|
-
<div slot="trigger" @click=${this.handleTriggerClick}>
|
|
357
|
+
<div slot="trigger" part="trigger" @click=${this.handleTriggerClick}>
|
|
355
358
|
<slot name="trigger"></slot>
|
|
356
359
|
</div>
|
|
357
360
|
<div slot="content">${this.renderContent()}</div>
|
|
@@ -359,6 +362,7 @@ let NrPopconfirmElement = class NrPopconfirmElement extends NuralyUIBaseMixin(Li
|
|
|
359
362
|
`;
|
|
360
363
|
}
|
|
361
364
|
};
|
|
365
|
+
NrPopconfirmElement.useShadowDom = true;
|
|
362
366
|
NrPopconfirmElement.styles = styles;
|
|
363
367
|
__decorate([
|
|
364
368
|
property({ type: String })
|
|
@@ -27,27 +27,27 @@ export const styles = css `
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.popconfirm-icon--warning {
|
|
30
|
-
color:
|
|
30
|
+
color: #f1c21b;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.popconfirm-icon--question {
|
|
34
|
-
color:
|
|
34
|
+
color: #0043ce;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.popconfirm-icon--info {
|
|
38
|
-
color:
|
|
38
|
+
color: #0043ce;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
.popconfirm-icon--error {
|
|
42
|
-
color:
|
|
42
|
+
color: #dc2626;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.popconfirm-icon--success {
|
|
46
|
-
color:
|
|
46
|
+
color: #198038;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.popconfirm-icon--custom {
|
|
50
|
-
color:
|
|
50
|
+
color: #161616;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.popconfirm-text {
|
|
@@ -58,16 +58,16 @@ export const styles = css `
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
.popconfirm-title {
|
|
61
|
-
color:
|
|
62
|
-
font-size:
|
|
61
|
+
color: #161616;
|
|
62
|
+
font-size: 1rem;
|
|
63
63
|
font-weight: 600;
|
|
64
64
|
line-height: 1.5;
|
|
65
65
|
margin: 0;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
.popconfirm-description {
|
|
69
|
-
color:
|
|
70
|
-
font-size:
|
|
69
|
+
color: #525252;
|
|
70
|
+
font-size: 0.875rem;
|
|
71
71
|
line-height: 1.5;
|
|
72
72
|
margin: 0;
|
|
73
73
|
}
|
|
@@ -81,8 +81,8 @@ export const styles = css `
|
|
|
81
81
|
|
|
82
82
|
.popconfirm-button {
|
|
83
83
|
padding: 4px 15px;
|
|
84
|
-
font-size:
|
|
85
|
-
border-radius:
|
|
84
|
+
font-size: 0.875rem;
|
|
85
|
+
border-radius: 6px;
|
|
86
86
|
border: 1px solid transparent;
|
|
87
87
|
cursor: pointer;
|
|
88
88
|
transition: all 0.2s;
|
|
@@ -93,68 +93,68 @@ export const styles = css `
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
.popconfirm-button:focus-visible {
|
|
96
|
-
outline: 2px solid
|
|
96
|
+
outline: 2px solid #7c3aed;
|
|
97
97
|
outline-offset: 2px;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
.popconfirm-button--cancel {
|
|
101
|
-
background:
|
|
102
|
-
color:
|
|
103
|
-
border-color:
|
|
101
|
+
background: #ffffff;
|
|
102
|
+
color: #161616;
|
|
103
|
+
border-color: #e0e0e0;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
.popconfirm-button--cancel:hover:not(:disabled) {
|
|
107
|
-
background:
|
|
108
|
-
color:
|
|
109
|
-
border-color:
|
|
107
|
+
background: #f4f4f4;
|
|
108
|
+
color: #161616;
|
|
109
|
+
border-color: #c6c6c6;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
.popconfirm-button--ok-primary {
|
|
113
|
-
background:
|
|
114
|
-
color:
|
|
115
|
-
border-color:
|
|
113
|
+
background: #7c3aed;
|
|
114
|
+
color: #ffffff;
|
|
115
|
+
border-color: #7c3aed;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
.popconfirm-button--ok-primary:hover:not(:disabled) {
|
|
119
|
-
background:
|
|
120
|
-
color:
|
|
121
|
-
border-color:
|
|
119
|
+
background: #6d28d9;
|
|
120
|
+
color: #ffffff;
|
|
121
|
+
border-color: #6d28d9;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
.popconfirm-button--ok-danger {
|
|
125
|
-
background:
|
|
126
|
-
color:
|
|
127
|
-
border-color:
|
|
125
|
+
background: #dc2626;
|
|
126
|
+
color: #ffffff;
|
|
127
|
+
border-color: #dc2626;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
.popconfirm-button--ok-danger:hover:not(:disabled) {
|
|
131
|
-
background:
|
|
132
|
-
color:
|
|
133
|
-
border-color:
|
|
131
|
+
background: #b91c1c;
|
|
132
|
+
color: #ffffff;
|
|
133
|
+
border-color: #b91c1c;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
.popconfirm-button--ok-secondary {
|
|
137
|
-
background:
|
|
138
|
-
color:
|
|
139
|
-
border-color:
|
|
137
|
+
background: transparent;
|
|
138
|
+
color: #7c3aed;
|
|
139
|
+
border-color: #7c3aed;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
.popconfirm-button--ok-secondary:hover:not(:disabled) {
|
|
143
|
-
background:
|
|
144
|
-
color:
|
|
145
|
-
border-color:
|
|
143
|
+
background: #f4f0fd;
|
|
144
|
+
color: #6d28d9;
|
|
145
|
+
border-color: #6d28d9;
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
.popconfirm-button--ok-default {
|
|
149
|
-
background:
|
|
150
|
-
color:
|
|
151
|
-
border-color:
|
|
149
|
+
background: #ffffff;
|
|
150
|
+
color: #161616;
|
|
151
|
+
border-color: #e0e0e0;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
.popconfirm-button--ok-default:hover:not(:disabled) {
|
|
155
|
-
background:
|
|
156
|
-
color:
|
|
157
|
-
border-color:
|
|
155
|
+
background: #f4f4f4;
|
|
156
|
+
color: #161616;
|
|
157
|
+
border-color: #c6c6c6;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
.popconfirm-button:disabled {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import{css as
|
|
1
|
+
import{css as e,html as t,LitElement as i}from"lit";import{property as s,customElement as o}from"lit/decorators.js";
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
5
5
|
* SPDX-License-Identifier: MIT
|
|
6
|
-
*/const
|
|
6
|
+
*/const r=e`
|
|
7
7
|
:host {
|
|
8
8
|
display: inline-flex;
|
|
9
9
|
align-items: center;
|
|
10
10
|
cursor: pointer;
|
|
11
11
|
user-select: none;
|
|
12
12
|
position: relative;
|
|
13
|
-
font-family:
|
|
13
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
:host([disabled]) {
|
|
@@ -21,7 +21,7 @@ import{css as i,LitElement as r,html as e}from"lit";import{property as a,query a
|
|
|
21
21
|
.radio-wrapper {
|
|
22
22
|
display: inline-flex;
|
|
23
23
|
align-items: center;
|
|
24
|
-
gap:
|
|
24
|
+
gap: 8px;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
.radio-input {
|
|
@@ -37,127 +37,97 @@ import{css as i,LitElement as r,html as e}from"lit";import{property as a,query a
|
|
|
37
37
|
display: inline-flex;
|
|
38
38
|
align-items: center;
|
|
39
39
|
justify-content: center;
|
|
40
|
-
border-radius:
|
|
41
|
-
border:
|
|
42
|
-
background:
|
|
40
|
+
border-radius: 50%;
|
|
41
|
+
border: 2px solid #d9d9d9;
|
|
42
|
+
background: #ffffff;
|
|
43
43
|
transition: all 0.2s ease;
|
|
44
44
|
flex-shrink: 0;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
/* Size variants */
|
|
48
|
-
:host([size="small"]) .radio-circle {
|
|
49
|
-
width: var(--nuraly-size-radio-small, 16px);
|
|
50
|
-
height: var(--nuraly-size-radio-small, 16px);
|
|
51
|
-
}
|
|
52
|
-
|
|
48
|
+
:host([size="small"]) .radio-circle { width: 16px; height: 16px; }
|
|
53
49
|
:host([size="medium"]) .radio-circle,
|
|
54
|
-
:host(:not([size])) .radio-circle {
|
|
55
|
-
|
|
56
|
-
height: var(--nuraly-size-radio-medium, 20px);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
:host([size="large"]) .radio-circle {
|
|
60
|
-
width: var(--nuraly-size-radio-large, 24px);
|
|
61
|
-
height: var(--nuraly-size-radio-large, 24px);
|
|
62
|
-
}
|
|
50
|
+
:host(:not([size])) .radio-circle { width: 20px; height: 20px; }
|
|
51
|
+
:host([size="large"]) .radio-circle { width: 24px; height: 24px; }
|
|
63
52
|
|
|
64
53
|
.radio-circle::after {
|
|
65
54
|
content: '';
|
|
66
55
|
display: block;
|
|
67
|
-
border-radius:
|
|
68
|
-
background:
|
|
56
|
+
border-radius: 50%;
|
|
57
|
+
background: #1677ff;
|
|
69
58
|
transform: scale(0);
|
|
70
59
|
transition: transform 0.2s ease;
|
|
71
60
|
}
|
|
72
61
|
|
|
73
|
-
:host([size="small"]) .radio-circle::after {
|
|
74
|
-
width: 8px;
|
|
75
|
-
height: 8px;
|
|
76
|
-
}
|
|
77
|
-
|
|
62
|
+
:host([size="small"]) .radio-circle::after { width: 8px; height: 8px; }
|
|
78
63
|
:host([size="medium"]) .radio-circle::after,
|
|
79
|
-
:host(:not([size])) .radio-circle::after {
|
|
80
|
-
|
|
81
|
-
height: 10px;
|
|
82
|
-
}
|
|
64
|
+
:host(:not([size])) .radio-circle::after { width: 10px; height: 10px; }
|
|
65
|
+
:host([size="large"]) .radio-circle::after { width: 12px; height: 12px; }
|
|
83
66
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
67
|
+
/* Checked */
|
|
68
|
+
:host([checked]) .radio-circle { border-color: #1677ff; }
|
|
69
|
+
:host([checked]) .radio-circle::after { transform: scale(1); }
|
|
88
70
|
|
|
89
|
-
/*
|
|
90
|
-
:host([checked]) .radio-circle {
|
|
91
|
-
border-color: var(--nuraly-color-radio-checked-border, #1677ff);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
:host([checked]) .radio-circle::after {
|
|
95
|
-
transform: scale(1);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/* Focus state */
|
|
71
|
+
/* Focus */
|
|
99
72
|
.radio-input:focus-visible + .radio-circle {
|
|
100
|
-
outline: 2px solid
|
|
73
|
+
outline: 2px solid #1677ff;
|
|
101
74
|
outline-offset: 2px;
|
|
102
75
|
}
|
|
103
76
|
|
|
104
|
-
/* Hover
|
|
105
|
-
:host(:not([disabled]):hover
|
|
106
|
-
border-color: var(--nuraly-color-radio-border-hover, #1677ff);
|
|
107
|
-
}
|
|
77
|
+
/* Hover */
|
|
78
|
+
:host(:not([disabled])):hover .radio-circle { border-color: #1677ff; }
|
|
108
79
|
|
|
109
|
-
/* Disabled
|
|
80
|
+
/* Disabled */
|
|
110
81
|
:host([disabled]) .radio-circle {
|
|
111
|
-
background:
|
|
112
|
-
border-color:
|
|
82
|
+
background: #f5f5f5;
|
|
83
|
+
border-color: #d9d9d9;
|
|
113
84
|
}
|
|
85
|
+
:host([disabled][checked]) .radio-circle::after { background: #bfbfbf; }
|
|
114
86
|
|
|
115
|
-
|
|
116
|
-
background: var(--nuraly-color-radio-disabled-dot, #bfbfbf);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/* Label - using nr-label component */
|
|
87
|
+
/* Label */
|
|
120
88
|
.radio-label {
|
|
121
89
|
display: inline-block;
|
|
122
90
|
line-height: 1.5;
|
|
123
91
|
}
|
|
124
92
|
|
|
125
|
-
nr-label.radio-label {
|
|
126
|
-
--nuraly-label-color: var(--nuraly-color-radio-label, #262626);
|
|
127
|
-
--nuraly-label-font-size: var(--nuraly-font-size-radio-label, 14px);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
93
|
/* Size-based label font sizes */
|
|
131
|
-
:host([size="small"])
|
|
132
|
-
|
|
133
|
-
}
|
|
94
|
+
:host([size="small"]) .radio-label { font-size: 12px; }
|
|
95
|
+
:host([size="medium"]) .radio-label,
|
|
96
|
+
:host(:not([size])) .radio-label { font-size: 14px; }
|
|
97
|
+
:host([size="large"]) .radio-label { font-size: 16px; }
|
|
134
98
|
|
|
135
|
-
:host([
|
|
136
|
-
:host(:not([size])) nr-label.radio-label {
|
|
137
|
-
--nuraly-label-font-size: var(--nuraly-font-size-body, 14px);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
:host([size="large"]) nr-label.radio-label {
|
|
141
|
-
--nuraly-label-font-size: var(--nuraly-font-size-large, 16px);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
:host([disabled]) nr-label.radio-label {
|
|
145
|
-
--nuraly-label-color: var(--nuraly-color-radio-disabled-text, #bfbfbf);
|
|
146
|
-
}
|
|
99
|
+
:host([disabled]) .radio-label { color: #bfbfbf; }
|
|
147
100
|
`
|
|
148
101
|
/**
|
|
149
102
|
* @license
|
|
150
103
|
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
151
104
|
* SPDX-License-Identifier: MIT
|
|
152
|
-
*/;var
|
|
105
|
+
*/;var n;!function(e){e.Small="small",e.Medium="medium",e.Large="large"}(n||(n={}));
|
|
106
|
+
/**
|
|
107
|
+
* @license
|
|
108
|
+
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
109
|
+
* SPDX-License-Identifier: MIT
|
|
110
|
+
*/
|
|
111
|
+
const a=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))}},l=()=>{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)},d=e=>class extends e{constructor(){super(...arguments),this.requiredComponents=[]}validateDependencies(){if(l())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(!l())return!0;let t=!0;for(const i of this.requiredComponents)if(!this.isComponentAvailable(i)){t=!1;const s=new Error(`Required component "${i}" is not registered. Please import and register the component before using ${this.tagName.toLowerCase()}.`);e?e(i,s):console.error(s.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)}},c=e=>class extends e{dispatchCustomEvent(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}dispatchEventWithMetadata(e,t){var i;const s=Object.assign(Object.assign({},t),{timestamp:Date.now(),componentName:(null===(i=this.tagName)||void 0===i?void 0:i.toLowerCase())||"unknown"});this.dispatchCustomEvent(e,s)}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 s=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,s)}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}},h=new Set,u=new Map;
|
|
153
112
|
/**
|
|
154
113
|
* @license
|
|
155
114
|
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
156
115
|
* SPDX-License-Identifier: MIT
|
|
157
116
|
*/
|
|
158
|
-
|
|
159
|
-
|
|
117
|
+
/**
|
|
118
|
+
* @license
|
|
119
|
+
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
120
|
+
* SPDX-License-Identifier: MIT
|
|
121
|
+
*/
|
|
122
|
+
const p=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=f(i);e&&function(e,t,i){var s;if(!u.has(e)){const i=new CSSStyleSheet;i.replaceSync(t),u.set(e,i)}const o=u.get(e),r=`doc:${e}`;if(h.has(r)||(document.adoptedStyleSheets=[...document.adoptedStyleSheets,o],h.add(r)),i){let t=i;for(;t;){const i=t.getRootNode();if(!(i instanceof ShadowRoot))break;{const r=`shadow:${((null===(s=i.host)||void 0===s?void 0:s.tagName)||"").toLowerCase()}:${e}`;h.has(r)||(i.adoptedStyleSheets=[...i.adoptedStyleSheets,o],h.add(r)),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 f(e){return Array.isArray(e)?e.map(e=>f(e)).filter(Boolean).join("\n"):e&&"string"==typeof e.cssText?e.cssText:"string"==typeof e?e:""}
|
|
123
|
+
/**
|
|
124
|
+
* @license
|
|
125
|
+
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
126
|
+
* SPDX-License-Identifier: MIT
|
|
127
|
+
*/var b,m=function(e,t,i,s){for(var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s,a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let v=b=class extends((e=>d(a(c(p(e)))))(i)){constructor(){super(...arguments),this.requiredComponents=["nr-label"],this.checked=!1,this.disabled=!1,this.size=n.Medium,this.name="",this.value="",this.id="",this.tabIndex=0,this.required=!1,this._handleClick=e=>{if(this.disabled)return e.preventDefault(),void e.stopPropagation();this.checked||(this.checked=!0,this._uncheckSiblings(),this._dispatchChangeEvent())},this._handleInputChange=e=>{var t,i;e.stopPropagation(),this.disabled||(this.checked=null!==(i=null===(t=this.inputElement)||void 0===t?void 0:t.checked)&&void 0!==i&&i,this.checked&&(this._uncheckSiblings(),this._dispatchChangeEvent()))},this._handleFocus=()=>{this.disabled||this.dispatchEvent(new CustomEvent("nr-focus",{bubbles:!0,composed:!0}))},this._handleBlur=()=>{this.disabled||this.dispatchEvent(new CustomEvent("nr-blur",{bubbles:!0,composed:!0}))}}get inputElement(){return this.renderRoot.querySelector("input")}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_uncheckSiblings(){if(!this.name)return;this.getRootNode().querySelectorAll(`nr-radio[name="${this.name}"]`).forEach(e=>{e!==this&&e instanceof b&&(e.checked=!1)})}_dispatchChangeEvent(){this.dispatchEvent(new CustomEvent("nr-change",{detail:{value:this.value,checked:this.checked},bubbles:!0,composed:!0}))}focus(){var e;null===(e=this.inputElement)||void 0===e||e.focus()}blur(){var e;null===(e=this.inputElement)||void 0===e||e.blur()}render(){return t`
|
|
128
|
+
<div part="wrapper" class="radio-wrapper" data-size="${this.size}">
|
|
160
129
|
<input
|
|
130
|
+
part="input"
|
|
161
131
|
type="radio"
|
|
162
132
|
class="radio-input"
|
|
163
133
|
.checked=${this.checked}
|
|
@@ -172,9 +142,9 @@ var n,c=function(i,r,e,a){for(var o,l=arguments.length,t=l<3?r:null===a?a=Object
|
|
|
172
142
|
aria-checked=${this.checked}
|
|
173
143
|
aria-disabled=${this.disabled}
|
|
174
144
|
/>
|
|
175
|
-
<span class="radio-circle"></span>
|
|
176
|
-
<
|
|
145
|
+
<span part="circle" class="radio-circle"></span>
|
|
146
|
+
<span part="label" class="radio-label">
|
|
177
147
|
<slot></slot>
|
|
178
|
-
</
|
|
148
|
+
</span>
|
|
179
149
|
</div>
|
|
180
|
-
`}};
|
|
150
|
+
`}};v.styles=r,v.useShadowDom=!0,m([s({type:Boolean,reflect:!0})],v.prototype,"checked",void 0),m([s({type:Boolean,reflect:!0})],v.prototype,"disabled",void 0),m([s({reflect:!0})],v.prototype,"size",void 0),m([s({type:String})],v.prototype,"name",void 0),m([s({type:String})],v.prototype,"value",void 0),m([s({type:String})],v.prototype,"id",void 0),m([s({type:Number})],v.prototype,"tabIndex",void 0),m([s({type:Boolean})],v.prototype,"required",void 0),v=b=m([o("nr-radio")],v);export{v as NrRadioElement,n as RadioSize};
|
|
Binary file
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { LitElement } from 'lit';
|
|
7
7
|
import { RadioSize } from './radio.types.js';
|
|
8
|
-
declare const NrRadioElement_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 NrRadioElement_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
|
* A simple radio button component that can be used standalone or within a form.
|
|
11
11
|
* For grouped radio buttons with more features, use nr-radio-group instead.
|
|
@@ -22,9 +22,15 @@ declare const NrRadioElement_base: (new (...args: any[]) => import("@nuralyui/co
|
|
|
22
22
|
* @fires nr-blur - Dispatched when the radio button loses focus
|
|
23
23
|
*
|
|
24
24
|
* @slot default - Radio button label content
|
|
25
|
+
*
|
|
26
|
+
* @csspart wrapper - The root wrapper div containing the input, circle, and label
|
|
27
|
+
* @csspart input - The native radio input element
|
|
28
|
+
* @csspart circle - The visual custom radio circle indicator
|
|
29
|
+
* @csspart label - The span wrapping the slot label text
|
|
25
30
|
*/
|
|
26
31
|
export declare class NrRadioElement extends NrRadioElement_base {
|
|
27
32
|
static styles: import("lit").CSSResult;
|
|
33
|
+
static useShadowDom: boolean;
|
|
28
34
|
requiredComponents: string[];
|
|
29
35
|
/** Whether the radio button is checked */
|
|
30
36
|
checked: boolean;
|
|
@@ -42,7 +48,7 @@ export declare class NrRadioElement extends NrRadioElement_base {
|
|
|
42
48
|
tabIndex: number;
|
|
43
49
|
/** Whether the radio button is required */
|
|
44
50
|
required: boolean;
|
|
45
|
-
private inputElement;
|
|
51
|
+
private get inputElement();
|
|
46
52
|
connectedCallback(): void;
|
|
47
53
|
disconnectedCallback(): void;
|
|
48
54
|
private _handleClick;
|
|
@@ -11,7 +11,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
11
11
|
};
|
|
12
12
|
var NrRadioElement_1;
|
|
13
13
|
import { LitElement, html } from 'lit';
|
|
14
|
-
import { customElement, property
|
|
14
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
15
15
|
import { styles } from './radio.style.js';
|
|
16
16
|
import { RadioSize } from './radio.types.js';
|
|
17
17
|
import { NuralyUIBaseMixin } from '@nuralyui/common/mixins';
|
|
@@ -31,6 +31,11 @@ import { NuralyUIBaseMixin } from '@nuralyui/common/mixins';
|
|
|
31
31
|
* @fires nr-blur - Dispatched when the radio button loses focus
|
|
32
32
|
*
|
|
33
33
|
* @slot default - Radio button label content
|
|
34
|
+
*
|
|
35
|
+
* @csspart wrapper - The root wrapper div containing the input, circle, and label
|
|
36
|
+
* @csspart input - The native radio input element
|
|
37
|
+
* @csspart circle - The visual custom radio circle indicator
|
|
38
|
+
* @csspart label - The span wrapping the slot label text
|
|
34
39
|
*/
|
|
35
40
|
let NrRadioElement = NrRadioElement_1 = class NrRadioElement extends NuralyUIBaseMixin(LitElement) {
|
|
36
41
|
constructor() {
|
|
@@ -65,10 +70,11 @@ let NrRadioElement = NrRadioElement_1 = class NrRadioElement extends NuralyUIBas
|
|
|
65
70
|
}
|
|
66
71
|
};
|
|
67
72
|
this._handleInputChange = (e) => {
|
|
73
|
+
var _a, _b;
|
|
68
74
|
e.stopPropagation();
|
|
69
75
|
if (this.disabled)
|
|
70
76
|
return;
|
|
71
|
-
this.checked = this.inputElement.checked;
|
|
77
|
+
this.checked = (_b = (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.checked) !== null && _b !== void 0 ? _b : false;
|
|
72
78
|
if (this.checked) {
|
|
73
79
|
this._uncheckSiblings();
|
|
74
80
|
this._dispatchChangeEvent();
|
|
@@ -85,6 +91,9 @@ let NrRadioElement = NrRadioElement_1 = class NrRadioElement extends NuralyUIBas
|
|
|
85
91
|
this.dispatchEvent(new CustomEvent('nr-blur', { bubbles: true, composed: true }));
|
|
86
92
|
};
|
|
87
93
|
}
|
|
94
|
+
get inputElement() {
|
|
95
|
+
return this.renderRoot.querySelector('input');
|
|
96
|
+
}
|
|
88
97
|
connectedCallback() {
|
|
89
98
|
super.connectedCallback();
|
|
90
99
|
this.addEventListener('click', this._handleClick);
|
|
@@ -128,8 +137,9 @@ let NrRadioElement = NrRadioElement_1 = class NrRadioElement extends NuralyUIBas
|
|
|
128
137
|
}
|
|
129
138
|
render() {
|
|
130
139
|
return html `
|
|
131
|
-
<div
|
|
140
|
+
<div part="wrapper" class="radio-wrapper" data-size="${this.size}">
|
|
132
141
|
<input
|
|
142
|
+
part="input"
|
|
133
143
|
type="radio"
|
|
134
144
|
class="radio-input"
|
|
135
145
|
.checked=${this.checked}
|
|
@@ -144,15 +154,16 @@ let NrRadioElement = NrRadioElement_1 = class NrRadioElement extends NuralyUIBas
|
|
|
144
154
|
aria-checked=${this.checked}
|
|
145
155
|
aria-disabled=${this.disabled}
|
|
146
156
|
/>
|
|
147
|
-
<span class="radio-circle"></span>
|
|
148
|
-
<
|
|
157
|
+
<span part="circle" class="radio-circle"></span>
|
|
158
|
+
<span part="label" class="radio-label">
|
|
149
159
|
<slot></slot>
|
|
150
|
-
</
|
|
160
|
+
</span>
|
|
151
161
|
</div>
|
|
152
162
|
`;
|
|
153
163
|
}
|
|
154
164
|
};
|
|
155
165
|
NrRadioElement.styles = styles;
|
|
166
|
+
NrRadioElement.useShadowDom = true;
|
|
156
167
|
__decorate([
|
|
157
168
|
property({ type: Boolean, reflect: true })
|
|
158
169
|
], NrRadioElement.prototype, "checked", void 0);
|
|
@@ -177,9 +188,6 @@ __decorate([
|
|
|
177
188
|
__decorate([
|
|
178
189
|
property({ type: Boolean })
|
|
179
190
|
], NrRadioElement.prototype, "required", void 0);
|
|
180
|
-
__decorate([
|
|
181
|
-
query('input')
|
|
182
|
-
], NrRadioElement.prototype, "inputElement", void 0);
|
|
183
191
|
NrRadioElement = NrRadioElement_1 = __decorate([
|
|
184
192
|
customElement('nr-radio')
|
|
185
193
|
], NrRadioElement);
|