@nova-design-system/nova-react 3.0.0-beta.40 → 3.0.0-beta.42

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 (89) hide show
  1. package/dist/cjs/_commonjsHelpers-1789f0cf-BJu3ubxk.js +10 -0
  2. package/dist/cjs/clsx-297c1ffe-BtxeOLZW.js +5 -0
  3. package/dist/cjs/constants-98e2dcc2-C0SBCapP.js +250 -0
  4. package/dist/cjs/dom.utils-ac71e0ef-CmIwRr6O.js +168 -0
  5. package/dist/cjs/events.utils-fe1d907f-01N__3wY.js +23 -0
  6. package/dist/cjs/fade.animation-2a077983-aKN0EDTo.js +1832 -0
  7. package/dist/cjs/index-C8UfzrMI.js +26405 -0
  8. package/dist/cjs/index-CinzsZ8D.js +26405 -0
  9. package/dist/cjs/index.js +48 -0
  10. package/dist/cjs/inputmask-edcad3c1-B9Omti4z.js +3749 -0
  11. package/dist/cjs/nv-alert.entry-8esWDUyU.js +173 -0
  12. package/dist/cjs/nv-alert.entry-BVY_rxey.js +173 -0
  13. package/dist/cjs/nv-avatar.entry-CO6bt4k6.js +67 -0
  14. package/dist/cjs/nv-avatar.entry-pREKtiv2.js +67 -0
  15. package/dist/cjs/nv-badge_2.entry-wDuiCwys.js +195 -0
  16. package/dist/cjs/nv-badge_2.entry-xfXsesV0.js +195 -0
  17. package/dist/cjs/nv-base.entry-BO-6krwg.js +71 -0
  18. package/dist/cjs/nv-base.entry-DwtTXK_n.js +71 -0
  19. package/dist/cjs/nv-breadcrumb.entry-B0hIeE83.js +45 -0
  20. package/dist/cjs/nv-breadcrumb.entry-DTwjCmMI.js +45 -0
  21. package/dist/cjs/nv-breadcrumbs.entry-Cq0LsIFs.js +20 -0
  22. package/dist/cjs/nv-breadcrumbs.entry-jn5hRjpQ.js +20 -0
  23. package/dist/cjs/nv-button.entry-DaSGnB1L.js +162 -0
  24. package/dist/cjs/nv-button.entry-DxzA6-My.js +162 -0
  25. package/dist/cjs/nv-calendar.entry-BC6NDsVl.js +1036 -0
  26. package/dist/cjs/nv-calendar.entry-DKz-iBnp.js +1036 -0
  27. package/dist/cjs/nv-col.entry-DNUY559i.js +37 -0
  28. package/dist/cjs/nv-col.entry-X7jkNThH.js +37 -0
  29. package/dist/cjs/nv-datagrid.entry-Cp8RCSEv.js +3671 -0
  30. package/dist/cjs/nv-datagrid.entry-DL-Fyo4l.js +3671 -0
  31. package/dist/cjs/nv-datagridcolumn.entry-CR9_1fsZ.js +18 -0
  32. package/dist/cjs/nv-datagridcolumn.entry-CyTG5E7M.js +18 -0
  33. package/dist/cjs/nv-dialog.entry-BjTJ5FFL.js +784 -0
  34. package/dist/cjs/nv-dialog.entry-Do_uALC6.js +784 -0
  35. package/dist/cjs/nv-dialogfooter_2.entry-DJ8qS9q6.js +134 -0
  36. package/dist/cjs/nv-dialogfooter_2.entry-DJkKzEgO.js +134 -0
  37. package/dist/cjs/nv-fieldcheckbox.entry-C0DmeqXD.js +137 -0
  38. package/dist/cjs/nv-fieldcheckbox.entry-DoGQX-5D.js +137 -0
  39. package/dist/cjs/nv-fielddate.entry-D-PjbYaA.js +278 -0
  40. package/dist/cjs/nv-fielddate.entry-DRX2mfZL.js +278 -0
  41. package/dist/cjs/nv-fielddaterange.entry-BrC5jKLp.js +355 -0
  42. package/dist/cjs/nv-fielddaterange.entry-ka3JiDvT.js +355 -0
  43. package/dist/cjs/nv-fielddropdown.entry-DUAKFYgw.js +391 -0
  44. package/dist/cjs/nv-fielddropdown.entry-MsUR1kVe.js +391 -0
  45. package/dist/cjs/nv-fielddropdownitem.entry-BsbvJERH.js +70 -0
  46. package/dist/cjs/nv-fielddropdownitem.entry-DRM-Zljt.js +70 -0
  47. package/dist/cjs/nv-fieldmultiselect.entry-DFr-ZICs.js +1060 -0
  48. package/dist/cjs/nv-fieldmultiselect.entry-Dr8FfT_W.js +1060 -0
  49. package/dist/cjs/nv-fieldnumber.entry-DZsM1vmO.js +126 -0
  50. package/dist/cjs/nv-fieldnumber.entry-ezdDvJh_.js +126 -0
  51. package/dist/cjs/nv-fieldpassword.entry-Biw__M2W.js +115 -0
  52. package/dist/cjs/nv-fieldpassword.entry-D4a8SnGr.js +115 -0
  53. package/dist/cjs/nv-fieldradio.entry-Co7WX2vI.js +102 -0
  54. package/dist/cjs/nv-fieldradio.entry-ZL7KgEZ7.js +102 -0
  55. package/dist/cjs/nv-fieldselect.entry-D6eRsM9T.js +365 -0
  56. package/dist/cjs/nv-fieldselect.entry-sTbv_flF.js +365 -0
  57. package/dist/cjs/nv-fieldtext.entry-DKdxC2cG.js +119 -0
  58. package/dist/cjs/nv-fieldtext.entry-DRPCH6Sf.js +119 -0
  59. package/dist/cjs/nv-fieldtextarea.entry-BwJCUiVW.js +194 -0
  60. package/dist/cjs/nv-fieldtextarea.entry-Dc_TGlmI.js +194 -0
  61. package/dist/cjs/nv-fieldtime.entry-CXRtpWt1.js +1011 -0
  62. package/dist/cjs/nv-fieldtime.entry-uU-IET2k.js +1011 -0
  63. package/dist/cjs/nv-icon.entry-iipuvT3D.js +79 -0
  64. package/dist/cjs/nv-icon.entry-xltjoSa2.js +79 -0
  65. package/dist/cjs/nv-iconbutton_2.entry-BsXvYbCi.js +163 -0
  66. package/dist/cjs/nv-iconbutton_2.entry-Dx4usGkY.js +163 -0
  67. package/dist/cjs/nv-menu.entry-D3qvf_0H.js +227 -0
  68. package/dist/cjs/nv-menu.entry-DFEYw_KZ.js +227 -0
  69. package/dist/cjs/nv-menuitem.entry-3t6TixM7.js +58 -0
  70. package/dist/cjs/nv-menuitem.entry-BeTXOtir.js +58 -0
  71. package/dist/cjs/nv-popover.entry-Bv6kuTK_.js +1960 -0
  72. package/dist/cjs/nv-popover.entry-Zt25YeAv.js +1960 -0
  73. package/dist/cjs/nv-row.entry-BPK1Li7w.js +21 -0
  74. package/dist/cjs/nv-row.entry-Bwzlub3i.js +21 -0
  75. package/dist/cjs/nv-stack.entry-ByaO-0TJ.js +30 -0
  76. package/dist/cjs/nv-stack.entry-bhess4lQ.js +30 -0
  77. package/dist/cjs/nv-table.entry-C7Hd57Iq.js +338 -0
  78. package/dist/cjs/nv-table.entry-D3U4dFcw.js +338 -0
  79. package/dist/cjs/nv-tablecolumn.entry-BDCw_45v.js +18 -0
  80. package/dist/cjs/nv-tablecolumn.entry-BzwWPlLf.js +18 -0
  81. package/dist/cjs/nv-toggle.entry-BTqGH_H0.js +79 -0
  82. package/dist/cjs/nv-toggle.entry-DXpNGkbz.js +79 -0
  83. package/dist/cjs/nv-tooltip.entry-BDZfrLHv.js +44 -0
  84. package/dist/cjs/nv-tooltip.entry-CvCZZV88.js +44 -0
  85. package/dist/cjs/timeline.animation-1b88f052-B8-vCVrY.js +105 -0
  86. package/dist/cjs/v4-a79185f4-2n0dOd_Y.js +56 -0
  87. package/dist/generated/components.js +16 -0
  88. package/dist/types/generated/components.d.ts +19 -3
  89. package/package.json +14 -5
