@charcoal-ui/theme 1.0.0-alpha.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,140 +1,4 @@
1
- import { Effect, Effects, OpacityEffect } from './effect';
2
- declare const _default: {};
3
- export default _default;
4
- export * from './effect';
5
- export declare type Material = string;
6
- export declare type GradientMaterial = {
7
- color: Material;
8
- ratio: number;
9
- }[];
10
- /**
11
- * @deprecated
12
- */
13
- declare type ThemeMaterials = {
14
- background1: Material;
15
- background2: Material;
16
- surface1: Material;
17
- surface2: Material;
18
- /**
19
- * Black Fade 20にするとボーダーと共通化できる
20
- */
21
- surface3: Material;
22
- surface4: Material;
23
- surface6: Material;
24
- /**
25
- * サムネイルに被せる色。
26
- * Lightモードの色が2と共通。コントラストの低下を狙うなら2でいいが、サムネイルで色味を調整しすぎる感がある。
27
- */
28
- surface7: Material;
29
- /**
30
- * 磨りガラス効果を使えれば6と統合できそう
31
- */
32
- surface8: Material;
33
- surface9: Material;
34
- link1: Material;
35
- link2: Material;
36
- text1: Material;
37
- /**
38
- * 1と2は統合できるかもしれない
39
- */
40
- text2: Material;
41
- text3: Material;
42
- /**
43
- * Surface 4に重ねた時に薄すぎる感あり
44
- */
45
- text4: Material;
46
- text5: Material;
47
- icon6: Material;
48
- border: Material;
49
- };
50
- /**
51
- * @deprecated
52
- */
53
- export interface ThemeEffects {
54
- hover: Effects;
55
- press: Effects;
56
- disabled: Effects;
57
- }
58
- export declare type ThemeEffect = {
59
- hover: Effect;
60
- press: Effect;
61
- };
62
- export declare type ThemeElementEffect = {
63
- disabled: OpacityEffect;
64
- };
65
- /**
66
- * @deprecated
67
- */
68
- declare type ThemeSemantic = {
69
- brand: Material;
70
- };
71
- /**
72
- * @deprecated Use `ThemeColor` instead
73
- */
74
- export declare type ThemeColors = ThemeMaterials & ThemeSemantic & {
75
- premium: Material;
76
- };
77
- export declare type ThemeColor = {
78
- transparent: Material;
79
- background1: Material;
80
- background2: Material;
81
- surface1: Material;
82
- surface2: Material;
83
- surface3: Material;
84
- surface4: Material;
85
- surface6: Material;
86
- surface7: Material;
87
- surface8: Material;
88
- surface9: Material;
89
- link1: Material;
90
- link2: Material;
91
- text1: Material;
92
- text2: Material;
93
- text3: Material;
94
- text4: Material;
95
- text5: Material;
96
- icon6: Material;
97
- border: Material;
98
- brand: Material;
99
- assertive: Material;
100
- /**
101
- * @deprecated
102
- */
103
- premium: Material;
104
- };
105
- export declare type ThemeColorGradient = {
106
- surface4Gradient: GradientMaterial;
107
- };
108
- export interface Theme {
109
- /**
110
- * @deprecated
111
- *
112
- * Use `color` instead.
113
- */
114
- materials: ThemeMaterials;
115
- /**
116
- * @deprecated
117
- *
118
- * Use `color` instead.
119
- */
120
- semantic: ThemeSemantic;
121
- /**
122
- * @deprecated Use `color` instead
123
- */
124
- colors: ThemeColors;
125
- color: ThemeColor;
126
- gradientColor: ThemeColorGradient;
127
- /**
128
- * @deprecated Use `effect` instead
129
- */
130
- effects: ThemeEffects;
131
- /**
132
- * effect for color (background or font color)
133
- */
134
- effect: ThemeEffect;
135
- /**
136
- * effect for element its own (opacify element includes descendants)
137
- */
138
- elementEffect: ThemeElementEffect;
139
- }
1
+ export * from './theme';
2
+ export * from './abstract-theme';
3
+ export * from './default';
140
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;;AAEzD,wBAAiB;AAEjB,cAAc,UAAU,CAAA;AAExB,oBAAY,QAAQ,GAAG,MAAM,CAAA;AAC7B,oBAAY,gBAAgB,GAAG;IAAE,KAAK,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,CAAA;AAEnE;;GAEG;AAEH,aAAK,cAAc,GAA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AAChC,cAAc,WAAW,CAAA"}
@@ -1,2 +1,2 @@
1
- var a={};export{a as default};
1
+ import{TYPOGRAPHY_SIZE as e,SPACING as a,COLUMN_UNIT as r,GUTTER_UNIT as t,BORDER_RADIUS as n,BREAKPOINT as o}from"@charcoal-ui/foundation";import{applyEffect as s}from"@charcoal-ui/utils";function i(){return i=Object.assign||function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},i.apply(this,arguments)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,a){return l=Object.setPrototypeOf||function(e,a){return e.__proto__=a,e},l(e,a)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function d(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function p(e,a,r){return p=d()?Reflect.construct:function(e,a,r){var t=[null];t.push.apply(t,a);var n=new(Function.bind.apply(e,t));return r&&l(n,r.prototype),n},p.apply(null,arguments)}function c(e){var a="function"==typeof Map?new Map:void 0;return c=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==a){if(a.has(e))return a.get(e);a.set(e,r)}function r(){return p(e,arguments,u(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),l(r,e)},c(e)}var b={1:"Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\n\n",2:"Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\n\n",3:"Passed an incorrect argument to a color function, please pass a string representation of a color.\n\n",4:"Couldn't generate valid rgb string from %s, it returned %s.\n\n",5:"Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\n\n",6:"Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\n\n",7:"Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\n\n",8:"Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\n\n",9:"Please provide a number of steps to the modularScale helper.\n\n",10:"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",11:'Invalid value passed as base to modularScale, expected number or em string but got "%s"\n\n',12:'Expected a string ending in "px" or a number passed as the first argument to %s(), got "%s" instead.\n\n',13:'Expected a string ending in "px" or a number passed as the second argument to %s(), got "%s" instead.\n\n',14:'Passed invalid pixel value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',15:'Passed invalid base value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',16:"You must provide a template to this method.\n\n",17:"You passed an unsupported selector state to this method.\n\n",18:"minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",19:"fromSize and toSize must be provided as stringified numbers with the same units.\n\n",20:"expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",21:"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n",22:"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n",23:"fontFace expects a name of a font-family.\n\n",24:"fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",25:"fontFace expects localFonts to be an array.\n\n",26:"fontFace expects fileFormats to be an array.\n\n",27:"radialGradient requries at least 2 color-stops to properly render.\n\n",28:"Please supply a filename to retinaImage() as the first argument.\n\n",29:"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",30:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",31:"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\n\n",32:"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\n\n",33:"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\n\n",34:"borderRadius expects a radius value as a string or number as the second argument.\n\n",35:'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',36:"Property must be a string value.\n\n",37:"Syntax Error at %s.\n\n",38:"Formula contains a function that needs parentheses at %s.\n\n",39:"Formula is missing closing parenthesis at %s.\n\n",40:"Formula has too many closing parentheses at %s.\n\n",41:"All values in a formula must have the same unit or be unitless.\n\n",42:"Please provide a number of steps to the modularScale helper.\n\n",43:"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",44:"Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\n\n",45:"Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\n\n",46:"Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\n\n",47:"minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",48:"fromSize and toSize must be provided as stringified numbers with the same units.\n\n",49:"Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",50:"Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\n\n",51:"Expects the first argument object to have the properties prop, fromSize, and toSize.\n\n",52:"fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",53:"fontFace expects localFonts to be an array.\n\n",54:"fontFace expects fileFormats to be an array.\n\n",55:"fontFace expects a name of a font-family.\n\n",56:"linearGradient requries at least 2 color-stops to properly render.\n\n",57:"radialGradient requries at least 2 color-stops to properly render.\n\n",58:"Please supply a filename to retinaImage() as the first argument.\n\n",59:"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",60:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",61:"Property must be a string value.\n\n",62:"borderRadius expects a radius value as a string or number as the second argument.\n\n",63:'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',64:"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\n\n",65:"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\n\n",66:"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\n\n",67:"You must provide a template to this method.\n\n",68:"You passed an unsupported selector state to this method.\n\n",69:'Expected a string ending in "px" or a number passed as the first argument to %s(), got %s instead.\n\n',70:'Expected a string ending in "px" or a number passed as the second argument to %s(), got %s instead.\n\n',71:'Passed invalid pixel value %s to %s(), please pass a value like "12px" or 12.\n\n',72:'Passed invalid base value %s to %s(), please pass a value like "12px" or 12.\n\n',73:"Please provide a valid CSS variable.\n\n",74:"CSS variable not found and no default was provided.\n\n",75:"important requires a valid style object, got a %s instead.\n\n",76:"fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\n\n",77:'remToPx expects a value in "rem" but you provided it in "%s".\n\n',78:'base must be set in "px" or "%" but you set it in "%s".\n'};function m(){for(var e=arguments.length,a=new Array(e),r=0;r<e;r++)a[r]=arguments[r];var t,n=a[0],o=[];for(t=1;t<a.length;t+=1)o.push(a[t]);return o.forEach(function(e){n=n.replace(/%[a-z]/,e)}),n}var h=/*#__PURE__*/function(e){var a,r;function t(a){var r;if("production"===process.env.NODE_ENV)r=e.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+a+" for more information.")||this;else{for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];r=e.call(this,m.apply(void 0,[b[a]].concat(n)))||this}return f(r)}return r=e,(a=t).prototype=Object.create(r.prototype),a.prototype.constructor=a,l(a,r),t}(/*#__PURE__*/c(Error));function g(e){return Math.round(255*e)}function v(e,a,r){return g(e)+","+g(a)+","+g(r)}function y(e,a,r,t){if(void 0===t&&(t=v),0===a)return t(r,r,r);var n=(e%360+360)%360/60,o=(1-Math.abs(2*r-1))*a,s=o*(1-Math.abs(n%2-1)),i=0,f=0,l=0;n>=0&&n<1?(i=o,f=s):n>=1&&n<2?(i=s,f=o):n>=2&&n<3?(f=o,l=s):n>=3&&n<4?(f=s,l=o):n>=4&&n<5?(i=s,l=o):n>=5&&n<6&&(i=o,l=s);var u=r-o/2;return t(i+u,f+u,l+u)}var x={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},w=/^#[a-fA-F0-9]{6}$/,k=/^#[a-fA-F0-9]{8}$/,S=/^#[a-fA-F0-9]{3}$/,I=/^#[a-fA-F0-9]{4}$/,P=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,j=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i,F=/^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,z=/^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i,C=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e};function O(e){var a=e.toString(16);return 1===a.length?"0"+a:a}function E(e,a,r){if("number"==typeof e&&"number"==typeof a&&"number"==typeof r)return C("#"+O(e)+O(a)+O(r));if("object"==typeof e&&void 0===a&&void 0===r)return C("#"+O(e.red)+O(e.green)+O(e.blue));throw new h(6)}function R(e,a,r,t){if("string"==typeof e&&"number"==typeof a){var n=function(e){if("string"!=typeof e)throw new h(3);var a=function(e){if("string"!=typeof e)return e;var a=e.toLowerCase();return x[a]?"#"+x[a]:e}(e);if(a.match(w))return{red:parseInt(""+a[1]+a[2],16),green:parseInt(""+a[3]+a[4],16),blue:parseInt(""+a[5]+a[6],16)};if(a.match(k)){var r=parseFloat((parseInt(""+a[7]+a[8],16)/255).toFixed(2));return{red:parseInt(""+a[1]+a[2],16),green:parseInt(""+a[3]+a[4],16),blue:parseInt(""+a[5]+a[6],16),alpha:r}}if(a.match(S))return{red:parseInt(""+a[1]+a[1],16),green:parseInt(""+a[2]+a[2],16),blue:parseInt(""+a[3]+a[3],16)};if(a.match(I)){var t=parseFloat((parseInt(""+a[4]+a[4],16)/255).toFixed(2));return{red:parseInt(""+a[1]+a[1],16),green:parseInt(""+a[2]+a[2],16),blue:parseInt(""+a[3]+a[3],16),alpha:t}}var n=P.exec(a);if(n)return{red:parseInt(""+n[1],10),green:parseInt(""+n[2],10),blue:parseInt(""+n[3],10)};var o=j.exec(a.substring(0,50));if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10),alpha:parseFloat(""+o[4])};var s=F.exec(a);if(s){var i="rgb("+y(parseInt(""+s[1],10),parseInt(""+s[2],10)/100,parseInt(""+s[3],10)/100)+")",f=P.exec(i);if(!f)throw new h(4,a,i);return{red:parseInt(""+f[1],10),green:parseInt(""+f[2],10),blue:parseInt(""+f[3],10)}}var l=z.exec(a.substring(0,50));if(l){var u="rgb("+y(parseInt(""+l[1],10),parseInt(""+l[2],10)/100,parseInt(""+l[3],10)/100)+")",d=P.exec(u);if(!d)throw new h(4,a,u);return{red:parseInt(""+d[1],10),green:parseInt(""+d[2],10),blue:parseInt(""+d[3],10),alpha:parseFloat(""+l[4])}}throw new h(5)}(e);return"rgba("+n.red+","+n.green+","+n.blue+","+a+")"}if("number"==typeof e&&"number"==typeof a&&"number"==typeof r&&"number"==typeof t)return t>=1?E(e,a,r):"rgba("+e+","+a+","+r+","+t+")";if("object"==typeof e&&void 0===a&&void 0===r&&void 0===t)return e.alpha>=1?E(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new h(7)}const q={type:"opacity",opacity:.32},T={typography:{size:e},spacing:a,grid:{unit:{column:r,gutter:t}},borderRadius:n,transition:{default:{duration:.2}},breakpoint:{screen1:o[6],screen2:o[8],screen3:o[10],screen4:o[12]},gradientColor:{surface5:[{color:R("#000000",.32),ratio:0},{color:R("#000000",0),ratio:100}],callToAction:[{color:"#d1ff1a",ratio:0},{color:"#1ad1ff",ratio:100}]},outline:{default:{color:s("#0096fa",q),weight:4},assertive:{color:s("#ff2b00",q),weight:4}},elementEffect:{disabled:{type:"opacity",opacity:.32}}},A=i({},T,{effect:{hover:{type:"alpha",color:"#000000",opacity:.08},press:{type:"alpha",color:"#000000",opacity:.16}},color:{transparent:R("#000000",0),background1:"#ffffff",background2:"#f5f5f5",icon6:R("#ffffff",.28),link1:"#3d7699",link2:R("#ffffff",.36),surface1:"#ffffff",surface2:R("#000000",.02),surface3:R("#000000",.04),surface4:R("#000000",.32),surface6:R("#000000",.88),surface7:R("#000000",.02),surface8:R("#000000",.88),surface9:R("#ffffff",.84),text1:R("#000000",.88),text2:R("#000000",.64),text3:R("#000000",.32),text4:R("#000000",.16),text5:"#ffffff",brand:"#0096fa",assertive:"#ff2b00"},border:{default:{color:R("#000000",.08)}}}),_=i({},T,{effect:{hover:{type:"alpha",color:"#000000",opacity:.08},press:{type:"alpha",color:"#000000",opacity:.16}},color:{transparent:R("#000000",0),background1:"#1f1f1f",background2:"#000000",icon6:A.color.icon6,link1:A.color.link1,link2:A.color.link2,surface1:"#1f1f1f",surface2:R("#000000",.16),surface3:R("#ffffff",.12),surface4:A.color.surface4,surface6:R("#ffffff",.12),surface7:A.color.surface7,surface8:A.color.surface8,surface9:A.color.surface9,text1:"#ffffff",text2:R("#ffffff",.68),text3:R("#ffffff",.36),text4:R("#ffffff",.28),text5:A.color.text5,brand:"#0096fa",assertive:"#ff2b00"},border:{default:{color:R("#ffffff",.12)}}});export{_ as dark,A as light};
2
2
  //# sourceMappingURL=index.modern.js.map