@bysages/react 0.3.0 → 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/dist/{ai-response-jZy-0Tvv.mjs → ai-response-BfKTmtCt.mjs} +8 -4
- package/dist/components/ai/index.d.mts +2 -2
- package/dist/components/ai/index.mjs +25 -10
- package/dist/components/ai-attachments/index.mjs +3 -1
- package/dist/components/ai-prompt-input/index.d.mts +1 -1
- package/dist/components/ai-prompt-input/index.mjs +8 -4
- package/dist/components/ai-response/index.d.mts +4 -2
- package/dist/components/ai-response/index.mjs +1 -1
- package/dist/components/autocomplete/index.mjs +3 -1
- package/dist/components/banner/index.mjs +21 -17
- package/dist/components/breadcrumb/index.d.mts +3 -8
- package/dist/components/breadcrumb/index.mjs +11 -1
- package/dist/components/cascade-select/index.mjs +6 -2
- package/dist/components/command/index.mjs +9 -3
- package/dist/components/config-provider/index.d.mts +5 -2
- package/dist/components/config-provider/index.mjs +3 -2
- package/dist/components/data-view/index.mjs +4 -2
- package/dist/components/dynamic-input/index.mjs +3 -1
- package/dist/components/file-upload/index.d.mts +8 -1
- package/dist/components/file-upload/index.mjs +20 -1
- package/dist/components/float-button/index.mjs +3 -1
- package/dist/components/image/index.d.mts +7 -1
- package/dist/components/image/index.mjs +3 -1
- package/dist/components/image-viewer/index.d.mts +7 -1
- package/dist/components/image-viewer/index.mjs +8 -4
- package/dist/components/json-tree-view/index.d.mts +3 -3
- package/dist/components/json-tree-view/index.mjs +17 -4
- package/dist/components/layout/index.mjs +3 -1
- package/dist/components/list/index.d.mts +5 -4
- package/dist/components/list/index.mjs +10 -1
- package/dist/components/menubar/index.mjs +1 -0
- package/dist/components/order-list/index.mjs +8 -9
- package/dist/components/select/index.d.mts +1 -1
- package/dist/components/select/index.mjs +1 -1
- package/dist/components/spinner/index.mjs +3 -1
- package/dist/components/split-button/index.mjs +3 -1
- package/dist/components/steps/index.d.mts +5 -1
- package/dist/components/steps/index.mjs +10 -1
- package/dist/components/table/index.mjs +19 -15
- package/dist/components/terminal/index.mjs +5 -2
- package/dist/components/toc/index.d.mts +7 -1
- package/dist/components/toc/index.mjs +13 -1
- package/dist/components/transfer/index.mjs +6 -4
- package/dist/components/tree-select/index.mjs +4 -2
- package/dist/components/tree-view/index.d.mts +10 -1
- package/dist/components/tree-view/index.mjs +22 -1
- package/dist/components/virtual-list/index.mjs +1 -0
- package/dist/glyph-VI989p8H.mjs +14 -0
- package/dist/{index-CsfxYv6J.d.mts → index-Dn5mHf1g.d.mts} +6 -21
- package/dist/{index-DFN9F5Zt.d.mts → index-Iy8m0Qev.d.mts} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +5 -5
- package/dist/messages-1jJWtaYU.mjs +16 -0
- package/dist/{select-D1xiT1oJ.mjs → select-eAHutw56.mjs} +3 -1
- package/package.json +3 -3
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
//#region src/internal/glyph.tsx
|
|
3
|
+
/** Render a lucide glyph as a bare svg element — the components' own
|
|
4
|
+
* default icons. No span shell: the part rules size the svg directly. */
|
|
5
|
+
function glyphNode(glyph, attrs = {}) {
|
|
6
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
7
|
+
viewBox: `0 0 ${glyph.width} ${glyph.height}`,
|
|
8
|
+
"aria-hidden": "true",
|
|
9
|
+
...attrs,
|
|
10
|
+
dangerouslySetInnerHTML: { __html: glyph.body }
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { glyphNode as t };
|
|
@@ -10327,10 +10327,7 @@ declare global {
|
|
|
10327
10327
|
//#region src/components/ai/index.d.ts
|
|
10328
10328
|
/** The log itself: the column every stroke lands in, a landmark to
|
|
10329
10329
|
* screen readers. */
|
|
10330
|
-
declare
|
|
10331
|
-
({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
10332
|
-
displayName: string;
|
|
10333
|
-
};
|
|
10330
|
+
declare function AiConversation({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
10334
10331
|
/** The bubble's inner measure — content that belongs to neither side
|
|
10335
10332
|
* specifically. */
|
|
10336
10333
|
declare const AiContent: {
|
|
@@ -10343,20 +10340,11 @@ declare const AiActions: {
|
|
|
10343
10340
|
displayName: string;
|
|
10344
10341
|
};
|
|
10345
10342
|
/** The while-it-works whisper for the in-flight turns. */
|
|
10346
|
-
declare
|
|
10347
|
-
({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
10348
|
-
displayName: string;
|
|
10349
|
-
};
|
|
10343
|
+
declare function AiLoader({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
10350
10344
|
/** The whole family under one handle — `Ai.Conversation`,
|
|
10351
10345
|
* `Ai.Message`, and the rest, exactly as before the split. */
|
|
10352
|
-
declare const Ai: {
|
|
10353
|
-
|
|
10354
|
-
displayName: string;
|
|
10355
|
-
} & {
|
|
10356
|
-
Conversation: {
|
|
10357
|
-
({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
10358
|
-
displayName: string;
|
|
10359
|
-
};
|
|
10346
|
+
declare const Ai: typeof AiConversation & {
|
|
10347
|
+
Conversation: typeof AiConversation;
|
|
10360
10348
|
MessageContent: {
|
|
10361
10349
|
({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
10362
10350
|
displayName: string;
|
|
@@ -10365,10 +10353,7 @@ declare const Ai: {
|
|
|
10365
10353
|
({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
10366
10354
|
displayName: string;
|
|
10367
10355
|
};
|
|
10368
|
-
Loader:
|
|
10369
|
-
({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
10370
|
-
displayName: string;
|
|
10371
|
-
};
|
|
10356
|
+
Loader: typeof AiLoader;
|
|
10372
10357
|
Message: typeof Message;
|
|
10373
10358
|
Response: typeof Response$1;
|
|
10374
10359
|
Reasoning: typeof Reasoning;
|
|
@@ -10380,4 +10365,4 @@ declare const Ai: {
|
|
|
10380
10365
|
PromptInput: typeof PromptInput;
|
|
10381
10366
|
};
|
|
10382
10367
|
//#endregion
|
|
10383
|
-
export {
|
|
10368
|
+
export { FileUIPart as a, SourceUrlUIPart as c, ToolUIPart as d, UIMessage as f, DataUIPart as i, StepStartUIPart as l, AiActions as n, ReasoningUIPart as o, UIMessagePart as p, AiContent as r, SourceDocumentUIPart as s, Ai as t, TextUIPart as u };
|
|
@@ -22,7 +22,7 @@ interface NativeSelectProps extends Omit<HTMLAttributes<HTMLSpanElement>, "child
|
|
|
22
22
|
disabled?: boolean;
|
|
23
23
|
onValueChange?: (value: string) => void;
|
|
24
24
|
}
|
|
25
|
-
declare function NativeSelect({ value, options, size, invalid, placeholder, disabled, onValueChange, ...rest }: NativeSelectProps): import("react").JSX.Element;
|
|
25
|
+
declare function NativeSelect({ value, options, size, invalid, placeholder, disabled, onValueChange, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, ...rest }: NativeSelectProps): import("react").JSX.Element;
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region src/components/select/index.d.ts
|
|
28
28
|
/** Ark's Select, dressed in the paper-and-ink system: the trigger is the
|
package/dist/index.d.mts
CHANGED
|
@@ -10,7 +10,7 @@ import { AiResponse as Response, ResponseProps } from "./components/ai-response/
|
|
|
10
10
|
import { AiSource as Source, AiSources as Sources, SourceProps, SourcesProps } from "./components/ai-source/index.mjs";
|
|
11
11
|
import { AiSuggestion as Suggestion, SuggestionProps } from "./components/ai-suggestion/index.mjs";
|
|
12
12
|
import { AiTool as Tool, ToolProps, ToolStatus } from "./components/ai-tool/index.mjs";
|
|
13
|
-
import { a as
|
|
13
|
+
import { a as FileUIPart, c as SourceUrlUIPart, d as ToolUIPart, f as UIMessage, i as DataUIPart, l as StepStartUIPart, n as AiActions, o as ReasoningUIPart, p as UIMessagePart, r as AiContent, s as SourceDocumentUIPart, t as Ai, u as TextUIPart } from "./index-Dn5mHf1g.mjs";
|
|
14
14
|
import { Alert, AlertProps, AlertStatus } from "./components/alert/index.mjs";
|
|
15
15
|
import { AngleSlider } from "./components/angle-slider/index.mjs";
|
|
16
16
|
import { AspectRatio, AspectRatioProps } from "./components/aspect-ratio/index.mjs";
|
|
@@ -103,7 +103,7 @@ import { RatingGroup } from "./components/rating-group/index.mjs";
|
|
|
103
103
|
import { Result, ResultIcon, ResultRoot, ResultRootProps } from "./components/result/index.mjs";
|
|
104
104
|
import { ScrollArea } from "./components/scroll-area/index.mjs";
|
|
105
105
|
import { SegmentGroup } from "./components/segment-group/index.mjs";
|
|
106
|
-
import { i as NativeSelectProps, n as NativeSelect, r as NativeSelectOption, t as Select } from "./index-
|
|
106
|
+
import { i as NativeSelectProps, n as NativeSelect, r as NativeSelectOption, t as Select } from "./index-Iy8m0Qev.mjs";
|
|
107
107
|
import { Separator, SeparatorProps } from "./components/separator/index.mjs";
|
|
108
108
|
import { SignaturePad } from "./components/signature-pad/index.mjs";
|
|
109
109
|
import { Skeleton, SkeletonProps } from "./components/skeleton/index.mjs";
|
|
@@ -139,4 +139,4 @@ import { User, UserProps } from "./components/user/index.mjs";
|
|
|
139
139
|
import { VirtualList, VirtualListProps } from "./components/virtual-list/index.mjs";
|
|
140
140
|
import { Watermark, WatermarkProps } from "./components/watermark/index.mjs";
|
|
141
141
|
export * from "@bysages/core";
|
|
142
|
-
export { Accordion, Action, Action as AiAction, ActionProps, Affix, AffixProps, Ai, AiActions, Attachment as AiAttachment, Attachment, Attachments as AiAttachments, Attachments, AiContent,
|
|
142
|
+
export { Accordion, Action, Action as AiAction, ActionProps, Affix, AffixProps, Ai, AiActions, Attachment as AiAttachment, Attachment, Attachments as AiAttachments, Attachments, AiContent, 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, 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, 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, ConfigDensity, ConfigProvider, ConfigProviderProps, ConfigScene, Container, ContainerProps, type CreateToasterReturn, DataTable, DataTableProps, type DataUIPart, DataView, DataViewProps, DateInput, type DateInputFocusChangeDetails, type DateInputValueChangeDetails, DatePicker, type DatePickerFocusChangeDetails, type DatePickerOpenChangeDetails, type DatePickerValueChangeDetails, type DatePickerViewChangeDetails, type DatePickerVisibleRangeChangeDetails, DeferredContent, DeferredContentProps, Descriptions, DescriptionsRoot, DescriptionsRootProps, Dialog, type DialogOpenChangeDetails, Dock, DockItem, DockItemProps, DockProps, DockRoot, DownloadTrigger, type DownloadTriggerBaseProps, type DownloadTriggerProps, type DownloadableData, Drawer, DynamicInput, DynamicInputProps, Editable, Ellipsis, EllipsisProps, Empty, FLOAT_BUTTON_CONTEXT, Field, type FieldApi, Fieldset, type FilePathTreeNode, type FileUIPart, FileUpload, type FlatTreeNode, FlexRender, FloatButton, FloatButtonContextValue, FloatButtonPlacement, FloatButtonRootProps, FloatButtonSize, 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, InputGroupPartProps, 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, Meter, MeterRootProps, NativeSelect, type NativeSelectOption, type NativeSelectProps, NavigationMenu, NumberInput, OrderList, OrderListProps, OrderOption, PageHeader, Pagination, PasswordInput, PinInput, Popconfirm, PopconfirmProps, Popover, Presence, type PresenceBaseProps, 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 SortingState, type SourceDocumentUIPart, SourceProps, type SourceUrlUIPart, SourcesProps, 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, createFileTreeCollection, createGridCollection, createToaster, createTreeCollection, useAsyncList, useConfig, useDownload, useField, useForm, useListCollection, useListSelection, useMentions, usePresence, usePresenceContext, useTour };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Accordion } from "./components/accordion/index.mjs";
|
|
2
2
|
import { Affix } from "./components/affix/index.mjs";
|
|
3
|
+
import { ConfigProvider, useConfig } from "./components/config-provider/index.mjs";
|
|
3
4
|
import { Button } from "./components/button/index.mjs";
|
|
4
5
|
import { Action } from "./components/ai-action/index.mjs";
|
|
5
6
|
import { AiMessage as Message } from "./components/ai-message/index.mjs";
|
|
@@ -8,11 +9,11 @@ import { n as MentionsVessel, r as useMentions, t as Mentions } from "./mentions
|
|
|
8
9
|
import { AiPromptInput as PromptInput } from "./components/ai-prompt-input/index.mjs";
|
|
9
10
|
import { Collapsible } from "./components/collapsible/index.mjs";
|
|
10
11
|
import { AiReasoning as Reasoning } from "./components/ai-reasoning/index.mjs";
|
|
11
|
-
import { t as Response } from "./ai-response-
|
|
12
|
+
import { t as Response } from "./ai-response-BfKTmtCt.mjs";
|
|
12
13
|
import { AiSource as Source, AiSources as Sources } from "./components/ai-source/index.mjs";
|
|
13
14
|
import { AiSuggestion as Suggestion } from "./components/ai-suggestion/index.mjs";
|
|
14
15
|
import { AiTool as Tool } from "./components/ai-tool/index.mjs";
|
|
15
|
-
import { Ai, AiActions, AiContent
|
|
16
|
+
import { Ai, AiActions, AiContent } from "./components/ai/index.mjs";
|
|
16
17
|
import { AiAttachment as Attachment, AiAttachments as Attachments } from "./components/ai-attachments/index.mjs";
|
|
17
18
|
import { Alert } from "./components/alert/index.mjs";
|
|
18
19
|
import { AngleSlider } from "./components/angle-slider/index.mjs";
|
|
@@ -44,7 +45,6 @@ import { ColorPicker } from "./components/color-picker/index.mjs";
|
|
|
44
45
|
import { Combobox } from "./components/combobox/index.mjs";
|
|
45
46
|
import { Command } from "./components/command/index.mjs";
|
|
46
47
|
import { Comment } from "./components/comment/index.mjs";
|
|
47
|
-
import { ConfigProvider, useConfig } from "./components/config-provider/index.mjs";
|
|
48
48
|
import { Container } from "./components/container/index.mjs";
|
|
49
49
|
import { Pagination } from "./components/pagination/index.mjs";
|
|
50
50
|
import { DataView } from "./components/data-view/index.mjs";
|
|
@@ -104,7 +104,7 @@ import { RatingGroup } from "./components/rating-group/index.mjs";
|
|
|
104
104
|
import { Result, ResultIcon, ResultRoot } from "./components/result/index.mjs";
|
|
105
105
|
import { ScrollArea } from "./components/scroll-area/index.mjs";
|
|
106
106
|
import { SegmentGroup } from "./components/segment-group/index.mjs";
|
|
107
|
-
import { n as NativeSelect, t as Select } from "./select-
|
|
107
|
+
import { n as NativeSelect, t as Select } from "./select-eAHutw56.mjs";
|
|
108
108
|
import { Separator } from "./components/separator/index.mjs";
|
|
109
109
|
import { SignaturePad } from "./components/signature-pad/index.mjs";
|
|
110
110
|
import { Skeleton } from "./components/skeleton/index.mjs";
|
|
@@ -139,4 +139,4 @@ import { User } from "./components/user/index.mjs";
|
|
|
139
139
|
import { VirtualList } from "./components/virtual-list/index.mjs";
|
|
140
140
|
import { Watermark } from "./components/watermark/index.mjs";
|
|
141
141
|
export * from "@bysages/core";
|
|
142
|
-
export { Accordion, Action, Action as AiAction, Affix, Ai, AiActions, Attachment as AiAttachment, Attachment, Attachments as AiAttachments, Attachments, AiContent,
|
|
142
|
+
export { Accordion, Action, Action as AiAction, Affix, Ai, AiActions, Attachment as AiAttachment, Attachment, Attachments as AiAttachments, Attachments, AiContent, 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, Calendar, Card, Carousel, CascadeSelect, Checkbox, CheckboxGroup, Chip, ClientOnly, Clipboard, Collapsible, ColorPicker, Combobox, Command, Comment, ConfigProvider, Container, DataTable, DataView, DateInput, DatePicker, DeferredContent, Descriptions, DescriptionsRoot, Dialog, Dock, DockItem, DockRoot, DownloadTrigger, Drawer, DynamicInput, Editable, Ellipsis, Empty, FLOAT_BUTTON_CONTEXT, Field, Fieldset, FileUpload, FlexRender, FloatButton, 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, createFileTreeCollection, createGridCollection, createToaster, createTreeCollection, useAsyncList, useConfig, useDownload, useField, useForm, useListCollection, useListSelection, useMentions, usePresence, usePresenceContext, useTour };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useConfig } from "./components/config-provider/index.mjs";
|
|
2
|
+
import { resolveComponentMessages } from "@bysages/core";
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
//#region src/internal/messages.ts
|
|
5
|
+
/** Complete wrapper-owned copy for the nearest ConfigProvider, resolved
|
|
6
|
+
* from its locale and partial message overrides. */
|
|
7
|
+
function useComponentMessages() {
|
|
8
|
+
const config = useConfig();
|
|
9
|
+
return useMemo(() => resolveComponentMessages(config.locale ?? "en", config.messages), [config.locale, config.messages]);
|
|
10
|
+
}
|
|
11
|
+
/** Fill a core message's `{name}`-shaped slots. */
|
|
12
|
+
function formatMessage(template, values) {
|
|
13
|
+
return template.replace(/\{(\w+)\}/g, (match, key) => key in values ? String(values[key]) : match);
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { useComponentMessages as n, formatMessage as t };
|
|
@@ -3,7 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useFieldContext } from "@ark-ui/react/field";
|
|
4
4
|
import { Select } from "@ark-ui/react/select";
|
|
5
5
|
//#region src/components/select/native.tsx
|
|
6
|
-
function NativeSelect({ value, options, size = "md", invalid = false, placeholder, disabled = false, onValueChange, ...rest }) {
|
|
6
|
+
function NativeSelect({ value, options, size = "md", invalid = false, placeholder, disabled = false, onValueChange, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, ...rest }) {
|
|
7
7
|
injectComponentStyle("select");
|
|
8
8
|
const field = useFieldContext();
|
|
9
9
|
const fieldProps = field?.getInputProps() ?? {};
|
|
@@ -19,6 +19,8 @@ function NativeSelect({ value, options, size = "md", invalid = false, placeholde
|
|
|
19
19
|
"data-placeholder-shown": empty ? "" : void 0,
|
|
20
20
|
children: [/* @__PURE__ */ jsxs("select", {
|
|
21
21
|
...fieldProps,
|
|
22
|
+
"aria-label": ariaLabel,
|
|
23
|
+
"aria-labelledby": ariaLabelledby,
|
|
22
24
|
value: value ?? "",
|
|
23
25
|
"data-scope": "select",
|
|
24
26
|
"data-part": "native",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bysages/react",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "By Sages Elements components for React — styled by the paper-and-ink design tokens",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accessible",
|
|
@@ -124,8 +124,8 @@
|
|
|
124
124
|
"@tanstack/react-virtual": "3.14.13",
|
|
125
125
|
"@zag-js/cascade-select": "1.44.0",
|
|
126
126
|
"@zag-js/react": "1.44.0",
|
|
127
|
-
"@bysages/core": "0.3.
|
|
128
|
-
"@bysages/icons": "0.3.
|
|
127
|
+
"@bysages/core": "0.3.1",
|
|
128
|
+
"@bysages/icons": "0.3.1"
|
|
129
129
|
},
|
|
130
130
|
"devDependencies": {
|
|
131
131
|
"@json-render/core": "0.21.0",
|