timvir 0.2.38 → 0.2.39

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 (71) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/blocks/Arbitrary/index.js +46 -37
  3. package/blocks/Arbitrary/samples/basic.d.ts +1 -1
  4. package/blocks/Code/index.js +56 -48
  5. package/blocks/Code/samples/basic.d.ts +1 -1
  6. package/blocks/Code/samples/toggle.d.ts +1 -2
  7. package/blocks/Code/styles.css +3 -3
  8. package/blocks/ColorBar/index.js +33 -29
  9. package/blocks/ColorBar/samples/basic.d.ts +1 -2
  10. package/blocks/ColorBook/index.js +29 -26
  11. package/blocks/ColorBook/samples/basic.d.ts +1 -2
  12. package/blocks/Cover/index.js +18 -18
  13. package/blocks/Cover/samples/basic.d.ts +1 -2
  14. package/blocks/Exhibit/index.js +16 -12
  15. package/blocks/Exhibit/samples/basic.d.ts +1 -2
  16. package/blocks/Exhibit/samples/bleed.d.ts +1 -1
  17. package/blocks/Exhibit/samples/usage.d.ts +1 -2
  18. package/blocks/Exhibit/styles.css +1 -1
  19. package/blocks/Font/index.js +67 -56
  20. package/blocks/Font/samples/basic.d.ts +1 -1
  21. package/blocks/Font/samples/timvir/body1.d.ts +1 -1
  22. package/blocks/Font/samples/timvir/caption.d.ts +1 -1
  23. package/blocks/Font/samples/timvir/h1.d.ts +1 -1
  24. package/blocks/Font/samples/timvir/h2.d.ts +1 -1
  25. package/blocks/Font/samples/timvir/h3.d.ts +1 -1
  26. package/blocks/Font/samples/timvir/h4.d.ts +1 -1
  27. package/blocks/Grid/index.js +5 -3
  28. package/blocks/Grid/samples/basic.d.ts +1 -2
  29. package/blocks/Icon/index.js +72 -61
  30. package/blocks/Icon/internal/Canvas.d.ts +1 -1
  31. package/blocks/Icon/samples/basic.d.ts +1 -2
  32. package/blocks/Icon/types.d.ts +3 -2
  33. package/blocks/Message/index.js +21 -17
  34. package/blocks/Message/samples/basic.d.ts +1 -1
  35. package/blocks/Swatch/index.js +22 -13
  36. package/blocks/Swatch/samples/basic.d.ts +1 -2
  37. package/blocks/Viewport/index.js +206 -190
  38. package/blocks/Viewport/internal/Caption.d.ts +1 -1
  39. package/blocks/Viewport/internal/Handle.d.ts +1 -1
  40. package/blocks/Viewport/internal/Ruler.d.ts +1 -2
  41. package/blocks/Viewport/samples/basic.d.ts +1 -2
  42. package/blocks/WebLink/index.js +34 -23
  43. package/blocks/WebLink/samples/basic.d.ts +1 -1
  44. package/blocks/WebLink/styles.css +1 -1
  45. package/blocks/styles.css +5 -5
  46. package/builtins/index.d.ts +1 -0
  47. package/builtins/index.js +37 -27
  48. package/builtins/styles.css +13 -0
  49. package/core/components/Commands/Commands.d.ts +1 -3
  50. package/core/components/Commands/internal/Action.d.ts +1 -1
  51. package/core/components/Commands/internal/Dialog.d.ts +1 -2
  52. package/core/components/Commands/internal/index.d.ts +0 -1
  53. package/core/components/Footer/samples/basic.d.ts +1 -1
  54. package/core/components/NavigationFooter/samples/basic.d.ts +1 -1
  55. package/core/components/Page/internal/Section.d.ts +1 -2
  56. package/core/components/Page/internal/Sidebar.d.ts +1 -1
  57. package/core/components/Page/internal/SidebarItem.d.ts +1 -2
  58. package/core/components/Page/internal/index.d.ts +0 -1
  59. package/core/components/Page/samples/basic.d.ts +1 -2
  60. package/core/components/Page/samples/layout.d.ts +1 -2
  61. package/core/index.js +363 -297
  62. package/core/layout.d.ts +0 -1
  63. package/core/theme/detector.js +1 -1
  64. package/knip.config.d.ts +5 -0
  65. package/package.json +1 -1
  66. package/search/Search/samples/basic.d.ts +1 -2
  67. package/search/SearchBoxInput/samples/basic.d.ts +1 -2
  68. package/search/SearchBoxListItem/samples/basic.d.ts +1 -2
  69. package/search/index.js +96 -81
  70. package/search/styles.css +3 -3
  71. package/styles.css +21 -8
