@nvidia-elements/core 2.14.0 → 2.15.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/CHANGELOG.md +10 -0
- package/dist/accordion/accordion2.js +4 -4
- package/dist/alert/alert-group2.js +1 -1
- package/dist/alert/alert2.js +1 -1
- package/dist/avatar/avatar-group2.js +1 -1
- package/dist/avatar/avatar2.js +1 -1
- package/dist/badge/badge2.js +1 -1
- package/dist/breadcrumb/breadcrumb2.js +1 -1
- package/dist/bundle.d.ts +2 -0
- package/dist/bundles/index.d.ts +30 -0
- package/dist/bundles/index.js +6 -6
- 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/color2.js +1 -1
- package/dist/combobox/combobox2.js +1 -1
- package/dist/copy-button/copy-button2.js +1 -1
- package/dist/custom-elements-jsx.d.ts +90 -0
- package/dist/custom-elements-vue.d.ts +87 -0
- package/dist/custom-elements.json +746 -0
- package/dist/data.html.json +99 -0
- package/dist/date/date2.js +1 -1
- package/dist/datetime/datetime2.js +1 -1
- package/dist/dialog/dialog-footer2.js +1 -1
- package/dist/dialog/dialog-header2.js +1 -1
- package/dist/dialog/dialog2.js +1 -1
- package/dist/divider/divider2.js +1 -1
- package/dist/dot/dot2.js +1 -1
- package/dist/drag-handle/define.d.ts +6 -0
- package/dist/drag-handle/define.js +7 -0
- package/dist/drag-handle/define.js.map +1 -0
- package/dist/drag-handle/drag-handle.d.ts +33 -0
- package/dist/drag-handle/drag-handle.examples.js +6 -0
- package/dist/drag-handle/drag-handle.examples.js.map +1 -0
- package/dist/drag-handle/drag-handle.examples.json +33 -0
- package/dist/drag-handle/drag-handle.js +6 -0
- package/dist/drag-handle/drag-handle.js.map +1 -0
- package/dist/drag-handle/drag-handle2.js +51 -0
- package/dist/drag-handle/drag-handle2.js.map +1 -0
- package/dist/drag-handle/index.d.ts +1 -0
- package/dist/drag-handle/index.js +2 -0
- 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 +1 -1
- package/dist/dropdown/dropdown-footer2.js +1 -1
- package/dist/dropdown/dropdown-header2.js +1 -1
- package/dist/dropdown/dropdown2.js +1 -1
- package/dist/dropdown-group/dropdown-group.js +1 -1
- package/dist/dropzone/dropzone2.js +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/control2.js +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 +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/index.js +1 -1
- package/dist/input/input-group2.js +1 -1
- package/dist/input/input2.js +1 -1
- package/dist/internal/services/global.service.js +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/month2.js +1 -1
- package/dist/notification/notification-group2.js +1 -1
- package/dist/notification/notification2.js +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-panel2.js +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 +1 -1
- package/dist/panel/panel2.js +4 -4
- package/dist/password/password2.js +1 -1
- package/dist/preferences-input/preferences-input2.js +1 -1
- package/dist/progress-bar/progress-bar2.js +1 -1
- package/dist/progress-ring/progress-ring2.js +1 -1
- package/dist/progressive-filter-chip/progressive-filter-chip2.js +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 +1 -1
- package/dist/search/search2.js +1 -1
- package/dist/select/select2.js +1 -1
- package/dist/skeleton/skeleton2.js +1 -1
- package/dist/sort-button/sort-button2.js +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/tabs2.js +2 -2
- package/dist/tag/tag2.js +1 -1
- package/dist/textarea/textarea2.js +1 -1
- package/dist/time/time2.js +1 -1
- package/dist/toast/toast2.js +1 -1
- package/dist/toggletip/toggletip-footer2.js +1 -1
- package/dist/toggletip/toggletip-header2.js +1 -1
- package/dist/toggletip/toggletip2.js +1 -1
- package/dist/toolbar/toolbar2.js +1 -1
- package/dist/tooltip/tooltip2.js +1 -1
- package/dist/tree/tree-node2.js +1 -1
- package/dist/tree/tree2.js +1 -1
- package/dist/viewport/viewport-gridlines2.js +1 -1
- package/dist/viewport/viewport-minimap2.js +1 -1
- package/dist/viewport/viewport2.js +1 -1
- package/dist/week/week2.js +1 -1
- package/package.json +14 -2
package/dist/data.html.json
CHANGED
|
@@ -1268,6 +1268,105 @@
|
|
|
1268
1268
|
}
|
|
1269
1269
|
]
|
|
1270
1270
|
},
|
|
1271
|
+
{
|
|
1272
|
+
"name": "nve-drag-handle",
|
|
1273
|
+
"description": "A draggable grip button with a native drag preview. Activation toggles the pressed state; the application controls movement.\n---\n\n\n### **CSS Properties:**\n - **--cursor** - The cursor over the handle. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor) _(default: undefined)_\n- **--color** - The grip color. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/color) _(default: undefined)_\n- **--width** - The horizontal size of the pointer target. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/width) _(default: undefined)_\n- **--height** - The vertical size of the pointer target. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/height) _(default: undefined)_\n- **--border-radius** - The handle corner radius. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius) _(default: undefined)_\n\n### **CSS Parts:**\n - **icon** - The fixed grip icon.",
|
|
1274
|
+
"attributes": [
|
|
1275
|
+
{
|
|
1276
|
+
"name": "pressed",
|
|
1277
|
+
"description": "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\n- `false` The button is in the unpressed (off) state and the associated action or setting is inactive.",
|
|
1278
|
+
"values": []
|
|
1279
|
+
},
|
|
1280
|
+
{
|
|
1281
|
+
"name": "expanded",
|
|
1282
|
+
"description": "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\n- `false` The associated content collapses and hides from the user.",
|
|
1283
|
+
"values": []
|
|
1284
|
+
},
|
|
1285
|
+
{
|
|
1286
|
+
"name": "readonly",
|
|
1287
|
+
"description": "Indicates whether the element is a noninteractive visual treatment instead of a button.\nhttps://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly",
|
|
1288
|
+
"values": []
|
|
1289
|
+
},
|
|
1290
|
+
{
|
|
1291
|
+
"name": "form",
|
|
1292
|
+
"description": "Associates the button with a form. Set the property to a form element or its ID. The HTML attribute accepts only\nthe form ID. Reading the property returns the associated form element or `null`.\nhttps://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/form",
|
|
1293
|
+
"values": []
|
|
1294
|
+
},
|
|
1295
|
+
{
|
|
1296
|
+
"name": "name",
|
|
1297
|
+
"description": "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)",
|
|
1298
|
+
"values": []
|
|
1299
|
+
},
|
|
1300
|
+
{
|
|
1301
|
+
"name": "value",
|
|
1302
|
+
"description": "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)",
|
|
1303
|
+
"values": []
|
|
1304
|
+
},
|
|
1305
|
+
{
|
|
1306
|
+
"name": "type",
|
|
1307
|
+
"description": "Defines the button behavior when associated within a form element.\nhttps://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type",
|
|
1308
|
+
"values": [
|
|
1309
|
+
{ "name": "button" },
|
|
1310
|
+
{ "name": "submit" },
|
|
1311
|
+
{ "name": "reset" }
|
|
1312
|
+
]
|
|
1313
|
+
},
|
|
1314
|
+
{
|
|
1315
|
+
"name": "disabled",
|
|
1316
|
+
"description": "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\n- `false` The element has an enabled state and accepts interaction.",
|
|
1317
|
+
"values": []
|
|
1318
|
+
},
|
|
1319
|
+
{
|
|
1320
|
+
"name": "selected",
|
|
1321
|
+
"description": "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\n- `false` The element does not hold selection and the user can choose it.",
|
|
1322
|
+
"values": []
|
|
1323
|
+
},
|
|
1324
|
+
{
|
|
1325
|
+
"name": "current",
|
|
1326
|
+
"description": "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\n- `step` Marks the current step within a multi-step process or workflow.",
|
|
1327
|
+
"values": [{ "name": "page" }, { "name": "step" }]
|
|
1328
|
+
},
|
|
1329
|
+
{
|
|
1330
|
+
"name": "popovertarget",
|
|
1331
|
+
"description": "Establishes a relationship between a popover and its invoker button.\nhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/popoverTargetElement",
|
|
1332
|
+
"values": []
|
|
1333
|
+
},
|
|
1334
|
+
{
|
|
1335
|
+
"name": "popovertargetaction",
|
|
1336
|
+
"description": "The popover target action to perform on the popover target element.\nhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/popoverTargetAction",
|
|
1337
|
+
"values": [
|
|
1338
|
+
{ "name": "show" },
|
|
1339
|
+
{ "name": "hide" },
|
|
1340
|
+
{ "name": "toggle" }
|
|
1341
|
+
]
|
|
1342
|
+
},
|
|
1343
|
+
{
|
|
1344
|
+
"name": "commandfor",
|
|
1345
|
+
"description": "The element that receives the command.\nhttps://developer.mozilla.org/en-US/docs/Web/API/Invoker_Commands_API",
|
|
1346
|
+
"values": []
|
|
1347
|
+
},
|
|
1348
|
+
{
|
|
1349
|
+
"name": "command",
|
|
1350
|
+
"description": "The command to execute on the element.\nhttps://developer.mozilla.org/en-US/docs/Web/API/Invoker_Commands_API",
|
|
1351
|
+
"values": []
|
|
1352
|
+
},
|
|
1353
|
+
{
|
|
1354
|
+
"name": "interestfor",
|
|
1355
|
+
"description": "The element that receives the interest.\nhttps://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement/interestForElement",
|
|
1356
|
+
"values": []
|
|
1357
|
+
}
|
|
1358
|
+
],
|
|
1359
|
+
"references": [
|
|
1360
|
+
{
|
|
1361
|
+
"name": "WAI-ARIA Reference",
|
|
1362
|
+
"url": "https://www.w3.org/WAI/ARIA/apg/patterns/button/"
|
|
1363
|
+
},
|
|
1364
|
+
{
|
|
1365
|
+
"name": "Documentation",
|
|
1366
|
+
"url": "https://nvidia.github.io/elements/docs/elements/drag-handle/"
|
|
1367
|
+
}
|
|
1368
|
+
]
|
|
1369
|
+
},
|
|
1271
1370
|
{
|
|
1272
1371
|
"name": "nve-drawer-content",
|
|
1273
1372
|
"description": "Contains the scrollable main body content within a drawer panel.\n---\n\n\n### **Slots:**\n - _default_ - default slot for the drawer content\n\n### **CSS Properties:**\n - **--padding** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) _(default: undefined)_\n- **--gap** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/gap) _(default: undefined)_\n- **--width** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/width) _(default: undefined)_",
|
package/dist/date/date2.js
CHANGED
package/dist/dialog/dialog2.js
CHANGED
package/dist/divider/divider2.js
CHANGED
package/dist/dot/dot2.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.js","names":[],"sources":["../../src/drag-handle/define.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { define } from '@nvidia-elements/core/internal';\nimport { DragHandle } from '@nvidia-elements/core/drag-handle';\n\ndefine(DragHandle);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nve-drag-handle': DragHandle;\n }\n}\n"],"mappings":";;;AAMA,EAAO,CAAU"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { Icon } from '@nvidia-elements/core/icon';
|
|
3
|
+
declare const DragHandle_base: import("@nvidia-elements/forms/mixins").ButtonFormControlMixinReturn<typeof LitElement>;
|
|
4
|
+
/**
|
|
5
|
+
* @element nve-drag-handle
|
|
6
|
+
* @description A draggable grip button with a native drag preview. Activation toggles the pressed state; the application controls movement.
|
|
7
|
+
* @documentation https://nvidia.github.io/elements/docs/elements/drag-handle/
|
|
8
|
+
* @since 0.0.0
|
|
9
|
+
* @entrypoint \@nvidia-elements/core/drag-handle
|
|
10
|
+
* @cssprop --cursor - The cursor over the handle.
|
|
11
|
+
* @cssprop --color - The grip color.
|
|
12
|
+
* @cssprop --width - The horizontal size of the pointer target.
|
|
13
|
+
* @cssprop --height - The vertical size of the pointer target.
|
|
14
|
+
* @cssprop --border-radius - The handle corner radius.
|
|
15
|
+
* @csspart icon - The fixed grip icon.
|
|
16
|
+
* @aria https://www.w3.org/WAI/ARIA/apg/patterns/button/
|
|
17
|
+
*/
|
|
18
|
+
export declare class DragHandle extends DragHandle_base {
|
|
19
|
+
#private;
|
|
20
|
+
static styles: import("lit").CSSResult[];
|
|
21
|
+
static readonly metadata: {
|
|
22
|
+
tag: string;
|
|
23
|
+
version: string;
|
|
24
|
+
};
|
|
25
|
+
static elementDefinitions: {
|
|
26
|
+
[Icon.metadata.tag]: typeof Icon;
|
|
27
|
+
};
|
|
28
|
+
constructor();
|
|
29
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
30
|
+
connectedCallback(): void;
|
|
31
|
+
disconnectedCallback(): void;
|
|
32
|
+
}
|
|
33
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drag-handle.examples.js","names":[],"sources":["../../src/drag-handle/drag-handle.examples.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 '@nvidia-elements/core/drag-handle/define.js';\n\nexport default {\n title: 'Elements/Drag Handle',\n component: 'nve-drag-handle'\n};\n\n/**\n * @summary Labeled grip for application-defined dragging and reordering. Use when an item needs a dedicated move control.\n */\nexport const Default = {\n render: () => html`<nve-drag-handle aria-label=\"move item\"></nve-drag-handle>`\n};\n\n/**\n * @summary Pressed grip for an item selected for movement. Use to show the handle state while the application manages reordering.\n */\nexport const Pressed = {\n render: () => html`<nve-drag-handle pressed aria-label=\"move item\"></nve-drag-handle>`\n};\n\n/**\n * @summary Disabled grip for an item that cannot move. Use to keep the control visible while movement is unavailable.\n */\nexport const Disabled = {\n render: () => html`<nve-drag-handle disabled aria-label=\"move item\"></nve-drag-handle>`\n};\n"],"mappings":";AAGA,IAAA,IAAS"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"element": "nve-drag-handle",
|
|
3
|
+
"entrypoint": "@nvidia-elements/core/drag-handle/drag-handle.examples.json",
|
|
4
|
+
"items": [
|
|
5
|
+
{
|
|
6
|
+
"id": "drag-handle",
|
|
7
|
+
"name": "Default",
|
|
8
|
+
"template": "<nve-drag-handle aria-label=\"move item\"></nve-drag-handle>\n",
|
|
9
|
+
"summary": "Labeled grip for application-defined dragging and reordering. Use when an item needs a dedicated move control.",
|
|
10
|
+
"description": "",
|
|
11
|
+
"composition": false,
|
|
12
|
+
"tags": []
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"id": "drag-handle-pressed",
|
|
16
|
+
"name": "Pressed",
|
|
17
|
+
"template": "<nve-drag-handle pressed aria-label=\"move item\"></nve-drag-handle>\n",
|
|
18
|
+
"summary": "Pressed grip for an item selected for movement. Use to show the handle state while the application manages reordering.",
|
|
19
|
+
"description": "",
|
|
20
|
+
"composition": false,
|
|
21
|
+
"tags": []
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "drag-handle-disabled",
|
|
25
|
+
"name": "Disabled",
|
|
26
|
+
"template": "<nve-drag-handle disabled aria-label=\"move item\"></nve-drag-handle>\n",
|
|
27
|
+
"summary": "Disabled grip for an item that cannot move. Use to keep the control visible while movement is unavailable.",
|
|
28
|
+
"description": "",
|
|
29
|
+
"composition": false,
|
|
30
|
+
"tags": []
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
//#region src/drag-handle/drag-handle.css?inline
|
|
2
|
+
var e = ":host{--nve-sys-interaction-state-base: transparent;--cursor: move;--color: var(--nve-sys-text-muted-color);--width: var(--nve-ref-size-800);--height: var(--nve-ref-size-800);--border-radius: var(--nve-ref-border-radius-xs);display:inline-flex;user-select:none}:host([draggable=\"true\"]){-webkit-user-drag:element}:host(:state(disabled)),:host([readonly]){-webkit-user-drag:none}[internal-host]{display:flex;align-items:center;justify-content:center;width:var(--width);height:var(--height);border-radius:var(--border-radius);cursor:var(--cursor)}nve-icon{--color: inherit;pointer-events:none}:host(:state(pressed)){--color: var(--nve-sys-interaction-selected-color)}:host(:hover:not(:state(disabled),[readonly],:state(pressed))){--color: var(--nve-sys-interaction-hover-color)}:host(:state(pressed)) [interaction-state]{--nve-sys-interaction-state-ratio: var(--nve-sys-interaction-state-ratio-selected)}@container style(--nve-sys-color-scheme: dark){:host{--nve-sys-interaction-state-ratio-selected: 16% !important;--nve-sys-interaction-state-ratio-hover: 12% !important}}:host(:state(disabled)){--color: var(--nve-sys-interaction-disabled-color);--cursor: default}:host(:state(disabled)) [interaction-state]{--nve-sys-interaction-state-ratio: 0}";
|
|
3
|
+
//#endregion
|
|
4
|
+
export { e as default };
|
|
5
|
+
|
|
6
|
+
//# sourceMappingURL=drag-handle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drag-handle.js","names":[],"sources":["../../src/drag-handle/drag-handle.css?inline"],"sourcesContent":["/* SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. */\n/* SPDX-License-Identifier: Apache-2.0 */\n\n:host {\n --nve-sys-interaction-state-base: transparent;\n --cursor: move;\n --color: var(--nve-sys-text-muted-color);\n --width: var(--nve-ref-size-800);\n --height: var(--nve-ref-size-800);\n --border-radius: var(--nve-ref-border-radius-xs);\n display: inline-flex;\n user-select: none;\n}\n\n:host([draggable='true']) {\n -webkit-user-drag: element;\n}\n\n:host(:state(disabled)),\n:host([readonly]) {\n -webkit-user-drag: none;\n}\n\n[internal-host] {\n display: flex;\n align-items: center;\n justify-content: center;\n width: var(--width);\n height: var(--height);\n border-radius: var(--border-radius);\n cursor: var(--cursor);\n}\n\nnve-icon {\n --color: inherit;\n pointer-events: none;\n}\n\n:host(:state(pressed)) {\n --color: var(--nve-sys-interaction-selected-color);\n}\n\n:host(:hover:not(:state(disabled), [readonly], :state(pressed))) {\n --color: var(--nve-sys-interaction-hover-color);\n}\n\n:host(:state(pressed)) [interaction-state] {\n --nve-sys-interaction-state-ratio: var(--nve-sys-interaction-state-ratio-selected);\n}\n\n@container style(--nve-sys-color-scheme: dark) {\n :host {\n --nve-sys-interaction-state-ratio-selected: 16% !important;\n --nve-sys-interaction-state-ratio-hover: 12% !important;\n }\n}\n\n:host(:state(disabled)) {\n --color: var(--nve-sys-interaction-disabled-color);\n --cursor: default;\n}\n\n:host(:state(disabled)) [interaction-state] {\n --nve-sys-interaction-state-ratio: 0;\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { scopedRegistry as e } from "../internal/decorators/scoped-registry.js";
|
|
2
|
+
import { useStyles as t } from "../internal/styles/index.js";
|
|
3
|
+
import n from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
4
|
+
import { Icon as r } from "../icon/icon2.js";
|
|
5
|
+
import i from "./drag-handle.js";
|
|
6
|
+
import { LitElement as a, html as o } from "lit";
|
|
7
|
+
import { ButtonFormControlMixin as s } from "@nvidia-elements/forms/mixins";
|
|
8
|
+
//#region src/drag-handle/drag-handle.ts
|
|
9
|
+
var c = class extends s(a) {
|
|
10
|
+
static {
|
|
11
|
+
this.styles = t([i]);
|
|
12
|
+
}
|
|
13
|
+
static {
|
|
14
|
+
this.metadata = {
|
|
15
|
+
tag: "nve-drag-handle",
|
|
16
|
+
version: "2.15.0"
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
static {
|
|
20
|
+
this.elementDefinitions = { [r.metadata.tag]: r };
|
|
21
|
+
}
|
|
22
|
+
constructor() {
|
|
23
|
+
super(), this.type = "button", this.pressed = !1;
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
return o`<div internal-host interaction-state focus-within><nve-icon name="drag" .appearance="${this.pressed || this.expanded ? "solid" : "outline"}" aria-hidden="true" part="icon"></nve-icon></div>`;
|
|
27
|
+
}
|
|
28
|
+
connectedCallback() {
|
|
29
|
+
super.connectedCallback(), this.setAttribute("nve-draggable", "handle"), this.hasAttribute("draggable") || (this.draggable = !0), this.addEventListener("click", this.#e), this.addEventListener("keydown", this.#r), this.addEventListener("dragstart", this.#t), this.addEventListener("dragend", this.#n);
|
|
30
|
+
}
|
|
31
|
+
disconnectedCallback() {
|
|
32
|
+
this.removeEventListener("click", this.#e), this.removeEventListener("keydown", this.#r), this.removeEventListener("dragstart", this.#t), this.removeEventListener("dragend", this.#n), super.disconnectedCallback();
|
|
33
|
+
}
|
|
34
|
+
#e = (e) => {
|
|
35
|
+
e.target !== this || e.defaultPrevented || this.disabled || this.readOnly || (this.pressed = !this.pressed);
|
|
36
|
+
};
|
|
37
|
+
#t = (e) => {
|
|
38
|
+
(this.disabled || this.readOnly) && e.preventDefault();
|
|
39
|
+
};
|
|
40
|
+
#n = () => {
|
|
41
|
+
this._internals.states.delete("active");
|
|
42
|
+
};
|
|
43
|
+
#r = (e) => {
|
|
44
|
+
e.key !== " " || e.target !== this || e.defaultPrevented || this.disabled || this.readOnly || e.preventDefault();
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
c = n([e()], c);
|
|
48
|
+
//#endregion
|
|
49
|
+
export { c as DragHandle };
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=drag-handle2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drag-handle2.js","names":[],"sources":["../../src/drag-handle/drag-handle.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement } from 'lit';\nimport { ButtonFormControlMixin } from '@nvidia-elements/forms/mixins';\nimport { Icon } from '@nvidia-elements/core/icon';\nimport { scopedRegistry, useStyles } from '@nvidia-elements/core/internal';\nimport styles from './drag-handle.css?inline';\n\n/**\n * @element nve-drag-handle\n * @description A draggable grip button with a native drag preview. Activation toggles the pressed state; the application controls movement.\n * @documentation https://nvidia.github.io/elements/docs/elements/drag-handle/\n * @since 0.0.0\n * @entrypoint \\@nvidia-elements/core/drag-handle\n * @cssprop --cursor - The cursor over the handle.\n * @cssprop --color - The grip color.\n * @cssprop --width - The horizontal size of the pointer target.\n * @cssprop --height - The vertical size of the pointer target.\n * @cssprop --border-radius - The handle corner radius.\n * @csspart icon - The fixed grip icon.\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/button/\n */\n@scopedRegistry()\nexport class DragHandle extends ButtonFormControlMixin(LitElement) {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-drag-handle',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [Icon.metadata.tag]: Icon\n };\n\n constructor() {\n super();\n this.type = 'button';\n this.pressed = false;\n }\n\n render() {\n return html`\n <div internal-host interaction-state focus-within>\n <nve-icon name=\"drag\" .appearance=${this.pressed || this.expanded ? 'solid' : 'outline'} aria-hidden=\"true\" part=\"icon\"></nve-icon>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute('nve-draggable', 'handle');\n if (!this.hasAttribute('draggable')) this.draggable = true;\n this.addEventListener('click', this.#onClick);\n this.addEventListener('keydown', this.#onKeydown);\n this.addEventListener('dragstart', this.#onDragStart);\n this.addEventListener('dragend', this.#onDragEnd);\n }\n\n disconnectedCallback() {\n this.removeEventListener('click', this.#onClick);\n this.removeEventListener('keydown', this.#onKeydown);\n this.removeEventListener('dragstart', this.#onDragStart);\n this.removeEventListener('dragend', this.#onDragEnd);\n super.disconnectedCallback();\n }\n\n #onClick = (event: MouseEvent): void => {\n if (event.target !== this || event.defaultPrevented || this.disabled || this.readOnly) return;\n\n this.pressed = !this.pressed;\n };\n\n #onDragStart = (event: DragEvent): void => {\n if (this.disabled || this.readOnly) event.preventDefault();\n };\n\n #onDragEnd = (): void => {\n this._internals.states.delete('active');\n };\n\n #onKeydown = (event: KeyboardEvent): void => {\n if (event.key !== ' ' || event.target !== this || event.defaultPrevented || this.disabled || this.readOnly) {\n return;\n }\n\n event.preventDefault();\n };\n}\n"],"mappings":";;;;;;;;AAwBO,IAAM,IAAN,cAAyB,EAAuB,CAAU,CAAC,CAAC;;EACjD,KAAA,SAAA,EAAU,CAAC,CAAM,CAAC;;;EAEP,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;EACX;;;EAE4B,KAAA,qBAAA,GACzB,EAAK,SAAS,MAAM,EACvB;;CAEA,cAAc;EAGZ,AAFA,MAAM,GACN,KAAK,OAAO,UACZ,KAAK,UAAU;CACjB;CAEA,SAAS;EACP,OAAO,CAAI,wFAE6B,KAAK,WAAW,KAAK,WAAW,UAAU,UAAU;CAG9F;CAEA,oBAAoB;EAOlB,AANA,MAAM,kBAAkB,GACxB,KAAK,aAAa,iBAAiB,QAAQ,GACtC,KAAK,aAAa,WAAW,MAAG,KAAK,YAAY,KACtD,KAAK,iBAAiB,SAAS,KAAK,EAAQ,GAC5C,KAAK,iBAAiB,WAAW,KAAK,EAAU,GAChD,KAAK,iBAAiB,aAAa,KAAK,EAAY,GACpD,KAAK,iBAAiB,WAAW,KAAK,EAAU;CAClD;CAEA,uBAAuB;EAKrB,AAJA,KAAK,oBAAoB,SAAS,KAAK,EAAQ,GAC/C,KAAK,oBAAoB,WAAW,KAAK,EAAU,GACnD,KAAK,oBAAoB,aAAa,KAAK,EAAY,GACvD,KAAK,oBAAoB,WAAW,KAAK,EAAU,GACnD,MAAM,qBAAqB;CAC7B;CAEA,MAAY,MAA4B;EAClC,EAAM,WAAW,QAAQ,EAAM,oBAAoB,KAAK,YAAY,KAAK,aAE7E,KAAK,UAAU,CAAC,KAAK;CACvB;CAEA,MAAgB,MAA2B;EACzC,CAAI,KAAK,YAAY,KAAK,aAAU,EAAM,eAAe;CAC3D;CAEA,WAAyB;EACvB,KAAK,WAAW,OAAO,OAAO,QAAQ;CACxC;CAEA,MAAc,MAA+B;EACvC,EAAM,QAAQ,OAAO,EAAM,WAAW,QAAQ,EAAM,oBAAoB,KAAK,YAAY,KAAK,YAIlG,EAAM,eAAe;CACvB;AACF;AAlEC,IAAA,EAAA,CAAA,EAAe,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './drag-handle.js';
|
package/dist/drawer/drawer2.js
CHANGED
package/dist/file/file2.js
CHANGED
package/dist/gauge/gauge2.js
CHANGED
package/dist/grid/cell/cell2.js
CHANGED
package/dist/grid/grid2.js
CHANGED