calcite-value-list_2.cjs.entry.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. /*!
  2. * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  3. * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
  4. * v1.0.0-beta.82
  5. */
  6. 'use strict';
  7. Object.defineProperty(exports, '__esModule', { value: true });
  8. const index = require('./index-5c65e149.js');
  9. const sortable_esm = require('./sortable.esm-0005295a.js');
  10. const resources = require('./resources-684ec2e5.js');
  11. const observers = require('./observers-d9fdf006.js');
  12. const interactive = require('./interactive-e294111f.js');
  13. const guid = require('./guid-8b6d6cb4.js');
  14. const dom = require('./dom-9ac0341c.js');
  15. const conditionalSlot = require('./conditionalSlot-ba5cd797.js');
  16. require('./array-f1fe66d8.js');
  17. require('./debounce-94d2834e.js');
  18. const CSS = {
  19. container: "container",
  20. handle: "handle"
  21. };
  22. var ICON_TYPES;
  23. (function (ICON_TYPES) {
  24. ICON_TYPES["grip"] = "grip";
  25. })(ICON_TYPES || (ICON_TYPES = {}));
  26. const valueListCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:stretch;align-items:stretch;background-color:transparent;font-size:var(--calcite-font-size--1);color:var(--calcite-ui-text-2)}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}calcite-value-list-item:last-of-type{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([filter-enabled]) header{margin-bottom:0.25rem;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end;background-color:var(--calcite-ui-foreground-1);--tw-shadow:0 1px 0 var(--calcite-ui-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([filter-enabled]) header.sticky-pos{position:-webkit-sticky;position:sticky;top:0px;z-index:10}calcite-filter{margin-bottom:1px}";
  27. const ValueList = class {
  28. constructor(hostRef) {
  29. index.registerInstance(this, hostRef);
  30. this.calciteListChange = index.createEvent(this, "calciteListChange", 7);
  31. this.calciteListOrderChange = index.createEvent(this, "calciteListOrderChange", 7);
  32. // --------------------------------------------------------------------------
  33. //
  34. // Properties
  35. //
  36. // --------------------------------------------------------------------------
  37. /**
  38. * When true, prevents user interaction. This state shows list items grayed out and with lower opacity.
  39. */
  40. this.disabled = false;
  41. /**
  42. * When true, list items are sortable via a draggable button.
  43. */
  44. this.dragEnabled = false;
  45. /**
  46. * When true, an input appears at the top of the list that can be used by end users to filter list items.
  47. */
  48. this.filterEnabled = false;
  49. /**
  50. * When true, content is waiting to be loaded. This state shows a busy indicator.
  51. */
  52. this.loading = false;
  53. /**
  54. * Similar to standard radio buttons and checkboxes.
  55. * When true, a user can select multiple list items at a time.
  56. * When false, only a single list item can be selected at a time,
  57. * and selecting a new list item will deselect any other selected list items.
  58. */
  59. this.multiple = false;
  60. /**
  61. * When true and single-selection is enabled, the selection changes when navigating list items via the keyboard.
  62. */
  63. this.selectionFollowsFocus = false;
  64. // --------------------------------------------------------------------------
  65. //
  66. // Private Properties
  67. //
  68. // --------------------------------------------------------------------------
  69. this.selectedValues = new Map();
  70. this.dataForFilter = [];
  71. this.lastSelectedItem = null;
  72. this.mutationObserver = observers.createObserver("mutation", resources.mutationObserverCallback.bind(this));
  73. this.setFilterEl = (el) => {
  74. this.filterEl = el;
  75. };
  76. this.deselectRemovedItems = resources.deselectRemovedItems.bind(this);
  77. this.deselectSiblingItems = resources.deselectSiblingItems.bind(this);
  78. this.selectSiblings = resources.selectSiblings.bind(this);
  79. this.handleFilter = resources.handleFilter.bind(this);
  80. this.getItemData = resources.getItemData.bind(this);
  81. this.keyDownHandler = (event) => {
  82. const handleElement = event
  83. .composedPath()
  84. .find((item) => { var _a; return ((_a = item.dataset) === null || _a === void 0 ? void 0 : _a.jsHandle) !== undefined; });
  85. const item = event
  86. .composedPath()
  87. .find((item) => { var _a; return ((_a = item.tagName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === "calcite-value-list-item"; });
  88. // Only trigger keyboard sorting when the internal drag handle is focused and activated
  89. if (!handleElement || !item.handleActivated) {
  90. resources.keyDownHandler.call(this, event);
  91. return;
  92. }
  93. const { items } = this;
  94. if ((event.key !== "ArrowUp" && event.key !== "ArrowDown") || items.length <= 1) {
  95. return;
  96. }
  97. event.preventDefault();
  98. const { el } = this;
  99. const nextIndex = resources.moveItemIndex(this, item, event.key === "ArrowUp" ? "up" : "down");
  100. if (nextIndex === items.length - 1) {
  101. el.appendChild(item);
  102. }
  103. else {
  104. const itemAtNextIndex = el.children[nextIndex];
  105. const insertionReferenceItem = itemAtNextIndex === item.nextElementSibling
  106. ? itemAtNextIndex.nextElementSibling
  107. : itemAtNextIndex;
  108. el.insertBefore(item, insertionReferenceItem);
  109. }
  110. this.items = this.getItems();
  111. this.calciteListOrderChange.emit(this.items.map(({ value }) => value));
  112. requestAnimationFrame(() => handleElement.focus());
  113. item.handleActivated = true;
  114. };
  115. }
  116. // --------------------------------------------------------------------------
  117. //
  118. // Lifecycle
  119. //
  120. // --------------------------------------------------------------------------
  121. connectedCallback() {
  122. resources.initialize.call(this);
  123. resources.initializeObserver.call(this);
  124. }
  125. componentDidLoad() {
  126. this.setUpDragAndDrop();
  127. }
  128. componentDidRender() {
  129. interactive.updateHostInteraction(this);
  130. }
  131. disconnectedCallback() {
  132. resources.cleanUpObserver.call(this);
  133. this.cleanUpDragAndDrop();
  134. }
  135. calciteListFocusOutHandler(event) {
  136. resources.calciteListFocusOutHandler.call(this, event);
  137. }
  138. calciteListItemRemoveHandler(event) {
  139. resources.removeItem.call(this, event);
  140. }
  141. calciteListItemChangeHandler(event) {
  142. resources.calciteListItemChangeHandler.call(this, event);
  143. }
  144. calciteListItemPropsChangeHandler(event) {
  145. event.stopPropagation();
  146. this.setUpFilter();
  147. }
  148. calciteListItemValueChangeHandler(event) {
  149. resources.calciteListItemValueChangeHandler.call(this, event);
  150. }
  151. // --------------------------------------------------------------------------
  152. //
  153. // Private Methods
  154. //
  155. // --------------------------------------------------------------------------
  156. getItems() {
  157. return Array.from(this.el.querySelectorAll("calcite-value-list-item"));
  158. }
  159. setUpItems() {
  160. resources.setUpItems.call(this, "calcite-value-list-item");
  161. }
  162. setUpFilter() {
  163. if (this.filterEnabled) {
  164. this.dataForFilter = this.getItemData();
  165. }
  166. }
  167. setUpDragAndDrop() {
  168. this.cleanUpDragAndDrop();
  169. if (!this.dragEnabled) {
  170. return;
  171. }
  172. this.sortable = sortable_esm.Sortable.create(this.el, {
  173. dataIdAttr: "id",
  174. handle: `.${CSS.handle}`,
  175. draggable: "calcite-value-list-item",
  176. group: this.group,
  177. onSort: () => {
  178. this.items = Array.from(this.el.querySelectorAll("calcite-value-list-item"));
  179. const values = this.items.map((item) => item.value);
  180. this.calciteListOrderChange.emit(values);
  181. }
  182. });
  183. }
  184. cleanUpDragAndDrop() {
  185. var _a;
  186. (_a = this.sortable) === null || _a === void 0 ? void 0 : _a.destroy();
  187. this.sortable = null;
  188. }
  189. // --------------------------------------------------------------------------
  190. //
  191. // Public Methods
  192. //
  193. // --------------------------------------------------------------------------
  194. /** Returns the currently selected items */
  195. async getSelectedItems() {
  196. return this.selectedValues;
  197. }
  198. /** Sets focus on the component. */
  199. async setFocus(focusId) {
  200. return resources.setFocus.call(this, focusId);
  201. }
  202. // --------------------------------------------------------------------------
  203. //
  204. // Render Methods
  205. //
  206. // --------------------------------------------------------------------------
  207. getIconType() {
  208. let type = null;
  209. if (this.dragEnabled) {
  210. type = ICON_TYPES.grip;
  211. }
  212. return type;
  213. }
  214. render() {
  215. return index.h(resources.List, { onKeyDown: this.keyDownHandler, props: this });
  216. }
  217. get el() { return index.getElement(this); }
  218. };
  219. ValueList.style = valueListCss;
  220. const ICONS = {
  221. drag: "drag"
  222. };
  223. const SLOTS = {
  224. actionsEnd: "actions-end",
  225. actionsStart: "actions-start"
  226. };
  227. const valueListItemCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{margin-bottom:1px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size--1);color:var(--calcite-ui-text-2);--tw-shadow:0 1px 0 var(--calcite-ui-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);-webkit-transition:background-color var(--calcite-animation-timing), -webkit-box-shadow var(--calcite-animation-timing);transition:background-color var(--calcite-animation-timing), -webkit-box-shadow var(--calcite-animation-timing);transition:background-color var(--calcite-animation-timing), box-shadow var(--calcite-animation-timing);transition:background-color var(--calcite-animation-timing), box-shadow var(--calcite-animation-timing), -webkit-box-shadow var(--calcite-animation-timing)}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}calcite-pick-list-item{position:relative;margin:0px;-ms-flex-positive:1;flex-grow:1;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([active]),:host([selected]){--tw-shadow:0 0 0 1px var(--calcite-ui-brand);--tw-shadow-colored:0 0 0 1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.handle{display:-ms-flexbox;display:flex;cursor:move;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-style:none;background-color:transparent;padding-top:0px;padding-bottom:0px;padding-left:0.25rem;padding-right:0.25rem;color:var(--calcite-ui-text-1);color:var(--calcite-ui-border-1);outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out}.handle:hover{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}.handle:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.handle--activated{background-color:var(--calcite-ui-foreground-3);color:var(--calcite-ui-text-1)}.handle calcite-icon{color:inherit}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}";
  228. const ValueListItem = class {
  229. constructor(hostRef) {
  230. index.registerInstance(this, hostRef);
  231. this.calciteListItemRemove = index.createEvent(this, "calciteListItemRemove", 7);
  232. /**
  233. * When true, the list item cannot be clicked and is visually muted.
  234. */
  235. this.disabled = false;
  236. /**
  237. * @internal When false, the list item cannot be deselected by user interaction.
  238. */
  239. this.disableDeselect = false;
  240. /**
  241. * When true, prevents the content of the list item from user interaction.
  242. */
  243. this.nonInteractive = false;
  244. /**
  245. * @internal - Stores the activated state of the drag handle.
  246. */
  247. this.handleActivated = false;
  248. /**
  249. * Determines the icon SVG symbol that will be shown. Options are circle, square, grip or null.
  250. * @see [ICON_TYPES](https://github.com/Esri/calcite-components/blob/master/src/components/pick-list/resources.ts#L5)
  251. */
  252. this.icon = null;
  253. /**
  254. * When true, adds an action to remove the list item.
  255. */
  256. this.removable = false;
  257. /**
  258. * When true, preselects the list item. Toggles when an item is checked/unchecked.
  259. */
  260. this.selected = false;
  261. this.pickListItem = null;
  262. this.guid = `calcite-value-list-item-${guid.guid()}`;
  263. // --------------------------------------------------------------------------
  264. //
  265. // Private Methods
  266. //
  267. // --------------------------------------------------------------------------
  268. this.getPickListRef = (el) => (this.pickListItem = el);
  269. this.handleKeyDown = (event) => {
  270. if (event.key === " ") {
  271. this.handleActivated = !this.handleActivated;
  272. }
  273. };
  274. this.handleBlur = () => {
  275. this.handleActivated = false;
  276. };
  277. this.handleSelectChange = (event) => {
  278. this.selected = event.detail.selected;
  279. };
  280. }
  281. // --------------------------------------------------------------------------
  282. //
  283. // Lifecycle
  284. //
  285. // --------------------------------------------------------------------------
  286. connectedCallback() {
  287. conditionalSlot.connectConditionalSlotComponent(this);
  288. }
  289. disconnectedCallback() {
  290. conditionalSlot.disconnectConditionalSlotComponent(this);
  291. }
  292. componentDidRender() {
  293. interactive.updateHostInteraction(this, this.el.closest("calcite-value-list") ? "managed" : false);
  294. }
  295. // --------------------------------------------------------------------------
  296. //
  297. // Public Methods
  298. //
  299. // --------------------------------------------------------------------------
  300. /**
  301. * Toggle the selection state. By default this won't trigger an event.
  302. * The first argument allows the value to be coerced, rather than swapping values.
  303. */
  304. async toggleSelected(coerce) {
  305. this.pickListItem.toggleSelected(coerce);
  306. }
  307. /** Set focus on the component. */
  308. async setFocus() {
  309. var _a;
  310. (_a = this.pickListItem) === null || _a === void 0 ? void 0 : _a.setFocus();
  311. }
  312. calciteListItemChangeHandler(event) {
  313. // adjust item payload from wrapped item before bubbling
  314. event.detail.item = this.el;
  315. }
  316. // --------------------------------------------------------------------------
  317. //
  318. // Render Methods
  319. //
  320. // --------------------------------------------------------------------------
  321. renderActionsEnd() {
  322. const { el } = this;
  323. const hasActionsEnd = dom.getSlotted(el, SLOTS.actionsEnd);
  324. return hasActionsEnd ? (index.h("slot", { name: SLOTS.actionsEnd, slot: resources.SLOTS.actionsEnd })) : null;
  325. }
  326. renderActionsStart() {
  327. const { el } = this;
  328. const hasActionsStart = dom.getSlotted(el, SLOTS.actionsStart);
  329. return hasActionsStart ? (index.h("slot", { name: SLOTS.actionsStart, slot: resources.SLOTS.actionsStart })) : null;
  330. }
  331. renderHandle() {
  332. const { icon } = this;
  333. if (icon === resources.ICON_TYPES.grip) {
  334. return (index.h("span", { "aria-pressed": dom.toAriaBoolean(this.handleActivated), class: {
  335. [resources.CSS.handle]: true,
  336. [resources.CSS.handleActivated]: this.handleActivated
  337. }, "data-js-handle": true, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, role: "button", tabindex: "0" }, index.h("calcite-icon", { icon: ICONS.drag, scale: "s" })));
  338. }
  339. }
  340. render() {
  341. return (index.h(index.Host, { id: this.el.id || this.guid }, this.renderHandle(), index.h("calcite-pick-list-item", { description: this.description, disableDeselect: this.disableDeselect, disabled: this.disabled, label: this.label, metadata: this.metadata, nonInteractive: this.nonInteractive, onCalciteListItemChange: this.handleSelectChange, ref: this.getPickListRef, removable: this.removable, selected: this.selected, value: this.value }, this.renderActionsStart(), this.renderActionsEnd())));
  342. }
  343. get el() { return index.getElement(this); }
  344. };
  345. ValueListItem.style = valueListItemCss;
  346. exports.calcite_value_list = ValueList;
  347. exports.calcite_value_list_item = ValueListItem;