@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,380 @@
|
|
|
1
|
+
import { t as useDismiss } from "./useDismiss-CAiHU6QD.js";
|
|
2
|
+
import { t as useListFocus } from "./useListFocus-D0iOJl39.js";
|
|
3
|
+
import { t as _sfc_main$3 } from "./Icon-Dfr4k6-S.js";
|
|
4
|
+
import { t as usePositionedLayer } from "./usePositionedLayer-C1NBOsVT.js";
|
|
5
|
+
import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, inject, nextTick, normalizeClass, normalizeStyle, onMounted, onUnmounted, openBlock, provide, reactive, ref, renderList, renderSlot, toDisplayString, unref, useId, watch } from "vue";
|
|
6
|
+
import "../styles/tab-list.css";
|
|
7
|
+
import "../styles/tab-menu.css";
|
|
8
|
+
//#region src/TabList/context.ts
|
|
9
|
+
const tabListContextKey = Symbol("tabListContext");
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/TabList/Tab.vue
|
|
12
|
+
const _hoisted_1$2 = [
|
|
13
|
+
"id",
|
|
14
|
+
"aria-selected",
|
|
15
|
+
"aria-controls",
|
|
16
|
+
"tabindex",
|
|
17
|
+
"disabled"
|
|
18
|
+
];
|
|
19
|
+
const _hoisted_2$1 = { class: "astryx-tab__label" };
|
|
20
|
+
const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
21
|
+
__name: "Tab",
|
|
22
|
+
props: {
|
|
23
|
+
value: {},
|
|
24
|
+
panelId: {},
|
|
25
|
+
disabled: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
setup(__props) {
|
|
31
|
+
const props = __props;
|
|
32
|
+
const context = inject(tabListContextKey);
|
|
33
|
+
const rootRef = ref();
|
|
34
|
+
const isSelected = computed(() => context?.value.value === props.value);
|
|
35
|
+
const tabIndex = computed(() => isSelected.value && !props.disabled ? 0 : -1);
|
|
36
|
+
const classes = computed(() => [
|
|
37
|
+
"astryx-tab",
|
|
38
|
+
`astryx-tab--size-${context?.size.value ?? "md"}`,
|
|
39
|
+
isSelected.value && "astryx-tab--selected",
|
|
40
|
+
props.disabled && "astryx-tab--disabled"
|
|
41
|
+
]);
|
|
42
|
+
function handleClick() {
|
|
43
|
+
if (props.disabled || !context) return;
|
|
44
|
+
context.selectTab(props.value);
|
|
45
|
+
}
|
|
46
|
+
function handleKeydown(event) {
|
|
47
|
+
if (props.disabled || !context) return;
|
|
48
|
+
switch (event.key) {
|
|
49
|
+
case "ArrowRight":
|
|
50
|
+
case "ArrowDown":
|
|
51
|
+
event.preventDefault();
|
|
52
|
+
context.moveFocus("next", props.value);
|
|
53
|
+
break;
|
|
54
|
+
case "ArrowLeft":
|
|
55
|
+
case "ArrowUp":
|
|
56
|
+
event.preventDefault();
|
|
57
|
+
context.moveFocus("prev", props.value);
|
|
58
|
+
break;
|
|
59
|
+
case "Home":
|
|
60
|
+
event.preventDefault();
|
|
61
|
+
context.moveFocus("first", props.value);
|
|
62
|
+
break;
|
|
63
|
+
case "End":
|
|
64
|
+
event.preventDefault();
|
|
65
|
+
context.moveFocus("last", props.value);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
onMounted(() => {
|
|
69
|
+
if (!context || !rootRef.value) return;
|
|
70
|
+
context.registerTab({
|
|
71
|
+
value: props.value,
|
|
72
|
+
disabled: props.disabled,
|
|
73
|
+
el: rootRef.value
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
onUnmounted(() => {
|
|
77
|
+
context?.unregisterTab(props.value);
|
|
78
|
+
});
|
|
79
|
+
watch(() => props.disabled, (disabled) => {
|
|
80
|
+
if (!context || !rootRef.value) return;
|
|
81
|
+
context.registerTab({
|
|
82
|
+
value: props.value,
|
|
83
|
+
disabled,
|
|
84
|
+
el: rootRef.value
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
return (_ctx, _cache) => {
|
|
88
|
+
return openBlock(), createElementBlock("button", {
|
|
89
|
+
id: `astryx-tab-${__props.value}`,
|
|
90
|
+
ref_key: "rootRef",
|
|
91
|
+
ref: rootRef,
|
|
92
|
+
type: "button",
|
|
93
|
+
role: "tab",
|
|
94
|
+
class: normalizeClass(classes.value),
|
|
95
|
+
"aria-selected": isSelected.value,
|
|
96
|
+
"aria-controls": __props.panelId,
|
|
97
|
+
tabindex: tabIndex.value,
|
|
98
|
+
disabled: __props.disabled,
|
|
99
|
+
onClick: handleClick,
|
|
100
|
+
onKeydown: handleKeydown
|
|
101
|
+
}, [createElementVNode("span", _hoisted_2$1, [renderSlot(_ctx.$slots, "default")])], 42, _hoisted_1$2);
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
//#endregion
|
|
106
|
+
//#region src/TabList/TabList.vue
|
|
107
|
+
const _hoisted_1$1 = { class: "astryx-tab-list__strip" };
|
|
108
|
+
const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
109
|
+
__name: "TabList",
|
|
110
|
+
props: {
|
|
111
|
+
value: {},
|
|
112
|
+
size: { default: "md" },
|
|
113
|
+
layout: { default: "hug" },
|
|
114
|
+
hasDivider: {
|
|
115
|
+
type: Boolean,
|
|
116
|
+
default: false
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
emits: ["update:value", "change"],
|
|
120
|
+
setup(__props, { emit: __emit }) {
|
|
121
|
+
const props = __props;
|
|
122
|
+
const emit = __emit;
|
|
123
|
+
const tabs = reactive([]);
|
|
124
|
+
const focusedValue = ref(props.value);
|
|
125
|
+
const enabledTabs = computed(() => tabs.filter((tab) => !tab.disabled));
|
|
126
|
+
function selectTab(value) {
|
|
127
|
+
if (value === props.value) return;
|
|
128
|
+
emit("update:value", value);
|
|
129
|
+
emit("change", value);
|
|
130
|
+
focusedValue.value = value;
|
|
131
|
+
}
|
|
132
|
+
function moveFocus(direction, value) {
|
|
133
|
+
const stops = enabledTabs.value;
|
|
134
|
+
if (stops.length === 0) return;
|
|
135
|
+
const index = stops.findIndex((tab) => tab.value === value);
|
|
136
|
+
let nextIndex = index;
|
|
137
|
+
switch (direction) {
|
|
138
|
+
case "next":
|
|
139
|
+
nextIndex = index >= 0 ? (index + 1) % stops.length : 0;
|
|
140
|
+
break;
|
|
141
|
+
case "prev":
|
|
142
|
+
nextIndex = index >= 0 ? (index - 1 + stops.length) % stops.length : stops.length - 1;
|
|
143
|
+
break;
|
|
144
|
+
case "first":
|
|
145
|
+
nextIndex = 0;
|
|
146
|
+
break;
|
|
147
|
+
case "last": nextIndex = stops.length - 1;
|
|
148
|
+
}
|
|
149
|
+
const next = stops[nextIndex];
|
|
150
|
+
if (!next) return;
|
|
151
|
+
focusedValue.value = next.value;
|
|
152
|
+
if (next.selectsOnFocus !== false) selectTab(next.value);
|
|
153
|
+
next.el.focus();
|
|
154
|
+
}
|
|
155
|
+
function registerTab(tab) {
|
|
156
|
+
const existingIndex = tabs.findIndex((t) => t.value === tab.value);
|
|
157
|
+
if (existingIndex >= 0) tabs.splice(existingIndex, 1, tab);
|
|
158
|
+
else tabs.push(tab);
|
|
159
|
+
}
|
|
160
|
+
function unregisterTab(value) {
|
|
161
|
+
const index = tabs.findIndex((t) => t.value === value);
|
|
162
|
+
if (index >= 0) tabs.splice(index, 1);
|
|
163
|
+
}
|
|
164
|
+
provide(tabListContextKey, {
|
|
165
|
+
value: computed(() => props.value),
|
|
166
|
+
size: computed(() => props.size),
|
|
167
|
+
layout: computed(() => props.layout),
|
|
168
|
+
hasDivider: computed(() => props.hasDivider),
|
|
169
|
+
tabs,
|
|
170
|
+
focusedValue,
|
|
171
|
+
registerTab,
|
|
172
|
+
unregisterTab,
|
|
173
|
+
selectTab,
|
|
174
|
+
moveFocus
|
|
175
|
+
});
|
|
176
|
+
return (_ctx, _cache) => {
|
|
177
|
+
return openBlock(), createElementBlock("div", {
|
|
178
|
+
class: normalizeClass(["astryx-tab-list", [
|
|
179
|
+
`astryx-tab-list--size-${__props.size}`,
|
|
180
|
+
`astryx-tab-list--layout-${__props.layout}`,
|
|
181
|
+
__props.hasDivider && "astryx-tab-list--has-divider"
|
|
182
|
+
]]),
|
|
183
|
+
role: "tablist"
|
|
184
|
+
}, [createElementVNode("div", _hoisted_1$1, [renderSlot(_ctx.$slots, "default")])], 2);
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
//#endregion
|
|
189
|
+
//#region src/TabList/TabMenu.vue
|
|
190
|
+
const _hoisted_1 = [
|
|
191
|
+
"id",
|
|
192
|
+
"aria-expanded",
|
|
193
|
+
"tabindex"
|
|
194
|
+
];
|
|
195
|
+
const _hoisted_2 = { class: "astryx-tab__label" };
|
|
196
|
+
const _hoisted_3 = ["aria-label"];
|
|
197
|
+
const _hoisted_4 = {
|
|
198
|
+
class: "astryx-tab-menu-heading",
|
|
199
|
+
role: "presentation"
|
|
200
|
+
};
|
|
201
|
+
const _hoisted_5 = [
|
|
202
|
+
"data-selected",
|
|
203
|
+
"aria-checked",
|
|
204
|
+
"onClick",
|
|
205
|
+
"onKeydown"
|
|
206
|
+
];
|
|
207
|
+
const _hoisted_6 = { class: "astryx-tab-menu-item-label" };
|
|
208
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
209
|
+
name: "AstryxTabMenu",
|
|
210
|
+
__name: "TabMenu",
|
|
211
|
+
props: {
|
|
212
|
+
label: {},
|
|
213
|
+
options: {}
|
|
214
|
+
},
|
|
215
|
+
setup(__props) {
|
|
216
|
+
const props = __props;
|
|
217
|
+
const context = inject(tabListContextKey);
|
|
218
|
+
const uid = useId();
|
|
219
|
+
const stopValue = `tab-menu:${uid}`;
|
|
220
|
+
const menuId = `astryx-tab-menu-${uid}`;
|
|
221
|
+
const anchorRef = ref(null);
|
|
222
|
+
const surfaceRef = ref(null);
|
|
223
|
+
const isOpen = ref(false);
|
|
224
|
+
const placement = computed(() => "below");
|
|
225
|
+
const alignment = computed(() => "start");
|
|
226
|
+
const selectedOption = computed(() => props.options.find((option) => option.value === context?.value.value));
|
|
227
|
+
const triggerLabel = computed(() => selectedOption.value?.label ?? props.label);
|
|
228
|
+
const hasSelectedOption = computed(() => selectedOption.value != null);
|
|
229
|
+
const sizeClass = computed(() => `astryx-tab--size-${context?.size.value ?? "md"}`);
|
|
230
|
+
const { position, detach } = usePositionedLayer({
|
|
231
|
+
alignment,
|
|
232
|
+
anchor: anchorRef,
|
|
233
|
+
gap: 4,
|
|
234
|
+
isOpen,
|
|
235
|
+
layer: surfaceRef,
|
|
236
|
+
placement
|
|
237
|
+
});
|
|
238
|
+
const listFocus = useListFocus({
|
|
239
|
+
hasRovingTabIndex: true,
|
|
240
|
+
itemSelector: "[role=\"menuitemradio\"]",
|
|
241
|
+
onEscape: () => {
|
|
242
|
+
isOpen.value = false;
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
useDismiss({
|
|
246
|
+
container: surfaceRef,
|
|
247
|
+
isEnabled: isOpen,
|
|
248
|
+
onDismiss: () => {
|
|
249
|
+
isOpen.value = false;
|
|
250
|
+
},
|
|
251
|
+
trigger: anchorRef
|
|
252
|
+
});
|
|
253
|
+
function register() {
|
|
254
|
+
if (!context || anchorRef.value == null) return;
|
|
255
|
+
context.registerTab({
|
|
256
|
+
disabled: false,
|
|
257
|
+
el: anchorRef.value,
|
|
258
|
+
selectsOnFocus: false,
|
|
259
|
+
value: stopValue
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
function toggle() {
|
|
263
|
+
isOpen.value = !isOpen.value;
|
|
264
|
+
}
|
|
265
|
+
function select(value) {
|
|
266
|
+
context?.selectTab(value);
|
|
267
|
+
isOpen.value = false;
|
|
268
|
+
}
|
|
269
|
+
function onTriggerKeyDown(event) {
|
|
270
|
+
if (!context || isOpen.value) return;
|
|
271
|
+
switch (event.key) {
|
|
272
|
+
case "ArrowRight":
|
|
273
|
+
case "ArrowDown":
|
|
274
|
+
event.preventDefault();
|
|
275
|
+
context.moveFocus("next", stopValue);
|
|
276
|
+
break;
|
|
277
|
+
case "ArrowLeft":
|
|
278
|
+
case "ArrowUp":
|
|
279
|
+
event.preventDefault();
|
|
280
|
+
context.moveFocus("prev", stopValue);
|
|
281
|
+
break;
|
|
282
|
+
case "Home":
|
|
283
|
+
event.preventDefault();
|
|
284
|
+
context.moveFocus("first", stopValue);
|
|
285
|
+
break;
|
|
286
|
+
case "End":
|
|
287
|
+
event.preventDefault();
|
|
288
|
+
context.moveFocus("last", stopValue);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
function onMenuKeyDown(event) {
|
|
292
|
+
if (event.key === "Tab") {
|
|
293
|
+
isOpen.value = false;
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
listFocus.handleKeyDown(event);
|
|
297
|
+
}
|
|
298
|
+
function onItemKeyDown(event, value) {
|
|
299
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
300
|
+
event.preventDefault();
|
|
301
|
+
select(value);
|
|
302
|
+
}
|
|
303
|
+
watch(surfaceRef, (element) => {
|
|
304
|
+
listFocus.listRef.value = element;
|
|
305
|
+
}, { immediate: true });
|
|
306
|
+
watch(isOpen, async (open) => {
|
|
307
|
+
if (!open) {
|
|
308
|
+
const shouldRestore = surfaceRef.value?.contains(document.activeElement) ?? false;
|
|
309
|
+
await nextTick();
|
|
310
|
+
if (shouldRestore) anchorRef.value?.focus();
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
await nextTick();
|
|
314
|
+
listFocus.focusFirst();
|
|
315
|
+
});
|
|
316
|
+
onMounted(register);
|
|
317
|
+
onUnmounted(() => {
|
|
318
|
+
context?.unregisterTab(stopValue);
|
|
319
|
+
detach();
|
|
320
|
+
});
|
|
321
|
+
return (_ctx, _cache) => {
|
|
322
|
+
return openBlock(), createElementBlock(Fragment, null, [createElementVNode("button", {
|
|
323
|
+
id: `astryx-tab-menu-trigger-${unref(uid)}`,
|
|
324
|
+
ref_key: "anchorRef",
|
|
325
|
+
ref: anchorRef,
|
|
326
|
+
type: "button",
|
|
327
|
+
class: normalizeClass(["astryx-tab astryx-tab-menu", [sizeClass.value, hasSelectedOption.value && "astryx-tab--selected"]]),
|
|
328
|
+
"data-tab-menu": "",
|
|
329
|
+
"aria-controls": menuId,
|
|
330
|
+
"aria-haspopup": "menu",
|
|
331
|
+
"aria-expanded": isOpen.value,
|
|
332
|
+
tabindex: hasSelectedOption.value ? 0 : -1,
|
|
333
|
+
onClick: toggle,
|
|
334
|
+
onKeydown: onTriggerKeyDown
|
|
335
|
+
}, [createElementVNode("span", _hoisted_2, toDisplayString(triggerLabel.value), 1), createVNode(_sfc_main$3, {
|
|
336
|
+
class: "astryx-tab-menu-chevron",
|
|
337
|
+
"data-state": isOpen.value ? "expanded" : "collapsed",
|
|
338
|
+
color: "inherit",
|
|
339
|
+
icon: "chevronDown",
|
|
340
|
+
size: "sm"
|
|
341
|
+
}, null, 8, ["data-state"])], 42, _hoisted_1), (openBlock(), createBlock(Teleport, { to: "body" }, [isOpen.value ? (openBlock(), createElementBlock("div", {
|
|
342
|
+
key: 0,
|
|
343
|
+
id: menuId,
|
|
344
|
+
ref_key: "surfaceRef",
|
|
345
|
+
ref: surfaceRef,
|
|
346
|
+
class: "astryx-tab-menu-dropdown",
|
|
347
|
+
role: "menu",
|
|
348
|
+
tabindex: "-1",
|
|
349
|
+
"aria-label": __props.label,
|
|
350
|
+
style: normalizeStyle({
|
|
351
|
+
top: `${unref(position).top}px`,
|
|
352
|
+
left: `${unref(position).left}px`
|
|
353
|
+
}),
|
|
354
|
+
onKeydown: onMenuKeyDown,
|
|
355
|
+
onFocusin: _cache[0] || (_cache[0] = (...args) => unref(listFocus).handleFocus && unref(listFocus).handleFocus(...args))
|
|
356
|
+
}, [createElementVNode("span", _hoisted_4, toDisplayString(__props.label), 1), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option) => {
|
|
357
|
+
return openBlock(), createElementBlock("div", {
|
|
358
|
+
key: option.value,
|
|
359
|
+
class: "astryx-tab-menu-item",
|
|
360
|
+
"data-selected": option.value === unref(context)?.value.value || void 0,
|
|
361
|
+
role: "menuitemradio",
|
|
362
|
+
"aria-checked": option.value === unref(context)?.value.value,
|
|
363
|
+
tabindex: "-1",
|
|
364
|
+
onClick: ($event) => select(option.value),
|
|
365
|
+
onKeydown: ($event) => onItemKeyDown($event, option.value)
|
|
366
|
+
}, [createElementVNode("span", _hoisted_6, [option.iconClass ? (openBlock(), createElementBlock("span", {
|
|
367
|
+
key: 0,
|
|
368
|
+
class: normalizeClass(["astryx-tab-menu-icon", option.iconClass])
|
|
369
|
+
}, null, 2)) : createCommentVNode("v-if", true), createTextVNode(" " + toDisplayString(option.label), 1)]), option.value === unref(context)?.value.value ? (openBlock(), createBlock(_sfc_main$3, {
|
|
370
|
+
key: 0,
|
|
371
|
+
color: "accent",
|
|
372
|
+
icon: "check",
|
|
373
|
+
size: "sm"
|
|
374
|
+
})) : createCommentVNode("v-if", true)], 40, _hoisted_5);
|
|
375
|
+
}), 128))], 44, _hoisted_3)) : createCommentVNode("v-if", true)]))], 64);
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
});
|
|
379
|
+
//#endregion
|
|
380
|
+
export { _sfc_main$1 as n, _sfc_main$2 as r, _sfc_main as t };
|
package/dist/Table/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as TableSortEntry, a as TableColumn, b as TableVerticalAlign, c as TableDividers, d as TableFilterValue, f as TablePlugin, g as TableSortDirection, i as TableCellProps, l as TableFilterField, m as TableRowProps, n as PixelWidth, o as TableColumnAlign, p as TableProps, r as ProportionalWidth, s as TableDensity, t as ColumnWidth, u as TableFilterState, v as TableSortState, y as TableTextOverflow } from "../types-JktRxujg.js";
|
|
2
|
+
import { A as generateColumns, C as UseTableColumnSettingsConfig, D as useTableColumnResize, E as UseTableColumnResizeConfig, F as sortRows, M as pixel, N as proportional, O as capitalize, P as resolveColumnWidths, S as ColumnSettingsOption, T as useTableColumnSettingsState, _ as useTablePagination, a as _default$3, b as useTableFilterState, c as _default, d as useTableSortableState, f as UseTableSelectionConfig, g as UseTablePaginationConfig, h as useTableSelectionState, i as _default$4, j as paginateData, k as cellText, l as UseTableSortableConfig, m as useTableSelection, n as _default$6, o as _default$2, p as UseTableSelectionStateConfig, r as _default$5, s as _default$1, t as _default$7, u as useTableSortable, v as UseTableFilteringConfig, w as useTableColumnSettings, x as useTableFiltering, y as applyTableFilters } from "../index-DXSs3rwa.js";
|
|
2
3
|
export { type ColumnSettingsOption, type ColumnWidth, type PixelWidth, type ProportionalWidth, _default as Table, _default$1 as TableBody, _default$2 as TableCell, type TableCellProps, type TableColumn, type TableColumnAlign, type TableDensity, type TableDividers, type TableFilterField, type TableFilterState, type TableFilterValue, _default$3 as TableFooter, _default$4 as TableHeader, _default$5 as TableHeaderCell, type TablePlugin, type TableProps, _default$6 as TableRow, type TableRowProps, _default$7 as TableSelectionToolbar, type TableSortDirection, type TableSortEntry, type TableSortState, type TableTextOverflow, type TableVerticalAlign, type UseTableColumnResizeConfig, type UseTableColumnSettingsConfig, type UseTableFilteringConfig, type UseTablePaginationConfig, type UseTableSelectionConfig, type UseTableSelectionStateConfig, type UseTableSortableConfig, applyTableFilters, capitalize, cellText, generateColumns, paginateData, paginateData as paginateTableData, pixel, proportional, resolveColumnWidths, sortRows, useTableColumnResize, useTableColumnSettings, useTableColumnSettingsState, useTableFilterState, useTableFiltering, useTablePagination, useTableSelection, useTableSelectionState, useTableSortable, useTableSortableState };
|
package/dist/Table/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as paginateData, D as sortRows, E as resolveColumnWidths, S as generateColumns, T as proportional, _ as useTableColumnSettings, a as _sfc_main$3, b as capitalize, c as _sfc_main, d as useTableSelection, f as useTableSelectionState, g as useTableFiltering, h as useTableFilterState, i as _sfc_main$4, l as useTableSortable, m as applyTableFilters, n as _sfc_main$6, o as _sfc_main$2, p as useTablePagination, r as _sfc_main$5, s as _sfc_main$1, t as _sfc_main$7, u as useTableSortableState, v as useTableColumnSettingsState, w as pixel, x as cellText, y as useTableColumnResize } from "../Table-
|
|
1
|
+
import { C as paginateData, D as sortRows, E as resolveColumnWidths, S as generateColumns, T as proportional, _ as useTableColumnSettings, a as _sfc_main$3, b as capitalize, c as _sfc_main, d as useTableSelection, f as useTableSelectionState, g as useTableFiltering, h as useTableFilterState, i as _sfc_main$4, l as useTableSortable, m as applyTableFilters, n as _sfc_main$6, o as _sfc_main$2, p as useTablePagination, r as _sfc_main$5, s as _sfc_main$1, t as _sfc_main$7, u as useTableSortableState, v as useTableColumnSettingsState, w as pixel, x as cellText, y as useTableColumnResize } from "../Table-D-LhAy_J.js";
|
|
2
2
|
export { _sfc_main as Table, _sfc_main$1 as TableBody, _sfc_main$2 as TableCell, _sfc_main$3 as TableFooter, _sfc_main$4 as TableHeader, _sfc_main$5 as TableHeaderCell, _sfc_main$6 as TableRow, _sfc_main$7 as TableSelectionToolbar, applyTableFilters, capitalize, cellText, generateColumns, paginateData, paginateData as paginateTableData, pixel, proportional, resolveColumnWidths, sortRows, useTableColumnResize, useTableColumnSettings, useTableColumnSettingsState, useTableFilterState, useTableFiltering, useTablePagination, useTableSelection, useTableSelectionState, useTableSortable, useTableSortableState };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as _sfc_main$10 } from "./Button-DrqeomlE.js";
|
|
2
|
+
import { a as useAstryxMessages } from "./context-Dbo22sck.js";
|
|
2
3
|
import { t as _sfc_main$11 } from "./IconButton-BNQuz9W_.js";
|
|
3
|
-
import {
|
|
4
|
-
import { t as _sfc_main$
|
|
5
|
-
import { t as _sfc_main$13 } from "./CheckboxInput-C86o3XoG.js";
|
|
4
|
+
import { t as _sfc_main$12 } from "./Icon-Dfr4k6-S.js";
|
|
5
|
+
import { t as _sfc_main$13 } from "./CheckboxInput-CMsEE1_4.js";
|
|
6
6
|
import { t as _sfc_main$14 } from "./Popover-Crhk9PNP.js";
|
|
7
|
-
import { t as _sfc_main$15 } from "./Pagination-
|
|
8
|
-
import { t as _sfc_main$16 } from "./Selector-
|
|
9
|
-
import { t as _sfc_main$17 } from "./TextInput-
|
|
7
|
+
import { t as _sfc_main$15 } from "./Pagination-HdhtykeF.js";
|
|
8
|
+
import { t as _sfc_main$16 } from "./Selector-Da-2BO3q.js";
|
|
9
|
+
import { t as _sfc_main$17 } from "./TextInput-BasnjVvy.js";
|
|
10
10
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, h, normalizeClass, normalizeStyle, openBlock, ref, renderList, renderSlot, toDisplayString, toValue, unref, watch, withCtx } from "vue";
|
|
11
11
|
import "../styles/table.css";
|
|
12
12
|
function proportional(value = 1, options) {
|
package/dist/Text/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
|
|
1
|
+
import { a as TextSize, c as TextWordBreak, i as TextProps, l as TextWrap, n as TextColor, o as TextType, r as TextDisplay, s as TextWeight, t as TextAs } from "../types-Bt-lSgYX.js";
|
|
2
|
+
import { t as _default } from "../index-Cm_TiLXU.js";
|
|
3
|
+
export { _default as Text, type TextAs, type TextColor, type TextDisplay, type TextProps, type TextSize, type TextType, type TextWeight, type TextWordBreak, type TextWrap };
|
package/dist/Text/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _sfc_main } from "../Text-
|
|
1
|
+
import { t as _sfc_main } from "../Text-BHVghsWo.js";
|
|
2
2
|
export { _sfc_main as Text };
|
|
@@ -8,19 +8,29 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
8
8
|
size: {},
|
|
9
9
|
color: { default: "primary" },
|
|
10
10
|
weight: {},
|
|
11
|
+
textWrap: {},
|
|
12
|
+
wordBreak: {},
|
|
13
|
+
hasStrikethrough: { type: Boolean },
|
|
14
|
+
hasTabularNumbers: { type: Boolean },
|
|
11
15
|
display: { default: "inline" },
|
|
12
16
|
as: { default: "span" },
|
|
13
17
|
maxLines: { default: 0 }
|
|
14
18
|
},
|
|
15
19
|
setup(__props) {
|
|
16
20
|
const props = __props;
|
|
21
|
+
const weight = computed(() => props.weight === "normal" ? "regular" : props.weight);
|
|
22
|
+
const isBlock = computed(() => props.display === "block" || props.maxLines > 0);
|
|
17
23
|
const classes = computed(() => [
|
|
18
24
|
"astryx-text",
|
|
19
25
|
`astryx-text--type-${props.type}`,
|
|
20
26
|
props.size && `astryx-text--size-${props.size}`,
|
|
21
27
|
`astryx-text--color-${props.color}`,
|
|
22
|
-
|
|
23
|
-
props.
|
|
28
|
+
weight.value && `astryx-text--weight-${weight.value}`,
|
|
29
|
+
props.textWrap && `astryx-text--wrap-${props.textWrap}`,
|
|
30
|
+
props.wordBreak && `astryx-text--word-${props.wordBreak}`,
|
|
31
|
+
props.hasStrikethrough && "astryx-text--strike",
|
|
32
|
+
props.hasTabularNumbers && "astryx-text--tabular",
|
|
33
|
+
isBlock.value && "astryx-text--block",
|
|
24
34
|
props.maxLines === 1 && "astryx-text--truncate-single",
|
|
25
35
|
props.maxLines > 1 && "astryx-text--truncate-multi"
|
|
26
36
|
]);
|
package/dist/TextArea/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Ct as TextAreaSize, Dt as TextAreaWrap, Et as TextAreaStatusType, St as TextAreaResize, Tt as TextAreaStatus, _t as _default, bt as TextAreaEmits, vt as TextAreaChangeAction, wt as TextAreaSlots, xt as TextAreaProps, yt as TextAreaChangeEvent } from "../index-
|
|
1
|
+
import { Ct as TextAreaSize, Dt as TextAreaWrap, Et as TextAreaStatusType, St as TextAreaResize, Tt as TextAreaStatus, _t as _default, bt as TextAreaEmits, vt as TextAreaChangeAction, wt as TextAreaSlots, xt as TextAreaProps, yt as TextAreaChangeEvent } from "../index-C6iJwTL0.js";
|
|
2
2
|
export { _default as TextArea, type TextAreaChangeAction, type TextAreaChangeEvent, type TextAreaEmits, type TextAreaProps, type TextAreaResize, type TextAreaSize, type TextAreaSlots, type TextAreaStatus, type TextAreaStatusType, type TextAreaWrap };
|
package/dist/TextArea/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _sfc_main } from "../TextArea-
|
|
1
|
+
import { t as _sfc_main } from "../TextArea-Cv9UVbzS.js";
|
|
2
2
|
export { _sfc_main as TextArea };
|
|
@@ -3,8 +3,9 @@ import { n as useButtonTooltip, r as _sfc_main$2 } from "./Button-DrqeomlE.js";
|
|
|
3
3
|
import { t as _sfc_main$3 } from "./ButtonTooltip-nWWrth8j.js";
|
|
4
4
|
import { t as _sfc_main$4 } from "./FieldIcon--NTgW5IU.js";
|
|
5
5
|
import { t as _sfc_main$5 } from "./IconButton-BNQuz9W_.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { i as useAriaRequired } from "./context-Cfjh8te1.js";
|
|
7
|
+
import { n as _sfc_main$6 } from "./FieldLabel-DmmJyX7w.js";
|
|
8
|
+
import { t as _sfc_main$7 } from "./Field-8zRxzDHE.js";
|
|
8
9
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, mergeModels, mergeProps, nextTick, normalizeClass, normalizeStyle, onMounted, openBlock, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toRaw, unref, useAttrs, useId, useModel, useTemplateRef, watch, withCtx } from "vue";
|
|
9
10
|
import "../styles/text-area.css";
|
|
10
11
|
//#region src/TextArea/useTextAreaAction.ts
|
|
@@ -148,6 +149,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
148
149
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
149
150
|
const props = __props;
|
|
150
151
|
const emit = __emit;
|
|
152
|
+
const ariaRequired = useAriaRequired(props);
|
|
151
153
|
const model = useModel(__props, "modelValue");
|
|
152
154
|
const attrs = useAttrs();
|
|
153
155
|
const input = useTemplateRef("input");
|
|
@@ -300,7 +302,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
300
302
|
readonly: __props.isReadOnly || showsDisabledMessage.value,
|
|
301
303
|
"aria-disabled": showsDisabledMessage.value || void 0,
|
|
302
304
|
"aria-busy": busy.value || void 0,
|
|
303
|
-
"aria-required":
|
|
305
|
+
"aria-required": unref(ariaRequired),
|
|
304
306
|
"aria-invalid": __props.status?.type === "error" ? true : inputAttrs()["aria-invalid"],
|
|
305
307
|
"aria-labelledby": labelledBy(field.labelId),
|
|
306
308
|
"aria-describedby": describedBy(field.describedBy),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ct as TextInputChangeAction, dt as TextInputProps, ft as TextInputSize, gt as TextInputType, ht as TextInputStatusType, lt as TextInputChangeEvent, mt as TextInputStatus, pt as TextInputSlots, st as _default, ut as TextInputEmits } from "../index-
|
|
1
|
+
import { ct as TextInputChangeAction, dt as TextInputProps, ft as TextInputSize, gt as TextInputType, ht as TextInputStatusType, lt as TextInputChangeEvent, mt as TextInputStatus, pt as TextInputSlots, st as _default, ut as TextInputEmits } from "../index-C6iJwTL0.js";
|
|
2
2
|
export { _default as TextInput, type TextInputChangeAction, type TextInputChangeEvent, type TextInputEmits, type TextInputProps, type TextInputSize, type TextInputSlots, type TextInputStatus, type TextInputStatusType, type TextInputType };
|
package/dist/TextInput/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _sfc_main } from "../TextInput-
|
|
1
|
+
import { t as _sfc_main } from "../TextInput-BasnjVvy.js";
|
|
2
2
|
export { _sfc_main as TextInput };
|
|
@@ -3,8 +3,9 @@ import { n as useButtonTooltip, r as _sfc_main$2 } from "./Button-DrqeomlE.js";
|
|
|
3
3
|
import { t as _sfc_main$3 } from "./ButtonTooltip-nWWrth8j.js";
|
|
4
4
|
import { t as _sfc_main$4 } from "./FieldIcon--NTgW5IU.js";
|
|
5
5
|
import { t as _sfc_main$5 } from "./IconButton-BNQuz9W_.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { i as useAriaRequired } from "./context-Cfjh8te1.js";
|
|
7
|
+
import { n as _sfc_main$6 } from "./FieldLabel-DmmJyX7w.js";
|
|
8
|
+
import { t as _sfc_main$7 } from "./Field-8zRxzDHE.js";
|
|
8
9
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, mergeModels, mergeProps, nextTick, normalizeClass, normalizeStyle, onMounted, openBlock, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toRaw, unref, useAttrs, useId, useModel, useTemplateRef, watch, withCtx } from "vue";
|
|
9
10
|
import "../styles/text-input.css";
|
|
10
11
|
//#region src/TextInput/useTextInputAction.ts
|
|
@@ -140,6 +141,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
140
141
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
141
142
|
const props = __props;
|
|
142
143
|
const emit = __emit;
|
|
144
|
+
const ariaRequired = useAriaRequired(props);
|
|
143
145
|
const model = useModel(__props, "modelValue");
|
|
144
146
|
const attrs = useAttrs();
|
|
145
147
|
const input = useTemplateRef("input");
|
|
@@ -284,7 +286,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
284
286
|
readonly: __props.isReadOnly || showsDisabledMessage.value,
|
|
285
287
|
"aria-disabled": showsDisabledMessage.value || void 0,
|
|
286
288
|
"aria-busy": busy.value || void 0,
|
|
287
|
-
"aria-required":
|
|
289
|
+
"aria-required": unref(ariaRequired),
|
|
288
290
|
"aria-invalid": __props.status?.type === "error" ? true : inputAttrs()["aria-invalid"],
|
|
289
291
|
"aria-labelledby": labelledBy(field.labelId),
|
|
290
292
|
"aria-describedby": describedBy(field.describedBy),
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { _ as ThemeSurfaceInput, a as _default$1, c as isDefinedTheme, d as DefineThemeInput, f as MediaThemeMode, g as ThemeProps, h as ThemeMode, i as useMediaTheme, l as neutralTheme, m as ThemeDefinition, n as useTheme, o as _default, p as MediaThemeProps, r as UseMediaThemeReturn, s as defineTheme, t as UseThemeReturn, u as normalizeTokenName, v as ThemeTokenValue, y as ThemeTokens } from "../index-CRizexSC.js";
|
|
2
|
+
export { type DefineThemeInput, _default as MediaTheme, type MediaThemeMode, type MediaThemeProps, _default$1 as Theme, type ThemeDefinition, type ThemeMode, type ThemeProps, type ThemeSurfaceInput, type ThemeTokenValue, type ThemeTokens, type UseMediaThemeReturn, type UseThemeReturn, defineTheme, isDefinedTheme, neutralTheme, normalizeTokenName, useMediaTheme, useTheme };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as defineTheme, c as normalizeTokenName, i as _sfc_main, n as useMediaTheme, o as isDefinedTheme, r as _sfc_main$1, s as neutralTheme, t as useTheme } from "../Theme-BuUiiJNr.js";
|
|
2
|
+
export { _sfc_main as MediaTheme, _sfc_main$1 as Theme, defineTheme, isDefinedTheme, neutralTheme, normalizeTokenName, useMediaTheme, useTheme };
|