UNPKG

@julo-ui/sliders

Version:

A React Slider component that implements input[type='range']

77 lines (71 loc) 2.41 kB
"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/styles.ts var styles_exports = {}; __export(styles_exports, { rootSliderCx: () => rootSliderCx, rootSliderHorizontalTrackCx: () => rootSliderHorizontalTrackCx, rootSliderInnerTrackCx: () => rootSliderInnerTrackCx, rootSliderThumbCx: () => rootSliderThumbCx, rootSliderTrackCx: () => rootSliderTrackCx, rootSliderVerticalTrackCx: () => rootSliderVerticalTrackCx }); module.exports = __toCommonJS(styles_exports); var import_react = require("@emotion/react"); var rootSliderCx = import_react.css` --slider-track-size: 0.5rem; --slider-thumb-size: 1rem; width: fit-content; `; var rootSliderVerticalTrackCx = import_react.css` width: var(--slider-track-size); `; var rootSliderHorizontalTrackCx = import_react.css` height: var(--slider-track-size); `; var rootSliderTrackCx = import_react.css` overflow: hidden; border-radius: var(--corner-3xl); background-color: var(--colors-neutrals-40); `; var rootSliderThumbCx = import_react.css` z-index: 1; width: var(--slider-thumb-size); height: var(--slider-thumb-size); border-radius: var(--corner-3xl); background-color: var(--colors-neutrals-10); box-shadow: var(--shadows-md); display: flex; align-items: center; justify-content: center; `; var rootSliderInnerTrackCx = import_react.css` background-color: var(--colors-primary-30); height: inherit; width: inherit; `; // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { rootSliderCx, rootSliderHorizontalTrackCx, rootSliderInnerTrackCx, rootSliderThumbCx, rootSliderTrackCx, rootSliderVerticalTrackCx });