@astryx-vue/core 0.1.1 → 0.2.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-BylcA4vV.js → AlertDialog-ovx4cBjM.js} +1 -1
- package/dist/AppShell/index.d.ts +2 -0
- package/dist/AppShell/index.js +2 -0
- package/dist/AppShell-EiGyPFbA.js +249 -0
- package/dist/AspectRatio/index.d.ts +2 -0
- package/dist/AspectRatio/index.js +2 -0
- package/dist/AspectRatio-Bij7e-tq.js +40 -0
- 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/Button/index.d.ts +1 -1
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/Calendar/index.js +1 -1
- package/dist/{Calendar-BEyrkUtr.js → Calendar-BG7wEsro.js} +1 -1
- package/dist/Carousel/index.d.ts +2 -0
- package/dist/Carousel/index.js +2 -0
- package/dist/Carousel-BTtHkKea.js +363 -0
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-CO3mCs9A.js → Chat-DjNxw5gv.js} +2 -2
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-C86o3XoG.js → CheckboxInput-CMsEE1_4.js} +4 -2
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxList-BL2sDOWK.js → CheckboxList-EsIEXjK_.js} +2 -2
- package/dist/Citation/index.js +1 -1
- package/dist/{Citation-BqwJvw7o.js → Citation-DijdbUUu.js} +2 -2
- package/dist/ClickableCard/index.d.ts +2 -0
- package/dist/ClickableCard/index.js +2 -0
- package/dist/ClickableCard-Bhds4RRe.js +112 -0
- package/dist/Code/index.d.ts +3 -2
- package/dist/Code/index.js +4 -2
- package/dist/Code-yb_KOFtJ.js +299 -0
- package/dist/{CodeBlock-BQdooQy2.js → CodeBlock-CxTb6j9_.js} +8 -2
- package/dist/Collapsible/index.d.ts +2 -2
- package/dist/Collapsible/index.js +2 -2
- package/dist/Collapsible-9MC08X39.js +192 -0
- package/dist/CommandPalette/index.d.ts +2 -0
- package/dist/CommandPalette/index.js +2 -0
- package/dist/CommandPalette-BD2iODF5.js +489 -0
- package/dist/ComplexSelector/index.d.ts +2 -0
- package/dist/ComplexSelector/index.js +2 -0
- package/dist/ComplexSelector-D9iXd5cH.js +293 -0
- package/dist/ContextMenu/index.d.ts +1 -1
- package/dist/ContextMenu/index.js +1 -1
- package/dist/{ContextMenu-dA-ppaRQ.js → ContextMenu-HS_WqYIg.js} +1 -1
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-BOIb0zAp.js → DateInput-DE2TN1Rq.js} +2 -2
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-DLcbgUBi.js → DateRangeInput-1bhPGG2s.js} +4 -4
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-RitYX_Yx.js → DateTimeInput-SnPdgk6P.js} +4 -4
- package/dist/Divider/index.d.ts +1 -1
- package/dist/DropdownMenu/index.js +1 -1
- package/dist/{DropdownMenu-B0gogrvG.js → DropdownMenu-UJGych6v.js} +1 -1
- package/dist/EmptyState/index.js +1 -1
- package/dist/{EmptyState-Bhlqgsg4.js → EmptyState-CUJdTYKV.js} +1 -1
- package/dist/Field/index.js +2 -2
- package/dist/{Field-VlTBsIEo.js → Field-8zRxzDHE.js} +11 -3
- package/dist/{FieldLabel-B1NRyQlS.js → FieldLabel-DmmJyX7w.js} +6 -1
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-CYvEV503.js → FileInput-BQiwE-GB.js} +3 -3
- package/dist/FormLayout/index.d.ts +2 -0
- package/dist/FormLayout/index.js +2 -0
- package/dist/FormLayout-D47FjiOq.js +40 -0
- package/dist/HoverCard/index.d.ts +1 -1
- package/dist/Icon/index.d.ts +3 -0
- package/dist/Icon/index.js +2 -0
- package/dist/{Icon-5MdZQ18k.js → Icon-Dfr4k6-S.js} +1 -1
- package/dist/Layout/index.d.ts +2 -0
- package/dist/Layout/index.js +3 -0
- package/dist/Layout-Bed3kP0M.js +56 -0
- package/dist/LayoutPanel-C34uOq3e.js +358 -0
- package/dist/Lightbox/index.d.ts +2 -0
- package/dist/Lightbox/index.js +2 -0
- package/dist/Lightbox-CshKoB0r.js +384 -0
- 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/Markdown/index.js +1 -1
- package/dist/{Markdown-Dnlp8cVx.js → Markdown-D-Ua055V.js} +2 -2
- package/dist/MetadataList/index.js +1 -1
- package/dist/{MetadataList-DIsqS1Qb.js → MetadataList-sYph_d8Q.js} +1 -1
- package/dist/MobileNav/index.d.ts +1 -1
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-aUZiDwHm.js → MobileNavToggle-DD9D01aj.js} +19 -12
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-BXL6Dqsu.js → MoreMenu-BVrK5kkk.js} +1 -1
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-Bh8or2S6.js → MultiSelector-DiYov9sF.js} +3 -3
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavMenu/index.d.ts +1 -1
- package/dist/NavMenu/index.js +1 -1
- package/dist/{NavMenuItem-mzNQESpB.js → NavMenuItem-B-k7olt5.js} +2 -1
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-C3S-4dIu.js → NumberInput-CTYiQxHq.js} +1 -1
- package/dist/Outline/index.d.ts +2 -0
- package/dist/Outline/index.js +2 -0
- package/dist/Outline-DQfEBxlc.js +325 -0
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-Kr4iJrNV.js → OverflowList-BU5VCntl.js} +2 -2
- package/dist/Overlay/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-BRStpeSB.js → Pagination-HdhtykeF.js} +2 -2
- package/dist/Popover/index.d.ts +2 -1
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-DS6oTV_j.js → RadioGroup-BqjdSCfJ.js} +1 -1
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioList-pwr93I-z.js → RadioList-DI8ujXcT.js} +1 -1
- package/dist/Resizable/index.d.ts +2 -0
- package/dist/Resizable/index.js +2 -0
- package/dist/Resizable-BhSMfO5B.js +261 -0
- package/dist/ScrollableArea/index.d.ts +2 -0
- package/dist/ScrollableArea/index.js +2 -0
- package/dist/ScrollableArea-DQDYjnxO.js +78 -0
- package/dist/Section/index.d.ts +2 -0
- package/dist/Section/index.js +2 -0
- package/dist/Section-C48Wqfc7.js +68 -0
- package/dist/SelectableCard/index.d.ts +2 -0
- package/dist/SelectableCard/index.js +2 -0
- package/dist/SelectableCard-Bj5s_tIN.js +108 -0
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/{Selector-DvEUIVEC.js → Selector-Da-2BO3q.js} +1 -1
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +2 -1
- package/dist/{SideNav-B7LX4RcP.js → SideNav-B-Om6Bz3.js} +49 -27
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-DTnWxtnb.js → Slider-D8h_RKcF.js} +1 -1
- package/dist/Stepper/index.d.ts +2 -0
- package/dist/Stepper/index.js +2 -0
- package/dist/Stepper-BZ_8SEZt.js +423 -0
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-CNdnr5TP.js → Switch-SesQzPGZ.js} +4 -2
- package/dist/TabList/index.d.ts +2 -2
- package/dist/TabList/index.js +2 -2
- package/dist/TabList-Cnc2Hs1H.js +380 -0
- package/dist/Table/index.d.ts +2 -1
- package/dist/Table/index.js +1 -1
- package/dist/{Table-D5zWaITo.js → Table-D-LhAy_J.js} +6 -6
- package/dist/Text/index.d.ts +3 -2
- package/dist/Text/index.js +1 -1
- package/dist/{Text-CKd7e3gK.js → Text-BHVghsWo.js} +12 -2
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-BL0NuB99.js → TextArea-Cv9UVbzS.js} +5 -3
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-B0IKC7g5.js → TextInput-BasnjVvy.js} +5 -3
- package/dist/Theme/index.d.ts +2 -0
- package/dist/Theme/index.js +2 -0
- package/dist/Theme-BuUiiJNr.js +429 -0
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-DMOgWncm.js → Thumbnail-Dc1UpykG.js} +2 -2
- package/dist/{TimeField-DeQ1ukHl.js → TimeField-C7t9Knq9.js} +2 -2
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-jb1nLqZk.js → TimeInput-BXxCOY98.js} +2 -2
- package/dist/Timer/index.d.ts +2 -0
- package/dist/Timer/index.js +2 -0
- package/dist/Timer-B7GV6hqd.js +134 -0
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-DrWwVQBL.js → Timestamp-DlZSmgCJ.js} +3 -3
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/Token/index.d.ts +1 -1
- package/dist/Token/index.js +1 -1
- package/dist/{Token-CV2J94bn.js → Token-wt4e80IM.js} +1 -1
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-DF9r4hTW.js → Tokenizer-nmTqdS9n.js} +3 -3
- 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/TopNav/index.js +1 -1
- package/dist/{TopNav-BH_s3uap.js → TopNav-notp-mJx.js} +58 -32
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-D9cR-w7r.js → TreeList-s1xBQ0qq.js} +2 -2
- package/dist/Typeahead/index.d.ts +1 -1
- package/dist/Typeahead/index.js +1 -1
- package/dist/{Typeahead-s4DC1Qem.js → Typeahead-VAuiCurV.js} +3 -3
- package/dist/composables/index.d.ts +3 -2
- package/dist/composables/index.js +5 -2
- package/dist/composables-CVfjp9h4.js +502 -0
- package/dist/context-BjNya0v8.js +19 -0
- package/dist/context-Cfjh8te1.js +29 -0
- package/dist/{context-BshXcNYX.js → context-Dbo22sck.js} +138 -0
- package/dist/context-O2Vb8cJl.js +57 -0
- package/dist/index-1AZ4KZhg.d.ts +96 -0
- package/dist/index-1uRMrk63.d.ts +54 -0
- package/dist/{index-FEy8qFSD.d.ts → index-BHqRH7QW.d.ts} +2 -2
- package/dist/index-BMrggCw-.d.ts +52 -0
- package/dist/{index-BlWLperN.d.ts → index-BUXNRekN.d.ts} +2 -2
- package/dist/index-Bainr_3n.d.ts +31 -0
- package/dist/index-Be1czg3M.d.ts +167 -0
- package/dist/{index-Dbmgcm8a.d.ts → index-BeR-1LgF.d.ts} +2 -0
- package/dist/{index-DXDGk38y.d.ts → index-Bn_odHQ9.d.ts} +1 -1
- package/dist/index-BrJzFA5X.d.ts +38 -0
- package/dist/{index-AkMWQ97a.d.ts → index-BtPZKO20.d.ts} +3 -3
- package/dist/index-Bu0Zd1uw.d.ts +38 -0
- package/dist/{index-BDZCJ9ri.d.ts → index-BuubzuE8.d.ts} +2 -2
- package/dist/index-By2mSzUA.d.ts +67 -0
- package/dist/index-C59PdX9L.d.ts +141 -0
- package/dist/{index-BkIgRYGz.d.ts → index-C5p2NeCr.d.ts} +2 -2
- package/dist/{index-CQ9F1f_F.d.ts → index-C6iJwTL0.d.ts} +324 -145
- package/dist/{index-B4OOtNP8.d.ts → index-C7mxUcDR.d.ts} +2 -2
- package/dist/{index-BSRk8MFK.d.ts → index-C8wDPDcP.d.ts} +1 -1
- package/dist/index-CDdRQQF3.d.ts +170 -0
- package/dist/index-COqjznX0.d.ts +47 -0
- package/dist/index-CRizexSC.d.ts +147 -0
- package/dist/{index-Bc0dgVM5.d.ts → index-CTolyeii.d.ts} +4 -4
- package/dist/index-CVn0GBdB.d.ts +115 -0
- package/dist/index-Cm_TiLXU.d.ts +22 -0
- package/dist/index-Cn-sSds-.d.ts +68 -0
- package/dist/index-CsVS37na.d.ts +81 -0
- package/dist/{index-5R_pi3eT.d.ts → index-D-ZuubCK.d.ts} +3 -3
- package/dist/{index-g03bmR4K.d.ts → index-D0TlUOtG.d.ts} +2 -2
- package/dist/index-DA52oIdw.d.ts +171 -0
- package/dist/{index-D3V7yRUP.d.ts → index-DOUEn7V0.d.ts} +4 -4
- package/dist/{index-CCA4R0Mf.d.ts → index-DT9S92sh.d.ts} +31 -6
- package/dist/{index-CR6sUmRT.d.ts → index-DXSs3rwa.d.ts} +3 -107
- package/dist/{index--dh0s8Li.d.ts → index-DfgHJE7H.d.ts} +1 -1
- package/dist/{index-CNcQmDrK.d.ts → index-DoFCm2Q2.d.ts} +71 -0
- package/dist/{index-mQ6EPmaG.d.ts → index-DsyKhauk.d.ts} +78 -9
- package/dist/{index-12ObcW99.d.ts → index-DtjAdYEc.d.ts} +2 -2
- package/dist/{index-Byar3h1e.d.ts → index-HV6W3xCx.d.ts} +1 -1
- package/dist/{index-CsJpQElv.d.ts → index-NzLDrOkk.d.ts} +2 -2
- package/dist/{index-BnNh5Iml.d.ts → index-SMh42NI8.d.ts} +99 -2
- package/dist/{index-Q4gqBSIZ.d.ts → index-fa72tWIU.d.ts} +1 -1
- package/dist/{index-Bqb_Fyju.d.ts → index-jdjcb3Js.d.ts} +2 -2
- package/dist/{index-BhYFxnjV.d.ts → index-kaKBOZSU.d.ts} +2 -2
- package/dist/index-nKlTsNfV.d.ts +42 -0
- package/dist/index.d.ts +84 -63
- package/dist/index.js +118 -91
- package/dist/locale/index.d.ts +1 -1
- package/dist/locale/index.js +1 -1
- package/dist/size-BuTzpgnR.d.ts +14 -0
- package/dist/size-xcIqExkS.js +79 -0
- package/dist/syntaxTheme-Bcs1YMF7.d.ts +38 -0
- package/dist/syntaxTheme-ClpWALZX.js +75 -0
- package/dist/types-Bt-lSgYX.d.ts +65 -0
- package/dist/types-DZoEm_DG.d.ts +97 -0
- package/dist/{index-Bovw9_8d.d.ts → types-Db3Owy8Q.d.ts} +1 -36
- package/dist/types-JktRxujg.d.ts +107 -0
- package/dist/useAppShellMobile-DTsyuAJ4.js +19 -0
- package/dist/useClickableContainer-DyNpnSEa.js +112 -0
- package/dist/useResizable-CeESZS1v.d.ts +72 -0
- package/dist/useScrollableArea-DDk_CluT.js +172 -0
- package/package.json +73 -1
- package/styles/app-shell.css +151 -0
- package/styles/aspect-ratio.css +49 -0
- package/styles/card.css +5 -1
- package/styles/carousel.css +120 -0
- package/styles/clickable-card.css +101 -0
- package/styles/collapsible.css +37 -0
- package/styles/command-palette.css +183 -0
- package/styles/complex-selector.css +114 -0
- package/styles/field.css +12 -0
- package/styles/form-layout.css +31 -0
- package/styles/heading.css +25 -19
- package/styles/layout.css +280 -0
- package/styles/lightbox.css +144 -0
- package/styles/media-theme.css +51 -0
- package/styles/outline.css +124 -0
- package/styles/resize-handle.css +128 -0
- package/styles/scrollable-area.css +50 -0
- package/styles/section.css +60 -0
- package/styles/side-nav.css +26 -0
- package/styles/stepper.css +357 -0
- package/styles/tab-menu.css +91 -0
- package/styles/text.css +63 -14
- package/styles/theme.css +29 -0
- package/styles/timer.css +34 -0
- package/styles.css +18 -0
- package/dist/Collapsible-BYg9soTk.js +0 -102
- package/dist/TabList-LV1U4ZD6.js +0 -184
- package/dist/composables-Dq9RS33w.js +0 -111
- package/dist/index-BzqRns96.d.ts +0 -64
- package/dist/index-TnaIHsCS.d.ts +0 -87
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
@layer astryx.reset, astryx.tokens, astryx.base, astryx.components, astryx.overrides;
|
|
2
|
+
|
|
3
|
+
@layer astryx.components {
|
|
4
|
+
.astryx-tab-menu {
|
|
5
|
+
gap: var(--astryx-spacing-1, 4px);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.astryx-tab-menu-chevron {
|
|
9
|
+
width: var(--astryx-spacing-4, 16px);
|
|
10
|
+
height: var(--astryx-spacing-4, 16px);
|
|
11
|
+
transition: transform var(--astryx-duration-fast, 130ms) var(--astryx-ease-standard, cubic-bezier(0.24, 1, 0.4, 1));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.astryx-tab-menu-chevron[data-state='expanded'] {
|
|
15
|
+
transform: rotate(180deg);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.astryx-tab-menu-dropdown {
|
|
19
|
+
position: fixed;
|
|
20
|
+
z-index: 50;
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
gap: var(--astryx-spacing-0-5, 2px);
|
|
24
|
+
min-width: 180px;
|
|
25
|
+
margin: 0;
|
|
26
|
+
padding-block: var(--astryx-spacing-1, 4px);
|
|
27
|
+
padding-inline: var(--astryx-spacing-1, 4px);
|
|
28
|
+
border: 0;
|
|
29
|
+
border-radius: var(--astryx-radius-container, 0.75rem);
|
|
30
|
+
background: var(--astryx-color-background-surface, #fff);
|
|
31
|
+
box-shadow: var(--astryx-shadow-high, 0 8px 24px rgb(0 0 0 / 16%));
|
|
32
|
+
color: var(--astryx-color-text-primary, #171717);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.astryx-tab-menu-heading {
|
|
36
|
+
padding-block: var(--astryx-spacing-1, 4px);
|
|
37
|
+
padding-inline: var(--astryx-spacing-3, 12px);
|
|
38
|
+
color: var(--astryx-color-text-secondary, #525252);
|
|
39
|
+
font-size: var(--astryx-text-supporting-size, 0.75rem);
|
|
40
|
+
font-weight: var(--astryx-font-weight-semibold, 600);
|
|
41
|
+
line-height: var(--astryx-text-supporting-leading, 1.6667);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.astryx-tab-menu-item {
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: space-between;
|
|
48
|
+
gap: var(--astryx-spacing-2, 8px);
|
|
49
|
+
padding-block: var(--astryx-spacing-2, 8px);
|
|
50
|
+
padding-inline: var(--astryx-spacing-3, 12px);
|
|
51
|
+
border-radius: var(--astryx-radius-element, 0.625rem);
|
|
52
|
+
color: var(--astryx-color-text-primary, #171717);
|
|
53
|
+
font-size: var(--astryx-text-label-size, 0.875rem);
|
|
54
|
+
line-height: var(--astryx-text-label-leading, 1.4286);
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.astryx-tab-menu-item[data-selected='true'] {
|
|
59
|
+
font-weight: var(--astryx-font-weight-medium, 500);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@media (hover: hover) {
|
|
63
|
+
.astryx-tab-menu-item:hover {
|
|
64
|
+
background: var(--astryx-color-overlay-hover, light-dark(#0536590c, #ffffff0c));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.astryx-tab-menu-item:focus-visible {
|
|
69
|
+
outline: var(--astryx-focus-outline-width, 2px) solid var(--astryx-focus-outline-color, var(--astryx-color-text-primary, #171717));
|
|
70
|
+
outline-offset: -2px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.astryx-tab-menu-item-label {
|
|
74
|
+
display: inline-flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
gap: var(--astryx-spacing-2, 8px);
|
|
77
|
+
min-width: 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.astryx-tab-menu-icon {
|
|
81
|
+
width: 1rem;
|
|
82
|
+
height: 1rem;
|
|
83
|
+
flex-shrink: 0;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@media (prefers-reduced-motion: reduce) {
|
|
87
|
+
.astryx-tab-menu-chevron {
|
|
88
|
+
transition: none;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
package/styles/text.css
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
@layer astryx.components {
|
|
4
4
|
.astryx-text {
|
|
5
5
|
margin: 0;
|
|
6
|
-
color: var(--astryx-text-foreground, var(--astryx-color-text-primary, #171717));
|
|
6
|
+
color: var(--astryx-text-foreground, var(--astryx-color-text-primary, light-dark(#171717, #fafafa)));
|
|
7
7
|
font-family: var(--astryx-font-family-body, Figtree, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
|
|
8
8
|
font-size: var(--astryx-text-body-size, 0.875rem);
|
|
9
9
|
line-height: var(--astryx-text-body-leading, 1.4286);
|
|
@@ -13,18 +13,6 @@
|
|
|
13
13
|
display: block;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.astryx-text--color-secondary {
|
|
17
|
-
color: var(--astryx-color-text-secondary, #525252);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.astryx-text--color-accent {
|
|
21
|
-
color: var(--astryx-color-text-accent, #0074e2);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.astryx-text--color-inherit {
|
|
25
|
-
color: inherit;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
16
|
.astryx-text--weight-regular {
|
|
29
17
|
font-weight: var(--astryx-font-weight-regular, 400);
|
|
30
18
|
}
|
|
@@ -58,7 +46,7 @@
|
|
|
58
46
|
}
|
|
59
47
|
|
|
60
48
|
.astryx-text--type-supporting {
|
|
61
|
-
color: var(--astryx-text-supporting-foreground, var(--astryx-color-text-secondary, #525252));
|
|
49
|
+
color: var(--astryx-text-supporting-foreground, var(--astryx-color-text-secondary, light-dark(#525252, #a3a3a3)));
|
|
62
50
|
font-size: var(--astryx-text-supporting-size, 0.75rem);
|
|
63
51
|
line-height: var(--astryx-text-supporting-leading, 1.6667);
|
|
64
52
|
}
|
|
@@ -87,6 +75,67 @@
|
|
|
87
75
|
line-height: 1.2;
|
|
88
76
|
}
|
|
89
77
|
|
|
78
|
+
.astryx-text--color-primary {
|
|
79
|
+
color: var(--astryx-color-text-primary, light-dark(#171717, #fafafa));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.astryx-text--color-secondary {
|
|
83
|
+
color: var(--astryx-color-text-secondary, light-dark(#525252, #a3a3a3));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.astryx-text--color-accent {
|
|
87
|
+
color: var(--astryx-color-text-accent, #0074e2);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.astryx-text--color-disabled {
|
|
91
|
+
color: var(--astryx-color-text-disabled, light-dark(#a3a3a3, #525252));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.astryx-text--color-placeholder {
|
|
95
|
+
color: var(--astryx-color-text-placeholder, #737373);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.astryx-text--color-inherit {
|
|
99
|
+
color: inherit;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.astryx-text--wrap-wrap {
|
|
103
|
+
text-wrap: wrap;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.astryx-text--wrap-nowrap {
|
|
107
|
+
text-wrap: nowrap;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.astryx-text--wrap-balance {
|
|
111
|
+
text-wrap: balance;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.astryx-text--wrap-pretty {
|
|
115
|
+
text-wrap: pretty;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.astryx-text--word-normal {
|
|
119
|
+
word-break: normal;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.astryx-text--word-break-word {
|
|
123
|
+
overflow-wrap: anywhere;
|
|
124
|
+
word-break: break-word;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.astryx-text--word-break-all {
|
|
128
|
+
word-break: break-all;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.astryx-text--strike {
|
|
132
|
+
text-decoration: line-through;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.astryx-text--tabular {
|
|
136
|
+
font-variant-numeric: tabular-nums;
|
|
137
|
+
}
|
|
138
|
+
|
|
90
139
|
.astryx-text--size-sm {
|
|
91
140
|
font-size: var(--astryx-text-sm-size, 0.75rem);
|
|
92
141
|
}
|
package/styles/theme.css
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@layer astryx.reset, astryx.tokens, astryx.base, astryx.components, astryx.overrides;
|
|
2
|
+
|
|
3
|
+
@layer astryx.components {
|
|
4
|
+
/*
|
|
5
|
+
* `display: contents` keeps the theme out of layout. Color and font still
|
|
6
|
+
* inherit through it, so unmarked text uses the primary text token.
|
|
7
|
+
*/
|
|
8
|
+
.astryx-theme {
|
|
9
|
+
display: contents;
|
|
10
|
+
color: var(--astryx-color-text-primary, light-dark(#171717, #fafafa));
|
|
11
|
+
font-family: var(--astryx-font-family-body, Figtree, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
|
|
12
|
+
/*
|
|
13
|
+
* These aliases are also declared on :root, where var() is substituted
|
|
14
|
+
* once. Restating them here makes the subtree resolve them again, including
|
|
15
|
+
* semantic tokens this theme did not override but a parent theme did.
|
|
16
|
+
*/
|
|
17
|
+
--astryx-text-foreground: var(--astryx-color-text-primary);
|
|
18
|
+
--astryx-text-supporting-foreground: var(--astryx-color-text-secondary);
|
|
19
|
+
--astryx-heading-foreground: var(--astryx-color-text-primary);
|
|
20
|
+
--astryx-button-primary-background: var(--astryx-color-accent);
|
|
21
|
+
--astryx-button-primary-foreground: var(--astryx-color-on-accent);
|
|
22
|
+
--astryx-button-secondary-background: var(--astryx-color-neutral);
|
|
23
|
+
--astryx-button-secondary-foreground: var(--astryx-color-text-primary);
|
|
24
|
+
--astryx-button-ghost-foreground: var(--astryx-color-text-primary);
|
|
25
|
+
--astryx-button-focus: var(--astryx-color-accent);
|
|
26
|
+
--astryx-focus-outline-color: var(--astryx-color-accent);
|
|
27
|
+
--astryx-icon-primary-foreground: var(--astryx-color-icon-primary);
|
|
28
|
+
}
|
|
29
|
+
}
|
package/styles/timer.css
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@layer astryx.reset, astryx.tokens, astryx.base, astryx.components, astryx.overrides;
|
|
2
|
+
|
|
3
|
+
@layer astryx.components {
|
|
4
|
+
.astryx-timer {
|
|
5
|
+
display: inline;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.astryx-timer__time {
|
|
9
|
+
display: inline;
|
|
10
|
+
color: inherit;
|
|
11
|
+
font-family: inherit;
|
|
12
|
+
font-size: inherit;
|
|
13
|
+
font-style: normal;
|
|
14
|
+
font-variant-numeric: tabular-nums;
|
|
15
|
+
font-weight: inherit;
|
|
16
|
+
line-height: inherit;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.astryx-timer[data-color='primary'] {
|
|
20
|
+
color: var(--astryx-color-text-primary, light-dark(#171717, #fafafa));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.astryx-timer[data-color='secondary'] {
|
|
24
|
+
color: var(--astryx-color-text-secondary, light-dark(#525252, #a3a3a3));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.astryx-timer[data-color='accent'] {
|
|
28
|
+
color: var(--astryx-color-text-accent, #0074e2);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.astryx-timer[data-color='disabled'] {
|
|
32
|
+
color: var(--astryx-color-text-disabled, light-dark(#a3a3a3, #525252));
|
|
33
|
+
}
|
|
34
|
+
}
|
package/styles.css
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/* 这个文件由 `pnpm sync` 生成,不要手改。 */
|
|
2
2
|
@import './styles/alert-dialog.css';
|
|
3
|
+
@import './styles/app-shell.css';
|
|
4
|
+
@import './styles/aspect-ratio.css';
|
|
3
5
|
@import './styles/avatar.css';
|
|
4
6
|
@import './styles/avatar-group.css';
|
|
5
7
|
@import './styles/badge.css';
|
|
@@ -11,14 +13,18 @@
|
|
|
11
13
|
@import './styles/button.css';
|
|
12
14
|
@import './styles/button-group.css';
|
|
13
15
|
@import './styles/card.css';
|
|
16
|
+
@import './styles/carousel.css';
|
|
14
17
|
@import './styles/center.css';
|
|
15
18
|
@import './styles/chat.css';
|
|
16
19
|
@import './styles/checkbox-indicator.css';
|
|
17
20
|
@import './styles/checkbox-input.css';
|
|
18
21
|
@import './styles/checkbox-list.css';
|
|
19
22
|
@import './styles/citation.css';
|
|
23
|
+
@import './styles/clickable-card.css';
|
|
20
24
|
@import './styles/code.css';
|
|
21
25
|
@import './styles/collapsible.css';
|
|
26
|
+
@import './styles/command-palette.css';
|
|
27
|
+
@import './styles/complex-selector.css';
|
|
22
28
|
@import './styles/context-menu.css';
|
|
23
29
|
@import './styles/date-range-input.css';
|
|
24
30
|
@import './styles/date-time-input.css';
|
|
@@ -29,14 +35,18 @@
|
|
|
29
35
|
@import './styles/empty-state.css';
|
|
30
36
|
@import './styles/field.css';
|
|
31
37
|
@import './styles/file-input.css';
|
|
38
|
+
@import './styles/form-layout.css';
|
|
32
39
|
@import './styles/grid.css';
|
|
33
40
|
@import './styles/heading.css';
|
|
34
41
|
@import './styles/hover-card.css';
|
|
35
42
|
@import './styles/icon.css';
|
|
36
43
|
@import './styles/kbd.css';
|
|
44
|
+
@import './styles/layout.css';
|
|
45
|
+
@import './styles/lightbox.css';
|
|
37
46
|
@import './styles/link.css';
|
|
38
47
|
@import './styles/list.css';
|
|
39
48
|
@import './styles/markdown.css';
|
|
49
|
+
@import './styles/media-theme.css';
|
|
40
50
|
@import './styles/metadata-list.css';
|
|
41
51
|
@import './styles/mobile-nav.css';
|
|
42
52
|
@import './styles/more-menu.css';
|
|
@@ -44,11 +54,15 @@
|
|
|
44
54
|
@import './styles/multi-selector.css';
|
|
45
55
|
@import './styles/nav-item.css';
|
|
46
56
|
@import './styles/nav-menu.css';
|
|
57
|
+
@import './styles/outline.css';
|
|
47
58
|
@import './styles/overflow-list.css';
|
|
48
59
|
@import './styles/overlay.css';
|
|
49
60
|
@import './styles/popover.css';
|
|
50
61
|
@import './styles/progress-bar.css';
|
|
51
62
|
@import './styles/radio.css';
|
|
63
|
+
@import './styles/resize-handle.css';
|
|
64
|
+
@import './styles/scrollable-area.css';
|
|
65
|
+
@import './styles/section.css';
|
|
52
66
|
@import './styles/segmented-control.css';
|
|
53
67
|
@import './styles/side-nav.css';
|
|
54
68
|
@import './styles/skeleton.css';
|
|
@@ -56,14 +70,18 @@
|
|
|
56
70
|
@import './styles/spinner.css';
|
|
57
71
|
@import './styles/stack.css';
|
|
58
72
|
@import './styles/status-dot.css';
|
|
73
|
+
@import './styles/stepper.css';
|
|
59
74
|
@import './styles/switch.css';
|
|
60
75
|
@import './styles/tab-list.css';
|
|
76
|
+
@import './styles/tab-menu.css';
|
|
61
77
|
@import './styles/table.css';
|
|
62
78
|
@import './styles/text.css';
|
|
63
79
|
@import './styles/text-area.css';
|
|
64
80
|
@import './styles/text-input.css';
|
|
81
|
+
@import './styles/theme.css';
|
|
65
82
|
@import './styles/thumbnail.css';
|
|
66
83
|
@import './styles/time-input.css';
|
|
84
|
+
@import './styles/timer.css';
|
|
67
85
|
@import './styles/timestamp.css';
|
|
68
86
|
@import './styles/toast.css';
|
|
69
87
|
@import './styles/toggle-button.css';
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { t as _sfc_main$1 } from "./Icon-5MdZQ18k.js";
|
|
2
|
-
import { Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, openBlock, renderSlot, shallowRef, toDisplayString, useId, useModel, useTemplateRef, vShow, withCtx, withDirectives } from "vue";
|
|
3
|
-
import "../styles/collapsible.css";
|
|
4
|
-
//#region src/Collapsible/Collapsible.vue
|
|
5
|
-
const _hoisted_1 = [
|
|
6
|
-
"data-chevron-position",
|
|
7
|
-
"data-open",
|
|
8
|
-
"data-disabled",
|
|
9
|
-
"aria-expanded",
|
|
10
|
-
"aria-disabled",
|
|
11
|
-
"tabindex"
|
|
12
|
-
];
|
|
13
|
-
const _hoisted_2 = { class: "astryx-collapsible-trigger-label" };
|
|
14
|
-
const _hoisted_3 = ["data-open"];
|
|
15
|
-
const _hoisted_4 = { class: "astryx-collapsible-content-inner" };
|
|
16
|
-
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
17
|
-
name: "AstryxCollapsible",
|
|
18
|
-
__name: "Collapsible",
|
|
19
|
-
props: /*@__PURE__*/ mergeModels({
|
|
20
|
-
trigger: {},
|
|
21
|
-
defaultIsOpen: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: true
|
|
24
|
-
},
|
|
25
|
-
isDisabled: {
|
|
26
|
-
type: Boolean,
|
|
27
|
-
default: false
|
|
28
|
-
},
|
|
29
|
-
chevronPosition: { default: "end" }
|
|
30
|
-
}, {
|
|
31
|
-
"isOpen": {
|
|
32
|
-
type: Boolean,
|
|
33
|
-
default: void 0
|
|
34
|
-
},
|
|
35
|
-
"isOpenModifiers": {}
|
|
36
|
-
}),
|
|
37
|
-
emits: /*@__PURE__*/ mergeModels(["openChange"], ["update:isOpen"]),
|
|
38
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
39
|
-
const props = __props;
|
|
40
|
-
const emit = __emit;
|
|
41
|
-
const open = useModel(__props, "isOpen");
|
|
42
|
-
const localIsOpen = shallowRef(props.defaultIsOpen);
|
|
43
|
-
const isOpen = computed(() => open.value ?? localIsOpen.value);
|
|
44
|
-
const isChevronAtStart = computed(() => props.chevronPosition === "start");
|
|
45
|
-
const contentId = `astryx-collapsible-${useId()}`;
|
|
46
|
-
const root = useTemplateRef("root");
|
|
47
|
-
__expose({ element: computed(() => root.value ?? null) });
|
|
48
|
-
function toggle() {
|
|
49
|
-
if (props.isDisabled) return;
|
|
50
|
-
const next = !isOpen.value;
|
|
51
|
-
localIsOpen.value = next;
|
|
52
|
-
open.value = next;
|
|
53
|
-
emit("openChange", next);
|
|
54
|
-
}
|
|
55
|
-
return (_ctx, _cache) => {
|
|
56
|
-
return openBlock(), createElementBlock("div", {
|
|
57
|
-
ref_key: "root",
|
|
58
|
-
ref: root,
|
|
59
|
-
class: "astryx-collapsible"
|
|
60
|
-
}, [createElementVNode("button", {
|
|
61
|
-
type: "button",
|
|
62
|
-
class: "astryx-collapsible-trigger",
|
|
63
|
-
"data-chevron-position": __props.chevronPosition,
|
|
64
|
-
"data-open": isOpen.value ? "open" : void 0,
|
|
65
|
-
"data-disabled": __props.isDisabled ? "disabled" : void 0,
|
|
66
|
-
"aria-expanded": isOpen.value,
|
|
67
|
-
"aria-controls": contentId,
|
|
68
|
-
"aria-disabled": __props.isDisabled || void 0,
|
|
69
|
-
tabindex: __props.isDisabled ? -1 : void 0,
|
|
70
|
-
onClick: toggle
|
|
71
|
-
}, [
|
|
72
|
-
isChevronAtStart.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
73
|
-
key: 0,
|
|
74
|
-
class: "astryx-collapsible-chevron",
|
|
75
|
-
color: "secondary",
|
|
76
|
-
icon: "chevronRight",
|
|
77
|
-
size: "sm"
|
|
78
|
-
})) : createCommentVNode("v-if", true),
|
|
79
|
-
createElementVNode("span", _hoisted_2, [renderSlot(_ctx.$slots, "trigger", {}, () => [createTextVNode(toDisplayString(__props.trigger), 1)])]),
|
|
80
|
-
!isChevronAtStart.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
81
|
-
key: 1,
|
|
82
|
-
class: "astryx-collapsible-chevron",
|
|
83
|
-
color: "secondary",
|
|
84
|
-
icon: "chevronDown",
|
|
85
|
-
size: "sm"
|
|
86
|
-
})) : createCommentVNode("v-if", true)
|
|
87
|
-
], 8, _hoisted_1), createVNode(Transition, {
|
|
88
|
-
name: "astryx-collapsible-reveal",
|
|
89
|
-
persisted: ""
|
|
90
|
-
}, {
|
|
91
|
-
default: withCtx(() => [withDirectives(createElementVNode("div", {
|
|
92
|
-
id: contentId,
|
|
93
|
-
class: "astryx-collapsible-content",
|
|
94
|
-
"data-open": isOpen.value ? "open" : void 0
|
|
95
|
-
}, [createElementVNode("div", _hoisted_4, [renderSlot(_ctx.$slots, "default")])], 8, _hoisted_3), [[vShow, isOpen.value]])]),
|
|
96
|
-
_: 3
|
|
97
|
-
})], 512);
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
//#endregion
|
|
102
|
-
export { _sfc_main as t };
|
package/dist/TabList-LV1U4ZD6.js
DELETED
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
import { computed, createElementBlock, createElementVNode, defineComponent, inject, normalizeClass, onMounted, onUnmounted, openBlock, provide, reactive, ref, renderSlot, watch } from "vue";
|
|
2
|
-
import "../styles/tab-list.css";
|
|
3
|
-
//#region src/TabList/context.ts
|
|
4
|
-
const tabListContextKey = Symbol("tabListContext");
|
|
5
|
-
//#endregion
|
|
6
|
-
//#region src/TabList/Tab.vue
|
|
7
|
-
const _hoisted_1$1 = [
|
|
8
|
-
"id",
|
|
9
|
-
"aria-selected",
|
|
10
|
-
"aria-controls",
|
|
11
|
-
"tabindex",
|
|
12
|
-
"disabled"
|
|
13
|
-
];
|
|
14
|
-
const _hoisted_2 = { class: "astryx-tab__label" };
|
|
15
|
-
const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
16
|
-
__name: "Tab",
|
|
17
|
-
props: {
|
|
18
|
-
value: {},
|
|
19
|
-
panelId: {},
|
|
20
|
-
disabled: {
|
|
21
|
-
type: Boolean,
|
|
22
|
-
default: false
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
setup(__props) {
|
|
26
|
-
const props = __props;
|
|
27
|
-
const context = inject(tabListContextKey);
|
|
28
|
-
const rootRef = ref();
|
|
29
|
-
const isSelected = computed(() => context?.value.value === props.value);
|
|
30
|
-
const tabIndex = computed(() => isSelected.value && !props.disabled ? 0 : -1);
|
|
31
|
-
const classes = computed(() => [
|
|
32
|
-
"astryx-tab",
|
|
33
|
-
`astryx-tab--size-${context?.size.value ?? "md"}`,
|
|
34
|
-
isSelected.value && "astryx-tab--selected",
|
|
35
|
-
props.disabled && "astryx-tab--disabled"
|
|
36
|
-
]);
|
|
37
|
-
function handleClick() {
|
|
38
|
-
if (props.disabled || !context) return;
|
|
39
|
-
context.selectTab(props.value);
|
|
40
|
-
}
|
|
41
|
-
function handleKeydown(event) {
|
|
42
|
-
if (props.disabled || !context) return;
|
|
43
|
-
switch (event.key) {
|
|
44
|
-
case "ArrowRight":
|
|
45
|
-
case "ArrowDown":
|
|
46
|
-
event.preventDefault();
|
|
47
|
-
context.moveFocus("next", props.value);
|
|
48
|
-
break;
|
|
49
|
-
case "ArrowLeft":
|
|
50
|
-
case "ArrowUp":
|
|
51
|
-
event.preventDefault();
|
|
52
|
-
context.moveFocus("prev", props.value);
|
|
53
|
-
break;
|
|
54
|
-
case "Home":
|
|
55
|
-
event.preventDefault();
|
|
56
|
-
context.moveFocus("first", props.value);
|
|
57
|
-
break;
|
|
58
|
-
case "End":
|
|
59
|
-
event.preventDefault();
|
|
60
|
-
context.moveFocus("last", props.value);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
onMounted(() => {
|
|
64
|
-
if (!context || !rootRef.value) return;
|
|
65
|
-
context.registerTab({
|
|
66
|
-
value: props.value,
|
|
67
|
-
disabled: props.disabled,
|
|
68
|
-
el: rootRef.value
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
onUnmounted(() => {
|
|
72
|
-
context?.unregisterTab(props.value);
|
|
73
|
-
});
|
|
74
|
-
watch(() => props.disabled, (disabled) => {
|
|
75
|
-
if (!context || !rootRef.value) return;
|
|
76
|
-
context.registerTab({
|
|
77
|
-
value: props.value,
|
|
78
|
-
disabled,
|
|
79
|
-
el: rootRef.value
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
return (_ctx, _cache) => {
|
|
83
|
-
return openBlock(), createElementBlock("button", {
|
|
84
|
-
id: `astryx-tab-${__props.value}`,
|
|
85
|
-
ref_key: "rootRef",
|
|
86
|
-
ref: rootRef,
|
|
87
|
-
type: "button",
|
|
88
|
-
role: "tab",
|
|
89
|
-
class: normalizeClass(classes.value),
|
|
90
|
-
"aria-selected": isSelected.value,
|
|
91
|
-
"aria-controls": __props.panelId,
|
|
92
|
-
tabindex: tabIndex.value,
|
|
93
|
-
disabled: __props.disabled,
|
|
94
|
-
onClick: handleClick,
|
|
95
|
-
onKeydown: handleKeydown
|
|
96
|
-
}, [createElementVNode("span", _hoisted_2, [renderSlot(_ctx.$slots, "default")])], 42, _hoisted_1$1);
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
//#endregion
|
|
101
|
-
//#region src/TabList/TabList.vue
|
|
102
|
-
const _hoisted_1 = { class: "astryx-tab-list__strip" };
|
|
103
|
-
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
104
|
-
__name: "TabList",
|
|
105
|
-
props: {
|
|
106
|
-
value: {},
|
|
107
|
-
size: { default: "md" },
|
|
108
|
-
layout: { default: "hug" },
|
|
109
|
-
hasDivider: {
|
|
110
|
-
type: Boolean,
|
|
111
|
-
default: false
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
emits: ["update:value", "change"],
|
|
115
|
-
setup(__props, { emit: __emit }) {
|
|
116
|
-
const props = __props;
|
|
117
|
-
const emit = __emit;
|
|
118
|
-
const tabs = reactive([]);
|
|
119
|
-
const focusedValue = ref(props.value);
|
|
120
|
-
const enabledTabs = computed(() => tabs.filter((tab) => !tab.disabled));
|
|
121
|
-
function selectTab(value) {
|
|
122
|
-
if (value === props.value) return;
|
|
123
|
-
emit("update:value", value);
|
|
124
|
-
emit("change", value);
|
|
125
|
-
focusedValue.value = value;
|
|
126
|
-
}
|
|
127
|
-
function moveFocus(direction, value) {
|
|
128
|
-
const stops = enabledTabs.value;
|
|
129
|
-
if (stops.length === 0) return;
|
|
130
|
-
const index = stops.findIndex((tab) => tab.value === value);
|
|
131
|
-
let nextIndex = index;
|
|
132
|
-
switch (direction) {
|
|
133
|
-
case "next":
|
|
134
|
-
nextIndex = index >= 0 ? (index + 1) % stops.length : 0;
|
|
135
|
-
break;
|
|
136
|
-
case "prev":
|
|
137
|
-
nextIndex = index >= 0 ? (index - 1 + stops.length) % stops.length : stops.length - 1;
|
|
138
|
-
break;
|
|
139
|
-
case "first":
|
|
140
|
-
nextIndex = 0;
|
|
141
|
-
break;
|
|
142
|
-
case "last": nextIndex = stops.length - 1;
|
|
143
|
-
}
|
|
144
|
-
const next = stops[nextIndex];
|
|
145
|
-
if (!next) return;
|
|
146
|
-
focusedValue.value = next.value;
|
|
147
|
-
selectTab(next.value);
|
|
148
|
-
next.el.focus();
|
|
149
|
-
}
|
|
150
|
-
function registerTab(tab) {
|
|
151
|
-
const existingIndex = tabs.findIndex((t) => t.value === tab.value);
|
|
152
|
-
if (existingIndex >= 0) tabs.splice(existingIndex, 1, tab);
|
|
153
|
-
else tabs.push(tab);
|
|
154
|
-
}
|
|
155
|
-
function unregisterTab(value) {
|
|
156
|
-
const index = tabs.findIndex((t) => t.value === value);
|
|
157
|
-
if (index >= 0) tabs.splice(index, 1);
|
|
158
|
-
}
|
|
159
|
-
provide(tabListContextKey, {
|
|
160
|
-
value: computed(() => props.value),
|
|
161
|
-
size: computed(() => props.size),
|
|
162
|
-
layout: computed(() => props.layout),
|
|
163
|
-
hasDivider: computed(() => props.hasDivider),
|
|
164
|
-
tabs,
|
|
165
|
-
focusedValue,
|
|
166
|
-
registerTab,
|
|
167
|
-
unregisterTab,
|
|
168
|
-
selectTab,
|
|
169
|
-
moveFocus
|
|
170
|
-
});
|
|
171
|
-
return (_ctx, _cache) => {
|
|
172
|
-
return openBlock(), createElementBlock("div", {
|
|
173
|
-
class: normalizeClass(["astryx-tab-list", [
|
|
174
|
-
`astryx-tab-list--size-${__props.size}`,
|
|
175
|
-
`astryx-tab-list--layout-${__props.layout}`,
|
|
176
|
-
__props.hasDivider && "astryx-tab-list--has-divider"
|
|
177
|
-
]]),
|
|
178
|
-
role: "tablist"
|
|
179
|
-
}, [createElementVNode("div", _hoisted_1, [renderSlot(_ctx.$slots, "default")])], 2);
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
//#endregion
|
|
184
|
-
export { _sfc_main$1 as n, _sfc_main as t };
|