@patternfly/elements 2.0.0 → 2.0.1

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.
Files changed (65) hide show
  1. package/custom-elements.json +44 -64
  2. package/package.json +2 -2
  3. package/pf-accordion/pf-accordion.d.ts +1 -2
  4. package/pf-accordion/pf-accordion.js +1 -2
  5. package/pf-accordion/pf-accordion.js.map +1 -1
  6. package/pf-avatar/pf-avatar.d.ts +1 -2
  7. package/pf-avatar/pf-avatar.js +1 -2
  8. package/pf-avatar/pf-avatar.js.map +1 -1
  9. package/pf-button/pf-button.d.ts +6 -8
  10. package/pf-button/pf-button.js +6 -8
  11. package/pf-button/pf-button.js.map +1 -1
  12. package/pf-card/pf-card.d.ts +5 -2
  13. package/pf-card/pf-card.js +5 -2
  14. package/pf-card/pf-card.js.map +1 -1
  15. package/pf-clipboard-copy/pf-clipboard-copy.css +21 -1
  16. package/pf-clipboard-copy/pf-clipboard-copy.d.ts +2 -1
  17. package/pf-clipboard-copy/pf-clipboard-copy.js +13 -10
  18. package/pf-clipboard-copy/pf-clipboard-copy.js.map +1 -1
  19. package/pf-code-block/pf-code-block.d.ts +2 -0
  20. package/pf-code-block/pf-code-block.js +2 -0
  21. package/pf-code-block/pf-code-block.js.map +1 -1
  22. package/pf-icon/pf-icon.d.ts +2 -1
  23. package/pf-icon/pf-icon.js +2 -1
  24. package/pf-icon/pf-icon.js.map +1 -1
  25. package/pf-jump-links/pf-jump-links-item.d.ts +3 -2
  26. package/pf-jump-links/pf-jump-links-item.js +2 -7
  27. package/pf-jump-links/pf-jump-links-item.js.map +1 -1
  28. package/pf-jump-links/pf-jump-links.d.ts +9 -4
  29. package/pf-jump-links/pf-jump-links.js +20 -17
  30. package/pf-jump-links/pf-jump-links.js.map +1 -1
  31. package/pf-label/pf-label.d.ts +2 -1
  32. package/pf-label/pf-label.js +2 -1
  33. package/pf-label/pf-label.js.map +1 -1
  34. package/pf-modal/pf-modal.d.ts +2 -2
  35. package/pf-modal/pf-modal.js +2 -2
  36. package/pf-modal/pf-modal.js.map +1 -1
  37. package/pf-panel/pf-panel.d.ts +5 -1
  38. package/pf-panel/pf-panel.js +5 -1
  39. package/pf-panel/pf-panel.js.map +1 -1
  40. package/pf-progress-stepper/pf-progress-stepper.d.ts +1 -1
  41. package/pf-progress-stepper/pf-progress-stepper.js +1 -1
  42. package/pf-progress-stepper/pf-progress-stepper.js.map +1 -1
  43. package/pf-spinner/pf-spinner.d.ts +3 -0
  44. package/pf-spinner/pf-spinner.js +3 -0
  45. package/pf-spinner/pf-spinner.js.map +1 -1
  46. package/pf-switch/pf-switch.d.ts +4 -1
  47. package/pf-switch/pf-switch.js +4 -1
  48. package/pf-switch/pf-switch.js.map +1 -1
  49. package/pf-tabs/pf-tab.d.ts +1 -1
  50. package/pf-tabs/pf-tab.js +1 -1
  51. package/pf-tabs/pf-tab.js.map +1 -1
  52. package/pf-tabs/pf-tabs.d.ts +1 -3
  53. package/pf-tabs/pf-tabs.js +1 -3
  54. package/pf-tabs/pf-tabs.js.map +1 -1
  55. package/pf-tile/pf-tile.d.ts +5 -1
  56. package/pf-tile/pf-tile.js +5 -1
  57. package/pf-tile/pf-tile.js.map +1 -1
  58. package/pf-timestamp/pf-timestamp.d.ts +3 -0
  59. package/pf-timestamp/pf-timestamp.js +3 -0
  60. package/pf-timestamp/pf-timestamp.js.map +1 -1
  61. package/pf-tooltip/pf-tooltip.d.ts +3 -4
  62. package/pf-tooltip/pf-tooltip.js +3 -4
  63. package/pf-tooltip/pf-tooltip.js.map +1 -1
  64. package/pfe.min.js +108 -106
  65. package/pfe.min.js.map +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"pf-tabs.js","sourceRoot":"","sources":["pf-tabs.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD,OAAO,EAAE,QAAQ,EA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;IAClB,QAAQ,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;4CAAyC;AAvBvE,MAAM;IADlB,aAAa,CAAC,SAAS,CAAC;GACZ,MAAM,CA4BlB;SA5BY,MAAM","sourcesContent":["import { customElement } from 'lit/decorators/custom-element.js';\nimport { property } from 'lit/decorators/property.js';\n\nimport { cascades } from '@patternfly/pfe-core/decorators.js';\n\nimport { BaseTabs } from './BaseTabs.js';\nimport { PfTab } from './pf-tab.js';\nimport { PfTabPanel } from './pf-tab-panel.js';\n\nimport styles from './pf-tabs.css';\n\n/**\n * Tabs allow users to navigate between views within the same page or context. Variants include\n * horizontal, vertical, inset, and filled. Most tab variations are available as open (default) or\n * box style tabs. Box style tabs also feature a light and dark variation.\n *\n * @attr {number} active-key - DOM Property: `activeKey` {@default `0`}\n *\n * @csspart container - outer container\n * @csspart tabs-container - tabs container\n * @csspart tabs - tablist\n * @csspart panels - panels\n *\n * @slot tab - Must contain one or more `<pf-tab>`\n * @slot - Must contain one or more `<pf-panel>`\n *\n * @cssprop {<length>} --pf-c-tabs--Width {@default `auto`}\n * @cssprop {<length>} --pf-c-tabs--inset {@default `0`}\n *\n * @cssprop {<color>} --pf-c-tabs--before--BorderColor {@default `#d2d2d2`}\n * @cssprop {<length>} --pf-c-tabs--before--BorderTopWidth {@default `0`}\n * @cssprop {<length>} --pf-c-tabs--before--BorderRightWidth {@default `0`}\n * @cssprop {<length>} --pf-c-tabs--before--BorderBottomWidth {@default `1px`}\n * @cssprop {<length>} --pf-c-tabs--before---BorderLeftWidth {@default `0`}\n *\n * @cssprop {<length>} --pf-c-tabs--m-vertical--MaxWidth {@default `15.625rem`}\n *\n * @cssprop {<color>} --pf-c-tabs--m-vertical__list--before--BorderColor {@default `#d2d2d2`}\n * @cssprop {<length>} --pf-c-tabs--m-vertical__list--before--BorderTopWidth {@default `0`}\n * @cssprop {<length>} --pf-c-tabs--m-vertical__list--before--BorderRightWidth {@default `0`}\n * @cssprop {<length>} --pf-c-tabs--m-vertical__list--before--BorderBottomWidth {@default `0`}\n * @cssprop {<length>} --pf-c-tabs--m-vertical__list--before--BorderLeftWidth {@default `1px`}\n *\n * @cssprop {<length>} --pf-c-tabs--m-vertical--m-box--inset {@default `2rem`}\n *\n * @cssprop {<display>} --pf-c-tabs__list--Display {@default `flex`}\n *\n * @cssprop {<length>} --pf-c-tabs__scroll-button--Width {@default `3rem`}\n * @cssprop {<color>} --pf-c-tabs__scroll-button--Color {@default `#151515`}\n * @cssprop {<color>} --pf-c-tabs__scroll-button--BackgroundColor {@default `#ffffff`}\n * @cssprop {<length>} --pf-c-tabs__scroll-button--OutlineOffset {@default `-0.25rem`}\n * @cssprop {<time>} --pf-c-tabs__scroll-button--TransitionDuration--margin {@default `.125s`}\n * @cssprop {<time>} --pf-c-tabs__scroll-button--TransitionDuration--transform {@default `.125s`}\n * @cssprop {<color>} --pf-c-tabs__scroll-button--hover--Color {@default `#06c`}\n *\n * @cssprop {<color>} --pf-c-tabs__scroll-button--before--BorderColor {@default `#d2d2d2`}\n * @cssprop {<length>} --pf-c-tabs__scroll-button--before--BorderRightWidth {@default `0`}\n * @cssprop {<length>} --pf-c-tabs__scroll-button--before--BorderBottomWidth {@default `1px`}\n * @cssprop {<length>} --pf-c-tabs__scroll-button--before--BorderLeftWidth {@default `0`}\n * @cssprop {<length>} --pf-c-tabs__scroll-button--before--border-width--base {@default `1px`}\n *\n * @cssprop {<color>} --pf-c-tabs__scroll-button--disabled--Color {@default `#d2d2d2`}\n */\n@customElement('pf-tabs')\nexport class PfTabs extends BaseTabs {\n static readonly styles = [...BaseTabs.styles, styles];\n\n protected static readonly scrollTimeoutDelay = 150;\n\n static isTab(element: HTMLElement): element is PfTab {\n return element instanceof PfTab;\n }\n\n static isPanel(element: HTMLElement): element is PfTabPanel {\n return element instanceof PfTabPanel;\n }\n\n @cascades('pf-tab', 'pf-tab-panel')\n @property({ reflect: true }) box: 'light' | 'dark' | null = null;\n\n @cascades('pf-tab', 'pf-tab-panel')\n @property({ reflect: true, type: Boolean }) vertical = false;\n\n @cascades('pf-tab')\n @property({ reflect: true, type: Boolean }) fill = false;\n\n @cascades('pf-tab')\n @property({ attribute: 'border-bottom' }) borderBottom: 'true' | 'false' = 'true';\n\n protected get canShowScrollButtons(): boolean {\n return !this.vertical;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'pf-tabs': PfTabs;\n }\n}\n"]}
