@ttoss/ui 1.31.5 → 1.31.6
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 +16 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.js +17 -0
- package/package.json +3 -3
- package/src/components/HelpText.tsx +20 -0
- package/src/index.ts +1 -0
package/dist/esm/index.js
CHANGED
|
@@ -248,4 +248,19 @@ import { Textarea } from "theme-ui";
|
|
|
248
248
|
|
|
249
249
|
// src/components/Container.tsx
|
|
250
250
|
import { Container } from "theme-ui";
|
|
251
|
-
|
|
251
|
+
|
|
252
|
+
// src/components/HelpText.tsx
|
|
253
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
254
|
+
var HelpText = ({
|
|
255
|
+
disabled,
|
|
256
|
+
negative,
|
|
257
|
+
...props
|
|
258
|
+
}) => {
|
|
259
|
+
const variant = ["text.help", negative ? "negative" : void 0].filter(Boolean).join(".");
|
|
260
|
+
return /* @__PURE__ */jsx7(Text, {
|
|
261
|
+
variant,
|
|
262
|
+
"aria-disabled": disabled ? "true" : void 0,
|
|
263
|
+
...props
|
|
264
|
+
});
|
|
265
|
+
};
|
|
266
|
+
export { Badge, BaseStyles, Box, Button, Card, Checkbox, Container, Divider, Flex, Grid, Heading, HelpText, Icon, IconButton, Image, InfiniteLinearProgress, Input, Label, Progress as LinearProgress, Link, Radio, Select, Slider, Spinner, Text, Textarea, ThemeProvider, useBreakpointIndex, useResponsiveValue, useTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as theme_ui from 'theme-ui';
|
|
2
|
-
import { Theme, BadgeProps as BadgeProps$1, ButtonProps as ButtonProps$1, InputProps as InputProps$1 } from 'theme-ui';
|
|
2
|
+
import { Theme, BadgeProps as BadgeProps$1, ButtonProps as ButtonProps$1, InputProps as InputProps$1, TextProps } from 'theme-ui';
|
|
3
3
|
export { BaseStyles, Box, BoxProps, Card, CardProps, Checkbox, CheckboxProps, Container, ContainerProps, Divider, DividerProps, Flex, FlexProps, Grid, GridProps, Heading, HeadingProps, IconButton, IconButtonProps, Image, ImageProps, Label, LabelProps, Progress as LinearProgress, ProgressProps as LinearProgressProps, Link, LinkProps, Radio, RadioProps, Select, SelectProps, Slider, SliderProps, Spinner, SpinnerProps, Text, TextProps, Textarea, TextareaProps, Theme } from 'theme-ui';
|
|
4
4
|
export { useBreakpointIndex, useResponsiveValue } from '@theme-ui/match-media';
|
|
5
5
|
import * as React from 'react';
|
|
@@ -42,4 +42,10 @@ declare const Input: React__default.ForwardRefExoticComponent<Omit<InputProps, "
|
|
|
42
42
|
|
|
43
43
|
declare const InfiniteLinearProgress: () => JSX.Element;
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
type HelpTextProps = Omit<TextProps, 'variant'> & {
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
negative?: boolean;
|
|
48
|
+
};
|
|
49
|
+
declare const HelpText: ({ disabled, negative, ...props }: HelpTextProps) => JSX.Element;
|
|
50
|
+
|
|
51
|
+
export { Badge, BadgeProps, Button, ButtonProps, HelpText, HelpTextProps, Icon, IconProps, IconType, InfiniteLinearProgress, Input, InputProps, ThemeProvider, ThemeProviderProps, useTheme };
|
package/dist/index.js
CHANGED
|
@@ -49,6 +49,7 @@ __export(src_exports, {
|
|
|
49
49
|
Flex: () => import_theme_ui8.Flex,
|
|
50
50
|
Grid: () => import_theme_ui9.Grid,
|
|
51
51
|
Heading: () => import_theme_ui10.Heading,
|
|
52
|
+
HelpText: () => HelpText,
|
|
52
53
|
Icon: () => Icon,
|
|
53
54
|
IconButton: () => import_theme_ui20.IconButton,
|
|
54
55
|
Image: () => import_theme_ui11.Image,
|
|
@@ -316,6 +317,21 @@ var import_theme_ui23 = require("theme-ui");
|
|
|
316
317
|
|
|
317
318
|
// src/components/Container.tsx
|
|
318
319
|
var import_theme_ui24 = require("theme-ui");
|
|
320
|
+
|
|
321
|
+
// src/components/HelpText.tsx
|
|
322
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
323
|
+
var HelpText = ({
|
|
324
|
+
disabled,
|
|
325
|
+
negative,
|
|
326
|
+
...props
|
|
327
|
+
}) => {
|
|
328
|
+
const variant = ["text.help", negative ? "negative" : void 0].filter(Boolean).join(".");
|
|
329
|
+
return /* @__PURE__ */(0, import_jsx_runtime7.jsx)(import_theme_ui16.Text, {
|
|
330
|
+
variant,
|
|
331
|
+
"aria-disabled": disabled ? "true" : void 0,
|
|
332
|
+
...props
|
|
333
|
+
});
|
|
334
|
+
};
|
|
319
335
|
// Annotate the CommonJS export names for ESM import in node:
|
|
320
336
|
0 && (module.exports = {
|
|
321
337
|
Badge,
|
|
@@ -329,6 +345,7 @@ var import_theme_ui24 = require("theme-ui");
|
|
|
329
345
|
Flex,
|
|
330
346
|
Grid,
|
|
331
347
|
Heading,
|
|
348
|
+
HelpText,
|
|
332
349
|
Icon,
|
|
333
350
|
IconButton,
|
|
334
351
|
Image,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/ui",
|
|
3
|
-
"version": "1.31.
|
|
3
|
+
"version": "1.31.6",
|
|
4
4
|
"description": "Primitive layout, typographic, and other components for styling applications.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "ttoss",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@emotion/react": "^11.10.6",
|
|
25
25
|
"@iconify-icon/react": "^1.0.7",
|
|
26
26
|
"@theme-ui/match-media": "^0.15.5",
|
|
27
|
-
"@ttoss/theme": "^1.4.
|
|
27
|
+
"@ttoss/theme": "^1.4.6",
|
|
28
28
|
"theme-ui": "^0.15.5"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "ce34db105b7f475a90660d77b194d6ea33b71960"
|
|
50
50
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Text, TextProps } from './Text';
|
|
2
|
+
|
|
3
|
+
export type HelpTextProps = Omit<TextProps, 'variant'> & {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
negative?: boolean;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const HelpText = ({ disabled, negative, ...props }: HelpTextProps) => {
|
|
9
|
+
const variant = ['text.help', negative ? 'negative' : undefined]
|
|
10
|
+
.filter(Boolean)
|
|
11
|
+
.join('.');
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<Text
|
|
15
|
+
variant={variant}
|
|
16
|
+
aria-disabled={disabled ? 'true' : undefined}
|
|
17
|
+
{...props}
|
|
18
|
+
/>
|
|
19
|
+
);
|
|
20
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -32,3 +32,4 @@ export { Checkbox, type CheckboxProps } from './components/Checkbox';
|
|
|
32
32
|
export { InfiniteLinearProgress } from './components/InfiniteLinearProgress';
|
|
33
33
|
export { Textarea, type TextareaProps } from './components/Textarea';
|
|
34
34
|
export { Container, type ContainerProps } from './components/Container';
|
|
35
|
+
export { HelpText, type HelpTextProps } from './components/HelpText';
|