@nova-design-system/nova-react 3.14.0 → 3.16.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.
Files changed (67) hide show
  1. package/dist/cjs/{collapse.animation-acda1bf5-BuORVmQv.js → collapse.animation-6e0b08df-AHWzNGm_.js} +4 -1
  2. package/dist/cjs/{constants-d0f19e7b-s0SCO_vi.js → constants-69bafca2-DpB_ghPF.js} +9 -0
  3. package/dist/cjs/{fade.animation-eb454088-Bma0SpTf.js → fade.animation-9b939939-DV--bM4S.js} +2 -2
  4. package/dist/cjs/{index-CKAZvszR.js → index-7K7BV1CP.js} +4676 -1345
  5. package/dist/cjs/index.js +10 -2
  6. package/dist/cjs/{nv-accordion-item.entry-CjBcmF8t.js → nv-accordion-item.entry-C-9tYw-c.js} +6 -5
  7. package/dist/cjs/{nv-accordion.entry-CRk2Wvt3.js → nv-accordion.entry-BA3mTIdj.js} +7 -6
  8. package/dist/cjs/{nv-alert.entry-D5qB5xZg.js → nv-alert.entry-Bic-YGW1.js} +13 -12
  9. package/dist/cjs/nv-avatar.entry-C-yd0YlD.js +68 -0
  10. package/dist/cjs/{nv-badge_2.entry-BDuX1qOQ.js → nv-badge_2.entry-B_8yvNXL.js} +11 -10
  11. package/dist/cjs/{nv-breadcrumb.entry-BE9U6AF_.js → nv-breadcrumb.entry-BCTbG942.js} +3 -2
  12. package/dist/cjs/{nv-breadcrumbs.entry-DJXqtmMR.js → nv-breadcrumbs.entry-C9B5Baf7.js} +2 -1
  13. package/dist/cjs/nv-button.entry-DgX8Bwmq.js +165 -0
  14. package/dist/cjs/{nv-buttongroup.entry-C0Zc2lOi.js → nv-buttongroup.entry-CKhZN_Yf.js} +2 -1
  15. package/dist/cjs/{nv-calendar.entry-NbVLStMN.js → nv-calendar.entry-E6Pk83WA.js} +8 -7
  16. package/dist/cjs/{nv-col.entry-ahFf8a1Z.js → nv-col.entry-CkZpukX9.js} +2 -1
  17. package/dist/cjs/{nv-datagrid.entry-C-MJXEdi.js → nv-datagrid.entry-RsfP7vbC.js} +183 -15
  18. package/dist/cjs/{nv-datagridcolumn.entry-CxU7soW7.js → nv-datagridcolumn.entry-D4VrDWo9.js} +2 -1
  19. package/dist/cjs/{nv-dialog.entry-WlnaC-w2.js → nv-dialog.entry-BhtWpYHl.js} +34 -30
  20. package/dist/cjs/{nv-dialogfooter_2.entry-CEWmTnJc.js → nv-dialogfooter_2.entry-BXLYmzYl.js} +6 -5
  21. package/dist/cjs/{nv-fieldcheckbox.entry-BYhFVrYb.js → nv-fieldcheckbox.entry-D96Nm6DZ.js} +3 -2
  22. package/dist/cjs/{nv-fielddate.entry-DVVnRiOT.js → nv-fielddate.entry-ty37R9jF.js} +52 -26
  23. package/dist/cjs/{nv-fielddaterange.entry-Cb4X5Q-C.js → nv-fielddaterange.entry-BSIRu_mq.js} +69 -42
  24. package/dist/cjs/{nv-fielddropdown.entry-D2PKGkpx.js → nv-fielddropdown.entry-CUzvIoZZ.js} +34 -7
  25. package/dist/cjs/{nv-fielddropdownitem.entry-BqgMRnIc.js → nv-fielddropdownitem.entry-D-GTxLNk.js} +2 -1
  26. package/dist/cjs/{nv-fieldmultiselect.entry-Dzw4c9wO.js → nv-fieldmultiselect.entry-DFY2bf6s.js} +188 -156
  27. package/dist/cjs/{nv-fieldnumber.entry-Cm5g6tw7.js → nv-fieldnumber.entry-CILclJ7Q.js} +3 -2
  28. package/dist/cjs/{nv-fieldpassword.entry-BMI5M4RR.js → nv-fieldpassword.entry-CdR-NM8e.js} +3 -2
  29. package/dist/cjs/{nv-fieldradio.entry-BrCJvkMR.js → nv-fieldradio.entry-lC4scIvU.js} +3 -2
  30. package/dist/cjs/{nv-fieldselect.entry-Cz76Y4Fb.js → nv-fieldselect.entry-CYu6870F.js} +3 -2
  31. package/dist/cjs/{nv-fieldslider.entry-C2ynnMK8.js → nv-fieldslider.entry-DOuJAR6P.js} +3 -2
  32. package/dist/cjs/{nv-fieldtext.entry-B6ciu2fU.js → nv-fieldtext.entry-BFLUiPa4.js} +3 -2
  33. package/dist/cjs/{nv-fieldtextarea.entry-BL_gMvTp.js → nv-fieldtextarea.entry-BeI0k97G.js} +3 -2
  34. package/dist/cjs/{nv-fieldtime.entry-Be5fujXA.js → nv-fieldtime.entry-C28EAKki.js} +82 -68
  35. package/dist/cjs/nv-icon.entry-BXgjUpe_.js +80 -0
  36. package/dist/cjs/{nv-iconbutton_2.entry-Dlk96yHi.js → nv-iconbutton_2.entry-CpIkxrp9.js} +3 -2
  37. package/dist/cjs/{nv-menu.entry-CDn1Tk9J.js → nv-menu.entry-as-NOsF-.js} +25 -9
  38. package/dist/cjs/{nv-menuitem.entry-DIkQnha9.js → nv-menuitem.entry-D8KAh6nr.js} +2 -1
  39. package/dist/cjs/nv-notification.entry-C-_jV-DL.js +262 -0
  40. package/dist/cjs/nv-notificationcontainer.entry-CMn42loT.js +41 -0
  41. package/dist/cjs/{nv-popover.entry-Bz9ZWGlN.js → nv-popover.entry--BhEBSir.js} +72 -65
  42. package/dist/cjs/{nv-row.entry-iJGXINmZ.js → nv-row.entry-BxhcK9aY.js} +3 -2
  43. package/dist/cjs/{nv-stack.entry-CifEjR2g.js → nv-stack.entry-C3DF9jJZ.js} +3 -2
  44. package/dist/cjs/nv-table.entry-pfEGt2KH.js +245 -0
  45. package/dist/cjs/nv-toggle.entry-ChpqtQtn.js +80 -0
  46. package/dist/cjs/{nv-togglebutton.entry-X4eLeP-C.js → nv-togglebutton.entry-DE7CKmeN.js} +3 -2
  47. package/dist/cjs/{nv-togglebuttongroup.entry-BYO58vql.js → nv-togglebuttongroup.entry-BJPjdmHD.js} +3 -2
  48. package/dist/cjs/{nv-tooltip.entry-DaxjQSt1.js → nv-tooltip.entry-D9-Fga6C.js} +3 -2
  49. package/dist/components/NvDatatable.js +45 -0
  50. package/dist/generated/components.js +10 -10
  51. package/dist/generated/components.server.js +9 -17
  52. package/dist/index.js +2 -0
  53. package/dist/providers/NotificationProvider.js +83 -0
  54. package/dist/types/components/NvDatatable.d.ts +25 -0
  55. package/dist/types/generated/components.d.ts +5 -12
  56. package/dist/types/generated/components.server.d.ts +5 -12
  57. package/dist/types/index.d.ts +2 -0
  58. package/dist/types/providers/NotificationProvider.d.ts +36 -0
  59. package/package.json +7 -3
  60. package/dist/cjs/dom.utils-ac71e0ef-CmIwRr6O.js +0 -168
  61. package/dist/cjs/nv-avatar.entry-CuNYdZl_.js +0 -67
  62. package/dist/cjs/nv-button.entry-CF5IDcG3.js +0 -164
  63. package/dist/cjs/nv-icon.entry-C-wbfOy3.js +0 -79
  64. package/dist/cjs/nv-notification.entry-BiwnZCkF.js +0 -178
  65. package/dist/cjs/nv-table.entry-Dxg0j3fe.js +0 -338
  66. package/dist/cjs/nv-tablecolumn.entry--29MFEe9.js +0 -18
  67. package/dist/cjs/nv-toggle.entry-D0eQoEqf.js +0 -79
