summaryrefslogtreecommitdiff
path: root/chromium/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_selection_overlay.html
blob: 53dfb4a7fc95bb55013328c83165ed711aee9104 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<link rel="import" href="../../html/polymer.html">

<link rel="import" href="../cr_icons_css.html">
<link rel="import" href="../icons.html">
<link rel="import" href="../paper_button_style_css.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button-light.html">

<dom-module id="cr-toolbar-selection-overlay">
  <template>
    <style include="cr-icons paper-button-style">
      :host {
        background: white;
        border-bottom: 1px solid var(--google-grey-300);
        bottom: 0;
        color: var(--google-grey-900);
        display: flex;
        left: 0;
        opacity: 0;
        padding-inline-start: var(--cr-toolbar-field-margin, 0);
        pointer-events: none;
        position: absolute;
        right: 0;
        top: 0;
        transition: opacity var(--cr-toolbar-overlay-animation-duration),
                    visibility var(--cr-toolbar-overlay-animation-duration);
        visibility: hidden;
      }

      :host([show]) {
        opacity: 1;
        pointer-events: initial;
        visibility: initial;
      }

      #overlay-content {
        align-items: center;
        display: flex;
        flex: 1;
        margin: 0 auto;
        max-width: var(--selection-overlay-max-width, initial);
        padding: 0 var(--selection-overlay-padding, 24px);
      }

      paper-button {
        margin-inline-start: 8px;
      }

      #number-selected {
        flex: 1;
      }

      paper-icon-button-light {
        height: 36px;
        margin-inline-end: 24px;
        margin-inline-start: 2px;
        width: 36px;
      }

      button iron-icon {
        height: 20px;
        width: 20px;
      }
    </style>
    <template is="dom-if" if="[[hasShown_]]">
      <div id="overlay-content">
        <paper-icon-button-light>
          <button on-tap="onClearSelectionTap_" title="[[cancelLabel]]">
            <iron-icon icon="cr:clear"></iron-icon>
          </button>
        </paper-icon-button-light>
        <div id="number-selected">[[selectionLabel_]]</div>
        <paper-button on-tap="onClearSelectionTap_">
          [[cancelLabel]]
        </paper-button>
        <paper-button id="delete" on-tap="onDeleteTap_"
            disabled="[[deleteDisabled]]">
          [[deleteLabel]]
        </paper-button>
      </div>
    </template>
  </template>
  <script src="cr_toolbar_selection_overlay.js"></script>
</dom-module>