@rockshin/tao-ui 0.0.38 → 0.0.40
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 +12 -0
- package/dist/components/alert/alert.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb.d.ts +2 -2
- package/dist/components/button/button.d.ts +2 -2
- package/dist/components/checkbox/checkbox.css +4 -0
- package/dist/components/checkbox/checkbox.d.ts +8 -6
- package/dist/components/checkbox/checkbox.js +184 -111
- package/dist/components/collapsible/collapsible.d.ts +6 -6
- package/dist/components/context-menu/context-menu.d.ts +3 -3
- package/dist/components/date-picker/calendar/calendar-grid.d.ts +1 -1
- package/dist/components/date-picker/calendar/calendar-grid.js +47 -35
- package/dist/components/date-picker/calendar/calendar-header.d.ts +2 -2
- package/dist/components/date-picker/calendar/month-grid.d.ts +1 -1
- package/dist/components/date-picker/calendar/month-grid.js +1 -0
- package/dist/components/date-picker/calendar/time-panel.d.ts +2 -2
- package/dist/components/date-picker/calendar/time-panel.js +10 -7
- package/dist/components/date-picker/calendar/year-grid.d.ts +1 -1
- package/dist/components/date-picker/calendar/year-grid.js +1 -0
- package/dist/components/date-picker/date-picker.css +4 -0
- package/dist/components/date-picker/date-picker.d.ts +7 -6
- package/dist/components/date-picker/date-picker.js +52 -5
- package/dist/components/date-picker/presets.d.ts +1 -1
- package/dist/components/date-picker/range-picker.d.ts +6 -5
- package/dist/components/date-picker/range-picker.js +124 -28
- package/dist/components/date-picker/types.d.ts +1 -1
- package/dist/components/drawer/drawer.d.ts +4 -4
- package/dist/components/drawer/drawer.js +125 -111
- package/dist/components/dropdown/dropdown.d.ts +8 -8
- package/dist/components/form/form-context.d.ts +1 -1
- package/dist/components/form/form-item.d.ts +3 -3
- package/dist/components/form/form.d.ts +3 -3
- package/dist/components/form/index.d.ts +2 -2
- package/dist/components/form-actions/form-actions.d.ts +2 -2
- package/dist/components/form-field/form-field-view.d.ts +2 -2
- package/dist/components/form-field/form-field.d.ts +2 -2
- package/dist/components/form-section/form-section.d.ts +2 -2
- package/dist/components/input/input.d.ts +2 -2
- package/dist/components/input/input.js +1 -1
- package/dist/components/input-number/input-number.d.ts +6 -7
- package/dist/components/input-number/input-number.js +91 -65
- package/dist/components/menu/menu-render.d.ts +1 -1
- package/dist/components/modal/confirm-dialog.d.ts +4 -4
- package/dist/components/modal/confirm.d.ts +1 -1
- package/dist/components/modal/index.d.ts +8 -8
- package/dist/components/modal/modal.d.ts +6 -6
- package/dist/components/modal/modal.js +115 -101
- package/dist/components/modal/use-modal.d.ts +2 -2
- package/dist/components/pagination/pagination.d.ts +3 -3
- package/dist/components/popconfirm/popconfirm.d.ts +5 -5
- package/dist/components/popconfirm/popconfirm.js +74 -61
- package/dist/components/popover/popover.d.ts +4 -4
- package/dist/components/popover/popover.js +124 -115
- package/dist/components/radio/radio.d.ts +9 -6
- package/dist/components/radio/radio.js +210 -116
- package/dist/components/scroll-area/scroll-area.d.ts +2 -2
- package/dist/components/select/mobile-select.d.ts +3 -3
- package/dist/components/select/mobile-select.js +3 -1
- package/dist/components/select/select-icons.d.ts +5 -5
- package/dist/components/select/select-model.d.ts +1 -1
- package/dist/components/select/select-searchable-list.d.ts +2 -2
- package/dist/components/select/select-tags.d.ts +3 -3
- package/dist/components/select/select-types.d.ts +2 -2
- package/dist/components/select/select.css +7 -0
- package/dist/components/select/select.d.ts +2 -2
- package/dist/components/select/use-select-selection.d.ts +3 -3
- package/dist/components/sonner/index.d.ts +1 -1
- package/dist/components/sonner/sonner.d.ts +5 -4
- package/dist/components/spinner/spinner.d.ts +5 -5
- package/dist/components/spinner/spinner.js +106 -99
- package/dist/components/splitter/splitter.d.ts +3 -3
- package/dist/components/status-icon/status-icon.d.ts +1 -1
- package/dist/components/steps/steps-icons.d.ts +4 -4
- package/dist/components/steps/steps.css +1 -1
- package/dist/components/steps/steps.d.ts +3 -3
- package/dist/components/steps/use-display-steps.d.ts +1 -1
- package/dist/components/switch/switch.d.ts +4 -3
- package/dist/components/switch/switch.js +134 -86
- package/dist/components/table/table-filter.d.ts +2 -2
- package/dist/components/table/table-icons.d.ts +6 -6
- package/dist/components/table/table-model.d.ts +2 -2
- package/dist/components/table/table-summary.d.ts +5 -5
- package/dist/components/table/table-types.d.ts +3 -3
- package/dist/components/table/table.css +5 -3
- package/dist/components/table/table.d.ts +6 -6
- package/dist/components/table/use-table-data.d.ts +1 -1
- package/dist/components/tabs/tabs.d.ts +5 -5
- package/dist/components/tabs/tabs.js +72 -65
- package/dist/components/tag/tag.css +8 -8
- package/dist/components/tag/tag.d.ts +4 -4
- package/dist/components/tag/tag.js +40 -37
- package/dist/components/textarea/textarea.d.ts +2 -2
- package/dist/components/textarea/textarea.js +1 -1
- package/dist/components/tooltip/tooltip.d.ts +2 -2
- package/dist/docs/component-docs.d.ts +1 -1
- package/dist/docs/components/alert.doc.d.ts +1 -1
- package/dist/docs/components/button.doc.d.ts +1 -1
- package/dist/docs/components/popover.doc.d.ts +1 -1
- package/dist/docs/components/tooltip.doc.d.ts +4 -4
- package/dist/docs/index.d.ts +2 -2
- package/dist/entries/alert.d.ts +1 -1
- package/dist/entries/breadcrumb.d.ts +1 -1
- package/dist/entries/button.d.ts +1 -1
- package/dist/entries/checkbox.d.ts +1 -1
- package/dist/entries/collapsible.d.ts +1 -1
- package/dist/entries/context-menu.d.ts +1 -1
- package/dist/entries/date-picker.d.ts +1 -1
- package/dist/entries/drawer.d.ts +1 -1
- package/dist/entries/dropdown.d.ts +1 -1
- package/dist/entries/form-actions.d.ts +1 -1
- package/dist/entries/form-field.d.ts +1 -1
- package/dist/entries/form-layout.d.ts +1 -1
- package/dist/entries/form-section.d.ts +1 -1
- package/dist/entries/form.d.ts +1 -1
- package/dist/entries/input-number.d.ts +1 -1
- package/dist/entries/input.d.ts +1 -1
- package/dist/entries/modal.d.ts +1 -1
- package/dist/entries/number-input.d.ts +1 -1
- package/dist/entries/pagination.d.ts +1 -1
- package/dist/entries/popconfirm.d.ts +1 -1
- package/dist/entries/popover.d.ts +1 -1
- package/dist/entries/provider.d.ts +1 -1
- package/dist/entries/radio.d.ts +1 -1
- package/dist/entries/range-picker.d.ts +1 -1
- package/dist/entries/scroll-area.d.ts +1 -1
- package/dist/entries/select.d.ts +1 -1
- package/dist/entries/sonner.d.ts +1 -1
- package/dist/entries/spinner.d.ts +1 -1
- package/dist/entries/splitter.d.ts +1 -1
- package/dist/entries/stack.d.ts +1 -1
- package/dist/entries/steps.d.ts +1 -1
- package/dist/entries/switch.d.ts +1 -1
- package/dist/entries/table.d.ts +1 -1
- package/dist/entries/tabs.d.ts +1 -1
- package/dist/entries/tag.d.ts +1 -1
- package/dist/entries/textarea.d.ts +1 -1
- package/dist/entries/tooltip.d.ts +1 -1
- package/dist/index.d.ts +40 -40
- package/dist/layouts/form-layout/form-layout.d.ts +2 -2
- package/dist/layouts/stack/stack.d.ts +3 -3
- package/dist/number-input/format.d.ts +1 -1
- package/dist/number-input/index.d.ts +4 -4
- package/dist/number-input/number-input.d.ts +2 -2
- package/dist/number-input/use-number-input.d.ts +1 -1
- package/dist/provider/tao-provider.d.ts +3 -3
- package/dist/theme/control.css +2 -2
- package/dist/theme/theme.css +11 -11
- package/dist/utils/dialog-content.d.ts +1 -1
- package/package.json +38 -38
package/README.md
CHANGED
|
@@ -37,6 +37,18 @@ export default function App() {
|
|
|
37
37
|
}
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
+
### Accessibility
|
|
41
|
+
|
|
42
|
+
Use `FormField` or `Form.Item` to label controls and associate help/validation messages. Input, Textarea, InputNumber, Select, Checkbox, Radio, Switch and the date pickers forward field ARIA attributes to their interactive elements; CheckboxGroup and RadioGroup expose group labels and validation messages. Placeholders are not a substitute for a label.
|
|
43
|
+
|
|
44
|
+
Radio maps `aria-required` to native `required`; an explicit `required` prop takes precedence. Group options retain their native disabled state, including explicit `disabled={false}` overrides.
|
|
45
|
+
|
|
46
|
+
Desktop date inputs expose `combobox` semantics: ArrowDown opens the calendar and moves focus into it; Escape closes it and returns focus. RangePicker combines explicit ARIA labels with each endpoint placeholder, so use distinct start/end text. Native labels can instead target `id` and `${id}-end`. Calendar, month, year and time choices expose their selection state.
|
|
47
|
+
|
|
48
|
+
Name Tabs with `aria-label` or `aria-labelledby`. Give Modal, Drawer and Popover a visible `title` or an explicit ARIA name; Popconfirm uses its question as the dialog name. Spinner accepts an ARIA name (default `Loading` when no tip is present), and wrapped content reports `aria-busy` throughout loading, including its display delay.
|
|
49
|
+
|
|
50
|
+
Automated regression checks cover DOM semantics and keyboard interactions in React 18/19. They do not replace testing your composed screens with a browser and screen reader.
|
|
51
|
+
|
|
40
52
|
### Component imports
|
|
41
53
|
|
|
42
54
|
Use component entries to include only their styles and shared theme styles. No separate CSS import is needed. The root entry remains available and includes all component styles.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CSSProperties, type MouseEvent, type ReactNode } from 'react';
|
|
2
|
-
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
|
|
2
|
+
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
3
3
|
import './alert.css';
|
|
4
4
|
export type AlertSemanticPart = 'root' | 'icon' | 'title' | 'description' | 'action' | 'close';
|
|
5
5
|
export type AlertType = 'success' | 'info' | 'warning' | 'error';
|
|
@@ -17,4 +17,4 @@ export interface AlertProps {
|
|
|
17
17
|
classNames?: SemanticClassNames<AlertSemanticPart>;
|
|
18
18
|
styles?: SemanticStyles<AlertSemanticPart>;
|
|
19
19
|
}
|
|
20
|
-
export declare function Alert({ type, title, description, showIcon, icon, closable, onClose, action, className, style, classNames, styles, }: AlertProps): import("react
|
|
20
|
+
export declare function Alert({ type, title, description, showIcon, icon, closable, onClose, action, className, style, classNames, styles, }: AlertProps): import("react").JSX.Element | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CSSProperties, type MouseEvent, type ReactNode } from 'react';
|
|
2
|
-
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
|
|
2
|
+
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
3
3
|
import './breadcrumb.css';
|
|
4
4
|
export type BreadcrumbSemanticPart = 'root' | 'list' | 'item' | 'link' | 'page' | 'separator' | 'ellipsis';
|
|
5
5
|
export interface BreadcrumbItemType {
|
|
@@ -40,4 +40,4 @@ export interface BreadcrumbProps {
|
|
|
40
40
|
classNames?: SemanticClassNames<BreadcrumbSemanticPart>;
|
|
41
41
|
styles?: SemanticStyles<BreadcrumbSemanticPart>;
|
|
42
42
|
}
|
|
43
|
-
export declare function Breadcrumb({ items, separator, maxItems, itemRender, className, style, classNames, styles, }: BreadcrumbProps): import("react
|
|
43
|
+
export declare function Breadcrumb({ items, separator, maxItems, itemRender, className, style, classNames, styles, }: BreadcrumbProps): import("react").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ButtonHTMLAttributes, type ReactNode, type Ref } from 'react';
|
|
2
|
-
import { type TaoSize } from '../../provider/tao-provider';
|
|
3
|
-
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
|
|
2
|
+
import { type TaoSize } from '../../provider/tao-provider.js';
|
|
3
|
+
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
4
4
|
import './button.css';
|
|
5
5
|
export type ButtonSemanticPart = 'root';
|
|
6
6
|
export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'disabled'> {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { type ChangeEvent, type ReactNode, type Ref } from 'react';
|
|
2
|
-
import { type TaoSize } from '../../provider/tao-provider';
|
|
3
|
-
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
|
|
1
|
+
import { type AriaAttributes, type ChangeEvent, type ReactNode, type Ref } from 'react';
|
|
2
|
+
import { type TaoSize } from '../../provider/tao-provider.js';
|
|
3
|
+
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
4
4
|
import './checkbox.css';
|
|
5
5
|
export type CheckboxSemanticPart = 'root' | 'indicator' | 'label';
|
|
6
|
-
export interface CheckboxProps {
|
|
6
|
+
export interface CheckboxProps extends Pick<AriaAttributes, 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-errormessage' | 'aria-invalid' | 'aria-required'> {
|
|
7
|
+
id?: string;
|
|
7
8
|
checked?: boolean;
|
|
8
9
|
defaultChecked?: boolean;
|
|
9
10
|
indeterminate?: boolean;
|
|
@@ -21,7 +22,8 @@ export type CheckboxOptionType = {
|
|
|
21
22
|
value: string;
|
|
22
23
|
disabled?: boolean;
|
|
23
24
|
} | string;
|
|
24
|
-
export interface CheckboxGroupProps {
|
|
25
|
+
export interface CheckboxGroupProps extends Pick<AriaAttributes, 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-errormessage' | 'aria-invalid'> {
|
|
26
|
+
id?: string;
|
|
25
27
|
options?: CheckboxOptionType[];
|
|
26
28
|
value?: string[];
|
|
27
29
|
defaultValue?: string[];
|
|
@@ -31,4 +33,4 @@ export interface CheckboxGroupProps {
|
|
|
31
33
|
direction?: 'horizontal' | 'vertical';
|
|
32
34
|
children?: ReactNode;
|
|
33
35
|
}
|
|
34
|
-
export declare function CheckboxGroup(props: CheckboxGroupProps): import("react
|
|
36
|
+
export declare function CheckboxGroup(props: CheckboxGroupProps): import("react").JSX.Element;
|
|
@@ -7,69 +7,104 @@ import { cx } from "../../utils/semantic.js";
|
|
|
7
7
|
import "./checkbox.css";
|
|
8
8
|
const CheckboxGroupContext = /*#__PURE__*/ createContext(null);
|
|
9
9
|
const checkbox_Checkbox = /*#__PURE__*/ forwardRef(function(t0, ref) {
|
|
10
|
-
const $ = c(
|
|
11
|
-
|
|
10
|
+
const $ = c(60);
|
|
11
|
+
let ariaProps;
|
|
12
|
+
let checked;
|
|
13
|
+
let children;
|
|
14
|
+
let classNames;
|
|
15
|
+
let defaultChecked;
|
|
16
|
+
let disabled;
|
|
17
|
+
let indeterminate;
|
|
18
|
+
let onChange;
|
|
19
|
+
let styles;
|
|
20
|
+
let value;
|
|
21
|
+
if ($[0] !== t0) {
|
|
22
|
+
({ checked, defaultChecked, indeterminate, disabled, onChange, value, children, classNames, styles, ...ariaProps } = t0);
|
|
23
|
+
$[0] = t0;
|
|
24
|
+
$[1] = ariaProps;
|
|
25
|
+
$[2] = checked;
|
|
26
|
+
$[3] = children;
|
|
27
|
+
$[4] = classNames;
|
|
28
|
+
$[5] = defaultChecked;
|
|
29
|
+
$[6] = disabled;
|
|
30
|
+
$[7] = indeterminate;
|
|
31
|
+
$[8] = onChange;
|
|
32
|
+
$[9] = styles;
|
|
33
|
+
$[10] = value;
|
|
34
|
+
} else {
|
|
35
|
+
ariaProps = $[1];
|
|
36
|
+
checked = $[2];
|
|
37
|
+
children = $[3];
|
|
38
|
+
classNames = $[4];
|
|
39
|
+
defaultChecked = $[5];
|
|
40
|
+
disabled = $[6];
|
|
41
|
+
indeterminate = $[7];
|
|
42
|
+
onChange = $[8];
|
|
43
|
+
styles = $[9];
|
|
44
|
+
value = $[10];
|
|
45
|
+
}
|
|
12
46
|
const ctx = useTaoConfig();
|
|
13
47
|
const groupCtx = useContext(CheckboxGroupContext);
|
|
14
48
|
const inputRef = useRef(null);
|
|
15
49
|
const resolvedDisabled = disabled ?? groupCtx?.disabled ?? ctx.disabled ?? false;
|
|
16
50
|
let t1;
|
|
17
|
-
if ($[
|
|
51
|
+
if ($[11] !== checked || $[12] !== groupCtx || $[13] !== value) {
|
|
18
52
|
t1 = groupCtx ? groupCtx.value.includes(value ?? "") : checked;
|
|
19
|
-
$[
|
|
20
|
-
$[
|
|
21
|
-
$[
|
|
22
|
-
$[
|
|
23
|
-
} else t1 = $[
|
|
53
|
+
$[11] = checked;
|
|
54
|
+
$[12] = groupCtx;
|
|
55
|
+
$[13] = value;
|
|
56
|
+
$[14] = t1;
|
|
57
|
+
} else t1 = $[14];
|
|
24
58
|
const resolvedChecked = t1;
|
|
25
59
|
let t2;
|
|
26
60
|
let t3;
|
|
27
|
-
if ($[
|
|
61
|
+
if ($[15] !== indeterminate) {
|
|
28
62
|
t2 = ()=>{
|
|
29
63
|
if (inputRef.current) inputRef.current.indeterminate = !!indeterminate;
|
|
30
64
|
};
|
|
31
65
|
t3 = [
|
|
32
66
|
indeterminate
|
|
33
67
|
];
|
|
34
|
-
$[
|
|
35
|
-
$[
|
|
36
|
-
$[
|
|
68
|
+
$[15] = indeterminate;
|
|
69
|
+
$[16] = t2;
|
|
70
|
+
$[17] = t3;
|
|
37
71
|
} else {
|
|
38
|
-
t2 = $[
|
|
39
|
-
t3 = $[
|
|
72
|
+
t2 = $[16];
|
|
73
|
+
t3 = $[17];
|
|
40
74
|
}
|
|
41
75
|
useEffect(t2, t3);
|
|
42
76
|
let t4;
|
|
43
|
-
if ($[
|
|
77
|
+
if ($[18] !== groupCtx || $[19] !== onChange || $[20] !== value) {
|
|
44
78
|
t4 = (e)=>{
|
|
45
79
|
if (groupCtx && null != value) groupCtx.onChange(value, e.target.checked);
|
|
46
80
|
else onChange?.(e);
|
|
47
81
|
};
|
|
48
|
-
$[
|
|
49
|
-
$[
|
|
50
|
-
$[
|
|
51
|
-
$[
|
|
52
|
-
} else t4 = $[
|
|
82
|
+
$[18] = groupCtx;
|
|
83
|
+
$[19] = onChange;
|
|
84
|
+
$[20] = value;
|
|
85
|
+
$[21] = t4;
|
|
86
|
+
} else t4 = $[21];
|
|
53
87
|
const handleChange = t4;
|
|
54
88
|
const t5 = resolvedDisabled || void 0;
|
|
55
89
|
const t6 = classNames?.root;
|
|
56
90
|
let t7;
|
|
57
|
-
if ($[
|
|
91
|
+
if ($[22] !== t6) {
|
|
58
92
|
t7 = cx(t6);
|
|
59
|
-
$[
|
|
60
|
-
$[
|
|
61
|
-
} else t7 = $[
|
|
93
|
+
$[22] = t6;
|
|
94
|
+
$[23] = t7;
|
|
95
|
+
} else t7 = $[23];
|
|
62
96
|
const t8 = styles?.root;
|
|
63
97
|
let t9;
|
|
64
|
-
if ($[
|
|
98
|
+
if ($[24] !== ref) {
|
|
65
99
|
t9 = mergeRefs(inputRef, ref);
|
|
66
|
-
$[
|
|
67
|
-
$[
|
|
68
|
-
} else t9 = $[
|
|
100
|
+
$[24] = ref;
|
|
101
|
+
$[25] = t9;
|
|
102
|
+
} else t9 = $[25];
|
|
69
103
|
const t10 = indeterminate ? "mixed" : void 0;
|
|
70
104
|
let t11;
|
|
71
|
-
if ($[
|
|
105
|
+
if ($[26] !== ariaProps || $[27] !== defaultChecked || $[28] !== handleChange || $[29] !== resolvedChecked || $[30] !== resolvedDisabled || $[31] !== t10 || $[32] !== t9) {
|
|
72
106
|
t11 = /*#__PURE__*/ jsx("input", {
|
|
107
|
+
...ariaProps,
|
|
73
108
|
ref: t9,
|
|
74
109
|
type: "checkbox",
|
|
75
110
|
checked: resolvedChecked,
|
|
@@ -79,38 +114,39 @@ const checkbox_Checkbox = /*#__PURE__*/ forwardRef(function(t0, ref) {
|
|
|
79
114
|
"aria-checked": t10,
|
|
80
115
|
"data-tao-checkbox-input": ""
|
|
81
116
|
});
|
|
82
|
-
$[
|
|
83
|
-
$[
|
|
84
|
-
$[
|
|
85
|
-
$[
|
|
86
|
-
$[
|
|
87
|
-
$[
|
|
88
|
-
$[
|
|
89
|
-
|
|
117
|
+
$[26] = ariaProps;
|
|
118
|
+
$[27] = defaultChecked;
|
|
119
|
+
$[28] = handleChange;
|
|
120
|
+
$[29] = resolvedChecked;
|
|
121
|
+
$[30] = resolvedDisabled;
|
|
122
|
+
$[31] = t10;
|
|
123
|
+
$[32] = t9;
|
|
124
|
+
$[33] = t11;
|
|
125
|
+
} else t11 = $[33];
|
|
90
126
|
const t12 = resolvedChecked || void 0;
|
|
91
127
|
const t13 = indeterminate || void 0;
|
|
92
128
|
const t14 = classNames?.indicator;
|
|
93
129
|
let t15;
|
|
94
|
-
if ($[
|
|
130
|
+
if ($[34] !== t14) {
|
|
95
131
|
t15 = cx(t14);
|
|
96
|
-
$[
|
|
97
|
-
$[
|
|
98
|
-
} else t15 = $[
|
|
132
|
+
$[34] = t14;
|
|
133
|
+
$[35] = t15;
|
|
134
|
+
} else t15 = $[35];
|
|
99
135
|
const t16 = styles?.indicator;
|
|
100
136
|
let t17;
|
|
101
|
-
if ($[
|
|
137
|
+
if ($[36] !== indeterminate) {
|
|
102
138
|
t17 = !indeterminate && /*#__PURE__*/ jsx(CheckIcon, {});
|
|
103
|
-
$[
|
|
104
|
-
$[
|
|
105
|
-
} else t17 = $[
|
|
139
|
+
$[36] = indeterminate;
|
|
140
|
+
$[37] = t17;
|
|
141
|
+
} else t17 = $[37];
|
|
106
142
|
let t18;
|
|
107
|
-
if ($[
|
|
143
|
+
if ($[38] !== indeterminate) {
|
|
108
144
|
t18 = indeterminate && /*#__PURE__*/ jsx(MinusIcon, {});
|
|
109
|
-
$[
|
|
110
|
-
$[
|
|
111
|
-
} else t18 = $[
|
|
145
|
+
$[38] = indeterminate;
|
|
146
|
+
$[39] = t18;
|
|
147
|
+
} else t18 = $[39];
|
|
112
148
|
let t19;
|
|
113
|
-
if ($[
|
|
149
|
+
if ($[40] !== t12 || $[41] !== t13 || $[42] !== t15 || $[43] !== t16 || $[44] !== t17 || $[45] !== t18) {
|
|
114
150
|
t19 = /*#__PURE__*/ jsxs("span", {
|
|
115
151
|
"data-tao-checkbox": "",
|
|
116
152
|
"data-tao-checked": t12,
|
|
@@ -122,16 +158,16 @@ const checkbox_Checkbox = /*#__PURE__*/ forwardRef(function(t0, ref) {
|
|
|
122
158
|
t18
|
|
123
159
|
]
|
|
124
160
|
});
|
|
125
|
-
$[
|
|
126
|
-
$[
|
|
127
|
-
$[
|
|
128
|
-
$[
|
|
129
|
-
$[
|
|
130
|
-
$[
|
|
131
|
-
$[
|
|
132
|
-
} else t19 = $[
|
|
161
|
+
$[40] = t12;
|
|
162
|
+
$[41] = t13;
|
|
163
|
+
$[42] = t15;
|
|
164
|
+
$[43] = t16;
|
|
165
|
+
$[44] = t17;
|
|
166
|
+
$[45] = t18;
|
|
167
|
+
$[46] = t19;
|
|
168
|
+
} else t19 = $[46];
|
|
133
169
|
let t20;
|
|
134
|
-
if ($[
|
|
170
|
+
if ($[47] !== t11 || $[48] !== t19) {
|
|
135
171
|
t20 = /*#__PURE__*/ jsxs("span", {
|
|
136
172
|
"data-tao-checkbox-control": "",
|
|
137
173
|
children: [
|
|
@@ -139,25 +175,25 @@ const checkbox_Checkbox = /*#__PURE__*/ forwardRef(function(t0, ref) {
|
|
|
139
175
|
t19
|
|
140
176
|
]
|
|
141
177
|
});
|
|
142
|
-
$[
|
|
143
|
-
$[
|
|
144
|
-
$[
|
|
145
|
-
} else t20 = $[
|
|
178
|
+
$[47] = t11;
|
|
179
|
+
$[48] = t19;
|
|
180
|
+
$[49] = t20;
|
|
181
|
+
} else t20 = $[49];
|
|
146
182
|
let t21;
|
|
147
|
-
if ($[
|
|
183
|
+
if ($[50] !== children || $[51] !== classNames?.label || $[52] !== styles?.label) {
|
|
148
184
|
t21 = null != children && /*#__PURE__*/ jsx("span", {
|
|
149
185
|
"data-tao-checkbox-label": "",
|
|
150
186
|
className: cx(classNames?.label),
|
|
151
187
|
style: styles?.label,
|
|
152
188
|
children: children
|
|
153
189
|
});
|
|
154
|
-
$[
|
|
155
|
-
$[
|
|
156
|
-
$[
|
|
157
|
-
$[
|
|
158
|
-
} else t21 = $[
|
|
190
|
+
$[50] = children;
|
|
191
|
+
$[51] = classNames?.label;
|
|
192
|
+
$[52] = styles?.label;
|
|
193
|
+
$[53] = t21;
|
|
194
|
+
} else t21 = $[53];
|
|
159
195
|
let t22;
|
|
160
|
-
if ($[
|
|
196
|
+
if ($[54] !== t20 || $[55] !== t21 || $[56] !== t5 || $[57] !== t7 || $[58] !== t8) {
|
|
161
197
|
t22 = /*#__PURE__*/ jsxs("label", {
|
|
162
198
|
"data-tao-checkbox-wrapper": "",
|
|
163
199
|
"data-tao-disabled": t5,
|
|
@@ -168,17 +204,17 @@ const checkbox_Checkbox = /*#__PURE__*/ forwardRef(function(t0, ref) {
|
|
|
168
204
|
t21
|
|
169
205
|
]
|
|
170
206
|
});
|
|
171
|
-
$[
|
|
172
|
-
$[
|
|
173
|
-
$[
|
|
174
|
-
$[
|
|
175
|
-
$[
|
|
176
|
-
$[
|
|
177
|
-
} else t22 = $[
|
|
207
|
+
$[54] = t20;
|
|
208
|
+
$[55] = t21;
|
|
209
|
+
$[56] = t5;
|
|
210
|
+
$[57] = t7;
|
|
211
|
+
$[58] = t8;
|
|
212
|
+
$[59] = t22;
|
|
213
|
+
} else t22 = $[59];
|
|
178
214
|
return t22;
|
|
179
215
|
});
|
|
180
216
|
function CheckboxGroup(props) {
|
|
181
|
-
const $ = c(
|
|
217
|
+
const $ = c(44);
|
|
182
218
|
const { options, value, defaultValue, onChange, disabled, direction: t0, children } = props;
|
|
183
219
|
const direction = void 0 === t0 ? "horizontal" : t0;
|
|
184
220
|
const ctx = useTaoConfig();
|
|
@@ -234,57 +270,94 @@ function CheckboxGroup(props) {
|
|
|
234
270
|
} else t4 = $[13];
|
|
235
271
|
const groupCtxValue = t4;
|
|
236
272
|
let T0;
|
|
273
|
+
let t10;
|
|
274
|
+
let t11;
|
|
275
|
+
let t12;
|
|
276
|
+
let t13;
|
|
277
|
+
let t14;
|
|
237
278
|
let t5;
|
|
238
279
|
let t6;
|
|
239
280
|
let t7;
|
|
240
281
|
let t8;
|
|
241
|
-
|
|
282
|
+
let t9;
|
|
283
|
+
if ($[14] !== children || $[15] !== direction || $[16] !== groupCtxValue || $[17] !== options || $[18] !== props) {
|
|
242
284
|
const normalizedOptions = options?.map(_temp);
|
|
243
285
|
T0 = CheckboxGroupContext.Provider;
|
|
244
|
-
|
|
286
|
+
t14 = groupCtxValue;
|
|
245
287
|
t5 = "";
|
|
246
288
|
t6 = direction;
|
|
247
|
-
t7 =
|
|
289
|
+
t7 = props.id;
|
|
290
|
+
t8 = props["aria-label"];
|
|
291
|
+
t9 = props["aria-labelledby"];
|
|
292
|
+
t10 = props["aria-describedby"];
|
|
293
|
+
t11 = props["aria-errormessage"];
|
|
294
|
+
t12 = props["aria-invalid"];
|
|
295
|
+
t13 = normalizedOptions ? normalizedOptions.map(_temp2) : children;
|
|
248
296
|
$[14] = children;
|
|
249
297
|
$[15] = direction;
|
|
250
298
|
$[16] = groupCtxValue;
|
|
251
299
|
$[17] = options;
|
|
252
|
-
$[18] =
|
|
253
|
-
$[19] =
|
|
254
|
-
$[20] =
|
|
255
|
-
$[21] =
|
|
256
|
-
$[22] =
|
|
300
|
+
$[18] = props;
|
|
301
|
+
$[19] = T0;
|
|
302
|
+
$[20] = t10;
|
|
303
|
+
$[21] = t11;
|
|
304
|
+
$[22] = t12;
|
|
305
|
+
$[23] = t13;
|
|
306
|
+
$[24] = t14;
|
|
307
|
+
$[25] = t5;
|
|
308
|
+
$[26] = t6;
|
|
309
|
+
$[27] = t7;
|
|
310
|
+
$[28] = t8;
|
|
311
|
+
$[29] = t9;
|
|
257
312
|
} else {
|
|
258
|
-
T0 = $[
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
313
|
+
T0 = $[19];
|
|
314
|
+
t10 = $[20];
|
|
315
|
+
t11 = $[21];
|
|
316
|
+
t12 = $[22];
|
|
317
|
+
t13 = $[23];
|
|
318
|
+
t14 = $[24];
|
|
319
|
+
t5 = $[25];
|
|
320
|
+
t6 = $[26];
|
|
321
|
+
t7 = $[27];
|
|
322
|
+
t8 = $[28];
|
|
323
|
+
t9 = $[29];
|
|
263
324
|
}
|
|
264
|
-
let
|
|
265
|
-
if ($[
|
|
266
|
-
|
|
325
|
+
let t15;
|
|
326
|
+
if ($[30] !== t10 || $[31] !== t11 || $[32] !== t12 || $[33] !== t13 || $[34] !== t5 || $[35] !== t6 || $[36] !== t7 || $[37] !== t8 || $[38] !== t9) {
|
|
327
|
+
t15 = /*#__PURE__*/ jsx("fieldset", {
|
|
267
328
|
"data-tao-checkbox-group": t5,
|
|
268
329
|
"data-tao-direction": t6,
|
|
269
|
-
|
|
330
|
+
id: t7,
|
|
331
|
+
"aria-label": t8,
|
|
332
|
+
"aria-labelledby": t9,
|
|
333
|
+
"aria-describedby": t10,
|
|
334
|
+
"aria-errormessage": t11,
|
|
335
|
+
"aria-invalid": t12,
|
|
336
|
+
children: t13
|
|
270
337
|
});
|
|
271
|
-
$[23] = t5;
|
|
272
|
-
$[24] = t6;
|
|
273
|
-
$[25] = t7;
|
|
274
|
-
$[26] = t9;
|
|
275
|
-
} else t9 = $[26];
|
|
276
|
-
let t10;
|
|
277
|
-
if ($[27] !== T0 || $[28] !== t8 || $[29] !== t9) {
|
|
278
|
-
t10 = /*#__PURE__*/ jsx(T0, {
|
|
279
|
-
value: t8,
|
|
280
|
-
children: t9
|
|
281
|
-
});
|
|
282
|
-
$[27] = T0;
|
|
283
|
-
$[28] = t8;
|
|
284
|
-
$[29] = t9;
|
|
285
338
|
$[30] = t10;
|
|
286
|
-
|
|
287
|
-
|
|
339
|
+
$[31] = t11;
|
|
340
|
+
$[32] = t12;
|
|
341
|
+
$[33] = t13;
|
|
342
|
+
$[34] = t5;
|
|
343
|
+
$[35] = t6;
|
|
344
|
+
$[36] = t7;
|
|
345
|
+
$[37] = t8;
|
|
346
|
+
$[38] = t9;
|
|
347
|
+
$[39] = t15;
|
|
348
|
+
} else t15 = $[39];
|
|
349
|
+
let t16;
|
|
350
|
+
if ($[40] !== T0 || $[41] !== t14 || $[42] !== t15) {
|
|
351
|
+
t16 = /*#__PURE__*/ jsx(T0, {
|
|
352
|
+
value: t14,
|
|
353
|
+
children: t15
|
|
354
|
+
});
|
|
355
|
+
$[40] = T0;
|
|
356
|
+
$[41] = t14;
|
|
357
|
+
$[42] = t15;
|
|
358
|
+
$[43] = t16;
|
|
359
|
+
} else t16 = $[43];
|
|
360
|
+
return t16;
|
|
288
361
|
}
|
|
289
362
|
function _temp2(opt_0) {
|
|
290
363
|
return /*#__PURE__*/ jsx(checkbox_Checkbox, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
|
-
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
|
|
2
|
+
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
3
3
|
import './collapsible.css';
|
|
4
4
|
export type CollapsibleSemanticPart = 'root' | 'trigger' | 'content';
|
|
5
5
|
export interface CollapsibleProps {
|
|
@@ -29,11 +29,11 @@ export interface CollapsibleContentProps {
|
|
|
29
29
|
className?: string;
|
|
30
30
|
style?: CSSProperties;
|
|
31
31
|
}
|
|
32
|
-
export declare function Collapsible(props: CollapsibleProps): import("react
|
|
32
|
+
export declare function Collapsible(props: CollapsibleProps): import("react").JSX.Element;
|
|
33
33
|
export declare namespace Collapsible {
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
export { CollapsibleTrigger as Trigger };
|
|
35
|
+
export { CollapsibleContent as Content };
|
|
36
36
|
}
|
|
37
|
-
declare function CollapsibleTrigger(props: CollapsibleTriggerProps): import("react
|
|
38
|
-
declare function CollapsibleContent(props: CollapsibleContentProps): import("react
|
|
37
|
+
declare function CollapsibleTrigger(props: CollapsibleTriggerProps): import("react").JSX.Element;
|
|
38
|
+
declare function CollapsibleContent(props: CollapsibleContentProps): import("react").JSX.Element;
|
|
39
39
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
|
|
3
|
-
import { type MenuProps, type MenuSemanticPart } from '../menu/menu-render';
|
|
2
|
+
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
3
|
+
import { type MenuProps, type MenuSemanticPart } from '../menu/menu-render.js';
|
|
4
4
|
import './context-menu.css';
|
|
5
5
|
export type ContextMenuSemanticPart = MenuSemanticPart;
|
|
6
6
|
export interface ContextMenuProps {
|
|
@@ -16,4 +16,4 @@ export interface ContextMenuProps {
|
|
|
16
16
|
classNames?: SemanticClassNames<ContextMenuSemanticPart>;
|
|
17
17
|
styles?: SemanticStyles<ContextMenuSemanticPart>;
|
|
18
18
|
}
|
|
19
|
-
export declare function ContextMenu({ menu, children, open, onOpenChange, disabled, className, style, classNames, styles, }: ContextMenuProps): import("react
|
|
19
|
+
export declare function ContextMenu({ menu, children, open, onOpenChange, disabled, className, style, classNames, styles, }: ContextMenuProps): import("react").JSX.Element;
|
|
@@ -20,5 +20,5 @@ interface CalendarGridProps {
|
|
|
20
20
|
cellClassName?: string;
|
|
21
21
|
cellStyle?: CSSProperties;
|
|
22
22
|
}
|
|
23
|
-
export declare function CalendarGrid({ viewDate, value, rangeStart, rangeEnd, hoverDate, onSelect, onViewDateChange, onHover, disabledDate, minDate, maxDate, className, style, cellClassName, cellStyle, }: CalendarGridProps): import("react
|
|
23
|
+
export declare function CalendarGrid({ viewDate, value, rangeStart, rangeEnd, hoverDate, onSelect, onViewDateChange, onHover, disabledDate, minDate, maxDate, className, style, cellClassName, cellStyle, }: CalendarGridProps): import("react").JSX.Element;
|
|
24
24
|
export {};
|