tile-select-group.js 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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 { Component, h, Prop, Element } from "@stencil/core";
  7. import { updateHostInteraction } from "../../utils/interactive";
  8. /**
  9. * @slot - A slot for adding `calcite-tile-select`s.
  10. */
  11. export class TileSelectGroup {
  12. constructor() {
  13. //--------------------------------------------------------------------------
  14. //
  15. // Properties
  16. //
  17. //--------------------------------------------------------------------------
  18. /** The disabled state of the tile select. */
  19. this.disabled = false;
  20. /** Tiles by default move horizontally, stacking with each row, vertical allows single-column layouts */
  21. this.layout = "horizontal";
  22. }
  23. //--------------------------------------------------------------------------
  24. //
  25. // Lifecycle
  26. //
  27. //--------------------------------------------------------------------------
  28. componentDidRender() {
  29. updateHostInteraction(this);
  30. }
  31. render() {
  32. return h("slot", null);
  33. }
  34. static get is() { return "calcite-tile-select-group"; }
  35. static get encapsulation() { return "shadow"; }
  36. static get originalStyleUrls() { return {
  37. "$": ["tile-select-group.scss"]
  38. }; }
  39. static get styleUrls() { return {
  40. "$": ["tile-select-group.css"]
  41. }; }
  42. static get properties() { return {
  43. "disabled": {
  44. "type": "boolean",
  45. "mutable": false,
  46. "complexType": {
  47. "original": "boolean",
  48. "resolved": "boolean",
  49. "references": {}
  50. },
  51. "required": false,
  52. "optional": false,
  53. "docs": {
  54. "tags": [],
  55. "text": "The disabled state of the tile select."
  56. },
  57. "attribute": "disabled",
  58. "reflect": true,
  59. "defaultValue": "false"
  60. },
  61. "layout": {
  62. "type": "string",
  63. "mutable": false,
  64. "complexType": {
  65. "original": "TileSelectGroupLayout",
  66. "resolved": "\"horizontal\" | \"vertical\"",
  67. "references": {
  68. "TileSelectGroupLayout": {
  69. "location": "import",
  70. "path": "./interfaces"
  71. }
  72. }
  73. },
  74. "required": false,
  75. "optional": true,
  76. "docs": {
  77. "tags": [],
  78. "text": "Tiles by default move horizontally, stacking with each row, vertical allows single-column layouts"
  79. },
  80. "attribute": "layout",
  81. "reflect": true,
  82. "defaultValue": "\"horizontal\""
  83. }
  84. }; }
  85. static get elementRef() { return "el"; }
  86. }