@nova-design-system/nova-react 3.5.0 → 3.6.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 (50) hide show
  1. package/dist/cjs/{timeline.animation-1b88f052-B8-vCVrY.js → collapse.animation-16e3af45-CChx_tQJ.js} +4 -25
  2. package/dist/cjs/fade.animation-71e8e34c-BAw_TYsB.js +68 -0
  3. package/dist/cjs/{index-Te0zRbKN.js → index-E_eTmclZ.js} +2187 -1596
  4. package/dist/cjs/index.js +3 -1
  5. package/dist/cjs/nv-accordion-item.entry-B9iMQoRk.js +178 -0
  6. package/dist/cjs/nv-accordion.entry-2oOEkDVq.js +191 -0
  7. package/dist/cjs/{nv-alert.entry-CPbApg9_.js → nv-alert.entry-CJcHACkm.js} +10 -8
  8. package/dist/cjs/{nv-avatar.entry-CwM8IOei.js → nv-avatar.entry-COkIaFDp.js} +2 -2
  9. package/dist/cjs/{nv-badge_2.entry-Bqu-2k7E.js → nv-badge_2.entry-CQHT-nck.js} +14 -12
  10. package/dist/cjs/{nv-breadcrumb.entry-CmceXVS9.js → nv-breadcrumb.entry-DElOQJUD.js} +2 -2
  11. package/dist/cjs/{nv-breadcrumbs.entry-B7xbEUl5.js → nv-breadcrumbs.entry-CDfxiMbp.js} +2 -2
  12. package/dist/cjs/{nv-button.entry-Cd_CE1fx.js → nv-button.entry-CTJT4SzB.js} +2 -2
  13. package/dist/cjs/{nv-calendar.entry-B2lm2nvb.js → nv-calendar.entry-BU2OBf6g.js} +60 -51
  14. package/dist/cjs/{nv-col.entry-BF8XR4B1.js → nv-col.entry-Bsz14pxY.js} +2 -2
  15. package/dist/cjs/{nv-datagrid.entry-CcQ8XP6J.js → nv-datagrid.entry-2DyB7G5f.js} +3 -3
  16. package/dist/cjs/{nv-datagridcolumn.entry-uGbQ4NMr.js → nv-datagridcolumn.entry-DquF2Cc1.js} +2 -2
  17. package/dist/cjs/{nv-dialog.entry-DyK4wFFz.js → nv-dialog.entry-QzImh4AV.js} +20 -7
  18. package/dist/cjs/{nv-dialogfooter_2.entry-DT3kR9Xn.js → nv-dialogfooter_2.entry-MikGtnGi.js} +3 -3
  19. package/dist/cjs/{nv-fieldcheckbox.entry-D_wHbgcq.js → nv-fieldcheckbox.entry-DKhH58rn.js} +5 -5
  20. package/dist/cjs/{nv-fielddate.entry-BaIcP2EG.js → nv-fielddate.entry-Dj_oMJ2a.js} +101 -36
  21. package/dist/cjs/{nv-fielddaterange.entry-BNcF2N2M.js → nv-fielddaterange.entry-CWwH83ug.js} +5 -5
  22. package/dist/cjs/{nv-fielddropdown.entry-DWlDvODi.js → nv-fielddropdown.entry-CPD-1tGj.js} +4 -4
  23. package/dist/cjs/{nv-fielddropdownitem.entry-BIy_GUKA.js → nv-fielddropdownitem.entry-CM5Fogll.js} +2 -2
  24. package/dist/cjs/{nv-fieldmultiselect.entry-B74CLRuh.js → nv-fieldmultiselect.entry-DodoLrhv.js} +86 -101
  25. package/dist/cjs/{nv-fieldnumber.entry-BQBy1EIj.js → nv-fieldnumber.entry-063nS6p_.js} +4 -4
  26. package/dist/cjs/{nv-fieldpassword.entry-DNFZvmBx.js → nv-fieldpassword.entry-CreA_Yx8.js} +4 -4
  27. package/dist/cjs/{nv-fieldradio.entry-BIR29jv5.js → nv-fieldradio.entry-Y8YSlQbK.js} +4 -4
  28. package/dist/cjs/{nv-fieldselect.entry-DulA_N5q.js → nv-fieldselect.entry-B1X8kT8-.js} +6 -6
  29. package/dist/cjs/{nv-fieldslider.entry-DCslY5gg.js → nv-fieldslider.entry-CJlQWgFy.js} +54 -10
  30. package/dist/cjs/{nv-fieldtext.entry-Dvv8KjJC.js → nv-fieldtext.entry-Cib7Q9Wi.js} +4 -4
  31. package/dist/cjs/{nv-fieldtextarea.entry-rVcnznae.js → nv-fieldtextarea.entry-QYIEAbAM.js} +4 -4
  32. package/dist/cjs/{nv-fieldtime.entry-_fXkWsoI.js → nv-fieldtime.entry-D6jX_bbE.js} +10 -10
  33. package/dist/cjs/{nv-icon.entry-BGyFETNH.js → nv-icon.entry-DyYPxO1l.js} +2 -2
  34. package/dist/cjs/{nv-iconbutton_2.entry-CtClzxKf.js → nv-iconbutton_2.entry-BDpYysUa.js} +3 -3
  35. package/dist/cjs/{nv-menu.entry-B3vFxd1E.js → nv-menu.entry-EY6i9-lW.js} +2 -2
  36. package/dist/cjs/{nv-menuitem.entry-BIWwr98d.js → nv-menuitem.entry-D3_V7wz6.js} +2 -2
  37. package/dist/cjs/{nv-popover.entry-vonHjF_y.js → nv-popover.entry-VI0JSWEK.js} +9 -8
  38. package/dist/cjs/{nv-row.entry-BYUhLZ0r.js → nv-row.entry-Da5sYAGY.js} +2 -2
  39. package/dist/cjs/{nv-stack.entry-Cxc6QmII.js → nv-stack.entry-CQ8A3wKB.js} +2 -2
  40. package/dist/cjs/{nv-table.entry-DSBUXcSF.js → nv-table.entry-DkALs4J_.js} +3 -3
  41. package/dist/cjs/{nv-tablecolumn.entry-BP857bqD.js → nv-tablecolumn.entry-C_9y9_Tk.js} +1 -1
  42. package/dist/cjs/{nv-toggle.entry-CnquGUlJ.js → nv-toggle.entry-CPvuKc2f.js} +3 -3
  43. package/dist/cjs/{nv-tooltip.entry-XvxL_FTH.js → nv-tooltip.entry-dvTSw6dq.js} +4 -3
  44. package/dist/cjs/{fade.animation-2a077983-aKN0EDTo.js → stylefire.es-74da334a-y0piPjlz.js} +0 -64
  45. package/dist/cjs/timeline.animation-adf35ecb-CE6Dsdxr.js +23 -0
  46. package/dist/generated/components.js +18 -2
  47. package/dist/generated/components.server.js +26 -3
  48. package/dist/types/generated/components.d.ts +17 -3
  49. package/dist/types/generated/components.server.d.ts +17 -3
  50. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var fade_animation2a077983 = require('./fade.animation-2a077983-aKN0EDTo.js');
