How to use @lrnwebcomponents/simple-colors - 9 common examples

To help you get started, we’ve selected a few @lrnwebcomponents/simple-colors examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github elmsln / lrnwebcomponents / elements / elmsln-loading / elmsln-loading.es6.js View on Github external
_getHexColor(color) {
    let name = color.replace("-text", "");
    let tmp = new SimpleColors();
    if (tmp.colors[name]) {
      return tmp.colors[name][6];
    }
    return "#000000";
  }
}
github elmsln / lrnwebcomponents / elements / lrndesign-avatar / lrndesign-avatar.es6.js View on Github external
_getHexColor(color) {
    let name = color.replace("-text", "");
    let tmp = new SimpleColors();
    if (tmp.colors[name]) {
      return tmp.colors[name][6];
    }
    return "#000000";
  }
  updated(changedProperties) {
github elmsln / lrnwebcomponents / elements / lrndesign-avatar / lrndesign-avatar.js View on Github external
_getHexColor(color) {
    let name = color.replace("-text", "");
    let tmp = new SimpleColors();
    if (tmp.colors[name]) {
      return tmp.colors[name][6];
    }
    return "#000000";
  }
  static get properties() {
github elmsln / lrnwebcomponents / elements / simple-blog / simple-blog.js View on Github external
import { html, css } from "lit-element/lit-element.js";
import { HAXCMSLitElementTheme } from "@lrnwebcomponents/haxcms-elements/lib/core/HAXCMSLitElementTheme.js";
import { store } from "@lrnwebcomponents/haxcms-elements/lib/core/haxcms-site-store.js";
import { autorun, toJS } from "mobx/lib/mobx.module.js";
import { SimpleColorsSuper } from "@lrnwebcomponents/simple-colors/simple-colors.js";
import "@lrnwebcomponents/simple-blog/lib/simple-blog-post.js";
import "@polymer/iron-pages/iron-pages.js";
/**
 * `simple-blog`
 * @customElement simple-blog
 * `A simple blog and associated elements`
 * @demo demo/index.html
 */
class SimpleBlog extends SimpleColorsSuper(HAXCMSLitElementTheme) {
  /**
   * LitElement constructable styles enhancement
   */
  static get styles() {
    return [
      ...super.styles,
      css`
        html,
        body {
          background-color: #fafafa;
        }
        :host {
          display: block;
          font-family: "Roboto", "Noto", sans-serif;
          -webkit-font-smoothing: antialiased;
          font-size: 14px;
github elmsln / lrnwebcomponents / elements / outline-player / outline-player.js View on Github external
import { HAXCMSLitElementTheme } from "@lrnwebcomponents/haxcms-elements/lib/core/HAXCMSLitElementTheme.js";
import { SimpleColorsSuper } from "@lrnwebcomponents/simple-colors/simple-colors.js";
import { store } from "@lrnwebcomponents/haxcms-elements/lib/core/haxcms-site-store.js";
import { autorun, toJS } from "mobx/lib/mobx.module.js";
/**
 * @deprecatedApply - required for @apply / invoking @apply css var convention
 */
import "@polymer/polymer/lib/elements/custom-style.js";
/**
 * `outline-player`
 * @customElement outline-player
 * `A basic outline presentation`
 *
 * @demo demo/index.html
 */
class OutlinePlayer extends SimpleColorsSuper(HAXCMSLitElementTheme) {
  /**
   * LitElement style render
   */
  static get styles() {
    return [
      ...super.styles,
      css`
        :host {
          display: block;
          font-family: libre baskerville;
          position: relative;
          overflow: hidden;
          --outline-player-min-height: 100vh;
          --app-drawer-width: 300px;
          --outline-player-dark: #222222;
          --outline-player-light: #f8f8f8;
github elmsln / lrnwebcomponents / elements / haxcms-elements / lib / core / themes / haxcms-slide-theme.js View on Github external
* @license Apache-2.0, see License.md for full text.
 */
import { html, css } from "lit-element/lit-element.js";
import { HAXCMSLitElementTheme } from "@lrnwebcomponents/haxcms-elements/lib/core/HAXCMSLitElementTheme.js";
import { SimpleColorsSuper } from "@lrnwebcomponents/simple-colors/simple-colors.js";
import { store } from "@lrnwebcomponents/haxcms-elements/lib/core/haxcms-site-store.js";
import { autorun, toJS } from "mobx/lib/mobx.module.js";
/**
 * `haxcms-slide-theme`
 * `A simple slide playing theme`
 *

 * @polymer
 * @demo demo/index.html
 */
class HAXCMSSlideTheme extends SimpleColorsSuper(HAXCMSLitElementTheme) {
  constructor() {
    super();
    this.__disposer = [];
    setTimeout(() => {
      import("@lrnwebcomponents/haxcms-elements/lib/ui-components/site/site-title.js");
      import("@lrnwebcomponents/haxcms-elements/lib/ui-components/site/site-print-button.js");
      import("@lrnwebcomponents/haxcms-elements/lib/ui-components/active-item/site-active-title.js");
      import("@lrnwebcomponents/haxcms-elements/lib/ui-components/navigation/site-dot-indicator");
      import("@lrnwebcomponents/haxcms-elements/lib/ui-components/navigation/site-menu-button.js");
      import("@polymer/paper-icon-button/paper-icon-button.js");
      import("@polymer/iron-icons/iron-icons.js");
      import("@polymer/paper-tooltip/paper-tooltip.js");
    }, 0);
  }
  /**
   * Store the tag name to make it easier to obtain directly.
github elmsln / lrnwebcomponents / elements / haxcms-elements / lib / core / site-list / haxcms-site-listing.js View on Github external
constructor() {
    super();
    this.SimpleColors = new SimpleColorsPolymer();
    setPassiveTouchGestures(true);
    window.HAXCMS = {};
    import("@lrnwebcomponents/haxcms-elements/lib/core/site-list/haxcms-site-listing-deps.js");
  }
  /**
github elmsln / lrnwebcomponents / elements / a11y-media-player / lib / a11y-media-behaviors.js View on Github external
static get properties() {
    return Object.assign(SimpleColorsPolymer.properties, {
      /**
       * Is this an audio file?
       */
      audioOnly: {
        name: "audioOnly",
        type: Boolean,
        value: false,
        reflectToAttribute: true
      },

      /**
       * autoplay is an option,
       * but generally not recommended for a11y
       */
      autoplay: {
        name: "autoplay",
github elmsln / lrnwebcomponents / elements / haxcms-elements / lib / core / haxcms-manifest-editor-dialog.js View on Github external
_colorChanged: function(e) {
    this.set("manifest.metadata.cssVariable", e.detail.value);
    this.notifyPath("manifest.metadata.cssVariable");
    this.set(
      "manifest.metadata.hexCode",
      SimpleColors.colors[
        e.detail.value
          .replace("--simple-colors-default-theme-", "")
          .replace("-7", "")
      ][6]
    );
    this.notifyPath("manifest.metadata.hexCode");
  },