@@ -0,0 +1,195 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-CinzsZ8D.js');
4
+ var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
5
+ var timeline_animation1b88f052 = require('./timeline.animation-1b88f052-B8-vCVrY.js');
6
+ var fade_animation2a077983 = require('./fade.animation-2a077983-aKN0EDTo.js');
7
+ require('react');
8
+
9
+ const nvBadgeCss = "nv-badge{padding:var(--badge-padding-y) var(--badge-padding-x);display:inline-flex !important;vertical-align:middle;align-items:center;border-radius:var(--radius-rounded-full);height:fit-content;width:fit-content}nv-badge.with-gap{padding:var(--badge-padding-y) var(--badge-padding-x);display:inline-flex !important;vertical-align:middle;align-items:center;border-radius:var(--radius-rounded-full);height:fit-content;width:fit-content;gap:var(--badge-gap-x)}nv-badge:not(.with-gap){padding:var(--badge-padding-y) var(--badge-padding-x);display:inline-flex !important;vertical-align:middle;align-items:center;border-radius:var(--radius-rounded-full);height:fit-content;width:fit-content}nv-badge.badge-1{color:var(--color-rainbow-1-text);background-color:var(--color-rainbow-1-background)}nv-badge.badge-1 .close:focus,nv-badge.badge-1 .close:focus-within{outline:none}nv-badge.badge-1 .close:focus-visible,nv-badge.badge-1 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-1-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-1 nv-icon{color:var(--color-rainbow-1-icon)}nv-badge.badge-2{color:var(--color-rainbow-2-text);background-color:var(--color-rainbow-2-background)}nv-badge.badge-2 .close:focus,nv-badge.badge-2 .close:focus-within{outline:none}nv-badge.badge-2 .close:focus-visible,nv-badge.badge-2 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-2-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-2 nv-icon{color:var(--color-rainbow-2-icon)}nv-badge.badge-3{color:var(--color-rainbow-3-text);background-color:var(--color-rainbow-3-background)}nv-badge.badge-3 .close:focus,nv-badge.badge-3 .close:focus-within{outline:none}nv-badge.badge-3 .close:focus-visible,nv-badge.badge-3 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-3-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-3 nv-icon{color:var(--color-rainbow-3-icon)}nv-badge.badge-4{color:var(--color-rainbow-4-text);background-color:var(--color-rainbow-4-background)}nv-badge.badge-4 .close:focus,nv-badge.badge-4 .close:focus-within{outline:none}nv-badge.badge-4 .close:focus-visible,nv-badge.badge-4 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-4-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-4 nv-icon{color:var(--color-rainbow-4-icon)}nv-badge.badge-5{color:var(--color-rainbow-5-text);background-color:var(--color-rainbow-5-background)}nv-badge.badge-5 .close:focus,nv-badge.badge-5 .close:focus-within{outline:none}nv-badge.badge-5 .close:focus-visible,nv-badge.badge-5 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-5-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-5 nv-icon{color:var(--color-rainbow-5-icon)}nv-badge.badge-6{color:var(--color-rainbow-6-text);background-color:var(--color-rainbow-6-background)}nv-badge.badge-6 .close:focus,nv-badge.badge-6 .close:focus-within{outline:none}nv-badge.badge-6 .close:focus-visible,nv-badge.badge-6 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-6-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-6 nv-icon{color:var(--color-rainbow-6-icon)}nv-badge.badge-7{color:var(--color-rainbow-7-text);background-color:var(--color-rainbow-7-background)}nv-badge.badge-7 .close:focus,nv-badge.badge-7 .close:focus-within{outline:none}nv-badge.badge-7 .close:focus-visible,nv-badge.badge-7 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-7-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-7 nv-icon{color:var(--color-rainbow-7-icon)}nv-badge.badge-8{color:var(--color-rainbow-8-text);background-color:var(--color-rainbow-8-background)}nv-badge.badge-8 .close:focus,nv-badge.badge-8 .close:focus-within{outline:none}nv-badge.badge-8 .close:focus-visible,nv-badge.badge-8 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-8-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-8 nv-icon{color:var(--color-rainbow-8-icon)}nv-badge.badge-9{color:var(--color-rainbow-9-text);background-color:var(--color-rainbow-9-background)}nv-badge.badge-9 .close:focus,nv-badge.badge-9 .close:focus-within{outline:none}nv-badge.badge-9 .close:focus-visible,nv-badge.badge-9 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-9-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-9 nv-icon{color:var(--color-rainbow-9-icon)}nv-badge.badge-10{color:var(--color-rainbow-10-text);background-color:var(--color-rainbow-10-background)}nv-badge.badge-10 .close:focus,nv-badge.badge-10 .close:focus-within{outline:none}nv-badge.badge-10 .close:focus-visible,nv-badge.badge-10 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-10-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-10 nv-icon{color:var(--color-rainbow-10-icon)}nv-badge span{font-size:var(--font-size-xs);line-height:var(--line-height-xs) !important}nv-badge nv-icon>svg.icon-xs{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge nv-icon>svg.icon-sm{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge nv-icon>svg.icon-md{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge nv-icon>svg.icon-lg{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge nv-icon>svg.icon-xl{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge .close{padding:0;line-height:0;border:none;background:none;cursor:pointer;color:inherit;display:inline-flex;align-items:center;aspect-ratio:1/1;border-radius:var(--radius-rounded-full)}";
10
+ const NvBadgeStyle0 = nvBadgeCss;
11
+
12
+ const NvBadge = class {
13
+ constructor(hostRef) {
14
+ index.registerInstance(this, hostRef);
15
+ this.closeClicked = index.createEvent(this, "closeClicked");
16
+ this.hiddenChanged = index.createEvent(this, "hiddenChanged");
17
+ this.hiddenChangedComplete = index.createEvent(this, "hiddenChangedComplete");
18
+ /****************************************************************************/
19
+ //#region DEPRECATED
20
+ /**
21
+ * Whether the badge is dismissible.
22
+ * @deprecated use dismissible instead.
23
+ */
24
+ this.dismissal = false;
25
+ //#endregion DEPRECATED
26
+ /****************************************************************************/
27
+ //#region PROPERTIES
28
+ /**
29
+ * The color of the badge. Use a string between 1 to 10
30
+ */
31
+ this.color = '1';
32
+ /**
33
+ * Main content of the badge.
34
+ */
35
+ this.label = null;
36
+ /**
37
+ * The lead icon of the badge.
38
+ */
39
+ this.leadIcon = null;
40
+ /**
41
+ * Whether the badge is dismissible.
42
+ */
43
+ this.dismissible = false;
44
+ /**
45
+ * Controls the visibility of the badge. Will animate with fade and collapse.
46
+ */
47
+ this.hidden = false; // eslint-disable-line @stencil-community/reserved-member-names
48
+ this._isHidden = this.hidden;
49
+ /**
50
+ * When true, the alert does not automatically close upon dismissing.
51
+ * Useful for externally controlled component behavior.
52
+ */
53
+ this.preventAutoClose = false;
54
+ //#endregion LIFECYCLE
55
+ /****************************************************************************/
56
+ //#region METHODS
57
+ /**
58
+ * Handles the close button click.
59
+ * @param {MouseEvent} originalEvent - The original event.
60
+ */
61
+ this.handleClose = (originalEvent) => {
62
+ if (!this.preventAutoClose) {
63
+ this.hidden = true;
64
+ }
65
+ this.closeClicked.emit(originalEvent);
66
+ };
67
+ }
68
+ //#endregion EVENTS
69
+ /****************************************************************************/
70
+ //#region WATCHERS
71
+ /**
72
+ * Handles the dismissal prop change.
73
+ * @param {boolean} dismissal - The new dismissal value.
74
+ */
75
+ handleDismissalChange(dismissal) {
76
+ this.dismissible = dismissal;
77
+ }
78
+ /**
79
+ * Handles the icon prop change.
80
+ * @param {string} icon - The new icon value.
81
+ */
82
+ handleIconChange(icon) {
83
+ this.leadIcon = icon;
84
+ }
85
+ /**
86
+ * Handles the hidden prop change.
87
+ * @param {boolean} hidden - The new hidden value.
88
+ */
89
+ async handleHiddenChange(hidden) {
90
+ this.hiddenChanged.emit(hidden);
91
+ if (this._isHidden === true)
92
+ this._isHidden = hidden;
93
+ const { fadeIn, fadeOut } = fade_animation2a077983.useFade(this.ref, { duration: 150 });
94
+ const { collapse, expand } = timeline_animation1b88f052.useCollapse(this.ref, { duration: 150 });
95
+ if (hidden === true)
96
+ await timeline_animation1b88f052.timeline(fadeOut, collapse).start();
97
+ if (hidden === false)
98
+ await timeline_animation1b88f052.timeline(expand, fadeIn).start();
99
+ this.hiddenChangedComplete.emit(hidden);
100
+ if (this._isHidden === false)
101
+ this._isHidden = hidden;
102
+ }
103
+ //#endregion WATCHERS
104
+ /****************************************************************************/
105
+ //#region LIFECYCLE
106
+ /**
107
+ * Component will load.
108
+ */
109
+ componentWillLoad() {
110
+ if (this.dismissal) {
111
+ this.dismissible = this.dismissal;
112
+ }
113
+ if (this.icon != null && this.icon != '') {
114
+ this.leadIcon = this.icon;
115
+ }
116
+ if (this.hidden) {
117
+ const { setCollapsed } = timeline_animation1b88f052.useCollapse(this.ref);
118
+ const { setFadeOut } = fade_animation2a077983.useFade(this.ref);
119
+ setCollapsed();
120
+ setFadeOut();
121
+ }
122
+ }
123
+ //#endregion METHODS
124
+ /****************************************************************************/
125
+ //#region RENDER
126
+ render() {
127
+ return (index.h(index.Host, { key: '63f256c6711546ca5304d46c2624e52f35dc2b46', class: clsx297c1ffe.clsx(`badge-${this.color}`, {
128
+ 'has-close': this.dismissible,
129
+ 'with-gap': this.dismissible || this.label,
130
+ 'visually-hidden': this._isHidden,
131
+ }) }, index.h("slot", { key: '181e608d22c697517ef55dbc4432ac06cdf6892e', name: "leading-icon" }, this.leadIcon && (index.h("nv-icon", { key: '914d75ef9d54e2c8c94c9c99a4efeb59aa654f1c', slot: "leading-icon", name: this.leadIcon, size: "sm" }))), this.label && index.h("span", { key: 'd32ff92840bba1cc983b24a4fee95af065ffef0e' }, this.label), this.dismissible && (index.h("button", { key: '1dbd1e432774e26936f93f7207e1f6eb93fa0819', onClick: this.handleClose, class: "close", type: "button" }, index.h("nv-icon", { key: '8372fb5ba1dafd5758807485a5be3880a009567d', name: "x", size: "sm" })))));
132
+ }
133
+ get ref() { return index.getElement(this); }
134
+ static get watchers() { return {
135
+ "dismissal": ["handleDismissalChange"],
136
+ "icon": ["handleIconChange"],
137
+ "hidden": ["handleHiddenChange"]
138
+ }; }
139
+ };
140
+ NvBadge.style = NvBadgeStyle0;
141
+
142
+ const nvFielddropdownitemcheckCss = "nv-fielddropdownitemcheck{cursor:pointer;display:flex;padding:var(--list-dropdown-item-padding-y) var(--list-dropdown-item-padding-x);border-radius:var(--list-dropdown-item-radius)}nv-fielddropdownitemcheck slot-fb,nv-fielddropdownitemcheck span{all:unset}nv-fielddropdownitemcheck:hover{background-color:var(--components-list-dropdown-item-background-hover)}";
143
+ const NvFielddropdownitemcheckStyle0 = nvFielddropdownitemcheckCss;
144
+
145
+ const NvFielddropdownitemcheck = class {
146
+ constructor(hostRef) {
147
+ index.registerInstance(this, hostRef);
148
+ this.itemChecked = index.createEvent(this, "itemChecked");
149
+ /****************************************************************************/
150
+ //#region PROPERTIES
151
+ /**
152
+ * Indicates whether the checkbox is selected.
153
+ */
154
+ this.checked = false;
155
+ /**
156
+ * Disables the item, preventing any user interaction.
157
+ */
158
+ this.disabled = false;
159
+ /**
160
+ * when the child <nv-fieldcheckbox> change its `checked` state,
161
+ * update `this.checked` and emit `itemChecked`.
162
+ * @param {CustomEvent<boolean>} event - The event emitted by the <nv-fieldcheckbox> component.
163
+ */
164
+ this.onFieldcheckboxChanged = (event) => {
165
+ if (this.disabled)
166
+ return;
167
+ // NvFieldcheckbox has emitted checkedChanged
168
+ this.checked = event.detail; // get the new state
169
+ this.itemChecked.emit({
170
+ value: this.value,
171
+ checked: this.checked,
172
+ group: this.group,
173
+ });
174
+ };
175
+ /** Make sure the checkbox is checked when clicked anywhere in the item. */
176
+ this.handleClick = () => {
177
+ if (this.disabled)
178
+ return;
179
+ if (this.el.querySelector('input').checked) {
180
+ this.checked = false;
181
+ }
182
+ else {
183
+ this.checked = true;
184
+ }
185
+ };
186
+ }
187
+ render() {
188
+ return (index.h(index.Host, { key: 'f9445369d2703e0a5fe4417b1968f9a25dc94743', onClick: this.handleClick }, index.h("nv-fieldcheckbox", { key: 'a64195d14834b2a83d3b4c3f1451272fb97ff46a', checked: this.checked, name: this.label || this.value, label: this.label || this.value, "label-placement": "after", description: this.description, disabled: this.disabled, tabindex: "-1", role: "option", onCheckedChanged: this.onFieldcheckboxChanged })));
189
+ }
190
+ get el() { return index.getElement(this); }
191
+ };
192
+ NvFielddropdownitemcheck.style = NvFielddropdownitemcheckStyle0;
193
+
194
+ exports.nv_badge = NvBadge;
195
+ exports.nv_fielddropdownitemcheck = NvFielddropdownitemcheck;
@@ -0,0 +1,195 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-C8UfzrMI.js');
4
+ var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
5
+ var timeline_animation1b88f052 = require('./timeline.animation-1b88f052-B8-vCVrY.js');
6
+ var fade_animation2a077983 = require('./fade.animation-2a077983-aKN0EDTo.js');
7
+ require('react');
8
+
9
+ const nvBadgeCss = "nv-badge{padding:var(--badge-padding-y) var(--badge-padding-x);display:inline-flex !important;vertical-align:middle;align-items:center;border-radius:var(--radius-rounded-full);height:fit-content;width:fit-content}nv-badge.with-gap{padding:var(--badge-padding-y) var(--badge-padding-x);display:inline-flex !important;vertical-align:middle;align-items:center;border-radius:var(--radius-rounded-full);height:fit-content;width:fit-content;gap:var(--badge-gap-x)}nv-badge:not(.with-gap){padding:var(--badge-padding-y) var(--badge-padding-x);display:inline-flex !important;vertical-align:middle;align-items:center;border-radius:var(--radius-rounded-full);height:fit-content;width:fit-content}nv-badge.badge-1{color:var(--color-rainbow-1-text);background-color:var(--color-rainbow-1-background)}nv-badge.badge-1 .close:focus,nv-badge.badge-1 .close:focus-within{outline:none}nv-badge.badge-1 .close:focus-visible,nv-badge.badge-1 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-1-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-1 nv-icon{color:var(--color-rainbow-1-icon)}nv-badge.badge-2{color:var(--color-rainbow-2-text);background-color:var(--color-rainbow-2-background)}nv-badge.badge-2 .close:focus,nv-badge.badge-2 .close:focus-within{outline:none}nv-badge.badge-2 .close:focus-visible,nv-badge.badge-2 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-2-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-2 nv-icon{color:var(--color-rainbow-2-icon)}nv-badge.badge-3{color:var(--color-rainbow-3-text);background-color:var(--color-rainbow-3-background)}nv-badge.badge-3 .close:focus,nv-badge.badge-3 .close:focus-within{outline:none}nv-badge.badge-3 .close:focus-visible,nv-badge.badge-3 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-3-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-3 nv-icon{color:var(--color-rainbow-3-icon)}nv-badge.badge-4{color:var(--color-rainbow-4-text);background-color:var(--color-rainbow-4-background)}nv-badge.badge-4 .close:focus,nv-badge.badge-4 .close:focus-within{outline:none}nv-badge.badge-4 .close:focus-visible,nv-badge.badge-4 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-4-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-4 nv-icon{color:var(--color-rainbow-4-icon)}nv-badge.badge-5{color:var(--color-rainbow-5-text);background-color:var(--color-rainbow-5-background)}nv-badge.badge-5 .close:focus,nv-badge.badge-5 .close:focus-within{outline:none}nv-badge.badge-5 .close:focus-visible,nv-badge.badge-5 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-5-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-5 nv-icon{color:var(--color-rainbow-5-icon)}nv-badge.badge-6{color:var(--color-rainbow-6-text);background-color:var(--color-rainbow-6-background)}nv-badge.badge-6 .close:focus,nv-badge.badge-6 .close:focus-within{outline:none}nv-badge.badge-6 .close:focus-visible,nv-badge.badge-6 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-6-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-6 nv-icon{color:var(--color-rainbow-6-icon)}nv-badge.badge-7{color:var(--color-rainbow-7-text);background-color:var(--color-rainbow-7-background)}nv-badge.badge-7 .close:focus,nv-badge.badge-7 .close:focus-within{outline:none}nv-badge.badge-7 .close:focus-visible,nv-badge.badge-7 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-7-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-7 nv-icon{color:var(--color-rainbow-7-icon)}nv-badge.badge-8{color:var(--color-rainbow-8-text);background-color:var(--color-rainbow-8-background)}nv-badge.badge-8 .close:focus,nv-badge.badge-8 .close:focus-within{outline:none}nv-badge.badge-8 .close:focus-visible,nv-badge.badge-8 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-8-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-8 nv-icon{color:var(--color-rainbow-8-icon)}nv-badge.badge-9{color:var(--color-rainbow-9-text);background-color:var(--color-rainbow-9-background)}nv-badge.badge-9 .close:focus,nv-badge.badge-9 .close:focus-within{outline:none}nv-badge.badge-9 .close:focus-visible,nv-badge.badge-9 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-9-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-9 nv-icon{color:var(--color-rainbow-9-icon)}nv-badge.badge-10{color:var(--color-rainbow-10-text);background-color:var(--color-rainbow-10-background)}nv-badge.badge-10 .close:focus,nv-badge.badge-10 .close:focus-within{outline:none}nv-badge.badge-10 .close:focus-visible,nv-badge.badge-10 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-10-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-10 nv-icon{color:var(--color-rainbow-10-icon)}nv-badge span{font-size:var(--font-size-xs);line-height:var(--line-height-xs) !important}nv-badge nv-icon>svg.icon-xs{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge nv-icon>svg.icon-sm{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge nv-icon>svg.icon-md{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge nv-icon>svg.icon-lg{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge nv-icon>svg.icon-xl{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge .close{padding:0;line-height:0;border:none;background:none;cursor:pointer;color:inherit;display:inline-flex;align-items:center;aspect-ratio:1/1;border-radius:var(--radius-rounded-full)}";
10
+ const NvBadgeStyle0 = nvBadgeCss;
11
+
12
+ const NvBadge = class {
13
+ constructor(hostRef) {
14
+ index.registerInstance(this, hostRef);
15
+ this.closeClicked = index.createEvent(this, "closeClicked");
16
+ this.hiddenChanged = index.createEvent(this, "hiddenChanged");
17
+ this.hiddenChangedComplete = index.createEvent(this, "hiddenChangedComplete");
18
+ /****************************************************************************/
19
+ //#region DEPRECATED
20
+ /**
21
+ * Whether the badge is dismissible.
22
+ * @deprecated use dismissible instead.
23
+ */
24
+ this.dismissal = false;
25
+ //#endregion DEPRECATED
26
+ /****************************************************************************/
27
+ //#region PROPERTIES
28
+ /**
29
+ * The color of the badge. Use a string between 1 to 10
30
+ */
31
+ this.color = '1';
32
+ /**
33
+ * Main content of the badge.
34
+ */
35
+ this.label = null;
36
+ /**
37
+ * The lead icon of the badge.
38
+ */
39
+ this.leadIcon = null;
40
+ /**
41
+ * Whether the badge is dismissible.
42
+ */
43
+ this.dismissible = false;
44
+ /**
45
+ * Controls the visibility of the badge. Will animate with fade and collapse.
46
+ */
47
+ this.hidden = false; // eslint-disable-line @stencil-community/reserved-member-names
48
+ this._isHidden = this.hidden;
49
+ /**
50
+ * When true, the alert does not automatically close upon dismissing.
51
+ * Useful for externally controlled component behavior.
52
+ */
53
+ this.preventAutoClose = false;
54
+ //#endregion LIFECYCLE
55
+ /****************************************************************************/
56
+ //#region METHODS
57
+ /**
58
+ * Handles the close button click.
59
+ * @param {MouseEvent} originalEvent - The original event.
60
+ */
61
+ this.handleClose = (originalEvent) => {
62
+ if (!this.preventAutoClose) {
63
+ this.hidden = true;
64
+ }
65
+ this.closeClicked.emit(originalEvent);
66
+ };
67
+ }
68
+ //#endregion EVENTS
69
+ /****************************************************************************/
70
+ //#region WATCHERS
71
+ /**
72
+ * Handles the dismissal prop change.
73
+ * @param {boolean} dismissal - The new dismissal value.
74
+ */
75
+ handleDismissalChange(dismissal) {
76
+ this.dismissible = dismissal;
77
+ }
78
+ /**
79
+ * Handles the icon prop change.
80
+ * @param {string} icon - The new icon value.
81
+ */
82
+ handleIconChange(icon) {
83
+ this.leadIcon = icon;
84
+ }
85
+ /**
86
+ * Handles the hidden prop change.
87
+ * @param {boolean} hidden - The new hidden value.
88
+ */
89
+ async handleHiddenChange(hidden) {
90
+ this.hiddenChanged.emit(hidden);
91
+ if (this._isHidden === true)
92
+ this._isHidden = hidden;
93
+ const { fadeIn, fadeOut } = fade_animation2a077983.useFade(this.ref, { duration: 150 });
94
+ const { collapse, expand } = timeline_animation1b88f052.useCollapse(this.ref, { duration: 150 });
95
+ if (hidden === true)
96
+ await timeline_animation1b88f052.timeline(fadeOut, collapse).start();
97
+ if (hidden === false)
98
+ await timeline_animation1b88f052.timeline(expand, fadeIn).start();
99
+ this.hiddenChangedComplete.emit(hidden);
100
+ if (this._isHidden === false)
101
+ this._isHidden = hidden;
102
+ }
103
+ //#endregion WATCHERS
104
+ /****************************************************************************/
105
+ //#region LIFECYCLE
106
+ /**
107
+ * Component will load.
108
+ */
109
+ componentWillLoad() {
110
+ if (this.dismissal) {
111
+ this.dismissible = this.dismissal;
112
+ }
113
+ if (this.icon != null && this.icon != '') {
114
+ this.leadIcon = this.icon;
115
+ }
116
+ if (this.hidden) {
117
+ const { setCollapsed } = timeline_animation1b88f052.useCollapse(this.ref);
118
+ const { setFadeOut } = fade_animation2a077983.useFade(this.ref);
119
+ setCollapsed();
120
+ setFadeOut();
121
+ }
122
+ }
123
+ //#endregion METHODS
124
+ /****************************************************************************/
125
+ //#region RENDER
126
+ render() {
127
+ return (index.h(index.Host, { key: '25a36133db083b5a02ade58a84650cc2d9f6e412', class: clsx297c1ffe.clsx(`badge-${this.color}`, {
128
+ 'has-close': this.dismissible,
129
+ 'with-gap': this.dismissible || this.label,
130
+ 'visually-hidden': this._isHidden,
131
+ }) }, index.h("slot", { key: 'ca3afa597464e0266142aaf555552b1cc15335c6', name: "leading-icon" }, this.leadIcon && (index.h("nv-icon", { key: 'f85f55a086d0092057d498c01ec8d2e09e94a12d', slot: "leading-icon", name: this.leadIcon, size: "sm" }))), this.label && index.h("span", { key: '7c2f5845789319ba3d7035aceccedab671d21f70' }, this.label), this.dismissible && (index.h("button", { key: 'aca006f50e839c83aa7fef766f4e45b6148c0c51', onClick: this.handleClose, class: "close", type: "button" }, index.h("nv-icon", { key: '0ad3c5fb85ee81bb820480612eac7b2e5e0a642a', name: "x", size: "sm" })))));
132
+ }
133
+ get ref() { return index.getElement(this); }
134
+ static get watchers() { return {
135
+ "dismissal": ["handleDismissalChange"],
136
+ "icon": ["handleIconChange"],
137
+ "hidden": ["handleHiddenChange"]
138
+ }; }
139
+ };
140
+ NvBadge.style = NvBadgeStyle0;
141
+
142
+ const nvFielddropdownitemcheckCss = "nv-fielddropdownitemcheck{cursor:pointer;display:flex;padding:var(--list-dropdown-item-padding-y) var(--list-dropdown-item-padding-x);border-radius:var(--list-dropdown-item-radius)}nv-fielddropdownitemcheck slot-fb,nv-fielddropdownitemcheck span{all:unset}nv-fielddropdownitemcheck:hover{background-color:var(--components-list-dropdown-item-background-hover)}";
143
+ const NvFielddropdownitemcheckStyle0 = nvFielddropdownitemcheckCss;
144
+
145
+ const NvFielddropdownitemcheck = class {
146
+ constructor(hostRef) {
147
+ index.registerInstance(this, hostRef);
148
+ this.itemChecked = index.createEvent(this, "itemChecked");
149
+ /****************************************************************************/
150
+ //#region PROPERTIES
151
+ /**
152
+ * Indicates whether the checkbox is selected.
153
+ */
154
+ this.checked = false;
155
+ /**
156
+ * Disables the item, preventing any user interaction.
157
+ */
158
+ this.disabled = false;
159
+ /**
160
+ * when the child <nv-fieldcheckbox> change its `checked` state,
161
+ * update `this.checked` and emit `itemChecked`.
162
+ * @param {CustomEvent<boolean>} event - The event emitted by the <nv-fieldcheckbox> component.
163
+ */
164
+ this.onFieldcheckboxChanged = (event) => {
165
+ if (this.disabled)
166
+ return;
167
+ // NvFieldcheckbox has emitted checkedChanged
168
+ this.checked = event.detail; // get the new state
169
+ this.itemChecked.emit({
170
+ value: this.value,
171
+ checked: this.checked,
172
+ group: this.group,
173
+ });
174
+ };
175
+ /** Make sure the checkbox is checked when clicked anywhere in the item. */
176
+ this.handleClick = () => {
177
+ if (this.disabled)
178
+ return;
179
+ if (this.el.querySelector('input').checked) {
180
+ this.checked = false;
181
+ }
182
+ else {
183
+ this.checked = true;
184
+ }
185
+ };
186
+ }
187
+ render() {
188
+ return (index.h(index.Host, { key: '7b292a5cf03a4b45090535f86dde4cec73a690dc', onClick: this.handleClick }, index.h("nv-fieldcheckbox", { key: '928fa9396e77a2f1e3beb8b48757c67f73bb9715', checked: this.checked, name: this.label || this.value, label: this.label || this.value, "label-placement": "after", description: this.description, disabled: this.disabled, tabindex: "-1", role: "option", onCheckedChanged: this.onFieldcheckboxChanged })));
189
+ }
190
+ get el() { return index.getElement(this); }
191
+ };
192
+ NvFielddropdownitemcheck.style = NvFielddropdownitemcheckStyle0;
193
+
194
+ exports.nv_badge = NvBadge;
195
+ exports.nv_fielddropdownitemcheck = NvFielddropdownitemcheck;
@@ -0,0 +1,71 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-C8UfzrMI.js');
4
+ require('react');
5
+
6
+ const classes = {
7
+ 'w-full': 'w-full',
8
+ 'wFull': 'w-full',
9
+ 'is-active': 'is-active',
10
+ 'is-selected': 'is-selected',
11
+ };
12
+ const NvBaseComponent = class {
13
+ constructor(hostRef) {
14
+ index.registerInstance(this, hostRef);
15
+ }
16
+ /****************************************************************************/
17
+ //#region LIFECYCLE
18
+ componentWillLoad() {
19
+ this.applyClassesOnInitialRender();
20
+ }
21
+ componentDidLoad() {
22
+ this.mutationObserver = new MutationObserver(mutations => {
23
+ mutations.forEach(mutation => {
24
+ if (mutation.type === 'attributes') {
25
+ const target = mutation.target;
26
+ Object.keys(classes).forEach(attributeName => {
27
+ if (target.hasAttribute(attributeName)) {
28
+ target.classList.add(classes[attributeName]);
29
+ }
30
+ else {
31
+ target.classList.remove(classes[attributeName]);
32
+ }
33
+ });
34
+ }
35
+ });
36
+ });
37
+ this.observeElements();
38
+ }
39
+ disconnectedCallback() {
40
+ if (this.mutationObserver) {
41
+ this.mutationObserver.disconnect();
42
+ }
43
+ }
44
+ //#endregion LIFECYCLE
45
+ /****************************************************************************/
46
+ //#region METHODS
47
+ applyClassesOnInitialRender() {
48
+ Object.keys(classes).forEach(attributeName => {
49
+ const elements = this.el.querySelectorAll(`[${attributeName}]`);
50
+ elements.forEach(element => {
51
+ element.classList.add(classes[attributeName]);
52
+ });
53
+ });
54
+ }
55
+ observeElements() {
56
+ this.mutationObserver.observe(this.el, {
57
+ attributes: true,
58
+ attributeFilter: Object.keys(classes),
59
+ subtree: true,
60
+ });
61
+ }
62
+ //#endregion METHODS
63
+ /****************************************************************************/
64
+ //#region RENDER
65
+ render() {
66
+ return (index.h(index.Host, { key: 'ee2869bb42012e8c6b185e412503b14482f58af0', style: { display: 'block' } }, index.h("slot", { key: '2d89c30073a159339419bbec3f323abdcbf312cf' })));
67
+ }
68
+ get el() { return index.getElement(this); }
69
+ };
70
+
71
+ exports.nv_base = NvBaseComponent;
@@ -0,0 +1,71 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-CinzsZ8D.js');
4
+ require('react');
5
+
6
+ const classes = {
7
+ 'w-full': 'w-full',
8
+ 'wFull': 'w-full',
9
+ 'is-active': 'is-active',
10
+ 'is-selected': 'is-selected',
11
+ };
12
+ const NvBaseComponent = class {
13
+ constructor(hostRef) {
14
+ index.registerInstance(this, hostRef);
15
+ }
16
+ /****************************************************************************/
17
+ //#region LIFECYCLE
18
+ componentWillLoad() {
19
+ this.applyClassesOnInitialRender();
20
+ }
21
+ componentDidLoad() {
22
+ this.mutationObserver = new MutationObserver(mutations => {
23
+ mutations.forEach(mutation => {
24
+ if (mutation.type === 'attributes') {
25
+ const target = mutation.target;
26
+ Object.keys(classes).forEach(attributeName => {
27
+ if (target.hasAttribute(attributeName)) {
28
+ target.classList.add(classes[attributeName]);
29
+ }
30
+ else {
31
+ target.classList.remove(classes[attributeName]);
32
+ }
33
+ });
34
+ }
35
+ });
36
+ });
37
+ this.observeElements();
38
+ }
39
+ disconnectedCallback() {
40
+ if (this.mutationObserver) {
41
+ this.mutationObserver.disconnect();
42
+ }
43
+ }
44
+ //#endregion LIFECYCLE
45
+ /****************************************************************************/
46
+ //#region METHODS
47
+ applyClassesOnInitialRender() {
48
+ Object.keys(classes).forEach(attributeName => {
49
+ const elements = this.el.querySelectorAll(`[${attributeName}]`);
50
+ elements.forEach(element => {
51
+ element.classList.add(classes[attributeName]);
52
+ });
53
+ });
54
+ }
55
+ observeElements() {
56
+ this.mutationObserver.observe(this.el, {
57
+ attributes: true,
58
+ attributeFilter: Object.keys(classes),
59
+ subtree: true,
60
+ });
61
+ }
62
+ //#endregion METHODS
63
+ /****************************************************************************/
64
+ //#region RENDER
65
+ render() {
66
+ return (index.h(index.Host, { key: '81da4e7fd653192079ab22a607d1f525b504f3e4', style: { display: 'block' } }, index.h("slot", { key: 'e766e4b073b16d367c473b02c94448cf835a4921' })));
67
+ }
68
+ get el() { return index.getElement(this); }
69
+ };
70
+
71
+ exports.nv_base = NvBaseComponent;
@@ -0,0 +1,45 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-CinzsZ8D.js');
4
+ var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
5
+ require('react');
6
+
7
+ const nvBreadcrumbCss = "nv-breadcrumb{display:flex;align-items:center;color:var(--components-breadcrumb-text);font-size:var(--font-size-sm);font-style:normal;font-weight:500;line-height:var(--line-height-sm)}nv-breadcrumb ul{display:flex;flex-direction:column;gap:var(--spacing-1-5);padding:var(--spacing-1)}nv-breadcrumb ul a,nv-breadcrumb ul button{display:inline-flex;align-self:center;color:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;text-decoration:none}nv-breadcrumb ul a:focus,nv-breadcrumb ul a:focus-within,nv-breadcrumb ul button:focus,nv-breadcrumb ul button:focus-within{outline:none}nv-breadcrumb ul a:focus-visible,nv-breadcrumb ul a:has(:focus-visible),nv-breadcrumb ul button:focus-visible,nv-breadcrumb ul button:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 0.5) solid var(--components-breadcrumb-text-hover);outline-offset:calc(var(--focus-outline-offset) * 0.3)}nv-breadcrumb ul a:hover,nv-breadcrumb ul button:hover{text-decoration:underline;color:var(--components-breadcrumb-text-hover)}nv-breadcrumb>a,nv-breadcrumb>button{display:inline-flex;align-self:center;color:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;text-decoration:none}nv-breadcrumb>a:focus,nv-breadcrumb>a:focus-within,nv-breadcrumb>button:focus,nv-breadcrumb>button:focus-within{outline:none}nv-breadcrumb>a:focus-visible,nv-breadcrumb>a:has(:focus-visible),nv-breadcrumb>button:focus-visible,nv-breadcrumb>button:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 0.5) solid var(--components-breadcrumb-text-hover);outline-offset:calc(var(--focus-outline-offset) * 0.3)}nv-breadcrumb>a:hover,nv-breadcrumb>button:hover{text-decoration:underline;color:var(--components-breadcrumb-text-hover)}nv-breadcrumb span[data-scope=separator]{display:inline-flex;padding-left:var(--breadcrumb-padding-y)}";
8
+ const NvBreadcrumbStyle0 = nvBreadcrumbCss;
9
+
10
+ const NvBreadcrumb = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ /****************************************************************************/
14
+ //#region PROPERTIES
15
+ /**
16
+ * The type of the breadcrumb. Use 'collapsed' to house multiple breadcrumbs
17
+ * in a dropdown. Use default for a single item. When passing multiple items
18
+ * as collapsed, make sure to wrap you links in list tags
19
+ */
20
+ this.type = 'default';
21
+ }
22
+ //#endregion PROPERTIES
23
+ /****************************************************************************/
24
+ //#region LIFECYCLE
25
+ componentDidLoad() {
26
+ // Force a re-render to pass the popoverTrigger ref to the popovers
27
+ if (this.type === 'collapsed')
28
+ index.forceUpdate(this);
29
+ }
30
+ componentWillLoad() {
31
+ if (this.type === 'default' && this.tooltip) {
32
+ this.popoverTrigger = Array.from(this.el.children).find(child => child.getAttribute('slot') === null);
33
+ }
34
+ }
35
+ //#endregion LIFECYCLE
36
+ /****************************************************************************/
37
+ //#region RENDER
38
+ render() {
39
+ return (index.h(index.Host, { key: 'c985863a0ffdcd051abd712c357110cfa056c382', role: "listitem", "aria-current": this.current ? 'location' : undefined, class: clsx297c1ffe.clsx({ 'visually-hidden': this.current }) }, this.type === 'collapsed' ? (index.h("button", { ref: el => (this.popoverTrigger = el) }, "...")) : (index.h("slot", null)), this.tooltip && (index.h("nv-tooltip", { key: '4f7ad5175285ea442cd42581e292d2d430eb8770', message: this.tooltip, triggerElement: this.popoverTrigger, placement: "top" })), this.type === 'collapsed' && (index.h("nv-popover", { key: '29aba9e64f0d1785852dc4b830959dcbbd7dfc8b', triggerMode: "click", groupName: "breadcrumbs", triggerElement: this.popoverTrigger }, index.h("ul", { key: '0fde9dac023e6a77cb1524cbfcdf58d11e5a21f3', slot: "content" }, index.h("slot", { key: 'c263990647dc304a37971168669ced00bf46c588' })))), index.h("span", { key: 'f9f96fb13c67e4d3844007342c931ccd690ca7f5', "data-scope": "separator" }, "/")));
40
+ }
41
+ get el() { return index.getElement(this); }
42
+ };
43
+ NvBreadcrumb.style = NvBreadcrumbStyle0;
44
+
45
+ exports.nv_breadcrumb = NvBreadcrumb;
@@ -0,0 +1,45 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-C8UfzrMI.js');
4
+ var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
5
+ require('react');
6
+
7
+ const nvBreadcrumbCss = "nv-breadcrumb{display:flex;align-items:center;color:var(--components-breadcrumb-text);font-size:var(--font-size-sm);font-style:normal;font-weight:500;line-height:var(--line-height-sm)}nv-breadcrumb ul{display:flex;flex-direction:column;gap:var(--spacing-1-5);padding:var(--spacing-1)}nv-breadcrumb ul a,nv-breadcrumb ul button{display:inline-flex;align-self:center;color:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;text-decoration:none}nv-breadcrumb ul a:focus,nv-breadcrumb ul a:focus-within,nv-breadcrumb ul button:focus,nv-breadcrumb ul button:focus-within{outline:none}nv-breadcrumb ul a:focus-visible,nv-breadcrumb ul a:has(:focus-visible),nv-breadcrumb ul button:focus-visible,nv-breadcrumb ul button:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 0.5) solid var(--components-breadcrumb-text-hover);outline-offset:calc(var(--focus-outline-offset) * 0.3)}nv-breadcrumb ul a:hover,nv-breadcrumb ul button:hover{text-decoration:underline;color:var(--components-breadcrumb-text-hover)}nv-breadcrumb>a,nv-breadcrumb>button{display:inline-flex;align-self:center;color:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;text-decoration:none}nv-breadcrumb>a:focus,nv-breadcrumb>a:focus-within,nv-breadcrumb>button:focus,nv-breadcrumb>button:focus-within{outline:none}nv-breadcrumb>a:focus-visible,nv-breadcrumb>a:has(:focus-visible),nv-breadcrumb>button:focus-visible,nv-breadcrumb>button:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 0.5) solid var(--components-breadcrumb-text-hover);outline-offset:calc(var(--focus-outline-offset) * 0.3)}nv-breadcrumb>a:hover,nv-breadcrumb>button:hover{text-decoration:underline;color:var(--components-breadcrumb-text-hover)}nv-breadcrumb span[data-scope=separator]{display:inline-flex;padding-left:var(--breadcrumb-padding-y)}";
8
+ const NvBreadcrumbStyle0 = nvBreadcrumbCss;
9
+
10
+ const NvBreadcrumb = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ /****************************************************************************/
14
+ //#region PROPERTIES
15
+ /**
16
+ * The type of the breadcrumb. Use 'collapsed' to house multiple breadcrumbs
17
+ * in a dropdown. Use default for a single item. When passing multiple items
18
+ * as collapsed, make sure to wrap you links in list tags
19
+ */
20
+ this.type = 'default';
21
+ }
22
+ //#endregion PROPERTIES
23
+ /****************************************************************************/
24
+ //#region LIFECYCLE
25
+ componentDidLoad() {
26
+ // Force a re-render to pass the popoverTrigger ref to the popovers
27
+ if (this.type === 'collapsed')
28
+ index.forceUpdate(this);
29
+ }
30
+ componentWillLoad() {
31
+ if (this.type === 'default' && this.tooltip) {
32
+ this.popoverTrigger = Array.from(this.el.children).find(child => child.getAttribute('slot') === null);
33
+ }
34
+ }
35
+ //#endregion LIFECYCLE
36
+ /****************************************************************************/
37
+ //#region RENDER
38
+ render() {
39
+ return (index.h(index.Host, { key: '88cc0ffe7aee64066946b3f2579d0ace70a56339', role: "listitem", "aria-current": this.current ? 'location' : undefined, class: clsx297c1ffe.clsx({ 'visually-hidden': this.current }) }, this.type === 'collapsed' ? (index.h("button", { ref: el => (this.popoverTrigger = el) }, "...")) : (index.h("slot", null)), this.tooltip && (index.h("nv-tooltip", { key: '1e1bb755b7a9466c5a174e57b562b718d7f2a78a', message: this.tooltip, triggerElement: this.popoverTrigger, placement: "top" })), this.type === 'collapsed' && (index.h("nv-popover", { key: '91b3238143defb7b5fd71b14bb31edb8093778d2', triggerMode: "click", groupName: "breadcrumbs", triggerElement: this.popoverTrigger }, index.h("ul", { key: '4c1851c8988b7eb1f607e422ceac1dc6b04022c5', slot: "content" }, index.h("slot", { key: '11213bce3ff14309b0be7336f0022411a2e6721d' })))), index.h("span", { key: '3b97cd9edbb33196c85a29afbaf5b2ac647b0912', "data-scope": "separator" }, "/")));
40
+ }
41
+ get el() { return index.getElement(this); }
42
+ };
43
+ NvBreadcrumb.style = NvBreadcrumbStyle0;
44
+
45
+ exports.nv_breadcrumb = NvBreadcrumb;