@betty-blocks/option-helpers
Advanced tools
Comparing version 22.6.3 to 22.7.1
@@ -6,2 +6,10 @@ # Change Log | ||
## [22.7.1](https://gitlab.betty.services/code/js-mono/compare/v22.7.0...v22.7.1) (2019-09-16) | ||
**Note:** Version bump only for package @betty-blocks/option-helpers | ||
## [22.6.3](https://gitlab.betty.services/code/js-mono/compare/v22.6.2...v22.6.3) (2019-09-13) | ||
@@ -8,0 +16,0 @@ |
@@ -42,98 +42,5 @@ 'use strict'; | ||
const Desktop = 'Desktop'; | ||
const DEVELOPMENT = 'development'; | ||
const PRODUCTION = 'production'; | ||
const sizes = [{ | ||
name: 'S', | ||
value: S | ||
}, { | ||
name: 'M', | ||
value: M | ||
}, { | ||
name: 'L', | ||
value: L | ||
}, { | ||
name: 'XL', | ||
value: XL | ||
}]; | ||
const colors = [{ | ||
name: 'White', | ||
value: White | ||
}, { | ||
name: 'Light', | ||
value: Light | ||
}, { | ||
name: 'Medium', | ||
value: Medium | ||
}, { | ||
name: 'Dark', | ||
value: Dark | ||
}, { | ||
name: 'Black', | ||
value: Black | ||
}, { | ||
name: 'Primary', | ||
value: Primary | ||
}, { | ||
name: 'Secondary', | ||
value: Secondary | ||
}, { | ||
name: 'Success', | ||
value: Success | ||
}, { | ||
name: 'Info', | ||
value: Info | ||
}, { | ||
name: 'Warning', | ||
value: Warning | ||
}, { | ||
name: 'Danger', | ||
value: Danger | ||
}, { | ||
name: 'Accent 1', | ||
value: Accent1 | ||
}, { | ||
name: 'Accent 2', | ||
value: Accent2 | ||
}, { | ||
name: 'Accent 3', | ||
value: Accent3 | ||
}]; | ||
const fonts = [{ | ||
name: 'Title 1', | ||
value: Title1 | ||
}, { | ||
name: 'Title 2', | ||
value: Title2 | ||
}, { | ||
name: 'Title 3', | ||
value: Title3 | ||
}, { | ||
name: 'Title 4', | ||
value: Title4 | ||
}, { | ||
name: 'Title 5', | ||
value: Title5 | ||
}, { | ||
name: 'Title 6', | ||
value: Title6 | ||
}, { | ||
name: 'Body 1', | ||
value: Body1 | ||
}, { | ||
name: 'Body 2', | ||
value: Body2 | ||
}]; | ||
const viewport = [{ | ||
name: 'Mobile', | ||
value: Mobile | ||
}, { | ||
name: 'Portrait', | ||
value: Portrait | ||
}, { | ||
name: 'Landscape', | ||
value: Landscape | ||
}, { | ||
name: 'Desktop', | ||
value: Desktop | ||
}]; | ||
const isMagnitude = size => /^(XS|S|M|L|XL)$/gim.test(size); | ||
@@ -198,3 +105,3 @@ const isStyle = color => /^(White|Light|Medium|Dark|Black|Primary|Secondary|Tertiary|Success|Info|Warning|Danger|Accent1|Accent2|Accent3)$/gim.test(color); | ||
const sizes$1 = { | ||
const sizes = { | ||
XS: 'xSmall', | ||
@@ -223,3 +130,3 @@ S: 'small', | ||
}; | ||
const fonts$1 = { | ||
const fonts = { | ||
Title1: 'title1', | ||
@@ -284,8 +191,8 @@ Title2: 'title2', | ||
icons: rename(swap(icons), i), | ||
spacing: map(x => rename(swap(deviceSpacing), x), rename(swap(sizes$1), s)), | ||
typography: map(x => rename(swap(deviceSize), x), rename(swap(fonts$1), t)), | ||
spacing: map(x => rename(swap(deviceSpacing), x), rename(swap(sizes), s)), | ||
typography: map(x => rename(swap(deviceSize), x), rename(swap(fonts), t)), | ||
borders: map((v, k) => ({ | ||
size: b[sizes$1[k]], | ||
radius: r[sizes$1[k]] | ||
}), sizes$1) | ||
size: b[sizes[k]], | ||
radius: r[sizes[k]] | ||
}), sizes) | ||
}; | ||
@@ -377,2 +284,104 @@ }; | ||
const sizes$1 = [{ | ||
name: 'S', | ||
value: S | ||
}, { | ||
name: 'M', | ||
value: M | ||
}, { | ||
name: 'L', | ||
value: L | ||
}, { | ||
name: 'XL', | ||
value: XL | ||
}]; | ||
const colors = [{ | ||
name: 'White', | ||
value: White | ||
}, { | ||
name: 'Light', | ||
value: Light | ||
}, { | ||
name: 'Medium', | ||
value: Medium | ||
}, { | ||
name: 'Dark', | ||
value: Dark | ||
}, { | ||
name: 'Black', | ||
value: Black | ||
}, { | ||
name: 'Primary', | ||
value: Primary | ||
}, { | ||
name: 'Secondary', | ||
value: Secondary | ||
}, { | ||
name: 'Success', | ||
value: Success | ||
}, { | ||
name: 'Info', | ||
value: Info | ||
}, { | ||
name: 'Warning', | ||
value: Warning | ||
}, { | ||
name: 'Danger', | ||
value: Danger | ||
}, { | ||
name: 'Accent 1', | ||
value: Accent1 | ||
}, { | ||
name: 'Accent 2', | ||
value: Accent2 | ||
}, { | ||
name: 'Accent 3', | ||
value: Accent3 | ||
}]; | ||
const fonts$1 = [{ | ||
name: 'Title 1', | ||
value: Title1 | ||
}, { | ||
name: 'Title 2', | ||
value: Title2 | ||
}, { | ||
name: 'Title 3', | ||
value: Title3 | ||
}, { | ||
name: 'Title 4', | ||
value: Title4 | ||
}, { | ||
name: 'Title 5', | ||
value: Title5 | ||
}, { | ||
name: 'Title 6', | ||
value: Title6 | ||
}, { | ||
name: 'Body 1', | ||
value: Body1 | ||
}, { | ||
name: 'Body 2', | ||
value: Body2 | ||
}]; | ||
const viewport = [{ | ||
name: 'Mobile', | ||
value: Mobile | ||
}, { | ||
name: 'Portrait', | ||
value: Portrait | ||
}, { | ||
name: 'Landscape', | ||
value: Landscape | ||
}, { | ||
name: 'Desktop', | ||
value: Desktop | ||
}]; | ||
function createOptionHelpers() { | ||
return { | ||
Styling | ||
}; | ||
} | ||
exports.default = createOptionHelpers; | ||
exports.XS = XS; | ||
@@ -415,5 +424,7 @@ exports.S = S; | ||
exports.Desktop = Desktop; | ||
exports.sizes = sizes; | ||
exports.DEVELOPMENT = DEVELOPMENT; | ||
exports.PRODUCTION = PRODUCTION; | ||
exports.sizes = sizes$1; | ||
exports.colors = colors; | ||
exports.fonts = fonts; | ||
exports.fonts = fonts$1; | ||
exports.viewport = viewport; | ||
@@ -420,0 +431,0 @@ exports.isMagnitude = isMagnitude; |
@@ -38,98 +38,5 @@ const XS = 'XS'; | ||
const Desktop = 'Desktop'; | ||
const DEVELOPMENT = 'development'; | ||
const PRODUCTION = 'production'; | ||
const sizes = [{ | ||
name: 'S', | ||
value: S | ||
}, { | ||
name: 'M', | ||
value: M | ||
}, { | ||
name: 'L', | ||
value: L | ||
}, { | ||
name: 'XL', | ||
value: XL | ||
}]; | ||
const colors = [{ | ||
name: 'White', | ||
value: White | ||
}, { | ||
name: 'Light', | ||
value: Light | ||
}, { | ||
name: 'Medium', | ||
value: Medium | ||
}, { | ||
name: 'Dark', | ||
value: Dark | ||
}, { | ||
name: 'Black', | ||
value: Black | ||
}, { | ||
name: 'Primary', | ||
value: Primary | ||
}, { | ||
name: 'Secondary', | ||
value: Secondary | ||
}, { | ||
name: 'Success', | ||
value: Success | ||
}, { | ||
name: 'Info', | ||
value: Info | ||
}, { | ||
name: 'Warning', | ||
value: Warning | ||
}, { | ||
name: 'Danger', | ||
value: Danger | ||
}, { | ||
name: 'Accent 1', | ||
value: Accent1 | ||
}, { | ||
name: 'Accent 2', | ||
value: Accent2 | ||
}, { | ||
name: 'Accent 3', | ||
value: Accent3 | ||
}]; | ||
const fonts = [{ | ||
name: 'Title 1', | ||
value: Title1 | ||
}, { | ||
name: 'Title 2', | ||
value: Title2 | ||
}, { | ||
name: 'Title 3', | ||
value: Title3 | ||
}, { | ||
name: 'Title 4', | ||
value: Title4 | ||
}, { | ||
name: 'Title 5', | ||
value: Title5 | ||
}, { | ||
name: 'Title 6', | ||
value: Title6 | ||
}, { | ||
name: 'Body 1', | ||
value: Body1 | ||
}, { | ||
name: 'Body 2', | ||
value: Body2 | ||
}]; | ||
const viewport = [{ | ||
name: 'Mobile', | ||
value: Mobile | ||
}, { | ||
name: 'Portrait', | ||
value: Portrait | ||
}, { | ||
name: 'Landscape', | ||
value: Landscape | ||
}, { | ||
name: 'Desktop', | ||
value: Desktop | ||
}]; | ||
const isMagnitude = size => /^(XS|S|M|L|XL)$/gim.test(size); | ||
@@ -194,3 +101,3 @@ const isStyle = color => /^(White|Light|Medium|Dark|Black|Primary|Secondary|Tertiary|Success|Info|Warning|Danger|Accent1|Accent2|Accent3)$/gim.test(color); | ||
const sizes$1 = { | ||
const sizes = { | ||
XS: 'xSmall', | ||
@@ -219,3 +126,3 @@ S: 'small', | ||
}; | ||
const fonts$1 = { | ||
const fonts = { | ||
Title1: 'title1', | ||
@@ -280,8 +187,8 @@ Title2: 'title2', | ||
icons: rename(swap(icons), i), | ||
spacing: map(x => rename(swap(deviceSpacing), x), rename(swap(sizes$1), s)), | ||
typography: map(x => rename(swap(deviceSize), x), rename(swap(fonts$1), t)), | ||
spacing: map(x => rename(swap(deviceSpacing), x), rename(swap(sizes), s)), | ||
typography: map(x => rename(swap(deviceSize), x), rename(swap(fonts), t)), | ||
borders: map((v, k) => ({ | ||
size: b[sizes$1[k]], | ||
radius: r[sizes$1[k]] | ||
}), sizes$1) | ||
size: b[sizes[k]], | ||
radius: r[sizes[k]] | ||
}), sizes) | ||
}; | ||
@@ -373,2 +280,104 @@ }; | ||
export { XS, S, M, L, XL, White, Light, Medium, Dark, Black, Primary, Secondary, Tertiary, Success, Info, Warning, Danger, Accent1, Accent2, Accent3, Title1, Title2, Title3, Title4, Title5, Title6, Subtitle1, Subtitle2, Body1, Body2, Caption1, Caption2, Button, Mobile, Portrait, Landscape, Desktop, sizes, colors, fonts, viewport, isMagnitude, isStyle, isFont, isViewport, isUnit, isHex, isRGB, isRGBA, isHSL, isHSLA, isColor, convertSize, convertColor, convertFont, convertViewport, map, swap, rename, convertTheme, Styling }; | ||
const sizes$1 = [{ | ||
name: 'S', | ||
value: S | ||
}, { | ||
name: 'M', | ||
value: M | ||
}, { | ||
name: 'L', | ||
value: L | ||
}, { | ||
name: 'XL', | ||
value: XL | ||
}]; | ||
const colors = [{ | ||
name: 'White', | ||
value: White | ||
}, { | ||
name: 'Light', | ||
value: Light | ||
}, { | ||
name: 'Medium', | ||
value: Medium | ||
}, { | ||
name: 'Dark', | ||
value: Dark | ||
}, { | ||
name: 'Black', | ||
value: Black | ||
}, { | ||
name: 'Primary', | ||
value: Primary | ||
}, { | ||
name: 'Secondary', | ||
value: Secondary | ||
}, { | ||
name: 'Success', | ||
value: Success | ||
}, { | ||
name: 'Info', | ||
value: Info | ||
}, { | ||
name: 'Warning', | ||
value: Warning | ||
}, { | ||
name: 'Danger', | ||
value: Danger | ||
}, { | ||
name: 'Accent 1', | ||
value: Accent1 | ||
}, { | ||
name: 'Accent 2', | ||
value: Accent2 | ||
}, { | ||
name: 'Accent 3', | ||
value: Accent3 | ||
}]; | ||
const fonts$1 = [{ | ||
name: 'Title 1', | ||
value: Title1 | ||
}, { | ||
name: 'Title 2', | ||
value: Title2 | ||
}, { | ||
name: 'Title 3', | ||
value: Title3 | ||
}, { | ||
name: 'Title 4', | ||
value: Title4 | ||
}, { | ||
name: 'Title 5', | ||
value: Title5 | ||
}, { | ||
name: 'Title 6', | ||
value: Title6 | ||
}, { | ||
name: 'Body 1', | ||
value: Body1 | ||
}, { | ||
name: 'Body 2', | ||
value: Body2 | ||
}]; | ||
const viewport = [{ | ||
name: 'Mobile', | ||
value: Mobile | ||
}, { | ||
name: 'Portrait', | ||
value: Portrait | ||
}, { | ||
name: 'Landscape', | ||
value: Landscape | ||
}, { | ||
name: 'Desktop', | ||
value: Desktop | ||
}]; | ||
function createOptionHelpers() { | ||
return { | ||
Styling | ||
}; | ||
} | ||
export default createOptionHelpers; | ||
export { XS, S, M, L, XL, White, Light, Medium, Dark, Black, Primary, Secondary, Tertiary, Success, Info, Warning, Danger, Accent1, Accent2, Accent3, Title1, Title2, Title3, Title4, Title5, Title6, Subtitle1, Subtitle2, Body1, Body2, Caption1, Caption2, Button, Mobile, Portrait, Landscape, Desktop, DEVELOPMENT, PRODUCTION, sizes$1 as sizes, colors, fonts$1 as fonts, viewport, isMagnitude, isStyle, isFont, isViewport, isUnit, isHex, isRGB, isRGBA, isHSL, isHSLA, isColor, convertSize, convertColor, convertFont, convertViewport, map, swap, rename, convertTheme, Styling }; |
{ | ||
"name": "@betty-blocks/option-helpers", | ||
"version": "22.6.3", | ||
"version": "22.7.1", | ||
"main": "dist/bundle.cjs.js", | ||
@@ -42,3 +42,3 @@ "module": "dist/bundle.esm.js", | ||
}, | ||
"gitHead": "057eff03cc964cc45b704eb243801d8aadb2fbca" | ||
"gitHead": "06a9b6d6ade3005d8054a82cc9f0d2c7a27eeacb" | ||
} |
21897
745