@astryx-vue/core 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +53 -2
- package/THIRD_PARTY_NOTICES.md +41 -0
- package/css.d.ts +3 -0
- package/dist/AlertDialog/index.d.ts +2 -0
- package/dist/AlertDialog/index.js +2 -0
- package/dist/AlertDialog-BylcA4vV.js +211 -0
- package/dist/Avatar/index.d.ts +2 -0
- package/dist/Avatar/index.js +2 -0
- package/dist/Avatar-5s3HSrtN.js +136 -0
- package/dist/AvatarGroup/index.d.ts +2 -0
- package/dist/AvatarGroup/index.js +2 -0
- package/dist/AvatarGroup-CZcgAMjM.js +59 -0
- package/dist/Badge/index.d.ts +2 -0
- package/dist/Badge/index.js +2 -0
- package/dist/Badge-Ba0EwsTj.js +19 -0
- package/dist/Banner/index.d.ts +2 -0
- package/dist/Banner/index.js +2 -0
- package/dist/Banner-CJe9Im5a.js +173 -0
- package/dist/Blockquote/index.d.ts +2 -0
- package/dist/Blockquote/index.js +2 -0
- package/dist/Blockquote-DFqBv_oJ.js +18 -0
- package/dist/BottomSheet/index.d.ts +2 -0
- package/dist/BottomSheet/index.js +2 -0
- package/dist/BottomSheet-Dg95HB1s.js +919 -0
- package/dist/Breadcrumbs/index.d.ts +2 -0
- package/dist/Breadcrumbs/index.js +2 -0
- package/dist/Breadcrumbs-C3YZFQ9w.js +91 -0
- package/dist/Button/index.d.ts +3 -0
- package/dist/Button/index.js +5 -0
- package/dist/Button-DrqeomlE.js +367 -0
- package/dist/ButtonGroup/index.d.ts +2 -0
- package/dist/ButtonGroup/index.js +2 -0
- package/dist/ButtonGroup-ySQWanDP.js +125 -0
- package/dist/ButtonTooltip-nWWrth8j.js +91 -0
- package/dist/Calendar/index.d.ts +2 -0
- package/dist/Calendar/index.js +2 -0
- package/dist/Calendar-DpYFXwgb.js +276 -0
- package/dist/Card/index.d.ts +2 -0
- package/dist/Card/index.js +2 -0
- package/dist/Card-HAjZQg2s.js +52 -0
- package/dist/Center/index.d.ts +2 -0
- package/dist/Center/index.js +2 -0
- package/dist/Center-DVaZaTGP.js +88 -0
- package/dist/Chat/index.d.ts +2 -0
- package/dist/Chat/index.js +2 -0
- package/dist/Chat-Bfd-YPAK.js +1051 -0
- package/dist/CheckboxIndicator/index.d.ts +2 -0
- package/dist/CheckboxIndicator/index.js +2 -0
- package/dist/CheckboxIndicator-DdJmksHt.js +52 -0
- package/dist/CheckboxInput/index.d.ts +2 -0
- package/dist/CheckboxInput/index.js +2 -0
- package/dist/CheckboxInput-C86o3XoG.js +346 -0
- package/dist/Citation/index.d.ts +2 -0
- package/dist/Citation/index.js +2 -0
- package/dist/Citation-DaDd1teb.js +107 -0
- package/dist/Code/index.d.ts +3 -0
- package/dist/Code/index.js +3 -0
- package/dist/CodeBlock-CK-NWM_1.js +1295 -0
- package/dist/Collapsible/index.d.ts +2 -0
- package/dist/Collapsible/index.js +2 -0
- package/dist/Collapsible-ByXCGhT8.js +102 -0
- package/dist/ContextMenu/index.d.ts +2 -0
- package/dist/ContextMenu/index.js +2 -0
- package/dist/ContextMenu-BJh99Exj.js +1064 -0
- package/dist/DateInput/index.d.ts +2 -0
- package/dist/DateInput/index.js +2 -0
- package/dist/DateInput-zJAdXByM.js +242 -0
- package/dist/Dialog/index.d.ts +2 -0
- package/dist/Dialog/index.js +3 -0
- package/dist/Dialog-CvRplBo-.js +137 -0
- package/dist/Dialog-rfUt3y8P.js +219 -0
- package/dist/Divider/index.d.ts +2 -0
- package/dist/Divider/index.js +2 -0
- package/dist/Divider-BtwnL18I.js +62 -0
- package/dist/DropdownMenu/index.d.ts +2 -0
- package/dist/DropdownMenu/index.js +2 -0
- package/dist/DropdownMenu-C3j2zaEn.js +752 -0
- package/dist/EmptyState/index.d.ts +2 -0
- package/dist/EmptyState/index.js +2 -0
- package/dist/EmptyState-Bhlqgsg4.js +70 -0
- package/dist/Field/index.d.ts +3 -0
- package/dist/Field/index.js +4 -0
- package/dist/Field-VlTBsIEo.js +103 -0
- package/dist/FieldIcon--NTgW5IU.js +44 -0
- package/dist/FieldLabel-B1NRyQlS.js +179 -0
- package/dist/FieldStatus-MjY19ERl.js +79 -0
- package/dist/Grid/index.d.ts +2 -0
- package/dist/Grid/index.js +2 -0
- package/dist/Grid-D1onTzyC.js +131 -0
- package/dist/Heading/index.d.ts +2 -0
- package/dist/Heading/index.js +2 -0
- package/dist/Heading-Dugosn6j.js +43 -0
- package/dist/HoverCard/index.d.ts +2 -0
- package/dist/HoverCard/index.js +2 -0
- package/dist/HoverCard-EhbWaGOW.js +443 -0
- package/dist/Icon-B6qNgBP9.js +78 -0
- package/dist/IconButton/index.d.ts +2 -0
- package/dist/IconButton/index.js +5 -0
- package/dist/IconButton-BNQuz9W_.js +89 -0
- package/dist/InputGroup/index.d.ts +2 -0
- package/dist/InputGroup/index.js +2 -0
- package/dist/InputGroup-ChrFVxzV.js +42 -0
- package/dist/Item-C1z6gXn8.js +289 -0
- package/dist/Kbd/index.d.ts +2 -0
- package/dist/Kbd/index.js +2 -0
- package/dist/Kbd-BB-Dw6zE.js +99 -0
- package/dist/Link/index.d.ts +2 -0
- package/dist/Link/index.js +2 -0
- package/dist/Link-CprjOuTI.js +92 -0
- package/dist/List/index.d.ts +3 -0
- package/dist/List/index.js +3 -0
- package/dist/ListItem-pGxvn6QJ.js +178 -0
- package/dist/Markdown/index.d.ts +2 -0
- package/dist/Markdown/index.js +2 -0
- package/dist/Markdown-DyKIwAL_.js +1035 -0
- package/dist/MobileNav/index.d.ts +2 -0
- package/dist/MobileNav/index.js +2 -0
- package/dist/MobileNavToggle-BK2iRJF-.js +175 -0
- package/dist/MoreMenu/index.d.ts +2 -0
- package/dist/MoreMenu/index.js +2 -0
- package/dist/MoreMenu-BjUsVWWk.js +1305 -0
- package/dist/MultiSelector/index.d.ts +2 -0
- package/dist/MultiSelector/index.js +2 -0
- package/dist/MultiSelector-CKTbTj1A.js +740 -0
- package/dist/NavDisclosure-DHrSNRDR.js +165 -0
- package/dist/NavItem/index.d.ts +3 -0
- package/dist/NavItem/index.js +4 -0
- package/dist/NavItem-FFOisITc.js +147 -0
- package/dist/NavItem-thEKXyJA.js +34 -0
- package/dist/NavMenu/index.d.ts +2 -0
- package/dist/NavMenu/index.js +3 -0
- package/dist/NavMenuItem-mzNQESpB.js +169 -0
- package/dist/NumberInput/index.d.ts +2 -0
- package/dist/NumberInput/index.js +2 -0
- package/dist/NumberInput-DU3_rw7z.js +147 -0
- package/dist/OverflowList/index.d.ts +2 -0
- package/dist/OverflowList/index.js +2 -0
- package/dist/OverflowList-B2T5UtiQ.js +207 -0
- package/dist/Overlay/index.d.ts +2 -0
- package/dist/Overlay/index.js +2 -0
- package/dist/Overlay-DKILTHxI.js +216 -0
- package/dist/Pagination/index.d.ts +2 -0
- package/dist/Pagination/index.js +2 -0
- package/dist/Pagination-qCgNwwhr.js +304 -0
- package/dist/Popover/index.d.ts +2 -0
- package/dist/Popover/index.js +2 -0
- package/dist/Popover-Crhk9PNP.js +215 -0
- package/dist/ProgressBar/index.d.ts +2 -0
- package/dist/ProgressBar/index.js +2 -0
- package/dist/ProgressBar-ChDp-7oe.js +98 -0
- package/dist/Radio/index.d.ts +2 -0
- package/dist/Radio/index.js +2 -0
- package/dist/Radio-BioQfwHQ.js +293 -0
- package/dist/SegmentedControl/index.d.ts +2 -0
- package/dist/SegmentedControl/index.js +2 -0
- package/dist/SegmentedControl-ChHmFrrC.js +326 -0
- package/dist/Selector/index.d.ts +2 -0
- package/dist/Selector/index.js +2 -0
- package/dist/Selector-C6sPJMtH.js +325 -0
- package/dist/SideNav/index.d.ts +2 -0
- package/dist/SideNav/index.js +2 -0
- package/dist/SideNav-D9lnn-sM.js +777 -0
- package/dist/Skeleton/index.d.ts +2 -0
- package/dist/Skeleton/index.js +2 -0
- package/dist/Skeleton-CrgWxJgr.js +36 -0
- package/dist/Slider/index.d.ts +2 -0
- package/dist/Slider/index.js +2 -0
- package/dist/Slider-DTnWxtnb.js +559 -0
- package/dist/Spinner/index.d.ts +2 -0
- package/dist/Spinner/index.js +2 -0
- package/dist/Spinner-9cYUCnDy.js +84 -0
- package/dist/Stack/index.d.ts +3 -0
- package/dist/Stack/index.js +3 -0
- package/dist/Stack-gGcYdOAh.js +94 -0
- package/dist/Stack-iv52y_Jv.js +108 -0
- package/dist/StatusDot/index.d.ts +2 -0
- package/dist/StatusDot/index.js +2 -0
- package/dist/StatusDot-CaoIapp4.js +27 -0
- package/dist/Switch/index.d.ts +2 -0
- package/dist/Switch/index.js +2 -0
- package/dist/Switch-CNdnr5TP.js +324 -0
- package/dist/TabList/index.d.ts +2 -0
- package/dist/TabList/index.js +2 -0
- package/dist/TabList-LV1U4ZD6.js +184 -0
- package/dist/Text/index.d.ts +2 -0
- package/dist/Text/index.js +2 -0
- package/dist/Text-CKd7e3gK.js +43 -0
- package/dist/TextArea/index.d.ts +2 -0
- package/dist/TextArea/index.js +2 -0
- package/dist/TextArea-BL0NuB99.js +386 -0
- package/dist/TextInput/index.d.ts +2 -0
- package/dist/TextInput/index.js +2 -0
- package/dist/TextInput-B0IKC7g5.js +373 -0
- package/dist/Toast/index.d.ts +2 -0
- package/dist/Toast/index.js +2 -0
- package/dist/Toast-BKXPvEMp.js +194 -0
- package/dist/ToggleButton/index.d.ts +2 -0
- package/dist/ToggleButton/index.js +2 -0
- package/dist/ToggleButton-BB_I8EdM.js +219 -0
- package/dist/Token/index.d.ts +2 -0
- package/dist/Token/index.js +3 -0
- package/dist/Token-BdRzlXzm.js +16 -0
- package/dist/Token-Ctf9jekS.js +140 -0
- package/dist/Tokenizer/index.d.ts +2 -0
- package/dist/Tokenizer/index.js +2 -0
- package/dist/Tokenizer-D5MPgau0.js +473 -0
- package/dist/Toolbar/index.d.ts +2 -0
- package/dist/Toolbar/index.js +2 -0
- package/dist/Toolbar-BrgvvTCk.js +73 -0
- package/dist/Tooltip/index.d.ts +2 -0
- package/dist/Tooltip/index.js +2 -0
- package/dist/Tooltip-mp0NMh_Y.js +256 -0
- package/dist/TopNav/index.d.ts +2 -0
- package/dist/TopNav/index.js +2 -0
- package/dist/TopNav-CjbMCbkC.js +468 -0
- package/dist/Typeahead/index.d.ts +2 -0
- package/dist/Typeahead/index.js +2 -0
- package/dist/Typeahead-BMoU3hfx.js +375 -0
- package/dist/VisuallyHidden/index.d.ts +2 -0
- package/dist/VisuallyHidden/index.js +2 -0
- package/dist/VisuallyHidden-C7NN3VEP.js +34 -0
- package/dist/announce-Cnio10Wk.js +89 -0
- package/dist/composables/index.d.ts +4 -0
- package/dist/composables/index.js +18 -0
- package/dist/composables-Dq9RS33w.js +111 -0
- package/dist/context-4PuqD1Ic.js +4 -0
- package/dist/eventHandlers-DUXzBWZy.js +10 -0
- package/dist/focus-CpficIgf.js +36 -0
- package/dist/index--Xrukl7L.d.ts +74 -0
- package/dist/index-4FM5lQdV.d.ts +55 -0
- package/dist/index-BDZCJ9ri.d.ts +213 -0
- package/dist/index-BIPc1v82.d.ts +60 -0
- package/dist/index-BQa836Vz.d.ts +41 -0
- package/dist/index-BQuN_dWR.d.ts +64 -0
- package/dist/index-BSRk8MFK.d.ts +149 -0
- package/dist/index-BeJqhW4l.d.ts +42 -0
- package/dist/index-BfOtLyNH.d.ts +96 -0
- package/dist/index-BhYFxnjV.d.ts +108 -0
- package/dist/index-BiMGXtD-.d.ts +67 -0
- package/dist/index-BkIgRYGz.d.ts +73 -0
- package/dist/index-BmAxqw1G.d.ts +27 -0
- package/dist/index-BoRIw-bP.d.ts +89 -0
- package/dist/index-BtrAhmSP.d.ts +50 -0
- package/dist/index-C0S2Xzoi.d.ts +173 -0
- package/dist/index-C8NW9xre.d.ts +126 -0
- package/dist/index-CCA4R0Mf.d.ts +86 -0
- package/dist/index-CDDMDHJM.d.ts +169 -0
- package/dist/index-CEB7Ywvw.d.ts +115 -0
- package/dist/index-CFfXQMkd.d.ts +21 -0
- package/dist/index-CGEC2zgy.d.ts +142 -0
- package/dist/index-CGZ2xi3r.d.ts +55 -0
- package/dist/index-COxy6LEW.d.ts +156 -0
- package/dist/index-CPhDtlv-.d.ts +95 -0
- package/dist/index-CZeoAr0a.d.ts +129 -0
- package/dist/index-CaHXYQ_E.d.ts +1567 -0
- package/dist/index-Cc2HGODZ.d.ts +88 -0
- package/dist/index-Cdi82rTW.d.ts +64 -0
- package/dist/index-Ck8qy6Rf.d.ts +65 -0
- package/dist/index-CnVbMebA.d.ts +80 -0
- package/dist/index-Cp0NlzQv.d.ts +74 -0
- package/dist/index-CvLlWLIZ.d.ts +28 -0
- package/dist/index-CxspvLBl.d.ts +384 -0
- package/dist/index-Cz9ZHVf6.d.ts +141 -0
- package/dist/index-DBcbfStA.d.ts +635 -0
- package/dist/index-DEeJowZf.d.ts +27 -0
- package/dist/index-DEiLb6hI.d.ts +29 -0
- package/dist/index-DGV6SCWO.d.ts +26 -0
- package/dist/index-DJo-BmXZ.d.ts +431 -0
- package/dist/index-DRmb-oUa.d.ts +44 -0
- package/dist/index-DXDGk38y.d.ts +64 -0
- package/dist/index-Dbmgcm8a.d.ts +81 -0
- package/dist/index-DjOdQv5B.d.ts +241 -0
- package/dist/index-Dt_9IR_M.d.ts +24 -0
- package/dist/index-Dw21t7Uf.d.ts +45 -0
- package/dist/index-HV6W3xCx.d.ts +33 -0
- package/dist/index-IbUN4M8V.d.ts +40 -0
- package/dist/index-JeZ0YTyd.d.ts +80 -0
- package/dist/index-MPcg1Pm4.d.ts +63 -0
- package/dist/index-TnaIHsCS.d.ts +87 -0
- package/dist/index-Yl4kJKpq.d.ts +26 -0
- package/dist/index-_1-uvr27.d.ts +331 -0
- package/dist/index-iHf0OCyv.d.ts +35 -0
- package/dist/index-mQ6EPmaG.d.ts +240 -0
- package/dist/index-uQrLBZfF.d.ts +72 -0
- package/dist/index-yaS9_EpM.d.ts +30 -0
- package/dist/index-z4p2k9VR.d.ts +54 -0
- package/dist/index.d.ts +66 -0
- package/dist/index.js +117 -0
- package/dist/link-CdcUSxAj.js +12 -0
- package/dist/locale/index.d.ts +2 -0
- package/dist/locale/index.js +2 -0
- package/dist/locale-56lkR7OK.js +347 -0
- package/dist/platform-B_9W_aHW.js +33 -0
- package/dist/position-DFW5ymAF.d.ts +5 -0
- package/dist/scrollLock-BzIvIimL.js +42 -0
- package/dist/types-3eXh_5os.d.ts +52 -0
- package/dist/types-BG23kC3S.d.ts +65 -0
- package/dist/types-CAZY4Xua.d.ts +181 -0
- package/dist/types-D7QNSqoN.d.ts +70 -0
- package/dist/types-WlmsNL1I.d.ts +67 -0
- package/dist/useAnchoredListbox-7W90Ny-9.js +54 -0
- package/dist/useAsyncSource-Gk0VtE7_.js +109 -0
- package/dist/useAsyncSource-xpQovjV_.d.ts +54 -0
- package/dist/useChatStreamScroll-oDfybEos.js +265 -0
- package/dist/useClipboard-BDfbEsWd.js +45 -0
- package/dist/useClipboard-CU-kfqeJ.d.ts +32 -0
- package/dist/useCombobox-CTo5C-gc.js +192 -0
- package/dist/useDismiss-CAiHU6QD.js +58 -0
- package/dist/useGridRovingFocus-DQQAOYH5.js +99 -0
- package/dist/useHotkeys-dABSK1o9.js +80 -0
- package/dist/useListFocus-D0iOJl39.js +258 -0
- package/dist/useLongPress-Cyxwa73s.js +60 -0
- package/dist/useMediaQuery-GMmgp28-.js +32 -0
- package/dist/useNumberField-DL-Radsp.js +49 -0
- package/dist/useOverflow-VrwF5oek.js +265 -0
- package/dist/usePositionedLayer-C1NBOsVT.js +114 -0
- package/dist/useRestoreFocus-BvMdXVX9.js +96 -0
- package/dist/useTypeahead-PAK8lMYz.js +62 -0
- package/dist/useTypeaheadMenu-Ba7XpcZl.js +276 -0
- package/dist/utils-C9r3UD_y.js +16 -0
- package/package.json +354 -3
- package/reset.css +1 -0
- package/styles/alert-dialog.css +47 -0
- package/styles/avatar-group.css +44 -0
- package/styles/avatar.css +97 -0
- package/styles/badge.css +91 -0
- package/styles/banner.css +66 -0
- package/styles/blockquote.css +19 -0
- package/styles/bottom-sheet.css +268 -0
- package/styles/breadcrumbs.css +76 -0
- package/styles/button-group.css +70 -0
- package/styles/button.css +320 -0
- package/styles/calendar.css +137 -0
- package/styles/card.css +187 -0
- package/styles/center.css +34 -0
- package/styles/chat.css +847 -0
- package/styles/checkbox-indicator.css +87 -0
- package/styles/checkbox-input.css +87 -0
- package/styles/citation.css +104 -0
- package/styles/code.css +356 -0
- package/styles/collapsible.css +145 -0
- package/styles/context-menu.css +325 -0
- package/styles/date-input.css +137 -0
- package/styles/dialog-header.css +50 -0
- package/styles/dialog.css +93 -0
- package/styles/divider.css +63 -0
- package/styles/dropdown-menu.css +200 -0
- package/styles/empty-state.css +61 -0
- package/styles/field.css +193 -0
- package/styles/grid.css +55 -0
- package/styles/heading.css +126 -0
- package/styles/hover-card.css +206 -0
- package/styles/icon.css +163 -0
- package/styles/input-group.css +85 -0
- package/styles/kbd.css +30 -0
- package/styles/link.css +52 -0
- package/styles/list.css +240 -0
- package/styles/markdown.css +424 -0
- package/styles/mobile-nav.css +146 -0
- package/styles/more-menu.css +383 -0
- package/styles/motion.css +251 -0
- package/styles/multi-selector.css +339 -0
- package/styles/nav-item.css +134 -0
- package/styles/nav-menu.css +103 -0
- package/styles/number-input.css +111 -0
- package/styles/overflow-list.css +79 -0
- package/styles/overlay.css +171 -0
- package/styles/pagination.css +145 -0
- package/styles/popover.css +138 -0
- package/styles/progress-bar.css +107 -0
- package/styles/radio.css +102 -0
- package/styles/segmented-control.css +160 -0
- package/styles/selector.css +287 -0
- package/styles/side-nav.css +312 -0
- package/styles/skeleton.css +67 -0
- package/styles/slider.css +111 -0
- package/styles/spinner.css +126 -0
- package/styles/stack.css +107 -0
- package/styles/status-dot.css +46 -0
- package/styles/switch.css +211 -0
- package/styles/tab-list.css +111 -0
- package/styles/text-area.css +141 -0
- package/styles/text-input.css +125 -0
- package/styles/text.css +117 -0
- package/styles/toast.css +184 -0
- package/styles/toggle-button.css +67 -0
- package/styles/token.css +179 -0
- package/styles/tokenizer.css +200 -0
- package/styles/toolbar.css +53 -0
- package/styles/tooltip.css +115 -0
- package/styles/top-nav.css +222 -0
- package/styles/typeahead.css +258 -0
- package/styles/visually-hidden-utility.css +11 -0
- package/styles/visually-hidden.css +19 -0
- package/styles.css +66 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 astryx-vue contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,54 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @astryx-vue/core
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Vue components for astryx-vue.
|
|
4
|
+
|
|
5
|
+
Docs: <https://astryx-vue.pages.dev>
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @astryx-vue/core @astryx-vue/themes
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Component entries load structural styles. Import a theme once at the app entry. To load every structural stylesheet yourself, also import `@astryx-vue/core/styles.css`.
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { Badge } from '@astryx-vue/core/Badge'
|
|
15
|
+
import '@astryx-vue/core/styles.css'
|
|
16
|
+
import '@astryx-vue/themes/neutral.css'
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
```vue
|
|
20
|
+
<script setup lang="ts">
|
|
21
|
+
import { Badge } from '@astryx-vue/core/Badge'
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<Badge variant="success">
|
|
26
|
+
Ready
|
|
27
|
+
</Badge>
|
|
28
|
+
</template>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Text inputs include their own label, description and validation status:
|
|
32
|
+
|
|
33
|
+
```vue
|
|
34
|
+
<script setup lang="ts">
|
|
35
|
+
import { TextInput } from '@astryx-vue/core/TextInput'
|
|
36
|
+
import { shallowRef } from 'vue'
|
|
37
|
+
|
|
38
|
+
const email = shallowRef('')
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<TextInput v-model="email" label="Email" type="email" auto-complete="email" />
|
|
43
|
+
</template>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Use `Field`, `FieldLabel` and `FieldStatus` from `@astryx-vue/core/Field` for custom controls. `Field` supplies association IDs through its default slot; forward them to the control's `id`, `aria-labelledby` and `aria-describedby`.
|
|
47
|
+
|
|
48
|
+
`TextInput` supports clear buttons, disabled reasons, read-only values, three sizes, status messages and asynchronous `changeAction`. Use `@action-error` to handle failed actions. Inputs remain editable while actions are pending; request cancellation and stale-result handling belong to the application.
|
|
49
|
+
|
|
50
|
+
`CheckboxInput` from `@astryx-vue/core/CheckboxInput` supports `v-model` with `boolean | 'indeterminate'`. It includes a label, description, validation status, disabled reasons, native form submission and asynchronous `changeAction`. Pending actions block repeat activation. Failures emit `actionError`; the application decides whether to revert the model. `CheckboxIndicator` from `@astryx-vue/core/CheckboxIndicator` provides the decorative visual without input behavior.
|
|
51
|
+
|
|
52
|
+
`Slider` from `@astryx-vue/core/Slider` accepts a numeric `v-model` or a `[number, number]` range. It supports marks, horizontal and vertical orientation, keyboard controls, value formatting, form values and disabled reasons. `changeEnd` fires when an adjustment ends.
|
|
53
|
+
|
|
54
|
+
`Banner` from `@astryx-vue/core/Banner` shows persistent info, success, warning or error messages. It supports actions, dismissal, card and section containers, and optional details. Use `v-model:is-open` to control the details or `:collapsible="false"` to keep them visible.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
## Astryx
|
|
4
|
+
|
|
5
|
+
This project is an unofficial community Vue port based on the public Astryx project:
|
|
6
|
+
|
|
7
|
+
- Repository: <https://github.com/facebook/astryx>
|
|
8
|
+
- Version used for the first round: `v0.4.1`
|
|
9
|
+
- Commit: `96f9917fe013a7062a403c58e54dfd47f482d89f`
|
|
10
|
+
- License: MIT
|
|
11
|
+
- Copyright: (c) 2026 Meta Platforms, Inc.
|
|
12
|
+
|
|
13
|
+
The TextInput, CheckboxInput, CheckboxIndicator, Slider, Banner and Field family added in October 2026 also references the upstream implementation at commit `92779d3fbd0f12e659203c7d719d5bb00935060c`, including TextInput, CheckboxInput, CheckboxIndicator, Slider, Banner, Field, FieldLabel, FieldStatus and the shared input styles. Their public behavior and visual structure are adapted into native Vue components under the same MIT license. The Vue model/events, scoped slots and async-state implementation are local adaptations.
|
|
14
|
+
|
|
15
|
+
When files or substantial portions are copied or adapted, their original copyright and license notices must be kept here or alongside the adapted files.
|
|
16
|
+
|
|
17
|
+
No Meta trademarks, logos, or endorsement are granted by the Astryx software license.
|
|
18
|
+
|
|
19
|
+
## Astryx license text
|
|
20
|
+
|
|
21
|
+
MIT License
|
|
22
|
+
|
|
23
|
+
Copyright (c) 2026 Meta Platforms, Inc.
|
|
24
|
+
|
|
25
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
26
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
27
|
+
in the Software without restriction, including without limitation the rights
|
|
28
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
29
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
30
|
+
furnished to do so, subject to the following conditions:
|
|
31
|
+
|
|
32
|
+
The above copyright notice and this permission notice shall be included in all
|
|
33
|
+
copies or substantial portions of the Software.
|
|
34
|
+
|
|
35
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
36
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
37
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
38
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
39
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
40
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
41
|
+
SOFTWARE.
|
package/css.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as AlertDialogActionVariant, c as AlertDialogProps, i as _default, l as AlertDialogSlots, n as ImperativeAlertDialogReturn, o as AlertDialogEmits, r as useImperativeAlertDialog, s as AlertDialogLayout, t as ImperativeAlertDialogOptions } from "../index-CGEC2zgy.js";
|
|
2
|
+
export { _default as AlertDialog, type AlertDialogActionVariant, type AlertDialogEmits, type AlertDialogLayout, type AlertDialogProps, type AlertDialogSlots, type ImperativeAlertDialogOptions, type ImperativeAlertDialogReturn, useImperativeAlertDialog };
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { t as _sfc_main$1 } from "./Button-DrqeomlE.js";
|
|
2
|
+
import { t as useMediaQuery } from "./useMediaQuery-GMmgp28-.js";
|
|
3
|
+
import { t as _sfc_main$2 } from "./Dialog-rfUt3y8P.js";
|
|
4
|
+
import { t as _sfc_main$3 } from "./Heading-Dugosn6j.js";
|
|
5
|
+
import { t as _sfc_main$4 } from "./Stack-gGcYdOAh.js";
|
|
6
|
+
import { t as _sfc_main$5 } from "./Text-CKd7e3gK.js";
|
|
7
|
+
import { Fragment, computed, createBlock, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, h, mergeProps, normalizeClass, openBlock, provide, ref, renderList, renderSlot, shallowRef, toDisplayString, unref, useId, useTemplateRef, withCtx } from "vue";
|
|
8
|
+
import "../styles/alert-dialog.css";
|
|
9
|
+
//#region src/AlertDialog/context.ts
|
|
10
|
+
const ALERT_DIALOG_CONTEXT_KEY = Symbol("astryx-alert-dialog");
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/AlertDialog/AlertDialog.vue
|
|
13
|
+
const _hoisted_1 = { class: "astryx-alert-dialog__content" };
|
|
14
|
+
const _hoisted_2 = { class: "astryx-alert-dialog__footer" };
|
|
15
|
+
/**
|
|
16
|
+
* Order is part of the contract, not just the visual: on a narrow screen the
|
|
17
|
+
* destructive action sits above Cancel so visual, DOM, and tab order agree,
|
|
18
|
+
* while Cancel keeps the initial focus because it is the safe choice.
|
|
19
|
+
*/
|
|
20
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
21
|
+
name: "AstryxAlertDialog",
|
|
22
|
+
inheritAttrs: false,
|
|
23
|
+
__name: "AlertDialog",
|
|
24
|
+
props: {
|
|
25
|
+
isOpen: { type: Boolean },
|
|
26
|
+
isInline: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: false
|
|
29
|
+
},
|
|
30
|
+
title: {},
|
|
31
|
+
description: {},
|
|
32
|
+
cancelLabel: { default: "Cancel" },
|
|
33
|
+
actionLabel: {},
|
|
34
|
+
actionVariant: { default: "destructive" },
|
|
35
|
+
isActionLoading: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: false
|
|
38
|
+
},
|
|
39
|
+
width: { default: 400 }
|
|
40
|
+
},
|
|
41
|
+
emits: ["openChange", "action"],
|
|
42
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
43
|
+
const props = __props;
|
|
44
|
+
const emit = __emit;
|
|
45
|
+
const titleId = `astryx-alert-dialog-title-${useId()}`;
|
|
46
|
+
const descriptionId = `astryx-alert-dialog-description-${useId()}`;
|
|
47
|
+
const isSmallScreen = useMediaQuery("(max-width: 640px)");
|
|
48
|
+
provide(ALERT_DIALOG_CONTEXT_KEY, {
|
|
49
|
+
descriptionId,
|
|
50
|
+
isSmallScreen,
|
|
51
|
+
titleId
|
|
52
|
+
});
|
|
53
|
+
const dialog = useTemplateRef("dialog");
|
|
54
|
+
const element = computed(() => {
|
|
55
|
+
const rendered = dialog.value?.$el;
|
|
56
|
+
return rendered instanceof HTMLElement ? rendered : null;
|
|
57
|
+
});
|
|
58
|
+
function focus(options) {
|
|
59
|
+
element.value?.focus(options);
|
|
60
|
+
}
|
|
61
|
+
function blur() {
|
|
62
|
+
element.value?.blur();
|
|
63
|
+
}
|
|
64
|
+
__expose({
|
|
65
|
+
element,
|
|
66
|
+
focus,
|
|
67
|
+
blur
|
|
68
|
+
});
|
|
69
|
+
const actions = computed(() => {
|
|
70
|
+
const cancel = {
|
|
71
|
+
autofocus: "",
|
|
72
|
+
className: "astryx-alert-dialog__action astryx-alert-dialog__action--cancel",
|
|
73
|
+
isLoading: false,
|
|
74
|
+
key: "cancel",
|
|
75
|
+
label: props.cancelLabel,
|
|
76
|
+
variant: "ghost",
|
|
77
|
+
onClick: () => emit("openChange", false)
|
|
78
|
+
};
|
|
79
|
+
const confirm = {
|
|
80
|
+
className: "astryx-alert-dialog__action astryx-alert-dialog__action--confirm",
|
|
81
|
+
isLoading: props.isActionLoading,
|
|
82
|
+
key: "confirm",
|
|
83
|
+
label: props.actionLabel,
|
|
84
|
+
variant: props.actionVariant,
|
|
85
|
+
onClick: (event) => emit("action", event)
|
|
86
|
+
};
|
|
87
|
+
return isSmallScreen.value ? [confirm, cancel] : [cancel, confirm];
|
|
88
|
+
});
|
|
89
|
+
const dialogRole = computed(() => props.isInline ? "group" : "alertdialog");
|
|
90
|
+
const layout = computed(() => isSmallScreen.value ? "stacked" : "row");
|
|
91
|
+
return (_ctx, _cache) => {
|
|
92
|
+
return openBlock(), createBlock(_sfc_main$2, mergeProps({
|
|
93
|
+
ref_key: "dialog",
|
|
94
|
+
ref: dialog
|
|
95
|
+
}, _ctx.$attrs, {
|
|
96
|
+
class: "astryx-alert-dialog",
|
|
97
|
+
"aria-describedby": descriptionId,
|
|
98
|
+
"aria-labelledby": titleId,
|
|
99
|
+
"data-layout": layout.value,
|
|
100
|
+
"is-inline": __props.isInline,
|
|
101
|
+
"is-open": __props.isOpen,
|
|
102
|
+
purpose: "form",
|
|
103
|
+
role: dialogRole.value,
|
|
104
|
+
width: __props.width,
|
|
105
|
+
onOpenChange: _cache[0] || (_cache[0] = ($event) => emit("openChange", $event))
|
|
106
|
+
}), {
|
|
107
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_1, [createVNode(_sfc_main$3, {
|
|
108
|
+
id: titleId,
|
|
109
|
+
class: "astryx-alert-dialog__title",
|
|
110
|
+
level: 2
|
|
111
|
+
}, {
|
|
112
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])]),
|
|
113
|
+
_: 3
|
|
114
|
+
}), createVNode(_sfc_main$5, {
|
|
115
|
+
id: descriptionId,
|
|
116
|
+
as: "div",
|
|
117
|
+
class: "astryx-alert-dialog__description",
|
|
118
|
+
color: "secondary",
|
|
119
|
+
type: "body"
|
|
120
|
+
}, {
|
|
121
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "description", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])]),
|
|
122
|
+
_: 3
|
|
123
|
+
})]), createElementVNode("div", _hoisted_2, [createVNode(_sfc_main$4, {
|
|
124
|
+
class: "astryx-alert-dialog__actions",
|
|
125
|
+
direction: unref(isSmallScreen) ? "vertical" : "horizontal",
|
|
126
|
+
gap: 2,
|
|
127
|
+
"h-align": unref(isSmallScreen) ? "stretch" : "end",
|
|
128
|
+
wrap: unref(isSmallScreen) ? "nowrap" : "wrap"
|
|
129
|
+
}, {
|
|
130
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "actions"), (openBlock(true), createElementBlock(Fragment, null, renderList(actions.value, (action) => {
|
|
131
|
+
return openBlock(), createBlock(_sfc_main$1, {
|
|
132
|
+
key: action.key,
|
|
133
|
+
class: normalizeClass(action.className),
|
|
134
|
+
"data-autofocus": action.autofocus,
|
|
135
|
+
"is-loading": action.isLoading,
|
|
136
|
+
label: action.label,
|
|
137
|
+
variant: action.variant,
|
|
138
|
+
onClick: ($event) => action.onClick($event)
|
|
139
|
+
}, null, 8, [
|
|
140
|
+
"class",
|
|
141
|
+
"data-autofocus",
|
|
142
|
+
"is-loading",
|
|
143
|
+
"label",
|
|
144
|
+
"variant",
|
|
145
|
+
"onClick"
|
|
146
|
+
]);
|
|
147
|
+
}), 128))]),
|
|
148
|
+
_: 3
|
|
149
|
+
}, 8, [
|
|
150
|
+
"direction",
|
|
151
|
+
"h-align",
|
|
152
|
+
"wrap"
|
|
153
|
+
])])]),
|
|
154
|
+
_: 3
|
|
155
|
+
}, 16, [
|
|
156
|
+
"data-layout",
|
|
157
|
+
"is-inline",
|
|
158
|
+
"is-open",
|
|
159
|
+
"role",
|
|
160
|
+
"width"
|
|
161
|
+
]);
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
//#endregion
|
|
166
|
+
//#region src/AlertDialog/useImperativeAlertDialog.ts
|
|
167
|
+
/**
|
|
168
|
+
* Opens an alert dialog without managing the open state yourself.
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* ```
|
|
172
|
+
* const alert = useImperativeAlertDialog()
|
|
173
|
+
* const AlertHost = alert.Host
|
|
174
|
+
* // <button @click="alert.show({ title: 'Delete item?', description: '…', actionLabel: 'Delete' })">Delete</button>
|
|
175
|
+
* // <AlertHost />
|
|
176
|
+
* ```
|
|
177
|
+
*/
|
|
178
|
+
function useImperativeAlertDialog() {
|
|
179
|
+
const isOpen = ref(false);
|
|
180
|
+
const options = shallowRef(null);
|
|
181
|
+
function show(nextOptions) {
|
|
182
|
+
options.value = nextOptions;
|
|
183
|
+
isOpen.value = true;
|
|
184
|
+
}
|
|
185
|
+
function hide() {
|
|
186
|
+
isOpen.value = false;
|
|
187
|
+
}
|
|
188
|
+
return {
|
|
189
|
+
hide,
|
|
190
|
+
Host: defineComponent({
|
|
191
|
+
name: "AstryxImperativeAlertDialogHost",
|
|
192
|
+
setup() {
|
|
193
|
+
return () => {
|
|
194
|
+
const current = options.value;
|
|
195
|
+
if (current == null) return null;
|
|
196
|
+
return h(_sfc_main, {
|
|
197
|
+
...current,
|
|
198
|
+
isOpen: isOpen.value,
|
|
199
|
+
onOpenChange: (open) => {
|
|
200
|
+
if (!open) isOpen.value = false;
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
}),
|
|
206
|
+
isOpen,
|
|
207
|
+
show
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
//#endregion
|
|
211
|
+
export { _sfc_main as n, useImperativeAlertDialog as t };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as AvatarProps, c as AvatarStatusDotProps, i as AvatarNumericSize, l as AvatarStatusDotVariant, n as _default, o as AvatarShape, r as AvatarNamedSize, s as AvatarSize, t as _default$1 } from "../index-uQrLBZfF.js";
|
|
2
|
+
export { _default as Avatar, type AvatarNamedSize, type AvatarNumericSize, type AvatarProps, type AvatarShape, type AvatarSize, _default$1 as AvatarStatusDot, type AvatarStatusDotProps, type AvatarStatusDotVariant };
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { n as AvatarGroupContext, t as resolveSize } from "./utils-C9r3UD_y.js";
|
|
2
|
+
import { computed, createCommentVNode, createElementBlock, createElementVNode, defineComponent, inject, mergeProps, normalizeStyle, openBlock, ref, renderSlot, toDisplayString, unref } from "vue";
|
|
3
|
+
import "../styles/avatar.css";
|
|
4
|
+
//#region src/Avatar/Avatar.vue
|
|
5
|
+
const _hoisted_1$1 = { class: "astryx-avatar__content" };
|
|
6
|
+
const _hoisted_2 = ["src"];
|
|
7
|
+
const _hoisted_3 = ["src"];
|
|
8
|
+
const _hoisted_4 = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "astryx-avatar__status"
|
|
11
|
+
};
|
|
12
|
+
const INITIALS_FONT_SIZE_RATIO = 16 / 36;
|
|
13
|
+
const DEFAULT_ICON_RATIO = .6;
|
|
14
|
+
const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
15
|
+
__name: "Avatar",
|
|
16
|
+
props: {
|
|
17
|
+
alt: {},
|
|
18
|
+
fallbackSrc: {},
|
|
19
|
+
name: {},
|
|
20
|
+
size: { default: "md" },
|
|
21
|
+
shape: { default: "circle" },
|
|
22
|
+
src: {}
|
|
23
|
+
},
|
|
24
|
+
emits: ["error"],
|
|
25
|
+
setup(__props, { emit: __emit }) {
|
|
26
|
+
const props = __props;
|
|
27
|
+
const emit = __emit;
|
|
28
|
+
const erroredSrc = ref(void 0);
|
|
29
|
+
const erroredFallbackSrc = ref(void 0);
|
|
30
|
+
const avatarGroup = inject(AvatarGroupContext, void 0);
|
|
31
|
+
const resolvedSize = computed(() => avatarGroup?.size.value ?? props.size);
|
|
32
|
+
const resolvedShape = computed(() => avatarGroup?.shape.value ?? props.shape);
|
|
33
|
+
const numericSize = computed(() => resolveSize(resolvedSize.value));
|
|
34
|
+
const groupStyle = computed(() => {
|
|
35
|
+
if (!avatarGroup) return {};
|
|
36
|
+
return {
|
|
37
|
+
marginInlineStart: `${-avatarGroup.overlap.value}px`,
|
|
38
|
+
borderWidth: "2px"
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
const rootStyle = computed(() => ({
|
|
42
|
+
width: `${numericSize.value}px`,
|
|
43
|
+
height: `${numericSize.value}px`
|
|
44
|
+
}));
|
|
45
|
+
const showImage = computed(() => props.src && erroredSrc.value !== props.src);
|
|
46
|
+
const showFallbackImage = computed(() => !showImage.value && props.fallbackSrc && erroredFallbackSrc.value !== props.fallbackSrc);
|
|
47
|
+
const meaningfulName = computed(() => {
|
|
48
|
+
return typeof props.name === "string" && props.name.trim() !== "" ? props.name.trim() : void 0;
|
|
49
|
+
});
|
|
50
|
+
const meaningfulAlt = computed(() => {
|
|
51
|
+
return typeof props.alt === "string" && props.alt.trim() !== "" ? props.alt.trim() : void 0;
|
|
52
|
+
});
|
|
53
|
+
const initials = computed(() => {
|
|
54
|
+
if (!meaningfulName.value) return "";
|
|
55
|
+
const words = meaningfulName.value.split(/\s+/);
|
|
56
|
+
const first = words.at(0);
|
|
57
|
+
const last = words.length > 1 ? words.at(-1) : void 0;
|
|
58
|
+
const initial = (word) => {
|
|
59
|
+
if (!word) return "";
|
|
60
|
+
const match = word.match(/[\p{L}\p{N}]/u);
|
|
61
|
+
return match ? match[0].toUpperCase() : "";
|
|
62
|
+
};
|
|
63
|
+
return `${initial(first)}${initial(last)}`;
|
|
64
|
+
});
|
|
65
|
+
const showInitials = computed(() => !showImage.value && !showFallbackImage.value && initials.value !== "");
|
|
66
|
+
const showIcon = computed(() => !showImage.value && !showFallbackImage.value && initials.value === "");
|
|
67
|
+
const accessibleName = computed(() => {
|
|
68
|
+
return meaningfulAlt.value || meaningfulName.value;
|
|
69
|
+
});
|
|
70
|
+
const a11yProps = computed(() => {
|
|
71
|
+
if (accessibleName.value) return {
|
|
72
|
+
"role": "img",
|
|
73
|
+
"aria-label": accessibleName.value
|
|
74
|
+
};
|
|
75
|
+
return {
|
|
76
|
+
"role": "presentation",
|
|
77
|
+
"aria-hidden": "true"
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
function handleImageError(event) {
|
|
81
|
+
if (props.src) erroredSrc.value = props.src;
|
|
82
|
+
emit("error", event);
|
|
83
|
+
}
|
|
84
|
+
function handleFallbackError() {
|
|
85
|
+
if (props.fallbackSrc) erroredFallbackSrc.value = props.fallbackSrc;
|
|
86
|
+
}
|
|
87
|
+
return (_ctx, _cache) => {
|
|
88
|
+
return openBlock(), createElementBlock("span", mergeProps({
|
|
89
|
+
class: ["astryx-avatar", [`astryx-avatar--${resolvedShape.value}`, { "astryx-avatar--group-item": unref(avatarGroup) }]],
|
|
90
|
+
style: [rootStyle.value, groupStyle.value]
|
|
91
|
+
}, a11yProps.value), [createElementVNode("span", _hoisted_1$1, [showImage.value ? (openBlock(), createElementBlock("img", {
|
|
92
|
+
key: 0,
|
|
93
|
+
class: "astryx-avatar__image",
|
|
94
|
+
src: __props.src,
|
|
95
|
+
alt: "",
|
|
96
|
+
onError: handleImageError
|
|
97
|
+
}, null, 40, _hoisted_2)) : showFallbackImage.value ? (openBlock(), createElementBlock("img", {
|
|
98
|
+
key: 1,
|
|
99
|
+
class: "astryx-avatar__image",
|
|
100
|
+
src: __props.fallbackSrc,
|
|
101
|
+
alt: "",
|
|
102
|
+
onError: handleFallbackError
|
|
103
|
+
}, null, 40, _hoisted_3)) : showInitials.value ? (openBlock(), createElementBlock("span", {
|
|
104
|
+
key: 2,
|
|
105
|
+
class: "astryx-avatar__fallback astryx-avatar__fallback--initials",
|
|
106
|
+
style: normalizeStyle({ fontSize: `${numericSize.value * INITIALS_FONT_SIZE_RATIO}px` })
|
|
107
|
+
}, toDisplayString(initials.value), 5)) : showIcon.value ? (openBlock(), createElementBlock("span", {
|
|
108
|
+
key: 3,
|
|
109
|
+
class: "astryx-avatar__fallback astryx-avatar__fallback--icon",
|
|
110
|
+
style: normalizeStyle({ fontSize: `${numericSize.value * DEFAULT_ICON_RATIO}px` })
|
|
111
|
+
}, [renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = createElementVNode("svg", {
|
|
112
|
+
viewBox: "0 0 24 24",
|
|
113
|
+
fill: "currentColor",
|
|
114
|
+
"aria-hidden": "true"
|
|
115
|
+
}, [createElementVNode("path", { d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" })], -1))])], 4)) : createCommentVNode("v-if", true)]), _ctx.$slots.status ? (openBlock(), createElementBlock("span", _hoisted_4, [renderSlot(_ctx.$slots, "status")])) : createCommentVNode("v-if", true)], 16);
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
//#endregion
|
|
120
|
+
//#region src/Avatar/AvatarStatusDot.vue
|
|
121
|
+
const _hoisted_1 = ["data-variant"];
|
|
122
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
123
|
+
__name: "AvatarStatusDot",
|
|
124
|
+
props: { variant: { default: "neutral" } },
|
|
125
|
+
setup(__props) {
|
|
126
|
+
return (_ctx, _cache) => {
|
|
127
|
+
return openBlock(), createElementBlock("span", {
|
|
128
|
+
class: "astryx-avatar-status-dot",
|
|
129
|
+
"data-variant": __props.variant,
|
|
130
|
+
"aria-hidden": "true"
|
|
131
|
+
}, null, 8, _hoisted_1);
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
//#endregion
|
|
136
|
+
export { _sfc_main$1 as n, _sfc_main as t };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { n as AvatarGroupContext, t as resolveSize } from "./utils-C9r3UD_y.js";
|
|
2
|
+
import { computed, createElementBlock, defineComponent, inject, normalizeClass, normalizeStyle, openBlock, provide, renderSlot, toDisplayString } from "vue";
|
|
3
|
+
import "../styles/avatar-group.css";
|
|
4
|
+
//#region src/AvatarGroup/AvatarGroup.vue
|
|
5
|
+
const _hoisted_1$1 = {
|
|
6
|
+
class: "astryx-avatar-group",
|
|
7
|
+
role: "group",
|
|
8
|
+
"aria-label": "Avatar group"
|
|
9
|
+
};
|
|
10
|
+
const OVERLAP_RATIO = .25;
|
|
11
|
+
const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
12
|
+
__name: "AvatarGroup",
|
|
13
|
+
props: {
|
|
14
|
+
size: { default: "md" },
|
|
15
|
+
shape: { default: "circle" }
|
|
16
|
+
},
|
|
17
|
+
setup(__props) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const numericSize = computed(() => resolveSize(props.size));
|
|
20
|
+
const overlap = computed(() => Math.round(numericSize.value * OVERLAP_RATIO));
|
|
21
|
+
provide(AvatarGroupContext, {
|
|
22
|
+
size: computed(() => props.size),
|
|
23
|
+
shape: computed(() => props.shape),
|
|
24
|
+
overlap
|
|
25
|
+
});
|
|
26
|
+
return (_ctx, _cache) => {
|
|
27
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, [renderSlot(_ctx.$slots, "default")]);
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/AvatarGroup/AvatarGroupOverflow.vue
|
|
33
|
+
const _hoisted_1 = ["aria-label"];
|
|
34
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
35
|
+
name: "AvatarGroupOverflow",
|
|
36
|
+
__name: "AvatarGroupOverflow",
|
|
37
|
+
props: { count: {} },
|
|
38
|
+
setup(__props) {
|
|
39
|
+
const avatarGroup = inject(AvatarGroupContext, void 0);
|
|
40
|
+
const size = computed(() => avatarGroup?.size.value ?? "md");
|
|
41
|
+
const shape = computed(() => avatarGroup?.shape.value ?? "circle");
|
|
42
|
+
const numericSize = computed(() => resolveSize(size.value));
|
|
43
|
+
const rootStyle = computed(() => ({
|
|
44
|
+
width: `${numericSize.value}px`,
|
|
45
|
+
height: `${numericSize.value}px`,
|
|
46
|
+
marginInlineStart: `${-(avatarGroup?.overlap.value ?? 0)}px`
|
|
47
|
+
}));
|
|
48
|
+
return (_ctx, _cache) => {
|
|
49
|
+
return openBlock(), createElementBlock("span", {
|
|
50
|
+
class: normalizeClass(["astryx-avatar-group-overflow", [`astryx-avatar-group-overflow--${shape.value}`]]),
|
|
51
|
+
style: normalizeStyle(rootStyle.value),
|
|
52
|
+
role: "img",
|
|
53
|
+
"aria-label": `${__props.count} more avatars`
|
|
54
|
+
}, " +" + toDisplayString(__props.count), 15, _hoisted_1);
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
//#endregion
|
|
59
|
+
export { _sfc_main$1 as n, _sfc_main as t };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createElementBlock, defineComponent, openBlock, renderSlot } from "vue";
|
|
2
|
+
import "../styles/badge.css";
|
|
3
|
+
//#region src/Badge/Badge.vue
|
|
4
|
+
const _hoisted_1 = ["data-variant"];
|
|
5
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
6
|
+
name: "Badge",
|
|
7
|
+
__name: "Badge",
|
|
8
|
+
props: { variant: { default: "neutral" } },
|
|
9
|
+
setup(__props) {
|
|
10
|
+
return (_ctx, _cache) => {
|
|
11
|
+
return openBlock(), createElementBlock("span", {
|
|
12
|
+
class: "astryx-badge",
|
|
13
|
+
"data-variant": __props.variant
|
|
14
|
+
}, [renderSlot(_ctx.$slots, "icon"), renderSlot(_ctx.$slots, "default")], 8, _hoisted_1);
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
export { _sfc_main as t };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Dn as BannerProps, En as BannerEmits, On as BannerSlots, Tn as BannerContainer, kn as BannerStatus, wn as _default } from "../index-CaHXYQ_E.js";
|
|
2
|
+
export { _default as Banner, type BannerContainer, type BannerEmits, type BannerProps, type BannerSlots, type BannerStatus };
|