@nova-design-system/nova-react 3.9.1 → 3.10.1-beta.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/{constants-4faa1fae-BzFAKCkR.js → constants-23aaef7b-Cj2b-su0.js} +12 -0
- package/dist/cjs/{index-BtjpbnUr.js → index-B-1F0q3j.js} +1458 -448
- package/dist/cjs/index.js +4 -1
- package/dist/cjs/{nv-accordion-item.entry-Dr_2iHhQ.js → nv-accordion-item.entry-BF6TIAqX.js} +2 -2
- package/dist/cjs/{nv-accordion.entry-CYVpcwuY.js → nv-accordion.entry-CaTzxCZe.js} +1 -1
- package/dist/cjs/{nv-alert.entry-C_H-R9wb.js → nv-alert.entry-EOVv8IiE.js} +8 -8
- package/dist/cjs/{nv-avatar.entry-BeSOqGvb.js → nv-avatar.entry-DyiNDtz4.js} +7 -7
- package/dist/cjs/nv-badge_2.entry-DTc3EkVi.js +212 -0
- package/dist/cjs/{nv-breadcrumb.entry-yQozUTFi.js → nv-breadcrumb.entry-DKmd0vLH.js} +2 -2
- package/dist/cjs/{nv-breadcrumbs.entry-Qar1fOI7.js → nv-breadcrumbs.entry-CQB0c_7Y.js} +1 -1
- package/dist/cjs/{nv-button.entry-M_c4r8PX.js → nv-button.entry-rPyTGZZw.js} +8 -8
- package/dist/cjs/nv-buttongroup.entry-BT9JC-IJ.js +195 -0
- package/dist/cjs/{nv-calendar.entry-DFE372aB.js → nv-calendar.entry-C4stLDAG.js} +120 -43
- package/dist/cjs/{nv-col.entry-Bi8pH33J.js → nv-col.entry-DY7HEDMv.js} +2 -2
- package/dist/cjs/{nv-datagrid.entry-B-blFDg-.js → nv-datagrid.entry-yzQVVpxg.js} +9 -9
- package/dist/cjs/{nv-datagridcolumn.entry-CAzB7NtB.js → nv-datagridcolumn.entry-AOVwen5Y.js} +2 -2
- package/dist/cjs/{nv-dialog.entry-Bdw3O22w.js → nv-dialog.entry-DztbR2hl.js} +3 -3
- package/dist/cjs/{nv-dialogfooter_2.entry-BTUrxVzn.js → nv-dialogfooter_2.entry-iPMNyDQF.js} +5 -5
- package/dist/cjs/{nv-fieldcheckbox.entry-DNzC8s-J.js → nv-fieldcheckbox.entry-WEzw8Y0l.js} +6 -6
- package/dist/cjs/{nv-fielddate.entry-BI8REINj.js → nv-fielddate.entry-B4B2QgCn.js} +7 -7
- package/dist/cjs/{nv-fielddaterange.entry-B7mtEV97.js → nv-fielddaterange.entry-BQ-J4HKx.js} +7 -7
- package/dist/cjs/{nv-fielddropdown.entry-Cz7yuHTj.js → nv-fielddropdown.entry-B2YBjdkI.js} +4 -4
- package/dist/cjs/{nv-fielddropdownitem.entry-CH_C4Dr-.js → nv-fielddropdownitem.entry-B0wCnSfT.js} +2 -2
- package/dist/cjs/{nv-fieldmultiselect.entry-BqEdEUR0.js → nv-fieldmultiselect.entry-DuPOvire.js} +433 -43
- package/dist/cjs/{nv-fieldnumber.entry-BhRb8v1L.js → nv-fieldnumber.entry-BJANMe4j.js} +4 -4
- package/dist/cjs/{nv-fieldpassword.entry-BL4T90zr.js → nv-fieldpassword.entry-DkkJHwkG.js} +4 -4
- package/dist/cjs/{nv-fieldradio.entry-D-x10Pri.js → nv-fieldradio.entry-8uDJz8PS.js} +5 -5
- package/dist/cjs/{nv-fieldselect.entry-B-kynHlw.js → nv-fieldselect.entry-DN6euwMc.js} +6 -6
- package/dist/cjs/{nv-fieldslider.entry-D6X0LJKJ.js → nv-fieldslider.entry-BI72B0_Z.js} +4 -4
- package/dist/cjs/{nv-fieldtext.entry-xR41AQcM.js → nv-fieldtext.entry-DzHqp5Lp.js} +4 -4
- package/dist/cjs/{nv-fieldtextarea.entry-4mqhSSHM.js → nv-fieldtextarea.entry-CFgoC_mT.js} +4 -4
- package/dist/cjs/{nv-fieldtime.entry-S3r7RYwN.js → nv-fieldtime.entry-nVAeh7Ot.js} +66 -66
- package/dist/cjs/{nv-icon.entry-C2t6pj-B.js → nv-icon.entry-C0-IQQji.js} +9 -9
- package/dist/cjs/{nv-iconbutton_2.entry-Cv1d6ktl.js → nv-iconbutton_2.entry-BnnDZjg4.js} +4 -4
- package/dist/cjs/{nv-menu.entry-J_Ytq1Kn.js → nv-menu.entry-BB2mjwHV.js} +2 -2
- package/dist/cjs/{nv-menuitem.entry-DpOO9tMo.js → nv-menuitem.entry-CgkJiqc_.js} +2 -2
- package/dist/cjs/{nv-popover.entry-BZJHJXSA.js → nv-popover.entry-_Iv8yq0t.js} +2 -2
- package/dist/cjs/{nv-row.entry-D4qBjtBv.js → nv-row.entry-BZ2prXQS.js} +2 -2
- package/dist/cjs/{nv-stack.entry-DOc6ZvMZ.js → nv-stack.entry-C69ZIFWU.js} +2 -2
- package/dist/cjs/{nv-table.entry-7-TxQSlH.js → nv-table.entry-CXqK-89M.js} +3 -3
- package/dist/cjs/{nv-tablecolumn.entry-Bd4xWDYD.js → nv-tablecolumn.entry-RMYxY100.js} +1 -1
- package/dist/cjs/{nv-toggle.entry-DJmXXavz.js → nv-toggle.entry-Bx7cG_fC.js} +4 -4
- package/dist/cjs/nv-togglebutton.entry-CeYlChll.js +55 -0
- package/dist/cjs/nv-togglebuttongroup.entry-ehe00MUL.js +169 -0
- package/dist/cjs/{nv-tooltip.entry-D9nl_ejz.js → nv-tooltip.entry-CCDVLdqi.js} +2 -2
- package/dist/generated/components.js +24 -0
- package/dist/generated/components.server.js +41 -4
- package/dist/types/generated/components.d.ts +16 -0
- package/dist/types/generated/components.server.d.ts +16 -0
- package/package.json +1 -1
- package/dist/cjs/nv-badge_2.entry-BGWUswPo.js +0 -206
|
@@ -7,6 +7,7 @@ import { NvBadge as NvBadgeElement } from "@nova-design-system/nova-webcomponent
|
|
|
7
7
|
import { NvBreadcrumb as NvBreadcrumbElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-breadcrumb.js";
|
|
8
8
|
import { NvBreadcrumbs as NvBreadcrumbsElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-breadcrumbs.js";
|
|
9
9
|
import { NvButton as NvButtonElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-button.js";
|
|
10
|
+
import { NvButtongroup as NvButtongroupElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-buttongroup.js";
|
|
10
11
|
import { NvCalendar as NvCalendarElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-calendar.js";
|
|
11
12
|
import { NvCol as NvColElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-col.js";
|
|
12
13
|
import { NvDatagrid as NvDatagridElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-datagrid.js";
|
|
@@ -40,6 +41,8 @@ import { NvStack as NvStackElement } from "@nova-design-system/nova-webcomponent
|
|
|
40
41
|
import { NvTable as NvTableElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-table.js";
|
|
41
42
|
import { NvTablecolumn as NvTablecolumnElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-tablecolumn.js";
|
|
42
43
|
import { NvToggle as NvToggleElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-toggle.js";
|
|
44
|
+
import { NvTogglebutton as NvTogglebuttonElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-togglebutton.js";
|
|
45
|
+
import { NvTogglebuttongroup as NvTogglebuttongroupElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-togglebuttongroup.js";
|
|
43
46
|
import { NvTooltip as NvTooltipElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-tooltip.js";
|
|
44
47
|
import type { EventName, StencilReactComponent } from '@stencil/react-output-target/runtime';
|
|
45
48
|
export type NvAccordionEvents = {
|
|
@@ -72,6 +75,8 @@ export type NvBreadcrumbsEvents = NonNullable<unknown>;
|
|
|
72
75
|
export declare const NvBreadcrumbs: StencilReactComponent<NvBreadcrumbsElement, NvBreadcrumbsEvents>;
|
|
73
76
|
export type NvButtonEvents = NonNullable<unknown>;
|
|
74
77
|
export declare const NvButton: StencilReactComponent<NvButtonElement, NvButtonEvents>;
|
|
78
|
+
export type NvButtongroupEvents = NonNullable<unknown>;
|
|
79
|
+
export declare const NvButtongroup: StencilReactComponent<NvButtongroupElement, NvButtongroupEvents>;
|
|
75
80
|
export type NvCalendarEvents = {
|
|
76
81
|
onSingleDateChange: EventName<CustomEvent<string>>;
|
|
77
82
|
onRangeDateChange: EventName<NvCalendarCustomEvent<HTMLNvCalendarElement['rangeValue']>>;
|
|
@@ -221,6 +226,17 @@ export type NvToggleEvents = {
|
|
|
221
226
|
onCheckedChanged: EventName<CustomEvent<boolean>>;
|
|
222
227
|
};
|
|
223
228
|
export declare const NvToggle: StencilReactComponent<NvToggleElement, NvToggleEvents>;
|
|
229
|
+
export type NvTogglebuttonEvents = {
|
|
230
|
+
onToggled: EventName<CustomEvent<{
|
|
231
|
+
value: string;
|
|
232
|
+
active: boolean;
|
|
233
|
+
}>>;
|
|
234
|
+
};
|
|
235
|
+
export declare const NvTogglebutton: StencilReactComponent<NvTogglebuttonElement, NvTogglebuttonEvents>;
|
|
236
|
+
export type NvTogglebuttongroupEvents = {
|
|
237
|
+
onValueChanged: EventName<CustomEvent<string[]>>;
|
|
238
|
+
};
|
|
239
|
+
export declare const NvTogglebuttongroup: StencilReactComponent<NvTogglebuttongroupElement, NvTogglebuttongroupEvents>;
|
|
224
240
|
export type NvTooltipEvents = {
|
|
225
241
|
onOpenChanged: EventName<CustomEvent<boolean>>;
|
|
226
242
|
};
|
|
@@ -7,6 +7,7 @@ import { NvBadge as NvBadgeElement } from "@nova-design-system/nova-webcomponent
|
|
|
7
7
|
import { NvBreadcrumb as NvBreadcrumbElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-breadcrumb.js";
|
|
8
8
|
import { NvBreadcrumbs as NvBreadcrumbsElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-breadcrumbs.js";
|
|
9
9
|
import { NvButton as NvButtonElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-button.js";
|
|
10
|
+
import { NvButtongroup as NvButtongroupElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-buttongroup.js";
|
|
10
11
|
import { NvCalendar as NvCalendarElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-calendar.js";
|
|
11
12
|
import { NvCol as NvColElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-col.js";
|
|
12
13
|
import { NvDatagrid as NvDatagridElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-datagrid.js";
|
|
@@ -40,6 +41,8 @@ import { NvStack as NvStackElement } from "@nova-design-system/nova-webcomponent
|
|
|
40
41
|
import { NvTable as NvTableElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-table.js";
|
|
41
42
|
import { NvTablecolumn as NvTablecolumnElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-tablecolumn.js";
|
|
42
43
|
import { NvToggle as NvToggleElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-toggle.js";
|
|
44
|
+
import { NvTogglebutton as NvTogglebuttonElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-togglebutton.js";
|
|
45
|
+
import { NvTogglebuttongroup as NvTogglebuttongroupElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-togglebuttongroup.js";
|
|
43
46
|
import { NvTooltip as NvTooltipElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-tooltip.js";
|
|
44
47
|
import type { EventName, StencilReactComponent } from '@stencil/react-output-target/runtime';
|
|
45
48
|
import { type SerializeShadowRootOptions } from '@stencil/react-output-target/ssr';
|
|
@@ -74,6 +77,8 @@ export type NvBreadcrumbsEvents = NonNullable<unknown>;
|
|
|
74
77
|
export declare const NvBreadcrumbs: StencilReactComponent<NvBreadcrumbsElement, NvBreadcrumbsEvents>;
|
|
75
78
|
export type NvButtonEvents = NonNullable<unknown>;
|
|
76
79
|
export declare const NvButton: StencilReactComponent<NvButtonElement, NvButtonEvents>;
|
|
80
|
+
export type NvButtongroupEvents = NonNullable<unknown>;
|
|
81
|
+
export declare const NvButtongroup: StencilReactComponent<NvButtongroupElement, NvButtongroupEvents>;
|
|
77
82
|
export type NvCalendarEvents = {
|
|
78
83
|
onSingleDateChange: EventName<CustomEvent<string>>;
|
|
79
84
|
onRangeDateChange: EventName<NvCalendarCustomEvent<HTMLNvCalendarElement['rangeValue']>>;
|
|
@@ -223,6 +228,17 @@ export type NvToggleEvents = {
|
|
|
223
228
|
onCheckedChanged: EventName<CustomEvent<boolean>>;
|
|
224
229
|
};
|
|
225
230
|
export declare const NvToggle: StencilReactComponent<NvToggleElement, NvToggleEvents>;
|
|
231
|
+
export type NvTogglebuttonEvents = {
|
|
232
|
+
onToggled: EventName<CustomEvent<{
|
|
233
|
+
value: string;
|
|
234
|
+
active: boolean;
|
|
235
|
+
}>>;
|
|
236
|
+
};
|
|
237
|
+
export declare const NvTogglebutton: StencilReactComponent<NvTogglebuttonElement, NvTogglebuttonEvents>;
|
|
238
|
+
export type NvTogglebuttongroupEvents = {
|
|
239
|
+
onValueChanged: EventName<CustomEvent<string[]>>;
|
|
240
|
+
};
|
|
241
|
+
export declare const NvTogglebuttongroup: StencilReactComponent<NvTogglebuttongroupElement, NvTogglebuttongroupEvents>;
|
|
226
242
|
export type NvTooltipEvents = {
|
|
227
243
|
onOpenChanged: EventName<CustomEvent<boolean>>;
|
|
228
244
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nova-design-system/nova-react",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.1-beta.0",
|
|
4
4
|
"description": "Nova is a design system created by Elia Group to empower creators to efficiently build solutions that people love to use.",
|
|
5
5
|
"author": "Elia Group",
|
|
6
6
|
"homepage": "https://nova.eliagroup.io",
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-BtjpbnUr.js');
|
|
4
|
-
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
5
|
-
var collapse_animation16e3af45 = require('./collapse.animation-16e3af45-CChx_tQJ.js');
|
|
6
|
-
var fade_animation71e8e34c = require('./fade.animation-71e8e34c-BAw_TYsB.js');
|
|
7
|
-
require('./stylefire.es-74da334a-y0piPjlz.js');
|
|
8
|
-
var timeline_animationAdf35ecb = require('./timeline.animation-adf35ecb-CE6Dsdxr.js');
|
|
9
|
-
require('react');
|
|
10
|
-
|
|
11
|
-
const nvBadgeCss = "nv-badge{padding:var(--badge-padding-y) var(--badge-padding-x);display:inline-flex !important;gap:var(--badge-gap-x);vertical-align:middle;align-items:center;border-radius:var(--radius-rounded-full);border-style:solid;border-width:0.5px;height:fit-content;width:fit-content}nv-badge.is-icon-only{padding:var(--badge-padding-y) var(--badge-padding-icon-only-x);gap:var(--badge-gap-icon-only-x)}nv-badge.with-gap{padding:var(--badge-padding-y) var(--badge-padding-x);display:inline-flex !important;gap:var(--badge-gap-x);vertical-align:middle;align-items:center;border-radius:var(--radius-rounded-full);border-style:solid;border-width:0.5px;height:fit-content;width:fit-content}nv-badge.with-gap.is-icon-only{padding:var(--badge-padding-y) var(--badge-padding-icon-only-x);gap:var(--badge-gap-icon-only-x)}nv-badge.visually-hidden{position:absolute;padding:0;border:0;overflow:hidden;white-space:nowrap;width:1px;height:1px;margin:-1px;clip:rect(0, 0, 0, 0)}nv-badge:not(.with-gap){padding:var(--badge-padding-y) var(--badge-padding-x);display:inline-flex !important;gap:var(--badge-gap-x);vertical-align:middle;align-items:center;border-radius:var(--radius-rounded-full);border-style:solid;border-width:0.5px;height:fit-content;width:fit-content}nv-badge:not(.with-gap).is-icon-only{padding:var(--badge-padding-y) var(--badge-padding-icon-only-x);gap:var(--badge-gap-icon-only-x)}nv-badge.badge-1{color:var(--color-rainbow-1-text);background-color:var(--color-rainbow-1-background);border-color:var(--color-rainbow-1-border)}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);border-color:var(--color-rainbow-2-border)}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);border-color:var(--color-rainbow-3-border)}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);border-color:var(--color-rainbow-4-border)}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);border-color:var(--color-rainbow-5-border)}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);border-color:var(--color-rainbow-6-border)}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);border-color:var(--color-rainbow-7-border)}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);border-color:var(--color-rainbow-8-border)}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);border-color:var(--color-rainbow-9-border)}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);border-color:var(--color-rainbow-10-border)}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.badge-error{color:var(--color-feedback-error-low-text);background-color:var(--color-feedback-error-low-background);border-color:var(--color-feedback-error-low-border)}nv-badge.badge-error .close:focus,nv-badge.badge-error .close:focus-within{outline:none}nv-badge.badge-error .close:focus-visible,nv-badge.badge-error .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-feedback-error-low-content, var(--color-feedback-error-low-text));outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-error nv-icon{color:var(--color-feedback-error-low-icon)}nv-badge.badge-information{color:var(--color-feedback-information-low-text);background-color:var(--color-feedback-information-low-background);border-color:var(--color-feedback-information-low-border)}nv-badge.badge-information .close:focus,nv-badge.badge-information .close:focus-within{outline:none}nv-badge.badge-information .close:focus-visible,nv-badge.badge-information .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-feedback-information-low-content, var(--color-feedback-information-low-text));outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-information nv-icon{color:var(--color-feedback-information-low-icon)}nv-badge.badge-neutral{color:var(--color-feedback-neutral-low-text);background-color:var(--color-feedback-neutral-low-background);border-color:var(--color-feedback-neutral-low-border)}nv-badge.badge-neutral .close:focus,nv-badge.badge-neutral .close:focus-within{outline:none}nv-badge.badge-neutral .close:focus-visible,nv-badge.badge-neutral .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-feedback-neutral-low-content, var(--color-feedback-neutral-low-text));outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-neutral nv-icon{color:var(--color-feedback-neutral-low-icon)}nv-badge.badge-success{color:var(--color-feedback-success-low-text);background-color:var(--color-feedback-success-low-background);border-color:var(--color-feedback-success-low-border)}nv-badge.badge-success .close:focus,nv-badge.badge-success .close:focus-within{outline:none}nv-badge.badge-success .close:focus-visible,nv-badge.badge-success .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-feedback-success-low-content, var(--color-feedback-success-low-text));outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-success nv-icon{color:var(--color-feedback-success-low-icon)}nv-badge.badge-warning{color:var(--color-feedback-warning-low-text);background-color:var(--color-feedback-warning-low-background);border-color:var(--color-feedback-warning-low-border)}nv-badge.badge-warning .close:focus,nv-badge.badge-warning .close:focus-within{outline:none}nv-badge.badge-warning .close:focus-visible,nv-badge.badge-warning .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-feedback-warning-low-content, var(--color-feedback-warning-low-text));outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-warning nv-icon{color:var(--color-feedback-warning-low-icon)}nv-badge.badge-amber{color:var(--color-rainbow-1-text);background-color:var(--color-rainbow-1-background);border-color:var(--color-rainbow-1-border)}nv-badge.badge-amber .close:focus,nv-badge.badge-amber .close:focus-within{outline:none}nv-badge.badge-amber .close:focus-visible,nv-badge.badge-amber .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-amber-content, var(--color-rainbow-1-text));outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-amber nv-icon{color:var(--color-rainbow-1-icon)}nv-badge.badge-orange{color:var(--color-rainbow-2-text);background-color:var(--color-rainbow-2-background);border-color:var(--color-rainbow-2-border)}nv-badge.badge-orange .close:focus,nv-badge.badge-orange .close:focus-within{outline:none}nv-badge.badge-orange .close:focus-visible,nv-badge.badge-orange .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-orange-content, var(--color-rainbow-2-text));outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-orange nv-icon{color:var(--color-rainbow-2-icon)}nv-badge.badge-turquoise{color:var(--color-rainbow-5-text);background-color:var(--color-rainbow-5-background);border-color:var(--color-rainbow-5-border)}nv-badge.badge-turquoise .close:focus,nv-badge.badge-turquoise .close:focus-within{outline:none}nv-badge.badge-turquoise .close:focus-visible,nv-badge.badge-turquoise .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-turquoise-content, var(--color-rainbow-5-text));outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-turquoise nv-icon{color:var(--color-rainbow-5-icon)}nv-badge.badge-crimson{color:var(--color-rainbow-6-text);background-color:var(--color-rainbow-6-background);border-color:var(--color-rainbow-6-border)}nv-badge.badge-crimson .close:focus,nv-badge.badge-crimson .close:focus-within{outline:none}nv-badge.badge-crimson .close:focus-visible,nv-badge.badge-crimson .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-crimson-content, var(--color-rainbow-6-text));outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-crimson nv-icon{color:var(--color-rainbow-6-icon)}nv-badge.badge-lime{color:var(--color-rainbow-9-text);background-color:var(--color-rainbow-9-background);border-color:var(--color-rainbow-9-border)}nv-badge.badge-lime .close:focus,nv-badge.badge-lime .close:focus-within{outline:none}nv-badge.badge-lime .close:focus-visible,nv-badge.badge-lime .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-lime-content, var(--color-rainbow-9-text));outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-lime nv-icon{color:var(--color-rainbow-9-icon)}nv-badge.badge-petrol{color:var(--color-rainbow-8-text);background-color:var(--color-rainbow-8-background);border-color:var(--color-rainbow-8-border)}nv-badge.badge-petrol .close:focus,nv-badge.badge-petrol .close:focus-within{outline:none}nv-badge.badge-petrol .close:focus-visible,nv-badge.badge-petrol .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-petrol-content, var(--color-rainbow-8-text));outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-petrol nv-icon{color:var(--color-rainbow-8-icon)}nv-badge span{font-size:var(--font-size-xs);line-height:var(--line-height-xs) !important;text-align:center}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)}";
|
|
12
|
-
const NvBadgeStyle0 = nvBadgeCss;
|
|
13
|
-
|
|
14
|
-
const NvBadge = class {
|
|
15
|
-
constructor(hostRef) {
|
|
16
|
-
index.registerInstance(this, hostRef);
|
|
17
|
-
this.closeClicked = index.createEvent(this, "closeClicked");
|
|
18
|
-
this.hiddenChanged = index.createEvent(this, "hiddenChanged");
|
|
19
|
-
this.hiddenChangedComplete = index.createEvent(this, "hiddenChangedComplete");
|
|
20
|
-
/****************************************************************************/
|
|
21
|
-
//#region DEPRECATED
|
|
22
|
-
/**
|
|
23
|
-
* Whether the badge is dismissible.
|
|
24
|
-
* @deprecated use dismissible instead.
|
|
25
|
-
*/
|
|
26
|
-
this.dismissal = false;
|
|
27
|
-
//#endregion DEPRECATED
|
|
28
|
-
/****************************************************************************/
|
|
29
|
-
//#region PROPERTIES
|
|
30
|
-
/**
|
|
31
|
-
* The color of the badge.
|
|
32
|
-
* deprecated Use status values or named colors instead.
|
|
33
|
-
* Use a string between 1 to 10
|
|
34
|
-
* or one of the status values: error, information, neutral, success, warning
|
|
35
|
-
* or one of the color names: amber, orange, turquoise, crimson, lime
|
|
36
|
-
*/
|
|
37
|
-
this.color = '1';
|
|
38
|
-
/**
|
|
39
|
-
* Main content of the badge.
|
|
40
|
-
*/
|
|
41
|
-
this.label = null;
|
|
42
|
-
/**
|
|
43
|
-
* The lead icon of the badge.
|
|
44
|
-
*/
|
|
45
|
-
this.leadIcon = null;
|
|
46
|
-
/**
|
|
47
|
-
* Whether the badge is dismissible.
|
|
48
|
-
*/
|
|
49
|
-
this.dismissible = false;
|
|
50
|
-
/**
|
|
51
|
-
* Controls the visibility of the badge. Will animate with fade and collapse.
|
|
52
|
-
*/
|
|
53
|
-
this.hidden = false; // eslint-disable-line @stencil-community/reserved-member-names
|
|
54
|
-
/**
|
|
55
|
-
* When true, the alert does not automatically close upon dismissing.
|
|
56
|
-
* Useful for externally controlled component behavior.
|
|
57
|
-
*/
|
|
58
|
-
this.preventAutoClose = false;
|
|
59
|
-
/**
|
|
60
|
-
* When true, the badge will only display an icon without label.
|
|
61
|
-
* The label will be visually hidden but still accessible for screen readers.
|
|
62
|
-
*/
|
|
63
|
-
this.isIconOnly = false;
|
|
64
|
-
//#endregion LIFECYCLE
|
|
65
|
-
/****************************************************************************/
|
|
66
|
-
//#region METHODS
|
|
67
|
-
/**
|
|
68
|
-
* Handles the close button click.
|
|
69
|
-
*/
|
|
70
|
-
this.handleClose = () => {
|
|
71
|
-
if (!this.preventAutoClose) {
|
|
72
|
-
this.hidden = true;
|
|
73
|
-
}
|
|
74
|
-
this.closeClicked.emit();
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
//#endregion EVENTS
|
|
78
|
-
/****************************************************************************/
|
|
79
|
-
//#region WATCHERS
|
|
80
|
-
/**
|
|
81
|
-
* Handles the dismissal prop change.
|
|
82
|
-
* @param {boolean} dismissal - The new dismissal value.
|
|
83
|
-
*/
|
|
84
|
-
handleDismissalChange(dismissal) {
|
|
85
|
-
this.dismissible = dismissal;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Handles the icon prop change.
|
|
89
|
-
* @param {string} icon - The new icon value.
|
|
90
|
-
*/
|
|
91
|
-
handleIconChange(icon) {
|
|
92
|
-
this.leadIcon = icon;
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Handles the hidden prop change.
|
|
96
|
-
* @param {boolean} hidden - The new hidden value.
|
|
97
|
-
*/
|
|
98
|
-
async handleHiddenChange(hidden) {
|
|
99
|
-
this.hiddenChanged.emit(hidden);
|
|
100
|
-
if (this._isHidden === true)
|
|
101
|
-
this._isHidden = hidden;
|
|
102
|
-
const { fadeIn, fadeOut } = fade_animation71e8e34c.useFade(this.ref, { duration: 150 });
|
|
103
|
-
const { collapse, expand } = collapse_animation16e3af45.useCollapse(this.ref, { duration: 150 });
|
|
104
|
-
if (hidden === true)
|
|
105
|
-
await timeline_animationAdf35ecb.timeline(fadeOut, collapse).start();
|
|
106
|
-
if (hidden === false)
|
|
107
|
-
await timeline_animationAdf35ecb.timeline(expand, fadeIn).start();
|
|
108
|
-
this.hiddenChangedComplete.emit(hidden);
|
|
109
|
-
if (this._isHidden === false)
|
|
110
|
-
this._isHidden = hidden;
|
|
111
|
-
}
|
|
112
|
-
//#endregion WATCHERS
|
|
113
|
-
/****************************************************************************/
|
|
114
|
-
//#region LIFECYCLE
|
|
115
|
-
/**
|
|
116
|
-
* Component will load.
|
|
117
|
-
*/
|
|
118
|
-
componentWillLoad() {
|
|
119
|
-
if (this.dismissal) {
|
|
120
|
-
this.dismissible = this.dismissal;
|
|
121
|
-
}
|
|
122
|
-
if (this.icon != null && this.icon != '') {
|
|
123
|
-
this.leadIcon = this.icon;
|
|
124
|
-
}
|
|
125
|
-
if (this.hidden) {
|
|
126
|
-
this._isHidden = true;
|
|
127
|
-
const { setCollapsed } = collapse_animation16e3af45.useCollapse(this.ref);
|
|
128
|
-
const { setFadeOut } = fade_animation71e8e34c.useFade(this.ref);
|
|
129
|
-
setCollapsed();
|
|
130
|
-
setFadeOut();
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
//#endregion METHODS
|
|
134
|
-
/****************************************************************************/
|
|
135
|
-
//#region RENDER
|
|
136
|
-
render() {
|
|
137
|
-
return (index.h(index.Host, { key: '435c5bb1f565c8bd95cca5c6828157c80f60aa39', class: clsx297c1ffe.clsx(`badge-${this.color}`, {
|
|
138
|
-
'has-close': this.dismissible,
|
|
139
|
-
'with-gap': this.dismissible || this.label,
|
|
140
|
-
'visually-hidden': this._isHidden,
|
|
141
|
-
'is-icon-only': this.isIconOnly,
|
|
142
|
-
}) }, index.h("slot", { key: '271dc833471e026af5088f48227639682e661e97', name: "leading-icon" }, this.leadIcon && index.h("nv-icon", { key: 'e578eabf4c5a09e61e28c3839b943804acdf88e8', name: this.leadIcon, size: "sm" })), index.h("span", { key: '24d16a21b2b4499be712f9b747c9ab63c5e6ca0c', class: clsx297c1ffe.clsx({ 'visually-hidden': this.isIconOnly }) }, this.label, index.h("slot", { key: '3e3827620e6ade8be256ce7dd0b8bb949f36f2d5' })), this.dismissible && (index.h("button", { key: '90ed9ec1b71815554b963b0eafeb5536578700cf', onClick: this.handleClose, class: "close", type: "button" }, index.h("nv-icon", { key: 'df426e5d88c2bf02e7aa83c179c05db4795f03db', name: "x", size: "sm" })))));
|
|
143
|
-
}
|
|
144
|
-
get ref() { return index.getElement(this); }
|
|
145
|
-
static get watchers() { return {
|
|
146
|
-
"dismissal": ["handleDismissalChange"],
|
|
147
|
-
"icon": ["handleIconChange"],
|
|
148
|
-
"hidden": ["handleHiddenChange"]
|
|
149
|
-
}; }
|
|
150
|
-
};
|
|
151
|
-
NvBadge.style = NvBadgeStyle0;
|
|
152
|
-
|
|
153
|
-
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)}";
|
|
154
|
-
const NvFielddropdownitemcheckStyle0 = nvFielddropdownitemcheckCss;
|
|
155
|
-
|
|
156
|
-
const NvFielddropdownitemcheck = class {
|
|
157
|
-
constructor(hostRef) {
|
|
158
|
-
index.registerInstance(this, hostRef);
|
|
159
|
-
this.itemChecked = index.createEvent(this, "itemChecked");
|
|
160
|
-
/****************************************************************************/
|
|
161
|
-
//#region PROPERTIES
|
|
162
|
-
/**
|
|
163
|
-
* Indicates whether the checkbox is selected.
|
|
164
|
-
*/
|
|
165
|
-
this.checked = false;
|
|
166
|
-
/**
|
|
167
|
-
* Disables the item, preventing any user interaction.
|
|
168
|
-
*/
|
|
169
|
-
this.disabled = false;
|
|
170
|
-
/**
|
|
171
|
-
* when the child <nv-fieldcheckbox> change its `checked` state,
|
|
172
|
-
* update `this.checked` and emit `itemChecked`.
|
|
173
|
-
* @param {CustomEvent<boolean>} event - The event emitted by the <nv-fieldcheckbox> component.
|
|
174
|
-
*/
|
|
175
|
-
this.onFieldcheckboxChanged = (event) => {
|
|
176
|
-
if (this.disabled)
|
|
177
|
-
return;
|
|
178
|
-
// NvFieldcheckbox has emitted checkedChanged
|
|
179
|
-
this.checked = event.detail; // get the new state
|
|
180
|
-
this.itemChecked.emit({
|
|
181
|
-
value: this.value,
|
|
182
|
-
checked: this.checked,
|
|
183
|
-
group: this.group,
|
|
184
|
-
});
|
|
185
|
-
};
|
|
186
|
-
/** Make sure the checkbox is checked when clicked anywhere in the item. */
|
|
187
|
-
this.handleClick = () => {
|
|
188
|
-
if (this.disabled)
|
|
189
|
-
return;
|
|
190
|
-
if (this.el.querySelector('input').checked) {
|
|
191
|
-
this.checked = false;
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
this.checked = true;
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
render() {
|
|
199
|
-
return (index.h(index.Host, { key: '82abe79dd061f60e380f033027f799121769f89e', onClick: this.handleClick }, index.h("nv-fieldcheckbox", { key: '505181c56faacb09e55c428d91287d96e1c3b72a', 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 }, index.h("slot", { key: '95a53b7d4ec735fd3256505b57e2a497b475f511' }), index.h("slot", { key: '137d5e2b3046417bbc90c0bd2dd10b846d1dfd53', name: "main" }), index.h("slot", { key: '47d4a73e401186b7bc7a18aaad82018f0ccc1e2f', name: "label" }), index.h("slot", { key: 'ff5c752d386c282635a97ad2bcb8858571aff7e9', name: "description" }))));
|
|
200
|
-
}
|
|
201
|
-
get el() { return index.getElement(this); }
|
|
202
|
-
};
|
|
203
|
-
NvFielddropdownitemcheck.style = NvFielddropdownitemcheckStyle0;
|
|
204
|
-
|
|
205
|
-
exports.nv_badge = NvBadge;
|
|
206
|
-
exports.nv_fielddropdownitemcheck = NvFielddropdownitemcheck;
|