@astryx-vue/core 0.2.0 → 0.2.2
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/AppShell/index.js +1 -1
- package/dist/{AppShell-EiGyPFbA.js → AppShell-Cb41gIAj.js} +2 -2
- package/dist/Avatar/index.d.ts +1 -1
- package/dist/Avatar/index.js +1 -1
- package/dist/Avatar-jmHInHwj.js +244 -0
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/{AvatarGroup-CZcgAMjM.js → AvatarGroup-QyzSrpYA.js} +8 -7
- package/dist/Badge/index.d.ts +2 -1
- package/dist/Badge/index.js +1 -1
- package/dist/Badge-CjDQPF5g.js +30 -0
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Breadcrumbs/index.d.ts +2 -2
- package/dist/Breadcrumbs/index.js +1 -1
- package/dist/{Breadcrumbs-C3YZFQ9w.js → Breadcrumbs-CTQ7fjDn.js} +45 -11
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/Calendar/index.d.ts +2 -2
- package/dist/Calendar/index.js +1 -1
- package/dist/Calendar-BFaI5AMv.js +352 -0
- package/dist/Card/index.d.ts +1 -1
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-BTtHkKea.js → Carousel-X0cuQkvg.js} +2 -2
- package/dist/Chat/index.d.ts +2 -2
- package/dist/Chat/index.js +2 -2
- package/dist/Chat-M0tiGrNT.js +3148 -0
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/Citation/index.js +1 -1
- package/dist/{Citation-DijdbUUu.js → Citation-C1veUk5p.js} +2 -2
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/Code/index.js +1 -1
- package/dist/{CodeBlock-CxTb6j9_.js → CodeBlock-DesTJAkm.js} +1 -1
- package/dist/Collapsible/index.js +1 -1
- package/dist/{Collapsible-9MC08X39.js → Collapsible-BestK35V.js} +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-BD2iODF5.js → CommandPalette-BArt97V8.js} +1 -1
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-D9iXd5cH.js → ComplexSelector-CAoig1RK.js} +2 -2
- package/dist/ContextMenu/index.d.ts +2 -2
- package/dist/ContextMenu/index.js +1 -1
- package/dist/{ContextMenu-HS_WqYIg.js → ContextMenu-9Im6i43E.js} +101 -63
- package/dist/DateInput/index.d.ts +2 -2
- package/dist/DateInput/index.js +1 -1
- package/dist/DateInput-BLocxqC3.js +376 -0
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-1bhPGG2s.js → DateRangeInput-DwDy3eRo.js} +2 -2
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-SnPdgk6P.js → DateTimeInput-BYiaC9bn.js} +5 -3
- package/dist/DropdownMenu/index.d.ts +3 -2
- package/dist/DropdownMenu/index.js +3 -2
- package/dist/DropdownMenu-Ddfr-aEC.js +164 -0
- package/dist/{DropdownMenu-UJGych6v.js → DropdownMenu-Dh-WAHKb.js} +63 -16
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-BQiwE-GB.js → FileInput-DLO6V12n.js} +2 -2
- package/dist/Icon/index.d.ts +4 -3
- package/dist/Icon/index.js +3 -2
- package/dist/Icon/plugin.d.ts +45 -0
- package/dist/Icon/plugin.js +177 -0
- package/dist/Icon-CJKjdJy-.js +198 -0
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-CshKoB0r.js → Lightbox-CdFCS_EA.js} +2 -2
- package/dist/Link/index.d.ts +1 -1
- package/dist/Link/index.js +1 -1
- package/dist/Link-DqdQZ37C.js +141 -0
- package/dist/Markdown/index.js +1 -1
- package/dist/{Markdown-D-Ua055V.js → Markdown-BqKloI3w.js} +3 -3
- package/dist/MetadataList/index.js +1 -1
- package/dist/{MetadataList-sYph_d8Q.js → MetadataList-CvZkmisf.js} +1 -1
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-DD9D01aj.js → MobileNavToggle-Bwi0qXXM.js} +1 -1
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-BVrK5kkk.js → MoreMenu-BwJaJrkB.js} +2 -2
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-DiYov9sF.js → MultiSelector-C-ETfFy_.js} +2 -2
- package/dist/NumberInput/index.d.ts +2 -2
- package/dist/NumberInput/index.js +1 -1
- package/dist/NumberInput-DjetVB8O.js +210 -0
- package/dist/Outline/index.js +1 -1
- package/dist/{Outline-DQfEBxlc.js → Outline-Bz9c-u5y.js} +1 -1
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-BU5VCntl.js → OverflowList-ED-KN9Y5.js} +1 -1
- package/dist/Overlay/index.d.ts +1 -1
- package/dist/Pagination/index.d.ts +2 -2
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-HdhtykeF.js → Pagination-Cb66HMEf.js} +76 -22
- package/dist/PowerSearch/index.d.ts +2 -0
- package/dist/PowerSearch/index.js +2 -0
- package/dist/PowerSearch-CjU8y4mi.js +2386 -0
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-ChDp-7oe.js → ProgressBar-DO9Chic6.js} +31 -11
- package/dist/Radio/index.d.ts +1 -1
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/Resizable/index.d.ts +1 -1
- package/dist/Resizable/index.js +1 -1
- package/dist/{Resizable-BhSMfO5B.js → Resizable-D-TBCg0Y.js} +1 -1
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/Selector/index.d.ts +2 -2
- package/dist/Selector/index.js +1 -1
- package/dist/Selector-DE2IEFML.js +468 -0
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-B-Om6Bz3.js → SideNav-DonEfiAx.js} +17 -17
- package/dist/Stepper/index.js +1 -1
- package/dist/{Stepper-BZ_8SEZt.js → Stepper-D2ZIcUNx.js} +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/TabList/index.d.ts +1 -1
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-Cnc2Hs1H.js → TabList-D3F-stq-.js} +10 -3
- package/dist/Table/index.d.ts +3 -3
- package/dist/Table/index.js +2 -2
- package/dist/Table-CrP2Uffq.js +1982 -0
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-Cv9UVbzS.js → TextArea-CPwSytdO.js} +12 -6
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-Dc1UpykG.js → Thumbnail-BC5JGPGZ.js} +11 -11
- package/dist/{TimeField-C7t9Knq9.js → TimeField-DpHFrNv0.js} +2 -2
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-BXxCOY98.js → TimeInput-DJLV0_4z.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +2 -1
- package/dist/{Timestamp-DlZSmgCJ.js → Timestamp-GKNjjt5g.js} +4 -121
- package/dist/Toast/index.d.ts +2 -2
- package/dist/Toast/index.js +1 -1
- package/dist/{Toast-BKXPvEMp.js → Toast-C2ML-bmi.js} +37 -7
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/Token/index.js +1 -1
- package/dist/{Token-wt4e80IM.js → Token-Chu_eCVs.js} +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-nmTqdS9n.js → Tokenizer-DRDpvQ_l.js} +3 -3
- package/dist/Toolbar/index.d.ts +1 -1
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-notp-mJx.js → TopNav-CEyWddtA.js} +3 -3
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-s1xBQ0qq.js → TreeList-COS8US8e.js} +3 -3
- package/dist/Typeahead/index.js +1 -1
- package/dist/{Typeahead-VAuiCurV.js → Typeahead-P7cCqtaQ.js} +3 -3
- package/dist/{useTypeaheadMenu-Ba7XpcZl.js → TypeaheadMenu-CGvo0Tud.js} +107 -107
- package/dist/composables/index.d.ts +3 -3
- package/dist/{context-Dbo22sck.js → context-CiKncNSH.js} +184 -6
- package/dist/formatInstant-BDWUIxS7.js +119 -0
- package/dist/{index-SMh42NI8.d.ts → index-B1TG2GPS.d.ts} +2 -2
- package/dist/{index-DRmb-oUa.d.ts → index-B9WzWqzk.d.ts} +3 -29
- package/dist/{index-BuubzuE8.d.ts → index-BDZCJ9ri.d.ts} +2 -2
- package/dist/{index-z4p2k9VR.d.ts → index-Bgv4ZmBl.d.ts} +20 -2
- package/dist/{index-BoRIw-bP.d.ts → index-Bt7ewoz2.d.ts} +32 -2
- package/dist/{index-uQrLBZfF.d.ts → index-Bu3oXIIS.d.ts} +24 -0
- package/dist/index-CJlBAXwj.d.ts +100 -0
- package/dist/{index-DT9S92sh.d.ts → index-CNjbOgty.d.ts} +15 -0
- package/dist/{index-DXSs3rwa.d.ts → index-CngORuiq.d.ts} +137 -2
- package/dist/index-Cs5pcwY3.d.ts +416 -0
- package/dist/{index-NzLDrOkk.d.ts → index-D4I_obqR.d.ts} +14 -1
- package/dist/{index-BtPZKO20.d.ts → index-DGXviOlp.d.ts} +49 -7
- package/dist/{index-CTolyeii.d.ts → index-DN7MXPHM.d.ts} +15 -1
- package/dist/{index-C6iJwTL0.d.ts → index-DNRBbwp_.d.ts} +165 -55
- package/dist/{index-C59PdX9L.d.ts → index-DWH_HzXi.d.ts} +1 -1
- package/dist/{index-BfOtLyNH.d.ts → index-D_nYxnNv.d.ts} +1 -1
- package/dist/{index-Bn_odHQ9.d.ts → index-Dg3ZmwEg.d.ts} +12 -1
- package/dist/{index-BiMGXtD-.d.ts → index-DimuSES0.d.ts} +14 -1
- package/dist/{index-DEeJowZf.d.ts → index-cGagYM1g.d.ts} +15 -2
- package/dist/{index-Ck8qy6Rf.d.ts → index-c_TaW8mM.d.ts} +24 -2
- package/dist/index-kVhSuA9t.d.ts +902 -0
- package/dist/{index-1uRMrk63.d.ts → index-nCEmW6wa.d.ts} +1 -1
- package/dist/{index-DoFCm2Q2.d.ts → index-qiZtHnGK.d.ts} +26 -0
- package/dist/{index-Bainr_3n.d.ts → index-u5ozu0G7.d.ts} +2 -2
- package/dist/index.d.ts +79 -76
- package/dist/index.js +111 -100
- package/dist/locale/index.d.ts +1 -1
- package/dist/locale/index.js +1 -1
- package/dist/power-search-DrDfcoL1.d.ts +68 -0
- package/dist/registry-B1ObuP--.d.ts +45 -0
- package/dist/registry-C7OZb0PJ.js +135 -0
- package/dist/{types-JktRxujg.d.ts → types-Cp4liug-.d.ts} +66 -3
- package/dist/{index-B8MbfMwV.d.ts → types-DDAAT1Xd.d.ts} +36 -82
- package/dist/types-DIYwbkpe.d.ts +33 -0
- package/dist/{types-DZoEm_DG.d.ts → types-pnljWjEE.d.ts} +23 -6
- package/dist/{useResizable-CeESZS1v.d.ts → useResizable-CUoNPmUw.d.ts} +1 -1
- package/package.json +10 -1
- package/styles/avatar.css +14 -0
- package/styles/badge.css +8 -0
- package/styles/breadcrumbs.css +6 -1
- package/styles/button.css +13 -0
- package/styles/calendar.css +16 -0
- package/styles/card.css +2 -0
- package/styles/chat.css +474 -3
- package/styles/dropdown-menu.css +11 -0
- package/styles/icon.css +58 -8
- package/styles/link.css +5 -0
- package/styles/number-input.css +22 -0
- package/styles/pagination.css +45 -1
- package/styles/power-search.css +303 -0
- package/styles/progress-bar.css +4 -0
- package/styles/selector.css +58 -0
- package/styles/tab-list.css +15 -0
- package/styles/table.css +304 -1
- package/styles/text-area.css +17 -0
- package/styles/text-input.css +5 -0
- package/styles/toast.css +7 -0
- package/styles/toolbar.css +11 -0
- package/styles.css +1 -0
- package/dist/Avatar-5s3HSrtN.js +0 -136
- package/dist/Badge-Ba0EwsTj.js +0 -19
- package/dist/Calendar-BG7wEsro.js +0 -277
- package/dist/Chat-DjNxw5gv.js +0 -1051
- package/dist/DateInput-DE2TN1Rq.js +0 -250
- package/dist/Icon-Dfr4k6-S.js +0 -86
- package/dist/Link-CprjOuTI.js +0 -92
- package/dist/NumberInput-CTYiQxHq.js +0 -147
- package/dist/Selector-Da-2BO3q.js +0 -325
- package/dist/Table-D-LhAy_J.js +0 -967
- package/dist/index-DJo-BmXZ.d.ts +0 -431
- package/dist/index-DtjAdYEc.d.ts +0 -68
- package/dist/{CheckboxList-EsIEXjK_.js → CheckboxList-BbCPiend.js} +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VNode, VNodeChild } from "vue";
|
|
1
|
+
import { CSSProperties, VNode, VNodeChild } from "vue";
|
|
2
2
|
//#region src/Table/types.d.ts
|
|
3
3
|
type TableDensity = 'compact' | 'balanced' | 'spacious';
|
|
4
4
|
type TableDividers = 'rows' | 'columns' | 'grid' | 'none';
|
|
@@ -33,6 +33,10 @@ interface TableColumn<T extends Record<string, unknown> = Record<string, unknown
|
|
|
33
33
|
};
|
|
34
34
|
/** Field key used by the filtering plugin. */
|
|
35
35
|
filter?: string;
|
|
36
|
+
/** 表头只留给读屏,视觉上留空。 */
|
|
37
|
+
headerHidden?: boolean;
|
|
38
|
+
/** 为 false 时,列宽拖动不给这一列画把手。 */
|
|
39
|
+
resizable?: boolean;
|
|
36
40
|
renderCell?: (item: T, index: number) => VNodeChild;
|
|
37
41
|
}
|
|
38
42
|
interface TableFilterField {
|
|
@@ -68,6 +72,47 @@ interface TableSelectionContribution<T> {
|
|
|
68
72
|
rowLabel?: (row: T) => string;
|
|
69
73
|
hasRowHighlight?: boolean;
|
|
70
74
|
}
|
|
75
|
+
interface TableRowMenuItem {
|
|
76
|
+
id: string;
|
|
77
|
+
label: string;
|
|
78
|
+
icon?: string;
|
|
79
|
+
onSelect: () => void;
|
|
80
|
+
}
|
|
81
|
+
interface TableGroupPatch {
|
|
82
|
+
groupKey: string;
|
|
83
|
+
count: number;
|
|
84
|
+
collapsed: boolean;
|
|
85
|
+
onToggle: () => void;
|
|
86
|
+
render?: () => VNodeChild;
|
|
87
|
+
}
|
|
88
|
+
interface TablePanelPatch {
|
|
89
|
+
variant: 'muted' | 'transparent';
|
|
90
|
+
render: () => VNodeChild;
|
|
91
|
+
}
|
|
92
|
+
interface TableRowPatch {
|
|
93
|
+
attrs?: Record<string, string | undefined>;
|
|
94
|
+
class?: string;
|
|
95
|
+
onClick?: (event: MouseEvent) => void;
|
|
96
|
+
suppressSelection?: boolean;
|
|
97
|
+
skipRowIndex?: boolean;
|
|
98
|
+
group?: TableGroupPatch;
|
|
99
|
+
panel?: TablePanelPatch;
|
|
100
|
+
menu?: readonly TableRowMenuItem[];
|
|
101
|
+
}
|
|
102
|
+
interface TableCellPatch {
|
|
103
|
+
class?: string;
|
|
104
|
+
style?: CSSProperties;
|
|
105
|
+
attrs?: Record<string, string | undefined>;
|
|
106
|
+
}
|
|
107
|
+
interface TableCellPatchInput<T extends Record<string, unknown>> {
|
|
108
|
+
column: TableColumn<T>;
|
|
109
|
+
columns: readonly TableColumn<T>[];
|
|
110
|
+
row: T | null;
|
|
111
|
+
kind: 'header' | 'body';
|
|
112
|
+
}
|
|
113
|
+
interface TableHeaderPatch {
|
|
114
|
+
before?: () => VNodeChild;
|
|
115
|
+
}
|
|
71
116
|
interface TablePlugin<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
72
117
|
transformColumns?: (columns: TableColumn<T>[]) => TableColumn<T>[];
|
|
73
118
|
sortFor?: (column: TableColumn<T>) => TableSortContribution | null;
|
|
@@ -76,11 +121,29 @@ interface TablePlugin<T extends Record<string, unknown> = Record<string, unknown
|
|
|
76
121
|
widthFor?: (column: TableColumn<T>) => number | undefined;
|
|
77
122
|
onColumnResizeEnd?: (key: string, width: number) => void;
|
|
78
123
|
below?: () => VNodeChild;
|
|
124
|
+
/** 改一行的属性、点击、分组头或展开面板。多个插件的结果会合并。 */
|
|
125
|
+
rowPatch?: (row: T, index: number, columnCount: number) => TableRowPatch | null;
|
|
126
|
+
/** 改表头或单元格的定位与类名。选择列的 key 是 `__select`。 */
|
|
127
|
+
cellPatch?: (input: TableCellPatchInput<T>) => TableCellPatch | null;
|
|
128
|
+
/** 在列表头文字前面加控件,例如树的全部展开。 */
|
|
129
|
+
headerPatch?: (column: TableColumn<T>) => TableHeaderPatch | null;
|
|
130
|
+
/** 表格滚动容器挂上或卸下时调用,用来画固定列的滚动阴影。 */
|
|
131
|
+
bindScrollRoot?: (element: HTMLElement | null) => void;
|
|
79
132
|
}
|
|
80
133
|
interface TableProps<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
81
134
|
data?: readonly T[];
|
|
82
135
|
columns?: readonly TableColumn<T>[];
|
|
83
|
-
idKey?: string;
|
|
136
|
+
idKey?: string | ((item: T) => string);
|
|
137
|
+
/**
|
|
138
|
+
* 窗口里第一行数据的行号,从 1 计。
|
|
139
|
+
* 和 `rowCount` 任一设置后,数据行带 `aria-rowindex`。分组头和展开面板不计。
|
|
140
|
+
*/
|
|
141
|
+
rowIndexStart?: number;
|
|
142
|
+
/**
|
|
143
|
+
* 完整结果集的行数,含当前窗口以外的行。
|
|
144
|
+
* 设置后表格带 `aria-rowcount`。只设置了 `rowIndexStart` 时,行数为未知(-1)。
|
|
145
|
+
*/
|
|
146
|
+
rowCount?: number;
|
|
84
147
|
density?: TableDensity;
|
|
85
148
|
dividers?: TableDividers;
|
|
86
149
|
isStriped?: boolean;
|
|
@@ -104,4 +167,4 @@ interface TableCellProps {
|
|
|
104
167
|
headers?: string;
|
|
105
168
|
}
|
|
106
169
|
//#endregion
|
|
107
|
-
export { TableSortEntry as _,
|
|
170
|
+
export { TableSortEntry as C, TableVerticalAlign as E, TableSortDirection as S, TableTextOverflow as T, TableProps as _, TableCellProps as a, TableRowProps as b, TableDensity as c, TableFilterState as d, TableFilterValue as f, TablePlugin as g, TablePanelPatch as h, TableCellPatch as i, TableDividers as l, TableHeaderPatch as m, PixelWidth as n, TableColumn as o, TableGroupPatch as p, ProportionalWidth as r, TableColumnAlign as s, ColumnWidth as t, TableFilterField as u, TableRowMenuItem as v, TableSortState as w, TableSlots as x, TableRowPatch as y };
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { a as ButtonProps } from "./types-WlmsNL1I.js";
|
|
2
|
-
import { c as ItemTarget } from "./types-CAZY4Xua.js";
|
|
3
2
|
import { n as LayerPlacement, t as LayerAlignment } from "./position-DFW5ymAF.js";
|
|
4
|
-
import {
|
|
3
|
+
import { c as ItemTarget } from "./types-CAZY4Xua.js";
|
|
4
|
+
import { Component, VNodeChild } from "vue";
|
|
5
5
|
//#region src/DropdownMenu/types.d.ts
|
|
6
6
|
/** Size of the menu, derived from the trigger button's size. */
|
|
7
7
|
type DropdownMenuSize = 'sm' | 'md' | 'lg';
|
|
8
|
+
/**
|
|
9
|
+
* Where the menu opens.
|
|
10
|
+
*
|
|
11
|
+
* `popover` hangs off the trigger. `bottom-sheet` rises from the bottom edge.
|
|
12
|
+
* `adaptive` uses the sheet only on a compact touch surface.
|
|
13
|
+
*/
|
|
14
|
+
type DropdownMenuPresentation = 'adaptive' | 'bottom-sheet' | 'popover';
|
|
8
15
|
/** Visual variant of one menu row. */
|
|
9
16
|
type DropdownMenuItemVariant = 'default' | 'destructive';
|
|
10
17
|
/**
|
|
@@ -132,6 +139,13 @@ interface DropdownMenuProps {
|
|
|
132
139
|
* @default 'below'
|
|
133
140
|
*/
|
|
134
141
|
placement?: LayerPlacement;
|
|
142
|
+
/**
|
|
143
|
+
* `popover` anchors to the trigger. `bottom-sheet` uses a bottom sheet.
|
|
144
|
+
* `adaptive` chooses the sheet on a compact touch surface and a popover
|
|
145
|
+
* otherwise.
|
|
146
|
+
* @default 'popover'
|
|
147
|
+
*/
|
|
148
|
+
presentation?: DropdownMenuPresentation;
|
|
135
149
|
/**
|
|
136
150
|
* How the menu aligns with the trigger along the placement axis.
|
|
137
151
|
* @default 'start'
|
|
@@ -247,85 +261,25 @@ interface DropdownMenuGroupSlots {
|
|
|
247
261
|
/** Rich content replacing the `title` prop, still used as the group's name. */
|
|
248
262
|
title?: () => VNodeChild;
|
|
249
263
|
}
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
+
interface DropdownMenuSubMenuProps {
|
|
265
|
+
/** Row label. */
|
|
266
|
+
label?: string | number;
|
|
267
|
+
/** Icon before the label. A CSS class or a component. */
|
|
268
|
+
icon?: string | Component;
|
|
269
|
+
/** Secondary line under the label. */
|
|
270
|
+
description?: string | number;
|
|
271
|
+
/**
|
|
272
|
+
* Whether the row can open its flyout.
|
|
273
|
+
* @default false
|
|
274
|
+
*/
|
|
275
|
+
isDisabled?: boolean;
|
|
276
|
+
}
|
|
277
|
+
interface DropdownMenuSubMenuSlots {
|
|
278
|
+
/** The rows of the nested menu. */
|
|
279
|
+
default?: () => VNodeChild;
|
|
280
|
+
icon?: () => VNodeChild;
|
|
281
|
+
label?: () => VNodeChild;
|
|
282
|
+
description?: () => VNodeChild;
|
|
264
283
|
}
|
|
265
|
-
/** The surrounding menu, or `undefined` when a row stands alone. */
|
|
266
|
-
declare function useDropdownMenuContext(): DropdownMenuContextValue | undefined;
|
|
267
|
-
//#endregion
|
|
268
|
-
//#region src/DropdownMenu/DropdownMenu.vue.d.ts
|
|
269
|
-
type __VLS_Props = DropdownMenuProps;
|
|
270
|
-
type __VLS_Slots$2 = DropdownMenuSlots;
|
|
271
|
-
type __VLS_ModelProps = {
|
|
272
|
-
'isMenuOpen'?: boolean | undefined;
|
|
273
|
-
};
|
|
274
|
-
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
275
|
-
declare const __VLS_base$2: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
276
|
-
click: () => any;
|
|
277
|
-
openChange: (isOpen: boolean) => any;
|
|
278
|
-
"update:isMenuOpen": (...args: unknown[]) => any;
|
|
279
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
280
|
-
onClick?: (() => any) | undefined;
|
|
281
|
-
onOpenChange?: ((isOpen: boolean) => any) | undefined;
|
|
282
|
-
"onUpdate:isMenuOpen"?: ((...args: unknown[]) => any) | undefined;
|
|
283
|
-
}>, {
|
|
284
|
-
button: DropdownMenuButtonProps;
|
|
285
|
-
placement: LayerPlacement;
|
|
286
|
-
alignment: LayerAlignment;
|
|
287
|
-
hasChevron: boolean;
|
|
288
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
289
|
-
declare const __VLS_export$3: __VLS_WithSlots$2<typeof __VLS_base$2, __VLS_Slots$2>;
|
|
290
|
-
declare const _default$3: typeof __VLS_export$3;
|
|
291
|
-
type __VLS_WithSlots$2<T, S> = T & {
|
|
292
|
-
new (): {
|
|
293
|
-
$slots: S;
|
|
294
|
-
};
|
|
295
|
-
};
|
|
296
|
-
//#endregion
|
|
297
|
-
//#region src/DropdownMenu/DropdownMenuDivider.vue.d.ts
|
|
298
|
-
declare const __VLS_export$2: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
299
|
-
declare const _default$2: typeof __VLS_export$2;
|
|
300
|
-
//#endregion
|
|
301
|
-
//#region src/DropdownMenu/DropdownMenuGroup.vue.d.ts
|
|
302
|
-
type __VLS_Slots$1 = DropdownMenuGroupSlots;
|
|
303
|
-
declare const __VLS_base$1: import("vue").DefineComponent<DropdownMenuGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DropdownMenuGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
304
|
-
declare const __VLS_export$1: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
|
|
305
|
-
declare const _default$1: typeof __VLS_export$1;
|
|
306
|
-
type __VLS_WithSlots$1<T, S> = T & {
|
|
307
|
-
new (): {
|
|
308
|
-
$slots: S;
|
|
309
|
-
};
|
|
310
|
-
};
|
|
311
|
-
//#endregion
|
|
312
|
-
//#region src/DropdownMenu/DropdownMenuItem.vue.d.ts
|
|
313
|
-
type __VLS_Slots = DropdownMenuItemSlots;
|
|
314
|
-
declare const __VLS_base: import("vue").DefineComponent<DropdownMenuItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
315
|
-
click: (event: MouseEvent) => any;
|
|
316
|
-
}, string, import("vue").PublicProps, Readonly<DropdownMenuItemProps> & Readonly<{
|
|
317
|
-
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
318
|
-
}>, {
|
|
319
|
-
isDisabled: boolean;
|
|
320
|
-
variant: DropdownMenuItemVariant;
|
|
321
|
-
hasCloseOnSelect: boolean;
|
|
322
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
323
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
324
|
-
declare const _default: typeof __VLS_export;
|
|
325
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
326
|
-
new (): {
|
|
327
|
-
$slots: S;
|
|
328
|
-
};
|
|
329
|
-
};
|
|
330
284
|
//#endregion
|
|
331
|
-
export {
|
|
285
|
+
export { DropdownMenuSubMenuProps as _, DropdownMenuGroupSlots as a, DropdownMenuItemProps as c, DropdownMenuOption as d, DropdownMenuPresentation as f, DropdownMenuSlots as g, DropdownMenuSize as h, DropdownMenuGroupProps as i, DropdownMenuItemSlots as l, DropdownMenuSection as m, DropdownMenuDividerData as n, DropdownMenuItemData as o, DropdownMenuProps as p, DropdownMenuEmits as r, DropdownMenuItemEmits as s, DropdownMenuButtonProps as t, DropdownMenuItemVariant as u, DropdownMenuSubMenuSlots as v, DropdownMenuTriggerProps as y };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//#region src/Badge/types.d.ts
|
|
2
|
+
interface BadgeVariantMap {
|
|
3
|
+
blue: true;
|
|
4
|
+
cyan: true;
|
|
5
|
+
error: true;
|
|
6
|
+
green: true;
|
|
7
|
+
info: true;
|
|
8
|
+
neutral: true;
|
|
9
|
+
orange: true;
|
|
10
|
+
pink: true;
|
|
11
|
+
purple: true;
|
|
12
|
+
red: true;
|
|
13
|
+
success: true;
|
|
14
|
+
teal: true;
|
|
15
|
+
warning: true;
|
|
16
|
+
yellow: true;
|
|
17
|
+
}
|
|
18
|
+
type BadgeVariant = Extract<keyof BadgeVariantMap, string>;
|
|
19
|
+
interface BadgeProps {
|
|
20
|
+
/**
|
|
21
|
+
* The visual style of the badge.
|
|
22
|
+
*
|
|
23
|
+
* @default 'neutral'
|
|
24
|
+
*/
|
|
25
|
+
variant?: BadgeVariant;
|
|
26
|
+
/**
|
|
27
|
+
* Badge text. A string or number is also set as the title so a clipped
|
|
28
|
+
* label stays reachable. The default slot overrides this when both are set.
|
|
29
|
+
*/
|
|
30
|
+
label?: string | number;
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { BadgeVariant as n, BadgeVariantMap as r, BadgeProps as t };
|
|
@@ -35,7 +35,7 @@ type IconColor = Extract<keyof IconColorMap, string>;
|
|
|
35
35
|
* names: the artwork is a library implementation detail, and a `icon` prop or
|
|
36
36
|
* slot takes a CSS icon class or the application's own component instead.
|
|
37
37
|
*/
|
|
38
|
-
type IconName = 'chevronDown' | 'chevronLeft' | 'chevronRight' | 'check' | 'moreHorizontal' | 'copy' | 'calendar' | 'clock' | 'upload' | 'arrowUp' | 'arrowDown' | 'close' | 'funnel' | 'image';
|
|
38
|
+
type IconName = 'chevronDown' | 'chevronLeft' | 'chevronRight' | 'check' | 'moreHorizontal' | 'copy' | 'calendar' | 'clock' | 'upload' | 'arrowUp' | 'arrowDown' | 'close' | 'funnel' | 'image' | 'search' | 'stop' | 'microphone' | 'warning' | 'error';
|
|
39
39
|
/**
|
|
40
40
|
* A built-in name, or any other string.
|
|
41
41
|
*
|
|
@@ -44,15 +44,32 @@ type IconName = 'chevronDown' | 'chevronLeft' | 'chevronRight' | 'check' | 'more
|
|
|
44
44
|
*/
|
|
45
45
|
type ExtendedIconName = IconName | (string & {});
|
|
46
46
|
interface IconProps {
|
|
47
|
+
/**
|
|
48
|
+
* Iconify icon to draw, as `collection:icon`.
|
|
49
|
+
*
|
|
50
|
+
* `carbon:settings` reads the `settings` icon from the Carbon collection.
|
|
51
|
+
* `carbon-settings` is the same icon when that collection is registered.
|
|
52
|
+
* The component does not ship the artwork: install `@iconify-json/carbon`
|
|
53
|
+
* (or another collection) and register it with the `astryxIcons` Vite
|
|
54
|
+
* plugin, or call `addIcon` / `addCollection`.
|
|
55
|
+
*
|
|
56
|
+
* With no `size`, the icon is `1em` square and uses `currentColor`, so it
|
|
57
|
+
* follows the surrounding text and the sized slots on Button, IconButton,
|
|
58
|
+
* and fields.
|
|
59
|
+
*/
|
|
60
|
+
name?: string;
|
|
47
61
|
/**
|
|
48
62
|
* The icon to render. Three forms are accepted:
|
|
49
63
|
*
|
|
50
64
|
* - a string, treated as a CSS icon class you provide — for example an
|
|
51
|
-
* UnoCSS icon such as `'i-carbon-search'`, or your own class
|
|
65
|
+
* UnoCSS icon such as `'i-carbon-search'`, or your own class. The class
|
|
66
|
+
* paints the inside of the sized box, so a utility that sets
|
|
67
|
+
* `width`/`height: 100%` fills the icon instead of replacing its size;
|
|
52
68
|
* - a name from the library's own chrome, which only the components use;
|
|
53
69
|
* - a component, rendered as it is.
|
|
54
70
|
*
|
|
55
|
-
* Omit it when the default slot provides the artwork instead.
|
|
71
|
+
* Omit it when `name` or the default slot provides the artwork instead.
|
|
72
|
+
* `name` wins when both are set.
|
|
56
73
|
*/
|
|
57
74
|
icon?: ExtendedIconName | Component;
|
|
58
75
|
/**
|
|
@@ -68,9 +85,9 @@ interface IconProps {
|
|
|
68
85
|
/**
|
|
69
86
|
* The size of the icon.
|
|
70
87
|
*
|
|
71
|
-
* An explicit value wins. When omitted,
|
|
72
|
-
*
|
|
73
|
-
* back to `md`.
|
|
88
|
+
* An explicit value wins. When omitted, a `name` icon stays `1em` so it
|
|
89
|
+
* scales with the text around it. Any other icon uses the nearest default
|
|
90
|
+
* supplied by an owning astryx-vue component, then falls back to `md`.
|
|
74
91
|
*/
|
|
75
92
|
size?: IconSize;
|
|
76
93
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryx-vue/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.2",
|
|
5
5
|
"description": "Vue components for the unofficial astryx-vue community project.",
|
|
6
6
|
"author": "ShenQingchuan",
|
|
7
7
|
"license": "MIT",
|
|
@@ -88,6 +88,10 @@
|
|
|
88
88
|
"types": "./dist/Icon/index.d.ts",
|
|
89
89
|
"import": "./dist/Icon/index.js"
|
|
90
90
|
},
|
|
91
|
+
"./icons": {
|
|
92
|
+
"types": "./dist/Icon/plugin.d.ts",
|
|
93
|
+
"import": "./dist/Icon/plugin.js"
|
|
94
|
+
},
|
|
91
95
|
"./Layout": {
|
|
92
96
|
"types": "./dist/Layout/index.d.ts",
|
|
93
97
|
"import": "./dist/Layout/index.js"
|
|
@@ -104,6 +108,10 @@
|
|
|
104
108
|
"types": "./dist/Outline/index.d.ts",
|
|
105
109
|
"import": "./dist/Outline/index.js"
|
|
106
110
|
},
|
|
111
|
+
"./PowerSearch": {
|
|
112
|
+
"types": "./dist/PowerSearch/index.d.ts",
|
|
113
|
+
"import": "./dist/PowerSearch/index.js"
|
|
114
|
+
},
|
|
107
115
|
"./RadioList": {
|
|
108
116
|
"types": "./dist/RadioList/index.d.ts",
|
|
109
117
|
"import": "./dist/RadioList/index.js"
|
|
@@ -461,6 +469,7 @@
|
|
|
461
469
|
"micromark-extension-gfm": "3.0.0"
|
|
462
470
|
},
|
|
463
471
|
"devDependencies": {
|
|
472
|
+
"@types/node": "26.6.4",
|
|
464
473
|
"@vue/compiler-sfc": "3.5.43",
|
|
465
474
|
"tsdown": "0.23.0",
|
|
466
475
|
"typescript": "npm:@typescript/typescript6@6.0.2",
|
package/styles/avatar.css
CHANGED
|
@@ -9,6 +9,20 @@
|
|
|
9
9
|
vertical-align: middle;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
.astryx-avatar--interactive {
|
|
13
|
+
padding: 0;
|
|
14
|
+
border: 0;
|
|
15
|
+
background: transparent;
|
|
16
|
+
color: inherit;
|
|
17
|
+
font: inherit;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.astryx-avatar--interactive:focus-visible {
|
|
22
|
+
outline: 2px solid var(--astryx-color-border-focus, #0074e2);
|
|
23
|
+
outline-offset: 2px;
|
|
24
|
+
}
|
|
25
|
+
|
|
12
26
|
.astryx-avatar--circle {
|
|
13
27
|
border-radius: var(--astryx-radius-full, 9999px);
|
|
14
28
|
}
|
package/styles/badge.css
CHANGED
|
@@ -17,6 +17,14 @@
|
|
|
17
17
|
line-height: var(--astryx-text-supporting-leading, 1.6667);
|
|
18
18
|
vertical-align: middle;
|
|
19
19
|
white-space: nowrap;
|
|
20
|
+
max-width: 100%;
|
|
21
|
+
min-width: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.astryx-badge__label {
|
|
25
|
+
min-width: 0;
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
text-overflow: ellipsis;
|
|
20
28
|
}
|
|
21
29
|
|
|
22
30
|
.astryx-badge[data-variant='neutral'] {
|
package/styles/breadcrumbs.css
CHANGED
|
@@ -68,9 +68,14 @@
|
|
|
68
68
|
text-decoration: none;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
.astryx-breadcrumb-item__icon
|
|
71
|
+
.astryx-breadcrumb-item__icon,
|
|
72
|
+
.astryx-breadcrumb-item__chevron {
|
|
72
73
|
display: inline-flex;
|
|
73
74
|
align-items: center;
|
|
74
75
|
flex-shrink: 0;
|
|
75
76
|
}
|
|
77
|
+
|
|
78
|
+
.astryx-breadcrumb-item__chevron {
|
|
79
|
+
margin-inline-start: var(--astryx-spacing-0-5, 2px);
|
|
80
|
+
}
|
|
76
81
|
}
|
package/styles/button.css
CHANGED
|
@@ -181,6 +181,19 @@
|
|
|
181
181
|
font-size: 20px;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
+
/* The end slot has no fixed box of its own. A named icon still matches the leading slot. */
|
|
185
|
+
.astryx-button__end > .astryx-icon {
|
|
186
|
+
width: 16px;
|
|
187
|
+
height: 16px;
|
|
188
|
+
font-size: 16px;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.astryx-button[data-size='lg'] .astryx-button__end > .astryx-icon {
|
|
192
|
+
width: 20px;
|
|
193
|
+
height: 20px;
|
|
194
|
+
font-size: 20px;
|
|
195
|
+
}
|
|
196
|
+
|
|
184
197
|
.astryx-button__icon > *,
|
|
185
198
|
.astryx-button__end > * {
|
|
186
199
|
display: block;
|
package/styles/calendar.css
CHANGED
|
@@ -114,6 +114,22 @@
|
|
|
114
114
|
box-shadow: inset 0 0 0 1px var(--astryx-color-border-emphasized, #d4d4d4);
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
+
.astryx-calendar[data-months='2'] {
|
|
118
|
+
display: flex;
|
|
119
|
+
gap: var(--astryx-spacing-4, 16px);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.astryx-calendar[data-months='2'] .astryx-calendar-header {
|
|
123
|
+
display: flex;
|
|
124
|
+
align-items: center;
|
|
125
|
+
justify-content: space-between;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.astryx-calendar-cell.is-in-range {
|
|
129
|
+
background: color-mix(in srgb, light-dark(#1b1b1b, #f1f1f1) 12%, transparent);
|
|
130
|
+
border-radius: 0;
|
|
131
|
+
}
|
|
132
|
+
|
|
117
133
|
.astryx-calendar-cell.is-selected {
|
|
118
134
|
background: light-dark(#1b1b1b, #f1f1f1);
|
|
119
135
|
color: light-dark(#ffffff, #111111);
|
package/styles/card.css
CHANGED
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
--layout-padding-own-outer-y: initial;
|
|
34
34
|
--layout-padding-outer-x: var(--_card-padding-inline-start);
|
|
35
35
|
--layout-padding-outer-y: var(--_card-padding-block-start);
|
|
36
|
+
--layout-padding-inner-x: var(--_card-padding-inline-start);
|
|
37
|
+
--layout-padding-inner-y: var(--_card-padding-block-start);
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
.astryx-card[data-scrollable='true'] {
|