@patternfly/elements 4.1.0 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +14909 -12588
- package/package.json +26 -17
- package/pf-accordion/pf-accordion-header.css +37 -0
- package/pf-accordion/pf-accordion-header.d.ts +0 -61
- package/pf-accordion/pf-accordion-header.js +180 -2
- package/pf-accordion/pf-accordion-header.js.map +1 -1
- package/pf-accordion/pf-accordion-panel.css +12 -0
- package/pf-accordion/pf-accordion-panel.d.ts +0 -34
- package/pf-accordion/pf-accordion-panel.js +87 -2
- package/pf-accordion/pf-accordion-panel.js.map +1 -1
- package/pf-accordion/pf-accordion.css +62 -0
- package/pf-accordion/pf-accordion.d.ts +1 -64
- package/pf-accordion/pf-accordion.js +156 -2
- package/pf-accordion/pf-accordion.js.map +1 -1
- package/pf-alert/pf-alert.css +193 -0
- package/pf-alert/pf-alert.d.ts +95 -0
- package/pf-alert/pf-alert.js +406 -0
- package/pf-alert/pf-alert.js.map +1 -0
- package/pf-alert/test/pf-alert.e2e.d.ts +1 -0
- package/pf-alert/test/pf-alert.e2e.js +45 -0
- package/pf-alert/test/pf-alert.e2e.js.map +1 -0
- package/pf-alert/test/pf-alert.spec.d.ts +1 -0
- package/pf-alert/test/pf-alert.spec.js +42 -0
- package/pf-alert/test/pf-alert.spec.js.map +1 -0
- package/pf-avatar/pf-avatar.css +14 -0
- package/pf-avatar/pf-avatar.d.ts +1 -14
- package/pf-avatar/pf-avatar.js +82 -2
- package/pf-avatar/pf-avatar.js.map +1 -1
- package/pf-back-to-top/pf-back-to-top.css +12 -0
- package/pf-back-to-top/pf-back-to-top.d.ts +1 -17
- package/pf-back-to-top/pf-back-to-top.js +87 -3
- package/pf-back-to-top/pf-back-to-top.js.map +1 -1
- package/pf-back-to-top/test/pf-back-to-top.spec.js +3 -2
- package/pf-back-to-top/test/pf-back-to-top.spec.js.map +1 -1
- package/pf-background-image/pf-background-image.css +7 -0
- package/pf-background-image/pf-background-image.d.ts +1 -8
- package/pf-background-image/pf-background-image.js +76 -2
- package/pf-background-image/pf-background-image.js.map +1 -1
- package/pf-badge/pf-badge.css +13 -0
- package/pf-badge/pf-badge.d.ts +1 -13
- package/pf-badge/pf-badge.js +53 -2
- package/pf-badge/pf-badge.js.map +1 -1
- package/pf-banner/pf-banner.css +21 -0
- package/pf-banner/pf-banner.d.ts +1 -19
- package/pf-banner/pf-banner.js +122 -2
- package/pf-banner/pf-banner.js.map +1 -1
- package/pf-button/pf-button-tokens.css +38 -0
- package/pf-button/pf-button.d.ts +1 -106
- package/pf-button/pf-button.js +837 -4
- package/pf-button/pf-button.js.map +1 -1
- package/pf-card/pf-card.css +24 -0
- package/pf-card/pf-card.d.ts +1 -38
- package/pf-card/pf-card.js +248 -2
- package/pf-card/pf-card.js.map +1 -1
- package/pf-chip/pf-chip-group.css +15 -0
- package/pf-chip/pf-chip-group.d.ts +0 -15
- package/pf-chip/pf-chip-group.js +111 -2
- package/pf-chip/pf-chip-group.js.map +1 -1
- package/pf-chip/pf-chip.css +30 -1
- package/pf-chip/pf-chip.d.ts +1 -20
- package/pf-chip/pf-chip.js +135 -2
- package/pf-chip/pf-chip.js.map +1 -1
- package/pf-clipboard-copy/pf-clipboard-copy.css +25 -0
- package/pf-clipboard-copy/pf-clipboard-copy.d.ts +1 -27
- package/pf-clipboard-copy/pf-clipboard-copy.js +318 -3
- package/pf-clipboard-copy/pf-clipboard-copy.js.map +1 -1
- package/pf-code-block/pf-code-block.css +11 -1
- package/pf-code-block/pf-code-block.js +70 -18
- package/pf-code-block/pf-code-block.js.map +1 -1
- package/pf-dropdown/pf-dropdown-group.js +40 -2
- package/pf-dropdown/pf-dropdown-group.js.map +1 -1
- package/pf-dropdown/pf-dropdown-item.css +10 -0
- package/pf-dropdown/pf-dropdown-item.d.ts +0 -27
- package/pf-dropdown/pf-dropdown-item.js +155 -2
- package/pf-dropdown/pf-dropdown-item.js.map +1 -1
- package/pf-dropdown/pf-dropdown-menu.js +39 -2
- package/pf-dropdown/pf-dropdown-menu.js.map +1 -1
- package/pf-dropdown/pf-dropdown.css +13 -1
- package/pf-dropdown/pf-dropdown.d.ts +1 -9
- package/pf-dropdown/pf-dropdown.js +357 -2
- package/pf-dropdown/pf-dropdown.js.map +1 -1
- package/pf-helper-text/pf-helper-text.css +35 -0
- package/pf-helper-text/pf-helper-text.d.ts +41 -0
- package/pf-helper-text/pf-helper-text.js +107 -0
- package/pf-helper-text/pf-helper-text.js.map +1 -0
- package/pf-helper-text/test/pf-helper-text.e2e.d.ts +1 -0
- package/pf-helper-text/test/pf-helper-text.e2e.js +23 -0
- package/pf-helper-text/test/pf-helper-text.e2e.js.map +1 -0
- package/pf-helper-text/test/pf-helper-text.spec.d.ts +1 -0
- package/pf-helper-text/test/pf-helper-text.spec.js +57 -0
- package/pf-helper-text/test/pf-helper-text.spec.js.map +1 -0
- package/pf-hint/pf-hint.css +120 -0
- package/pf-hint/pf-hint.d.ts +19 -0
- package/pf-hint/pf-hint.js +180 -0
- package/pf-hint/pf-hint.js.map +1 -0
- package/pf-hint/test/pf-hint.e2e.d.ts +1 -0
- package/pf-hint/test/pf-hint.e2e.js +23 -0
- package/pf-hint/test/pf-hint.e2e.js.map +1 -0
- package/pf-hint/test/pf-hint.spec.d.ts +1 -0
- package/pf-hint/test/pf-hint.spec.js +87 -0
- package/pf-hint/test/pf-hint.spec.js.map +1 -0
- package/pf-icon/pf-icon.css +1 -0
- package/pf-icon/pf-icon.d.ts +1 -3
- package/pf-icon/pf-icon.js +44 -4
- package/pf-icon/pf-icon.js.map +1 -1
- package/pf-jump-links/pf-jump-links-item.css +7 -1
- package/pf-jump-links/pf-jump-links-item.d.ts +0 -8
- package/pf-jump-links/pf-jump-links-item.js +77 -2
- package/pf-jump-links/pf-jump-links-item.js.map +1 -1
- package/pf-jump-links/pf-jump-links-list.css +3 -0
- package/pf-jump-links/pf-jump-links-list.d.ts +0 -5
- package/pf-jump-links/pf-jump-links-list.js +20 -2
- package/pf-jump-links/pf-jump-links-list.js.map +1 -1
- package/pf-jump-links/pf-jump-links.css +36 -0
- package/pf-jump-links/pf-jump-links.d.ts +1 -38
- package/pf-jump-links/pf-jump-links.js +179 -2
- package/pf-jump-links/pf-jump-links.js.map +1 -1
- package/pf-label/pf-label.css +51 -1
- package/pf-label/pf-label.d.ts +1 -58
- package/pf-label/pf-label.js +257 -2
- package/pf-label/pf-label.js.map +1 -1
- package/pf-modal/pf-modal.css +11 -0
- package/pf-modal/pf-modal.d.ts +2 -25
- package/pf-modal/pf-modal.js +215 -2
- package/pf-modal/pf-modal.js.map +1 -1
- package/pf-panel/pf-panel.css +29 -0
- package/pf-panel/pf-panel.d.ts +1 -32
- package/pf-panel/pf-panel.js +204 -2
- package/pf-panel/pf-panel.js.map +1 -1
- package/pf-popover/pf-popover.css +33 -0
- package/pf-popover/pf-popover.d.ts +1 -108
- package/pf-popover/pf-popover.js +251 -3
- package/pf-popover/pf-popover.js.map +1 -1
- package/pf-progress/pf-progress.css +19 -0
- package/pf-progress/pf-progress.d.ts +1 -57
- package/pf-progress/pf-progress.js +231 -2
- package/pf-progress/pf-progress.js.map +1 -1
- package/pf-progress-stepper/pf-progress-step.js +126 -2
- package/pf-progress-stepper/pf-progress-step.js.map +1 -1
- package/pf-progress-stepper/pf-progress-stepper.css +96 -0
- package/pf-progress-stepper/pf-progress-stepper.d.ts +1 -115
- package/pf-progress-stepper/pf-progress-stepper.js +326 -2
- package/pf-progress-stepper/pf-progress-stepper.js.map +1 -1
- package/pf-search-input/pf-search-input.css +308 -0
- package/pf-search-input/pf-search-input.d.ts +75 -0
- package/pf-search-input/pf-search-input.js +630 -0
- package/pf-search-input/pf-search-input.js.map +1 -0
- package/pf-search-input/test/pf-search-input.e2e.d.ts +1 -0
- package/pf-search-input/test/pf-search-input.e2e.js +23 -0
- package/pf-search-input/test/pf-search-input.e2e.js.map +1 -0
- package/pf-search-input/test/pf-search-input.spec.d.ts +1 -0
- package/pf-search-input/test/pf-search-input.spec.js +1021 -0
- package/pf-search-input/test/pf-search-input.spec.js.map +1 -0
- package/pf-select/pf-option-group.js +27 -2
- package/pf-select/pf-option-group.js.map +1 -1
- package/pf-select/pf-option.css +9 -1
- package/pf-select/pf-option.js +83 -2
- package/pf-select/pf-option.js.map +1 -1
- package/pf-select/pf-select.css +157 -0
- package/pf-select/pf-select.d.ts +1 -158
- package/pf-select/pf-select.js +542 -5
- package/pf-select/pf-select.js.map +1 -1
- package/pf-spinner/pf-spinner.css +13 -0
- package/pf-spinner/pf-spinner.d.ts +1 -14
- package/pf-spinner/pf-spinner.js +101 -2
- package/pf-spinner/pf-spinner.js.map +1 -1
- package/pf-switch/pf-switch.css +22 -0
- package/pf-switch/pf-switch.d.ts +1 -30
- package/pf-switch/pf-switch.js +156 -2
- package/pf-switch/pf-switch.js.map +1 -1
- package/pf-table/pf-caption.js +10 -2
- package/pf-table/pf-caption.js.map +1 -1
- package/pf-table/pf-table.css +211 -0
- package/pf-table/pf-table.d.ts +1 -635
- package/pf-table/pf-table.js +437 -2
- package/pf-table/pf-table.js.map +1 -1
- package/pf-table/pf-tbody.js +18 -2
- package/pf-table/pf-tbody.js.map +1 -1
- package/pf-table/pf-td.js +107 -2
- package/pf-table/pf-td.js.map +1 -1
- package/pf-table/pf-th.js +95 -2
- package/pf-table/pf-th.js.map +1 -1
- package/pf-table/pf-thead.js +20 -2
- package/pf-table/pf-thead.js.map +1 -1
- package/pf-table/pf-tr.js +89 -2
- package/pf-table/pf-tr.js.map +1 -1
- package/pf-tabs/pf-tab-panel.css +1 -0
- package/pf-tabs/pf-tab-panel.d.ts +0 -2
- package/pf-tabs/pf-tab-panel.js +19 -3
- package/pf-tabs/pf-tab-panel.js.map +1 -1
- package/pf-tabs/pf-tab.css +33 -0
- package/pf-tabs/pf-tab.d.ts +0 -40
- package/pf-tabs/pf-tab.js +231 -2
- package/pf-tabs/pf-tab.js.map +1 -1
- package/pf-tabs/pf-tabs.css +26 -0
- package/pf-tabs/pf-tabs.d.ts +1 -34
- package/pf-tabs/pf-tabs.js +307 -2
- package/pf-tabs/pf-tabs.js.map +1 -1
- package/pf-text-area/pf-text-area.css +125 -0
- package/pf-text-area/pf-text-area.d.ts +1 -125
- package/pf-text-area/pf-text-area.js +320 -2
- package/pf-text-area/pf-text-area.js.map +1 -1
- package/pf-text-input/pf-text-input.css +126 -0
- package/pf-text-input/pf-text-input.d.ts +1 -126
- package/pf-text-input/pf-text-input.js +395 -2
- package/pf-text-input/pf-text-input.js.map +1 -1
- package/pf-tile/pf-tile.css +28 -8
- package/pf-tile/pf-tile.d.ts +1 -24
- package/pf-tile/pf-tile.js +156 -2
- package/pf-tile/pf-tile.js.map +1 -1
- package/pf-timestamp/pf-timestamp.d.ts +1 -0
- package/pf-timestamp/pf-timestamp.js +10 -2
- package/pf-timestamp/pf-timestamp.js.map +1 -1
- package/pf-tooltip/pf-tooltip.css +10 -0
- package/pf-tooltip/pf-tooltip.d.ts +1 -79
- package/pf-tooltip/pf-tooltip.js +113 -3
- package/pf-tooltip/pf-tooltip.js.map +1 -1
- package/pfe.min.js +0 -7439
- package/pfe.min.js.LEGAL.txt +0 -57
- package/pfe.min.js.map +0 -7
- package/react/pf-accordion/pf-accordion-header.d.ts +0 -5
- package/react/pf-accordion/pf-accordion-header.js +0 -12
- package/react/pf-accordion/pf-accordion-panel.d.ts +0 -5
- package/react/pf-accordion/pf-accordion-panel.js +0 -10
- package/react/pf-accordion/pf-accordion.d.ts +0 -5
- package/react/pf-accordion/pf-accordion.js +0 -13
- package/react/pf-avatar/pf-avatar.d.ts +0 -5
- package/react/pf-avatar/pf-avatar.js +0 -12
- package/react/pf-back-to-top/pf-back-to-top.d.ts +0 -5
- package/react/pf-back-to-top/pf-back-to-top.js +0 -10
- package/react/pf-background-image/pf-background-image.d.ts +0 -5
- package/react/pf-background-image/pf-background-image.js +0 -10
- package/react/pf-badge/pf-badge.d.ts +0 -5
- package/react/pf-badge/pf-badge.js +0 -10
- package/react/pf-banner/pf-banner.d.ts +0 -5
- package/react/pf-banner/pf-banner.js +0 -10
- package/react/pf-button/pf-button.d.ts +0 -5
- package/react/pf-button/pf-button.js +0 -12
- package/react/pf-card/pf-card.d.ts +0 -5
- package/react/pf-card/pf-card.js +0 -10
- package/react/pf-chip/pf-chip-group.d.ts +0 -5
- package/react/pf-chip/pf-chip-group.js +0 -13
- package/react/pf-chip/pf-chip.d.ts +0 -5
- package/react/pf-chip/pf-chip.js +0 -13
- package/react/pf-clipboard-copy/pf-clipboard-copy.d.ts +0 -5
- package/react/pf-clipboard-copy/pf-clipboard-copy.js +0 -12
- package/react/pf-code-block/pf-code-block.d.ts +0 -5
- package/react/pf-code-block/pf-code-block.js +0 -10
- package/react/pf-dropdown/pf-dropdown-group.d.ts +0 -5
- package/react/pf-dropdown/pf-dropdown-group.js +0 -10
- package/react/pf-dropdown/pf-dropdown-item.d.ts +0 -5
- package/react/pf-dropdown/pf-dropdown-item.js +0 -10
- package/react/pf-dropdown/pf-dropdown-menu.d.ts +0 -5
- package/react/pf-dropdown/pf-dropdown-menu.js +0 -10
- package/react/pf-dropdown/pf-dropdown.d.ts +0 -5
- package/react/pf-dropdown/pf-dropdown.js +0 -14
- package/react/pf-icon/pf-icon.d.ts +0 -5
- package/react/pf-icon/pf-icon.js +0 -13
- package/react/pf-jump-links/pf-jump-links-item.d.ts +0 -5
- package/react/pf-jump-links/pf-jump-links-item.js +0 -13
- package/react/pf-jump-links/pf-jump-links-list.d.ts +0 -5
- package/react/pf-jump-links/pf-jump-links-list.js +0 -10
- package/react/pf-jump-links/pf-jump-links.d.ts +0 -5
- package/react/pf-jump-links/pf-jump-links.js +0 -12
- package/react/pf-label/pf-label.d.ts +0 -5
- package/react/pf-label/pf-label.js +0 -12
- package/react/pf-modal/pf-modal.d.ts +0 -5
- package/react/pf-modal/pf-modal.js +0 -13
- package/react/pf-panel/pf-panel.d.ts +0 -5
- package/react/pf-panel/pf-panel.js +0 -10
- package/react/pf-popover/pf-popover.d.ts +0 -5
- package/react/pf-popover/pf-popover.js +0 -10
- package/react/pf-progress/pf-progress.d.ts +0 -5
- package/react/pf-progress/pf-progress.js +0 -10
- package/react/pf-progress-stepper/pf-progress-step.d.ts +0 -5
- package/react/pf-progress-stepper/pf-progress-step.js +0 -10
- package/react/pf-progress-stepper/pf-progress-stepper.d.ts +0 -5
- package/react/pf-progress-stepper/pf-progress-stepper.js +0 -10
- package/react/pf-select/pf-option-group.d.ts +0 -5
- package/react/pf-select/pf-option-group.js +0 -10
- package/react/pf-select/pf-option.d.ts +0 -5
- package/react/pf-select/pf-option.js +0 -10
- package/react/pf-select/pf-select.d.ts +0 -5
- package/react/pf-select/pf-select.js +0 -13
- package/react/pf-spinner/pf-spinner.d.ts +0 -5
- package/react/pf-spinner/pf-spinner.js +0 -10
- package/react/pf-switch/pf-switch.d.ts +0 -5
- package/react/pf-switch/pf-switch.js +0 -12
- package/react/pf-table/pf-caption.d.ts +0 -5
- package/react/pf-table/pf-caption.js +0 -10
- package/react/pf-table/pf-table.d.ts +0 -5
- package/react/pf-table/pf-table.js +0 -10
- package/react/pf-table/pf-tbody.d.ts +0 -5
- package/react/pf-table/pf-tbody.js +0 -10
- package/react/pf-table/pf-td.d.ts +0 -5
- package/react/pf-table/pf-td.js +0 -10
- package/react/pf-table/pf-th.d.ts +0 -5
- package/react/pf-table/pf-th.js +0 -10
- package/react/pf-table/pf-thead.d.ts +0 -5
- package/react/pf-table/pf-thead.js +0 -10
- package/react/pf-table/pf-tr.d.ts +0 -5
- package/react/pf-table/pf-tr.js +0 -10
- package/react/pf-tabs/pf-tab-panel.d.ts +0 -5
- package/react/pf-tabs/pf-tab-panel.js +0 -10
- package/react/pf-tabs/pf-tab.d.ts +0 -5
- package/react/pf-tabs/pf-tab.js +0 -12
- package/react/pf-tabs/pf-tabs.d.ts +0 -5
- package/react/pf-tabs/pf-tabs.js +0 -10
- package/react/pf-text-area/pf-text-area.d.ts +0 -5
- package/react/pf-text-area/pf-text-area.js +0 -10
- package/react/pf-text-input/pf-text-input.d.ts +0 -5
- package/react/pf-text-input/pf-text-input.js +0 -10
- package/react/pf-tile/pf-tile.d.ts +0 -5
- package/react/pf-tile/pf-tile.js +0 -10
- package/react/pf-timestamp/pf-timestamp.d.ts +0 -5
- package/react/pf-timestamp/pf-timestamp.js +0 -10
- package/react/pf-tooltip/pf-tooltip.d.ts +0 -5
- package/react/pf-tooltip/pf-tooltip.js +0 -10
package/pf-tile/pf-tile.css
CHANGED
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
position: relative;
|
|
3
3
|
display: inline-grid;
|
|
4
|
-
padding:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
padding:
|
|
5
|
+
/** Top padding for tile */
|
|
6
|
+
var(--pf-c-tile--PaddingTop, var(--pf-global--spacer--lg, 1.5rem))
|
|
7
|
+
/** Right padding for tile */
|
|
8
|
+
var(--pf-c-tile--PaddingRight, var(--pf-global--spacer--lg, 1.5rem))
|
|
9
|
+
/** Bottom padding for tile */
|
|
10
|
+
var(--pf-c-tile--PaddingBottom, var(--pf-global--spacer--lg, 1.5rem))
|
|
11
|
+
/** Left padding for tile */
|
|
12
|
+
var(--pf-c-tile--PaddingLeft, var(--pf-global--spacer--lg, 1.5rem));
|
|
8
13
|
text-align: center;
|
|
9
14
|
cursor: pointer;
|
|
15
|
+
/** Background color for tile */
|
|
10
16
|
background-color: var(--pf-c-tile--BackgroundColor,
|
|
11
17
|
var(--pf-global--BackgroundColor--100,
|
|
12
18
|
var(--pf-global--BackgroundColor--light-100), #ffffff));
|
|
13
19
|
grid-template-rows: -webkit-min-content;
|
|
14
20
|
grid-template-rows: min-content;
|
|
21
|
+
/** Transition animation for tile */
|
|
15
22
|
transition: var(--pf-c-tile--Transition, none);
|
|
23
|
+
/** Vertical translation for tile */
|
|
16
24
|
transform: translateY(var(--pf-c-tile--TranslateY, 0));
|
|
17
25
|
}
|
|
18
26
|
|
|
@@ -28,18 +36,25 @@
|
|
|
28
36
|
right: 0;
|
|
29
37
|
bottom: 0;
|
|
30
38
|
left: 0;
|
|
31
|
-
border:
|
|
32
|
-
|
|
33
|
-
|
|
39
|
+
border:
|
|
40
|
+
/** Border width for tile */
|
|
41
|
+
var(--pf-c-tile--before--BorderWidth, var(--pf-global--BorderWidth--sm, 1px))
|
|
42
|
+
solid
|
|
43
|
+
/** Border color for tile */
|
|
44
|
+
var(--pf-c-tile--before--BorderColor, var(--pf-global--BorderColor--100, #d2d2d2));
|
|
34
45
|
}
|
|
35
46
|
|
|
36
47
|
:host::after {
|
|
37
48
|
right: 0;
|
|
38
49
|
bottom: 0;
|
|
39
50
|
left: 0;
|
|
51
|
+
/** Height of tile bottom accent */
|
|
40
52
|
height: var(--pf-c-tile--after--Height, var(--pf-global--BorderWidth--lg, 3px));
|
|
53
|
+
/** Background color of tile bottom accent */
|
|
41
54
|
background-color: var(--pf-c-tile--after--BackgroundColor, transparent);
|
|
55
|
+
/** Transition animation for tile bottom accent */
|
|
42
56
|
transition: var(--pf-c-tile--after--Transition, none);
|
|
57
|
+
/** Scale Y and translate Y transform for tile bottom accent */
|
|
43
58
|
transform: scaleY(var(--pf-c-tile--after--ScaleY, 1)) translateY(var(--pf-c-tile--after--TranslateY, 0));
|
|
44
59
|
}
|
|
45
60
|
|
|
@@ -87,6 +102,7 @@
|
|
|
87
102
|
}
|
|
88
103
|
|
|
89
104
|
[part="title"] {
|
|
105
|
+
/** Color for tile title */
|
|
90
106
|
color: var(--pf-c-tile__title--Color, var(--pf-global--Color--100, var(--pf-global--Color--dark-100, #151515)));
|
|
91
107
|
}
|
|
92
108
|
|
|
@@ -96,10 +112,13 @@
|
|
|
96
112
|
}
|
|
97
113
|
|
|
98
114
|
[part="icon"] {
|
|
99
|
-
|
|
115
|
+
/** Font size for tile icon */
|
|
116
|
+
--_icon-size: var(--pf-c-tile__icon--FontSize, var(--pf-global--icon--FontSize--md, 1.125rem));
|
|
100
117
|
--pf-icon--size: var(--_icon-size);
|
|
118
|
+
/** Right margin for tile icon */
|
|
101
119
|
margin-right: var(--pf-c-tile__icon--MarginRight, var(--pf-global--spacer--sm, 0.5rem));
|
|
102
120
|
font-size: var(--_icon-size);
|
|
121
|
+
/** Color for tile icon */
|
|
103
122
|
color: var(--pf-c-tile__icon--Color, var(--pf-global--Color--100, #151515));
|
|
104
123
|
}
|
|
105
124
|
|
|
@@ -118,6 +137,7 @@
|
|
|
118
137
|
display: flex;
|
|
119
138
|
align-items: center;
|
|
120
139
|
justify-content: center;
|
|
140
|
+
/** Bottom margin for stacked tile icon */
|
|
121
141
|
margin-bottom: var(--pf-c-tile__header--m-stacked__icon--MarginBottom, var(--pf-global--spacer--xs, 0.25rem));
|
|
122
142
|
}
|
|
123
143
|
|
package/pf-tile/pf-tile.d.ts
CHANGED
|
@@ -6,32 +6,9 @@ export type StackedSize = ('md' | 'lg');
|
|
|
6
6
|
* [selectable card](../card/). However, tiles are used specifically when the user is selecting
|
|
7
7
|
* a static option, whereas a selectable card triggers an action or opens a quickstart
|
|
8
8
|
* or sidebar to provide additional information.
|
|
9
|
-
* @
|
|
10
|
-
* @slot title - the title of the tile should be a heading
|
|
11
|
-
* @slot - The content should be a paragraph
|
|
12
|
-
* @csspart icon - container for the icon
|
|
13
|
-
* @csspart title - container for the title
|
|
14
|
-
* @csspart body - container for the body content
|
|
9
|
+
* @alias Tile
|
|
15
10
|
* @attr {'boolean'} selected - selected variant
|
|
16
11
|
* @attr {'md'|'lg'|null} stacked - stacked variant
|
|
17
|
-
* @cssprop {<length>} [--pf-c-tile--PaddingTop=1.5rem]
|
|
18
|
-
* @cssprop {<length>} [--pf-c-tile--PaddingRight=1.5rem]
|
|
19
|
-
* @cssprop {<length>} [--pf-c-tile--PaddingBottom=1.5rem]
|
|
20
|
-
* @cssprop {<length>} [--pf-c-tile--PaddingLeft=1.5rem]
|
|
21
|
-
* @cssprop {<color>} [--pf-c-tile--BackgroundColor=#FFFFFF]
|
|
22
|
-
* @cssprop [--pf-c-tile--Transition=none]
|
|
23
|
-
* @cssprop [--pf-c-tile--TranslateY=0]
|
|
24
|
-
* @cssprop {<length>} [--pf-c-tile--before--BorderWidth=1px]
|
|
25
|
-
* @cssprop {<color>} [--pf-c-tile--before--BorderColor=#444548]
|
|
26
|
-
* @cssprop {<length>} [--pf-c-tile--after--Height=3px]
|
|
27
|
-
* @cssprop {<color>} [--pf-c-tile--after--BackgroundColor=transparent]
|
|
28
|
-
* @cssprop [--pf-c-tile--after--Transition=none]
|
|
29
|
-
* @cssprop [--pf-c-tile--after--ScaleY=1]
|
|
30
|
-
* @cssprop {<color>} [--pf-c-tile__title--Color=#06c]
|
|
31
|
-
* @cssprop {<color>} [--pf-c-tile__icon--Color=#06c]
|
|
32
|
-
* @cssprop {<length>} [--pf-c-tile__icon--MarginRight=0]
|
|
33
|
-
* @cssprop {<length>} [--pf-c-tile__icon--FontSize=1.5rem]
|
|
34
|
-
* @cssprop {<length>} [--pf-c-tile__header--m-stacked__icon--MarginBottom=0.25rem]
|
|
35
12
|
*/
|
|
36
13
|
export declare class PfTile extends LitElement {
|
|
37
14
|
static readonly styles: CSSStyleSheet[];
|
package/pf-tile/pf-tile.js
CHANGED
|
@@ -3,7 +3,155 @@ import { LitElement, html } from 'lit';
|
|
|
3
3
|
import { customElement } from 'lit/decorators/custom-element.js';
|
|
4
4
|
import { property } from 'lit/decorators/property.js';
|
|
5
5
|
import { css } from "lit";
|
|
6
|
-
const styles = css `:host {
|
|
6
|
+
const styles = css `:host {
|
|
7
|
+
position: relative;
|
|
8
|
+
display: inline-grid;
|
|
9
|
+
padding:
|
|
10
|
+
/** Top padding for tile */
|
|
11
|
+
var(--pf-c-tile--PaddingTop, var(--pf-global--spacer--lg, 1.5rem))
|
|
12
|
+
/** Right padding for tile */
|
|
13
|
+
var(--pf-c-tile--PaddingRight, var(--pf-global--spacer--lg, 1.5rem))
|
|
14
|
+
/** Bottom padding for tile */
|
|
15
|
+
var(--pf-c-tile--PaddingBottom, var(--pf-global--spacer--lg, 1.5rem))
|
|
16
|
+
/** Left padding for tile */
|
|
17
|
+
var(--pf-c-tile--PaddingLeft, var(--pf-global--spacer--lg, 1.5rem));
|
|
18
|
+
text-align: center;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
/** Background color for tile */
|
|
21
|
+
background-color: var(--pf-c-tile--BackgroundColor,
|
|
22
|
+
var(--pf-global--BackgroundColor--100,
|
|
23
|
+
var(--pf-global--BackgroundColor--light-100), #ffffff));
|
|
24
|
+
grid-template-rows: -webkit-min-content;
|
|
25
|
+
grid-template-rows: min-content;
|
|
26
|
+
/** Transition animation for tile */
|
|
27
|
+
transition: var(--pf-c-tile--Transition, none);
|
|
28
|
+
/** Vertical translation for tile */
|
|
29
|
+
transform: translateY(var(--pf-c-tile--TranslateY, 0));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:host::before,
|
|
33
|
+
:host::after {
|
|
34
|
+
position: absolute;
|
|
35
|
+
pointer-events: none;
|
|
36
|
+
content: "";
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:host::before {
|
|
40
|
+
top: 0;
|
|
41
|
+
right: 0;
|
|
42
|
+
bottom: 0;
|
|
43
|
+
left: 0;
|
|
44
|
+
border:
|
|
45
|
+
/** Border width for tile */
|
|
46
|
+
var(--pf-c-tile--before--BorderWidth, var(--pf-global--BorderWidth--sm, 1px))
|
|
47
|
+
solid
|
|
48
|
+
/** Border color for tile */
|
|
49
|
+
var(--pf-c-tile--before--BorderColor, var(--pf-global--BorderColor--100, #d2d2d2));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:host::after {
|
|
53
|
+
right: 0;
|
|
54
|
+
bottom: 0;
|
|
55
|
+
left: 0;
|
|
56
|
+
/** Height of tile bottom accent */
|
|
57
|
+
height: var(--pf-c-tile--after--Height, var(--pf-global--BorderWidth--lg, 3px));
|
|
58
|
+
/** Background color of tile bottom accent */
|
|
59
|
+
background-color: var(--pf-c-tile--after--BackgroundColor, transparent);
|
|
60
|
+
/** Transition animation for tile bottom accent */
|
|
61
|
+
transition: var(--pf-c-tile--after--Transition, none);
|
|
62
|
+
/** Scale Y and translate Y transform for tile bottom accent */
|
|
63
|
+
transform: scaleY(var(--pf-c-tile--after--ScaleY, 1)) translateY(var(--pf-c-tile--after--TranslateY, 0));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:host(:hover) {
|
|
67
|
+
--pf-c-tile__title--Color: var(--pf-c-tile--hover__title--Color, var(--pf-global--primary-color--100, #06c));
|
|
68
|
+
--pf-c-tile__icon--Color: var(--pf-c-tile--hover__icon--Color, var(--pf-global--primary-color--100, #06c));
|
|
69
|
+
--pf-c-tile--after--BackgroundColor: var(--pf-c-tile--hover--after--BackgroundColor, var(--pf-global--active-color--400, #73bcf7));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:host(:focus) {
|
|
73
|
+
--pf-c-tile__title--Color: var(--pf-c-tile--focus__title--Color, var(--pf-global--primary-color--100, #06c));
|
|
74
|
+
--pf-c-tile__icon--Color: var(--pf-c-tile--focus__icon--Color, var(--pf-global--primary-color--100, #06c));
|
|
75
|
+
--pf-c-tile--after--BackgroundColor: var(--pf-c-tile--focus--after--BackgroundColor, var(--pf-global--active-color--400, #73bcf7));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:host(:active),
|
|
79
|
+
:host([selected]) {
|
|
80
|
+
--pf-c-tile__title--Color: var(--pf-c-tile--m-selected__title--Color, var(--pf-global--primary-color--100, #06c));
|
|
81
|
+
--pf-c-tile__icon--Color: var(--pf-c-tile--m-selected__icon--Color, var(--pf-global--primary-color--100, #06c));
|
|
82
|
+
--pf-c-tile--TranslateY: var(--pf-c-tile--m-selected--TranslateY,
|
|
83
|
+
calc(-1 * var(--pf-c-tile--m-selected--after--ScaleY, 2) * var(--pf-c-tile--m-selected--after--Height,
|
|
84
|
+
var(--pf-global--BorderWidth--lg, 3px))));
|
|
85
|
+
--pf-c-tile--Transition: var(--pf-c-tile--m-selected--Transition,
|
|
86
|
+
var(--pf-global--Transition, all 250ms cubic-bezier(0.42, 0, 0.58, 1)));
|
|
87
|
+
--pf-c-tile--after--Height: var(--pf-c-tile--m-selected--after--Height, var(--pf-global--BorderWidth--lg, 3px));
|
|
88
|
+
--pf-c-tile--after--BackgroundColor: var(--pf-c-tile--m-selected--after--BackgroundColor, var(--pf-global--active-color--100, #06c));
|
|
89
|
+
--pf-c-tile--after--Transition: var(--pf-c-tile--m-selected--after--Transition,
|
|
90
|
+
var(--pf-global--Transition, all 250ms cubic-bezier(0.42, 0, 0.58, 1)));
|
|
91
|
+
--pf-c-tile--after--ScaleY: var(--pf-c-tile--m-selected--after--ScaleY, 2);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
:host([disabled]) {
|
|
95
|
+
--pf-c-tile--BackgroundColor: var(--pf-c-tile--m-disabled--BackgroundColor, var( --pf-global--disabled-color--300, #f0f0f0));
|
|
96
|
+
--pf-c-tile__title--Color: var(--pf-c-tile--m-disabled__title--Color, var(--pf-global--disabled-color--100, #6a6e73));
|
|
97
|
+
--pf-c-tile__body--Color: var(--pf-c-tile--m-disabled__body--Color, var(--pf-global--disabled-color--100, #6a6e73));
|
|
98
|
+
--pf-c-tile--before--BorderWidth: 0;
|
|
99
|
+
--pf-c-tile__icon--Color: var(--pf-c-tile--m-disabled__icon--Color, var(--pf-global--disabled-color--100, #6a6e73));
|
|
100
|
+
pointer-events: none;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
[part="header"] {
|
|
104
|
+
display: flex;
|
|
105
|
+
align-items: center;
|
|
106
|
+
justify-content: center;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
[part="title"] {
|
|
110
|
+
/** Color for tile title */
|
|
111
|
+
color: var(--pf-c-tile__title--Color, var(--pf-global--Color--100, var(--pf-global--Color--dark-100, #151515)));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
[part="body"] {
|
|
115
|
+
font-size: var(--pf-c-tile__body--FontSize, var(--pf-global--FontSize--xs, 0.75rem));
|
|
116
|
+
color: var(--pf-c-tile__body--Color, var(--pf-global--Color--100, #151515));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
[part="icon"] {
|
|
120
|
+
/** Font size for tile icon */
|
|
121
|
+
--_icon-size: var(--pf-c-tile__icon--FontSize, var(--pf-global--icon--FontSize--md, 1.125rem));
|
|
122
|
+
--pf-icon--size: var(--_icon-size);
|
|
123
|
+
/** Right margin for tile icon */
|
|
124
|
+
margin-right: var(--pf-c-tile__icon--MarginRight, var(--pf-global--spacer--sm, 0.5rem));
|
|
125
|
+
font-size: var(--_icon-size);
|
|
126
|
+
/** Color for tile icon */
|
|
127
|
+
color: var(--pf-c-tile__icon--Color, var(--pf-global--Color--100, #151515));
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
:host([stacked]) [part="header"] {
|
|
131
|
+
--pf-c-tile__icon--MarginRight: 0;
|
|
132
|
+
--_icon-size: var(--pf-c-tile__icon--FontSize, var(--pf-c-tile__header--m-stacked__icon--FontSize, var(--pf-global--icon--FontSize--lg, 1.5rem)));
|
|
133
|
+
flex-direction: column;
|
|
134
|
+
justify-content: initial;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
:host([stacked="lg"]) [part="icon"] {
|
|
138
|
+
--_icon-size: var(--pf-c-tile__icon--FontSize, var(--pf-c-tile--m-display-lg__header--m-stacked__icon--FontSize, var(--pf-global--icon--FontSize--xl, 3.375rem)));
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
:host([stacked]) [part="icon"] {
|
|
142
|
+
display: flex;
|
|
143
|
+
align-items: center;
|
|
144
|
+
justify-content: center;
|
|
145
|
+
/** Bottom margin for stacked tile icon */
|
|
146
|
+
margin-bottom: var(--pf-c-tile__header--m-stacked__icon--MarginBottom, var(--pf-global--spacer--xs, 0.25rem));
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
#body::slotted(:is(h1,h2,h3,h4,h5,h6,p)),
|
|
150
|
+
#title::slotted(:is(h1,h2,h3,h4,h5,h6,p)) {
|
|
151
|
+
margin-block: 0;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
`;
|
|
7
155
|
let PfTile = class PfTile extends LitElement {
|
|
8
156
|
constructor() {
|
|
9
157
|
super(...arguments);
|
|
@@ -12,21 +160,27 @@ let PfTile = class PfTile extends LitElement {
|
|
|
12
160
|
render() {
|
|
13
161
|
return html `
|
|
14
162
|
<div part="header">
|
|
163
|
+
<!-- container for the icon -->
|
|
15
164
|
<div part="icon">
|
|
165
|
+
<!-- Icon expects a \`<pf-icon>\` or \`<svg>\` -->
|
|
16
166
|
<slot id="icon" name="icon"></slot>
|
|
17
167
|
</div>
|
|
168
|
+
<!-- container for the title -->
|
|
18
169
|
<div part="title">
|
|
170
|
+
<!-- the title of the tile should be a heading -->
|
|
19
171
|
<slot id="title" name="title"></slot>
|
|
20
172
|
</div>
|
|
21
173
|
</div>
|
|
174
|
+
<!-- container for the body content -->
|
|
22
175
|
<div part="body">
|
|
176
|
+
<!-- The content should be a paragraph -->
|
|
23
177
|
<slot id="body"></slot>
|
|
24
178
|
</div>
|
|
25
179
|
`;
|
|
26
180
|
}
|
|
27
181
|
};
|
|
28
182
|
PfTile.styles = [styles];
|
|
29
|
-
PfTile.version = "4.
|
|
183
|
+
PfTile.version = "4.3.0";
|
|
30
184
|
__decorate([
|
|
31
185
|
property({ reflect: true, type: Boolean })
|
|
32
186
|
], PfTile.prototype, "selected", void 0);
|
package/pf-tile/pf-tile.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pf-tile.js","sourceRoot":"","sources":["pf-tile.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAuB,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC
|
|
1
|
+
{"version":3,"file":"pf-tile.js","sourceRoot":"","sources":["pf-tile.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAuB,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoB/C,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,UAAU;IAA/B;;QAGuC,aAAQ,GAAG,KAAK,CAAC;;IAIpD,MAAM;QACb,OAAO,IAAI,CAAA;;;;;;;;;;;;;;;;;;KAkBV,CAAC;IACJ,CAAC;;AA1Be,aAAM,GAAoB,CAAC,MAAM,CAAC,AAA5B,CAA6B;;AAEP;IAA3C,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCAAkB;AAEhC;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uCAAuB;AALxC,MAAM;IADlB,aAAa,CAAC,SAAS,CAAC;GACZ,MAAM","sourcesContent":["import { LitElement, html, type TemplateResult } from 'lit';\nimport { customElement } from 'lit/decorators/custom-element.js';\nimport { property } from 'lit/decorators/property.js';\n\nimport styles from './pf-tile.css';\n\nexport type StackedSize = (\n | 'md'\n | 'lg'\n);\n\n/**\n * A **tile** component is a form of selection that can be used in place of a\n * radio button and is commonly used in forms. A tile appears visually similar to a\n * [selectable card](../card/). However, tiles are used specifically when the user is selecting\n * a static option, whereas a selectable card triggers an action or opens a quickstart\n * or sidebar to provide additional information.\n * @alias Tile\n * @attr {'boolean'} selected - selected variant\n * @attr {'md'|'lg'|null} stacked - stacked variant\n */\n@customElement('pf-tile')\nexport class PfTile extends LitElement {\n static readonly styles: CSSStyleSheet[] = [styles];\n\n @property({ reflect: true, type: Boolean }) selected = false;\n\n @property({ reflect: true }) stacked?: StackedSize;\n\n override render(): TemplateResult<1> {\n return html`\n <div part=\"header\">\n <!-- container for the icon -->\n <div part=\"icon\">\n <!-- Icon expects a \\`<pf-icon>\\` or \\`<svg>\\` -->\n <slot id=\"icon\" name=\"icon\"></slot>\n </div>\n <!-- container for the title -->\n <div part=\"title\">\n <!-- the title of the tile should be a heading -->\n <slot id=\"title\" name=\"title\"></slot>\n </div>\n </div>\n <!-- container for the body content -->\n <div part=\"body\">\n <!-- The content should be a paragraph -->\n <slot id=\"body\"></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'pf-tile': PfTile;\n }\n}\n"]}
|
|
@@ -3,6 +3,7 @@ import { LitElement } from 'lit';
|
|
|
3
3
|
import { type DateTimeFormat } from '@patternfly/pfe-core/controllers/timestamp-controller.js';
|
|
4
4
|
/**
|
|
5
5
|
* A **timestamp** provides consistent formats for displaying date and time values.
|
|
6
|
+
* @alias Timestamp
|
|
6
7
|
*/
|
|
7
8
|
export declare class PfTimestamp extends LitElement {
|
|
8
9
|
#private;
|
|
@@ -5,7 +5,15 @@ import { customElement } from 'lit/decorators/custom-element.js';
|
|
|
5
5
|
import { property } from 'lit/decorators/property.js';
|
|
6
6
|
import { TimestampController, } from '@patternfly/pfe-core/controllers/timestamp-controller.js';
|
|
7
7
|
import { css } from "lit";
|
|
8
|
-
const style = css `:host {
|
|
8
|
+
const style = css `:host {
|
|
9
|
+
display: inline;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
time {
|
|
13
|
+
text-decoration: var(--_timestamp-text-decoration, none);
|
|
14
|
+
text-underline-offset: var(--_timestamp-text-underline-offset, initial);
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
9
17
|
const BooleanStringConverter = {
|
|
10
18
|
fromAttribute(value) {
|
|
11
19
|
return !value || value === 'true';
|
|
@@ -47,7 +55,7 @@ let PfTimestamp = class PfTimestamp extends LitElement {
|
|
|
47
55
|
};
|
|
48
56
|
_PfTimestamp_timestamp = new WeakMap();
|
|
49
57
|
PfTimestamp.styles = [style];
|
|
50
|
-
PfTimestamp.version = "4.
|
|
58
|
+
PfTimestamp.version = "4.3.0";
|
|
51
59
|
__decorate([
|
|
52
60
|
property({ reflect: true, attribute: 'date-format' })
|
|
53
61
|
], PfTimestamp.prototype, "dateFormat", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pf-timestamp.js","sourceRoot":"","sources":["pf-timestamp.ts"],"names":[],"mappings":";;AAEA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD,OAAO,EACL,mBAAmB,GAEpB,MAAM,0DAA0D,CAAC
|
|
1
|
+
{"version":3,"file":"pf-timestamp.js","sourceRoot":"","sources":["pf-timestamp.ts"],"names":[],"mappings":";;AAEA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD,OAAO,EACL,mBAAmB,GAEpB,MAAM,0DAA0D,CAAC;;;;;;;;;;;AAIlE,MAAM,sBAAsB,GAA8B;IACxD,aAAa,CAAC,KAAK;QACjB,OAAO,CAAC,KAAK,IAAI,KAAK,KAAK,MAAM,CAAC;IACpC,CAAC;CACF,CAAC;AAOK,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;IAApC;;QAwCL,iCAAa,IAAI,mBAAmB,CAAC,IAAI,CAAC,EAAC;;IAhB3C,IAAI,IAAI;QACN,OAAO,uBAAA,IAAI,8BAAW,CAAC,YAAY,CAAC;IACtC,CAAC;IAED,IAAI,IAAI,CAAC,MAAM;QACb,uBAAA,IAAI,8BAAW,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IAED,IAAI,SAAS;QACX,OAAO,uBAAA,IAAI,8BAAW,CAAC,SAAS,CAAC;IACnC,CAAC;IAED,IAAI,IAAI;QACN,OAAO,uBAAA,IAAI,8BAAW,CAAC,IAAI,CAAC;IAC9B,CAAC;IAID,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;YAC9B,uBAAA,IAAI,8BAAW,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAE,CAAC,CAAC;QAC9D,CAAC;IACH,CAAC;IAED,UAAU,CAAC,iBAAuC;QAChD,KAAK,MAAM,CAAC,IAAI,CAAC,IAAI,iBAAiB,EAAE,CAAC;YACvC,uBAAA,IAAI,8BAAW,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,IAAkB,CAAC,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA;wBACS,uBAAA,IAAI,8BAAW,CAAC,SAAS,KAAK,uBAAA,IAAI,8BAAW,CAAC,IAAI;KACrE,CAAC;IACJ,CAAC;;;AA1De,kBAAM,GAAoB,CAAC,KAAK,CAAC,AAA3B,CAA4B;;AAEK;IAAtD,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;+CAA6B;AAE5B;IAAtD,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;+CAA6B;AAEnD;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;iDAAuB;AAEI;IAAzD,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;kDAAwB;AAEpD;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAAiB;AAED;IAA3C,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6CAAoB;AAEnB;IAA3C,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCAAe;AAMvD;IAJF,QAAQ,CAAC;QACR,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,sBAAsB;KAClC,CAAC;2CAAkB;AAGpB;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uCAG3B;AA1BU,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW","sourcesContent":["import type { ComplexAttributeConverter, PropertyValues, TemplateResult } from 'lit';\n\nimport { LitElement, html } from 'lit';\nimport { customElement } from 'lit/decorators/custom-element.js';\nimport { property } from 'lit/decorators/property.js';\n\nimport {\n TimestampController,\n type DateTimeFormat,\n} from '@patternfly/pfe-core/controllers/timestamp-controller.js';\n\nimport style from './pf-timestamp.css';\n\nconst BooleanStringConverter: ComplexAttributeConverter = {\n fromAttribute(value) {\n return !value || value === 'true';\n },\n};\n\n/**\n * A **timestamp** provides consistent formats for displaying date and time values.\n * @alias Timestamp\n */\n@customElement('pf-timestamp')\nexport class PfTimestamp extends LitElement {\n static readonly styles: CSSStyleSheet[] = [style];\n\n @property({ reflect: true, attribute: 'date-format' }) dateFormat?: DateTimeFormat;\n\n @property({ reflect: true, attribute: 'time-format' }) timeFormat?: DateTimeFormat;\n\n @property({ attribute: false }) customFormat?: object;\n\n @property({ reflect: true, attribute: 'display-suffix' }) displaySuffix?: string;\n\n @property({ reflect: true }) locale?: string;\n\n @property({ reflect: true, type: Boolean }) relative?: boolean;\n\n @property({ reflect: true, type: Boolean }) utc?: boolean;\n\n @property({\n reflect: true,\n attribute: 'hour-12',\n converter: BooleanStringConverter,\n }) hour12?: boolean;\n\n @property({ reflect: true })\n get date(): string {\n return this.#timestamp.localeString;\n }\n\n set date(string) {\n this.#timestamp.date = new Date(string);\n }\n\n get isoString(): string {\n return this.#timestamp.isoString;\n }\n\n get time(): string {\n return this.#timestamp.time;\n }\n\n #timestamp = new TimestampController(this);\n\n connectedCallback(): void {\n super.connectedCallback();\n if (this.hasAttribute('date')) {\n this.#timestamp.date = new Date(this.getAttribute('date')!);\n }\n }\n\n willUpdate(changedProperties: PropertyValues<this>): void {\n for (const [prop] of changedProperties) {\n this.#timestamp.set(prop, this[prop as keyof this]);\n }\n }\n\n render(): TemplateResult<1> {\n return html`\n <time datetime=\"${this.#timestamp.isoString}\">${this.#timestamp.time}</time>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'pf-timestamp': PfTimestamp;\n }\n}\n"]}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
display: inline-flex;
|
|
11
11
|
position: relative;
|
|
12
12
|
max-width: 100%;
|
|
13
|
+
/** Tooltip arrow width */
|
|
13
14
|
--_floating-arrow-size: var(--pf-c-tooltip__arrow--Width, 0.5rem);
|
|
14
15
|
}
|
|
15
16
|
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
#tooltip {
|
|
22
23
|
--_timestamp-text-decoration: none;
|
|
23
24
|
--_timestamp-text-underline-offset: initial;
|
|
25
|
+
user-select: none;
|
|
24
26
|
display: block;
|
|
25
27
|
opacity: 0;
|
|
26
28
|
pointer-events: none;
|
|
@@ -34,12 +36,16 @@
|
|
|
34
36
|
top: 0;
|
|
35
37
|
left: 0;
|
|
36
38
|
will-change: opacity;
|
|
39
|
+
/** Sets the font color for the tooltip content */
|
|
37
40
|
line-height: var(--pf-c-tooltip--line-height, 1.5);
|
|
41
|
+
/** Maximum width for the tooltip */
|
|
38
42
|
max-width: var(--pf-c-tooltip--MaxWidth, 18.75rem);
|
|
43
|
+
/** Box shadow for the tooltip */
|
|
39
44
|
box-shadow: var(--pf-c-tooltip--BoxShadow,
|
|
40
45
|
var(--pf-global--BoxShadow--md,
|
|
41
46
|
0 0.25rem 0.5rem 0rem rgba(3, 3, 3, 0.12),
|
|
42
47
|
0 0 0.25rem 0 rgba(3, 3, 3, 0.06)));
|
|
48
|
+
/** Tooltip padding (top, right, bottom, left) */
|
|
43
49
|
padding:
|
|
44
50
|
var(--pf-c-tooltip__content--PaddingTop,
|
|
45
51
|
var(--pf-global--spacer--sm, 0.5rem))
|
|
@@ -49,10 +55,13 @@
|
|
|
49
55
|
var(--pf-global--spacer--sm, 0.5rem))
|
|
50
56
|
var(--pf-c-tooltip__content--PaddingLeft,
|
|
51
57
|
var(--pf-global--spacer--sm, 0.5rem));
|
|
58
|
+
/** Font size for the tooltip content */
|
|
52
59
|
font-size: var(--pf-c-tooltip__content--FontSize,
|
|
53
60
|
var(--pf-global--FontSize--sm, 0.875rem));
|
|
61
|
+
/** Sets the font color for the tooltip content */
|
|
54
62
|
color: var(--pf-c-tooltip__content--Color,
|
|
55
63
|
var(--pf-global--Color--light-100, #ffffff));
|
|
64
|
+
/** Sets the background color for the tooltip content */
|
|
56
65
|
background-color: var(--pf-c-tooltip__content--BackgroundColor,
|
|
57
66
|
var(--pf-global--BackgroundColor--dark-100, #151515));
|
|
58
67
|
}
|
|
@@ -70,6 +79,7 @@
|
|
|
70
79
|
|
|
71
80
|
.open #tooltip {
|
|
72
81
|
opacity: 1;
|
|
82
|
+
user-select: initial;
|
|
73
83
|
}
|
|
74
84
|
|
|
75
85
|
/* LEFT */
|
|
@@ -5,85 +5,7 @@ import { type Placement } from '@patternfly/pfe-core/controllers/floating-dom-co
|
|
|
5
5
|
* A **tooltip** is in-app messaging used to identify elements on a page with short,
|
|
6
6
|
* clarifying text.
|
|
7
7
|
* @summary Toggle the visibility of helpful or contextual information.
|
|
8
|
-
* @
|
|
9
|
-
* This slot wraps around the element that should be used to invoke the tooltip content to display.
|
|
10
|
-
* Typically this would be an icon, button, or other small sized element.
|
|
11
|
-
* @slot content
|
|
12
|
-
* This slot renders the content that will be displayed inside of the tooltip.
|
|
13
|
-
* Typically this would include a string of text without any additional elements.
|
|
14
|
-
* This element is wrapped with a div inside of the component to give it the stylings and background colors.
|
|
15
|
-
* @cssprop {<color>} [--pf-c-tooltip__content--BackgroundColor=#1b1d21]
|
|
16
|
-
* Sets the background color for the tooltip content.
|
|
17
|
-
*
|
|
18
|
-
* @cssprop {<color>} [--pf-c-tooltip__content--Color=#e0e0e0]
|
|
19
|
-
* Sets the font color for the tooltip content.
|
|
20
|
-
*
|
|
21
|
-
* @cssprop {<number>} [--pf-c-tooltip--line-height=1.5]
|
|
22
|
-
* Sets the font color for the tooltip content.
|
|
23
|
-
*
|
|
24
|
-
* @cssprop {<length>} [--pf-c-tooltip--MaxWidth=18.75rem]
|
|
25
|
-
* Maximum width for the tooltip.
|
|
26
|
-
*
|
|
27
|
-
* @cssprop [--pf-c-tooltip--BoxShadow=0 0.25rem 0.5rem 0rem rgba(3, 3, 3, 0.12), 0 0 0.25rem 0 rgba(3, 3, 3, 0.06)]
|
|
28
|
-
* Box shadow for the tooltip.
|
|
29
|
-
*
|
|
30
|
-
* @cssprop {<length>} [--pf-c-tooltip__content--PaddingTop=0.5rem]
|
|
31
|
-
* Top padding for the tooltip.
|
|
32
|
-
*
|
|
33
|
-
* @cssprop {<length>} [--pf-c-tooltip__content--PaddingRight=0.5rem]
|
|
34
|
-
* Right padding for the tooltip.
|
|
35
|
-
*
|
|
36
|
-
* @cssprop {<length>} [--pf-c-tooltip__content--PaddingBottom=0.5rem]
|
|
37
|
-
* Bottom padding for the tooltip.
|
|
38
|
-
*
|
|
39
|
-
* @cssprop {<length>} [--pf-c-tooltip__content--PaddingLeft=0.5rem]
|
|
40
|
-
* Left Padding for the tooltip.
|
|
41
|
-
*
|
|
42
|
-
* @cssprop [--pf-c-tooltip__content--FontSize=0.875rem]
|
|
43
|
-
* Font size for the tooltip content.
|
|
44
|
-
*
|
|
45
|
-
* @cssprop {<length>} [--pf-c-tooltip__arrow--Width=0.5rem]
|
|
46
|
-
* Tooltip arrow width.
|
|
47
|
-
*
|
|
48
|
-
* @cssprop {<length>} [--pf-c-tooltip__arrow--Height=0.5rem]
|
|
49
|
-
* Tooltip arrow height.
|
|
50
|
-
*
|
|
51
|
-
* @cssprop [--pf-c-tooltip__arrow--m-top--TranslateX=-50]
|
|
52
|
-
* Positions the tooltip arrow along the x axis for `top` positioned arrows.
|
|
53
|
-
*
|
|
54
|
-
* @cssprop [--pf-c-tooltip__arrow--m-top--TranslateY=50]
|
|
55
|
-
* Positions the tooltip arrow along the y axis for `top` positioned arrows.
|
|
56
|
-
*
|
|
57
|
-
* @cssprop [--pf-c-tooltip__arrow--m-top--Rotate=45deg]
|
|
58
|
-
* Rotates the tooltip arrow based on degrees of movement for `top` positioned arrows.
|
|
59
|
-
*
|
|
60
|
-
* @cssprop [--pf-c-tooltip__arrow--m-right--TranslateX=-50]
|
|
61
|
-
* Positions the tooltip arrow along the x axis for `right` positioned arrows.
|
|
62
|
-
*
|
|
63
|
-
* @cssprop [--pf-c-tooltip__arrow--m-right--TranslateY=-50]
|
|
64
|
-
* Positions the tooltip arrow along the y axis for `right` positioned arrows.
|
|
65
|
-
*
|
|
66
|
-
* @cssprop [--pf-c-tooltip__arrow--m-right--Rotate=45deg]
|
|
67
|
-
* Rotates the tooltip arrow based on degrees of movement for `right` positioned arrows.
|
|
68
|
-
*
|
|
69
|
-
* @cssprop [--pf-c-tooltip__arrow--m-bottom--TranslateX=-50]
|
|
70
|
-
* Positions the tooltip arrow along the x axis for `bottom` positioned arrows.
|
|
71
|
-
*
|
|
72
|
-
* @cssprop [--pf-c-tooltip__arrow--m-bottom--TranslateY=-50]
|
|
73
|
-
* Positions the tooltip arrow along the y axis for `bottom` positioned arrows.
|
|
74
|
-
*
|
|
75
|
-
* @cssprop [--pf-c-tooltip__arrow--m-bottom--Rotate=45deg]
|
|
76
|
-
* Rotates the tooltip arrow based on degrees of movement for `bottom` positioned arrows.
|
|
77
|
-
*
|
|
78
|
-
* @cssprop [--pf-c-tooltip__arrow--m-left--TranslateX=50]
|
|
79
|
-
* Positions the tooltip arrow along the x axis for `left` positioned arrows.
|
|
80
|
-
*
|
|
81
|
-
* @cssprop [--pf-c-tooltip__arrow--m-left--TranslateY=-50]
|
|
82
|
-
* Positions the tooltip arrow along the y axis for `left` positioned arrows.
|
|
83
|
-
*
|
|
84
|
-
* @cssprop [--pf-c-tooltip__arrow--m-left--Rotate=45deg]
|
|
85
|
-
* Rotates the tooltip arrow based on degrees of movement for `left` positioned arrows.
|
|
86
|
-
*
|
|
8
|
+
* @alias Tooltip
|
|
87
9
|
*/
|
|
88
10
|
export declare class PfTooltip extends LitElement {
|
|
89
11
|
#private;
|