@@ -1,164 +0,0 @@
1
- 'use strict';
2
-
3
- var index = require('./index-CKAZvszR.js');
4
- var constantsD0f19e7b = require('./constants-d0f19e7b-s0SCO_vi.js');
5
- require('react');
6
-
7
- 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:\"TT Norms Pro\", 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);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);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);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);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}";
8
- const NvButtonStyle0 = nvButtonCss;
9
-
10
- const NvButton = class {
11
- constructor(hostRef) {
12
- index.registerInstance(this, hostRef);
13
- if (hostRef.$hostElement$["s-ei"]) {
14
- this.internals = hostRef.$hostElement$["s-ei"];
15
- }
16
- else {
17
- this.internals = hostRef.$hostElement$.attachInternals();
18
- hostRef.$hostElement$["s-ei"] = this.internals;
19
- }
20
- /****************************************************************************/
21
- //#region PROPERTIES
22
- /**
23
- * Determines how large or small the button appears, allowing for
24
- * customization of the button's dimensions to fit different design
25
- * specifications and user needs.
26
- */
27
- this.size = 'md';
28
- /**
29
- * Adjusts the button's emphasis to make it more or less visually prominent
30
- * to users. Use this to draw attention to important actions or reduce focus
31
- * on less critical ones
32
- */
33
- this.emphasis = 'high';
34
- /**
35
- * Use this prop to highlight the button when it represents the current page
36
- * or active selection. This helps users understand their navigation context.
37
- */
38
- this.active = false;
39
- /**
40
- * Applies styling that visually indicates the button represents a dangerous
41
- * action.
42
- */
43
- this.danger = false;
44
- /**
45
- * Set this to true to show a spinner on the button, letting users know that
46
- * their action is being processed. It helps improve user experience by
47
- * indicating ongoing activities.
48
- */
49
- this.loading = false;
50
- /**
51
- * Disables the button, preventing user interaction.
52
- */
53
- this.disabled = false;
54
- /**
55
- * Allows the button to stretch and fill the entire width of its container.
56
- */
57
- this.fluid = false;
58
- /**
59
- * Sets the button type to control its function in forms. Use 'submit' to send
60
- * form data, 'reset' to clear the form, or 'button' for a standard button
61
- * that doesn't interact with form submission by default.
62
- */
63
- this.type = 'button';
64
- //#endregion PROPERTIES
65
- /****************************************************************************/
66
- //#region METHODS
67
- /**
68
- * Handles button click events, managing form actions and disabled states.
69
- * Prevents default behavior when button is disabled or loading, and
70
- * processes form submissions/resets when appropriate.
71
- * @param {Event} event - The click event.
72
- */
73
- this.handleButtonClick = (event) => {
74
- var _a;
75
- if (this.loading || this.disabled) {
76
- event.preventDefault();
77
- return;
78
- }
79
- if (this.type !== constantsD0f19e7b.ButtonType.Button &&
80
- (this.form || ((_a = this.internals) === null || _a === void 0 ? void 0 : _a.form))) {
81
- this.processFormAction();
82
- }
83
- else if (this.form && this.type === constantsD0f19e7b.ButtonType.Button) {
84
- 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);
85
- }
86
- };
87
- /**
88
- * Processes form-related actions by finding the associated form element
89
- * and triggering the appropriate action (submit/reset) based on button type.
90
- * Falls back to ElementInternals form if no explicit form ID is provided.
91
- */
92
- this.processFormAction = () => {
93
- var _a, _b;
94
- const formElement = this.form
95
- ? document.getElementById(this.form)
96
- : (_a = this.internals) === null || _a === void 0 ? void 0 : _a.form;
97
- if (!formElement) {
98
- console.warn('No form element found.', `Form ID: ${this.form || 'Not provided'}`, `Internals form:`, (_b = this.internals) === null || _b === void 0 ? void 0 : _b.form);
99
- return;
100
- }
101
- switch (this.type) {
102
- case constantsD0f19e7b.ButtonType.Submit:
103
- formElement.requestSubmit();
104
- break;
105
- case constantsD0f19e7b.ButtonType.Reset:
106
- formElement.reset();
107
- break;
108
- }
109
- };
110
- }
111
- //#endregion METHODS
112
- /****************************************************************************/
113
- //#region EVENTS
114
- handleKeyDown(event) {
115
- if (event.key === 'Enter' || event.key === ' ') {
116
- event.preventDefault();
117
- this.el.click();
118
- }
119
- }
120
- handleTouchStart(event) {
121
- if (event.touches.length > 1)
122
- return;
123
- event.preventDefault();
124
- this.el.click();
125
- }
126
- //#endregion EVENTS
127
- /****************************************************************************/
128
- //#region WATCHERS
129
- handleLoadingChange(loading) {
130
- this.loading = loading;
131
- this.disabled = loading;
132
- }
133
- handleDisabledChange(disabled) {
134
- if (this.loading) {
135
- this.disabled = this.loading;
136
- }
137
- else {
138
- this.disabled = disabled;
139
- }
140
- }
141
- //#endregion WATCHERS
142
- /****************************************************************************/
143
- //#region LIFECYCLE
144
- componentWillLoad() {
145
- if (this.loading) {
146
- this.disabled = this.loading;
147
- }
148
- }
149
- //#endregion LIFECYCLE
150
- /****************************************************************************/
151
- //#region RENDER
152
- render() {
153
- return (index.h(index.Host, { key: '54c0b3351f4d8a180058a03e61a562882fb98498', role: "button", tabindex: "0", onClick: this.handleButtonClick }, this.loading && (index.h("nv-loader", { key: '21315e4af4111bcf47c67e65a9a58a1d7121a43e', size: this.size === constantsD0f19e7b.ButtonSize.Large ? 'sm' : 'xs' })), index.h("slot", { key: 'f37683ddaa2c11c5b7accfc99429c930f5a3dcf6', name: "leading-icon" }), index.h("slot", { key: 'd17ebe7505d9027c6c58f930a8ea9b097561cead' }), index.h("slot", { key: '2cd6c9756cc7540417041adf5830b734291b2ab5', name: "trailing-icon" })));
154
- }
155
- static get formAssociated() { return true; }
156
- get el() { return index.getElement(this); }
157
- static get watchers() { return {
158
- "loading": ["handleLoadingChange"],
159
- "disabled": ["handleDisabledChange"]
160
- }; }
161
- };
162
- NvButton.style = NvButtonStyle0;
163
-
164
- exports.nv_button = NvButton;