@leaflink/stash 48.16.1 → 48.17.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/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 +128 -105
- package/dist/ConfirmationCodeInput.js.map +1 -1
- package/dist/ConfirmationCodeInput.vue.d.ts +36 -11
- 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
package/dist/Select.vue.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
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 { Placement } from '@floating-ui/vue';
|
|
7
6
|
import { PropType } from 'vue';
|
|
8
|
-
import {
|
|
7
|
+
import { PublicProps } from 'vue';
|
|
9
8
|
|
|
10
9
|
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
11
10
|
|
|
@@ -34,7 +33,7 @@ declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
34
33
|
};
|
|
35
34
|
};
|
|
36
35
|
|
|
37
|
-
declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SelectProps>, {
|
|
36
|
+
declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SelectProps>, {
|
|
38
37
|
preventEmpty: boolean;
|
|
39
38
|
allowEmpty: null;
|
|
40
39
|
label: string;
|
|
@@ -72,14 +71,14 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
|
|
|
72
71
|
menuPlacement: string;
|
|
73
72
|
enableTeleport: boolean;
|
|
74
73
|
teleportTo: string;
|
|
75
|
-
}
|
|
74
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
76
75
|
"update:model-value": (selectedOptions: any) => void;
|
|
77
76
|
clear: () => void;
|
|
78
77
|
add: (optionAdded: any) => void;
|
|
79
78
|
remove: (optionRemoved: any, index: number) => void;
|
|
80
79
|
opened: () => void;
|
|
81
80
|
closed: (selectedOptions: any) => void;
|
|
82
|
-
}, string,
|
|
81
|
+
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SelectProps>, {
|
|
83
82
|
preventEmpty: boolean;
|
|
84
83
|
allowEmpty: null;
|
|
85
84
|
label: string;
|
|
@@ -117,35 +116,35 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
|
|
|
117
116
|
menuPlacement: string;
|
|
118
117
|
enableTeleport: boolean;
|
|
119
118
|
teleportTo: string;
|
|
120
|
-
}>>> & {
|
|
119
|
+
}>>> & Readonly<{
|
|
121
120
|
onRemove?: ((optionRemoved: any, index: number) => any) | undefined;
|
|
122
|
-
onClear?: (() => any) | undefined;
|
|
123
121
|
"onUpdate:model-value"?: ((selectedOptions: any) => any) | undefined;
|
|
122
|
+
onClear?: (() => any) | undefined;
|
|
124
123
|
onAdd?: ((optionAdded: any) => any) | undefined;
|
|
125
124
|
onOpened?: (() => any) | undefined;
|
|
126
125
|
onClosed?: ((selectedOptions: any) => any) | undefined;
|
|
127
|
-
}
|
|
126
|
+
}>, {
|
|
127
|
+
lazy: () => any[];
|
|
128
|
+
error: string;
|
|
128
129
|
name: string;
|
|
130
|
+
disabled: boolean;
|
|
129
131
|
label: string;
|
|
130
132
|
id: string;
|
|
131
133
|
icon: string | boolean;
|
|
132
|
-
error: string;
|
|
133
|
-
disabled: boolean;
|
|
134
|
-
placeholder: string;
|
|
135
|
-
value: any;
|
|
136
134
|
trackBy: string;
|
|
137
135
|
addBottomSpace: boolean;
|
|
138
136
|
errorText: string;
|
|
139
137
|
hintText: string;
|
|
140
138
|
showOptionalInLabel: boolean;
|
|
139
|
+
placeholder: string;
|
|
141
140
|
hint: string;
|
|
142
141
|
preventEmpty: boolean;
|
|
143
142
|
allowEmpty: string | boolean | null;
|
|
144
143
|
displayBy: string;
|
|
145
144
|
searchBy: string[];
|
|
146
145
|
options: any[] | readonly any[];
|
|
147
|
-
lazy: () => any[];
|
|
148
146
|
modelValue: any;
|
|
147
|
+
value: any;
|
|
149
148
|
hideSearch: boolean;
|
|
150
149
|
searchable: string | boolean | null;
|
|
151
150
|
preserveSearchTerm: boolean;
|
|
@@ -162,7 +161,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
|
|
|
162
161
|
menuPlacement: Placement;
|
|
163
162
|
enableTeleport: boolean;
|
|
164
163
|
teleportTo: string | HTMLElement;
|
|
165
|
-
}, {}>, {
|
|
164
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
|
|
166
165
|
selected?(_: {
|
|
167
166
|
option: any;
|
|
168
167
|
}): any;
|
package/dist/SelectStatus.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as S, useAttrs as b, useCssModule as
|
|
1
|
+
import { defineComponent as S, useAttrs as b, useCssModule as C, computed as u, openBlock as o, createBlock as O, normalizeClass as l, unref as V, withCtx as d, createElementBlock as i, createElementVNode as a, toDisplayString as c, createVNode as m, normalizeStyle as p } from "vue";
|
|
2
2
|
import f from "./Icon.js";
|
|
3
|
-
import
|
|
4
|
-
import { _ as
|
|
3
|
+
import $ from "./Select.js";
|
|
4
|
+
import { _ as E } 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";
|
|
@@ -25,11 +25,11 @@ import "./utils/colorScheme.js";
|
|
|
25
25
|
import "./Field.vue_vue_type_script_setup_true_lang-e1e4ff03.js";
|
|
26
26
|
import "./Label.vue_vue_type_script_setup_true_lang-4b02087f.js";
|
|
27
27
|
import "./locale.js";
|
|
28
|
-
const
|
|
28
|
+
const N = { class: "tw-mr-6 tw-truncate" }, D = {
|
|
29
29
|
key: 1,
|
|
30
30
|
class: "tw-flex tw-items-center",
|
|
31
31
|
"data-test": "select-status|value"
|
|
32
|
-
},
|
|
32
|
+
}, I = { class: "tw-ml-1.5 tw-mr-6 tw-truncate" }, L = { class: "tw-flex tw-min-w-0" }, M = /* @__PURE__ */ S({
|
|
33
33
|
name: "ll-select-status",
|
|
34
34
|
__name: "SelectStatus",
|
|
35
35
|
props: {
|
|
@@ -44,34 +44,34 @@ const j = { class: "tw-mr-6 tw-truncate" }, E = {
|
|
|
44
44
|
value: { type: [Number, String, Boolean, null], default: null }
|
|
45
45
|
},
|
|
46
46
|
emits: ["update:model-value"],
|
|
47
|
-
setup(
|
|
48
|
-
const
|
|
47
|
+
setup(y, { emit: w }) {
|
|
48
|
+
const _ = ["green", "teal", "ice", "yellow", "seafoam", "seafoam-700"], h = b(), v = C(), e = y;
|
|
49
49
|
if (e.value)
|
|
50
50
|
throw new Error("ll-select-status: use :model-value or v-model instead of :value.");
|
|
51
51
|
if (h.onInput)
|
|
52
52
|
throw new Error("ll-select-status: use the @update:model-value event instead of @input");
|
|
53
|
-
const r = u(() => e.statusOptions.find((t) => t[e.trackBy] === e.modelValue)),
|
|
53
|
+
const x = w, r = u(() => e.statusOptions.find((t) => t[e.trackBy] === e.modelValue)), B = u(() => {
|
|
54
54
|
const { color: t = "" } = r.value || {};
|
|
55
55
|
return _.includes(t);
|
|
56
56
|
});
|
|
57
|
-
function
|
|
57
|
+
function k(t) {
|
|
58
58
|
return t != null && t.includes("-") ? `tw-bg-${t}` : `tw-bg-${t}-500`;
|
|
59
59
|
}
|
|
60
60
|
function n(t) {
|
|
61
61
|
return t != null && t.includes("-") ? `tw-text-${t}` : `tw-text-${t}-500`;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
|
|
63
|
+
function g(t) {
|
|
64
|
+
x("update:model-value", (t == null ? void 0 : t[e.trackBy]) ?? "");
|
|
65
65
|
}
|
|
66
|
-
return (t,
|
|
66
|
+
return (t, A) => (o(), O($, {
|
|
67
67
|
ref: "select",
|
|
68
68
|
"hide-search": "",
|
|
69
69
|
single: "",
|
|
70
70
|
class: l([[
|
|
71
|
-
|
|
71
|
+
V(v).select,
|
|
72
72
|
{
|
|
73
73
|
"stash-select-status--filled": e.secondary,
|
|
74
|
-
"stash-select-status--filled-dark": e.secondary &&
|
|
74
|
+
"stash-select-status--filled-dark": e.secondary && B.value
|
|
75
75
|
}
|
|
76
76
|
], "stash-select-status"]),
|
|
77
77
|
disabled: e.disabled,
|
|
@@ -81,16 +81,16 @@ const j = { class: "tw-mr-6 tw-truncate" }, E = {
|
|
|
81
81
|
"track-by": e.trackBy,
|
|
82
82
|
"model-value": r.value,
|
|
83
83
|
"data-test": "stash-select-status",
|
|
84
|
-
"onUpdate:modelValue":
|
|
84
|
+
"onUpdate:modelValue": g
|
|
85
85
|
}, {
|
|
86
86
|
selected: d(({ option: s }) => [
|
|
87
87
|
e.secondary ? (o(), i("div", {
|
|
88
88
|
key: 0,
|
|
89
|
-
class: l(["stash-select-status--selected tw-absolute tw-inset-0 tw-flex tw-h-full tw-w-full tw-items-center tw-rounded tw-pl-3", [
|
|
89
|
+
class: l(["stash-select-status--selected tw-absolute tw-inset-0 tw-flex tw-h-full tw-w-full tw-items-center tw-rounded tw-pl-3", [k(s.color)]]),
|
|
90
90
|
"data-test": "select-status|value"
|
|
91
91
|
}, [
|
|
92
|
-
a("span",
|
|
93
|
-
], 2)) : (o(), i("div",
|
|
92
|
+
a("span", N, c(s[e.displayBy]), 1)
|
|
93
|
+
], 2)) : (o(), i("div", D, [
|
|
94
94
|
m(f, {
|
|
95
95
|
"data-test": "select-status|value-icon",
|
|
96
96
|
name: s.icon || "circle-status",
|
|
@@ -100,11 +100,11 @@ const j = { class: "tw-mr-6 tw-truncate" }, E = {
|
|
|
100
100
|
]),
|
|
101
101
|
style: p({ color: s.hexCode })
|
|
102
102
|
}, null, 8, ["name", "class", "style"]),
|
|
103
|
-
a("span",
|
|
103
|
+
a("span", I, c(s[e.displayBy]), 1)
|
|
104
104
|
]))
|
|
105
105
|
]),
|
|
106
106
|
option: d(({ option: s }) => [
|
|
107
|
-
a("div",
|
|
107
|
+
a("div", L, [
|
|
108
108
|
m(f, {
|
|
109
109
|
"data-test": "svg|status-color",
|
|
110
110
|
name: s.icon || "circle-status",
|
|
@@ -123,13 +123,13 @@ const j = { class: "tw-mr-6 tw-truncate" }, E = {
|
|
|
123
123
|
_: 1
|
|
124
124
|
}, 8, ["class", "disabled", "icon", "options", "placeholder", "track-by", "model-value"]));
|
|
125
125
|
}
|
|
126
|
-
}),
|
|
127
|
-
select:
|
|
128
|
-
"stash-select__chips": "_stash-
|
|
129
|
-
},
|
|
130
|
-
$style:
|
|
131
|
-
},
|
|
126
|
+
}), T = "_select_1gtqy_27", q = {
|
|
127
|
+
select: T,
|
|
128
|
+
"stash-select__chips": "_stash-select__chips_1gtqy_32"
|
|
129
|
+
}, z = {
|
|
130
|
+
$style: q
|
|
131
|
+
}, pt = /* @__PURE__ */ E(M, [["__cssModules", z]]);
|
|
132
132
|
export {
|
|
133
|
-
|
|
133
|
+
pt as default
|
|
134
134
|
};
|
|
135
135
|
//# sourceMappingURL=SelectStatus.js.map
|
package/dist/SelectStatus.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectStatus.js","sources":["../src/components/SelectStatus/SelectStatus.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, useAttrs, useCssModule } from 'vue';\n\n import { StashCommonColor, StashPrimaryColorGroup } from '../../../types';\n import { IconName } from '../Icon/Icon.types';\n import Icon from '../Icon/Icon.vue';\n import Select from '../Select/Select.vue';\n\n defineOptions({\n name: 'll-select-status',\n });\n\n export type SelectStatusOption = {\n id: number | string;\n name: string;\n color?: StashPrimaryColorGroup | StashCommonColor; // todo: just `StashPrimaryColor`?.\n icon?: IconName;\n };\n\n export interface SelectStatusProps {\n /**\n * Disables the component, if true\n */\n disabled?: boolean;\n /**\n * Which key of the prop option to use for display\n */\n displayBy?: string;\n /**\n * Sets the background color of the component to the color of the selected option\n */\n secondary?: boolean;\n /**\n * Allows option text to wrap to next line when set to true\n */\n noTruncate?: boolean;\n /**\n * Placeholder text\n */\n placeholder?: string;\n /**\n * The list of all options to select the status from\n * each object must have the following structure: { id: number | string, name: string, color?: string }\n */\n statusOptions: Array<SelectStatusOption>;\n /**\n * Default field to track the selected status by\n */\n trackBy?: string;\n /**\n * Sets the currently-selected option for the component\n */\n modelValue: number | string | boolean;\n /**\n * @deprecated Use `:model-value` or `v-model` instead of `:value`.\n */\n value?: number | string | boolean | null;\n }\n\n /**\n * Array containing the available dark fill colors that need a different text color.\n */\n const DARK_FILL_COLORS = ['green', 'teal', 'ice', 'yellow', 'seafoam', 'seafoam-700'];\n\n const attrs = useAttrs();\n const classes = useCssModule();\n\n const props = withDefaults(defineProps<SelectStatusProps>(), {\n disabled: false,\n displayBy: 'name',\n secondary: false,\n noTruncate: false,\n placeholder: 'Select Status',\n trackBy: 'id',\n value: null,\n });\n\n if (props.value) {\n throw new Error('ll-select-status: use :model-value or v-model instead of :value.');\n }\n\n if (attrs.onInput) {\n throw new Error('ll-select-status: use the @update:model-value event instead of @input');\n }\n\n const emit
|
|
1
|
+
{"version":3,"file":"SelectStatus.js","sources":["../src/components/SelectStatus/SelectStatus.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, useAttrs, useCssModule } from 'vue';\n\n import { StashCommonColor, StashPrimaryColorGroup } from '../../../types';\n import { IconName } from '../Icon/Icon.types';\n import Icon from '../Icon/Icon.vue';\n import Select from '../Select/Select.vue';\n\n defineOptions({\n name: 'll-select-status',\n });\n\n export type SelectStatusOption = {\n id: number | string;\n name: string;\n color?: StashPrimaryColorGroup | StashCommonColor; // todo: just `StashPrimaryColor`?.\n icon?: IconName;\n };\n\n export interface SelectStatusProps {\n /**\n * Disables the component, if true\n */\n disabled?: boolean;\n /**\n * Which key of the prop option to use for display\n */\n displayBy?: string;\n /**\n * Sets the background color of the component to the color of the selected option\n */\n secondary?: boolean;\n /**\n * Allows option text to wrap to next line when set to true\n */\n noTruncate?: boolean;\n /**\n * Placeholder text\n */\n placeholder?: string;\n /**\n * The list of all options to select the status from\n * each object must have the following structure: { id: number | string, name: string, color?: string }\n */\n statusOptions: Array<SelectStatusOption>;\n /**\n * Default field to track the selected status by\n */\n trackBy?: string;\n /**\n * Sets the currently-selected option for the component\n */\n modelValue: number | string | boolean;\n /**\n * @deprecated Use `:model-value` or `v-model` instead of `:value`.\n */\n value?: number | string | boolean | null;\n }\n\n /**\n * Array containing the available dark fill colors that need a different text color.\n */\n const DARK_FILL_COLORS = ['green', 'teal', 'ice', 'yellow', 'seafoam', 'seafoam-700'];\n\n const attrs = useAttrs();\n const classes = useCssModule();\n\n const props = withDefaults(defineProps<SelectStatusProps>(), {\n disabled: false,\n displayBy: 'name',\n secondary: false,\n noTruncate: false,\n placeholder: 'Select Status',\n trackBy: 'id',\n value: null,\n });\n\n if (props.value) {\n throw new Error('ll-select-status: use :model-value or v-model instead of :value.');\n }\n\n if (attrs.onInput) {\n throw new Error('ll-select-status: use the @update:model-value event instead of @input');\n }\n\n const emit = defineEmits<{\n /**\n * Emitted when the model value changes\n */\n (e: 'update:model-value', value: unknown): void;\n }>();\n\n const valueOption = computed(() => {\n return props.statusOptions.find((status) => status[props.trackBy] === props.modelValue);\n });\n\n const hasDarkFill = computed(() => {\n const { color = '' } = valueOption.value || {};\n return DARK_FILL_COLORS.includes(color);\n });\n\n /**\n * @param {string} color Valid color name\n * @return {string} tailwind class for given color\n */\n function getBgColor(color: SelectStatusOption['color']): string {\n // if there's no hyphen then it's a color name and has no shade, so we default to 500\n return color?.includes('-') ? `tw-bg-${color}` : `tw-bg-${color}-500`;\n }\n\n /**\n * @param {string} color Valid color name\n * @return {string} tailwind class for given color\n */\n function getTextColor(color: SelectStatusOption['color']): string {\n // if there's no hyphen then it's a color name and has no shade, so we default to 500\n return color?.includes('-') ? `tw-text-${color}` : `tw-text-${color}-500`;\n }\n\n function onSelect(value?: SelectStatusOption): void {\n emit('update:model-value', value?.[props.trackBy] ?? '');\n }\n</script>\n\n<template>\n <Select\n ref=\"select\"\n hide-search\n single\n :class=\"[\n classes.select,\n {\n 'stash-select-status--filled': props.secondary,\n 'stash-select-status--filled-dark': props.secondary && hasDarkFill,\n },\n ]\"\n :disabled=\"props.disabled\"\n :icon=\"!props.disabled && 'caret-down'\"\n :options=\"props.statusOptions\"\n :placeholder=\"props.placeholder\"\n :track-by=\"props.trackBy\"\n :model-value=\"valueOption\"\n data-test=\"stash-select-status\"\n class=\"stash-select-status\"\n @update:model-value=\"onSelect\"\n >\n <template #selected=\"{ option }\">\n <div\n v-if=\"props.secondary\"\n class=\"stash-select-status--selected tw-absolute tw-inset-0 tw-flex tw-h-full tw-w-full tw-items-center tw-rounded tw-pl-3\"\n data-test=\"select-status|value\"\n :class=\"[getBgColor(option.color)]\"\n >\n <span class=\"tw-mr-6 tw-truncate\">{{ option[props.displayBy] }}</span>\n </div>\n\n <div v-else class=\"tw-flex tw-items-center\" data-test=\"select-status|value\">\n <Icon\n data-test=\"select-status|value-icon\"\n :name=\"option.icon || 'circle-status'\"\n :class=\"[\n { [getTextColor(option.color)]: option.color },\n { 'tw-text-ice-700': !option.color && !option.hexCode },\n ]\"\n :style=\"{ color: option.hexCode }\"\n />\n <span class=\"tw-ml-1.5 tw-mr-6 tw-truncate\">{{ option[props.displayBy] }}</span>\n </div>\n </template>\n\n <template #option=\"{ option }\">\n <div class=\"tw-flex tw-min-w-0\">\n <Icon\n data-test=\"svg|status-color\"\n :name=\"option.icon || 'circle-status'\"\n :class=\"[\n { [getTextColor(option.color)]: option.color },\n { 'tw-text-ice-700': !option.color && !option.hexCode },\n ]\"\n class=\"!tw-shrink-0\"\n :style=\"{ color: option.hexCode }\"\n />\n <span data-test=\"span|option-text\" class=\"tw-ml-1.5\" :class=\"!props.noTruncate && 'tw-truncate'\">\n {{ option[props.displayBy] }}\n </span>\n </div>\n </template>\n </Select>\n</template>\n\n<style module>\n :global(.stash-select-status--filled .stash-select__content) {\n border: none;\n padding: 0;\n }\n\n :global(\n .stash-select-status--filled\n .stash-select--active\n .stash-select__content:focus-within\n .stash-select__border-selector\n ) {\n box-sizing: content-box;\n max-width: calc(100% - 2px);\n }\n\n :global(.stash-select-status--filled .stash-select-status--selected),\n :global(.stash-select-status--filled :has(.stash-select-status--selected) .icon--caret-down) {\n color: theme('colors.white');\n }\n\n :global(.stash-select-status--filled-dark .stash-select-status--selected),\n :global(.stash-select-status--filled-dark :has(.stash-select-status--selected) .icon--caret-down) {\n color: var(--color-ice-900);\n }\n\n .select :global(.stash-select--disabled > .stash-select__content) {\n background-color: transparent;\n border-color: transparent;\n }\n\n .select :deep(.stash-select__chips) {\n margin: 0;\n }\n\n .select :global(.stash-select__options) {\n margin: 0;\n padding: 0;\n }\n\n .select ul {\n position: relative;\n }\n</style>\n"],"names":["DARK_FILL_COLORS","attrs","useAttrs","classes","useCssModule","props","__props","emit","__emit","valueOption","computed","status","hasDarkFill","color","getBgColor","getTextColor","onSelect","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DE,UAAMA,IAAmB,CAAC,SAAS,QAAQ,OAAO,UAAU,WAAW,aAAa,GAE9EC,IAAQC,KACRC,IAAUC,KAEVC,IAAQC;AAUd,QAAID,EAAM;AACF,YAAA,IAAI,MAAM,kEAAkE;AAGpF,QAAIJ,EAAM;AACF,YAAA,IAAI,MAAM,uEAAuE;AAGzF,UAAMM,IAAOC,GAOPC,IAAcC,EAAS,MACpBL,EAAM,cAAc,KAAK,CAACM,MAAWA,EAAON,EAAM,OAAO,MAAMA,EAAM,UAAU,CACvF,GAEKO,IAAcF,EAAS,MAAM;AACjC,YAAM,EAAE,OAAAG,IAAQ,GAAA,IAAOJ,EAAY,SAAS,CAAA;AACrC,aAAAT,EAAiB,SAASa,CAAK;AAAA,IAAA,CACvC;AAMD,aAASC,EAAWD,GAA4C;AAE9D,aAAOA,KAAA,QAAAA,EAAO,SAAS,OAAO,SAASA,MAAU,SAASA;AAAA,IAC5D;AAMA,aAASE,EAAaF,GAA4C;AAEhE,aAAOA,KAAA,QAAAA,EAAO,SAAS,OAAO,WAAWA,MAAU,WAAWA;AAAA,IAChE;AAEA,aAASG,EAASC,GAAkC;AAClD,MAAAV,EAAK,uBAAsBU,KAAA,gBAAAA,EAAQZ,EAAM,aAAY,EAAE;AAAA,IACzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -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,7 +26,7 @@ declare type __VLS_WithDefaults<P, D> = {
|
|
|
27
26
|
}> : P[K];
|
|
28
27
|
};
|
|
29
28
|
|
|
30
|
-
declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SelectStatusProps>, {
|
|
29
|
+
declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SelectStatusProps>, {
|
|
31
30
|
disabled: boolean;
|
|
32
31
|
displayBy: string;
|
|
33
32
|
secondary: boolean;
|
|
@@ -35,9 +34,9 @@ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRunt
|
|
|
35
34
|
placeholder: string;
|
|
36
35
|
trackBy: string;
|
|
37
36
|
value: null;
|
|
38
|
-
}
|
|
37
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
39
38
|
"update:model-value": (value: unknown) => void;
|
|
40
|
-
}, string,
|
|
39
|
+
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SelectStatusProps>, {
|
|
41
40
|
disabled: boolean;
|
|
42
41
|
displayBy: string;
|
|
43
42
|
secondary: boolean;
|
|
@@ -45,20 +44,20 @@ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRunt
|
|
|
45
44
|
placeholder: string;
|
|
46
45
|
trackBy: string;
|
|
47
46
|
value: null;
|
|
48
|
-
}>>> & {
|
|
47
|
+
}>>> & Readonly<{
|
|
49
48
|
"onUpdate:model-value"?: ((value: unknown) => any) | undefined;
|
|
50
|
-
}
|
|
51
|
-
secondary: boolean;
|
|
49
|
+
}>, {
|
|
52
50
|
disabled: boolean;
|
|
53
|
-
|
|
54
|
-
value: string | number | boolean | null;
|
|
51
|
+
secondary: boolean;
|
|
55
52
|
trackBy: string;
|
|
53
|
+
placeholder: string;
|
|
56
54
|
displayBy: string;
|
|
55
|
+
value: string | number | boolean | null;
|
|
57
56
|
noTruncate: boolean;
|
|
58
|
-
}, {}>;
|
|
57
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
59
58
|
export default _default;
|
|
60
59
|
|
|
61
|
-
declare type IconName = typeof iconNames[number];
|
|
60
|
+
declare type IconName = (typeof iconNames)[number];
|
|
62
61
|
|
|
63
62
|
declare const iconNames: readonly ["action-dots", "activity", "alert-bell", "archive", "arrow-down", "arrow-left", "arrow-right", "arrow-up", "badge-discount", "badge-seller-elite", "badge-seller-power", "badge-seller-verified", "book-customer", "building-office", "bulk-add", "calendar-reschedule", "calendar", "caret-down", "caret-up", "change-log", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "circle-check", "circle-close", "circle-dollar", "circle-info", "circle-partial", "circle-percent", "circle-question-mark", "circle-status", "circle-warning", "clipboard-checkmark", "clipboard-inventory", "close", "combine", "compass", "contact", "contract", "copy", "credit-card", "credit-profile", "dashboard", "document-accept", "document-invoice", "document-recieved", "document-sent", "document-view", "document", "dolly", "download", "edit", "ellipsis", "envelope-open", "envelope", "equals", "export", "figma", "file-csv", "file", "filter-funnel", "filter-line", "flag", "folder", "folder-bar-graph", "folder-orders", "font-bold", "font-clear-format", "font-italic", "font-underline", "gear", "github", "globe", "graph-bar-chart", "graph-line-chart", "graph-pie-chart", "hazard", "hazard-outline", "headset-agent", "headset-mic", "heart-filled", "heart-outline", "help-question-mark", "hide", "history", "image", "keyboard-return", "license-approved", "license-certificate", "lightbulb", "link-add", "link-unlink", "link", "list-bulleted", "list-items", "list-numbered", "loading-big", "loading-empty", "loading-small", "location", "lock-unlock", "lock", "logo-facebook", "logo-instagram", "logo-linkedin", "logo-ll", "logo-metrc", "logo-plaid", "logo-x", "logo-youtube", "logout", "medical", "megaphone-sound", "megaphone", "menu", "message-dispute", "message-reply", "message", "minus", "mj-leaf", "money", "note-add", "note", "open-in-new", "paperclip", "paper-plane", "performance", "phone", "plus", "preview", "print", "product-menu-manage", "product-menu-search", "product-menu", "queue-add", "queue", "recent", "refresh", "register", "reply", "report-download", "sample", "save", "scale-law", "scale-weight", "search", "seed-cycle", "share", "shop-bag-browse", "shop-bag-reorder", "shop-bag", "shop-basket", "shop-cart-add", "shop-cart", "show", "sign-dollar", "sign-percent", "sort", "split", "star-filled", "star-outline", "storefront", "submit", "swap-horizontal", "swap-vertical", "tag-star", "tag", "test-results", "ticket-star", "ticket", "tool-dropper", "tool-wrench", "transfer", "trashcan", "truck", "upload", "user-add", "user-admin", "user-check", "user", "view-card", "view-detailed", "view-list", "warehouse", "working"];
|
|
64
63
|
|
package/dist/Skeleton.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.js","sources":["../src/components/Skeleton/Skeleton.vue"],"sourcesContent":["<script lang=\"ts\">\n export enum SkeletonVariants {\n Text = 'text',\n Circular = 'circular',\n Rectangular = 'rectangular',\n }\n\n export type SkeletonVariant = `${SkeletonVariants}`;\n</script>\n\n<script setup lang=\"ts\">\n import { computed, useCssModule, useSlots } from 'vue';\n\n export interface SkeletonProps {\n /** Pass a pixel value for circular and rectangular variants */\n height?: string | number;\n\n /** Either text, circular, or rectangular */\n variant?: SkeletonVariant;\n\n /** Pass a pixel value for any variant */\n width?: string | number;\n }\n\n const props = withDefaults(defineProps<SkeletonProps>(), {\n height: undefined,\n variant: SkeletonVariants.Text,\n width: undefined,\n });\n\n const slots = useSlots();\n const classes = useCssModule();\n\n const hasChildren = computed(() => !!slots['default']);\n\n const computedStyles = computed(() => {\n const styles: {\n width?: string;\n height?: string;\n } = {};\n\n if (props.width) {\n styles.width = `${props.width}px`;\n }\n\n // If the variant is text, let the font-size define the height\n if (props.height && props.variant !== SkeletonVariants.Text) {\n styles.height = `${props.height}px`;\n }\n\n return styles;\n });\n</script>\n\n<template>\n <div\n data-test=\"stash-skeleton\"\n class=\"stash-skeleton tw-animate-pulse tw-bg-ice-500\"\n :class=\"{\n 'stash-skeleton--circular tw-rounded-full': props.variant === SkeletonVariants.Circular,\n 'stash-skeleton--text tw-rounded': props.variant === SkeletonVariants.Text,\n [classes['text-variant']]: props.variant === SkeletonVariants.Text,\n 'stash-skeleton--rectangular tw-rounded': props.variant === SkeletonVariants.Rectangular,\n [classes['has-children']]: hasChildren,\n 'tw-max-w-fit': hasChildren && !props.width,\n 'tw-h-auto': hasChildren && !props.height,\n }\"\n :style=\"computedStyles\"\n >\n <!-- @slot Default slot for style inheritance -->\n <slot></slot>\n </div>\n</template>\n\n<style module>\n .text-variant::before {\n content: '\\00a0';\n }\n\n .has-children > * {\n visibility: hidden;\n }\n</style>\n"],"names":["SkeletonVariants","slots","useSlots","classes","useCssModule","hasChildren","computed","computedStyles","styles"
|
|
1
|
+
{"version":3,"file":"Skeleton.js","sources":["../src/components/Skeleton/Skeleton.vue"],"sourcesContent":["<script lang=\"ts\">\n export enum SkeletonVariants {\n Text = 'text',\n Circular = 'circular',\n Rectangular = 'rectangular',\n }\n\n export type SkeletonVariant = `${SkeletonVariants}`;\n</script>\n\n<script setup lang=\"ts\">\n import { computed, useCssModule, useSlots } from 'vue';\n\n export interface SkeletonProps {\n /** Pass a pixel value for circular and rectangular variants */\n height?: string | number;\n\n /** Either text, circular, or rectangular */\n variant?: SkeletonVariant;\n\n /** Pass a pixel value for any variant */\n width?: string | number;\n }\n\n const props = withDefaults(defineProps<SkeletonProps>(), {\n height: undefined,\n variant: SkeletonVariants.Text,\n width: undefined,\n });\n\n const slots = useSlots();\n const classes = useCssModule();\n\n const hasChildren = computed(() => !!slots['default']);\n\n const computedStyles = computed(() => {\n const styles: {\n width?: string;\n height?: string;\n } = {};\n\n if (props.width) {\n styles.width = `${props.width}px`;\n }\n\n // If the variant is text, let the font-size define the height\n if (props.height && props.variant !== SkeletonVariants.Text) {\n styles.height = `${props.height}px`;\n }\n\n return styles;\n });\n</script>\n\n<template>\n <div\n data-test=\"stash-skeleton\"\n class=\"stash-skeleton tw-animate-pulse tw-bg-ice-500\"\n :class=\"{\n 'stash-skeleton--circular tw-rounded-full': props.variant === SkeletonVariants.Circular,\n 'stash-skeleton--text tw-rounded': props.variant === SkeletonVariants.Text,\n [classes['text-variant']]: props.variant === SkeletonVariants.Text,\n 'stash-skeleton--rectangular tw-rounded': props.variant === SkeletonVariants.Rectangular,\n [classes['has-children']]: hasChildren,\n 'tw-max-w-fit': hasChildren && !props.width,\n 'tw-h-auto': hasChildren && !props.height,\n }\"\n :style=\"computedStyles\"\n >\n <!-- @slot Default slot for style inheritance -->\n <slot></slot>\n </div>\n</template>\n\n<style module>\n .text-variant::before {\n content: '\\00a0';\n }\n\n .has-children > * {\n visibility: hidden;\n }\n</style>\n"],"names":["SkeletonVariants","props","__props","slots","useSlots","classes","useCssModule","hasChildren","computed","computedStyles","styles"],"mappings":";;AACc,IAAAA,sBAAAA,OACVA,EAAA,OAAO,QACPA,EAAA,WAAW,YACXA,EAAA,cAAc,eAHJA,IAAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;AAuBZ,UAAMC,IAAQC,GAMRC,IAAQC,KACRC,IAAUC,KAEVC,IAAcC,EAAS,MAAM,CAAC,CAACL,EAAM,OAAU,GAE/CM,IAAiBD,EAAS,MAAM;AACpC,YAAME,IAGF,CAAA;AAEJ,aAAIT,EAAM,UACDS,EAAA,QAAQ,GAAGT,EAAM,YAItBA,EAAM,UAAUA,EAAM,YAAY,WAC7BS,EAAA,SAAS,GAAGT,EAAM,aAGpBS;AAAA,IAAA,CACR;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/Skeleton.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,19 +32,19 @@ declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
33
32
|
};
|
|
34
33
|
};
|
|
35
34
|
|
|
36
|
-
declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SkeletonProps>, {
|
|
35
|
+
declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SkeletonProps>, {
|
|
37
36
|
height: undefined;
|
|
38
37
|
variant: SkeletonVariants;
|
|
39
38
|
width: undefined;
|
|
40
|
-
}
|
|
39
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SkeletonProps>, {
|
|
41
40
|
height: undefined;
|
|
42
41
|
variant: SkeletonVariants;
|
|
43
42
|
width: undefined;
|
|
44
|
-
}
|
|
45
|
-
height: string | number;
|
|
43
|
+
}>>> & Readonly<{}>, {
|
|
46
44
|
width: string | number;
|
|
45
|
+
height: string | number;
|
|
47
46
|
variant: "text" | "circular" | "rectangular";
|
|
48
|
-
}, {}>, {
|
|
47
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
|
|
49
48
|
default?(_: {}): any;
|
|
50
49
|
}>;
|
|
51
50
|
export default _default;
|
package/dist/Step.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Step.js","sources":["../src/components/Step/Step.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, inject, onBeforeMount, useCssModule, useSlots } from 'vue';\n\n import { t } from '../../locale';\n import Icon from '../Icon/Icon.vue';\n import { STEPPER_INJECTION_KEY } from '../Stepper/keys';\n\n export interface StepProps {\n /**\n * Indicates if the step is currently active.\n * This takes precedence over `completed` and `error`\n */\n active?: boolean;\n /**\n * Indicates if the step is completed\n */\n completed?: boolean;\n /**\n * Indicates if the step has an error\n * This takes precedence over `completed`\n */\n error?: boolean;\n /**\n * The text to display in the step.\n */\n text: string;\n /**\n * Indicates if the step is nested\n */\n nested?: boolean;\n /**\n * The text to display in the step circle\n */\n step?: string;\n /**\n * Indicates if the step is disabled\n */\n disabled?: boolean;\n /**\n * Indicates if the step is in a loading state\n */\n loading?: boolean;\n }\n\n const props = withDefaults(defineProps<StepProps>(), {\n active: false,\n completed: false,\n error: false,\n nested: false,\n step: undefined,\n disabled: false,\n loading: false,\n });\n\n const slots = useSlots();\n const classes = useCssModule();\n\n const injectedStepper = inject(STEPPER_INJECTION_KEY);\n\n const isHorizontal = computed(() => injectedStepper?.orientation === 'horizontal');\n\n const isLightThemed = computed(() => injectedStepper?.theme === 'light');\n\n const showResponsiveNav = injectedStepper?.showResponsiveNav;\n\n const iconName = computed(() => {\n if (props.loading) {\n return 'working';\n }\n return props.completed ? 'circle-check' : 'circle-info';\n });\n\n const currentStepText = computed(() =>\n t('ll.stepper.currentStep', { num: props.step, total: String(injectedStepper?.stepCount.value) }),\n );\n\n // OnBeforeMount ensures that steps and substeps are registered in the correct order\n onBeforeMount(() => {\n if (injectedStepper) {\n injectedStepper.registerStep(props.nested);\n }\n });\n</script>\n\n<template>\n <li\n class=\"stash-step tw-relative tw-flex tw-w-full\"\n data-test=\"stash-step\"\n :class=\"[\n classes.step,\n {\n [classes['nested-step--active']]: props.nested && props.active,\n 'last:tw-w-auto': isHorizontal && !showResponsiveNav,\n [classes['stash-step--singular']]: showResponsiveNav,\n 'tw-relative tw-w-full tw-shrink-0 tw-snap-start tw-flex-col tw-justify-center': showResponsiveNav,\n },\n ]\"\n >\n <div\n v-if=\"!props.nested\"\n class=\"stash-step__indicator tw-flex tw-flex-col tw-items-center\"\n :class=\"{ 'tw-mr-3': !showResponsiveNav }\"\n data-test=\"stash-step|indicator\"\n >\n <div\n :class=\"[\n classes.circle,\n {\n [classes['circle--todo']]: !props.error && !props.active && !props.completed,\n [classes['circle--error']]: props.error && !props.active,\n [classes['circle--completed']]: props.completed && !props.active,\n [classes['circle--active']]: props.active,\n [classes['circle--loading']]: props.loading,\n },\n ]\"\n >\n <Icon\n v-if=\"(props.completed || props.error || props.loading) && !props.active\"\n :name=\"iconName\"\n :class=\"{ 'fx-spin': props.loading }\"\n size=\"dense\"\n />\n <span v-else>{{ props.step }}</span>\n </div>\n <div\n class=\"tw-my-1.5 tw-w-px tw-bg-ice-500\"\n :class=\"[\n classes.line,\n { [classes['line--expanded']]: props.completed || props.active, 'tw-hidden': isHorizontal },\n ]\"\n />\n </div>\n <!-- step title, line(s), and nested steps -->\n <div\n class=\"tw-flex\"\n :class=\"[\n {\n 'tw-w-full tw-flex-row tw-items-center': isHorizontal,\n 'tw-mt-1.5 tw-justify-center': showResponsiveNav,\n 'tw-flex-col': !isHorizontal || showResponsiveNav,\n },\n ]\"\n >\n <div\n class=\"stash-step__title tw-whitespace-nowrap\"\n data-test=\"stash-step|title\"\n :class=\"[\n classes.title,\n {\n 'tw-cursor-pointer': !props.active && (props.completed || props.error),\n 'tw-cursor-not-allowed': props.disabled,\n 'tw-text-ice-900': isLightThemed,\n '!tw-font-semibold': props.active,\n 'tw-text-white': !props.disabled && !isLightThemed,\n 'tw-place-self-center': showResponsiveNav,\n },\n ]\"\n >\n {{ props.text }}\n <p\n v-if=\"showResponsiveNav\"\n class=\"stash-step__pagination-label tw-mb-0 tw-whitespace-nowrap tw-text-center tw-text-xs\"\n data-test=\"stash-step|pagination-label\"\n :class=\"isLightThemed ? 'tw-text-ice-700' : 'tw-text-white'\"\n >\n {{ currentStepText }}\n </p>\n </div>\n <div\n v-if=\"isHorizontal\"\n :class=\"[\n classes.line,\n {\n [classes['line--expanded']]: props.completed || props.active,\n 'tw-mx-1.5 tw-border-t group-last:tw-hidden': !showResponsiveNav,\n },\n ]\"\n />\n <div\n class=\"stash-step--nested-steps\"\n :class=\"{ 'tw-pb-9': !nested && !slots.default, 'tw-hidden': isHorizontal }\"\n >\n <ul :class=\"[classes.nested, { 'tw-hidden': !slots.default }]\">\n <!-- @slot Default slot to compose multiple nested steps -->\n <slot></slot>\n </ul>\n </div>\n </div>\n </li>\n</template>\n\n<style module>\n .step::before {\n content: '●';\n position: absolute;\n color: theme('colors.white');\n left: -28px;\n opacity: 0;\n transition: opacity 500ms cubic-bezier(0.85, 0, 0.15, 1);\n }\n\n .title {\n font-weight: theme('fontWeight.medium');\n font-size: 1rem;\n margin-top: 1px;\n user-select: none;\n }\n\n .nested-step--active::before {\n opacity: 1;\n }\n\n .line {\n flex-grow: 0;\n transition: flex-grow 500ms cubic-bezier(0.87, 0, 0.13, 1);\n }\n\n .line--expanded {\n flex-grow: 1;\n }\n\n .stash-step--singular .line {\n @apply tw-absolute\n tw-inset-x-0\n tw-top-3\n tw-h-px\n tw-border-t-0\n before:tw-absolute\n before:tw-left-0\n before:tw-right-2/4\n before:tw-mr-16\n before:tw-block\n before:tw-h-px\n before:tw-bg-ice-500\n after:tw-absolute\n after:tw-left-2/4\n after:tw-right-0\n after:tw-ml-16\n after:tw-block\n after:tw-h-px\n after:tw-bg-ice-500;\n }\n\n .stash-step--singular .line::after,\n .stash-step--singular .line::before {\n content: '';\n }\n\n .step:not(.stash-step--singular):last-child .line {\n display: none;\n }\n\n .circle {\n width: theme('spacing.6');\n height: theme('spacing.6');\n line-height: theme('spacing.6');\n border-radius: theme('borderRadius.full');\n display: grid;\n place-items: center;\n font-weight: theme('fontWeight.medium');\n transition: background-color 500ms, color 500ms;\n }\n\n .circle--todo {\n background-color: rgb(255 255 255 / 50%);\n color: #4d4a69;\n border: 1px solid #747293;\n }\n\n .circle--active {\n background-color: var(--color-blue-500);\n color: theme('colors.white');\n border: 1px solid transparent;\n }\n\n .circle--loading {\n background-color: theme('colors.white');\n border: 1px solid var(--color-ice-500);\n color: var(--color-ice-700);\n cursor: pointer;\n }\n\n .circle--completed {\n background-color: theme('colors.white');\n border: 1px solid var(--color-ice-500);\n color: var(--color-green-500);\n cursor: pointer;\n }\n\n .circle--error {\n background-color: theme('colors.white');\n border: 1px solid var(--color-ice-500);\n color: var(--color-red-500);\n cursor: pointer;\n }\n\n .nested {\n padding: calc(theme('spacing.3') + theme('spacing[1.5]')) 0;\n }\n\n .nested li + li {\n margin-top: theme('spacing.3');\n }\n\n .nested .title {\n font-weight: theme('fontWeight.normal');\n font-size: 0.9rem;\n }\n</style>\n"],"names":["slots","useSlots","classes","useCssModule","injectedStepper","inject","STEPPER_INJECTION_KEY","isHorizontal","computed","isLightThemed","showResponsiveNav","iconName","
|
|
1
|
+
{"version":3,"file":"Step.js","sources":["../src/components/Step/Step.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, inject, onBeforeMount, useCssModule, useSlots } from 'vue';\n\n import { t } from '../../locale';\n import Icon from '../Icon/Icon.vue';\n import { STEPPER_INJECTION_KEY } from '../Stepper/keys';\n\n export interface StepProps {\n /**\n * Indicates if the step is currently active.\n * This takes precedence over `completed` and `error`\n */\n active?: boolean;\n /**\n * Indicates if the step is completed\n */\n completed?: boolean;\n /**\n * Indicates if the step has an error\n * This takes precedence over `completed`\n */\n error?: boolean;\n /**\n * The text to display in the step.\n */\n text: string;\n /**\n * Indicates if the step is nested\n */\n nested?: boolean;\n /**\n * The text to display in the step circle\n */\n step?: string;\n /**\n * Indicates if the step is disabled\n */\n disabled?: boolean;\n /**\n * Indicates if the step is in a loading state\n */\n loading?: boolean;\n }\n\n const props = withDefaults(defineProps<StepProps>(), {\n active: false,\n completed: false,\n error: false,\n nested: false,\n step: undefined,\n disabled: false,\n loading: false,\n });\n\n const slots = useSlots();\n const classes = useCssModule();\n\n const injectedStepper = inject(STEPPER_INJECTION_KEY);\n\n const isHorizontal = computed(() => injectedStepper?.orientation === 'horizontal');\n\n const isLightThemed = computed(() => injectedStepper?.theme === 'light');\n\n const showResponsiveNav = injectedStepper?.showResponsiveNav;\n\n const iconName = computed(() => {\n if (props.loading) {\n return 'working';\n }\n return props.completed ? 'circle-check' : 'circle-info';\n });\n\n const currentStepText = computed(() =>\n t('ll.stepper.currentStep', { num: props.step, total: String(injectedStepper?.stepCount.value) }),\n );\n\n // OnBeforeMount ensures that steps and substeps are registered in the correct order\n onBeforeMount(() => {\n if (injectedStepper) {\n injectedStepper.registerStep(props.nested);\n }\n });\n</script>\n\n<template>\n <li\n class=\"stash-step tw-relative tw-flex tw-w-full\"\n data-test=\"stash-step\"\n :class=\"[\n classes.step,\n {\n [classes['nested-step--active']]: props.nested && props.active,\n 'last:tw-w-auto': isHorizontal && !showResponsiveNav,\n [classes['stash-step--singular']]: showResponsiveNav,\n 'tw-relative tw-w-full tw-shrink-0 tw-snap-start tw-flex-col tw-justify-center': showResponsiveNav,\n },\n ]\"\n >\n <div\n v-if=\"!props.nested\"\n class=\"stash-step__indicator tw-flex tw-flex-col tw-items-center\"\n :class=\"{ 'tw-mr-3': !showResponsiveNav }\"\n data-test=\"stash-step|indicator\"\n >\n <div\n :class=\"[\n classes.circle,\n {\n [classes['circle--todo']]: !props.error && !props.active && !props.completed,\n [classes['circle--error']]: props.error && !props.active,\n [classes['circle--completed']]: props.completed && !props.active,\n [classes['circle--active']]: props.active,\n [classes['circle--loading']]: props.loading,\n },\n ]\"\n >\n <Icon\n v-if=\"(props.completed || props.error || props.loading) && !props.active\"\n :name=\"iconName\"\n :class=\"{ 'fx-spin': props.loading }\"\n size=\"dense\"\n />\n <span v-else>{{ props.step }}</span>\n </div>\n <div\n class=\"tw-my-1.5 tw-w-px tw-bg-ice-500\"\n :class=\"[\n classes.line,\n { [classes['line--expanded']]: props.completed || props.active, 'tw-hidden': isHorizontal },\n ]\"\n />\n </div>\n <!-- step title, line(s), and nested steps -->\n <div\n class=\"tw-flex\"\n :class=\"[\n {\n 'tw-w-full tw-flex-row tw-items-center': isHorizontal,\n 'tw-mt-1.5 tw-justify-center': showResponsiveNav,\n 'tw-flex-col': !isHorizontal || showResponsiveNav,\n },\n ]\"\n >\n <div\n class=\"stash-step__title tw-whitespace-nowrap\"\n data-test=\"stash-step|title\"\n :class=\"[\n classes.title,\n {\n 'tw-cursor-pointer': !props.active && (props.completed || props.error),\n 'tw-cursor-not-allowed': props.disabled,\n 'tw-text-ice-900': isLightThemed,\n '!tw-font-semibold': props.active,\n 'tw-text-white': !props.disabled && !isLightThemed,\n 'tw-place-self-center': showResponsiveNav,\n },\n ]\"\n >\n {{ props.text }}\n <p\n v-if=\"showResponsiveNav\"\n class=\"stash-step__pagination-label tw-mb-0 tw-whitespace-nowrap tw-text-center tw-text-xs\"\n data-test=\"stash-step|pagination-label\"\n :class=\"isLightThemed ? 'tw-text-ice-700' : 'tw-text-white'\"\n >\n {{ currentStepText }}\n </p>\n </div>\n <div\n v-if=\"isHorizontal\"\n :class=\"[\n classes.line,\n {\n [classes['line--expanded']]: props.completed || props.active,\n 'tw-mx-1.5 tw-border-t group-last:tw-hidden': !showResponsiveNav,\n },\n ]\"\n />\n <div\n class=\"stash-step--nested-steps\"\n :class=\"{ 'tw-pb-9': !nested && !slots.default, 'tw-hidden': isHorizontal }\"\n >\n <ul :class=\"[classes.nested, { 'tw-hidden': !slots.default }]\">\n <!-- @slot Default slot to compose multiple nested steps -->\n <slot></slot>\n </ul>\n </div>\n </div>\n </li>\n</template>\n\n<style module>\n .step::before {\n content: '●';\n position: absolute;\n color: theme('colors.white');\n left: -28px;\n opacity: 0;\n transition: opacity 500ms cubic-bezier(0.85, 0, 0.15, 1);\n }\n\n .title {\n font-weight: theme('fontWeight.medium');\n font-size: 1rem;\n margin-top: 1px;\n user-select: none;\n }\n\n .nested-step--active::before {\n opacity: 1;\n }\n\n .line {\n flex-grow: 0;\n transition: flex-grow 500ms cubic-bezier(0.87, 0, 0.13, 1);\n }\n\n .line--expanded {\n flex-grow: 1;\n }\n\n .stash-step--singular .line {\n @apply tw-absolute\n tw-inset-x-0\n tw-top-3\n tw-h-px\n tw-border-t-0\n before:tw-absolute\n before:tw-left-0\n before:tw-right-2/4\n before:tw-mr-16\n before:tw-block\n before:tw-h-px\n before:tw-bg-ice-500\n after:tw-absolute\n after:tw-left-2/4\n after:tw-right-0\n after:tw-ml-16\n after:tw-block\n after:tw-h-px\n after:tw-bg-ice-500;\n }\n\n .stash-step--singular .line::after,\n .stash-step--singular .line::before {\n content: '';\n }\n\n .step:not(.stash-step--singular):last-child .line {\n display: none;\n }\n\n .circle {\n width: theme('spacing.6');\n height: theme('spacing.6');\n line-height: theme('spacing.6');\n border-radius: theme('borderRadius.full');\n display: grid;\n place-items: center;\n font-weight: theme('fontWeight.medium');\n transition: background-color 500ms, color 500ms;\n }\n\n .circle--todo {\n background-color: rgb(255 255 255 / 50%);\n color: #4d4a69;\n border: 1px solid #747293;\n }\n\n .circle--active {\n background-color: var(--color-blue-500);\n color: theme('colors.white');\n border: 1px solid transparent;\n }\n\n .circle--loading {\n background-color: theme('colors.white');\n border: 1px solid var(--color-ice-500);\n color: var(--color-ice-700);\n cursor: pointer;\n }\n\n .circle--completed {\n background-color: theme('colors.white');\n border: 1px solid var(--color-ice-500);\n color: var(--color-green-500);\n cursor: pointer;\n }\n\n .circle--error {\n background-color: theme('colors.white');\n border: 1px solid var(--color-ice-500);\n color: var(--color-red-500);\n cursor: pointer;\n }\n\n .nested {\n padding: calc(theme('spacing.3') + theme('spacing[1.5]')) 0;\n }\n\n .nested li + li {\n margin-top: theme('spacing.3');\n }\n\n .nested .title {\n font-weight: theme('fontWeight.normal');\n font-size: 0.9rem;\n }\n</style>\n"],"names":["props","__props","slots","useSlots","classes","useCssModule","injectedStepper","inject","STEPPER_INJECTION_KEY","isHorizontal","computed","isLightThemed","showResponsiveNav","iconName","currentStepText","t","onBeforeMount"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA4CE,UAAMA,IAAQC,GAURC,IAAQC,KACRC,IAAUC,KAEVC,IAAkBC,EAAOC,CAAqB,GAE9CC,IAAeC,EAAS,OAAMJ,KAAA,gBAAAA,EAAiB,iBAAgB,YAAY,GAE3EK,IAAgBD,EAAS,OAAMJ,KAAA,gBAAAA,EAAiB,WAAU,OAAO,GAEjEM,IAAoBN,KAAA,gBAAAA,EAAiB,mBAErCO,IAAWH,EAAS,MACpBV,EAAM,UACD,YAEFA,EAAM,YAAY,iBAAiB,aAC3C,GAEKc,IAAkBJ;AAAA,MAAS,MAC/BK,EAAE,0BAA0B,EAAE,KAAKf,EAAM,MAAM,OAAO,OAAOM,KAAA,gBAAAA,EAAiB,UAAU,KAAK,GAAG;AAAA,IAAA;AAIlG,WAAAU,EAAc,MAAM;AAClB,MAAIV,KACcA,EAAA,aAAaN,EAAM,MAAM;AAAA,IAC3C,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/Step.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,7 +32,7 @@ declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
33
32
|
};
|
|
34
33
|
};
|
|
35
34
|
|
|
36
|
-
declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<StepProps>, {
|
|
35
|
+
declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<StepProps>, {
|
|
37
36
|
active: boolean;
|
|
38
37
|
completed: boolean;
|
|
39
38
|
error: boolean;
|
|
@@ -41,7 +40,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
|
|
|
41
40
|
step: undefined;
|
|
42
41
|
disabled: boolean;
|
|
43
42
|
loading: boolean;
|
|
44
|
-
}
|
|
43
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<StepProps>, {
|
|
45
44
|
active: boolean;
|
|
46
45
|
completed: boolean;
|
|
47
46
|
error: boolean;
|
|
@@ -49,15 +48,15 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
|
|
|
49
48
|
step: undefined;
|
|
50
49
|
disabled: boolean;
|
|
51
50
|
loading: boolean;
|
|
52
|
-
}
|
|
51
|
+
}>>> & Readonly<{}>, {
|
|
53
52
|
error: boolean;
|
|
54
53
|
disabled: boolean;
|
|
55
|
-
step: string;
|
|
56
54
|
loading: boolean;
|
|
57
55
|
active: boolean;
|
|
56
|
+
step: string;
|
|
58
57
|
nested: boolean;
|
|
59
58
|
completed: boolean;
|
|
60
|
-
}, {}>, {
|
|
59
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
|
|
61
60
|
default?(_: {}): any;
|
|
62
61
|
}>;
|
|
63
62
|
export default _default;
|
package/dist/Stepper.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as I, ref as g, computed as r, watch as o, watchEffect as y, provide as N, nextTick as E, openBlock as i, createElementBlock as z, createElementVNode as B, normalizeClass as p, renderSlot as R, createBlock as u, unref as d, withCtx as v, createVNode as m, createCommentVNode as f } from "vue";
|
|
2
|
+
import T from "./useMediaQuery.js";
|
|
3
|
+
import A from "./useStepper.js";
|
|
4
4
|
import h from "./Button.js";
|
|
5
5
|
import w from "./Icon.js";
|
|
6
|
-
import { S as
|
|
6
|
+
import { S as V } from "./keys-7ecef029.js";
|
|
7
7
|
import "./Button.vue_used_vue_type_style_index_0_lang.module-a9290468.js";
|
|
8
8
|
import "./_plugin-vue_export-helper-dad06003.js";
|
|
9
9
|
import "lodash-es/uniqueId";
|
|
10
10
|
import "./index-9e1095ef.js";
|
|
11
11
|
import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
|
12
|
-
const
|
|
12
|
+
const L = { class: "tw-relative" }, G = /* @__PURE__ */ I({
|
|
13
13
|
__name: "Stepper",
|
|
14
14
|
props: {
|
|
15
15
|
step: { default: -1 },
|
|
@@ -20,15 +20,15 @@ const V = { class: "tw-relative" }, F = /* @__PURE__ */ C({
|
|
|
20
20
|
theme: { default: "dark" }
|
|
21
21
|
},
|
|
22
22
|
emits: ["update:step", "update:substep"],
|
|
23
|
-
setup(x, { expose: _, emit:
|
|
24
|
-
const t = x, l =
|
|
23
|
+
setup(x, { expose: _, emit: S }) {
|
|
24
|
+
const t = x, n = S, l = g(), e = A({
|
|
25
25
|
linear: t.linear,
|
|
26
26
|
activeStep: t.step,
|
|
27
27
|
activeSubstep: t.substep,
|
|
28
28
|
ref: l
|
|
29
|
-
}),
|
|
30
|
-
() => t.orientation === "horizontal" && (!
|
|
31
|
-
),
|
|
29
|
+
}), b = T("screen and (min-width: 961px)"), a = r(
|
|
30
|
+
() => t.orientation === "horizontal" && (!b.value || t.useResponsiveNav)
|
|
31
|
+
), k = r(() => e.activeStepIndex.value <= 0), C = r(
|
|
32
32
|
() => !e.isStepCompleted(e.activeStepIndex.value) || e.activeStepIndex.value === e.steps.value.length - 1
|
|
33
33
|
);
|
|
34
34
|
o(
|
|
@@ -45,9 +45,9 @@ const V = { class: "tw-relative" }, F = /* @__PURE__ */ C({
|
|
|
45
45
|
), o(
|
|
46
46
|
() => e.activeSubstepIndex.value,
|
|
47
47
|
(s) => n("update:substep", s)
|
|
48
|
-
),
|
|
48
|
+
), y(() => {
|
|
49
49
|
a.value && c();
|
|
50
|
-
}),
|
|
50
|
+
}), N(V, {
|
|
51
51
|
registerStep: e.registerStep,
|
|
52
52
|
orientation: t.orientation,
|
|
53
53
|
stepCount: e.stepCount,
|
|
@@ -63,12 +63,12 @@ const V = { class: "tw-relative" }, F = /* @__PURE__ */ C({
|
|
|
63
63
|
async function c() {
|
|
64
64
|
if (!a.value)
|
|
65
65
|
return;
|
|
66
|
-
await
|
|
66
|
+
await E();
|
|
67
67
|
const s = e.activeStepElement.value;
|
|
68
68
|
s && s.scrollIntoView({ behavior: "instant", inline: "start", block: "nearest" });
|
|
69
69
|
}
|
|
70
|
-
return (s,
|
|
71
|
-
|
|
70
|
+
return (s, P) => (i(), z("div", L, [
|
|
71
|
+
B("ul", {
|
|
72
72
|
ref_key: "stepperListRef",
|
|
73
73
|
ref: l,
|
|
74
74
|
class: p(["stash-stepper tw-flex", {
|
|
@@ -79,13 +79,13 @@ const V = { class: "tw-relative" }, F = /* @__PURE__ */ C({
|
|
|
79
79
|
}]),
|
|
80
80
|
"data-test": "stash-stepper"
|
|
81
81
|
}, [
|
|
82
|
-
|
|
82
|
+
R(s.$slots, "default")
|
|
83
83
|
], 2),
|
|
84
84
|
a.value ? (i(), u(h, {
|
|
85
85
|
key: 0,
|
|
86
86
|
class: p(["stash-stepper__arrow stash-stepper__arrow--prev", t.theme === "light" ? "tw-text-blue-500" : "tw-text-white"]),
|
|
87
87
|
"data-test": "stash-stepper|prev-arrow",
|
|
88
|
-
disabled:
|
|
88
|
+
disabled: k.value,
|
|
89
89
|
icon: "",
|
|
90
90
|
onClick: d(e).back
|
|
91
91
|
}, {
|
|
@@ -101,7 +101,7 @@ const V = { class: "tw-relative" }, F = /* @__PURE__ */ C({
|
|
|
101
101
|
key: 1,
|
|
102
102
|
class: p(["stash-stepper__arrow stash-stepper__arrow--next", t.theme === "light" ? "tw-text-blue-500" : "tw-text-white"]),
|
|
103
103
|
"data-test": "stash-stepper|next-arrow",
|
|
104
|
-
disabled:
|
|
104
|
+
disabled: C.value,
|
|
105
105
|
icon: "",
|
|
106
106
|
onClick: d(e).next
|
|
107
107
|
}, {
|
|
@@ -117,6 +117,6 @@ const V = { class: "tw-relative" }, F = /* @__PURE__ */ C({
|
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
119
|
export {
|
|
120
|
-
|
|
120
|
+
G as default
|
|
121
121
|
};
|
|
122
122
|
//# sourceMappingURL=Stepper.js.map
|