@nvidia-elements/core 2.19.0 → 2.19.1
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/CHANGELOG.md +12 -0
- package/dist/_virtual/_rolldown/runtime.js +17 -0
- package/dist/accordion/accordion2.js +60 -57
- package/dist/accordion/accordion2.js.map +1 -1
- package/dist/alert/alert-group2.js +1 -1
- package/dist/alert/alert2.js +37 -31
- package/dist/alert/alert2.js.map +1 -1
- package/dist/avatar/avatar-group2.js +1 -1
- package/dist/avatar/avatar2.js +1 -1
- package/dist/badge/badge.d.ts +0 -6
- package/dist/badge/badge2.js +31 -36
- package/dist/badge/badge2.js.map +1 -1
- package/dist/breadcrumb/breadcrumb2.js +1 -1
- package/dist/bundles/index.d.ts +25 -27
- package/dist/bundles/index.js +9 -9
- package/dist/button/button2.js +1 -1
- package/dist/button-group/button-group2.js +1 -1
- package/dist/card/card2.js +4 -4
- package/dist/chat-message/chat-message2.js +1 -1
- package/dist/checkbox/checkbox-group2.js +1 -1
- package/dist/checkbox/checkbox2.js +1 -1
- package/dist/color/color.d.ts +2 -0
- package/dist/color/color2.js +7 -4
- package/dist/color/color2.js.map +1 -1
- package/dist/combobox/combobox.d.ts +2 -0
- package/dist/combobox/combobox2.js +14 -6
- package/dist/combobox/combobox2.js.map +1 -1
- package/dist/copy-button/copy-button2.js +26 -23
- package/dist/copy-button/copy-button2.js.map +1 -1
- package/dist/custom-elements-jsx.d.ts +0 -4
- package/dist/custom-elements-vue.d.ts +0 -4
- package/dist/custom-elements.json +3 -173
- package/dist/data.html.json +0 -10
- package/dist/data.snippets.json +27 -27
- package/dist/date/date.d.ts +2 -0
- package/dist/date/date2.js +7 -4
- package/dist/date/date2.js.map +1 -1
- package/dist/datetime/datetime.d.ts +2 -0
- package/dist/datetime/datetime2.js +7 -4
- package/dist/datetime/datetime2.js.map +1 -1
- package/dist/dialog/dialog-footer2.js +1 -1
- package/dist/dialog/dialog-header2.js +1 -1
- package/dist/dialog/dialog2.js +27 -27
- package/dist/dialog/dialog2.js.map +1 -1
- package/dist/divider/divider2.js +1 -1
- package/dist/dot/dot2.js +1 -1
- package/dist/drag-handle/drag-handle2.js +1 -1
- package/dist/drawer/drawer-content2.js +1 -1
- package/dist/drawer/drawer-footer2.js +1 -1
- package/dist/drawer/drawer-header2.js +1 -1
- package/dist/drawer/drawer2.js +27 -27
- package/dist/drawer/drawer2.js.map +1 -1
- package/dist/dropdown/dropdown-footer2.js +1 -1
- package/dist/dropdown/dropdown-header2.js +1 -1
- package/dist/dropdown/dropdown2.js +23 -23
- package/dist/dropdown/dropdown2.js.map +1 -1
- package/dist/dropdown-group/dropdown-group.js +1 -1
- package/dist/dropzone/dropzone2.js +28 -22
- package/dist/dropzone/dropzone2.js.map +1 -1
- package/dist/file/file2.js +1 -1
- package/dist/format-bytes/format-bytes2.js +1 -1
- package/dist/format-datetime/format-datetime2.js +1 -1
- package/dist/format-number/format-number2.js +1 -1
- package/dist/format-relative-time/format-relative-time2.js +1 -1
- package/dist/format-truncate/format-truncate2.js +1 -1
- package/dist/forms/control/control.d.ts +3 -0
- package/dist/forms/control/control2.js +34 -31
- package/dist/forms/control/control2.js.map +1 -1
- package/dist/forms/control-group/control-group2.js +1 -1
- package/dist/forms/control-message/control-message2.js +1 -1
- package/dist/gauge/gauge2.js +26 -21
- package/dist/gauge/gauge2.js.map +1 -1
- package/dist/grid/cell/cell2.js +1 -1
- package/dist/grid/column/column2.js +1 -1
- package/dist/grid/footer/footer2.js +1 -1
- package/dist/grid/grid2.js +1 -1
- package/dist/grid/header/header2.js +1 -1
- package/dist/grid/placeholder/placeholder2.js +1 -1
- package/dist/grid/row/row2.js +1 -1
- package/dist/icon/icon2.js +2 -2
- package/dist/icon-button/icon-button2.js +1 -1
- package/dist/iframe/iframe2.js +1 -1
- package/dist/index.js +5 -6
- package/dist/input/input-group2.js +1 -1
- package/dist/input/input2.js +1 -1
- package/dist/internal/index.d.ts +1 -2
- package/dist/internal/index.js +150 -33
- package/dist/internal/index.js.map +1 -0
- package/dist/internal/types/index.d.ts +1 -1
- package/dist/internal/types/index.js.map +1 -1
- package/dist/logo/logo2.js +1 -1
- package/dist/menu/menu-group2.js +1 -1
- package/dist/menu/menu-item2.js +1 -1
- package/dist/menu/menu2.js +1 -1
- package/dist/month/month.d.ts +2 -0
- package/dist/month/month2.js +7 -4
- package/dist/month/month2.js.map +1 -1
- package/dist/notification/notification-group2.js +1 -1
- package/dist/notification/notification2.js +38 -32
- package/dist/notification/notification2.js.map +1 -1
- package/dist/page/page-panel/page-panel-content2.js +1 -1
- package/dist/page/page-panel/page-panel-footer2.js +1 -1
- package/dist/page/page-panel/page-panel-header2.js +1 -1
- package/dist/page/page-panel/page-panel.d.ts +0 -7
- package/dist/page/page-panel/page-panel2.js +18 -20
- package/dist/page/page-panel/page-panel2.js.map +1 -1
- package/dist/page/page2.js +1 -1
- package/dist/page-header/page-header2.js +1 -1
- package/dist/page-loader/page-loader2.js +1 -1
- package/dist/pagination/pagination2.js +45 -38
- package/dist/pagination/pagination2.js.map +1 -1
- package/dist/panel/panel2.js +43 -38
- package/dist/panel/panel2.js.map +1 -1
- package/dist/password/password.d.ts +2 -0
- package/dist/password/password2.js +10 -4
- package/dist/password/password2.js.map +1 -1
- package/dist/preferences-input/preferences-input2.js +32 -27
- package/dist/preferences-input/preferences-input2.js.map +1 -1
- package/dist/progress-bar/progress-bar2.js +1 -1
- package/dist/progress-dot/progress-dot2.js +17 -17
- package/dist/progress-dot/progress-dot2.js.map +1 -1
- package/dist/progress-ring/progress-ring2.js +27 -22
- package/dist/progress-ring/progress-ring2.js.map +1 -1
- package/dist/progressive-filter-chip/progressive-filter-chip2.js +30 -30
- package/dist/progressive-filter-chip/progressive-filter-chip2.js.map +1 -1
- package/dist/pulse/pulse2.js +1 -1
- package/dist/radio/radio-group2.js +1 -1
- package/dist/radio/radio2.js +1 -1
- package/dist/range/range2.js +1 -1
- package/dist/resize-handle/resize-handle2.js +17 -17
- package/dist/resize-handle/resize-handle2.js.map +1 -1
- package/dist/search/search2.js +1 -1
- package/dist/select/select2.js +44 -41
- package/dist/select/select2.js.map +1 -1
- package/dist/skeleton/skeleton2.js +1 -1
- package/dist/sort-button/sort-button2.js +20 -20
- package/dist/sort-button/sort-button2.js.map +1 -1
- package/dist/sparkline/sparkline2.js +1 -1
- package/dist/star-rating/star-rating2.js +1 -1
- package/dist/steps/steps2.js +2 -2
- package/dist/switch/switch-group2.js +1 -1
- package/dist/switch/switch2.js +1 -1
- package/dist/tabs/tabs-group2.js +1 -1
- package/dist/tabs/tabs-item-group2.js +1 -1
- package/dist/tabs/tabs2.js +2 -2
- package/dist/tag/tag2.js +19 -19
- package/dist/tag/tag2.js.map +1 -1
- package/dist/textarea/textarea2.js +1 -1
- package/dist/time/time.d.ts +2 -0
- package/dist/time/time2.js +7 -4
- package/dist/time/time2.js.map +1 -1
- package/dist/toast/toast2.js +35 -29
- package/dist/toast/toast2.js.map +1 -1
- package/dist/toggletip/toggletip-footer2.js +1 -1
- package/dist/toggletip/toggletip-header2.js +1 -1
- package/dist/toggletip/toggletip2.js +25 -25
- package/dist/toggletip/toggletip2.js.map +1 -1
- package/dist/toolbar/toolbar2.js +1 -1
- package/dist/tooltip/tooltip2.js +1 -1
- package/dist/tree/tree-node2.js +45 -45
- package/dist/tree/tree-node2.js.map +1 -1
- package/dist/tree/tree2.js +1 -1
- package/dist/week/week.d.ts +2 -0
- package/dist/week/week2.js +7 -4
- package/dist/week/week2.js.map +1 -1
- package/package.json +2 -2
- package/dist/internal/controllers/i18n.controller.d.ts +0 -19
- package/dist/internal/controllers/i18n.controller.examples.js +0 -6
- package/dist/internal/controllers/i18n.controller.examples.js.map +0 -1
- package/dist/internal/controllers/i18n.controller.examples.json +0 -16
- package/dist/internal/controllers/i18n.controller.js +0 -38
- package/dist/internal/controllers/i18n.controller.js.map +0 -1
- package/dist/internal/services/i18n.service.d.ts +0 -64
- package/dist/internal/services/i18n.service.js +0 -73
- package/dist/internal/services/i18n.service.js.map +0 -1
package/dist/internal/index.js
CHANGED
|
@@ -1,36 +1,153 @@
|
|
|
1
|
+
import { __exportAll as ee, __reExport as te } from "../_virtual/_rolldown/runtime.js";
|
|
1
2
|
import { LogService as e } from "./services/log.service.js";
|
|
2
3
|
import { auditParentElement as t } from "./utils/audit.js";
|
|
3
4
|
import { DOCS_URL as n, formatFileSize as r, shiftLeft as i } from "./utils/strings.js";
|
|
4
|
-
import { AuditController as a, audit as o, excessiveInstanceLimit as
|
|
5
|
-
import { GestureController as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
5
|
+
import { AuditController as a, audit as o, excessiveInstanceLimit as ne } from "./controllers/audit.controller.js";
|
|
6
|
+
import { GestureController as s } from "./controllers/gesture.controller.js";
|
|
7
|
+
import { KeyStateController as c } from "./controllers/key-state.controller.js";
|
|
8
|
+
import { debounce as l, onChildListMutation as u, stopEvent as d, throttle as f } from "./utils/events.js";
|
|
9
|
+
import { focusElement as p, focusElementTimeout as m, getActiveElement as h, initializeKeyListItems as g, isFocusable as _, isImmediateRootActiveElement as v, isSimpleFocusable as y, onListboxActivate as b, setActiveKeyListItem as x } from "./utils/focus.js";
|
|
10
|
+
import { KeynavCode as S, appendAnchorName as C, appendRootNodeStyle as w, applySlotContentStates as T, clickOutsideElementBounds as E, createGhostElement as D, endOfScrollBox as O, generateId as k, getAnchorNames as A, getAttributeChanges as j, getAttributeListChanges as M, getChildren as N, getCustomElementRegistry as P, getDisplayValue as F, getElementUpdate as I, getFlattenedDOMTree as L, getFlattenedFocusableItems as R, getPropertyChanges as z, getThemeTokens as B, hasHorizontalScrollBar as V, hasInvalidDOMGrid as H, hasScrollBar as U, isContextMenuClick as W, matchesElementName as G, openEyeDropper as K, parseTokenNumber as q, removeAnchorName as J, removeEmptySlotWhitespace as Y, removeEmptyTextNode as X, sameOrderedStringArray as Z, sameRenderRoot as Q, scrollBarWidth as re, slotContainsOnlyWhitespace as ie, styleSheetToString as ae, uniqueNonEmptyStrings as oe, validKeyNavigationCode as $ } from "./utils/dom.js";
|
|
11
|
+
import { KeyNavigationGridController as se, getNextKeyGridItem as ce, keyNavigationGrid as le } from "./controllers/keynav-grid.controller.js";
|
|
12
|
+
import { KeyNavigationListController as ue, getNextKeyListItem as de, keyNavigationList as fe } from "./controllers/keynav-list.controller.js";
|
|
13
|
+
import { KeyNavigationSpatialController as pe } from "./controllers/keynav-spatial.controller.js";
|
|
14
|
+
import { associateAriaDescribedBy as me, associateAriaLabel as he, associateControlGroup as ge, associateDataList as _e, associateLabel as ve, attachInternals as ye } from "./utils/a11y.js";
|
|
15
|
+
import { StateExpandedController as be, stateExpanded as xe } from "./controllers/state-expanded.controller.js";
|
|
16
|
+
import { StateHighlightedController as Se, stateHighlighted as Ce } from "./controllers/state-highlighted.controller.js";
|
|
17
|
+
import { StateScrollController as we, stateScroll as Te } from "./controllers/state-scroll.controller.js";
|
|
18
|
+
import { StateSelectedController as Ee, stateSelected as De } from "./controllers/state-selected.controller.js";
|
|
19
|
+
import { TypeAnchorController as Oe, typeAnchor as ke } from "./controllers/type-anchor.controller.js";
|
|
20
|
+
import { TypeClosableController as Ae } from "./controllers/type-closable.controller.js";
|
|
21
|
+
import { TypeExpandableController as je } from "./controllers/type-expandable.controller.js";
|
|
22
|
+
import { TypeSelectableController as Me } from "./controllers/type-selectable.controller.js";
|
|
23
|
+
import { TypeNativePopoverController as Ne } from "./controllers/type-native-popover.controller.js";
|
|
24
|
+
import { TypeSSRController as Pe, typeSSR as Fe } from "./controllers/type-ssr.controller.js";
|
|
25
|
+
import { hostAttr as Ie } from "./decorators/host-attr.js";
|
|
26
|
+
import { scopedRegistry as Le } from "./decorators/scoped-registry.js";
|
|
27
|
+
import { colorStateStyles as Re, statusStateStyles as ze, supportStateStyles as Be, useStyles as Ve } from "./styles/index.js";
|
|
28
|
+
import { supportsCSSLegacyInsetArea as He, supportsCSSPositionArea as Ue, supportsNativeCSSAnchorPosition as We } from "./utils/supports.js";
|
|
29
|
+
import { popoverStyles as Ge } from "./styles/popover2.js";
|
|
30
|
+
import { TransitionService as Ke } from "./services/transition.service.js";
|
|
31
|
+
import { statusIcons as qe } from "./types/index.js";
|
|
32
|
+
import { formatStandardNumber as Je, getDifference as Ye, isObject as Xe, parseVersion as Ze } from "./utils/objects.js";
|
|
33
|
+
import { createLightDismiss as Qe, onKeys as $e } from "./utils/keynav.js";
|
|
34
|
+
import { finiteOr as et, nonnegativeFiniteOr as tt, positiveFiniteOr as nt } from "./utils/numeric.js";
|
|
35
|
+
export * from "@nvidia-elements/foundations/internal/i18n";
|
|
36
|
+
//#region src/internal/index.ts
|
|
37
|
+
var rt = /* @__PURE__ */ ee({
|
|
38
|
+
AuditController: () => a,
|
|
39
|
+
DOCS_URL: () => n,
|
|
40
|
+
GestureController: () => s,
|
|
41
|
+
KeyNavigationGridController: () => se,
|
|
42
|
+
KeyNavigationListController: () => ue,
|
|
43
|
+
KeyNavigationSpatialController: () => pe,
|
|
44
|
+
KeyStateController: () => c,
|
|
45
|
+
KeynavCode: () => S,
|
|
46
|
+
LogService: () => e,
|
|
47
|
+
StateExpandedController: () => be,
|
|
48
|
+
StateHighlightedController: () => Se,
|
|
49
|
+
StateScrollController: () => we,
|
|
50
|
+
StateSelectedController: () => Ee,
|
|
51
|
+
TransitionService: () => Ke,
|
|
52
|
+
TypeAnchorController: () => Oe,
|
|
53
|
+
TypeClosableController: () => Ae,
|
|
54
|
+
TypeExpandableController: () => je,
|
|
55
|
+
TypeNativePopoverController: () => Ne,
|
|
56
|
+
TypeSSRController: () => Pe,
|
|
57
|
+
TypeSelectableController: () => Me,
|
|
58
|
+
appendAnchorName: () => C,
|
|
59
|
+
appendRootNodeStyle: () => w,
|
|
60
|
+
applySlotContentStates: () => T,
|
|
61
|
+
associateAriaDescribedBy: () => me,
|
|
62
|
+
associateAriaLabel: () => he,
|
|
63
|
+
associateControlGroup: () => ge,
|
|
64
|
+
associateDataList: () => _e,
|
|
65
|
+
associateLabel: () => ve,
|
|
66
|
+
attachInternals: () => ye,
|
|
67
|
+
audit: () => o,
|
|
68
|
+
auditParentElement: () => t,
|
|
69
|
+
clickOutsideElementBounds: () => E,
|
|
70
|
+
colorStateStyles: () => Re,
|
|
71
|
+
createGhostElement: () => D,
|
|
72
|
+
createLightDismiss: () => Qe,
|
|
73
|
+
debounce: () => l,
|
|
74
|
+
endOfScrollBox: () => O,
|
|
75
|
+
excessiveInstanceLimit: () => 50,
|
|
76
|
+
finiteOr: () => et,
|
|
77
|
+
focusElement: () => p,
|
|
78
|
+
focusElementTimeout: () => m,
|
|
79
|
+
formatFileSize: () => r,
|
|
80
|
+
formatStandardNumber: () => Je,
|
|
81
|
+
generateId: () => k,
|
|
82
|
+
getActiveElement: () => h,
|
|
83
|
+
getAnchorNames: () => A,
|
|
84
|
+
getAttributeChanges: () => j,
|
|
85
|
+
getAttributeListChanges: () => M,
|
|
86
|
+
getChildren: () => N,
|
|
87
|
+
getCustomElementRegistry: () => P,
|
|
88
|
+
getDifference: () => Ye,
|
|
89
|
+
getDisplayValue: () => F,
|
|
90
|
+
getElementUpdate: () => I,
|
|
91
|
+
getFlattenedDOMTree: () => L,
|
|
92
|
+
getFlattenedFocusableItems: () => R,
|
|
93
|
+
getNextKeyGridItem: () => ce,
|
|
94
|
+
getNextKeyListItem: () => de,
|
|
95
|
+
getPropertyChanges: () => z,
|
|
96
|
+
getThemeTokens: () => B,
|
|
97
|
+
hasHorizontalScrollBar: () => V,
|
|
98
|
+
hasInvalidDOMGrid: () => H,
|
|
99
|
+
hasScrollBar: () => U,
|
|
100
|
+
hostAttr: () => Ie,
|
|
101
|
+
initializeKeyListItems: () => g,
|
|
102
|
+
isContextMenuClick: () => W,
|
|
103
|
+
isFocusable: () => _,
|
|
104
|
+
isImmediateRootActiveElement: () => v,
|
|
105
|
+
isObject: () => Xe,
|
|
106
|
+
isSimpleFocusable: () => y,
|
|
107
|
+
keyNavigationGrid: () => le,
|
|
108
|
+
keyNavigationList: () => fe,
|
|
109
|
+
matchesElementName: () => G,
|
|
110
|
+
nonnegativeFiniteOr: () => tt,
|
|
111
|
+
onChildListMutation: () => u,
|
|
112
|
+
onKeys: () => $e,
|
|
113
|
+
onListboxActivate: () => b,
|
|
114
|
+
openEyeDropper: () => K,
|
|
115
|
+
parseTokenNumber: () => q,
|
|
116
|
+
parseVersion: () => Ze,
|
|
117
|
+
popoverStyles: () => Ge,
|
|
118
|
+
positiveFiniteOr: () => nt,
|
|
119
|
+
removeAnchorName: () => J,
|
|
120
|
+
removeEmptySlotWhitespace: () => Y,
|
|
121
|
+
removeEmptyTextNode: () => X,
|
|
122
|
+
sameOrderedStringArray: () => Z,
|
|
123
|
+
sameRenderRoot: () => Q,
|
|
124
|
+
scopedRegistry: () => Le,
|
|
125
|
+
scrollBarWidth: () => re,
|
|
126
|
+
setActiveKeyListItem: () => x,
|
|
127
|
+
shiftLeft: () => i,
|
|
128
|
+
slotContainsOnlyWhitespace: () => ie,
|
|
129
|
+
stateExpanded: () => xe,
|
|
130
|
+
stateHighlighted: () => Ce,
|
|
131
|
+
stateScroll: () => Te,
|
|
132
|
+
stateSelected: () => De,
|
|
133
|
+
statusIcons: () => qe,
|
|
134
|
+
statusStateStyles: () => ze,
|
|
135
|
+
stopEvent: () => d,
|
|
136
|
+
styleSheetToString: () => ae,
|
|
137
|
+
supportStateStyles: () => Be,
|
|
138
|
+
supportsCSSLegacyInsetArea: () => He,
|
|
139
|
+
supportsCSSPositionArea: () => Ue,
|
|
140
|
+
supportsNativeCSSAnchorPosition: () => We,
|
|
141
|
+
throttle: () => f,
|
|
142
|
+
typeAnchor: () => ke,
|
|
143
|
+
typeSSR: () => Fe,
|
|
144
|
+
uniqueNonEmptyStrings: () => oe,
|
|
145
|
+
useStyles: () => Ve,
|
|
146
|
+
validKeyNavigationCode: () => $
|
|
147
|
+
});
|
|
148
|
+
import * as it from "@nvidia-elements/foundations/internal/i18n";
|
|
149
|
+
te(rt, it);
|
|
150
|
+
//#endregion
|
|
151
|
+
export { a as AuditController, n as DOCS_URL, s as GestureController, se as KeyNavigationGridController, ue as KeyNavigationListController, pe as KeyNavigationSpatialController, c as KeyStateController, S as KeynavCode, e as LogService, be as StateExpandedController, Se as StateHighlightedController, we as StateScrollController, Ee as StateSelectedController, Ke as TransitionService, Oe as TypeAnchorController, Ae as TypeClosableController, je as TypeExpandableController, Ne as TypeNativePopoverController, Pe as TypeSSRController, Me as TypeSelectableController, C as appendAnchorName, w as appendRootNodeStyle, T as applySlotContentStates, me as associateAriaDescribedBy, he as associateAriaLabel, ge as associateControlGroup, _e as associateDataList, ve as associateLabel, ye as attachInternals, o as audit, t as auditParentElement, E as clickOutsideElementBounds, Re as colorStateStyles, D as createGhostElement, Qe as createLightDismiss, l as debounce, O as endOfScrollBox, ne as excessiveInstanceLimit, et as finiteOr, p as focusElement, m as focusElementTimeout, r as formatFileSize, Je as formatStandardNumber, k as generateId, h as getActiveElement, A as getAnchorNames, j as getAttributeChanges, M as getAttributeListChanges, N as getChildren, P as getCustomElementRegistry, Ye as getDifference, F as getDisplayValue, I as getElementUpdate, L as getFlattenedDOMTree, R as getFlattenedFocusableItems, ce as getNextKeyGridItem, de as getNextKeyListItem, z as getPropertyChanges, B as getThemeTokens, V as hasHorizontalScrollBar, H as hasInvalidDOMGrid, U as hasScrollBar, Ie as hostAttr, g as initializeKeyListItems, rt as internal_exports, W as isContextMenuClick, _ as isFocusable, v as isImmediateRootActiveElement, Xe as isObject, y as isSimpleFocusable, le as keyNavigationGrid, fe as keyNavigationList, G as matchesElementName, tt as nonnegativeFiniteOr, u as onChildListMutation, $e as onKeys, b as onListboxActivate, K as openEyeDropper, q as parseTokenNumber, Ze as parseVersion, Ge as popoverStyles, nt as positiveFiniteOr, J as removeAnchorName, Y as removeEmptySlotWhitespace, X as removeEmptyTextNode, Z as sameOrderedStringArray, Q as sameRenderRoot, Le as scopedRegistry, re as scrollBarWidth, x as setActiveKeyListItem, i as shiftLeft, ie as slotContainsOnlyWhitespace, xe as stateExpanded, Ce as stateHighlighted, Te as stateScroll, De as stateSelected, qe as statusIcons, ze as statusStateStyles, d as stopEvent, ae as styleSheetToString, Be as supportStateStyles, He as supportsCSSLegacyInsetArea, Ue as supportsCSSPositionArea, We as supportsNativeCSSAnchorPosition, f as throttle, ke as typeAnchor, Fe as typeSSR, oe as uniqueNonEmptyStrings, Ve as useStyles, $ as validKeyNavigationCode };
|
|
152
|
+
|
|
153
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/internal/index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * @internal private common utilities for Elements\n */\nexport * from './controllers/audit.controller.js';\nexport * from './controllers/gesture.controller.js';\nexport * from './controllers/key-state.controller.js';\nexport * from './controllers/keynav-grid.controller.js';\nexport * from './controllers/keynav-list.controller.js';\nexport * from './controllers/keynav-spatial.controller.js';\nexport * from './controllers/state-expanded.controller.js';\nexport * from './controllers/state-highlighted.controller.js';\nexport * from './controllers/state-scroll.controller.js';\nexport * from './controllers/state-selected.controller.js';\nexport * from './controllers/type-anchor.controller.js';\nexport * from './controllers/type-closable.controller.js';\nexport * from './controllers/type-expandable.controller.js';\nexport * from './controllers/type-selectable.controller.js';\nexport * from './controllers/type-native-popover.controller.js';\nexport * from './controllers/type-ssr.controller.js';\nexport * from './decorators/host-attr.js';\nexport * from './decorators/scoped-registry.js';\nexport * from './styles/index.js';\nexport * from './styles/popover.js';\nexport * from '@nvidia-elements/foundations/internal/i18n';\nexport * from './services/log.service.js';\nexport * from './services/transition.service.js';\nexport * from './types/index.js';\nexport * from './utils/a11y.js';\nexport * from './utils/audit.js';\nexport * from './utils/dom.js';\nexport * from './utils/events.js';\nexport * from './utils/objects.js';\nexport * from './utils/strings.js';\nexport * from './utils/focus.js';\nexport * from './utils/keynav.js';\nexport * from './utils/numeric.js';\nexport * from './utils/supports.js';\n"],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TemplateResult } from 'lit';
|
|
2
2
|
import type { IconName } from './icons.js';
|
|
3
|
-
import type { I18nStrings } from '
|
|
3
|
+
import type { I18nStrings } from '@nvidia-elements/foundations/internal/i18n';
|
|
4
4
|
export type Color = 'red-cardinal' | 'gray-slate' | 'gray-denim' | 'blue-indigo' | 'blue-cobalt' | 'blue-sky' | 'teal-cyan' | 'green-mint' | 'teal-seafoam' | 'green-grass' | 'yellow-amber' | 'orange-pumpkin' | 'red-tomato' | 'pink-magenta' | 'purple-plum' | 'purple-violet' | 'purple-lavender' | 'pink-rose' | 'green-jade' | 'lime-pear' | 'yellow-nova' | 'brand-green';
|
|
5
5
|
/** Controls the visual scale of an element to match its importance and available space.
|
|
6
6
|
* - `sm` - Compact size for dense layouts or secondary elements with less visual prominence.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/internal/types/index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { TemplateResult } from 'lit';\nimport type { IconName } from './icons.js';\nimport type { I18nStrings } from '../services/i18n.service.js';\n\nexport type Color =\n | 'red-cardinal'\n | 'gray-slate'\n | 'gray-denim'\n | 'blue-indigo'\n | 'blue-cobalt'\n | 'blue-sky'\n | 'teal-cyan'\n | 'green-mint'\n | 'teal-seafoam'\n | 'green-grass'\n | 'yellow-amber'\n | 'orange-pumpkin'\n | 'red-tomato'\n | 'pink-magenta'\n | 'purple-plum'\n | 'purple-violet'\n | 'purple-lavender'\n | 'pink-rose'\n | 'green-jade'\n | 'lime-pear'\n | 'yellow-nova'\n | 'brand-green';\n\n/** Controls the visual scale of an element to match its importance and available space.\n * - `sm` - Compact size for dense layouts or secondary elements with less visual prominence.\n * - `md` - Standard size that works well in most contexts and provides balanced visibility.\n * - `lg` - Larger size for emphasizing important elements or improving touch targets in spacious layouts.\n */\nexport type Size = 'sm' | 'md' | 'lg';\n\n/** Controls the visual scale of an element to match its importance and available space.\n * - `xs` - Extra small size for minimal elements or highly dense layouts.\n * - `sm` - Compact size for dense layouts or secondary elements with less visual prominence.\n * - `md` - Standard size that works well in most contexts and provides balanced visibility.\n * - `lg` - Larger size for emphasizing important elements or improving touch targets in spacious layouts.\n * - `xl` - Extra large size for emphasizing elements or sparse layouts.\n */\nexport type SizeExpanded = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/** Controls the visual prominence to establish hierarchy and guide user attention.\n * - `emphasis` - Increases visual weight to draw attention and highlight important elements.\n * - `muted` - Reduces visual weight for supporting content that should remain subtle and unobtrusive.\n */\nexport type Prominence = 'emphasis' | 'muted';\n\n/**\n * Determines the container bounds of the element\n * - `flat` Element has white space bounds but reduced visual container.\n * - `inline` Element container reduces to fit within inline content such as a block of text.\n * - `inset` Element container optimizes for embedding or inset placement inside another containing element.\n * - `full` Element container optimizes for filling its container bounds.\n */\nexport type Container = 'inline' | 'flat' | 'inset' | 'full';\n\n/** Controls the visual density of an element to match its context and available space.\n * - `compact` - Reduces visual weight and spacing for dense layouts or secondary elements with less visual prominence.\n * - `default` - Standard size that works well in most contexts and provides balanced visibility.\n */\nexport type Density = 'compact' | 'default';\n\n/** Communicates the intent and semantic meaning of an element to help users understand the outcome of their actions.\n * - `accent` - Highlights important actions or draws attention to primary interactive elements.\n * - `warning` - Indicates cautionary actions that require careful consideration before proceeding.\n * - `success` - Represents positive outcomes, confirmations, or constructive actions.\n * - `danger` - Signals destructive or irreversible actions that need extra attention and confirmation.\n */\nexport type SupportStatus = 'accent' | 'warning' | 'success' | 'danger';\n\n/** Controls how the chart connects intermediate values between points in a data series.\n * - `linear` - Connects points with straight line segments.\n * - `smooth` - Connects points with smooth bezier curves.\n * - `step` - Connects points with horizontal and vertical step segments.\n */\nexport type Interpolation = 'linear' | 'smooth' | 'step';\n\n/** Determines the orientation of an element. */\nexport type Orientation = 'vertical' | 'horizontal';\n\n/** Communicates the current state of a task or process to keep users informed of progress and outcomes.\n * - `scheduled` - Task has a scheduled future execution at a specific time.\n * - `queued` - Task is waiting in line to begin after other tasks complete.\n * - `pending` - Task is awaiting approval, user input, or external conditions before proceeding.\n * - `starting` - Task is initializing and preparing to begin active execution.\n * - `running` - Task is actively executing and making progress.\n * - `restarting` - Task restarts after an interruption or reset.\n * - `stopping` - Task is gracefully shutting down and completing cleanup operations.\n * - `finished` - Task has completed successfully with the expected outcome.\n * - `failed` - Task encountered an error and did not complete as intended.\n * - `unknown` - Task status remains unknown or unavailable.\n * - `ignored` - Task was intentionally skipped or excluded from execution.\n */\nexport type TaskStatus =\n | 'scheduled'\n | 'queued'\n | 'pending'\n | 'starting'\n | 'running'\n | 'restarting'\n | 'stopping'\n | 'finished'\n | 'failed'\n | 'unknown'\n | 'ignored';\n\n/**\n * https://open-ui.org/components/popup.research.explainer#api-shape\n * - `auto` light dismiss, focus on open, return to trigger\n * - `manual` no light dismiss, no auto focus\n * - `hint` no light dismiss, no auto focus, open/close on hover/focus\n */\nexport type PopoverType = 'auto' | 'manual' | 'hint' | 'inline';\n\nexport type InterestEvent = Event & {\n source: HTMLElement;\n};\n\n/** Controls how the popover aligns along the edge of its anchor element.\n * - `start` - Aligns the popover to the beginning edge of the anchor for left or top alignment.\n * - `end` - Aligns the popover to the ending edge of the anchor for right or bottom alignment.\n * - `center` - Centers the popover along the anchor's edge for balanced positioning.\n */\nexport type PopoverAlign = 'start' | 'end' | 'center';\n\n/** Determines the popover position relative to its assigned anchor and alignment.\n * - `top` - Positions the popover above the anchor element.\n * - `bottom` - Positions the popover below the anchor element.\n * - `left` - Positions the popover to the left side of the anchor element.\n * - `right` - Positions the popover to the right side of the anchor element.\n */\nexport type PopoverSides = 'top' | 'bottom' | 'left' | 'right';\n\n/** Controls the placement of the popover relative to its anchor element.\n * - `center` - Centers the popover directly over the anchor element.\n * - `top` - Positions the popover above the anchor element.\n * - `bottom` - Positions the popover below the anchor element.\n * - `left` - Positions the popover to the left side of the anchor element.\n * - `right` - Positions the popover to the right side of the anchor element.\n */\nexport type PopoverPosition = 'center' | 'top' | 'bottom' | 'left' | 'right';\n\n/** Determines the position of an element relative to its anchor */\nexport type Placement = PopoverPosition | `${PopoverSides}-${PopoverAlign}`;\n\n/** Controls the directional arrangement and spacing behavior of the element's content.\n * - `vertical` - Arranges content in a vertical stack with block-level spacing.\n * - `vertical-inline` - Arranges content vertically with compact inline spacing for dense layouts.\n * - `horizontal` - Arranges content in a horizontal row with block-level spacing.\n * - `horizontal-inline` - Arranges content horizontally with compact inline spacing.\n */\nexport type ControlLayout = 'vertical' | 'vertical-inline' | 'horizontal' | 'horizontal-inline';\n\n/** Indicates the element that represents the user's current location or position within a set. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n * - `page` - Marks the current page within a set of navigation links.\n * - `step` - Marks the current step within a multi-step process or workflow.\n */\nexport type Current = 'page' | 'step';\n\n/** Controls how data points are visually encoded in a sparkline chart.\n * - `line` - Renders data as a connected line to emphasize macro trend.\n * - `area` - Renders data as a filled area beneath a line to emphasize magnitude over time.\n * - `gradient` - Renders a line with gradient color treatment to communicate value intensity across the series.\n * - `column` - Renders data as vertical columns for easy comparison of discrete values.\n * - `winloss` - Renders outcomes as binary or ternary bars to highlight wins, losses, and optional ties.\n */\nexport type SparklineMark = 'line' | 'area' | 'gradient' | 'column' | 'winloss';\n\nexport interface NveElement {\n /**\n * This Boolean attribute prevents the user from interacting with the element: it cannot receive press or focus events. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-disabled)\n * - `true` - The element has a disabled state and does not accept interaction.\n * - `false` - The element has an enabled state and accepts interaction.\n */\n disabled?: boolean;\n\n /** Indicates whether the element is currently actively engaged through user interaction. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/:active)\n * - `true` - The user is pressing or activating the element (mousedown, keydown, or touch).\n * - `false` - No active user engagement on the element.\n */\n active?: boolean;\n\n /** Indicates whether collapsible content is currently visible or hidden from the user. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n * - `true` - The associated content expands and becomes visible to the user.\n * - `false` - The associated content collapses and hides from the user.\n */\n expanded?: boolean;\n\n /** Indicates the current state of a toggle button that switches on or off. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-pressed)\n * - `true` - The button is in the pressed (on) state and the associated action or setting is active.\n * - `false` - The button is in the unpressed (off) state and the associated action or setting is inactive.\n */\n pressed?: boolean;\n\n /** Indicates whether an element currently holds selection within a multi-option selection group. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n * - `true` - The element holds selection and represents the user's current choice within the group.\n * - `false` - The element does not hold selection and the user can choose it.\n */\n selected?: boolean;\n\n /** Indicates whether the user can change the element's value while it remains visible and focusable. [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly)\n * - `true` - The element has a readonly state: the user cannot change its value, but can still focus and copy it.\n * - `false` - The element allows editing and the user can change its value through interaction.\n */\n readOnly?: boolean;\n\n /** Defines the value associated with the element's name when submitting the form data. The server receives this value in params when the form submits through this button. [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value) */\n value?: string;\n\n /** The name of the element, submitted as a pair with the element value as part of the form data. [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-name) */\n name?: string;\n\n /** Indicates whether the user can dismiss or close the element.\n * - `true` - The element displays a close control and the user can dismiss it.\n * - `false` - The user cannot close the element and must dismiss it programmatically.\n */\n closable?: boolean;\n\n /** Enables updating internal string values for internationalization. */\n i18n?: Partial<I18nStrings & { __set: boolean }>;\n\n /** Indicates the element that represents the user's current location or position within a set. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n * - `page` - Marks the current page within a set of navigation links.\n * - `step` - Marks the current step within a multi-step process or workflow.\n */\n current?: 'page' | 'step';\n\n /** Controls the horizontal alignment of the element within its container, respecting the text direction. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Box_alignment_in_grid_layout#the_two_axes_of_a_grid_layout)\n * - `start` - Aligns the element to the beginning of the inline axis (left in LTR, right in RTL).\n * - `center` - Centers the element along the inline axis for balanced visual positioning.\n * - `end` - Aligns the element to the end of the inline axis (right in LTR, left in RTL).\n */\n inlinePosition?: 'start' | 'center' | 'end';\n\n /** Controls the vertical alignment of the element within its container. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Box_alignment_in_grid_layout#the_two_axes_of_a_grid_layout)\n * - `start` - Aligns the element to the top of the block axis for top-aligned positioning.\n * - `center` - Centers the element along the block axis for balanced vertical positioning.\n * - `end` - Aligns the element to the bottom of the block axis for bottom-aligned positioning.\n */\n blockPosition?: 'start' | 'center' | 'end';\n\n /** Controls the directional arrangement and spacing behavior of the element's content.\n * - `vertical` - Arranges content in a vertical stack with block-level spacing.\n * - `vertical-inline` - Arranges content vertically with compact inline spacing for dense layouts.\n * - `horizontal` - Arranges content in a horizontal row with block-level spacing.\n * - `horizontal-inline` - Arranges content horizontally with compact inline spacing.\n */\n layout?: 'vertical' | 'vertical-inline' | 'horizontal' | 'horizontal-inline';\n\n /** Controls the directional flow of the element's layout and interaction pattern.\n * - `vertical` - Element orients vertically with top-to-bottom flow.\n * - `horizontal` - Element orients horizontally with left-to-right flow.\n */\n orientation?: 'vertical' | 'horizontal';\n\n /** Controls the visual prominence to establish hierarchy and guide user attention.\n * - `emphasis` - Increases visual weight to draw attention and highlight important elements.\n * - `muted` - Reduces visual weight for supporting content that should remain subtle and unobtrusive.\n */\n prominence?: 'emphasis' | 'muted';\n\n /** The Interaction type provides a way to show the intent of an interactive element. This can help users quickly understand what each interaction does and reduce the potential for confusion or errors.\n * - `emphasis` Shows the interaction targets emphasis or highlighting primary actions.\n * - `destructive` Shows the interaction targets destructive actions such as deleting or removing.\n */\n interaction?: 'emphasis' | 'destructive';\n\n /** Defines a base color from the theme color palette */\n color?:\n | 'red-cardinal'\n | 'gray-slate'\n | 'gray-denim'\n | 'blue-indigo'\n | 'blue-cobalt'\n | 'blue-sky'\n | 'teal-cyan'\n | 'green-mint'\n | 'teal-seafoam'\n | 'green-grass'\n | 'yellow-amber'\n | 'orange-pumpkin'\n | 'red-tomato'\n | 'pink-magenta'\n | 'purple-plum'\n | 'purple-violet'\n | 'purple-lavender'\n | 'pink-rose'\n | 'green-jade'\n | 'lime-pear'\n | 'yellow-nova'\n | 'brand-green';\n\n /** Communicates the intent and semantic meaning of an element to help users understand the outcome of their actions.\n * - `accent` - Highlights important actions or draws attention to primary interactive elements.\n * - `warning` - Indicates cautionary actions that require careful consideration before proceeding.\n * - `success` - Represents positive outcomes, confirmations, or constructive actions.\n * - `danger` - Signals destructive or irreversible actions that need extra attention and confirmation.\n */\n status?: 'accent' | 'warning' | 'success' | 'danger';\n\n /** Controls the visual scale of an element to match its importance and available space.\n * - `sm` - Compact size for dense layouts or secondary elements with less visual prominence.\n * - `md` - Standard size that works well in most contexts and provides balanced visibility.\n * - `lg` - Larger size for emphasizing important elements or improving touch targets in spacious layouts.\n */\n size?: 'sm' | 'md' | 'lg';\n\n /**\n * Demonstrates different container styles to accommodate visual weight and context.\n * - `flat` Element has white space bounds but reduced visual container.\n * - `inline` Element container reduces to fit within inline content such as a block of text.\n * - `inset` Element container optimizes for embedding or inset placement inside another containing element.\n * - `full` Element container optimizes for filling its container bounds.\n */\n container?: 'inline' | 'flat' | 'inset' | 'full';\n\n /** Determines the position of an element along both inline and block axis. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Box_alignment_in_grid_layout#the_two_axes_of_a_grid_layout) */\n position?:\n | 'top-start'\n | 'top-end'\n | 'top-center'\n | 'bottom-start'\n | 'bottom-end'\n | 'bottom-center'\n | 'left-start'\n | 'left-end'\n | 'left-center'\n | 'right-start'\n | 'right-end'\n | 'right-center';\n\n /** Determines the alignment of the popover relative to the provided anchor element. */\n alignment?: 'start' | 'end' | 'center';\n\n /** Provides the element that the popover should position relative to. Set the property to an element or its ID within the same render root. The HTML attribute accepts only the element ID. */\n anchor?: string | HTMLElement;\n\n /** Defines the element that triggers an `open` interaction event. Set the property to an element or its ID within the same render root. The HTML attribute accepts only the element ID. */\n trigger?: string | HTMLElement;\n\n /** Defines named content areas where users can insert custom markup into the element.\n * - `default` - The primary content area for the element.\n * - `prefix` - Content that appears before the main element content.\n * - `suffix` - Content that appears after the main element content.\n * - `header` - Content that appears at the top of the element, used for titles or introductory information.\n * - `footer` - Content that appears at the bottom of the element, used for supplementary information or actions.\n * - `actions` - Content area specifically for interactive controls like buttons or links.\n * - `icon` - Content area for displaying an icon that represents the element's purpose or state.\n */\n slots?: 'default' | 'prefix' | 'suffix' | 'header' | 'footer' | 'actions' | 'icon';\n\n /**\n * Sets the automatic dismissal time in milliseconds before the element emits a `close` event. Allow ~200-250ms per word for comfortable reading.\n * - `0` - Warning or error messages requiring immediate acknowledgment.\n * - `3000` - Brief success or confirmation messages.\n * - `7000` - Standard informational messages.\n * - `10000` - Messages with actions or requiring user decision.\n */\n closeTimeout?: number;\n\n /**\n * Sets the delay in milliseconds before the element emits an `open` event.\n * - `0` - Keyboard focus interactions (always immediate for accessibility).\n * - `500` - Dense interfaces with many tooltips to reduce visual noise and prevent accidental triggers.\n */\n openDelay?: number;\n\n /** @private An instance of `ElementInternals` that decorators/controllers set dynamically */\n _internals: ElementInternals;\n\n render: TemplateResult;\n}\n\n/** Defines named content areas where users can insert custom markup into the element.\n * - `default` - The primary content area for the element.\n * - `prefix` - Content that appears before the main element content.\n * - `suffix` - Content that appears after the main element content.\n * - `header` - Content that appears at the top of the element, used for titles or introductory information.\n * - `footer` - Content that appears at the bottom of the element, used for supplementary information or actions.\n * - `actions` - Content area specifically for interactive controls like buttons or links.\n * - `icon` - Content area for displaying an icon that represents the element's purpose or state.\n */\nexport type SlotName = 'default' | 'prefix' | 'suffix' | 'header' | 'footer' | 'actions' | 'icon';\n\n/** The Interaction type provides a way to show the intent of an interactive element. This can help users quickly understand what each interaction does and reduce the potential for confusion or errors.\n * - `emphasis` Shows the interaction targets emphasis or highlighting primary actions.\n * - `destructive` Shows the interaction targets destructive actions such as deleting or removing.\n */\nexport type Interaction = 'emphasis' | 'destructive';\n\nexport interface ContainerElement {\n container?: Partial<Container>;\n}\n\n/** An element that renders complex data structures (e.g., arrays, series, matrices) rather than composable UI content and values expressible with primitive attributes. */\nexport interface DataElement<T extends unknown[] | Record<string, unknown>> {\n data?: T;\n}\n\nexport const statusIcons: { [key: string]: IconName } = {\n '': 'information-circle',\n undefined: 'information-circle',\n default: 'information-circle',\n accent: 'information-circle',\n warning: 'exclamation-triangle',\n success: 'checkmark-circle',\n danger: 'exclamation-circle',\n scheduled: 'clock',\n failed: 'x-circle',\n finished: 'checkmark-circle',\n unknown: 'question-mark-circle',\n queued: 'bar-pill-stack',\n running: 'running',\n restarting: 'refresh',\n stopping: 'stop-sign',\n pending: 'circle-dash',\n starting: 'circle-dot',\n ignored: 'circle-angled-line'\n} as const;\n\ndeclare global {\n interface HTMLElement {\n 'nve-text': string;\n 'nve-layout': string;\n }\n\n interface CustomElementRegistry {\n initialize(root: ShadowRoot | Document): void;\n }\n\n var CustomElementRegistry: {\n new (): CustomElementRegistry;\n prototype: CustomElementRegistry;\n };\n}\n\nexport interface Point {\n x: number;\n y: number;\n}\n\nexport interface OffsetPoint {\n offsetX: number;\n offsetY: number;\n}\n\nexport interface Dimensions {\n width: number;\n height: number;\n}\n\nexport type Rect = Point & Dimensions;\n\nexport interface Scale {\n min: number;\n max: number;\n}\n\n/** https://github.com/tc39/proposal-decorators */\n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\nexport type LegacyDecoratorTarget = Function & {\n addInitializer?: (initializer: (instance: any) => void) => void; // eslint-disable-line @typescript-eslint/no-explicit-any\n};\n"],"mappings":";AAqZA,IAAa,IAA2C;CACtD,IAAI;CACJ,WAAW;CACX,SAAS;CACT,QAAQ;CACR,SAAS;CACT,SAAS;CACT,QAAQ;CACR,WAAW;CACX,QAAQ;CACR,UAAU;CACV,SAAS;CACT,QAAQ;CACR,SAAS;CACT,YAAY;CACZ,UAAU;CACV,SAAS;CACT,UAAU;CACV,SAAS;AACX"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/internal/types/index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { TemplateResult } from 'lit';\nimport type { IconName } from './icons.js';\nimport type { I18nStrings } from '@nvidia-elements/foundations/internal/i18n';\n\nexport type Color =\n | 'red-cardinal'\n | 'gray-slate'\n | 'gray-denim'\n | 'blue-indigo'\n | 'blue-cobalt'\n | 'blue-sky'\n | 'teal-cyan'\n | 'green-mint'\n | 'teal-seafoam'\n | 'green-grass'\n | 'yellow-amber'\n | 'orange-pumpkin'\n | 'red-tomato'\n | 'pink-magenta'\n | 'purple-plum'\n | 'purple-violet'\n | 'purple-lavender'\n | 'pink-rose'\n | 'green-jade'\n | 'lime-pear'\n | 'yellow-nova'\n | 'brand-green';\n\n/** Controls the visual scale of an element to match its importance and available space.\n * - `sm` - Compact size for dense layouts or secondary elements with less visual prominence.\n * - `md` - Standard size that works well in most contexts and provides balanced visibility.\n * - `lg` - Larger size for emphasizing important elements or improving touch targets in spacious layouts.\n */\nexport type Size = 'sm' | 'md' | 'lg';\n\n/** Controls the visual scale of an element to match its importance and available space.\n * - `xs` - Extra small size for minimal elements or highly dense layouts.\n * - `sm` - Compact size for dense layouts or secondary elements with less visual prominence.\n * - `md` - Standard size that works well in most contexts and provides balanced visibility.\n * - `lg` - Larger size for emphasizing important elements or improving touch targets in spacious layouts.\n * - `xl` - Extra large size for emphasizing elements or sparse layouts.\n */\nexport type SizeExpanded = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/** Controls the visual prominence to establish hierarchy and guide user attention.\n * - `emphasis` - Increases visual weight to draw attention and highlight important elements.\n * - `muted` - Reduces visual weight for supporting content that should remain subtle and unobtrusive.\n */\nexport type Prominence = 'emphasis' | 'muted';\n\n/**\n * Determines the container bounds of the element\n * - `flat` Element has white space bounds but reduced visual container.\n * - `inline` Element container reduces to fit within inline content such as a block of text.\n * - `inset` Element container optimizes for embedding or inset placement inside another containing element.\n * - `full` Element container optimizes for filling its container bounds.\n */\nexport type Container = 'inline' | 'flat' | 'inset' | 'full';\n\n/** Controls the visual density of an element to match its context and available space.\n * - `compact` - Reduces visual weight and spacing for dense layouts or secondary elements with less visual prominence.\n * - `default` - Standard size that works well in most contexts and provides balanced visibility.\n */\nexport type Density = 'compact' | 'default';\n\n/** Communicates the intent and semantic meaning of an element to help users understand the outcome of their actions.\n * - `accent` - Highlights important actions or draws attention to primary interactive elements.\n * - `warning` - Indicates cautionary actions that require careful consideration before proceeding.\n * - `success` - Represents positive outcomes, confirmations, or constructive actions.\n * - `danger` - Signals destructive or irreversible actions that need extra attention and confirmation.\n */\nexport type SupportStatus = 'accent' | 'warning' | 'success' | 'danger';\n\n/** Controls how the chart connects intermediate values between points in a data series.\n * - `linear` - Connects points with straight line segments.\n * - `smooth` - Connects points with smooth bezier curves.\n * - `step` - Connects points with horizontal and vertical step segments.\n */\nexport type Interpolation = 'linear' | 'smooth' | 'step';\n\n/** Determines the orientation of an element. */\nexport type Orientation = 'vertical' | 'horizontal';\n\n/** Communicates the current state of a task or process to keep users informed of progress and outcomes.\n * - `scheduled` - Task has a scheduled future execution at a specific time.\n * - `queued` - Task is waiting in line to begin after other tasks complete.\n * - `pending` - Task is awaiting approval, user input, or external conditions before proceeding.\n * - `starting` - Task is initializing and preparing to begin active execution.\n * - `running` - Task is actively executing and making progress.\n * - `restarting` - Task restarts after an interruption or reset.\n * - `stopping` - Task is gracefully shutting down and completing cleanup operations.\n * - `finished` - Task has completed successfully with the expected outcome.\n * - `failed` - Task encountered an error and did not complete as intended.\n * - `unknown` - Task status remains unknown or unavailable.\n * - `ignored` - Task was intentionally skipped or excluded from execution.\n */\nexport type TaskStatus =\n | 'scheduled'\n | 'queued'\n | 'pending'\n | 'starting'\n | 'running'\n | 'restarting'\n | 'stopping'\n | 'finished'\n | 'failed'\n | 'unknown'\n | 'ignored';\n\n/**\n * https://open-ui.org/components/popup.research.explainer#api-shape\n * - `auto` light dismiss, focus on open, return to trigger\n * - `manual` no light dismiss, no auto focus\n * - `hint` no light dismiss, no auto focus, open/close on hover/focus\n */\nexport type PopoverType = 'auto' | 'manual' | 'hint' | 'inline';\n\nexport type InterestEvent = Event & {\n source: HTMLElement;\n};\n\n/** Controls how the popover aligns along the edge of its anchor element.\n * - `start` - Aligns the popover to the beginning edge of the anchor for left or top alignment.\n * - `end` - Aligns the popover to the ending edge of the anchor for right or bottom alignment.\n * - `center` - Centers the popover along the anchor's edge for balanced positioning.\n */\nexport type PopoverAlign = 'start' | 'end' | 'center';\n\n/** Determines the popover position relative to its assigned anchor and alignment.\n * - `top` - Positions the popover above the anchor element.\n * - `bottom` - Positions the popover below the anchor element.\n * - `left` - Positions the popover to the left side of the anchor element.\n * - `right` - Positions the popover to the right side of the anchor element.\n */\nexport type PopoverSides = 'top' | 'bottom' | 'left' | 'right';\n\n/** Controls the placement of the popover relative to its anchor element.\n * - `center` - Centers the popover directly over the anchor element.\n * - `top` - Positions the popover above the anchor element.\n * - `bottom` - Positions the popover below the anchor element.\n * - `left` - Positions the popover to the left side of the anchor element.\n * - `right` - Positions the popover to the right side of the anchor element.\n */\nexport type PopoverPosition = 'center' | 'top' | 'bottom' | 'left' | 'right';\n\n/** Determines the position of an element relative to its anchor */\nexport type Placement = PopoverPosition | `${PopoverSides}-${PopoverAlign}`;\n\n/** Controls the directional arrangement and spacing behavior of the element's content.\n * - `vertical` - Arranges content in a vertical stack with block-level spacing.\n * - `vertical-inline` - Arranges content vertically with compact inline spacing for dense layouts.\n * - `horizontal` - Arranges content in a horizontal row with block-level spacing.\n * - `horizontal-inline` - Arranges content horizontally with compact inline spacing.\n */\nexport type ControlLayout = 'vertical' | 'vertical-inline' | 'horizontal' | 'horizontal-inline';\n\n/** Indicates the element that represents the user's current location or position within a set. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n * - `page` - Marks the current page within a set of navigation links.\n * - `step` - Marks the current step within a multi-step process or workflow.\n */\nexport type Current = 'page' | 'step';\n\n/** Controls how data points are visually encoded in a sparkline chart.\n * - `line` - Renders data as a connected line to emphasize macro trend.\n * - `area` - Renders data as a filled area beneath a line to emphasize magnitude over time.\n * - `gradient` - Renders a line with gradient color treatment to communicate value intensity across the series.\n * - `column` - Renders data as vertical columns for easy comparison of discrete values.\n * - `winloss` - Renders outcomes as binary or ternary bars to highlight wins, losses, and optional ties.\n */\nexport type SparklineMark = 'line' | 'area' | 'gradient' | 'column' | 'winloss';\n\nexport interface NveElement {\n /**\n * This Boolean attribute prevents the user from interacting with the element: it cannot receive press or focus events. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-disabled)\n * - `true` - The element has a disabled state and does not accept interaction.\n * - `false` - The element has an enabled state and accepts interaction.\n */\n disabled?: boolean;\n\n /** Indicates whether the element is currently actively engaged through user interaction. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/:active)\n * - `true` - The user is pressing or activating the element (mousedown, keydown, or touch).\n * - `false` - No active user engagement on the element.\n */\n active?: boolean;\n\n /** Indicates whether collapsible content is currently visible or hidden from the user. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n * - `true` - The associated content expands and becomes visible to the user.\n * - `false` - The associated content collapses and hides from the user.\n */\n expanded?: boolean;\n\n /** Indicates the current state of a toggle button that switches on or off. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-pressed)\n * - `true` - The button is in the pressed (on) state and the associated action or setting is active.\n * - `false` - The button is in the unpressed (off) state and the associated action or setting is inactive.\n */\n pressed?: boolean;\n\n /** Indicates whether an element currently holds selection within a multi-option selection group. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n * - `true` - The element holds selection and represents the user's current choice within the group.\n * - `false` - The element does not hold selection and the user can choose it.\n */\n selected?: boolean;\n\n /** Indicates whether the user can change the element's value while it remains visible and focusable. [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly)\n * - `true` - The element has a readonly state: the user cannot change its value, but can still focus and copy it.\n * - `false` - The element allows editing and the user can change its value through interaction.\n */\n readOnly?: boolean;\n\n /** Defines the value associated with the element's name when submitting the form data. The server receives this value in params when the form submits through this button. [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value) */\n value?: string;\n\n /** The name of the element, submitted as a pair with the element value as part of the form data. [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-name) */\n name?: string;\n\n /** Indicates whether the user can dismiss or close the element.\n * - `true` - The element displays a close control and the user can dismiss it.\n * - `false` - The user cannot close the element and must dismiss it programmatically.\n */\n closable?: boolean;\n\n /** Enables updating internal string values for internationalization. */\n i18n?: Partial<I18nStrings & { __set: boolean }>;\n\n /** Indicates the element that represents the user's current location or position within a set. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n * - `page` - Marks the current page within a set of navigation links.\n * - `step` - Marks the current step within a multi-step process or workflow.\n */\n current?: 'page' | 'step';\n\n /** Controls the horizontal alignment of the element within its container, respecting the text direction. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Box_alignment_in_grid_layout#the_two_axes_of_a_grid_layout)\n * - `start` - Aligns the element to the beginning of the inline axis (left in LTR, right in RTL).\n * - `center` - Centers the element along the inline axis for balanced visual positioning.\n * - `end` - Aligns the element to the end of the inline axis (right in LTR, left in RTL).\n */\n inlinePosition?: 'start' | 'center' | 'end';\n\n /** Controls the vertical alignment of the element within its container. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Box_alignment_in_grid_layout#the_two_axes_of_a_grid_layout)\n * - `start` - Aligns the element to the top of the block axis for top-aligned positioning.\n * - `center` - Centers the element along the block axis for balanced vertical positioning.\n * - `end` - Aligns the element to the bottom of the block axis for bottom-aligned positioning.\n */\n blockPosition?: 'start' | 'center' | 'end';\n\n /** Controls the directional arrangement and spacing behavior of the element's content.\n * - `vertical` - Arranges content in a vertical stack with block-level spacing.\n * - `vertical-inline` - Arranges content vertically with compact inline spacing for dense layouts.\n * - `horizontal` - Arranges content in a horizontal row with block-level spacing.\n * - `horizontal-inline` - Arranges content horizontally with compact inline spacing.\n */\n layout?: 'vertical' | 'vertical-inline' | 'horizontal' | 'horizontal-inline';\n\n /** Controls the directional flow of the element's layout and interaction pattern.\n * - `vertical` - Element orients vertically with top-to-bottom flow.\n * - `horizontal` - Element orients horizontally with left-to-right flow.\n */\n orientation?: 'vertical' | 'horizontal';\n\n /** Controls the visual prominence to establish hierarchy and guide user attention.\n * - `emphasis` - Increases visual weight to draw attention and highlight important elements.\n * - `muted` - Reduces visual weight for supporting content that should remain subtle and unobtrusive.\n */\n prominence?: 'emphasis' | 'muted';\n\n /** The Interaction type provides a way to show the intent of an interactive element. This can help users quickly understand what each interaction does and reduce the potential for confusion or errors.\n * - `emphasis` Shows the interaction targets emphasis or highlighting primary actions.\n * - `destructive` Shows the interaction targets destructive actions such as deleting or removing.\n */\n interaction?: 'emphasis' | 'destructive';\n\n /** Defines a base color from the theme color palette */\n color?:\n | 'red-cardinal'\n | 'gray-slate'\n | 'gray-denim'\n | 'blue-indigo'\n | 'blue-cobalt'\n | 'blue-sky'\n | 'teal-cyan'\n | 'green-mint'\n | 'teal-seafoam'\n | 'green-grass'\n | 'yellow-amber'\n | 'orange-pumpkin'\n | 'red-tomato'\n | 'pink-magenta'\n | 'purple-plum'\n | 'purple-violet'\n | 'purple-lavender'\n | 'pink-rose'\n | 'green-jade'\n | 'lime-pear'\n | 'yellow-nova'\n | 'brand-green';\n\n /** Communicates the intent and semantic meaning of an element to help users understand the outcome of their actions.\n * - `accent` - Highlights important actions or draws attention to primary interactive elements.\n * - `warning` - Indicates cautionary actions that require careful consideration before proceeding.\n * - `success` - Represents positive outcomes, confirmations, or constructive actions.\n * - `danger` - Signals destructive or irreversible actions that need extra attention and confirmation.\n */\n status?: 'accent' | 'warning' | 'success' | 'danger';\n\n /** Controls the visual scale of an element to match its importance and available space.\n * - `sm` - Compact size for dense layouts or secondary elements with less visual prominence.\n * - `md` - Standard size that works well in most contexts and provides balanced visibility.\n * - `lg` - Larger size for emphasizing important elements or improving touch targets in spacious layouts.\n */\n size?: 'sm' | 'md' | 'lg';\n\n /**\n * Demonstrates different container styles to accommodate visual weight and context.\n * - `flat` Element has white space bounds but reduced visual container.\n * - `inline` Element container reduces to fit within inline content such as a block of text.\n * - `inset` Element container optimizes for embedding or inset placement inside another containing element.\n * - `full` Element container optimizes for filling its container bounds.\n */\n container?: 'inline' | 'flat' | 'inset' | 'full';\n\n /** Determines the position of an element along both inline and block axis. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Box_alignment_in_grid_layout#the_two_axes_of_a_grid_layout) */\n position?:\n | 'top-start'\n | 'top-end'\n | 'top-center'\n | 'bottom-start'\n | 'bottom-end'\n | 'bottom-center'\n | 'left-start'\n | 'left-end'\n | 'left-center'\n | 'right-start'\n | 'right-end'\n | 'right-center';\n\n /** Determines the alignment of the popover relative to the provided anchor element. */\n alignment?: 'start' | 'end' | 'center';\n\n /** Provides the element that the popover should position relative to. Set the property to an element or its ID within the same render root. The HTML attribute accepts only the element ID. */\n anchor?: string | HTMLElement;\n\n /** Defines the element that triggers an `open` interaction event. Set the property to an element or its ID within the same render root. The HTML attribute accepts only the element ID. */\n trigger?: string | HTMLElement;\n\n /** Defines named content areas where users can insert custom markup into the element.\n * - `default` - The primary content area for the element.\n * - `prefix` - Content that appears before the main element content.\n * - `suffix` - Content that appears after the main element content.\n * - `header` - Content that appears at the top of the element, used for titles or introductory information.\n * - `footer` - Content that appears at the bottom of the element, used for supplementary information or actions.\n * - `actions` - Content area specifically for interactive controls like buttons or links.\n * - `icon` - Content area for displaying an icon that represents the element's purpose or state.\n */\n slots?: 'default' | 'prefix' | 'suffix' | 'header' | 'footer' | 'actions' | 'icon';\n\n /**\n * Sets the automatic dismissal time in milliseconds before the element emits a `close` event. Allow ~200-250ms per word for comfortable reading.\n * - `0` - Warning or error messages requiring immediate acknowledgment.\n * - `3000` - Brief success or confirmation messages.\n * - `7000` - Standard informational messages.\n * - `10000` - Messages with actions or requiring user decision.\n */\n closeTimeout?: number;\n\n /**\n * Sets the delay in milliseconds before the element emits an `open` event.\n * - `0` - Keyboard focus interactions (always immediate for accessibility).\n * - `500` - Dense interfaces with many tooltips to reduce visual noise and prevent accidental triggers.\n */\n openDelay?: number;\n\n /** @private An instance of `ElementInternals` that decorators/controllers set dynamically */\n _internals: ElementInternals;\n\n render: TemplateResult;\n}\n\n/** Defines named content areas where users can insert custom markup into the element.\n * - `default` - The primary content area for the element.\n * - `prefix` - Content that appears before the main element content.\n * - `suffix` - Content that appears after the main element content.\n * - `header` - Content that appears at the top of the element, used for titles or introductory information.\n * - `footer` - Content that appears at the bottom of the element, used for supplementary information or actions.\n * - `actions` - Content area specifically for interactive controls like buttons or links.\n * - `icon` - Content area for displaying an icon that represents the element's purpose or state.\n */\nexport type SlotName = 'default' | 'prefix' | 'suffix' | 'header' | 'footer' | 'actions' | 'icon';\n\n/** The Interaction type provides a way to show the intent of an interactive element. This can help users quickly understand what each interaction does and reduce the potential for confusion or errors.\n * - `emphasis` Shows the interaction targets emphasis or highlighting primary actions.\n * - `destructive` Shows the interaction targets destructive actions such as deleting or removing.\n */\nexport type Interaction = 'emphasis' | 'destructive';\n\nexport interface ContainerElement {\n container?: Partial<Container>;\n}\n\n/** An element that renders complex data structures (e.g., arrays, series, matrices) rather than composable UI content and values expressible with primitive attributes. */\nexport interface DataElement<T extends unknown[] | Record<string, unknown>> {\n data?: T;\n}\n\nexport const statusIcons: { [key: string]: IconName } = {\n '': 'information-circle',\n undefined: 'information-circle',\n default: 'information-circle',\n accent: 'information-circle',\n warning: 'exclamation-triangle',\n success: 'checkmark-circle',\n danger: 'exclamation-circle',\n scheduled: 'clock',\n failed: 'x-circle',\n finished: 'checkmark-circle',\n unknown: 'question-mark-circle',\n queued: 'bar-pill-stack',\n running: 'running',\n restarting: 'refresh',\n stopping: 'stop-sign',\n pending: 'circle-dash',\n starting: 'circle-dot',\n ignored: 'circle-angled-line'\n} as const;\n\ndeclare global {\n interface HTMLElement {\n 'nve-text': string;\n 'nve-layout': string;\n }\n\n interface CustomElementRegistry {\n initialize(root: ShadowRoot | Document): void;\n }\n\n var CustomElementRegistry: {\n new (): CustomElementRegistry;\n prototype: CustomElementRegistry;\n };\n}\n\nexport interface Point {\n x: number;\n y: number;\n}\n\nexport interface OffsetPoint {\n offsetX: number;\n offsetY: number;\n}\n\nexport interface Dimensions {\n width: number;\n height: number;\n}\n\nexport type Rect = Point & Dimensions;\n\nexport interface Scale {\n min: number;\n max: number;\n}\n\n/** https://github.com/tc39/proposal-decorators */\n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\nexport type LegacyDecoratorTarget = Function & {\n addInitializer?: (initializer: (instance: any) => void) => void; // eslint-disable-line @typescript-eslint/no-explicit-any\n};\n"],"mappings":";AAqZA,IAAa,IAA2C;CACtD,IAAI;CACJ,WAAW;CACX,SAAS;CACT,QAAQ;CACR,SAAS;CACT,SAAS;CACT,QAAQ;CACR,WAAW;CACX,QAAQ;CACR,UAAU;CACV,SAAS;CACT,QAAQ;CACR,SAAS;CACT,YAAY;CACZ,UAAU;CACV,SAAS;CACT,UAAU;CACV,SAAS;AACX"}
|
package/dist/logo/logo2.js
CHANGED
package/dist/menu/menu-group2.js
CHANGED
package/dist/menu/menu-item2.js
CHANGED
package/dist/menu/menu2.js
CHANGED
package/dist/month/month.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ContainerElement } from '@nvidia-elements/core/internal';
|
|
2
2
|
import { Control } from '@nvidia-elements/core/forms';
|
|
3
3
|
import { IconButton } from '@nvidia-elements/core/icon-button';
|
|
4
|
+
import type { I18nDefaults } from '@nvidia-elements/foundations/internal/i18n';
|
|
4
5
|
/**
|
|
5
6
|
* @element nve-month
|
|
6
7
|
* @description A month picker is a control that enables users to choose a month value.
|
|
@@ -18,6 +19,7 @@ import { IconButton } from '@nvidia-elements/core/icon-button';
|
|
|
18
19
|
* @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/month
|
|
19
20
|
*/
|
|
20
21
|
export declare class Month extends Control implements ContainerElement {
|
|
22
|
+
protected get i18nDefaults(): I18nDefaults;
|
|
21
23
|
/**
|
|
22
24
|
* Reduces the visual container for a minimal borderless appearance while preserving whitespace bounds.
|
|
23
25
|
* Use when embedding within another container such as a toolbar.
|
package/dist/month/month2.js
CHANGED
|
@@ -8,7 +8,10 @@ import o from "./month.js";
|
|
|
8
8
|
import { html as s } from "lit";
|
|
9
9
|
import { property as c } from "lit/decorators/property.js";
|
|
10
10
|
//#region src/month/month.ts
|
|
11
|
-
var l = class extends r {
|
|
11
|
+
var l = { expand: "expand" }, u = class extends r {
|
|
12
|
+
get i18nDefaults() {
|
|
13
|
+
return l;
|
|
14
|
+
}
|
|
12
15
|
static {
|
|
13
16
|
this.styles = t([
|
|
14
17
|
...r.styles,
|
|
@@ -19,7 +22,7 @@ var l = class extends r {
|
|
|
19
22
|
static {
|
|
20
23
|
this.metadata = {
|
|
21
24
|
tag: "nve-month",
|
|
22
|
-
version: "2.19.
|
|
25
|
+
version: "2.19.1"
|
|
23
26
|
};
|
|
24
27
|
}
|
|
25
28
|
static {
|
|
@@ -32,8 +35,8 @@ var l = class extends r {
|
|
|
32
35
|
n([c({
|
|
33
36
|
type: String,
|
|
34
37
|
reflect: !0
|
|
35
|
-
})],
|
|
38
|
+
})], u.prototype, "container", void 0), u = n([e()], u);
|
|
36
39
|
//#endregion
|
|
37
|
-
export {
|
|
40
|
+
export { u as Month };
|
|
38
41
|
|
|
39
42
|
//# sourceMappingURL=month2.js.map
|
package/dist/month/month2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"month2.js","names":[],"sources":["../../src/month/month.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport type { ContainerElement } from '@nvidia-elements/core/internal';\nimport { scopedRegistry, useStyles } from '@nvidia-elements/core/internal';\nimport { Control } from '@nvidia-elements/core/forms';\nimport { inputStyles } from '@nvidia-elements/core/input';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport styles from './month.css?inline';\n\n/**\n * @element nve-month\n * @description A month picker is a control that enables users to choose a month value.\n * @documentation https://nvidia.github.io/elements/docs/elements/month/\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/month\n * @cssprop --padding\n * @cssprop --font-size\n * @cssprop --height\n * @cssprop --background\n * @cssprop --border-radius\n * @cssprop --border\n * @cssprop --cursor\n * @csspart icon-button - The calendar icon button element\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/month\n */\n@scopedRegistry()\nexport class Month extends Control implements ContainerElement {\n /**\n * Reduces the visual container for a minimal borderless appearance while preserving whitespace bounds.\n * Use when embedding within another container such as a toolbar.\n */\n @property({ type: String, reflect: true }) container?: 'flat';\n\n static styles = useStyles([...Control.styles, inputStyles, styles]);\n\n static readonly metadata = {\n tag: 'nve-month',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [IconButton.metadata.tag]: IconButton\n };\n\n protected get suffixContent() {\n return html`<nve-icon-button part=\"icon-button\" .ariaLabel=${this.i18n.expand} icon-name=\"calendar\" container=\"inline\" @click=${this.showPicker}></nve-icon-button>`;\n }\n}\n"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"month2.js","names":[],"sources":["../../src/month/month.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport type { ContainerElement } from '@nvidia-elements/core/internal';\nimport { scopedRegistry, useStyles } from '@nvidia-elements/core/internal';\nimport { Control } from '@nvidia-elements/core/forms';\nimport { inputStyles } from '@nvidia-elements/core/input';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport type { I18nDefaults } from '@nvidia-elements/foundations/internal/i18n';\nimport styles from './month.css?inline';\n\nconst i18nDefaults = {\n expand: 'expand'\n} satisfies I18nDefaults;\n\n/**\n * @element nve-month\n * @description A month picker is a control that enables users to choose a month value.\n * @documentation https://nvidia.github.io/elements/docs/elements/month/\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/month\n * @cssprop --padding\n * @cssprop --font-size\n * @cssprop --height\n * @cssprop --background\n * @cssprop --border-radius\n * @cssprop --border\n * @cssprop --cursor\n * @csspart icon-button - The calendar icon button element\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/month\n */\n@scopedRegistry()\nexport class Month extends Control implements ContainerElement {\n protected override get i18nDefaults(): I18nDefaults {\n return i18nDefaults;\n }\n\n /**\n * Reduces the visual container for a minimal borderless appearance while preserving whitespace bounds.\n * Use when embedding within another container such as a toolbar.\n */\n @property({ type: String, reflect: true }) container?: 'flat';\n\n static styles = useStyles([...Control.styles, inputStyles, styles]);\n\n static readonly metadata = {\n tag: 'nve-month',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [IconButton.metadata.tag]: IconButton\n };\n\n protected get suffixContent() {\n return html`<nve-icon-button part=\"icon-button\" .ariaLabel=${this.i18n.expand} icon-name=\"calendar\" container=\"inline\" @click=${this.showPicker}></nve-icon-button>`;\n }\n}\n"],"mappings":";;;;;;;;;;AAaA,IAAM,IAAe,EACnB,QAAQ,SACV,GAmBa,IAAN,cAAoB,EAAoC;CAC7D,IAAuB,eAA6B;EAClD,OAAO;CACT;;EAQgB,KAAA,SAAA,EAAU;GAAC,GAAG,EAAQ;GAAQ;GAAa;EAAM,CAAC;;;EAEvC,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;EACX;;;EAE4B,KAAA,qBAAA,GACzB,EAAW,SAAS,MAAM,EAC7B;;CAEA,IAAc,gBAAgB;EAC5B,OAAO,CAAI,mDAAkD,KAAK,KAAK,OAAO,oDAAkD,KAAK,WAAW;CAClJ;AACF;AAhBG,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,GAV1C,IAAA,EAAA,CAAA,EAAe,CAAA,GAAA,CAAA"}
|
|
@@ -1,20 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import s from "../
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import u from "
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
1
|
+
import { attachInternals as e } from "../internal/utils/a11y.js";
|
|
2
|
+
import { TypeNativePopoverController as t } from "../internal/controllers/type-native-popover.controller.js";
|
|
3
|
+
import { scopedRegistry as n } from "../internal/decorators/scoped-registry.js";
|
|
4
|
+
import { useStyles as r } from "../internal/styles/index.js";
|
|
5
|
+
import { popoverStyles as i } from "../internal/styles/popover2.js";
|
|
6
|
+
import { statusIcons as a } from "../internal/types/index.js";
|
|
7
|
+
import o from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
8
|
+
import { Icon as s } from "../icon/icon2.js";
|
|
9
|
+
import { IconButton as c } from "../icon-button/icon-button2.js";
|
|
10
|
+
import l from "./notification.js";
|
|
11
|
+
import { LitElement as u, html as d } from "lit";
|
|
12
|
+
import { property as f } from "lit/decorators/property.js";
|
|
13
|
+
import { I18nController as p } from "@nvidia-elements/foundations/internal/i18n";
|
|
14
14
|
//#region src/notification/notification.ts
|
|
15
|
-
var m =
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
var m = {
|
|
16
|
+
close: "close",
|
|
17
|
+
danger: "danger",
|
|
18
|
+
information: "information",
|
|
19
|
+
success: "success",
|
|
20
|
+
warning: "warning"
|
|
21
|
+
}, h = class extends u {
|
|
22
|
+
constructor(...e) {
|
|
23
|
+
super(...e), this.anchor = globalThis.document?.body, this.closable = !1, this.closeTimeout = 0, this.#e = new p(this, m), this.i18n = this.#e.i18n, this.inline = !1;
|
|
18
24
|
}
|
|
19
25
|
#e;
|
|
20
26
|
get popoverType() {
|
|
@@ -26,34 +32,34 @@ var m = class extends d {
|
|
|
26
32
|
#t;
|
|
27
33
|
#n;
|
|
28
34
|
get #r() {
|
|
29
|
-
return
|
|
35
|
+
return d`<slot name="icon"><nve-icon .name="${a[this.status]}" .ariaLabel="${(this.status ? this.i18n[this.status] : void 0) ?? this.i18n.information}" part="status-icon"></nve-icon></slot>${this.closable ? d`<nve-icon-button part="icon-button" @click="${this.hidePopover}" icon-name="cancel" size="sm" container="flat" .ariaLabel="${this.i18n.close}"></nve-icon-button>` : ""}<slot></slot>`;
|
|
30
36
|
}
|
|
31
37
|
static {
|
|
32
|
-
this.styles =
|
|
38
|
+
this.styles = r([i, l]);
|
|
33
39
|
}
|
|
34
40
|
static {
|
|
35
41
|
this.metadata = {
|
|
36
42
|
tag: "nve-notification",
|
|
37
|
-
version: "2.19.
|
|
43
|
+
version: "2.19.1"
|
|
38
44
|
};
|
|
39
45
|
}
|
|
40
46
|
static {
|
|
41
47
|
this.elementDefinitions = {
|
|
42
|
-
[
|
|
43
|
-
[
|
|
48
|
+
[s.metadata.tag]: s,
|
|
49
|
+
[c.metadata.tag]: c
|
|
44
50
|
};
|
|
45
51
|
}
|
|
46
52
|
render() {
|
|
47
|
-
return
|
|
53
|
+
return d`<div internal-host>${this.#r}</div>`;
|
|
48
54
|
}
|
|
49
55
|
connectedCallback() {
|
|
50
|
-
super.connectedCallback(),
|
|
56
|
+
super.connectedCallback(), e(this), this.#n = new MutationObserver(() => this.#i()), this.#n.observe(this, { attributeFilter: ["hidden"] }), this._internals.role = "alert", this.#i();
|
|
51
57
|
}
|
|
52
58
|
disconnectedCallback() {
|
|
53
59
|
this.#a(), this.#n?.disconnect(), this.#n = void 0, super.disconnectedCallback();
|
|
54
60
|
}
|
|
55
61
|
async firstUpdated(e) {
|
|
56
|
-
super.firstUpdated(e), this.popoverInline ? this.setAttribute("nve-popover", "") : this.typeNativePopoverController = new
|
|
62
|
+
super.firstUpdated(e), this.popoverInline ? this.setAttribute("nve-popover", "") : this.typeNativePopoverController = new t(this), this.#i();
|
|
57
63
|
}
|
|
58
64
|
updated(e) {
|
|
59
65
|
super.updated(e), (e.has("closeTimeout") || e.has("container") || e.has("inline")) && this.#i();
|
|
@@ -71,27 +77,27 @@ var m = class extends d {
|
|
|
71
77
|
this.#t !== void 0 && (clearTimeout(this.#t), this.#t = void 0);
|
|
72
78
|
}
|
|
73
79
|
};
|
|
74
|
-
|
|
80
|
+
o([f({ type: String })], h.prototype, "anchor", void 0), o([f({ type: String })], h.prototype, "trigger", void 0), o([f({
|
|
75
81
|
type: String,
|
|
76
82
|
reflect: !0
|
|
77
|
-
})],
|
|
83
|
+
})], h.prototype, "position", void 0), o([f({
|
|
78
84
|
type: String,
|
|
79
85
|
reflect: !0
|
|
80
|
-
})],
|
|
86
|
+
})], h.prototype, "alignment", void 0), o([f({
|
|
81
87
|
type: Boolean,
|
|
82
88
|
reflect: !0,
|
|
83
89
|
attribute: "behavior-trigger"
|
|
84
|
-
})],
|
|
90
|
+
})], h.prototype, "behaviorTrigger", void 0), o([f({ type: Boolean })], h.prototype, "closable", void 0), o([f({
|
|
85
91
|
type: Number,
|
|
86
92
|
attribute: "close-timeout"
|
|
87
|
-
})],
|
|
93
|
+
})], h.prototype, "closeTimeout", void 0), o([f({
|
|
88
94
|
type: String,
|
|
89
95
|
reflect: !0
|
|
90
|
-
})],
|
|
96
|
+
})], h.prototype, "status", void 0), o([f({
|
|
91
97
|
type: String,
|
|
92
98
|
reflect: !0
|
|
93
|
-
})],
|
|
99
|
+
})], h.prototype, "container", void 0), o([f({ type: Object })], h.prototype, "i18n", void 0), o([f({ type: Boolean })], h.prototype, "inline", void 0), h = o([n()], h);
|
|
94
100
|
//#endregion
|
|
95
|
-
export {
|
|
101
|
+
export { h as Notification };
|
|
96
102
|
|
|
97
103
|
//# sourceMappingURL=notification2.js.map
|