@@ -2,6 +2,7 @@ import { useMDXComponents } from '@mdx-js/react';
2
2
  import * as builtins from 'timvir/builtins';
3
3
  import * as React from 'react';
4
4
  import * as Icons from 'react-feather';
5
+ import { jsxs, jsx } from 'react/jsx-runtime';
5
6
 
6
7
  // src/css.ts
7
8
 
@@ -60,8 +61,8 @@ function Font(props, ref) {
60
61
  const computedStyle = window.getComputedStyle(contentRef);
61
62
  const intervalId = setInterval(() => {
62
63
  if (fontSizeRef) {
63
- const fontSize = parseInt(computedStyle.fontSize, 10);
64
- const lineHeight = parseInt(computedStyle.lineHeight, 10);
64
+ const fontSize = Number.parseInt(computedStyle.fontSize, 10);
65
+ const lineHeight = Number.parseInt(computedStyle.lineHeight, 10);
65
66
  const innerText = `${name} – ${Math.round(fontSize)}px / ${Math.round(lineHeight / fontSize * 1000) / 1000}`;
66
67
  if (fontSizeRef.innerText !== innerText) {
67
68
  fontSizeRef.innerText = innerText;
@@ -72,64 +73,74 @@ function Font(props, ref) {
72
73
  clearInterval(intervalId);
73
74
  };
74
75
  }
75
- }, [name, contentRef]);
76
- return /*#__PURE__*/React.createElement(Root, {
76
+ }, [name, contentRef, fontSizeRef]);
77
+ return /*#__PURE__*/jsxs(Root, {
77
78
  ref: ref,
78
79
  className: cx_default(className),
79
- ...rest
80
- }, /*#__PURE__*/React.createElement("div", {
81
- className: classes.meta
82
- }, /*#__PURE__*/React.createElement(components.h3, {
83
- className: "fc7ivp5"
84
- }, /*#__PURE__*/React.createElement("span", {
85
- ref: setFontSizeRef
86
- }, name)), info && /*#__PURE__*/React.createElement("div", {
87
- className: "de58upx",
88
- onClick: () => {
89
- if (infoRef && contentRef) {
90
- // const contentParent = contentRef.parentElement;
91
- const infoParent = infoRef.parentElement;
92
- if (infoParent.style.height === "0px") {
93
- infoParent.style.height = `${infoRef.getBoundingClientRect().height}px`;
94
- infoParent.style.opacity = "1";
80
+ ...rest,
81
+ children: [/*#__PURE__*/jsxs("div", {
82
+ className: classes.meta,
83
+ children: [/*#__PURE__*/jsx(components.h3, {
84
+ className: "fc7ivp5",
85
+ children: /*#__PURE__*/jsx("span", {
86
+ ref: setFontSizeRef,
87
+ children: name
88
+ })
89
+ }), info && /*#__PURE__*/jsx("div", {
90
+ className: "de58upx",
91
+ onClick: () => {
92
+ if (infoRef && contentRef) {
93
+ // const contentParent = contentRef.parentElement;
94
+ const infoParent = infoRef.parentElement;
95
+ if (infoParent.style.height === "0px") {
96
+ infoParent.style.height = `${infoRef.getBoundingClientRect().height}px`;
97
+ infoParent.style.opacity = "1";
95
98
 
96
- // contentParent.style.height = "0px";
97
- // contentParent.style.opacity = "0";
98
- } else {
99
- infoParent.style.height = "0px";
100
- infoParent.style.opacity = "0";
99
+ // contentParent.style.height = "0px";
100
+ // contentParent.style.opacity = "0";
101
+ } else {
102
+ infoParent.style.height = "0px";
103
+ infoParent.style.opacity = "0";
101
104
 
102
- // contentParent.style.height = window.getComputedStyle(contentRef).height;
103
- // contentParent.style.opacity = "1";
104
- }
105
- }
106
- }
107
- }, /*#__PURE__*/React.createElement(Icons.Info, {
108
- size: "1.1em"
109
- }))), /*#__PURE__*/React.createElement("div", {
110
- className: "d10949ho"
111
- }, info && /*#__PURE__*/React.createElement("div", {
112
- className: "d1o2du3z",
113
- style: {
114
- height: 0,
115
- opacity: 0
116
- }
117
- }, /*#__PURE__*/React.createElement("div", {
118
- ref: setInfoRef,
119
- className: "d1o9zhgl"
120
- }, info)), /*#__PURE__*/React.createElement("div", {
121
- className: "ddlplux",
122
- style: {
123
- height: "auto",
124
- opacity: 1
125
- }
126
- }, /*#__PURE__*/React.createElement("div", {
127
- ref: setContentRef,
128
- contentEditable: true,
129
- spellCheck: "false",
130
- className: cx_default(font.className, "dw285p4"),
131
- style: font.style
132
- }, children || "The quick brown fox jumps over the lazy dog"))));
105
+ // contentParent.style.height = window.getComputedStyle(contentRef).height;
106
+ // contentParent.style.opacity = "1";
107
+ }
108
+ }
109
+ },
110
+ children: /*#__PURE__*/jsx(Icons.Info, {
111
+ size: "1.1em"
112
+ })
113
+ })]
114
+ }), /*#__PURE__*/jsxs("div", {
115
+ className: "d10949ho",
116
+ children: [info && /*#__PURE__*/jsx("div", {
117
+ className: "d1o2du3z",
118
+ style: {
119
+ height: 0,
120
+ opacity: 0
121
+ },
122
+ children: /*#__PURE__*/jsx("div", {
123
+ ref: setInfoRef,
124
+ className: "d1o9zhgl",
125
+ children: info
126
+ })
127
+ }), /*#__PURE__*/jsx("div", {
128
+ className: "ddlplux",
129
+ style: {
130
+ height: "auto",
131
+ opacity: 1
132
+ },
133
+ children: /*#__PURE__*/jsx("div", {
134
+ ref: setContentRef,
135
+ contentEditable: true,
136
+ spellCheck: "false",
137
+ className: cx_default(font.className, "dw285p4"),
138
+ style: font.style,
139
+ children: children || "The quick brown fox jumps over the lazy dog"
140
+ })
141
+ })]
142
+ })]
143
+ });
133
144
  }
