@ttoss/ui 5.8.0 → 5.8.2
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 +66 -11
- package/dist/index.d.ts +6 -1
- package/package.json +11 -11
package/dist/esm/index.js
CHANGED
|
@@ -1132,11 +1132,66 @@ var Switch = props => {
|
|
|
1132
1132
|
});
|
|
1133
1133
|
};
|
|
1134
1134
|
|
|
1135
|
+
// src/components/Tag.tsx
|
|
1136
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1137
|
+
var Tag = ({
|
|
1138
|
+
children
|
|
1139
|
+
}) => {
|
|
1140
|
+
if (Array.isArray(children)) {
|
|
1141
|
+
return /* @__PURE__ */jsx20(Box, {
|
|
1142
|
+
as: "span",
|
|
1143
|
+
sx: {
|
|
1144
|
+
ml: 2,
|
|
1145
|
+
display: "inline-flex",
|
|
1146
|
+
alignItems: "center",
|
|
1147
|
+
gap: 1
|
|
1148
|
+
},
|
|
1149
|
+
children: children.map((child, i) => {
|
|
1150
|
+
return /* @__PURE__ */jsx20(Box, {
|
|
1151
|
+
as: "span",
|
|
1152
|
+
sx: {
|
|
1153
|
+
px: 2,
|
|
1154
|
+
py: 0,
|
|
1155
|
+
fontSize: "xs",
|
|
1156
|
+
borderRadius: "full",
|
|
1157
|
+
backgroundColor: "display.background.secondary.default",
|
|
1158
|
+
color: "text.secondary",
|
|
1159
|
+
border: "1px solid",
|
|
1160
|
+
borderColor: "border.default",
|
|
1161
|
+
fontWeight: "medium",
|
|
1162
|
+
lineHeight: 1.5
|
|
1163
|
+
},
|
|
1164
|
+
children: child
|
|
1165
|
+
}, i);
|
|
1166
|
+
})
|
|
1167
|
+
});
|
|
1168
|
+
}
|
|
1169
|
+
return /* @__PURE__ */jsx20(Box, {
|
|
1170
|
+
as: "span",
|
|
1171
|
+
sx: {
|
|
1172
|
+
ml: 2,
|
|
1173
|
+
px: 2,
|
|
1174
|
+
py: 0,
|
|
1175
|
+
fontSize: "xs",
|
|
1176
|
+
borderRadius: "full",
|
|
1177
|
+
backgroundColor: "display.background.secondary.default",
|
|
1178
|
+
color: "text.secondary",
|
|
1179
|
+
border: "1px solid",
|
|
1180
|
+
borderColor: "border.default",
|
|
1181
|
+
fontWeight: "medium",
|
|
1182
|
+
lineHeight: 1.5,
|
|
1183
|
+
display: "inline-flex",
|
|
1184
|
+
alignItems: "center"
|
|
1185
|
+
},
|
|
1186
|
+
children
|
|
1187
|
+
});
|
|
1188
|
+
};
|
|
1189
|
+
|
|
1135
1190
|
// src/components/Textarea.tsx
|
|
1136
1191
|
import { Icon as Icon8 } from "@ttoss/react-icons";
|
|
1137
1192
|
import * as React13 from "react";
|
|
1138
1193
|
import { Textarea as TextareaUI } from "theme-ui";
|
|
1139
|
-
import { jsx as
|
|
1194
|
+
import { jsx as jsx21, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1140
1195
|
var Textarea = React13.forwardRef(({
|
|
1141
1196
|
trailingIcon,
|
|
1142
1197
|
className,
|
|
@@ -1151,7 +1206,7 @@ var Textarea = React13.forwardRef(({
|
|
|
1151
1206
|
padding: 0,
|
|
1152
1207
|
border: "none"
|
|
1153
1208
|
},
|
|
1154
|
-
children: [/* @__PURE__ */
|
|
1209
|
+
children: [/* @__PURE__ */jsx21(TextareaUI, {
|
|
1155
1210
|
ref,
|
|
1156
1211
|
sx: {
|
|
1157
1212
|
fontFamily: "body",
|
|
@@ -1163,13 +1218,13 @@ var Textarea = React13.forwardRef(({
|
|
|
1163
1218
|
},
|
|
1164
1219
|
className,
|
|
1165
1220
|
...textareaProps
|
|
1166
|
-
}), trailingIcon && /* @__PURE__ */
|
|
1221
|
+
}), trailingIcon && /* @__PURE__ */jsx21(Text, {
|
|
1167
1222
|
sx: {
|
|
1168
1223
|
position: "absolute",
|
|
1169
1224
|
right: "1.25rem",
|
|
1170
1225
|
top: "0.75rem"
|
|
1171
1226
|
},
|
|
1172
|
-
children: /* @__PURE__ */
|
|
1227
|
+
children: /* @__PURE__ */jsx21(Icon8, {
|
|
1173
1228
|
inline: true,
|
|
1174
1229
|
icon: trailingIcon
|
|
1175
1230
|
})
|
|
@@ -1180,7 +1235,7 @@ Textarea.displayName = "Textarea";
|
|
|
1180
1235
|
|
|
1181
1236
|
// src/components/Tooltip.tsx
|
|
1182
1237
|
import { Tooltip as TooltipReact } from "react-tooltip";
|
|
1183
|
-
import { jsx as
|
|
1238
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1184
1239
|
var Tooltip = ({
|
|
1185
1240
|
variant = "info",
|
|
1186
1241
|
sx,
|
|
@@ -1212,7 +1267,7 @@ var Tooltip = ({
|
|
|
1212
1267
|
};
|
|
1213
1268
|
return variants[variantType] || variants.info;
|
|
1214
1269
|
};
|
|
1215
|
-
return /* @__PURE__ */
|
|
1270
|
+
return /* @__PURE__ */jsx22(Box, {
|
|
1216
1271
|
sx: ({
|
|
1217
1272
|
fonts
|
|
1218
1273
|
}) => {
|
|
@@ -1243,7 +1298,7 @@ var Tooltip = ({
|
|
|
1243
1298
|
[`&.tooltip-${variant}`]: variantStyles
|
|
1244
1299
|
};
|
|
1245
1300
|
},
|
|
1246
|
-
children: /* @__PURE__ */
|
|
1301
|
+
children: /* @__PURE__ */jsx22(TooltipReact, {
|
|
1247
1302
|
className,
|
|
1248
1303
|
...props,
|
|
1249
1304
|
classNameArrow: "example-arrow",
|
|
@@ -1256,16 +1311,16 @@ var Tooltip = ({
|
|
|
1256
1311
|
import { css, Global } from "@emotion/react";
|
|
1257
1312
|
import { BruttalFonts, BruttalTheme } from "@ttoss/theme/Bruttal";
|
|
1258
1313
|
import { ThemeUIProvider } from "theme-ui";
|
|
1259
|
-
import { Fragment as Fragment2, jsx as
|
|
1314
|
+
import { Fragment as Fragment2, jsx as jsx23, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1260
1315
|
var ThemeProvider = ({
|
|
1261
1316
|
children,
|
|
1262
1317
|
theme = BruttalTheme,
|
|
1263
1318
|
fonts = BruttalFonts
|
|
1264
1319
|
}) => {
|
|
1265
|
-
return /* @__PURE__ */
|
|
1320
|
+
return /* @__PURE__ */jsx23(Fragment2, {
|
|
1266
1321
|
children: /* @__PURE__ */jsxs9(ThemeUIProvider, {
|
|
1267
1322
|
theme,
|
|
1268
|
-
children: [/* @__PURE__ */
|
|
1323
|
+
children: [/* @__PURE__ */jsx23(Global, {
|
|
1269
1324
|
styles: css`
|
|
1270
1325
|
${fonts.map(url => {
|
|
1271
1326
|
return `@import url('${url}');`;
|
|
@@ -1284,4 +1339,4 @@ var useTheme = useThemeUI;
|
|
|
1284
1339
|
import { keyframes } from "@emotion/react";
|
|
1285
1340
|
import { useBreakpointIndex, useResponsiveValue } from "@theme-ui/match-media";
|
|
1286
1341
|
import { BaseStyles, Global as Global2 } from "theme-ui";
|
|
1287
|
-
export { ActionButton, Badge, BaseStyles, Box, Button, Card, Checkbox, CloseButton, Container, Divider, Flex, Global2 as Global, Grid, Heading, HelpText, IconButton, Image, InfiniteLinearProgress, Input, InputNumber, InputPassword, Label, Progress as LinearProgress, Link, Paragraph, Radio, SegmentedControl, Select, Slider, Spinner, Stack, Switch, Text, Textarea, ThemeProvider, Tooltip, keyframes, useBreakpointIndex, useResponsiveValue, useTheme };
|
|
1342
|
+
export { ActionButton, Badge, BaseStyles, Box, Button, Card, Checkbox, CloseButton, Container, Divider, Flex, Global2 as Global, Grid, Heading, HelpText, IconButton, Image, InfiniteLinearProgress, Input, InputNumber, InputPassword, Label, Progress as LinearProgress, Link, Paragraph, Radio, SegmentedControl, Select, Slider, Spinner, Stack, Switch, Tag, Text, Textarea, ThemeProvider, Tooltip, keyframes, useBreakpointIndex, useResponsiveValue, useTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -159,6 +159,11 @@ declare const Stack: (props: StackProps) => react_jsx_runtime.JSX.Element;
|
|
|
159
159
|
|
|
160
160
|
declare const Switch: (props: SwitchProps) => react_jsx_runtime.JSX.Element;
|
|
161
161
|
|
|
162
|
+
type TagProps = {
|
|
163
|
+
children: React.ReactNode | React.ReactNode[];
|
|
164
|
+
};
|
|
165
|
+
declare const Tag: ({ children }: TagProps) => react_jsx_runtime.JSX.Element;
|
|
166
|
+
|
|
162
167
|
interface TextareaProps extends TextareaProps$1 {
|
|
163
168
|
trailingIcon?: IconType;
|
|
164
169
|
}
|
|
@@ -178,4 +183,4 @@ declare const ThemeProvider: ({ children, theme, fonts, }: ThemeProviderProps) =
|
|
|
178
183
|
|
|
179
184
|
declare const useTheme: () => theme_ui.ThemeUIContextValue;
|
|
180
185
|
|
|
181
|
-
export { ActionButton, type ActionButtonProps, Badge, type BadgeProps, Button, type ButtonProps, Card, Checkbox, type CheckboxProps, CloseButton, type CloseButtonProps, Container, HelpText, type HelpTextProps, IconButton, type IconButtonProps, InfiniteLinearProgress, Input, InputNumber, type InputNumberProps, InputPassword, type InputPasswordProps, type InputProps, Label, type LabelProps, Link, type LinkProps, SegmentedControl, type SegmentedControlProps, Select, type SelectOption, type SelectOptions, type SelectProps, Stack, type StackProps, Switch, Textarea, type TextareaProps, ThemeProvider, type ThemeProviderProps, Tooltip, useTheme };
|
|
186
|
+
export { ActionButton, type ActionButtonProps, Badge, type BadgeProps, Button, type ButtonProps, Card, Checkbox, type CheckboxProps, CloseButton, type CloseButtonProps, Container, HelpText, type HelpTextProps, IconButton, type IconButtonProps, InfiniteLinearProgress, Input, InputNumber, type InputNumberProps, InputPassword, type InputPasswordProps, type InputProps, Label, type LabelProps, Link, type LinkProps, SegmentedControl, type SegmentedControlProps, Select, type SelectOption, type SelectOptions, type SelectProps, Stack, type StackProps, Switch, Tag, type TagProps, Textarea, type TextareaProps, ThemeProvider, type ThemeProviderProps, Tooltip, useTheme };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/ui",
|
|
3
|
-
"version": "5.8.
|
|
3
|
+
"version": "5.8.2",
|
|
4
4
|
"description": "Primitive layout, typographic, and other components for styling applications.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ttoss",
|
|
@@ -29,24 +29,24 @@
|
|
|
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.6.
|
|
32
|
+
"@ttoss/theme": "^2.6.1"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@emotion/react": "^11",
|
|
36
36
|
"react": ">=16.8.0",
|
|
37
|
-
"@ttoss/react-icons": "^0.4.
|
|
37
|
+
"@ttoss/react-icons": "^0.4.12"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@emotion/react": "^11.14.0",
|
|
41
41
|
"@iconify-icons/mdi-light": "^1.2.5",
|
|
42
|
-
"@types/jest": "^
|
|
43
|
-
"@types/react": "^19.
|
|
44
|
-
"jest": "^
|
|
45
|
-
"react": "^19.
|
|
46
|
-
"tsup": "^8.
|
|
47
|
-
"@ttoss/config": "^1.35.
|
|
48
|
-
"@ttoss/
|
|
49
|
-
"@ttoss/
|
|
42
|
+
"@types/jest": "^30.0.0",
|
|
43
|
+
"@types/react": "^19.1.8",
|
|
44
|
+
"jest": "^30.0.2",
|
|
45
|
+
"react": "^19.1.0",
|
|
46
|
+
"tsup": "^8.5.0",
|
|
47
|
+
"@ttoss/config": "^1.35.4",
|
|
48
|
+
"@ttoss/react-icons": "^0.4.12",
|
|
49
|
+
"@ttoss/test-utils": "^2.1.24"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"React",
|