@nova-design-system/nova-react 3.15.0 → 3.17.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/generated/components.server.js +826 -0
- package/dist/cjs/{index-BK1_MpRZ.js → index-B0fvq6nd.js} +4818 -1376
- package/dist/cjs/index.js +3 -2
- package/dist/cjs/{nv-accordion-item.entry-BPaDkIFa.js → nv-accordion-item.entry-DSXSMuOt.js} +2 -2
- package/dist/cjs/{nv-accordion.entry-BaHER2iL.js → nv-accordion.entry-D2GTCEoF.js} +6 -6
- package/dist/cjs/{nv-alert.entry-Hv-y3Bwl.js → nv-alert.entry-CxrdJWzE.js} +2 -2
- package/dist/cjs/nv-avatar.entry-Boe2Bp39.js +68 -0
- package/dist/cjs/{nv-badge_2.entry-CwlWa72m.js → nv-badge_2.entry-Cvu8cWAm.js} +1 -1
- package/dist/cjs/{nv-breadcrumb.entry-BvHgDgxV.js → nv-breadcrumb.entry-IBd49U13.js} +2 -2
- package/dist/cjs/{nv-breadcrumbs.entry-BdptRKYA.js → nv-breadcrumbs.entry-CxDCe3pi.js} +1 -1
- package/dist/cjs/nv-button.entry-veszqyTF.js +159 -0
- package/dist/cjs/{nv-buttongroup.entry-Bh0f3bAn.js → nv-buttongroup.entry-BoqH0Kje.js} +1 -1
- package/dist/cjs/{nv-calendar.entry-BZLITXEC.js → nv-calendar.entry-D-Wl56-6.js} +1 -1
- package/dist/cjs/{nv-col.entry-I3bCSLB5.js → nv-col.entry-BhKZwFpL.js} +1 -1
- package/dist/cjs/{nv-datagrid.entry-BzIkgOV6.js → nv-datagrid.entry-DnMZbymp.js} +177 -10
- package/dist/cjs/{nv-datagridcolumn.entry-BuFhEECG.js → nv-datagridcolumn.entry-U38uoM6D.js} +1 -1
- package/dist/cjs/{nv-dialog.entry-DIbIIXo2.js → nv-dialog.entry-BF4VplVi.js} +32 -29
- package/dist/cjs/{nv-dialogfooter_2.entry-Thzk1kVd.js → nv-dialogfooter_2.entry-TqO3Mryg.js} +2 -2
- package/dist/cjs/{nv-fieldcheckbox.entry-mkas423y.js → nv-fieldcheckbox.entry-C_rJ7Jrf.js} +2 -2
- package/dist/cjs/{nv-fielddate.entry-Cek70TQM.js → nv-fielddate.entry-DZdztKCP.js} +51 -26
- package/dist/cjs/{nv-fielddaterange.entry-C3BYAnVq.js → nv-fielddaterange.entry-CMxpi6X9.js} +68 -42
- package/dist/cjs/{nv-fielddropdown.entry-Djz5-R1T.js → nv-fielddropdown.entry-T-qNo0gM.js} +33 -7
- package/dist/cjs/{nv-fielddropdownitem.entry-B2z13jEI.js → nv-fielddropdownitem.entry-BfIqaxW3.js} +1 -1
- package/dist/cjs/{nv-fieldmultiselect.entry-uJ9i2gtz.js → nv-fieldmultiselect.entry-rtKSNZ5F.js} +187 -156
- package/dist/cjs/{nv-fieldnumber.entry-zpWCDG_-.js → nv-fieldnumber.entry-BD-xCdb5.js} +2 -2
- package/dist/cjs/{nv-fieldpassword.entry-C835HE_i.js → nv-fieldpassword.entry-Dmt91T4y.js} +2 -2
- package/dist/cjs/{nv-fieldradio.entry-CzLMbo4W.js → nv-fieldradio.entry-CAoRufTW.js} +2 -2
- package/dist/cjs/{nv-fieldselect.entry-BzcYzmqe.js → nv-fieldselect.entry-2YLbIpBO.js} +2 -2
- package/dist/cjs/{nv-fieldslider.entry-B5vyrQZw.js → nv-fieldslider.entry-D6g_MrUd.js} +2 -2
- package/dist/cjs/{nv-fieldtext.entry-DnPQxVqp.js → nv-fieldtext.entry-D-SS4OPR.js} +2 -2
- package/dist/cjs/{nv-fieldtextarea.entry-n2MJK2Jg.js → nv-fieldtextarea.entry-L0XDrdHL.js} +2 -2
- package/dist/cjs/{nv-fieldtime.entry-DChhvqKi.js → nv-fieldtime.entry-Hw5VOmpK.js} +25 -12
- package/dist/cjs/nv-icon.entry-B7mLhu0c.js +80 -0
- package/dist/cjs/{nv-iconbutton_2.entry-u0l16LeW.js → nv-iconbutton_2.entry-iinBJBb6.js} +2 -2
- package/dist/cjs/{nv-menu.entry-OYVh6iMu.js → nv-menu.entry-BTW4XauN.js} +24 -9
- package/dist/cjs/{nv-menuitem.entry-Dj6N1n9X.js → nv-menuitem.entry-CIT2_Fbe.js} +1 -1
- package/dist/cjs/{nv-notification.entry-D1dVSEYZ.js → nv-notification.entry-CVyzCsSh.js} +2 -2
- package/dist/cjs/{nv-notificationcontainer.entry-Bp2NR_fe.js → nv-notificationcontainer.entry-CqoyGWAa.js} +1 -1
- package/dist/cjs/{nv-popover.entry-Bf2AEn9B.js → nv-popover.entry-Bf5ihsdq.js} +67 -61
- package/dist/cjs/{nv-row.entry-Bi9eoQEh.js → nv-row.entry-Chp5QzjD.js} +1 -1
- package/dist/cjs/nv-split.entry-DSB_HMU-.js +337 -0
- package/dist/cjs/{nv-stack.entry-Dd680LIT.js → nv-stack.entry-D6L6830W.js} +2 -2
- package/dist/cjs/nv-table.entry-B-UuWaI5.js +245 -0
- package/dist/cjs/{nv-toggle.entry-gBokGnGe.js → nv-toggle.entry-AG7sAORg.js} +2 -2
- package/dist/cjs/{nv-togglebutton.entry-ZpltTrQe.js → nv-togglebutton.entry-Btlxm5gO.js} +1 -1
- package/dist/cjs/{nv-togglebuttongroup.entry-Bu0C6Iq3.js → nv-togglebuttongroup.entry-CM3nWiUU.js} +2 -2
- package/dist/cjs/{nv-tooltip.entry-DR4aj5qF.js → nv-tooltip.entry-m4AYXhW3.js} +1 -1
- package/dist/components/NvDatatable.js +45 -0
- package/dist/generated/components.js +10 -10
- package/dist/generated/components.server.js +10 -16
- package/dist/index.js +1 -0
- package/dist/types/components/NvDatatable.d.ts +25 -0
- package/dist/types/generated/components.d.ts +7 -12
- package/dist/types/generated/components.server.d.ts +7 -12
- package/dist/types/index.d.ts +1 -0
- package/package.json +14 -6
- package/dist/cjs/dom.utils-ac71e0ef-CmIwRr6O.js +0 -168
- package/dist/cjs/nv-avatar.entry-BTmGyeGF.js +0 -68
- package/dist/cjs/nv-button.entry-6O39hBHY.js +0 -165
- package/dist/cjs/nv-icon.entry-agdqxUMS.js +0 -80
- package/dist/cjs/nv-table.entry-wxn9GDDo.js +0 -339
- package/dist/cjs/nv-tablecolumn.entry-Bo0z0XyB.js +0 -19
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-BK1_MpRZ.js');
|
|
4
|
-
var constants69bafca2 = require('./constants-69bafca2-DpB_ghPF.js');
|
|
5
|
-
require('react');
|
|
6
|
-
require('react-dom');
|
|
7
|
-
|
|
8
|
-
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}";
|
|
9
|
-
const NvButtonStyle0 = nvButtonCss;
|
|
10
|
-
|
|
11
|
-
const NvButton = class {
|
|
12
|
-
constructor(hostRef) {
|
|
13
|
-
index.registerInstance(this, hostRef);
|
|
14
|
-
if (hostRef.$hostElement$["s-ei"]) {
|
|
15
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
|
19
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
20
|
-
}
|
|
21
|
-
/****************************************************************************/
|
|
22
|
-
//#region PROPERTIES
|
|
23
|
-
/**
|
|
24
|
-
* Determines how large or small the button appears, allowing for
|
|
25
|
-
* customization of the button's dimensions to fit different design
|
|
26
|
-
* specifications and user needs.
|
|
27
|
-
*/
|
|
28
|
-
this.size = 'md';
|
|
29
|
-
/**
|
|
30
|
-
* Adjusts the button's emphasis to make it more or less visually prominent
|
|
31
|
-
* to users. Use this to draw attention to important actions or reduce focus
|
|
32
|
-
* on less critical ones
|
|
33
|
-
*/
|
|
34
|
-
this.emphasis = 'high';
|
|
35
|
-
/**
|
|
36
|
-
* Use this prop to highlight the button when it represents the current page
|
|
37
|
-
* or active selection. This helps users understand their navigation context.
|
|
38
|
-
*/
|
|
39
|
-
this.active = false;
|
|
40
|
-
/**
|
|
41
|
-
* Applies styling that visually indicates the button represents a dangerous
|
|
42
|
-
* action.
|
|
43
|
-
*/
|
|
44
|
-
this.danger = false;
|
|
45
|
-
/**
|
|
46
|
-
* Set this to true to show a spinner on the button, letting users know that
|
|
47
|
-
* their action is being processed. It helps improve user experience by
|
|
48
|
-
* indicating ongoing activities.
|
|
49
|
-
*/
|
|
50
|
-
this.loading = false;
|
|
51
|
-
/**
|
|
52
|
-
* Disables the button, preventing user interaction.
|
|
53
|
-
*/
|
|
54
|
-
this.disabled = false;
|
|
55
|
-
/**
|
|
56
|
-
* Allows the button to stretch and fill the entire width of its container.
|
|
57
|
-
*/
|
|
58
|
-
this.fluid = false;
|
|
59
|
-
/**
|
|
60
|
-
* Sets the button type to control its function in forms. Use 'submit' to send
|
|
61
|
-
* form data, 'reset' to clear the form, or 'button' for a standard button
|
|
62
|
-
* that doesn't interact with form submission by default.
|
|
63
|
-
*/
|
|
64
|
-
this.type = 'button';
|
|
65
|
-
//#endregion PROPERTIES
|
|
66
|
-
/****************************************************************************/
|
|
67
|
-
//#region METHODS
|
|
68
|
-
/**
|
|
69
|
-
* Handles button click events, managing form actions and disabled states.
|
|
70
|
-
* Prevents default behavior when button is disabled or loading, and
|
|
71
|
-
* processes form submissions/resets when appropriate.
|
|
72
|
-
* @param {Event} event - The click event.
|
|
73
|
-
*/
|
|
74
|
-
this.handleButtonClick = (event) => {
|
|
75
|
-
var _a;
|
|
76
|
-
if (this.loading || this.disabled) {
|
|
77
|
-
event.preventDefault();
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
if (this.type !== constants69bafca2.ButtonType.Button &&
|
|
81
|
-
(this.form || ((_a = this.internals) === null || _a === void 0 ? void 0 : _a.form))) {
|
|
82
|
-
this.processFormAction();
|
|
83
|
-
}
|
|
84
|
-
else if (this.form && this.type === constants69bafca2.ButtonType.Button) {
|
|
85
|
-
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);
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
/**
|
|
89
|
-
* Processes form-related actions by finding the associated form element
|
|
90
|
-
* and triggering the appropriate action (submit/reset) based on button type.
|
|
91
|
-
* Falls back to ElementInternals form if no explicit form ID is provided.
|
|
92
|
-
*/
|
|
93
|
-
this.processFormAction = () => {
|
|
94
|
-
var _a, _b;
|
|
95
|
-
const formElement = this.form
|
|
96
|
-
? document.getElementById(this.form)
|
|
97
|
-
: (_a = this.internals) === null || _a === void 0 ? void 0 : _a.form;
|
|
98
|
-
if (!formElement) {
|
|
99
|
-
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);
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
switch (this.type) {
|
|
103
|
-
case constants69bafca2.ButtonType.Submit:
|
|
104
|
-
formElement.requestSubmit();
|
|
105
|
-
break;
|
|
106
|
-
case constants69bafca2.ButtonType.Reset:
|
|
107
|
-
formElement.reset();
|
|
108
|
-
break;
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
//#endregion METHODS
|
|
113
|
-
/****************************************************************************/
|
|
114
|
-
//#region EVENTS
|
|
115
|
-
handleKeyDown(event) {
|
|
116
|
-
if (event.key === 'Enter' || event.key === ' ') {
|
|
117
|
-
event.preventDefault();
|
|
118
|
-
this.el.click();
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
handleTouchStart(event) {
|
|
122
|
-
if (event.touches.length > 1)
|
|
123
|
-
return;
|
|
124
|
-
event.preventDefault();
|
|
125
|
-
this.el.click();
|
|
126
|
-
}
|
|
127
|
-
//#endregion EVENTS
|
|
128
|
-
/****************************************************************************/
|
|
129
|
-
//#region WATCHERS
|
|
130
|
-
handleLoadingChange(loading) {
|
|
131
|
-
this.loading = loading;
|
|
132
|
-
this.disabled = loading;
|
|
133
|
-
}
|
|
134
|
-
handleDisabledChange(disabled) {
|
|
135
|
-
if (this.loading) {
|
|
136
|
-
this.disabled = this.loading;
|
|
137
|
-
}
|
|
138
|
-
else {
|
|
139
|
-
this.disabled = disabled;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
//#endregion WATCHERS
|
|
143
|
-
/****************************************************************************/
|
|
144
|
-
//#region LIFECYCLE
|
|
145
|
-
componentWillLoad() {
|
|
146
|
-
if (this.loading) {
|
|
147
|
-
this.disabled = this.loading;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
//#endregion LIFECYCLE
|
|
151
|
-
/****************************************************************************/
|
|
152
|
-
//#region RENDER
|
|
153
|
-
render() {
|
|
154
|
-
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 === constants69bafca2.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" })));
|
|
155
|
-
}
|
|
156
|
-
static get formAssociated() { return true; }
|
|
157
|
-
get el() { return index.getElement(this); }
|
|
158
|
-
static get watchers() { return {
|
|
159
|
-
"loading": ["handleLoadingChange"],
|
|
160
|
-
"disabled": ["handleDisabledChange"]
|
|
161
|
-
}; }
|
|
162
|
-
};
|
|
163
|
-
NvButton.style = NvButtonStyle0;
|
|
164
|
-
|
|
165
|
-
exports.nv_button = NvButton;
|