@ui-sdk/react 0.0.0-stage → 0.1.0-beta.1
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/LICENSE +202 -0
- package/README.md +10 -2
- package/dist/accordion.d.ts +331 -0
- package/dist/accordion.js +25 -0
- package/dist/agent.d.ts +2 -0
- package/dist/agent.js +8 -0
- package/dist/alert-dialog.d.ts +56 -0
- package/dist/alert-dialog.js +45 -0
- package/dist/async-options.d.ts +22 -0
- package/dist/async-options.js +56 -0
- package/dist/autocomplete.d.ts +102 -0
- package/dist/autocomplete.js +195 -0
- package/dist/avatar.d.ts +301 -0
- package/dist/avatar.js +17 -0
- package/dist/button.d.ts +21 -0
- package/dist/button.js +45 -0
- package/dist/calendar-context.d.ts +10 -0
- package/dist/calendar-context.js +9 -0
- package/dist/calendar.d.ts +80 -0
- package/dist/calendar.js +257 -0
- package/dist/carousel.d.ts +52 -0
- package/dist/carousel.js +151 -0
- package/dist/checkbox.d.ts +24 -0
- package/dist/checkbox.js +98 -0
- package/dist/children.d.ts +38 -0
- package/dist/children.js +63 -0
- package/dist/collapsible.d.ts +302 -0
- package/dist/collapsible.js +19 -0
- package/dist/color-picker.d.ts +72 -0
- package/dist/color-picker.js +133 -0
- package/dist/color.d.ts +2 -0
- package/dist/color.js +22 -0
- package/dist/combobox.d.ts +152 -0
- package/dist/combobox.js +338 -0
- package/dist/command.d.ts +88 -0
- package/dist/command.js +233 -0
- package/dist/controller-target.d.ts +3 -0
- package/dist/controller-target.js +59 -0
- package/dist/date-input.d.ts +19 -0
- package/dist/date-input.js +58 -0
- package/dist/date-picker.d.ts +47 -0
- package/dist/date-picker.js +310 -0
- package/dist/date.d.ts +2 -0
- package/dist/date.js +60 -0
- package/dist/dialog-parts.d.ts +23 -0
- package/dist/dialog-parts.js +142 -0
- package/dist/dialog.d.ts +57 -0
- package/dist/dialog.js +32 -0
- package/dist/drawer.d.ts +70 -0
- package/dist/drawer.js +158 -0
- package/dist/editor-context.d.ts +4 -0
- package/dist/editor-context.js +9 -0
- package/dist/field-context.d.ts +47 -0
- package/dist/field-context.js +87 -0
- package/dist/field.d.ts +49 -0
- package/dist/field.js +169 -0
- package/dist/file-input.d.ts +46 -0
- package/dist/file-input.js +170 -0
- package/dist/form-inputs.d.ts +5 -0
- package/dist/form-inputs.js +22 -0
- package/dist/gesture.d.ts +1 -0
- package/dist/gesture.js +16 -0
- package/dist/history.d.ts +2 -0
- package/dist/history.js +12 -0
- package/dist/hover-card.d.ts +33 -0
- package/dist/hover-card.js +84 -0
- package/dist/image-cropper.d.ts +333 -0
- package/dist/image-cropper.js +37 -0
- package/dist/image.d.ts +2 -0
- package/dist/image.js +6 -0
- package/dist/input.d.ts +22 -0
- package/dist/input.js +51 -0
- package/dist/label.d.ts +294 -0
- package/dist/label.js +9 -0
- package/dist/list-items.d.ts +15 -0
- package/dist/list-items.js +39 -0
- package/dist/list-text.d.ts +4 -0
- package/dist/list-text.js +15 -0
- package/dist/listbox.d.ts +56 -0
- package/dist/listbox.js +122 -0
- package/dist/menu.d.ts +116 -0
- package/dist/menu.js +426 -0
- package/dist/menubar-context.d.ts +4 -0
- package/dist/menubar-context.js +7 -0
- package/dist/menubar.d.ts +11 -0
- package/dist/menubar.js +32 -0
- package/dist/meter.d.ts +312 -0
- package/dist/meter.js +30 -0
- package/dist/navigation-menu.d.ts +61 -0
- package/dist/navigation-menu.js +169 -0
- package/dist/number-input.d.ts +44 -0
- package/dist/number-input.js +185 -0
- package/dist/number.d.ts +2 -0
- package/dist/number.js +40 -0
- package/dist/observe.d.ts +2 -0
- package/dist/observe.js +8 -0
- package/dist/otp-input.d.ts +29 -0
- package/dist/otp-input.js +94 -0
- package/dist/overlays.d.ts +26 -0
- package/dist/overlays.js +82 -0
- package/dist/pagination.d.ts +336 -0
- package/dist/pagination.js +71 -0
- package/dist/password-input.d.ts +23 -0
- package/dist/password-input.js +65 -0
- package/dist/popover.d.ts +54 -0
- package/dist/popover.js +151 -0
- package/dist/popup.d.ts +41 -0
- package/dist/popup.js +180 -0
- package/dist/preferences.d.ts +35 -0
- package/dist/preferences.js +93 -0
- package/dist/primitive.d.ts +2 -0
- package/dist/primitive.js +14 -0
- package/dist/progress.d.ts +312 -0
- package/dist/progress.js +30 -0
- package/dist/radio.d.ts +22 -0
- package/dist/radio.js +86 -0
- package/dist/rating.d.ts +20 -0
- package/dist/rating.js +94 -0
- package/dist/render-element.d.ts +35 -0
- package/dist/render-element.js +103 -0
- package/dist/resizable.d.ts +302 -0
- package/dist/resizable.js +23 -0
- package/dist/scroll-area.d.ts +324 -0
- package/dist/scroll-area.js +49 -0
- package/dist/segmented-control.d.ts +24 -0
- package/dist/segmented-control.js +78 -0
- package/dist/segmented-input.d.ts +15 -0
- package/dist/segmented-input.js +48 -0
- package/dist/select.d.ts +125 -0
- package/dist/select.js +330 -0
- package/dist/separator.d.ts +290 -0
- package/dist/separator.js +9 -0
- package/dist/shortcuts.d.ts +32 -0
- package/dist/shortcuts.js +61 -0
- package/dist/slider.d.ts +38 -0
- package/dist/slider.js +163 -0
- package/dist/switch.d.ts +15 -0
- package/dist/switch.js +39 -0
- package/dist/tabs.d.ts +331 -0
- package/dist/tabs.js +28 -0
- package/dist/text-control.d.ts +22 -0
- package/dist/text-control.js +24 -0
- package/dist/text-match.d.ts +2 -0
- package/dist/text-match.js +8 -0
- package/dist/textarea.d.ts +10 -0
- package/dist/textarea.js +48 -0
- package/dist/time-input.d.ts +19 -0
- package/dist/time-input.js +63 -0
- package/dist/timeline.d.ts +327 -0
- package/dist/timeline.js +31 -0
- package/dist/toast-parts.d.ts +63 -0
- package/dist/toast-parts.js +144 -0
- package/dist/toast.d.ts +2 -0
- package/dist/toast.js +22 -0
- package/dist/toggle.d.ts +23 -0
- package/dist/toggle.js +76 -0
- package/dist/token-input.d.ts +35 -0
- package/dist/token-input.js +100 -0
- package/dist/toolbar-context.d.ts +6 -0
- package/dist/toolbar-context.js +16 -0
- package/dist/toolbar.d.ts +38 -0
- package/dist/toolbar.js +63 -0
- package/dist/tooltip.d.ts +39 -0
- package/dist/tooltip.js +108 -0
- package/dist/tree.d.ts +51 -0
- package/dist/tree.js +150 -0
- package/dist/trigger-menu.d.ts +83 -0
- package/dist/trigger-menu.js +167 -0
- package/dist/use-primitive.d.ts +178 -0
- package/dist/use-primitive.js +674 -0
- package/dist/waterfall.d.ts +80 -0
- package/dist/waterfall.js +108 -0
- package/docs/README.md +89 -0
- package/docs/agents.md +1523 -0
- package/docs/components/accordion.md +1391 -0
- package/docs/components/alert-dialog.md +850 -0
- package/docs/components/autocomplete.md +1963 -0
- package/docs/components/avatar.md +252 -0
- package/docs/components/button.md +444 -0
- package/docs/components/calendar.md +1687 -0
- package/docs/components/carousel.md +1244 -0
- package/docs/components/checkbox.md +1069 -0
- package/docs/components/collapsible.md +567 -0
- package/docs/components/color-picker.md +736 -0
- package/docs/components/combobox.md +3647 -0
- package/docs/components/command.md +1573 -0
- package/docs/components/date-input.md +608 -0
- package/docs/components/date-picker.md +1266 -0
- package/docs/components/dialog.md +1469 -0
- package/docs/components/drawer.md +1197 -0
- package/docs/components/field.md +549 -0
- package/docs/components/file-input.md +609 -0
- package/docs/components/hover-card.md +514 -0
- package/docs/components/image-cropper.md +579 -0
- package/docs/components/input.md +301 -0
- package/docs/components/label.md +217 -0
- package/docs/components/listbox.md +1130 -0
- package/docs/components/menu.md +1286 -0
- package/docs/components/menubar.md +455 -0
- package/docs/components/meter.md +304 -0
- package/docs/components/navigation-menu.md +1581 -0
- package/docs/components/number-input.md +1086 -0
- package/docs/components/otp-input.md +565 -0
- package/docs/components/pagination.md +648 -0
- package/docs/components/password-input.md +737 -0
- package/docs/components/popover.md +1552 -0
- package/docs/components/preferences.md +220 -0
- package/docs/components/progress.md +443 -0
- package/docs/components/radio.md +846 -0
- package/docs/components/rating.md +458 -0
- package/docs/components/resizable.md +982 -0
- package/docs/components/scroll-area.md +980 -0
- package/docs/components/segmented-control.md +465 -0
- package/docs/components/select.md +2133 -0
- package/docs/components/separator.md +243 -0
- package/docs/components/slider.md +1169 -0
- package/docs/components/switch.md +613 -0
- package/docs/components/tabs.md +1014 -0
- package/docs/components/textarea.md +318 -0
- package/docs/components/time-input.md +231 -0
- package/docs/components/timeline.md +677 -0
- package/docs/components/toast.md +1395 -0
- package/docs/components/toggle.md +541 -0
- package/docs/components/token-input.md +1007 -0
- package/docs/components/toolbar.md +787 -0
- package/docs/components/tooltip.md +884 -0
- package/docs/components/tree.md +1346 -0
- package/docs/components/trigger-menu.md +1257 -0
- package/docs/components/waterfall.md +754 -0
- package/docs/controllers.md +89 -0
- package/docs/core.md +8027 -0
- package/docs/custom-parts.md +120 -0
- package/docs/first-component.md +83 -0
- package/docs/forms.md +148 -0
- package/docs/hooks/async-options.md +366 -0
- package/docs/hooks/shortcuts.md +221 -0
- package/docs/installation.md +45 -0
- package/docs/introduction.md +32 -0
- package/docs/lists-and-menus.md +170 -0
- package/docs/llms.txt +1844 -0
- package/docs/parts-and-composition.md +93 -0
- package/docs/popups.md +117 -0
- package/docs/rendering.md +121 -0
- package/docs/server-rendering.md +253 -0
- package/docs/state-and-events.md +105 -0
- package/docs/styling-and-animation.md +176 -0
- package/package.json +333 -3
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
import { type PaginationLinkProps, type PaginationLinkState, type PaginationStepState } from "@ui-sdk/core/pagination";
|
|
2
|
+
import { type PartProps } from "./use-primitive.js";
|
|
3
|
+
/**
|
|
4
|
+
* A navigation landmark around the page links. Name it with `aria-label`.
|
|
5
|
+
* @stable
|
|
6
|
+
*/
|
|
7
|
+
declare const Pagination: (props: import("@ui-sdk/core").OptionsOf<import("@ui-sdk/core/pagination").PaginationPrimitive> & import("@ui-sdk/core/renderer").BaseSlotProps & {
|
|
8
|
+
slot?: string | undefined | undefined;
|
|
9
|
+
style?: import("react").CSSProperties | ((state: NoInfer<import("@ui-sdk/core/pagination").PaginationState>) => React.CSSProperties | undefined) | undefined;
|
|
10
|
+
title?: string | undefined | undefined;
|
|
11
|
+
dir?: string | undefined | undefined;
|
|
12
|
+
"aria-labelledby"?: string | undefined | undefined;
|
|
13
|
+
"aria-label"?: string | undefined | undefined;
|
|
14
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
15
|
+
"aria-activedescendant"?: string | undefined | undefined;
|
|
16
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
|
|
17
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
18
|
+
"aria-colcount"?: number | undefined | undefined;
|
|
19
|
+
"aria-colindex"?: number | undefined | undefined;
|
|
20
|
+
"aria-colspan"?: number | undefined | undefined;
|
|
21
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
22
|
+
"aria-level"?: number | undefined | undefined;
|
|
23
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
24
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
25
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
26
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined | undefined;
|
|
27
|
+
"aria-placeholder"?: string | undefined | undefined;
|
|
28
|
+
"aria-posinset"?: number | undefined | undefined;
|
|
29
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
30
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
31
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
32
|
+
"aria-rowcount"?: number | undefined | undefined;
|
|
33
|
+
"aria-rowindex"?: number | undefined | undefined;
|
|
34
|
+
"aria-rowspan"?: number | undefined | undefined;
|
|
35
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
36
|
+
"aria-setsize"?: number | undefined | undefined;
|
|
37
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
|
|
38
|
+
"aria-valuemax"?: number | undefined | undefined;
|
|
39
|
+
"aria-valuemin"?: number | undefined | undefined;
|
|
40
|
+
"aria-valuenow"?: number | undefined | undefined;
|
|
41
|
+
"aria-valuetext"?: string | undefined | undefined;
|
|
42
|
+
role?: import("react").AriaRole | undefined;
|
|
43
|
+
key?: import("react").Key | null | undefined;
|
|
44
|
+
nonce?: string | undefined | undefined;
|
|
45
|
+
render?: import("./render-element.js").RenderProp<NoInfer<import("@ui-sdk/core/pagination").PaginationState>> | undefined;
|
|
46
|
+
property?: string | undefined | undefined;
|
|
47
|
+
"aria-description"?: string | undefined | undefined;
|
|
48
|
+
"aria-controls"?: string | undefined | undefined;
|
|
49
|
+
"aria-describedby"?: string | undefined | undefined;
|
|
50
|
+
"aria-details"?: string | undefined | undefined;
|
|
51
|
+
"aria-errormessage"?: string | undefined | undefined;
|
|
52
|
+
"aria-flowto"?: string | undefined | undefined;
|
|
53
|
+
"aria-owns"?: string | undefined | undefined;
|
|
54
|
+
part?: string | undefined | undefined;
|
|
55
|
+
hidden?: boolean | undefined | undefined;
|
|
56
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
57
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined | undefined;
|
|
58
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
59
|
+
color?: string | undefined | undefined;
|
|
60
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
61
|
+
onChange?: import("react").ChangeEventHandler<HTMLElement, Element> | undefined;
|
|
62
|
+
lang?: string | undefined | undefined;
|
|
63
|
+
children?: import("react").ReactNode | ((state: NoInfer<import("@ui-sdk/core/pagination").PaginationState>) => React.ReactNode);
|
|
64
|
+
onScroll?: import("react").UIEventHandler<HTMLElement> | undefined;
|
|
65
|
+
popover?: "" | "auto" | "manual" | "hint" | undefined | undefined;
|
|
66
|
+
inert?: boolean | undefined | undefined;
|
|
67
|
+
content?: string | undefined | undefined;
|
|
68
|
+
translate?: "yes" | "no" | undefined | undefined;
|
|
69
|
+
results?: number | undefined | undefined;
|
|
70
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
71
|
+
onSubmit?: import("react").SubmitEventHandler<HTMLElement> | undefined;
|
|
72
|
+
onBlur?: import("react").FocusEventHandler<HTMLElement> | undefined;
|
|
73
|
+
onSelect?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
74
|
+
"aria-keyshortcuts"?: string | undefined | undefined;
|
|
75
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
|
|
76
|
+
defaultChecked?: boolean | undefined | undefined;
|
|
77
|
+
accessKey?: string | undefined | undefined;
|
|
78
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
79
|
+
className?: string | ((state: NoInfer<import("@ui-sdk/core/pagination").PaginationState>) => string | undefined) | undefined;
|
|
80
|
+
prefix?: string | undefined | undefined;
|
|
81
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
82
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
83
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
84
|
+
tabIndex?: number | undefined | undefined;
|
|
85
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined | undefined;
|
|
86
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
|
|
87
|
+
ref?: import("react").Ref<HTMLElement> | undefined;
|
|
88
|
+
onDoubleClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
89
|
+
onFocus?: import("react").FocusEventHandler<HTMLElement> | undefined;
|
|
90
|
+
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
91
|
+
"aria-braillelabel"?: string | undefined | undefined;
|
|
92
|
+
"aria-brailleroledescription"?: string | undefined | undefined;
|
|
93
|
+
"aria-colindextext"?: string | undefined | undefined;
|
|
94
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
|
|
95
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
96
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
|
|
97
|
+
"aria-roledescription"?: string | undefined | undefined;
|
|
98
|
+
"aria-rowindextext"?: string | undefined | undefined;
|
|
99
|
+
dangerouslySetInnerHTML?: {
|
|
100
|
+
__html: string | TrustedHTML;
|
|
101
|
+
} | undefined | undefined;
|
|
102
|
+
onCopy?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
103
|
+
onCopyCapture?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
104
|
+
onCut?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
105
|
+
onCutCapture?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
106
|
+
onPaste?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
107
|
+
onPasteCapture?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
108
|
+
onCompositionEnd?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
109
|
+
onCompositionEndCapture?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
110
|
+
onCompositionStart?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
111
|
+
onCompositionStartCapture?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
112
|
+
onCompositionUpdate?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
113
|
+
onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
114
|
+
onFocusCapture?: import("react").FocusEventHandler<HTMLElement> | undefined;
|
|
115
|
+
onBlurCapture?: import("react").FocusEventHandler<HTMLElement> | undefined;
|
|
116
|
+
onChangeCapture?: import("react").ChangeEventHandler<HTMLElement, Element> | undefined;
|
|
117
|
+
onBeforeInput?: import("react").InputEventHandler<HTMLElement> | undefined;
|
|
118
|
+
onBeforeInputCapture?: import("react").InputEventHandler<HTMLElement> | undefined;
|
|
119
|
+
onInput?: import("react").InputEventHandler<HTMLElement> | undefined;
|
|
120
|
+
onInputCapture?: import("react").InputEventHandler<HTMLElement> | undefined;
|
|
121
|
+
onReset?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
122
|
+
onResetCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
123
|
+
onSubmitCapture?: import("react").SubmitEventHandler<HTMLElement> | undefined;
|
|
124
|
+
onInvalid?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
125
|
+
onInvalidCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
126
|
+
onLoad?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
127
|
+
onLoadCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
128
|
+
onError?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
129
|
+
onErrorCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
130
|
+
onKeyDown?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
131
|
+
onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
132
|
+
onKeyPress?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
133
|
+
onKeyPressCapture?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
134
|
+
onKeyUp?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
135
|
+
onKeyUpCapture?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
136
|
+
onAbort?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
137
|
+
onAbortCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
138
|
+
onCanPlay?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
139
|
+
onCanPlayCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
140
|
+
onCanPlayThrough?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
141
|
+
onCanPlayThroughCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
142
|
+
onDurationChange?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
143
|
+
onDurationChangeCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
144
|
+
onEmptied?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
145
|
+
onEmptiedCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
146
|
+
onEncrypted?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
147
|
+
onEncryptedCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
148
|
+
onEnded?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
149
|
+
onEndedCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
150
|
+
onLoadedData?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
151
|
+
onLoadedDataCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
152
|
+
onLoadedMetadata?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
153
|
+
onLoadedMetadataCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
154
|
+
onLoadStart?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
155
|
+
onLoadStartCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
156
|
+
onPause?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
157
|
+
onPauseCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
158
|
+
onPlay?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
159
|
+
onPlayCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
160
|
+
onPlaying?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
161
|
+
onPlayingCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
162
|
+
onProgress?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
163
|
+
onProgressCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
164
|
+
onRateChange?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
165
|
+
onRateChangeCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
166
|
+
onSeeked?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
167
|
+
onSeekedCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
168
|
+
onSeeking?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
169
|
+
onSeekingCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
170
|
+
onStalled?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
171
|
+
onStalledCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
172
|
+
onSuspend?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
173
|
+
onSuspendCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
174
|
+
onTimeUpdate?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
175
|
+
onTimeUpdateCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
176
|
+
onVolumeChange?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
177
|
+
onVolumeChangeCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
178
|
+
onWaiting?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
179
|
+
onWaitingCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
180
|
+
onAuxClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
181
|
+
onAuxClickCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
182
|
+
onClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
183
|
+
onClickCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
184
|
+
onContextMenu?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
185
|
+
onContextMenuCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
186
|
+
onDoubleClickCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
187
|
+
onDrag?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
188
|
+
onDragCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
189
|
+
onDragEnd?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
190
|
+
onDragEndCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
191
|
+
onDragEnter?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
192
|
+
onDragEnterCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
193
|
+
onDragExit?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
194
|
+
onDragExitCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
195
|
+
onDragLeave?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
196
|
+
onDragLeaveCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
197
|
+
onDragOver?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
198
|
+
onDragOverCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
199
|
+
onDragStart?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
200
|
+
onDragStartCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
201
|
+
onDrop?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
202
|
+
onDropCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
203
|
+
onMouseDown?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
204
|
+
onMouseDownCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
205
|
+
onMouseEnter?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
206
|
+
onMouseLeave?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
207
|
+
onMouseMove?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
208
|
+
onMouseMoveCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
209
|
+
onMouseOut?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
210
|
+
onMouseOutCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
211
|
+
onMouseOver?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
212
|
+
onMouseOverCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
213
|
+
onMouseUp?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
214
|
+
onMouseUpCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
215
|
+
onSelectCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
216
|
+
onTouchCancel?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
217
|
+
onTouchCancelCapture?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
218
|
+
onTouchEnd?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
219
|
+
onTouchEndCapture?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
220
|
+
onTouchMove?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
221
|
+
onTouchMoveCapture?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
222
|
+
onTouchStart?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
223
|
+
onTouchStartCapture?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
224
|
+
onPointerDown?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
225
|
+
onPointerDownCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
226
|
+
onPointerMove?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
227
|
+
onPointerMoveCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
228
|
+
onPointerUp?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
229
|
+
onPointerUpCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
230
|
+
onPointerCancel?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
231
|
+
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
232
|
+
onPointerEnter?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
233
|
+
onPointerLeave?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
234
|
+
onPointerOver?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
235
|
+
onPointerOverCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
236
|
+
onPointerOut?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
237
|
+
onPointerOutCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
238
|
+
onGotPointerCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
239
|
+
onGotPointerCaptureCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
240
|
+
onLostPointerCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
241
|
+
onLostPointerCaptureCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
242
|
+
onScrollCapture?: import("react").UIEventHandler<HTMLElement> | undefined;
|
|
243
|
+
onScrollEnd?: import("react").UIEventHandler<HTMLElement> | undefined;
|
|
244
|
+
onScrollEndCapture?: import("react").UIEventHandler<HTMLElement> | undefined;
|
|
245
|
+
onWheel?: import("react").WheelEventHandler<HTMLElement> | undefined;
|
|
246
|
+
onWheelCapture?: import("react").WheelEventHandler<HTMLElement> | undefined;
|
|
247
|
+
onAnimationStart?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
248
|
+
onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
249
|
+
onAnimationEnd?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
250
|
+
onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
251
|
+
onAnimationIteration?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
252
|
+
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
253
|
+
onToggle?: import("react").ToggleEventHandler<HTMLElement> | undefined;
|
|
254
|
+
onBeforeToggle?: import("react").ToggleEventHandler<HTMLElement> | undefined;
|
|
255
|
+
onTransitionCancel?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
256
|
+
onTransitionCancelCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
257
|
+
onTransitionEnd?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
258
|
+
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
259
|
+
onTransitionRun?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
260
|
+
onTransitionRunCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
261
|
+
onTransitionStart?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
262
|
+
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
263
|
+
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
264
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
265
|
+
autoFocus?: boolean | undefined | undefined;
|
|
266
|
+
contextMenu?: string | undefined | undefined;
|
|
267
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
268
|
+
radioGroup?: string | undefined | undefined;
|
|
269
|
+
about?: string | undefined | undefined;
|
|
270
|
+
datatype?: string | undefined | undefined;
|
|
271
|
+
inlist?: any;
|
|
272
|
+
rel?: string | undefined | undefined;
|
|
273
|
+
resource?: string | undefined | undefined;
|
|
274
|
+
rev?: string | undefined | undefined;
|
|
275
|
+
typeof?: string | undefined | undefined;
|
|
276
|
+
vocab?: string | undefined | undefined;
|
|
277
|
+
autoCorrect?: string | undefined | undefined;
|
|
278
|
+
autoSave?: string | undefined | undefined;
|
|
279
|
+
itemProp?: string | undefined | undefined;
|
|
280
|
+
itemScope?: boolean | undefined | undefined;
|
|
281
|
+
itemType?: string | undefined | undefined;
|
|
282
|
+
itemID?: string | undefined | undefined;
|
|
283
|
+
itemRef?: string | undefined | undefined;
|
|
284
|
+
security?: string | undefined | undefined;
|
|
285
|
+
unselectable?: "on" | "off" | undefined | undefined;
|
|
286
|
+
popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
|
|
287
|
+
popoverTarget?: string | undefined | undefined;
|
|
288
|
+
is?: string | undefined | undefined;
|
|
289
|
+
exportparts?: string | undefined | undefined;
|
|
290
|
+
}) => React.ReactElement | null;
|
|
291
|
+
/**
|
|
292
|
+
* The list of pages and steps. Its children can be a function of the state,
|
|
293
|
+
* whose `items` are the pages to show.
|
|
294
|
+
* @stable
|
|
295
|
+
*/
|
|
296
|
+
declare const PaginationList: import("./use-primitive.js").PartComponent<import("@ui-sdk/core/pagination").PaginationPrimitive, "list", "ul">;
|
|
297
|
+
/**
|
|
298
|
+
* One entry in the list, around a link, a step or an ellipsis.
|
|
299
|
+
* @stable
|
|
300
|
+
*/
|
|
301
|
+
declare const PaginationItem: import("./use-primitive.js").PartComponent<import("@ui-sdk/core/pagination").PaginationPrimitive, "item", "li">;
|
|
302
|
+
/**
|
|
303
|
+
* A page. The current one has `aria-current="page"`. Shows its number unless it has children.
|
|
304
|
+
* @stable
|
|
305
|
+
*/
|
|
306
|
+
declare function PaginationLink({ page, children, ...props }: PartProps<"a", PaginationLinkState> & PaginationLinkProps): import("react").JSX.Element | null;
|
|
307
|
+
type StepProps = PartProps<"a", PaginationStepState>;
|
|
308
|
+
/**
|
|
309
|
+
* Goes to the previous page. `aria-disabled` on the first page, where it stays focusable.
|
|
310
|
+
* @stable
|
|
311
|
+
*/
|
|
312
|
+
declare function PaginationPrevious(props: StepProps): import("react").JSX.Element | null;
|
|
313
|
+
/**
|
|
314
|
+
* Goes to the next page. `aria-disabled` on the last page, where it stays focusable.
|
|
315
|
+
* @stable
|
|
316
|
+
*/
|
|
317
|
+
declare function PaginationNext(props: StepProps): import("react").JSX.Element | null;
|
|
318
|
+
/**
|
|
319
|
+
* Goes to the first page. `aria-disabled` there.
|
|
320
|
+
* @stable
|
|
321
|
+
*/
|
|
322
|
+
declare function PaginationFirst(props: StepProps): import("react").JSX.Element | null;
|
|
323
|
+
/**
|
|
324
|
+
* Goes to the last page. `aria-disabled` there.
|
|
325
|
+
* @stable
|
|
326
|
+
*/
|
|
327
|
+
declare function PaginationLast(props: StepProps): import("react").JSX.Element | null;
|
|
328
|
+
/**
|
|
329
|
+
* A gap in the range. Hidden from screen readers, since the links around it
|
|
330
|
+
* say which pages there are. Shows "…" unless it has children.
|
|
331
|
+
* @stable
|
|
332
|
+
*/
|
|
333
|
+
declare function PaginationEllipsis({ children, ...props }: PartProps<"span">): import("react").JSX.Element;
|
|
334
|
+
export { createPaginationController, paginationRange, } from "@ui-sdk/core/pagination";
|
|
335
|
+
export type { PaginationChangeOptions, PaginationController, PaginationLinkProps, PaginationLinkState, PaginationOptions, PaginationPageChangeReason, PaginationPrimitive, PaginationRangeItem, PaginationRangeOptions, PaginationState, PaginationStepState, } from "@ui-sdk/core/pagination";
|
|
336
|
+
export { Pagination, PaginationEllipsis, PaginationFirst, PaginationItem, PaginationLast, PaginationLink, PaginationList, PaginationNext, PaginationPrevious, };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
// src/pagination.tsx
|
|
3
|
+
import {
|
|
4
|
+
pagination
|
|
5
|
+
} from "@ui-sdk/core/pagination";
|
|
6
|
+
import {
|
|
7
|
+
createParts,
|
|
8
|
+
useHandle,
|
|
9
|
+
usePart
|
|
10
|
+
} from "./use-primitive.js";
|
|
11
|
+
import {
|
|
12
|
+
createPaginationController,
|
|
13
|
+
paginationRange
|
|
14
|
+
} from "@ui-sdk/core/pagination";
|
|
15
|
+
import { jsx } from "react/jsx-runtime";
|
|
16
|
+
var parts = createParts(pagination, {
|
|
17
|
+
root: "nav",
|
|
18
|
+
list: "ul",
|
|
19
|
+
item: "li",
|
|
20
|
+
ellipsis: "span"
|
|
21
|
+
});
|
|
22
|
+
function useTag() {
|
|
23
|
+
return useHandle(pagination).state.getHref ? "a" : "button";
|
|
24
|
+
}
|
|
25
|
+
var Pagination = parts.Root;
|
|
26
|
+
var PaginationList = parts.List;
|
|
27
|
+
var PaginationItem = parts.Item;
|
|
28
|
+
function PaginationLink({
|
|
29
|
+
page,
|
|
30
|
+
children = page,
|
|
31
|
+
...props
|
|
32
|
+
}) {
|
|
33
|
+
return usePart(
|
|
34
|
+
pagination,
|
|
35
|
+
"link",
|
|
36
|
+
{ page, id: String(page) },
|
|
37
|
+
{ ...props, children },
|
|
38
|
+
useTag()
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
function useStep(name, props) {
|
|
42
|
+
return usePart(pagination, name, {}, props, useTag());
|
|
43
|
+
}
|
|
44
|
+
function PaginationPrevious(props) {
|
|
45
|
+
return useStep("previous", props);
|
|
46
|
+
}
|
|
47
|
+
function PaginationNext(props) {
|
|
48
|
+
return useStep("next", props);
|
|
49
|
+
}
|
|
50
|
+
function PaginationFirst(props) {
|
|
51
|
+
return useStep("first", props);
|
|
52
|
+
}
|
|
53
|
+
function PaginationLast(props) {
|
|
54
|
+
return useStep("last", props);
|
|
55
|
+
}
|
|
56
|
+
function PaginationEllipsis({ children = "\u2026", ...props }) {
|
|
57
|
+
return /* @__PURE__ */ jsx(parts.Ellipsis, { ...props, children });
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
Pagination,
|
|
61
|
+
PaginationEllipsis,
|
|
62
|
+
PaginationFirst,
|
|
63
|
+
PaginationItem,
|
|
64
|
+
PaginationLast,
|
|
65
|
+
PaginationLink,
|
|
66
|
+
PaginationList,
|
|
67
|
+
PaginationNext,
|
|
68
|
+
PaginationPrevious,
|
|
69
|
+
createPaginationController,
|
|
70
|
+
paginationRange
|
|
71
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type PasswordInputOptions, type PasswordInputState } from "@ui-sdk/core/password-input";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { type PartProps } from "./use-primitive.js";
|
|
4
|
+
/**
|
|
5
|
+
* Holds the field and its toggle. Presses on its own text and icons focus the field.
|
|
6
|
+
* @stable
|
|
7
|
+
*/
|
|
8
|
+
declare function PasswordInput({ value, defaultValue, name, disabled, ...props }: PasswordInputOptions & Omit<PartProps<"div", PasswordInputState>, "defaultValue" | "onChange" | "onSelect">): React.JSX.Element;
|
|
9
|
+
/**
|
|
10
|
+
* The native <input>. Its type follows whether the password is shown, and
|
|
11
|
+
* form attributes come from <PasswordInput>.
|
|
12
|
+
* @stable
|
|
13
|
+
*/
|
|
14
|
+
declare function PasswordInputControl({ id, render, ...props }: Omit<PartProps<"input", PasswordInputState>, "value" | "defaultValue" | "children" | "type" | "name" | "form" | "required" | "disabled" | "readOnly" | "autoComplete" | "onSelect">): React.JSX.Element | null;
|
|
15
|
+
/**
|
|
16
|
+
* Shows and hides the password. Name it by what it does, like "Show password":
|
|
17
|
+
* it's a toggle button, and `aria-pressed` says whether the password is shown.
|
|
18
|
+
* @stable
|
|
19
|
+
*/
|
|
20
|
+
declare const PasswordInputToggle: import("./use-primitive.js").PartComponent<import("@ui-sdk/core/password-input").PasswordInputPrimitive, "toggle", "button">;
|
|
21
|
+
export { createPasswordInputController } from "@ui-sdk/core/password-input";
|
|
22
|
+
export type { InputValueChangeReason, PasswordInputController, PasswordInputOptions, PasswordInputPrimitive, PasswordInputState, PasswordInputVisibleChangeReason, } from "@ui-sdk/core/password-input";
|
|
23
|
+
export { PasswordInput, PasswordInputControl, PasswordInputToggle };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
// src/password-input.tsx
|
|
3
|
+
import {
|
|
4
|
+
passwordInput
|
|
5
|
+
} from "@ui-sdk/core/password-input";
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import {
|
|
8
|
+
controlRender,
|
|
9
|
+
useFieldControl,
|
|
10
|
+
useFieldControlId
|
|
11
|
+
} from "./field-context.js";
|
|
12
|
+
import { createParts, usePart } from "./use-primitive.js";
|
|
13
|
+
import { createPasswordInputController } from "@ui-sdk/core/password-input";
|
|
14
|
+
import { jsx } from "react/jsx-runtime";
|
|
15
|
+
var parts = createParts(passwordInput, { root: "div", toggle: "button" });
|
|
16
|
+
var ControlContext = React.createContext({ field: null });
|
|
17
|
+
var ignore = () => {
|
|
18
|
+
};
|
|
19
|
+
function PasswordInput({
|
|
20
|
+
value,
|
|
21
|
+
defaultValue,
|
|
22
|
+
name,
|
|
23
|
+
disabled,
|
|
24
|
+
...props
|
|
25
|
+
}) {
|
|
26
|
+
const field = useFieldControl();
|
|
27
|
+
const controlId = useFieldControlId();
|
|
28
|
+
const control = React.useMemo(
|
|
29
|
+
() => ({ field, value, defaultValue }),
|
|
30
|
+
[field, value, defaultValue]
|
|
31
|
+
);
|
|
32
|
+
return /* @__PURE__ */ jsx(ControlContext.Provider, { value: control, children: /* @__PURE__ */ jsx(
|
|
33
|
+
parts.Root,
|
|
34
|
+
{
|
|
35
|
+
...props,
|
|
36
|
+
value,
|
|
37
|
+
defaultValue,
|
|
38
|
+
name: name ?? field?.name,
|
|
39
|
+
disabled: disabled || field?.disabled,
|
|
40
|
+
controlId
|
|
41
|
+
}
|
|
42
|
+
) });
|
|
43
|
+
}
|
|
44
|
+
function PasswordInputControl({
|
|
45
|
+
id,
|
|
46
|
+
render,
|
|
47
|
+
...props
|
|
48
|
+
}) {
|
|
49
|
+
const { field, value, defaultValue } = React.useContext(ControlContext);
|
|
50
|
+
const element = {
|
|
51
|
+
...props,
|
|
52
|
+
value,
|
|
53
|
+
defaultValue,
|
|
54
|
+
onChange: props.onChange ?? (value === void 0 ? void 0 : ignore),
|
|
55
|
+
render: controlRender(field, "input", render)
|
|
56
|
+
};
|
|
57
|
+
return usePart(passwordInput, "control", { id }, element, "input");
|
|
58
|
+
}
|
|
59
|
+
var PasswordInputToggle = parts.Toggle;
|
|
60
|
+
export {
|
|
61
|
+
PasswordInput,
|
|
62
|
+
PasswordInputControl,
|
|
63
|
+
PasswordInputToggle,
|
|
64
|
+
createPasswordInputController
|
|
65
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type PopoverContentProps, type PopoverContentState, type PopoverOptions, type PopoverShortcutProps, type PopoverShortcutState, type PopoverTriggerProps, type PopoverTriggerState } from "@ui-sdk/core/popover";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { type PartProps } from "./use-primitive.js";
|
|
4
|
+
/**
|
|
5
|
+
* The props of `Popover`.
|
|
6
|
+
* @stable
|
|
7
|
+
*/
|
|
8
|
+
type PopoverProps = PopoverOptions & {
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Rich content in a floating panel, opened from a button. Put its trigger and content inside.
|
|
13
|
+
* @stable
|
|
14
|
+
*/
|
|
15
|
+
declare function Popover({ children, container, ...options }: PopoverProps): React.JSX.Element;
|
|
16
|
+
/**
|
|
17
|
+
* The button that opens the popover. A trigger outside the popover connects through `controller`.
|
|
18
|
+
* @stable
|
|
19
|
+
*/
|
|
20
|
+
declare function PopoverTrigger({ controller, ...props }: Omit<PartProps<"button", PopoverTriggerState>, "value" | "defaultValue" | "onChange"> & PopoverTriggerProps): React.JSX.Element;
|
|
21
|
+
/**
|
|
22
|
+
* The panel itself, positioned against its trigger, named by its title and described by its description.
|
|
23
|
+
* @stable
|
|
24
|
+
*/
|
|
25
|
+
declare function PopoverContent<Payload = unknown>({ side, align, sideOffset, alignOffset, collisionPadding, arrowPadding, anchor, initialFocus, finalFocus, keepMounted, container, render, ...props }: PartProps<"div", PopoverContentState<Payload>> & PopoverContentProps): React.JSX.Element | null;
|
|
26
|
+
/**
|
|
27
|
+
* The popover's title, which names it. A level 2 heading by default.
|
|
28
|
+
* @stable
|
|
29
|
+
*/
|
|
30
|
+
declare const PopoverTitle: import("./use-primitive.js").PartComponent<import("@ui-sdk/core/popover").PopoverPrimitive, "title", "h2">;
|
|
31
|
+
/**
|
|
32
|
+
* Describes the popover while it's rendered. A paragraph by default.
|
|
33
|
+
* @stable
|
|
34
|
+
*/
|
|
35
|
+
declare const PopoverDescription: import("./use-primitive.js").PartComponent<import("@ui-sdk/core/popover").PopoverPrimitive, "description", "p">;
|
|
36
|
+
/**
|
|
37
|
+
* A button that closes the popover.
|
|
38
|
+
* @stable
|
|
39
|
+
*/
|
|
40
|
+
declare const PopoverClose: import("./use-primitive.js").PartComponent<import("@ui-sdk/core/popover").PopoverPrimitive, "close", "button">;
|
|
41
|
+
/**
|
|
42
|
+
* An arrow on the panel's edge that points at its trigger.
|
|
43
|
+
* @stable
|
|
44
|
+
*/
|
|
45
|
+
declare const PopoverArrow: import("./use-primitive.js").PartComponent<import("@ui-sdk/core/popover").PopoverPrimitive, "arrow", "div">;
|
|
46
|
+
type ShortcutPartProps = PartProps<"span", PopoverShortcutState> & PopoverShortcutProps;
|
|
47
|
+
/**
|
|
48
|
+
* Shows a trigger's shortcut, like `⌘I`, inside the trigger. Hidden from screen readers, which hear `aria-keyshortcuts`.
|
|
49
|
+
* @stable
|
|
50
|
+
*/
|
|
51
|
+
declare function PopoverShortcut(props: ShortcutPartProps): React.JSX.Element | null;
|
|
52
|
+
export { createPopoverController } from "@ui-sdk/core/popover";
|
|
53
|
+
export type { PopoverApi, PopoverArrowState, PopoverContentProps, PopoverContentState, PopoverController, PopoverDismissReason, PopoverFinalFocus, PopoverInitialFocus, PopoverOpenChangeReason, PopoverOptions, PopoverPayloadChangeReason, PopoverPrimitive, PopoverShortcutProps, PopoverShortcutState, PopoverTriggerProps, PopoverTriggerState, } from "@ui-sdk/core/popover";
|
|
54
|
+
export { Popover, PopoverArrow, PopoverClose, PopoverContent, PopoverDescription, type PopoverProps, PopoverShortcut, PopoverTitle, PopoverTrigger, };
|