timvir 0.2.38 → 0.2.42

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.
Files changed (113) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/blocks/Arbitrary/Arbitrary.d.ts +1 -1
  3. package/blocks/Arbitrary/index.js +232 -78
  4. package/blocks/Arbitrary/samples/basic.d.ts +1 -1
  5. package/blocks/Arbitrary/styles.css +166 -6
  6. package/blocks/Code/Code.d.ts +0 -6
  7. package/blocks/Code/docs/index.mdx +0 -11
  8. package/blocks/Code/index.js +213 -112
  9. package/blocks/Code/samples/basic.d.ts +1 -1
  10. package/blocks/Code/samples/toggle.d.ts +1 -2
  11. package/blocks/Code/styles.css +100 -15
  12. package/blocks/ColorBar/docs/index.mdx +8 -2
  13. package/blocks/ColorBar/index.js +223 -68
  14. package/blocks/ColorBar/samples/basic.d.ts +1 -2
  15. package/blocks/ColorBar/styles.css +103 -4
  16. package/blocks/ColorBook/docs/index.mdx +1 -1
  17. package/blocks/ColorBook/index.js +222 -60
  18. package/blocks/ColorBook/samples/basic.d.ts +1 -2
  19. package/blocks/ColorBook/styles.css +166 -6
  20. package/blocks/Cover/index.js +177 -48
  21. package/blocks/Cover/samples/basic.d.ts +1 -2
  22. package/blocks/Cover/styles.css +18 -0
  23. package/blocks/Exhibit/index.js +205 -50
  24. package/blocks/Exhibit/samples/basic.d.ts +1 -2
  25. package/blocks/Exhibit/samples/bleed.d.ts +1 -1
  26. package/blocks/Exhibit/samples/usage.d.ts +1 -2
  27. package/blocks/Exhibit/styles.css +66 -3
  28. package/blocks/Font/index.js +239 -98
  29. package/blocks/Font/samples/basic.d.ts +1 -1
  30. package/blocks/Font/samples/timvir/body1.d.ts +1 -1
  31. package/blocks/Font/samples/timvir/caption.d.ts +1 -1
  32. package/blocks/Font/samples/timvir/h1.d.ts +1 -1
  33. package/blocks/Font/samples/timvir/h2.d.ts +1 -1
  34. package/blocks/Font/samples/timvir/h3.d.ts +1 -1
  35. package/blocks/Font/samples/timvir/h4.d.ts +1 -1
  36. package/blocks/Font/styles.css +82 -8
  37. package/blocks/Grid/docs/index.mdx +4 -4
  38. package/blocks/Grid/index.js +181 -36
  39. package/blocks/Grid/samples/basic.d.ts +1 -2
  40. package/blocks/Grid/styles.css +20 -1
  41. package/blocks/Icon/docs/index.mdx +13 -13
  42. package/blocks/Icon/index.js +93 -100
  43. package/blocks/Icon/internal/Canvas.d.ts +1 -1
  44. package/blocks/Icon/samples/basic.d.ts +1 -2
  45. package/blocks/Icon/styles.css +117 -5
  46. package/blocks/Icon/types.d.ts +3 -2
  47. package/blocks/Message/docs/index.mdx +5 -8
  48. package/blocks/Message/index.js +238 -55
  49. package/blocks/Message/samples/basic.d.ts +1 -1
  50. package/blocks/Message/styles.css +94 -6
  51. package/blocks/Swatch/docs/index.mdx +16 -16
  52. package/blocks/Swatch/index.js +199 -45
  53. package/blocks/Swatch/samples/basic.d.ts +1 -2
  54. package/blocks/Swatch/styles.css +82 -4
  55. package/blocks/Viewport/index.js +360 -237
  56. package/blocks/Viewport/internal/Caption.d.ts +1 -1
  57. package/blocks/Viewport/internal/Handle.d.ts +1 -1
  58. package/blocks/Viewport/internal/Ruler.d.ts +1 -2
  59. package/blocks/Viewport/samples/basic.d.ts +1 -2
  60. package/blocks/Viewport/styles.css +259 -14
  61. package/blocks/WebLink/index.js +217 -62
  62. package/blocks/WebLink/samples/basic.d.ts +1 -1
  63. package/blocks/WebLink/styles.css +170 -8
  64. package/blocks/styles.css +1460 -97
  65. package/builtins/components.d.ts +2 -2
  66. package/builtins/index.js +306 -239
  67. package/builtins/styles.css +267 -14
  68. package/context/index.d.ts +6 -1
  69. package/core/components/Commands/Commands.d.ts +2 -0
  70. package/core/components/Commands/internal/Action.d.ts +1 -1
  71. package/core/components/Commands/internal/Dialog.d.ts +1 -2
  72. package/core/components/Commands/internal/index.d.ts +0 -1
  73. package/core/components/Footer/samples/basic.d.ts +1 -1
  74. package/core/components/NavigationFooter/NavigationFooter.d.ts +4 -2
  75. package/core/components/NavigationFooter/samples/basic.d.ts +1 -1
  76. package/core/components/Page/Page.d.ts +12 -3
  77. package/core/components/Page/docs/index.mdx +44 -11
  78. package/core/components/Page/internal/Section.d.ts +1 -2
  79. package/core/components/Page/internal/Sidebar.d.ts +1 -1
  80. package/core/components/Page/internal/SidebarItem.d.ts +1 -2
  81. package/core/components/Page/internal/index.d.ts +0 -1
  82. package/core/components/Page/samples/basic.d.ts +1 -2
  83. package/core/components/Page/samples/layout.d.ts +1 -2
  84. package/core/index.d.ts +191 -2
  85. package/core/index.js +674 -449
  86. package/core/layout.d.ts +40 -0
  87. package/core/styles.css +857 -88
  88. package/core/theme/detector.js +1 -1
  89. package/global.css +79 -0
  90. package/internal/cx.d.ts +1 -0
  91. package/knip.config.d.ts +5 -0
  92. package/package.json +1 -2
  93. package/search/Search/samples/basic.d.ts +1 -2
  94. package/search/index.js +2 -208
  95. package/styles.css +2670 -222
  96. package/blocks/Code/theme.d.ts +0 -2
  97. package/bus/styles.css +0 -1
  98. package/context/styles.css +0 -1
  99. package/core/theme/index.d.ts +0 -1
  100. package/hooks/styles.css +0 -1
  101. package/search/Search/internal/Dialog.d.ts +0 -20
  102. package/search/Search/internal/index.d.ts +0 -1
  103. package/search/SearchBoxInput/SearchBoxInput.d.ts +0 -11
  104. package/search/SearchBoxInput/docs/api.mdx +0 -76
  105. package/search/SearchBoxInput/docs/index.mdx +0 -6
  106. package/search/SearchBoxInput/index.d.ts +0 -1
  107. package/search/SearchBoxInput/samples/basic.d.ts +0 -2
  108. package/search/SearchBoxListItem/SearchBoxListItem.d.ts +0 -13
  109. package/search/SearchBoxListItem/docs/api.mdx +0 -76
  110. package/search/SearchBoxListItem/docs/index.mdx +0 -30
  111. package/search/SearchBoxListItem/index.d.ts +0 -1
  112. package/search/SearchBoxListItem/samples/basic.d.ts +0 -2
  113. package/search/styles.css +0 -16
