@ttoss/ui 1.36.3 → 1.36.5
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 +32 -32
- package/dist/index.d.ts +2 -2
- package/dist/index.js +31 -31
- package/package.json +2 -3
- package/src/components/InputNumber.tsx +3 -3
- package/src/components/Select.tsx +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -37,10 +37,10 @@ var useTheme = useThemeUI;
|
|
|
37
37
|
import { Badge as BadgeUi } from "theme-ui";
|
|
38
38
|
|
|
39
39
|
// src/components/Icon.tsx
|
|
40
|
-
import * as
|
|
40
|
+
import * as React from "react";
|
|
41
41
|
import { Icon as IconifyIcon } from "@iconify-icon/react";
|
|
42
42
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
43
|
-
var Icon = /*#__PURE__*/
|
|
43
|
+
var Icon = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
44
44
|
return /* @__PURE__ */jsx2(IconifyIcon, {
|
|
45
45
|
ref,
|
|
46
46
|
"data-testid": "iconify-icon",
|
|
@@ -76,10 +76,10 @@ var Badge = ({
|
|
|
76
76
|
import { Box } from "theme-ui";
|
|
77
77
|
|
|
78
78
|
// src/components/Button.tsx
|
|
79
|
-
import * as
|
|
79
|
+
import * as React2 from "react";
|
|
80
80
|
import { Button as ButtonUi } from "theme-ui";
|
|
81
81
|
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
82
|
-
var Button = /*#__PURE__*/
|
|
82
|
+
var Button = /*#__PURE__*/React2.forwardRef((props, ref) => {
|
|
83
83
|
const {
|
|
84
84
|
children,
|
|
85
85
|
leftIcon,
|
|
@@ -130,10 +130,10 @@ import { Heading } from "theme-ui";
|
|
|
130
130
|
import { Image } from "theme-ui";
|
|
131
131
|
|
|
132
132
|
// src/components/Input.tsx
|
|
133
|
-
import * as
|
|
133
|
+
import * as React3 from "react";
|
|
134
134
|
import { Input as InputUI } from "theme-ui";
|
|
135
135
|
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
136
|
-
var Input = /*#__PURE__*/
|
|
136
|
+
var Input = /*#__PURE__*/React3.forwardRef(({
|
|
137
137
|
leadingIcon,
|
|
138
138
|
onLeadingIconClick,
|
|
139
139
|
trailingIcon,
|
|
@@ -220,9 +220,9 @@ var Label = ({
|
|
|
220
220
|
|
|
221
221
|
// src/components/Link.tsx
|
|
222
222
|
import { Link as LinkUi } from "theme-ui";
|
|
223
|
-
import
|
|
223
|
+
import React4 from "react";
|
|
224
224
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
225
|
-
var Link = /*#__PURE__*/
|
|
225
|
+
var Link = /*#__PURE__*/React4.forwardRef(({
|
|
226
226
|
quiet,
|
|
227
227
|
className,
|
|
228
228
|
...props
|
|
@@ -242,10 +242,10 @@ import { Progress } from "theme-ui";
|
|
|
242
242
|
import { Text } from "theme-ui";
|
|
243
243
|
|
|
244
244
|
// src/components/Select.tsx
|
|
245
|
-
import
|
|
246
|
-
import
|
|
245
|
+
import * as React5 from "react";
|
|
246
|
+
import { SelectProps, Select as SelectUi } from "theme-ui";
|
|
247
247
|
import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
248
|
-
var Select = /*#__PURE__*/
|
|
248
|
+
var Select = /*#__PURE__*/React5.forwardRef(({
|
|
249
249
|
arrow,
|
|
250
250
|
...props
|
|
251
251
|
}, ref) => {
|
|
@@ -295,10 +295,10 @@ import { Spinner } from "theme-ui";
|
|
|
295
295
|
import { Radio } from "theme-ui";
|
|
296
296
|
|
|
297
297
|
// src/components/IconButton.tsx
|
|
298
|
-
import * as
|
|
298
|
+
import * as React6 from "react";
|
|
299
299
|
import { IconButton as IconButtonUi } from "theme-ui";
|
|
300
300
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
301
|
-
var IconButton = /*#__PURE__*/
|
|
301
|
+
var IconButton = /*#__PURE__*/React6.forwardRef((props, ref) => {
|
|
302
302
|
return /* @__PURE__ */jsx9(IconButtonUi, {
|
|
303
303
|
type: "button",
|
|
304
304
|
...props,
|
|
@@ -314,12 +314,12 @@ import { Slider } from "theme-ui";
|
|
|
314
314
|
import { Checkbox } from "theme-ui";
|
|
315
315
|
|
|
316
316
|
// src/components/InfiniteLinearProgress.tsx
|
|
317
|
-
import * as
|
|
317
|
+
import * as React7 from "react";
|
|
318
318
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
319
319
|
var MAX_PROGRESS = 100;
|
|
320
320
|
var InfiniteLinearProgress = () => {
|
|
321
|
-
const [progress, setProgress] =
|
|
322
|
-
|
|
321
|
+
const [progress, setProgress] = React7.useState(0);
|
|
322
|
+
React7.useEffect(() => {
|
|
323
323
|
const timer = setInterval(() => {
|
|
324
324
|
setProgress(oldProgress => {
|
|
325
325
|
if (oldProgress === MAX_PROGRESS) {
|
|
@@ -349,9 +349,9 @@ var InfiniteLinearProgress = () => {
|
|
|
349
349
|
|
|
350
350
|
// src/components/Textarea.tsx
|
|
351
351
|
import { Textarea as TextareaUI } from "theme-ui";
|
|
352
|
-
import
|
|
352
|
+
import React8 from "react";
|
|
353
353
|
import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
354
|
-
var Textarea = /*#__PURE__*/
|
|
354
|
+
var Textarea = /*#__PURE__*/React8.forwardRef(({
|
|
355
355
|
trailingIcon,
|
|
356
356
|
className,
|
|
357
357
|
sx,
|
|
@@ -408,10 +408,10 @@ var HelpText = ({
|
|
|
408
408
|
};
|
|
409
409
|
|
|
410
410
|
// src/components/CloseButton.tsx
|
|
411
|
-
import * as
|
|
411
|
+
import * as React9 from "react";
|
|
412
412
|
import { Button as Button2 } from "theme-ui";
|
|
413
413
|
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
414
|
-
var CloseButton = /*#__PURE__*/
|
|
414
|
+
var CloseButton = /*#__PURE__*/React9.forwardRef(({
|
|
415
415
|
label,
|
|
416
416
|
onlyText,
|
|
417
417
|
...props
|
|
@@ -433,10 +433,10 @@ var CloseButton = /*#__PURE__*/React10.forwardRef(({
|
|
|
433
433
|
CloseButton.displayName = "CloseButton";
|
|
434
434
|
|
|
435
435
|
// src/components/InputNumber.tsx
|
|
436
|
+
import * as React10 from "react";
|
|
436
437
|
import { Input as Input2 } from "theme-ui";
|
|
437
|
-
import React11 from "react";
|
|
438
438
|
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
439
|
-
var InputNumber = /*#__PURE__*/
|
|
439
|
+
var InputNumber = /*#__PURE__*/React10.forwardRef(({
|
|
440
440
|
sx,
|
|
441
441
|
value,
|
|
442
442
|
infoIcon,
|
|
@@ -444,14 +444,14 @@ var InputNumber = /*#__PURE__*/React11.forwardRef(({
|
|
|
444
444
|
onClickInfoIcon,
|
|
445
445
|
...inputProps
|
|
446
446
|
}, ref) => {
|
|
447
|
-
const sxProps =
|
|
447
|
+
const sxProps = React10.useMemo(() => {
|
|
448
448
|
const size = String(typeof value === "undefined" ? 0 : value).length;
|
|
449
449
|
if (inputProps["aria-invalid"] === "true") {
|
|
450
450
|
return {
|
|
451
451
|
width: `calc(139px + ${size > 1 ? size * 10 : 0}px)`,
|
|
452
452
|
textAlign: "left",
|
|
453
453
|
"&[type=number]::-webkit-inner-spin-button, &[type=number]::-webkit-outer-spin-button": {
|
|
454
|
-
|
|
454
|
+
WebkitAppearance: "none",
|
|
455
455
|
margin: 0
|
|
456
456
|
},
|
|
457
457
|
...sx,
|
|
@@ -464,7 +464,7 @@ var InputNumber = /*#__PURE__*/React11.forwardRef(({
|
|
|
464
464
|
width: `calc(108px + ${size > 1 ? size * 10 : 0}px)`,
|
|
465
465
|
textAlign: "center",
|
|
466
466
|
"&[type=number]::-webkit-inner-spin-button, &[type=number]::-webkit-outer-spin-button": {
|
|
467
|
-
|
|
467
|
+
WebkitAppearance: "none",
|
|
468
468
|
margin: 0
|
|
469
469
|
},
|
|
470
470
|
...sx,
|
|
@@ -555,9 +555,9 @@ var InputNumber = /*#__PURE__*/React11.forwardRef(({
|
|
|
555
555
|
InputNumber.displayName = "InputNumber";
|
|
556
556
|
|
|
557
557
|
// src/components/Stack.tsx
|
|
558
|
-
import * as
|
|
558
|
+
import * as React11 from "react";
|
|
559
559
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
560
|
-
var Stack = /*#__PURE__*/
|
|
560
|
+
var Stack = /*#__PURE__*/React11.forwardRef((props, ref) => {
|
|
561
561
|
return /* @__PURE__ */jsx15(Flex, {
|
|
562
562
|
ref,
|
|
563
563
|
...props,
|
|
@@ -573,16 +573,16 @@ Stack.displayName = "Stack";
|
|
|
573
573
|
import { Paragraph } from "theme-ui";
|
|
574
574
|
|
|
575
575
|
// src/components/InputPassword/InputPassword.tsx
|
|
576
|
-
import * as
|
|
576
|
+
import * as React13 from "react";
|
|
577
577
|
|
|
578
578
|
// src/components/InputPassword/useHidePassInput.ts
|
|
579
|
-
import * as
|
|
579
|
+
import * as React12 from "react";
|
|
580
580
|
var useHidePassInput = (defaultValue = true) => {
|
|
581
|
-
const [hidePass, setHidePass] =
|
|
581
|
+
const [hidePass, setHidePass] = React12.useState(Boolean(defaultValue));
|
|
582
582
|
const {
|
|
583
583
|
icon,
|
|
584
584
|
inputType
|
|
585
|
-
} =
|
|
585
|
+
} = React12.useMemo(() => {
|
|
586
586
|
return {
|
|
587
587
|
icon: hidePass ? "view-off" : "view-on",
|
|
588
588
|
inputType: hidePass ? "password" : "text"
|
|
@@ -602,7 +602,7 @@ var useHidePassInput = (defaultValue = true) => {
|
|
|
602
602
|
|
|
603
603
|
// src/components/InputPassword/InputPassword.tsx
|
|
604
604
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
605
|
-
var InputPassword = /*#__PURE__*/
|
|
605
|
+
var InputPassword = /*#__PURE__*/React13.forwardRef(({
|
|
606
606
|
showPasswordByDefault,
|
|
607
607
|
...inputPasswordProps
|
|
608
608
|
}, ref) => {
|
package/dist/index.d.ts
CHANGED
|
@@ -54,7 +54,7 @@ type LinkProps = LinkProps$1 & {
|
|
|
54
54
|
};
|
|
55
55
|
declare const Link: React__default.ForwardRefExoticComponent<Omit<LinkProps, "ref"> & React__default.RefAttributes<HTMLAnchorElement>>;
|
|
56
56
|
|
|
57
|
-
declare const Select:
|
|
57
|
+
declare const Select: React.ForwardRefExoticComponent<Omit<SelectProps, "ref"> & React.RefAttributes<HTMLSelectElement>>;
|
|
58
58
|
|
|
59
59
|
declare const IconButton: React.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
60
60
|
|
|
@@ -83,7 +83,7 @@ type InputNumberProps = Omit<InputProps$1, 'type' | 'variant' | 'onChange'> & {
|
|
|
83
83
|
infoIcon?: boolean;
|
|
84
84
|
onClickInfoIcon?: () => void;
|
|
85
85
|
};
|
|
86
|
-
declare const InputNumber:
|
|
86
|
+
declare const InputNumber: React.ForwardRefExoticComponent<Omit<InputNumberProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
87
87
|
|
|
88
88
|
type StackProps = FlexProps;
|
|
89
89
|
/**
|
package/dist/index.js
CHANGED
|
@@ -71,7 +71,7 @@ __export(src_exports, {
|
|
|
71
71
|
Text: () => import_theme_ui16.Text,
|
|
72
72
|
Textarea: () => Textarea,
|
|
73
73
|
ThemeProvider: () => ThemeProvider,
|
|
74
|
-
keyframes: () =>
|
|
74
|
+
keyframes: () => import_react5.keyframes,
|
|
75
75
|
useBreakpointIndex: () => import_match_media.useBreakpointIndex,
|
|
76
76
|
useResponsiveValue: () => import_match_media.useResponsiveValue,
|
|
77
77
|
useTheme: () => useTheme
|
|
@@ -79,7 +79,7 @@ __export(src_exports, {
|
|
|
79
79
|
module.exports = __toCommonJS(src_exports);
|
|
80
80
|
var import_theme_ui28 = require("theme-ui");
|
|
81
81
|
var import_match_media = require("@theme-ui/match-media");
|
|
82
|
-
var
|
|
82
|
+
var import_react5 = require("@emotion/react");
|
|
83
83
|
|
|
84
84
|
// src/theme/ThemeProvider.tsx
|
|
85
85
|
var import_Bruttal = require("@ttoss/theme/Bruttal");
|
|
@@ -113,10 +113,10 @@ var useTheme = import_theme_ui2.useThemeUI;
|
|
|
113
113
|
var import_theme_ui3 = require("theme-ui");
|
|
114
114
|
|
|
115
115
|
// src/components/Icon.tsx
|
|
116
|
-
var
|
|
116
|
+
var React = __toESM(require("react"));
|
|
117
117
|
var import_react2 = require("@iconify-icon/react");
|
|
118
118
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
119
|
-
var Icon =
|
|
119
|
+
var Icon = React.forwardRef((props, ref) => {
|
|
120
120
|
return /* @__PURE__ */(0, import_jsx_runtime2.jsx)(import_react2.Icon, {
|
|
121
121
|
ref,
|
|
122
122
|
"data-testid": "iconify-icon",
|
|
@@ -152,10 +152,10 @@ var Badge = ({
|
|
|
152
152
|
var import_theme_ui4 = require("theme-ui");
|
|
153
153
|
|
|
154
154
|
// src/components/Button.tsx
|
|
155
|
-
var
|
|
155
|
+
var React2 = __toESM(require("react"));
|
|
156
156
|
var import_theme_ui5 = require("theme-ui");
|
|
157
157
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
158
|
-
var Button =
|
|
158
|
+
var Button = React2.forwardRef((props, ref) => {
|
|
159
159
|
const {
|
|
160
160
|
children,
|
|
161
161
|
leftIcon,
|
|
@@ -206,10 +206,10 @@ var import_theme_ui10 = require("theme-ui");
|
|
|
206
206
|
var import_theme_ui11 = require("theme-ui");
|
|
207
207
|
|
|
208
208
|
// src/components/Input.tsx
|
|
209
|
-
var
|
|
209
|
+
var React3 = __toESM(require("react"));
|
|
210
210
|
var import_theme_ui12 = require("theme-ui");
|
|
211
211
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
212
|
-
var Input =
|
|
212
|
+
var Input = React3.forwardRef(({
|
|
213
213
|
leadingIcon,
|
|
214
214
|
onLeadingIconClick,
|
|
215
215
|
trailingIcon,
|
|
@@ -318,10 +318,10 @@ var import_theme_ui15 = require("theme-ui");
|
|
|
318
318
|
var import_theme_ui16 = require("theme-ui");
|
|
319
319
|
|
|
320
320
|
// src/components/Select.tsx
|
|
321
|
+
var React5 = __toESM(require("react"));
|
|
321
322
|
var import_theme_ui17 = require("theme-ui");
|
|
322
|
-
var import_react4 = __toESM(require("react"));
|
|
323
323
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
324
|
-
var Select =
|
|
324
|
+
var Select = React5.forwardRef(({
|
|
325
325
|
arrow,
|
|
326
326
|
...props
|
|
327
327
|
}, ref) => {
|
|
@@ -371,10 +371,10 @@ var import_theme_ui18 = require("theme-ui");
|
|
|
371
371
|
var import_theme_ui19 = require("theme-ui");
|
|
372
372
|
|
|
373
373
|
// src/components/IconButton.tsx
|
|
374
|
-
var
|
|
374
|
+
var React6 = __toESM(require("react"));
|
|
375
375
|
var import_theme_ui20 = require("theme-ui");
|
|
376
376
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
377
|
-
var IconButton =
|
|
377
|
+
var IconButton = React6.forwardRef((props, ref) => {
|
|
378
378
|
return /* @__PURE__ */(0, import_jsx_runtime9.jsx)(import_theme_ui20.IconButton, {
|
|
379
379
|
type: "button",
|
|
380
380
|
...props,
|
|
@@ -390,12 +390,12 @@ var import_theme_ui21 = require("theme-ui");
|
|
|
390
390
|
var import_theme_ui22 = require("theme-ui");
|
|
391
391
|
|
|
392
392
|
// src/components/InfiniteLinearProgress.tsx
|
|
393
|
-
var
|
|
393
|
+
var React7 = __toESM(require("react"));
|
|
394
394
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
395
395
|
var MAX_PROGRESS = 100;
|
|
396
396
|
var InfiniteLinearProgress = () => {
|
|
397
|
-
const [progress, setProgress] =
|
|
398
|
-
|
|
397
|
+
const [progress, setProgress] = React7.useState(0);
|
|
398
|
+
React7.useEffect(() => {
|
|
399
399
|
const timer = setInterval(() => {
|
|
400
400
|
setProgress(oldProgress => {
|
|
401
401
|
if (oldProgress === MAX_PROGRESS) {
|
|
@@ -425,9 +425,9 @@ var InfiniteLinearProgress = () => {
|
|
|
425
425
|
|
|
426
426
|
// src/components/Textarea.tsx
|
|
427
427
|
var import_theme_ui23 = require("theme-ui");
|
|
428
|
-
var
|
|
428
|
+
var import_react4 = __toESM(require("react"));
|
|
429
429
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
430
|
-
var Textarea =
|
|
430
|
+
var Textarea = import_react4.default.forwardRef(({
|
|
431
431
|
trailingIcon,
|
|
432
432
|
className,
|
|
433
433
|
sx,
|
|
@@ -484,10 +484,10 @@ var HelpText = ({
|
|
|
484
484
|
};
|
|
485
485
|
|
|
486
486
|
// src/components/CloseButton.tsx
|
|
487
|
-
var
|
|
487
|
+
var React9 = __toESM(require("react"));
|
|
488
488
|
var import_theme_ui25 = require("theme-ui");
|
|
489
489
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
490
|
-
var CloseButton =
|
|
490
|
+
var CloseButton = React9.forwardRef(({
|
|
491
491
|
label,
|
|
492
492
|
onlyText,
|
|
493
493
|
...props
|
|
@@ -509,10 +509,10 @@ var CloseButton = React10.forwardRef(({
|
|
|
509
509
|
CloseButton.displayName = "CloseButton";
|
|
510
510
|
|
|
511
511
|
// src/components/InputNumber.tsx
|
|
512
|
+
var React10 = __toESM(require("react"));
|
|
512
513
|
var import_theme_ui26 = require("theme-ui");
|
|
513
|
-
var import_react6 = __toESM(require("react"));
|
|
514
514
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
515
|
-
var InputNumber =
|
|
515
|
+
var InputNumber = React10.forwardRef(({
|
|
516
516
|
sx,
|
|
517
517
|
value,
|
|
518
518
|
infoIcon,
|
|
@@ -520,14 +520,14 @@ var InputNumber = import_react6.default.forwardRef(({
|
|
|
520
520
|
onClickInfoIcon,
|
|
521
521
|
...inputProps
|
|
522
522
|
}, ref) => {
|
|
523
|
-
const sxProps =
|
|
523
|
+
const sxProps = React10.useMemo(() => {
|
|
524
524
|
const size = String(typeof value === "undefined" ? 0 : value).length;
|
|
525
525
|
if (inputProps["aria-invalid"] === "true") {
|
|
526
526
|
return {
|
|
527
527
|
width: `calc(139px + ${size > 1 ? size * 10 : 0}px)`,
|
|
528
528
|
textAlign: "left",
|
|
529
529
|
"&[type=number]::-webkit-inner-spin-button, &[type=number]::-webkit-outer-spin-button": {
|
|
530
|
-
|
|
530
|
+
WebkitAppearance: "none",
|
|
531
531
|
margin: 0
|
|
532
532
|
},
|
|
533
533
|
...sx,
|
|
@@ -540,7 +540,7 @@ var InputNumber = import_react6.default.forwardRef(({
|
|
|
540
540
|
width: `calc(108px + ${size > 1 ? size * 10 : 0}px)`,
|
|
541
541
|
textAlign: "center",
|
|
542
542
|
"&[type=number]::-webkit-inner-spin-button, &[type=number]::-webkit-outer-spin-button": {
|
|
543
|
-
|
|
543
|
+
WebkitAppearance: "none",
|
|
544
544
|
margin: 0
|
|
545
545
|
},
|
|
546
546
|
...sx,
|
|
@@ -631,9 +631,9 @@ var InputNumber = import_react6.default.forwardRef(({
|
|
|
631
631
|
InputNumber.displayName = "InputNumber";
|
|
632
632
|
|
|
633
633
|
// src/components/Stack.tsx
|
|
634
|
-
var
|
|
634
|
+
var React11 = __toESM(require("react"));
|
|
635
635
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
636
|
-
var Stack =
|
|
636
|
+
var Stack = React11.forwardRef((props, ref) => {
|
|
637
637
|
return /* @__PURE__ */(0, import_jsx_runtime15.jsx)(import_theme_ui8.Flex, {
|
|
638
638
|
ref,
|
|
639
639
|
...props,
|
|
@@ -649,16 +649,16 @@ Stack.displayName = "Stack";
|
|
|
649
649
|
var import_theme_ui27 = require("theme-ui");
|
|
650
650
|
|
|
651
651
|
// src/components/InputPassword/InputPassword.tsx
|
|
652
|
-
var
|
|
652
|
+
var React13 = __toESM(require("react"));
|
|
653
653
|
|
|
654
654
|
// src/components/InputPassword/useHidePassInput.ts
|
|
655
|
-
var
|
|
655
|
+
var React12 = __toESM(require("react"));
|
|
656
656
|
var useHidePassInput = (defaultValue = true) => {
|
|
657
|
-
const [hidePass, setHidePass] =
|
|
657
|
+
const [hidePass, setHidePass] = React12.useState(Boolean(defaultValue));
|
|
658
658
|
const {
|
|
659
659
|
icon,
|
|
660
660
|
inputType
|
|
661
|
-
} =
|
|
661
|
+
} = React12.useMemo(() => {
|
|
662
662
|
return {
|
|
663
663
|
icon: hidePass ? "view-off" : "view-on",
|
|
664
664
|
inputType: hidePass ? "password" : "text"
|
|
@@ -678,7 +678,7 @@ var useHidePassInput = (defaultValue = true) => {
|
|
|
678
678
|
|
|
679
679
|
// src/components/InputPassword/InputPassword.tsx
|
|
680
680
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
681
|
-
var InputPassword =
|
|
681
|
+
var InputPassword = React13.forwardRef(({
|
|
682
682
|
showPasswordByDefault,
|
|
683
683
|
...inputPasswordProps
|
|
684
684
|
}, ref) => {
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/ui",
|
|
3
|
-
"version": "1.36.
|
|
3
|
+
"version": "1.36.5",
|
|
4
4
|
"description": "Primitive layout, typographic, and other components for styling applications.",
|
|
5
|
-
"license": "UNLICENSED",
|
|
6
5
|
"author": "ttoss",
|
|
7
6
|
"contributors": [
|
|
8
7
|
"Pedro Arantes <pedro@arantespp.com> (https://arantespp.com/contact)"
|
|
@@ -20,7 +19,7 @@
|
|
|
20
19
|
"@iconify-icon/react": "^1.0.7",
|
|
21
20
|
"@theme-ui/match-media": "^0.15.7",
|
|
22
21
|
"theme-ui": "^0.15.7",
|
|
23
|
-
"@ttoss/theme": "^1.4.
|
|
22
|
+
"@ttoss/theme": "^1.4.33"
|
|
24
23
|
},
|
|
25
24
|
"peerDependencies": {
|
|
26
25
|
"react": ">=16.8.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { Flex, Icon, Text } from '..';
|
|
2
3
|
import { Input, type InputProps as InputPropsUI } from 'theme-ui';
|
|
3
|
-
import React from 'react';
|
|
4
4
|
|
|
5
5
|
export type InputNumberProps = Omit<
|
|
6
6
|
InputPropsUI,
|
|
@@ -23,7 +23,7 @@ export const InputNumber = React.forwardRef<HTMLInputElement, InputNumberProps>(
|
|
|
23
23
|
textAlign: 'left',
|
|
24
24
|
'&[type=number]::-webkit-inner-spin-button, &[type=number]::-webkit-outer-spin-button':
|
|
25
25
|
{
|
|
26
|
-
|
|
26
|
+
WebkitAppearance: 'none',
|
|
27
27
|
margin: 0,
|
|
28
28
|
},
|
|
29
29
|
...sx,
|
|
@@ -38,7 +38,7 @@ export const InputNumber = React.forwardRef<HTMLInputElement, InputNumberProps>(
|
|
|
38
38
|
textAlign: 'center',
|
|
39
39
|
'&[type=number]::-webkit-inner-spin-button, &[type=number]::-webkit-outer-spin-button':
|
|
40
40
|
{
|
|
41
|
-
|
|
41
|
+
WebkitAppearance: 'none',
|
|
42
42
|
margin: 0,
|
|
43
43
|
},
|
|
44
44
|
...sx,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { Icon, Text } from '..';
|
|
2
3
|
import { SelectProps, Select as SelectUi } from 'theme-ui';
|
|
3
|
-
import React from 'react';
|
|
4
4
|
|
|
5
|
-
export {
|
|
5
|
+
export { SelectProps };
|
|
6
6
|
|
|
7
7
|
export const Select = React.forwardRef<HTMLSelectElement, SelectProps>(
|
|
8
8
|
({ arrow, ...props }, ref) => {
|