Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@beamwind/preset-system

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@beamwind/preset-system - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

6

CHANGELOG.md

@@ -6,2 +6,8 @@ # Change Log

## [2.0.1](https://github.com/kenoxa/beamwind/compare/@beamwind/preset-system@2.0.0...@beamwind/preset-system@2.0.1) (2020-12-01)
### Bug Fixes
- use colors from base theme to generate variants ([7ee8a8c](https://github.com/kenoxa/beamwind/commit/7ee8a8c8e63936017e11ce22e830c312efe5ca42))
# 2.0.0 (2020-11-30)

@@ -8,0 +14,0 @@

549

esnext/preset-system.js

@@ -1,290 +0,281 @@

// src/index.ts
// src/theme.ts
import {createColorVariants} from "@beamwind/colors";
// src/theme.ts
var theme = {
colors: {
surface: "#fafafa",
"on-surface": "#222",
primary: "#0d3880",
secondary: "#e60278",
caution: "#ffc600",
critical: "#d0011b",
info: "#1e468c",
neutral: "#596581",
positive: "#138a08",
promote: "#9556b7"
},
spacing: {
none: "0px",
xs: "0.125rem",
sm: "0.25rem",
md: "0.5rem",
lg: "0.875rem",
xl: "1.25rem",
"2xl": "2rem",
"3xl": "3rem",
"4xl": "5rem"
},
durations: {
swift: "75ms",
fast: "100ms",
medium: "200ms",
moderate: "300ms",
slow: "500ms",
supine: "700ms",
glacial: "1000ms",
inert: "1500ms"
},
animation: {
spin: ["1s linear infinite"],
ping: ["1s cubic-bezier(0,0,0.2,1) infinite"],
pulse: ["2s cubic-bezier(0.4,0,0.6,1) infinite"],
bounce: ["1s infinite"]
},
borderRadius: {
sm: "0.125rem",
md: "0.375rem",
lg: "0.5rem",
xl: "0.75rem",
"2xl": "1rem",
"3xl": "1.5rem"
},
borderWidth: {
DEFAULT: "1px",
none: "0px",
xs: "1px",
sm: "2px",
md: "4px",
lg: "8px"
},
boxShadow: {
sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
DEFAULT: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",
md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
"2xl": "0 25px 50px -12px rgba(0, 0, 0, 0.25)",
inner: "inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)"
},
fontFamily: {
sans: 'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"',
serif: 'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif',
mono: 'ui-monospace,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'
},
fontSize: {
md: (theme3) => theme3("fontSize", "base")
},
height: {
"1/2": "50%",
"1/3": "33.333333%",
"2/3": "66.666667%",
"1/4": "25%",
"2/4": "50%",
"3/4": "75%",
"1/5": "20%",
"2/5": "40%",
"3/5": "60%",
"4/5": "80%",
"1/6": "16.666667%",
"2/6": "33.333333%",
"3/6": "50%",
"4/6": "66.666667%",
"5/6": "83.333333%"
},
inset: {
"1/2": "50%",
"1/3": "33.333333%",
"2/3": "66.666667%",
"1/4": "25%",
"2/4": "50%",
"3/4": "75%"
},
keyframes: {
spin: {
from: {
transform: "rotate(0deg)"
},
to: {
transform: "rotate(360deg)"
}
var isBaseColor = (key) => key.indexOf("-") === -1;
var generateColors = (base) => Object.keys(base).filter(isBaseColor).reduce((colors2, key) => ({...colors2, ...createColorVariants(colors2, key)}), base);
var theme = ({colors: colors2} = {}) => (base) => ({
extend: {
colors: generateColors({
...base("colors"),
surface: "#fafafa",
"on-surface": "#222",
primary: "#0d3880",
secondary: "#e60278",
caution: "#ffc600",
critical: "#d0011b",
info: "#1e468c",
neutral: "#596581",
positive: "#138a08",
promote: "#9556b7",
...colors2
}),
spacing: {
none: "0px",
xs: "0.125rem",
sm: "0.25rem",
md: "0.5rem",
lg: "0.875rem",
xl: "1.25rem",
"2xl": "2rem",
"3xl": "3rem",
"4xl": "5rem"
},
ping: {
"0%": {
transform: "scale(1)",
opacity: "1"
},
"75%,100%": {
transform: "scale(2)",
opacity: "0"
}
durations: {
swift: "75ms",
fast: "100ms",
medium: "200ms",
moderate: "300ms",
slow: "500ms",
supine: "700ms",
glacial: "1000ms",
inert: "1500ms"
},
pulse: {
"0%,100%": {
opacity: "1"
animation: {
spin: ["1s linear infinite"],
ping: ["1s cubic-bezier(0,0,0.2,1) infinite"],
pulse: ["2s cubic-bezier(0.4,0,0.6,1) infinite"],
bounce: ["1s infinite"]
},
borderRadius: {
sm: "0.125rem",
md: "0.375rem",
lg: "0.5rem",
xl: "0.75rem",
"2xl": "1rem",
"3xl": "1.5rem"
},
borderWidth: {
DEFAULT: "1px",
none: "0px",
xs: "1px",
sm: "2px",
md: "4px",
lg: "8px"
},
boxShadow: {
sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
DEFAULT: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",
md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
"2xl": "0 25px 50px -12px rgba(0, 0, 0, 0.25)",
inner: "inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)"
},
fontFamily: {
sans: 'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"',
serif: 'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif',
mono: 'ui-monospace,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'
},
fontSize: {
md: (theme3) => theme3("fontSize", "base")
},
height: {
"1/2": "50%",
"1/3": "33.333333%",
"2/3": "66.666667%",
"1/4": "25%",
"2/4": "50%",
"3/4": "75%",
"1/5": "20%",
"2/5": "40%",
"3/5": "60%",
"4/5": "80%",
"1/6": "16.666667%",
"2/6": "33.333333%",
"3/6": "50%",
"4/6": "66.666667%",
"5/6": "83.333333%"
},
inset: {
"1/2": "50%",
"1/3": "33.333333%",
"2/3": "66.666667%",
"1/4": "25%",
"2/4": "50%",
"3/4": "75%"
},
keyframes: {
spin: {
from: {
transform: "rotate(0deg)"
},
to: {
transform: "rotate(360deg)"
}
},
"50%": {
opacity: ".5"
ping: {
"0%": {
transform: "scale(1)",
opacity: "1"
},
"75%,100%": {
transform: "scale(2)",
opacity: "0"
}
},
pulse: {
"0%,100%": {
opacity: "1"
},
"50%": {
opacity: ".5"
}
},
bounce: {
"0%, 100%": {
transform: "translateY(-25%)",
"animation-timing-function": "cubic-bezier(0.8,0,1,1)"
},
"50%": {
transform: "none",
"animation-timing-function": "cubic-bezier(0,0,0.2,1)"
}
}
},
bounce: {
"0%, 100%": {
transform: "translateY(-25%)",
"animation-timing-function": "cubic-bezier(0.8,0,1,1)"
},
"50%": {
transform: "none",
"animation-timing-function": "cubic-bezier(0,0,0.2,1)"
}
lineHeight: {
xs: "1rem",
sm: "1.25rem",
base: "1.5rem",
md: (theme3) => theme3("lineHeight", "base"),
lg: "1.75rem",
xl: "1.75rem",
"2xl": "2rem",
"3xl": "2.25rem",
"4xl": "2.5rem"
},
maxWidth: {
xs: "20rem",
sm: "24rem",
md: "28rem",
lg: "32rem",
xl: "36rem",
"2xl": "42rem",
"3xl": "48rem",
"4xl": "56rem",
"5xl": "64rem",
"6xl": "72rem",
"7xl": "80rem",
prose: "65ch"
},
opacity: {},
order: {},
outline: {
current: ["2px dotted currentColor", "2px"]
},
ringColor: {
DEFAULT: "currentColor"
},
ringOffsetWidth: {
none: "0px",
xs: "1px",
sm: "2px",
md: "4px",
lg: "8px"
},
ringWidth: {
none: "0px",
xs: "1px",
sm: "2px",
md: "4px",
lg: "8px"
},
rotate: {
none: "0deg",
xs: "1deg",
sm: "2deg",
md: "3deg",
lg: "6deg",
xl: "12deg",
"2xl": "45deg",
turn: "90deg",
reverse: "180deg"
},
scale: {
zip: "0",
"3xs": ".5",
"2xs": ".75",
xs: ".9",
sm: ".95",
none: "1",
lg: "1.05",
xl: "1.1",
"2xl": "1.25",
"3xl": "1.5"
},
skew: {
none: "0deg",
xs: "1deg",
sm: "2deg",
md: "3deg",
lg: "6deg",
xl: "12deg"
},
strokeWidth: {
none: "0",
sm: "1",
md: "2"
},
transitionTimingFunction: {
linear: "linear",
in: "cubic-bezier(0.4, 0, 1, 1)",
out: "cubic-bezier(0, 0, 0.2, 1)",
"in-out": "cubic-bezier(0.4, 0, 0.2, 1)"
},
translate: {
"1/2": "50%",
"1/3": "33.333333%",
"2/3": "66.666667%",
"1/4": "25%",
"2/4": "50%",
"3/4": "75%"
},
width: {
"1/2": "50%",
"1/3": "33.333333%",
"2/3": "66.666667%",
"1/4": "25%",
"2/4": "50%",
"3/4": "75%",
"1/5": "20%",
"2/5": "40%",
"3/5": "60%",
"4/5": "80%",
"1/6": "16.666667%",
"2/6": "33.333333%",
"3/6": "50%",
"4/6": "66.666667%",
"5/6": "83.333333%",
"1/12": "8.333333%",
"2/12": "16.666667%",
"3/12": "25%",
"4/12": "33.333333%",
"5/12": "41.666667%",
"6/12": "50%",
"7/12": "58.333333%",
"8/12": "66.666667%",
"9/12": "75%",
"10/12": "83.333333%",
"11/12": "91.666667%"
},
zIndex: {
none: "0",
hover: "1",
focus: "2",
active: "3"
}
},
lineHeight: {
xs: "1rem",
sm: "1.25rem",
base: "1.5rem",
md: (theme3) => theme3("lineHeight", "base"),
lg: "1.75rem",
xl: "1.75rem",
"2xl": "2rem",
"3xl": "2.25rem",
"4xl": "2.5rem"
},
maxWidth: {
xs: "20rem",
sm: "24rem",
md: "28rem",
lg: "32rem",
xl: "36rem",
"2xl": "42rem",
"3xl": "48rem",
"4xl": "56rem",
"5xl": "64rem",
"6xl": "72rem",
"7xl": "80rem",
prose: "65ch"
},
opacity: {},
order: {},
outline: {
current: ["2px dotted currentColor", "2px"]
},
ringColor: {
DEFAULT: "currentColor"
},
ringOffsetWidth: {
none: "0px",
xs: "1px",
sm: "2px",
md: "4px",
lg: "8px"
},
ringWidth: {
none: "0px",
xs: "1px",
sm: "2px",
md: "4px",
lg: "8px"
},
rotate: {
none: "0deg",
xs: "1deg",
sm: "2deg",
md: "3deg",
lg: "6deg",
xl: "12deg",
"2xl": "45deg",
turn: "90deg",
reverse: "180deg"
},
scale: {
zip: "0",
"3xs": ".5",
"2xs": ".75",
xs: ".9",
sm: ".95",
none: "1",
lg: "1.05",
xl: "1.1",
"2xl": "1.25",
"3xl": "1.5"
},
skew: {
none: "0deg",
xs: "1deg",
sm: "2deg",
md: "3deg",
lg: "6deg",
xl: "12deg"
},
strokeWidth: {
none: "0",
sm: "1",
md: "2"
},
transitionTimingFunction: {
linear: "linear",
in: "cubic-bezier(0.4, 0, 1, 1)",
out: "cubic-bezier(0, 0, 0.2, 1)",
"in-out": "cubic-bezier(0.4, 0, 0.2, 1)"
},
translate: {
"1/2": "50%",
"1/3": "33.333333%",
"2/3": "66.666667%",
"1/4": "25%",
"2/4": "50%",
"3/4": "75%"
},
width: {
"1/2": "50%",
"1/3": "33.333333%",
"2/3": "66.666667%",
"1/4": "25%",
"2/4": "50%",
"3/4": "75%",
"1/5": "20%",
"2/5": "40%",
"3/5": "60%",
"4/5": "80%",
"1/6": "16.666667%",
"2/6": "33.333333%",
"3/6": "50%",
"4/6": "66.666667%",
"5/6": "83.333333%",
"1/12": "8.333333%",
"2/12": "16.666667%",
"3/12": "25%",
"4/12": "33.333333%",
"5/12": "41.666667%",
"6/12": "50%",
"7/12": "58.333333%",
"8/12": "66.666667%",
"9/12": "75%",
"10/12": "83.333333%",
"11/12": "91.666667%"
},
zIndex: {
none: "0",
hover: "1",
focus: "2",
active: "3"
}
};
});
// src/index.ts
var isBaseColor = (key) => key.indexOf("-") === -1;
var src_default = ({colors: colors2} = {}) => ({
theme: (source) => {
const base = {
...source("colors"),
...theme.colors,
...colors2
};
return {
extend: {
...theme,
colors: Object.keys(base).filter(isBaseColor).reduce((colors3, key) => ({...colors3, ...createColorVariants(colors3, key)}), base)
}
};
}
var src_default = (options) => ({
theme: theme(options)
});

@@ -291,0 +282,0 @@ export {

var __assign = Object.assign;
// src/index.ts
// src/theme.ts
import {createColorVariants} from "@beamwind/colors";
// src/theme.ts
var theme = {
colors: {
surface: "#fafafa",
"on-surface": "#222",
primary: "#0d3880",
secondary: "#e60278",
caution: "#ffc600",
critical: "#d0011b",
info: "#1e468c",
neutral: "#596581",
positive: "#138a08",
promote: "#9556b7"
},
spacing: {
none: "0px",
xs: "0.125rem",
sm: "0.25rem",
md: "0.5rem",
lg: "0.875rem",
xl: "1.25rem",
"2xl": "2rem",
"3xl": "3rem",
"4xl": "5rem"
},
durations: {
swift: "75ms",
fast: "100ms",
medium: "200ms",
moderate: "300ms",
slow: "500ms",
supine: "700ms",
glacial: "1000ms",
inert: "1500ms"
},
animation: {
spin: ["1s linear infinite"],
ping: ["1s cubic-bezier(0,0,0.2,1) infinite"],
pulse: ["2s cubic-bezier(0.4,0,0.6,1) infinite"],
bounce: ["1s infinite"]
},
borderRadius: {
sm: "0.125rem",
md: "0.375rem",
lg: "0.5rem",
xl: "0.75rem",
"2xl": "1rem",
"3xl": "1.5rem"
},
borderWidth: {
DEFAULT: "1px",
none: "0px",
xs: "1px",
sm: "2px",
md: "4px",
lg: "8px"
},
boxShadow: {
sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
DEFAULT: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",
md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
"2xl": "0 25px 50px -12px rgba(0, 0, 0, 0.25)",
inner: "inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)"
},
fontFamily: {
sans: 'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"',
serif: 'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif',
mono: 'ui-monospace,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'
},
fontSize: {
md: (theme3) => theme3("fontSize", "base")
},
height: {
"1/2": "50%",
"1/3": "33.333333%",
"2/3": "66.666667%",
"1/4": "25%",
"2/4": "50%",
"3/4": "75%",
"1/5": "20%",
"2/5": "40%",
"3/5": "60%",
"4/5": "80%",
"1/6": "16.666667%",
"2/6": "33.333333%",
"3/6": "50%",
"4/6": "66.666667%",
"5/6": "83.333333%"
},
inset: {
"1/2": "50%",
"1/3": "33.333333%",
"2/3": "66.666667%",
"1/4": "25%",
"2/4": "50%",
"3/4": "75%"
},
keyframes: {
spin: {
from: {
transform: "rotate(0deg)"
},
to: {
transform: "rotate(360deg)"
}
var isBaseColor = (key) => key.indexOf("-") === -1;
var generateColors = (base) => Object.keys(base).filter(isBaseColor).reduce((colors2, key) => __assign(__assign({}, colors2), createColorVariants(colors2, key)), base);
var theme = ({colors: colors2} = {}) => (base) => ({
extend: {
colors: generateColors(__assign(__assign(__assign({}, base("colors")), {
surface: "#fafafa",
"on-surface": "#222",
primary: "#0d3880",
secondary: "#e60278",
caution: "#ffc600",
critical: "#d0011b",
info: "#1e468c",
neutral: "#596581",
positive: "#138a08",
promote: "#9556b7"
}), colors2)),
spacing: {
none: "0px",
xs: "0.125rem",
sm: "0.25rem",
md: "0.5rem",
lg: "0.875rem",
xl: "1.25rem",
"2xl": "2rem",
"3xl": "3rem",
"4xl": "5rem"
},
ping: {
"0%": {
transform: "scale(1)",
opacity: "1"
},
"75%,100%": {
transform: "scale(2)",
opacity: "0"
}
durations: {
swift: "75ms",
fast: "100ms",
medium: "200ms",
moderate: "300ms",
slow: "500ms",
supine: "700ms",
glacial: "1000ms",
inert: "1500ms"
},
pulse: {
"0%,100%": {
opacity: "1"
animation: {
spin: ["1s linear infinite"],
ping: ["1s cubic-bezier(0,0,0.2,1) infinite"],
pulse: ["2s cubic-bezier(0.4,0,0.6,1) infinite"],
bounce: ["1s infinite"]
},
borderRadius: {
sm: "0.125rem",
md: "0.375rem",
lg: "0.5rem",
xl: "0.75rem",
"2xl": "1rem",
"3xl": "1.5rem"
},
borderWidth: {
DEFAULT: "1px",
none: "0px",
xs: "1px",
sm: "2px",
md: "4px",
lg: "8px"
},
boxShadow: {
sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
DEFAULT: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",
md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
"2xl": "0 25px 50px -12px rgba(0, 0, 0, 0.25)",
inner: "inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)"
},
fontFamily: {
sans: 'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"',
serif: 'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif',
mono: 'ui-monospace,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'
},
fontSize: {
md: (theme3) => theme3("fontSize", "base")
},
height: {
"1/2": "50%",
"1/3": "33.333333%",
"2/3": "66.666667%",
"1/4": "25%",
"2/4": "50%",
"3/4": "75%",
"1/5": "20%",
"2/5": "40%",
"3/5": "60%",
"4/5": "80%",
"1/6": "16.666667%",
"2/6": "33.333333%",
"3/6": "50%",
"4/6": "66.666667%",
"5/6": "83.333333%"
},
inset: {
"1/2": "50%",
"1/3": "33.333333%",
"2/3": "66.666667%",
"1/4": "25%",
"2/4": "50%",
"3/4": "75%"
},
keyframes: {
spin: {
from: {
transform: "rotate(0deg)"
},
to: {
transform: "rotate(360deg)"
}
},
"50%": {
opacity: ".5"
ping: {
"0%": {
transform: "scale(1)",
opacity: "1"
},
"75%,100%": {
transform: "scale(2)",
opacity: "0"
}
},
pulse: {
"0%,100%": {
opacity: "1"
},
"50%": {
opacity: ".5"
}
},
bounce: {
"0%, 100%": {
transform: "translateY(-25%)",
"animation-timing-function": "cubic-bezier(0.8,0,1,1)"
},
"50%": {
transform: "none",
"animation-timing-function": "cubic-bezier(0,0,0.2,1)"
}
}
},
bounce: {
"0%, 100%": {
transform: "translateY(-25%)",
"animation-timing-function": "cubic-bezier(0.8,0,1,1)"
},
"50%": {
transform: "none",
"animation-timing-function": "cubic-bezier(0,0,0.2,1)"
}
lineHeight: {
xs: "1rem",
sm: "1.25rem",
base: "1.5rem",
md: (theme3) => theme3("lineHeight", "base"),
lg: "1.75rem",
xl: "1.75rem",
"2xl": "2rem",
"3xl": "2.25rem",
"4xl": "2.5rem"
},
maxWidth: {
xs: "20rem",
sm: "24rem",
md: "28rem",
lg: "32rem",
xl: "36rem",
"2xl": "42rem",
"3xl": "48rem",
"4xl": "56rem",
"5xl": "64rem",
"6xl": "72rem",
"7xl": "80rem",
prose: "65ch"
},
opacity: {},
order: {},
outline: {
current: ["2px dotted currentColor", "2px"]
},
ringColor: {
DEFAULT: "currentColor"
},
ringOffsetWidth: {
none: "0px",
xs: "1px",
sm: "2px",
md: "4px",
lg: "8px"
},
ringWidth: {
none: "0px",
xs: "1px",
sm: "2px",
md: "4px",
lg: "8px"
},
rotate: {
none: "0deg",
xs: "1deg",
sm: "2deg",
md: "3deg",
lg: "6deg",
xl: "12deg",
"2xl": "45deg",
turn: "90deg",
reverse: "180deg"
},
scale: {
zip: "0",
"3xs": ".5",
"2xs": ".75",
xs: ".9",
sm: ".95",
none: "1",
lg: "1.05",
xl: "1.1",
"2xl": "1.25",
"3xl": "1.5"
},
skew: {
none: "0deg",
xs: "1deg",
sm: "2deg",
md: "3deg",
lg: "6deg",
xl: "12deg"
},
strokeWidth: {
none: "0",
sm: "1",
md: "2"
},
transitionTimingFunction: {
linear: "linear",
in: "cubic-bezier(0.4, 0, 1, 1)",
out: "cubic-bezier(0, 0, 0.2, 1)",
"in-out": "cubic-bezier(0.4, 0, 0.2, 1)"
},
translate: {
"1/2": "50%",
"1/3": "33.333333%",
"2/3": "66.666667%",
"1/4": "25%",
"2/4": "50%",
"3/4": "75%"
},
width: {
"1/2": "50%",
"1/3": "33.333333%",
"2/3": "66.666667%",
"1/4": "25%",
"2/4": "50%",
"3/4": "75%",
"1/5": "20%",
"2/5": "40%",
"3/5": "60%",
"4/5": "80%",
"1/6": "16.666667%",
"2/6": "33.333333%",
"3/6": "50%",
"4/6": "66.666667%",
"5/6": "83.333333%",
"1/12": "8.333333%",
"2/12": "16.666667%",
"3/12": "25%",
"4/12": "33.333333%",
"5/12": "41.666667%",
"6/12": "50%",
"7/12": "58.333333%",
"8/12": "66.666667%",
"9/12": "75%",
"10/12": "83.333333%",
"11/12": "91.666667%"
},
zIndex: {
none: "0",
hover: "1",
focus: "2",
active: "3"
}
},
lineHeight: {
xs: "1rem",
sm: "1.25rem",
base: "1.5rem",
md: (theme3) => theme3("lineHeight", "base"),
lg: "1.75rem",
xl: "1.75rem",
"2xl": "2rem",
"3xl": "2.25rem",
"4xl": "2.5rem"
},
maxWidth: {
xs: "20rem",
sm: "24rem",
md: "28rem",
lg: "32rem",
xl: "36rem",
"2xl": "42rem",
"3xl": "48rem",
"4xl": "56rem",
"5xl": "64rem",
"6xl": "72rem",
"7xl": "80rem",
prose: "65ch"
},
opacity: {},
order: {},
outline: {
current: ["2px dotted currentColor", "2px"]
},
ringColor: {
DEFAULT: "currentColor"
},
ringOffsetWidth: {
none: "0px",
xs: "1px",
sm: "2px",
md: "4px",
lg: "8px"
},
ringWidth: {
none: "0px",
xs: "1px",
sm: "2px",
md: "4px",
lg: "8px"
},
rotate: {
none: "0deg",
xs: "1deg",
sm: "2deg",
md: "3deg",
lg: "6deg",
xl: "12deg",
"2xl": "45deg",
turn: "90deg",
reverse: "180deg"
},
scale: {
zip: "0",
"3xs": ".5",
"2xs": ".75",
xs: ".9",
sm: ".95",
none: "1",
lg: "1.05",
xl: "1.1",
"2xl": "1.25",
"3xl": "1.5"
},
skew: {
none: "0deg",
xs: "1deg",
sm: "2deg",
md: "3deg",
lg: "6deg",
xl: "12deg"
},
strokeWidth: {
none: "0",
sm: "1",
md: "2"
},
transitionTimingFunction: {
linear: "linear",
in: "cubic-bezier(0.4, 0, 1, 1)",
out: "cubic-bezier(0, 0, 0.2, 1)",
"in-out": "cubic-bezier(0.4, 0, 0.2, 1)"
},
translate: {
"1/2": "50%",
"1/3": "33.333333%",
"2/3": "66.666667%",
"1/4": "25%",
"2/4": "50%",
"3/4": "75%"
},
width: {
"1/2": "50%",
"1/3": "33.333333%",
"2/3": "66.666667%",
"1/4": "25%",
"2/4": "50%",
"3/4": "75%",
"1/5": "20%",
"2/5": "40%",
"3/5": "60%",
"4/5": "80%",
"1/6": "16.666667%",
"2/6": "33.333333%",
"3/6": "50%",
"4/6": "66.666667%",
"5/6": "83.333333%",
"1/12": "8.333333%",
"2/12": "16.666667%",
"3/12": "25%",
"4/12": "33.333333%",
"5/12": "41.666667%",
"6/12": "50%",
"7/12": "58.333333%",
"8/12": "66.666667%",
"9/12": "75%",
"10/12": "83.333333%",
"11/12": "91.666667%"
},
zIndex: {
none: "0",
hover: "1",
focus: "2",
active: "3"
}
};
});
// src/index.ts
var isBaseColor = (key) => key.indexOf("-") === -1;
var src_default = ({colors: colors2} = {}) => ({
theme: (source) => {
const base = __assign(__assign(__assign({}, source("colors")), theme.colors), colors2);
return {
extend: __assign(__assign({}, theme), {
colors: Object.keys(base).filter(isBaseColor).reduce((colors3, key) => __assign(__assign({}, colors3), createColorVariants(colors3, key)), base)
})
};
}
var src_default = (options) => ({
theme: theme(options)
});

@@ -288,0 +282,0 @@ export {

@@ -32,290 +32,283 @@ var __create = Object.create;

});
var colors = __toModule(require("@beamwind/colors"));
// src/theme.ts
var theme = {
colors: {
surface: "#fafafa",
"on-surface": "#222",
primary: "#0d3880",
secondary: "#e60278",
caution: "#ffc600",
critical: "#d0011b",
info: "#1e468c",
neutral: "#596581",
positive: "#138a08",
promote: "#9556b7"
},
spacing: {
none: "0px",
xs: "0.125rem",
sm: "0.25rem",
md: "0.5rem",
lg: "0.875rem",
xl: "1.25rem",
"2xl": "2rem",
"3xl": "3rem",
"4xl": "5rem"
},
durations: {
swift: "75ms",
fast: "100ms",
medium: "200ms",
moderate: "300ms",
slow: "500ms",
supine: "700ms",
glacial: "1000ms",
inert: "1500ms"
},
animation: {
spin: ["1s linear infinite"],
ping: ["1s cubic-bezier(0,0,0.2,1) infinite"],
pulse: ["2s cubic-bezier(0.4,0,0.6,1) infinite"],
bounce: ["1s infinite"]
},
borderRadius: {
sm: "0.125rem",
md: "0.375rem",
lg: "0.5rem",
xl: "0.75rem",
"2xl": "1rem",
"3xl": "1.5rem"
},
borderWidth: {
DEFAULT: "1px",
none: "0px",
xs: "1px",
sm: "2px",
md: "4px",
lg: "8px"
},
boxShadow: {
sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
DEFAULT: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",
md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
"2xl": "0 25px 50px -12px rgba(0, 0, 0, 0.25)",
inner: "inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)"
},
fontFamily: {
sans: 'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"',
serif: 'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif',
mono: 'ui-monospace,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'
},
fontSize: {
md: (theme3) => theme3("fontSize", "base")
},
height: {
"1/2": "50%",
"1/3": "33.333333%",
"2/3": "66.666667%",
"1/4": "25%",
"2/4": "50%",
"3/4": "75%",
"1/5": "20%",
"2/5": "40%",
"3/5": "60%",
"4/5": "80%",
"1/6": "16.666667%",
"2/6": "33.333333%",
"3/6": "50%",
"4/6": "66.666667%",
"5/6": "83.333333%"
},
inset: {
"1/2": "50%",
"1/3": "33.333333%",
"2/3": "66.666667%",
"1/4": "25%",
"2/4": "50%",
"3/4": "75%"
},
keyframes: {
spin: {
from: {
transform: "rotate(0deg)"
},
to: {
transform: "rotate(360deg)"
}
var colors = __toModule(require("@beamwind/colors"));
var isBaseColor = (key) => key.indexOf("-") === -1;
var generateColors = (base) => Object.keys(base).filter(isBaseColor).reduce((colors2, key) => ({...colors2, ...colors.createColorVariants(colors2, key)}), base);
var theme = ({colors: colors2} = {}) => (base) => ({
extend: {
colors: generateColors({
...base("colors"),
surface: "#fafafa",
"on-surface": "#222",
primary: "#0d3880",
secondary: "#e60278",
caution: "#ffc600",
critical: "#d0011b",
info: "#1e468c",
neutral: "#596581",
positive: "#138a08",
promote: "#9556b7",
...colors2
}),
spacing: {
none: "0px",
xs: "0.125rem",
sm: "0.25rem",
md: "0.5rem",
lg: "0.875rem",
xl: "1.25rem",
"2xl": "2rem",
"3xl": "3rem",
"4xl": "5rem"
},
ping: {
"0%": {
transform: "scale(1)",
opacity: "1"
},
"75%,100%": {
transform: "scale(2)",
opacity: "0"
}
durations: {
swift: "75ms",
fast: "100ms",
medium: "200ms",
moderate: "300ms",
slow: "500ms",
supine: "700ms",
glacial: "1000ms",
inert: "1500ms"
},
pulse: {
"0%,100%": {
opacity: "1"
animation: {
spin: ["1s linear infinite"],
ping: ["1s cubic-bezier(0,0,0.2,1) infinite"],
pulse: ["2s cubic-bezier(0.4,0,0.6,1) infinite"],
bounce: ["1s infinite"]
},
borderRadius: {
sm: "0.125rem",
md: "0.375rem",
lg: "0.5rem",
xl: "0.75rem",
"2xl": "1rem",
"3xl": "1.5rem"
},
borderWidth: {
DEFAULT: "1px",
none: "0px",
xs: "1px",
sm: "2px",
md: "4px",
lg: "8px"
},
boxShadow: {
sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
DEFAULT: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",
md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
"2xl": "0 25px 50px -12px rgba(0, 0, 0, 0.25)",
inner: "inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)"
},
fontFamily: {
sans: 'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"',
serif: 'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif',
mono: 'ui-monospace,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'
},
fontSize: {
md: (theme3) => theme3("fontSize", "base")
},
height: {
"1/2": "50%",
"1/3": "33.333333%",
"2/3": "66.666667%",
"1/4": "25%",
"2/4": "50%",
"3/4": "75%",
"1/5": "20%",
"2/5": "40%",
"3/5": "60%",
"4/5": "80%",
"1/6": "16.666667%",
"2/6": "33.333333%",
"3/6": "50%",
"4/6": "66.666667%",
"5/6": "83.333333%"
},
inset: {
"1/2": "50%",
"1/3": "33.333333%",
"2/3": "66.666667%",
"1/4": "25%",
"2/4": "50%",
"3/4": "75%"
},
keyframes: {
spin: {
from: {
transform: "rotate(0deg)"
},
to: {
transform: "rotate(360deg)"
}
},
"50%": {
opacity: ".5"
ping: {
"0%": {
transform: "scale(1)",
opacity: "1"
},
"75%,100%": {
transform: "scale(2)",
opacity: "0"
}
},
pulse: {
"0%,100%": {
opacity: "1"
},
"50%": {
opacity: ".5"
}
},
bounce: {
"0%, 100%": {
transform: "translateY(-25%)",
"animation-timing-function": "cubic-bezier(0.8,0,1,1)"
},
"50%": {
transform: "none",
"animation-timing-function": "cubic-bezier(0,0,0.2,1)"
}
}
},
bounce: {
"0%, 100%": {
transform: "translateY(-25%)",
"animation-timing-function": "cubic-bezier(0.8,0,1,1)"
},
"50%": {
transform: "none",
"animation-timing-function": "cubic-bezier(0,0,0.2,1)"
}
lineHeight: {
xs: "1rem",
sm: "1.25rem",
base: "1.5rem",
md: (theme3) => theme3("lineHeight", "base"),
lg: "1.75rem",
xl: "1.75rem",
"2xl": "2rem",
"3xl": "2.25rem",
"4xl": "2.5rem"
},
maxWidth: {
xs: "20rem",
sm: "24rem",
md: "28rem",
lg: "32rem",
xl: "36rem",
"2xl": "42rem",
"3xl": "48rem",
"4xl": "56rem",
"5xl": "64rem",
"6xl": "72rem",
"7xl": "80rem",
prose: "65ch"
},
opacity: {},
order: {},
outline: {
current: ["2px dotted currentColor", "2px"]
},
ringColor: {
DEFAULT: "currentColor"
},
ringOffsetWidth: {
none: "0px",
xs: "1px",
sm: "2px",
md: "4px",
lg: "8px"
},
ringWidth: {
none: "0px",
xs: "1px",
sm: "2px",
md: "4px",
lg: "8px"
},
rotate: {
none: "0deg",
xs: "1deg",
sm: "2deg",
md: "3deg",
lg: "6deg",
xl: "12deg",
"2xl": "45deg",
turn: "90deg",
reverse: "180deg"
},
scale: {
zip: "0",
"3xs": ".5",
"2xs": ".75",
xs: ".9",
sm: ".95",
none: "1",
lg: "1.05",
xl: "1.1",
"2xl": "1.25",
"3xl": "1.5"
},
skew: {
none: "0deg",
xs: "1deg",
sm: "2deg",
md: "3deg",
lg: "6deg",
xl: "12deg"
},
strokeWidth: {
none: "0",
sm: "1",
md: "2"
},
transitionTimingFunction: {
linear: "linear",
in: "cubic-bezier(0.4, 0, 1, 1)",
out: "cubic-bezier(0, 0, 0.2, 1)",
"in-out": "cubic-bezier(0.4, 0, 0.2, 1)"
},
translate: {
"1/2": "50%",
"1/3": "33.333333%",
"2/3": "66.666667%",
"1/4": "25%",
"2/4": "50%",
"3/4": "75%"
},
width: {
"1/2": "50%",
"1/3": "33.333333%",
"2/3": "66.666667%",
"1/4": "25%",
"2/4": "50%",
"3/4": "75%",
"1/5": "20%",
"2/5": "40%",
"3/5": "60%",
"4/5": "80%",
"1/6": "16.666667%",
"2/6": "33.333333%",
"3/6": "50%",
"4/6": "66.666667%",
"5/6": "83.333333%",
"1/12": "8.333333%",
"2/12": "16.666667%",
"3/12": "25%",
"4/12": "33.333333%",
"5/12": "41.666667%",
"6/12": "50%",
"7/12": "58.333333%",
"8/12": "66.666667%",
"9/12": "75%",
"10/12": "83.333333%",
"11/12": "91.666667%"
},
zIndex: {
none: "0",
hover: "1",
focus: "2",
active: "3"
}
},
lineHeight: {
xs: "1rem",
sm: "1.25rem",
base: "1.5rem",
md: (theme3) => theme3("lineHeight", "base"),
lg: "1.75rem",
xl: "1.75rem",
"2xl": "2rem",
"3xl": "2.25rem",
"4xl": "2.5rem"
},
maxWidth: {
xs: "20rem",
sm: "24rem",
md: "28rem",
lg: "32rem",
xl: "36rem",
"2xl": "42rem",
"3xl": "48rem",
"4xl": "56rem",
"5xl": "64rem",
"6xl": "72rem",
"7xl": "80rem",
prose: "65ch"
},
opacity: {},
order: {},
outline: {
current: ["2px dotted currentColor", "2px"]
},
ringColor: {
DEFAULT: "currentColor"
},
ringOffsetWidth: {
none: "0px",
xs: "1px",
sm: "2px",
md: "4px",
lg: "8px"
},
ringWidth: {
none: "0px",
xs: "1px",
sm: "2px",
md: "4px",
lg: "8px"
},
rotate: {
none: "0deg",
xs: "1deg",
sm: "2deg",
md: "3deg",
lg: "6deg",
xl: "12deg",
"2xl": "45deg",
turn: "90deg",
reverse: "180deg"
},
scale: {
zip: "0",
"3xs": ".5",
"2xs": ".75",
xs: ".9",
sm: ".95",
none: "1",
lg: "1.05",
xl: "1.1",
"2xl": "1.25",
"3xl": "1.5"
},
skew: {
none: "0deg",
xs: "1deg",
sm: "2deg",
md: "3deg",
lg: "6deg",
xl: "12deg"
},
strokeWidth: {
none: "0",
sm: "1",
md: "2"
},
transitionTimingFunction: {
linear: "linear",
in: "cubic-bezier(0.4, 0, 1, 1)",
out: "cubic-bezier(0, 0, 0.2, 1)",
"in-out": "cubic-bezier(0.4, 0, 0.2, 1)"
},
translate: {
"1/2": "50%",
"1/3": "33.333333%",
"2/3": "66.666667%",
"1/4": "25%",
"2/4": "50%",
"3/4": "75%"
},
width: {
"1/2": "50%",
"1/3": "33.333333%",
"2/3": "66.666667%",
"1/4": "25%",
"2/4": "50%",
"3/4": "75%",
"1/5": "20%",
"2/5": "40%",
"3/5": "60%",
"4/5": "80%",
"1/6": "16.666667%",
"2/6": "33.333333%",
"3/6": "50%",
"4/6": "66.666667%",
"5/6": "83.333333%",
"1/12": "8.333333%",
"2/12": "16.666667%",
"3/12": "25%",
"4/12": "33.333333%",
"5/12": "41.666667%",
"6/12": "50%",
"7/12": "58.333333%",
"8/12": "66.666667%",
"9/12": "75%",
"10/12": "83.333333%",
"11/12": "91.666667%"
},
zIndex: {
none: "0",
hover: "1",
focus: "2",
active: "3"
}
};
});
// src/index.ts
var isBaseColor = (key) => key.indexOf("-") === -1;
var src_default = ({colors: colors2} = {}) => ({
theme: (source) => {
const base = {
...source("colors"),
...theme.colors,
...colors2
};
return {
extend: {
...theme,
colors: Object.keys(base).filter(isBaseColor).reduce((colors3, key) => ({...colors3, ...colors.createColorVariants(colors3, key)}), base)
}
};
}
var src_default = (options) => ({
theme: theme(options)
});
{
"name": "@beamwind/preset-system",
"version": "2.0.0",
"version": "2.0.1",
"description": "beamwind design system preset using a semantic naming scheme",

@@ -27,3 +27,3 @@ "keywords": [

},
"gitHead": "28ce5f37dd3423d56da161c5c160f9dc0e67649c",
"gitHead": "6a080f64208e59f3740a328c837343bc5ee74697",
"exports": {

@@ -30,0 +30,0 @@ ".": {

@@ -1,1 +0,1 @@

var presetSystem=(()=>{var A=Object.defineProperty,E=Math.pow,a=Object.assign,j=e=>A(e,"__esModule",{value:!0}),D=(e,n)=>{j(e);for(var t in n)A(e,t,{get:n[t],enumerable:!0})},y={};D(y,{default:()=>G});var F=(e,n,t)=>Math.min(Math.max(e,n),t),$=(e,n)=>Math.round(parseInt(e,16)*n),d=e=>{if(e[0]==="#"){let n=(e.length-1)/3,t=[17,1,.062272][n-1];return{r:$(e.substr(1,n),t),g:$(e.substr(1+n,n),t),b:$(e.substr(1+2*n,n),t)}}throw new Error(`Can not parse color ${e}`)},L=e=>("0"+F(e,0,255).toString(16)).slice(-2),T=e=>`#${L(e.r)}${L(e.g)}${L(e.b)}`,h=e=>{let n=e.r/255,t=e.g/255,r=e.b/255,s=Math.max(n,t,r),o=Math.min(n,t,r),i=(s+o)/2;if(s===o)return{h:0,s:0,l:i};let m,l=s-o,c=i>.5?l/(2-s-o):l/(s+o);switch(s){case n:m=(t-r)/l+(t<r?6:0);break;case t:m=(r-n)/l+2;break;default:m=(n-t)/l+4;break}return{h:m*60,s:c,l:i}},v=e=>Math.round(e*255),p=e=>{if(e.s===0)return{r:e.l,g:e.l,b:e.l};let n=(e.h%360+360)%360/60,t=(1-Math.abs(2*e.l-1))*e.s,r=t*(1-Math.abs(n%2-1)),s=0,o=0,i=0;n>=0&&n<1?(s=t,o=r):n>=1&&n<2?(s=r,o=t):n>=2&&n<3?(o=t,i=r):n>=3&&n<4?(o=r,i=t):n>=4&&n<5?(s=r,i=t):n>=5&&n<6&&(s=t,i=r);let m=e.l-t/2;return{r:v(s+m),g:v(o+m),b:v(i+m)}},H=e=>{let n=e/255;return n<=.03928?n/12.92:E((n+.055)/1.055,2.4)},w=e=>Number((.2126*H(e.r)+.7152*H(e.g)+.0722*H(e.b)).toFixed(3)),B=e=>{let n=d(e),t=(n.r*299+n.g*587+n.b*114)/1e3;return t>=128},N=(e,n,t,r)=>e*(n>.6?t:r),I=e=>{let n=d(e),t=h(n),r=w(n);return T(p({h:t.h,s:N(t.s,r,.8,.45),l:.95-N(t.l,r,.03,.06)}))},U=4.52,b=(e,n)=>{let t=w(p(e))+.05,r=w(p(n))+.05;return t<r?r/t:t/r},O=(e,n,t,r)=>{let s=h(d(e)),o=h(d(n)),i=r?.02:s.l,m=r?s.l:.98,l=a(a({},s),{l:m}),c=s;if(b(s,o)>=t)return e;if(b(l,o)<t){let C=b({h:0,s:0,l:0},o)>b({h:0,s:1,l:1},o)?"#000":"#fff";return e===C?C:O(C,n,t,r)}let R,z,g,x=s;do R=c,z=l,g=(i+m)/2,x=a(a({},x),{l:g}),b(x,o)<t?r?(m=g,l=x):(i=g,c=x):r?(i=g,c=x):(m=g,l=x);while(c.l!==R.l||l.l!==z.l);return T(p(c))},u=e=>{let n=B(e);return O(n?"#1A202C":I(e),e,U,n)},W=(e,n)=>{let t=h(d(e));return T(p(a(a({},t),{l:F(t.l-n,0,1)})))},f=(e,n,t)=>W(e,B(e)?n:t||n*-1),V=(e,n,t=e[n])=>{if(!(t&&t[0]==="#"))return{};let r=e[`${n}-hover`]||f(t,.05),s=e[`${n}-active`]||f(t,.1),o=e[`${n}-selected`]||f(t,.15),i=e[`${n}-disabled`]||f(t,-.05);return{[n]:t,[`on-${n}`]:e[`on-${n}`]||u(t),[`${n}-hover`]:r,[`on-${n}-hover`]:e[`on-${n}-hover`]||u(r),[`${n}-active`]:s,[`on-${n}-active`]:e[`on-${n}-active`]||u(s),[`${n}-disabled`]:i,[`on-${n}-disabled`]:e[`on-${n}-disabled`]||u(i),[`${n}-selected`]:o,[`on-${n}-selected`]:e[`on-${n}-selected`]||u(o)}},M={colors:{surface:"#fafafa","on-surface":"#222",primary:"#0d3880",secondary:"#e60278",caution:"#ffc600",critical:"#d0011b",info:"#1e468c",neutral:"#596581",positive:"#138a08",promote:"#9556b7"},spacing:{none:"0px",xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"0.875rem",xl:"1.25rem","2xl":"2rem","3xl":"3rem","4xl":"5rem"},durations:{swift:"75ms",fast:"100ms",medium:"200ms",moderate:"300ms",slow:"500ms",supine:"700ms",glacial:"1000ms",inert:"1500ms"},animation:{spin:["1s linear infinite"],ping:["1s cubic-bezier(0,0,0.2,1) infinite"],pulse:["2s cubic-bezier(0.4,0,0.6,1) infinite"],bounce:["1s infinite"]},borderRadius:{sm:"0.125rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem"},borderWidth:{DEFAULT:"1px",none:"0px",xs:"1px",sm:"2px",md:"4px",lg:"8px"},boxShadow:{sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",DEFAULT:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",inner:"inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)"},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"',serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif',mono:'ui-monospace,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSize:{md:e=>e("fontSize","base")},height:{"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%"},inset:{"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%"},keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)","animation-timing-function":"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none","animation-timing-function":"cubic-bezier(0,0,0.2,1)"}}},lineHeight:{xs:"1rem",sm:"1.25rem",base:"1.5rem",md:e=>e("lineHeight","base"),lg:"1.75rem",xl:"1.75rem","2xl":"2rem","3xl":"2.25rem","4xl":"2.5rem"},maxWidth:{xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",prose:"65ch"},opacity:{},order:{},outline:{current:["2px dotted currentColor","2px"]},ringColor:{DEFAULT:"currentColor"},ringOffsetWidth:{none:"0px",xs:"1px",sm:"2px",md:"4px",lg:"8px"},ringWidth:{none:"0px",xs:"1px",sm:"2px",md:"4px",lg:"8px"},rotate:{none:"0deg",xs:"1deg",sm:"2deg",md:"3deg",lg:"6deg",xl:"12deg","2xl":"45deg",turn:"90deg",reverse:"180deg"},scale:{zip:"0","3xs":".5","2xs":".75",xs:".9",sm:".95",none:"1",lg:"1.05",xl:"1.1","2xl":"1.25","3xl":"1.5"},skew:{none:"0deg",xs:"1deg",sm:"2deg",md:"3deg",lg:"6deg",xl:"12deg"},strokeWidth:{none:"0",sm:"1",md:"2"},transitionTimingFunction:{linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:{"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%"},width:{"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%"},zIndex:{none:"0",hover:"1",focus:"2",active:"3"}},_=e=>e.indexOf("-")===-1,G=({colors:e}={})=>({theme:n=>{let t=a(a(a({},n("colors")),M.colors),e);return{extend:a(a({},M),{colors:Object.keys(t).filter(_).reduce((r,s)=>a(a({},r),V(r,s)),t)})}}});return y;})();
var presetSystem=(()=>{var z=Object.defineProperty,O=Math.pow,a=Object.assign,G=n=>z(n,"__esModule",{value:!0}),j=(n,e)=>{G(n);for(var t in e)z(n,t,{get:e[t],enumerable:!0})},q={};j(q,{default:()=>y});var A=(n,e,t)=>Math.min(Math.max(n,e),t),$=(n,e)=>Math.round(parseInt(n,16)*e),x=n=>{if(n[0]==="#"){let e=(n.length-1)/3,t=[17,1,.062272][e-1];return{r:$(n.substr(1,e),t),g:$(n.substr(1+e,e),t),b:$(n.substr(1+2*e,e),t)}}throw new Error(`Can not parse color ${n}`)},L=n=>("0"+A(n,0,255).toString(16)).slice(-2),v=n=>`#${L(n.r)}${L(n.g)}${L(n.b)}`,C=n=>{let e=n.r/255,t=n.g/255,r=n.b/255,s=Math.max(e,t,r),o=Math.min(e,t,r),i=(s+o)/2;if(s===o)return{h:0,s:0,l:i};let m,l=s-o,c=i>.5?l/(2-s-o):l/(s+o);switch(s){case e:m=(t-r)/l+(t<r?6:0);break;case t:m=(r-e)/l+2;break;default:m=(e-t)/l+4;break}return{h:m*60,s:c,l:i}},T=n=>Math.round(n*255),d=n=>{if(n.s===0)return{r:n.l,g:n.l,b:n.l};let e=(n.h%360+360)%360/60,t=(1-Math.abs(2*n.l-1))*n.s,r=t*(1-Math.abs(e%2-1)),s=0,o=0,i=0;e>=0&&e<1?(s=t,o=r):e>=1&&e<2?(s=r,o=t):e>=2&&e<3?(o=t,i=r):e>=3&&e<4?(o=r,i=t):e>=4&&e<5?(s=r,i=t):e>=5&&e<6&&(s=t,i=r);let m=n.l-t/2;return{r:T(s+m),g:T(o+m),b:T(i+m)}},H=n=>{let e=n/255;return e<=.03928?e/12.92:O((e+.055)/1.055,2.4)},R=n=>Number((.2126*H(n.r)+.7152*H(n.g)+.0722*H(n.b)).toFixed(3)),F=n=>{let e=x(n),t=(e.r*299+e.g*587+e.b*114)/1e3;return t>=128},B=(n,e,t,r)=>n*(e>.6?t:r),D=n=>{let e=x(n),t=C(e),r=R(e);return v(d({h:t.h,s:B(t.s,r,.8,.45),l:.95-B(t.l,r,.03,.06)}))},I=4.52,b=(n,e)=>{let t=R(d(n))+.05,r=R(d(e))+.05;return t<r?r/t:t/r},E=(n,e,t,r)=>{let s=C(x(n)),o=C(x(e)),i=r?.02:s.l,m=r?s.l:.98,l=a(a({},s),{l:m}),c=s;if(b(s,o)>=t)return n;if(b(l,o)<t){let S=b({h:0,s:0,l:0},o)>b({h:0,s:1,l:1},o)?"#000":"#fff";return n===S?S:E(S,e,t,r)}let w,M,p,g=s;do w=c,M=l,p=(i+m)/2,g=a(a({},g),{l:p}),b(g,o)<t?r?(m=p,l=g):(i=p,c=g):r?(i=p,c=g):(m=p,l=g);while(c.l!==w.l||l.l!==M.l);return v(d(c))},u=n=>{let e=F(n);return E(e?"#1A202C":D(n),n,I,e)},U=(n,e)=>{let t=C(x(n));return v(d(a(a({},t),{l:A(t.l-e,0,1)})))},f=(n,e,t)=>U(n,F(n)?e:t||e*-1),N=(n,e,t=n[e])=>{if(!(t&&t[0]==="#"))return{};let r=n[`${e}-hover`]||f(t,.05),s=n[`${e}-active`]||f(t,.1),o=n[`${e}-selected`]||f(t,.15),i=n[`${e}-disabled`]||f(t,-.05);return{[e]:t,[`on-${e}`]:n[`on-${e}`]||u(t),[`${e}-hover`]:r,[`on-${e}-hover`]:n[`on-${e}-hover`]||u(r),[`${e}-active`]:s,[`on-${e}-active`]:n[`on-${e}-active`]||u(s),[`${e}-disabled`]:i,[`on-${e}-disabled`]:n[`on-${e}-disabled`]||u(i),[`${e}-selected`]:o,[`on-${e}-selected`]:n[`on-${e}-selected`]||u(o)}},W=n=>n.indexOf("-")===-1,_=n=>Object.keys(n).filter(W).reduce((e,t)=>a(a({},e),N(e,t)),n),V=({colors:n}={})=>e=>({extend:{colors:_(a(a(a({},e("colors")),{surface:"#fafafa","on-surface":"#222",primary:"#0d3880",secondary:"#e60278",caution:"#ffc600",critical:"#d0011b",info:"#1e468c",neutral:"#596581",positive:"#138a08",promote:"#9556b7"}),n)),spacing:{none:"0px",xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"0.875rem",xl:"1.25rem","2xl":"2rem","3xl":"3rem","4xl":"5rem"},durations:{swift:"75ms",fast:"100ms",medium:"200ms",moderate:"300ms",slow:"500ms",supine:"700ms",glacial:"1000ms",inert:"1500ms"},animation:{spin:["1s linear infinite"],ping:["1s cubic-bezier(0,0,0.2,1) infinite"],pulse:["2s cubic-bezier(0.4,0,0.6,1) infinite"],bounce:["1s infinite"]},borderRadius:{sm:"0.125rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem"},borderWidth:{DEFAULT:"1px",none:"0px",xs:"1px",sm:"2px",md:"4px",lg:"8px"},boxShadow:{sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",DEFAULT:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",inner:"inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)"},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"',serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif',mono:'ui-monospace,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSize:{md:t=>t("fontSize","base")},height:{"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%"},inset:{"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%"},keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)","animation-timing-function":"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none","animation-timing-function":"cubic-bezier(0,0,0.2,1)"}}},lineHeight:{xs:"1rem",sm:"1.25rem",base:"1.5rem",md:t=>t("lineHeight","base"),lg:"1.75rem",xl:"1.75rem","2xl":"2rem","3xl":"2.25rem","4xl":"2.5rem"},maxWidth:{xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",prose:"65ch"},opacity:{},order:{},outline:{current:["2px dotted currentColor","2px"]},ringColor:{DEFAULT:"currentColor"},ringOffsetWidth:{none:"0px",xs:"1px",sm:"2px",md:"4px",lg:"8px"},ringWidth:{none:"0px",xs:"1px",sm:"2px",md:"4px",lg:"8px"},rotate:{none:"0deg",xs:"1deg",sm:"2deg",md:"3deg",lg:"6deg",xl:"12deg","2xl":"45deg",turn:"90deg",reverse:"180deg"},scale:{zip:"0","3xs":".5","2xs":".75",xs:".9",sm:".95",none:"1",lg:"1.05",xl:"1.1","2xl":"1.25","3xl":"1.5"},skew:{none:"0deg",xs:"1deg",sm:"2deg",md:"3deg",lg:"6deg",xl:"12deg"},strokeWidth:{none:"0",sm:"1",md:"2"},transitionTimingFunction:{linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:{"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%"},width:{"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%"},zIndex:{none:"0",hover:"1",focus:"2",active:"3"}}}),y=n=>({theme:V(n)});return q;})();
import { ConfigurationOptions } from '@beamwind/types';
declare type ThemeColors = Record<string, undefined | string>;
interface Options {
colors?: ThemeColors;
colors?: Record<string, string | undefined>;
}
declare const _default: ({ colors }?: Options) => ConfigurationOptions;
declare const _default: (options?: Options | undefined) => ConfigurationOptions;
//# sourceMappingURL=index.d.ts.map
export default _default;
export { Options, ThemeColors };
export { Options };
//# sourceMappingURL=preset-system.d.ts.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc