@leaflink/stash 48.16.1 → 48.16.2
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/Accordion.js +1 -1
- package/dist/Accordion.js.map +1 -1
- package/dist/Accordion.vue.d.ts +8 -9
- package/dist/ActionsDropdown.js.map +1 -1
- package/dist/ActionsDropdown.vue.d.ts +7 -8
- package/dist/AddressSelect.js +42 -38
- package/dist/AddressSelect.js.map +1 -1
- package/dist/AddressSelect.vue.d.ts +10 -11
- package/dist/Alert.js.map +1 -1
- package/dist/Alert.vue.d.ts +6 -7
- package/dist/AppNavigationItem.js +2 -2
- package/dist/AppNavigationItem.js.map +1 -1
- package/dist/AppNavigationItem.vue.d.ts +7 -8
- package/dist/AppSidebar.js +42 -42
- package/dist/AppSidebar.js.map +1 -1
- package/dist/AppSidebar.vue.d.ts +8 -9
- package/dist/AppTopbar.js +16 -16
- package/dist/AppTopbar.js.map +1 -1
- package/dist/AppTopbar.vue.d.ts +8 -9
- package/dist/Avatar.js.map +1 -1
- package/dist/Avatar.vue.d.ts +7 -8
- package/dist/Backdrop.vue.d.ts +3 -5
- package/dist/Badge.js +1 -1
- package/dist/Badge.js.map +1 -1
- package/dist/Badge.vue.d.ts +7 -8
- package/dist/Box.vue.d.ts +6 -7
- package/dist/Box.vue_vue_type_script_setup_true_lang-69e5176b.js.map +1 -1
- package/dist/Button.js.map +1 -1
- package/dist/Button.vue.d.ts +7 -8
- package/dist/ButtonGroup.js +29 -29
- package/dist/ButtonGroup.js.map +1 -1
- package/dist/ButtonGroup.vue.d.ts +8 -9
- package/dist/Card.js.map +1 -1
- package/dist/Card.vue.d.ts +6 -7
- package/dist/CardContent.vue.d.ts +3 -5
- package/dist/CardFooter.vue.d.ts +3 -5
- package/dist/CardHeader.js.map +1 -1
- package/dist/CardHeader.vue.d.ts +3 -4
- package/dist/CardMedia.js +6 -6
- package/dist/CardMedia.js.map +1 -1
- package/dist/CardMedia.vue.d.ts +3 -4
- package/dist/Carousel.js +249 -249
- package/dist/Carousel.js.map +1 -1
- package/dist/Carousel.vue.d.ts +9 -9
- package/dist/Checkbox.js +27 -27
- package/dist/Checkbox.js.map +1 -1
- package/dist/Checkbox.vue.d.ts +11 -12
- package/dist/ChevronToggle.js +1 -1
- package/dist/ChevronToggle.vue.d.ts +8 -9
- package/dist/{ChevronToggle.vue_vue_type_script_setup_true_lang-1591294c.js → ChevronToggle.vue_vue_type_script_setup_true_lang-fcdf0c19.js} +11 -11
- package/dist/{ChevronToggle.vue_vue_type_script_setup_true_lang-1591294c.js.map → ChevronToggle.vue_vue_type_script_setup_true_lang-fcdf0c19.js.map} +1 -1
- package/dist/Chip.js +30 -30
- package/dist/Chip.js.map +1 -1
- package/dist/Chip.vue.d.ts +9 -10
- package/dist/ConfirmationCodeInput.js +25 -25
- package/dist/ConfirmationCodeInput.js.map +1 -1
- package/dist/ConfirmationCodeInput.vue.d.ts +8 -9
- package/dist/ContextSwitcher.js +18 -18
- package/dist/ContextSwitcher.js.map +1 -1
- package/dist/ContextSwitcher.vue.d.ts +9 -10
- package/dist/Copy.js.map +1 -1
- package/dist/Copy.vue.d.ts +6 -7
- package/dist/CurrencyInput.js +93 -93
- package/dist/CurrencyInput.js.map +1 -1
- package/dist/CurrencyInput.vue.d.ts +10 -11
- package/dist/CustomRender.vue.d.ts +3 -15
- package/dist/DataView.js +97 -97
- package/dist/DataView.js.map +1 -1
- package/dist/DataView.vue.d.ts +9 -10
- package/dist/DataViewFilters.js +153 -150
- package/dist/DataViewFilters.js.map +1 -1
- package/dist/DataViewFilters.vue.d.ts +9 -10
- package/dist/DataViewSortButton.js.map +1 -1
- package/dist/DataViewSortButton.vue.d.ts +6 -7
- package/dist/DataViewToolbar.js +27 -27
- package/dist/DataViewToolbar.js.map +1 -1
- package/dist/DataViewToolbar.vue.d.ts +8 -9
- package/dist/DatePicker.js +738 -738
- package/dist/DatePicker.js.map +1 -1
- package/dist/DatePicker.vue.d.ts +11 -12
- package/dist/DescriptionList.js.map +1 -1
- package/dist/DescriptionList.vue.d.ts +6 -7
- package/dist/DescriptionListDetail.vue.d.ts +3 -5
- package/dist/DescriptionListGroup.vue.d.ts +3 -5
- package/dist/DescriptionListTerm.vue.d.ts +3 -5
- package/dist/Dialog.js +44 -44
- package/dist/Dialog.js.map +1 -1
- package/dist/Dialog.vue.d.ts +10 -11
- package/dist/Divider.vue.d.ts +3 -5
- package/dist/Dropdown.js +38 -38
- package/dist/Dropdown.js.map +1 -1
- package/dist/Dropdown.vue.d.ts +9 -10
- package/dist/EmptyState.js +20 -20
- package/dist/EmptyState.js.map +1 -1
- package/dist/EmptyState.vue.d.ts +6 -7
- package/dist/Expand.js +1 -1
- package/dist/Expand.vue.d.ts +8 -9
- package/dist/{Expand.vue_vue_type_script_setup_true_lang-1751f4a6.js → Expand.vue_vue_type_script_setup_true_lang-0f236267.js} +19 -19
- package/dist/Expand.vue_vue_type_script_setup_true_lang-0f236267.js.map +1 -0
- package/dist/Field.vue.d.ts +6 -7
- package/dist/Field.vue_vue_type_script_setup_true_lang-e1e4ff03.js.map +1 -1
- package/dist/FileUpload.js +65 -65
- package/dist/FileUpload.js.map +1 -1
- package/dist/FileUpload.vue.d.ts +10 -11
- package/dist/FilterChip.js +27 -27
- package/dist/FilterChip.js.map +1 -1
- package/dist/FilterChip.vue.d.ts +8 -9
- package/dist/FilterDrawerItem.js +26 -26
- package/dist/FilterDrawerItem.js.map +1 -1
- package/dist/FilterDrawerItem.vue.d.ts +5 -6
- package/dist/FilterDropdown.js +49 -49
- package/dist/FilterDropdown.js.map +1 -1
- package/dist/FilterDropdown.vue.d.ts +8 -9
- package/dist/FilterSelect.js +23 -23
- package/dist/FilterSelect.js.map +1 -1
- package/dist/FilterSelect.vue.d.ts +8 -9
- package/dist/Filters.js +112 -104
- package/dist/Filters.js.map +1 -1
- package/dist/Filters.vue.d.ts +2204 -65
- package/dist/HttpError.js +42 -42
- package/dist/HttpError.js.map +1 -1
- package/dist/HttpError.vue.d.ts +6 -7
- package/dist/Icon.js.map +1 -1
- package/dist/Icon.vue.d.ts +7 -8
- package/dist/IconLabel.js.map +1 -1
- package/dist/IconLabel.vue.d.ts +8 -9
- package/dist/Illustration.vue.d.ts +6 -7
- package/dist/Illustration.vue_vue_type_script_setup_true_lang-e26c3841.js.map +1 -1
- package/dist/Image.js +47 -47
- package/dist/Image.js.map +1 -1
- package/dist/Image.vue.d.ts +6 -7
- package/dist/InlineEdit.js +34 -34
- package/dist/InlineEdit.js.map +1 -1
- package/dist/InlineEdit.vue.d.ts +9 -10
- package/dist/Input.js +35 -35
- package/dist/Input.js.map +1 -1
- package/dist/Input.vue.d.ts +13 -14
- package/dist/InputOptions.js +33 -33
- package/dist/InputOptions.js.map +1 -1
- package/dist/InputOptions.vue.d.ts +8 -9
- package/dist/IntegrationIcon.js.map +1 -1
- package/dist/IntegrationIcon.vue.d.ts +7 -8
- package/dist/Label.vue.d.ts +6 -7
- package/dist/Label.vue_vue_type_script_setup_true_lang-4b02087f.js.map +1 -1
- package/dist/LicenseChip.js.map +1 -1
- package/dist/LicenseChip.vue.d.ts +6 -7
- package/dist/ListItem.vue.d.ts +225 -95
- package/dist/ListItemCell.vue.d.ts +4 -16
- package/dist/ListView.js +1 -1
- package/dist/ListView.vue.d.ts +5072 -470
- package/dist/Loading.js +16 -16
- package/dist/Loading.js.map +1 -1
- package/dist/Loading.vue.d.ts +3 -5
- package/dist/Logo.js +1 -1
- package/dist/Logo.vue.d.ts +9 -10
- package/dist/Logo.vue_vue_type_script_setup_true_lang-2a2597cb.js +196 -0
- package/dist/Logo.vue_vue_type_script_setup_true_lang-2a2597cb.js.map +1 -0
- package/dist/Menu.vue.d.ts +3 -5
- package/dist/MenuItem.vue.d.ts +3 -5
- package/dist/Metric.js.map +1 -1
- package/dist/Metric.vue.d.ts +6 -7
- package/dist/Modal.js +29 -29
- package/dist/Modal.js.map +1 -1
- package/dist/Modal.vue.d.ts +8 -9
- package/dist/Modals.js +8 -7
- package/dist/Modals.js.map +1 -1
- package/dist/Modals.vue.d.ts +3 -5
- package/dist/Module.js.map +1 -1
- package/dist/Module.vue.d.ts +7 -8
- package/dist/ModuleContent.vue.d.ts +3 -5
- package/dist/ModuleFooter.vue.d.ts +3 -5
- package/dist/ModuleHeader.js.map +1 -1
- package/dist/ModuleHeader.vue.d.ts +6 -7
- package/dist/ObfuscateText.js +1 -1
- package/dist/ObfuscateText.js.map +1 -1
- package/dist/ObfuscateText.vue.d.ts +6 -7
- package/dist/PageContent.vue.d.ts +3 -5
- package/dist/PageHeader.js.map +1 -1
- package/dist/PageHeader.vue.d.ts +6 -7
- package/dist/PageNavigation.js +30 -27
- package/dist/PageNavigation.js.map +1 -1
- package/dist/PageNavigation.vue.d.ts +8 -9
- package/dist/Paginate.js +32 -32
- package/dist/Paginate.js.map +1 -1
- package/dist/Paginate.vue.d.ts +8 -9
- package/dist/PlaidLink.js +29 -29
- package/dist/PlaidLink.js.map +1 -1
- package/dist/PlaidLink.vue.d.ts +11 -12
- package/dist/QuickAction.js.map +1 -1
- package/dist/QuickAction.vue.d.ts +4 -5
- package/dist/Radio.vue.d.ts +20 -1
- package/dist/RadioGroup.js +123 -123
- package/dist/RadioGroup.js.map +1 -1
- package/dist/RadioGroup.vue.d.ts +10 -11
- package/dist/RadioNew.js +102 -102
- package/dist/RadioNew.js.map +1 -1
- package/dist/RadioNew.vue.d.ts +10 -11
- package/dist/RangeInput.vue.d.ts +3 -5
- package/dist/SearchBar.js +36 -36
- package/dist/SearchBar.js.map +1 -1
- package/dist/SearchBar.vue.d.ts +9 -10
- package/dist/Select.js +792 -774
- package/dist/Select.js.map +1 -1
- package/dist/Select.vue.d.ts +14 -15
- package/dist/SelectStatus.js +27 -27
- package/dist/SelectStatus.js.map +1 -1
- package/dist/SelectStatus.vue.d.ts +12 -13
- package/dist/Skeleton.js.map +1 -1
- package/dist/Skeleton.vue.d.ts +7 -8
- package/dist/Step.js.map +1 -1
- package/dist/Step.vue.d.ts +7 -8
- package/dist/Stepper.js +19 -19
- package/dist/Stepper.js.map +1 -1
- package/dist/Stepper.vue.d.ts +9 -10
- package/dist/Switch.js +25 -25
- package/dist/Switch.js.map +1 -1
- package/dist/Switch.vue.d.ts +11 -12
- package/dist/Tab.js +2 -2
- package/dist/Tab.vue.d.ts +3 -4
- package/dist/{Tab.vue_vue_type_script_setup_true_lang-69d1b046.js → Tab.vue_vue_type_script_setup_true_lang-9aa53203.js} +5 -3
- package/dist/Tab.vue_vue_type_script_setup_true_lang-9aa53203.js.map +1 -0
- package/dist/Table.js +3 -3
- package/dist/Table.js.map +1 -1
- package/dist/{Table.keys-cf93df19.js → Table.keys-83e4f09b.js} +11 -11
- package/dist/{Table.keys-cf93df19.js.map → Table.keys-83e4f09b.js.map} +1 -1
- package/dist/Table.vue.d.ts +6 -7
- package/dist/TableCell.js +1 -1
- package/dist/TableCell.js.map +1 -1
- package/dist/TableCell.vue.d.ts +6 -7
- package/dist/TableHeaderCell.js +12 -12
- package/dist/TableHeaderCell.js.map +1 -1
- package/dist/TableHeaderCell.vue.d.ts +6 -7
- package/dist/TableHeaderRow.js +21 -21
- package/dist/TableHeaderRow.js.map +1 -1
- package/dist/TableHeaderRow.vue.d.ts +8 -9
- package/dist/TableRow.js +42 -42
- package/dist/TableRow.js.map +1 -1
- package/dist/TableRow.vue.d.ts +8 -9
- package/dist/Tabs.js +2 -2
- package/dist/Tabs.vue.d.ts +8 -9
- package/dist/{Tabs.vue_used_vue_type_style_index_0_lang.module-2a131332.js → Tabs.vue_used_vue_type_style_index_0_lang.module-3aa36673.js} +37 -37
- package/dist/Tabs.vue_used_vue_type_style_index_0_lang.module-3aa36673.js.map +1 -0
- package/dist/TextEditor.js +565 -565
- package/dist/TextEditor.js.map +1 -1
- package/dist/TextEditor.vue.d.ts +12 -13
- package/dist/Textarea.js +28 -28
- package/dist/Textarea.js.map +1 -1
- package/dist/Textarea.vue.d.ts +10 -11
- package/dist/Timeline.js.map +1 -1
- package/dist/Timeline.vue.d.ts +6 -7
- package/dist/TimelineItem.js +21 -21
- package/dist/TimelineItem.js.map +1 -1
- package/dist/TimelineItem.vue.d.ts +13 -6
- package/dist/Toast.js +134 -134
- package/dist/Toast.js.map +1 -1
- package/dist/Toast.vue.d.ts +6 -7
- package/dist/Toasts.vue.d.ts +3 -5
- package/dist/components.css +1 -1
- package/dist/index.js.map +1 -1
- package/dist/tailwind-base.js.map +1 -1
- package/dist/usePlaidLink.d.ts +1 -6
- package/dist/useScriptTag.d.ts +3 -8
- package/dist/useStepper.d.ts +7 -2
- package/package.json +1 -1
- package/tailwind-base.ts +13 -6
- package/dist/Expand.vue_vue_type_script_setup_true_lang-1751f4a6.js.map +0 -1
- package/dist/Logo.vue_vue_type_script_setup_true_lang-d7da48a0.js +0 -196
- package/dist/Logo.vue_vue_type_script_setup_true_lang-d7da48a0.js.map +0 -1
- package/dist/Tab.vue_vue_type_script_setup_true_lang-69d1b046.js.map +0 -1
- package/dist/Tabs.vue_used_vue_type_style_index_0_lang.module-2a131332.js.map +0 -1
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { AllowedComponentProps } from 'vue';
|
|
2
|
-
import { ComponentCustomProps } from 'vue';
|
|
3
1
|
import { ComponentOptionsMixin } from 'vue';
|
|
2
|
+
import { ComponentProvideOptions } from 'vue';
|
|
4
3
|
import { DefineComponent } from 'vue';
|
|
5
4
|
import { ExtractPropTypes } from 'vue';
|
|
6
5
|
import { PropType } from 'vue';
|
|
7
|
-
import {
|
|
6
|
+
import { PublicProps } from 'vue';
|
|
8
7
|
|
|
9
8
|
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
9
|
|
|
@@ -27,28 +26,28 @@ declare type __VLS_WithDefaults<P, D> = {
|
|
|
27
26
|
}> : P[K];
|
|
28
27
|
};
|
|
29
28
|
|
|
30
|
-
declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ObfuscateTextProps>, {
|
|
29
|
+
declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ObfuscateTextProps>, {
|
|
31
30
|
maskChar: string;
|
|
32
31
|
maskCharCount: number;
|
|
33
32
|
lengthToKeep: number;
|
|
34
33
|
position: string;
|
|
35
34
|
obfuscateAll: boolean;
|
|
36
35
|
showToggle: boolean;
|
|
37
|
-
}
|
|
36
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ObfuscateTextProps>, {
|
|
38
37
|
maskChar: string;
|
|
39
38
|
maskCharCount: number;
|
|
40
39
|
lengthToKeep: number;
|
|
41
40
|
position: string;
|
|
42
41
|
obfuscateAll: boolean;
|
|
43
42
|
showToggle: boolean;
|
|
44
|
-
}
|
|
43
|
+
}>>> & Readonly<{}>, {
|
|
45
44
|
position: "start" | "end";
|
|
46
45
|
maskChar: string;
|
|
47
46
|
maskCharCount: number;
|
|
48
47
|
lengthToKeep: number;
|
|
49
48
|
obfuscateAll: boolean;
|
|
50
49
|
showToggle: boolean;
|
|
51
|
-
}, {}>;
|
|
50
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
52
51
|
export default _default;
|
|
53
52
|
|
|
54
53
|
export declare interface ObfuscateTextProps {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { AllowedComponentProps } from 'vue';
|
|
2
|
-
import { ComponentCustomProps } from 'vue';
|
|
3
1
|
import { ComponentOptionsMixin } from 'vue';
|
|
2
|
+
import { ComponentProvideOptions } from 'vue';
|
|
4
3
|
import { DefineComponent } from 'vue';
|
|
5
|
-
import {
|
|
6
|
-
import { VNodeProps } from 'vue';
|
|
4
|
+
import { PublicProps } from 'vue';
|
|
7
5
|
|
|
8
6
|
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
9
7
|
new (): {
|
|
@@ -11,7 +9,7 @@ declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
11
9
|
};
|
|
12
10
|
};
|
|
13
11
|
|
|
14
|
-
declare const _default: __VLS_WithTemplateSlots<DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string,
|
|
12
|
+
declare const _default: __VLS_WithTemplateSlots<DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
|
|
15
13
|
default?(_: {}): any;
|
|
16
14
|
sidebar?(_: {}): any;
|
|
17
15
|
}>;
|
package/dist/PageHeader.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageHeader.js","sources":["../src/components/PageHeader/PageHeader.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, useCssModule, useSlots } from 'vue';\n\n export interface PageHeaderProps {\n /**\n * The title of the page.\n */\n title: string;\n /**\n * The description of the page.\n */\n description?: string;\n }\n\n defineOptions({\n name: 'll-page-header',\n });\n\n const props = withDefaults(defineProps<PageHeaderProps>(), {\n description: '',\n });\n\n const classes = useCssModule();\n const slots = useSlots();\n\n const hasActions = computed<boolean>(() => !!(slots['primary-action'] || slots['secondary-action']));\n</script>\n\n<template>\n <header\n class=\"stash-page-header\"\n :class=\"[classes.root, { [classes.grid]: hasActions }]\"\n data-test=\"stash-page-header\"\n >\n <div class=\"tw-col-span-full tw-flex tw-items-center lg:tw-col-span-1\">\n <div v-if=\"slots.media\" class=\"stash-page-header__media tw-mr-3 tw-self-center\" :class=\"classes.mediaTest\">\n <!-- @slot Receives a custom media -->\n <slot name=\"media\"></slot>\n </div>\n\n <div>\n <!-- @slot Receives a custom title -->\n <slot name=\"title\">\n <h1 class=\"stash-page-header__title tw-my-0\">{{ props.title }}</h1>\n </slot>\n\n <!-- @slot Receives a custom description -->\n <slot name=\"description\">\n <p v-if=\"description\" class=\"stash-page-header__description tw-mb-0 tw-mt-1.5\">{{ props.description }}</p>\n </slot>\n </div>\n </div>\n\n <div\n v-if=\"hasActions\"\n class=\"stash-page-header__actions tw-col-span-full tw-flex lg:tw-col-span-1\"\n :class=\"classes.actions\"\n >\n <!-- @slot Receives a custom secondary action -->\n <slot name=\"secondary-action\"> </slot>\n <!-- @slot Receives a custom primary action -->\n <slot name=\"primary-action\"> </slot>\n </div>\n </header>\n</template>\n\n<style module>\n .root {\n border-bottom: 0;\n display: grid;\n gap: var(--grid-gutter);\n margin: 0 auto;\n max-width: theme('width.container');\n padding: theme('spacing.6') var(--grid-gutter) theme('spacing.12');\n width: 100%;\n }\n\n @media screen('lg') {\n .root.grid {\n grid-template-columns: repeat(2, 1fr);\n }\n }\n\n .actions {\n align-self: flex-end;\n flex-direction: column-reverse;\n row-gap: var(--grid-gutter);\n }\n\n @media screen('md') {\n .actions {\n column-gap: var(--grid-gutter);\n flex-direction: row;\n row-gap: 0;\n }\n }\n\n @media screen('lg') {\n .actions {\n align-items: flex-end;\n flex-direction: row;\n justify-content: flex-end;\n }\n }\n\n /* max size for media/marketing illustration icons we would be passing to the slot */\n .media-test {\n max-width: 58px;\n max-height: 58px;\n }\n</style>\n"],"names":["classes","useCssModule","slots","useSlots","hasActions","computed"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"PageHeader.js","sources":["../src/components/PageHeader/PageHeader.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, useCssModule, useSlots } from 'vue';\n\n export interface PageHeaderProps {\n /**\n * The title of the page.\n */\n title: string;\n /**\n * The description of the page.\n */\n description?: string;\n }\n\n defineOptions({\n name: 'll-page-header',\n });\n\n const props = withDefaults(defineProps<PageHeaderProps>(), {\n description: '',\n });\n\n const classes = useCssModule();\n const slots = useSlots();\n\n const hasActions = computed<boolean>(() => !!(slots['primary-action'] || slots['secondary-action']));\n</script>\n\n<template>\n <header\n class=\"stash-page-header\"\n :class=\"[classes.root, { [classes.grid]: hasActions }]\"\n data-test=\"stash-page-header\"\n >\n <div class=\"tw-col-span-full tw-flex tw-items-center lg:tw-col-span-1\">\n <div v-if=\"slots.media\" class=\"stash-page-header__media tw-mr-3 tw-self-center\" :class=\"classes.mediaTest\">\n <!-- @slot Receives a custom media -->\n <slot name=\"media\"></slot>\n </div>\n\n <div>\n <!-- @slot Receives a custom title -->\n <slot name=\"title\">\n <h1 class=\"stash-page-header__title tw-my-0\">{{ props.title }}</h1>\n </slot>\n\n <!-- @slot Receives a custom description -->\n <slot name=\"description\">\n <p v-if=\"description\" class=\"stash-page-header__description tw-mb-0 tw-mt-1.5\">{{ props.description }}</p>\n </slot>\n </div>\n </div>\n\n <div\n v-if=\"hasActions\"\n class=\"stash-page-header__actions tw-col-span-full tw-flex lg:tw-col-span-1\"\n :class=\"classes.actions\"\n >\n <!-- @slot Receives a custom secondary action -->\n <slot name=\"secondary-action\"> </slot>\n <!-- @slot Receives a custom primary action -->\n <slot name=\"primary-action\"> </slot>\n </div>\n </header>\n</template>\n\n<style module>\n .root {\n border-bottom: 0;\n display: grid;\n gap: var(--grid-gutter);\n margin: 0 auto;\n max-width: theme('width.container');\n padding: theme('spacing.6') var(--grid-gutter) theme('spacing.12');\n width: 100%;\n }\n\n @media screen('lg') {\n .root.grid {\n grid-template-columns: repeat(2, 1fr);\n }\n }\n\n .actions {\n align-self: flex-end;\n flex-direction: column-reverse;\n row-gap: var(--grid-gutter);\n }\n\n @media screen('md') {\n .actions {\n column-gap: var(--grid-gutter);\n flex-direction: row;\n row-gap: 0;\n }\n }\n\n @media screen('lg') {\n .actions {\n align-items: flex-end;\n flex-direction: row;\n justify-content: flex-end;\n }\n }\n\n /* max size for media/marketing illustration icons we would be passing to the slot */\n .media-test {\n max-width: 58px;\n max-height: 58px;\n }\n</style>\n"],"names":["props","__props","classes","useCssModule","slots","useSlots","hasActions","computed"],"mappings":";;;;;;;;;;;;;AAkBE,UAAMA,IAAQC,GAIRC,IAAUC,KACVC,IAAQC,KAERC,IAAaC,EAAkB,MAAM,CAAC,EAAEH,EAAM,gBAAgB,KAAKA,EAAM,kBAAkB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/PageHeader.vue.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { AllowedComponentProps } from 'vue';
|
|
2
|
-
import { ComponentCustomProps } from 'vue';
|
|
3
1
|
import { ComponentOptionsMixin } from 'vue';
|
|
2
|
+
import { ComponentProvideOptions } from 'vue';
|
|
4
3
|
import { DefineComponent } from 'vue';
|
|
5
4
|
import { ExtractPropTypes } from 'vue';
|
|
6
5
|
import { PropType } from 'vue';
|
|
7
|
-
import {
|
|
6
|
+
import { PublicProps } from 'vue';
|
|
8
7
|
|
|
9
8
|
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
9
|
|
|
@@ -33,13 +32,13 @@ declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
33
32
|
};
|
|
34
33
|
};
|
|
35
34
|
|
|
36
|
-
declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PageHeaderProps>, {
|
|
35
|
+
declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PageHeaderProps>, {
|
|
37
36
|
description: string;
|
|
38
|
-
}
|
|
37
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PageHeaderProps>, {
|
|
39
38
|
description: string;
|
|
40
|
-
}
|
|
39
|
+
}>>> & Readonly<{}>, {
|
|
41
40
|
description: string;
|
|
42
|
-
}, {}>, {
|
|
41
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
|
|
43
42
|
media?(_: {}): any;
|
|
44
43
|
title?(_: {}): any;
|
|
45
44
|
description?(_: {}): any;
|
package/dist/PageNavigation.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as m, ref as g, watch as x, onMounted as _, openBlock as i, createElementBlock as c, createVNode as I, withCtx as f, Fragment as V, renderList as k, createBlock as T, unref as N, createTextVNode as B, toDisplayString as C } from "vue";
|
|
2
|
+
import U from "@leaflink/snitch";
|
|
3
3
|
import s from "lodash-es/kebabCase";
|
|
4
|
-
import { useRoute as
|
|
5
|
-
import { _ as
|
|
6
|
-
import
|
|
4
|
+
import { useRoute as y, useRouter as P } from "vue-router";
|
|
5
|
+
import { _ as D } from "./Tab.vue_vue_type_script_setup_true_lang-9aa53203.js";
|
|
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-3aa36673.js";
|
|
10
10
|
import "lodash-es/debounce";
|
|
11
11
|
import "lodash-es/uniqueId";
|
|
12
12
|
import "./constants.js";
|
|
@@ -22,10 +22,10 @@ import "lodash-es/isPlainObject";
|
|
|
22
22
|
import "./Icon.js";
|
|
23
23
|
import "./index-9e1095ef.js";
|
|
24
24
|
import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
|
25
|
-
const
|
|
25
|
+
const F = {
|
|
26
26
|
class: "stash-page-navigation container",
|
|
27
27
|
"data-test": "stash-page-navigation"
|
|
28
|
-
},
|
|
28
|
+
}, oe = /* @__PURE__ */ m({
|
|
29
29
|
name: "ll-page-navigation",
|
|
30
30
|
__name: "PageNavigation",
|
|
31
31
|
props: {
|
|
@@ -34,19 +34,22 @@ const E = {
|
|
|
34
34
|
items: {}
|
|
35
35
|
},
|
|
36
36
|
emits: ["update:modelValue", "change"],
|
|
37
|
-
setup(v, { emit:
|
|
38
|
-
const r = v;
|
|
39
|
-
r.activeIndex &&
|
|
40
|
-
const o =
|
|
37
|
+
setup(v, { emit: h }) {
|
|
38
|
+
const r = v, p = h;
|
|
39
|
+
r.activeIndex && U.info("The `activeIndex` prop is deprecated. Use `v-model` instead.");
|
|
40
|
+
const o = y(), u = P(), d = g("");
|
|
41
41
|
function n(t) {
|
|
42
|
-
t !== d.value && (d.value = t,
|
|
42
|
+
t !== d.value && (d.value = t, p("update:modelValue", t));
|
|
43
43
|
}
|
|
44
|
-
return
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
return x(
|
|
45
|
+
() => r.modelValue,
|
|
46
|
+
(t, e) => {
|
|
47
|
+
if (e === t)
|
|
48
|
+
return;
|
|
49
|
+
const a = r.items.findIndex((l) => s(l.label) === t);
|
|
50
|
+
p("change", a), n(t);
|
|
51
|
+
}
|
|
52
|
+
), _(() => {
|
|
50
53
|
if (!r.items.length)
|
|
51
54
|
return;
|
|
52
55
|
if (r.activeIndex !== void 0) {
|
|
@@ -68,19 +71,19 @@ const E = {
|
|
|
68
71
|
return !0;
|
|
69
72
|
if (!o.path.includes(a))
|
|
70
73
|
return;
|
|
71
|
-
const l = (o.path.length - o.path.lastIndexOf("/")) * -1,
|
|
72
|
-
return a ===
|
|
74
|
+
const l = (o.path.length - o.path.lastIndexOf("/")) * -1, b = o.path.slice(0, l);
|
|
75
|
+
return a === b;
|
|
73
76
|
});
|
|
74
77
|
t && n((t == null ? void 0 : t.value) || s(t.label));
|
|
75
|
-
}), (t, e) => (
|
|
76
|
-
|
|
78
|
+
}), (t, e) => (i(), c("nav", F, [
|
|
79
|
+
I(E, {
|
|
77
80
|
"active-tab": d.value,
|
|
78
81
|
"onUpdate:activeTab": n
|
|
79
82
|
}, {
|
|
80
83
|
default: f(() => [
|
|
81
|
-
(
|
|
84
|
+
(i(!0), c(V, null, k(r.items, (a, l) => (i(), T(D, {
|
|
82
85
|
key: a.label,
|
|
83
|
-
value: (a == null ? void 0 : a.value) ||
|
|
86
|
+
value: (a == null ? void 0 : a.value) || N(s)(a.label),
|
|
84
87
|
to: a.to,
|
|
85
88
|
href: a.href,
|
|
86
89
|
badge: a.badge,
|
|
@@ -88,7 +91,7 @@ const E = {
|
|
|
88
91
|
"data-id": l
|
|
89
92
|
}, {
|
|
90
93
|
default: f(() => [
|
|
91
|
-
|
|
94
|
+
B(C(a.label), 1)
|
|
92
95
|
]),
|
|
93
96
|
_: 2
|
|
94
97
|
}, 1032, ["value", "to", "href", "badge", "disabled", "data-id"]))), 128))
|
|
@@ -99,6 +102,6 @@ const E = {
|
|
|
99
102
|
}
|
|
100
103
|
});
|
|
101
104
|
export {
|
|
102
|
-
|
|
105
|
+
oe as default
|
|
103
106
|
};
|
|
104
107
|
//# sourceMappingURL=PageNavigation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageNavigation.js","sources":["../src/components/PageNavigation/PageNavigation.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import logger from '@leaflink/snitch';\n import kebabCase from 'lodash-es/kebabCase';\n import { onMounted, ref, watch } from 'vue';\n import { RouteLocationRaw, useRoute, useRouter } from 'vue-router';\n\n import Tab, { type TabProps } from '../Tab/Tab.vue';\n import Tabs from '../Tabs/Tabs.vue';\n\n defineOptions({\n name: 'll-page-navigation',\n });\n\n export interface NavItem extends Omit<TabProps, 'value'> {\n /**\n * The tab's label\n */\n label: string;\n\n /**\n * The tab's label\n */\n value?: string;\n }\n\n export interface PageNavigationProps {\n /**\n * Index of active tab (zero-based)\n * @deprecated Use v-model instead.\n */\n activeIndex?: number | string;\n\n /**\n * The currently active tab value\n */\n modelValue?: string;\n\n /**\n * Array of tabs. A `tab` is an object containing a `label` and either an `href` | `to`\n */\n items: NavItem[];\n }\n\n const props = withDefaults(defineProps<PageNavigationProps>(), {\n activeIndex: undefined,\n modelValue: '',\n });\n\n const emit
|
|
1
|
+
{"version":3,"file":"PageNavigation.js","sources":["../src/components/PageNavigation/PageNavigation.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import logger from '@leaflink/snitch';\n import kebabCase from 'lodash-es/kebabCase';\n import { onMounted, ref, watch } from 'vue';\n import { RouteLocationRaw, useRoute, useRouter } from 'vue-router';\n\n import Tab, { type TabProps } from '../Tab/Tab.vue';\n import Tabs from '../Tabs/Tabs.vue';\n\n defineOptions({\n name: 'll-page-navigation',\n });\n\n export interface NavItem extends Omit<TabProps, 'value'> {\n /**\n * The tab's label\n */\n label: string;\n\n /**\n * The tab's label\n */\n value?: string;\n }\n\n export interface PageNavigationProps {\n /**\n * Index of active tab (zero-based)\n * @deprecated Use v-model instead.\n */\n activeIndex?: number | string;\n\n /**\n * The currently active tab value\n */\n modelValue?: string;\n\n /**\n * Array of tabs. A `tab` is an object containing a `label` and either an `href` | `to`\n */\n items: NavItem[];\n }\n\n const props = withDefaults(defineProps<PageNavigationProps>(), {\n activeIndex: undefined,\n modelValue: '',\n });\n\n const emit = defineEmits<{\n /**\n * Emits the current active nav value\n */\n (e: 'update:modelValue', activeTab: string): void;\n\n /**\n * Emits the current active nav index\n * @deprecated - Use v-model instead.\n */\n (e: 'change', activeNavIndex: number): void;\n }>();\n\n if (props.activeIndex) {\n logger.info('The `activeIndex` prop is deprecated. Use `v-model` instead.');\n }\n\n const route = useRoute();\n const router = useRouter();\n\n // this ref is needed to keep track of the active tab even if v-model is not passed\n const activeTab = ref('');\n\n function onUpdateActiveTab(newActiveTab: string) {\n if (newActiveTab === activeTab.value) return;\n\n activeTab.value = newActiveTab;\n emit('update:modelValue', newActiveTab);\n }\n\n watch(\n () => props.modelValue,\n (newValue, oldValue) => {\n if (oldValue === newValue) return;\n\n // TODO: Remove this once activeIndex is removed\n const activeNavItemIndex = props.items.findIndex((item) => kebabCase(item.label) === newValue);\n emit('change', activeNavItemIndex);\n\n // Forcing updating activeTab when the component is in a keep alive state\n onUpdateActiveTab(newValue);\n },\n );\n\n onMounted(() => {\n if (!props.items.length) return;\n\n // TODO: Remove this once activeIndex is removed\n if (props.activeIndex !== undefined) {\n const activeTabItem = props.items[props.activeIndex];\n\n onUpdateActiveTab(kebabCase(activeTabItem.label));\n\n return;\n }\n\n if (props.modelValue !== activeTab.value) {\n onUpdateActiveTab(props.modelValue);\n return;\n }\n\n if (!router) return;\n\n const itemMatchingRoute = props.items.find((item) => {\n if (item?.disabled || (!item?.to && !item?.href)) return;\n\n const { path } = router.resolve((item?.to as RouteLocationRaw) || (item?.href as string));\n\n if (path === route.path) {\n return true;\n }\n\n if (!route.path.includes(path)) return;\n\n const sliceIndex = (route.path.length - route.path.lastIndexOf('/')) * -1;\n const parentPath = route.path.slice(0, sliceIndex);\n\n return path === parentPath;\n });\n\n if (!itemMatchingRoute) return;\n\n onUpdateActiveTab(itemMatchingRoute?.value || kebabCase(itemMatchingRoute.label));\n });\n</script>\n\n<template>\n <nav class=\"stash-page-navigation container\" data-test=\"stash-page-navigation\">\n <Tabs :active-tab=\"activeTab\" @update:active-tab=\"onUpdateActiveTab\">\n <Tab\n v-for=\"(item, index) in props.items\"\n :key=\"item.label\"\n :value=\"item?.value || kebabCase(item.label)\"\n :to=\"item.to\"\n :href=\"item.href\"\n :badge=\"item.badge\"\n :disabled=\"item.disabled\"\n :data-id=\"index\"\n >\n {{ item.label }}\n </Tab>\n </Tabs>\n </nav>\n</template>\n"],"names":["props","__props","emit","__emit","logger","route","useRoute","router","useRouter","activeTab","ref","onUpdateActiveTab","newActiveTab","watch","newValue","oldValue","activeNavItemIndex","item","kebabCase","onMounted","activeTabItem","itemMatchingRoute","path","sliceIndex","parentPath"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CE,UAAMA,IAAQC,GAKRC,IAAOC;AAab,IAAIH,EAAM,eACRI,EAAO,KAAK,8DAA8D;AAG5E,UAAMC,IAAQC,KACRC,IAASC,KAGTC,IAAYC,EAAI,EAAE;AAExB,aAASC,EAAkBC,GAAsB;AAC/C,MAAIA,MAAiBH,EAAU,UAE/BA,EAAU,QAAQG,GAClBV,EAAK,qBAAqBU,CAAY;AAAA,IACxC;AAEA,WAAAC;AAAA,MACE,MAAMb,EAAM;AAAA,MACZ,CAACc,GAAUC,MAAa;AACtB,YAAIA,MAAaD;AAAU;AAGrB,cAAAE,IAAqBhB,EAAM,MAAM,UAAU,CAACiB,MAASC,EAAUD,EAAK,KAAK,MAAMH,CAAQ;AAC7F,QAAAZ,EAAK,UAAUc,CAAkB,GAGjCL,EAAkBG,CAAQ;AAAA,MAC5B;AAAA,IAAA,GAGFK,EAAU,MAAM;AACV,UAAA,CAACnB,EAAM,MAAM;AAAQ;AAGrB,UAAAA,EAAM,gBAAgB,QAAW;AACnC,cAAMoB,IAAgBpB,EAAM,MAAMA,EAAM,WAAW;AAEjC,QAAAW,EAAAO,EAAUE,EAAc,KAAK,CAAC;AAEhD;AAAA;AAGE,UAAApB,EAAM,eAAeS,EAAU,OAAO;AACxC,QAAAE,EAAkBX,EAAM,UAAU;AAClC;AAAA;AAGF,UAAI,CAACO;AAAQ;AAEb,YAAMc,IAAoBrB,EAAM,MAAM,KAAK,CAACiB,MAAS;AACnD,YAAIA,KAAA,QAAAA,EAAM,YAAa,EAACA,KAAA,QAAAA,EAAM,OAAM,EAACA,KAAA,QAAAA,EAAM;AAAO;AAE5C,cAAA,EAAE,MAAAK,EAAS,IAAAf,EAAO,SAASU,KAAA,gBAAAA,EAAM,QAA4BA,KAAA,gBAAAA,EAAM,KAAe;AAEpF,YAAAK,MAASjB,EAAM;AACV,iBAAA;AAGT,YAAI,CAACA,EAAM,KAAK,SAASiB,CAAI;AAAG;AAE1B,cAAAC,KAAclB,EAAM,KAAK,SAASA,EAAM,KAAK,YAAY,GAAG,KAAK,IACjEmB,IAAanB,EAAM,KAAK,MAAM,GAAGkB,CAAU;AAEjD,eAAOD,MAASE;AAAA,MAAA,CACjB;AAED,MAAKH,KAELV,GAAkBU,KAAA,gBAAAA,EAAmB,UAASH,EAAUG,EAAkB,KAAK,CAAC;AAAA,IAAA,CACjF;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { AllowedComponentProps } from 'vue';
|
|
2
|
-
import { ComponentCustomProps } from 'vue';
|
|
3
1
|
import { ComponentOptionsMixin } from 'vue';
|
|
2
|
+
import { ComponentProvideOptions } from 'vue';
|
|
4
3
|
import { DefineComponent } from 'vue';
|
|
5
4
|
import { ExtractPropTypes } from 'vue';
|
|
6
5
|
import { PropType } from 'vue';
|
|
6
|
+
import { PublicProps } from 'vue';
|
|
7
7
|
import { RouteLocationRaw } from 'vue-router';
|
|
8
8
|
import { RouterLinkProps } from 'vue-router';
|
|
9
|
-
import { VNodeProps } from 'vue';
|
|
10
9
|
|
|
11
10
|
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
12
11
|
|
|
@@ -34,22 +33,22 @@ declare type __VLS_WithDefaults<P, D> = {
|
|
|
34
33
|
*/
|
|
35
34
|
declare type AnchorAttrs = HTMLAnchorElement['download'] | HTMLAnchorElement['hreflang'] | HTMLAnchorElement['ping'] | HTMLAnchorElement['referrerPolicy'] | HTMLAnchorElement['rel'] | HTMLAnchorElement['target'] | HTMLAnchorElement['type'];
|
|
36
35
|
|
|
37
|
-
declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PageNavigationProps>, {
|
|
36
|
+
declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PageNavigationProps>, {
|
|
38
37
|
activeIndex: undefined;
|
|
39
38
|
modelValue: string;
|
|
40
|
-
}
|
|
39
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
41
40
|
"update:modelValue": (activeTab: string) => void;
|
|
42
41
|
change: (activeNavIndex: number) => void;
|
|
43
|
-
}, string,
|
|
42
|
+
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PageNavigationProps>, {
|
|
44
43
|
activeIndex: undefined;
|
|
45
44
|
modelValue: string;
|
|
46
|
-
}>>> & {
|
|
45
|
+
}>>> & Readonly<{
|
|
47
46
|
onChange?: ((activeNavIndex: number) => any) | undefined;
|
|
48
47
|
"onUpdate:modelValue"?: ((activeTab: string) => any) | undefined;
|
|
49
|
-
}
|
|
48
|
+
}>, {
|
|
50
49
|
modelValue: string;
|
|
51
50
|
activeIndex: string | number;
|
|
52
|
-
}, {}>;
|
|
51
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
53
52
|
export default _default;
|
|
54
53
|
|
|
55
54
|
export declare interface NavItem extends Omit<TabProps, 'value'> {
|
package/dist/Paginate.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { s as
|
|
4
|
-
import { _ as
|
|
1
|
+
import { defineComponent as y, useCssModule as S, computed as x, openBlock as r, createElementBlock as i, createElementVNode as c, normalizeClass as o, unref as l, createVNode as f, Fragment as m, renderList as z, createCommentVNode as p, toDisplayString as M } from "vue";
|
|
2
|
+
import g from "./Icon.js";
|
|
3
|
+
import { s as E } from "./Paginate.vue_used_vue_type_style_index_0_lang.module-18343da7.js";
|
|
4
|
+
import { _ as L } from "./_plugin-vue_export-helper-dad06003.js";
|
|
5
5
|
import "lodash-es/uniqueId";
|
|
6
6
|
import "./index-9e1095ef.js";
|
|
7
7
|
import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
|
8
|
-
const
|
|
8
|
+
const $ = {
|
|
9
9
|
class: "stash-paginate tw-flex tw-justify-center",
|
|
10
10
|
"data-test": "stash-paginate"
|
|
11
|
-
},
|
|
11
|
+
}, N = ["onClick"], V = /* @__PURE__ */ y({
|
|
12
12
|
name: "ll-paginate",
|
|
13
13
|
__name: "Paginate",
|
|
14
14
|
props: {
|
|
@@ -18,63 +18,63 @@ const L = {
|
|
|
18
18
|
},
|
|
19
19
|
emits: ["set-page"],
|
|
20
20
|
setup(h, { emit: v }) {
|
|
21
|
-
const t = h, n =
|
|
21
|
+
const t = h, P = v, n = S(), s = x(() => Math.ceil(t.listLength / t.pageSize));
|
|
22
22
|
function u(e) {
|
|
23
|
-
|
|
23
|
+
P("set-page", e);
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function _() {
|
|
26
26
|
t.currentPage < s.value && u(t.currentPage + 1);
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function b() {
|
|
29
29
|
t.currentPage > 1 && u(t.currentPage - 1);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function k(e) {
|
|
32
32
|
const d = Math.abs(t.currentPage - e);
|
|
33
33
|
return s.value < 10 || e === 1 || e === s.value || t.currentPage < 6 && e < 8 || s.value - t.currentPage < 5 && s.value - e < 7 || d < 3;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function C(e) {
|
|
36
36
|
return s.value > 9 && t.currentPage > 5 && e === 2;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function w(e) {
|
|
39
39
|
return s.value > 9 && s.value - t.currentPage > 4 && e === s.value - 1;
|
|
40
40
|
}
|
|
41
|
-
return (e, d) => (r(),
|
|
41
|
+
return (e, d) => (r(), i("div", $, [
|
|
42
42
|
c("ul", {
|
|
43
|
-
class: o(["stash-paginate__list tw-flex",
|
|
43
|
+
class: o(["stash-paginate__list tw-flex", l(n).pagination]),
|
|
44
44
|
"data-test": "stash-paginate|list"
|
|
45
45
|
}, [
|
|
46
46
|
c("button", {
|
|
47
47
|
"data-test": "stash-paginate|prev-page",
|
|
48
|
-
class: o([
|
|
49
|
-
onClick:
|
|
48
|
+
class: o([l(n).prev, { [l(n)["is-disabled"]]: e.currentPage === 1 }]),
|
|
49
|
+
onClick: b
|
|
50
50
|
}, [
|
|
51
|
-
f(
|
|
51
|
+
f(g, {
|
|
52
52
|
size: "small",
|
|
53
53
|
name: "chevron-left"
|
|
54
54
|
})
|
|
55
55
|
], 2),
|
|
56
|
-
(r(!0),
|
|
57
|
-
|
|
56
|
+
(r(!0), i(m, null, z(s.value, (a) => (r(), i(m, null, [
|
|
57
|
+
C(a) ? (r(), i("button", {
|
|
58
58
|
key: `${a}-ellipsis`,
|
|
59
59
|
"data-test": "stash-paginate|first-ellipsis"
|
|
60
60
|
}, " … ")) : p("", !0),
|
|
61
|
-
|
|
61
|
+
k(a) ? (r(), i("button", {
|
|
62
62
|
key: a,
|
|
63
63
|
"data-test": "stash-paginate|page-number",
|
|
64
|
-
class: o({ [
|
|
65
|
-
onClick: (
|
|
66
|
-
},
|
|
67
|
-
|
|
64
|
+
class: o({ [l(n)["is-active"]]: e.currentPage === a }),
|
|
65
|
+
onClick: (D) => u(a)
|
|
66
|
+
}, M(a), 11, N)) : p("", !0),
|
|
67
|
+
w(a) ? (r(), i("button", {
|
|
68
68
|
key: `${a}-ellipsis`,
|
|
69
69
|
"data-test": "stash-paginate|last-ellipsis"
|
|
70
70
|
}, " … ")) : p("", !0)
|
|
71
71
|
], 64))), 256)),
|
|
72
72
|
c("button", {
|
|
73
73
|
"data-test": "stash-paginate|next-page",
|
|
74
|
-
class: o([
|
|
75
|
-
onClick:
|
|
74
|
+
class: o([l(n).next, { [l(n)["is-disabled"]]: e.currentPage === s.value }]),
|
|
75
|
+
onClick: _
|
|
76
76
|
}, [
|
|
77
|
-
f(
|
|
77
|
+
f(g, {
|
|
78
78
|
size: "small",
|
|
79
79
|
class: "tw-rotate-180",
|
|
80
80
|
name: "chevron-left"
|
|
@@ -83,10 +83,10 @@ const L = {
|
|
|
83
83
|
], 2)
|
|
84
84
|
]));
|
|
85
85
|
}
|
|
86
|
-
}),
|
|
87
|
-
$style:
|
|
88
|
-
},
|
|
86
|
+
}), B = {
|
|
87
|
+
$style: E
|
|
88
|
+
}, J = /* @__PURE__ */ L(V, [["__cssModules", B]]);
|
|
89
89
|
export {
|
|
90
|
-
|
|
90
|
+
J as default
|
|
91
91
|
};
|
|
92
92
|
//# sourceMappingURL=Paginate.js.map
|
package/dist/Paginate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Paginate.js","sources":["../src/components/Paginate/Paginate.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { computed, useCssModule } from 'vue';\n\n import Icon from '../Icon/Icon.vue';\n\n defineOptions({\n name: 'll-paginate',\n });\n\n export interface PaginateProps {\n /**\n * Current page number\n */\n currentPage?: number;\n /**\n * Total number of items in list\n */\n listLength?: number;\n /**\n * Number of items per page\n */\n pageSize?: number;\n }\n\n const props = withDefaults(defineProps<PaginateProps>(), {\n currentPage: 1,\n listLength: 1,\n pageSize: 50,\n });\n\n const emit
|
|
1
|
+
{"version":3,"file":"Paginate.js","sources":["../src/components/Paginate/Paginate.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { computed, useCssModule } from 'vue';\n\n import Icon from '../Icon/Icon.vue';\n\n defineOptions({\n name: 'll-paginate',\n });\n\n export interface PaginateProps {\n /**\n * Current page number\n */\n currentPage?: number;\n /**\n * Total number of items in list\n */\n listLength?: number;\n /**\n * Number of items per page\n */\n pageSize?: number;\n }\n\n const props = withDefaults(defineProps<PaginateProps>(), {\n currentPage: 1,\n listLength: 1,\n pageSize: 50,\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the page number changes.\n */\n (e: 'set-page', pageNumber: number): void;\n }>();\n\n const classes = useCssModule();\n\n const pages = computed(() => Math.ceil(props.listLength / props.pageSize));\n\n /**\n * Emits current page to list view.\n */\n function updatePage(currentPage: number) {\n emit('set-page', currentPage);\n }\n\n /**\n * Sets current page to next page\n */\n function next() {\n if (props.currentPage < pages.value) {\n updatePage(props.currentPage + 1);\n }\n }\n\n /**\n * Sets current page to previous page\n */\n function prev() {\n if (props.currentPage > 1) {\n updatePage(props.currentPage - 1);\n }\n }\n\n /**\n * Determines whether to show page\n * @returns {boolean} - should show page in pagination component\n */\n function shouldShowPage(page: number): boolean {\n const pageDiff = Math.abs(props.currentPage - page);\n\n if (\n pages.value < 10 ||\n page === 1 ||\n page === pages.value ||\n (props.currentPage < 6 && page < 8) ||\n (pages.value - props.currentPage < 5 && pages.value - page < 7) ||\n pageDiff < 3\n ) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Determines whether to show the leading ellipsis\n * @returns {boolean} should show or not\n */\n function shouldShowFirstEllipsis(page: number): boolean {\n return pages.value > 9 && props.currentPage > 5 && page === 2;\n }\n\n /**\n * Determines whether to show the trailing ellipsis\n * @returns {boolean} should show or not\n */\n function shouldShowLastEllipsis(page: number): boolean {\n return pages.value > 9 && pages.value - props.currentPage > 4 && page === pages.value - 1;\n }\n</script>\n\n<template>\n <div class=\"stash-paginate tw-flex tw-justify-center\" data-test=\"stash-paginate\">\n <ul class=\"stash-paginate__list tw-flex\" :class=\"classes.pagination\" data-test=\"stash-paginate|list\">\n <button\n data-test=\"stash-paginate|prev-page\"\n :class=\"[classes.prev, { [classes['is-disabled']]: currentPage === 1 }]\"\n @click=\"prev\"\n >\n <Icon size=\"small\" name=\"chevron-left\" />\n </button>\n <template v-for=\"page in pages\">\n <button\n v-if=\"shouldShowFirstEllipsis(page)\"\n :key=\"`${page}-ellipsis`\"\n data-test=\"stash-paginate|first-ellipsis\"\n >\n …\n </button>\n <button\n v-if=\"shouldShowPage(page)\"\n :key=\"page\"\n data-test=\"stash-paginate|page-number\"\n :class=\"{ [classes['is-active']]: currentPage === page }\"\n @click=\"updatePage(page)\"\n >\n {{ page }}\n </button>\n <button v-if=\"shouldShowLastEllipsis(page)\" :key=\"`${page}-ellipsis`\" data-test=\"stash-paginate|last-ellipsis\">\n …\n </button>\n </template>\n <button\n data-test=\"stash-paginate|next-page\"\n :class=\"[classes.next, { [classes['is-disabled']]: currentPage === pages }]\"\n @click=\"next\"\n >\n <Icon size=\"small\" class=\"tw-rotate-180\" name=\"chevron-left\" />\n </button>\n </ul>\n </div>\n</template>\n\n<style module>\n .pagination {\n /* Todo: We shouldn't really be making assumptions about the outer spacing of the pagination component */\n margin-top: theme('spacing.12');\n z-index: 0;\n\n a,\n button {\n @apply tw-border tw-border-solid tw-border-ice-200;\n align-items: center;\n background-color: theme('colors.white');\n color: var(--color-blue-500);\n cursor: pointer;\n display: flex;\n height: theme('height.input');\n justify-content: center;\n margin: 0 0 0 -1px;\n width: theme('height.input');\n\n &.prev {\n border-bottom-left-radius: theme('borderRadius.DEFAULT');\n border-top-left-radius: theme('borderRadius.DEFAULT');\n }\n\n &.next {\n border-bottom-right-radius: theme('borderRadius.DEFAULT');\n border-top-right-radius: theme('borderRadius.DEFAULT');\n }\n\n &:focus {\n outline: none;\n }\n\n &:hover {\n text-decoration: none;\n }\n\n &.is-active {\n background-color: var(--color-blue-500);\n color: theme('colors.white');\n pointer-events: none;\n z-index: theme('zIndex.control');\n }\n\n &:hover,\n &.is-active {\n @apply tw-border tw-border-solid tw-border-blue-500;\n position: relative;\n }\n\n &.is-disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n }\n }\n</style>\n"],"names":["props","__props","emit","__emit","classes","useCssModule","pages","computed","updatePage","currentPage","next","prev","shouldShowPage","page","pageDiff","shouldShowFirstEllipsis","shouldShowLastEllipsis"],"mappings":";;;;;;;;;;;;;;;;;;;;AAwBE,UAAMA,IAAQC,GAMRC,IAAOC,GAOPC,IAAUC,KAEVC,IAAQC,EAAS,MAAM,KAAK,KAAKP,EAAM,aAAaA,EAAM,QAAQ,CAAC;AAKzE,aAASQ,EAAWC,GAAqB;AACvC,MAAAP,EAAK,YAAYO,CAAW;AAAA,IAC9B;AAKA,aAASC,IAAO;AACV,MAAAV,EAAM,cAAcM,EAAM,SACjBE,EAAAR,EAAM,cAAc,CAAC;AAAA,IAEpC;AAKA,aAASW,IAAO;AACV,MAAAX,EAAM,cAAc,KACXQ,EAAAR,EAAM,cAAc,CAAC;AAAA,IAEpC;AAMA,aAASY,EAAeC,GAAuB;AAC7C,YAAMC,IAAW,KAAK,IAAId,EAAM,cAAca,CAAI;AAGhD,aAAAP,EAAM,QAAQ,MACdO,MAAS,KACTA,MAASP,EAAM,SACdN,EAAM,cAAc,KAAKa,IAAO,KAChCP,EAAM,QAAQN,EAAM,cAAc,KAAKM,EAAM,QAAQO,IAAO,KAC7DC,IAAW;AAAA,IAMf;AAMA,aAASC,EAAwBF,GAAuB;AACtD,aAAOP,EAAM,QAAQ,KAAKN,EAAM,cAAc,KAAKa,MAAS;AAAA,IAC9D;AAMA,aAASG,EAAuBH,GAAuB;AAC9C,aAAAP,EAAM,QAAQ,KAAKA,EAAM,QAAQN,EAAM,cAAc,KAAKa,MAASP,EAAM,QAAQ;AAAA,IAC1F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/Paginate.vue.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { AllowedComponentProps } from 'vue';
|
|
2
|
-
import { ComponentCustomProps } from 'vue';
|
|
3
1
|
import { ComponentOptionsMixin } from 'vue';
|
|
2
|
+
import { ComponentProvideOptions } from 'vue';
|
|
4
3
|
import { DefineComponent } from 'vue';
|
|
5
4
|
import { ExtractPropTypes } from 'vue';
|
|
6
5
|
import { PropType } from 'vue';
|
|
7
|
-
import {
|
|
6
|
+
import { PublicProps } from 'vue';
|
|
8
7
|
|
|
9
8
|
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
9
|
|
|
@@ -27,23 +26,23 @@ declare type __VLS_WithDefaults<P, D> = {
|
|
|
27
26
|
}> : P[K];
|
|
28
27
|
};
|
|
29
28
|
|
|
30
|
-
declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PaginateProps>, {
|
|
29
|
+
declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PaginateProps>, {
|
|
31
30
|
currentPage: number;
|
|
32
31
|
listLength: number;
|
|
33
32
|
pageSize: number;
|
|
34
|
-
}
|
|
33
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
35
34
|
"set-page": (pageNumber: number) => void;
|
|
36
|
-
}, string,
|
|
35
|
+
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PaginateProps>, {
|
|
37
36
|
currentPage: number;
|
|
38
37
|
listLength: number;
|
|
39
38
|
pageSize: number;
|
|
40
|
-
}>>> & {
|
|
39
|
+
}>>> & Readonly<{
|
|
41
40
|
"onSet-page"?: ((pageNumber: number) => any) | undefined;
|
|
42
|
-
}
|
|
41
|
+
}>, {
|
|
43
42
|
currentPage: number;
|
|
44
43
|
listLength: number;
|
|
45
44
|
pageSize: number;
|
|
46
|
-
}, {}>;
|
|
45
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
47
46
|
export default _default;
|
|
48
47
|
|
|
49
48
|
export declare interface PaginateProps {
|
package/dist/PlaidLink.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as y, computed as h, ref as c, openBlock as E, createElementBlock as w, renderSlot as x } from "vue";
|
|
2
|
+
import s from "@leaflink/snitch";
|
|
3
|
+
import P from "./usePlaidLink.js";
|
|
4
4
|
import "./useScriptTag.js";
|
|
5
|
-
const
|
|
5
|
+
const K = /* @__PURE__ */ y({
|
|
6
6
|
__name: "PlaidLink",
|
|
7
7
|
props: {
|
|
8
8
|
initScriptUrl: { default: "https://cdn.plaid.com/link/v2/stable/link-initialize.js" },
|
|
@@ -13,58 +13,58 @@ const L = /* @__PURE__ */ m({
|
|
|
13
13
|
createToken: { type: Function, default: void 0 }
|
|
14
14
|
},
|
|
15
15
|
emits: ["error", "success", "exit", "load", "event"],
|
|
16
|
-
setup(u, { expose: d, emit:
|
|
17
|
-
const
|
|
18
|
-
r.value = !1, e && (
|
|
16
|
+
setup(u, { expose: d, emit: p }) {
|
|
17
|
+
const t = u, i = h(() => t.storageKey ? t.storageKey : `${window.location.host.split(".").splice(-3).join(".")}-plaid`), n = p, r = c(!1), f = (e, o) => {
|
|
18
|
+
r.value = !1, e && (s.error(new Error("Plaid: Error trying to link an account"), {
|
|
19
19
|
tags: { plaid: !0 },
|
|
20
20
|
extra: { PlaidError: e }
|
|
21
|
-
}), n("error", e,
|
|
22
|
-
},
|
|
23
|
-
r.value = !1, sessionStorage.removeItem(
|
|
24
|
-
},
|
|
25
|
-
env:
|
|
26
|
-
onSuccess:
|
|
27
|
-
onEvent:
|
|
28
|
-
onLoad:
|
|
29
|
-
onExit:
|
|
30
|
-
}), { open: g } =
|
|
21
|
+
}), n("error", e, o)), sessionStorage.removeItem(i.value), n("exit", o);
|
|
22
|
+
}, k = (e, o) => {
|
|
23
|
+
r.value = !1, sessionStorage.removeItem(i.value), n("success", e, o);
|
|
24
|
+
}, v = (...e) => n("load", ...e), m = (...e) => n("event", ...e), a = c({
|
|
25
|
+
env: t.env,
|
|
26
|
+
onSuccess: k,
|
|
27
|
+
onEvent: m,
|
|
28
|
+
onLoad: v,
|
|
29
|
+
onExit: f
|
|
30
|
+
}), { open: g } = P(a);
|
|
31
31
|
async function l() {
|
|
32
32
|
if (r.value !== !0) {
|
|
33
|
-
if (r.value = !0, typeof
|
|
33
|
+
if (r.value = !0, typeof t.createToken == "function")
|
|
34
34
|
try {
|
|
35
|
-
const { link_token: e } = await
|
|
35
|
+
const { link_token: e } = await t.createToken();
|
|
36
36
|
a.value.token = e;
|
|
37
37
|
} catch (e) {
|
|
38
|
-
const
|
|
39
|
-
|
|
38
|
+
const o = new Error("Plaid: Error trying to invoke createToken");
|
|
39
|
+
s.error(o, {
|
|
40
40
|
tags: { plaid: !0 },
|
|
41
41
|
extra: { error: e }
|
|
42
|
-
}), n("error",
|
|
42
|
+
}), n("error", o);
|
|
43
43
|
}
|
|
44
44
|
else
|
|
45
|
-
|
|
45
|
+
t.token && (a.value.token = t.token);
|
|
46
46
|
if (!a.value.token) {
|
|
47
47
|
const e = new Error("Plaid: link token not found");
|
|
48
|
-
|
|
48
|
+
s.error(e, { tags: { plaid: !0 } }), n("error", e), r.value = !1;
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
51
|
sessionStorage.setItem(
|
|
52
|
-
|
|
53
|
-
JSON.stringify({ token: a.value.token, returnTo:
|
|
52
|
+
i.value,
|
|
53
|
+
JSON.stringify({ token: a.value.token, returnTo: t.returnTo, env: t.env })
|
|
54
54
|
), g();
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
return d({
|
|
58
58
|
handleClick: l
|
|
59
|
-
}), (e,
|
|
59
|
+
}), (e, o) => (E(), w("span", {
|
|
60
60
|
"data-test": "stash-plaid-link",
|
|
61
61
|
onClick: l
|
|
62
62
|
}, [
|
|
63
|
-
|
|
63
|
+
x(e.$slots, "default", { open: r.value })
|
|
64
64
|
]));
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
67
|
export {
|
|
68
|
-
|
|
68
|
+
K as default
|
|
69
69
|
};
|
|
70
70
|
//# sourceMappingURL=PlaidLink.js.map
|