134
145
  var Font$1 = /*#__PURE__*/React.forwardRef(Font);
135
146
 
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
2
  import { Font } from "..";
3
3
  type Props = Partial<React.ComponentPropsWithoutRef<typeof Font>>;
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,5 +1,5 @@
1
1
  import * as React from "react";
2
2
  import { Font } from "../..";
3
3
  type Props = Partial<React.ComponentPropsWithoutRef<typeof Font>>;
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,5 +1,5 @@
1
1
  import * as React from "react";
2
2
  import { Font } from "../..";
3
3
  type Props = Partial<React.ComponentPropsWithoutRef<typeof Font>>;
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,5 +1,5 @@
1
1
  import * as React from "react";
2
2
  import { Font } from "../..";
3
3
  type Props = Partial<React.ComponentPropsWithoutRef<typeof Font>>;
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,5 +1,5 @@
1
1
  import * as React from "react";
2
2
  import { Font } from "../..";
3
3
  type Props = Partial<React.ComponentPropsWithoutRef<typeof Font>>;
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,5 +1,5 @@
1
1
  import * as React from "react";
2
2
  import { Font } from "../..";
3
3
  type Props = Partial<React.ComponentPropsWithoutRef<typeof Font>>;
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,5 +1,5 @@
1
1
  import * as React from "react";
2
2
  import { Font } from "../..";
3
3
  type Props = Partial<React.ComponentPropsWithoutRef<typeof Font>>;
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,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { jsx } from 'react/jsx-runtime';
2
3
 
3
4
  // src/css.ts
4
5
 
@@ -39,11 +40,12 @@ function Grid(props, ref) {
39
40
  className,
40
41
  ...rest
41
42
  } = props;
