@sk-web-gui/theme
Advanced tools
Comparing version 2.2.0 to 2.3.0
@@ -7,3 +7,3 @@ "use strict"; | ||
var _toRGB, _toRGB2, _toRGB3, _toRGB4, _toRGB5, _toRGB6, _toRGB7, _toRGB8, _toRGB9, _toRGB10, _toRGB11, _toRGB12, _toRGB13, _toRGB14, _toRGB15, _toRGB16, _toRGB17, _toRGB18, _toRGB19, _toRGB20, _toRGB21, _toRGB22, _toRGB23, _toRGB24, _toRGB25, _toRGB26, _toRGB27, _toRGB28, _toRGB29, _toRGB30, _toRGB31, _toRGB32, _toRGB33, _toRGB34, _toRGB35, _toRGB36, _toRGB37, _toRGB38, _toRGB39, _toRGB40, _toRGB41, _toRGB42, _toRGB43, _toRGB44, _toRGB45, _toRGB46, _toRGB47, _toRGB48, _toRGB49, _toRGB50, _toRGB51, _toRGB52, _toRGB53, _toRGB54, _toRGB55, _toRGB56, _toRGB57, _toRGB58, _toRGB59, _toRGB60, _toRGB61, _toRGB62, _toRGB63, _toRGB64, _toRGB65, _toRGB66, _toRGB67, _toRGB68, _toRGB69, _toRGB70, _toRGB71, _toRGB72, _toRGB73, _toRGB74, _toRGB75, _toRGB76, _toRGB77, _toRGB78, _toRGB79, _toRGB80, _toRGB81, _toRGB82, _toRGB83, _toRGB84, _toRGB85, _toRGB86, _toRGB87, _toRGB88, _toRGB89, _toRGB90, _toRGB91, _toRGB92, _toRGB93, _toRGB94; // https://github.com/tailwindlabs/tailwindcss/blob/master/colors.js | ||
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } | ||
// /* Base colors */ | ||
@@ -10,0 +10,0 @@ var primitives = exports.primitives = { |
@@ -7,3 +7,3 @@ "use strict"; | ||
var _utils = require("@sk-web-gui/utils"); | ||
var tokens = ['colors', 'cursor', 'rounded', 'fontSize', 'lineHeight', 'spacing', 'screens', 'radius']; | ||
var tokens = ['colors', 'cursor', 'rounded', 'fontSize', 'fontFamily', 'lineHeight', 'spacing', 'screens', 'radius']; | ||
function extractTokens(theme) { | ||
@@ -10,0 +10,0 @@ var _tokens = tokens; |
@@ -7,3 +7,4 @@ "use strict"; | ||
var _units = require("./units"); | ||
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
var _fonts = require("./fonts"); | ||
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } | ||
// light theme | ||
@@ -50,2 +51,3 @@ var lightScheme = exports.lightScheme = { | ||
fontSize: _extends({}, _units.fontSizes), | ||
fontFamily: _extends({}, _fonts.fonts), | ||
lineHeight: _extends({}, _units.lineHeights), | ||
@@ -52,0 +54,0 @@ spacing: _units.spacing, |
@@ -15,4 +15,4 @@ "use strict"; | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } | ||
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } | ||
var ColorSchemeMode = exports.ColorSchemeMode = /*#__PURE__*/function (ColorSchemeMode) { | ||
@@ -19,0 +19,0 @@ ColorSchemeMode["Dark"] = "dark"; |
@@ -46,2 +46,8 @@ "use strict"; | ||
}); | ||
var _fonts = require("./fonts"); | ||
Object.keys(_fonts).forEach(function (key) { | ||
if (key === "default" || key === "__esModule") return; | ||
if (key in exports && exports[key] === _fonts[key]) return; | ||
exports[key] = _fonts[key]; | ||
}); | ||
var _useThemeQueries = require("./use-theme-queries"); | ||
@@ -48,0 +54,0 @@ Object.keys(_useThemeQueries).forEach(function (key) { |
var _toRGB, _toRGB2, _toRGB3, _toRGB4, _toRGB5, _toRGB6, _toRGB7, _toRGB8, _toRGB9, _toRGB10, _toRGB11, _toRGB12, _toRGB13, _toRGB14, _toRGB15, _toRGB16, _toRGB17, _toRGB18, _toRGB19, _toRGB20, _toRGB21, _toRGB22, _toRGB23, _toRGB24, _toRGB25, _toRGB26, _toRGB27, _toRGB28, _toRGB29, _toRGB30, _toRGB31, _toRGB32, _toRGB33, _toRGB34, _toRGB35, _toRGB36, _toRGB37, _toRGB38, _toRGB39, _toRGB40, _toRGB41, _toRGB42, _toRGB43, _toRGB44, _toRGB45, _toRGB46, _toRGB47, _toRGB48, _toRGB49, _toRGB50, _toRGB51, _toRGB52, _toRGB53, _toRGB54, _toRGB55, _toRGB56, _toRGB57, _toRGB58, _toRGB59, _toRGB60, _toRGB61, _toRGB62, _toRGB63, _toRGB64, _toRGB65, _toRGB66, _toRGB67, _toRGB68, _toRGB69, _toRGB70, _toRGB71, _toRGB72, _toRGB73, _toRGB74, _toRGB75, _toRGB76, _toRGB77, _toRGB78, _toRGB79, _toRGB80, _toRGB81, _toRGB82, _toRGB83, _toRGB84, _toRGB85, _toRGB86, _toRGB87, _toRGB88, _toRGB89, _toRGB90, _toRGB91, _toRGB92, _toRGB93, _toRGB94; | ||
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } | ||
// https://github.com/tailwindlabs/tailwindcss/blob/master/colors.js | ||
@@ -4,0 +4,0 @@ |
import { omit, pick } from '@sk-web-gui/utils'; | ||
var tokens = ['colors', 'cursor', 'rounded', 'fontSize', 'lineHeight', 'spacing', 'screens', 'radius']; | ||
var tokens = ['colors', 'cursor', 'rounded', 'fontSize', 'fontFamily', 'lineHeight', 'spacing', 'screens', 'radius']; | ||
export function extractTokens(theme) { | ||
@@ -4,0 +4,0 @@ var _tokens = tokens; |
@@ -1,4 +0,6 @@ | ||
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } | ||
import { colors } from './colors'; | ||
import { fontSizes, lineHeights, spacing, screens, radius } from './units'; | ||
import { fonts } from './fonts'; | ||
// light theme | ||
@@ -45,2 +47,3 @@ export var lightScheme = { | ||
fontSize: _extends({}, fontSizes), | ||
fontFamily: _extends({}, fonts), | ||
lineHeight: _extends({}, lineHeights), | ||
@@ -47,0 +50,0 @@ spacing, |
@@ -1,2 +0,2 @@ | ||
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } | ||
import { deepmerge, omit } from '@sk-web-gui/utils'; | ||
@@ -3,0 +3,0 @@ import React from 'react'; |
@@ -8,3 +8,4 @@ export * from './gui-provider'; | ||
export * from './units'; | ||
export * from './fonts'; | ||
export * from './use-theme-queries'; | ||
//# sourceMappingURL=index.js.map |
import { Dict } from '@sk-web-gui/utils'; | ||
declare const tokens: readonly ["colors", "cursor", "rounded", "fontSize", "lineHeight", "spacing", "screens", "radius"]; | ||
declare const tokens: readonly ["colors", "cursor", "rounded", "fontSize", "fontFamily", "lineHeight", "spacing", "screens", "radius"]; | ||
export type ThemeScale = (typeof tokens)[number] | 'transition.duration' | 'transition.property' | 'transition.easing'; | ||
@@ -4,0 +4,0 @@ export declare function extractTokens(theme: Dict): { |
@@ -15,2 +15,4 @@ export * from './gui-provider'; | ||
export type * from './units'; | ||
export * from './fonts'; | ||
export type * from './fonts'; | ||
export * from './use-theme-queries'; |
@@ -48,2 +48,3 @@ import { DeepPartial } from '@sk-web-gui/utils'; | ||
readonly fontSize: ThemeOption; | ||
readonly fontFamily: ThemeOption; | ||
readonly lineHeight: ThemeOption; | ||
@@ -50,0 +51,0 @@ readonly spacing: ThemeOption; |
{ | ||
"name": "@sk-web-gui/theme", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"sideEffects": false, | ||
@@ -48,3 +48,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "711e094b59104a98d566a8543d4b1f6d44322ef3" | ||
"gitHead": "70fb6d46542ebf47d19c64d6c1bc860628d0185a" | ||
} |
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
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
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
Sorry, the diff of this file is not supported yet
368841
65
88
4921
10