@ttoss/ui 1.26.3 → 1.27.1

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 CHANGED
@@ -5,7 +5,7 @@
5
5
  ## Installation
6
6
 
7
7
  ```shell
8
- yarn add @ttoss/ui @emotion/react
8
+ yarn add @ttoss/ui
9
9
  ```
10
10
 
11
11
  ## Quick start
package/dist/esm/index.js CHANGED
@@ -1,8 +1,5 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
2
 
3
- // tsup.inject.js
4
- import * as React from "react";
5
-
6
3
  // src/index.ts
7
4
  import { useResponsiveValue, useBreakpointIndex } from "@theme-ui/match-media";
8
5
 
@@ -106,21 +103,20 @@ var ThemeProvider = ({
106
103
  }
107
104
  return merge(DefaultTheme, theme);
108
105
  }, [theme]);
109
- return /* @__PURE__ */ jsx(Fragment, {
110
- children: /* @__PURE__ */ jsxs(ThemeUiProvider, {
111
- theme: mergedTheme,
112
- children: [
113
- fonts.map((url) => {
114
- return /* @__PURE__ */ jsx(Global, {
115
- styles: css`
106
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(ThemeUiProvider, { theme: mergedTheme, children: [
107
+ fonts.map((url) => {
108
+ return /* @__PURE__ */ jsx(
109
+ Global,
110
+ {
111
+ styles: css`
116
112
  @import url('${url}');
117
113
  `
118
- }, url);
119
- }),
120
- children
121
- ]
122
- })
123
- });
114
+ },
115
+ url
116
+ );
117
+ }),
118
+ children
119
+ ] }) });
124
120
  };
125
121
  var ThemeProvider_default = ThemeProvider;
126
122
 
@@ -135,10 +131,13 @@ import { Box } from "theme-ui";
135
131
  import { Button as ButtonUi } from "theme-ui";
136
132
  import { jsx as jsx2 } from "react/jsx-runtime";
137
133
  var Button = (props) => {
138
- return /* @__PURE__ */ jsx2(ButtonUi, {
139
- ...props,
140
- sx: { cursor: "pointer", fontFamily: "body", ...props.sx }
141
- });
134
+ return /* @__PURE__ */ jsx2(
135
+ ButtonUi,
136
+ {
137
+ ...props,
138
+ sx: { cursor: "pointer", fontFamily: "body", ...props.sx }
139
+ }
140
+ );
142
141
  };
143
142
 
144
143
  // src/components/Card.tsx
@@ -189,14 +188,7 @@ import { Radio } from "theme-ui";
189
188
  import { Icon as IconUI } from "@iconify/react";
190
189
  import { jsx as jsx3 } from "react/jsx-runtime";
191
190
  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
- });
191
+ return /* @__PURE__ */ jsx3(Text, { sx, ...props, children: /* @__PURE__ */ jsx3(IconUI, { ...iconProps, icon }) });
200
192
  };
201
193
 
202
194
  // src/components/Slider.tsx
@@ -232,11 +224,7 @@ var InfiniteLinearProgress = () => {
232
224
  clearInterval(timer);
233
225
  };
234
226
  }, []);
235
- return /* @__PURE__ */ jsx4(Progress, {
236
- max: MAX_PROGRESS,
237
- value: progress,
238
- role: "progressbar"
239
- });
227
+ return /* @__PURE__ */ jsx4(Progress, { max: MAX_PROGRESS, value: progress, role: "progressbar" });
240
228
  };
241
229
  export {
242
230
  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
- declare type ThemeProviderProps = {
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
- declare type IconProps = TextProps & {
22
+ type IconProps = TextProps & {
23
23
  icon: IconProps$1['icon'];
24
24
  iconProps?: Omit<IconProps$1, 'icon'>;
25
25
  };
package/dist/index.js CHANGED
@@ -53,11 +53,6 @@ __export(src_exports, {
53
53
  useTheme: () => useTheme
54
54
  });
55
55
  module.exports = __toCommonJS(src_exports);
56
-
57
- // tsup.inject.js
58
- var React = __toESM(require("react"));
59
-
60
- // src/index.ts
61
56
  var import_match_media = require("@theme-ui/match-media");
62
57
 
63
58
  // src/theme/ThemeProvider.tsx
@@ -160,21 +155,20 @@ var ThemeProvider = ({
160
155
  }
161
156
  return (0, import_theme_ui.merge)(DefaultTheme, theme);
162
157
  }, [theme]);
163
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
164
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_theme_ui.ThemeProvider, {
165
- theme: mergedTheme,
166
- children: [
167
- fonts.map((url) => {
168
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Global, {
169
- styles: import_react.css`
158
+ 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: [
159
+ fonts.map((url) => {
160
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
161
+ import_react.Global,
162
+ {
163
+ styles: import_react.css`
170
164
  @import url('${url}');
171
165
  `
172
- }, url);
173
- }),
174
- children
175
- ]
176
- })
177
- });
166
+ },
167
+ url
168
+ );
169
+ }),
170
+ children
171
+ ] }) });
178
172
  };
