"@patternfly/pfe-core": major "@patternfly/pfe-sass": major "@patternfly/pfe-styles": minor "@patternfly/pfe-accordion": major "@patternfly/pfe-band": major "@patternfly/pfe-button": patch "@patternfly/pfe-card": major "@patternfly/pfe-clipboard": patch "@patternfly/pfe-collapse": minor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as C from '@lit-labs/context'; | |
class S<T extends C.ContextKey<unknown, unknown>> { | |
constructor( | |
public host: HTMLElement, | |
public context: T, | |
public provider: C.ContextType<T>, | |
) {} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 🚚 Installation | |
```sh | |
npm i @rhds/tokens | |
``` | |
## 🎭 Usage | |
We use [style-dictionary](https://amzn.github.io/style-dictionary/) to transform our tokens into multiple formats and helpers. | |
### Stylelint Plugin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @ts-check | |
/** | |
* Countdown timer as an observable. | |
* | |
* @param {number} timeout - Specified time to resolve the countdown specified in seconds. | |
* @param {?(number) => void} callback - Callback that updates on countdown change. | |
* @returns {{ cancel?: (string) => void, promise: Promise<void>}} | |
*/ | |
export function countdown(timeout, callback = null) { | |
const ret = {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Chris Coyer's Vid | |
https://twitter.com/chriscoyier/status/1588241068331786240 | |
Adam A's vids | |
https://twitter.com/argyleink/status/1588255406375153665 | |
https://twitter.com/ChromiumDev/status/1582786176917774337 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="module" id="rhds-bundle"> | |
let e=()=>null;function t(){e("[reveal] web components ready"),e("[reveal] elements ready, revealing the body"),window.document.body.removeAttribute("unresolved")}function r(e){return e.hasOwnProperty("default")&&e.default.constructor===e.type}Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError('"this" is null or not defined');var r=Object(this),o=r.length>>>0;if(0===o)return!1;var a=0|t,i=Math.max(a>=0?a:o-Math.abs(a),0);function n(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}for(;i<o;){if(n(r[i],e))return!0;i++}return!1}}),Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,o=new Array(r);r--;)o[r]=[t[r],e[t[r]]];return o}),String.prototype.startsWith||Object.defineProperty(String.prototype,"startsWith",{value:function(e,t){var r=t>0?0|t:0;return this.substring(r,r+e.length)===e}}),Element.prototype.closest||(Element.prototype.clos |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let e=()=>null;function t(){e("[reveal] web components ready"),e("[reveal] elements ready, revealing the body"),window.document.body.removeAttribute("unresolved")}function r(e){return e.hasOwnProperty("default")&&e.default.constructor===e.type}Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError('"this" is null or not defined');var r=Object(this),o=r.length>>>0;if(0===o)return!1;var a=0|t,i=Math.max(a>=0?a:o-Math.abs(a),0);function n(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}for(;i<o;){if(n(r[i],e))return!0;i++}return!1}}),Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,o=new Array(r);r--;)o[r]=[t[r],e[t[r]]];return o}),String.prototype.startsWith||Object.defineProperty(String.prototype,"startsWith",{value:function(e,t){var r=t>0?0|t:0;return this.substring(r,r+e.length)===e}}),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;do{if(t.match |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect } from "react"; | |
const App = ({ placeholder, entry }) => { | |
const [categories, setCategories] = useState([]); | |
// useEffect(() => { | |
// fetch('https://google.com') | |
// .then(res => res.json()) | |
// .then(res => { | |
// setCategories(res.data.categories) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (attr === "srcconverted" && this.src != "" && !this.rendering) { | |
this.rendering = true; | |
// loads the image in the background in-case of quality change | |
// also then supports failure events | |
let i = new Image(); | |
i.onload = () => { | |
this.render(this.srcconverted); | |
}; | |
// try loading just the normal one if this bombed | |
i.onerror = () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is where we infer Typescript types from JS arrays. | |
export const states = [ | |
'frame', | |
'color', | |
'pedals', | |
'seat', | |
'handles', | |
'wheels', | |
] as const; |