@nova-design-system/nova-react 3.23.0 → 3.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/cjs/dom.utils-CuXVGECR-8VY5SfMZ.js +177 -0
- package/dist/cjs/events.utils-B6GgGra--01N__3wY.js +23 -0
- package/dist/cjs/generated/components.server.js +124 -58
- package/dist/cjs/{grow.animation-CvHGHBL4-DDIEYBK-.js → grow.animation-D7ep_aVl-BuXEDSK-.js} +0 -21
- package/dist/cjs/{i18n.utils-DOZbXX2L-BizoXo6c.js → i18n.utils-IlwlcG9l-ku0bScip.js} +14 -18
- package/dist/cjs/index-DUlunl9a.js +9696 -0
- package/dist/cjs/{nv-dialog.entry-O47Eol_7.js → index.esm-D3eWMME9-CG1TVKfu.js} +1 -296
- package/dist/cjs/index.js +5 -1
- package/dist/cjs/{nv-accordion-item.entry-B_l0-ux0.js → nv-accordion-item.entry-CqnjIt4R.js} +8 -7
- package/dist/cjs/{nv-accordion.entry-BX8_YuZF.js → nv-accordion.entry-Dx7FmGg_.js} +11 -14
- package/dist/cjs/{nv-alert.entry-DCWYR0OK.js → nv-alert.entry-BL3Pdcxd.js} +7 -6
- package/dist/cjs/nv-avatar.entry-2dFR4I9_.js +68 -0
- package/dist/cjs/nv-badge_2.entry-5FShR2Ax.js +218 -0
- package/dist/cjs/nv-breadcrumb.entry-Cfi32bBT.js +49 -0
- package/dist/cjs/nv-breadcrumbs.entry-BSgn3KUO.js +21 -0
- package/dist/cjs/nv-button.entry-BdQQ_LE7.js +166 -0
- package/dist/cjs/{nv-buttongroup.entry-BZaTKN_n.js → nv-buttongroup.entry-BM8CwXFK.js} +13 -7
- package/dist/cjs/{nv-calendar.entry-D9ESuu7C.js → nv-calendar.entry-CeKsMGOa.js} +39 -32
- package/dist/cjs/nv-col.entry-D-h2PGcz.js +38 -0
- package/dist/cjs/{nv-datagrid.entry-DcB5q2oC.js → nv-datagrid.entry-nOBIfqOS.js} +113 -255
- package/dist/cjs/{nv-datagridcolumn.entry-BhKOzXA6.js → nv-datagridcolumn.entry-BAzTU_KM.js} +2 -2
- package/dist/cjs/nv-dialog.entry-Bi2ZVSe2.js +299 -0
- package/dist/cjs/{nv-dialogfooter_2.entry-Dn16bI8a.js → nv-dialogfooter_2.entry-D6lzC-3S.js} +11 -29
- package/dist/cjs/nv-drawer.entry-Dp4AfBiF.js +445 -0
- package/dist/cjs/nv-drawerfooter_2.entry-DpWSsq6d.js +128 -0
- package/dist/cjs/nv-fieldcheckbox.entry-COA3LXnX.js +179 -0
- package/dist/cjs/{nv-fielddate.entry-B4P0U8QG.js → nv-fielddate.entry-B8r5RFXd.js} +20 -21
- package/dist/cjs/{nv-fielddaterange.entry-BORwYJ-k.js → nv-fielddaterange.entry-C6_Kq93P.js} +20 -19
- package/dist/cjs/{nv-fielddropdown.entry-DzBAIynY.js → nv-fielddropdown.entry-B2Dr5zHd.js} +51 -58
- package/dist/cjs/nv-fielddropdownitem.entry-DapivVnR.js +69 -0
- package/dist/cjs/{nv-fieldmultiselect.entry-DiqRreWh.js → nv-fieldmultiselect.entry-DSpQeiPx.js} +45 -49
- package/dist/cjs/nv-fieldnumber.entry-BwxR9sRr.js +189 -0
- package/dist/cjs/nv-fieldpassword.entry-BOSU-Skh.js +167 -0
- package/dist/cjs/nv-fieldradio.entry-ZFafNY5_.js +105 -0
- package/dist/cjs/nv-fieldselect.entry-CfWjQAd9.js +405 -0
- package/dist/cjs/{nv-fieldslider.entry-CozmnUfN.js → nv-fieldslider.entry-dDPcWUxs.js} +34 -16
- package/dist/cjs/nv-fieldtext.entry-Yaa-mkjJ.js +163 -0
- package/dist/cjs/{nv-fieldtextarea.entry-7UrKWDHg.js → nv-fieldtextarea.entry-Dp_l2pKZ.js} +18 -13
- package/dist/cjs/{nv-fieldtime.entry-DakOlLiO.js → nv-fieldtime.entry-CWxi4Uel.js} +38 -40
- package/dist/cjs/{nv-icon.entry-Db00kB2u.js → nv-icon.entry-Dci11W9S.js} +5 -5
- package/dist/cjs/nv-iconbutton_2.entry-A6FKFJT_.js +171 -0
- package/dist/cjs/{nv-menu.entry-CK2HdmBt.js → nv-menu.entry-BHaYP-9M.js} +11 -16
- package/dist/cjs/nv-menuitem.entry-Cm1vvN25.js +59 -0
- package/dist/cjs/nv-notification-bullet.entry-DRlS3Ybc.js +76 -0
- package/dist/cjs/nv-notification.entry-BeDmR-XC.js +176 -0
- package/dist/cjs/nv-notificationcontainer.entry-C3p_87Dg.js +41 -0
- package/dist/cjs/nv-paginationtable.entry-BzEqQOBa.js +231 -0
- package/dist/cjs/{nv-popover.entry-mLdLSp6n.js → nv-popover.entry-D2oFn9vL.js} +118 -46
- package/dist/cjs/nv-row.entry-hV1kxmrr.js +22 -0
- package/dist/cjs/{nv-sidebar.entry-inDVNJ4s.js → nv-sidebar.entry-BJrqJ8K7.js} +12 -8
- package/dist/cjs/nv-sidebarcontent.entry-CPfGF7nx.js +22 -0
- package/dist/cjs/{nv-sidebardivider.entry-D_yern0R.js → nv-sidebardivider.entry-D2wmzHCO.js} +4 -4
- package/dist/cjs/{nv-sidebarfooter.entry-Rkkn9TB_.js → nv-sidebarfooter.entry-C7fqCzjH.js} +4 -4
- package/dist/cjs/nv-sidebargroup.entry-qkXnxhs_.js +23 -0
- package/dist/cjs/{nv-sidebarheader.entry-CYpD_4pI.js → nv-sidebarheader.entry-DBsOmyQ0.js} +4 -4
- package/dist/cjs/{nv-sidebarlogo.entry-BgK03M1v.js → nv-sidebarlogo.entry-902Ht3UR.js} +4 -4
- package/dist/cjs/{nv-sidebarnavitem.entry-DglvcCOD.js → nv-sidebarnavitem.entry-CICrllp8.js} +11 -10
- package/dist/cjs/nv-sidebarnavsubitem.entry-Q9jjU_7D.js +35 -0
- package/dist/cjs/{nv-split.entry-mzg2F66T.js → nv-split.entry-BYIsE2wp.js} +51 -45
- package/dist/cjs/nv-stack.entry-DgE5ASGH.js +31 -0
- package/dist/cjs/{nv-table.entry-DkbNgxtI.js → nv-table.entry-DHXBu2n1.js} +9 -11
- package/dist/cjs/{nv-tableheader.entry-CRVFTQA-.js → nv-tableheader.entry-BijgOxcO.js} +5 -5
- package/dist/cjs/nv-toggle.entry-CMI1WdvV.js +82 -0
- package/dist/cjs/nv-togglebutton.entry-DAPETEmF.js +66 -0
- package/dist/cjs/{nv-togglebuttongroup.entry-BYXX5ejg.js → nv-togglebuttongroup.entry-CzDI1XCr.js} +14 -11
- package/dist/cjs/nv-tooltip.entry-DPoUP9iL.js +56 -0
- package/dist/cjs/slide.animation-CmH5d1of-BZuw607U.js +90 -0
- package/dist/components/NvDatatable/NvDatatable.js +69 -32
- package/dist/generated/components.js +38 -0
- package/dist/generated/components.server.js +120 -58
- package/dist/types/components/NvDatatable/NvDatatable.d.ts +1 -1
- package/dist/types/components/NvDatatable/types.d.ts +13 -3
- package/dist/types/generated/components.d.ts +63 -43
- package/dist/types/generated/components.server.d.ts +63 -43
- package/package.json +2 -2
- package/dist/cjs/index-CtjeeUI-.js +0 -39617
- package/dist/cjs/nv-avatar.entry-C_xZD3Lp.js +0 -68
- package/dist/cjs/nv-badge_2.entry-JjqANStV.js +0 -213
- package/dist/cjs/nv-breadcrumb.entry-DQZDn6cm.js +0 -46
- package/dist/cjs/nv-breadcrumbs.entry-Bz0GjhY_.js +0 -21
- package/dist/cjs/nv-button.entry-Br1DH9Vj.js +0 -164
- package/dist/cjs/nv-col.entry-CfgPMMxS.js +0 -38
- package/dist/cjs/nv-fieldcheckbox.entry-Bx6ArV_b.js +0 -177
- package/dist/cjs/nv-fielddropdownitem.entry-C_17isWd.js +0 -73
- package/dist/cjs/nv-fieldnumber.entry-C9O4UPp3.js +0 -187
- package/dist/cjs/nv-fieldpassword.entry-BfVJNT0A.js +0 -165
- package/dist/cjs/nv-fieldradio.entry-CG22oETM.js +0 -103
- package/dist/cjs/nv-fieldselect.entry-BPQEtrv2.js +0 -397
- package/dist/cjs/nv-fieldtext.entry-BD-z01ru.js +0 -163
- package/dist/cjs/nv-iconbutton_2.entry-CaKCa8NT.js +0 -168
- package/dist/cjs/nv-menuitem.entry-mKMqCAdz.js +0 -60
- package/dist/cjs/nv-notification-bullet.entry-DtbjtFxs.js +0 -77
- package/dist/cjs/nv-notification.entry-CLb0gNu3.js +0 -262
- package/dist/cjs/nv-notificationcontainer.entry-Cijivlm6.js +0 -41
- package/dist/cjs/nv-row.entry-C2C94fcv.js +0 -22
- package/dist/cjs/nv-sidebarcontent.entry-DxoljE15.js +0 -22
- package/dist/cjs/nv-sidebargroup.entry-C1p9qqxr.js +0 -23
- package/dist/cjs/nv-sidebarnavsubitem.entry-Dt1jKmC-.js +0 -35
- package/dist/cjs/nv-stack.entry-nnvjTrBy.js +0 -31
- package/dist/cjs/nv-toggle.entry-oC9TVkr1.js +0 -80
- package/dist/cjs/nv-togglebutton.entry-BTWCzbS9.js +0 -67
- package/dist/cjs/nv-tooltip.entry-OJGxfJEh.js +0 -55
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-DUlunl9a.js');
|
|
4
|
+
var clsxChV9xqsO = require('./clsx-ChV9xqsO-BtxeOLZW.js');
|
|
5
|
+
var collapse_animationDZDm0vSK = require('./collapse.animation-DZDm0vSK-C2TOIhIK.js');
|
|
6
|
+
var fade_animationDcRL9lcm = require('./fade.animation-DcRL9lcm-DAZeHoKN.js');
|
|
7
|
+
require('./style-value-types.es-xlgmw4x8-B1vLqX9m.js');
|
|
8
|
+
var timeline_animationCgHCo_Ho = require('./timeline.animation-CgHCo_Ho-KteJaZPb.js');
|
|
9
|
+
require('@stencil/react-output-target/runtime');
|
|
10
|
+
require('react');
|
|
11
|
+
require('react-dom');
|
|
12
|
+
|
|
13
|
+
const nvBadgeCss = () => `nv-badge{padding:var(--badge-padding-y) var(--badge-padding-x);display:inline-flex !important;gap:var(--badge-gap-x);vertical-align:middle;align-items:center;border-radius:var(--radius-rounded-full);border-style:solid;border-width:0.5px;height:fit-content;width:fit-content}nv-badge.is-icon-only{padding:var(--badge-padding-y) var(--badge-padding-icon-only-x);gap:var(--badge-gap-icon-only-x)}nv-badge.with-gap{padding:var(--badge-padding-y) var(--badge-padding-x);display:inline-flex !important;gap:var(--badge-gap-x);vertical-align:middle;align-items:center;border-radius:var(--radius-rounded-full);border-style:solid;border-width:0.5px;height:fit-content;width:fit-content}nv-badge.with-gap.is-icon-only{padding:var(--badge-padding-y) var(--badge-padding-icon-only-x);gap:var(--badge-gap-icon-only-x)}nv-badge.visually-hidden{position:absolute;padding:0;border:0;overflow:hidden;white-space:nowrap;width:1px;height:1px;margin:-1px;clip:rect(0, 0, 0, 0)}nv-badge:not(.with-gap){padding:var(--badge-padding-y) var(--badge-padding-x);display:inline-flex !important;gap:var(--badge-gap-x);vertical-align:middle;align-items:center;border-radius:var(--radius-rounded-full);border-style:solid;border-width:0.5px;height:fit-content;width:fit-content}nv-badge:not(.with-gap).is-icon-only{padding:var(--badge-padding-y) var(--badge-padding-icon-only-x);gap:var(--badge-gap-icon-only-x)}nv-badge.badge-1{color:var(--color-rainbow-1-text);background-color:var(--color-rainbow-1-background);border-color:var(--color-rainbow-1-border)}nv-badge.badge-1 .close:focus,nv-badge.badge-1 .close:focus-within{outline:none}nv-badge.badge-1 .close:focus-visible,nv-badge.badge-1 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-1-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-1 nv-icon{color:var(--color-rainbow-1-icon)}nv-badge.badge-2{color:var(--color-rainbow-2-text);background-color:var(--color-rainbow-2-background);border-color:var(--color-rainbow-2-border)}nv-badge.badge-2 .close:focus,nv-badge.badge-2 .close:focus-within{outline:none}nv-badge.badge-2 .close:focus-visible,nv-badge.badge-2 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-2-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-2 nv-icon{color:var(--color-rainbow-2-icon)}nv-badge.badge-3{color:var(--color-rainbow-3-text);background-color:var(--color-rainbow-3-background);border-color:var(--color-rainbow-3-border)}nv-badge.badge-3 .close:focus,nv-badge.badge-3 .close:focus-within{outline:none}nv-badge.badge-3 .close:focus-visible,nv-badge.badge-3 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-3-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-3 nv-icon{color:var(--color-rainbow-3-icon)}nv-badge.badge-4{color:var(--color-rainbow-4-text);background-color:var(--color-rainbow-4-background);border-color:var(--color-rainbow-4-border)}nv-badge.badge-4 .close:focus,nv-badge.badge-4 .close:focus-within{outline:none}nv-badge.badge-4 .close:focus-visible,nv-badge.badge-4 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-4-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-4 nv-icon{color:var(--color-rainbow-4-icon)}nv-badge.badge-5{color:var(--color-rainbow-5-text);background-color:var(--color-rainbow-5-background);border-color:var(--color-rainbow-5-border)}nv-badge.badge-5 .close:focus,nv-badge.badge-5 .close:focus-within{outline:none}nv-badge.badge-5 .close:focus-visible,nv-badge.badge-5 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-5-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-5 nv-icon{color:var(--color-rainbow-5-icon)}nv-badge.badge-6{color:var(--color-rainbow-6-text);background-color:var(--color-rainbow-6-background);border-color:var(--color-rainbow-6-border)}nv-badge.badge-6 .close:focus,nv-badge.badge-6 .close:focus-within{outline:none}nv-badge.badge-6 .close:focus-visible,nv-badge.badge-6 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-6-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-6 nv-icon{color:var(--color-rainbow-6-icon)}nv-badge.badge-7{color:var(--color-rainbow-7-text);background-color:var(--color-rainbow-7-background);border-color:var(--color-rainbow-7-border)}nv-badge.badge-7 .close:focus,nv-badge.badge-7 .close:focus-within{outline:none}nv-badge.badge-7 .close:focus-visible,nv-badge.badge-7 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-7-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-7 nv-icon{color:var(--color-rainbow-7-icon)}nv-badge.badge-8{color:var(--color-rainbow-8-text);background-color:var(--color-rainbow-8-background);border-color:var(--color-rainbow-8-border)}nv-badge.badge-8 .close:focus,nv-badge.badge-8 .close:focus-within{outline:none}nv-badge.badge-8 .close:focus-visible,nv-badge.badge-8 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-8-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-8 nv-icon{color:var(--color-rainbow-8-icon)}nv-badge.badge-9{color:var(--color-rainbow-9-text);background-color:var(--color-rainbow-9-background);border-color:var(--color-rainbow-9-border)}nv-badge.badge-9 .close:focus,nv-badge.badge-9 .close:focus-within{outline:none}nv-badge.badge-9 .close:focus-visible,nv-badge.badge-9 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-9-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-9 nv-icon{color:var(--color-rainbow-9-icon)}nv-badge.badge-10{color:var(--color-rainbow-10-text);background-color:var(--color-rainbow-10-background);border-color:var(--color-rainbow-10-border)}nv-badge.badge-10 .close:focus,nv-badge.badge-10 .close:focus-within{outline:none}nv-badge.badge-10 .close:focus-visible,nv-badge.badge-10 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-10-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-10 nv-icon{color:var(--color-rainbow-10-icon)}nv-badge.badge-error{color:var(--color-feedback-error-low-text);background-color:var(--color-feedback-error-low-background);border-color:var(--color-feedback-error-low-border)}nv-badge.badge-error .close:focus,nv-badge.badge-error .close:focus-within{outline:none}nv-badge.badge-error .close:focus-visible,nv-badge.badge-error .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-feedback-error-low-content, var(--color-feedback-error-low-text));outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-error nv-icon{color:var(--color-feedback-error-low-icon)}nv-badge.badge-information{color:var(--color-feedback-information-low-text);background-color:var(--color-feedback-information-low-background);border-color:var(--color-feedback-information-low-border)}nv-badge.badge-information .close:focus,nv-badge.badge-information .close:focus-within{outline:none}nv-badge.badge-information .close:focus-visible,nv-badge.badge-information .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-feedback-information-low-content, var(--color-feedback-information-low-text));outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-information nv-icon{color:var(--color-feedback-information-low-icon)}nv-badge.badge-neutral{color:var(--color-feedback-neutral-low-text);background-color:var(--color-feedback-neutral-low-background);border-color:var(--color-feedback-neutral-low-border)}nv-badge.badge-neutral .close:focus,nv-badge.badge-neutral .close:focus-within{outline:none}nv-badge.badge-neutral .close:focus-visible,nv-badge.badge-neutral .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-feedback-neutral-low-content, var(--color-feedback-neutral-low-text));outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-neutral nv-icon{color:var(--color-feedback-neutral-low-icon)}nv-badge.badge-success{color:var(--color-feedback-success-low-text);background-color:var(--color-feedback-success-low-background);border-color:var(--color-feedback-success-low-border)}nv-badge.badge-success .close:focus,nv-badge.badge-success .close:focus-within{outline:none}nv-badge.badge-success .close:focus-visible,nv-badge.badge-success .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-feedback-success-low-content, var(--color-feedback-success-low-text));outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-success nv-icon{color:var(--color-feedback-success-low-icon)}nv-badge.badge-warning{color:var(--color-feedback-warning-low-text);background-color:var(--color-feedback-warning-low-background);border-color:var(--color-feedback-warning-low-border)}nv-badge.badge-warning .close:focus,nv-badge.badge-warning .close:focus-within{outline:none}nv-badge.badge-warning .close:focus-visible,nv-badge.badge-warning .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-feedback-warning-low-content, var(--color-feedback-warning-low-text));outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-warning nv-icon{color:var(--color-feedback-warning-low-icon)}nv-badge.badge-amber{color:var(--color-rainbow-1-text);background-color:var(--color-rainbow-1-background);border-color:var(--color-rainbow-1-border)}nv-badge.badge-amber .close:focus,nv-badge.badge-amber .close:focus-within{outline:none}nv-badge.badge-amber .close:focus-visible,nv-badge.badge-amber .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-amber-content, var(--color-rainbow-1-text));outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-amber nv-icon{color:var(--color-rainbow-1-icon)}nv-badge.badge-orange{color:var(--color-rainbow-2-text);background-color:var(--color-rainbow-2-background);border-color:var(--color-rainbow-2-border)}nv-badge.badge-orange .close:focus,nv-badge.badge-orange .close:focus-within{outline:none}nv-badge.badge-orange .close:focus-visible,nv-badge.badge-orange .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-orange-content, var(--color-rainbow-2-text));outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-orange nv-icon{color:var(--color-rainbow-2-icon)}nv-badge.badge-turquoise{color:var(--color-rainbow-5-text);background-color:var(--color-rainbow-5-background);border-color:var(--color-rainbow-5-border)}nv-badge.badge-turquoise .close:focus,nv-badge.badge-turquoise .close:focus-within{outline:none}nv-badge.badge-turquoise .close:focus-visible,nv-badge.badge-turquoise .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-turquoise-content, var(--color-rainbow-5-text));outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-turquoise nv-icon{color:var(--color-rainbow-5-icon)}nv-badge.badge-crimson{color:var(--color-rainbow-6-text);background-color:var(--color-rainbow-6-background);border-color:var(--color-rainbow-6-border)}nv-badge.badge-crimson .close:focus,nv-badge.badge-crimson .close:focus-within{outline:none}nv-badge.badge-crimson .close:focus-visible,nv-badge.badge-crimson .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-crimson-content, var(--color-rainbow-6-text));outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-crimson nv-icon{color:var(--color-rainbow-6-icon)}nv-badge.badge-lime{color:var(--color-rainbow-9-text);background-color:var(--color-rainbow-9-background);border-color:var(--color-rainbow-9-border)}nv-badge.badge-lime .close:focus,nv-badge.badge-lime .close:focus-within{outline:none}nv-badge.badge-lime .close:focus-visible,nv-badge.badge-lime .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-lime-content, var(--color-rainbow-9-text));outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-lime nv-icon{color:var(--color-rainbow-9-icon)}nv-badge.badge-petrol{color:var(--color-rainbow-8-text);background-color:var(--color-rainbow-8-background);border-color:var(--color-rainbow-8-border)}nv-badge.badge-petrol .close:focus,nv-badge.badge-petrol .close:focus-within{outline:none}nv-badge.badge-petrol .close:focus-visible,nv-badge.badge-petrol .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-petrol-content, var(--color-rainbow-8-text));outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-petrol nv-icon{color:var(--color-rainbow-8-icon)}nv-badge span{font-size:var(--font-size-xs);line-height:var(--line-height-xs) !important;text-align:center}nv-badge nv-icon>svg.icon-xs{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge nv-icon>svg.icon-sm{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge nv-icon>svg.icon-md{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge nv-icon>svg.icon-lg{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge nv-icon>svg.icon-xl{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge .close{padding:0;line-height:0;border:none;background:none;cursor:pointer;color:inherit;display:inline-flex;align-items:center;aspect-ratio:1/1;border-radius:var(--radius-rounded-full)}`;
|
|
14
|
+
|
|
15
|
+
const NvBadge = class {
|
|
16
|
+
constructor(hostRef) {
|
|
17
|
+
index.registerInstance(this, hostRef);
|
|
18
|
+
this.closeClicked = index.createEvent(this, "closeClicked", 3);
|
|
19
|
+
this.hiddenChanged = index.createEvent(this, "hiddenChanged", 3);
|
|
20
|
+
this.hiddenChangedComplete = index.createEvent(this, "hiddenChangedComplete", 3);
|
|
21
|
+
/****************************************************************************/
|
|
22
|
+
//#region DEPRECATED
|
|
23
|
+
/**
|
|
24
|
+
* Whether the badge is dismissible.
|
|
25
|
+
* @deprecated use dismissible instead.
|
|
26
|
+
*/
|
|
27
|
+
this.dismissal = false;
|
|
28
|
+
//#endregion DEPRECATED
|
|
29
|
+
/****************************************************************************/
|
|
30
|
+
//#region PROPERTIES
|
|
31
|
+
/**
|
|
32
|
+
* The color of the badge.
|
|
33
|
+
* deprecated Use status values or named colors instead.
|
|
34
|
+
* Use a string between 1 to 10
|
|
35
|
+
* or one of the status values: error, information, neutral, success, warning
|
|
36
|
+
* or one of the color names: amber, orange, turquoise, crimson, lime
|
|
37
|
+
*/
|
|
38
|
+
this.color = '1';
|
|
39
|
+
/**
|
|
40
|
+
* Main content of the badge.
|
|
41
|
+
*/
|
|
42
|
+
this.label = null;
|
|
43
|
+
/**
|
|
44
|
+
* The lead icon of the badge.
|
|
45
|
+
*/
|
|
46
|
+
this.leadIcon = null;
|
|
47
|
+
/**
|
|
48
|
+
* Whether the badge is dismissible.
|
|
49
|
+
*/
|
|
50
|
+
this.dismissible = false;
|
|
51
|
+
/**
|
|
52
|
+
* Controls the visibility of the badge. Will animate with fade and collapse.
|
|
53
|
+
*/
|
|
54
|
+
this.hidden = false; // eslint-disable-line @stencil-community/reserved-member-names
|
|
55
|
+
/**
|
|
56
|
+
* When true, the alert does not automatically close upon dismissing.
|
|
57
|
+
* Useful for externally controlled component behavior.
|
|
58
|
+
*/
|
|
59
|
+
this.preventAutoClose = false;
|
|
60
|
+
/**
|
|
61
|
+
* When true, the badge will only display an icon without label.
|
|
62
|
+
* The label will be visually hidden but still accessible for screen readers.
|
|
63
|
+
*/
|
|
64
|
+
this.isIconOnly = false;
|
|
65
|
+
//#endregion LIFECYCLE
|
|
66
|
+
/****************************************************************************/
|
|
67
|
+
//#region METHODS
|
|
68
|
+
/**
|
|
69
|
+
* Handles the close button click.
|
|
70
|
+
*/
|
|
71
|
+
this.handleClose = () => {
|
|
72
|
+
if (!this.preventAutoClose) {
|
|
73
|
+
this.hidden = true;
|
|
74
|
+
}
|
|
75
|
+
this.closeClicked.emit();
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
//#endregion EVENTS
|
|
79
|
+
/****************************************************************************/
|
|
80
|
+
//#region WATCHERS
|
|
81
|
+
/**
|
|
82
|
+
* Handles the dismissal prop change.
|
|
83
|
+
* @param {boolean} dismissal - The new dismissal value.
|
|
84
|
+
*/
|
|
85
|
+
handleDismissalChange(dismissal) {
|
|
86
|
+
this.dismissible = dismissal;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Handles the icon prop change.
|
|
90
|
+
* @param {string} icon - The new icon value.
|
|
91
|
+
*/
|
|
92
|
+
handleIconChange(icon) {
|
|
93
|
+
this.leadIcon = icon;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Handles the hidden prop change.
|
|
97
|
+
* @param {boolean} hidden - The new hidden value.
|
|
98
|
+
*/
|
|
99
|
+
async handleHiddenChange(hidden) {
|
|
100
|
+
this.hiddenChanged.emit(hidden);
|
|
101
|
+
if (this._isHidden === true)
|
|
102
|
+
this._isHidden = hidden;
|
|
103
|
+
const { fadeIn, fadeOut } = fade_animationDcRL9lcm.useFade(this.el, { duration: 150 });
|
|
104
|
+
const { collapse, expand } = collapse_animationDZDm0vSK.useCollapse(this.el, { duration: 150 });
|
|
105
|
+
if (hidden === true)
|
|
106
|
+
await timeline_animationCgHCo_Ho.timeline(fadeOut, collapse).start();
|
|
107
|
+
if (hidden === false)
|
|
108
|
+
await timeline_animationCgHCo_Ho.timeline(expand, fadeIn).start();
|
|
109
|
+
this.hiddenChangedComplete.emit(hidden);
|
|
110
|
+
if (this._isHidden === false)
|
|
111
|
+
this._isHidden = hidden;
|
|
112
|
+
}
|
|
113
|
+
//#endregion WATCHERS
|
|
114
|
+
/****************************************************************************/
|
|
115
|
+
//#region LIFECYCLE
|
|
116
|
+
/**
|
|
117
|
+
* Component will load.
|
|
118
|
+
*/
|
|
119
|
+
componentWillLoad() {
|
|
120
|
+
if (this.dismissal) {
|
|
121
|
+
this.dismissible = this.dismissal;
|
|
122
|
+
}
|
|
123
|
+
if (this.icon != null && this.icon != '') {
|
|
124
|
+
this.leadIcon = this.icon;
|
|
125
|
+
}
|
|
126
|
+
if (this.hidden) {
|
|
127
|
+
this._isHidden = true;
|
|
128
|
+
const { setCollapsed } = collapse_animationDZDm0vSK.useCollapse(this.el);
|
|
129
|
+
const { setFadeOut } = fade_animationDcRL9lcm.useFade(this.el);
|
|
130
|
+
setCollapsed();
|
|
131
|
+
setFadeOut();
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
//#endregion METHODS
|
|
135
|
+
/****************************************************************************/
|
|
136
|
+
//#region RENDER
|
|
137
|
+
render() {
|
|
138
|
+
return (index.h(index.Host, { key: 'e47c85f80669870b4cd825fa29ebee7610751728', class: clsxChV9xqsO.clsx(`badge-${this.color}`, {
|
|
139
|
+
'has-close': this.dismissible,
|
|
140
|
+
'with-gap': this.dismissible || this.label,
|
|
141
|
+
'visually-hidden': this._isHidden,
|
|
142
|
+
'is-icon-only': this.isIconOnly,
|
|
143
|
+
}) }, index.h("slot", { key: '63909cdcb1edc9e685d1b60534d72ed3dd700d05', name: "leading-icon" }, this.leadIcon && index.h("nv-icon", { key: 'ca443b29509145863f0fc4a8f814c57669342d15', name: this.leadIcon, size: "sm" })), index.h("span", { key: 'fbae90db0aa23cf0d204b14002ca702ad3731b51', class: clsxChV9xqsO.clsx({ 'visually-hidden': this.isIconOnly }) }, this.label, index.h("slot", { key: '93e818db9d012176d407b19097c7513d7d462053' })), this.dismissible && (index.h("button", { key: 'c48984564102d04914a967aa3f9a29defae62455', onClick: this.handleClose, class: "close", type: "button" }, index.h("nv-icon", { key: '849a32c60019a99909e0383ad593fc1daf00dc59', name: "x", size: "sm" })))));
|
|
144
|
+
}
|
|
145
|
+
get el() { return index.getElement(this); }
|
|
146
|
+
static get watchers() { return {
|
|
147
|
+
"dismissal": [{
|
|
148
|
+
"handleDismissalChange": 0
|
|
149
|
+
}],
|
|
150
|
+
"icon": [{
|
|
151
|
+
"handleIconChange": 0
|
|
152
|
+
}],
|
|
153
|
+
"hidden": [{
|
|
154
|
+
"handleHiddenChange": 0
|
|
155
|
+
}]
|
|
156
|
+
}; }
|
|
157
|
+
};
|
|
158
|
+
NvBadge.style = nvBadgeCss();
|
|
159
|
+
|
|
160
|
+
const nvFielddropdownitemcheckCss = () => `nv-fielddropdownitemcheck slot-fb,nv-fielddropdownitemcheck span{all:unset}nv-fielddropdownitemcheck{cursor:pointer;display:flex;padding:var(--list-dropdown-item-padding-y) var(--list-dropdown-item-padding-x);border-radius:var(--list-dropdown-item-radius)}nv-fielddropdownitemcheck:hover{background-color:var(--components-list-dropdown-item-background-hover)}`;
|
|
161
|
+
|
|
162
|
+
const NvFielddropdownitemcheck = class {
|
|
163
|
+
constructor(hostRef) {
|
|
164
|
+
index.registerInstance(this, hostRef);
|
|
165
|
+
this.itemChecked = index.createEvent(this, "itemChecked", 7);
|
|
166
|
+
/****************************************************************************/
|
|
167
|
+
//#region PROPERTIES
|
|
168
|
+
/**
|
|
169
|
+
* Indicates whether the checkbox is selected.
|
|
170
|
+
*/
|
|
171
|
+
this.checked = false;
|
|
172
|
+
/**
|
|
173
|
+
* Disables the item, preventing any user interaction.
|
|
174
|
+
*/
|
|
175
|
+
this.disabled = false;
|
|
176
|
+
//#endregion EVENTS
|
|
177
|
+
/****************************************************************************/
|
|
178
|
+
//#region METHODS
|
|
179
|
+
/**
|
|
180
|
+
* when the child <nv-fieldcheckbox> change its `checked` state,
|
|
181
|
+
* update `this.checked` and emit `itemChecked`.
|
|
182
|
+
* @param {CustomEvent<boolean>} event - The event emitted by the <nv-fieldcheckbox> component.
|
|
183
|
+
*/
|
|
184
|
+
this.onFieldcheckboxChanged = (event) => {
|
|
185
|
+
if (this.disabled)
|
|
186
|
+
return;
|
|
187
|
+
// NvFieldcheckbox has emitted checkedChanged
|
|
188
|
+
this.checked = event.detail; // get the new state
|
|
189
|
+
this.itemChecked.emit({
|
|
190
|
+
value: this.value,
|
|
191
|
+
checked: this.checked,
|
|
192
|
+
group: this.group,
|
|
193
|
+
});
|
|
194
|
+
};
|
|
195
|
+
/** Make sure the checkbox is checked when clicked anywhere in the item. */
|
|
196
|
+
this.handleClick = () => {
|
|
197
|
+
if (this.disabled)
|
|
198
|
+
return;
|
|
199
|
+
if (this.el.querySelector('input').checked) {
|
|
200
|
+
this.checked = false;
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
this.checked = true;
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
//#endregion METHODS
|
|
208
|
+
/****************************************************************************/
|
|
209
|
+
//#region RENDER
|
|
210
|
+
render() {
|
|
211
|
+
return (index.h(index.Host, { key: '3d170ba455c58880f20590200decfde25224886f', onClick: this.handleClick }, index.h("nv-fieldcheckbox", { key: 'b13310319d63346dcef8ee13f1bbc348617e5981', checked: this.checked, name: this.label || this.value, label: this.label || this.value, labelPlacement: "after", description: this.description, disabled: this.disabled, tabindex: "-1", onCheckedChanged: this.onFieldcheckboxChanged }, index.h("slot", { key: 'c936ae30f4fcf8073be1f1e3a3b0d79cf1532136' }), index.h("slot", { key: '0e6d7701da3d5d26141ce471fcd79b9693ca3e57', name: "main" }), index.h("slot", { key: '5be71b210a4b4fc49d772afd3bb0a7d1c778d870', name: "label" }), index.h("slot", { key: '4e5b81eefa8c3bc37763e0d3c7fc2828b5ece4bc', name: "description" }))));
|
|
212
|
+
}
|
|
213
|
+
get el() { return index.getElement(this); }
|
|
214
|
+
};
|
|
215
|
+
NvFielddropdownitemcheck.style = nvFielddropdownitemcheckCss();
|
|
216
|
+
|
|
217
|
+
exports.nv_badge = NvBadge;
|
|
218
|
+
exports.nv_fielddropdownitemcheck = NvFielddropdownitemcheck;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-DUlunl9a.js');
|
|
4
|
+
var clsxChV9xqsO = require('./clsx-ChV9xqsO-BtxeOLZW.js');
|
|
5
|
+
require('@stencil/react-output-target/runtime');
|
|
6
|
+
require('react');
|
|
7
|
+
require('react-dom');
|
|
8
|
+
|
|
9
|
+
const nvBreadcrumbCss = () => `nv-breadcrumb{display:flex;align-items:center;color:var(--components-breadcrumb-text);font-size:var(--font-size-sm);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--line-height-sm)}nv-breadcrumb.visually-hidden{position:absolute;padding:0;border:0;overflow:hidden;white-space:nowrap;width:1px;height:1px;margin:-1px;clip:rect(0, 0, 0, 0)}nv-breadcrumb ul{display:flex;flex-direction:column;gap:var(--spacing-1-5);padding:var(--spacing-1)}nv-breadcrumb ul a,nv-breadcrumb ul button{display:inline-flex;align-self:center;color:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;text-decoration:none}nv-breadcrumb ul a:focus,nv-breadcrumb ul a:focus-within,nv-breadcrumb ul button:focus,nv-breadcrumb ul button:focus-within{outline:none}nv-breadcrumb ul a:focus-visible,nv-breadcrumb ul a:has(:focus-visible),nv-breadcrumb ul button:focus-visible,nv-breadcrumb ul button:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 0.5) solid var(--components-breadcrumb-text-hover);outline-offset:calc(var(--focus-outline-offset) * 0.3)}nv-breadcrumb ul a:hover,nv-breadcrumb ul button:hover{text-decoration:underline;color:var(--components-breadcrumb-text-hover)}nv-breadcrumb>a,nv-breadcrumb>button{display:inline-flex;align-self:center;color:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;text-decoration:none}nv-breadcrumb>a:focus,nv-breadcrumb>a:focus-within,nv-breadcrumb>button:focus,nv-breadcrumb>button:focus-within{outline:none}nv-breadcrumb>a:focus-visible,nv-breadcrumb>a:has(:focus-visible),nv-breadcrumb>button:focus-visible,nv-breadcrumb>button:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 0.5) solid var(--components-breadcrumb-text-hover);outline-offset:calc(var(--focus-outline-offset) * 0.3)}nv-breadcrumb>a:hover,nv-breadcrumb>button:hover{text-decoration:underline;color:var(--components-breadcrumb-text-hover)}nv-breadcrumb span[data-scope=separator]{display:inline-flex;padding-left:var(--breadcrumb-padding-y)}`;
|
|
10
|
+
|
|
11
|
+
const NvBreadcrumb = class {
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
index.registerInstance(this, hostRef);
|
|
14
|
+
/****************************************************************************/
|
|
15
|
+
//#region PROPERTIES
|
|
16
|
+
/**
|
|
17
|
+
* The type of the breadcrumb. Use 'collapsed' to house multiple breadcrumbs
|
|
18
|
+
* in a dropdown. Use default for a single item. When passing multiple items
|
|
19
|
+
* as collapsed, make sure to wrap you links in list tags
|
|
20
|
+
*/
|
|
21
|
+
this.type = 'default';
|
|
22
|
+
}
|
|
23
|
+
//#endregion PROPERTIES
|
|
24
|
+
/****************************************************************************/
|
|
25
|
+
//#region LIFECYCLE
|
|
26
|
+
componentDidRender() {
|
|
27
|
+
if (this.type === 'default' && this.tooltip) {
|
|
28
|
+
const trigger = this.defaultSlot?.nextSibling;
|
|
29
|
+
if (trigger && trigger !== this.toolTipRef)
|
|
30
|
+
this.toolTipRef.triggerElement = trigger;
|
|
31
|
+
}
|
|
32
|
+
if (this.type === 'collapsed') {
|
|
33
|
+
// <button ref={..}> does not rerender the component, so we need to
|
|
34
|
+
// manually assign the trigger
|
|
35
|
+
if (this.popoverRef)
|
|
36
|
+
this.popoverRef.triggerElement = this.popoverTrigger;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//#endregion LIFECYCLE
|
|
40
|
+
/****************************************************************************/
|
|
41
|
+
//#region RENDER
|
|
42
|
+
render() {
|
|
43
|
+
return (index.h(index.Host, { key: 'b1cf4450a7e04d6a85c21c4003f02d1c5da47792', role: "listitem", "aria-current": this.current ? 'location' : undefined, class: clsxChV9xqsO.clsx({ 'visually-hidden': this.current }) }, this.type === 'collapsed' ? (index.h("button", { ref: el => (this.popoverTrigger = el) }, "...")) : (index.h("slot", { ref: el => (this.defaultSlot = el) })), this.tooltip && (index.h("nv-tooltip", { key: '1459581acafe9ffcc20f85cb53618ad910c9c1df', ref: el => (this.toolTipRef = el), message: this.tooltip, triggerElement: this.popoverTrigger, placement: "top" })), this.type === 'collapsed' && (index.h("nv-popover", { key: 'a49865bb2ee61632c68138f9cc3543bc4b5b0ef4', ref: el => (this.popoverRef = el), triggerMode: "click", groupName: "breadcrumbs", triggerElement: this.popoverTrigger }, index.h("ul", { key: '4b88fa9f43a51313b6e638afdfa011a2c4770b85', slot: "content" }, index.h("slot", { key: 'abbdd94a21de5d9edccbfa4ff5f3b087b465a3ef' })))), index.h("span", { key: '2ab42832f8c39e5ee53498f18828ee65da4958f3', "data-scope": "separator" }, "/")));
|
|
44
|
+
}
|
|
45
|
+
get el() { return index.getElement(this); }
|
|
46
|
+
};
|
|
47
|
+
NvBreadcrumb.style = nvBreadcrumbCss();
|
|
48
|
+
|
|
49
|
+
exports.nv_breadcrumb = NvBreadcrumb;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-DUlunl9a.js');
|
|
4
|
+
require('@stencil/react-output-target/runtime');
|
|
5
|
+
require('react');
|
|
6
|
+
require('react-dom');
|
|
7
|
+
|
|
8
|
+
const nvBreadcrumbsCss = () => `nv-breadcrumbs{display:flex;flex-wrap:wrap;align-items:center;gap:var(--breadcrumb-padding-y)}nv-breadcrumbs nv-breadcrumb:last-child [data-scope=separator],nv-breadcrumbs nv-breadcrumb:last-child [slot=separator]{display:none}`;
|
|
9
|
+
|
|
10
|
+
const NvBreadcrumbs = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
}
|
|
14
|
+
//#region RENDER
|
|
15
|
+
render() {
|
|
16
|
+
return (index.h(index.Host, { key: '4337fe5161c0ce444001e1b92221f3adac26e4bf', role: "navigation", "aria-label": "breadcrumbs" }, index.h("slot", { key: '03ea061b013a5fc927b0f7edca68195d0b01de2d' })));
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
NvBreadcrumbs.style = nvBreadcrumbsCss();
|
|
20
|
+
|
|
21
|
+
exports.nv_breadcrumbs = NvBreadcrumbs;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-DUlunl9a.js');
|
|
4
|
+
var constantsBReL3Lsa = require('./constants-BReL3Lsa-DpB_ghPF.js');
|
|
5
|
+
require('@stencil/react-output-target/runtime');
|
|
6
|
+
require('react');
|
|
7
|
+
require('react-dom');
|
|
8
|
+
|
|
9
|
+
const nvButtonCss = () => `nv-button{text-decoration:none;display:inline-flex;justify-content:center;align-items:center;font-style:normal;font-weight:var(--font-weight-medium-emphasis);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;transition:background-color 150ms ease-out;user-select:none;cursor:pointer;height:fit-content;width:fit-content}nv-button[size=xs]{padding:var(--button-xs-padding-y) var(--button-xs-padding-x);gap:var(--button-xs-gap);border-radius:var(--button-xs-border-radius);line-height:var(--button-xs-line-height);height:var(--button-xs-height);font-size:var(--button-xs-font-size)}nv-button[size=xs] nv-icon>svg{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-button[size=sm]{padding:var(--button-sm-padding-y) var(--button-sm-padding-x);gap:var(--button-sm-gap);border-radius:var(--button-sm-border-radius);line-height:var(--button-sm-line-height);height:var(--button-sm-height);font-size:var(--button-sm-font-size)}nv-button[size=sm] nv-icon>svg{width:var(--spacing-4);height:var(--spacing-4);stroke-width:1.5px}nv-button[size=md]{padding:var(--button-md-padding-y) var(--button-md-padding-x);gap:var(--button-md-gap);border-radius:var(--button-md-border-radius);line-height:var(--button-md-line-height);height:var(--button-md-height);font-size:var(--button-md-font-size)}nv-button[size=md] nv-icon>svg{width:var(--spacing-5);height:var(--spacing-5);stroke-width:1.6px}nv-button[size=lg]{padding:var(--button-lg-padding-y) var(--button-lg-padding-x);gap:var(--button-lg-gap);border-radius:var(--button-lg-border-radius);line-height:var(--button-lg-line-height);height:var(--button-lg-height);font-size:var(--button-lg-font-size)}nv-button[size=lg] nv-icon>svg{width:var(--spacing-6);height:var(--spacing-6);stroke-width:1.8px}nv-button[emphasis=high]{background:var(--components-button-high-background);border:1px solid var(--components-button-high-border);color:var(--components-button-high-text)}nv-button[emphasis=high]:hover{background:var(--components-button-high-background-hover);border:1px solid var(--components-button-high-border);color:var(--components-button-high-text-hover)}nv-button[emphasis=high]:active{background:var(--components-button-high-background-active);border:1px solid var(--components-button-high-border-active);color:var(--components-button-high-text-active)}nv-button[emphasis=high]:focus,nv-button[emphasis=high]:focus-within{outline:none}nv-button[emphasis=high]:focus-visible,nv-button[emphasis=high]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=high]:disabled:not([disabled=false]){opacity:0.5;cursor:not-allowed;box-shadow:none}nv-button[emphasis=high][active]:not([active=false]){background:var(--components-button-high-background-active);border:1px solid var(--components-button-high-border-active);color:var(--components-button-high-text-active)}nv-button[emphasis=high][danger]:not([danger=false]){background:var(--components-button-destructive-high-background);border:1px solid transparent;color:var(--components-button-destructive-high-text)}nv-button[emphasis=high][danger]:not([danger=false]):hover{background:var(--components-button-destructive-high-background-hover);border:1px solid transparent;color:var(--components-button-destructive-high-text-hover)}nv-button[emphasis=high][danger]:not([danger=false]):focus,nv-button[emphasis=high][danger]:not([danger=false]):focus-within{outline:none}nv-button[emphasis=high][danger]:not([danger=false]):focus-visible,nv-button[emphasis=high][danger]:not([danger=false]):has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-destructive);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=medium]{background:var(--components-button-medium-background);border:1px solid var(--components-button-medium-border);color:var(--components-button-medium-text)}nv-button[emphasis=medium]:hover{background:var(--components-button-medium-background-hover);border:1px solid var(--components-button-medium-border);color:var(--components-button-medium-text-hover)}nv-button[emphasis=medium]:active{background:var(--components-button-medium-background-active);border:1px solid var(--components-button-medium-border-active);color:var(--components-button-medium-text-active)}nv-button[emphasis=medium]:focus,nv-button[emphasis=medium]:focus-within{outline:none}nv-button[emphasis=medium]:focus-visible,nv-button[emphasis=medium]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=medium]:disabled:not([disabled=false]){opacity:0.5;cursor:not-allowed;box-shadow:none}nv-button[emphasis=medium][active]:not([active=false]){background:var(--components-button-medium-background-active);border:1px solid var(--components-button-medium-border-active);color:var(--components-button-medium-text-active)}nv-button[emphasis=medium][danger]:not([danger=false]){background:var(--components-button-destructive-medium-background);border:1px solid var(--components-button-destructive-medium-border);color:var(--components-button-destructive-medium-text)}nv-button[emphasis=medium][danger]:not([danger=false]):hover{background:var(--components-button-destructive-medium-background-hover);border:1px solid var(--components-button-destructive-medium-border);color:var(--components-button-destructive-medium-text-hover)}nv-button[emphasis=medium][danger]:not([danger=false]):focus,nv-button[emphasis=medium][danger]:not([danger=false]):focus-within{outline:none}nv-button[emphasis=medium][danger]:not([danger=false]):focus-visible,nv-button[emphasis=medium][danger]:not([danger=false]):has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-destructive);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=low]{background:var(--components-button-low-background);border:1px solid var(--components-button-low-border);color:var(--components-button-low-text)}nv-button[emphasis=low]:hover{background:var(--components-button-low-background-hover);border:1px solid var(--components-button-low-border);color:var(--components-button-low-text-hover)}nv-button[emphasis=low]:active{background:var(--components-button-low-background-active);border:1px solid var(--components-button-low-border-active);color:var(--components-button-low-text-active)}nv-button[emphasis=low]:focus,nv-button[emphasis=low]:focus-within{outline:none}nv-button[emphasis=low]:focus-visible,nv-button[emphasis=low]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=low]:disabled:not([disabled=false]){opacity:0.5;cursor:not-allowed;box-shadow:none}nv-button[emphasis=low][active]:not([active=false]){background:var(--components-button-low-background-active);border:1px solid var(--components-button-low-border-active);color:var(--components-button-low-text-active)}nv-button[emphasis=low][danger]:not([danger=false]){background:var(--components-button-destructive-low-background);border:1px solid var(--components-button-destructive-low-border);color:var(--components-button-destructive-low-text)}nv-button[emphasis=low][danger]:not([danger=false]):hover{background:var(--components-button-destructive-low-background-hover);border:1px solid var(--components-button-destructive-low-border);color:var(--components-button-destructive-low-text-hover)}nv-button[emphasis=low][danger]:not([danger=false]):focus,nv-button[emphasis=low][danger]:not([danger=false]):focus-within{outline:none}nv-button[emphasis=low][danger]:not([danger=false]):focus-visible,nv-button[emphasis=low][danger]:not([danger=false]):has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-destructive);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=lower]{background:var(--components-button-lower-background);border:1px solid var(--components-button-lower-border);color:var(--components-button-lower-text)}nv-button[emphasis=lower]:hover{background:var(--components-button-lower-background-hover);border:1px solid var(--components-button-lower-border);color:var(--components-button-lower-text-hover)}nv-button[emphasis=lower]:active{background:var(--components-button-lower-background-active);border:1px solid var(--components-button-lower-border-active);color:var(--components-button-lower-text-active)}nv-button[emphasis=lower]:focus,nv-button[emphasis=lower]:focus-within{outline:none}nv-button[emphasis=lower]:focus-visible,nv-button[emphasis=lower]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=lower]:disabled:not([disabled=false]){opacity:0.5;cursor:not-allowed;box-shadow:none}nv-button[emphasis=lower][active]:not([active=false]){background:var(--components-button-lower-background-active);border:1px solid var(--components-button-lower-border-active);color:var(--components-button-lower-text-active)}nv-button[emphasis=lower][danger]:not([danger=false]){background:var(--components-button-destructive-lower-background);border:1px solid var(--components-button-destructive-lower-border);color:var(--components-button-destructive-lower-text)}nv-button[emphasis=lower][danger]:not([danger=false]):hover{background:var(--components-button-destructive-lower-background-hover);border:1px solid var(--components-button-destructive-lower-border);color:var(--components-button-destructive-lower-text-hover)}nv-button[emphasis=lower][danger]:not([danger=false]):focus,nv-button[emphasis=lower][danger]:not([danger=false]):focus-within{outline:none}nv-button[emphasis=lower][danger]:not([danger=false]):focus-visible,nv-button[emphasis=lower][danger]:not([danger=false]):has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-destructive);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[fluid]:not([fluid=false]){width:100%}nv-button[loading]:not([loading=false]) [slot=leading-icon]{display:none}`;
|
|
10
|
+
|
|
11
|
+
const NvButton = class {
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
index.registerInstance(this, hostRef);
|
|
14
|
+
if (hostRef.$hostElement$["s-ei"]) {
|
|
15
|
+
this.internals = hostRef.$hostElement$["s-ei"];
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
this.internals = hostRef.$hostElement$.attachInternals();
|
|
19
|
+
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
20
|
+
}
|
|
21
|
+
/****************************************************************************/
|
|
22
|
+
//#region PROPERTIES
|
|
23
|
+
/**
|
|
24
|
+
* Determines how large or small the button appears, allowing for
|
|
25
|
+
* customization of the button's dimensions to fit different design
|
|
26
|
+
* specifications and user needs.
|
|
27
|
+
*/
|
|
28
|
+
this.size = 'md';
|
|
29
|
+
/**
|
|
30
|
+
* Adjusts the button's emphasis to make it more or less visually prominent
|
|
31
|
+
* to users. Use this to draw attention to important actions or reduce focus
|
|
32
|
+
* on less critical ones
|
|
33
|
+
*/
|
|
34
|
+
this.emphasis = 'high';
|
|
35
|
+
/**
|
|
36
|
+
* Use this prop to highlight the button when it represents the current page
|
|
37
|
+
* or active selection. This helps users understand their navigation context.
|
|
38
|
+
*/
|
|
39
|
+
this.active = false;
|
|
40
|
+
/**
|
|
41
|
+
* Applies styling that visually indicates the button represents a dangerous
|
|
42
|
+
* action.
|
|
43
|
+
*/
|
|
44
|
+
this.danger = false;
|
|
45
|
+
/**
|
|
46
|
+
* Set this to true to show a spinner on the button, letting users know that
|
|
47
|
+
* their action is being processed. It helps improve user experience by
|
|
48
|
+
* indicating ongoing activities.
|
|
49
|
+
*/
|
|
50
|
+
this.loading = false;
|
|
51
|
+
/**
|
|
52
|
+
* Disables the button, preventing user interaction.
|
|
53
|
+
*/
|
|
54
|
+
this.disabled = false;
|
|
55
|
+
/**
|
|
56
|
+
* Allows the button to stretch and fill the entire width of its container.
|
|
57
|
+
*/
|
|
58
|
+
this.fluid = false;
|
|
59
|
+
/**
|
|
60
|
+
* Sets the button type to control its function in forms. Use 'submit' to send
|
|
61
|
+
* form data, 'reset' to clear the form, or 'button' for a standard button
|
|
62
|
+
* that doesn't interact with form submission by default.
|
|
63
|
+
*/
|
|
64
|
+
this.type = 'button';
|
|
65
|
+
/**
|
|
66
|
+
* Use this to make the button skip-able when users navigate with the keyboard.
|
|
67
|
+
* The button remains clickable but won’t be reached via the Tab key.
|
|
68
|
+
*/
|
|
69
|
+
this.disableTabindex = false;
|
|
70
|
+
//#endregion PROPERTIES
|
|
71
|
+
/****************************************************************************/
|
|
72
|
+
//#region METHODS
|
|
73
|
+
/**
|
|
74
|
+
* Handles button click events, managing form actions and disabled states.
|
|
75
|
+
* Prevents default behavior when button is disabled or loading, and
|
|
76
|
+
* processes form submissions/resets when appropriate.
|
|
77
|
+
* @param {Event} event - The click event.
|
|
78
|
+
*/
|
|
79
|
+
this.handleButtonClick = (event) => {
|
|
80
|
+
if (this.loading || this.disabled) {
|
|
81
|
+
event.preventDefault();
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
if (this.type !== constantsBReL3Lsa.ButtonType.Button &&
|
|
85
|
+
(this.form || this.internals?.form)) {
|
|
86
|
+
this.processFormAction();
|
|
87
|
+
}
|
|
88
|
+
else if (this.form && this.type === constantsBReL3Lsa.ButtonType.Button) {
|
|
89
|
+
console.warn('Button has a form id but is not of type submit or reset so no form action will be processed.', `Button:`, this.el);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Processes form-related actions by finding the associated form element
|
|
94
|
+
* and triggering the appropriate action (submit/reset) based on button type.
|
|
95
|
+
* Falls back to ElementInternals form if no explicit form ID is provided.
|
|
96
|
+
*/
|
|
97
|
+
this.processFormAction = () => {
|
|
98
|
+
const formElement = this.form
|
|
99
|
+
? document.getElementById(this.form)
|
|
100
|
+
: this.internals?.form;
|
|
101
|
+
if (!formElement) {
|
|
102
|
+
console.warn('No form element found.', `Form ID: ${this.form || 'Not provided'}`, `Internals form:`, this.internals?.form);
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
switch (this.type) {
|
|
106
|
+
case constantsBReL3Lsa.ButtonType.Submit:
|
|
107
|
+
formElement.requestSubmit();
|
|
108
|
+
break;
|
|
109
|
+
case constantsBReL3Lsa.ButtonType.Reset:
|
|
110
|
+
formElement.reset();
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
//#endregion METHODS
|
|
116
|
+
/****************************************************************************/
|
|
117
|
+
//#region EVENTS
|
|
118
|
+
handleKeyDown(event) {
|
|
119
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
120
|
+
event.preventDefault();
|
|
121
|
+
this.el.click();
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
//#endregion EVENTS
|
|
125
|
+
/****************************************************************************/
|
|
126
|
+
//#region WATCHERS
|
|
127
|
+
handleLoadingChange(loading) {
|
|
128
|
+
this.loading = loading;
|
|
129
|
+
this.disabled = loading;
|
|
130
|
+
}
|
|
131
|
+
handleDisabledChange(disabled) {
|
|
132
|
+
if (this.loading) {
|
|
133
|
+
this.disabled = this.loading;
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
this.disabled = disabled;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
//#endregion WATCHERS
|
|
140
|
+
/****************************************************************************/
|
|
141
|
+
//#region LIFECYCLE
|
|
142
|
+
componentWillLoad() {
|
|
143
|
+
if (this.loading) {
|
|
144
|
+
this.disabled = this.loading;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
//#endregion LIFECYCLE
|
|
148
|
+
/****************************************************************************/
|
|
149
|
+
//#region RENDER
|
|
150
|
+
render() {
|
|
151
|
+
return (index.h(index.Host, { key: 'e1d1cf7060849d1a62ab93d332aaf757ca10ebec', role: "button", tabindex: this.disableTabindex ? -1 : 0, onClick: this.handleButtonClick }, this.loading && (index.h("nv-loader", { key: '36a582a1a411584f0a4705631dee7ffd5561d685', size: this.size === constantsBReL3Lsa.ButtonSize.Large ? 'sm' : 'xs' })), index.h("slot", { key: '1ed41830a7a819ecf4093558c53e7b07197152d3', name: "leading-icon" }), index.h("slot", { key: '37b513628d6b9b3c496af1f66bb08a98dce02cea' }), index.h("slot", { key: '6784df28842764fb32e8d882fa8410e29a115ac1', name: "trailing-icon" })));
|
|
152
|
+
}
|
|
153
|
+
static get formAssociated() { return true; }
|
|
154
|
+
get el() { return index.getElement(this); }
|
|
155
|
+
static get watchers() { return {
|
|
156
|
+
"loading": [{
|
|
157
|
+
"handleLoadingChange": 0
|
|
158
|
+
}],
|
|
159
|
+
"disabled": [{
|
|
160
|
+
"handleDisabledChange": 0
|
|
161
|
+
}]
|
|
162
|
+
}; }
|
|
163
|
+
};
|
|
164
|
+
NvButton.style = nvButtonCss();
|
|
165
|
+
|
|
166
|
+
exports.nv_button = NvButton;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DUlunl9a.js');
|
|
4
4
|
require('@stencil/react-output-target/runtime');
|
|
5
5
|
require('react');
|
|
6
6
|
require('react-dom');
|
|
@@ -91,7 +91,7 @@ function forwardPropsToChildren(containerElement, props) {
|
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
const nvButtongroupCss =
|
|
94
|
+
const nvButtongroupCss = () => `nv-buttongroup{display:flex}nv-buttongroup[emphasis=high]{gap:1px}nv-buttongroup[emphasis=low] .group-item,nv-buttongroup[emphasis=low] .group-item:hover{border:1px solid var(--components-button-low-text)}nv-buttongroup[emphasis=lower] .group-item,nv-buttongroup[emphasis=lower] .group-item:hover{border:1px solid var(--components-button-lower-text)}nv-buttongroup:not([orientation=vertical]) .group-item:not(.last):not(.first){border-radius:0}nv-buttongroup:not([orientation=vertical]) .group-item.first{border-top-right-radius:0;border-bottom-right-radius:0}nv-buttongroup:not([orientation=vertical]) .group-item.last{border-top-left-radius:0;border-bottom-left-radius:0}nv-buttongroup:not([orientation=vertical])[emphasis=medium] .group-item:not(.last){border-right:none}nv-buttongroup:not([orientation=vertical])[emphasis=low] .group-item:not(.last){border-right:none}nv-buttongroup:not([orientation=vertical])[emphasis=low] .group-item:not(.first){border-left:none}nv-buttongroup:not([orientation=vertical])[emphasis=lower] .group-item:not(.last){border-right:none}nv-buttongroup:not([orientation=vertical])[emphasis=lower] .group-item:not(.first){border-left:none}nv-buttongroup[orientation=vertical]{flex-direction:column;align-items:stretch;width:fit-content}nv-buttongroup[orientation=vertical] .group-item{width:unset;display:flex}nv-buttongroup[orientation=vertical] .group-item:not(.last):not(.first){border-radius:0}nv-buttongroup[orientation=vertical] .group-item.first{border-bottom-left-radius:0;border-bottom-right-radius:0}nv-buttongroup[orientation=vertical] .group-item.last{border-top-left-radius:0;border-top-right-radius:0}nv-buttongroup[orientation=vertical][emphasis=medium] .group-item:not(.last){border-bottom:none}nv-buttongroup[orientation=vertical][emphasis=low] .group-item:not(.last){border-bottom:none}nv-buttongroup[orientation=vertical][emphasis=low] .group-item:not(.first){border-top:none}nv-buttongroup[orientation=vertical][emphasis=lower] .group-item:not(.last){border-bottom:none}nv-buttongroup[orientation=vertical][emphasis=lower] .group-item:not(.first){border-top:none}`;
|
|
95
95
|
|
|
96
96
|
const NvButtongroup = class {
|
|
97
97
|
constructor(hostRef) {
|
|
@@ -182,15 +182,21 @@ const NvButtongroup = class {
|
|
|
182
182
|
/****************************************************************************/
|
|
183
183
|
//#region RENDER
|
|
184
184
|
render() {
|
|
185
|
-
return (index.h(index.Host, { key: '
|
|
185
|
+
return (index.h(index.Host, { key: '69c273e6d25e9dfd3b60d35b4c34d9fa331f5a02' }, index.h("slot", { key: '2ee4b40f9b2026099e49a14705fdff72255ef777' })));
|
|
186
186
|
}
|
|
187
187
|
get el() { return index.getElement(this); }
|
|
188
188
|
static get watchers() { return {
|
|
189
|
-
"emphasis": [
|
|
190
|
-
|
|
191
|
-
|
|
189
|
+
"emphasis": [{
|
|
190
|
+
"onEmphasisChange": 0
|
|
191
|
+
}],
|
|
192
|
+
"size": [{
|
|
193
|
+
"onSizeChange": 0
|
|
194
|
+
}],
|
|
195
|
+
"fluid": [{
|
|
196
|
+
"onFluidChange": 0
|
|
197
|
+
}]
|
|
192
198
|
}; }
|
|
193
199
|
};
|
|
194
|
-
NvButtongroup.style = nvButtongroupCss;
|
|
200
|
+
NvButtongroup.style = nvButtongroupCss();
|
|
195
201
|
|
|
196
202
|
exports.nv_buttongroup = NvButtongroup;
|