@rockshin/tao-ui 0.0.42 → 0.0.44
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/README.md +8 -2
- package/component-manifest.json +37 -18
- package/dist/components/alert/alert.css +1 -0
- package/dist/components/avatar/avatar.js +1 -1
- package/dist/components/calendar/calendar.css +10 -60
- package/dist/components/calendar/calendar.js +46 -43
- package/dist/components/card/card.css +1 -1
- package/dist/components/carousel/carousel.css +1 -0
- package/dist/components/carousel/carousel.js +62 -7
- package/dist/components/collapse/collapse-panels.d.ts +4 -0
- package/dist/components/collapse/collapse-panels.js +413 -0
- package/dist/components/collapse/collapse.css +199 -0
- package/dist/components/collapse/collapse.d.ts +77 -0
- package/dist/components/{collapsible/collapsible.js → collapse/collapse.js} +26 -10
- package/dist/components/color-picker/color-picker.css +8 -42
- package/dist/components/color-picker/color-picker.js +220 -145
- package/dist/components/date-picker/date-picker.css +18 -56
- package/dist/components/date-picker/date-picker.d.ts +2 -0
- package/dist/components/date-picker/date-picker.js +11 -6
- package/dist/components/date-picker/presets.js +5 -2
- package/dist/components/date-picker/range-picker.d.ts +2 -0
- package/dist/components/date-picker/range-picker.js +3 -1
- package/dist/components/form/field-control.d.ts +6 -0
- package/dist/components/form/field-control.js +42 -0
- package/dist/components/form/form-context.d.ts +3 -0
- package/dist/components/form/form-item.d.ts +2 -1
- package/dist/components/form/form-item.js +56 -42
- package/dist/components/form/form.css +15 -0
- package/dist/components/form/form.d.ts +5 -5
- package/dist/components/form/form.js +87 -68
- package/dist/components/form/index.d.ts +1 -0
- package/dist/components/form/use-form.d.ts +16 -0
- package/dist/components/form/use-form.js +69 -0
- package/dist/components/form-field/form-field-view.d.ts +6 -2
- package/dist/components/form-field/form-field-view.js +116 -84
- package/dist/components/input/base-input.d.ts +25 -0
- package/dist/components/input/base-input.js +104 -0
- package/dist/components/input/input-shared.css +75 -0
- package/dist/components/input/input-shared.d.ts +59 -0
- package/dist/components/input/input-shared.js +152 -0
- package/dist/components/input/input.css +99 -4
- package/dist/components/input/input.d.ts +12 -16
- package/dist/components/input/input.js +11 -154
- package/dist/components/input/otp.d.ts +29 -0
- package/dist/components/input/otp.js +335 -0
- package/dist/components/input/password.d.ts +12 -0
- package/dist/components/input/password.js +117 -0
- package/dist/components/input/search.d.ts +16 -0
- package/dist/components/input/search.js +99 -0
- package/dist/components/input-number/input-number.d.ts +2 -2
- package/dist/components/input-number/input-number.js +2 -2
- package/dist/components/list/list-pagination.css +5 -5
- package/dist/components/list/list-pagination.js +1 -0
- package/dist/components/mentions/mentions.css +7 -0
- package/dist/components/modal/modal.css +1 -0
- package/dist/components/radio/radio.d.ts +1 -1
- package/dist/components/radio/radio.js +78 -73
- package/dist/components/select/mobile-select.css +1 -16
- package/dist/components/select/mobile-select.d.ts +2 -1
- package/dist/components/select/mobile-select.js +68 -63
- package/dist/components/select/select-types.d.ts +2 -0
- package/dist/components/select/select.css +19 -0
- package/dist/components/select/select.js +31 -17
- package/dist/components/spinner/spinner.css +1 -1
- package/dist/components/steps/steps.css +53 -3
- package/dist/components/table/table.css +0 -5
- package/dist/components/table/table.js +21 -22
- package/dist/components/textarea/textarea.css +20 -0
- package/dist/components/textarea/textarea.d.ts +12 -6
- package/dist/components/textarea/textarea.js +120 -219
- package/dist/components/time-picker/time-picker.css +7 -0
- package/dist/components/tree/tree-check.d.ts +1 -0
- package/dist/components/tree/tree-check.js +36 -0
- package/dist/components/tree/tree.css +13 -18
- package/dist/components/tree/tree.js +2 -3
- package/dist/components/tree-select/select-engine.css +7 -0
- package/dist/components/tree-select/tree-select.js +2 -3
- package/dist/components/upload/upload.css +0 -11
- package/dist/components/upload/upload.js +13 -3
- package/dist/docs/component-docs.js +2 -2
- package/dist/docs/components/{collapsible.doc.d.ts → collapse.doc.d.ts} +1 -1
- package/dist/docs/components/collapse.doc.js +47 -0
- package/dist/docs/components/form.doc.js +3 -1
- package/dist/docs/components/input.doc.js +11 -4
- package/dist/docs/components/textarea.doc.js +4 -2
- package/dist/entries/collapse.d.ts +3 -0
- package/dist/entries/{collapsible.js → collapse.js} +1 -1
- package/dist/entries/form.d.ts +2 -2
- package/dist/entries/input.d.ts +1 -1
- package/dist/entries/textarea.d.ts +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +1 -1
- package/dist/provider/locale.d.ts +6 -0
- package/dist/provider/locale.js +10 -0
- package/dist/provider/tao-provider.js +1 -0
- package/dist/theme/control.css +2 -2
- package/dist/theme/theme.css +3 -1
- package/dist/theme/tokens.d.ts +2 -2
- package/dist/theme/tokens.js +1 -0
- package/dist/utils/field-label.d.ts +4 -0
- package/dist/utils/field-label.js +7 -0
- package/llms.txt +19 -16
- package/package.json +10 -5
- package/dist/components/collapsible/collapsible.css +0 -49
- package/dist/components/collapsible/collapsible.d.ts +0 -39
- package/dist/docs/components/collapsible.doc.js +0 -39
- package/dist/entries/collapsible.d.ts +0 -3
|
@@ -160,6 +160,25 @@ button[data-tao-select-clear] {
|
|
|
160
160
|
display: none;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
@media (hover: hover) and (pointer: fine) {
|
|
164
|
+
[data-tao-select-icons][data-tao-clearable] {
|
|
165
|
+
display: grid;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
[data-tao-select-icons][data-tao-clearable] > * {
|
|
169
|
+
grid-area: 1 / 1;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
[data-tao-select]:not(:hover) [data-tao-select-clear]:not(:focus-visible) {
|
|
173
|
+
opacity: 0;
|
|
174
|
+
pointer-events: none;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
[data-tao-select]:not(:hover) [data-tao-select-icons][data-tao-clearable]:not(:has(:focus-visible)) [data-tao-select-icon] {
|
|
178
|
+
display: flex;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
163
182
|
[data-tao-select-icon] {
|
|
164
183
|
color: var(--tao-color-text-tertiary);
|
|
165
184
|
transition: transform var(--tao-motion-duration-fast)
|
|
@@ -211,27 +211,39 @@ const select_Select = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
211
211
|
}) : null;
|
|
212
212
|
const trailingIcons = /*#__PURE__*/ jsx("span", {
|
|
213
213
|
"data-tao-select-icons": "",
|
|
214
|
+
"data-tao-clearable": showClearBtn || void 0,
|
|
214
215
|
children: loading ? /*#__PURE__*/ jsx("span", {
|
|
215
216
|
"data-tao-select-icon": "",
|
|
216
217
|
"data-tao-select-loading-slot": "",
|
|
217
218
|
children: loadingIcon ?? /*#__PURE__*/ jsx(LoadingIcon, {})
|
|
218
|
-
}) : showClearBtn ? /*#__PURE__*/
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
e_3
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
219
|
+
}) : showClearBtn ? /*#__PURE__*/ jsxs(Fragment, {
|
|
220
|
+
children: [
|
|
221
|
+
/*#__PURE__*/ jsx("span", {
|
|
222
|
+
"data-tao-select-clear": "",
|
|
223
|
+
className: cx(classNames?.clear),
|
|
224
|
+
style: styles?.clear,
|
|
225
|
+
onPointerDown: (e_2)=>e_2.stopPropagation(),
|
|
226
|
+
onClick: handleClear,
|
|
227
|
+
onKeyDown: (e_3)=>{
|
|
228
|
+
if ('Enter' === e_3.key || ' ' === e_3.key) {
|
|
229
|
+
e_3.preventDefault();
|
|
230
|
+
e_3.stopPropagation();
|
|
231
|
+
clearValue();
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
role: "button",
|
|
235
|
+
tabIndex: 0,
|
|
236
|
+
"aria-label": ctx.locale.clear,
|
|
237
|
+
children: clearIcon
|
|
238
|
+
}),
|
|
239
|
+
/*#__PURE__*/ jsx("span", {
|
|
240
|
+
"data-tao-select-icon": "",
|
|
241
|
+
"data-tao-custom-suffix": null != suffixIcon || void 0,
|
|
242
|
+
className: cx(classNames?.suffix),
|
|
243
|
+
style: styles?.suffix,
|
|
244
|
+
children: suffixIcon ?? /*#__PURE__*/ jsx(ChevronDownIcon, {})
|
|
245
|
+
})
|
|
246
|
+
]
|
|
235
247
|
}) : /*#__PURE__*/ jsx("span", {
|
|
236
248
|
"data-tao-select-icon": "",
|
|
237
249
|
"data-tao-custom-suffix": null != suffixIcon || void 0,
|
|
@@ -340,6 +352,7 @@ const select_Select = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
340
352
|
]
|
|
341
353
|
}),
|
|
342
354
|
/*#__PURE__*/ jsx(MobileSelectDrawer, {
|
|
355
|
+
mobileTitle: props.mobileTitle,
|
|
343
356
|
classNames: classNames,
|
|
344
357
|
styles: styles,
|
|
345
358
|
popupRender: popupRender,
|
|
@@ -668,6 +681,7 @@ const select_Select = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
668
681
|
asChild: true,
|
|
669
682
|
children: /*#__PURE__*/ jsxs("div", {
|
|
670
683
|
ref: triggerRef,
|
|
684
|
+
tabIndex: resolvedDisabled ? -1 : 0,
|
|
671
685
|
id: id,
|
|
672
686
|
...ariaProps,
|
|
673
687
|
"data-tao-control": "",
|
|
@@ -610,9 +610,9 @@
|
|
|
610
610
|
}
|
|
611
611
|
|
|
612
612
|
[data-tao-steps][data-tao-type="panel"] [data-tao-steps-panel-arrow] {
|
|
613
|
-
top: calc(var(--tao-steps-panel-line-width)
|
|
613
|
+
top: calc(var(--tao-steps-panel-line-width) / -2);
|
|
614
614
|
z-index: 1;
|
|
615
|
-
height: calc(var(--tao-steps-panel-line-width)
|
|
615
|
+
height: calc(var(--tao-steps-panel-line-width) + 100%);
|
|
616
616
|
width: var(--tao-steps-panel-notch-width);
|
|
617
617
|
stroke-linecap: round;
|
|
618
618
|
position: absolute;
|
|
@@ -642,6 +642,54 @@
|
|
|
642
642
|
--tao-steps-panel-radius: var(--tao-radius-sm);
|
|
643
643
|
}
|
|
644
644
|
|
|
645
|
+
[data-tao-steps][data-tao-type="panel"][data-tao-variant="filled"] > [data-tao-step] {
|
|
646
|
+
isolation: isolate;
|
|
647
|
+
background: none;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
[data-tao-steps][data-tao-type="panel"][data-tao-variant="filled"] > [data-tao-step]:before {
|
|
651
|
+
content: "";
|
|
652
|
+
z-index: -1;
|
|
653
|
+
inset-block: calc(var(--tao-steps-panel-line-width) * -1);
|
|
654
|
+
background: var(--tao-steps-panel-bg);
|
|
655
|
+
border-radius: inherit;
|
|
656
|
+
clip-path: polygon(0 0,
|
|
657
|
+
calc(100% - var(--tao-steps-panel-notch-width)) 0,
|
|
658
|
+
100% 50%,
|
|
659
|
+
calc(100% - var(--tao-steps-panel-notch-width)) 100%,
|
|
660
|
+
0 100%);
|
|
661
|
+
transition: background-color var(--tao-motion-duration-mid)
|
|
662
|
+
var(--tao-motion-ease-out);
|
|
663
|
+
position: absolute;
|
|
664
|
+
inset-inline-start: 0;
|
|
665
|
+
inset-inline-end: calc(var(--tao-steps-panel-notch-width) * -1);
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
:dir(rtl) [data-tao-steps][data-tao-type="panel"][data-tao-variant="filled"] > [data-tao-step]:before {
|
|
669
|
+
clip-path: polygon(var(--tao-steps-panel-notch-width) 0,
|
|
670
|
+
100% 0,
|
|
671
|
+
100% 100%,
|
|
672
|
+
var(--tao-steps-panel-notch-width) 100%,
|
|
673
|
+
0 50%);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
[data-tao-steps][data-tao-type="panel"][data-tao-variant="filled"] > [data-tao-step][data-tao-active]:before {
|
|
677
|
+
background: var(--tao-steps-panel-active-bg);
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
[data-tao-steps][data-tao-type="panel"][data-tao-variant="filled"] > [data-tao-step]:first-child:before {
|
|
681
|
+
inset-inline-start: calc(var(--tao-steps-panel-line-width) * -1);
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
[data-tao-steps][data-tao-type="panel"][data-tao-variant="filled"] > [data-tao-step]:last-child:before {
|
|
685
|
+
clip-path: none;
|
|
686
|
+
inset-inline-end: calc(var(--tao-steps-panel-line-width) * -1);
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
[data-tao-steps][data-tao-type="panel"][data-tao-variant="filled"] [data-tao-steps-panel-arrow] {
|
|
690
|
+
display: none;
|
|
691
|
+
}
|
|
692
|
+
|
|
645
693
|
[data-tao-steps][data-tao-type="panel"][data-tao-variant="filled"] > [data-tao-step]:not(:first-child) {
|
|
646
694
|
clip-path: polygon(var(--tao-steps-panel-line-width) 0,
|
|
647
695
|
calc(100% + var(--tao-steps-panel-notch-width)) 0,
|
|
@@ -727,11 +775,13 @@
|
|
|
727
775
|
--tao-steps-progress-unitless: calc(100 / tan(atan2(var(--tao-steps-progress-svg-size), 1px)));
|
|
728
776
|
--tao-steps-progress-radius: calc((var(--tao-steps-progress-svg-size) - var(--tao-steps-line-width-bold)) *
|
|
729
777
|
var(--tao-steps-progress-unitless) / 2);
|
|
730
|
-
inset: calc(var(--tao-steps-progress-enhance) * -1);
|
|
731
778
|
width: var(--tao-steps-progress-svg-size);
|
|
732
779
|
height: var(--tao-steps-progress-svg-size);
|
|
733
780
|
pointer-events: none;
|
|
734
781
|
position: absolute;
|
|
782
|
+
top: 50%;
|
|
783
|
+
left: 50%;
|
|
784
|
+
transform: translate(-50%, -50%);
|
|
735
785
|
}
|
|
736
786
|
|
|
737
787
|
[data-tao-steps-progress] circle {
|
|
@@ -4,7 +4,9 @@ import { c } from "react-compiler-runtime";
|
|
|
4
4
|
import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
5
5
|
import { useBreakpoint } from "../../utils/breakpoint.js";
|
|
6
6
|
import { cx } from "../../utils/semantic.js";
|
|
7
|
+
import { Checkbox } from "../checkbox/checkbox.js";
|
|
7
8
|
import { Pagination } from "../pagination/pagination.js";
|
|
9
|
+
import { Radio } from "../radio/radio.js";
|
|
8
10
|
import { TableFilterDropdown } from "./table-filter.js";
|
|
9
11
|
import { ExpandIcon, SortIcon, TableLoadingSpinner } from "./table-icons.js";
|
|
10
12
|
import { getCellValue, getColKey, getRowKey, resolveRowClassName, resolveRowStyle, resolveSemanticClassNames, resolveSemanticStyles } from "./table-model.js";
|
|
@@ -402,10 +404,12 @@ function Table(t0) {
|
|
|
402
404
|
...rowProps,
|
|
403
405
|
"data-tao-table-row": "",
|
|
404
406
|
"data-tao-selected": isSelected || void 0,
|
|
405
|
-
onClick:
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
407
|
+
onClick: (event)=>{
|
|
408
|
+
const selectionCell = event.target.closest("[data-tao-table-selection-cell]");
|
|
409
|
+
if (selectionCell && event.target !== selectionCell) return void event.stopPropagation();
|
|
410
|
+
rowProps.onClick?.(event);
|
|
411
|
+
if (rowExpandable && expandable?.expandRowByClick) toggleExpand(record_3, key_3);
|
|
412
|
+
},
|
|
409
413
|
className: cx(resolvedClassNames["body.row"], resolveRowClassName(rowClassName, record_3, rowIdx), rowProps.className),
|
|
410
414
|
style: {
|
|
411
415
|
...resolvedStyles["body.row"],
|
|
@@ -420,8 +424,8 @@ function Table(t0) {
|
|
|
420
424
|
style: stickyStyle(stickyPositions.__expand__, 1),
|
|
421
425
|
children: rowExpandable && /*#__PURE__*/ jsx(ExpandIcon, {
|
|
422
426
|
expanded: isExpanded,
|
|
423
|
-
onClick: (
|
|
424
|
-
|
|
427
|
+
onClick: (e_0)=>{
|
|
428
|
+
e_0.stopPropagation();
|
|
425
429
|
toggleExpand(record_3, key_3);
|
|
426
430
|
}
|
|
427
431
|
})
|
|
@@ -435,14 +439,16 @@ function Table(t0) {
|
|
|
435
439
|
...stickyStyle(stickyPositions.__selection__, 1),
|
|
436
440
|
...resolvedStyles["selection.cell"]
|
|
437
441
|
},
|
|
438
|
-
children: /*#__PURE__*/ jsx(
|
|
439
|
-
|
|
442
|
+
children: "radio" === selectionType ? /*#__PURE__*/ jsx(Radio, {
|
|
443
|
+
checked: isSelected,
|
|
444
|
+
"aria-label": `Select row ${String(key_3)}`,
|
|
445
|
+
disabled: checkboxProps?.disabled ?? false,
|
|
446
|
+
onChange: ()=>handleSelectRow(key_3)
|
|
447
|
+
}) : /*#__PURE__*/ jsx(Checkbox, {
|
|
440
448
|
checked: isSelected,
|
|
441
449
|
"aria-label": `Select row ${String(key_3)}`,
|
|
442
|
-
disabled: checkboxProps?.disabled,
|
|
443
|
-
onChange: ()=>handleSelectRow(key_3)
|
|
444
|
-
onClick: _temp2,
|
|
445
|
-
"data-tao-table-checkbox": ""
|
|
450
|
+
disabled: checkboxProps?.disabled ?? false,
|
|
451
|
+
onChange: ()=>handleSelectRow(key_3)
|
|
446
452
|
})
|
|
447
453
|
}),
|
|
448
454
|
columns.map((col_6, colIdx)=>{
|
|
@@ -587,16 +593,12 @@ function Table(t0) {
|
|
|
587
593
|
...stickyStyle(stickyPositions.__selection__, 3),
|
|
588
594
|
...resolvedStyles["selection.cell"]
|
|
589
595
|
},
|
|
590
|
-
children: "checkbox" === selectionType && /*#__PURE__*/ jsx(
|
|
591
|
-
type: "checkbox",
|
|
596
|
+
children: "checkbox" === selectionType && /*#__PURE__*/ jsx(Checkbox, {
|
|
592
597
|
"aria-label": "Select all rows",
|
|
593
598
|
checked: isAllSelected,
|
|
594
599
|
disabled: 0 === selectablePageKeys.length,
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
},
|
|
598
|
-
onChange: (e)=>handleSelectAll(e.target.checked),
|
|
599
|
-
"data-tao-table-checkbox": ""
|
|
600
|
+
indeterminate: isIndeterminate,
|
|
601
|
+
onChange: (e)=>handleSelectAll(e.target.checked)
|
|
600
602
|
})
|
|
601
603
|
}),
|
|
602
604
|
columns.map((col_5, i_1)=>{
|
|
@@ -666,9 +668,6 @@ function Table(t0) {
|
|
|
666
668
|
]
|
|
667
669
|
});
|
|
668
670
|
}
|
|
669
|
-
function _temp2(e_2) {
|
|
670
|
-
return e_2.stopPropagation();
|
|
671
|
-
}
|
|
672
671
|
function _temp(col_0) {
|
|
673
672
|
return col_0.responsive;
|
|
674
673
|
}
|
|
@@ -92,3 +92,23 @@
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
[data-tao-textarea] {
|
|
96
|
+
position: relative;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
[data-tao-textarea] > [data-tao-input-clear] {
|
|
100
|
+
position: absolute;
|
|
101
|
+
inset-block-start: var(--tao-padding-xxs);
|
|
102
|
+
inset-inline-end: var(--tao-padding-xxs);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
:where([data-tao-textarea]:has([data-tao-input-clear]) textarea) {
|
|
106
|
+
padding-inline-end: var(--tao-control-height);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
[data-tao-textarea] > [data-tao-input-count] {
|
|
110
|
+
text-align: end;
|
|
111
|
+
padding: 0 var(--tao-padding-xs) var(--tao-padding-xxs);
|
|
112
|
+
display: block;
|
|
113
|
+
}
|
|
114
|
+
|
|
@@ -1,21 +1,27 @@
|
|
|
1
1
|
import { type Ref, type TextareaHTMLAttributes } from 'react';
|
|
2
|
-
import { type TaoSize, type TaoStatus
|
|
2
|
+
import { type TaoSize, type TaoStatus } from '../../provider/tao-provider.js';
|
|
3
3
|
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
4
|
+
import { type InputFocusOptions, type InputSemanticValue, type InputVariant, type TextControlProps } from '../input/input-shared.js';
|
|
4
5
|
import './textarea.css';
|
|
5
|
-
export type TextareaSemanticPart = 'root' | 'textarea';
|
|
6
|
+
export type TextareaSemanticPart = 'root' | 'textarea' | 'clear' | 'count';
|
|
7
|
+
export type TextareaRef = HTMLTextAreaElement & {
|
|
8
|
+
textArea: HTMLTextAreaElement;
|
|
9
|
+
nativeElement: HTMLDivElement;
|
|
10
|
+
focus: (options?: InputFocusOptions) => void;
|
|
11
|
+
};
|
|
6
12
|
export interface AutoSizeOptions {
|
|
7
13
|
minRows?: number;
|
|
8
14
|
maxRows?: number;
|
|
9
15
|
}
|
|
10
|
-
export interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'> {
|
|
16
|
+
export interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'>, TextControlProps<HTMLTextAreaElement> {
|
|
11
17
|
size?: TaoSize;
|
|
12
|
-
variant?:
|
|
18
|
+
variant?: InputVariant;
|
|
13
19
|
error?: boolean;
|
|
14
20
|
status?: TaoStatus;
|
|
15
21
|
ref?: Ref<HTMLTextAreaElement>;
|
|
16
22
|
/** Auto-grow height to fit content. `true` grows freely; pass min/max rows to clamp. */
|
|
17
23
|
autoSize?: boolean | AutoSizeOptions;
|
|
18
|
-
classNames?: SemanticClassNames<TextareaSemanticPart>;
|
|
19
|
-
styles?: SemanticStyles<TextareaSemanticPart>;
|
|
24
|
+
classNames?: InputSemanticValue<SemanticClassNames<TextareaSemanticPart>, TextareaProps>;
|
|
25
|
+
styles?: InputSemanticValue<SemanticStyles<TextareaSemanticPart>, TextareaProps>;
|
|
20
26
|
}
|
|
21
27
|
export declare const Textarea: import("react").ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|