@@ -1,51 +1,177 @@
1
1
  'use client';
2
- import * as Page from 'timvir/core';
3
- import { useBlock } from 'timvir/core';
2
+ import { useBlock, layoutStyles } from 'timvir/core';
4
3
  import { codeToHtml } from 'shiki';
5
4
  import * as React from 'react';
6
- import * as Icons from 'react-feather';
5
+ import { jsxs, jsx } from 'react/jsx-runtime';
7
6
 
8
- // src/css.ts
9
-
10
- // src/cx.ts
11
- var cx = function cx2() {
12
- const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
13
- const atomicClasses = {};
14
- const nonAtomicClasses = [];
15
- presentClassNames.forEach((arg) => {
16
- const individualClassNames = arg ? arg.split(" ") : [];
17
- individualClassNames.forEach((className) => {
18
- if (className.startsWith("atm_")) {
19
- const [, keyHash] = className.split("_");
20
- atomicClasses[keyHash] = className;
21
- } else {
22
- nonAtomicClasses.push(className);
23
- }
24
- });
25
- });
26
- const result = [];
27
- for (const keyHash in atomicClasses) {
28
- if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
29
- result.push(atomicClasses[keyHash]);
7
+ function cx(...args) {
8
+ let str = "";
9
+ for (let i = 0; i < args.length; i++) {
10
+ const arg = args[i];
11
+ if (typeof arg === "string") {
12
+ str += (str && " ") + arg;
30
13
  }
31
14
  }
32
- result.push(...nonAtomicClasses);
33
- return result.join(" ");
34
- };
35
- var cx_default = cx;
15
+ return str;
16
+ }
36
17
 
37
- var theme = "tac6gx6";
18
+ var styleq = {};
19
+ var hasRequiredStyleq;
20
+ function requireStyleq() {
21
+ if (hasRequiredStyleq) return styleq;
22
+ hasRequiredStyleq = 1;
23
+ Object.defineProperty(styleq, "__esModule", {
24
+ value: true
25
+ });
26
+ styleq.styleq = void 0;
27
+ var cache = new WeakMap();
28
+ var compiledKey = '$$css';
29
+ function createStyleq(options) {
30
+ var disableCache;
31
+ var disableMix;
32
+ var transform;
33
+ if (options != null) {
34
+ disableCache = options.disableCache === true;
35
+ disableMix = options.disableMix === true;
36
+ transform = options.transform;
37
+ }
38
+ return function styleq() {
39
+ var definedProperties = [];
40
+ var className = '';
41
+ var inlineStyle = null;
42
+ var debugString = '';
43
+ var nextCache = disableCache ? null : cache;
44
+ var styles = new Array(arguments.length);
45
+ for(var i = 0; i < arguments.length; i++){
46
+ styles[i] = arguments[i];
47
+ }
48
+ while(styles.length > 0){
49
+ var possibleStyle = styles.pop();
50
+ if (possibleStyle == null || possibleStyle === false) {
51
+ continue;
52
+ }
53
+ if (Array.isArray(possibleStyle)) {
54
+ for(var _i = 0; _i < possibleStyle.length; _i++){
55
+ styles.push(possibleStyle[_i]);
56
+ }
57
+ continue;
58
+ }
59
+ var style = transform != null ? transform(possibleStyle) : possibleStyle;
60
+ if (style.$$css != null) {
61
+ var classNameChunk = '';
62
+ if (nextCache != null && nextCache.has(style)) {
63
+ var cacheEntry = nextCache.get(style);
64
+ if (cacheEntry != null) {
65
+ classNameChunk = cacheEntry[0];
66
+ debugString = cacheEntry[2];
67
+ definedProperties.push.apply(definedProperties, cacheEntry[1]);
68
+ nextCache = cacheEntry[3];
69
+ }
70
+ } else {
71
+ var definedPropertiesChunk = [];
72
+ for(var prop in style){
73
+ var value = style[prop];
74
+ if (prop === compiledKey) {
75
+ var compiledKeyValue = style[prop];
76
+ if (compiledKeyValue !== true) {
77
+ debugString = debugString ? compiledKeyValue + '; ' + debugString : compiledKeyValue;
78
+ }
79
+ continue;
80
+ }
81
+ if (typeof value === 'string' || value === null) {
82
+ if (!definedProperties.includes(prop)) {
83
+ definedProperties.push(prop);
84
+ if (nextCache != null) {
85
+ definedPropertiesChunk.push(prop);
86
+ }
87
+ if (typeof value === 'string') {
88
+ classNameChunk += classNameChunk ? ' ' + value : value;
89
+ }
90
+ }
91
+ } else {
92
+ console.error("styleq: ".concat(prop, " typeof ").concat(String(value), " is not \"string\" or \"null\"."));
93
+ }
94
+ }
95
+ if (nextCache != null) {
96
+ var weakMap = new WeakMap();
97
+ nextCache.set(style, [
98
+ classNameChunk,
99
+ definedPropertiesChunk,
100
+ debugString,
101
+ weakMap
102
+ ]);
103
+ nextCache = weakMap;
104
+ }
105
+ }
106
+ if (classNameChunk) {
107
+ className = className ? classNameChunk + ' ' + className : classNameChunk;
108
+ }
109
+ } else {
110
+ if (disableMix) {
111
+ if (inlineStyle == null) {
112
+ inlineStyle = {};
113
+ }
114
+ inlineStyle = Object.assign({}, style, inlineStyle);
115
+ } else {
116
+ var subStyle = null;
117
+ for(var _prop in style){
118
+ var _value = style[_prop];
119
+ if (_value !== undefined) {
120
+ if (!definedProperties.includes(_prop)) {
121
+ if (_value != null) {
122
+ if (inlineStyle == null) {
123
+ inlineStyle = {};
124
+ }
125
+ if (subStyle == null) {
126
+ subStyle = {};
127
+ }
128
+ subStyle[_prop] = _value;
129
+ }
130
+ definedProperties.push(_prop);
131
+ nextCache = null;
132
+ }
133
+ }
134
+ }
135
+ if (subStyle != null) {
136
+ inlineStyle = Object.assign(subStyle, inlineStyle);
137
+ }
138
+ }
139
+ }
140
+ }
141
+ var styleProps = [
142
+ className,
143
+ inlineStyle,
144
+ debugString
145
+ ];
146
+ return styleProps;
147
+ };
148
+ }
149
+ var styleq$1 = styleq.styleq = createStyleq();
150
+ styleq$1.factory = createStyleq;
151
+ return styleq;
152
+ }
153
+ var styleqExports = requireStyleq();
154
+ function props(...styles) {
155
+ const [className, style, dataStyleSrc] = styleqExports.styleq(styles);
156
+ const result = {};
157
+ if (className != null && className !== '') {
158
+ result.className = className;
159
+ }
160
+ if (style != null && Object.keys(style).length > 0) {
161
+ result.style = style;
162
+ }
163
+ if (dataStyleSrc != null && dataStyleSrc !== '') {
164
+ result['data-style-src'] = dataStyleSrc;
165
+ }
166
+ return result;
167
+ }
38
168
 
39
- /**
40
- * The underlying DOM element which is rendered by this component.
41
- */
42
169
  const Root = "div";
43
- function Code(props, ref) {
44
- const block = useBlock(props);
170
+ function Code(props$1, ref) {
171
+ const block = useBlock(props$1);
45
172
  const {
46
173
  children,
47
174
  language,
48
- fullWidth,
49
175
  highlightedLines,
50
176
  caption,
51
177
  className,
@@ -53,36 +179,39 @@ function Code(props, ref) {
53
179
  } = block.props;
54
180
  const [state, setState] = React.useState({
55
181
  settled: false,
56
- mouseOver: false,
57
- copiedToClipboard: false,
58
- /*
59
- * Prevent layout shift during (asynchronous) highlighting of the markup by
60
- * initializing the html witha pre/code block with the expected number of
61
- * lines.
62
- */
63
- html: `<pre><code>${children.trim().split("\n").map(() => "\n").join("")}</code></pre>`
182
+ html: `<pre class="${{
183
+ className: "timvir-s-1lliihq timvir-s-1ghz6dp timvir-s-1g8o3q3 timvir-s-1d0dlzq"
184
+ }.className}"><code>${children.trim().split("\n").map(() => "\n").join("")}</code></pre>`
64
185
  });
65
186
  React.useEffect(() => {
66
187
  (async () => {
188
+ const stylexTransformer = {
189
+ name: "stylex",
190
+ pre(node) {
191
+ this.addClassToHast(node, {
192
+ className: "timvir-s-1lliihq timvir-s-1ghz6dp timvir-s-1g8o3q3 timvir-s-1d0dlzq"
193
+ }.className);
194
+ },
195
+ line(node, index) {
196
+ this.addClassToHast(node, {
197
+ className: "timvir-s-1rg5ohu timvir-s-h8yej3 timvir-s-e193im"
198
+ }.className);
199
+ if (highlightedLines?.includes(index)) {
200
+ this.addClassToHast(node, {
201
+ className: "timvir-s-15fpjw5"
202
+ }.className);
203
+ }
204
+ }
205
+ };
67
206
  const html = await codeToHtml(children.trim(), {
68
207
  lang: language ?? "text",
69
208
  themes: {
70
209
  light: "github-light",
71
210
  dark: "github-dark"
72
211
  },
73
- decorations: (highlightedLines ?? []).map(line => ({
74
- start: {
75
- line: line - 1,
76
- character: 0
77
- },
78
- end: {
79
- line: line,
80
- character: 0
81
- },
82
- properties: {
83
- class: classes.highlightedLine
84
- }
85
- }))
212
+ defaultColor: false,
213
+ cssVariablePrefix: "--timvir-b-Code-shiki-",
214
+ transformers: [stylexTransformer]
86
215
  });
87
216
  setState(state => ({
88
217
  ...state,
@@ -90,64 +219,36 @@ function Code(props, ref) {
90
219
  html
91
220
  }));
92
221
  })();
93
- }, [children, language]);
94
- return /*#__PURE__*/React.createElement(Root, {
222
+ }, [children, language, highlightedLines]);
223
+ const rootStyleProps = props(layoutStyles.block);
224
+ const codeStyleProps = {
225
+ className: "timvir-s-w2csxc timvir-s-6wvzqs timvir-s-sfzzmd timvir-s-1sxf85j timvir-s-15o1dgp timvir-s-idmeni timvir-s-1717udv timvir-s-1etwjqo timvir-s-mkeg23 timvir-s-1y0btm7 timvir-s-j7gikm timvir-s-1d0dlzq"
226
+ };
227
+ const captionStyleProps = {
228
+ className: "timvir-s-1dcheo9 timvir-s-jkpybl timvir-s-vgvpxu timvir-s-lwy1ot"
229
+ };
230
+ return /*#__PURE__*/jsxs(Root, {
95
231
  ref: ref,
96
- className: cx_default("timvir-b-Code", !state.settled && "timvir-unsettled", classes.root, fullWidth && Page.fullWidth),
97
- ...rest
98
- }, /*#__PURE__*/React.createElement("div", {
99
- className: cx_default("timvir-b-Code-container", className, theme, classes.code, fullWidth && classes.fullWidth)
100
- }, /*#__PURE__*/React.createElement("div", {
101
- className: "d1513p2s",
102
- onMouseEnter: () => {
103
- setState(state => ({
104
- ...state,
105
- mouseOver: true
106
- }));
232
+ ...rest,
233
+ ...rootStyleProps,
234
+ className: cx("timvir-b-Code", !state.settled && "timvir-unsettled", className, rootStyleProps.className),
235
+ style: {
236
+ ...rootStyleProps.style,
237
+ ...rest.style
107
238
  },
108
- onMouseLeave: () => {
109
- setState(state => ({
110
- ...state,
111
- mouseOver: false,
112
- copiedToClipboard: false
113
- }));
114
- }
115
- }, /*#__PURE__*/React.createElement("button", {
116
- onClick: () => {
117
- navigator.clipboard.writeText(children);
118
- setState(state => ({
119
- ...state,
120
- copiedToClipboard: true
121
- }));
122
- },
123
- className: cx_default("b157mkz", state.mouseOver && "b10oxtfo")
124
- }, /*#__PURE__*/React.createElement("svg", {
125
- width: 48,
126
- height: 48,
127
- viewBox: "0 0 48 48",
128
- className: "s1hdfi6o"
129
- }, /*#__PURE__*/React.createElement("path", {
130
- d: "M0 0 H48 V48 Z"
131
- })), state.copiedToClipboard ? /*#__PURE__*/React.createElement(Icons.Clipboard, {
132
- size: "16px"
133
- }) : /*#__PURE__*/React.createElement(Icons.Copy, {
134
- size: "16px"
135
- })), /*#__PURE__*/React.createElement("div", {
136
- className: cx_default(fullWidth ? "d17pltln" : "d793q8f"),
137
- dangerouslySetInnerHTML: {
138
- __html: state.html
139
- }
140
- }))), caption && /*#__PURE__*/React.createElement("div", {
141
- className: cx_default("timvir-b-Code-caption", classes.caption)
142
- }, caption));
239
+ children: [/*#__PURE__*/jsx("div", {
240
+ ...codeStyleProps,
241
+ className: cx("timvir-b-Code-container", codeStyleProps.className),
242
+ dangerouslySetInnerHTML: {
243
+ __html: state.html
244
+ }
245
+ }), caption && /*#__PURE__*/jsx("div", {
246
+ ...captionStyleProps,
247
+ className: cx("timvir-b-Code-caption", captionStyleProps.className),
248
+ children: caption
249
+ })]
250
+ });
143
251
  }
144
252
  var Code$1 = /*#__PURE__*/React.forwardRef(Code);
145
- const classes = {
146
- root: "r9v2r0l",
147
- code: "cs7tint",
148
- fullWidth: "fjvaz2s",
149
- highlightedLine: "h1xcko1i",
150
- caption: "c5vr6r2"
151
- };
152
253
 
153
254
  export { Code$1 as Code };
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
2
  import { Code } from "..";
3
3
  type Props = Partial<React.ComponentPropsWithoutRef<typeof Code>>;
4
- export default function Sample(props: Props): React.JSX.Element;
4
+ export default function Sample(props: Props): import("react/jsx-runtime").JSX.Element;
5
5
  export {};
@@ -1,2 +1 @@
1
- import * as React from "react";
2
- export default function Sample({ language, children }: any): React.JSX.Element;
1
+ export default function Sample({ language, children }: any): import("react/jsx-runtime").JSX.Element;
@@ -1,16 +1,101 @@
1
- .tac6gx6{color:#393a34;background-color:#f6f8fa;}.tac6gx6 :is(.comment, .prolog, .doctype, .cdata){color:#999988;font-style:italic;}.tac6gx6 :is(.namespace){opacity:0.7;}.tac6gx6 :is(.string, .attr-value){color:#e3116c;}.tac6gx6 :is(.punctuation, .operator){color:#6cb6ff;}.tac6gx6 :is(.function, .delete, .tag){color:#d73a49;}.tac6gx6 :is(.tag, .selector, .keyword){color:#00009f;}.tac6gx6 :is(.function-variable){color:#6f42c1;}.tac6gx6 :is(.atrule, .keyword, .attr-name, .selector){color:#00a4db;}.tac6gx6 :is(.entity, .url, .symbol, .number, .boolean, .variable, .constant, .property, .regex, .inserted){color:#36acaa;}:root[data-timvir-theme="dark"] {color:#adbac7;background-color:#2d333b;}:root[data-timvir-theme="dark"] {color:#999988;font-style:italic;}:root[data-timvir-theme="dark"] {opacity:0.7;}:root[data-timvir-theme="dark"] {color:#96d0ff;}:root[data-timvir-theme="dark"] {color:#6cb6ff;}:root[data-timvir-theme="dark"] {color:#d73a49;}:root[data-timvir-theme="dark"] {color:#8ddb8c;}:root[data-timvir-theme="dark"] {color:#6f42c1;}:root[data-timvir-theme="dark"] {color:#f47067;}:root[data-timvir-theme="dark"] {color:#dcbdfb;}
2
-
3
- .d1513p2s{display:-ms-grid;display:grid;-ms-grid-columns:1fr;grid-template-columns:1fr;}
4
- .b157mkz{--size:48px;z-index:1;position:absolute;top:0;right:0;overflow:hidden;width:var(--size);height:var(--size);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;-webkit-box-pack:end;-ms-flex-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;outline:none;border:none;padding:6px;background:transparent;-webkit-transition:all 0.2s;transition:all 0.2s;cursor:pointer;pointer-events:none;opacity:0;}.b157mkz:hover{color:white;}.b157mkz:hover svg:first-child{-webkit-transform:translate(0, 0);-moz-transform:translate(0, 0);-ms-transform:translate(0, 0);transform:translate(0, 0);}.b157mkz:active svg:first-child{-webkit-transform:translate(2px, -2px);-moz-transform:translate(2px, -2px);-ms-transform:translate(2px, -2px);transform:translate(2px, -2px);}
5
- .b10oxtfo{pointer-events:all;opacity:1;}
6
- .s1hdfi6o{position:absolute;z-index:-1;top:0;right:0;-webkit-transition:all 0.2s;transition:all 0.2s;-webkit-transform:translate(48px, -48px);-moz-transform:translate(48px, -48px);-ms-transform:translate(48px, -48px);transform:translate(48px, -48px);}.s1hdfi6o path{fill:var(--c-p-4);}
7
- .d17pltln{padding:16px 24px 16px 0;}
8
-
9
- :root[data-timvir-theme="dark"] ,:root[data-timvir-theme="dark"] {color:var(--shiki-dark)!important;font-style:var(--shiki-dark-font-style)!important;font-weight:var(--shiki-dark-font-weight)!important;-webkit-text-decoration:var(--shiki-dark-text-decoration)!important;text-decoration:var(--shiki-dark-text-decoration)!important;}
10
- .cs7tint{overflow-x:auto;contain:content;font-size:0.8em;border-radius:5px;--timvir-b-Code-bleed:calc(var(--timvir-margin, 0px) * 0.6666);--timvir-b-Code-inlinePadding:max(var(--timvir-b-Code-bleed), 8px);padding:0;margin:0 calc(-1 * var(--timvir-b-Code-bleed));border:1px solid var(--timvir-border-color);}.cs7tint pre{margin:0;padding:16px 0;background-color:var(--timvir-secondary-background-color)!important;}.cs7tint pre code{display:block;}.cs7tint pre code .line{display:inline-block;position:relative;width:100%;}.cs7tint pre .line{padding-inline:var(--timvir-b-Code-inlinePadding);}
11
- .fjvaz2s{display:-ms-grid;display:grid;border-radius:0;box-shadow:none;margin-inline:0;-ms-grid-auto-rows:min-content;grid-auto-rows:min-content;-ms-grid-columns:[le] 0 [lc] 1fr [rc] 0 [re];grid-template-columns:[le] 0 [lc] 1fr [rc] 0 [re];-ms-grid-column-gap:16px;grid-column-gap:16px;}.fjvaz2s:hover{box-shadow:none;}@media (min-width: 60rem){.fjvaz2s{-ms-grid-columns:[le] 1fr [lc] minmax(0, 48rem) [rc] 1fr [re];grid-template-columns:[le] 1fr [lc] minmax(0, 48rem) [rc] 1fr [re];-ms-grid-column-gap:24px;grid-column-gap:24px;}}.fjvaz2s>*{grid-column:lc/re;}
12
- .lchll0h{padding-inline:var(--timvir-b-Code-inlinePadding);}
13
- .h1xcko1i{background-color:#ffe10044;}:root[data-timvir-theme="dark"] {background-color:rgba(174, 124, 20, 0.15);}
14
- .ll2b9hx{display:inline-block;width:var(--timvir-b-Code-bleed);color:var(--timvir-secondary-text-color);text-align:right;padding-inline:4px;}
15
- .c5vr6r2{font-size:0.8125rem;line-height:1.1875;color:var(--timvir-secondary-text-color);margin-top:0.3em;}
1
+ @layer priority1 {
2
+ .timvir-s-15o1dgp {
3
+ --timvir-b-Code-bleed: calc(var(--timvir-margin, 0) * .6666);
4
+ }
16
5
 
6
+ .timvir-s-idmeni {
7
+ --timvir-b-Code-inlinePadding: max(var(--timvir-b-Code-bleed), 8px);
8
+ }
9
+ }
10
+
11
+ @layer priority2 {
12
+ .timvir-s-1etwjqo {
13
+ margin: 0 calc(-1 * var(--timvir-b-Code-bleed));
14
+ }
15
+
16
+ .timvir-s-1ghz6dp {
17
+ margin: 0;
18
+ }
19
+
20
+ .timvir-s-1717udv {
21
+ padding: 0;
22
+ }
23
+
24
+ .timvir-s-1g8o3q3 {
25
+ padding: 16px 0;
26
+ }
27
+ }
28
+
29
+ @layer priority3 {
30
+ .timvir-s-j7gikm {
31
+ border-color: var(--timvir-border-color);
32
+ }
33
+
34
+ .timvir-s-1sxf85j {
35
+ border-radius: 5px;
36
+ }
37
+
38
+ .timvir-s-1y0btm7 {
39
+ border-style: solid;
40
+ }
41
+
42
+ .timvir-s-mkeg23 {
43
+ border-width: 1px;
44
+ }
45
+
46
+ .timvir-s-e193im {
47
+ padding-inline: var(--timvir-b-Code-inlinePadding);
48
+ }
49
+ }
50
+
51
+ @layer priority4 {
52
+ .timvir-s-15fpjw5 {
53
+ background-color: var(--timvir-highlight-background-color);
54
+ }
55
+
56
+ .timvir-s-1d0dlzq {
57
+ background-color: var(--timvir-secondary-background-color);
58
+ }
59
+
60
+ .timvir-s-vgvpxu {
61
+ color: var(--timvir-secondary-text-color);
62
+ }
63
+
64
+ .timvir-s-6wvzqs {
65
+ contain: content;
66
+ }
67
+
68
+ .timvir-s-1lliihq {
69
+ display: block;
70
+ }
71
+
72
+ .timvir-s-1rg5ohu {
73
+ display: inline-block;
74
+ }
75
+
76
+ .timvir-s-1dcheo9 {
77
+ font-size: .8125rem;
78
+ }
79
+
80
+ .timvir-s-sfzzmd {
81
+ font-size: .8em;
82
+ }
83
+
84
+ .timvir-s-jkpybl {
85
+ line-height: 1.1875;
86
+ }
87
+ }
88
+
89
+ @layer priority5 {
90
+ .timvir-s-lwy1ot {
91
+ margin-top: .3em;
92
+ }
93
+
94
+ .timvir-s-w2csxc {
95
+ overflow-x: auto;
96
+ }
97
+
98
+ .timvir-s-h8yej3 {
99
+ width: 100%;
100
+ }
101
+ }
@@ -19,14 +19,15 @@ A `ColorBar` is a horizontal arrangement of swatches.
19
19
  "#6550B0",
20
20
  "#5642A6",
21
21
  ]}
22
+ style={{ margin: 0 }}
22
23
  />
23
24
  </Exhibit>
24
25
 
25
26
  <Exhibit>
26
- <ColorBar values={["#a0dbc2", "#60c19f", "#1a896b", "#0e6d54"]} />
27
+ <ColorBar values={["#a0dbc2", "#60c19f", "#1a896b", "#0e6d54"]} style={{ margin: 0 }} />
27
28
  </Exhibit>
28
29
 
29
- <Code language="jsx" caption="Pass an array of color values to the component." highlightedLines={[5]}>
30
+ <Code language="jsx" caption="Pass an array of color values to the component." highlightedLines={[4]}>
30
31
  <Sample variant="basic" as="source" />
31
32
  </Code>
32
33
 
@@ -38,6 +39,7 @@ The ColorBar works comfortably with as few as two colors and as many as 20
38
39
  { value: "#FFE4A0", name: "Yellow Submarine", ancestry: "Yellow 001" },
39
40
  { value: "#A67908", name: "Yellow Spaceship", ancestry: "Yellow 999", contrastValue: "white" },
40
41
  ]}
42
+ style={{ margin: 0 }}
41
43
  />
42
44
  </Exhibit>
43
45
 
@@ -65,6 +67,7 @@ The ColorBar works comfortably with as few as two colors and as many as 20
65
67
  "#AB7E15",
66
68
  "#A67908",
67
69
  ]}
