@astryx-vue/core 0.36.2 → 0.37.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-Dz8T0KIa.js → AlertDialog-DwITRN1M.js} +1 -1
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/Banner/index.d.ts +1 -1
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/BottomSheet/index.js +2 -2
- package/dist/{BottomSheet-CRHPDrmS.js → BottomSheet-CDxV1Rkx.js} +1 -1
- package/dist/{BottomSheet-CYsGu9GP.js → BottomSheet-Cr6FacYP.js} +4 -77
- package/dist/Breadcrumbs/index.js +1 -1
- package/dist/{Breadcrumbs-nO9YHygD.js → Breadcrumbs-DaxgM0-F.js} +1 -1
- package/dist/Button/index.d.ts +1 -1
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Card/index.d.ts +1 -1
- package/dist/Carousel/index.d.ts +1 -1
- package/dist/Chat/index.d.ts +1 -1
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/Collapsible/index.d.ts +1 -1
- package/dist/CommandPalette/index.d.ts +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-D07roA0D.js → CommandPalette-CWaKVNGZ.js} +2 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-7OdAby6v.js → ComplexSelector-D2QRdM57.js} +1 -1
- package/dist/ContextMenu/index.d.ts +1 -1
- package/dist/ContextMenu/index.js +1 -1
- package/dist/{ContextMenu-BIJyyObZ.js → ContextMenu-D-G53u7B.js} +1 -1
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-BNKoPL3j.js → DateInput-BHSp4fZS.js} +2 -2
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-CGDlPnUb.js → DateRangeInput-DP1QWK_6.js} +1 -1
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-CRWUAh75.js → DateTimeInput-Bgx9lgWb.js} +3 -3
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Dialog/index.js +3 -3
- package/dist/{Dialog-CXa-tu02.js → Dialog-DCKT1dWC.js} +2 -1
- package/dist/{Dialog-BxijA4zr.js → Dialog-DRQrtKHT.js} +3 -80
- package/dist/{DialogHeader-D7f97ksG.js → DialogHeader-C3Mc580J.js} +1 -1
- package/dist/Divider/index.d.ts +1 -1
- package/dist/Drawer/index.d.ts +1 -1
- package/dist/Drawer/index.js +1 -1
- package/dist/Drawer-CnFTUjln.js +422 -0
- package/dist/DropdownMenu/index.js +1 -1
- package/dist/{DropdownMenu-Bklf6ekH.js → DropdownMenu-DU_Rw88D.js} +1 -1
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/HoverCard/index.d.ts +1 -1
- package/dist/InfoTip/index.d.ts +1 -1
- package/dist/InputGroup/index.d.ts +1 -1
- package/dist/Link/index.d.ts +1 -1
- package/dist/List/index.d.ts +1 -1
- package/dist/Markdown/index.d.ts +1 -1
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-BjFYfRqV.js → MultiSelector-DUQMNBoZ.js} +1 -1
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/Overlay/index.d.ts +1 -1
- package/dist/Pagination/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-DGcl38z9.js → Pagination-DBikmHyn.js} +1 -1
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-DlCqmkYD.js → Popover-CTCWhA_K.js} +1 -1
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-BKhXYPRO.js → PowerSearch-CTNFHNnr.js} +8 -8
- package/dist/ProgressBar/index.d.ts +1 -1
- 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/ScrollableArea/index.d.ts +1 -1
- package/dist/SegmentedControl/index.d.ts +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-CHq3XHwH.js → Selector-BvxQXUYr.js} +1 -1
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/Stack/index.d.ts +1 -1
- package/dist/Stepper/index.d.ts +1 -1
- package/dist/Switch/index.d.ts +1 -1
- 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-waEj3x_o.js → Table-3GiSElIS.js} +5 -5
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/{TimeField-BXQCZIwP.js → TimeField-BYuUKUNq.js} +1 -1
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-C_ZssG1D.js → TimeInput-Bqo_oHMl.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Toast/index.js +1 -1
- package/dist/{Toast-W6aKxXlF.js → Toast-BSay0eZw.js} +14 -6
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-hmGkGVG7.js → Tokenizer-D-wBxbBE.js} +2 -2
- 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.d.ts +1 -1
- package/dist/{index-BWzEt0gT.d.ts → index--kbwaSXW.d.ts} +2 -2
- package/dist/{index-CArP_6wv.d.ts → index-0RIgvtdm.d.ts} +1 -1
- package/dist/{index-CAJMHw-g.d.ts → index-1yvu_vpF.d.ts} +4 -4
- package/dist/{index-DlH0BI35.d.ts → index-Ak1b0V24.d.ts} +1 -1
- package/dist/{index-SWw-WMTO.d.ts → index-B44fLswd.d.ts} +2 -2
- package/dist/{index-C0smuLQ8.d.ts → index-B7Rd2RuL.d.ts} +93 -81
- package/dist/{index-BgT6mH3U.d.ts → index-BB9acgK8.d.ts} +1 -1
- package/dist/{index-BuubzuE8.d.ts → index-BDZCJ9ri.d.ts} +2 -2
- package/dist/{index-maTGrWjF.d.ts → index-BenG-F5d.d.ts} +1 -1
- package/dist/{index-BGUuyAMO.d.ts → index-BhpRhww0.d.ts} +11 -11
- package/dist/{index-C1e8LNx2.d.ts → index-BjqoHLMq.d.ts} +1 -1
- package/dist/{index-D05JGsT3.d.ts → index-C8wfe0Mr.d.ts} +1 -1
- package/dist/{index-gmY3A_Iw.d.ts → index-C93nwgTW.d.ts} +1 -1
- package/dist/{index-D2B3ysZr.d.ts → index-CGRtGORf.d.ts} +1 -1
- package/dist/{index-Xc3q9f84.d.ts → index-COgrQZIL.d.ts} +3 -3
- package/dist/{index-Bgk1Rj2A.d.ts → index-CTjkJP4x.d.ts} +1 -1
- package/dist/{index-Bwh8O-v8.d.ts → index-CZ29Xu_E.d.ts} +1 -1
- package/dist/{index-BQ3cm7mP.d.ts → index-CbA8rR_b.d.ts} +1 -1
- package/dist/{index-C6Iv6sgd.d.ts → index-CilCxEvD.d.ts} +3 -3
- package/dist/{index-BWWirRm3.d.ts → index-DHUCHxn2.d.ts} +1 -1
- package/dist/{index-DsWEyz1N.d.ts → index-DVX2jlTQ.d.ts} +3 -3
- package/dist/{index-CJdOt5Cc.d.ts → index-Dk50Zh3F.d.ts} +2 -2
- package/dist/{index-DA3DMFds.d.ts → index-J83fLEyo.d.ts} +4 -4
- package/dist/{index-BfFpUr1B.d.ts → index-ZKBj_1nu.d.ts} +1 -1
- package/dist/{index-BRr4ANpr.d.ts → index-hwP1oWCA.d.ts} +8 -8
- package/dist/{index-Cm36VS1A.d.ts → index-mK1ICsVg.d.ts} +2 -2
- package/dist/{index-ql9ApSTF.d.ts → index-yQc-te9a.d.ts} +2 -2
- package/dist/index.d.ts +27 -27
- package/dist/index.js +24 -24
- package/dist/{lazyBottomSheet-zUe1mYmM.js → lazyBottomSheet-C6Rw8yoX.js} +1 -1
- package/dist/{modalOutlet-Drr9a16b.js → modalOutlet-BwR9AAlm.js} +16 -1
- package/dist/position-DwHfneha.js +79 -0
- package/dist/sheetTransition-BEm1GCv1.js +76 -0
- package/package.json +1 -1
- package/styles/drawer.css +136 -44
- package/dist/Drawer-C3t7NKiF.js +0 -137
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as _sfc_main$11 } from "./BottomSheet-
|
|
1
|
+
import { n as _sfc_main$11 } from "./BottomSheet-Cr6FacYP.js";
|
|
2
2
|
import { t as isRenderable } from "./isRenderable-BnKHIqfd.js";
|
|
3
3
|
import { i as useClickableContainer, n as hasInteractiveAncestor, r as hasTextSelection, t as INTERACTIVE_SELECTORS } from "./useClickableContainer-Dtjg-nkm.js";
|
|
4
4
|
import { t as usePressFeedback } from "./usePressFeedback-CF4ISMfb.js";
|
|
@@ -63,7 +63,7 @@ import { a as formatDisplayTime12h, i as createISOTimeString, n as clampTime, o
|
|
|
63
63
|
import { a as parseISOTime, i as parseDisplayTime, n as formatISOTime, o as resolveTimeSurface, r as isTimeInRange, s as shiftTime, t as formatDisplayTime } from "./useTimeValue-8YfPQffv.js";
|
|
64
64
|
import { n as isActionTrigger } from "./useTouchTriggerInternal-C_mowlpv.js";
|
|
65
65
|
import { t as useTypeahead } from "./useTypeahead-HlZ9cICe.js";
|
|
66
|
-
import { t as _sfc_main$69 } from "./Dialog-
|
|
66
|
+
import { t as _sfc_main$69 } from "./Dialog-DRQrtKHT.js";
|
|
67
67
|
import { t as useTooltip } from "./useTooltip-DCp4sTM1.js";
|
|
68
68
|
import { t as _sfc_main$188 } from "./Tooltip-BdG9g6c6.js";
|
|
69
69
|
import { n as useTruncation } from "./useTruncation-D_T-ezdp.js";
|
|
@@ -71,7 +71,7 @@ import { t as _sfc_main$88 } from "./Heading-BZ0ydu2s.js";
|
|
|
71
71
|
import { t as useScrollbars } from "./useScrollbars-Ch0xqJWO.js";
|
|
72
72
|
import { t as _sfc_main$155 } from "./Stack-DPB-Ztf7.js";
|
|
73
73
|
import { t as _sfc_main$173 } from "./Text-bvai__ae.js";
|
|
74
|
-
import { n as _sfc_main, t as useImperativeAlertDialog } from "./AlertDialog-
|
|
74
|
+
import { n as _sfc_main, t as useImperativeAlertDialog } from "./AlertDialog-DwITRN1M.js";
|
|
75
75
|
import { a as _sfc_main$100, n as _sfc_main$103, r as _sfc_main$101, t as _sfc_main$104 } from "./LayoutPanel-D56PBM4I.js";
|
|
76
76
|
import { t as layoutMessages } from "./layout-DhX4-SyE.js";
|
|
77
77
|
import { t as navMessages } from "./nav-DpKQUHqR.js";
|
|
@@ -88,11 +88,11 @@ import { t as bannerMessages } from "./banner-Bv76b50U.js";
|
|
|
88
88
|
import { t as _sfc_main$8 } from "./Banner-DeauKxQw.js";
|
|
89
89
|
import { t as _sfc_main$10 } from "./Blockquote-DRoKdcxZ.js";
|
|
90
90
|
import "./Blockquote/index.js";
|
|
91
|
-
import { t as _sfc_main$12 } from "./BottomSheet-
|
|
91
|
+
import { t as _sfc_main$12 } from "./BottomSheet-CDxV1Rkx.js";
|
|
92
92
|
import { a as useListContext, i as useItemDescriptionId, t as _sfc_main$97 } from "./Item-CKYsTbM4.js";
|
|
93
93
|
import { t as _sfc_main$43 } from "./CheckboxIndicator-fH4d-JE1.js";
|
|
94
94
|
import { a as _sfc_main$16, l as useDropdownMenuContext, m as useContextMenuSize, o as _sfc_main$15, p as useContextMenu, s as _sfc_main$14, u as useDropdownMenuRadioGroup } from "./accessibleName-CHrrgpAy.js";
|
|
95
|
-
import { a as _sfc_main$75, i as _sfc_main$76, n as _sfc_main$78, r as _sfc_main$77, t as _sfc_main$74 } from "./DropdownMenu-
|
|
95
|
+
import { a as _sfc_main$75, i as _sfc_main$76, n as _sfc_main$78, r as _sfc_main$77, t as _sfc_main$74 } from "./DropdownMenu-DU_Rw88D.js";
|
|
96
96
|
import { n as compactDefinition, t as DEFAULT_COMPACT_DEFINITION } from "./compactDefinition-BeFUKEFg.js";
|
|
97
97
|
import { t as _sfc_main$71 } from "./Divider-mOZ6vIQw.js";
|
|
98
98
|
import { t as spinnerMessages } from "./spinner-DVia-eDf.js";
|
|
@@ -100,7 +100,7 @@ import { t as _sfc_main$154 } from "./Spinner-D1adu3uH.js";
|
|
|
100
100
|
import { a as _sfc_main$136, i as isCoreIndicatorName, n as defaultIndicators, o as _sfc_main$42, r as getIndicator, t as useIndicator } from "./useIndicator-PFDBNOvX.js";
|
|
101
101
|
import { t as dropdownMenuMessages } from "./dropdown-menu-BDu4gWwQ.js";
|
|
102
102
|
import { r as resolveNavRoot } from "./link-DuuA2eCL.js";
|
|
103
|
-
import { n as _sfc_main$13, t as _sfc_main$17 } from "./Breadcrumbs-
|
|
103
|
+
import { n as _sfc_main$13, t as _sfc_main$17 } from "./Breadcrumbs-DaxgM0-F.js";
|
|
104
104
|
import { n as _sfc_main$19 } from "./ButtonGroup-CEDeeGkY.js";
|
|
105
105
|
import { A as plainDateSetFirstOfMonth, C as plainDateIsAfter, D as plainDateMax, E as plainDateIsInRange, F as plainDateToday, I as plainDateWeekFieldName, M as plainDateToDate, N as plainDateToISO, O as plainDateMin, P as plainDateToInstant, S as plainDateGetWeekNumber, T as plainDateIsEqual, _ as plainDateDiffDays, a as DATE_FORMAT_SHORT_WITH_WEEKDAY, b as plainDateFromISO, c as DATE_FORMAT_WITH_WEEKDAY, d as getDaysInMonth, f as getTimeZoneParts, g as plainDateDayOfWeek, h as plainDateCreate, i as DATE_FORMAT_SHORT, j as plainDateSetStartOfWeek, k as plainDateSetEndOfWeekExclusive, l as SHARED_DATE_FORMAT_OPTIONS, m as plainDateAddMonths, n as DATE_FORMAT_MONTH_ONLY, o as DATE_FORMAT_SHORT_WITH_YEAR, p as plainDateAddDays, r as DATE_FORMAT_MONTH_YEAR, s as DATE_FORMAT_WEEKDAY_ONLY, t as DATE_FORMAT_LONG, u as formatSharedDate, v as plainDateFormat, w as plainDateIsBefore, x as plainDateFromInstant, y as plainDateFromDate } from "./plainDate-CaTDErKr.js";
|
|
106
106
|
import { t as calendarMessages } from "./calendar-Cs2vIPsV.js";
|
|
@@ -137,16 +137,16 @@ import { i as githubDark, n as SYNTAX_TOKEN_KEYS, r as defineSyntaxTheme, t as D
|
|
|
137
137
|
import { _ as CodeLineTokens, a as catppuccinMocha, c as githubLight, d as nord, f as oneDarkPro, g as tokyoNightLight, h as tokyoNight, i as catppuccinLatte, l as lightSyntaxPresets, m as solarizedLight, n as _sfc_main$161, o as darkSyntaxPresets, p as oneLight, r as allSyntaxPresets, s as dracula, t as useSyntaxTheme, u as monokai } from "./Code-qHt8uZqb.js";
|
|
138
138
|
import { n as _sfc_main$51, r as useCollapsible, t as _sfc_main$52 } from "./Collapsible-DfVihLCR.js";
|
|
139
139
|
import { t as commandPaletteMessages } from "./command-palette-g8Mnclgo.js";
|
|
140
|
-
import { a as _sfc_main$56, i as _sfc_main$57, n as _sfc_main$59, o as _sfc_main$55, r as _sfc_main$58, s as _sfc_main$54, t as _sfc_main$53 } from "./CommandPalette-
|
|
140
|
+
import { a as _sfc_main$56, i as _sfc_main$57, n as _sfc_main$59, o as _sfc_main$55, r as _sfc_main$58, s as _sfc_main$54, t as _sfc_main$53 } from "./CommandPalette-CWaKVNGZ.js";
|
|
141
141
|
import { t as inputMessages } from "./input-DUSvqqG_.js";
|
|
142
142
|
import { t as selectorMessages } from "./selector-BmGLjm94.js";
|
|
143
143
|
import { t as popoverMessages } from "./popover-DxCyd_Ua.js";
|
|
144
|
-
import { n as usePopover, t as _sfc_main$131 } from "./Popover-
|
|
145
|
-
import { n as _sfc_main$60 } from "./ComplexSelector-
|
|
144
|
+
import { n as usePopover, t as _sfc_main$131 } from "./Popover-CTCWhA_K.js";
|
|
145
|
+
import { n as _sfc_main$60 } from "./ComplexSelector-D2QRdM57.js";
|
|
146
146
|
import { t as contextMenuMessages } from "./context-menu-9i6CObx3.js";
|
|
147
|
-
import { a as _sfc_main$62, i as _sfc_main$63, n as _sfc_main$65, r as _sfc_main$64, t as _sfc_main$61 } from "./ContextMenu-
|
|
147
|
+
import { a as _sfc_main$62, i as _sfc_main$63, n as _sfc_main$65, r as _sfc_main$64, t as _sfc_main$61 } from "./ContextMenu-D-G53u7B.js";
|
|
148
148
|
import { t as dateInputMessages } from "./date-input-CRdc2H3c.js";
|
|
149
|
-
import { t as _sfc_main$66 } from "./DateInput-
|
|
149
|
+
import { t as _sfc_main$66 } from "./DateInput-BHSp4fZS.js";
|
|
150
150
|
import { t as formatInstant } from "./formatInstant-CjCwl6JS.js";
|
|
151
151
|
import { a as pickerPresentationFromNativePicker, c as resolvePickerPresentation, i as effectivePickerPresentation, l as isLocaleDayFirst, o as presentationFromNativePicker, r as effectiveInputPresentation, s as resolveInputPresentation, t as DEFAULT_INPUT_PRESENTATION, u as parseDateInput } from "./inputPresentation-DES0JwkL.js";
|
|
152
152
|
import { n as alertDialogMessages, t as tokenizerMessages } from "./tokenizer-C1y-55Ft.js";
|
|
@@ -176,14 +176,14 @@ import { t as treeListMessages } from "./tree-list-NZ1EZhtd.js";
|
|
|
176
176
|
import { t as typeaheadMessages } from "./typeahead-BgfLP7vR.js";
|
|
177
177
|
import { n as useLocale, r as useCollator, t as useTranslator } from "./locale-CHA0DNw5.js";
|
|
178
178
|
import "./DateInput/index.js";
|
|
179
|
-
import { t as _sfc_main$67 } from "./DateRangeInput-
|
|
179
|
+
import { t as _sfc_main$67 } from "./DateRangeInput-DP1QWK_6.js";
|
|
180
180
|
import "./DateRangeInput/index.js";
|
|
181
|
-
import { t as _sfc_main$68 } from "./DateTimeInput-
|
|
181
|
+
import { t as _sfc_main$68 } from "./DateTimeInput-Bgx9lgWb.js";
|
|
182
182
|
import "./DateTimeInput/index.js";
|
|
183
|
-
import { t as _sfc_main$70 } from "./DialogHeader-
|
|
184
|
-
import { n as useDialogContext, t as useImperativeDialog } from "./Dialog-
|
|
183
|
+
import { t as _sfc_main$70 } from "./DialogHeader-C3Mc580J.js";
|
|
184
|
+
import { n as useDialogContext, t as useImperativeDialog } from "./Dialog-DCKT1dWC.js";
|
|
185
185
|
import "./Divider/index.js";
|
|
186
|
-
import { n as _sfc_main$72, t as _sfc_main$73 } from "./Drawer-
|
|
186
|
+
import { n as _sfc_main$72, t as _sfc_main$73 } from "./Drawer-CnFTUjln.js";
|
|
187
187
|
import "./DropdownMenu/index.js";
|
|
188
188
|
import { t as _sfc_main$79 } from "./EmptyState-DU7uOI2G.js";
|
|
189
189
|
import "./EmptyState/index.js";
|
|
@@ -216,7 +216,7 @@ import { n as _sfc_main$112, t as _sfc_main$113 } from "./MetadataList-n3YXiP4a.
|
|
|
216
216
|
import "./MobileNav/index.js";
|
|
217
217
|
import { t as _sfc_main$116 } from "./MoreMenu-CGTbwTyw.js";
|
|
218
218
|
import { t as _sfc_main$185 } from "./Token-Dk6MPUkH.js";
|
|
219
|
-
import { n as SELECT_ALL_VALUE, r as flattenOptions, t as _sfc_main$117 } from "./MultiSelector-
|
|
219
|
+
import { n as SELECT_ALL_VALUE, r as flattenOptions, t as _sfc_main$117 } from "./MultiSelector-DUQMNBoZ.js";
|
|
220
220
|
import "./MultiSelector/index.js";
|
|
221
221
|
import { t as _sfc_main$121 } from "./NavItem-thEKXyJA.js";
|
|
222
222
|
import { t as _sfc_main$122 } from "./NavItem-DTO-BEfc.js";
|
|
@@ -228,17 +228,17 @@ import "./NumberInput/index.js";
|
|
|
228
228
|
import { i as _sfc_main$126, n as useOutlineFromDOM, r as parseOutlineFromMarkdown, t as useOutlineFromMarkdown } from "./Outline-D4DJTfKp.js";
|
|
229
229
|
import { t as _sfc_main$127 } from "./OverflowList-D9Ua6e3-.js";
|
|
230
230
|
import { n as useOverlay, r as _sfc_main$129, t as _sfc_main$128 } from "./Overlay-DKILTHxI.js";
|
|
231
|
-
import { t as _sfc_main$130 } from "./Pagination-
|
|
232
|
-
import { t as _sfc_main$146 } from "./Selector-
|
|
231
|
+
import { t as _sfc_main$130 } from "./Pagination-DBikmHyn.js";
|
|
232
|
+
import { t as _sfc_main$146 } from "./Selector-BvxQXUYr.js";
|
|
233
233
|
import "./Pagination/index.js";
|
|
234
234
|
import "./Popover/index.js";
|
|
235
|
-
import { a as searchPowerSearchFields, c as formatDateAbsolute, d as createPowerSearchLookup, f as completePowerSearchFilter, i as _sfc_main$132, l as formatDateAbsoluteCompact, n as createPowerSearchConfig, o as resolveEditorPlacement, r as usePowerSearchConfig, s as resolveOperatorLabel, t as applyPowerSearchFilters, u as formatFilterValue } from "./PowerSearch-
|
|
235
|
+
import { a as searchPowerSearchFields, c as formatDateAbsolute, d as createPowerSearchLookup, f as completePowerSearchFilter, i as _sfc_main$132, l as formatDateAbsoluteCompact, n as createPowerSearchConfig, o as resolveEditorPlacement, r as usePowerSearchConfig, s as resolveOperatorLabel, t as applyPowerSearchFilters, u as formatFilterValue } from "./PowerSearch-CTNFHNnr.js";
|
|
236
236
|
import { a as _sfc_main$198 } from "./useTypeaheadMenuConfig-B14t0HGE.js";
|
|
237
|
-
import { t as _sfc_main$186 } from "./Tokenizer-
|
|
237
|
+
import { t as _sfc_main$186 } from "./Tokenizer-D-wBxbBE.js";
|
|
238
238
|
import { t as _sfc_main$175 } from "./TextInput-cotkU2bC.js";
|
|
239
239
|
import { n as _sfc_main$134, t as _sfc_main$135 } from "./RadioGroup-OLFNjvKt.js";
|
|
240
240
|
import { n as _sfc_main$137, t as _sfc_main$138 } from "./RadioListItem-BAEF0vc8.js";
|
|
241
|
-
import { t as _sfc_main$178 } from "./TimeInput-
|
|
241
|
+
import { t as _sfc_main$178 } from "./TimeInput-Bqo_oHMl.js";
|
|
242
242
|
import { n as _sfc_main$9, t as _sfc_main$197 } from "./Typeahead-Cx086Mmv.js";
|
|
243
243
|
import { t as _sfc_main$133 } from "./ProgressBar-B2ds3imd.js";
|
|
244
244
|
import "./Radio/index.js";
|
|
@@ -261,7 +261,7 @@ import { n as _sfc_main$156, r as _sfc_main$87, t as _sfc_main$199 } from "./Sta
|
|
|
261
261
|
import { t as _sfc_main$157 } from "./StatusDot-Jw676Z_6.js";
|
|
262
262
|
import { n as _sfc_main$158, t as _sfc_main$159 } from "./Stepper-3oMdVe0c.js";
|
|
263
263
|
import { t as _sfc_main$160 } from "./Switch-COKmqJQU.js";
|
|
264
|
-
import { A as applyTableFilters, B as useTableColumnResize, C as useTableRowExpansion, D as buildGroupedRows, E as useTableInfiniteScroll, F as columnResizeDirectionSign, G as pixel, H as cellText, I as columnResizeMinWidth, J as resolveColumnWidths, K as proportional, L as columnResizeStep, M as useTableFiltering, N as useTableColumnSettings, O as isTableGroupHeader, P as useTableColumnSettingsState, R as isProportionalColumnWidth, S as useTableRowIndex, T as isInteractiveRowClick, U as generateColumns, V as capitalize, W as paginateData, Y as sortRows, _ as useTableSortable, a as _sfc_main$168, b as useTableSelectionState, c as _sfc_main$165, d as flattenTree, f as useTableTreeData, g as useTableStickyColumns, h as stickyOffsets, i as _sfc_main$169, j as useTableFilterState, k as useTableGroupedRows, l as useTableColumnsVirtualization, m as resolveStickySide, n as _sfc_main$171, o as _sfc_main$167, p as useTableTreeState, q as resolveColumnFloorWidths, r as _sfc_main$170, s as _sfc_main$166, t as _sfc_main$172, u as useTableRowsVirtualization, v as useTableSortableState, w as useTablePagination, x as useTableRowStatus, y as useTableSelection, z as resizeColumnWidths } from "./Table-
|
|
264
|
+
import { A as applyTableFilters, B as useTableColumnResize, C as useTableRowExpansion, D as buildGroupedRows, E as useTableInfiniteScroll, F as columnResizeDirectionSign, G as pixel, H as cellText, I as columnResizeMinWidth, J as resolveColumnWidths, K as proportional, L as columnResizeStep, M as useTableFiltering, N as useTableColumnSettings, O as isTableGroupHeader, P as useTableColumnSettingsState, R as isProportionalColumnWidth, S as useTableRowIndex, T as isInteractiveRowClick, U as generateColumns, V as capitalize, W as paginateData, Y as sortRows, _ as useTableSortable, a as _sfc_main$168, b as useTableSelectionState, c as _sfc_main$165, d as flattenTree, f as useTableTreeData, g as useTableStickyColumns, h as stickyOffsets, i as _sfc_main$169, j as useTableFilterState, k as useTableGroupedRows, l as useTableColumnsVirtualization, m as resolveStickySide, n as _sfc_main$171, o as _sfc_main$167, p as useTableTreeState, q as resolveColumnFloorWidths, r as _sfc_main$170, s as _sfc_main$166, t as _sfc_main$172, u as useTableRowsVirtualization, v as useTableSortableState, w as useTablePagination, x as useTableRowStatus, y as useTableSelection, z as resizeColumnWidths } from "./Table-3GiSElIS.js";
|
|
265
265
|
import { t as _sfc_main$187 } from "./Toolbar-BHkPxDxA.js";
|
|
266
266
|
import { n as _sfc_main$163, r as _sfc_main$162, t as _sfc_main$164 } from "./TabList-DjRutwar.js";
|
|
267
267
|
import "./Text/index.js";
|
|
@@ -273,7 +273,7 @@ import { t as _sfc_main$177 } from "./Thumbnail-oqrKH-co.js";
|
|
|
273
273
|
import "./TimeInput/index.js";
|
|
274
274
|
import { n as getPresentation, t as _sfc_main$179 } from "./Timer-CO-JNJTI.js";
|
|
275
275
|
import { n as formatTooltipLines, r as formatRelativeTime, t as _sfc_main$180 } from "./Timestamp-CfzqAAX2.js";
|
|
276
|
-
import { n as _sfc_main$182, r as _sfc_main$181, t as useToast } from "./Toast-
|
|
276
|
+
import { n as _sfc_main$182, r as _sfc_main$181, t as useToast } from "./Toast-BSay0eZw.js";
|
|
277
277
|
import { n as _sfc_main$184, r as _sfc_main$183 } from "./ToggleButton-Ditxp2jT.js";
|
|
278
278
|
import { t as TOKEN_COLORS } from "./Token-BdRzlXzm.js";
|
|
279
279
|
import "./Tokenizer/index.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineAsyncComponent } from "vue";
|
|
2
2
|
//#region src/BottomSheet/lazyBottomSheet.ts
|
|
3
3
|
function loadBottomSheet() {
|
|
4
|
-
return import("./BottomSheet-
|
|
4
|
+
return import("./BottomSheet-Cr6FacYP.js").then((n) => n.t);
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* 按需加载的 BottomSheet:只在底部弹层真正进入组件树时请求,只用锚定浮层的页面
|
|
@@ -59,6 +59,21 @@ function createModalOutletHandle() {
|
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
|
+
* 非模态的顶层元素(无遮罩的抽屉)每进入一次顶层就加一。
|
|
63
|
+
*
|
|
64
|
+
* 顶层里后进去的画在上面。toast 视口比抽屉先进顶层时会被它盖住,所以抽屉进去后
|
|
65
|
+
* 报一声,视口重新进一次顶层,又排回最上面。模态层不用报:它们走上面的挂载点清单。
|
|
66
|
+
*/
|
|
67
|
+
const topLayerEntries = shallowRef(0);
|
|
68
|
+
/** 非模态的顶层元素刚进入顶层时调用。 */
|
|
69
|
+
function notifyTopLayerEntry() {
|
|
70
|
+
topLayerEntries.value++;
|
|
71
|
+
}
|
|
72
|
+
/** 非模态顶层进入的计数。只用来监听变化。 */
|
|
73
|
+
function useTopLayerEntries() {
|
|
74
|
+
return topLayerEntries;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
62
77
|
* 等模态对话框把进场动画跑完。
|
|
63
78
|
*
|
|
64
79
|
* 动画里的 `transform` 会让对话框成为子元素 `position: fixed` 的参照物,而顶层
|
|
@@ -77,4 +92,4 @@ function whenModalSettled(element, timeout = 600) {
|
|
|
77
92
|
return Promise.race([settled, capped]);
|
|
78
93
|
}
|
|
79
94
|
//#endregion
|
|
80
|
-
export {
|
|
95
|
+
export { whenModalSettled as a, useTopLayerEntries as i, notifyTopLayerEntry as n, useActiveModalOutlet as r, createModalOutletHandle as t };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { r as didOutsideDismissInGesture, s as currentGesture } from "./layerDepth-DRfWATFr.js";
|
|
2
|
+
//#region src/layer/useBackdropPress.ts
|
|
3
|
+
/**
|
|
4
|
+
* 模态框「点遮罩关闭」的共用判断。Dialog(含 Drawer、CommandPalette)都走这里。
|
|
5
|
+
*
|
|
6
|
+
* 原生 `<dialog>` 的遮罩没有自己的元素,点在遮罩上的 click 目标就是 dialog 本身。
|
|
7
|
+
* 只看 click 不够,两种情况要排除:
|
|
8
|
+
*
|
|
9
|
+
* - 按下在框里、松手在遮罩上(拖选文字、拖滑块拖出了边)。浏览器把这次 click
|
|
10
|
+
* 发给两者共同的祖先,也就是 dialog,看起来像点了遮罩。只有按下和松手都在
|
|
11
|
+
* 遮罩上才算。
|
|
12
|
+
* - 这一下按压已经把框里打开的弹出框当作「点外面」关掉了。这一下是弹出框的,
|
|
13
|
+
* 模态框留着;再点一次遮罩才关它,和连按两次 Escape 一样。
|
|
14
|
+
*/
|
|
15
|
+
function useBackdropPress(getHost, onDismiss) {
|
|
16
|
+
let downOnBackdrop = false;
|
|
17
|
+
let downGesture = null;
|
|
18
|
+
function onPointerDown(event) {
|
|
19
|
+
downOnBackdrop = event.target === getHost();
|
|
20
|
+
downGesture = currentGesture();
|
|
21
|
+
}
|
|
22
|
+
function onClick(event) {
|
|
23
|
+
const startedOnBackdrop = downOnBackdrop;
|
|
24
|
+
const gesture = downGesture;
|
|
25
|
+
downOnBackdrop = false;
|
|
26
|
+
downGesture = null;
|
|
27
|
+
if (event.target !== getHost() || !startedOnBackdrop) return;
|
|
28
|
+
if (gesture != null && didOutsideDismissInGesture(gesture)) return;
|
|
29
|
+
onDismiss();
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
onPointerDown,
|
|
33
|
+
onClick
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/Dialog/context.ts
|
|
38
|
+
const DIALOG_CONTEXT_KEY = Symbol("astryx-dialog");
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/Dialog/initialFocus.ts
|
|
41
|
+
/**
|
|
42
|
+
* 对话框打开时第一个拿到焦点的元素。
|
|
43
|
+
*
|
|
44
|
+
* 先看明确要求初始焦点的元素(`data-autofocus`),再看标题的默认要求
|
|
45
|
+
* (`data-dialog-default-focus`)。一个要求属于离它最近的那个对话框:嵌套的子对话框
|
|
46
|
+
* 里的要求是子对话框的,哪怕它关着也可能还排着版,焦点落进去就没人看得见了。
|
|
47
|
+
* 藏在 `hidden`、`inert` 里或者被禁用的要求不算数,顺延给下一个。
|
|
48
|
+
*/
|
|
49
|
+
function findInitialFocusTarget(dialog) {
|
|
50
|
+
return [...dialog.querySelectorAll("[data-autofocus]"), ...dialog.querySelectorAll("[data-dialog-default-focus]")].find((request) => isEligible(request, dialog)) ?? null;
|
|
51
|
+
}
|
|
52
|
+
function isEligible(request, dialog) {
|
|
53
|
+
if (request.closest("dialog") !== dialog) return false;
|
|
54
|
+
if (request.matches(":disabled")) return false;
|
|
55
|
+
const hidden = request.closest("[hidden], [inert]");
|
|
56
|
+
return hidden == null || !dialog.contains(hidden);
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/Dialog/position.ts
|
|
60
|
+
function formatPosition(value) {
|
|
61
|
+
return typeof value === "number" ? `${value}px` : value;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* 把 {@link DialogPosition} 映射为 CSS 偏移。未设置的偏移回退为 `auto`。
|
|
65
|
+
*/
|
|
66
|
+
function resolveDialogPositionOffsets(position) {
|
|
67
|
+
const { top, bottom, start, end } = position;
|
|
68
|
+
return {
|
|
69
|
+
top: top !== void 0 ? formatPosition(top) : "auto",
|
|
70
|
+
bottom: bottom !== void 0 ? formatPosition(bottom) : "auto",
|
|
71
|
+
insetInlineStart: start !== void 0 ? formatPosition(start) : "auto",
|
|
72
|
+
insetInlineEnd: end !== void 0 ? formatPosition(end) : "auto"
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function formatDialogSize(value) {
|
|
76
|
+
return typeof value === "number" ? `${value}px` : value;
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
export { useBackdropPress as a, DIALOG_CONTEXT_KEY as i, resolveDialogPositionOffsets as n, findInitialFocusTarget as r, formatDialogSize as t };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
//#region src/BottomSheet/sheetTransition.ts
|
|
2
|
+
const BACKSTOP_BUFFER_MS = 50;
|
|
3
|
+
function parseTransitionTime(value) {
|
|
4
|
+
const normalized = value.trim();
|
|
5
|
+
if (!/^-?(?:\d+|\d*\.\d+)(?:ms|s)$/.test(normalized)) return null;
|
|
6
|
+
const time = Number.parseFloat(normalized);
|
|
7
|
+
return normalized.endsWith("ms") ? time : time * 1e3;
|
|
8
|
+
}
|
|
9
|
+
/** Longest transition duration + delay that applies to `property`, in ms. */
|
|
10
|
+
function transitionMsFor(element, property) {
|
|
11
|
+
const style = getComputedStyle(element);
|
|
12
|
+
const properties = (style.transitionProperty || "").split(",").map((value) => value.trim());
|
|
13
|
+
const durations = (style.transitionDuration || "").split(",").map(parseTransitionTime);
|
|
14
|
+
const delays = (style.transitionDelay || "").split(",").map((value) => parseTransitionTime(value) ?? 0);
|
|
15
|
+
return properties.reduce((longest, name, index) => {
|
|
16
|
+
if (name !== property && name !== "all") return longest;
|
|
17
|
+
const duration = durations[index % durations.length];
|
|
18
|
+
if (duration == null) return longest;
|
|
19
|
+
return Math.max(longest, duration + (delays[index % delays.length] ?? 0));
|
|
20
|
+
}, 0);
|
|
21
|
+
}
|
|
22
|
+
/** Whether a CSS transition of `property` still runs on `element`. */
|
|
23
|
+
function hasRunningTransition(element, property) {
|
|
24
|
+
return (element.getAnimations?.() ?? []).some((animation) => animation.transitionProperty === property && (animation.playState === "running" || animation.playState === "paused"));
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Calls `complete` when `element` finishes transitioning `property`: on the
|
|
28
|
+
* matching `transitionend`/`transitioncancel`, or on a timer backstop so a
|
|
29
|
+
* missed event can never strand the caller. Without a resolved duration — the
|
|
30
|
+
* case in a stylesheet-free test environment — it completes immediately.
|
|
31
|
+
*/
|
|
32
|
+
function waitForTransition(element, property, complete) {
|
|
33
|
+
if (element == null) {
|
|
34
|
+
complete();
|
|
35
|
+
return () => {};
|
|
36
|
+
}
|
|
37
|
+
let done = false;
|
|
38
|
+
let timer = null;
|
|
39
|
+
let backstopMs = 0;
|
|
40
|
+
let onTransitionEnd = () => {};
|
|
41
|
+
const finish = () => {
|
|
42
|
+
if (done) return;
|
|
43
|
+
done = true;
|
|
44
|
+
if (timer != null) clearTimeout(timer);
|
|
45
|
+
element.removeEventListener("transitionend", onTransitionEnd);
|
|
46
|
+
element.removeEventListener("transitioncancel", onTransitionEnd);
|
|
47
|
+
complete();
|
|
48
|
+
};
|
|
49
|
+
onTransitionEnd = (event) => {
|
|
50
|
+
if (event.target !== element || event.propertyName !== property) return;
|
|
51
|
+
if (event.type === "transitioncancel" && hasRunningTransition(element, property)) {
|
|
52
|
+
if (timer != null) {
|
|
53
|
+
clearTimeout(timer);
|
|
54
|
+
timer = setTimeout(finish, backstopMs);
|
|
55
|
+
}
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
finish();
|
|
59
|
+
};
|
|
60
|
+
const duration = transitionMsFor(element, property);
|
|
61
|
+
if (duration <= 0) {
|
|
62
|
+
finish();
|
|
63
|
+
return () => {};
|
|
64
|
+
}
|
|
65
|
+
element.addEventListener("transitionend", onTransitionEnd);
|
|
66
|
+
element.addEventListener("transitioncancel", onTransitionEnd);
|
|
67
|
+
backstopMs = duration + BACKSTOP_BUFFER_MS;
|
|
68
|
+
timer = setTimeout(finish, backstopMs);
|
|
69
|
+
return () => {
|
|
70
|
+
if (timer != null) clearTimeout(timer);
|
|
71
|
+
element.removeEventListener("transitionend", onTransitionEnd);
|
|
72
|
+
element.removeEventListener("transitioncancel", onTransitionEnd);
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
76
|
+
export { waitForTransition as t };
|
package/package.json
CHANGED
package/styles/drawer.css
CHANGED
|
@@ -1,59 +1,156 @@
|
|
|
1
1
|
@layer astryx.components {
|
|
2
2
|
/*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* 抽屉面板就是原生 <dialog> 本身:高度撑满视口,贴在行首或行尾,三条边和视口齐平,所以是直角。
|
|
4
|
+
* 模态时在 showModal() 的顶层里,非模态时在 popover 的顶层里。
|
|
5
|
+
*
|
|
6
|
+
* 显示由组件的 data-rendered 管,不靠 display 的离散过渡:面板要在离开顶层的同一轮里停止绘制,
|
|
7
|
+
* 否则带 transform 的祖先会成为它 position: fixed 的参照物,面板会在页面里闪一帧。
|
|
8
|
+
*
|
|
9
|
+
* overflow 用 clip 不用 hidden:hidden 会把面板变成滚动容器,Chromium 会把手指在非模态抽屉
|
|
10
|
+
* 旁边页面上的拖动扣在它的 overscroll 约束里,页面就滚不动了。内容区自己负责滚动。
|
|
5
11
|
*/
|
|
6
12
|
.astryx-drawer {
|
|
13
|
+
--_drawer-duration: var(--astryx-duration-medium, 300ms);
|
|
14
|
+
--_drawer-easing: var(--astryx-ease-standard, cubic-bezier(0.24, 1, 0.4, 1));
|
|
15
|
+
|
|
7
16
|
box-sizing: border-box;
|
|
17
|
+
position: fixed;
|
|
18
|
+
inset-block: 0;
|
|
19
|
+
width: var(--_drawer-width, 400px);
|
|
20
|
+
max-width: 100dvw;
|
|
8
21
|
height: 100dvh;
|
|
9
|
-
max-height:
|
|
22
|
+
max-height: none;
|
|
23
|
+
margin: 0;
|
|
24
|
+
padding: 0;
|
|
25
|
+
border: 0;
|
|
10
26
|
border-radius: 0;
|
|
27
|
+
display: none;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
overflow: clip;
|
|
30
|
+
outline: none;
|
|
31
|
+
background-color: var(--astryx-color-background-surface, #fff);
|
|
32
|
+
color: var(--astryx-color-text-primary, #171717);
|
|
33
|
+
box-shadow: var(--astryx-shadow-high, 0 12px 32px rgb(0 0 0 / 20%));
|
|
34
|
+
transition: transform var(--_drawer-duration) var(--_drawer-easing);
|
|
11
35
|
}
|
|
12
36
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
.astryx-drawer {
|
|
16
|
-
max-width: calc(100vw - 56px);
|
|
17
|
-
}
|
|
37
|
+
.astryx-drawer[data-rendered] {
|
|
38
|
+
display: flex;
|
|
18
39
|
}
|
|
19
40
|
|
|
20
|
-
/*
|
|
21
|
-
.astryx-drawer {
|
|
22
|
-
|
|
41
|
+
/* 关着时停在贴着的那一边外面,退场也滑回这里。方向跟着 DOM 的 dir 走,RTL 自动镜像。 */
|
|
42
|
+
.astryx-drawer--end {
|
|
43
|
+
inset-inline-end: 0;
|
|
44
|
+
inset-inline-start: auto;
|
|
45
|
+
border-inline-start: var(--astryx-border-width, 1px) solid var(--astryx-color-border, light-dark(#ebebeb, #ffffff1a));
|
|
46
|
+
transform: translateX(100%);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.astryx-drawer--end:dir(rtl) {
|
|
50
|
+
transform: translateX(-100%);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.astryx-drawer--start {
|
|
54
|
+
inset-inline-start: 0;
|
|
55
|
+
inset-inline-end: auto;
|
|
56
|
+
border-inline-end: var(--astryx-border-width, 1px) solid var(--astryx-color-border, light-dark(#ebebeb, #ffffff1a));
|
|
57
|
+
transform: translateX(-100%);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.astryx-drawer--start:dir(rtl) {
|
|
61
|
+
transform: translateX(100%);
|
|
23
62
|
}
|
|
24
63
|
|
|
25
64
|
/*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* `--astryx-dialog-padding`,这里在它们之间插入抽屉自己的那一层。
|
|
65
|
+
* 打开后停在 none 而不是 translateX(0):带 transform 的面板会成为里面 fixed 浮层(提示、菜单)的参照物,
|
|
66
|
+
* 浮层就会错位、被裁掉。none 和 translateX 之间照样能过渡。
|
|
29
67
|
*/
|
|
30
|
-
.astryx-drawer
|
|
31
|
-
|
|
68
|
+
.astryx-drawer[data-open] {
|
|
69
|
+
transform: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@starting-style {
|
|
73
|
+
.astryx-drawer--end[data-open] {
|
|
74
|
+
transform: translateX(100%);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.astryx-drawer--end[data-open]:dir(rtl) {
|
|
78
|
+
transform: translateX(-100%);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.astryx-drawer--start[data-open] {
|
|
82
|
+
transform: translateX(-100%);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.astryx-drawer--start[data-open]:dir(rtl) {
|
|
86
|
+
transform: translateX(100%);
|
|
87
|
+
}
|
|
32
88
|
}
|
|
33
89
|
|
|
34
|
-
|
|
35
|
-
|
|
90
|
+
/* 手机上留一条 56px 的缝露出后面的页面,同时不超过 width。 */
|
|
91
|
+
@media (max-width: 640px) {
|
|
92
|
+
.astryx-drawer {
|
|
93
|
+
width: min(var(--_drawer-width, 400px), calc(100dvw - 56px));
|
|
94
|
+
}
|
|
36
95
|
}
|
|
37
96
|
|
|
38
|
-
|
|
39
|
-
|
|
97
|
+
/* 遮罩是原生 ::backdrop,和面板同时长、同曲线淡入淡出。不加模糊:整屏模糊重绘太贵。 */
|
|
98
|
+
.astryx-drawer--scrim::backdrop {
|
|
99
|
+
background-color: var(--astryx-color-overlay, rgb(0 0 0 / 50%));
|
|
100
|
+
opacity: 0;
|
|
101
|
+
transition: opacity var(--astryx-duration-medium, 300ms) var(--astryx-ease-standard, cubic-bezier(0.24, 1, 0.4, 1));
|
|
40
102
|
}
|
|
41
103
|
|
|
42
|
-
.astryx-drawer--
|
|
43
|
-
|
|
104
|
+
.astryx-drawer--scrim[data-open]::backdrop {
|
|
105
|
+
opacity: 1;
|
|
44
106
|
}
|
|
45
107
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
108
|
+
@starting-style {
|
|
109
|
+
.astryx-drawer--scrim[data-open]::backdrop {
|
|
110
|
+
opacity: 0;
|
|
111
|
+
}
|
|
49
112
|
}
|
|
50
113
|
|
|
51
|
-
|
|
52
|
-
|
|
114
|
+
/*
|
|
115
|
+
* 内容区:可滚动,也是抽屉的容器。四边内边距各用一个变量,同时公布给 Layout 这类会撑出去的子元素。
|
|
116
|
+
* 主题给抽屉写的内边距走 `--astryx-drawer-padding`,没写就沿用对话框的,再没有就是 spacing-4。
|
|
117
|
+
* 块末尾再加上手势条的安全区,最后一行内容不会贴到它;公布出去的变量不含安全区。
|
|
118
|
+
*/
|
|
119
|
+
.astryx-drawer__content {
|
|
120
|
+
--_drawer-pad: var(--_drawer-padding, var(--astryx-drawer-padding, var(--astryx-dialog-padding, var(--astryx-spacing-4, 1rem))));
|
|
121
|
+
--container-padding-block-start: var(--_drawer-pad);
|
|
122
|
+
--container-padding-block-end: var(--_drawer-pad);
|
|
123
|
+
--container-padding-inline-start: var(--_drawer-pad);
|
|
124
|
+
--container-padding-inline-end: var(--_drawer-pad);
|
|
125
|
+
--layout-padding-own-outer-x: initial;
|
|
126
|
+
--layout-padding-own-outer-y: initial;
|
|
127
|
+
--layout-padding-outer-x: var(--_drawer-pad);
|
|
128
|
+
--layout-padding-outer-y: var(--_drawer-pad);
|
|
129
|
+
--layout-padding-inner-x: var(--_drawer-pad);
|
|
130
|
+
--layout-padding-inner-y: var(--_drawer-pad);
|
|
131
|
+
--_container-corner-block-start: 0px;
|
|
132
|
+
--_container-corner-block-end: 0px;
|
|
133
|
+
|
|
134
|
+
box-sizing: border-box;
|
|
135
|
+
display: flex;
|
|
136
|
+
flex: 1 1 auto;
|
|
137
|
+
flex-direction: column;
|
|
138
|
+
width: 100%;
|
|
139
|
+
min-height: 0;
|
|
140
|
+
padding: var(--_drawer-pad);
|
|
141
|
+
padding-block-end: calc(var(--_drawer-pad) + env(safe-area-inset-bottom, 0px));
|
|
142
|
+
overflow-x: hidden;
|
|
143
|
+
overflow-y: auto;
|
|
144
|
+
overscroll-behavior: contain;
|
|
145
|
+
touch-action: pan-y;
|
|
146
|
+
outline: none;
|
|
147
|
+
/* 内容区自己铺满表面色:主题塞进阴影里的内圈描边(暗色模式常见)会被均匀盖住,面板只剩贴边那条边框。 */
|
|
148
|
+
background-color: var(--astryx-color-background-surface, #fff);
|
|
53
149
|
}
|
|
54
150
|
|
|
55
151
|
.astryx-drawer-body {
|
|
56
152
|
display: flex;
|
|
153
|
+
flex: 1 0 auto;
|
|
57
154
|
flex-direction: column;
|
|
58
155
|
gap: var(--astryx-spacing-3, 12px);
|
|
59
156
|
min-block-size: 0;
|
|
@@ -63,33 +160,28 @@
|
|
|
63
160
|
display: flex;
|
|
64
161
|
justify-content: end;
|
|
65
162
|
gap: var(--astryx-spacing-2, 8px);
|
|
163
|
+
margin-block-start: var(--astryx-spacing-3, 12px);
|
|
66
164
|
}
|
|
67
165
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
to {
|
|
74
|
-
transform: translateX(0);
|
|
75
|
-
}
|
|
166
|
+
/* 浮层挂载点。它自己不占地方,里面的浮层都是 fixed 定位。 */
|
|
167
|
+
.astryx-drawer__layer-host {
|
|
168
|
+
display: contents;
|
|
76
169
|
}
|
|
77
170
|
|
|
171
|
+
/* 减少动效时和原版一样把滑动压到 0.01s:几乎瞬间到位,过渡仍然会结束,退场照常收尾。 */
|
|
78
172
|
@media (prefers-reduced-motion: reduce) {
|
|
79
|
-
/* 手机上留一条缝露出后面的页面,和原版一样是 56px。 */
|
|
80
|
-
@media (max-width: 640px) {
|
|
81
173
|
.astryx-drawer {
|
|
82
|
-
|
|
174
|
+
transition-duration: 0.01s;
|
|
83
175
|
}
|
|
84
|
-
}
|
|
85
176
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
177
|
+
.astryx-drawer--scrim::backdrop {
|
|
178
|
+
transition-duration: 0.01s;
|
|
179
|
+
}
|
|
89
180
|
}
|
|
90
181
|
|
|
91
|
-
|
|
92
|
-
|
|
182
|
+
@media (forced-colors: active) {
|
|
183
|
+
.astryx-drawer {
|
|
184
|
+
border-inline: 1px solid CanvasText;
|
|
93
185
|
}
|
|
94
186
|
}
|
|
95
187
|
}
|