UNPKG

@esri/calcite-components

Version:

Web Components for Esri's Calcite Design System.

96 lines (95 loc) 1.98 kB
/*! * All material copyright ESRI, All Rights Reserved, unless otherwise specified. * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details. * v1.5.0-next.4 */ import Color from "color"; export const CSS = { channel: "channel", channels: "channels", colorField: "color-field", colorFieldScope: "scope--color-field", colorMode: "color-mode", colorModeContainer: "color-mode-container", container: "container", control: "control", controlAndScope: "control-and-scope", controlSection: "control-section", deleteColor: "delete-color", header: "header", hexAndChannelsGroup: "hex-and-channels-group", hexOptions: "color-hex-options", hueScope: "scope--hue", hueSlider: "hue-slider", opacityScope: "scope--opacity", opacitySlider: "opacity-slider", preview: "preview", previewAndSliders: "preview-and-sliders", saveColor: "save-color", savedColor: "saved-color", savedColors: "saved-colors", savedColorsButtons: "saved-colors-buttons", savedColorsSection: "saved-colors-section", scope: "scope", section: "section", slider: "slider", sliders: "sliders", splitSection: "section--split" }; export const DEFAULT_COLOR = Color("#007AC2"); export const DEFAULT_STORAGE_KEY_PREFIX = "calcite-color-"; export const RGB_LIMITS = { r: 255, g: 255, b: 255 }; export const HSV_LIMITS = { h: 360, s: 100, v: 100 }; export const OPACITY_LIMITS = { min: 0, max: 100 }; export const DIMENSIONS = { s: { slider: { height: 12, width: 104 }, colorField: { height: 80, width: 160 }, thumb: { radius: 10 } }, m: { slider: { height: 12, width: 204 }, colorField: { height: 150, width: 272 }, thumb: { radius: 10 } }, l: { slider: { height: 12, width: 384 }, colorField: { height: 200, width: 464 }, thumb: { radius: 10 } } };