@leaflink/stash 49.1.0 → 49.3.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/DataViewToolbar.js +47 -45
- package/dist/DataViewToolbar.js.map +1 -1
- package/dist/DataViewToolbar.vue.d.ts +12 -4
- package/dist/ObfuscateText.js +25 -26
- package/dist/ObfuscateText.js.map +1 -1
- package/dist/ObfuscateText.vue.d.ts +12 -9
- package/dist/PageNavigation.js +8 -8
- package/dist/Tab.js +96 -7
- package/dist/Tab.js.map +1 -1
- package/dist/Tabs.js +2 -2
- package/dist/{Tabs.vue_used_vue_type_style_index_0_lang.module-3aa36673.js → Tabs.vue_used_vue_type_style_index_0_lang.module-d7530989.js} +13 -13
- package/dist/{Tabs.vue_used_vue_type_style_index_0_lang.module-3aa36673.js.map → Tabs.vue_used_vue_type_style_index_0_lang.module-d7530989.js.map} +1 -1
- package/dist/components.css +1 -1
- package/dist/obfuscateText.d.ts +25 -0
- package/dist/utils/obfuscateText.js +10 -0
- package/dist/utils/obfuscateText.js.map +1 -0
- package/package.json +1 -1
- package/dist/Tab.vue_vue_type_script_setup_true_lang-9aa53203.js +0 -93
- package/dist/Tab.vue_vue_type_script_setup_true_lang-9aa53203.js.map +0 -1
package/dist/DataViewToolbar.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as $, inject as j, ref as z, computed as x, onBeforeMount as U, openBlock as a, createElementBlock as
|
|
1
|
+
import { defineComponent as $, inject as j, ref as z, computed as x, onBeforeMount as U, openBlock as a, createElementBlock as r, normalizeClass as W, unref as e, createElementVNode as k, createBlock as F, createCommentVNode as s, renderSlot as J, toDisplayString as K, Fragment as L, createVNode as n, withCtx as y } from "vue";
|
|
2
2
|
import { t as S } from "./locale.js";
|
|
3
3
|
import _ from "./Button.js";
|
|
4
4
|
import O from "./Checkbox.js";
|
|
@@ -25,84 +25,86 @@ const q = { class: "tw-flex tw-place-items-center" }, G = { class: "tw-flex tw-i
|
|
|
25
25
|
props: {
|
|
26
26
|
allRowsSelected: { type: Boolean, default: !1 },
|
|
27
27
|
hidePageStats: { type: Boolean, default: !1 },
|
|
28
|
-
radius: { default:
|
|
29
|
-
someRowsSelected: { type: Boolean, default: !1 }
|
|
28
|
+
radius: { default: void 0 },
|
|
29
|
+
someRowsSelected: { type: Boolean, default: !1 },
|
|
30
|
+
hasTabsAbove: { type: Boolean, default: !1 }
|
|
30
31
|
},
|
|
31
32
|
emits: ["select"],
|
|
32
33
|
setup(E, { emit: P }) {
|
|
33
|
-
const
|
|
34
|
+
const t = E, V = P, {
|
|
34
35
|
isWithinModule: i,
|
|
35
|
-
variant:
|
|
36
|
-
density:
|
|
36
|
+
variant: m,
|
|
37
|
+
density: p,
|
|
37
38
|
currentPage: l,
|
|
38
|
-
hasToolbar:
|
|
39
|
+
hasToolbar: w,
|
|
39
40
|
isPaginationEnabled: N,
|
|
40
41
|
isSelectable: R,
|
|
41
|
-
pageCount:
|
|
42
|
-
pageSize:
|
|
43
|
-
totalDataCount:
|
|
44
|
-
goPrevPage:
|
|
45
|
-
goNextPage:
|
|
46
|
-
isEmpty:
|
|
47
|
-
isLoading:
|
|
48
|
-
} = j(B.key, B.defaults),
|
|
49
|
-
const
|
|
50
|
-
return S("ll.pageStats", { from:
|
|
42
|
+
pageCount: f,
|
|
43
|
+
pageSize: v,
|
|
44
|
+
totalDataCount: b,
|
|
45
|
+
goPrevPage: T,
|
|
46
|
+
goNextPage: A,
|
|
47
|
+
isEmpty: D,
|
|
48
|
+
isLoading: I
|
|
49
|
+
} = j(B.key, B.defaults), h = z(0), d = x(() => t.radius ? t.radius : i.value ? "none" : m.value === "table" ? t.hasTabsAbove ? "rounded-top-right" : "rounded-top" : "rounded"), M = x(() => {
|
|
50
|
+
const u = v.value * (l.value - 1) + 1, o = Math.min(v.value * l.value, b.value), c = b.value;
|
|
51
|
+
return S("ll.pageStats", { from: u, to: o, total: c });
|
|
51
52
|
});
|
|
52
|
-
function
|
|
53
|
-
V("select"),
|
|
53
|
+
function g() {
|
|
54
|
+
V("select"), h.value++;
|
|
54
55
|
}
|
|
55
56
|
return U(() => {
|
|
56
|
-
|
|
57
|
-
}), (
|
|
58
|
-
class: W(["stash-data-view-toolbar tw-flex tw-min-h-15 tw-items-center tw-justify-between tw-bg-white tw-py-1.5", {
|
|
57
|
+
w && (w.value = !0);
|
|
58
|
+
}), (u, o) => (a(), r("div", {
|
|
59
|
+
class: W(["stash-data-view-toolbar tw-flex tw-min-h-15 tw-items-center tw-justify-between tw-bg-white tw-py-1.5 tw-shadow", {
|
|
59
60
|
"tw-border-t tw-border-ice-200": e(i),
|
|
60
|
-
"tw-rounded":
|
|
61
|
-
"tw-rounded
|
|
62
|
-
"tw-
|
|
63
|
-
"tw-
|
|
64
|
-
"
|
|
61
|
+
"tw-rounded-tr": d.value === "rounded-top-right",
|
|
62
|
+
"tw-rounded": d.value === "rounded",
|
|
63
|
+
"tw-rounded-t": d.value === "rounded-top",
|
|
64
|
+
"tw-mb-3": e(m) !== "table" && !e(i),
|
|
65
|
+
"tw-px-0": e(p) === "compact",
|
|
66
|
+
"lg:tw-px-3": e(p) === "comfortable"
|
|
65
67
|
}]),
|
|
66
68
|
"data-test": "stash-data-view-toolbar"
|
|
67
69
|
}, [
|
|
68
70
|
k("div", q, [
|
|
69
|
-
e(R) && !e(
|
|
70
|
-
key:
|
|
71
|
-
checked:
|
|
72
|
-
indeterminate:
|
|
71
|
+
e(R) && !e(D) ? (a(), F(O, {
|
|
72
|
+
key: h.value,
|
|
73
|
+
checked: t.allRowsSelected,
|
|
74
|
+
indeterminate: t.someRowsSelected && !t.allRowsSelected,
|
|
73
75
|
title: e(S)("ll.selectAll"),
|
|
74
|
-
disabled: e(
|
|
75
|
-
"onUpdate:indeterminate":
|
|
76
|
-
"onUpdate:checked":
|
|
76
|
+
disabled: e(I),
|
|
77
|
+
"onUpdate:indeterminate": g,
|
|
78
|
+
"onUpdate:checked": g
|
|
77
79
|
}, null, 8, ["checked", "indeterminate", "title", "disabled"])) : s("", !0),
|
|
78
80
|
k("div", G, [
|
|
79
|
-
J(
|
|
81
|
+
J(u.$slots, "default")
|
|
80
82
|
])
|
|
81
83
|
]),
|
|
82
|
-
e(N) ? (a(),
|
|
83
|
-
|
|
84
|
-
e(
|
|
85
|
-
|
|
84
|
+
e(N) ? (a(), r("div", H, [
|
|
85
|
+
t.hidePageStats ? s("", !0) : (a(), r("span", Q, K(M.value), 1)),
|
|
86
|
+
e(f) > 1 ? (a(), r(L, { key: 1 }, [
|
|
87
|
+
n(_, {
|
|
86
88
|
icon: "",
|
|
87
89
|
class: "tw-h-9 tw-w-9 tw-p-1.5",
|
|
88
90
|
"data-test": "button|prev-page",
|
|
89
91
|
disabled: e(l) === 1,
|
|
90
|
-
onClick:
|
|
92
|
+
onClick: o[0] || (o[0] = (c) => e(T)({ shouldEmit: !0 }))
|
|
91
93
|
}, {
|
|
92
94
|
default: y(() => [
|
|
93
|
-
|
|
95
|
+
n(C, { name: "chevron-left" })
|
|
94
96
|
]),
|
|
95
97
|
_: 1
|
|
96
98
|
}, 8, ["disabled"]),
|
|
97
|
-
|
|
99
|
+
n(_, {
|
|
98
100
|
icon: "",
|
|
99
101
|
class: "tw-h-9 tw-w-9 tw-p-1.5",
|
|
100
102
|
"data-test": "button|next-page",
|
|
101
|
-
disabled: e(l) === e(
|
|
102
|
-
onClick:
|
|
103
|
+
disabled: e(l) === e(f),
|
|
104
|
+
onClick: o[1] || (o[1] = (c) => e(A)({ shouldEmit: !0 }))
|
|
103
105
|
}, {
|
|
104
106
|
default: y(() => [
|
|
105
|
-
|
|
107
|
+
n(C, { name: "chevron-right" })
|
|
106
108
|
]),
|
|
107
109
|
_: 1
|
|
108
110
|
}, 8, ["disabled"])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataViewToolbar.js","sources":["../src/components/DataViewToolbar/DataViewToolbar.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, inject, onBeforeMount, ref } from 'vue';\n\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import Checkbox from '../Checkbox/Checkbox.vue';\n import { DATA_VIEW_INJECTION } from '../DataView/DataView.vue';\n import Icon from '../Icon/Icon.vue';\n import { ToolbarRadiuses } from './DataViewToolbar.types';\n\n export interface DataViewToolbarProps {\n /**\n * When DataView has `variant=\"table\"` and Table has `is-selectable` enabled, it provides a way to flag\n * a checkbox whenever all rows are selected, just like the standalone version on TableHeaderRow.\n */\n allRowsSelected?: boolean;\n\n /**\n * Hides the page statistics (ex: \"1 - 12 of 20\") in the toolbar\n */\n hidePageStats?: boolean;\n\n /**\n * Controls the corners of DataViewToolbar with the \"border-radius\" CSS property. The default value is \"rounded\".\n */\n radius?: ToolbarRadiuses;\n\n /**\n * When DataView has variant=\"table\" and Table has `is-selectable` enabled, it provides a way to flag\n * a checkbox whenever one or more, but not all rows are selected, just like the standalone\n * version on TableHeaderRow.\n */\n someRowsSelected?: boolean;\n }\n\n const props = withDefaults(defineProps<DataViewToolbarProps>(), {\n allRowsSelected: false,\n hidePageStats: false,\n radius:
|
|
1
|
+
{"version":3,"file":"DataViewToolbar.js","sources":["../src/components/DataViewToolbar/DataViewToolbar.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, inject, onBeforeMount, ref } from 'vue';\n\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import Checkbox from '../Checkbox/Checkbox.vue';\n import { DATA_VIEW_INJECTION } from '../DataView/DataView.vue';\n import Icon from '../Icon/Icon.vue';\n import { ToolbarRadiuses } from './DataViewToolbar.types';\n\n export interface DataViewToolbarProps {\n /**\n * When DataView has `variant=\"table\"` and Table has `is-selectable` enabled, it provides a way to flag\n * a checkbox whenever all rows are selected, just like the standalone version on TableHeaderRow.\n */\n allRowsSelected?: boolean;\n\n /**\n * Hides the page statistics (ex: \"1 - 12 of 20\") in the toolbar\n */\n hidePageStats?: boolean;\n\n /**\n * Controls the corners of DataViewToolbar with the \"border-radius\" CSS property. The default value is \"rounded\".\n */\n radius?: ToolbarRadiuses;\n\n /**\n * When DataView has variant=\"table\" and Table has `is-selectable` enabled, it provides a way to flag\n * a checkbox whenever one or more, but not all rows are selected, just like the standalone\n * version on TableHeaderRow.\n */\n someRowsSelected?: boolean;\n\n /**\n * When DataView has tabs above it, we need to remove the top left rounded corner\n */\n hasTabsAbove?: boolean;\n }\n\n const props = withDefaults(defineProps<DataViewToolbarProps>(), {\n allRowsSelected: false,\n hidePageStats: false,\n radius: undefined,\n someRowsSelected: false,\n hasTabsAbove: false,\n });\n\n const emit = defineEmits<{\n (e: 'select'): void;\n }>();\n\n const {\n isWithinModule,\n variant: dataViewVariant,\n density,\n currentPage,\n hasToolbar,\n isPaginationEnabled,\n isSelectable,\n pageCount,\n pageSize,\n totalDataCount,\n goPrevPage,\n goNextPage,\n isEmpty,\n isLoading,\n } = inject(DATA_VIEW_INJECTION.key, DATA_VIEW_INJECTION.defaults);\n\n const checkboxKey = ref(0);\n\n const computedRadius = computed<ToolbarRadiuses>(() => {\n if (props.radius) {\n return props.radius;\n }\n\n if (isWithinModule.value) {\n return 'none';\n }\n\n if (dataViewVariant.value === 'table') {\n if (props.hasTabsAbove) {\n return 'rounded-top-right';\n }\n\n return 'rounded-top';\n }\n\n return 'rounded';\n });\n\n // #region pagination\n const pageStats = computed(() => {\n const from = pageSize.value * (currentPage.value - 1) + 1;\n const to = Math.min(pageSize.value * currentPage.value, totalDataCount.value);\n const total = totalDataCount.value;\n\n return t('ll.pageStats', { from, to, total });\n });\n // #endregion pagination\n\n function onSelect() {\n emit('select');\n\n /**\n * In Vue (as of this writing), if a user checks a native checkbox but the v-model is `false` and does not change from `false`, then the checkbox will display as checked even though the v-model is still `false`.\n * Forcing a re-render with a `key` change allows the checkbox to stay unchecked if its v-model is still `false` and its v-model not been changed.\n * To verify that this is necessary, test the \"select all\" checkbox in the SelectionWithSomeDisabled story in Table.story.ts with and without the `key` attribute.\n */\n checkboxKey.value++;\n }\n\n onBeforeMount(() => {\n if (hasToolbar) {\n hasToolbar.value = true;\n }\n });\n</script>\n\n<template>\n <div\n class=\"stash-data-view-toolbar tw-flex tw-min-h-15 tw-items-center tw-justify-between tw-bg-white tw-py-1.5 tw-shadow\"\n :class=\"{\n 'tw-border-t tw-border-ice-200': isWithinModule,\n 'tw-rounded-tr': computedRadius === 'rounded-top-right',\n 'tw-rounded': computedRadius === 'rounded',\n 'tw-rounded-t': computedRadius === 'rounded-top',\n 'tw-mb-3': dataViewVariant !== 'table' && !isWithinModule,\n 'tw-px-0': density === 'compact',\n 'lg:tw-px-3': density === 'comfortable',\n }\"\n data-test=\"stash-data-view-toolbar\"\n >\n <div class=\"tw-flex tw-place-items-center\">\n <Checkbox\n v-if=\"isSelectable && !isEmpty\"\n :key=\"checkboxKey\"\n :checked=\"props.allRowsSelected\"\n :indeterminate=\"props.someRowsSelected && !props.allRowsSelected\"\n :title=\"t('ll.selectAll')\"\n :disabled=\"isLoading\"\n @update:indeterminate=\"onSelect\"\n @update:checked=\"onSelect\"\n />\n <div class=\"tw-flex tw-items-center tw-gap-x-2 lg:tw-gap-x-6\">\n <!-- @slot default -->\n <slot></slot>\n </div>\n </div>\n\n <!-- Pagination -->\n <div v-if=\"isPaginationEnabled\" class=\"tw-flex tw-items-center\">\n <span v-if=\"!props.hidePageStats\" class=\"tw-mr-1.5 tw-text-xs\">\n {{ pageStats }}\n </span>\n <template v-if=\"pageCount > 1\">\n <Button\n icon\n class=\"tw-h-9 tw-w-9 tw-p-1.5\"\n data-test=\"button|prev-page\"\n :disabled=\"currentPage === 1\"\n @click=\"goPrevPage({ shouldEmit: true })\"\n >\n <Icon name=\"chevron-left\" />\n </Button>\n <Button\n icon\n class=\"tw-h-9 tw-w-9 tw-p-1.5\"\n data-test=\"button|next-page\"\n :disabled=\"currentPage === pageCount\"\n @click=\"goNextPage({ shouldEmit: true })\"\n >\n <Icon name=\"chevron-right\" />\n </Button>\n </template>\n </div>\n </div>\n</template>\n"],"names":["props","__props","emit","__emit","isWithinModule","dataViewVariant","density","currentPage","hasToolbar","isPaginationEnabled","isSelectable","pageCount","pageSize","totalDataCount","goPrevPage","goNextPage","isEmpty","isLoading","inject","DATA_VIEW_INJECTION","checkboxKey","ref","computedRadius","computed","pageStats","from","to","total","t","onSelect","onBeforeMount"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCE,UAAMA,IAAQC,GAQRC,IAAOC,GAIP;AAAA,MACJ,gBAAAC;AAAA,MACA,SAASC;AAAA,MACT,SAAAC;AAAA,MACA,aAAAC;AAAA,MACA,YAAAC;AAAA,MACA,qBAAAC;AAAA,MACA,cAAAC;AAAA,MACA,WAAAC;AAAA,MACA,UAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,YAAAC;AAAA,MACA,YAAAC;AAAA,MACA,SAAAC;AAAA,MACA,WAAAC;AAAA,IACE,IAAAC,EAAOC,EAAoB,KAAKA,EAAoB,QAAQ,GAE1DC,IAAcC,EAAI,CAAC,GAEnBC,IAAiBC,EAA0B,MAC3CvB,EAAM,SACDA,EAAM,SAGXI,EAAe,QACV,SAGLC,EAAgB,UAAU,UACxBL,EAAM,eACD,sBAGF,gBAGF,SACR,GAGKwB,IAAYD,EAAS,MAAM;AAC/B,YAAME,IAAOb,EAAS,SAASL,EAAY,QAAQ,KAAK,GAClDmB,IAAK,KAAK,IAAId,EAAS,QAAQL,EAAY,OAAOM,EAAe,KAAK,GACtEc,IAAQd,EAAe;AAE7B,aAAOe,EAAE,gBAAgB,EAAE,MAAAH,GAAM,IAAAC,GAAI,OAAAC,GAAO;AAAA,IAAA,CAC7C;AAGD,aAASE,IAAW;AAClB,MAAA3B,EAAK,QAAQ,GAODkB,EAAA;AAAA,IACd;AAEA,WAAAU,EAAc,MAAM;AAClB,MAAItB,MACFA,EAAW,QAAQ;AAAA,IACrB,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -52,27 +52,34 @@ export declare interface DataViewToolbarProps {
|
|
|
52
52
|
* version on TableHeaderRow.
|
|
53
53
|
*/
|
|
54
54
|
someRowsSelected?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* When DataView has tabs above it, we need to remove the top left rounded corner
|
|
57
|
+
*/
|
|
58
|
+
hasTabsAbove?: boolean;
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DataViewToolbarProps>, {
|
|
58
62
|
allRowsSelected: boolean;
|
|
59
63
|
hidePageStats: boolean;
|
|
60
|
-
radius:
|
|
64
|
+
radius: undefined;
|
|
61
65
|
someRowsSelected: boolean;
|
|
66
|
+
hasTabsAbove: boolean;
|
|
62
67
|
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
63
68
|
select: () => void;
|
|
64
69
|
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DataViewToolbarProps>, {
|
|
65
70
|
allRowsSelected: boolean;
|
|
66
71
|
hidePageStats: boolean;
|
|
67
|
-
radius:
|
|
72
|
+
radius: undefined;
|
|
68
73
|
someRowsSelected: boolean;
|
|
74
|
+
hasTabsAbove: boolean;
|
|
69
75
|
}>>> & Readonly<{
|
|
70
76
|
onSelect?: (() => any) | undefined;
|
|
71
77
|
}>, {
|
|
72
|
-
radius: "none" | "rounded" | "rounded-top";
|
|
78
|
+
radius: "none" | "rounded" | "rounded-top" | "rounded-top-right";
|
|
73
79
|
allRowsSelected: boolean;
|
|
74
80
|
hidePageStats: boolean;
|
|
75
81
|
someRowsSelected: boolean;
|
|
82
|
+
hasTabsAbove: boolean;
|
|
76
83
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
|
|
77
84
|
default?(_: {}): any;
|
|
78
85
|
}>;
|
|
@@ -81,7 +88,8 @@ export default _default;
|
|
|
81
88
|
declare enum ToolbarRadius {
|
|
82
89
|
None = "none",
|
|
83
90
|
Rounded = "rounded",
|
|
84
|
-
RoundedTop = "rounded-top"
|
|
91
|
+
RoundedTop = "rounded-top",
|
|
92
|
+
RoundedTopRight = "rounded-top-right"
|
|
85
93
|
}
|
|
86
94
|
|
|
87
95
|
declare type ToolbarRadiuses = `${ToolbarRadius}`;
|
package/dist/ObfuscateText.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as n, ref as r, computed as u, openBlock as a, createElementBlock as c, createTextVNode as i, toDisplayString as m, createBlock as f, withCtx as p, createVNode as h, normalizeClass as d, createCommentVNode as g } from "vue";
|
|
2
|
+
import x from "./Button.js";
|
|
3
|
+
import C from "./Icon.js";
|
|
4
|
+
import b from "./utils/obfuscateText.js";
|
|
4
5
|
import "./Button.vue_used_vue_type_style_index_0_lang.module-4dabc2a9.js";
|
|
5
6
|
import "./_plugin-vue_export-helper-dad06003.js";
|
|
6
7
|
import "lodash-es/uniqueId";
|
|
@@ -9,49 +10,47 @@ import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
|
|
9
10
|
const k = {
|
|
10
11
|
class: "stash-obfuscate-text",
|
|
11
12
|
"data-test": "stash-obfuscate-text"
|
|
12
|
-
},
|
|
13
|
+
}, D = /* @__PURE__ */ n({
|
|
13
14
|
name: "ll-obfuscate-text",
|
|
14
15
|
__name: "ObfuscateText",
|
|
15
16
|
props: {
|
|
16
17
|
text: {},
|
|
18
|
+
obfuscateAll: { type: Boolean, default: !1 },
|
|
19
|
+
showToggle: { type: Boolean, default: !1 },
|
|
20
|
+
lengthToKeep: { default: 0 },
|
|
17
21
|
maskChar: { default: "•" },
|
|
18
22
|
maskCharCount: { default: 10 },
|
|
19
|
-
|
|
20
|
-
position: { default: "start" },
|
|
21
|
-
obfuscateAll: { type: Boolean, default: !1 },
|
|
22
|
-
showToggle: { type: Boolean, default: !1 }
|
|
23
|
+
position: { default: "start" }
|
|
23
24
|
},
|
|
24
|
-
setup(
|
|
25
|
-
const e =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
p(f(n.value) + " ", 1),
|
|
35
|
-
o.showToggle ? (s(), h(C, {
|
|
25
|
+
setup(s) {
|
|
26
|
+
const e = r(!1), t = s, l = u(() => t.showToggle && e.value ? t.text : t.obfuscateAll ? t.maskChar.repeat(t.maskCharCount) : b(t.text, {
|
|
27
|
+
maskChar: t.maskChar,
|
|
28
|
+
maskCharCount: t.maskCharCount,
|
|
29
|
+
lengthToKeep: t.lengthToKeep,
|
|
30
|
+
position: t.position
|
|
31
|
+
}));
|
|
32
|
+
return (w, o) => (a(), c("span", k, [
|
|
33
|
+
i(m(l.value) + " ", 1),
|
|
34
|
+
t.showToggle ? (a(), f(x, {
|
|
36
35
|
key: 0,
|
|
37
36
|
class: "tw-ml-1 tw-h-auto tw-w-auto tw-p-0",
|
|
38
37
|
icon: "",
|
|
39
38
|
type: "button",
|
|
40
|
-
onClick:
|
|
39
|
+
onClick: o[0] || (o[0] = (T) => e.value = !e.value)
|
|
41
40
|
}, {
|
|
42
|
-
default:
|
|
43
|
-
|
|
41
|
+
default: p(() => [
|
|
42
|
+
h(C, {
|
|
44
43
|
name: e.value ? "hide" : "show",
|
|
45
|
-
class:
|
|
44
|
+
class: d(["tw-cursor-pointer", e.value ? "stash-obfuscate-text__hide-toggle-icon" : "stash-obfuscate-text__show-toggle-icon"]),
|
|
46
45
|
"data-test": e.value ? "stash-obfuscate-text|hide-toggle-icon" : "stash-obfuscate-text|show-toggle-icon"
|
|
47
46
|
}, null, 8, ["name", "class", "data-test"])
|
|
48
47
|
]),
|
|
49
48
|
_: 1
|
|
50
|
-
})) :
|
|
49
|
+
})) : g("", !0)
|
|
51
50
|
]));
|
|
52
51
|
}
|
|
53
52
|
});
|
|
54
53
|
export {
|
|
55
|
-
|
|
54
|
+
D as default
|
|
56
55
|
};
|
|
57
56
|
//# sourceMappingURL=ObfuscateText.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObfuscateText.js","sources":["../src/components/ObfuscateText/ObfuscateText.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, ref } from 'vue';\n\n import Button from '../Button/Button.vue';\n import Icon from '../Icon/Icon.vue';\n\n defineOptions({ name: 'll-obfuscate-text' });\n\n
|
|
1
|
+
{"version":3,"file":"ObfuscateText.js","sources":["../src/components/ObfuscateText/ObfuscateText.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, ref } from 'vue';\n\n import Button from '../Button/Button.vue';\n import Icon from '../Icon/Icon.vue';\n\n defineOptions({ name: 'll-obfuscate-text' });\n\n import obfuscateText, { ObfuscateTextOptions } from '../../utils/obfuscateText';\n\n export interface ObfuscateTextProps extends ObfuscateTextOptions {\n /**\n * The full text\n */\n text: string;\n\n /**\n * Whether to obfuscate all characters.\n * @deprecated omit the lengthToKeep prop to achieve the same result\n */\n obfuscateAll?: boolean;\n\n /**\n * Displays a button for toggling text visibility\n */\n showToggle?: boolean;\n }\n\n const isFullTextVisible = ref(false);\n\n const props = withDefaults(defineProps<ObfuscateTextProps>(), {\n maskChar: '•',\n maskCharCount: 10,\n lengthToKeep: 0,\n position: 'start',\n obfuscateAll: false,\n showToggle: false,\n });\n\n const obfuscatedText = computed(() => {\n if (props.showToggle && isFullTextVisible.value) {\n return props.text;\n }\n\n if (props.obfuscateAll) {\n return props.maskChar.repeat(props.maskCharCount);\n }\n\n return obfuscateText(props.text, {\n maskChar: props.maskChar,\n maskCharCount: props.maskCharCount,\n lengthToKeep: props.lengthToKeep,\n position: props.position,\n });\n });\n</script>\n\n<template>\n <span class=\"stash-obfuscate-text\" data-test=\"stash-obfuscate-text\">\n {{ obfuscatedText }}\n <Button\n v-if=\"props.showToggle\"\n class=\"tw-ml-1 tw-h-auto tw-w-auto tw-p-0\"\n icon\n type=\"button\"\n @click=\"isFullTextVisible = !isFullTextVisible\"\n >\n <Icon\n :name=\"isFullTextVisible ? 'hide' : 'show'\"\n class=\"tw-cursor-pointer\"\n :class=\"isFullTextVisible ? 'stash-obfuscate-text__hide-toggle-icon' : 'stash-obfuscate-text__show-toggle-icon'\"\n :data-test=\"\n isFullTextVisible ? 'stash-obfuscate-text|hide-toggle-icon' : 'stash-obfuscate-text|show-toggle-icon'\n \"\n />\n </Button>\n </span>\n</template>\n"],"names":["isFullTextVisible","ref","props","__props","obfuscatedText","computed","obfuscateText"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA4BQ,UAAAA,IAAoBC,EAAI,EAAK,GAE7BC,IAAQC,GASRC,IAAiBC,EAAS,MAC1BH,EAAM,cAAcF,EAAkB,QACjCE,EAAM,OAGXA,EAAM,eACDA,EAAM,SAAS,OAAOA,EAAM,aAAa,IAG3CI,EAAcJ,EAAM,MAAM;AAAA,MAC/B,UAAUA,EAAM;AAAA,MAChB,eAAeA,EAAM;AAAA,MACrB,cAAcA,EAAM;AAAA,MACpB,UAAUA,EAAM;AAAA,IAAA,CACjB,CACF;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -50,11 +50,13 @@ declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VL
|
|
|
50
50
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
51
51
|
export default _default;
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
declare interface ObfuscateTextOptions {
|
|
54
54
|
/**
|
|
55
|
-
*
|
|
55
|
+
* Num of characters to keep revealed.
|
|
56
|
+
* Default will obfuscate entire string
|
|
57
|
+
* with length of maskCharCount.
|
|
56
58
|
*/
|
|
57
|
-
|
|
59
|
+
lengthToKeep?: number;
|
|
58
60
|
/**
|
|
59
61
|
* Character to obfuscate text with
|
|
60
62
|
*/
|
|
@@ -63,16 +65,17 @@ export declare interface ObfuscateTextProps {
|
|
|
63
65
|
* The number of masked characters to display
|
|
64
66
|
*/
|
|
65
67
|
maskCharCount?: number;
|
|
66
|
-
/**
|
|
67
|
-
* Num of characters to keep revealed.
|
|
68
|
-
* Default will obfuscate entire string
|
|
69
|
-
* with length of maskCharCount.
|
|
70
|
-
*/
|
|
71
|
-
lengthToKeep?: number;
|
|
72
68
|
/**
|
|
73
69
|
* Position to start obfuscating text
|
|
74
70
|
*/
|
|
75
71
|
position?: 'start' | 'end';
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export declare interface ObfuscateTextProps extends ObfuscateTextOptions {
|
|
75
|
+
/**
|
|
76
|
+
* The full text
|
|
77
|
+
*/
|
|
78
|
+
text: string;
|
|
76
79
|
/**
|
|
77
80
|
* Whether to obfuscate all characters.
|
|
78
81
|
* @deprecated omit the lengthToKeep prop to achieve the same result
|
package/dist/PageNavigation.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as g, ref as m, watch as x, onMounted as I, openBlock as i, createElementBlock as c, createVNode as _, withCtx as f, Fragment as T, renderList as V, createBlock as k, unref as N, createTextVNode as B, toDisplayString as C } from "vue";
|
|
2
2
|
import U from "@leaflink/snitch";
|
|
3
3
|
import s from "lodash-es/kebabCase";
|
|
4
4
|
import { useRoute as y, useRouter as P } from "vue-router";
|
|
5
|
-
import
|
|
5
|
+
import D from "./Tab.js";
|
|
6
6
|
import E from "./Tabs.js";
|
|
7
7
|
import "./Badge.js";
|
|
8
8
|
import "./_plugin-vue_export-helper-dad06003.js";
|
|
9
|
-
import "./Tabs.vue_used_vue_type_style_index_0_lang.module-
|
|
9
|
+
import "./Tabs.vue_used_vue_type_style_index_0_lang.module-d7530989.js";
|
|
10
10
|
import "lodash-es/debounce";
|
|
11
11
|
import "lodash-es/uniqueId";
|
|
12
12
|
import "./constants.js";
|
|
@@ -25,7 +25,7 @@ import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
|
|
25
25
|
const F = {
|
|
26
26
|
class: "stash-page-navigation container",
|
|
27
27
|
"data-test": "stash-page-navigation"
|
|
28
|
-
}, oe = /* @__PURE__ */
|
|
28
|
+
}, oe = /* @__PURE__ */ g({
|
|
29
29
|
name: "ll-page-navigation",
|
|
30
30
|
__name: "PageNavigation",
|
|
31
31
|
props: {
|
|
@@ -37,7 +37,7 @@ const F = {
|
|
|
37
37
|
setup(v, { emit: h }) {
|
|
38
38
|
const r = v, p = h;
|
|
39
39
|
r.activeIndex && U.info("The `activeIndex` prop is deprecated. Use `v-model` instead.");
|
|
40
|
-
const o = y(), u = P(), d =
|
|
40
|
+
const o = y(), u = P(), d = m("");
|
|
41
41
|
function n(t) {
|
|
42
42
|
t !== d.value && (d.value = t, p("update:modelValue", t));
|
|
43
43
|
}
|
|
@@ -49,7 +49,7 @@ const F = {
|
|
|
49
49
|
const a = r.items.findIndex((l) => s(l.label) === t);
|
|
50
50
|
p("change", a), n(t);
|
|
51
51
|
}
|
|
52
|
-
),
|
|
52
|
+
), I(() => {
|
|
53
53
|
if (!r.items.length)
|
|
54
54
|
return;
|
|
55
55
|
if (r.activeIndex !== void 0) {
|
|
@@ -76,12 +76,12 @@ const F = {
|
|
|
76
76
|
});
|
|
77
77
|
t && n((t == null ? void 0 : t.value) || s(t.label));
|
|
78
78
|
}), (t, e) => (i(), c("nav", F, [
|
|
79
|
-
|
|
79
|
+
_(E, {
|
|
80
80
|
"active-tab": d.value,
|
|
81
81
|
"onUpdate:activeTab": n
|
|
82
82
|
}, {
|
|
83
83
|
default: f(() => [
|
|
84
|
-
(i(!0), c(
|
|
84
|
+
(i(!0), c(T, null, V(r.items, (a, l) => (i(), k(D, {
|
|
85
85
|
key: a.label,
|
|
86
86
|
value: (a == null ? void 0 : a.value) || N(s)(a.label),
|
|
87
87
|
to: a.to,
|
package/dist/Tab.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
4
|
-
import "./
|
|
5
|
-
import "./_plugin-vue_export-helper-dad06003.js";
|
|
6
|
-
import "./Tabs.vue_used_vue_type_style_index_0_lang.module-3aa36673.js";
|
|
1
|
+
import { defineComponent as x, useCssModule as T, inject as y, computed as s, onMounted as k, nextTick as g, toRefs as c, openBlock as u, createElementBlock as C, normalizeClass as P, unref as o, withKeys as $, createBlock as B, resolveDynamicComponent as E, mergeProps as N, withCtx as b, createElementVNode as A, createVNode as I, renderSlot as j } from "vue";
|
|
2
|
+
import M from "@leaflink/snitch";
|
|
3
|
+
import D from "./Badge.js";
|
|
4
|
+
import { T as L } from "./Tabs.vue_used_vue_type_style_index_0_lang.module-d7530989.js";
|
|
5
|
+
import { _ as V } from "./_plugin-vue_export-helper-dad06003.js";
|
|
7
6
|
import "lodash-es/debounce";
|
|
8
7
|
import "lodash-es/uniqueId";
|
|
9
8
|
import "./constants.js";
|
|
@@ -19,7 +18,97 @@ import "lodash-es/isPlainObject";
|
|
|
19
18
|
import "./Icon.js";
|
|
20
19
|
import "./index-9e1095ef.js";
|
|
21
20
|
import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
|
21
|
+
const K = ["id", "aria-selected", "aria-controls", "aria-disabled"], O = { class: "tw-mt-0.5" }, S = /* @__PURE__ */ x({
|
|
22
|
+
__name: "Tab",
|
|
23
|
+
props: {
|
|
24
|
+
value: {},
|
|
25
|
+
to: {},
|
|
26
|
+
href: {},
|
|
27
|
+
badge: {},
|
|
28
|
+
disabled: { type: Boolean },
|
|
29
|
+
anchorProps: {},
|
|
30
|
+
routerLinkProps: {}
|
|
31
|
+
},
|
|
32
|
+
setup(p) {
|
|
33
|
+
const e = p, m = T(), l = y(L.key);
|
|
34
|
+
if (!l)
|
|
35
|
+
throw Error("The Tab component must be a child of the Tabs component.");
|
|
36
|
+
const { setActiveTab: v, activeTab: w, variant: r } = l, t = s(() => e.value === w.value), f = s(() => e.to ? "router-link" : e.href ? "a" : "button");
|
|
37
|
+
function d(i) {
|
|
38
|
+
e.disabled || v(i);
|
|
39
|
+
}
|
|
40
|
+
const n = s(() => `tabpanel-${e.value}`);
|
|
41
|
+
k(async () => {
|
|
42
|
+
await g(), process.env.NODE_ENV !== "test" && t.value && !document.getElementById(n.value) && M.warn(
|
|
43
|
+
`The <Tab> with value "${e.value}" is active, but its corresponding tab panel cannot be found. Please ensure that the corresponding tab panel has an "id" attribute with value "${n.value}" and a "role" attribute with value "tabpanel".`
|
|
44
|
+
);
|
|
45
|
+
});
|
|
46
|
+
const h = s(() => e.to && e.routerLinkProps ? c(e.routerLinkProps) : e.href && e.anchorProps ? c(e.anchorProps) : {});
|
|
47
|
+
return (i, a) => (u(), C("li", {
|
|
48
|
+
id: `tab-${e.value}`,
|
|
49
|
+
role: "tab",
|
|
50
|
+
"aria-selected": t.value,
|
|
51
|
+
"aria-controls": n.value,
|
|
52
|
+
"aria-disabled": e.disabled,
|
|
53
|
+
class: P(["stash-tab", [
|
|
54
|
+
{
|
|
55
|
+
"stash-tab--active is-active": t.value,
|
|
56
|
+
"stash-tab--disabled": e.disabled,
|
|
57
|
+
"stash-tab--variant-line": o(r) === "line",
|
|
58
|
+
"stash-tab--variant-enclosed": o(r) === "enclosed"
|
|
59
|
+
}
|
|
60
|
+
]]),
|
|
61
|
+
onClick: a[0] || (a[0] = (_) => d(e.value)),
|
|
62
|
+
onKeypress: a[1] || (a[1] = $((_) => d(e.value), ["enter"]))
|
|
63
|
+
}, [
|
|
64
|
+
(u(), B(E(f.value), N(h.value, {
|
|
65
|
+
to: e.to,
|
|
66
|
+
href: e.href,
|
|
67
|
+
class: ["tw-relative tw-flex tw-cursor-pointer tw-items-center tw-justify-center tw-whitespace-nowrap tw-border-solid tw-py-1.5 tw-text-sm tw-font-medium hover:tw-no-underline", [
|
|
68
|
+
{
|
|
69
|
+
"tw-border-b-2": o(r) === "line",
|
|
70
|
+
"tw-border-t-4 tw-px-6": o(r) === "enclosed",
|
|
71
|
+
"tw-rounded-t tw-border-b tw-border-b-ice-200 tw-bg-white": t.value && o(r) === "enclosed",
|
|
72
|
+
[o(m)["custom-shadow"]]: t.value && o(r) === "enclosed",
|
|
73
|
+
"focus:tw-no-underline": e.href,
|
|
74
|
+
"tw-pointer-events-none tw-text-ice-500": e.disabled,
|
|
75
|
+
"tw-text-ice-700": !e.disabled && !t.value
|
|
76
|
+
},
|
|
77
|
+
[
|
|
78
|
+
t.value ? "tw-border-blue-500 tw-text-blue-500" : "tw-border-transparent hover:tw-text-blue-500 focus:tw-text-blue-500"
|
|
79
|
+
]
|
|
80
|
+
]],
|
|
81
|
+
tabindex: e.disabled ? -1 : 0
|
|
82
|
+
}), {
|
|
83
|
+
default: b(() => [
|
|
84
|
+
A("div", O, [
|
|
85
|
+
I(D, {
|
|
86
|
+
content: e.badge,
|
|
87
|
+
position: "inline",
|
|
88
|
+
color: "red",
|
|
89
|
+
"is-disabled": e.disabled
|
|
90
|
+
}, {
|
|
91
|
+
default: b(() => [
|
|
92
|
+
j(i.$slots, "default", {
|
|
93
|
+
isActive: t.value,
|
|
94
|
+
isDisabled: e.disabled,
|
|
95
|
+
variant: o(r)
|
|
96
|
+
})
|
|
97
|
+
]),
|
|
98
|
+
_: 3
|
|
99
|
+
}, 8, ["content", "is-disabled"])
|
|
100
|
+
])
|
|
101
|
+
]),
|
|
102
|
+
_: 3
|
|
103
|
+
}, 16, ["to", "href", "class", "tabindex"]))
|
|
104
|
+
], 42, K));
|
|
105
|
+
}
|
|
106
|
+
}), z = {
|
|
107
|
+
"custom-shadow": "_custom-shadow_j326c_3"
|
|
108
|
+
}, J = {
|
|
109
|
+
$style: z
|
|
110
|
+
}, de = /* @__PURE__ */ V(S, [["__cssModules", J]]);
|
|
22
111
|
export {
|
|
23
|
-
|
|
112
|
+
de as default
|
|
24
113
|
};
|
|
25
114
|
//# sourceMappingURL=Tab.js.map
|
package/dist/Tab.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tab.js","sources":["../src/components/Tab/Tab.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import logger from '@leaflink/snitch';\n import { computed, inject, nextTick, onMounted, toRefs, useCssModule } from 'vue';\n import { type RouteLocationRaw, type RouterLinkProps } from 'vue-router';\n\n import Badge from '../Badge/Badge.vue';\n import { TABS_INJECTION } from '../Tabs/Tabs.vue';\n\n /**\n * Allowed attributes for the `<a>` element when the `href` prop is used.\n */\n type AnchorAttrs =\n | HTMLAnchorElement['download']\n | HTMLAnchorElement['hreflang']\n | HTMLAnchorElement['ping']\n | HTMLAnchorElement['referrerPolicy']\n | HTMLAnchorElement['rel']\n | HTMLAnchorElement['target']\n | HTMLAnchorElement['type'];\n\n export interface TabProps {\n /**\n * The tab identifier\n */\n value: string;\n\n /**\n * Router link `to` prop\n */\n to?: RouteLocationRaw;\n\n /**\n * Anchor tag href. Used for navigating to non-vue pages, such as Django pages in marketplace.\n */\n href?: string;\n\n /**\n * The badge's content\n */\n badge?: string | number;\n\n /**\n * Will render a plain text item if true.\n */\n disabled?: boolean;\n\n /**\n * Props for the `<a>` element when the `href` prop is used\n */\n anchorProps?: Record<AnchorAttrs, string>;\n\n /**\n * Props for the `<RouterLink>` element when the `to` prop is used\n */\n routerLinkProps?: Omit<RouterLinkProps, 'to'>;\n }\n\n const props = defineProps<TabProps>();\n\n const classes = useCssModule();\n\n const tabsInjection = inject(TABS_INJECTION.key);\n\n if (!tabsInjection) {\n throw Error('The Tab component must be a child of the Tabs component.');\n }\n\n const { setActiveTab, activeTab, variant } = tabsInjection;\n\n const isTabActive = computed(() => {\n return props.value === activeTab.value;\n });\n\n const is = computed(() => {\n if (props.to) {\n return 'router-link';\n }\n\n if (props.href) {\n return 'a';\n }\n\n return 'button';\n });\n\n /**\n * Note: this click handler gets ignored when the `href` prop is used; `preventDefault()` is intentionally omitted in order to enable the `href` prop to work correctly. The `href` prop is used for navigation to non-vue pages, such as Django pages in marketplace.\n */\n function onClick(tabValue: string) {\n if (props.disabled) {\n return;\n }\n\n setActiveTab(tabValue);\n }\n\n const panelId = computed(() => `tabpanel-${props.value}`);\n\n onMounted(async () => {\n await nextTick();\n\n if (process.env.NODE_ENV !== 'test' && isTabActive.value && !document.getElementById(panelId.value)) {\n // The following warning ensures optimal accessibility is maintained when using the Tabs component. See: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/tab_role#example\n logger.warn(\n `The <Tab> with value \"${props.value}\" is active, but its corresponding tab panel cannot be found. Please ensure that the corresponding tab panel has an \"id\" attribute with value \"${panelId.value}\" and a \"role\" attribute with value \"tabpanel\".`,\n );\n }\n });\n\n const dynamicComponentAttrs = computed(() => {\n if (props.to && props.routerLinkProps) {\n return toRefs(props.routerLinkProps);\n }\n\n if (props.href && props.anchorProps) {\n return toRefs(props.anchorProps);\n }\n\n return {};\n });\n</script>\n\n<template>\n <li\n :id=\"`tab-${props.value}`\"\n role=\"tab\"\n :aria-selected=\"isTabActive\"\n :aria-controls=\"panelId\"\n :aria-disabled=\"props.disabled\"\n class=\"stash-tab\"\n :class=\"[\n {\n 'stash-tab--active is-active': isTabActive,\n 'stash-tab--disabled': props.disabled,\n 'stash-tab--variant-line': variant === 'line',\n 'stash-tab--variant-enclosed': variant === 'enclosed',\n },\n ]\"\n @click=\"onClick(props.value)\"\n @keypress.enter=\"onClick(props.value)\"\n >\n <component\n v-bind=\"dynamicComponentAttrs\"\n :is=\"is\"\n :to=\"props.to\"\n :href=\"props.href\"\n class=\"tw-relative tw-flex tw-cursor-pointer tw-items-center tw-justify-center tw-whitespace-nowrap tw-border-solid tw-py-1.5 tw-text-sm tw-font-medium hover:tw-no-underline\"\n :class=\"[\n {\n 'tw-border-b-2': variant === 'line',\n 'tw-border-t-4 tw-px-6': variant === 'enclosed',\n 'tw-rounded-t tw-border-b tw-border-b-ice-200 tw-bg-white': isTabActive && variant === 'enclosed',\n [classes['custom-shadow']]: isTabActive && variant === 'enclosed',\n 'focus:tw-no-underline': props.href,\n 'tw-pointer-events-none tw-text-ice-500': props.disabled,\n 'tw-text-ice-700': !props.disabled && !isTabActive,\n },\n [\n isTabActive\n ? 'tw-border-blue-500 tw-text-blue-500'\n : 'tw-border-transparent hover:tw-text-blue-500 focus:tw-text-blue-500',\n ],\n ]\"\n :tabindex=\"props.disabled ? -1 : 0\"\n >\n <!-- The margin-top on the <div> below is necessary to fix the vertical alignment of text in the default slot since our Sofia font has extra space under the baseline -->\n <div class=\"tw-mt-0.5\">\n <Badge :content=\"props.badge\" position=\"inline\" color=\"red\" :is-disabled=\"props.disabled\">\n <slot :is-active=\"isTabActive\" :is-disabled=\"props.disabled\" :variant=\"variant\"></slot>\n </Badge>\n </div>\n </component>\n </li>\n</template>\n\n<style module>\n /* this removes the bottom shadow from the active tab */\n .custom-shadow {\n box-shadow: 0 -4px 4px rgba(0 0 0 / 10%);\n }\n</style>\n"],"names":["props","__props","classes","useCssModule","tabsInjection","inject","TABS_INJECTION","setActiveTab","activeTab","variant","isTabActive","computed","is","onClick","tabValue","panelId","onMounted","nextTick","logger","dynamicComponentAttrs","toRefs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDE,UAAMA,IAAQC,GAERC,IAAUC,KAEVC,IAAgBC,EAAOC,EAAe,GAAG;AAE/C,QAAI,CAACF;AACH,YAAM,MAAM,0DAA0D;AAGxE,UAAM,EAAE,cAAAG,GAAc,WAAAC,GAAW,SAAAC,EAAA,IAAYL,GAEvCM,IAAcC,EAAS,MACpBX,EAAM,UAAUQ,EAAU,KAClC,GAEKI,IAAKD,EAAS,MACdX,EAAM,KACD,gBAGLA,EAAM,OACD,MAGF,QACR;AAKD,aAASa,EAAQC,GAAkB;AACjC,MAAId,EAAM,YAIVO,EAAaO,CAAQ;AAAA,IACvB;AAEA,UAAMC,IAAUJ,EAAS,MAAM,YAAYX,EAAM,OAAO;AAExD,IAAAgB,EAAU,YAAY;AACpB,YAAMC,EAAS,GAEX,QAAQ,IAAI,aAAa,UAAUP,EAAY,SAAS,CAAC,SAAS,eAAeK,EAAQ,KAAK,KAEzFG,EAAA;AAAA,QACL,yBAAyBlB,EAAM,uJAAuJe,EAAQ;AAAA,MAAA;AAAA,IAElM,CACD;AAEK,UAAAI,IAAwBR,EAAS,MACjCX,EAAM,MAAMA,EAAM,kBACboB,EAAOpB,EAAM,eAAe,IAGjCA,EAAM,QAAQA,EAAM,cACfoB,EAAOpB,EAAM,WAAW,IAG1B,EACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/Tabs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as o, s as t } from "./Tabs.vue_used_vue_type_style_index_0_lang.module-
|
|
2
|
-
import { T as C, a as E } from "./Tabs.vue_used_vue_type_style_index_0_lang.module-
|
|
1
|
+
import { _ as o, s as t } from "./Tabs.vue_used_vue_type_style_index_0_lang.module-d7530989.js";
|
|
2
|
+
import { T as C, a as E } from "./Tabs.vue_used_vue_type_style_index_0_lang.module-d7530989.js";
|
|
3
3
|
import { _ as r } from "./_plugin-vue_export-helper-dad06003.js";
|
|
4
4
|
import "vue";
|
|
5
5
|
import "lodash-es/debounce";
|