@astryx-vue/core 0.48.2 → 0.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AlertDialog/index.js +1 -1
- package/dist/{AlertDialog-CZv_5cjZ.js → AlertDialog-DNgVPORz.js} +2 -2
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +1 -1
- package/dist/{Banner-rKRkWR6U.js → Banner-Bf02r-yq.js} +1 -1
- package/dist/Breadcrumbs/index.d.ts +2 -2
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/{Breadcrumbs-B1LVoSmF.js → Breadcrumbs-BO92n_gZ.js} +1 -1
- package/dist/Button/index.d.ts +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/{Button-ByMwpaTC.js → Button-DwmMamqP.js} +1 -1
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/ButtonGroup/index.js +1 -1
- package/dist/{ButtonGroup-DlzYnaXk.js → ButtonGroup-BXakzcni.js} +2 -2
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Calendar/index.js +2 -2
- package/dist/{Calendar-DvbTMsIC.js → Calendar-Bu5tNFCy.js} +2 -2
- package/dist/{Calendar-Nh8eFh1z.js → Calendar-Cr3q-XUb.js} +1 -1
- package/dist/Carousel/index.d.ts +1 -1
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-PAvDguJz.js → Carousel-ChQ4iAbd.js} +1 -1
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-CYljOQ16.js → Chat-BQ3X4O_m.js} +1 -1
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-B7LhVr3T.js → CheckboxInput-BV24VjGX.js} +2 -2
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxListItem-DV3Uh8dj.js → CheckboxListItem-CkRd0wCc.js} +4 -4
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/Code/index.js +2 -2
- package/dist/{Code-Aw-ZvPzl.js → Code-BF64T695.js} +1 -1
- package/dist/{CodeBlock-BZUBgEQK.js → CodeBlock-BBDJUZfC.js} +6 -6
- package/dist/Collapsible/index.d.ts +1 -1
- package/dist/CommandPalette/index.d.ts +1 -1
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-BewrtpKV.js → ComplexSelector-CEhKT_Ch.js} +2 -2
- package/dist/ContextMenu/index.d.ts +2 -2
- package/dist/ContextMenu/index.js +2 -2
- package/dist/{ContextMenu--QuYdWDQ.js → ContextMenu-Q9eY1PTu.js} +1 -1
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-D4o83xnR.js → DateInput-B6QlWwYX.js} +36 -13
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-A-Hrvnmo.js → DateRangeInput-CekZEo9D.js} +116 -184
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-DWX1Z3S_.js → DateTimeInput-BQJbBokF.js} +5 -5
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Dialog/index.js +1 -1
- package/dist/{DialogHeader-CT4gkqfm.js → DialogHeader-CFOZWZCo.js} +1 -1
- package/dist/Drawer/index.d.ts +1 -1
- package/dist/Drawer/index.js +1 -1
- package/dist/{Drawer-BkU8kiAU.js → Drawer-C7TKWFC2.js} +1 -1
- package/dist/DropdownMenu/index.d.ts +2 -2
- package/dist/DropdownMenu/index.js +2 -2
- package/dist/{DropdownMenu-NqkHivVB.js → DropdownMenu-B-RXka4k.js} +3 -3
- package/dist/{DropdownMenuRadioItem.vue-Ck5Goxxp.d.ts → DropdownMenuRadioItem.vue-Dnvhnk6I.d.ts} +1 -1
- package/dist/Field/index.js +3 -3
- package/dist/{Field-2ypSh8vl.js → Field-BBUdFefr.js} +1 -1
- package/dist/{FieldInfoTip-Dss2g3m-.js → FieldInfoTip-B5pHDMoB.js} +1 -1
- package/dist/{FieldLabel-D0gHrlZZ.js → FieldLabel-Bmf3rMAj.js} +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-B00g3NMy.js → FileInput-CTbpyb7U.js} +3 -3
- package/dist/Heading/index.d.ts +1 -1
- package/dist/HoverCard/index.d.ts +1 -1
- package/dist/Icon/index.d.ts +2 -2
- package/dist/IconButton/index.js +1 -1
- package/dist/{IconButton-BilMzjDj.js → IconButton-BECXhNpc.js} +1 -1
- package/dist/Indicator/index.d.ts +2 -2
- package/dist/InfoTip/index.d.ts +1 -1
- package/dist/InfoTip/index.js +1 -1
- package/dist/{InfoTip-YXziP1RR.js → InfoTip-CzqdqGQb.js} +1 -1
- package/dist/{InputClearButton-DEmIF1Dt.js → InputClearButton-DCmZXm1V.js} +1 -1
- package/dist/InputGroup/index.js +1 -1
- package/dist/{InputGroup-Eodo_3A2.js → InputGroup-BCFekxRW.js} +1 -1
- package/dist/InternationalizationProvider/index.d.ts +1 -1
- package/dist/InternationalizationProvider/index.js +1 -1
- package/dist/{InternationalizationProvider-B6kMYO4h.js → InternationalizationProvider-B9wQM8hN.js} +1 -1
- package/dist/{Item-o9ot81Zr.js → Item-Bu6zfWmO.js} +10 -5
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-Di1n_Ghn.js → Lightbox-BuN6O4LJ.js} +1 -1
- package/dist/Link/index.d.ts +1 -1
- package/dist/List/index.d.ts +3 -3
- package/dist/List/index.js +6 -5
- package/dist/{List-Da9fS7xP.js → List-j_6OjfPy.js} +4 -3
- package/dist/{ListItem-Cp65x47S.js → ListItem-BecR-pIf.js} +45 -16
- package/dist/Markdown/index.d.ts +1 -1
- package/dist/Markdown/index.js +1 -1
- package/dist/{Markdown-DvBtpprk.js → Markdown-DuhbgLxR.js} +1 -1
- package/dist/MetadataList/index.js +1 -1
- package/dist/{MetadataList-n3YXiP4a.js → MetadataList-BTMI6Ffm.js} +5 -1
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-CiYBQ9pt.js → MoreMenu-DR69661F.js} +2 -2
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-Cd0x_5Cz.js → MultiSelector-CJhk6rE5.js} +3 -3
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-BBEONs4g.js → NumberInput-u_srLjWB.js} +3 -3
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/Pagination/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-Cu9RHoEu.js → Pagination-oedlA7QU.js} +3 -3
- package/dist/Popover/index.d.ts +2 -2
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-CgyIJd4u.js → Popover-BPJ1JOpo.js} +1 -1
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-Cg0Fe7Ne.js → PowerSearch-6J57Tf11.js} +19 -19
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-WoFdfefT.js → RadioGroup-DX-CMn6z.js} +2 -2
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioListItem-CULhpyUB.js → RadioListItem-D3ZGR-2p.js} +1 -1
- package/dist/RangeCalendar-pTEnYJqX.js +160 -0
- package/dist/Resizable/index.d.ts +1 -1
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/SegmentedControl/index.d.ts +1 -1
- package/dist/SegmentedControl/index.js +1 -1
- package/dist/{SegmentedControl-BDD1z8ow.js → SegmentedControl-C1H0lJhN.js} +1 -1
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/{Selector-V9YZ6h09.js → Selector-B3kb-prB.js} +1 -1
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-BQbQ4vk6.js → SideNav-BFTTsfpL.js} +1 -1
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-IqPowFpR.js → Slider-DDyAlIYs.js} +1 -1
- package/dist/Stack/index.d.ts +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-C3Z-eqrJ.js → Switch-CCWpRU3s.js} +2 -2
- package/dist/TabList/index.d.ts +1 -1
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/{Table-D58FbmZl.js → Table-z2KzblHT.js} +27 -24
- package/dist/Text/index.d.ts +1 -1
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-vg40GTUn.js → TextArea-D0iKBXn5.js} +4 -4
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-BT5SNPml.js → TextInput-C7Hz5OMa.js} +4 -4
- package/dist/Theme/index.d.ts +3 -3
- package/dist/Theme/index.js +1 -1
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-DjTQfpBD.js → Thumbnail-B3BSsLvy.js} +1 -1
- package/dist/{TimeField-DzdNGtUE.js → TimeField-BKJLhDGx.js} +2 -2
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-CUM1fNsE.js → TimeInput-B05w9Zi7.js} +4 -3
- package/dist/Timer/index.d.ts +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +2 -2
- package/dist/{Timestamp-B0dj9IUl.js → Timestamp-CRuJNA1J.js} +36 -22
- package/dist/Toast/index.js +1 -1
- package/dist/{Toast-DDOAUhO2.js → Toast-3geCc5ms.js} +1 -1
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/ToggleButton/index.js +1 -1
- package/dist/{ToggleButton-BQrwvaI1.js → ToggleButton-BK5Fjp05.js} +3 -3
- package/dist/Token/index.d.ts +1 -1
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-CU2M1KhH.js → Tokenizer-DLPRqWnJ.js} +4 -4
- package/dist/Toolbar/index.d.ts +1 -1
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/Typeahead/index.js +1 -1
- package/dist/{Typeahead-_ijsXkA2.js → Typeahead-kiQZR_mY.js} +2 -2
- package/dist/{accessibleName-BSQ6PVw-.js → accessibleName-41pKwUlI.js} +1 -1
- package/dist/{adaptationTypes-ChvftfT2.d.ts → adaptationTypes-DtZ4sfHW.d.ts} +1 -1
- package/dist/{compactDefinition-BruPZusf.d.ts → compactDefinition-CJ7U-1ki.d.ts} +1 -1
- package/dist/composables/index.d.ts +3 -3
- package/dist/composables/index.js +5 -5
- package/dist/{composables-G10dqPNt.js → composables-Bx5tWrpo.js} +165 -71
- package/dist/{createReorderable-Bw3Q9mUd.d.ts → createReorderable-yDBsr_S2.d.ts} +26 -1
- package/dist/{date-range-input-WnkVv8HN.js → date-range-input-BjM7wgeD.js} +6 -2
- package/dist/{formatInstant-B-ukorXg.js → formatInstant-DmQhW6EL.js} +23 -8
- package/dist/{index-ZKBj_1nu.d.ts → index-3LdpzxQZ.d.ts} +2 -2
- package/dist/{index-BtS6x0HF.d.ts → index-B4vbiBIK.d.ts} +1 -1
- package/dist/{index-X4S7_dmq.d.ts → index-BA8exXNP.d.ts} +1 -1
- package/dist/{index-ehT_1wO5.d.ts → index-BAewXS3B.d.ts} +3 -3
- package/dist/{index-BgT6mH3U.d.ts → index-BR3MOBYd.d.ts} +2 -2
- package/dist/{index-DSsuY9v9.d.ts → index-BaXcJ7eE.d.ts} +1 -1
- package/dist/{index-waTkqxTz.d.ts → index-C89cIh4E.d.ts} +1 -1
- package/dist/{index-C3JmGujU.d.ts → index-C9uW39Mj.d.ts} +2 -2
- package/dist/{index-Dqo0KSCZ.d.ts → index-CX_DhZP6.d.ts} +73 -73
- package/dist/{index-CBOv5j3c.d.ts → index-CbA8rR_b.d.ts} +1 -1
- package/dist/{index-BaFphczL.d.ts → index-CdvmnNMH.d.ts} +1 -1
- package/dist/{index-DJ14EAf2.d.ts → index-CiQe0lC6.d.ts} +2 -2
- package/dist/{index-CD1-Hqm0.d.ts → index-CmqD5Ya9.d.ts} +2 -2
- package/dist/{index-rdwI-mcm.d.ts → index-CtYlR9Cu.d.ts} +1 -1
- package/dist/{index-B8NGDyIe.d.ts → index-DSAtZP4A.d.ts} +1 -1
- package/dist/{index-DsD5qKEe.d.ts → index-DVh2VnYE.d.ts} +3 -2
- package/dist/{index-BMoR8Uoh.d.ts → index-DZMs9KqG.d.ts} +1 -1
- package/dist/{index-Er_LwyZ7.d.ts → index-Dc0PpHtw.d.ts} +1 -1
- package/dist/{index-SdevVVTE.d.ts → index-DpyZvaKL.d.ts} +3 -3
- package/dist/{index-COazJoIt.d.ts → index-DzIm3T2F.d.ts} +5 -5
- package/dist/{index-CJB63c7Y.d.ts → index-HW957XKH.d.ts} +4 -4
- package/dist/{index-C5HUsKnf.d.ts → index-JCxvZLM1.d.ts} +2 -2
- package/dist/{index-D3UaSnbN.d.ts → index-Otl047R1.d.ts} +2 -2
- package/dist/{index-C8hyLvk2.d.ts → index-YpwwNU0k.d.ts} +2 -2
- package/dist/{index-aBeGbS1N.d.ts → index-fUpVnYYy.d.ts} +1 -1
- package/dist/{index-BzoS2kIC.d.ts → index-p-3TjnAx.d.ts} +1 -1
- package/dist/{index--pZVy2s-.d.ts → index-qWsSnTeH.d.ts} +5 -5
- package/dist/{index-anFpazJ1.d.ts → index-qfgwQY3C.d.ts} +52 -5
- package/dist/{index-Bsl8HqR9.d.ts → index-tNq2IJO8.d.ts} +1 -1
- package/dist/{index-rXRK6WSZ.d.ts → index-u0S11WWM.d.ts} +1 -1
- package/dist/{index-C2zmTbpC.d.ts → index-uUPApRZX.d.ts} +1 -1
- package/dist/index.d.ts +41 -41
- package/dist/index.js +72 -71
- package/dist/internal/touch.js +1 -1
- package/dist/{itemSlots-DtrAXXlG.js → itemSlots-BxdGvQQt.js} +3 -3
- package/dist/{loadCatalog-BLR2kAhy.d.ts → loadCatalog-BY88s6vB.d.ts} +4 -0
- package/dist/{loadCatalog-DT1OyK-2.js → loadCatalog-crHU34Cs.js} +9 -1
- package/dist/locale/index.d.ts +2 -2
- package/dist/locale/index.js +3 -3
- package/dist/{locale-DhcPo0et.js → locale-R4jJ5VWu.js} +1 -1
- package/dist/reorderMarks-AcPJbqH_.js +64 -0
- package/dist/{reorderTypes-CvmAkO-R.js → reorderTypes-P74-IlCD.js} +18 -5
- package/dist/{semantic-CPGOW6Vf.d.ts → semantic-DJT2VDXi.d.ts} +2 -0
- package/dist/{types-FT6yUPZi.d.ts → types-8RqDWwvd.d.ts} +1 -1
- package/dist/{types-xOsWAC6i.d.ts → types-FJdc8Z4x.d.ts} +13 -5
- package/dist/{useActionGroupTracking-fTU4uvzA.js → useActionGroupTracking-CQa3WqUI.js} +1 -1
- package/dist/{useCalendarGrid-Bz7NJmA3.js → useCalendarGrid-BGFIdfo7.js} +1 -1
- package/dist/{useDateRange-D1Szw54e.js → useDateRange-vYk0K9ML.js} +6 -2
- package/dist/{useInputStatusIcon-DFx25PSi.js → useInputStatusIcon-B4QDbnjc.js} +1 -1
- package/dist/{useMonthGrid-Bzvlstgc.js → useMonthGrid-xkn79x_J.js} +1 -1
- package/dist/{useTouchHitArea-Cs4K31MA.js → useTouchHitArea-oji1qpyF.js} +1 -1
- package/package.json +1 -1
- package/styles/date-input.css +40 -5
- package/styles/date-range-input.css +22 -0
- package/styles/list-reorder.css +180 -19
- package/styles/list.css +10 -3
- package/styles/tree-list.css +11 -0
- package/dist/{Theme-Cw4hiTNt.js → Theme-Dy7FHpog.js} +1 -1
- package/dist/{index-7tsRPFfY.d.ts → index-CNZCQgHF.d.ts} +1 -1
|
@@ -4,9 +4,10 @@ import { n as sharedKey } from "./sharedRealm-BYHklCVM.js";
|
|
|
4
4
|
* @file listRowMarks.ts
|
|
5
5
|
* @input List 的行元素
|
|
6
6
|
* @output 行身上的三个内部标记:行的 `itemKey`(`itemKeyAttrs`、`itemKeyOf`)、
|
|
7
|
-
* 放回页面播退场的行(`markLeaving`、`isLeaving`)、从反向移动的行上方滑过的行(`markTravelling
|
|
7
|
+
* 放回页面播退场的行(`markLeaving`、`isLeaving`)、从反向移动的行上方滑过的行(`markTravelling`,
|
|
8
|
+
* 以及它垫的背景 `setTravellingBackdrop`)
|
|
8
9
|
* @position List 内部:只有这个文件写这些属性名。ListItem 写行的键,listLayoutUpdates 读写其余两个,
|
|
9
|
-
* list.css 按 `data-astryx-travelling` 把行抬高。不从包入口导出。
|
|
10
|
+
* 重排会话给放下后滑行的行打滑过标记;list.css 按 `data-astryx-travelling` 把行抬高。不从包入口导出。
|
|
10
11
|
*/
|
|
11
12
|
const ITEM_KEY = "data-astryx-item-key";
|
|
12
13
|
const LEAVING = "data-astryx-leaving";
|
|
@@ -43,13 +44,25 @@ function markTravelling(row) {
|
|
|
43
44
|
}
|
|
44
45
|
};
|
|
45
46
|
}
|
|
47
|
+
/** 滑过的行垫在下面的背景:放下的行沿用它的预览副本的背景,不用表面色。 */
|
|
48
|
+
const BACKDROP = "--_travelling-backdrop";
|
|
49
|
+
/**
|
|
50
|
+
* 把 `row` 滑过时垫的背景换成 `backdrop`,`null` 时清掉、换回表面色。
|
|
51
|
+
* 只有重排会话用它,没有 `reorderable` 的列表不加载。
|
|
52
|
+
*/
|
|
53
|
+
function setTravellingBackdrop(row, backdrop) {
|
|
54
|
+
if (backdrop == null) row.style.removeProperty(BACKDROP);
|
|
55
|
+
else row.style.setProperty(BACKDROP, backdrop);
|
|
56
|
+
}
|
|
46
57
|
//#endregion
|
|
47
58
|
//#region src/List/reorder/reorderTypes.ts
|
|
48
59
|
/**
|
|
49
60
|
* The key a reorderable object carries its machinery under. `sharedKey`
|
|
50
61
|
* registers it, so a copied List reads a package object, and the package
|
|
51
|
-
* List reads an object a copy adapted.
|
|
62
|
+
* List reads an object a copy adapted. Version 2: the session lays out its
|
|
63
|
+
* rows (`rowLayout`, `listLayout`), so a List never reads a session from a
|
|
64
|
+
* copy that cannot.
|
|
52
65
|
*/
|
|
53
|
-
const REORDER_ENGINE = sharedKey("list/reorder-engine",
|
|
66
|
+
const REORDER_ENGINE = sharedKey("list/reorder-engine", 2);
|
|
54
67
|
//#endregion
|
|
55
|
-
export { markLeaving as a, itemKeyOf as i, isLeaving as n, markTravelling as o, itemKeyAttrs as r, REORDER_ENGINE as t };
|
|
68
|
+
export { markLeaving as a, itemKeyOf as i, isLeaving as n, markTravelling as o, itemKeyAttrs as r, setTravellingBackdrop as s, REORDER_ENGINE as t };
|
|
@@ -26,6 +26,8 @@ interface ComponentIconSlotMap {
|
|
|
26
26
|
'table-row-expand': {
|
|
27
27
|
readonly expanded: boolean;
|
|
28
28
|
};
|
|
29
|
+
/** A reorderable List row's reorder handle: its grip. */
|
|
30
|
+
'list-reorder-handle': true;
|
|
29
31
|
}
|
|
30
32
|
/** A slot name from the augmentable {@link ComponentIconSlotMap}. */
|
|
31
33
|
type ComponentIconSlotName = keyof ComponentIconSlotMap & string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as LayerPlacement, t as LayerAlignment } from "./position-DFW5ymAF.js";
|
|
2
|
-
import "./compactDefinition-
|
|
2
|
+
import "./compactDefinition-CJ7U-1ki.js";
|
|
3
3
|
import { ComputedRef, MaybeRefOrGetter } from "vue";
|
|
4
4
|
//#region src/composables/internal/presentation.d.ts
|
|
5
5
|
type AdaptivePresentation = 'popover' | 'bottom-sheet' | 'adaptive';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as AnimatedLayout } from "./useAnimatedLayout-D94sdliy.js";
|
|
2
|
-
import {
|
|
2
|
+
import { r as Reorderable } from "./createReorderable-yDBsr_S2.js";
|
|
3
3
|
import { i as Swipe, n as ItemSwipeActionVariant, r as ItemSwipeBehavior } from "./swipeHost-B2OlVVZt.js";
|
|
4
4
|
import { Component, MaybeRefOrGetter, VNodeChild } from "vue";
|
|
5
5
|
//#region src/List/types.d.ts
|
|
@@ -82,8 +82,16 @@ interface ListProps {
|
|
|
82
82
|
animatedLayout?: AnimatedLayout;
|
|
83
83
|
/**
|
|
84
84
|
* Makes the rows reorderable, with the object `createReorderable` makes.
|
|
85
|
-
* Each ListItem with an `itemKey` gets a reorder handle at its end
|
|
86
|
-
* object's `
|
|
85
|
+
* Each ListItem with an `itemKey` gets a reorder handle, at its end unless
|
|
86
|
+
* the object's `handle.placement` is `'start'`. It always shows, in a place
|
|
87
|
+
* of its own in the row. With `handle.revealBehavior` `'adaptive'`, it shows
|
|
88
|
+
* while the row is hovered or holds the focus, and hangs outside the row's
|
|
89
|
+
* text, so the text keeps its place. The list takes that room from its
|
|
90
|
+
* container's padding, and moves its rows in by any room the padding
|
|
91
|
+
* lacks. Under a coarse pointer, under `edge` `'outset'` or `'bleed'`, and
|
|
92
|
+
* after a list marker at the start, it then sits inside the row. A row that
|
|
93
|
+
* stays put keeps its neighbours' room at the start, so the labels line up.
|
|
94
|
+
* One the object's `isReorderable` rejects keeps its place. Each committed move
|
|
87
95
|
* calls its `onReorder` once with the row's key and its index after the
|
|
88
96
|
* move. Apply it by rendering the rows in their new order. A drop on the
|
|
89
97
|
* starting place, a cancel, or a move the order does not take changes
|
|
@@ -93,8 +101,8 @@ interface ListProps {
|
|
|
93
101
|
* its row. A flick on it still scrolls. The row stays in its place, dimmed,
|
|
94
102
|
* while a copy of it follows the finger. An accent line marks where it
|
|
95
103
|
* would land. The other rows stay still, the list scrolls near the edges,
|
|
96
|
-
* and on release the rows
|
|
97
|
-
* same way.
|
|
104
|
+
* and on release the rows glide to their new places. A mouse drags a handle
|
|
105
|
+
* at once, and its drop glides the same way.
|
|
98
106
|
*
|
|
99
107
|
* Without a drag, activating a handle (a click, Space or Enter) turns on
|
|
100
108
|
* reorder mode for its row. Each arrow key moves it a place at once,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as isTrackedByGroup, v as GROUP_PRESS_POINTERS, y as PRESS_GROUP_ITEM_ATTRIBUTE } from "./pressSlot-WuaTVSU4.js";
|
|
2
|
-
import { a as resolveGroupTouch, i as createActionGroupTracker } from "./useTouchHitArea-
|
|
2
|
+
import { a as resolveGroupTouch, i as createActionGroupTracker } from "./useTouchHitArea-oji1qpyF.js";
|
|
3
3
|
import { n as msSinceInput } from "./inputAge-Bc4vvqmK.js";
|
|
4
4
|
import { n as isInsideScrollView } from "./scrollView-D2GwmeFx.js";
|
|
5
5
|
import { i as PRESS_SLOP_PX, n as PRESS_ONSET_MS } from "./pressGesture-VrM5-7aV.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as resolveWeekStart } from "./useDateRange-
|
|
1
|
+
import { c as resolveWeekStart } from "./useDateRange-vYk0K9ML.js";
|
|
2
2
|
import { a as calendarAddMonths, c as calendarDayOfMonth, f as calendarMonthOf, v as isGregorianAligned } from "./calendar-B1G5O29s.js";
|
|
3
3
|
import { n as formatCalendarDate } from "./calendarFormat-CbxpwgAe.js";
|
|
4
4
|
import { CalendarDate } from "@internationalized/date";
|
|
@@ -81,8 +81,9 @@ function isDayOutsideSpan(pending, day, minRangeSpan = 1, maxRangeSpan) {
|
|
|
81
81
|
/**
|
|
82
82
|
* 一段日期范围的显示文字。起止都在今年时省掉年份。`currentYear` 缺省读时钟;
|
|
83
83
|
* 传 `null` 表示今年还不知道(服务端渲染、水合那一趟),这时一律写出年份。
|
|
84
|
+
* `join` 把两端写成一句,缺省用短横线连起来。
|
|
84
85
|
*/
|
|
85
|
-
function formatDateRange(range, locale, currentYear = (/* @__PURE__ */ new Date()).getFullYear()) {
|
|
86
|
+
function formatDateRange(range, locale, currentYear = (/* @__PURE__ */ new Date()).getFullYear(), join = joinRange) {
|
|
86
87
|
if (range == null) return "";
|
|
87
88
|
const startYear = Number(range.start.slice(0, 4));
|
|
88
89
|
const endYear = Number(range.end.slice(0, 4));
|
|
@@ -96,7 +97,10 @@ function formatDateRange(range, locale, currentYear = (/* @__PURE__ */ new Date(
|
|
|
96
97
|
const [year, month, day] = iso.split("-").map(Number);
|
|
97
98
|
return formatter.format(new Date(year, month - 1, day));
|
|
98
99
|
};
|
|
99
|
-
return
|
|
100
|
+
return join(format(range.start), format(range.end));
|
|
101
|
+
}
|
|
102
|
+
function joinRange(start, end) {
|
|
103
|
+
return `${start} – ${end}`;
|
|
100
104
|
}
|
|
101
105
|
//#endregion
|
|
102
106
|
export { isRangeWithinSpan as a, resolveWeekStart as c, isDayOutsideSpan as i, spanDays as l, compareISODate as n, isSameRange as o, formatDateRange as r, orderRange as s, applyRangeClick as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as _sfc_main } from "./FieldIcon-COfz-h_b.js";
|
|
2
|
-
import { t as _sfc_main$1 } from "./FieldInfoTip-
|
|
2
|
+
import { t as _sfc_main$1 } from "./FieldInfoTip-B5pHDMoB.js";
|
|
3
3
|
import { computed, toValue } from "vue";
|
|
4
4
|
//#region src/composables/useInputStatusIcon.ts
|
|
5
5
|
/**
|
|
@@ -952,4 +952,4 @@ function useTouchHitAreas(elements, enabled, options) {
|
|
|
952
952
|
});
|
|
953
953
|
}
|
|
954
954
|
//#endregion
|
|
955
|
-
export { resolveGroupTouch as a, createActionGroupTracker as i, useTouchHitArea as n, useTouchHitAreas as r, GROUP_HIT_AREA as t };
|
|
955
|
+
export { resolveGroupTouch as a, plainRect as c, createActionGroupTracker as i, screenScale as l, useTouchHitArea as n, growth as o, useTouchHitAreas as r, inLayout as s, GROUP_HIT_AREA as t };
|
package/package.json
CHANGED
package/styles/date-input.css
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
gap: var(--astryx-spacing-2, 8px);
|
|
22
22
|
width: 100%;
|
|
23
23
|
min-width: 180px;
|
|
24
|
-
height: var(--astryx-input-height-md, 32px);
|
|
24
|
+
height: max(var(--astryx-input-height-md, 32px), var(--astryx-date-field-line, 1.5rem));
|
|
25
25
|
padding: var(--astryx-input-padding-block, var(--astryx-spacing-1, 4px)) var(--astryx-input-padding-inline, var(--astryx-spacing-2, 8px));
|
|
26
26
|
border: var(--astryx-border-width, 1px) solid var(--astryx-input-status-color, var(--astryx-input-border, var(--astryx-color-border-control, light-dark(#848484, #777777))));
|
|
27
27
|
border-radius: var(--astryx-radius-element, 0.625rem);
|
|
@@ -32,12 +32,34 @@
|
|
|
32
32
|
box-shadow var(--astryx-duration-fast-max, 165ms) var(--astryx-ease-standard, cubic-bezier(0.24, 1, 0.4, 1));
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
/* 日期、时间字段的行至少是一行正文加上下边框:字放大到 200% 时字段跟着长高,不会切掉字;默认字号下仍是 28、32、36px。 */
|
|
36
|
+
.astryx-date-input-wrapper,
|
|
37
|
+
.astryx-time-input.astryx-bordered-control {
|
|
38
|
+
--astryx-date-field-line: calc(var(--astryx-text-body-size, 14px) * var(--astryx-text-body-leading, 1.4286) + 2 * var(--astryx-border-width, 1px));
|
|
37
39
|
}
|
|
38
40
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
/* iOS 触屏上输入框字号兜底到 16px,行跟着这个字号算。 */
|
|
42
|
+
@media (pointer: coarse) {
|
|
43
|
+
@supports (-webkit-touch-callout: none) {
|
|
44
|
+
.astryx-date-input-wrapper,
|
|
45
|
+
.astryx-time-input.astryx-bordered-control {
|
|
46
|
+
--astryx-date-field-line: calc(max(1rem, var(--astryx-text-body-size, 14px)) * var(--astryx-text-body-leading, 1.4286) + 2 * var(--astryx-border-width, 1px));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.astryx-time-input.astryx-bordered-control {
|
|
52
|
+
height: max(var(--astryx-input-height-md, 32px), var(--astryx-date-field-line, 1.5rem));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.astryx-date-input-wrapper[data-size='sm'],
|
|
56
|
+
.astryx-time-input.astryx-bordered-control[data-size='sm'] {
|
|
57
|
+
height: max(var(--astryx-input-height-sm, 28px), var(--astryx-date-field-line, 1.5rem));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.astryx-date-input-wrapper[data-size='lg'],
|
|
61
|
+
.astryx-time-input.astryx-bordered-control[data-size='lg'] {
|
|
62
|
+
height: max(var(--astryx-input-height-lg, 36px), var(--astryx-date-field-line, 1.5rem));
|
|
41
63
|
}
|
|
42
64
|
|
|
43
65
|
@media (hover: hover) {
|
|
@@ -152,6 +174,19 @@
|
|
|
152
174
|
pointer-events: none;
|
|
153
175
|
}
|
|
154
176
|
|
|
177
|
+
.astryx-date-input-overlay-text {
|
|
178
|
+
overflow: hidden;
|
|
179
|
+
min-width: 0;
|
|
180
|
+
text-overflow: ellipsis;
|
|
181
|
+
unicode-bidi: isolate;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/* 输入框带着语言的方向(`dir`),对齐仍跟页面:`match-parent` 按父元素的方向解析 start 和 end,Chromium 只认带前缀的写法。 */
|
|
185
|
+
.astryx-date-input-field[dir] {
|
|
186
|
+
text-align: -webkit-match-parent;
|
|
187
|
+
text-align: match-parent;
|
|
188
|
+
}
|
|
189
|
+
|
|
155
190
|
.astryx-date-input-overlay[data-placeholder] {
|
|
156
191
|
color: var(--astryx-color-text-secondary, #525252);
|
|
157
192
|
}
|
|
@@ -12,6 +12,28 @@
|
|
|
12
12
|
width: 100%;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
/* 字段的行至少是一行正文加上下边框:字放大到 200% 时跟着长高,不会切掉字;默认字号下仍是 28、32、36px。 */
|
|
16
|
+
.astryx-date-range-input.astryx-bordered-control {
|
|
17
|
+
--astryx-date-field-line: calc(var(--astryx-text-body-size, 14px) * var(--astryx-text-body-leading, 1.4286) + 2 * var(--astryx-border-width, 1px));
|
|
18
|
+
height: max(var(--astryx-input-height-md, 32px), var(--astryx-date-field-line, 1.5rem));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@media (pointer: coarse) {
|
|
22
|
+
@supports (-webkit-touch-callout: none) {
|
|
23
|
+
.astryx-date-range-input.astryx-bordered-control {
|
|
24
|
+
--astryx-date-field-line: calc(max(1rem, var(--astryx-text-body-size, 14px)) * var(--astryx-text-body-leading, 1.4286) + 2 * var(--astryx-border-width, 1px));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.astryx-date-range-input.astryx-bordered-control[data-size='sm'] {
|
|
30
|
+
height: max(var(--astryx-input-height-sm, 28px), var(--astryx-date-field-line, 1.5rem));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.astryx-date-range-input.astryx-bordered-control[data-size='lg'] {
|
|
34
|
+
height: max(var(--astryx-input-height-lg, 36px), var(--astryx-date-field-line, 1.5rem));
|
|
35
|
+
}
|
|
36
|
+
|
|
15
37
|
.astryx-date-range-trigger {
|
|
16
38
|
display: flex;
|
|
17
39
|
flex: 1;
|
package/styles/list-reorder.css
CHANGED
|
@@ -1,22 +1,34 @@
|
|
|
1
1
|
@layer astryx.reset, astryx.tokens, astryx.base, astryx.components, astryx.overrides;
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
|
-
* List 拖动重排(createReorderable
|
|
5
|
-
*
|
|
4
|
+
* List 拖动重排(createReorderable):行首或行末的手柄、可重排列表和行为手柄留的位置、列表的插入线、
|
|
5
|
+
* 重排模式提示里的按钮。标记属性由 List/reorder/reorderMarks.ts 写,列表和行的布局属性由
|
|
6
|
+
* List/reorder/reorderLayout.ts 给出。
|
|
6
7
|
*/
|
|
7
8
|
@layer astryx.components {
|
|
8
|
-
/*
|
|
9
|
+
/*
|
|
10
|
+
* 手柄只有一个握把:主题 `list-reorder-handle` 槽位的图标,框固定 1rem,槽位的尺寸只改图标、
|
|
11
|
+
* 图标从框的四边均匀溢出。框外一圈看不见的点按范围(::before)伸出 `--_reorder-target-reach`,
|
|
12
|
+
* 至少 24px 见方;焦点环的外缘就是它的边。粗指针下手指的热区(::after,touch-hit-area.css)朝 44px 长。
|
|
13
|
+
* 手柄离行的边留出点按范围减去行自己内边距的距离,裁剪的列表不会切掉它的点按范围和焦点环。
|
|
14
|
+
*/
|
|
9
15
|
.astryx-list-reorder-handle {
|
|
16
|
+
--_reorder-grip: 1rem;
|
|
17
|
+
--_reorder-target-reach: max(4px, (24px - 1rem) / 2);
|
|
18
|
+
--_reorder-edge-guard: max(0px, calc(var(--_reorder-target-reach) - var(--astryx-item-inset-inline, 0px)));
|
|
19
|
+
/* 挂在行内容外面时离内容的距离:握把加点按范围,点按范围止于内容。 */
|
|
20
|
+
--_reorder-hang: calc(var(--_reorder-grip) + var(--_reorder-target-reach));
|
|
21
|
+
/* 挂着的手柄内侧的外边距:把行的间距还回去,减去止于内容的点按范围。 */
|
|
22
|
+
--_reorder-give-back: calc(var(--_reorder-target-reach) - var(--astryx-spacing-2, 8px));
|
|
10
23
|
position: relative;
|
|
24
|
+
isolation: isolate;
|
|
11
25
|
align-self: center;
|
|
12
26
|
display: flex;
|
|
13
27
|
align-items: center;
|
|
14
28
|
justify-content: center;
|
|
15
29
|
flex-shrink: 0;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
margin-block: -7px;
|
|
19
|
-
margin-inline-end: calc(-1 * min(8px, var(--astryx-item-inset-inline, 8px)));
|
|
30
|
+
inline-size: var(--_reorder-grip);
|
|
31
|
+
block-size: var(--_reorder-grip);
|
|
20
32
|
padding: 0;
|
|
21
33
|
border: 0;
|
|
22
34
|
border-radius: 4px;
|
|
@@ -28,22 +40,28 @@
|
|
|
28
40
|
|
|
29
41
|
.astryx-list-reorder-handle::before {
|
|
30
42
|
content: '';
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
43
|
+
position: absolute;
|
|
44
|
+
inset: calc(-1 * var(--_reorder-target-reach));
|
|
45
|
+
z-index: -1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* 按在握把上就是按在手柄上。 */
|
|
49
|
+
.astryx-list-reorder-handle > * {
|
|
38
50
|
pointer-events: none;
|
|
39
51
|
}
|
|
40
52
|
|
|
41
53
|
.astryx-list-reorder-handle:focus-visible {
|
|
42
54
|
outline: var(--astryx-focus-outline-width, 2px) var(--astryx-focus-outline-style, solid) var(--astryx-focus-outline-color, currentcolor);
|
|
43
|
-
outline-offset: calc(-
|
|
55
|
+
outline-offset: calc(var(--_reorder-target-reach) - var(--astryx-focus-outline-width, 2px));
|
|
44
56
|
}
|
|
45
57
|
|
|
58
|
+
/* 重排模式填满点按范围,像按下的切换按钮;强制颜色下用系统高亮。 */
|
|
46
59
|
.astryx-list-reorder-handle[aria-pressed='true'] {
|
|
60
|
+
forced-color-adjust: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.astryx-list-reorder-handle[aria-pressed='true']::before {
|
|
64
|
+
border-radius: 4px;
|
|
47
65
|
background-color: var(--astryx-color-overlay-pressed, light-dark(#05365919, #ffffff19));
|
|
48
66
|
forced-color-adjust: none;
|
|
49
67
|
}
|
|
@@ -57,22 +75,83 @@
|
|
|
57
75
|
cursor: grabbing;
|
|
58
76
|
}
|
|
59
77
|
|
|
78
|
+
/* 在行里占自己的位置:行尾在内容或尾部插槽之后,行首在内容之前,都离行的边留出距离。 */
|
|
79
|
+
.astryx-list-reorder-handle[data-placement='end']:not([data-hangs]) {
|
|
80
|
+
margin-inline-end: var(--_reorder-edge-guard);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.astryx-list-reorder-handle[data-placement='start']:not([data-hangs]) {
|
|
84
|
+
margin-inline-start: var(--_reorder-edge-guard);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* 只在悬停或焦点时显示(细指针)时挂在行内容外面,不占宽度,内容不挪;内侧的外边距还回行的间距。 */
|
|
88
|
+
.astryx-list-reorder-handle[data-placement='start'][data-hangs] {
|
|
89
|
+
margin-inline-start: calc(-1 * var(--_reorder-hang));
|
|
90
|
+
margin-inline-end: var(--_reorder-give-back);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.astryx-list-reorder-handle[data-placement='end'][data-hangs] {
|
|
94
|
+
margin-inline-start: var(--_reorder-give-back);
|
|
95
|
+
margin-inline-end: calc(-1 * var(--_reorder-hang));
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/*
|
|
99
|
+
* 一直显示的手柄在尾部插槽外面时自己跟着行变暗(插槽和标签在禁用的行里减半)。
|
|
100
|
+
* 跟着行显示的手柄在行悬停或含焦点时出现(行是揭示的容器),重排模式里一直显示,藏起时仍可聚焦。
|
|
101
|
+
*/
|
|
102
|
+
.astryx-list-reorder-handle[data-reveal='always'][aria-disabled='true']:not([data-in-end-slot]) {
|
|
103
|
+
opacity: 0.5;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.astryx-list-reorder-handle[data-reveal='adaptive'] {
|
|
107
|
+
opacity: var(--_reveal-opacity, 1);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.astryx-list-reorder-handle[data-reveal='adaptive'][aria-disabled='true'] {
|
|
111
|
+
opacity: calc(0.5 * var(--_reveal-opacity, 1));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.astryx-list-reorder-handle[data-reveal='adaptive'][aria-pressed='true'] {
|
|
115
|
+
opacity: 1;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/*
|
|
119
|
+
* 粗指针下:手柄一直显示,在行里占位置,点按范围伸得更远。在手柄把滚动交给浏览器之前,
|
|
120
|
+
* 页面保留滚动和双指缩放(`manipulation`)。
|
|
121
|
+
*/
|
|
60
122
|
@media (pointer: coarse) {
|
|
61
123
|
.astryx-list-reorder-handle {
|
|
124
|
+
--_reorder-edge-guard: max(0px, calc((44px - 1rem) / 2 - var(--astryx-item-inset-inline, 0px)));
|
|
62
125
|
touch-action: manipulation;
|
|
63
126
|
-webkit-tap-highlight-color: transparent;
|
|
64
127
|
}
|
|
128
|
+
|
|
129
|
+
.astryx-list-reorder-handle[data-placement='start'][data-hangs] {
|
|
130
|
+
margin-inline-start: var(--_reorder-edge-guard);
|
|
131
|
+
margin-inline-end: 0;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.astryx-list-reorder-handle[data-placement='end'][data-hangs] {
|
|
135
|
+
margin-inline-start: auto;
|
|
136
|
+
margin-inline-end: var(--_reorder-edge-guard);
|
|
137
|
+
}
|
|
65
138
|
}
|
|
66
139
|
|
|
67
140
|
@media (forced-colors: active) {
|
|
68
141
|
.astryx-list-reorder-handle[aria-pressed='true'] {
|
|
69
|
-
background-color: Highlight;
|
|
70
142
|
color: HighlightText;
|
|
71
143
|
}
|
|
144
|
+
|
|
145
|
+
.astryx-list-reorder-handle[aria-pressed='true']::before {
|
|
146
|
+
background-color: Highlight;
|
|
147
|
+
}
|
|
72
148
|
}
|
|
73
149
|
|
|
74
|
-
/*
|
|
75
|
-
|
|
150
|
+
/*
|
|
151
|
+
* 尾部插槽之外、在行尾占位的手柄是行自己的子元素:靠到末端,并像行的 `align` 对齐那个插槽一样对齐。
|
|
152
|
+
* 挂着的手柄保留还回去的间距:会伸长的行内容已经顶到了末端。
|
|
153
|
+
*/
|
|
154
|
+
.astryx-list-reorder-handle[data-row-align][data-placement='end']:not([data-hangs]) {
|
|
76
155
|
margin-inline-start: auto;
|
|
77
156
|
}
|
|
78
157
|
|
|
@@ -82,7 +161,89 @@
|
|
|
82
161
|
|
|
83
162
|
.astryx-list-reorder-handle[data-row-align='first-line'] {
|
|
84
163
|
align-self: flex-start;
|
|
85
|
-
margin-block-start: calc((var(--astryx-text-body-leading, 1.4286) * var(--astryx-text-body-size, 0.875rem) -
|
|
164
|
+
margin-block-start: calc((var(--astryx-text-body-leading, 1.4286) * var(--astryx-text-body-size, 0.875rem) - var(--_reorder-grip)) / 2);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/*
|
|
168
|
+
* 可重排的 List 给行发布:手柄的点按范围伸出握把多远(`--_reorder-reach`),手柄是否在行里占位置
|
|
169
|
+
* (`--_reorder-shown`,1 或 0);`bleed` 列表还发布容器的起始内边距。不动的行据此留出邻居的手柄位置。
|
|
170
|
+
*/
|
|
171
|
+
.astryx-list[data-reorder-handle] {
|
|
172
|
+
--_reorder-reach: max(4px, (24px - 1rem) / 2);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.astryx-list[data-reorder-shown='always'] {
|
|
176
|
+
--_reorder-shown: 1;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.astryx-list[data-reorder-shown='coarse'] {
|
|
180
|
+
--_reorder-shown: 0;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.astryx-list[data-reorder-handle][data-edge='bleed'] {
|
|
184
|
+
--_reorder-bleed-start: var(--container-padding-inline-start, 0px);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/*
|
|
188
|
+
* 手柄只在悬停或焦点时显示时,挂在行文字外面。列表在手柄那一侧留出这块位置(握把、两倍点按范围,
|
|
189
|
+
* 减去行自己的内边距),并伸进容器的内边距,能借多少借多少:列表的裁剪不会切掉手柄,行只往里挪
|
|
190
|
+
* 内边距不够的那部分。容器没发布内边距时整块都往里挪,手柄不会伸出列表的宿主。
|
|
191
|
+
*/
|
|
192
|
+
.astryx-list[data-reorder-gutter] {
|
|
193
|
+
--_reorder-gutter: calc(1rem + 2 * max(4px, (24px - 1rem) / 2));
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.astryx-list[data-reorder-gutter='padded'] {
|
|
197
|
+
--_reorder-room: calc(var(--_reorder-gutter) - var(--astryx-spacing-2, 8px));
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.astryx-list[data-reorder-gutter='spacious'] {
|
|
201
|
+
--_reorder-room: calc(var(--_reorder-gutter) - var(--astryx-spacing-3, 12px));
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.astryx-list[data-reorder-gutter='flush'] {
|
|
205
|
+
--_reorder-room: var(--_reorder-gutter);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.astryx-list[data-reorder-handle='start'][data-reorder-gutter] {
|
|
209
|
+
margin-inline-start: calc(-1 * min(var(--_reorder-room), var(--container-padding-inline-start, 0px)));
|
|
210
|
+
padding-inline-start: var(--_reorder-room);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.astryx-list[data-reorder-handle='end'][data-reorder-gutter] {
|
|
214
|
+
margin-inline-end: calc(-1 * min(var(--_reorder-room), var(--container-padding-inline-end, 0px)));
|
|
215
|
+
padding-inline-end: var(--_reorder-room);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/*
|
|
219
|
+
* 不动的行留出邻居手柄的位置(离边的距离、握把、之后的间距),只在手柄占位置时:一直,或粗指针下。
|
|
220
|
+
* 列表标记之后的手柄总是占位置,Item 在标记之后留出这块位置(`--_item-marker-room`)。
|
|
221
|
+
*/
|
|
222
|
+
.astryx-list[data-reorder-handle] > .astryx-list-item {
|
|
223
|
+
--_reorder-row-room: calc(max(0px, calc(var(--_reorder-reach, 4px) - var(--astryx-item-inset-inline))) + 1rem + var(--astryx-spacing-2, 8px));
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.astryx-list[data-reorder-handle] > .astryx-list-item[data-reorder-room='start'] {
|
|
227
|
+
padding-inline-start: calc(max(var(--_reorder-bleed-start, 0px), var(--astryx-item-inset-inline)) + var(--_reorder-shown, 1) * var(--_reorder-row-room));
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.astryx-list[data-reorder-handle] > .astryx-list-item[data-reorder-room='marker'] {
|
|
231
|
+
--_item-marker-room: var(--_reorder-row-room);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
@media (pointer: coarse) {
|
|
235
|
+
.astryx-list[data-reorder-handle] {
|
|
236
|
+
--_reorder-reach: calc((44px - 1rem) / 2);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.astryx-list[data-reorder-shown='coarse'] {
|
|
240
|
+
--_reorder-shown: 1;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.astryx-list[data-reorder-handle][data-reorder-gutter] {
|
|
244
|
+
margin-inline: 0;
|
|
245
|
+
padding-inline: 0;
|
|
246
|
+
}
|
|
86
247
|
}
|
|
87
248
|
|
|
88
249
|
/*
|
package/styles/list.css
CHANGED
|
@@ -59,6 +59,8 @@
|
|
|
59
59
|
align-self: stretch;
|
|
60
60
|
gap: inherit;
|
|
61
61
|
min-width: 0;
|
|
62
|
+
/* 可重排列表里不动的行在标记之后留出邻居手柄的位置(list-reorder.css)。 */
|
|
63
|
+
padding-inline-start: var(--_item-marker-room, 0px);
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
.astryx-item[data-align='first-line'] > .astryx-item__marker-content {
|
|
@@ -83,8 +85,9 @@
|
|
|
83
85
|
}
|
|
84
86
|
|
|
85
87
|
/*
|
|
86
|
-
* `animatedLayout`
|
|
87
|
-
*
|
|
88
|
+
* `animatedLayout` 下从反向移动的行上方滑过的行,以及拖动放下后滑向新位置的行:滑动期间抬到上面,
|
|
89
|
+
* 背后垫一层表面色(放下的行垫它预览副本的背景,`--_travelling-backdrop`),像 UIKit 不透明的 cell
|
|
90
|
+
* 从邻居上方经过。表面是铺满内边距盒的内阴影,在按压层和内容下面,
|
|
88
91
|
* 分隔线和按压都还看得见。选中的行保留自己的底色。z-index 2 高过粗指针下热区的 1。
|
|
89
92
|
*/
|
|
90
93
|
.astryx-list > .astryx-list-item[data-astryx-travelling] {
|
|
@@ -92,7 +95,7 @@
|
|
|
92
95
|
}
|
|
93
96
|
|
|
94
97
|
.astryx-list > .astryx-list-item[data-astryx-travelling]:not([data-selected='true']) {
|
|
95
|
-
box-shadow: inset 0 0 0 100vmax var(--astryx-color-background-surface, light-dark(#fff, #262626));
|
|
98
|
+
box-shadow: inset 0 0 0 100vmax var(--_travelling-backdrop, var(--astryx-color-background-surface, light-dark(#fff, #262626)));
|
|
96
99
|
}
|
|
97
100
|
|
|
98
101
|
/*
|
|
@@ -176,6 +179,8 @@
|
|
|
176
179
|
align-self: baseline;
|
|
177
180
|
width: var(--astryx-spacing-4, 16px);
|
|
178
181
|
margin-top: calc((1em * var(--astryx-text-body-leading, 1.4286) - 6px) / 2);
|
|
182
|
+
/* 不动的行在圆点之后留出邻居手柄的位置;数字标记在共用的数字列里,由内容格留。 */
|
|
183
|
+
margin-inline-end: var(--_item-marker-room, 0px);
|
|
179
184
|
}
|
|
180
185
|
|
|
181
186
|
.astryx-list-marker__glyph {
|
|
@@ -219,6 +224,8 @@
|
|
|
219
224
|
|
|
220
225
|
.astryx-item {
|
|
221
226
|
--astryx-item-inset-inline: var(--astryx-spacing-2, 8px);
|
|
227
|
+
/* 每一行都重置,嵌套的行不会拿到外层行的标记后位置。 */
|
|
228
|
+
--_item-marker-room: 0px;
|
|
222
229
|
position: relative;
|
|
223
230
|
box-sizing: border-box;
|
|
224
231
|
display: flex;
|
package/styles/tree-list.css
CHANGED
|
@@ -231,6 +231,17 @@
|
|
|
231
231
|
transform: scaleX(-1) rotate(90deg);
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
+
/* 减少动效时展开箭头直接转到位:系统设置和主题对所有人减少动效都算。 */
|
|
235
|
+
@media (prefers-reduced-motion: reduce) {
|
|
236
|
+
.astryx-tree-list__chevron .astryx-icon {
|
|
237
|
+
transition-duration: 0s;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
:where([data-astryx-reduced-motion]) .astryx-tree-list__chevron .astryx-icon {
|
|
242
|
+
transition-duration: 0s;
|
|
243
|
+
}
|
|
244
|
+
|
|
234
245
|
.astryx-tree-list__guide {
|
|
235
246
|
position: absolute;
|
|
236
247
|
z-index: 1;
|
|
@@ -2,12 +2,12 @@ import { i as themeNestingKey, n as systemSchemeKey, r as themeContextKey, t as
|
|
|
2
2
|
import { n as resolveIconEntryVariants, t as readThemeIconIds } from "./themeIcons-DJXJyUep.js";
|
|
3
3
|
import { i as themeReducesMotionKey, n as setRootReducedMotionMark, t as reducedMotionMarkProps } from "./reducedMotionMark-D3dxwdiR.js";
|
|
4
4
|
import { t as devWarn } from "./useDevWarning-B2fsk2B-.js";
|
|
5
|
+
import { r as staticComponentIcons, t as mergeComponentIcons } from "./componentIcons-CQpbZ4eq.js";
|
|
5
6
|
import { n as easeDefaults, t as durationDefaults } from "./motionTokenDefaults-EFzpiAF5.js";
|
|
6
7
|
import { n as normalizeTokenName, r as prefixTokenReferences, t as isPortableTokenName } from "./tokenName-0U-WEH09.js";
|
|
7
8
|
import { n as splitTopLevelWhitespace } from "./tokenReferences-CdmofltU.js";
|
|
8
9
|
import { n as observeResize } from "./sharedResizeObserver-BnRTJaNh.js";
|
|
9
10
|
import { n as WIDTH_BREAKPOINT_NAMES, t as DEFAULT_WIDTH_BREAKPOINTS } from "./adaptationTypes-Beao49TN.js";
|
|
10
|
-
import { r as staticComponentIcons, t as mergeComponentIcons } from "./componentIcons-CQpbZ4eq.js";
|
|
11
11
|
import { a as syntaxThemeStyle, n as SYNTAX_TOKEN_KEYS, t as DIFF_SYNTAX_TOKEN_KEYS } from "./syntaxTheme-R7xnu5x5.js";
|
|
12
12
|
import { t as syntaxThemeKey } from "./syntaxContext-DmIfNNtb.js";
|
|
13
13
|
import { r as useRootScheme } from "./useResolvedColorMode-CyZjLvfj.js";
|
|
@@ -43,9 +43,9 @@ declare const __VLS_base: import("vue").DefineComponent<TokenProps, {}, {}, {},
|
|
|
43
43
|
onRemove?: ((event: Event) => any) | undefined;
|
|
44
44
|
}>, {
|
|
45
45
|
size: TokenSize;
|
|
46
|
-
labelHidden: boolean;
|
|
47
46
|
disabled: boolean;
|
|
48
47
|
color: "default" | "blue" | "cyan" | "gray" | "green" | "orange" | "pink" | "purple" | "red" | "teal" | "yellow";
|
|
48
|
+
labelHidden: boolean;
|
|
49
49
|
removable: boolean;
|
|
50
50
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
51
51
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|