@tooark/react 1.9.4 → 1.10.0
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 +70 -5
- package/README.pt-BR.md +70 -5
- package/dist/ark-accordion.d.ts +28 -0
- package/dist/ark-accordion.js +65 -0
- package/dist/ark-alert.d.ts +2 -2
- package/dist/ark-alert.js +5 -3
- package/dist/ark-avatar.d.ts +1 -1
- package/dist/ark-avatar.js +3 -2
- package/dist/ark-badge.d.ts +6 -2
- package/dist/ark-badge.js +23 -6
- package/dist/ark-breadcrumb.d.ts +38 -0
- package/dist/ark-breadcrumb.js +48 -0
- package/dist/ark-button.d.ts +7 -3
- package/dist/ark-button.js +9 -6
- package/dist/ark-calendar.d.ts +2 -2
- package/dist/ark-calendar.js +3 -2
- package/dist/ark-card.d.ts +10 -2
- package/dist/ark-card.js +22 -5
- package/dist/ark-carousel.d.ts +1 -1
- package/dist/ark-carousel.js +3 -2
- package/dist/ark-checkbox.d.ts +2 -2
- package/dist/ark-checkbox.js +5 -3
- package/dist/ark-clock.d.ts +2 -2
- package/dist/ark-clock.js +3 -2
- package/dist/ark-color-swatches.d.ts +2 -2
- package/dist/ark-color-swatches.js +3 -2
- package/dist/ark-combobox.d.ts +54 -0
- package/dist/ark-combobox.js +44 -0
- package/dist/ark-command-palette.d.ts +3 -3
- package/dist/ark-command-palette.js +12 -6
- package/dist/ark-copy-button.d.ts +6 -2
- package/dist/ark-copy-button.js +7 -4
- package/dist/ark-data-view.d.ts +1 -1
- package/dist/ark-data-view.js +5 -3
- package/dist/ark-datepicker.d.ts +2 -2
- package/dist/ark-datepicker.js +11 -4
- package/dist/ark-dialog.d.ts +2 -2
- package/dist/ark-dialog.js +5 -3
- package/dist/ark-drawer.d.ts +2 -2
- package/dist/ark-drawer.js +5 -3
- package/dist/ark-empty.d.ts +1 -1
- package/dist/ark-empty.js +5 -3
- package/dist/ark-file-input.d.ts +7 -3
- package/dist/ark-file-input.js +16 -4
- package/dist/ark-input.d.ts +2 -2
- package/dist/ark-input.js +5 -3
- package/dist/ark-kbd.d.ts +1 -1
- package/dist/ark-kbd.js +5 -3
- package/dist/ark-kv-editor.d.ts +2 -2
- package/dist/ark-kv-editor.js +3 -2
- package/dist/ark-mark.d.ts +1 -1
- package/dist/ark-mark.js +3 -2
- package/dist/ark-menu.d.ts +1 -1
- package/dist/ark-menu.js +9 -7
- package/dist/ark-nav.d.ts +4 -4
- package/dist/ark-nav.js +9 -7
- package/dist/ark-otp-input.d.ts +40 -0
- package/dist/ark-otp-input.js +38 -0
- package/dist/ark-pagination.d.ts +1 -1
- package/dist/ark-pagination.js +3 -2
- package/dist/ark-popover.d.ts +24 -0
- package/dist/ark-popover.js +42 -0
- package/dist/ark-progress.d.ts +2 -2
- package/dist/ark-progress.js +3 -2
- package/dist/ark-radio.d.ts +3 -3
- package/dist/ark-radio.js +7 -5
- package/dist/ark-scheduler.d.ts +1 -1
- package/dist/ark-scheduler.js +3 -2
- package/dist/ark-select.d.ts +2 -2
- package/dist/ark-select.js +5 -3
- package/dist/ark-shape-picker.d.ts +2 -2
- package/dist/ark-shape-picker.js +3 -2
- package/dist/ark-skeleton.d.ts +1 -1
- package/dist/ark-skeleton.js +5 -3
- package/dist/ark-slider.d.ts +45 -0
- package/dist/ark-slider.js +49 -0
- package/dist/ark-spinner.d.ts +1 -1
- package/dist/ark-spinner.js +3 -2
- package/dist/ark-split-pane.d.ts +1 -1
- package/dist/ark-split-pane.js +5 -3
- package/dist/ark-status-dot.d.ts +1 -1
- package/dist/ark-status-dot.js +3 -2
- package/dist/ark-stepper.d.ts +50 -0
- package/dist/ark-stepper.js +57 -0
- package/dist/ark-switch.d.ts +2 -2
- package/dist/ark-switch.js +8 -5
- package/dist/ark-tabs.d.ts +19 -3
- package/dist/ark-tabs.js +20 -5
- package/dist/ark-textarea.d.ts +6 -2
- package/dist/ark-textarea.js +7 -4
- package/dist/ark-time.d.ts +1 -1
- package/dist/ark-time.js +3 -2
- package/dist/ark-timeline.d.ts +32 -0
- package/dist/ark-timeline.js +26 -0
- package/dist/ark-timer.d.ts +26 -0
- package/dist/ark-timer.js +41 -0
- package/dist/ark-toaster.d.ts +1 -1
- package/dist/ark-toaster.js +3 -2
- package/dist/ark-toggle.d.ts +1 -1
- package/dist/ark-toggle.js +7 -5
- package/dist/ark-tooltip.d.ts +1 -1
- package/dist/ark-tooltip.js +5 -3
- package/dist/ark-tree.d.ts +3 -3
- package/dist/ark-tree.js +7 -5
- package/dist/code.d.ts +1 -1
- package/dist/elements.d.ts +104 -0
- package/dist/elements.js +52 -0
- package/dist/index.d.ts +1 -85
- package/dist/index.js +7 -43
- package/dist/jsx-intrinsics.d.ts +190 -0
- package/dist/register-elements.d.ts +8 -0
- package/dist/register-elements.js +22 -0
- package/dist/text-child.d.ts +3 -0
- package/dist/text-child.js +8 -0
- package/package.json +17 -7
package/dist/index.d.ts
CHANGED
|
@@ -1,86 +1,2 @@
|
|
|
1
1
|
/// <reference path="./jsx-intrinsics.d.ts" />
|
|
2
|
-
export
|
|
3
|
-
export type { ArkAlertProps } from "./ark-alert.js";
|
|
4
|
-
export { ArkAlert } from "./ark-alert.js";
|
|
5
|
-
export type { ArkAvatarProps } from "./ark-avatar.js";
|
|
6
|
-
export { ArkAvatar } from "./ark-avatar.js";
|
|
7
|
-
export type { ArkBadgeProps } from "./ark-badge.js";
|
|
8
|
-
export { ArkBadge } from "./ark-badge.js";
|
|
9
|
-
export type { ArkButtonGroupProps, ArkButtonProps } from "./ark-button.js";
|
|
10
|
-
export { ArkButton, ArkButtonGroup } from "./ark-button.js";
|
|
11
|
-
export type { ArkCalendarProps } from "./ark-calendar.js";
|
|
12
|
-
export { ArkCalendar } from "./ark-calendar.js";
|
|
13
|
-
export type { ArkCardProps } from "./ark-card.js";
|
|
14
|
-
export { ArkCard } from "./ark-card.js";
|
|
15
|
-
export type { ArkCarouselProps } from "./ark-carousel.js";
|
|
16
|
-
export { ArkCarousel } from "./ark-carousel.js";
|
|
17
|
-
export type { ArkCheckboxProps } from "./ark-checkbox.js";
|
|
18
|
-
export { ArkCheckbox } from "./ark-checkbox.js";
|
|
19
|
-
export type { ArkClockProps } from "./ark-clock.js";
|
|
20
|
-
export { ArkClock } from "./ark-clock.js";
|
|
21
|
-
export type { ArkColorSwatchesProps } from "./ark-color-swatches.js";
|
|
22
|
-
export { ArkColorSwatches } from "./ark-color-swatches.js";
|
|
23
|
-
export type { ArkCommandItemProps, ArkCommandPaletteProps } from "./ark-command-palette.js";
|
|
24
|
-
export { ArkCommandItem, ArkCommandPalette } from "./ark-command-palette.js";
|
|
25
|
-
export type { ArkCopyButtonProps } from "./ark-copy-button.js";
|
|
26
|
-
export { ArkCopyButton } from "./ark-copy-button.js";
|
|
27
|
-
export type { ArkDataViewProps, ArkDataViewReactCardRender, ArkDataViewReactColumn } from "./ark-data-view.js";
|
|
28
|
-
export { ArkDataView } from "./ark-data-view.js";
|
|
29
|
-
export type { ArkDatepickerProps } from "./ark-datepicker.js";
|
|
30
|
-
export { ArkDatepicker } from "./ark-datepicker.js";
|
|
31
|
-
export type { ArkDialogProps } from "./ark-dialog.js";
|
|
32
|
-
export { ArkDialog } from "./ark-dialog.js";
|
|
33
|
-
export type { ArkDrawerProps } from "./ark-drawer.js";
|
|
34
|
-
export { ArkDrawer } from "./ark-drawer.js";
|
|
35
|
-
export type { ArkEmptyProps } from "./ark-empty.js";
|
|
36
|
-
export { ArkEmpty } from "./ark-empty.js";
|
|
37
|
-
export type { ArkFileInputProps } from "./ark-file-input.js";
|
|
38
|
-
export { ArkFileInput } from "./ark-file-input.js";
|
|
39
|
-
export type { ArkInputProps } from "./ark-input.js";
|
|
40
|
-
export { ArkInput } from "./ark-input.js";
|
|
41
|
-
export type { ArkKbdProps } from "./ark-kbd.js";
|
|
42
|
-
export { ArkKbd } from "./ark-kbd.js";
|
|
43
|
-
export type { ArkKvEditorProps } from "./ark-kv-editor.js";
|
|
44
|
-
export { ArkKvEditor } from "./ark-kv-editor.js";
|
|
45
|
-
export type { ArkMarkProps } from "./ark-mark.js";
|
|
46
|
-
export { ArkMark } from "./ark-mark.js";
|
|
47
|
-
export type { ArkMenuGroupProps, ArkMenuItemProps, ArkMenuProps } from "./ark-menu.js";
|
|
48
|
-
export { ArkMenu, ArkMenuGroup, ArkMenuItem } from "./ark-menu.js";
|
|
49
|
-
export type { ArkNavGroupProps, ArkNavItemProps, ArkNavNavigateDetail, ArkNavProps } from "./ark-nav.js";
|
|
50
|
-
export { ArkNav, ArkNavGroup, ArkNavItem } from "./ark-nav.js";
|
|
51
|
-
export type { ArkPaginationProps } from "./ark-pagination.js";
|
|
52
|
-
export { ArkPagination } from "./ark-pagination.js";
|
|
53
|
-
export type { ArkProgressProps } from "./ark-progress.js";
|
|
54
|
-
export { ArkProgress } from "./ark-progress.js";
|
|
55
|
-
export type { ArkRadioGroupProps, ArkRadioProps } from "./ark-radio.js";
|
|
56
|
-
export { ArkRadio, ArkRadioGroup } from "./ark-radio.js";
|
|
57
|
-
export type { ArkSchedulerProps } from "./ark-scheduler.js";
|
|
58
|
-
export { ArkScheduler } from "./ark-scheduler.js";
|
|
59
|
-
export type { ArkSelectProps } from "./ark-select.js";
|
|
60
|
-
export { ArkSelect } from "./ark-select.js";
|
|
61
|
-
export type { ArkShapePickerProps } from "./ark-shape-picker.js";
|
|
62
|
-
export { ArkShapePicker } from "./ark-shape-picker.js";
|
|
63
|
-
export type { ArkSkeletonProps } from "./ark-skeleton.js";
|
|
64
|
-
export { ArkSkeleton } from "./ark-skeleton.js";
|
|
65
|
-
export type { ArkSpinnerProps } from "./ark-spinner.js";
|
|
66
|
-
export { ArkSpinner } from "./ark-spinner.js";
|
|
67
|
-
export type { ArkSplitPaneProps } from "./ark-split-pane.js";
|
|
68
|
-
export { ArkSplitPane } from "./ark-split-pane.js";
|
|
69
|
-
export type { ArkStatusDotProps } from "./ark-status-dot.js";
|
|
70
|
-
export { ArkStatusDot } from "./ark-status-dot.js";
|
|
71
|
-
export type { ArkSwitchProps } from "./ark-switch.js";
|
|
72
|
-
export { ArkSwitch } from "./ark-switch.js";
|
|
73
|
-
export type { ArkTabProps, ArkTabsProps } from "./ark-tabs.js";
|
|
74
|
-
export { ArkTab, ArkTabs } from "./ark-tabs.js";
|
|
75
|
-
export type { ArkTextareaProps } from "./ark-textarea.js";
|
|
76
|
-
export { ArkTextarea } from "./ark-textarea.js";
|
|
77
|
-
export type { ArkTimeProps } from "./ark-time.js";
|
|
78
|
-
export { ArkTime } from "./ark-time.js";
|
|
79
|
-
export type { ArkToasterProps } from "./ark-toaster.js";
|
|
80
|
-
export { ArkToaster } from "./ark-toaster.js";
|
|
81
|
-
export type { ArkToggleGroupProps, ArkToggleProps } from "./ark-toggle.js";
|
|
82
|
-
export { ArkToggle, ArkToggleGroup } from "./ark-toggle.js";
|
|
83
|
-
export type { ArkTooltipProps } from "./ark-tooltip.js";
|
|
84
|
-
export { ArkTooltip } from "./ark-tooltip.js";
|
|
85
|
-
export type { ArkTreeActivateDetail, ArkTreeItemProps, ArkTreeProps, ArkTreeSelectionDetail, ArkTreeToggleDetail } from "./ark-tree.js";
|
|
86
|
-
export { ArkTree, ArkTreeItem } from "./ark-tree.js";
|
|
2
|
+
export * from "./elements.js";
|
package/dist/index.js
CHANGED
|
@@ -1,43 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
export { ArkCarousel } from "./ark-carousel.js";
|
|
9
|
-
export { ArkCheckbox } from "./ark-checkbox.js";
|
|
10
|
-
export { ArkClock } from "./ark-clock.js";
|
|
11
|
-
export { ArkColorSwatches } from "./ark-color-swatches.js";
|
|
12
|
-
export { ArkCommandItem, ArkCommandPalette } from "./ark-command-palette.js";
|
|
13
|
-
export { ArkCopyButton } from "./ark-copy-button.js";
|
|
14
|
-
export { ArkDataView } from "./ark-data-view.js";
|
|
15
|
-
export { ArkDatepicker } from "./ark-datepicker.js";
|
|
16
|
-
export { ArkDialog } from "./ark-dialog.js";
|
|
17
|
-
export { ArkDrawer } from "./ark-drawer.js";
|
|
18
|
-
export { ArkEmpty } from "./ark-empty.js";
|
|
19
|
-
export { ArkFileInput } from "./ark-file-input.js";
|
|
20
|
-
export { ArkInput } from "./ark-input.js";
|
|
21
|
-
export { ArkKbd } from "./ark-kbd.js";
|
|
22
|
-
export { ArkKvEditor } from "./ark-kv-editor.js";
|
|
23
|
-
export { ArkMark } from "./ark-mark.js";
|
|
24
|
-
export { ArkMenu, ArkMenuGroup, ArkMenuItem } from "./ark-menu.js";
|
|
25
|
-
export { ArkNav, ArkNavGroup, ArkNavItem } from "./ark-nav.js";
|
|
26
|
-
export { ArkPagination } from "./ark-pagination.js";
|
|
27
|
-
export { ArkProgress } from "./ark-progress.js";
|
|
28
|
-
export { ArkRadio, ArkRadioGroup } from "./ark-radio.js";
|
|
29
|
-
export { ArkScheduler } from "./ark-scheduler.js";
|
|
30
|
-
export { ArkSelect } from "./ark-select.js";
|
|
31
|
-
export { ArkShapePicker } from "./ark-shape-picker.js";
|
|
32
|
-
export { ArkSkeleton } from "./ark-skeleton.js";
|
|
33
|
-
export { ArkSpinner } from "./ark-spinner.js";
|
|
34
|
-
export { ArkSplitPane } from "./ark-split-pane.js";
|
|
35
|
-
export { ArkStatusDot } from "./ark-status-dot.js";
|
|
36
|
-
export { ArkSwitch } from "./ark-switch.js";
|
|
37
|
-
export { ArkTab, ArkTabs } from "./ark-tabs.js";
|
|
38
|
-
export { ArkTextarea } from "./ark-textarea.js";
|
|
39
|
-
export { ArkTime } from "./ark-time.js";
|
|
40
|
-
export { ArkToaster } from "./ark-toaster.js";
|
|
41
|
-
export { ArkToggle, ArkToggleGroup } from "./ark-toggle.js";
|
|
42
|
-
export { ArkTooltip } from "./ark-tooltip.js";
|
|
43
|
-
export { ArkTree, ArkTreeItem } from "./ark-tree.js";
|
|
1
|
+
import { ensureTooarkComponentsRegistered } from "./register.js";
|
|
2
|
+
import { setTooarkRegisterAll } from "./register-elements.js";
|
|
3
|
+
// A entrada principal registra todos os elementos no primeiro wrapper, como sempre (uma tag crua ao lado de um wrapper
|
|
4
|
+
// conta com isso): injeta o registro de todos na entrada `elements`, cujos wrappers sozinhos registram só o próprio
|
|
5
|
+
// elemento. É o único efeito colateral do pacote, que o `sideEffects` do package.json declara.
|
|
6
|
+
setTooarkRegisterAll(ensureTooarkComponentsRegistered);
|
|
7
|
+
export * from "./elements.js";
|
package/dist/jsx-intrinsics.d.ts
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import type {
|
|
2
|
+
ArkAccordionVariant,
|
|
2
3
|
ArkAlertLive,
|
|
3
4
|
ArkAlertVariant,
|
|
4
5
|
ArkAvatarShape,
|
|
5
6
|
ArkAvatarVariant,
|
|
6
7
|
ArkBadgeSize,
|
|
7
8
|
ArkBadgeVariant,
|
|
9
|
+
ArkBreadcrumbSeparator,
|
|
8
10
|
ArkButtonStatus,
|
|
9
11
|
ArkButtonType,
|
|
10
12
|
ArkButtonVariant,
|
|
11
13
|
ArkCardPadding,
|
|
12
14
|
ArkCarouselSnap,
|
|
15
|
+
ArkChoiceVariant,
|
|
16
|
+
ArkComboboxMode,
|
|
13
17
|
ArkDataViewMode,
|
|
14
18
|
ArkDataViewView,
|
|
15
19
|
ArkDatepickerLang,
|
|
@@ -26,8 +30,14 @@ import type {
|
|
|
26
30
|
ArkNavSide,
|
|
27
31
|
ArkNavVariant,
|
|
28
32
|
ArkOrientation,
|
|
33
|
+
ArkOtpType,
|
|
34
|
+
ArkPopoverSide,
|
|
35
|
+
ArkPopoverTrigger,
|
|
36
|
+
ArkProgressVariant,
|
|
29
37
|
ArkRounded,
|
|
30
38
|
ArkSize,
|
|
39
|
+
ArkStepperVariant,
|
|
40
|
+
ArkStepStatus,
|
|
31
41
|
ArkTabsFill,
|
|
32
42
|
ArkTabsVariant,
|
|
33
43
|
ArkTextareaResize,
|
|
@@ -66,6 +76,9 @@ interface ArkIntrinsicElements {
|
|
|
66
76
|
};
|
|
67
77
|
"ark-badge": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
68
78
|
testid?: string;
|
|
79
|
+
removable?: boolean;
|
|
80
|
+
lang?: ArkLang;
|
|
81
|
+
"locale-json"?: string;
|
|
69
82
|
intent?: ArkIntent;
|
|
70
83
|
variant?: ArkBadgeVariant;
|
|
71
84
|
size?: ArkBadgeSize;
|
|
@@ -78,6 +91,7 @@ interface ArkIntrinsicElements {
|
|
|
78
91
|
type?: ArkButtonType;
|
|
79
92
|
form?: string;
|
|
80
93
|
disabled?: boolean;
|
|
94
|
+
"soft-disabled"?: boolean;
|
|
81
95
|
variant?: ArkButtonVariant;
|
|
82
96
|
intent?: ArkIntent;
|
|
83
97
|
theme?: ArkTheme;
|
|
@@ -96,6 +110,7 @@ interface ArkIntrinsicElements {
|
|
|
96
110
|
};
|
|
97
111
|
"ark-checkbox": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
98
112
|
testid?: string;
|
|
113
|
+
variant?: ArkChoiceVariant;
|
|
99
114
|
checked?: boolean;
|
|
100
115
|
indeterminate?: boolean;
|
|
101
116
|
disabled?: boolean;
|
|
@@ -109,6 +124,8 @@ interface ArkIntrinsicElements {
|
|
|
109
124
|
};
|
|
110
125
|
"ark-progress": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
111
126
|
testid?: string;
|
|
127
|
+
variant?: ArkProgressVariant;
|
|
128
|
+
segments?: number | string;
|
|
112
129
|
value?: number | string;
|
|
113
130
|
max?: number | string;
|
|
114
131
|
indeterminate?: boolean;
|
|
@@ -133,6 +150,7 @@ interface ArkIntrinsicElements {
|
|
|
133
150
|
};
|
|
134
151
|
"ark-radio-group": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
135
152
|
testid?: string;
|
|
153
|
+
variant?: ArkChoiceVariant;
|
|
136
154
|
value?: string;
|
|
137
155
|
name?: string;
|
|
138
156
|
label?: string;
|
|
@@ -148,6 +166,7 @@ interface ArkIntrinsicElements {
|
|
|
148
166
|
};
|
|
149
167
|
"ark-radio": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
150
168
|
testid?: string;
|
|
169
|
+
variant?: ArkChoiceVariant;
|
|
151
170
|
checked?: boolean;
|
|
152
171
|
disabled?: boolean;
|
|
153
172
|
intent?: ArkIntent;
|
|
@@ -197,6 +216,8 @@ interface ArkIntrinsicElements {
|
|
|
197
216
|
name?: string;
|
|
198
217
|
value?: string;
|
|
199
218
|
label?: string;
|
|
219
|
+
"label-position"?: "start" | "end";
|
|
220
|
+
helper?: string;
|
|
200
221
|
};
|
|
201
222
|
"ark-toggle": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
202
223
|
testid?: string;
|
|
@@ -211,6 +232,7 @@ interface ArkIntrinsicElements {
|
|
|
211
232
|
testid?: string;
|
|
212
233
|
value?: string;
|
|
213
234
|
multiple?: boolean;
|
|
235
|
+
orientation?: ArkOrientation;
|
|
214
236
|
disabled?: boolean;
|
|
215
237
|
intent?: ArkIntent;
|
|
216
238
|
theme?: ArkTheme;
|
|
@@ -283,6 +305,7 @@ interface ArkIntrinsicElements {
|
|
|
283
305
|
rounded?: ArkRounded;
|
|
284
306
|
loading?: boolean;
|
|
285
307
|
disabled?: boolean;
|
|
308
|
+
"soft-disabled"?: boolean;
|
|
286
309
|
"icon-only"?: boolean;
|
|
287
310
|
"full-width"?: boolean;
|
|
288
311
|
color?: string;
|
|
@@ -311,6 +334,16 @@ interface ArkIntrinsicElements {
|
|
|
311
334
|
"event-display"?: "dots" | "count" | "list";
|
|
312
335
|
"step-minutes"?: number;
|
|
313
336
|
"hours-format"?: "24" | "12";
|
|
337
|
+
label?: string;
|
|
338
|
+
helper?: string;
|
|
339
|
+
error?: boolean;
|
|
340
|
+
"error-message"?: string;
|
|
341
|
+
required?: boolean;
|
|
342
|
+
readonly?: boolean;
|
|
343
|
+
size?: ArkSize;
|
|
344
|
+
rounded?: ArkRounded;
|
|
345
|
+
autocomplete?: string;
|
|
346
|
+
"full-width"?: boolean;
|
|
314
347
|
};
|
|
315
348
|
"ark-dialog": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
316
349
|
testid?: string;
|
|
@@ -490,8 +523,71 @@ interface ArkIntrinsicElements {
|
|
|
490
523
|
checked?: boolean | "mixed" | "false";
|
|
491
524
|
disabled?: boolean;
|
|
492
525
|
};
|
|
526
|
+
"ark-accordion": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
527
|
+
testid?: string;
|
|
528
|
+
multiple?: boolean;
|
|
529
|
+
variant?: ArkAccordionVariant;
|
|
530
|
+
rounded?: ArkRounded;
|
|
531
|
+
size?: ArkSize;
|
|
532
|
+
intent?: ArkIntent;
|
|
533
|
+
"heading-level"?: ArkHeadingLevel;
|
|
534
|
+
theme?: ArkTheme;
|
|
535
|
+
};
|
|
536
|
+
"ark-accordion-item": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
537
|
+
testid?: string;
|
|
538
|
+
heading?: string;
|
|
539
|
+
open?: boolean;
|
|
540
|
+
disabled?: boolean;
|
|
541
|
+
value?: string;
|
|
542
|
+
size?: ArkSize;
|
|
543
|
+
intent?: ArkIntent;
|
|
544
|
+
"heading-level"?: ArkHeadingLevel;
|
|
545
|
+
theme?: ArkTheme;
|
|
546
|
+
};
|
|
547
|
+
"ark-combobox": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
548
|
+
testid?: string;
|
|
549
|
+
label?: string;
|
|
550
|
+
placeholder?: string;
|
|
551
|
+
options?: string;
|
|
552
|
+
value?: string;
|
|
553
|
+
name?: string;
|
|
554
|
+
mode?: ArkComboboxMode;
|
|
555
|
+
loading?: boolean;
|
|
556
|
+
clearable?: boolean;
|
|
557
|
+
size?: ArkSize;
|
|
558
|
+
intent?: ArkIntent;
|
|
559
|
+
theme?: ArkTheme;
|
|
560
|
+
rounded?: ArkRounded;
|
|
561
|
+
helper?: string;
|
|
562
|
+
error?: boolean;
|
|
563
|
+
"error-message"?: string;
|
|
564
|
+
disabled?: boolean;
|
|
565
|
+
required?: boolean;
|
|
566
|
+
lang?: ArkLang;
|
|
567
|
+
"locale-json"?: string;
|
|
568
|
+
};
|
|
569
|
+
"ark-breadcrumb": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
570
|
+
testid?: string;
|
|
571
|
+
separator?: ArkBreadcrumbSeparator;
|
|
572
|
+
label?: string;
|
|
573
|
+
size?: ArkSize;
|
|
574
|
+
intent?: ArkIntent;
|
|
575
|
+
theme?: ArkTheme;
|
|
576
|
+
lang?: ArkLang;
|
|
577
|
+
"locale-json"?: string;
|
|
578
|
+
};
|
|
579
|
+
"ark-breadcrumb-item": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
580
|
+
testid?: string;
|
|
581
|
+
href?: string;
|
|
582
|
+
target?: string;
|
|
583
|
+
current?: boolean;
|
|
584
|
+
size?: ArkSize;
|
|
585
|
+
intent?: ArkIntent;
|
|
586
|
+
};
|
|
493
587
|
"ark-card": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
494
588
|
testid?: string;
|
|
589
|
+
href?: string;
|
|
590
|
+
target?: string;
|
|
495
591
|
heading?: string;
|
|
496
592
|
"heading-level"?: ArkHeadingLevel;
|
|
497
593
|
padding?: ArkCardPadding;
|
|
@@ -593,6 +689,9 @@ interface ArkIntrinsicElements {
|
|
|
593
689
|
theme?: ArkTheme;
|
|
594
690
|
lang?: ArkLang;
|
|
595
691
|
"locale-json"?: string;
|
|
692
|
+
"strict-accept"?: boolean;
|
|
693
|
+
"max-size"?: number | string;
|
|
694
|
+
transient?: boolean;
|
|
596
695
|
};
|
|
597
696
|
"ark-input": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
598
697
|
testid?: string;
|
|
@@ -647,6 +746,96 @@ interface ArkIntrinsicElements {
|
|
|
647
746
|
closable?: boolean;
|
|
648
747
|
dirty?: boolean;
|
|
649
748
|
};
|
|
749
|
+
"ark-otp-input": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
750
|
+
testid?: string;
|
|
751
|
+
value?: string;
|
|
752
|
+
length?: number | string;
|
|
753
|
+
type?: ArkOtpType;
|
|
754
|
+
label?: string;
|
|
755
|
+
name?: string;
|
|
756
|
+
disabled?: boolean;
|
|
757
|
+
size?: ArkSize;
|
|
758
|
+
intent?: ArkIntent;
|
|
759
|
+
theme?: ArkTheme;
|
|
760
|
+
};
|
|
761
|
+
"ark-popover": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
762
|
+
testid?: string;
|
|
763
|
+
for?: string;
|
|
764
|
+
open?: boolean;
|
|
765
|
+
side?: ArkPopoverSide;
|
|
766
|
+
trigger?: ArkPopoverTrigger;
|
|
767
|
+
label?: string;
|
|
768
|
+
theme?: ArkTheme;
|
|
769
|
+
};
|
|
770
|
+
"ark-timeline": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
771
|
+
testid?: string;
|
|
772
|
+
theme?: ArkTheme;
|
|
773
|
+
};
|
|
774
|
+
"ark-timeline-item": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
775
|
+
testid?: string;
|
|
776
|
+
heading?: string;
|
|
777
|
+
datetime?: string;
|
|
778
|
+
"time-format"?: ArkTimeFormat;
|
|
779
|
+
intent?: ArkIntent;
|
|
780
|
+
lang?: ArkLang;
|
|
781
|
+
};
|
|
782
|
+
"ark-slider": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
783
|
+
testid?: string;
|
|
784
|
+
value?: number | string;
|
|
785
|
+
min?: number | string;
|
|
786
|
+
max?: number | string;
|
|
787
|
+
step?: number | string;
|
|
788
|
+
range?: boolean;
|
|
789
|
+
label?: string;
|
|
790
|
+
name?: string;
|
|
791
|
+
"show-value"?: boolean;
|
|
792
|
+
disabled?: boolean;
|
|
793
|
+
marks?: string;
|
|
794
|
+
size?: ArkSize;
|
|
795
|
+
intent?: ArkIntent;
|
|
796
|
+
theme?: ArkTheme;
|
|
797
|
+
lang?: ArkLang;
|
|
798
|
+
"locale-json"?: string;
|
|
799
|
+
};
|
|
800
|
+
"ark-stepper": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
801
|
+
testid?: string;
|
|
802
|
+
value?: number | string;
|
|
803
|
+
variant?: ArkStepperVariant;
|
|
804
|
+
orientation?: ArkOrientation;
|
|
805
|
+
linear?: boolean;
|
|
806
|
+
controls?: boolean;
|
|
807
|
+
"autoplay-ms"?: number | string;
|
|
808
|
+
size?: ArkSize;
|
|
809
|
+
intent?: ArkIntent;
|
|
810
|
+
label?: string;
|
|
811
|
+
theme?: ArkTheme;
|
|
812
|
+
lang?: ArkLang;
|
|
813
|
+
"locale-json"?: string;
|
|
814
|
+
};
|
|
815
|
+
"ark-step": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
816
|
+
testid?: string;
|
|
817
|
+
label?: string;
|
|
818
|
+
status?: ArkStepStatus;
|
|
819
|
+
disabled?: boolean;
|
|
820
|
+
};
|
|
821
|
+
"ark-timer": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
822
|
+
testid?: string;
|
|
823
|
+
duration?: number | string;
|
|
824
|
+
deadline?: string;
|
|
825
|
+
running?: boolean;
|
|
826
|
+
"warn-at"?: number | string;
|
|
827
|
+
"announce-at"?: string;
|
|
828
|
+
label?: string;
|
|
829
|
+
size?: ArkSize;
|
|
830
|
+
theme?: ArkTheme;
|
|
831
|
+
lang?: ArkLang;
|
|
832
|
+
"locale-json"?: string;
|
|
833
|
+
};
|
|
834
|
+
"ark-tab-panel": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
835
|
+
testid?: string;
|
|
836
|
+
value?: string;
|
|
837
|
+
for?: string;
|
|
838
|
+
};
|
|
650
839
|
"ark-textarea": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
651
840
|
testid?: string;
|
|
652
841
|
label?: string;
|
|
@@ -654,6 +843,7 @@ interface ArkIntrinsicElements {
|
|
|
654
843
|
value?: string;
|
|
655
844
|
name?: string;
|
|
656
845
|
rows?: number | string;
|
|
846
|
+
"max-rows"?: number | string;
|
|
657
847
|
autosize?: boolean;
|
|
658
848
|
monospace?: boolean;
|
|
659
849
|
resize?: ArkTextareaResize;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ArkElementClass } from "@tooark/web-components";
|
|
2
|
+
/** Uso interno da entrada principal: com ele, os wrappers registram todos os elementos. */
|
|
3
|
+
export declare function setTooarkRegisterAll(register: () => void): void;
|
|
4
|
+
/**
|
|
5
|
+
* Registra os elementos de um wrapper. Chamado no efeito do wrapper, que não roda no servidor; sem `customElements`
|
|
6
|
+
* (SSR) a chamada é ignorada e o registro acontece no cliente.
|
|
7
|
+
*/
|
|
8
|
+
export declare function ensureTooarkElementsRegistered(...elements: ArkElementClass[]): void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { registerTooarkElements } from "@tooark/web-components";
|
|
2
|
+
// Registro dos wrappers: cada um define só o próprio elemento (e o que ele cria por dentro). A entrada principal
|
|
3
|
+
// (`@tooark/react`) injeta aqui o registro de todos, que os wrappers fazem desde sempre: com ela importada, o primeiro
|
|
4
|
+
// wrapper registra todos os elementos, e uma tag crua na mesma página continua funcionando. Sem ela (só
|
|
5
|
+
// `@tooark/react/elements`), o bundle leva só os elementos dos wrappers usados.
|
|
6
|
+
let registerAll = null;
|
|
7
|
+
/** Uso interno da entrada principal: com ele, os wrappers registram todos os elementos. */
|
|
8
|
+
export function setTooarkRegisterAll(register) {
|
|
9
|
+
registerAll = register;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Registra os elementos de um wrapper. Chamado no efeito do wrapper, que não roda no servidor; sem `customElements`
|
|
13
|
+
* (SSR) a chamada é ignorada e o registro acontece no cliente.
|
|
14
|
+
*/
|
|
15
|
+
export function ensureTooarkElementsRegistered(...elements) {
|
|
16
|
+
if (typeof customElements === "undefined")
|
|
17
|
+
return;
|
|
18
|
+
if (registerAll)
|
|
19
|
+
registerAll();
|
|
20
|
+
else
|
|
21
|
+
registerTooarkElements(...elements);
|
|
22
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// O React troca um filho único de texto por `textContent` quando o elemento tem outros filhos (os nós do componente),
|
|
2
|
+
// e isso tira do host todos os filhos de uma vez. Os elementos devolvem os próprios nós, mas eles saem e voltam: um
|
|
3
|
+
// popover fecha, um elemento dentro deles reconecta. Numa lista de um item o texto vira um nó de texto, que o React
|
|
4
|
+
// atualiza no lugar sem tocar nos irmãos. Não precisa de `key`: o aviso de chave só vale para elementos.
|
|
5
|
+
/** Um texto (ou número) solto vira uma lista de um item, para o React atualizar o nó de texto no lugar. */
|
|
6
|
+
export function textChild(children) {
|
|
7
|
+
return typeof children === "string" || typeof children === "number" ? [children] : children;
|
|
8
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tooark/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "Tooark React — typed wrappers for ark-* components for React 18 and 19",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tooark",
|
|
@@ -53,12 +53,19 @@
|
|
|
53
53
|
"types": "./dist/code.d.ts",
|
|
54
54
|
"default": "./dist/code.js"
|
|
55
55
|
},
|
|
56
|
+
"./elements": {
|
|
57
|
+
"types": "./dist/elements.d.ts",
|
|
58
|
+
"default": "./dist/elements.js"
|
|
59
|
+
},
|
|
56
60
|
"./wysiwyg": {
|
|
57
61
|
"types": "./dist/wysiwyg.d.ts",
|
|
58
62
|
"default": "./dist/wysiwyg.js"
|
|
59
63
|
},
|
|
60
64
|
"./package.json": "./package.json"
|
|
61
65
|
},
|
|
66
|
+
"sideEffects": [
|
|
67
|
+
"./dist/index.js"
|
|
68
|
+
],
|
|
62
69
|
"typesVersions": {
|
|
63
70
|
"*": {
|
|
64
71
|
"chart": [
|
|
@@ -67,6 +74,9 @@
|
|
|
67
74
|
"code": [
|
|
68
75
|
"./dist/code.d.ts"
|
|
69
76
|
],
|
|
77
|
+
"elements": [
|
|
78
|
+
"./dist/elements.d.ts"
|
|
79
|
+
],
|
|
70
80
|
"wysiwyg": [
|
|
71
81
|
"./dist/wysiwyg.d.ts"
|
|
72
82
|
]
|
|
@@ -100,16 +110,16 @@
|
|
|
100
110
|
}
|
|
101
111
|
},
|
|
102
112
|
"dependencies": {
|
|
103
|
-
"@tooark/core": "^1.
|
|
104
|
-
"@tooark/web-components": "^1.
|
|
113
|
+
"@tooark/core": "^1.10.0",
|
|
114
|
+
"@tooark/web-components": "^1.10.0"
|
|
105
115
|
},
|
|
106
116
|
"devDependencies": {
|
|
107
|
-
"@tooark/chart": "^1.
|
|
108
|
-
"@tooark/code": "^1.
|
|
109
|
-
"@tooark/wysiwyg": "^1.
|
|
117
|
+
"@tooark/chart": "^1.10.0",
|
|
118
|
+
"@tooark/code": "^1.10.0",
|
|
119
|
+
"@tooark/wysiwyg": "^1.10.0"
|
|
110
120
|
},
|
|
111
121
|
"scripts": {
|
|
112
|
-
"build": "tsc -p tsconfig.json && tsc -p tsconfig.typecheck.json && node postbuild.mjs",
|
|
122
|
+
"build": "tsc -p tsconfig.json && tsc -p tsconfig.typecheck.json && node postbuild.mjs && node ../../scripts/check-treeshake.mjs dist/elements.js --export ArkBadge --max-ratio 0.1 --without registerTooarkComponents && node ../../scripts/check-treeshake.mjs dist/index.js --export ArkBadge --with registerTooarkComponents",
|
|
113
123
|
"clean": "rimraf dist"
|
|
114
124
|
}
|
|
115
125
|
}
|