1
+ {"version":3,"file":"pf-tabs.js","sourceRoot":"","sources":["pf-tabs.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAE9D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;;;AAI/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEI,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,QAAQ;IAA7B;;QAcwB,QAAG,GAA4B,IAAI,CAAC;QAGrB,aAAQ,GAAG,KAAK,CAAC;QAGjB,SAAI,GAAG,KAAK,CAAC;QAGf,iBAAY,GAAqB,MAAM,CAAC;IAKpF,CAAC;IAvBC,MAAM,CAAC,KAAK,CAAC,OAAoB;QAC/B,OAAO,OAAO,YAAY,KAAK,CAAC;IAClC,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,OAAoB;QACjC,OAAO,OAAO,YAAY,UAAU,CAAC;IACvC,CAAC;IAcD,IAAc,oBAAoB;QAChC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC;IACxB,CAAC;;AA1Be,aAAM,GAAG,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE5B,yBAAkB,GAAG,GAAG,CAAC;AAWtB;IAD5B,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;mCAAqC;AAGrB;IAD3C,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCAAkB;AAGjB;IAD3C,QAAQ,CAAC,QAAQ,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;oCAAc;AAGf;IADzC,QAAQ,CAAC,QAAQ,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;4CAAyC;AAvBvE,MAAM;IADlB,aAAa,CAAC,SAAS,CAAC;GACZ,MAAM,CA4BlB;SA5BY,MAAM","sourcesContent":["import { customElement } from 'lit/decorators/custom-element.js';\nimport { property } from 'lit/decorators/property.js';\n\nimport { cascades } from '@patternfly/pfe-core/decorators.js';\n\nimport { BaseTabs } from './BaseTabs.js';\nimport { PfTab } from './pf-tab.js';\nimport { PfTabPanel } from './pf-tab-panel.js';\n\nimport styles from './pf-tabs.css';\n\n/**\n * Tabs allow users to navigate between views within the same page or context.\n *\n * @attr {number} active-key - DOM Property: `activeKey` {@default `0`}\n *\n * @csspart container - outer container\n * @csspart tabs-container - tabs container\n * @csspart tabs - tablist\n * @csspart panels - panels\n *\n * @slot tab - Must contain one or more `<pf-tab>`\n * @slot - Must contain one or more `<pf-panel>`\n *\n * @cssprop {<length>} --pf-c-tabs--Width {@default `auto`}\n * @cssprop {<length>} --pf-c-tabs--inset {@default `0`}\n *\n * @cssprop {<color>} --pf-c-tabs--before--BorderColor {@default `#d2d2d2`}\n * @cssprop {<length>} --pf-c-tabs--before--BorderTopWidth {@default `0`}\n * @cssprop {<length>} --pf-c-tabs--before--BorderRightWidth {@default `0`}\n * @cssprop {<length>} --pf-c-tabs--before--BorderBottomWidth {@default `1px`}\n * @cssprop {<length>} --pf-c-tabs--before---BorderLeftWidth {@default `0`}\n *\n * @cssprop {<length>} --pf-c-tabs--m-vertical--MaxWidth {@default `15.625rem`}\n *\n * @cssprop {<color>} --pf-c-tabs--m-vertical__list--before--BorderColor {@default `#d2d2d2`}\n * @cssprop {<length>} --pf-c-tabs--m-vertical__list--before--BorderTopWidth {@default `0`}\n * @cssprop {<length>} --pf-c-tabs--m-vertical__list--before--BorderRightWidth {@default `0`}\n * @cssprop {<length>} --pf-c-tabs--m-vertical__list--before--BorderBottomWidth {@default `0`}\n * @cssprop {<length>} --pf-c-tabs--m-vertical__list--before--BorderLeftWidth {@default `1px`}\n *\n * @cssprop {<length>} --pf-c-tabs--m-vertical--m-box--inset {@default `2rem`}\n *\n * @cssprop {<display>} --pf-c-tabs__list--Display {@default `flex`}\n *\n * @cssprop {<length>} --pf-c-tabs__scroll-button--Width {@default `3rem`}\n * @cssprop {<color>} --pf-c-tabs__scroll-button--Color {@default `#151515`}\n * @cssprop {<color>} --pf-c-tabs__scroll-button--BackgroundColor {@default `#ffffff`}\n * @cssprop {<length>} --pf-c-tabs__scroll-button--OutlineOffset {@default `-0.25rem`}\n * @cssprop {<time>} --pf-c-tabs__scroll-button--TransitionDuration--margin {@default `.125s`}\n * @cssprop {<time>} --pf-c-tabs__scroll-button--TransitionDuration--transform {@default `.125s`}\n * @cssprop {<color>} --pf-c-tabs__scroll-button--hover--Color {@default `#06c`}\n *\n * @cssprop {<color>} --pf-c-tabs__scroll-button--before--BorderColor {@default `#d2d2d2`}\n * @cssprop {<length>} --pf-c-tabs__scroll-button--before--BorderRightWidth {@default `0`}\n * @cssprop {<length>} --pf-c-tabs__scroll-button--before--BorderBottomWidth {@default `1px`}\n * @cssprop {<length>} --pf-c-tabs__scroll-button--before--BorderLeftWidth {@default `0`}\n * @cssprop {<length>} --pf-c-tabs__scroll-button--before--border-width--base {@default `1px`}\n *\n * @cssprop {<color>} --pf-c-tabs__scroll-button--disabled--Color {@default `#d2d2d2`}\n */\n@customElement('pf-tabs')\nexport class PfTabs extends BaseTabs {\n static readonly styles = [...BaseTabs.styles, styles];\n\n protected static readonly scrollTimeoutDelay = 150;\n\n static isTab(element: HTMLElement): element is PfTab {\n return element instanceof PfTab;\n }\n\n static isPanel(element: HTMLElement): element is PfTabPanel {\n return element instanceof PfTabPanel;\n }\n\n @cascades('pf-tab', 'pf-tab-panel')\n @property({ reflect: true }) box: 'light' | 'dark' | null = null;\n\n @cascades('pf-tab', 'pf-tab-panel')\n @property({ reflect: true, type: Boolean }) vertical = false;\n\n @cascades('pf-tab')\n @property({ reflect: true, type: Boolean }) fill = false;\n\n @cascades('pf-tab')\n @property({ attribute: 'border-bottom' }) borderBottom: 'true' | 'false' = 'true';\n\n protected get canShowScrollButtons(): boolean {\n return !this.vertical;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'pf-tabs': PfTabs;\n }\n}\n"]}
@@ -1,7 +1,11 @@
1
1
  import { BaseTile } from './BaseTile.js';
2
2
  export type StackedSize = ('md' | 'lg');
3
3
  /**
4
- * Tile
4
+ * A tile component is a form of selection that can be used in place of a
5
+ * radio button and is commonly used in forms. A tile appears visually similar to a
6
+ * [selectable card](../card/). However, tiles are used specifically when the user is selecting
7
+ * a static option, whereas a selectable card triggers an action or opens a quickstart
8
+ * or sidebar to provide additional information.
5
9
  *
6
10
  * @slot icon - Icon expects a `<pf-icon>` or `<svg>`
7
11
  * @slot title - the title of the tile should be a heading
@@ -5,7 +5,11 @@ import { BaseTile } from './BaseTile.js';
5
5
  import { css } from "lit";
6
6
  const styles = css `:host{position:relative;display:inline-grid;padding:var(--pf-c-tile--PaddingTop,var(--pf-global--spacer--lg,1.5rem)) var(--pf-c-tile--PaddingRight,var(--pf-global--spacer--lg,1.5rem)) var(--pf-c-tile--PaddingBottom,var(--pf-global--spacer--lg,1.5rem)) var(--pf-c-tile--PaddingLeft,var(--pf-global--spacer--lg,1.5rem));text-align:center;cursor:pointer;background-color:var(--pf-c-tile--BackgroundColor,var(--pf-global--BackgroundColor--100,var(--pf-global--BackgroundColor--light-100),#fff));grid-template-rows:-webkit-min-content;grid-template-rows:min-content;transition:var(--pf-c-tile--Transition, none);transform:translateY(var(--pf-c-tile--TranslateY,0))}:host::after,:host::before{position:absolute;pointer-events:none;content:""}:host::before{top:0;right:0;bottom:0;left:0;border:var(--pf-c-tile--before--BorderWidth,var(--pf-global--BorderWidth--sm,1px)) solid var(--pf-c-tile--before--BorderColor,var(--pf-global--BorderColor--100,#d2d2d2))}:host::after{right:0;bottom:0;left:0;height:var(--pf-c-tile--after--Height,var(--pf-global--BorderWidth--lg,3px));background-color:var(--pf-c-tile--after--BackgroundColor,transparent);transition:var(--pf-c-tile--after--Transition, none);transform:scaleY(var(--pf-c-tile--after--ScaleY,1)) translateY(var(--pf-c-tile--after--TranslateY,0))}:host(:hover){--pf-c-tile__title--Color:var(--pf-c-tile--hover__title--Color, var(--pf-global--primary-color--100, #06c));--pf-c-tile__icon--Color:var(--pf-c-tile--hover__icon--Color, var(--pf-global--primary-color--100, #06c));--pf-c-tile--after--BackgroundColor:var(--pf-c-tile--hover--after--BackgroundColor, var(--pf-global--active-color--400, #73bcf7))}:host(:focus){--pf-c-tile__title--Color:var(--pf-c-tile--focus__title--Color, var(--pf-global--primary-color--100, #06c));--pf-c-tile__icon--Color:var(--pf-c-tile--focus__icon--Color, var(--pf-global--primary-color--100, #06c));--pf-c-tile--after--BackgroundColor:var(--pf-c-tile--focus--after--BackgroundColor, var(--pf-global--active-color--400, #73bcf7))}:host(:active),:host([selected]){--pf-c-tile__title--Color:var(--pf-c-tile--m-selected__title--Color, var(--pf-global--primary-color--100, #06c));--pf-c-tile__icon--Color:var(--pf-c-tile--m-selected__icon--Color, var(--pf-global--primary-color--100, #06c));--pf-c-tile--TranslateY:var(--pf-c-tile--m-selected--TranslateY,\n calc(-1 * var(--pf-c-tile--m-selected--after--ScaleY, 2) * var(--pf-c-tile--m-selected--after--Height,\n var(--pf-global--BorderWidth--lg, 3px))));--pf-c-tile--Transition:var(--pf-c-tile--m-selected--Transition,\n var(--pf-global--Transition, all 250ms cubic-bezier(0.42, 0, 0.58, 1)));--pf-c-tile--after--Height:var(--pf-c-tile--m-selected--after--Height, var(--pf-global--BorderWidth--lg, 3px));--pf-c-tile--after--BackgroundColor:var(--pf-c-tile--m-selected--after--BackgroundColor, var(--pf-global--active-color--100, #06c));--pf-c-tile--after--Transition:var(--pf-c-tile--m-selected--after--Transition,\n var(--pf-global--Transition, all 250ms cubic-bezier(0.42, 0, 0.58, 1)));--pf-c-tile--after--ScaleY:var(--pf-c-tile--m-selected--after--ScaleY, 2)}:host([disabled]){--pf-c-tile--BackgroundColor:var(--pf-c-tile--m-disabled--BackgroundColor, var( --pf-global--disabled-color--300, #f0f0f0));--pf-c-tile__title--Color:var(--pf-c-tile--m-disabled__title--Color, var(--pf-global--disabled-color--100, #6a6e73));--pf-c-tile__body--Color:var(--pf-c-tile--m-disabled__body--Color, var(--pf-global--disabled-color--100, #6a6e73));--pf-c-tile--before--BorderWidth:0;--pf-c-tile__icon--Color:var(--pf-c-tile--m-disabled__icon--Color, var(--pf-global--disabled-color--100, #6a6e73));pointer-events:none}[part=header]{display:flex;align-items:center;justify-content:center}[part=title]{color:var(--pf-c-tile__title--Color,var(--pf-global--Color--100,var(--pf-global--Color--dark-100,#151515)))}[part=body]{font-size:var(--pf-c-tile__body--FontSize, var(--pf-global--FontSize--xs, .75rem));color:var(--pf-c-tile__body--Color,var(--pf-global--Color--100,#151515))}[part=icon]{--_icon-size:var(--pf-c-tile__icon--FontSize: var(--pf-global--icon--FontSize--md, 1.125rem));--pf-icon--size:var(--_icon-size);margin-right:var(--pf-c-tile__icon--MarginRight,var(--pf-global--spacer--sm,.5rem));font-size:var(--_icon-size);color:var(--pf-c-tile__icon--Color,var(--pf-global--Color--100,#151515))}:host([stacked]) [part=header]{--pf-c-tile__icon--MarginRight:0;--_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)));flex-direction:column;justify-content:initial}:host([stacked=lg]) [part=icon]{--_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)))}:host([stacked]) [part=icon]{display:flex;align-items:center;justify-content:center;margin-bottom:var(--pf-c-tile__header--m-stacked__icon--MarginBottom,var(--pf-global--spacer--xs,.25rem))}#body::slotted(:is(h1,h2,h3,h4,h5,h6,p)),#title::slotted(:is(h1,h2,h3,h4,h5,h6,p)){margin-block:0}`;
7
7
  /**
8
- * Tile
8
+ * A tile component is a form of selection that can be used in place of a
9
+ * radio button and is commonly used in forms. A tile appears visually similar to a
10
+ * [selectable card](../card/). However, tiles are used specifically when the user is selecting
11
+ * a static option, whereas a selectable card triggers an action or opens a quickstart
12
+ * or sidebar to provide additional information.
9
13
  *
10
14
  * @slot icon - Icon expects a `<pf-icon>` or `<svg>`
11
15
  * @slot title - the title of the tile should be a heading
@@ -1 +1 @@
1
- {"version":3,"file":"pf-tile.js","sourceRoot":"","sources":["pf-tile.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;;;AASzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEI,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,QAAQ;IAA7B;;QAGuC,aAAQ,GAAG,KAAK,CAAC;IAG/D,CAAC;;AALiB,aAAM,GAAG,CAAC,MAAM,CAAC,CAAC;AAEU;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,CAMlB;SANY,MAAM","sourcesContent":["\nimport { customElement } from 'lit/decorators/custom-element.js';\nimport { property } from 'lit/decorators/property.js';\n\nimport { BaseTile } from './BaseTile.js';\n\nimport styles from './pf-tile.css';\n\nexport type StackedSize = (\n | 'md'\n | 'lg'\n)\n\n/**\n * Tile\n *\n * @slot icon - Icon expects a `<pf-icon>` or `<svg>`\n * @slot title - the title of the tile should be a heading\n * @slot - The content should be a paragraph\n *\n * @csspart icon - container for the icon\n * @csspart title - container for the title\n * @csspart body - container for the body content\n *\n * @attr {'boolean'} selected - selected variant\n * @attr {'md'|'lg'|null} stacked - stacked variant\n *\n * @cssprop {<length>} --pf-c-tile--PaddingTop {@default `1.5rem`}\n * @cssprop {<length>} --pf-c-tile--PaddingRight {@default `1.5rem`}\n * @cssprop {<length>} --pf-c-tile--PaddingBottom {@default `1.5rem`}\n * @cssprop {<length>} --pf-c-tile--PaddingLeft {@default `1.5rem`}\n *\n * @cssprop {<color>} --pf-c-tile--BackgroundColor {@default `#FFFFFF`}\n *\n * @cssprop --pf-c-tile--Transition {@default `none`}\n * @cssprop --pf-c-tile--TranslateY {@default `0`}\n *\n * @cssprop {<length>} --pf-c-tile--before--BorderWidth {@default `1px`}\n * @cssprop {<color>} --pf-c-tile--before--BorderColor {@default `#444548`}\n *\n * @cssprop {<length>} --pf-c-tile--after--Height {@default `3px`}\n * @cssprop {<color>} --pf-c-tile--after--BackgroundColor {@default `transparent`}\n *\n * @cssprop --pf-c-tile--after--Transition {@default `none`}\n * @cssprop --pf-c-tile--after--ScaleY {@default `1`}\n *\n * @cssprop {<color>} --pf-c-tile__title--Color {@default `#06c`}\n * @cssprop {<color>} --pf-c-tile__icon--Color {@default `#06c`}\n *\n * @cssprop {<length>} --pf-c-tile__icon--MarginRight {@default `0`}\n * @cssprop {<length>} --pf-c-tile__icon--FontSize {@default `1.5rem`}\n *\n * @cssprop {<lenght>} --pf-c-tile__header--m-stacked__icon--MarginBottom {@default `0.25rem`}\n */\n@customElement('pf-tile')\nexport class PfTile extends BaseTile {\n static readonly styles = [styles];\n\n @property({ reflect: true, type: Boolean }) selected = false;\n\n @property({ reflect: true }) stacked?: StackedSize;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'pf-tile': PfTile;\n}\n}\n"]}
1
+ {"version":3,"file":"pf-tile.js","sourceRoot":"","sources":["pf-tile.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;;;AASzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEI,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,QAAQ;IAA7B;;QAGuC,aAAQ,GAAG,KAAK,CAAC;IAG/D,CAAC;;AALiB,aAAM,GAAG,CAAC,MAAM,CAAC,CAAC;AAEU;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,CAMlB;SANY,MAAM","sourcesContent":["\nimport { customElement } from 'lit/decorators/custom-element.js';\nimport { property } from 'lit/decorators/property.js';\n\nimport { BaseTile } from './BaseTile.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 *\n * @slot icon - Icon expects a `<pf-icon>` or `<svg>`\n * @slot title - the title of the tile should be a heading\n * @slot - The content should be a paragraph\n *\n * @csspart icon - container for the icon\n * @csspart title - container for the title\n * @csspart body - container for the body content\n *\n * @attr {'boolean'} selected - selected variant\n * @attr {'md'|'lg'|null} stacked - stacked variant\n *\n * @cssprop {<length>} --pf-c-tile--PaddingTop {@default `1.5rem`}\n * @cssprop {<length>} --pf-c-tile--PaddingRight {@default `1.5rem`}\n * @cssprop {<length>} --pf-c-tile--PaddingBottom {@default `1.5rem`}\n * @cssprop {<length>} --pf-c-tile--PaddingLeft {@default `1.5rem`}\n *\n * @cssprop {<color>} --pf-c-tile--BackgroundColor {@default `#FFFFFF`}\n *\n * @cssprop --pf-c-tile--Transition {@default `none`}\n * @cssprop --pf-c-tile--TranslateY {@default `0`}\n *\n * @cssprop {<length>} --pf-c-tile--before--BorderWidth {@default `1px`}\n * @cssprop {<color>} --pf-c-tile--before--BorderColor {@default `#444548`}\n *\n * @cssprop {<length>} --pf-c-tile--after--Height {@default `3px`}\n * @cssprop {<color>} --pf-c-tile--after--BackgroundColor {@default `transparent`}\n *\n * @cssprop --pf-c-tile--after--Transition {@default `none`}\n * @cssprop --pf-c-tile--after--ScaleY {@default `1`}\n *\n * @cssprop {<color>} --pf-c-tile__title--Color {@default `#06c`}\n * @cssprop {<color>} --pf-c-tile__icon--Color {@default `#06c`}\n *\n * @cssprop {<length>} --pf-c-tile__icon--MarginRight {@default `0`}\n * @cssprop {<length>} --pf-c-tile__icon--FontSize {@default `1.5rem`}\n *\n * @cssprop {<lenght>} --pf-c-tile__header--m-stacked__icon--MarginBottom {@default `0.25rem`}\n */\n@customElement('pf-tile')\nexport class PfTile extends BaseTile {\n static readonly styles = [styles];\n\n @property({ reflect: true, type: Boolean }) selected = false;\n\n @property({ reflect: true }) stacked?: StackedSize;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'pf-tile': PfTile;\n}\n}\n"]}
@@ -1,4 +1,7 @@
1
1
  import { LitElement } from 'lit';
2
+ /**
3
+ * A timestamp provides consistent formats for displaying date and time values.
4
+ */
2
5
  export declare class PfTimestamp extends LitElement {
3
6
  #private;
4
7
  static readonly styles: import("lit").CSSResult[];
@@ -10,6 +10,9 @@ const BooleanStringConverter = {
10
10
  return !value || value === 'true';
11
11
  },
12
12
  };
13
+ /**
14
+ * A timestamp provides consistent formats for displaying date and time values.
15
+ */
13
16
  let PfTimestamp = class PfTimestamp extends LitElement {
14
17
  constructor() {
15
18
  super(...arguments);
@@ -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;;;AAItD,MAAM,sBAAsB,GAA8B;IACxD,aAAa,CAAC,KAAK;QACjB,OAAO,CAAC,KAAK,IAAI,KAAK,KAAK,MAAM,CAAC;IACpC,CAAC;CACF,CAAC;AAGK,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;IAApC;;;QA6BL,4BAAQ,IAAI,IAAI,EAAE,EAAC;QAEnB,iCAAa,uBAAA,IAAI,yBAAM,CAAC,WAAW,EAAE,EAAC;IAkExC,CAAC;IA7FC,IAAI,IAAI;QACN,OAAO,uBAAA,IAAI,yBAAM,CAAC,cAAc,EAAE,CAAC;IACrC,CAAC;IAED,IAAI,IAAI,CAAC,MAAM;QACb,uBAAA,IAAI,qBAAS,IAAI,IAAI,CAAC,MAAM,CAAC,MAAA,CAAC;QAC9B,uBAAA,IAAI,0BAAc,uBAAA,IAAI,yBAAM,CAAC,WAAW,EAAE,MAAA,CAAC;IAC7C,CAA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ter } 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 style from './pf-timestamp.css';\n\nconst BooleanStringConverter: ComplexAttributeConverter = {\n fromAttribute(value) {\n return !value || value === 'true';\n },\n};\n\n@customElement('pf-timestamp')\nexport class PfTimestamp extends LitElement {\n static readonly styles = [style];\n\n @property({ reflect: true })\n get date() {\n return this.#date.toLocaleString();\n }\n\n set date(string) {\n this.#date = new Date(string);\n this.#isoString = this.#date.toISOString();\n }\n\n @property({ reflect: true, attribute: 'date-format' }) dateFormat?: 'full' | 'long' | 'medium' | 'short';\n\n @property({ reflect: true, attribute: 'time-format' }) timeFormat?: 'full' | 'long' | 'medium' | 'short';\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({ reflect: true, attribute: 'hour-12', converter: BooleanStringConverter }) hour12?: boolean;\n\n #date = new Date();\n\n #isoString = this.#date.toISOString();\n\n get isoString() {\n return this.#isoString;\n }\n\n get time() {\n const { hour12, customFormat, dateFormat: dateStyle, timeFormat: timeStyle, utc } = this;\n const timeZone = utc ? 'UTC' : undefined;\n const formatOptions = customFormat || { hour12, dateStyle, timeStyle, timeZone };\n const formattedDate = this.#date.toLocaleString(this.locale, formatOptions);\n return this.relative ? this.#getTimeRelative(this.#date) : `${formattedDate}${this.displaySuffix ? ` ${this.displaySuffix}` : ''}`;\n }\n\n willUpdate() {\n if (!this.displaySuffix && this.utc) {\n this.displaySuffix = 'UTC';\n }\n }\n\n render() {\n return html`\n <time datetime=\"${this.isoString}\">${this.time}</time>\n `;\n }\n\n /**\n * Based off of Github Relative Time\n * https://github.com/github/time-elements/blob/master/src/relative-time.js\n */\n #getTimeRelative(date: Date) {\n const ms: number = date.getTime() - Date.now();\n const tense = ms > 0 ? 'until' : 'ago';\n let str = 'just now';\n const s = Math.round(Math.abs(ms) / 1000);\n const min = Math.round(s / 60);\n const h = Math.round(min / 60);\n const d = Math.round(h / 24);\n const m = Math.round(d / 30);\n const y = Math.round(m / 12);\n if (m >= 18) {\n str = `${y} years`;\n } else if (m >= 12) {\n str = 'a year';\n } else if (d >= 45) {\n str = `${m} months`;\n } else if (d >= 30) {\n str = 'a month';\n } else if (h >= 36) {\n str = `${d} days`;\n } else if (h >= 24) {\n str = 'a day';\n } else if (min >= 90) {\n str = `${h} hours`;\n } else if (min >= 45) {\n str = 'an hour';\n } else if (s >= 90) {\n str = `${min} minutes`;\n } else if (s >= 45) {\n str = 'a minute';\n } else if (s >= 10) {\n str = `${s} seconds`;\n }\n\n return str !== 'just now' ? `${str} ${tense}` : str;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'pf-timestamp': PfTimestamp;\n }\n}\n"]}
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;;;AAItD,MAAM,sBAAsB,GAA8B;IACxD,aAAa,CAAC,KAAK;QACjB,OAAO,CAAC,KAAK,IAAI,KAAK,KAAK,MAAM,CAAC;IACpC,CAAC;CACF,CAAC;AAEF;;GAEG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;IAApC;;;QA6BL,4BAAQ,IAAI,IAAI,EAAE,EAAC;QAEnB,iCAAa,uBAAA,IAAI,yBAAM,CAAC,WAAW,EAAE,EAAC;IAkExC,CAAC;IA7FC,IAAI,IAAI;QACN,OAAO,uBAAA,IAAI,yBAAM,CAAC,cAAc,EAAE,CAAC;IACrC,CAA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,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,sBAAsB,EAAE,CAAC;2CAAkB;AA3B5F,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAiGvB;SAjGY,WAAW","sourcesContent":["import type { ComplexAttributeConverter } 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 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 */\n@customElement('pf-timestamp')\nexport class PfTimestamp extends LitElement {\n static readonly styles = [style];\n\n @property({ reflect: true })\n get date() {\n return this.#date.toLocaleString();\n }\n\n set date(string) {\n this.#date = new Date(string);\n this.#isoString = this.#date.toISOString();\n }\n\n @property({ reflect: true, attribute: 'date-format' }) dateFormat?: 'full' | 'long' | 'medium' | 'short';\n\n @property({ reflect: true, attribute: 'time-format' }) timeFormat?: 'full' | 'long' | 'medium' | 'short';\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({ reflect: true, attribute: 'hour-12', converter: BooleanStringConverter }) hour12?: boolean;\n\n #date = new Date();\n\n #isoString = this.#date.toISOString();\n\n get isoString() {\n return this.#isoString;\n }\n\n get time() {\n const { hour12, customFormat, dateFormat: dateStyle, timeFormat: timeStyle, utc } = this;\n const timeZone = utc ? 'UTC' : undefined;\n const formatOptions = customFormat || { hour12, dateStyle, timeStyle, timeZone };\n const formattedDate = this.#date.toLocaleString(this.locale, formatOptions);\n return this.relative ? this.#getTimeRelative(this.#date) : `${formattedDate}${this.displaySuffix ? ` ${this.displaySuffix}` : ''}`;\n }\n\n willUpdate() {\n if (!this.displaySuffix && this.utc) {\n this.displaySuffix = 'UTC';\n }\n }\n\n render() {\n return html`\n <time datetime=\"${this.isoString}\">${this.time}</time>\n `;\n }\n\n /**\n * Based off of Github Relative Time\n * https://github.com/github/time-elements/blob/master/src/relative-time.js\n */\n #getTimeRelative(date: Date) {\n const ms: number = date.getTime() - Date.now();\n const tense = ms > 0 ? 'until' : 'ago';\n let str = 'just now';\n const s = Math.round(Math.abs(ms) / 1000);\n const min = Math.round(s / 60);\n const h = Math.round(min / 60);\n const d = Math.round(h / 24);\n const m = Math.round(d / 30);\n const y = Math.round(m / 12);\n if (m >= 18) {\n str = `${y} years`;\n } else if (m >= 12) {\n str = 'a year';\n } else if (d >= 45) {\n str = `${m} months`;\n } else if (d >= 30) {\n str = 'a month';\n } else if (h >= 36) {\n str = `${d} days`;\n } else if (h >= 24) {\n str = 'a day';\n } else if (min >= 90) {\n str = `${h} hours`;\n } else if (min >= 45) {\n str = 'an hour';\n } else if (s >= 90) {\n str = `${min} minutes`;\n } else if (s >= 45) {\n str = 'a minute';\n } else if (s >= 10) {\n str = `${s} seconds`;\n }\n\n return str !== 'just now' ? `${str} ${tense}` : str;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'pf-timestamp': PfTimestamp;\n }\n}\n"]}
@@ -1,11 +1,10 @@
1
1
  import type { Placement } from '@patternfly/pfe-core/controllers/floating-dom-controller.js';
2
2
  import { BaseTooltip } from './BaseTooltip.js';
3
3
  /**
4
- * Patternfly tooltip
4
+ * A tooltip is in-app messaging used to identify elements on a page with short,
5
+ * clarifying text.
5
6
  *
6
- * A Tooltip is a floating text area triggered by a user that provides helpful or contextual information.
7
- *
8
- * @summary Toggle the visiblity of helpful or contextual information.
7
+ * @summary Toggle the visibility of helpful or contextual information.
9
8
  *
10
9
  * @slot
11
10
  * This slot wraps around the element that should be used to invoke the tooltip content to display.
@@ -5,11 +5,10 @@ import { BaseTooltip } from './BaseTooltip.js';
5
5
  import { css } from "lit";
6
6
  const styles = css `:host{--_timestamp-text-decoration:underline dashed 1px;--_timestamp-text-underline-offset:4px}#tooltip{--_timestamp-text-decoration:none;--_timestamp-text-underline-offset:initial;line-height:var(--pf-c-tooltip--line-height, 1.5);max-width:var(--pf-c-tooltip--MaxWidth,18.75rem);box-shadow:var(--pf-c-tooltip--BoxShadow,var(--pf-global--BoxShadow--md,0 .25rem .5rem 0 rgba(3,3,3,.12),0 0 .25rem 0 rgba(3,3,3,.06)));padding:var(--pf-c-tooltip__content--PaddingTop,var(--pf-global--spacer--sm,.5rem)) var(--pf-c-tooltip__content--PaddingRight,var(--pf-global--spacer--sm,.5rem)) var(--pf-c-tooltip__content--PaddingBottom,var(--pf-global--spacer--sm,.5rem)) var(--pf-c-tooltip__content--PaddingLeft,var(--pf-global--spacer--sm,.5rem));font-size:var(--pf-c-tooltip__content--FontSize,\n var(--pf-global--FontSize--sm, .875rem));color:var(--pf-c-tooltip__content--Color,var(--pf-global--Color--light-100,#fff));background-color:var(--pf-c-tooltip__content--BackgroundColor,var(--pf-global--BackgroundColor--dark-100,#151515))}#container{--_floating-arrow-size:var(--pf-c-tooltip__arrow--Width, 0.5rem)}#tooltip::after{background-color:var(--pf-c-tooltip__content--BackgroundColor,var(--pf-global--BackgroundColor--dark-100,#151515))}`;
7
7
  /**
8
- * Patternfly tooltip
8
+ * A tooltip is in-app messaging used to identify elements on a page with short,
9
+ * clarifying text.
9
10
  *
10
- * A Tooltip is a floating text area triggered by a user that provides helpful or contextual information.
11
- *
12
- * @summary Toggle the visiblity of helpful or contextual information.
11
+ * @summary Toggle the visibility of helpful or contextual information.
13
12
  *
14
13
  * @slot
15
14
  * This slot wraps around the element that should be used to invoke the tooltip content to display.
@@ -1 +1 @@
1
- {"version":3,"file":"pf-tooltip.js","sourceRoot":"","sources":["pf-tooltip.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;;;AAI/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuFG;AAEI,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,WAAW;IAAnC;;QAGO,aAAQ,GAAc,KAAK,CAAC;IAI1C,CAAC;;AANiB,gBAAM,GAAG,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE7C;IAAX,QAAQ,EAAE;2CAA6B;AAG5B;IAAX,QAAQ,EAAE;0CAAkB;AANlB,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CAOrB;SAPY,SAAS","sourcesContent":["import type { Placement } from '@patternfly/pfe-core/controllers/floating-dom-controller.js';\n\nimport { customElement } from 'lit/decorators/custom-element.js';\nimport { property } from 'lit/decorators/property.js';\nimport { BaseTooltip } from './BaseTooltip.js';\n\nimport styles from './pf-tooltip.css';\n\n/**\n * Patternfly tooltip\n *\n * A Tooltip is a floating text area triggered by a user that provides helpful or contextual information.\n *\n * @summary Toggle the visiblity of helpful or contextual information.\n *\n * @slot\n * This slot wraps around the element that should be used to invoke the tooltip content to display.\n * Typically this would be an icon, button, or other small sized element.\n * @slot content\n * This slot renders the content that will be displayed inside of the tooltip.\n * Typically this would include a string of text without any additional elements.\n * This element is wrapped with a div inside of the component to give it the stylings and background colors.\n *\n * @cssprop {<color>} --pf-c-tooltip__content--BackgroundColor\n * Sets the background color for the tooltip content.\n * {@default `#1b1d21`}\n * @cssprop {<color>} --pf-c-tooltip__content--Color\n * Sets the font color for the tooltip content.\n * {@default `#e0e0e0`}\n * @cssprop {<number>} --pf-c-tooltip--line-height\n * Sets the font color for the tooltip content.\n * {@default `1.5`}\n * @cssprop {<length>} --pf-c-tooltip--MaxWidth\n * Maximum width for the tooltip.\n * {@default `18.75rem`}\n * @cssprop --pf-c-tooltip--BoxShadow\n * Box shadow for the tooltip.\n * {@default `0 0.25rem 0.5rem 0rem rgba(3, 3, 3, 0.12), 0 0 0.25rem 0 rgba(3, 3, 3, 0.06)`}\n * @cssprop {<length>} --pf-c-tooltip__content--PaddingTop\n * Top padding for the tooltip.\n * {@default `0.5rem`}\n * @cssprop {<length>} --pf-c-tooltip__content--PaddingRight\n * Right padding for the tooltip.\n * {@default `0.5rem`}\n * @cssprop {<length>} --pf-c-tooltip__content--PaddingBottom\n * Bottom padding for the tooltip.\n * {@default `0.5rem`}\n * @cssprop {<length>} --pf-c-tooltip__content--PaddingLeft\n * Left Padding for the tooltip.\n * {@default `0.5rem`}\n * @cssprop --pf-c-tooltip__content--FontSize\n * Font size for the tooltip content.\n * {@default `0.875rem`}\n * @cssprop {<length>} --pf-c-tooltip__arrow--Width\n * Tooltip arrow width.\n * {@default `0.5rem`}\n * @cssprop {<length>} --pf-c-tooltip__arrow--Height\n * Tooltip arrow height.\n * {@default `0.5rem`}\n * @cssprop --pf-c-tooltip__arrow--m-top--TranslateX\n * Positions the tooltip arrow along the x axis for `top` positioned arrows.\n * {@default `-50%`}\n * @cssprop --pf-c-tooltip__arrow--m-top--TranslateY\n * Positions the tooltip arrow along the y axis for `top` positioned arrows.\n * {@default `50%`}\n * @cssprop --pf-c-tooltip__arrow--m-top--Rotate\n * Rotates the tooltip arrow based on degrees of movement for `top` positioned arrows.\n * {@default `45deg`}\n * @cssprop --pf-c-tooltip__arrow--m-right--TranslateX\n * Positions the tooltip arrow along the x axis for `right` positioned arrows.\n * {@default `-50%`}\n * @cssprop --pf-c-tooltip__arrow--m-right--TranslateY\n * Positions the tooltip arrow along the y axis for `right` positioned arrows.\n * {@default `-50%`}\n * @cssprop --pf-c-tooltip__arrow--m-right--Rotate\n * Rotates the tooltip arrow based on degrees of movement for `right` positioned arrows.\n * {@default `45deg`}\n * @cssprop --pf-c-tooltip__arrow--m-bottom--TranslateX\n * Positions the tooltip arrow along the x axis for `bottom` positioned arrows.\n * {@default `-50%`}\n * @cssprop --pf-c-tooltip__arrow--m-bottom--TranslateY\n * Positions the tooltip arrow along the y axis for `bottom` positioned arrows.\n * {@default `-50%`}\n * @cssprop --pf-c-tooltip__arrow--m-bottom--Rotate\n * Rotates the tooltip arrow based on degrees of movement for `bottom` positioned arrows.\n * {@default `45deg`}\n * @cssprop --pf-c-tooltip__arrow--m-left--TranslateX\n * Positions the tooltip arrow along the x axis for `left` positioned arrows.\n * {@default `50%`}\n * @cssprop --pf-c-tooltip__arrow--m-left--TranslateY\n * Positions the tooltip arrow along the y axis for `left` positioned arrows.\n * {@default `-50%`}\n * @cssprop --pf-c-tooltip__arrow--m-left--Rotate\n * Rotates the tooltip arrow based on degrees of movement for `left` positioned arrows.\n * {@default `45deg`}\n */\n@customElement('pf-tooltip')\nexport class PfTooltip extends BaseTooltip {\n static readonly styles = [...BaseTooltip.styles, styles];\n\n @property() position: Placement = 'top';\n\n /** Tooltip content. Overridden by the content slot */\n @property() content?: string;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'pf-tooltip': PfTooltip;\n }\n}\n"]}
1
+ {"version":3,"file":"pf-tooltip.js","sourceRoot":"","sources":["pf-tooltip.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;;;AAI/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsFG;AAEI,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,WAAW;IAAnC;;QAGO,aAAQ,GAAc,KAAK,CAAC;IAI1C,CAAC;;AANiB,gBAAM,GAAG,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE7C;IAAX,QAAQ,EAAE;2CAA6B;AAG5B;IAAX,QAAQ,EAAE;0CAAkB;AANlB,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CAOrB;SAPY,SAAS","sourcesContent":["import type { Placement } from '@patternfly/pfe-core/controllers/floating-dom-controller.js';\n\nimport { customElement } from 'lit/decorators/custom-element.js';\nimport { property } from 'lit/decorators/property.js';\nimport { BaseTooltip } from './BaseTooltip.js';\n\nimport styles from './pf-tooltip.css';\n\n/**\n * A tooltip is in-app messaging used to identify elements on a page with short,\n * clarifying text.\n *\n * @summary Toggle the visibility of helpful or contextual information.\n *\n * @slot\n * This slot wraps around the element that should be used to invoke the tooltip content to display.\n * Typically this would be an icon, button, or other small sized element.\n * @slot content\n * This slot renders the content that will be displayed inside of the tooltip.\n * Typically this would include a string of text without any additional elements.\n * This element is wrapped with a div inside of the component to give it the stylings and background colors.\n *\n * @cssprop {<color>} --pf-c-tooltip__content--BackgroundColor\n * Sets the background color for the tooltip content.\n * {@default `#1b1d21`}\n * @cssprop {<color>} --pf-c-tooltip__content--Color\n * Sets the font color for the tooltip content.\n * {@default `#e0e0e0`}\n * @cssprop {<number>} --pf-c-tooltip--line-height\n * Sets the font color for the tooltip content.\n * {@default `1.5`}\n * @cssprop {<length>} --pf-c-tooltip--MaxWidth\n * Maximum width for the tooltip.\n * {@default `18.75rem`}\n * @cssprop --pf-c-tooltip--BoxShadow\n * Box shadow for the tooltip.\n * {@default `0 0.25rem 0.5rem 0rem rgba(3, 3, 3, 0.12), 0 0 0.25rem 0 rgba(3, 3, 3, 0.06)`}\n * @cssprop {<length>} --pf-c-tooltip__content--PaddingTop\n * Top padding for the tooltip.\n * {@default `0.5rem`}\n * @cssprop {<length>} --pf-c-tooltip__content--PaddingRight\n * Right padding for the tooltip.\n * {@default `0.5rem`}\n * @cssprop {<length>} --pf-c-tooltip__content--PaddingBottom\n * Bottom padding for the tooltip.\n * {@default `0.5rem`}\n * @cssprop {<length>} --pf-c-tooltip__content--PaddingLeft\n * Left Padding for the tooltip.\n * {@default `0.5rem`}\n * @cssprop --pf-c-tooltip__content--FontSize\n * Font size for the tooltip content.\n * {@default `0.875rem`}\n * @cssprop {<length>} --pf-c-tooltip__arrow--Width\n * Tooltip arrow width.\n * {@default `0.5rem`}\n * @cssprop {<length>} --pf-c-tooltip__arrow--Height\n * Tooltip arrow height.\n * {@default `0.5rem`}\n * @cssprop --pf-c-tooltip__arrow--m-top--TranslateX\n * Positions the tooltip arrow along the x axis for `top` positioned arrows.\n * {@default `-50%`}\n * @cssprop --pf-c-tooltip__arrow--m-top--TranslateY\n * Positions the tooltip arrow along the y axis for `top` positioned arrows.\n * {@default `50%`}\n * @cssprop --pf-c-tooltip__arrow--m-top--Rotate\n * Rotates the tooltip arrow based on degrees of movement for `top` positioned arrows.\n * {@default `45deg`}\n * @cssprop --pf-c-tooltip__arrow--m-right--TranslateX\n * Positions the tooltip arrow along the x axis for `right` positioned arrows.\n * {@default `-50%`}\n * @cssprop --pf-c-tooltip__arrow--m-right--TranslateY\n * Positions the tooltip arrow along the y axis for `right` positioned arrows.\n * {@default `-50%`}\n * @cssprop --pf-c-tooltip__arrow--m-right--Rotate\n * Rotates the tooltip arrow based on degrees of movement for `right` positioned arrows.\n * {@default `45deg`}\n * @cssprop --pf-c-tooltip__arrow--m-bottom--TranslateX\n * Positions the tooltip arrow along the x axis for `bottom` positioned arrows.\n * {@default `-50%`}\n * @cssprop --pf-c-tooltip__arrow--m-bottom--TranslateY\n * Positions the tooltip arrow along the y axis for `bottom` positioned arrows.\n * {@default `-50%`}\n * @cssprop --pf-c-tooltip__arrow--m-bottom--Rotate\n * Rotates the tooltip arrow based on degrees of movement for `bottom` positioned arrows.\n * {@default `45deg`}\n * @cssprop --pf-c-tooltip__arrow--m-left--TranslateX\n * Positions the tooltip arrow along the x axis for `left` positioned arrows.\n * {@default `50%`}\n * @cssprop --pf-c-tooltip__arrow--m-left--TranslateY\n * Positions the tooltip arrow along the y axis for `left` positioned arrows.\n * {@default `-50%`}\n * @cssprop --pf-c-tooltip__arrow--m-left--Rotate\n * Rotates the tooltip arrow based on degrees of movement for `left` positioned arrows.\n * {@default `45deg`}\n */\n@customElement('pf-tooltip')\nexport class PfTooltip extends BaseTooltip {\n static readonly styles = [...BaseTooltip.styles, styles];\n\n @property() position: Placement = 'top';\n\n /** Tooltip content. Overridden by the content slot */\n @property() content?: string;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'pf-tooltip': PfTooltip;\n }\n}\n"]}