42
- return /*#__PURE__*/React.createElement(Root, {
43
+ return /*#__PURE__*/jsx(Root, {
43
44
  ref: ref,
44
45
  className: cx_default(className, classes.root),
45
- ...rest
46
- }, children);
46
+ ...rest,
47
+ children: children
48
+ });
47
49
  }
48
50
  var Grid$1 = /*#__PURE__*/React.forwardRef(Grid);
49
51
  const classes = {
@@ -1,2 +1 @@
1
- import * as React from "react";
2
- export default function Sample(): React.JSX.Element;
1
+ export default function Sample(): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import { useResizeObserverEntry } from 'timvir/hooks';
2
2
  import * as React from 'react';
3
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
4
 
4
5
  // src/css.ts
5
6
 
@@ -42,23 +43,25 @@ function Canvas(props) {
42
43
  size,
43
44
  Component
44
45
  } = props;
45
- return /*#__PURE__*/React.createElement(Root$1, {
46
+ return /*#__PURE__*/jsxs(Root$1, {
46
47
  className: "r1bcczis",
47
48
  style: {
48
49
  width,
49
50
  height
50
- }
51
- }, /*#__PURE__*/React.createElement("div", {
52
- className: classes$1.backdrop
53
- }), /*#__PURE__*/React.createElement(Grid, {
54
- className: classes$1.grid,
55
- size: size
56
- }), /*#__PURE__*/React.createElement("div", {
57
- style: {
58
- fontSize: `${size}px`,
59
- zIndex: 1
60
- }
61
- }, /*#__PURE__*/React.createElement(Component, null)));
51
+ },
52
+ children: [/*#__PURE__*/jsx("div", {
53
+ className: classes$1.backdrop
54
+ }), /*#__PURE__*/jsx(Grid, {
55
+ className: classes$1.grid,
56
+ size: size
57
+ }), /*#__PURE__*/jsx("div", {
58
+ style: {
59
+ fontSize: `${size}px`,
60
+ zIndex: 1
61
+ },
62
+ children: /*#__PURE__*/jsx(Component, {})
63
+ })]
64
+ });
62
65
  }
63
66
  function Grid({
64
67
  size,
@@ -70,47 +73,50 @@ function Grid({
70
73
  const Corner = ({
71
74
  dx,
72
75
  dy
73
- }) => /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("line", {
74
- x1: dx(center, halfSize),
75
- x2: dx(center, halfSize + whiskerLength),
76
- y1: dy(center, halfSize),
77
- y2: dy(center, halfSize),
78
- strokeWidth: 1,
79
- stroke: "#EEEEEE"
80
- }), /*#__PURE__*/React.createElement("line", {
81
- x1: dx(center, halfSize),
82
- x2: dx(center, halfSize),
83
- y1: dy(center, halfSize),
84
- y2: dy(center, halfSize + whiskerLength),
85
- strokeWidth: 1,
86
- stroke: "#EEEEEE"
87
- }));
76
+ }) => /*#__PURE__*/jsxs("g", {
77
+ children: [/*#__PURE__*/jsx("line", {
78
+ x1: dx(center, halfSize),
79
+ x2: dx(center, halfSize + whiskerLength),
80
+ y1: dy(center, halfSize),
81
+ y2: dy(center, halfSize),
82
+ strokeWidth: 1,
83
+ stroke: "#EEEEEE"
84
+ }), /*#__PURE__*/jsx("line", {
85
+ x1: dx(center, halfSize),
86
+ x2: dx(center, halfSize),
87
+ y1: dy(center, halfSize),
88
+ y2: dy(center, halfSize + whiskerLength),
89
+ strokeWidth: 1,
90
+ stroke: "#EEEEEE"
91
+ })]
92
+ });
88
93
  const add = (a, b) => a + b;
89
94
  const sub = (a, b) => a - b;
90
- return /*#__PURE__*/React.createElement("svg", {
95
+ return /*#__PURE__*/jsxs("svg", {
91
96
  width: "120",
92
97
  height: "120",
93
98
  viewBox: "0 0 120 120",
94
- ...rest
95
- }, /*#__PURE__*/React.createElement("rect", {
96
- x: center - halfSize,
97
- y: center - halfSize,
98
- width: size,
99
- height: size,
100
- fill: "#FFBBFF88"
101
- }), /*#__PURE__*/React.createElement(Corner, {
102
- dx: sub,
103
- dy: sub
104
- }), /*#__PURE__*/React.createElement(Corner, {
105
- dx: add,
106
- dy: sub
107
- }), /*#__PURE__*/React.createElement(Corner, {
108
- dx: add,
109
- dy: add
110
- }), /*#__PURE__*/React.createElement(Corner, {
111
- dx: sub,
112
- dy: add
113
- }));
99
+ ...rest,
100
+ children: [/*#__PURE__*/jsx("rect", {
101
+ x: center - halfSize,
102
+ y: center - halfSize,
103
+ width: size,
104
+ height: size,
105
+ fill: "#FFBBFF88"
106
+ }), /*#__PURE__*/jsx(Corner, {
107
+ dx: sub,
108
+ dy: sub
109
+ }), /*#__PURE__*/jsx(Corner, {
110
+ dx: add,
111
+ dy: sub
112
+ }), /*#__PURE__*/jsx(Corner, {
113
+ dx: add,
114
+ dy: add
115
+ }), /*#__PURE__*/jsx(Corner, {
116
+ dx: sub,
117
+ dy: add
118
+ })]
119
+ });
114
120
  }
