@ttoss/ui 5.6.0 → 5.6.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/dist/esm/index.js CHANGED
@@ -264,44 +264,16 @@ var Checkbox = React2.forwardRef(({
264
264
  Checkbox.displayName = "Checkbox";
265
265
 
266
266
  // src/components/CloseButton.tsx
267
- import { Icon as Icon3 } from "@ttoss/react-icons";
268
- import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
267
+ import { Close as CloseUI } from "theme-ui";
268
+ import { jsx as jsx6 } from "react/jsx-runtime";
269
269
  var CloseButton = props => {
270
- return /* @__PURE__ */jsxs3(Button, {
270
+ return /* @__PURE__ */jsx6(CloseUI, {
271
271
  type: "button",
272
+ "aria-label": props.ariaLabel,
272
273
  sx: {
273
- fontFamily: "body",
274
- display: "flex",
275
- alignItems: "center",
276
- cursor: "pointer",
277
- lineHeight: "normal",
278
- padding: "2",
279
- backgroundColor: "action.background.primary.active",
280
- color: "action.text.primary.default",
281
- border: "sm",
282
- borderColor: "action.border.primary.default",
283
- borderRadius: "sm",
284
- gap: 2,
285
- ":disabled": {
286
- border: "sm",
287
- backgroundColor: "action.background.muted.default",
288
- borderColor: "action.border.muted.default",
289
- color: "action.text.muted.default",
290
- cursor: "not-allowed"
291
- },
292
- ":is(:focus-within, :hover):not(:disabled)": {
293
- color: "action.text.secondary.active",
294
- backgroundColor: "action.background.secondary.active",
295
- borderColor: "action.border.secondary.active"
296
- },
297
274
  ...props.sx
298
275
  },
299
- ...props,
300
- children: [props.label && /* @__PURE__ */jsx6("span", {
301
- children: props.label
302
- }), /* @__PURE__ */jsx6(Icon3, {
303
- icon: "close"
304
- })]
276
+ ...props
305
277
  });
306
278
  };
307
279
 
@@ -352,7 +324,7 @@ var HelpText = ({
352
324
  };
353
325
 
354
326
  // src/components/IconButton.tsx
355
- import { Icon as Icon4 } from "@ttoss/react-icons";
327
+ import { Icon as Icon3 } from "@ttoss/react-icons";
356
328
  import { IconButton as IconButtonUi } from "theme-ui";
357
329
  import { jsx as jsx9 } from "react/jsx-runtime";
358
330
  var IconButton = props => {
@@ -372,7 +344,7 @@ var IconButton = props => {
372
344
  },
373
345
  ...restProps.sx
374
346
  },
375
- children: icon ? /* @__PURE__ */jsx9(Icon4, {
347
+ children: icon ? /* @__PURE__ */jsx9(Icon3, {
376
348
  inline: true,
377
349
  icon
378
350
  }) : children
@@ -422,10 +394,10 @@ var InfiniteLinearProgress = () => {
422
394
  };
423
395
 
424
396
  // src/components/Input.tsx
425
- import { Icon as Icon5 } from "@ttoss/react-icons";
397
+ import { Icon as Icon4 } from "@ttoss/react-icons";
426
398
  import * as React5 from "react";
427
399
  import { Input as InputUI } from "theme-ui";
428
- import { jsx as jsx11, jsxs as jsxs4 } from "react/jsx-runtime";
400
+ import { jsx as jsx11, jsxs as jsxs3 } from "react/jsx-runtime";
429
401
  var Input = React5.forwardRef(({
430
402
  leadingIcon,
431
403
  trailingIcon: trailingIconProp,
@@ -437,7 +409,7 @@ var Input = React5.forwardRef(({
437
409
  }, ref) => {
438
410
  const trailingIcon = inputProps["aria-invalid"] ? "warning-alt" : trailingIconProp;
439
411
  const isWarning = !inputProps["aria-invalid"] && trailingIcon === "warning-alt";
440
- return /* @__PURE__ */jsxs4(Flex, {
412
+ return /* @__PURE__ */jsxs3(Flex, {
441
413
  className: `${className} ${isWarning ? "is-warning" : ""}`,
442
414
  sx: {
443
415
  ...sx,
@@ -454,7 +426,7 @@ var Input = React5.forwardRef(({
454
426
  },
455
427
  onClick: onLeadingIconClick,
456
428
  variant: "leading-icon",
457
- children: /* @__PURE__ */jsx11(Icon5, {
429
+ children: /* @__PURE__ */jsx11(Icon4, {
458
430
  inline: true,
459
431
  icon: leadingIcon
460
432
  })
@@ -482,7 +454,7 @@ var Input = React5.forwardRef(({
482
454
  },
483
455
  variant: "trailing-icon",
484
456
  onClick: onTrailingIconClick,
485
- children: /* @__PURE__ */jsx11(Icon5, {
457
+ children: /* @__PURE__ */jsx11(Icon4, {
486
458
  inline: true,
487
459
  icon: trailingIcon
488
460
  })
@@ -492,10 +464,10 @@ var Input = React5.forwardRef(({
492
464
  Input.displayName = "Input";
493
465
 
494
466
  // src/components/InputNumber.tsx
495
- import { Icon as Icon6 } from "@ttoss/react-icons";
467
+ import { Icon as Icon5 } from "@ttoss/react-icons";
496
468
  import * as React6 from "react";
497
469
  import { Input as Input2 } from "theme-ui";
498
- import { jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
470
+ import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
499
471
  var InputNumber = React6.forwardRef(({
500
472
  sx,
501
473
  value,
@@ -556,7 +528,7 @@ var InputNumber = React6.forwardRef(({
556
528
  }
557
529
  onChange(value + 1);
558
530
  };
559
- return /* @__PURE__ */jsxs5(Flex, {
531
+ return /* @__PURE__ */jsxs4(Flex, {
560
532
  sx: {
561
533
  width: "fit-content",
562
534
  ...sx,
@@ -585,7 +557,7 @@ var InputNumber = React6.forwardRef(({
585
557
  cursor: "pointer"
586
558
  },
587
559
  onClick: handleChangeUp,
588
- children: /* @__PURE__ */jsx12(Icon6, {
560
+ children: /* @__PURE__ */jsx12(Icon5, {
589
561
  icon: "picker-down"
590
562
  })
591
563
  }), infoIcon && /* @__PURE__ */jsx12(Text, {
@@ -597,7 +569,7 @@ var InputNumber = React6.forwardRef(({
597
569
  cursor: onClickInfoIcon ? "pointer" : "default"
598
570
  },
599
571
  onClick: onClickInfoIcon,
600
- children: /* @__PURE__ */jsx12(Icon6, {
572
+ children: /* @__PURE__ */jsx12(Icon5, {
601
573
  icon: "info"
602
574
  })
603
575
  }), /* @__PURE__ */jsx12(Text, {
@@ -609,7 +581,7 @@ var InputNumber = React6.forwardRef(({
609
581
  cursor: "pointer"
610
582
  },
611
583
  onClick: handleChangeDown,
612
- children: /* @__PURE__ */jsx12(Icon6, {
584
+ children: /* @__PURE__ */jsx12(Icon5, {
613
585
  icon: "picker-up"
614
586
  })
615
587
  })]
@@ -667,10 +639,10 @@ var InputPassword = React8.forwardRef(({
667
639
  InputPassword.displayName = "InputPassword";
668
640
 
669
641
  // src/components/Label.tsx
670
- import { Icon as Icon7 } from "@ttoss/react-icons";
642
+ import { Icon as Icon6 } from "@ttoss/react-icons";
671
643
  import * as React9 from "react";
672
644
  import { Label as LabelUi } from "theme-ui";
673
- import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
645
+ import { jsx as jsx14, jsxs as jsxs5 } from "react/jsx-runtime";
674
646
  var TOOLTIP_LABEL = "tooltip";
675
647
  var Label = ({
676
648
  children,
@@ -680,7 +652,7 @@ var Label = ({
680
652
  }) => {
681
653
  const id = React9.useId();
682
654
  const tooltipId = `${id}-tooltip`;
683
- return /* @__PURE__ */jsxs6(LabelUi, {
655
+ return /* @__PURE__ */jsxs5(LabelUi, {
684
656
  "data-tooltip-id": tooltipId,
685
657
  sx: {
686
658
  alignItems: "center",
@@ -691,13 +663,13 @@ var Label = ({
691
663
  ...sx
692
664
  },
693
665
  ...props,
694
- children: [children, tooltip && /* @__PURE__ */jsxs6(Text, {
666
+ children: [children, tooltip && /* @__PURE__ */jsxs5(Text, {
695
667
  sx: {
696
668
  color: "currentcolor",
697
669
  cursor: "pointer"
698
670
  },
699
671
  "aria-label": TOOLTIP_LABEL,
700
- children: [/* @__PURE__ */jsx14(Icon7, {
672
+ children: [/* @__PURE__ */jsx14(Icon6, {
701
673
  inline: true,
702
674
  icon: "fluent:info-24-regular"
703
675
  }), /* @__PURE__ */jsx14(Tooltip, {
@@ -737,7 +709,7 @@ import { Radio } from "theme-ui";
737
709
  // src/components/SegmentedControl.tsx
738
710
  import * as React11 from "react";
739
711
  import { Box as Box3, Flex as Flex2 } from "theme-ui";
740
- import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
712
+ import { jsx as jsx16, jsxs as jsxs6 } from "react/jsx-runtime";
741
713
  var SegmentedControl = ({
742
714
  options,
743
715
  value: propValue,
@@ -852,15 +824,15 @@ var SegmentedControl = ({
852
824
  ...rest,
853
825
  children: /* @__PURE__ */jsx16("div", {
854
826
  className: "rc-segmented",
855
- children: /* @__PURE__ */jsxs7(Flex2, {
827
+ children: /* @__PURE__ */jsxs6(Flex2, {
856
828
  className: "rc-segmented-group custom-segmented-group",
857
829
  children: [normalizedOptions.map((option, index) => {
858
830
  const isSelected = option.value === currentValue;
859
831
  const isLastItem = index === normalizedOptions.length - 1;
860
832
  const isItemDisabled = disabled || option.disabled;
861
833
  const showDivider = !isLastItem && option.value !== currentValue && normalizedOptions[index + 1].value !== currentValue;
862
- return /* @__PURE__ */jsxs7(React11.Fragment, {
863
- children: [/* @__PURE__ */jsxs7(Box3, {
834
+ return /* @__PURE__ */jsxs6(React11.Fragment, {
835
+ children: [/* @__PURE__ */jsxs6(Box3, {
864
836
  as: "label",
865
837
  className: `rc-segmented-item ${isSelected ? "rc-segmented-item-selected" : ""} ${isItemDisabled ? "rc-segmented-item-disabled" : ""}`,
866
838
  onClick: () => {
@@ -909,10 +881,10 @@ var SegmentedControl = ({
909
881
  };
910
882
 
911
883
  // src/components/Select.tsx
912
- import { Icon as Icon8 } from "@ttoss/react-icons";
884
+ import { Icon as Icon7 } from "@ttoss/react-icons";
913
885
  import * as React12 from "react";
914
886
  import ReactSelect, { components } from "react-select";
915
- import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
887
+ import { jsx as jsx17, jsxs as jsxs7 } from "react/jsx-runtime";
916
888
  var Control = props => {
917
889
  const isDisabled = props.selectProps.isDisabled;
918
890
  const hasError = props.selectProps["aria-invalid"] === "true";
@@ -961,7 +933,7 @@ var DropdownIndicator = props => {
961
933
  display: "flex",
962
934
  alignItems: "center"
963
935
  },
964
- children: /* @__PURE__ */jsx17(Icon8, {
936
+ children: /* @__PURE__ */jsx17(Icon7, {
965
937
  icon: "picker-down"
966
938
  })
967
939
  });
@@ -1032,7 +1004,7 @@ var ValueContainer = ({
1032
1004
  }
1033
1005
  return leadingIcon || "search";
1034
1006
  })();
1035
- return /* @__PURE__ */jsxs8(Flex, {
1007
+ return /* @__PURE__ */jsxs7(Flex, {
1036
1008
  sx: {
1037
1009
  gap: "4",
1038
1010
  flex: 1
@@ -1044,7 +1016,7 @@ var ValueContainer = ({
1044
1016
  lineHeight: 0,
1045
1017
  fontSize: "md"
1046
1018
  },
1047
- children: /* @__PURE__ */jsx17(Icon8, {
1019
+ children: /* @__PURE__ */jsx17(Icon7, {
1048
1020
  icon: finalLeadingIcon
1049
1021
  })
1050
1022
  }), /* @__PURE__ */jsx17(Flex, {
@@ -1062,7 +1034,7 @@ var ValueContainer = ({
1062
1034
  fontSize: "md",
1063
1035
  color: trailingIconColor
1064
1036
  },
1065
- children: /* @__PURE__ */jsx17(Icon8, {
1037
+ children: /* @__PURE__ */jsx17(Icon7, {
1066
1038
  icon: hasError ? "warning-alt" : trailingIcon
1067
1039
  })
1068
1040
  })]
@@ -1154,17 +1126,17 @@ var Switch = props => {
1154
1126
  };
1155
1127
 
1156
1128
  // src/components/Textarea.tsx
1157
- import { Icon as Icon9 } from "@ttoss/react-icons";
1129
+ import { Icon as Icon8 } from "@ttoss/react-icons";
1158
1130
  import * as React13 from "react";
1159
1131
  import { Textarea as TextareaUI } from "theme-ui";
1160
- import { jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
1132
+ import { jsx as jsx20, jsxs as jsxs8 } from "react/jsx-runtime";
1161
1133
  var Textarea = React13.forwardRef(({
1162
1134
  trailingIcon,
1163
1135
  className,
1164
1136
  sx,
1165
1137
  ...textareaProps
1166
1138
  }, ref) => {
1167
- return /* @__PURE__ */jsxs9(Flex, {
1139
+ return /* @__PURE__ */jsxs8(Flex, {
1168
1140
  className,
1169
1141
  sx: {
1170
1142
  ...sx,
@@ -1190,7 +1162,7 @@ var Textarea = React13.forwardRef(({
1190
1162
  right: "1.25rem",
1191
1163
  top: "0.75rem"
1192
1164
  },
1193
- children: /* @__PURE__ */jsx20(Icon9, {
1165
+ children: /* @__PURE__ */jsx20(Icon8, {
1194
1166
  inline: true,
1195
1167
  icon: trailingIcon
1196
1168
  })
@@ -1243,14 +1215,14 @@ var Tooltip = props => {
1243
1215
  import { css, Global } from "@emotion/react";
1244
1216
  import { BruttalFonts, BruttalTheme } from "@ttoss/theme/Bruttal";
1245
1217
  import { ThemeUIProvider } from "theme-ui";
1246
- import { Fragment as Fragment2, jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
1218
+ import { Fragment as Fragment2, jsx as jsx22, jsxs as jsxs9 } from "react/jsx-runtime";
1247
1219
  var ThemeProvider = ({
1248
1220
  children,
1249
1221
  theme = BruttalTheme,
1250
1222
  fonts = BruttalFonts
1251
1223
  }) => {
1252
1224
  return /* @__PURE__ */jsx22(Fragment2, {
1253
- children: /* @__PURE__ */jsxs10(ThemeUIProvider, {
1225
+ children: /* @__PURE__ */jsxs9(ThemeUIProvider, {
1254
1226
  theme,
1255
1227
  children: [/* @__PURE__ */jsx22(Global, {
1256
1228
  styles: css`
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { IconType } from '@ttoss/react-icons';
3
3
  import * as React from 'react';
4
4
  import * as theme_ui from 'theme-ui';
5
- import { ButtonProps as ButtonProps$1, BadgeProps as BadgeProps$1, CardProps, BoxProps, CheckboxProps as CheckboxProps$1, TextProps, IconButtonProps as IconButtonProps$1, InputProps as InputProps$1, LabelProps as LabelProps$1, LinkProps as LinkProps$1, FlexProps, SxProp, SwitchProps, TextareaProps as TextareaProps$1, Theme } from 'theme-ui';
5
+ import { ButtonProps as ButtonProps$1, BadgeProps as BadgeProps$1, CardProps, BoxProps, CheckboxProps as CheckboxProps$1, CloseProps, TextProps, IconButtonProps as IconButtonProps$1, InputProps as InputProps$1, LabelProps as LabelProps$1, LinkProps as LinkProps$1, FlexProps, SxProp, SwitchProps, TextareaProps as TextareaProps$1, Theme } from 'theme-ui';
6
6
  export { BaseStyles, Box, BoxProps, CardProps, ContainerProps, Divider, DividerProps, Flex, FlexProps, Global, Grid, GridProps, Heading, HeadingProps, Image, ImageProps, Progress as LinearProgress, ProgressProps as LinearProgressProps, Paragraph, ParagraphProps, Radio, RadioProps, Slider, SliderProps, Spinner, SpinnerProps, SwitchProps, SxProp, Text, TextProps, Theme, ThemeUIStyleObject } from 'theme-ui';
7
7
  import { Props } from 'react-select';
8
8
  import { ITooltip } from 'react-tooltip';
@@ -41,8 +41,8 @@ interface CheckboxProps extends CheckboxProps$1 {
41
41
  }
42
42
  declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
43
43
 
44
- type CloseButtonProps = ButtonProps & {
45
- label?: string;
44
+ type CloseButtonProps = CloseProps & {
45
+ ariaLabel?: string;
46
46
  };
47
47
  declare const CloseButton: (props: CloseButtonProps) => react_jsx_runtime.JSX.Element;
48
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/ui",
3
- "version": "5.6.0",
3
+ "version": "5.6.1",
4
4
  "description": "Primitive layout, typographic, and other components for styling applications.",
5
5
  "license": "MIT",
6
6
  "author": "ttoss",
@@ -29,7 +29,7 @@
29
29
  "react-select": "^5.9.0",
30
30
  "react-tooltip": "^5.28.0",
31
31
  "theme-ui": "^0.17.1",
32
- "@ttoss/theme": "^2.5.7"
32
+ "@ttoss/theme": "^2.5.8"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "@emotion/react": "^11",
@@ -44,9 +44,9 @@
44
44
  "jest": "^29.7.0",
45
45
  "react": "^19.0.0",
46
46
  "tsup": "^8.3.5",
47
+ "@ttoss/config": "^1.35.3",
47
48
  "@ttoss/react-icons": "^0.4.11",
48
- "@ttoss/test-utils": "^2.1.23",
49
- "@ttoss/config": "^1.35.3"
49
+ "@ttoss/test-utils": "^2.1.23"
50
50
  },
51
51
  "keywords": [
52
52
  "React",