@ttoss/ui 2.0.4 → 3.1.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.js CHANGED
@@ -40,7 +40,7 @@ var src_exports = {};
40
40
  __export(src_exports, {
41
41
  ActionButton: () => ActionButton,
42
42
  Badge: () => Badge,
43
- BaseStyles: () => import_theme_ui28.BaseStyles,
43
+ BaseStyles: () => import_theme_ui27.BaseStyles,
44
44
  Box: () => import_theme_ui4.Box,
45
45
  Button: () => Button,
46
46
  Card: () => import_theme_ui6.Card,
@@ -49,11 +49,10 @@ __export(src_exports, {
49
49
  Container: () => Container,
50
50
  Divider: () => import_theme_ui7.Divider,
51
51
  Flex: () => import_theme_ui8.Flex,
52
- Global: () => import_theme_ui28.Global,
52
+ Global: () => import_theme_ui27.Global,
53
53
  Grid: () => import_theme_ui9.Grid,
54
54
  Heading: () => import_theme_ui10.Heading,
55
55
  HelpText: () => HelpText,
56
- Icon: () => Icon,
57
56
  IconButton: () => IconButton,
58
57
  Image: () => import_theme_ui11.Image,
59
58
  InfiniteLinearProgress: () => InfiniteLinearProgress,
@@ -63,7 +62,7 @@ __export(src_exports, {
63
62
  Label: () => Label,
64
63
  LinearProgress: () => import_theme_ui15.Progress,
65
64
  Link: () => Link,
66
- Paragraph: () => import_theme_ui27.Paragraph,
65
+ Paragraph: () => import_theme_ui26.Paragraph,
67
66
  Radio: () => import_theme_ui19.Radio,
68
67
  Select: () => Select,
69
68
  Slider: () => import_theme_ui21.Slider,
@@ -72,15 +71,15 @@ __export(src_exports, {
72
71
  Text: () => import_theme_ui16.Text,
73
72
  Textarea: () => Textarea,
74
73
  ThemeProvider: () => ThemeProvider,
75
- keyframes: () => import_react3.keyframes,
74
+ keyframes: () => import_react2.keyframes,
76
75
  useBreakpointIndex: () => import_match_media.useBreakpointIndex,
77
76
  useResponsiveValue: () => import_match_media.useResponsiveValue,
78
77
  useTheme: () => useTheme
79
78
  });
80
79
  module.exports = __toCommonJS(src_exports);
81
- var import_theme_ui28 = require("theme-ui");
80
+ var import_theme_ui27 = require("theme-ui");
82
81
  var import_match_media = require("@theme-ui/match-media");
83
- var import_react3 = require("@emotion/react");
82
+ var import_react2 = require("@emotion/react");
84
83
 
85
84
  // src/theme/ThemeProvider.tsx
86
85
  var import_Bruttal = require("@ttoss/theme/Bruttal");
@@ -112,29 +111,15 @@ var useTheme = import_theme_ui2.useThemeUI;
112
111
 
113
112
  // src/components/Badge.tsx
114
113
  var import_theme_ui3 = require("theme-ui");
115
-
116
- // src/components/Icon.tsx
117
- var React = __toESM(require("react"));
118
- var import_react2 = require("@iconify-icon/react");
114
+ var import_react_icons = require("@ttoss/react-icons");
119
115
  var import_jsx_runtime2 = require("react/jsx-runtime");
120
- var Icon = React.forwardRef((props, ref) => {
121
- return /* @__PURE__ */(0, import_jsx_runtime2.jsx)(import_react2.Icon, {
122
- ref,
123
- "data-testid": "iconify-icon",
124
- ...props
125
- });
126
- });
127
- Icon.displayName = "Icon";
128
-
129
- // src/components/Badge.tsx
130
- var import_jsx_runtime3 = require("react/jsx-runtime");
131
116
  var Badge = ({
132
117
  icon,
133
118
  children,
134
119
  sx,
135
120
  ...props
136
121
  }) => {
137
- return /* @__PURE__ */(0, import_jsx_runtime3.jsxs)(import_theme_ui3.Badge, {
122
+ return /* @__PURE__ */(0, import_jsx_runtime2.jsxs)(import_theme_ui3.Badge, {
138
123
  sx: {
139
124
  display: "flex",
140
125
  alignItems: "center",
@@ -149,7 +134,7 @@ var Badge = ({
149
134
  ...sx
150
135
  },
151
136
  ...props,
152
- children: [icon && /* @__PURE__ */(0, import_jsx_runtime3.jsx)(Icon, {
137
+ children: [icon && /* @__PURE__ */(0, import_jsx_runtime2.jsx)(import_react_icons.Icon, {
153
138
  inline: true,
154
139
  icon
155
140
  }), children]
@@ -160,10 +145,11 @@ var Badge = ({
160
145
  var import_theme_ui4 = require("theme-ui");
161
146
 
162
147
  // src/components/Button.tsx
163
- var React2 = __toESM(require("react"));
148
+ var React = __toESM(require("react"));
164
149
  var import_theme_ui5 = require("theme-ui");
165
- var import_jsx_runtime4 = require("react/jsx-runtime");
166
- var Button = React2.forwardRef((props, ref) => {
150
+ var import_react_icons2 = require("@ttoss/react-icons");
151
+ var import_jsx_runtime3 = require("react/jsx-runtime");
152
+ var Button = React.forwardRef((props, ref) => {
167
153
  const {
168
154
  children,
169
155
  leftIcon,
@@ -171,7 +157,7 @@ var Button = React2.forwardRef((props, ref) => {
171
157
  loading,
172
158
  ...restProps
173
159
  } = props;
174
- return /* @__PURE__ */(0, import_jsx_runtime4.jsxs)(import_theme_ui5.Button, {
160
+ return /* @__PURE__ */(0, import_jsx_runtime3.jsxs)(import_theme_ui5.Button, {
175
161
  type: "button",
176
162
  ...restProps,
177
163
  ref,
@@ -185,13 +171,13 @@ var Button = React2.forwardRef((props, ref) => {
185
171
  gap: "lg",
186
172
  ...restProps.sx
187
173
  },
188
- children: [loading && /* @__PURE__ */(0, import_jsx_runtime4.jsx)(Icon, {
174
+ children: [loading && /* @__PURE__ */(0, import_jsx_runtime3.jsx)(import_react_icons2.Icon, {
189
175
  inline: true,
190
176
  icon: "three-dots-loading"
191
- }), !loading && leftIcon && /* @__PURE__ */(0, import_jsx_runtime4.jsx)(Icon, {
177
+ }), !loading && leftIcon && /* @__PURE__ */(0, import_jsx_runtime3.jsx)(import_react_icons2.Icon, {
192
178
  inline: true,
193
179
  icon: leftIcon
194
- }), children, rightIcon && /* @__PURE__ */(0, import_jsx_runtime4.jsx)(Icon, {
180
+ }), children, rightIcon && /* @__PURE__ */(0, import_jsx_runtime3.jsx)(import_react_icons2.Icon, {
195
181
  inline: true,
196
182
  icon: rightIcon
197
183
  })]
@@ -218,10 +204,11 @@ var import_theme_ui10 = require("theme-ui");
218
204
  var import_theme_ui11 = require("theme-ui");
219
205
 
220
206
  // src/components/Input.tsx
221
- var React3 = __toESM(require("react"));
207
+ var React2 = __toESM(require("react"));
208
+ var import_react_icons3 = require("@ttoss/react-icons");
222
209
  var import_theme_ui12 = require("theme-ui");
223
- var import_jsx_runtime5 = require("react/jsx-runtime");
224
- var Input = React3.forwardRef(({
210
+ var import_jsx_runtime4 = require("react/jsx-runtime");
211
+ var Input = React2.forwardRef(({
225
212
  leadingIcon,
226
213
  trailingIcon: trailingIconProp,
227
214
  onLeadingIconClick,
@@ -231,7 +218,7 @@ var Input = React3.forwardRef(({
231
218
  ...inputProps
232
219
  }, ref) => {
233
220
  const trailingIcon = inputProps["aria-invalid"] ? "warning-alt" : trailingIconProp;
234
- return /* @__PURE__ */(0, import_jsx_runtime5.jsxs)(import_theme_ui8.Flex, {
221
+ return /* @__PURE__ */(0, import_jsx_runtime4.jsxs)(import_theme_ui8.Flex, {
235
222
  className,
236
223
  sx: {
237
224
  ...sx,
@@ -239,7 +226,7 @@ var Input = React3.forwardRef(({
239
226
  padding: 0,
240
227
  border: "none"
241
228
  },
242
- children: [leadingIcon && /* @__PURE__ */(0, import_jsx_runtime5.jsx)(import_theme_ui16.Text, {
229
+ children: [leadingIcon && /* @__PURE__ */(0, import_jsx_runtime4.jsx)(import_theme_ui16.Text, {
243
230
  sx: {
244
231
  position: "absolute",
245
232
  alignSelf: "center",
@@ -248,11 +235,11 @@ var Input = React3.forwardRef(({
248
235
  },
249
236
  onClick: onLeadingIconClick,
250
237
  variant: "leading-icon",
251
- children: /* @__PURE__ */(0, import_jsx_runtime5.jsx)(Icon, {
238
+ children: /* @__PURE__ */(0, import_jsx_runtime4.jsx)(import_react_icons3.Icon, {
252
239
  inline: true,
253
240
  icon: leadingIcon
254
241
  })
255
- }), /* @__PURE__ */(0, import_jsx_runtime5.jsx)(import_theme_ui12.Input, {
242
+ }), /* @__PURE__ */(0, import_jsx_runtime4.jsx)(import_theme_ui12.Input, {
256
243
  ref,
257
244
  sx: {
258
245
  fontFamily: "body",
@@ -265,7 +252,7 @@ var Input = React3.forwardRef(({
265
252
  },
266
253
  className,
267
254
  ...inputProps
268
- }), trailingIcon && /* @__PURE__ */(0, import_jsx_runtime5.jsx)(import_theme_ui16.Text, {
255
+ }), trailingIcon && /* @__PURE__ */(0, import_jsx_runtime4.jsx)(import_theme_ui16.Text, {
269
256
  sx: {
270
257
  position: "absolute",
271
258
  right: "1rem",
@@ -274,7 +261,7 @@ var Input = React3.forwardRef(({
274
261
  },
275
262
  variant: "trailing-icon",
276
263
  onClick: onTrailingIconClick,
277
- children: /* @__PURE__ */(0, import_jsx_runtime5.jsx)(Icon, {
264
+ children: /* @__PURE__ */(0, import_jsx_runtime4.jsx)(import_react_icons3.Icon, {
278
265
  inline: true,
279
266
  icon: trailingIcon
280
267
  })
@@ -284,8 +271,9 @@ var Input = React3.forwardRef(({
284
271
  Input.displayName = "Input";
285
272
 
286
273
  // src/components/Label.tsx
274
+ var import_react_icons4 = require("@ttoss/react-icons");
287
275
  var import_theme_ui13 = require("theme-ui");
288
- var import_jsx_runtime6 = require("react/jsx-runtime");
276
+ var import_jsx_runtime5 = require("react/jsx-runtime");
289
277
  var TOOLTIP_LABEL = "tooltip";
290
278
  var Label = ({
291
279
  children,
@@ -294,7 +282,7 @@ var Label = ({
294
282
  sx,
295
283
  ...props
296
284
  }) => {
297
- return /* @__PURE__ */(0, import_jsx_runtime6.jsxs)(import_theme_ui13.Label, {
285
+ return /* @__PURE__ */(0, import_jsx_runtime5.jsxs)(import_theme_ui13.Label, {
298
286
  sx: {
299
287
  fontFamily: "caption",
300
288
  alignItems: "center",
@@ -303,14 +291,14 @@ var Label = ({
303
291
  ...sx
304
292
  },
305
293
  ...props,
306
- children: [children, tooltip && /* @__PURE__ */(0, import_jsx_runtime6.jsx)(import_theme_ui16.Text, {
294
+ children: [children, tooltip && /* @__PURE__ */(0, import_jsx_runtime5.jsx)(import_theme_ui16.Text, {
307
295
  sx: {
308
296
  color: "currentcolor",
309
297
  cursor: onTooltipClick ? "pointer" : void 0
310
298
  },
311
299
  onClick: onTooltipClick,
312
300
  "aria-label": TOOLTIP_LABEL,
313
- children: /* @__PURE__ */(0, import_jsx_runtime6.jsx)(Icon, {
301
+ children: /* @__PURE__ */(0, import_jsx_runtime5.jsx)(import_react_icons4.Icon, {
314
302
  inline: true,
315
303
  icon: "info"
316
304
  })
@@ -319,15 +307,15 @@ var Label = ({
319
307
  };
320
308
 
321
309
  // src/components/Link.tsx
322
- var React4 = __toESM(require("react"));
310
+ var React3 = __toESM(require("react"));
323
311
  var import_theme_ui14 = require("theme-ui");
324
- var import_jsx_runtime7 = require("react/jsx-runtime");
325
- var Link = React4.forwardRef(({
312
+ var import_jsx_runtime6 = require("react/jsx-runtime");
313
+ var Link = React3.forwardRef(({
326
314
  quiet,
327
315
  className,
328
316
  ...props
329
317
  }, ref) => {
330
- return /* @__PURE__ */(0, import_jsx_runtime7.jsx)(import_theme_ui14.Link, {
318
+ return /* @__PURE__ */(0, import_jsx_runtime6.jsx)(import_theme_ui14.Link, {
331
319
  className: `${quiet ? "quiet" : ""} ${className ?? ""}`,
332
320
  ...props,
333
321
  ref
@@ -342,18 +330,20 @@ var import_theme_ui15 = require("theme-ui");
342
330
  var import_theme_ui16 = require("theme-ui");
343
331
 
344
332
  // src/components/Select.tsx
345
- var React5 = __toESM(require("react"));
333
+ var React4 = __toESM(require("react"));
334
+ var import_react_icons5 = require("@ttoss/react-icons");
346
335
  var import_theme_ui17 = require("theme-ui");
347
- var import_jsx_runtime8 = require("react/jsx-runtime");
348
- var Select = React5.forwardRef(({
336
+ var import_jsx_runtime7 = require("react/jsx-runtime");
337
+ var Select = React4.forwardRef(({
349
338
  arrow,
350
339
  sx,
351
340
  ...props
352
341
  }, ref) => {
353
- return /* @__PURE__ */(0, import_jsx_runtime8.jsx)(import_theme_ui17.Select, {
354
- arrow: /* @__PURE__ */(0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, {
355
- children: [arrow ?? /* @__PURE__ */(0, import_jsx_runtime8.jsx)(import_theme_ui16.Text, {
342
+ return /* @__PURE__ */(0, import_jsx_runtime7.jsx)(import_theme_ui17.Select, {
343
+ arrow: /* @__PURE__ */(0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, {
344
+ children: [arrow ?? /* @__PURE__ */(0, import_jsx_runtime7.jsx)(import_theme_ui16.Text, {
356
345
  sx: {
346
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
357
347
  marginLeft: ({
358
348
  space
359
349
  }) => {
@@ -364,12 +354,13 @@ var Select = React5.forwardRef(({
364
354
  lineHeight: 0,
365
355
  fontSize: "base"
366
356
  },
367
- children: /* @__PURE__ */(0, import_jsx_runtime8.jsx)(Icon, {
357
+ children: /* @__PURE__ */(0, import_jsx_runtime7.jsx)(import_react_icons5.Icon, {
368
358
  icon: "picker-down"
369
359
  })
370
- }), props["aria-invalid"] === "true" && /* @__PURE__ */(0, import_jsx_runtime8.jsx)(import_theme_ui16.Text, {
360
+ }), props["aria-invalid"] === "true" && /* @__PURE__ */(0, import_jsx_runtime7.jsx)(import_theme_ui16.Text, {
371
361
  className: "error-icon",
372
362
  sx: {
363
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
373
364
  marginLeft: ({
374
365
  space
375
366
  }) => {
@@ -380,7 +371,7 @@ var Select = React5.forwardRef(({
380
371
  lineHeight: 0,
381
372
  fontSize: "base"
382
373
  },
383
- children: /* @__PURE__ */(0, import_jsx_runtime8.jsx)(Icon, {
374
+ children: /* @__PURE__ */(0, import_jsx_runtime7.jsx)(import_react_icons5.Icon, {
384
375
  icon: "warning-alt"
385
376
  })
386
377
  })]
@@ -405,11 +396,11 @@ var import_theme_ui18 = require("theme-ui");
405
396
  var import_theme_ui19 = require("theme-ui");
406
397
 
407
398
  // src/components/IconButton.tsx
408
- var React6 = __toESM(require("react"));
399
+ var React5 = __toESM(require("react"));
409
400
  var import_theme_ui20 = require("theme-ui");
410
- var import_jsx_runtime9 = require("react/jsx-runtime");
411
- var IconButton = React6.forwardRef((props, ref) => {
412
- return /* @__PURE__ */(0, import_jsx_runtime9.jsx)(import_theme_ui20.IconButton, {
401
+ var import_jsx_runtime8 = require("react/jsx-runtime");
402
+ var IconButton = React5.forwardRef((props, ref) => {
403
+ return /* @__PURE__ */(0, import_jsx_runtime8.jsx)(import_theme_ui20.IconButton, {
413
404
  type: "button",
414
405
  ...props,
415
406
  ref
@@ -424,12 +415,12 @@ var import_theme_ui21 = require("theme-ui");
424
415
  var import_theme_ui22 = require("theme-ui");
425
416
 
426
417
  // src/components/InfiniteLinearProgress.tsx
427
- var React7 = __toESM(require("react"));
428
- var import_jsx_runtime10 = require("react/jsx-runtime");
418
+ var React6 = __toESM(require("react"));
419
+ var import_jsx_runtime9 = require("react/jsx-runtime");
429
420
  var MAX_PROGRESS = 100;
430
421
  var InfiniteLinearProgress = () => {
431
- const [progress, setProgress] = React7.useState(0);
432
- React7.useEffect(() => {
422
+ const [progress, setProgress] = React6.useState(0);
423
+ React6.useEffect(() => {
433
424
  const timer = setInterval(() => {
434
425
  setProgress(oldProgress => {
435
426
  if (oldProgress === MAX_PROGRESS) {
@@ -450,7 +441,7 @@ var InfiniteLinearProgress = () => {
450
441
  clearInterval(timer);
451
442
  };
452
443
  }, []);
453
- return /* @__PURE__ */(0, import_jsx_runtime10.jsx)(import_theme_ui15.Progress, {
444
+ return /* @__PURE__ */(0, import_jsx_runtime9.jsx)(import_theme_ui15.Progress, {
454
445
  max: MAX_PROGRESS,
455
446
  value: progress,
456
447
  role: "progressbar"
@@ -458,16 +449,17 @@ var InfiniteLinearProgress = () => {
458
449
  };
459
450
 
460
451
  // src/components/Textarea.tsx
461
- var React8 = __toESM(require("react"));
452
+ var React7 = __toESM(require("react"));
453
+ var import_react_icons6 = require("@ttoss/react-icons");
462
454
  var import_theme_ui23 = require("theme-ui");
463
- var import_jsx_runtime11 = require("react/jsx-runtime");
464
- var Textarea = React8.forwardRef(({
455
+ var import_jsx_runtime10 = require("react/jsx-runtime");
456
+ var Textarea = React7.forwardRef(({
465
457
  trailingIcon,
466
458
  className,
467
459
  sx,
468
460
  ...textareaProps
469
461
  }, ref) => {
470
- return /* @__PURE__ */(0, import_jsx_runtime11.jsxs)(import_theme_ui8.Flex, {
462
+ return /* @__PURE__ */(0, import_jsx_runtime10.jsxs)(import_theme_ui8.Flex, {
471
463
  className,
472
464
  sx: {
473
465
  ...sx,
@@ -475,7 +467,7 @@ var Textarea = React8.forwardRef(({
475
467
  padding: 0,
476
468
  border: "none"
477
469
  },
478
- children: [/* @__PURE__ */(0, import_jsx_runtime11.jsx)(import_theme_ui23.Textarea, {
470
+ children: [/* @__PURE__ */(0, import_jsx_runtime10.jsx)(import_theme_ui23.Textarea, {
479
471
  ref,
480
472
  sx: {
481
473
  fontFamily: "body",
@@ -487,13 +479,13 @@ var Textarea = React8.forwardRef(({
487
479
  },
488
480
  className,
489
481
  ...textareaProps
490
- }), trailingIcon && /* @__PURE__ */(0, import_jsx_runtime11.jsx)(import_theme_ui16.Text, {
482
+ }), trailingIcon && /* @__PURE__ */(0, import_jsx_runtime10.jsx)(import_theme_ui16.Text, {
491
483
  sx: {
492
484
  position: "absolute",
493
485
  right: "1.25rem",
494
486
  top: "0.75rem"
495
487
  },
496
- children: /* @__PURE__ */(0, import_jsx_runtime11.jsx)(Icon, {
488
+ children: /* @__PURE__ */(0, import_jsx_runtime10.jsx)(import_react_icons6.Icon, {
497
489
  inline: true,
498
490
  icon: trailingIcon
499
491
  })
@@ -503,11 +495,11 @@ var Textarea = React8.forwardRef(({
503
495
  Textarea.displayName = "Textarea";
504
496
 
505
497
  // src/components/Container.tsx
506
- var React9 = __toESM(require("react"));
498
+ var React8 = __toESM(require("react"));
507
499
  var import_theme_ui24 = require("theme-ui");
508
- var import_jsx_runtime12 = require("react/jsx-runtime");
509
- var Container = React9.forwardRef((props, ref) => {
510
- return /* @__PURE__ */(0, import_jsx_runtime12.jsx)(import_theme_ui24.Container, {
500
+ var import_jsx_runtime11 = require("react/jsx-runtime");
501
+ var Container = React8.forwardRef((props, ref) => {
502
+ return /* @__PURE__ */(0, import_jsx_runtime11.jsx)(import_theme_ui24.Container, {
511
503
  ref,
512
504
  ...props
513
505
  });
@@ -515,7 +507,7 @@ var Container = React9.forwardRef((props, ref) => {
515
507
  Container.displayName = "Container";
516
508
 
517
509
  // src/components/HelpText.tsx
518
- var import_jsx_runtime13 = require("react/jsx-runtime");
510
+ var import_jsx_runtime12 = require("react/jsx-runtime");
519
511
  var HelpText = ({
520
512
  sx,
521
513
  disabled,
@@ -523,7 +515,7 @@ var HelpText = ({
523
515
  ...props
524
516
  }) => {
525
517
  const variant = ["text.help", negative ? "negative" : void 0].filter(Boolean).join(".");
526
- return /* @__PURE__ */(0, import_jsx_runtime13.jsx)(import_theme_ui16.Text, {
518
+ return /* @__PURE__ */(0, import_jsx_runtime12.jsx)(import_theme_ui16.Text, {
527
519
  variant,
528
520
  sx: {
529
521
  fontSize: "sm",
@@ -537,10 +529,10 @@ var HelpText = ({
537
529
  };
538
530
 
539
531
  // src/components/CloseButton.tsx
540
- var React10 = __toESM(require("react"));
541
- var import_theme_ui25 = require("theme-ui");
542
- var import_jsx_runtime14 = require("react/jsx-runtime");
543
- var CloseButton = React10.forwardRef(({
532
+ var React9 = __toESM(require("react"));
533
+ var import_react_icons7 = require("@ttoss/react-icons");
534
+ var import_jsx_runtime13 = require("react/jsx-runtime");
535
+ var CloseButton = React9.forwardRef(({
544
536
  label,
545
537
  sx,
546
538
  onlyText,
@@ -549,7 +541,7 @@ var CloseButton = React10.forwardRef(({
549
541
  if (onlyText && !label) {
550
542
  return null;
551
543
  }
552
- return /* @__PURE__ */(0, import_jsx_runtime14.jsxs)(import_theme_ui25.Button, {
544
+ return /* @__PURE__ */(0, import_jsx_runtime13.jsxs)(Button, {
553
545
  variant: "buttons.closeButton",
554
546
  type: "button",
555
547
  "aria-label": label,
@@ -571,7 +563,7 @@ var CloseButton = React10.forwardRef(({
571
563
  },
572
564
  ...props,
573
565
  ref,
574
- children: [label, !onlyText && /* @__PURE__ */(0, import_jsx_runtime14.jsx)(Icon, {
566
+ children: [label, !onlyText && /* @__PURE__ */(0, import_jsx_runtime13.jsx)(import_react_icons7.Icon, {
575
567
  icon: "close"
576
568
  })]
577
569
  });
@@ -579,10 +571,11 @@ var CloseButton = React10.forwardRef(({
579
571
  CloseButton.displayName = "CloseButton";
580
572
 
581
573
  // src/components/InputNumber.tsx
582
- var React11 = __toESM(require("react"));
583
- var import_theme_ui26 = require("theme-ui");
584
- var import_jsx_runtime15 = require("react/jsx-runtime");
585
- var InputNumber = React11.forwardRef(({
574
+ var React10 = __toESM(require("react"));
575
+ var import_react_icons8 = require("@ttoss/react-icons");
576
+ var import_theme_ui25 = require("theme-ui");
577
+ var import_jsx_runtime14 = require("react/jsx-runtime");
578
+ var InputNumber = React10.forwardRef(({
586
579
  sx,
587
580
  value,
588
581
  infoIcon,
@@ -590,7 +583,7 @@ var InputNumber = React11.forwardRef(({
590
583
  onClickInfoIcon,
591
584
  ...inputProps
592
585
  }, ref) => {
593
- const sxProps = React11.useMemo(() => {
586
+ const sxProps = React10.useMemo(() => {
594
587
  const size = String(typeof value === "undefined" ? 0 : value).length;
595
588
  if (inputProps["aria-invalid"] === "true") {
596
589
  return {
@@ -642,7 +635,7 @@ var InputNumber = React11.forwardRef(({
642
635
  }
643
636
  onChange(value + 1);
644
637
  };
645
- return /* @__PURE__ */(0, import_jsx_runtime15.jsxs)(import_theme_ui8.Flex, {
638
+ return /* @__PURE__ */(0, import_jsx_runtime14.jsxs)(import_theme_ui8.Flex, {
646
639
  sx: {
647
640
  width: "fit-content",
648
641
  ...sx,
@@ -652,7 +645,7 @@ var InputNumber = React11.forwardRef(({
652
645
  },
653
646
  ref,
654
647
  "aria-invalid": inputProps["aria-invalid"],
655
- children: [/* @__PURE__ */(0, import_jsx_runtime15.jsx)(import_theme_ui26.Input, {
648
+ children: [/* @__PURE__ */(0, import_jsx_runtime14.jsx)(import_theme_ui25.Input, {
656
649
  ref,
657
650
  variant: "forms.inputNumber",
658
651
  sx: sxProps,
@@ -662,7 +655,7 @@ var InputNumber = React11.forwardRef(({
662
655
  },
663
656
  value,
664
657
  ...inputProps
665
- }), /* @__PURE__ */(0, import_jsx_runtime15.jsx)(import_theme_ui16.Text, {
658
+ }), /* @__PURE__ */(0, import_jsx_runtime14.jsx)(import_theme_ui16.Text, {
666
659
  sx: {
667
660
  position: "absolute",
668
661
  alignSelf: "center",
@@ -671,10 +664,10 @@ var InputNumber = React11.forwardRef(({
671
664
  cursor: "pointer"
672
665
  },
673
666
  onClick: handleChangeUp,
674
- children: /* @__PURE__ */(0, import_jsx_runtime15.jsx)(Icon, {
667
+ children: /* @__PURE__ */(0, import_jsx_runtime14.jsx)(import_react_icons8.Icon, {
675
668
  icon: "picker-down"
676
669
  })
677
- }), infoIcon && /* @__PURE__ */(0, import_jsx_runtime15.jsx)(import_theme_ui16.Text, {
670
+ }), infoIcon && /* @__PURE__ */(0, import_jsx_runtime14.jsx)(import_theme_ui16.Text, {
678
671
  sx: {
679
672
  position: "absolute",
680
673
  alignSelf: "center",
@@ -683,10 +676,10 @@ var InputNumber = React11.forwardRef(({
683
676
  cursor: onClickInfoIcon ? "pointer" : "default"
684
677
  },
685
678
  onClick: onClickInfoIcon,
686
- children: /* @__PURE__ */(0, import_jsx_runtime15.jsx)(Icon, {
679
+ children: /* @__PURE__ */(0, import_jsx_runtime14.jsx)(import_react_icons8.Icon, {
687
680
  icon: "info"
688
681
  })
689
- }), /* @__PURE__ */(0, import_jsx_runtime15.jsx)(import_theme_ui16.Text, {
682
+ }), /* @__PURE__ */(0, import_jsx_runtime14.jsx)(import_theme_ui16.Text, {
690
683
  sx: {
691
684
  position: "absolute",
692
685
  alignSelf: "center",
@@ -695,7 +688,7 @@ var InputNumber = React11.forwardRef(({
695
688
  cursor: "pointer"
696
689
  },
697
690
  onClick: handleChangeDown,
698
- children: /* @__PURE__ */(0, import_jsx_runtime15.jsx)(Icon, {
691
+ children: /* @__PURE__ */(0, import_jsx_runtime14.jsx)(import_react_icons8.Icon, {
699
692
  icon: "picker-up"
700
693
  })
701
694
  })]
@@ -704,10 +697,10 @@ var InputNumber = React11.forwardRef(({
704
697
  InputNumber.displayName = "InputNumber";
705
698
 
706
699
  // src/components/Stack.tsx
707
- var React12 = __toESM(require("react"));
708
- var import_jsx_runtime16 = require("react/jsx-runtime");
709
- var Stack = React12.forwardRef((props, ref) => {
710
- return /* @__PURE__ */(0, import_jsx_runtime16.jsx)(import_theme_ui8.Flex, {
700
+ var React11 = __toESM(require("react"));
701
+ var import_jsx_runtime15 = require("react/jsx-runtime");
702
+ var Stack = React11.forwardRef((props, ref) => {
703
+ return /* @__PURE__ */(0, import_jsx_runtime15.jsx)(import_theme_ui8.Flex, {
711
704
  ref,
712
705
  ...props,
713
706
  sx: {
@@ -719,19 +712,19 @@ var Stack = React12.forwardRef((props, ref) => {
719
712
  Stack.displayName = "Stack";
720
713
 
721
714
  // src/components/Paragraph.tsx
722
- var import_theme_ui27 = require("theme-ui");
715
+ var import_theme_ui26 = require("theme-ui");
723
716
 
724
717
  // src/components/InputPassword/InputPassword.tsx
725
- var React14 = __toESM(require("react"));
718
+ var React13 = __toESM(require("react"));
726
719
 
727
720
  // src/components/InputPassword/useHidePassInput.ts
728
- var React13 = __toESM(require("react"));
721
+ var React12 = __toESM(require("react"));
729
722
  var useHidePassInput = (defaultValue = true) => {
730
- const [hidePass, setHidePass] = React13.useState(Boolean(defaultValue));
723
+ const [hidePass, setHidePass] = React12.useState(Boolean(defaultValue));
731
724
  const {
732
725
  icon,
733
726
  inputType
734
- } = React13.useMemo(() => {
727
+ } = React12.useMemo(() => {
735
728
  return {
736
729
  icon: hidePass ? "view-off" : "view-on",
737
730
  inputType: hidePass ? "password" : "text"
@@ -750,8 +743,8 @@ var useHidePassInput = (defaultValue = true) => {
750
743
  };
751
744
 
752
745
  // src/components/InputPassword/InputPassword.tsx
753
- var import_jsx_runtime17 = require("react/jsx-runtime");
754
- var InputPassword = React14.forwardRef(({
746
+ var import_jsx_runtime16 = require("react/jsx-runtime");
747
+ var InputPassword = React13.forwardRef(({
755
748
  showPasswordByDefault,
756
749
  ...inputPasswordProps
757
750
  }, ref) => {
@@ -760,7 +753,7 @@ var InputPassword = React14.forwardRef(({
760
753
  icon,
761
754
  inputType
762
755
  } = useHidePassInput(!showPasswordByDefault);
763
- return /* @__PURE__ */(0, import_jsx_runtime17.jsx)(Input, {
756
+ return /* @__PURE__ */(0, import_jsx_runtime16.jsx)(Input, {
764
757
  ref,
765
758
  ...inputPasswordProps,
766
759
  trailingIcon: icon,
@@ -771,14 +764,14 @@ var InputPassword = React14.forwardRef(({
771
764
  InputPassword.displayName = "InputPassword";
772
765
 
773
766
  // src/components/ActionButton.tsx
774
- var import_jsx_runtime18 = require("react/jsx-runtime");
767
+ var import_jsx_runtime17 = require("react/jsx-runtime");
775
768
  var ActionButton = ({
776
769
  icon,
777
770
  variant = "default",
778
771
  sx,
779
772
  ...props
780
773
  }) => {
781
- return /* @__PURE__ */(0, import_jsx_runtime18.jsx)(Button, {
774
+ return /* @__PURE__ */(0, import_jsx_runtime17.jsx)(Button, {
782
775
  variant: `buttons.actionButton.${variant}`,
783
776
  leftIcon: icon,
784
777
  sx: {
@@ -816,7 +809,6 @@ var ActionButton = ({
816
809
  Grid,
817
810
  Heading,
818
811
  HelpText,
819
- Icon,
820
812
  IconButton,
821
813
  Image,
822
814
  InfiniteLinearProgress,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/ui",
3
- "version": "2.0.4",
3
+ "version": "3.1.0",
4
4
  "description": "Primitive layout, typographic, and other components for styling applications.",
5
5
  "author": "ttoss",
6
6
  "contributors": [
@@ -20,25 +20,25 @@
20
20
  "sideEffects": false,
21
21
  "typings": "dist/index.d.ts",
22
22
  "dependencies": {
23
- "@iconify-icon/react": "^1.0.7",
24
23
  "@theme-ui/match-media": "^0.16.0",
25
24
  "theme-ui": "^0.16.0",
26
- "@ttoss/theme": "^1.5.5"
25
+ "@ttoss/theme": "^1.6.0"
27
26
  },
28
27
  "peerDependencies": {
29
28
  "@emotion/react": "^11",
30
- "react": ">=16.8.0"
29
+ "react": ">=16.8.0",
30
+ "@ttoss/react-icons": "^0.1.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@emotion/react": "^11.11.1",
34
34
  "@iconify-icons/mdi-light": "^1.2.5",
35
- "@iconify/types": "^2.0.0",
36
35
  "@types/jest": "^29.5.3",
37
36
  "@types/react": "^18.2.12",
38
37
  "jest": "^29.6.1",
39
38
  "react": "^18.2.0",
40
39
  "tsup": "^7.1.0",
41
40
  "@ttoss/config": "^1.30.5",
41
+ "@ttoss/react-icons": "^0.1.0",
42
42
  "@ttoss/test-utils": "^1.23.6"
43
43
  },
44
44
  "keywords": [
@@ -1,6 +1,5 @@
1
1
  import { type BadgeProps as BadgePropsUi, Badge as BadgeUi } from 'theme-ui';
2
-
3
- import { Icon, IconType } from './Icon';
2
+ import { Icon, IconType } from '@ttoss/react-icons';
4
3
 
5
4
  export type BadgeProps = BadgePropsUi & {
6
5
  icon?: IconType;
@@ -3,7 +3,7 @@ import {
3
3
  type ButtonProps as ButtonPropsUi,
4
4
  Button as ButtonUi,
5
5
  } from 'theme-ui';
6
- import { Icon, IconType } from './Icon';
6
+ import { Icon, IconType } from '@ttoss/react-icons';
7
7
 
8
8
  export type ButtonProps = ButtonPropsUi & {
9
9
  leftIcon?: IconType;