115
121
 
116
122
  /**
@@ -128,20 +134,25 @@ function Icon(props, ref) {
128
134
  } = props;
129
135
  const [roRef, roe] = useResizeObserverEntry();
130
136
  const width = roe?.contentRect.width;
131
- return /*#__PURE__*/React.createElement(Root, {
137
+ return /*#__PURE__*/jsx(Root, {
132
138
  ref: ref,
133
139
  className: cx_default(className, "r1k0w618"),
134
- ...rest
135
- }, /*#__PURE__*/React.createElement("div", {
136
- ref: roRef
137
- }, width !== undefined && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Canvas, {
138
- width: width,
139
- height: width,
140
- size: 32 /*descriptor.instances[0].size as number */,
141
- Component: descriptor.instances[0].Component
142
- }), /*#__PURE__*/React.createElement("div", {
143
- className: classes.name
144
- }, descriptor.name))));
140
+ ...rest,
141
+ children: /*#__PURE__*/jsx("div", {
142
+ ref: roRef,
143
+ children: width !== undefined && /*#__PURE__*/jsxs(Fragment, {
144
+ children: [/*#__PURE__*/jsx(Canvas, {
145
+ width: width,
146
+ height: width,
147
+ size: 32 /*descriptor.instances[0].size as number */,
148
+ Component: descriptor.instances[0].Component
149
+ }), /*#__PURE__*/jsx("div", {
150
+ className: classes.name,
151
+ children: descriptor.name
152
+ })]
153
+ })
154
+ })
155
+ });
145
156
  }
146
157
  var Icon$1 = /*#__PURE__*/React.forwardRef(Icon);
147
158
 
@@ -5,5 +5,5 @@ interface Props {
5
5
  size: number;
6
6
  Component: React.ElementType;
7
7
  }
8
- declare function Canvas(props: Props): React.JSX.Element;
8
+ declare function Canvas(props: Props): import("react/jsx-runtime").JSX.Element;
9
9
  export default Canvas;