179
173
  var ThemeProvider_default = ThemeProvider;
180
174
 
@@ -189,10 +183,13 @@ var import_theme_ui3 = require("theme-ui");
189
183
  var import_theme_ui4 = require("theme-ui");
190
184
  var import_jsx_runtime2 = require("react/jsx-runtime");
191
185
  var Button = (props) => {
192
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_theme_ui4.Button, {
193
- ...props,
194
- sx: { cursor: "pointer", fontFamily: "body", ...props.sx }
195
- });
186
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
187
+ import_theme_ui4.Button,
188
+ {
189
+ ...props,
190
+ sx: { cursor: "pointer", fontFamily: "body", ...props.sx }
191
+ }
192
+ );
196
193
  };
197
194
 
198
195
  // src/components/Card.tsx
@@ -241,14 +238,7 @@ var import_theme_ui18 = require("theme-ui");
241
238
  var import_react2 = require("@iconify/react");
242
239
  var import_jsx_runtime3 = require("react/jsx-runtime");
243
240
  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
- });
241
+ 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
242
  };
253
243
 
254
244
  // src/components/Slider.tsx
@@ -284,11 +274,7 @@ var InfiniteLinearProgress = () => {
284
274
  clearInterval(timer);
285
275
  };
286
276
  }, []);
287
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_theme_ui14.Progress, {
288
- max: MAX_PROGRESS,
289
- value: progress,
290
- role: "progressbar"
291
- });
277
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_theme_ui14.Progress, { max: MAX_PROGRESS, value: progress, role: "progressbar" });
292
278
  };
293
279
  // Annotate the CommonJS export names for ESM import in node:
294
280
  0 && (module.exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/ui",
3
- "version": "1.26.3",
3
+ "version": "1.27.1",
4
4
  "description": "Primitive layout, typographic, and other components for styling applications.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "ttoss",
@@ -18,18 +18,18 @@
18
18
  "dev": "yarn workspace @docs/storybook run dev",
19
19
  "test": "jest"
20
20
  },
21
+ "sideEffects": false,
21
22
  "typings": "dist/index.d.ts",
22
23
  "dependencies": {
24
+ "@emotion/react": "^11.10.5",
23
25
  "@iconify/react": "^4.0.1",
24
26
  "@theme-ui/match-media": "^0.15.4",
25
27
  "theme-ui": "^0.15.4"
26
28
  },
27
29
  "peerDependencies": {
28
- "@emotion/react": "^11",
29
- "react": ">=18.2.0"
30
+ "react": ">=16.8.0"
30
31
  },
31
32
  "devDependencies": {
32
- "@emotion/react": "^11.10.4",
33
33
  "@ttoss/config": "^1.25.0",
34
34
  "@ttoss/test-utils": "^1.18.3",
35
35
  "@ttoss/theme": "^1.1.2",
@@ -45,5 +45,5 @@
45
45
  "publishConfig": {
46
46
  "access": "public"
47
47
  },
48
- "gitHead": "88b98945c469cdfdece6b12ce41243403ad2c242"
48
+ "gitHead": "055a9b2d3f53f0d8f3bbaea24ac9e51f99d0ca57"
49
49
  }