3
+ var stylefire_es74da334a = require('./stylefire.es-74da334a-y0piPjlz.js');
4
4
 
5
5
  const useCollapse = (node, { duration } = { duration: 200 }) => {
6
- const nodeStyler = fade_animation2a077983.index(node);
6
+ const nodeStyler = stylefire_es74da334a.index(node);
7
7
  /**
8
8
  * Will set the overflow to hidden, and animate the max height to 0. Make sure
9
9
  * the element has no border or y padding set, otherwise the animation will
@@ -13,7 +13,7 @@ const useCollapse = (node, { duration } = { duration: 200 }) => {
13
13
  return new Promise(resolve => {
14
14
  const height = node.getBoundingClientRect().height;
15
15
  nodeStyler.set({ overflow: 'hidden' });
16
- fade_animation2a077983.animate({
16
+ stylefire_es74da334a.animate({
17
17
  from: height,
18
18
  to: 0,
19
19
  duration,
@@ -56,7 +56,7 @@ const useCollapse = (node, { duration } = { duration: 200 }) => {
56
56
  nodeStyler.set({
57
57
  overflow: 'hidden',
58
58
  });
59
- fade_animation2a077983.animate({
59
+ stylefire_es74da334a.animate({
60
60
  from: 0,
61
61
  to: scrollHeight,
62
62
  duration,
@@ -81,25 +81,4 @@ const useCollapse = (node, { duration } = { duration: 200 }) => {
81
81
  };
82
82
  };
83
83
 
84
- /**
85
- * Will execute a series of animation promises in sequence.
86
- * This is useful for chaining animations where each step depends on the
87
- * previous one completing before starting the next.
88
- *
89
- * @param {Array<() => Promise<void>>} animations - The array of animation functions.
90
- * @returns {Object} - An object with a `start` method to begin the timeline.
91
- *
92
- * @example
93
- * const { fadeOut } = useFade(this.ref);
94
- * const { collapse } = useCollapse(this.ref);
95
- *
96
- * timeline(fadeOut, collapse).start();
97
- */
98
- const timeline = (...animations) => ({
99
- start: () => {
100
- return animations.reduce((promise, animation) => promise.then(() => animation()), Promise.resolve());
101
- },
102
- });
103
-
104
- exports.timeline = timeline;
105
84
  exports.useCollapse = useCollapse;
@@ -0,0 +1,68 @@
1
+ 'use strict';
2
+
3
+ var stylefire_es74da334a = require('./stylefire.es-74da334a-y0piPjlz.js');
4
+
5
+ const useFade = (node, { duration } = { duration: 200 }) => {
6
+ const nodeStyler = stylefire_es74da334a.index(node);
7
+ /**
8
+ * Will animate the opacity to 1, and removes the opacity style attribute once
9
+ * complete.
10
+ */
11
+ function fadeIn() {
12
+ return new Promise(resolve => {
13
+ stylefire_es74da334a.animate({
14
+ from: { opacity: 0 },
15
+ to: { opacity: 1 },
16
+ duration,
17
+ onUpdate(latest) {
18
+ nodeStyler.set({ opacity: latest.opacity });
19
+ },
20
+ onComplete() {
21
+ resolve();
22
+ node.style.removeProperty('opacity');
23
+ },
24
+ });
25
+ });
26
+ }
27
+ /**
28
+ * Applies the fadeOut styles without animating, useful when initial state
29
+ * is hidden.
30
+ */
31
+ function setFadeOut() {
32
+ node.style.opacity = '0';
33
+ }
34
+ /**
35
+ * Applies the fadeIn styles without animating, useful when initial state
36
+ * is visible.
37
+ */
38
+ function setFadeIn() {
39
+ node.style.opacity = '1';
40
+ }
41
+ /**
42
+ * Will animate the opacity to 0, once complete, the opacity style attribute
43
+ * will stay on the element.
44
+ */
45
+ function fadeOut() {
46
+ return new Promise(resolve => {
47
+ stylefire_es74da334a.animate({
48
+ from: { opacity: 1 },
49
+ to: { opacity: 0 },
50
+ duration,
51
+ onUpdate(latest) {
52
+ nodeStyler.set({ opacity: latest.opacity });
53
+ },
54
+ onComplete() {
55
+ resolve();
56
+ },
57
+ });
58
+ });
59
+ }
60
+ return {
61
+ fadeIn,
62
+ fadeOut,
63
+ setFadeOut,
64
+ setFadeIn,
65
+ };
66
+ };
67
+
68
+ exports.useFade = useFade;