calcite-value-list_2.entry.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  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. import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-8ece2564.js';
  7. import { S as Sortable } from './sortable.esm-34b12dd8.js';
  8. import { m as mutationObserverCallback, d as deselectRemovedItems, a as deselectSiblingItems, s as selectSiblings, h as handleFilter, g as getItemData, k as keyDownHandler, b as moveItemIndex, i as initialize, c as initializeObserver, e as cleanUpObserver, f as calciteListFocusOutHandler, r as removeItem, j as calciteListItemChangeHandler, l as calciteListItemValueChangeHandler, n as setUpItems, o as setFocus, L as List, I as ICON_TYPES$1, C as CSS$1, S as SLOTS$1 } from './resources-c4ee68b9.js';
  9. import { c as createObserver } from './observers-b198f831.js';
  10. import { u as updateHostInteraction } from './interactive-cb5bf285.js';
  11. import { g as guid } from './guid-b4461004.js';
  12. import { g as getSlotted, t as toAriaBoolean } from './dom-da697a3f.js';
  13. import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot-203be745.js';
  14. import './array-1655bbf7.js';
  15. import './debounce-c4df98cc.js';
  16. const CSS = {
  17. container: "container",
  18. handle: "handle"
  19. };
  20. var ICON_TYPES;
  21. (function (ICON_TYPES) {
  22. ICON_TYPES["grip"] = "grip";
  23. })(ICON_TYPES || (ICON_TYPES = {}));
  24. 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}";
  25. const ValueList = class {
  26. constructor(hostRef) {
  27. registerInstance(this, hostRef);
  28. this.calciteListChange = createEvent(this, "calciteListChange", 7);
  29. this.calciteListOrderChange = createEvent(this, "calciteListOrderChange", 7);
  30. // --------------------------------------------------------------------------
  31. //
  32. // Properties
  33. //
  34. // --------------------------------------------------------------------------
  35. /**
  36. * When true, prevents user interaction. This state shows list items grayed out and with lower opacity.
  37. */
  38. this.disabled = false;
  39. /**
  40. * When true, list items are sortable via a draggable button.
  41. */
  42. this.dragEnabled = false;
  43. /**
  44. * When true, an input appears at the top of the list that can be used by end users to filter list items.
  45. */
  46. this.filterEnabled = false;
  47. /**
  48. * When true, content is waiting to be loaded. This state shows a busy indicator.
  49. */
  50. this.loading = false;
  51. /**
  52. * Similar to standard radio buttons and checkboxes.
  53. * When true, a user can select multiple list items at a time.
  54. * When false, only a single list item can be selected at a time,
  55. * and selecting a new list item will deselect any other selected list items.
  56. */
  57. this.multiple = false;
  58. /**
  59. * When true and single-selection is enabled, the selection changes when navigating list items via the keyboard.
  60. */
  61. this.selectionFollowsFocus = false;
  62. // --------------------------------------------------------------------------
  63. //
  64. // Private Properties
  65. //
  66. // --------------------------------------------------------------------------
  67. this.selectedValues = new Map();
  68. this.dataForFilter = [];
  69. this.lastSelectedItem = null;
  70. this.mutationObserver = createObserver("mutation", mutationObserverCallback.bind(this));
  71. this.setFilterEl = (el) => {
  72. this.filterEl = el;
  73. };
  74. this.deselectRemovedItems = deselectRemovedItems.bind(this);
  75. this.deselectSiblingItems = deselectSiblingItems.bind(this);
  76. this.selectSiblings = selectSiblings.bind(this);
  77. this.handleFilter = handleFilter.bind(this);
  78. this.getItemData = getItemData.bind(this);
  79. this.keyDownHandler = (event) => {
  80. const handleElement = event
  81. .composedPath()
  82. .find((item) => { var _a; return ((_a = item.dataset) === null || _a === void 0 ? void 0 : _a.jsHandle) !== undefined; });
  83. const item = event
  84. .composedPath()
  85. .find((item) => { var _a; return ((_a = item.tagName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === "calcite-value-list-item"; });
  86. // Only trigger keyboard sorting when the internal drag handle is focused and activated
  87. if (!handleElement || !item.handleActivated) {
  88. keyDownHandler.call(this, event);
  89. return;
  90. }
  91. const { items } = this;
  92. if ((event.key !== "ArrowUp" && event.key !== "ArrowDown") || items.length <= 1) {
  93. return;
  94. }
  95. event.preventDefault();
  96. const { el } = this;
  97. const nextIndex = moveItemIndex(this, item, event.key === "ArrowUp" ? "up" : "down");
  98. if (nextIndex === items.length - 1) {
  99. el.appendChild(item);
  100. }
  101. else {
  102. const itemAtNextIndex = el.children[nextIndex];
  103. const insertionReferenceItem = itemAtNextIndex === item.nextElementSibling
  104. ? itemAtNextIndex.nextElementSibling
  105. : itemAtNextIndex;
  106. el.insertBefore(item, insertionReferenceItem);
  107. }
  108. this.items = this.getItems();
  109. this.calciteListOrderChange.emit(this.items.map(({ value }) => value));
  110. requestAnimationFrame(() => handleElement.focus());
  111. item.handleActivated = true;
  112. };
  113. }
  114. // --------------------------------------------------------------------------
  115. //
  116. // Lifecycle
  117. //
  118. // --------------------------------------------------------------------------
  119. connectedCallback() {
  120. initialize.call(this);
  121. initializeObserver.call(this);
  122. }
  123. componentDidLoad() {
  124. this.setUpDragAndDrop();
  125. }
  126. componentDidRender() {
  127. updateHostInteraction(this);
  128. }
  129. disconnectedCallback() {
  130. cleanUpObserver.call(this);
  131. this.cleanUpDragAndDrop();
  132. }
  133. calciteListFocusOutHandler(event) {
  134. calciteListFocusOutHandler.call(this, event);
  135. }
  136. calciteListItemRemoveHandler(event) {
  137. removeItem.call(this, event);
  138. }
  139. calciteListItemChangeHandler(event) {
  140. calciteListItemChangeHandler.call(this, event);
  141. }
  142. calciteListItemPropsChangeHandler(event) {
  143. event.stopPropagation();
  144. this.setUpFilter();
  145. }
  146. calciteListItemValueChangeHandler(event) {
  147. calciteListItemValueChangeHandler.call(this, event);
  148. }
  149. // --------------------------------------------------------------------------
  150. //
  151. // Private Methods
  152. //
  153. // --------------------------------------------------------------------------
  154. getItems() {
  155. return Array.from(this.el.querySelectorAll("calcite-value-list-item"));
  156. }
  157. setUpItems() {
  158. setUpItems.call(this, "calcite-value-list-item");
  159. }
  160. setUpFilter() {
  161. if (this.filterEnabled) {
  162. this.dataForFilter = this.getItemData();
  163. }
  164. }
  165. setUpDragAndDrop() {
  166. this.cleanUpDragAndDrop();
  167. if (!this.dragEnabled) {
  168. return;
  169. }
  170. this.sortable = Sortable.create(this.el, {
  171. dataIdAttr: "id",
  172. handle: `.${CSS.handle}`,
  173. draggable: "calcite-value-list-item",
  174. group: this.group,
  175. onSort: () => {
  176. this.items = Array.from(this.el.querySelectorAll("calcite-value-list-item"));
  177. const values = this.items.map((item) => item.value);
  178. this.calciteListOrderChange.emit(values);
  179. }
  180. });
  181. }
  182. cleanUpDragAndDrop() {
  183. var _a;
  184. (_a = this.sortable) === null || _a === void 0 ? void 0 : _a.destroy();
  185. this.sortable = null;
  186. }
  187. // --------------------------------------------------------------------------
  188. //
  189. // Public Methods
  190. //
  191. // --------------------------------------------------------------------------
  192. /** Returns the currently selected items */
  193. async getSelectedItems() {
  194. return this.selectedValues;
  195. }
  196. /** Sets focus on the component. */
  197. async setFocus(focusId) {
  198. return setFocus.call(this, focusId);
  199. }
  200. // --------------------------------------------------------------------------
  201. //
  202. // Render Methods
  203. //
  204. // --------------------------------------------------------------------------
  205. getIconType() {
  206. let type = null;
  207. if (this.dragEnabled) {
  208. type = ICON_TYPES.grip;
  209. }
  210. return type;
  211. }
  212. render() {
  213. return h(List, { onKeyDown: this.keyDownHandler, props: this });
  214. }
  215. get el() { return getElement(this); }
  216. };
  217. ValueList.style = valueListCss;
  218. const ICONS = {
  219. drag: "drag"
  220. };
  221. const SLOTS = {
  222. actionsEnd: "actions-end",
  223. actionsStart: "actions-start"
  224. };
  225. 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}";
  226. const ValueListItem = class {
  227. constructor(hostRef) {
  228. registerInstance(this, hostRef);
  229. this.calciteListItemRemove = createEvent(this, "calciteListItemRemove", 7);
  230. /**
  231. * When true, the list item cannot be clicked and is visually muted.
  232. */
  233. this.disabled = false;
  234. /**
  235. * @internal When false, the list item cannot be deselected by user interaction.
  236. */
  237. this.disableDeselect = false;
  238. /**
  239. * When true, prevents the content of the list item from user interaction.
  240. */
  241. this.nonInteractive = false;
  242. /**
  243. * @internal - Stores the activated state of the drag handle.
  244. */
  245. this.handleActivated = false;
  246. /**
  247. * Determines the icon SVG symbol that will be shown. Options are circle, square, grip or null.
  248. * @see [ICON_TYPES](https://github.com/Esri/calcite-components/blob/master/src/components/pick-list/resources.ts#L5)
  249. */
  250. this.icon = null;
  251. /**
  252. * When true, adds an action to remove the list item.
  253. */
  254. this.removable = false;
  255. /**
  256. * When true, preselects the list item. Toggles when an item is checked/unchecked.
  257. */
  258. this.selected = false;
  259. this.pickListItem = null;
  260. this.guid = `calcite-value-list-item-${guid()}`;
  261. // --------------------------------------------------------------------------
  262. //
  263. // Private Methods
  264. //
  265. // --------------------------------------------------------------------------
  266. this.getPickListRef = (el) => (this.pickListItem = el);
  267. this.handleKeyDown = (event) => {
  268. if (event.key === " ") {
  269. this.handleActivated = !this.handleActivated;
  270. }
  271. };
  272. this.handleBlur = () => {
  273. this.handleActivated = false;
  274. };
  275. this.handleSelectChange = (event) => {
  276. this.selected = event.detail.selected;
  277. };
  278. }
  279. // --------------------------------------------------------------------------
  280. //
  281. // Lifecycle
  282. //
  283. // --------------------------------------------------------------------------
  284. connectedCallback() {
  285. connectConditionalSlotComponent(this);
  286. }
  287. disconnectedCallback() {
  288. disconnectConditionalSlotComponent(this);
  289. }
  290. componentDidRender() {
  291. updateHostInteraction(this, this.el.closest("calcite-value-list") ? "managed" : false);
  292. }
  293. // --------------------------------------------------------------------------
  294. //
  295. // Public Methods
  296. //
  297. // --------------------------------------------------------------------------
  298. /**
  299. * Toggle the selection state. By default this won't trigger an event.
  300. * The first argument allows the value to be coerced, rather than swapping values.
  301. */
  302. async toggleSelected(coerce) {
  303. this.pickListItem.toggleSelected(coerce);
  304. }
  305. /** Set focus on the component. */
  306. async setFocus() {
  307. var _a;
  308. (_a = this.pickListItem) === null || _a === void 0 ? void 0 : _a.setFocus();
  309. }
  310. calciteListItemChangeHandler(event) {
  311. // adjust item payload from wrapped item before bubbling
  312. event.detail.item = this.el;
  313. }
  314. // --------------------------------------------------------------------------
  315. //
  316. // Render Methods
  317. //
  318. // --------------------------------------------------------------------------
  319. renderActionsEnd() {
  320. const { el } = this;
  321. const hasActionsEnd = getSlotted(el, SLOTS.actionsEnd);
  322. return hasActionsEnd ? (h("slot", { name: SLOTS.actionsEnd, slot: SLOTS$1.actionsEnd })) : null;
  323. }
  324. renderActionsStart() {
  325. const { el } = this;
  326. const hasActionsStart = getSlotted(el, SLOTS.actionsStart);
  327. return hasActionsStart ? (h("slot", { name: SLOTS.actionsStart, slot: SLOTS$1.actionsStart })) : null;
  328. }
  329. renderHandle() {
  330. const { icon } = this;
  331. if (icon === ICON_TYPES$1.grip) {
  332. return (h("span", { "aria-pressed": toAriaBoolean(this.handleActivated), class: {
  333. [CSS$1.handle]: true,
  334. [CSS$1.handleActivated]: this.handleActivated
  335. }, "data-js-handle": true, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, role: "button", tabindex: "0" }, h("calcite-icon", { icon: ICONS.drag, scale: "s" })));
  336. }
  337. }
  338. render() {
  339. return (h(Host, { id: this.el.id || this.guid }, this.renderHandle(), 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())));
  340. }
  341. get el() { return getElement(this); }
  342. };
  343. ValueListItem.style = valueListItemCss;
  344. export { ValueList as calcite_value_list, ValueListItem as calcite_value_list_item };