@@ -1,2 +1 @@
1
- import * as React from "react";
2
- export default function Sample(): React.JSX.Element;
1
+ export default function Sample(): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
- export type Size = "responsive" | number;
2
- export interface Instance {
1
+ type Size = "responsive" | number;
2
+ interface Instance {
3
3
  size: Size;
4
4
  Component: React.ElementType;
5
5
  }
@@ -7,3 +7,4 @@ export interface Descriptor {
7
7
  name: string;
8
8
  instances: Instance[];
9
9
  }
10
+ export {};
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import * as Icons from 'react-feather';
3
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
4
 
4
5
  // src/css.ts
5
6
 
@@ -41,25 +42,28 @@ function Message(props, ref) {
41
42
  children,
42
43
  ...rest
43
44
  } = props;
44
- return /*#__PURE__*/React.createElement(Root, {
45
+ return /*#__PURE__*/jsxs(Root, {
45
46
  ref: ref,
46
47
  className: cx_default(className, "r1ssql2z", variant !== undefined && variantStyles[variant]),
47
- ...rest
48
- }, variant && /*#__PURE__*/React.createElement("div", {
49
- className: icon
50
- }, {
51
- info: /*#__PURE__*/React.createElement(Icons.ChevronsRight, {
52
- size: "1.5em"
53
- }),
54
- warning: /*#__PURE__*/React.createElement(Icons.AlertCircle, {
55
- size: "1.5em"
56
- }),
57
- alert: /*#__PURE__*/React.createElement(Icons.XOctagon, {
58
- size: "1.5em"
59
- })
60
- }[variant]), /*#__PURE__*/React.createElement("div", {
61
- className: "dhvu07f"
62
- }, children));
48
+ ...rest,
49
+ children: [variant && /*#__PURE__*/jsx("div", {
50
+ className: icon,
51
+ children: {
52
+ info: /*#__PURE__*/jsx(Icons.ChevronsRight, {
53
+ size: "1.5em"
54
+ }),
55
+ warning: /*#__PURE__*/jsx(Icons.AlertCircle, {
56
+ size: "1.5em"
57
+ }),
58
+ alert: /*#__PURE__*/jsx(Icons.XOctagon, {
59
+ size: "1.5em"
60
+ })
61
+ }[variant]
62
+ }), /*#__PURE__*/jsx("div", {
63
+ className: "dhvu07f",
64
+ children: children
65
+ })]
66
+ });
63
67
  }
64
68
  var Message$1 = /*#__PURE__*/React.forwardRef(Message);
65
69
  const icon = "i1dz18jz";
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
2
  import { Message } from "..";
3
3
  type Props = Partial<React.ComponentPropsWithoutRef<typeof Message>>;
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,6 +1,7 @@
1
1
  'use client';
2
2
  import { useBlock } from 'timvir/core';
3
3
  import * as React from 'react';
4
+ import { jsx, jsxs } from 'react/jsx-runtime';
4
5
 
5
6
  // src/css.ts
6
7
 
@@ -51,7 +52,7 @@ function Swatch(props, ref) {
51
52
  React.useEffect(() => {
52
53
  setLabel(name);
53
54
  }, [name]);
54
- return /*#__PURE__*/React.createElement(Root, {
55
+ return /*#__PURE__*/jsx(Root, {
55
56
  role: "button",
56
57
  ref: ref,
57
58
  ...rest,
@@ -67,18 +68,26 @@ function Swatch(props, ref) {
67
68
  onMouseLeave: ev => {
68
69
  setLabel(name);
69
70
  onMouseLeave?.(ev);
70
- }
71
- }, /*#__PURE__*/React.createElement("div", {
72
- className: "dhgsgky",
73
- style: {
74
- background: value,
75
- color: contrastValue
76
- }
77
- }, /*#__PURE__*/React.createElement("div", {
78
- className: "dobecwk"
79
- }, label && /*#__PURE__*/React.createElement("div", null, label), label === name && /*#__PURE__*/React.createElement("div", null, value)), ancestry && /*#__PURE__*/React.createElement("div", {
80
- className: "dho7t08"
81
- }, ancestry)));
71
+ },
72
+ children: /*#__PURE__*/jsxs("div", {
73
+ className: "dhgsgky",
74
+ style: {
75
+ background: value,
76
+ color: contrastValue
77
+ },
78
+ children: [/*#__PURE__*/jsxs("div", {
79
+ className: "dobecwk",
80
+ children: [label && /*#__PURE__*/jsx("div", {
81
+ children: label
82
+ }), label === name && /*#__PURE__*/jsx("div", {
83
+ children: value
84
+ })]
85
+ }), ancestry && /*#__PURE__*/jsx("div", {
86
+ className: "dho7t08",
87
+ children: ancestry
88
+ })]
89
+ })
90
+ });
82
91
  }
83
92
  var Swatch$1 = /*#__PURE__*/React.forwardRef(Swatch);
84
93
 
@@ -1,2 +1 @@
1
- import * as React from "react";
2
- export default function Sample(): React.JSX.Element;
1
+ export default function Sample(): import("react/jsx-runtime").JSX.Element;