tile-select-group.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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.97
  5. */
  6. import { h } 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. /** When `true`, interaction is prevented and the component is displayed with lower opacity. */
  19. this.disabled = false;
  20. /**
  21. * Defines the layout of the component.
  22. *
  23. * Use `"horizontal"` for rows, and `"vertical"` for a single column.
  24. */
  25. this.layout = "horizontal";
  26. }
  27. //--------------------------------------------------------------------------
  28. //
  29. // Lifecycle
  30. //
  31. //--------------------------------------------------------------------------
  32. componentDidRender() {
  33. updateHostInteraction(this);
  34. }
  35. render() {
  36. return h("slot", null);
  37. }
  38. static get is() { return "calcite-tile-select-group"; }
  39. static get encapsulation() { return "shadow"; }
  40. static get originalStyleUrls() {
  41. return {
  42. "$": ["tile-select-group.scss"]
  43. };
  44. }
  45. static get styleUrls() {
  46. return {
  47. "$": ["tile-select-group.css"]
  48. };
  49. }
  50. static get properties() {
  51. return {
  52. "disabled": {
  53. "type": "boolean",
  54. "mutable": false,
  55. "complexType": {
  56. "original": "boolean",
  57. "resolved": "boolean",
  58. "references": {}
  59. },
  60. "required": false,
  61. "optional": false,
  62. "docs": {
  63. "tags": [],
  64. "text": "When `true`, interaction is prevented and the component is displayed with lower opacity."
  65. },
  66. "attribute": "disabled",
  67. "reflect": true,
  68. "defaultValue": "false"
  69. },
  70. "layout": {
  71. "type": "string",
  72. "mutable": false,
  73. "complexType": {
  74. "original": "TileSelectGroupLayout",
  75. "resolved": "\"horizontal\" | \"vertical\"",
  76. "references": {
  77. "TileSelectGroupLayout": {
  78. "location": "import",
  79. "path": "./interfaces"
  80. }
  81. }
  82. },
  83. "required": false,
  84. "optional": true,
  85. "docs": {
  86. "tags": [],
  87. "text": "Defines the layout of the component.\n\nUse `\"horizontal\"` for rows, and `\"vertical\"` for a single column."
  88. },
  89. "attribute": "layout",
  90. "reflect": true,
  91. "defaultValue": "\"horizontal\""
  92. }
  93. };
  94. }
  95. static get elementRef() { return "el"; }
  96. }