@ttoss/ui 1.26.2 → 1.27.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/README.md +1 -1
- package/dist/esm/index.js +21 -30
- package/dist/index.d.ts +2 -2
- package/dist/index.js +21 -30
- package/package.json +7 -8
package/README.md
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -106,21 +106,20 @@ var ThemeProvider = ({
|
|
|
106
106
|
}
|
|
107
107
|
return merge(DefaultTheme, theme);
|
|
108
108
|
}, [theme]);
|
|
109
|
-
return /* @__PURE__ */ jsx(Fragment, {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
styles: css`
|
|
109
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(ThemeUiProvider, { theme: mergedTheme, children: [
|
|
110
|
+
fonts.map((url) => {
|
|
111
|
+
return /* @__PURE__ */ jsx(
|
|
112
|
+
Global,
|
|
113
|
+
{
|
|
114
|
+
styles: css`
|
|
116
115
|
@import url('${url}');
|
|
117
116
|
`
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
});
|
|
117
|
+
},
|
|
118
|
+
url
|
|
119
|
+
);
|
|
120
|
+
}),
|
|
121
|
+
children
|
|
122
|
+
] }) });
|
|
124
123
|
};
|
|
125
124
|
var ThemeProvider_default = ThemeProvider;
|
|
126
125
|
|
|
@@ -135,10 +134,13 @@ import { Box } from "theme-ui";
|
|
|
135
134
|
import { Button as ButtonUi } from "theme-ui";
|
|
136
135
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
137
136
|
var Button = (props) => {
|
|
138
|
-
return /* @__PURE__ */ jsx2(
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
137
|
+
return /* @__PURE__ */ jsx2(
|
|
138
|
+
ButtonUi,
|
|
139
|
+
{
|
|
140
|
+
...props,
|
|
141
|
+
sx: { cursor: "pointer", fontFamily: "body", ...props.sx }
|
|
142
|
+
}
|
|
143
|
+
);
|
|
142
144
|
};
|
|
143
145
|
|
|
144
146
|
// src/components/Card.tsx
|
|
@@ -189,14 +191,7 @@ import { Radio } from "theme-ui";
|
|
|
189
191
|
import { Icon as IconUI } from "@iconify/react";
|
|
190
192
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
191
193
|
var Icon = ({ icon, sx, iconProps, ...props }) => {
|
|
192
|
-
return /* @__PURE__ */ jsx3(Text, {
|
|
193
|
-
sx,
|
|
194
|
-
...props,
|
|
195
|
-
children: /* @__PURE__ */ jsx3(IconUI, {
|
|
196
|
-
...iconProps,
|
|
197
|
-
icon
|
|
198
|
-
})
|
|
199
|
-
});
|
|
194
|
+
return /* @__PURE__ */ jsx3(Text, { sx, ...props, children: /* @__PURE__ */ jsx3(IconUI, { ...iconProps, icon }) });
|
|
200
195
|
};
|
|
201
196
|
|
|
202
197
|
// src/components/Slider.tsx
|
|
@@ -232,11 +227,7 @@ var InfiniteLinearProgress = () => {
|
|
|
232
227
|
clearInterval(timer);
|
|
233
228
|
};
|
|
234
229
|
}, []);
|
|
235
|
-
return /* @__PURE__ */ jsx4(Progress, {
|
|
236
|
-
max: MAX_PROGRESS,
|
|
237
|
-
value: progress,
|
|
238
|
-
role: "progressbar"
|
|
239
|
-
});
|
|
230
|
+
return /* @__PURE__ */ jsx4(Progress, { max: MAX_PROGRESS, value: progress, role: "progressbar" });
|
|
240
231
|
};
|
|
241
232
|
export {
|
|
242
233
|
Box,
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { useBreakpointIndex, useResponsiveValue } from '@theme-ui/match-media';
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { IconProps as IconProps$1 } from '@iconify/react';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
type ThemeProviderProps = {
|
|
9
9
|
children?: React.ReactNode;
|
|
10
10
|
theme?: Theme;
|
|
11
11
|
/**
|
|
@@ -19,7 +19,7 @@ declare const useTheme: () => theme_ui.ThemeUIContextValue;
|
|
|
19
19
|
|
|
20
20
|
declare const Button: (props: ButtonProps) => JSX.Element;
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
type IconProps = TextProps & {
|
|
23
23
|
icon: IconProps$1['icon'];
|
|
24
24
|
iconProps?: Omit<IconProps$1, 'icon'>;
|
|
25
25
|
};
|
package/dist/index.js
CHANGED
|
@@ -160,21 +160,20 @@ var ThemeProvider = ({
|
|
|
160
160
|
}
|
|
161
161
|
return (0, import_theme_ui.merge)(DefaultTheme, theme);
|
|
162
162
|
}, [theme]);
|
|
163
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
styles: import_react.css`
|
|
163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_theme_ui.ThemeProvider, { theme: mergedTheme, children: [
|
|
164
|
+
fonts.map((url) => {
|
|
165
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
166
|
+
import_react.Global,
|
|
167
|
+
{
|
|
168
|
+
styles: import_react.css`
|
|
170
169
|
@import url('${url}');
|
|
171
170
|
`
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
});
|
|
171
|
+
},
|
|
172
|
+
url
|
|
173
|
+
);
|
|
174
|
+
}),
|
|
175
|
+
children
|
|
176
|
+
] }) });
|
|
178
177
|
};
|
|
179
178
|
var ThemeProvider_default = ThemeProvider;
|
|
180
179
|
|
|
@@ -189,10 +188,13 @@ var import_theme_ui3 = require("theme-ui");
|
|
|
189
188
|
var import_theme_ui4 = require("theme-ui");
|
|
190
189
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
191
190
|
var Button = (props) => {
|
|
192
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
192
|
+
import_theme_ui4.Button,
|
|
193
|
+
{
|
|
194
|
+
...props,
|
|
195
|
+
sx: { cursor: "pointer", fontFamily: "body", ...props.sx }
|
|
196
|
+
}
|
|
197
|
+
);
|
|
196
198
|
};
|
|
197
199
|
|
|
198
200
|
// src/components/Card.tsx
|
|
@@ -241,14 +243,7 @@ var import_theme_ui18 = require("theme-ui");
|
|
|
241
243
|
var import_react2 = require("@iconify/react");
|
|
242
244
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
243
245
|
var Icon = ({ icon, sx, iconProps, ...props }) => {
|
|
244
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_theme_ui15.Text, {
|
|
245
|
-
sx,
|
|
246
|
-
...props,
|
|
247
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react2.Icon, {
|
|
248
|
-
...iconProps,
|
|
249
|
-
icon
|
|
250
|
-
})
|
|
251
|
-
});
|
|
246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_theme_ui15.Text, { sx, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react2.Icon, { ...iconProps, icon }) });
|
|
252
247
|
};
|
|
253
248
|
|
|
254
249
|
// src/components/Slider.tsx
|
|
@@ -284,11 +279,7 @@ var InfiniteLinearProgress = () => {
|
|
|
284
279
|
clearInterval(timer);
|
|
285
280
|
};
|
|
286
281
|
}, []);
|
|
287
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_theme_ui14.Progress, {
|
|
288
|
-
max: MAX_PROGRESS,
|
|
289
|
-
value: progress,
|
|
290
|
-
role: "progressbar"
|
|
291
|
-
});
|
|
282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_theme_ui14.Progress, { max: MAX_PROGRESS, value: progress, role: "progressbar" });
|
|
292
283
|
};
|
|
293
284
|
// Annotate the CommonJS export names for ESM import in node:
|
|
294
285
|
0 && (module.exports = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.27.0",
|
|
4
4
|
"description": "Primitive layout, typographic, and other components for styling applications.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "ttoss",
|
|
@@ -20,19 +20,18 @@
|
|
|
20
20
|
},
|
|
21
21
|
"typings": "dist/index.d.ts",
|
|
22
22
|
"dependencies": {
|
|
23
|
+
"@emotion/react": "^11.10.5",
|
|
23
24
|
"@iconify/react": "^4.0.1",
|
|
24
25
|
"@theme-ui/match-media": "^0.15.4",
|
|
25
26
|
"theme-ui": "^0.15.4"
|
|
26
27
|
},
|
|
27
28
|
"peerDependencies": {
|
|
28
|
-
"
|
|
29
|
-
"react": ">=18.2.0"
|
|
29
|
+
"react": ">=16.8.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@
|
|
33
|
-
"@ttoss/
|
|
34
|
-
"@ttoss/
|
|
35
|
-
"@ttoss/theme": "^1.1.1",
|
|
32
|
+
"@ttoss/config": "^1.25.0",
|
|
33
|
+
"@ttoss/test-utils": "^1.18.3",
|
|
34
|
+
"@ttoss/theme": "^1.1.2",
|
|
36
35
|
"@types/jest": "^29.2.4",
|
|
37
36
|
"jest": "^29.3.1",
|
|
38
37
|
"tsup": "^6.5.0"
|
|
@@ -45,5 +44,5 @@
|
|
|
45
44
|
"publishConfig": {
|
|
46
45
|
"access": "public"
|
|
47
46
|
},
|
|
48
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "9159bd57009f4fee620218bc1a0e7bbac28acccd"
|
|
49
48
|
}
|