@nova-design-system/nova-webcomponents 3.9.0 → 3.10.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/dist/cjs/{constants-8fb8ccc0.js → constants-3b6beb66.js} +15 -1
- package/dist/cjs/constants-3b6beb66.js.map +1 -0
- package/dist/cjs/index-c56424e5.js +12 -0
- package/dist/cjs/index.cjs.js +7 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/native.cjs.js +1 -1
- package/dist/cjs/nv-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/nv-accordion-item.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-alert.cjs.entry.js +2 -2
- package/dist/cjs/nv-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-avatar.cjs.entry.js +1 -1
- package/dist/cjs/nv-badge_2.cjs.entry.js +2 -2
- package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/nv-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +2 -2
- package/dist/cjs/nv-button.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-buttongroup.cjs.entry.js +198 -0
- package/dist/cjs/nv-buttongroup.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-calendar.cjs.entry.js +121 -38
- package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-col.cjs.entry.js +1 -1
- package/dist/cjs/nv-datagrid.cjs.entry.js +4 -4
- package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-datagridcolumn.cjs.entry.js +1 -1
- package/dist/cjs/nv-dialog.cjs.entry.js +2 -2
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +5 -5
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddate.cjs.entry.js +62 -94
- package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddaterange.cjs.entry.js +52 -33
- package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +3 -3
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +377 -27
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldradio.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldradio.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldselect.cjs.entry.js +5 -5
- package/dist/cjs/nv-fieldslider.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtext.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtime.cjs.entry.js +10 -10
- package/dist/cjs/nv-icon.cjs.entry.js +3 -3
- package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js +3 -3
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-menu.cjs.entry.js +1 -1
- package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-popover.cjs.entry.js +1 -1
- package/dist/cjs/nv-row.cjs.entry.js +1 -1
- package/dist/cjs/nv-stack.cjs.entry.js +1 -1
- package/dist/cjs/nv-table.cjs.entry.js +2 -2
- package/dist/cjs/nv-toggle.cjs.entry.js +3 -3
- package/dist/cjs/nv-toggle.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-togglebutton.cjs.entry.js +58 -0
- package/dist/cjs/nv-togglebutton.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-togglebuttongroup.cjs.entry.js +172 -0
- package/dist/cjs/nv-togglebuttongroup.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/nv-accordion-item/nv-accordion-item.js +1 -1
- package/dist/collection/components/nv-accordion-item/nv-accordion-item.js.map +1 -1
- package/dist/collection/components/nv-alert/nv-alert.css +5 -0
- package/dist/collection/components/nv-badge/nv-badge.css +21 -0
- package/dist/collection/components/nv-breadcrumb/nv-breadcrumb.css +2 -0
- package/dist/collection/components/nv-button/styles/nv-button.css +8 -0
- package/dist/collection/components/nv-buttongroup/nv-buttongroup.docs.js +43 -0
- package/dist/collection/components/nv-buttongroup/nv-buttongroup.docs.js.map +1 -0
- package/dist/collection/components/nv-buttongroup/nv-buttongroup.js +217 -0
- package/dist/collection/components/nv-buttongroup/nv-buttongroup.js.map +1 -0
- package/dist/collection/components/nv-buttongroup/nv-buttongroup.utils.js +86 -0
- package/dist/collection/components/nv-buttongroup/nv-buttongroup.utils.js.map +1 -0
- package/dist/collection/components/nv-buttongroup/styles/nv-buttongroup.css +73 -0
- package/dist/collection/components/nv-buttongroup/test/nv-buttongroup.utils.test.js +312 -0
- package/dist/collection/components/nv-buttongroup/test/nv-buttongroup.utils.test.js.map +1 -0
- package/dist/collection/components/nv-calendar/nv-calendar.css +9 -0
- package/dist/collection/components/nv-calendar/nv-calendar.js +44 -25
- package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.utils.js +68 -0
- package/dist/collection/components/nv-calendar/nv-calendar.utils.js.map +1 -1
- package/dist/collection/components/nv-calendar/partials/calendar-grid.js +5 -3
- package/dist/collection/components/nv-calendar/partials/calendar-grid.js.map +1 -1
- package/dist/collection/components/nv-calendar/partials/day-cell.js +4 -9
- package/dist/collection/components/nv-calendar/partials/day-cell.js.map +1 -1
- package/dist/collection/components/nv-col/nv-col.js +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.css +1 -0
- package/dist/collection/components/nv-datagrid/nv-datagrid.js +2 -2
- package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.js +1 -1
- package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +1 -1
- package/dist/collection/components/nv-dialogheader/nv-dialogheader.js +1 -1
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.css +1 -0
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +4 -4
- package/dist/collection/components/nv-fielddate/nv-fielddate.js +63 -94
- package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -1
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +52 -33
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +3 -3
- package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +1 -1
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +885 -122
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +561 -89
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/styles/nv-fieldmultiselect.css +70 -16
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +3 -3
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +3 -3
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.css +1 -0
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +5 -5
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +3 -3
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +3 -3
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +3 -3
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +9 -9
- package/dist/collection/components/nv-icon/nv-icon.js +1 -1
- package/dist/collection/components/nv-icon/nv-icons.js +6 -0
- package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.css +4 -0
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
- package/dist/collection/components/nv-loader/nv-loader.js +1 -1
- package/dist/collection/components/nv-menu/nv-menu.js +1 -1
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +2 -2
- package/dist/collection/components/nv-popover/nv-popover.js +1 -1
- package/dist/collection/components/nv-row/nv-row.js +1 -1
- package/dist/collection/components/nv-stack/nv-stack.js +1 -1
- package/dist/collection/components/nv-table/nv-table.js +2 -2
- package/dist/collection/components/nv-toggle/nv-toggle.css +1 -0
- package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
- package/dist/collection/components/nv-togglebutton/nv-togglebutton.docs.js +6 -0
- package/dist/collection/components/nv-togglebutton/nv-togglebutton.docs.js.map +1 -0
- package/dist/collection/components/nv-togglebutton/nv-togglebutton.js +191 -0
- package/dist/collection/components/nv-togglebutton/nv-togglebutton.js.map +1 -0
- package/dist/collection/components/nv-togglebutton/styles/nv-togglebutton.css +135 -0
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.js +56 -0
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.js.map +1 -0
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js +324 -0
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js.map +1 -0
- package/dist/collection/components/nv-togglebuttongroup/styles/nv-togglebuttongroup.css +45 -0
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
- package/dist/collection/utils/constants.js +12 -0
- package/dist/collection/utils/constants.js.map +1 -1
- package/dist/components/index.js +7 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/nv-accordion-item.js +1 -1
- package/dist/components/nv-accordion.js +4 -4
- package/dist/components/nv-alert.js +3 -3
- package/dist/components/nv-alert.js.map +1 -1
- package/dist/components/nv-avatar.js +2 -2
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-breadcrumb.js +3 -3
- package/dist/components/nv-breadcrumb.js.map +1 -1
- package/dist/components/nv-button.js +1 -1
- package/dist/components/nv-buttongroup.d.ts +11 -0
- package/dist/components/nv-buttongroup.js +221 -0
- package/dist/components/nv-buttongroup.js.map +1 -0
- package/dist/components/nv-calendar.js +1 -1
- package/dist/components/nv-col.js +1 -1
- package/dist/components/nv-datagrid.js +6 -6
- package/dist/components/nv-datagrid.js.map +1 -1
- package/dist/components/nv-datagridcolumn.js +1 -1
- package/dist/components/nv-dialog.js +7 -7
- package/dist/components/nv-dialogfooter.js +1 -1
- package/dist/components/nv-dialogheader.js +1 -1
- package/dist/components/nv-fieldcheckbox.js +1 -1
- package/dist/components/nv-fielddate.js +70 -102
- package/dist/components/nv-fielddate.js.map +1 -1
- package/dist/components/nv-fielddaterange.js +58 -39
- package/dist/components/nv-fielddaterange.js.map +1 -1
- package/dist/components/nv-fielddropdown.js +8 -8
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fielddropdownitemcheck.js +1 -1
- package/dist/components/nv-fieldmultiselect.js +399 -41
- package/dist/components/nv-fieldmultiselect.js.map +1 -1
- package/dist/components/nv-fieldnumber.js +1 -1
- package/dist/components/nv-fieldpassword.js +6 -6
- package/dist/components/nv-fieldradio.js +4 -4
- package/dist/components/nv-fieldradio.js.map +1 -1
- package/dist/components/nv-fieldselect.js +8 -8
- package/dist/components/nv-fieldslider.js +7 -7
- package/dist/components/nv-fieldtext.js +1 -1
- package/dist/components/nv-fieldtextarea.js +3 -3
- package/dist/components/nv-fieldtime.js +14 -14
- package/dist/components/nv-icon.js +1 -1
- package/dist/components/nv-iconbutton.js +1 -1
- package/dist/components/nv-loader.js +1 -1
- package/dist/components/nv-menu.js +4 -4
- package/dist/components/nv-menuitem.js +1 -1
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-row.js +1 -1
- package/dist/components/nv-stack.js +1 -1
- package/dist/components/nv-table.js +2 -2
- package/dist/components/nv-toggle.js +3 -3
- package/dist/components/nv-toggle.js.map +1 -1
- package/dist/components/nv-togglebutton.d.ts +11 -0
- package/dist/components/nv-togglebutton.js +78 -0
- package/dist/components/nv-togglebutton.js.map +1 -0
- package/dist/components/nv-togglebuttongroup.d.ts +11 -0
- package/dist/components/nv-togglebuttongroup.js +196 -0
- package/dist/components/nv-togglebuttongroup.js.map +1 -0
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-68ff562f.js → p-0ffb4785.js} +5 -5
- package/dist/components/{p-68ff562f.js.map → p-0ffb4785.js.map} +1 -1
- package/dist/components/{p-8067d283.js → p-195f46f3.js} +2 -2
- package/dist/components/{p-8067d283.js.map → p-195f46f3.js.map} +1 -1
- package/dist/components/{p-e4e1a926.js → p-1bb737fa.js} +3 -3
- package/dist/components/{p-e4e1a926.js.map → p-1bb737fa.js.map} +1 -1
- package/dist/components/{p-db4ba1d9.js → p-2db5d1ab.js} +7 -7
- package/dist/components/{p-db4ba1d9.js.map → p-2db5d1ab.js.map} +1 -1
- package/dist/components/{p-ba87d9d5.js → p-2ef4fb88.js} +3 -3
- package/dist/components/{p-ba87d9d5.js.map → p-2ef4fb88.js.map} +1 -1
- package/dist/components/{p-91a558eb.js → p-32e8e42e.js} +2 -2
- package/dist/components/{p-91a558eb.js.map → p-32e8e42e.js.map} +1 -1
- package/dist/components/{p-6de6866c.js → p-45a625fb.js} +6 -6
- package/dist/components/{p-6de6866c.js.map → p-45a625fb.js.map} +1 -1
- package/dist/components/{p-025b8a78.js → p-50d0db7b.js} +5 -5
- package/dist/components/{p-025b8a78.js.map → p-50d0db7b.js.map} +1 -1
- package/dist/components/{p-ed6686a1.js → p-51876ca1.js} +2 -2
- package/dist/components/{p-ed6686a1.js.map → p-51876ca1.js.map} +1 -1
- package/dist/components/{p-e104c58a.js → p-51a156ff.js} +3 -3
- package/dist/components/p-51a156ff.js.map +1 -0
- package/dist/components/p-8011513c.js +189 -0
- package/dist/components/{p-60064345.js.map → p-8011513c.js.map} +1 -1
- package/dist/components/{p-d32b75ac.js → p-8aee1010.js} +123 -39
- package/dist/components/p-8aee1010.js.map +1 -0
- package/dist/components/{p-79e6b6a2.js → p-9fdaea9a.js} +5 -5
- package/dist/components/p-9fdaea9a.js.map +1 -0
- package/dist/components/{p-6460318d.js → p-a1fe0a5d.js} +4 -4
- package/dist/components/p-a1fe0a5d.js.map +1 -0
- package/dist/components/{p-1f505531.js → p-a3ddec4c.js} +15 -1
- package/dist/components/p-a3ddec4c.js.map +1 -0
- package/dist/components/{p-0143cee0.js → p-a5002d14.js} +6 -6
- package/dist/components/{p-0143cee0.js.map → p-a5002d14.js.map} +1 -1
- package/dist/components/{p-30f970c3.js → p-b659b999.js} +3 -3
- package/dist/components/{p-30f970c3.js.map → p-b659b999.js.map} +1 -1
- package/dist/components/{p-5d5668f0.js → p-cf06032d.js} +4 -4
- package/dist/components/{p-5d5668f0.js.map → p-cf06032d.js.map} +1 -1
- package/dist/components/{p-dfd2d4f0.js → p-fda58a76.js} +2 -2
- package/dist/components/{p-dfd2d4f0.js.map → p-fda58a76.js.map} +1 -1
- package/dist/esm/{constants-4faa1fae.js → constants-23aaef7b.js} +15 -1
- package/dist/esm/constants-23aaef7b.js.map +1 -0
- package/dist/esm/index-a1936cd0.js +12 -0
- package/dist/esm/index.js +7 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/native.js +1 -1
- package/dist/esm/nv-accordion-item.entry.js +1 -1
- package/dist/esm/nv-accordion-item.entry.js.map +1 -1
- package/dist/esm/nv-alert.entry.js +2 -2
- package/dist/esm/nv-alert.entry.js.map +1 -1
- package/dist/esm/nv-avatar.entry.js +1 -1
- package/dist/esm/nv-badge_2.entry.js +2 -2
- package/dist/esm/nv-badge_2.entry.js.map +1 -1
- package/dist/esm/nv-breadcrumb.entry.js +1 -1
- package/dist/esm/nv-breadcrumb.entry.js.map +1 -1
- package/dist/esm/nv-button.entry.js +2 -2
- package/dist/esm/nv-button.entry.js.map +1 -1
- package/dist/esm/nv-buttongroup.entry.js +194 -0
- package/dist/esm/nv-buttongroup.entry.js.map +1 -0
- package/dist/esm/nv-calendar.entry.js +121 -38
- package/dist/esm/nv-calendar.entry.js.map +1 -1
- package/dist/esm/nv-col.entry.js +1 -1
- package/dist/esm/nv-datagrid.entry.js +4 -4
- package/dist/esm/nv-datagrid.entry.js.map +1 -1
- package/dist/esm/nv-datagridcolumn.entry.js +1 -1
- package/dist/esm/nv-dialog.entry.js +2 -2
- package/dist/esm/nv-dialogfooter_2.entry.js +3 -3
- package/dist/esm/nv-fieldcheckbox.entry.js +5 -5
- package/dist/esm/nv-fieldcheckbox.entry.js.map +1 -1
- package/dist/esm/nv-fielddate.entry.js +62 -94
- package/dist/esm/nv-fielddate.entry.js.map +1 -1
- package/dist/esm/nv-fielddaterange.entry.js +52 -33
- package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdown.entry.js +3 -3
- package/dist/esm/nv-fielddropdownitem.entry.js +1 -1
- package/dist/esm/nv-fieldmultiselect.entry.js +378 -28
- package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +3 -3
- package/dist/esm/nv-fieldpassword.entry.js +3 -3
- package/dist/esm/nv-fieldradio.entry.js +4 -4
- package/dist/esm/nv-fieldradio.entry.js.map +1 -1
- package/dist/esm/nv-fieldselect.entry.js +5 -5
- package/dist/esm/nv-fieldslider.entry.js +3 -3
- package/dist/esm/nv-fieldtext.entry.js +3 -3
- package/dist/esm/nv-fieldtextarea.entry.js +3 -3
- package/dist/esm/nv-fieldtime.entry.js +10 -10
- package/dist/esm/nv-icon.entry.js +3 -3
- package/dist/esm/nv-icon.entry.js.map +1 -1
- package/dist/esm/nv-iconbutton_2.entry.js +3 -3
- package/dist/esm/nv-iconbutton_2.entry.js.map +1 -1
- package/dist/esm/nv-menu.entry.js +1 -1
- package/dist/esm/nv-menuitem.entry.js +1 -1
- package/dist/esm/nv-popover.entry.js +1 -1
- package/dist/esm/nv-row.entry.js +1 -1
- package/dist/esm/nv-stack.entry.js +1 -1
- package/dist/esm/nv-table.entry.js +2 -2
- package/dist/esm/nv-toggle.entry.js +3 -3
- package/dist/esm/nv-toggle.entry.js.map +1 -1
- package/dist/esm/nv-togglebutton.entry.js +54 -0
- package/dist/esm/nv-togglebutton.entry.js.map +1 -0
- package/dist/esm/nv-togglebuttongroup.entry.js +168 -0
- package/dist/esm/nv-togglebuttongroup.entry.js.map +1 -0
- package/dist/esm/nv-tooltip.entry.js +1 -1
- package/dist/native/index.esm.js +1 -1
- package/dist/native/index.esm.js.map +1 -1
- package/dist/native/native.css +1 -1
- package/dist/native/native.esm.js +1 -1
- package/dist/native/native.esm.js.map +1 -1
- package/dist/native/{p-2a6783ca.entry.js → p-0da8f0d1.entry.js} +2 -2
- package/dist/native/{p-2a6783ca.entry.js.map → p-0da8f0d1.entry.js.map} +1 -1
- package/dist/native/p-0ef94dae.entry.js +2 -0
- package/dist/native/{p-1ad1bff9.entry.js.map → p-0ef94dae.entry.js.map} +1 -1
- package/dist/native/p-13032ec1.entry.js +2 -0
- package/dist/native/p-13032ec1.entry.js.map +1 -0
- package/dist/native/p-184032cb.entry.js +2 -0
- package/dist/native/{p-a73fa60a.entry.js.map → p-184032cb.entry.js.map} +1 -1
- package/dist/native/p-2197ffdf.entry.js +2 -0
- package/dist/native/{p-fa81b77f.entry.js.map → p-2197ffdf.entry.js.map} +1 -1
- package/dist/native/p-234cfa2e.entry.js +2 -0
- package/dist/native/p-2a3325fb.entry.js +2 -0
- package/dist/native/p-2a3325fb.entry.js.map +1 -0
- package/dist/native/{p-3f139780.entry.js → p-2d647761.entry.js} +2 -2
- package/dist/native/{p-ff248eb8.entry.js → p-348c6bb4.entry.js} +2 -2
- package/dist/native/p-397c0fca.entry.js +2 -0
- package/dist/native/{p-51a57a3a.entry.js.map → p-397c0fca.entry.js.map} +1 -1
- package/dist/native/{p-f687e05c.entry.js → p-3da64006.entry.js} +2 -2
- package/dist/native/p-3da64006.entry.js.map +1 -0
- package/dist/native/p-3ed84cd9.entry.js +2 -0
- package/dist/native/{p-fcd52432.entry.js.map → p-3ed84cd9.entry.js.map} +1 -1
- package/dist/native/{p-3ff7a912.entry.js → p-3fcaac6d.entry.js} +2 -2
- package/dist/native/{p-b7ec9a1b.entry.js → p-4302824a.entry.js} +2 -2
- package/dist/native/p-43071c3b.entry.js +2 -0
- package/dist/native/p-44dd9a4c.entry.js +2 -0
- package/dist/native/p-44dd9a4c.entry.js.map +1 -0
- package/dist/native/p-464bb197.entry.js +2 -0
- package/dist/native/p-464bb197.entry.js.map +1 -0
- package/dist/native/{p-916acbd3.entry.js → p-49504fd6.entry.js} +2 -2
- package/dist/native/{p-bc77cac1.entry.js → p-553778e6.entry.js} +2 -2
- package/dist/native/p-553778e6.entry.js.map +1 -0
- package/dist/native/{p-bee62b2b.entry.js → p-5f0776cb.entry.js} +2 -2
- package/dist/native/p-62032cd9.entry.js +2 -0
- package/dist/native/p-62032cd9.entry.js.map +1 -0
- package/dist/native/{p-11012998.entry.js → p-676447d7.entry.js} +3 -3
- package/dist/native/{p-16ef7dd4.entry.js → p-681f2bac.entry.js} +2 -2
- package/dist/native/{p-4b15cff3.entry.js → p-7f0d576b.entry.js} +2 -2
- package/dist/native/{p-68edb2e8.entry.js → p-85f8f11a.entry.js} +2 -2
- package/dist/native/{p-0e005d95.entry.js → p-888ad58e.entry.js} +2 -2
- package/dist/native/{p-34bf336f.entry.js → p-92931ab8.entry.js} +2 -2
- package/dist/native/{p-f00a4552.entry.js → p-94dc9c41.entry.js} +2 -2
- package/dist/native/{p-85a54ef2.entry.js → p-9c5d6827.entry.js} +2 -2
- package/dist/native/{p-08452012.entry.js → p-9f451b8a.entry.js} +3 -3
- package/dist/native/{p-08452012.entry.js.map → p-9f451b8a.entry.js.map} +1 -1
- package/dist/native/{p-1f932a4b.entry.js → p-aacd8789.entry.js} +2 -2
- package/dist/native/p-ac5496e7.entry.js +2 -0
- package/dist/native/{p-516da423.entry.js → p-ad2cc829.entry.js} +2 -2
- package/dist/native/p-ad2cc829.entry.js.map +1 -0
- package/dist/native/p-b2442d4b.entry.js +2 -0
- package/dist/native/{p-a36dc25a.entry.js.map → p-b2442d4b.entry.js.map} +1 -1
- package/dist/native/{p-67c34b8c.entry.js → p-b58fb522.entry.js} +2 -2
- package/dist/native/p-ba9906b7.entry.js +2 -0
- package/dist/native/{p-64cb38e6.entry.js.map → p-ba9906b7.entry.js.map} +1 -1
- package/dist/native/{p-f540db71.entry.js → p-dd023fd6.entry.js} +2 -2
- package/dist/native/p-f033c4ce.entry.js +2 -0
- package/dist/native/p-f033c4ce.entry.js.map +1 -0
- package/dist/native/{p-051db87c.entry.js → p-fb672f90.entry.js} +2 -2
- package/dist/native/p-fc9564b3.js +2 -0
- package/dist/native/p-fc9564b3.js.map +1 -0
- package/dist/types/components/nv-buttongroup/nv-buttongroup.d.ts +50 -0
- package/dist/types/components/nv-buttongroup/nv-buttongroup.docs.d.ts +4 -0
- package/dist/types/components/nv-buttongroup/nv-buttongroup.utils.d.ts +25 -0
- package/dist/types/components/nv-buttongroup/test/nv-buttongroup.utils.test.d.ts +1 -0
- package/dist/types/components/nv-calendar/nv-calendar.d.ts +11 -1
- package/dist/types/components/nv-calendar/nv-calendar.utils.d.ts +31 -0
- package/dist/types/components/nv-calendar/partials/calendar-grid.d.ts +11 -1
- package/dist/types/components/nv-calendar/partials/day-cell.d.ts +7 -1
- package/dist/types/components/nv-fielddate/nv-fielddate.d.ts +4 -19
- package/dist/types/components/nv-fielddaterange/nv-fielddaterange.d.ts +1 -0
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +116 -23
- package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
- package/dist/types/components/nv-togglebutton/nv-togglebutton.d.ts +46 -0
- package/dist/types/components/nv-togglebutton/nv-togglebutton.docs.d.ts +4 -0
- package/dist/types/components/nv-togglebuttongroup/nv-togglebuttongroup.d.ts +80 -0
- package/dist/types/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.d.ts +4 -0
- package/dist/types/components.d.ts +289 -2
- package/dist/types/utils/constants.d.ts +10 -0
- package/dist/vscode-data.json +189 -0
- package/hydrate/index.js +1167 -271
- package/hydrate/index.mjs +1167 -271
- package/package.json +14 -2
- package/dist/cjs/constants-8fb8ccc0.js.map +0 -1
- package/dist/components/p-1f505531.js.map +0 -1
- package/dist/components/p-60064345.js +0 -189
- package/dist/components/p-6460318d.js.map +0 -1
- package/dist/components/p-79e6b6a2.js.map +0 -1
- package/dist/components/p-d32b75ac.js.map +0 -1
- package/dist/components/p-e104c58a.js.map +0 -1
- package/dist/esm/constants-4faa1fae.js.map +0 -1
- package/dist/native/p-10ce53ea.entry.js +0 -2
- package/dist/native/p-1ad1bff9.entry.js +0 -2
- package/dist/native/p-516da423.entry.js.map +0 -1
- package/dist/native/p-51a57a3a.entry.js +0 -2
- package/dist/native/p-64cb38e6.entry.js +0 -2
- package/dist/native/p-73c08f3b.entry.js +0 -2
- package/dist/native/p-73c08f3b.entry.js.map +0 -1
- package/dist/native/p-a36dc25a.entry.js +0 -2
- package/dist/native/p-a50f3850.entry.js +0 -2
- package/dist/native/p-a73fa60a.entry.js +0 -2
- package/dist/native/p-b3f9db23.entry.js +0 -2
- package/dist/native/p-b3f9db23.entry.js.map +0 -1
- package/dist/native/p-bc77cac1.entry.js.map +0 -1
- package/dist/native/p-dc34da69.entry.js +0 -2
- package/dist/native/p-dc34da69.entry.js.map +0 -1
- package/dist/native/p-e2d0a77d.js +0 -2
- package/dist/native/p-e2d0a77d.js.map +0 -1
- package/dist/native/p-ec92ee7a.entry.js +0 -2
- package/dist/native/p-f687e05c.entry.js.map +0 -1
- package/dist/native/p-fa81b77f.entry.js +0 -2
- package/dist/native/p-fcd52432.entry.js +0 -2
- /package/dist/native/{p-ec92ee7a.entry.js.map → p-234cfa2e.entry.js.map} +0 -0
- /package/dist/native/{p-3f139780.entry.js.map → p-2d647761.entry.js.map} +0 -0
- /package/dist/native/{p-ff248eb8.entry.js.map → p-348c6bb4.entry.js.map} +0 -0
- /package/dist/native/{p-3ff7a912.entry.js.map → p-3fcaac6d.entry.js.map} +0 -0
- /package/dist/native/{p-b7ec9a1b.entry.js.map → p-4302824a.entry.js.map} +0 -0
- /package/dist/native/{p-10ce53ea.entry.js.map → p-43071c3b.entry.js.map} +0 -0
- /package/dist/native/{p-916acbd3.entry.js.map → p-49504fd6.entry.js.map} +0 -0
- /package/dist/native/{p-bee62b2b.entry.js.map → p-5f0776cb.entry.js.map} +0 -0
- /package/dist/native/{p-11012998.entry.js.map → p-676447d7.entry.js.map} +0 -0
- /package/dist/native/{p-16ef7dd4.entry.js.map → p-681f2bac.entry.js.map} +0 -0
- /package/dist/native/{p-4b15cff3.entry.js.map → p-7f0d576b.entry.js.map} +0 -0
- /package/dist/native/{p-68edb2e8.entry.js.map → p-85f8f11a.entry.js.map} +0 -0
- /package/dist/native/{p-0e005d95.entry.js.map → p-888ad58e.entry.js.map} +0 -0
- /package/dist/native/{p-34bf336f.entry.js.map → p-92931ab8.entry.js.map} +0 -0
- /package/dist/native/{p-f00a4552.entry.js.map → p-94dc9c41.entry.js.map} +0 -0
- /package/dist/native/{p-85a54ef2.entry.js.map → p-9c5d6827.entry.js.map} +0 -0
- /package/dist/native/{p-1f932a4b.entry.js.map → p-aacd8789.entry.js.map} +0 -0
- /package/dist/native/{p-a50f3850.entry.js.map → p-ac5496e7.entry.js.map} +0 -0
- /package/dist/native/{p-67c34b8c.entry.js.map → p-b58fb522.entry.js.map} +0 -0
- /package/dist/native/{p-f540db71.entry.js.map → p-dd023fd6.entry.js.map} +0 -0
- /package/dist/native/{p-051db87c.entry.js.map → p-fb672f90.entry.js.map} +0 -0
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { forwardPropsToChildren } from "./nv-buttongroup.utils";
|
|
3
|
+
/**
|
|
4
|
+
* @slot default - Child buttons or links.
|
|
5
|
+
*/
|
|
6
|
+
export class NvButtongroup {
|
|
7
|
+
constructor() {
|
|
8
|
+
/****************************************************************************/
|
|
9
|
+
//#region PROPERTIES
|
|
10
|
+
/**
|
|
11
|
+
* Determines how large or small all the buttons appear, allowing for
|
|
12
|
+
* customization of the button's dimensions to fit different design
|
|
13
|
+
* specifications and user needs.
|
|
14
|
+
*/
|
|
15
|
+
this.size = 'md';
|
|
16
|
+
/**
|
|
17
|
+
* Adjusts the emphasis of all the buttons to make it more or less visually
|
|
18
|
+
* prominent to users. Use this to draw attention to important actions or
|
|
19
|
+
* reduce focus on less critical ones
|
|
20
|
+
*/
|
|
21
|
+
this.emphasis = 'medium';
|
|
22
|
+
/**
|
|
23
|
+
* Allows the button group to stretch and fill the entire width of its
|
|
24
|
+
* container.
|
|
25
|
+
*/
|
|
26
|
+
this.fluid = false;
|
|
27
|
+
/**
|
|
28
|
+
* Determines the orientation of the button group. When enabled, the buttons
|
|
29
|
+
* are stacked vertically rather than aligned side by side.
|
|
30
|
+
*/
|
|
31
|
+
this.orientation = 'horizontal';
|
|
32
|
+
//#endregion PROPERTIES
|
|
33
|
+
/****************************************************************************/
|
|
34
|
+
//#region METHODS
|
|
35
|
+
/**
|
|
36
|
+
* Forwards the buttongroup properties to all child elements
|
|
37
|
+
*/
|
|
38
|
+
this.forwardPropsToChildren = () => {
|
|
39
|
+
forwardPropsToChildren(this.el, {
|
|
40
|
+
size: this.size,
|
|
41
|
+
emphasis: this.emphasis,
|
|
42
|
+
fluid: this.fluid,
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Sets up the MutationObserver to watch for changes in child elements
|
|
47
|
+
*/
|
|
48
|
+
this.setupMutationObserver = () => {
|
|
49
|
+
this.mutationObserver = new MutationObserver(mutations => {
|
|
50
|
+
mutations.forEach(mutation => {
|
|
51
|
+
if (mutation.type === 'childList' && mutation.addedNodes.length > 0) {
|
|
52
|
+
// Forward props to all children when changes occur
|
|
53
|
+
this.forwardPropsToChildren();
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
this.mutationObserver.observe(this.el, {
|
|
58
|
+
childList: true,
|
|
59
|
+
subtree: true,
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
//#endregion METHODS
|
|
64
|
+
/****************************************************************************/
|
|
65
|
+
//#region WATCHERS
|
|
66
|
+
onEmphasisChange() {
|
|
67
|
+
this.forwardPropsToChildren();
|
|
68
|
+
}
|
|
69
|
+
onSizeChange() {
|
|
70
|
+
this.forwardPropsToChildren();
|
|
71
|
+
}
|
|
72
|
+
onFluidChange() {
|
|
73
|
+
this.forwardPropsToChildren();
|
|
74
|
+
}
|
|
75
|
+
//#endregion WATCHERS
|
|
76
|
+
/****************************************************************************/
|
|
77
|
+
//#region LIFECYCLE
|
|
78
|
+
componentWillLoad() {
|
|
79
|
+
this.forwardPropsToChildren();
|
|
80
|
+
this.setupMutationObserver();
|
|
81
|
+
}
|
|
82
|
+
disconnectedCallback() {
|
|
83
|
+
if (this.mutationObserver) {
|
|
84
|
+
this.mutationObserver.disconnect();
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
//#endregion LIFECYCLE
|
|
88
|
+
/****************************************************************************/
|
|
89
|
+
//#region EVENTS
|
|
90
|
+
//#endregion EVENTS
|
|
91
|
+
/****************************************************************************/
|
|
92
|
+
//#region RENDER
|
|
93
|
+
render() {
|
|
94
|
+
return (h(Host, { key: 'd0322897a0312e7b55b087e4abfc94fcaf9f7747' }, h("slot", { key: '70afccf10fe728482096d3fce42083e9931e06bd' })));
|
|
95
|
+
}
|
|
96
|
+
static get is() { return "nv-buttongroup"; }
|
|
97
|
+
static get originalStyleUrls() {
|
|
98
|
+
return {
|
|
99
|
+
"$": ["styles/nv-buttongroup.scss"]
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
static get styleUrls() {
|
|
103
|
+
return {
|
|
104
|
+
"$": ["styles/nv-buttongroup.css"]
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
static get properties() {
|
|
108
|
+
return {
|
|
109
|
+
"size": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"mutable": false,
|
|
112
|
+
"complexType": {
|
|
113
|
+
"original": "`${ButtonSize}`",
|
|
114
|
+
"resolved": "\"lg\" | \"md\" | \"sm\" | \"xs\"",
|
|
115
|
+
"references": {
|
|
116
|
+
"ButtonSize": {
|
|
117
|
+
"location": "import",
|
|
118
|
+
"path": "../../utils/constants",
|
|
119
|
+
"id": "src/utils/constants.ts::ButtonSize"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"required": false,
|
|
124
|
+
"optional": false,
|
|
125
|
+
"docs": {
|
|
126
|
+
"tags": [],
|
|
127
|
+
"text": "Determines how large or small all the buttons appear, allowing for\ncustomization of the button's dimensions to fit different design\nspecifications and user needs."
|
|
128
|
+
},
|
|
129
|
+
"getter": false,
|
|
130
|
+
"setter": false,
|
|
131
|
+
"attribute": "size",
|
|
132
|
+
"reflect": true,
|
|
133
|
+
"defaultValue": "'md'"
|
|
134
|
+
},
|
|
135
|
+
"emphasis": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"mutable": false,
|
|
138
|
+
"complexType": {
|
|
139
|
+
"original": "`${ButtonEmphasis}`",
|
|
140
|
+
"resolved": "\"high\" | \"low\" | \"lower\" | \"medium\"",
|
|
141
|
+
"references": {
|
|
142
|
+
"ButtonEmphasis": {
|
|
143
|
+
"location": "import",
|
|
144
|
+
"path": "../../utils/constants",
|
|
145
|
+
"id": "src/utils/constants.ts::ButtonEmphasis"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"required": false,
|
|
150
|
+
"optional": false,
|
|
151
|
+
"docs": {
|
|
152
|
+
"tags": [],
|
|
153
|
+
"text": "Adjusts the emphasis of all the buttons to make it more or less visually\nprominent to users. Use this to draw attention to important actions or\nreduce focus on less critical ones"
|
|
154
|
+
},
|
|
155
|
+
"getter": false,
|
|
156
|
+
"setter": false,
|
|
157
|
+
"attribute": "emphasis",
|
|
158
|
+
"reflect": true,
|
|
159
|
+
"defaultValue": "'medium'"
|
|
160
|
+
},
|
|
161
|
+
"fluid": {
|
|
162
|
+
"type": "boolean",
|
|
163
|
+
"mutable": false,
|
|
164
|
+
"complexType": {
|
|
165
|
+
"original": "boolean",
|
|
166
|
+
"resolved": "boolean",
|
|
167
|
+
"references": {}
|
|
168
|
+
},
|
|
169
|
+
"required": false,
|
|
170
|
+
"optional": false,
|
|
171
|
+
"docs": {
|
|
172
|
+
"tags": [],
|
|
173
|
+
"text": "Allows the button group to stretch and fill the entire width of its\ncontainer."
|
|
174
|
+
},
|
|
175
|
+
"getter": false,
|
|
176
|
+
"setter": false,
|
|
177
|
+
"attribute": "fluid",
|
|
178
|
+
"reflect": true,
|
|
179
|
+
"defaultValue": "false"
|
|
180
|
+
},
|
|
181
|
+
"orientation": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"mutable": false,
|
|
184
|
+
"complexType": {
|
|
185
|
+
"original": "'vertical' | 'horizontal'",
|
|
186
|
+
"resolved": "\"horizontal\" | \"vertical\"",
|
|
187
|
+
"references": {}
|
|
188
|
+
},
|
|
189
|
+
"required": false,
|
|
190
|
+
"optional": false,
|
|
191
|
+
"docs": {
|
|
192
|
+
"tags": [],
|
|
193
|
+
"text": "Determines the orientation of the button group. When enabled, the buttons\nare stacked vertically rather than aligned side by side."
|
|
194
|
+
},
|
|
195
|
+
"getter": false,
|
|
196
|
+
"setter": false,
|
|
197
|
+
"attribute": "orientation",
|
|
198
|
+
"reflect": true,
|
|
199
|
+
"defaultValue": "'horizontal'"
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
static get elementRef() { return "el"; }
|
|
204
|
+
static get watchers() {
|
|
205
|
+
return [{
|
|
206
|
+
"propName": "emphasis",
|
|
207
|
+
"methodName": "onEmphasisChange"
|
|
208
|
+
}, {
|
|
209
|
+
"propName": "size",
|
|
210
|
+
"methodName": "onSizeChange"
|
|
211
|
+
}, {
|
|
212
|
+
"propName": "fluid",
|
|
213
|
+
"methodName": "onFluidChange"
|
|
214
|
+
}];
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
//# sourceMappingURL=nv-buttongroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nv-buttongroup.js","sourceRoot":"","sources":["../../../src/components/nv-buttongroup/nv-buttongroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAEhE;;GAEG;AAMH,MAAM,OAAO,aAAa;IAL1B;QASE,8EAA8E;QAC9E,oBAAoB;QAEpB;;;;WAIG;QAEM,SAAI,GAAoB,IAAI,CAAC;QAEtC;;;;WAIG;QAEM,aAAQ,GAAwB,QAAQ,CAAC;QAElD;;;WAGG;QAEM,UAAK,GAAY,KAAK,CAAC;QAEhC;;;WAGG;QAEM,gBAAW,GAA8B,YAAY,CAAC;QAE/D,uBAAuB;QACvB,8EAA8E;QAC9E,iBAAiB;QAEjB;;WAEG;QACK,2BAAsB,GAAG,GAAS,EAAE;YAC1C,sBAAsB,CAAC,IAAI,CAAC,EAAE,EAAE;gBAC9B,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,KAAK,EAAE,IAAI,CAAC,KAAK;aAClB,CAAC,CAAC;QACL,CAAC,CAAC;QAEF;;WAEG;QACK,0BAAqB,GAAG,GAAS,EAAE;YACzC,IAAI,CAAC,gBAAgB,GAAG,IAAI,gBAAgB,CAAC,SAAS,CAAC,EAAE;gBACvD,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;oBAC3B,IAAI,QAAQ,CAAC,IAAI,KAAK,WAAW,IAAI,QAAQ,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;wBACpE,mDAAmD;wBACnD,IAAI,CAAC,sBAAsB,EAAE,CAAC;oBAChC,CAAC;gBACH,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE;gBACrC,SAAS,EAAE,IAAI;gBACf,OAAO,EAAE,IAAI;aACd,CAAC,CAAC;QACL,CAAC,CAAC;KAkDH;IAhDC,oBAAoB;IACpB,8EAA8E;IAC9E,kBAAkB;IAGlB,gBAAgB;QACd,IAAI,CAAC,sBAAsB,EAAE,CAAC;IAChC,CAAC;IAGD,YAAY;QACV,IAAI,CAAC,sBAAsB,EAAE,CAAC;IAChC,CAAC;IAGD,aAAa;QACX,IAAI,CAAC,sBAAsB,EAAE,CAAC;IAChC,CAAC;IAED,qBAAqB;IACrB,8EAA8E;IAC9E,mBAAmB;IAEnB,iBAAiB;QACf,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAC9B,IAAI,CAAC,qBAAqB,EAAE,CAAC;IAC/B,CAAC;IAED,oBAAoB;QAClB,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC1B,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC;QACrC,CAAC;IACH,CAAC;IAED,sBAAsB;IACtB,8EAA8E;IAC9E,gBAAgB;IAChB,mBAAmB;IACnB,8EAA8E;IAC9E,gBAAgB;IAChB,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, h, Prop, Element, Watch } from '@stencil/core';\n\nimport { ButtonSize, ButtonEmphasis } from '../../utils/constants';\nimport { forwardPropsToChildren } from './nv-buttongroup.utils';\n\n/**\n * @slot default - Child buttons or links.\n */\n@Component({\n tag: 'nv-buttongroup',\n styleUrl: 'styles/nv-buttongroup.scss',\n shadow: false,\n})\nexport class NvButtongroup {\n @Element() el: HTMLNvButtongroupElement;\n private mutationObserver: MutationObserver;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Determines how large or small all the buttons appear, allowing for\n * customization of the button's dimensions to fit different design\n * specifications and user needs.\n */\n @Prop({ reflect: true })\n readonly size: `${ButtonSize}` = 'md';\n\n /**\n * Adjusts the emphasis of all the buttons to make it more or less visually\n * prominent to users. Use this to draw attention to important actions or\n * reduce focus on less critical ones\n */\n @Prop({ reflect: true })\n readonly emphasis: `${ButtonEmphasis}` = 'medium';\n\n /**\n * Allows the button group to stretch and fill the entire width of its\n * container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n /**\n * Determines the orientation of the button group. When enabled, the buttons\n * are stacked vertically rather than aligned side by side.\n */\n @Prop({ reflect: true })\n readonly orientation: 'vertical' | 'horizontal' = 'horizontal';\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Forwards the buttongroup properties to all child elements\n */\n private forwardPropsToChildren = (): void => {\n forwardPropsToChildren(this.el, {\n size: this.size,\n emphasis: this.emphasis,\n fluid: this.fluid,\n });\n };\n\n /**\n * Sets up the MutationObserver to watch for changes in child elements\n */\n private setupMutationObserver = (): void => {\n this.mutationObserver = new MutationObserver(mutations => {\n mutations.forEach(mutation => {\n if (mutation.type === 'childList' && mutation.addedNodes.length > 0) {\n // Forward props to all children when changes occur\n this.forwardPropsToChildren();\n }\n });\n });\n\n this.mutationObserver.observe(this.el, {\n childList: true,\n subtree: true,\n });\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('emphasis')\n onEmphasisChange() {\n this.forwardPropsToChildren();\n }\n\n @Watch('size')\n onSizeChange() {\n this.forwardPropsToChildren();\n }\n\n @Watch('fluid')\n onFluidChange() {\n this.forwardPropsToChildren();\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.forwardPropsToChildren();\n this.setupMutationObserver();\n }\n\n disconnectedCallback() {\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n //#endregion EVENTS\n /****************************************************************************/\n //#region RENDER\n render() {\n return (\n <Host>\n <slot></slot>\n </Host>\n );\n }\n // #endregion RENDER\n}\n"]}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for nv-buttongroup.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Recursively finds the first button or link element within a container
|
|
6
|
+
* @param {HTMLElement} element - The HTML element to search within
|
|
7
|
+
* @returns {HTMLElement | null} The first button or link element found, or null if none exists
|
|
8
|
+
*/
|
|
9
|
+
export function findFirstButtonOrLink(element) {
|
|
10
|
+
// Check if the element itself is a button or link
|
|
11
|
+
const tagName = element.tagName.toLowerCase();
|
|
12
|
+
if (tagName === 'nv-button' ||
|
|
13
|
+
tagName === 'nv-iconbutton' ||
|
|
14
|
+
tagName === 'a') {
|
|
15
|
+
return element;
|
|
16
|
+
}
|
|
17
|
+
// Recursively search through children
|
|
18
|
+
for (const child of Array.from(element.children)) {
|
|
19
|
+
const found = findFirstButtonOrLink(child);
|
|
20
|
+
if (found) {
|
|
21
|
+
return found;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Forwards the buttongroup properties to all child elements
|
|
28
|
+
* @param {HTMLElement} containerElement - The container element containing the buttons
|
|
29
|
+
* @param {object} props - The properties to forward to children
|
|
30
|
+
* @param {string} props.size - The size property to apply
|
|
31
|
+
* @param {string} props.emphasis - The emphasis property to apply
|
|
32
|
+
* @param {boolean} props.fluid - Whether the buttons should be fluid
|
|
33
|
+
*/
|
|
34
|
+
export function forwardPropsToChildren(containerElement, props) {
|
|
35
|
+
const children = Array.from(containerElement.children);
|
|
36
|
+
const buttonElements = [];
|
|
37
|
+
// Find the first button or link in each direct child
|
|
38
|
+
children.forEach(child => {
|
|
39
|
+
const buttonOrLink = findFirstButtonOrLink(child);
|
|
40
|
+
if (buttonOrLink) {
|
|
41
|
+
buttonElements.push(buttonOrLink);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
buttonElements.forEach(element => {
|
|
45
|
+
element.classList.remove('first', 'last', 'group-item');
|
|
46
|
+
});
|
|
47
|
+
// Apply properties and positional classes to found elements
|
|
48
|
+
buttonElements.forEach((element, index) => {
|
|
49
|
+
const isFirst = index === 0;
|
|
50
|
+
const isLast = index === buttonElements.length - 1;
|
|
51
|
+
const tagName = element.tagName.toLowerCase();
|
|
52
|
+
// Add positional classes
|
|
53
|
+
if (isFirst) {
|
|
54
|
+
element.classList.add('first');
|
|
55
|
+
}
|
|
56
|
+
if (isLast) {
|
|
57
|
+
element.classList.add('last');
|
|
58
|
+
}
|
|
59
|
+
// Add group item classes
|
|
60
|
+
element.classList.add('group-item');
|
|
61
|
+
// Forward props to nv-button elements
|
|
62
|
+
if (tagName === 'nv-button' || tagName === 'nv-iconbutton') {
|
|
63
|
+
element.setAttribute('size', props.size);
|
|
64
|
+
element.setAttribute('emphasis', props.emphasis);
|
|
65
|
+
if (props.fluid) {
|
|
66
|
+
element.setAttribute('fluid', '');
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
element.removeAttribute('fluid');
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
// Forward props to anchor elements by adding CSS classes
|
|
73
|
+
if (tagName === 'a') {
|
|
74
|
+
element.classList.add('nv-button');
|
|
75
|
+
element.classList.add(`size-${props.size}`);
|
|
76
|
+
element.classList.add(`emphasis-${props.emphasis}`);
|
|
77
|
+
if (props.fluid) {
|
|
78
|
+
element.classList.add('fluid');
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
element.classList.remove('fluid');
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=nv-buttongroup.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nv-buttongroup.utils.js","sourceRoot":"","sources":["../../../src/components/nv-buttongroup/nv-buttongroup.utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAAoB;IAEpB,kDAAkD;IAClD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;IAC9C,IACE,OAAO,KAAK,WAAW;QACvB,OAAO,KAAK,eAAe;QAC3B,OAAO,KAAK,GAAG,EACf,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,sCAAsC;IACtC,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAkB,EAAE,CAAC;QAClE,MAAM,KAAK,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;QAC3C,IAAI,KAAK,EAAE,CAAC;YACV,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CACpC,gBAA6B,EAC7B,KAOC;IAED,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAkB,CAAC;IACxE,MAAM,cAAc,GAAkB,EAAE,CAAC;IAEzC,qDAAqD;IACrD,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACvB,MAAM,YAAY,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;QAClD,IAAI,YAAY,EAAE,CAAC;YACjB,cAAc,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACpC,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAC/B,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;IAC1D,CAAC,CAAC,CAAC;IAEH,4DAA4D;IAC5D,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE;QACxC,MAAM,OAAO,GAAG,KAAK,KAAK,CAAC,CAAC;QAC5B,MAAM,MAAM,GAAG,KAAK,KAAK,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC;QACnD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;QAE9C,yBAAyB;QACzB,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC;QACD,IAAI,MAAM,EAAE,CAAC;YACX,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAChC,CAAC;QAED,yBAAyB;QACzB,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAEpC,sCAAsC;QACtC,IAAI,OAAO,KAAK,WAAW,IAAI,OAAO,KAAK,eAAe,EAAE,CAAC;YAC3D,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;YACzC,OAAO,CAAC,YAAY,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;YACjD,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;gBAChB,OAAO,CAAC,YAAY,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YACpC,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;YACnC,CAAC;QACH,CAAC;QAED,yDAAyD;QACzD,IAAI,OAAO,KAAK,GAAG,EAAE,CAAC;YACpB,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;YACnC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;YAC5C,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;YACpD,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;gBAChB,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YACjC,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YACpC,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * Utility functions for nv-buttongroup.\n */\n\n/**\n * Recursively finds the first button or link element within a container\n * @param {HTMLElement} element - The HTML element to search within\n * @returns {HTMLElement | null} The first button or link element found, or null if none exists\n */\nexport function findFirstButtonOrLink(\n element: HTMLElement,\n): HTMLElement | null {\n // Check if the element itself is a button or link\n const tagName = element.tagName.toLowerCase();\n if (\n tagName === 'nv-button' ||\n tagName === 'nv-iconbutton' ||\n tagName === 'a'\n ) {\n return element;\n }\n\n // Recursively search through children\n for (const child of Array.from(element.children) as HTMLElement[]) {\n const found = findFirstButtonOrLink(child);\n if (found) {\n return found;\n }\n }\n\n return null;\n}\n\n/**\n * Forwards the buttongroup properties to all child elements\n * @param {HTMLElement} containerElement - The container element containing the buttons\n * @param {object} props - The properties to forward to children\n * @param {string} props.size - The size property to apply\n * @param {string} props.emphasis - The emphasis property to apply\n * @param {boolean} props.fluid - Whether the buttons should be fluid\n */\nexport function forwardPropsToChildren(\n containerElement: HTMLElement,\n props: {\n /** The size property to apply */\n size: string;\n /** The emphasis property to apply */\n emphasis: string;\n /** Whether the buttons should be fluid */\n fluid: boolean;\n },\n): void {\n const children = Array.from(containerElement.children) as HTMLElement[];\n const buttonElements: HTMLElement[] = [];\n\n // Find the first button or link in each direct child\n children.forEach(child => {\n const buttonOrLink = findFirstButtonOrLink(child);\n if (buttonOrLink) {\n buttonElements.push(buttonOrLink);\n }\n });\n\n buttonElements.forEach(element => {\n element.classList.remove('first', 'last', 'group-item');\n });\n\n // Apply properties and positional classes to found elements\n buttonElements.forEach((element, index) => {\n const isFirst = index === 0;\n const isLast = index === buttonElements.length - 1;\n const tagName = element.tagName.toLowerCase();\n\n // Add positional classes\n if (isFirst) {\n element.classList.add('first');\n }\n if (isLast) {\n element.classList.add('last');\n }\n\n // Add group item classes\n element.classList.add('group-item');\n\n // Forward props to nv-button elements\n if (tagName === 'nv-button' || tagName === 'nv-iconbutton') {\n element.setAttribute('size', props.size);\n element.setAttribute('emphasis', props.emphasis);\n if (props.fluid) {\n element.setAttribute('fluid', '');\n } else {\n element.removeAttribute('fluid');\n }\n }\n\n // Forward props to anchor elements by adding CSS classes\n if (tagName === 'a') {\n element.classList.add('nv-button');\n element.classList.add(`size-${props.size}`);\n element.classList.add(`emphasis-${props.emphasis}`);\n if (props.fluid) {\n element.classList.add('fluid');\n } else {\n element.classList.remove('fluid');\n }\n }\n });\n}\n"]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
nv-buttongroup {
|
|
2
|
+
display: flex;
|
|
3
|
+
}
|
|
4
|
+
nv-buttongroup[emphasis=high] {
|
|
5
|
+
gap: 1px;
|
|
6
|
+
}
|
|
7
|
+
nv-buttongroup[emphasis=low] .group-item, nv-buttongroup[emphasis=low] .group-item:hover {
|
|
8
|
+
border: 1px solid var(--components-button-low-text);
|
|
9
|
+
}
|
|
10
|
+
nv-buttongroup[emphasis=lower] .group-item, nv-buttongroup[emphasis=lower] .group-item:hover {
|
|
11
|
+
border: 1px solid var(--components-button-lower-text);
|
|
12
|
+
}
|
|
13
|
+
nv-buttongroup:not([orientation=vertical]) .group-item:not(.last):not(.first) {
|
|
14
|
+
border-radius: 0;
|
|
15
|
+
}
|
|
16
|
+
nv-buttongroup:not([orientation=vertical]) .group-item.first {
|
|
17
|
+
border-top-right-radius: 0;
|
|
18
|
+
border-bottom-right-radius: 0;
|
|
19
|
+
}
|
|
20
|
+
nv-buttongroup:not([orientation=vertical]) .group-item.last {
|
|
21
|
+
border-top-left-radius: 0;
|
|
22
|
+
border-bottom-left-radius: 0;
|
|
23
|
+
}
|
|
24
|
+
nv-buttongroup:not([orientation=vertical])[emphasis=medium] .group-item:not(.last) {
|
|
25
|
+
border-right: none;
|
|
26
|
+
}
|
|
27
|
+
nv-buttongroup:not([orientation=vertical])[emphasis=low] .group-item:not(.last) {
|
|
28
|
+
border-right: none;
|
|
29
|
+
}
|
|
30
|
+
nv-buttongroup:not([orientation=vertical])[emphasis=low] .group-item:not(.first) {
|
|
31
|
+
border-left: none;
|
|
32
|
+
}
|
|
33
|
+
nv-buttongroup:not([orientation=vertical])[emphasis=lower] .group-item:not(.last) {
|
|
34
|
+
border-right: none;
|
|
35
|
+
}
|
|
36
|
+
nv-buttongroup:not([orientation=vertical])[emphasis=lower] .group-item:not(.first) {
|
|
37
|
+
border-left: none;
|
|
38
|
+
}
|
|
39
|
+
nv-buttongroup[orientation=vertical] {
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
align-items: stretch;
|
|
42
|
+
width: fit-content;
|
|
43
|
+
}
|
|
44
|
+
nv-buttongroup[orientation=vertical] .group-item {
|
|
45
|
+
width: unset;
|
|
46
|
+
display: flex;
|
|
47
|
+
}
|
|
48
|
+
nv-buttongroup[orientation=vertical] .group-item:not(.last):not(.first) {
|
|
49
|
+
border-radius: 0;
|
|
50
|
+
}
|
|
51
|
+
nv-buttongroup[orientation=vertical] .group-item.first {
|
|
52
|
+
border-bottom-left-radius: 0;
|
|
53
|
+
border-bottom-right-radius: 0;
|
|
54
|
+
}
|
|
55
|
+
nv-buttongroup[orientation=vertical] .group-item.last {
|
|
56
|
+
border-top-left-radius: 0;
|
|
57
|
+
border-top-right-radius: 0;
|
|
58
|
+
}
|
|
59
|
+
nv-buttongroup[orientation=vertical][emphasis=medium] .group-item:not(.last) {
|
|
60
|
+
border-bottom: none;
|
|
61
|
+
}
|
|
62
|
+
nv-buttongroup[orientation=vertical][emphasis=low] .group-item:not(.last) {
|
|
63
|
+
border-bottom: none;
|
|
64
|
+
}
|
|
65
|
+
nv-buttongroup[orientation=vertical][emphasis=low] .group-item:not(.first) {
|
|
66
|
+
border-top: none;
|
|
67
|
+
}
|
|
68
|
+
nv-buttongroup[orientation=vertical][emphasis=lower] .group-item:not(.last) {
|
|
69
|
+
border-bottom: none;
|
|
70
|
+
}
|
|
71
|
+
nv-buttongroup[orientation=vertical][emphasis=lower] .group-item:not(.first) {
|
|
72
|
+
border-top: none;
|
|
73
|
+
}
|