[OH3] Main UI Examples

doesn’t look like anyone’s interested, but maybe one day someone can use this… popup size can be configured with f7-popup:

uid: Card_Dimmer
tags: []
props:
  parameters:
    - description: Small title on top of the card
      label: Title
      name: title
      required: false
      type: TEXT
    - description: Header big sized
      label: Header
      name: header
      required: false
      type: TEXT
    - context: item
      description: Item to control
      label: Item
      name: item
      required: false
      type: TEXT
  parameterGroups: []
timestamp: Oct 28, 2021, 1:53:05 PM
component: f7-card
config:
  style:
    noShadow: false
    class:
      - padding: 0px
    border-radius: var(--f7-card-expandable-border-radius)
    box-shadow: 5px 5px 10px 1px rgba(0,0,0,0.1)
    background-color: "=props.bgcolor ? props.bgcolor : ''"
    height: 70px
    margin-left: 2px
    margin-right: 2px
    margin-top: 2px
    margin-bottom: 2px
slots:
  content:
    - component: f7-block
      config:
        style:
          position: absolute
          top: -5px
          left: 8px
          flex-direction: row
          display: flex
      slots:
        default:
          - component: f7-icon
            config:
              f7: '=(Number.parseInt(items[props.item].state) > 0) ? "lightbulb_fill" : "lightbulb"'
              size: 16
              style:
                margin-right: 5px
                color: '=(Number.parseInt(items[props.item].state) > 0) ? "#F4E274" : ""'
          - component: Label
            config:
              text: Licht
              style:
                font-size: 12px
                margin-top: 0px
                padding-right: 5px
          - component: Label
            config:
              text: =items[props.item].displayState
              style:
                font-size: 12px
                margin-top: 0px
              visible: "=(Number.parseInt(items[props.item].state) > 0) ? true : false"
    - component: f7-block
      config:
        style:
          position: absolute
          top: 50px
          left: 9px
          flex-direction: row
      slots:
        default:
          - component: Label
            config:
              text: "=props.header ? props.header : 'Set Props'"
              style:
                font-size: 15px
                font-weight: 600
                margin-left: 0px
                margin-top: 2px
                line-height: 1
    - component: oh-link
      config:
        action: toggle
        actionItem: =props.item
        actionCommand: ON
        actionCommandAlt: OFF
        style:
          position: absolute
          top: 30px
          left: 0px
          height: 40px
          width: 100%
    - component: oh-link
      config:
        action: popup
        popupOpen: .myPopupOpenDI
        style:
          position: absolute
          top: 0px
          left: 0px
          width: 100%
          height: 30px
      slots:
        default:
          - component: f7-popup
            config:
              class: myPopupOpenDI
              swipeToClose: true
              style:
                --f7-popup-tablet-width: 70%
                --f7-popup-tablet-height: 101px
            slots:
              default:
                - component: widget:Popup_Dimmer
                  config:
                    item: =props.item
                    title: =props.header
uid: Popup_Dimmer
props:
  parameters:
    - description: Small title on top of the card
      label: Title
      name: title
      required: false
      type: TEXT
    - context: item
      description: item to control
      label: Item
      name: item
      required: false
      type: TEXT
timestamp: Oct 28, 2021, 12:45:25 PM
component: f7-card
config:
  title: =props.title + " Dimmen"
  style:
    margin: 0px
slots:
  default:
    - component: f7-row
      config:
        class:
          - display-flex
        style:
          padding-left: 20px
          padding-right: 20px
          padding-top: 15px
          padding-bottom: 25px
      slots:
        default:
          - component: oh-slider
            config:
              item: =props.item
              min: 0
              max: 100
              label: true
              scale: true
              scaleSteps: 4
              unit: "%"

Dimmer

edit: yaml updated, had to add swipeToClose: true to the f7-popup so i can close the popup also on phone. wasn’t able to figure out how to close the popup with a button :upside_down_face: