@nova-design-system/nova-react 3.31.1-beta.1 → 3.31.2-beta.3
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/THIRD_PARTY_NOTICES.txt +117535 -0
- package/dist/cjs/accessibility.utils-C4Cy9iy8-CeSsswXF.js +78 -0
- package/dist/cjs/generated/components.server.js +15 -0
- package/dist/cjs/{index-CIduEXxx.js → index-DN55EpKb.js} +304 -287
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/{nv-accordion-item.entry-BvsiHrIZ.js → nv-accordion-item.entry-DTMF2QA4.js} +9 -8
- package/dist/cjs/{nv-accordion.entry-Dag3RvG5.js → nv-accordion.entry-LhpIZNos.js} +1 -1
- package/dist/cjs/{nv-alert.entry-hXyvyQaa.js → nv-alert.entry-CLzSK5qn.js} +1 -1
- package/dist/cjs/{nv-avatar.entry-Cv8nRzHk.js → nv-avatar.entry-BLdl6iCG.js} +1 -1
- package/dist/cjs/{nv-badge_2.entry-s7grrG3t.js → nv-badge_2.entry-D9dDFfNt.js} +1 -1
- package/dist/cjs/{nv-breadcrumb.entry-DsuW8DRC.js → nv-breadcrumb.entry-zM46pNeP.js} +1 -1
- package/dist/cjs/{nv-breadcrumbs.entry-DC5qza5N.js → nv-breadcrumbs.entry-C15cO6Oe.js} +1 -1
- package/dist/cjs/{nv-button.entry-DJ9ySYDC.js → nv-button.entry-DI4P9AiP.js} +4 -3
- package/dist/cjs/{nv-buttongroup.entry-V7EHizoj.js → nv-buttongroup.entry-D7yCaYjm.js} +1 -1
- package/dist/cjs/{nv-calendar.entry-DsqYoQrJ.js → nv-calendar.entry-zseSe52a.js} +1 -1
- package/dist/cjs/{nv-col.entry-CuLpzq87.js → nv-col.entry-nEoJ7359.js} +1 -1
- package/dist/cjs/{nv-datagrid.entry-3jL3JYdd.js → nv-datagrid.entry-CFwixyUO.js} +1 -1
- package/dist/cjs/{nv-datagridcolumn.entry-ChGqc2aO.js → nv-datagridcolumn.entry-B_olySPa.js} +1 -1
- package/dist/cjs/{nv-datetest.entry-CjpFR6RB.js → nv-datetest.entry-Dwr0C5xt.js} +1 -1
- package/dist/cjs/{nv-datetimetest.entry-LpXUxQvy.js → nv-datetimetest.entry-hziXdUJX.js} +1 -1
- package/dist/cjs/{nv-dialog.entry-D4ZJMTIA.js → nv-dialog.entry-B9qKSweg.js} +4 -3
- package/dist/cjs/{nv-dialogfooter_2.entry-F5GZZHzN.js → nv-dialogfooter_2.entry-CBTqmO9s.js} +1 -1
- package/dist/cjs/{nv-drawer.entry-B0ngySoz.js → nv-drawer.entry-DD-VjFP9.js} +4 -3
- package/dist/cjs/{nv-drawerfooter_2.entry-BRckyNO2.js → nv-drawerfooter_2.entry-CkODBIr6.js} +1 -1
- package/dist/cjs/{nv-fieldcheckbox.entry-BfCMk8wm.js → nv-fieldcheckbox.entry-DWAA4UE3.js} +1 -1
- package/dist/cjs/{nv-fielddate.entry-DqfvxdGx.js → nv-fielddate.entry-BVZhCq5F.js} +1 -1
- package/dist/cjs/{nv-fielddaterange.entry-BoJ75PRm.js → nv-fielddaterange.entry-CWAnYRgI.js} +1 -1
- package/dist/cjs/{nv-fielddropdown.entry-CWIrMlbX.js → nv-fielddropdown.entry-CLauf21x.js} +1 -1
- package/dist/cjs/{nv-fielddropdownitem.entry-CHKTpHUS.js → nv-fielddropdownitem.entry-DCTeh9KO.js} +4 -3
- package/dist/cjs/{nv-fieldmultiselect.entry-C_B7c4ph.js → nv-fieldmultiselect.entry-BNwKkdeR.js} +3 -3
- package/dist/cjs/{nv-fieldnumber.entry-B_pliQpQ.js → nv-fieldnumber.entry-D86SjYXx.js} +1 -1
- package/dist/cjs/{nv-fieldpassword.entry-DTC13ASY.js → nv-fieldpassword.entry-Dt0lUkJt.js} +1 -1
- package/dist/cjs/{nv-fieldradio.entry-C0VTzPxr.js → nv-fieldradio.entry-DNvjs4oH.js} +1 -1
- package/dist/cjs/{nv-fieldselect.entry-BWj2M0pb.js → nv-fieldselect.entry-OZEU8DSk.js} +1 -1
- package/dist/cjs/{nv-fieldslider.entry-C0IoIOYv.js → nv-fieldslider.entry-1IiUmkIh.js} +1 -1
- package/dist/cjs/{nv-fieldtext.entry-BKdmagew.js → nv-fieldtext.entry-AuynZcaD.js} +1 -1
- package/dist/cjs/{nv-fieldtextarea.entry-jV238RrX.js → nv-fieldtextarea.entry-CgJKQdfG.js} +1 -1
- package/dist/cjs/{nv-fieldtime.entry-CGli1kNM.js → nv-fieldtime.entry-uB03riIZ.js} +1 -1
- package/dist/cjs/nv-icon.entry-DsZUamyE.js +80 -0
- package/dist/cjs/{nv-iconbutton_2.entry-KrPZeqSB.js → nv-iconbutton_2.entry-DWKZigsd.js} +4 -3
- package/dist/cjs/{nv-menu.entry-BQ4Va1Zd.js → nv-menu.entry-DDFZOYwe.js} +1 -1
- package/dist/cjs/{nv-menuitem.entry-Dp71XXc9.js → nv-menuitem.entry-Btgdr6Od.js} +4 -3
- package/dist/cjs/{nv-notification-bullet.entry-BXucWCVB.js → nv-notification-bullet.entry-Dqa7L5lv.js} +1 -1
- package/dist/cjs/{nv-notification.entry-DyGNReGR.js → nv-notification.entry-C_AyXrky.js} +1 -1
- package/dist/cjs/{nv-notificationcontainer.entry-C9kLTHtS.js → nv-notificationcontainer.entry-DCvtamdA.js} +1 -1
- package/dist/cjs/{nv-pagination-nav.entry-C24w5RZ-.js → nv-pagination-nav.entry-BEKSbRT5.js} +1 -1
- package/dist/cjs/{nv-paginationtable.entry-C3RHvchP.js → nv-paginationtable.entry-XD08dNh6.js} +1 -1
- package/dist/cjs/nv-pill.entry-DXy2Ez6j.js +288 -0
- package/dist/cjs/{nv-popover.entry-BlpxQ9j0.js → nv-popover.entry-Dkn58xz1.js} +2 -2
- package/dist/cjs/{nv-row.entry-CDE3oX8X.js → nv-row.entry-C-Pu-4d5.js} +2 -2
- package/dist/cjs/{nv-sidebar.entry-CvQNzq1H.js → nv-sidebar.entry-BCPSmV8X.js} +3 -3
- package/dist/cjs/{nv-sidebarcontent.entry-DIIupG0e.js → nv-sidebarcontent.entry-Dbk9Jp-R.js} +2 -2
- package/dist/cjs/{nv-sidebardivider.entry-CqdP5bFW.js → nv-sidebardivider.entry-BSbCqQ-I.js} +2 -2
- package/dist/cjs/{nv-sidebarfooter.entry-DmFTTam-.js → nv-sidebarfooter.entry-DrYkZsT7.js} +2 -2
- package/dist/cjs/{nv-sidebargroup.entry-BXhwQ7Gw.js → nv-sidebargroup.entry-XUiruLr8.js} +2 -2
- package/dist/cjs/{nv-sidebarheader.entry-BeofV5mi.js → nv-sidebarheader.entry-LY9keSTe.js} +2 -2
- package/dist/cjs/{nv-sidebarlogo.entry-DbKRctk4.js → nv-sidebarlogo.entry-CXTBFLAn.js} +2 -2
- package/dist/cjs/{nv-sidebarnavitem.entry-DW0S4_CH.js → nv-sidebarnavitem.entry-D322CneD.js} +3 -3
- package/dist/cjs/{nv-sidebarnavsubitem.entry-CfJXOLFL.js → nv-sidebarnavsubitem.entry-CUTyEkyb.js} +2 -2
- package/dist/cjs/{nv-split.entry-C6dPx365.js → nv-split.entry-TFxGWUX9.js} +2 -2
- package/dist/cjs/{nv-stack.entry-BfpeMdKQ.js → nv-stack.entry-Bh7oNRvH.js} +2 -2
- package/dist/cjs/{nv-statusindicator.entry-g6l8mLE4.js → nv-statusindicator.entry-DZQ5jU9e.js} +2 -2
- package/dist/cjs/{nv-table.entry-COq1iQnL.js → nv-table.entry-zgAnu_aK.js} +2 -2
- package/dist/cjs/{nv-tableheader.entry-H0_nYDYI.js → nv-tableheader.entry-DA639Bgy.js} +4 -3
- package/dist/cjs/{nv-tag.entry-Cd1HnUDM.js → nv-tag.entry-C2aYljq1.js} +1 -1
- package/dist/cjs/{nv-timetest.entry-mhbU0vGi.js → nv-timetest.entry-DgyhZ_ec.js} +2 -2
- package/dist/cjs/{nv-toggle.entry-DR_EHjwR.js → nv-toggle.entry-HnXIWK6v.js} +3 -3
- package/dist/cjs/{nv-togglebutton.entry-Dq_8pE_Q.js → nv-togglebutton.entry-DLgQwvYS.js} +4 -3
- package/dist/cjs/{nv-togglebuttongroup.entry-BvSlDwHV.js → nv-togglebuttongroup.entry-JtEebncS.js} +2 -2
- package/dist/cjs/{nv-tooltip.entry-DTE4NTCI.js → nv-tooltip.entry-CieHlmqB.js} +2 -2
- package/dist/generated/components.js +8 -0
- package/dist/generated/components.server.js +14 -0
- package/dist/types/generated/components.d.ts +10 -1
- package/dist/types/generated/components.server.d.ts +10 -1
- package/package.json +3 -2
- package/dist/cjs/nv-icon.entry-DcCzotQG.js +0 -80
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const TOGGLE_ARIA_ROLES = new Set([
|
|
4
|
+
'button',
|
|
5
|
+
'checkbox',
|
|
6
|
+
'radio',
|
|
7
|
+
]);
|
|
8
|
+
/**
|
|
9
|
+
* Checks whether a keyboard key should toggle a control.
|
|
10
|
+
* @param {string} key - KeyboardEvent key value.
|
|
11
|
+
* @returns {boolean} True when key should trigger toggle behavior.
|
|
12
|
+
*/
|
|
13
|
+
function isToggleKey(key) {
|
|
14
|
+
return key === 'Enter' || key === ' ';
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Checks whether a role is a supported toggle ARIA role.
|
|
18
|
+
* @param {string} role - Role value to validate.
|
|
19
|
+
* @returns {boolean} True when role is supported.
|
|
20
|
+
*/
|
|
21
|
+
function isToggleAriaRole(role) {
|
|
22
|
+
return TOGGLE_ARIA_ROLES.has(role);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Normalizes runtime role values to supported toggle roles.
|
|
26
|
+
* Falls back to button semantics for invalid values.
|
|
27
|
+
* @param {string} role - Role value to normalize.
|
|
28
|
+
* @returns {ToggleAriaRole} Supported role value.
|
|
29
|
+
*/
|
|
30
|
+
function normalizeToggleAriaRole(role) {
|
|
31
|
+
return isToggleAriaRole(role) ? role : 'button';
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Calculates the next selected state for a toggle interaction.
|
|
35
|
+
* @param {boolean} selected - Current selected state.
|
|
36
|
+
* @param {boolean} disabled - Disabled state.
|
|
37
|
+
* @returns {boolean} Updated selected state.
|
|
38
|
+
*/
|
|
39
|
+
function getNextSelectedState(selected, disabled) {
|
|
40
|
+
if (disabled)
|
|
41
|
+
return selected;
|
|
42
|
+
return !selected;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Calculates the next selected state based on role semantics.
|
|
46
|
+
* Radio-like controls cannot toggle off directly once selected.
|
|
47
|
+
* Group-level coordination (for example deselecting sibling radios) is handled
|
|
48
|
+
* by the consuming component in radiogroup context.
|
|
49
|
+
* @param {ToggleAriaRole} role - Interactive role of the control.
|
|
50
|
+
* @param {boolean} selected - Current selected state.
|
|
51
|
+
* @param {boolean} disabled - Disabled state.
|
|
52
|
+
* @returns {boolean} Updated selected state for the role.
|
|
53
|
+
*/
|
|
54
|
+
function getRoleAwareNextSelectedState(role, selected, disabled) {
|
|
55
|
+
if (disabled)
|
|
56
|
+
return selected;
|
|
57
|
+
if (role === 'radio') {
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
return getNextSelectedState(selected, disabled);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Maps role + state to ARIA attributes.
|
|
64
|
+
* @param {ToggleAriaRole} role - Interactive role of the control.
|
|
65
|
+
* @param {boolean} selected - Selected state.
|
|
66
|
+
* @returns {AriaStateAttributes} ARIA state attributes for the role.
|
|
67
|
+
*/
|
|
68
|
+
function getAriaStateAttributes(role, selected) {
|
|
69
|
+
if (role === 'button') {
|
|
70
|
+
return { ariaPressed: String(selected) };
|
|
71
|
+
}
|
|
72
|
+
return { ariaChecked: String(selected) };
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
exports.getAriaStateAttributes = getAriaStateAttributes;
|
|
76
|
+
exports.getRoleAwareNextSelectedState = getRoleAwareNextSelectedState;
|
|
77
|
+
exports.isToggleKey = isToggleKey;
|
|
78
|
+
exports.normalizeToggleAriaRole = normalizeToggleAriaRole;
|
|
@@ -870,6 +870,20 @@ const NvPaginationtable = ssr.createComponent({
|
|
|
870
870
|
clientModule: clientComponents__namespace.NvPaginationtable,
|
|
871
871
|
serializeShadowRoot
|
|
872
872
|
});
|
|
873
|
+
const NvPill = ssr.createComponent({
|
|
874
|
+
tagName: 'nv-pill',
|
|
875
|
+
properties: {
|
|
876
|
+
label: 'label',
|
|
877
|
+
selected: 'selected',
|
|
878
|
+
disabled: 'disabled',
|
|
879
|
+
value: 'value',
|
|
880
|
+
leadingIcon: 'leading-icon',
|
|
881
|
+
pillAriaRole: 'pill-aria-role'
|
|
882
|
+
},
|
|
883
|
+
hydrateModule: import('@nova-design-system/nova-webcomponents/hydrate'),
|
|
884
|
+
clientModule: clientComponents__namespace.NvPill,
|
|
885
|
+
serializeShadowRoot
|
|
886
|
+
});
|
|
873
887
|
const NvPopover = ssr.createComponent({
|
|
874
888
|
tagName: 'nv-popover',
|
|
875
889
|
properties: {
|
|
@@ -1154,6 +1168,7 @@ exports.NvNotificationBullet = NvNotificationBullet;
|
|
|
1154
1168
|
exports.NvNotificationcontainer = NvNotificationcontainer;
|
|
1155
1169
|
exports.NvPaginationNav = NvPaginationNav;
|
|
1156
1170
|
exports.NvPaginationtable = NvPaginationtable;
|
|
1171
|
+
exports.NvPill = NvPill;
|
|
1157
1172
|
exports.NvPopover = NvPopover;
|
|
1158
1173
|
exports.NvRow = NvRow;
|
|
1159
1174
|
exports.NvSidebar = NvSidebar;
|