70
+ style={{ margin: 0 }}
68
71
  />
69
72
  </Exhibit>
70
73
 
@@ -83,6 +86,7 @@ All text colors are taken from the **Gray** palette.
83
86
  { value: "rgba(0, 0, 13, 0.69)", name: "???? (unnamed)", ancestry: "Gray 03", contrastValue: "white" },
84
87
  { value: "rgba(0, 0, 13, 0.49)", name: "textSecondary", ancestry: "Gray 05" },
85
88
  ]}
89
+ style={{ margin: 0 }}
86
90
  />
87
91
  </Exhibit>
88
92
  <Exhibit caption="Gray Color Palette (00 – 09)" style={{ margin: "-12px 0 20px 0" }}>
@@ -99,6 +103,7 @@ All text colors are taken from the **Gray** palette.
99
103
  { value: "rgba(0, 0, 13, 0.19)", name: "Gray 08", contrastValue: "black" },
100
104
  { value: "rgba(0, 0, 13, 0.09)", name: "Gray 09", contrastValue: "black" },
101
105
  ]}
106
+ style={{ margin: 0 }}
102
107
  />
103
108
  </Exhibit>
104
109
 
@@ -124,5 +129,6 @@ Wrap a `<ColorBar>` in a `<Exhibit>` to add a caption to it. The caption can eve
124
129
  "#0D6CA1",
125
130
  "#09486C",
126
131
  ]}
132
+ style={{ margin: 0 }}
127
133
  />
128
134
  </Exhibit>