c.3da15c48.js 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. import{a6 as e,a7 as t,a as o,h as i,e as n,$ as a,r,n as l}from"./main-ad130be7.js";e({_template:t`
  2. <style>
  3. :host {
  4. overflow: hidden; /* needed for text-overflow: ellipsis to work on ff */
  5. @apply --layout-vertical;
  6. @apply --layout-center-justified;
  7. @apply --layout-flex;
  8. }
  9. :host([two-line]) {
  10. min-height: var(--paper-item-body-two-line-min-height, 72px);
  11. }
  12. :host([three-line]) {
  13. min-height: var(--paper-item-body-three-line-min-height, 88px);
  14. }
  15. :host > ::slotted(*) {
  16. overflow: hidden;
  17. text-overflow: ellipsis;
  18. white-space: nowrap;
  19. }
  20. :host > ::slotted([secondary]) {
  21. @apply --paper-font-body1;
  22. color: var(--paper-item-body-secondary-color, var(--secondary-text-color));
  23. @apply --paper-item-body-secondary;
  24. }
  25. </style>
  26. <slot></slot>
  27. `,is:"paper-item-body"}),o([l("ha-settings-row")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[n({type:Boolean,reflect:!0})],key:"narrow",value:void 0},{kind:"field",decorators:[n({type:Boolean,attribute:"three-line"})],key:"threeLine",value:()=>!1},{kind:"method",key:"render",value:function(){return a`
  28. <div class="prefix-wrap">
  29. <slot name="prefix"></slot>
  30. <paper-item-body
  31. ?two-line=${!this.threeLine}
  32. ?three-line=${this.threeLine}
  33. >
  34. <slot name="heading"></slot>
  35. <div secondary><slot name="description"></slot></div>
  36. </paper-item-body>
  37. </div>
  38. <div class="content"><slot></slot></div>
  39. `}},{kind:"get",static:!0,key:"styles",value:function(){return r`
  40. :host {
  41. display: flex;
  42. padding: 0 16px;
  43. align-content: normal;
  44. align-self: auto;
  45. align-items: center;
  46. }
  47. paper-item-body {
  48. padding: 8px 16px 8px 0;
  49. }
  50. paper-item-body[two-line] {
  51. min-height: calc(
  52. var(--paper-item-body-two-line-min-height, 72px) - 16px
  53. );
  54. flex: 1;
  55. }
  56. .content {
  57. display: contents;
  58. }
  59. :host(:not([narrow])) .content {
  60. display: var(--settings-row-content-display, flex);
  61. justify-content: flex-end;
  62. flex: 1;
  63. padding: 16px 0;
  64. }
  65. .content ::slotted(*) {
  66. width: var(--settings-row-content-width);
  67. }
  68. :host([narrow]) {
  69. align-items: normal;
  70. flex-direction: column;
  71. border-top: 1px solid var(--divider-color);
  72. padding-bottom: 8px;
  73. }
  74. ::slotted(ha-switch) {
  75. padding: 16px 0;
  76. }
  77. div[secondary] {
  78. white-space: normal;
  79. }
  80. .prefix-wrap {
  81. display: var(--settings-row-prefix-display);
  82. }
  83. :host([narrow]) .prefix-wrap {
  84. display: flex;
  85. align-items: center;
  86. }
  87. `}}]}}),i);