@bysages/solid 0.2.3 → 0.3.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/README.md +16 -2
- package/dist/{ai-response-B_586r27.mjs → ai-response-slzE03wh.mjs} +19 -17
- package/dist/chevron-D5RzcayK.mjs +9 -0
- package/dist/components/affix/index.mjs +15 -17
- package/dist/components/ai/index.d.mts +1 -1
- package/dist/components/ai/index.mjs +21 -22
- package/dist/components/ai-action/index.mjs +2 -2
- package/dist/components/ai-attachments/index.mjs +52 -38
- package/dist/components/ai-message/index.mjs +11 -13
- package/dist/components/ai-prompt-input/index.mjs +81 -55
- package/dist/components/ai-reasoning/index.mjs +10 -6
- package/dist/components/ai-response/index.mjs +1 -1
- package/dist/components/ai-source/index.mjs +23 -23
- package/dist/components/ai-suggestion/index.mjs +1 -1
- package/dist/components/ai-tool/index.mjs +29 -17
- package/dist/components/alert/index.mjs +37 -42
- package/dist/components/angle-slider/index.mjs +2 -2
- package/dist/components/aspect-ratio/index.mjs +14 -16
- package/dist/components/autocomplete/index.mjs +8 -3
- package/dist/components/avatar/index.d.mts +3 -0
- package/dist/components/avatar/index.mjs +10 -5
- package/dist/components/avatar-group/index.mjs +11 -13
- package/dist/components/back-top/index.mjs +31 -27
- package/dist/components/badge/index.mjs +14 -16
- package/dist/components/banner/index.mjs +26 -28
- package/dist/components/bento/index.d.mts +24 -0
- package/dist/components/bento/index.mjs +51 -0
- package/dist/components/block-ui/index.d.mts +12 -0
- package/dist/components/block-ui/index.mjs +43 -0
- package/dist/components/breadcrumb/index.mjs +12 -10
- package/dist/components/browser/index.d.mts +21 -0
- package/dist/components/browser/index.mjs +87 -0
- package/dist/components/button/index.mjs +27 -29
- package/dist/components/button-group/index.mjs +18 -20
- package/dist/components/calendar/index.mjs +141 -129
- package/dist/components/card/index.mjs +2 -2
- package/dist/components/cascade-select/index.mjs +167 -121
- package/dist/components/checkbox/index.mjs +2 -2
- package/dist/components/checkbox-group/index.mjs +53 -55
- package/dist/components/chip/index.mjs +22 -20
- package/dist/components/clipboard/index.mjs +2 -2
- package/dist/components/color-picker/index.mjs +2 -2
- package/dist/components/combobox/index.mjs +2 -2
- package/dist/components/command/index.mjs +83 -59
- package/dist/components/comment/index.mjs +77 -62
- package/dist/components/config-provider/index.d.mts +4 -1
- package/dist/components/config-provider/index.mjs +13 -9
- package/dist/components/container/index.mjs +14 -16
- package/dist/components/data-view/index.d.mts +18 -0
- package/dist/components/data-view/index.mjs +116 -0
- package/dist/components/date-input/index.mjs +2 -2
- package/dist/components/date-picker/index.mjs +2 -2
- package/dist/components/deferred-content/index.d.mts +16 -0
- package/dist/components/deferred-content/index.mjs +52 -0
- package/dist/components/descriptions/index.d.mts +9 -1
- package/dist/components/descriptions/index.mjs +43 -16
- package/dist/components/dock/index.d.mts +22 -0
- package/dist/components/dock/index.mjs +64 -0
- package/dist/components/dynamic-input/index.mjs +75 -68
- package/dist/components/editable/index.mjs +2 -2
- package/dist/components/ellipsis/index.mjs +17 -19
- package/dist/components/empty/index.mjs +2 -2
- package/dist/components/file-upload/index.d.mts +7 -1
- package/dist/components/file-upload/index.mjs +13 -3
- package/dist/components/float-button/index.mjs +42 -39
- package/dist/components/form/index.d.mts +1 -1
- package/dist/components/form/index.mjs +52 -37
- package/dist/components/grid/index.mjs +19 -21
- package/dist/components/icon/index.d.mts +9 -4
- package/dist/components/icon/index.mjs +37 -36
- package/dist/components/image/index.d.mts +4 -0
- package/dist/components/image/index.mjs +50 -43
- package/dist/components/image-viewer/index.d.mts +4 -0
- package/dist/components/image-viewer/index.mjs +54 -37
- package/dist/components/input/index.d.mts +3 -0
- package/dist/components/input/index.mjs +1 -41
- package/dist/components/input-group/index.mjs +14 -18
- package/dist/components/json-tree-view/index.d.mts +5 -2
- package/dist/components/json-tree-view/index.mjs +25 -2
- package/dist/components/kbd/index.mjs +8 -10
- package/dist/components/layout/index.mjs +81 -77
- package/dist/components/link/index.mjs +12 -13
- package/dist/components/list/index.d.mts +2 -1
- package/dist/components/list/index.mjs +62 -48
- package/dist/components/listbox/index.mjs +2 -2
- package/dist/components/masonry/index.mjs +15 -17
- package/dist/components/mentions/index.mjs +1 -1
- package/dist/components/menu/index.mjs +2 -2
- package/dist/components/menubar/index.mjs +59 -57
- package/dist/components/meter/index.mjs +41 -41
- package/dist/components/number-input/index.mjs +2 -2
- package/dist/components/order-list/index.d.mts +21 -0
- package/dist/components/order-list/index.mjs +168 -0
- package/dist/components/page-header/index.mjs +2 -2
- package/dist/components/pagination/index.mjs +2 -2
- package/dist/components/password-input/index.mjs +2 -2
- package/dist/components/pin-input/index.mjs +2 -2
- package/dist/components/popconfirm/index.mjs +19 -12
- package/dist/components/progress/index.mjs +2 -2
- package/dist/components/progress-group/index.mjs +65 -58
- package/dist/components/radio-group/index.mjs +2 -2
- package/dist/components/rating-group/index.mjs +2 -2
- package/dist/components/result/index.d.mts +22 -0
- package/dist/components/result/index.mjs +66 -0
- package/dist/components/select/index.d.mts +2 -17
- package/dist/components/select/index.mjs +2 -18
- package/dist/components/separator/index.mjs +17 -19
- package/dist/components/skeleton/index.mjs +8 -10
- package/dist/components/slider/index.mjs +2 -2
- package/dist/components/spinner/index.mjs +17 -17
- package/dist/components/split-button/index.mjs +88 -83
- package/dist/components/spotlight/index.d.mts +11 -0
- package/dist/components/spotlight/index.mjs +38 -0
- package/dist/components/stack/index.mjs +20 -22
- package/dist/components/stat/index.mjs +12 -14
- package/dist/components/steps/index.d.mts +6 -1
- package/dist/components/steps/index.mjs +9 -3
- package/dist/components/switch/index.mjs +2 -2
- package/dist/components/table/index.mjs +323 -214
- package/dist/components/tabs/index.d.mts +2 -0
- package/dist/components/tabs/index.mjs +10 -5
- package/dist/components/tags-input/index.mjs +2 -2
- package/dist/components/terminal/index.d.mts +17 -0
- package/dist/components/terminal/index.mjs +86 -0
- package/dist/components/textarea/index.mjs +8 -8
- package/dist/components/timeline/index.d.mts +9 -3
- package/dist/components/timeline/index.mjs +18 -3
- package/dist/components/toc/index.d.mts +2 -7
- package/dist/components/toc/index.mjs +1 -9
- package/dist/components/toggle-group/index.mjs +2 -2
- package/dist/components/toolbar/index.d.mts +17 -0
- package/dist/components/toolbar/index.mjs +46 -0
- package/dist/components/transfer/index.mjs +126 -107
- package/dist/components/tree-select/index.mjs +36 -25
- package/dist/components/tree-view/index.d.mts +8 -1
- package/dist/components/tree-view/index.mjs +29 -3
- package/dist/components/typography/index.mjs +2 -2
- package/dist/components/user/index.d.mts +19 -0
- package/dist/components/user/index.mjs +68 -0
- package/dist/components/virtual-list/index.d.mts +17 -0
- package/dist/components/virtual-list/index.mjs +72 -0
- package/dist/components/watermark/index.mjs +19 -13
- package/dist/index-DdsnfV4f.d.mts +16 -0
- package/dist/{index-B4XS2n2y.d.mts → index-IfofF-SW.d.mts} +718 -3773
- package/dist/index-YPUiqD3n.d.mts +42 -0
- package/dist/index.d.mts +17 -4
- package/dist/index.mjs +22 -9
- package/dist/input-DoFQ7RXh.mjs +78 -0
- package/dist/{mentions-xbI6vJAP.mjs → mentions-f5Js_2W7.mjs} +76 -70
- package/dist/select-CX6OuQlU.mjs +123 -0
- package/dist/toc-CZmYEaQR.mjs +21 -0
- package/dist/use-component-messages-C4SCVYjD.mjs +17 -0
- package/package.json +28 -7
- package/dist/chevron-GWEoEYdO.mjs +0 -9
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { JSX as JSX$1 } from "solid-js";
|
|
2
|
+
import { CollectionItem } from "@ark-ui/solid/collection";
|
|
3
|
+
import { Select, SelectRootProps } from "@ark-ui/solid/select";
|
|
4
|
+
//#region src/components/select/native.d.ts
|
|
5
|
+
/** One row of the platform's own list. */
|
|
6
|
+
interface NativeSelectOption {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/** The native select wearing the field recipe: the platform's own list
|
|
12
|
+
* behind the same hairline shell the framed select wears. The shell is
|
|
13
|
+
* a wrapper so the indicator rides beside the value as a real stroke —
|
|
14
|
+
* the same chevron the framed trigger shows. */
|
|
15
|
+
interface NativeSelectProps extends Omit<JSX$1.HTMLAttributes<HTMLSpanElement>, "children" | "onChange"> {
|
|
16
|
+
value?: string;
|
|
17
|
+
options: NativeSelectOption[];
|
|
18
|
+
/** One rung of the control-height ladder. */
|
|
19
|
+
size?: "sm" | "md" | "lg";
|
|
20
|
+
invalid?: boolean;
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
onValueChange?: (value: string) => void;
|
|
24
|
+
}
|
|
25
|
+
declare function NativeSelect(props: NativeSelectProps): JSX$1.Element;
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/components/select/index.d.ts
|
|
28
|
+
/** Ark's Select, dressed in the paper-and-ink system: the trigger is the
|
|
29
|
+
* whole control and its list dissolves open as a paper vessel, the checked
|
|
30
|
+
* row taking the flat ink fill. The API is Ark's own — Root, Label, Control,
|
|
31
|
+
* Trigger, ValueText, Indicator, ClearTrigger, HiddenSelect, Positioner,
|
|
32
|
+
* Content, List, Item, ItemText, ItemIndicator, ItemGroup, ItemGroupLabel. */
|
|
33
|
+
type SelectOwnProps = {
|
|
34
|
+
/** One rung of the control-height ladder for the trigger. */
|
|
35
|
+
size?: "sm" | "md" | "lg";
|
|
36
|
+
};
|
|
37
|
+
declare function SelectRoot<T extends CollectionItem>(props: SelectRootProps<T> & SelectOwnProps): import("solid-js").JSX.Element;
|
|
38
|
+
declare const Select$1: Omit<typeof Select, "Root"> & {
|
|
39
|
+
Root: typeof SelectRoot;
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { NativeSelectProps as i, NativeSelect as n, NativeSelectOption as r, Select$1 as t };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { a as AiLoader, c as ReasoningUIPart, d as StepStartUIPart, f as TextUIPart, h as UIMessagePart, i as AiConversation, l as SourceDocumentUIPart, m as UIMessage, n as AiActions, o as DataUIPart, p as ToolUIPart, r as AiContent, s as FileUIPart, t as Ai, u as SourceUrlUIPart } from "./index-B4XS2n2y.mjs";
|
|
2
1
|
import { Accordion } from "./components/accordion/index.mjs";
|
|
3
2
|
import { Affix, AffixProps } from "./components/affix/index.mjs";
|
|
4
3
|
import { Action, ActionProps } from "./components/ai-action/index.mjs";
|
|
@@ -10,6 +9,7 @@ import { AiResponse as Response, ResponseProps } from "./components/ai-response/
|
|
|
10
9
|
import { AiSource as Source, AiSources as Sources, SourceProps } from "./components/ai-source/index.mjs";
|
|
11
10
|
import { AiSuggestion as Suggestion, SuggestionProps } from "./components/ai-suggestion/index.mjs";
|
|
12
11
|
import { AiTool as Tool, ToolProps, ToolStatus } from "./components/ai-tool/index.mjs";
|
|
12
|
+
import { a as AiLoader, c as ReasoningUIPart, d as StepStartUIPart, f as TextUIPart, h as UIMessagePart, i as AiConversation, l as SourceDocumentUIPart, m as UIMessage, n as AiActions, o as DataUIPart, p as ToolUIPart, r as AiContent, s as FileUIPart, t as Ai, u as SourceUrlUIPart } from "./index-IfofF-SW.mjs";
|
|
13
13
|
import { Alert, AlertProps, AlertStatus } from "./components/alert/index.mjs";
|
|
14
14
|
import { AngleSlider } from "./components/angle-slider/index.mjs";
|
|
15
15
|
import { AspectRatio, AspectRatioProps } from "./components/aspect-ratio/index.mjs";
|
|
@@ -19,7 +19,10 @@ import { Avatar, AvatarProps, AvatarSize } from "./components/avatar/index.mjs";
|
|
|
19
19
|
import { BackTop, BackTopProps } from "./components/back-top/index.mjs";
|
|
20
20
|
import { Badge, BadgeProps } from "./components/badge/index.mjs";
|
|
21
21
|
import { Banner, BannerRootProps, BannerStatus } from "./components/banner/index.mjs";
|
|
22
|
+
import { Bento, BentoCell, BentoCellProps, BentoProps, BentoRoot } from "./components/bento/index.mjs";
|
|
23
|
+
import { BlockUI, BlockUIProps } from "./components/block-ui/index.mjs";
|
|
22
24
|
import { Breadcrumb } from "./components/breadcrumb/index.mjs";
|
|
25
|
+
import { Browser, BrowserBody, BrowserDots, BrowserPartProps, BrowserRoot, BrowserTitleBar, BrowserUrlBar } from "./components/browser/index.mjs";
|
|
23
26
|
import { ButtonGroup, ButtonGroupProps, ButtonGroupRoot } from "./components/button-group/index.mjs";
|
|
24
27
|
import { Button, ButtonProps } from "./components/button/index.mjs";
|
|
25
28
|
import { Calendar, CalendarProps } from "./components/calendar/index.mjs";
|
|
@@ -39,10 +42,13 @@ import { Command, CommandEntry, CommandProps } from "./components/command/index.
|
|
|
39
42
|
import { Comment, CommentProps } from "./components/comment/index.mjs";
|
|
40
43
|
import { ConfigContext, ConfigContextKey, ConfigDensity, ConfigProvider, ConfigProviderProps, ConfigScene, useConfig } from "./components/config-provider/index.mjs";
|
|
41
44
|
import { Container, ContainerProps } from "./components/container/index.mjs";
|
|
45
|
+
import { DataView, DataViewProps } from "./components/data-view/index.mjs";
|
|
42
46
|
import { DateInput } from "./components/date-input/index.mjs";
|
|
43
47
|
import { DatePicker } from "./components/date-picker/index.mjs";
|
|
48
|
+
import { DeferredContent, DeferredContentProps } from "./components/deferred-content/index.mjs";
|
|
44
49
|
import { Descriptions, DescriptionsRootProps } from "./components/descriptions/index.mjs";
|
|
45
50
|
import { Dialog, DialogOpenChangeDetails } from "./components/dialog/index.mjs";
|
|
51
|
+
import { Dock, DockItem, DockItemProps, DockProps, DockRoot } from "./components/dock/index.mjs";
|
|
46
52
|
import { DownloadTrigger, DownloadTriggerBaseProps, DownloadTriggerProps, DownloadableData, UseDownloadProps, UseDownloadReturn, useDownload } from "./components/download-trigger/index.mjs";
|
|
47
53
|
import { Drawer } from "./components/drawer/index.mjs";
|
|
48
54
|
import { DynamicInput, DynamicInputProps } from "./components/dynamic-input/index.mjs";
|
|
@@ -81,6 +87,7 @@ import { Menubar, MenubarEntry, MenubarGroup, MenubarProps } from "./components/
|
|
|
81
87
|
import { Meter, MeterRootProps } from "./components/meter/index.mjs";
|
|
82
88
|
import { NavigationMenu } from "./components/navigation-menu/index.mjs";
|
|
83
89
|
import { NumberInput } from "./components/number-input/index.mjs";
|
|
90
|
+
import { OrderList, OrderListProps, OrderOption } from "./components/order-list/index.mjs";
|
|
84
91
|
import { PageHeader } from "./components/page-header/index.mjs";
|
|
85
92
|
import { Pagination } from "./components/pagination/index.mjs";
|
|
86
93
|
import { PasswordInput } from "./components/password-input/index.mjs";
|
|
@@ -93,9 +100,10 @@ import { Progress } from "./components/progress/index.mjs";
|
|
|
93
100
|
import { QrCode } from "./components/qr-code/index.mjs";
|
|
94
101
|
import { RadioGroup } from "./components/radio-group/index.mjs";
|
|
95
102
|
import { RatingGroup } from "./components/rating-group/index.mjs";
|
|
103
|
+
import { Result, ResultIcon, ResultRoot, ResultRootProps } from "./components/result/index.mjs";
|
|
96
104
|
import { ScrollArea } from "./components/scroll-area/index.mjs";
|
|
97
105
|
import { SegmentGroup } from "./components/segment-group/index.mjs";
|
|
98
|
-
import { Select } from "./
|
|
106
|
+
import { i as NativeSelectProps, n as NativeSelect, r as NativeSelectOption, t as Select } from "./index-YPUiqD3n.mjs";
|
|
99
107
|
import { Separator, SeparatorProps } from "./components/separator/index.mjs";
|
|
100
108
|
import { SignaturePad } from "./components/signature-pad/index.mjs";
|
|
101
109
|
import { Skeleton, SkeletonProps } from "./components/skeleton/index.mjs";
|
|
@@ -103,6 +111,7 @@ import { Slider } from "./components/slider/index.mjs";
|
|
|
103
111
|
import { Spinner, SpinnerProps } from "./components/spinner/index.mjs";
|
|
104
112
|
import { SplitButton, SplitButtonEntry, SplitButtonProps } from "./components/split-button/index.mjs";
|
|
105
113
|
import { Splitter } from "./components/splitter/index.mjs";
|
|
114
|
+
import { Spotlight, SpotlightProps } from "./components/spotlight/index.mjs";
|
|
106
115
|
import { Stack, StackProps } from "./components/stack/index.mjs";
|
|
107
116
|
import { Stat, StatDeltaProps } from "./components/stat/index.mjs";
|
|
108
117
|
import { Steps } from "./components/steps/index.mjs";
|
|
@@ -111,19 +120,23 @@ import { Switch } from "./components/switch/index.mjs";
|
|
|
111
120
|
import { ColumnDef, DataTable, DataTableProps, FlexRender, SortingState, createColumnHelper } from "./components/table/index.mjs";
|
|
112
121
|
import { Tabs } from "./components/tabs/index.mjs";
|
|
113
122
|
import { TagsInput } from "./components/tags-input/index.mjs";
|
|
123
|
+
import { Terminal, TerminalProps } from "./components/terminal/index.mjs";
|
|
114
124
|
import { Textarea, TextareaProps } from "./components/textarea/index.mjs";
|
|
115
125
|
import { Timeline } from "./components/timeline/index.mjs";
|
|
116
126
|
import { Timer } from "./components/timer/index.mjs";
|
|
117
127
|
import { CreateToasterReturn, Toast, Toaster, createToaster } from "./components/toast/index.mjs";
|
|
118
|
-
import { Toc } from "./
|
|
128
|
+
import { t as Toc } from "./index-DdsnfV4f.mjs";
|
|
119
129
|
import { ToggleGroup } from "./components/toggle-group/index.mjs";
|
|
120
130
|
import { Toggle } from "./components/toggle/index.mjs";
|
|
131
|
+
import { Toolbar, ToolbarProps } from "./components/toolbar/index.mjs";
|
|
121
132
|
import { Tooltip } from "./components/tooltip/index.mjs";
|
|
122
133
|
import { Tour, TourInteractOutsideEvent, TourPointerDownOutsideEvent, TourStepDetails, useTour } from "./components/tour/index.mjs";
|
|
123
134
|
import { Transfer, TransferItem, TransferProps } from "./components/transfer/index.mjs";
|
|
124
135
|
import { TreeSelect, TreeSelectNode, TreeSelectProps } from "./components/tree-select/index.mjs";
|
|
125
136
|
import { TreeView } from "./components/tree-view/index.mjs";
|
|
126
137
|
import { Typography } from "./components/typography/index.mjs";
|
|
138
|
+
import { User, UserProps } from "./components/user/index.mjs";
|
|
139
|
+
import { VirtualList, VirtualListProps } from "./components/virtual-list/index.mjs";
|
|
127
140
|
import { Watermark, WatermarkProps } from "./components/watermark/index.mjs";
|
|
128
141
|
export * from "@bysages/core";
|
|
129
|
-
export { Accordion, Action, Action as AiAction, ActionProps, Affix, AffixProps, Ai, AiActions, Attachment as AiAttachment, Attachment, Attachments as AiAttachments, Attachments, AiContent, AiConversation, AiLoader, Message as AiMessage, Message, PromptInput as AiPromptInput, PromptInput, Reasoning as AiReasoning, Reasoning, Response as AiResponse, Response, Source as AiSource, Source, Sources as AiSources, Sources, Suggestion as AiSuggestion, Suggestion, Tool as AiTool, Tool, Alert, AlertProps, AlertStatus, AngleSlider, AspectRatio, AspectRatioProps, AttachmentProps, AttachmentStatus, AutoComplete, AutoCompleteProps, Avatar, AvatarGroup, AvatarGroupProps, AvatarProps, AvatarSize, BackTop, BackTopProps, Badge, BadgeProps, Banner, BannerRootProps, BannerStatus, Breadcrumb, Button, ButtonGroup, ButtonGroupProps, ButtonGroupRoot, ButtonProps, Calendar, CalendarProps, Card, Carousel, CascadeSelect, CascadeSelectNode, CascadeSelectProps, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxOption, Chip, ChipProps, ClientOnly, type ClientOnlyProps, Clipboard, Collapsible, type CollectionItem, type CollectionOptions, ColorPicker, type ColumnDef, Combobox, Command, CommandEntry, CommandProps, Comment, CommentProps, ConfigContext, ConfigContextKey, ConfigDensity, ConfigProvider, ConfigProviderProps, ConfigScene, Container, ContainerProps, type CreateToasterReturn, DataTable, DataTableProps, type DataUIPart, DateInput, DatePicker, Descriptions, DescriptionsRootProps, Dialog, type DialogOpenChangeDetails, DownloadTrigger, type DownloadTriggerBaseProps, type DownloadTriggerProps, type DownloadableData, Drawer, DynamicInput, DynamicInputProps, Editable, Ellipsis, EllipsisProps, Empty, Field, type FieldApi, Fieldset, type FilePathTreeNode, type FileUIPart, FileUpload, type FlatTreeNode, FlexRender, FloatButton, FloatButtonContext, FloatButtonContextKey, FloatButtonItemProps, FloatButtonPlacement, FloatButtonRootProps, FloatButtonSize, FloatButtonTriggerProps, FloatingPanel, FocusTrap, type FocusTrapBaseProps, type FocusTrapProps, Form, type FormApi, FormField, FormFieldProps, FormProps, Format, Frame, Grid, type GridCollection, type GridCollectionOptions, GridProps, Highlight, HoverCard, Icon, IconProps, Image, ImageCropper, ImageProps, ImageViewer, ImageViewerProps, Input, InputGroup, InputProps, JsonTreeView, Kbd, KbdProps, Layout, LayoutContextValue, LayoutRootProps, LayoutSiderProps, Link, LinkProps, List, type ListCollection, ListContentProps, ListRootProps, Listbox, Marquee, Masonry, MasonryProps, MentionEntry, Mentions, MentionsProps, MentionsVessel, MentionsVesselProps, Menu, Menubar, MenubarEntry, MenubarGroup, MenubarProps, MessageProps, MessageRole, Meter, MeterRootProps, NavigationMenu, NumberInput, PageHeader, Pagination, PasswordInput, PinInput, Popconfirm, PopconfirmProps, Popover, Presence, type PresenceProps, PresenceProvider, Progress, ProgressGroup, ProgressGroupProps, ProgressSegment, PromptInputProps, QrCode, RadioGroup, RatingGroup, ReasoningProps, type ReasoningUIPart, ResponseProps, ScrollArea, SegmentGroup, Select, Separator, SeparatorProps, SignaturePad, Skeleton, SkeletonProps, Slider, type SolidFormApi, type SortingState, type SourceDocumentUIPart, SourceProps, type SourceUrlUIPart, Spinner, SpinnerProps, SplitButton, SplitButtonEntry, SplitButtonProps, Splitter, Stack, StackProps, Stat, StatDeltaProps, type StepStartUIPart, Steps, SuggestionProps, Swap, Switch, Tabs, TagsInput, type TextUIPart, Textarea, TextareaProps, Timeline, Timer, Toast, Toaster, Toc, Toggle, ToggleGroup, ToolProps, ToolStatus, type ToolUIPart, Tooltip, Tour, type TourInteractOutsideEvent, type TourPointerDownOutsideEvent, type TourStepDetails, Transfer, TransferItem, TransferProps, type TreeCollection, type TreeCollectionOptions, type TreeNode, TreeSelect, TreeSelectNode, TreeSelectProps, TreeView, Typography, type UIMessage, type UIMessagePart, type UseAsyncListProps, type UseAsyncListReturn, type UseDownloadProps, type UseDownloadReturn, type UseListCollectionProps, type UseListCollectionReturn, type UseListSelectionProps, type UseListSelectionReturn, type UseMentionsHandlers, type UseMentionsOptions, type UsePresenceContext, type UsePresenceProps, type UsePresenceReturn, Watermark, WatermarkProps, createColumnHelper, createField, createFileTreeCollection, createForm, createGridCollection, createListCollection, createToaster, createTreeCollection, useAsyncList, useConfig, useDownload, useListCollection, useListSelection, useMentions, usePresence, usePresenceContext, useTour };
|
|
142
|
+
export { Accordion, Action, Action as AiAction, ActionProps, Affix, AffixProps, Ai, AiActions, Attachment as AiAttachment, Attachment, Attachments as AiAttachments, Attachments, AiContent, AiConversation, AiLoader, Message as AiMessage, Message, PromptInput as AiPromptInput, PromptInput, Reasoning as AiReasoning, Reasoning, Response as AiResponse, Response, Source as AiSource, Source, Sources as AiSources, Sources, Suggestion as AiSuggestion, Suggestion, Tool as AiTool, Tool, Alert, AlertProps, AlertStatus, AngleSlider, AspectRatio, AspectRatioProps, AttachmentProps, AttachmentStatus, AutoComplete, AutoCompleteProps, Avatar, AvatarGroup, AvatarGroupProps, AvatarProps, AvatarSize, BackTop, BackTopProps, Badge, BadgeProps, Banner, BannerRootProps, BannerStatus, Bento, BentoCell, BentoCellProps, BentoProps, BentoRoot, BlockUI, BlockUIProps, Breadcrumb, Browser, BrowserBody, BrowserDots, BrowserPartProps, BrowserRoot, BrowserTitleBar, BrowserUrlBar, Button, ButtonGroup, ButtonGroupProps, ButtonGroupRoot, ButtonProps, Calendar, CalendarProps, Card, Carousel, CascadeSelect, CascadeSelectNode, CascadeSelectProps, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxOption, Chip, ChipProps, ClientOnly, type ClientOnlyProps, Clipboard, Collapsible, type CollectionItem, type CollectionOptions, ColorPicker, type ColumnDef, Combobox, Command, CommandEntry, CommandProps, Comment, CommentProps, ConfigContext, ConfigContextKey, ConfigDensity, ConfigProvider, ConfigProviderProps, ConfigScene, Container, ContainerProps, type CreateToasterReturn, DataTable, DataTableProps, type DataUIPart, DataView, DataViewProps, DateInput, DatePicker, DeferredContent, DeferredContentProps, Descriptions, DescriptionsRootProps, Dialog, type DialogOpenChangeDetails, Dock, DockItem, DockItemProps, DockProps, DockRoot, DownloadTrigger, type DownloadTriggerBaseProps, type DownloadTriggerProps, type DownloadableData, Drawer, DynamicInput, DynamicInputProps, Editable, Ellipsis, EllipsisProps, Empty, Field, type FieldApi, Fieldset, type FilePathTreeNode, type FileUIPart, FileUpload, type FlatTreeNode, FlexRender, FloatButton, FloatButtonContext, FloatButtonContextKey, FloatButtonItemProps, FloatButtonPlacement, FloatButtonRootProps, FloatButtonSize, FloatButtonTriggerProps, FloatingPanel, FocusTrap, type FocusTrapBaseProps, type FocusTrapProps, Form, type FormApi, FormField, FormFieldProps, FormProps, Format, Frame, Grid, type GridCollection, type GridCollectionOptions, GridProps, Highlight, HoverCard, Icon, IconProps, Image, ImageCropper, ImageProps, ImageViewer, ImageViewerProps, Input, InputGroup, InputProps, JsonTreeView, Kbd, KbdProps, Layout, LayoutContextValue, LayoutRootProps, LayoutSiderProps, Link, LinkProps, List, type ListCollection, ListContentProps, ListRootProps, Listbox, Marquee, Masonry, MasonryProps, MentionEntry, Mentions, MentionsProps, MentionsVessel, MentionsVesselProps, Menu, Menubar, MenubarEntry, MenubarGroup, MenubarProps, MessageProps, MessageRole, Meter, MeterRootProps, NativeSelect, type NativeSelectOption, type NativeSelectProps, NavigationMenu, NumberInput, OrderList, OrderListProps, OrderOption, PageHeader, Pagination, PasswordInput, PinInput, Popconfirm, PopconfirmProps, Popover, Presence, type PresenceProps, PresenceProvider, Progress, ProgressGroup, ProgressGroupProps, ProgressSegment, PromptInputProps, QrCode, RadioGroup, RatingGroup, ReasoningProps, type ReasoningUIPart, ResponseProps, Result, ResultIcon, ResultRoot, ResultRootProps, ScrollArea, SegmentGroup, Select, Separator, SeparatorProps, SignaturePad, Skeleton, SkeletonProps, Slider, type SolidFormApi, type SortingState, type SourceDocumentUIPart, SourceProps, type SourceUrlUIPart, Spinner, SpinnerProps, SplitButton, SplitButtonEntry, SplitButtonProps, Splitter, Spotlight, SpotlightProps, Stack, StackProps, Stat, StatDeltaProps, type StepStartUIPart, Steps, SuggestionProps, Swap, Switch, Tabs, TagsInput, Terminal, TerminalProps, type TextUIPart, Textarea, TextareaProps, Timeline, Timer, Toast, Toaster, Toc, Toggle, ToggleGroup, ToolProps, ToolStatus, type ToolUIPart, Toolbar, ToolbarProps, Tooltip, Tour, type TourInteractOutsideEvent, type TourPointerDownOutsideEvent, type TourStepDetails, Transfer, TransferItem, TransferProps, type TreeCollection, type TreeCollectionOptions, type TreeNode, TreeSelect, TreeSelectNode, TreeSelectProps, TreeView, Typography, type UIMessage, type UIMessagePart, type UseAsyncListProps, type UseAsyncListReturn, type UseDownloadProps, type UseDownloadReturn, type UseListCollectionProps, type UseListCollectionReturn, type UseListSelectionProps, type UseListSelectionReturn, type UseMentionsHandlers, type UseMentionsOptions, type UsePresenceContext, type UsePresenceProps, type UsePresenceReturn, User, UserProps, VirtualList, VirtualListProps, Watermark, WatermarkProps, createColumnHelper, createField, createField as useField, createFileTreeCollection, createForm, createForm as useForm, createGridCollection, createListCollection, createToaster, createTreeCollection, useAsyncList, useConfig, useDownload, useListCollection, useListSelection, useMentions, usePresence, usePresenceContext, useTour };
|
package/dist/index.mjs
CHANGED
|
@@ -3,11 +3,12 @@ import { Affix } from "./components/affix/index.mjs";
|
|
|
3
3
|
import { Button } from "./components/button/index.mjs";
|
|
4
4
|
import { Action } from "./components/ai-action/index.mjs";
|
|
5
5
|
import { AiMessage as Message } from "./components/ai-message/index.mjs";
|
|
6
|
+
import { ConfigContextKey, ConfigProvider, useConfig } from "./components/config-provider/index.mjs";
|
|
6
7
|
import { Field } from "./components/field/index.mjs";
|
|
7
8
|
import { AiPromptInput as PromptInput } from "./components/ai-prompt-input/index.mjs";
|
|
8
9
|
import { Collapsible } from "./components/collapsible/index.mjs";
|
|
9
10
|
import { AiReasoning as Reasoning } from "./components/ai-reasoning/index.mjs";
|
|
10
|
-
import { t as Response } from "./ai-response-
|
|
11
|
+
import { t as Response } from "./ai-response-slzE03wh.mjs";
|
|
11
12
|
import { AiSource as Source, AiSources as Sources } from "./components/ai-source/index.mjs";
|
|
12
13
|
import { AiSuggestion as Suggestion } from "./components/ai-suggestion/index.mjs";
|
|
13
14
|
import { AiTool as Tool } from "./components/ai-tool/index.mjs";
|
|
@@ -21,13 +22,15 @@ import { Avatar } from "./components/avatar/index.mjs";
|
|
|
21
22
|
import { AvatarGroup } from "./components/avatar-group/index.mjs";
|
|
22
23
|
import { BackTop } from "./components/back-top/index.mjs";
|
|
23
24
|
import { Badge } from "./components/badge/index.mjs";
|
|
25
|
+
import { Spinner } from "./components/spinner/index.mjs";
|
|
26
|
+
import { BlockUI } from "./components/block-ui/index.mjs";
|
|
24
27
|
import { Banner } from "./components/banner/index.mjs";
|
|
25
28
|
import { Breadcrumb } from "./components/breadcrumb/index.mjs";
|
|
26
29
|
import { ButtonGroup, ButtonGroupRoot } from "./components/button-group/index.mjs";
|
|
27
30
|
import { Calendar } from "./components/calendar/index.mjs";
|
|
28
31
|
import { Card } from "./components/card/index.mjs";
|
|
29
32
|
import { Carousel } from "./components/carousel/index.mjs";
|
|
30
|
-
import { Input } from "./
|
|
33
|
+
import { t as Input } from "./input-DoFQ7RXh.mjs";
|
|
31
34
|
import { CascadeSelect } from "./components/cascade-select/index.mjs";
|
|
32
35
|
import { Checkbox } from "./components/checkbox/index.mjs";
|
|
33
36
|
import { CheckboxGroup } from "./components/checkbox-group/index.mjs";
|
|
@@ -39,9 +42,11 @@ import { ColorPicker } from "./components/color-picker/index.mjs";
|
|
|
39
42
|
import { Combobox } from "./components/combobox/index.mjs";
|
|
40
43
|
import { Command } from "./components/command/index.mjs";
|
|
41
44
|
import { Comment } from "./components/comment/index.mjs";
|
|
42
|
-
import { ConfigContextKey, ConfigProvider, useConfig } from "./components/config-provider/index.mjs";
|
|
43
45
|
import { Container } from "./components/container/index.mjs";
|
|
46
|
+
import { Pagination } from "./components/pagination/index.mjs";
|
|
47
|
+
import { DataView } from "./components/data-view/index.mjs";
|
|
44
48
|
import { DateInput } from "./components/date-input/index.mjs";
|
|
49
|
+
import { DeferredContent } from "./components/deferred-content/index.mjs";
|
|
45
50
|
import { DatePicker } from "./components/date-picker/index.mjs";
|
|
46
51
|
import { Descriptions } from "./components/descriptions/index.mjs";
|
|
47
52
|
import { Dialog } from "./components/dialog/index.mjs";
|
|
@@ -78,12 +83,12 @@ import { Masonry } from "./components/masonry/index.mjs";
|
|
|
78
83
|
import { Menu } from "./components/menu/index.mjs";
|
|
79
84
|
import { Menubar } from "./components/menubar/index.mjs";
|
|
80
85
|
import { Textarea } from "./components/textarea/index.mjs";
|
|
81
|
-
import { n as MentionsVessel, r as useMentions, t as Mentions } from "./mentions-
|
|
86
|
+
import { n as MentionsVessel, r as useMentions, t as Mentions } from "./mentions-f5Js_2W7.mjs";
|
|
82
87
|
import { Meter } from "./components/meter/index.mjs";
|
|
83
88
|
import { NavigationMenu } from "./components/navigation-menu/index.mjs";
|
|
89
|
+
import { OrderList } from "./components/order-list/index.mjs";
|
|
84
90
|
import { NumberInput } from "./components/number-input/index.mjs";
|
|
85
91
|
import { PageHeader } from "./components/page-header/index.mjs";
|
|
86
|
-
import { Pagination } from "./components/pagination/index.mjs";
|
|
87
92
|
import { PasswordInput } from "./components/password-input/index.mjs";
|
|
88
93
|
import { PinInput } from "./components/pin-input/index.mjs";
|
|
89
94
|
import { Popconfirm } from "./components/popconfirm/index.mjs";
|
|
@@ -96,12 +101,11 @@ import { RadioGroup } from "./components/radio-group/index.mjs";
|
|
|
96
101
|
import { RatingGroup } from "./components/rating-group/index.mjs";
|
|
97
102
|
import { ScrollArea } from "./components/scroll-area/index.mjs";
|
|
98
103
|
import { SegmentGroup } from "./components/segment-group/index.mjs";
|
|
99
|
-
import { Select } from "./
|
|
104
|
+
import { n as NativeSelect, t as Select } from "./select-CX6OuQlU.mjs";
|
|
100
105
|
import { Separator } from "./components/separator/index.mjs";
|
|
101
106
|
import { SignaturePad } from "./components/signature-pad/index.mjs";
|
|
102
107
|
import { Skeleton } from "./components/skeleton/index.mjs";
|
|
103
108
|
import { Slider } from "./components/slider/index.mjs";
|
|
104
|
-
import { Spinner } from "./components/spinner/index.mjs";
|
|
105
109
|
import { SplitButton } from "./components/split-button/index.mjs";
|
|
106
110
|
import { Splitter } from "./components/splitter/index.mjs";
|
|
107
111
|
import { Stack } from "./components/stack/index.mjs";
|
|
@@ -111,12 +115,14 @@ import { Swap } from "./components/swap/index.mjs";
|
|
|
111
115
|
import { Switch } from "./components/switch/index.mjs";
|
|
112
116
|
import { DataTable, FlexRender, createColumnHelper } from "./components/table/index.mjs";
|
|
113
117
|
import { Tabs } from "./components/tabs/index.mjs";
|
|
118
|
+
import { Terminal } from "./components/terminal/index.mjs";
|
|
114
119
|
import { TagsInput } from "./components/tags-input/index.mjs";
|
|
115
120
|
import { Timeline } from "./components/timeline/index.mjs";
|
|
116
121
|
import { Timer } from "./components/timer/index.mjs";
|
|
117
122
|
import { Toast, Toaster, createToaster } from "./components/toast/index.mjs";
|
|
118
|
-
import { Toc } from "./
|
|
123
|
+
import { t as Toc } from "./toc-CZmYEaQR.mjs";
|
|
119
124
|
import { Toggle } from "./components/toggle/index.mjs";
|
|
125
|
+
import { Toolbar } from "./components/toolbar/index.mjs";
|
|
120
126
|
import { Typography } from "./components/typography/index.mjs";
|
|
121
127
|
import { ToggleGroup } from "./components/toggle-group/index.mjs";
|
|
122
128
|
import { Transfer } from "./components/transfer/index.mjs";
|
|
@@ -124,6 +130,13 @@ import { Tooltip } from "./components/tooltip/index.mjs";
|
|
|
124
130
|
import { Tour, useTour } from "./components/tour/index.mjs";
|
|
125
131
|
import { TreeSelect } from "./components/tree-select/index.mjs";
|
|
126
132
|
import { TreeView } from "./components/tree-view/index.mjs";
|
|
133
|
+
import { User } from "./components/user/index.mjs";
|
|
134
|
+
import { VirtualList } from "./components/virtual-list/index.mjs";
|
|
127
135
|
import { Watermark } from "./components/watermark/index.mjs";
|
|
136
|
+
import { Spotlight } from "./components/spotlight/index.mjs";
|
|
137
|
+
import { Dock, DockItem, DockRoot } from "./components/dock/index.mjs";
|
|
138
|
+
import { Browser, BrowserBody, BrowserDots, BrowserRoot, BrowserTitleBar, BrowserUrlBar } from "./components/browser/index.mjs";
|
|
139
|
+
import { Bento, BentoCell, BentoRoot } from "./components/bento/index.mjs";
|
|
140
|
+
import { Result, ResultIcon, ResultRoot } from "./components/result/index.mjs";
|
|
128
141
|
export * from "@bysages/core";
|
|
129
|
-
export { Accordion, Action, Action as AiAction, Affix, Ai, AiActions, Attachment as AiAttachment, Attachment, Attachments as AiAttachments, Attachments, AiContent, AiConversation, AiLoader, Message as AiMessage, Message, PromptInput as AiPromptInput, PromptInput, Reasoning as AiReasoning, Reasoning, Response as AiResponse, Response, Source as AiSource, Source, Sources as AiSources, Sources, Suggestion as AiSuggestion, Suggestion, Tool as AiTool, Tool, Alert, AngleSlider, AspectRatio, AutoComplete, Avatar, AvatarGroup, BackTop, Badge, Banner, Breadcrumb, Button, ButtonGroup, ButtonGroupRoot, Calendar, Card, Carousel, CascadeSelect, Checkbox, CheckboxGroup, Chip, ClientOnly, Clipboard, Collapsible, ColorPicker, Combobox, Command, Comment, ConfigContextKey, ConfigProvider, Container, DataTable, DateInput, DatePicker, Descriptions, Dialog, DownloadTrigger, Drawer, DynamicInput, Editable, Ellipsis, Empty, Field, Fieldset, FileUpload, FlexRender, FloatButton, FloatButtonContextKey, FloatingPanel, FocusTrap, Form, FormField, Format, Frame, Grid, Highlight, HoverCard, Icon, Image, ImageCropper, ImageViewer, Input, InputGroup, JsonTreeView, Kbd, Layout, Link, List, Listbox, Marquee, Masonry, Mentions, MentionsVessel, Menu, Menubar, Meter, NavigationMenu, NumberInput, PageHeader, Pagination, PasswordInput, PinInput, Popconfirm, Popover, Presence, PresenceProvider, Progress, ProgressGroup, QrCode, RadioGroup, RatingGroup, ScrollArea, SegmentGroup, Select, Separator, SignaturePad, Skeleton, Slider, Spinner, SplitButton, Splitter, Stack, Stat, Steps, Swap, Switch, Tabs, TagsInput, Textarea, Timeline, Timer, Toast, Toaster, Toc, Toggle, ToggleGroup, Tooltip, Tour, Transfer, TreeSelect, TreeView, Typography, Watermark, createColumnHelper, createField, createFileTreeCollection, createForm, createGridCollection, createListCollection, createToaster, createTreeCollection, useAsyncList, useConfig, useDownload, useListCollection, useListSelection, useMentions, usePresence, usePresenceContext, useTour };
|
|
142
|
+
export { Accordion, Action, Action as AiAction, Affix, Ai, AiActions, Attachment as AiAttachment, Attachment, Attachments as AiAttachments, Attachments, AiContent, AiConversation, AiLoader, Message as AiMessage, Message, PromptInput as AiPromptInput, PromptInput, Reasoning as AiReasoning, Reasoning, Response as AiResponse, Response, Source as AiSource, Source, Sources as AiSources, Sources, Suggestion as AiSuggestion, Suggestion, Tool as AiTool, Tool, Alert, AngleSlider, AspectRatio, AutoComplete, Avatar, AvatarGroup, BackTop, Badge, Banner, Bento, BentoCell, BentoRoot, BlockUI, Breadcrumb, Browser, BrowserBody, BrowserDots, BrowserRoot, BrowserTitleBar, BrowserUrlBar, Button, ButtonGroup, ButtonGroupRoot, Calendar, Card, Carousel, CascadeSelect, Checkbox, CheckboxGroup, Chip, ClientOnly, Clipboard, Collapsible, ColorPicker, Combobox, Command, Comment, ConfigContextKey, ConfigProvider, Container, DataTable, DataView, DateInput, DatePicker, DeferredContent, Descriptions, Dialog, Dock, DockItem, DockRoot, DownloadTrigger, Drawer, DynamicInput, Editable, Ellipsis, Empty, Field, Fieldset, FileUpload, FlexRender, FloatButton, FloatButtonContextKey, FloatingPanel, FocusTrap, Form, FormField, Format, Frame, Grid, Highlight, HoverCard, Icon, Image, ImageCropper, ImageViewer, Input, InputGroup, JsonTreeView, Kbd, Layout, Link, List, Listbox, Marquee, Masonry, Mentions, MentionsVessel, Menu, Menubar, Meter, NativeSelect, NavigationMenu, NumberInput, OrderList, PageHeader, Pagination, PasswordInput, PinInput, Popconfirm, Popover, Presence, PresenceProvider, Progress, ProgressGroup, QrCode, RadioGroup, RatingGroup, Result, ResultIcon, ResultRoot, ScrollArea, SegmentGroup, Select, Separator, SignaturePad, Skeleton, Slider, Spinner, SplitButton, Splitter, Spotlight, Stack, Stat, Steps, Swap, Switch, Tabs, TagsInput, Terminal, Textarea, Timeline, Timer, Toast, Toaster, Toc, Toggle, ToggleGroup, Toolbar, Tooltip, Tour, Transfer, TreeSelect, TreeView, Typography, User, VirtualList, Watermark, createColumnHelper, createField, createField as useField, createFileTreeCollection, createForm, createForm as useForm, createGridCollection, createListCollection, createToaster, createTreeCollection, useAsyncList, useConfig, useDownload, useListCollection, useListSelection, useMentions, usePresence, usePresenceContext, useTour };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { spread, template } from "@solidjs/web";
|
|
3
|
+
import { mergeProps as mergeProps$1, splitProps } from "solid-js";
|
|
4
|
+
import { useFieldContext } from "@ark-ui/solid/field";
|
|
5
|
+
//#region src/components/input/mask.ts
|
|
6
|
+
function accepts(slot, ch) {
|
|
7
|
+
if (slot === "9") return /\d/.test(ch);
|
|
8
|
+
if (slot === "a") return /[a-zA-Z]/.test(ch);
|
|
9
|
+
return /[\da-zA-Z]/.test(ch);
|
|
10
|
+
}
|
|
11
|
+
/** Apply the entry mask: `9` takes a digit, `a` a letter, `*` either;
|
|
12
|
+
* every other character is literal. A literal already typed is consumed,
|
|
13
|
+
* not duplicated; a literal met out of place holds the walk and lets its
|
|
14
|
+
* own slot claim it — so deleting through the middle reflows the shape
|
|
15
|
+
* instead of corrupting it. */
|
|
16
|
+
function applyMask(raw, mask) {
|
|
17
|
+
const literals = new Set(mask.split("").filter((s) => s !== "9" && s !== "a" && s !== "*"));
|
|
18
|
+
let out = "";
|
|
19
|
+
let at = 0;
|
|
20
|
+
slots: for (const slot of mask) {
|
|
21
|
+
if (at >= raw.length) break;
|
|
22
|
+
if (slot === "9" || slot === "a" || slot === "*") {
|
|
23
|
+
let ch = raw[at];
|
|
24
|
+
while (ch !== void 0 && !accepts(slot, ch)) {
|
|
25
|
+
if (literals.has(ch)) continue slots;
|
|
26
|
+
at += 1;
|
|
27
|
+
ch = raw[at];
|
|
28
|
+
}
|
|
29
|
+
if (ch === void 0) break;
|
|
30
|
+
out += ch;
|
|
31
|
+
at += 1;
|
|
32
|
+
} else if (raw[at] === slot) {
|
|
33
|
+
at += 1;
|
|
34
|
+
out += slot;
|
|
35
|
+
} else out += slot;
|
|
36
|
+
}
|
|
37
|
+
return out;
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/components/input/index.tsx
|
|
41
|
+
var _tmpl$ = /* @__PURE__ */ template(`<input>`);
|
|
42
|
+
/** The bare text input: the field recipe — border, surface, focus halo —
|
|
43
|
+
* on a native control. Standing alone it styles itself from the `invalid`
|
|
44
|
+
* prop; inside a `Field.Root` it consumes the field context, picking up
|
|
45
|
+
* the label id, the described-by wiring and the invalid state for free,
|
|
46
|
+
* which is also the seam the Form validation layer will drive. Disabled
|
|
47
|
+
* rides the native attribute. */
|
|
48
|
+
function Input(props) {
|
|
49
|
+
injectComponentStyle("input");
|
|
50
|
+
const field = useFieldContext();
|
|
51
|
+
const [own, rest] = splitProps(props, [
|
|
52
|
+
"value",
|
|
53
|
+
"size",
|
|
54
|
+
"invalid",
|
|
55
|
+
"mask",
|
|
56
|
+
"onValueChange"
|
|
57
|
+
]);
|
|
58
|
+
var _el$ = _tmpl$();
|
|
59
|
+
spread(_el$, () => {
|
|
60
|
+
return mergeProps$1(() => field?.().getInputProps() ?? {}, rest, {
|
|
61
|
+
get value() {
|
|
62
|
+
return own.value;
|
|
63
|
+
},
|
|
64
|
+
"data-scope": "input",
|
|
65
|
+
"data-part": "root",
|
|
66
|
+
get "data-size"() {
|
|
67
|
+
return own.size ?? "md";
|
|
68
|
+
},
|
|
69
|
+
get "data-invalid"() {
|
|
70
|
+
return own.invalid || field?.().getInputProps()["data-invalid"] != null ? "" : void 0;
|
|
71
|
+
},
|
|
72
|
+
onInput: (event) => own.onValueChange?.(own.mask ? applyMask(event.currentTarget.value, own.mask) : event.currentTarget.value)
|
|
73
|
+
});
|
|
74
|
+
}, false);
|
|
75
|
+
return _el$;
|
|
76
|
+
}
|
|
77
|
+
//#endregion
|
|
78
|
+
export { Input as t };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Textarea } from "./components/textarea/index.mjs";
|
|
2
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
3
|
-
import {
|
|
3
|
+
import { createComponent, delegateEvents, effect, insert, setAttribute, spread, template } from "@solidjs/web";
|
|
4
4
|
import { For, createEffect, createSignal, splitProps } from "solid-js";
|
|
5
|
+
import { Portal } from "solid-js/web";
|
|
5
6
|
import { Popover } from "@ark-ui/solid/popover";
|
|
6
7
|
//#region src/components/mentions/use-mentions.ts
|
|
7
8
|
/** The @-detection machinery behind a mention field: watch the caret,
|
|
@@ -87,8 +88,9 @@ function useMentions(options, textarea, handlers) {
|
|
|
87
88
|
}
|
|
88
89
|
//#endregion
|
|
89
90
|
//#region src/components/mentions/index.tsx
|
|
90
|
-
var _tmpl$ =
|
|
91
|
-
var _tmpl$2 =
|
|
91
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
92
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<div data-scope=mentions data-part=option>`);
|
|
93
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<div><!><!>`);
|
|
92
94
|
/** The vessel: the candidates themselves as a floating card. The anchor
|
|
93
95
|
* is virtual — a live rectangle off the host's field — so a host keeps
|
|
94
96
|
* its own anatomy (the textarea rides where the host puts it) and the
|
|
@@ -110,24 +112,28 @@ function MentionsVessel(props) {
|
|
|
110
112
|
return createComponent(Popover.Positioner, { get children() {
|
|
111
113
|
return createComponent(Popover.Content, { asChild: (contentProps) => (() => {
|
|
112
114
|
var _el$ = _tmpl$();
|
|
113
|
-
spread(_el$,
|
|
115
|
+
spread(_el$, [contentProps, {
|
|
114
116
|
"data-scope": "mentions",
|
|
115
117
|
"data-part": "popup",
|
|
116
|
-
get
|
|
118
|
+
get "data-size"() {
|
|
117
119
|
return props.size ?? "md";
|
|
118
120
|
}
|
|
119
|
-
}
|
|
121
|
+
}], true);
|
|
120
122
|
insert(_el$, createComponent(For, {
|
|
121
123
|
get each() {
|
|
122
124
|
return props.matches ?? [];
|
|
123
125
|
},
|
|
124
126
|
children: (entry, index) => (() => {
|
|
125
127
|
var _el$2 = _tmpl$2();
|
|
126
|
-
_el$2
|
|
127
|
-
_el$2
|
|
128
|
+
_el$2._$$click = () => props.onInsert?.(entry);
|
|
129
|
+
_el$2._$$mousedown = (event) => event.preventDefault();
|
|
128
130
|
_el$2.addEventListener("mouseenter", () => props.onActiveChange?.(index()));
|
|
129
|
-
insert(_el$2, () =>
|
|
130
|
-
|
|
131
|
+
insert(_el$2, () => {
|
|
132
|
+
return entry.label;
|
|
133
|
+
});
|
|
134
|
+
effect(() => index() === (props.active ?? 0) ? "" : void 0, (_v$) => {
|
|
135
|
+
setAttribute(_el$2, "data-active", _v$);
|
|
136
|
+
});
|
|
131
137
|
return _el$2;
|
|
132
138
|
})()
|
|
133
139
|
}));
|
|
@@ -191,66 +197,66 @@ function Mentions(props) {
|
|
|
191
197
|
own.onValueChange?.(node.value);
|
|
192
198
|
mentions.onInput();
|
|
193
199
|
};
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
|
|
200
|
+
var _el$3 = _tmpl$3();
|
|
201
|
+
var _el$4 = _el$3.firstChild;
|
|
202
|
+
var _el$5 = _el$4.nextSibling;
|
|
203
|
+
spread(_el$3, [rest, {
|
|
204
|
+
"data-scope": "mentions",
|
|
205
|
+
"data-part": "root",
|
|
206
|
+
get "data-size"() {
|
|
207
|
+
return own.size ?? "md";
|
|
208
|
+
}
|
|
209
|
+
}], true);
|
|
210
|
+
insert(_el$3, createComponent(Textarea, {
|
|
211
|
+
ref: (node) => setFieldEl(node),
|
|
212
|
+
get invalid() {
|
|
213
|
+
return own.invalid;
|
|
214
|
+
},
|
|
215
|
+
rows: 3,
|
|
216
|
+
get placeholder() {
|
|
217
|
+
return own.placeholder;
|
|
218
|
+
},
|
|
219
|
+
get value() {
|
|
220
|
+
return value();
|
|
221
|
+
},
|
|
222
|
+
onValueChange: (next) => {
|
|
223
|
+
setInternal(next);
|
|
224
|
+
own.onValueChange?.(next);
|
|
225
|
+
},
|
|
226
|
+
onInput,
|
|
227
|
+
onKeyDown: (event) => {
|
|
228
|
+
mentions.onKeydown(event);
|
|
229
|
+
},
|
|
230
|
+
"data-scope": "mentions",
|
|
231
|
+
"data-part": "textarea"
|
|
232
|
+
}), _el$4);
|
|
233
|
+
insert(_el$3, createComponent(MentionsVessel, {
|
|
234
|
+
get open() {
|
|
235
|
+
return mentions.open();
|
|
236
|
+
},
|
|
237
|
+
get matches() {
|
|
238
|
+
return mentions.matches();
|
|
239
|
+
},
|
|
240
|
+
get active() {
|
|
241
|
+
return mentions.active();
|
|
242
|
+
},
|
|
243
|
+
get size() {
|
|
244
|
+
return own.size ?? "md";
|
|
245
|
+
},
|
|
246
|
+
get anchor() {
|
|
247
|
+
return fieldEl();
|
|
248
|
+
},
|
|
249
|
+
get onInsert() {
|
|
250
|
+
return mentions.insert;
|
|
251
|
+
},
|
|
252
|
+
get onActiveChange() {
|
|
253
|
+
return mentions.setActive;
|
|
254
|
+
},
|
|
255
|
+
onOpenChange: (open) => {
|
|
256
|
+
if (!open) mentions.close();
|
|
257
|
+
}
|
|
258
|
+
}), _el$5);
|
|
259
|
+
return _el$3;
|
|
254
260
|
}
|
|
255
261
|
delegateEvents(["mousedown", "click"]);
|
|
256
262
|
//#endregion
|