@leaflink/stash 48.16.0 → 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.
Files changed (274) hide show
  1. package/assets/illustrations/FileUpload/csv.svg +1 -1
  2. package/assets/illustrations/FileUpload/document.svg +1 -17
  3. package/assets/illustrations/FileUpload/image.svg +1 -1
  4. package/assets/illustrations/FileUpload/pdf.svg +1 -1
  5. package/dist/Accordion.js +1 -1
  6. package/dist/Accordion.js.map +1 -1
  7. package/dist/Accordion.vue.d.ts +8 -9
  8. package/dist/ActionsDropdown.js.map +1 -1
  9. package/dist/ActionsDropdown.vue.d.ts +7 -8
  10. package/dist/AddressSelect.js +42 -38
  11. package/dist/AddressSelect.js.map +1 -1
  12. package/dist/AddressSelect.vue.d.ts +10 -11
  13. package/dist/Alert.js.map +1 -1
  14. package/dist/Alert.vue.d.ts +6 -7
  15. package/dist/AppNavigationItem.js +2 -2
  16. package/dist/AppNavigationItem.js.map +1 -1
  17. package/dist/AppNavigationItem.vue.d.ts +7 -8
  18. package/dist/AppSidebar.js +42 -42
  19. package/dist/AppSidebar.js.map +1 -1
  20. package/dist/AppSidebar.vue.d.ts +8 -9
  21. package/dist/AppTopbar.js +16 -16
  22. package/dist/AppTopbar.js.map +1 -1
  23. package/dist/AppTopbar.vue.d.ts +8 -9
  24. package/dist/Avatar.js.map +1 -1
  25. package/dist/Avatar.vue.d.ts +7 -8
  26. package/dist/Backdrop.vue.d.ts +3 -5
  27. package/dist/Badge.js +1 -1
  28. package/dist/Badge.js.map +1 -1
  29. package/dist/Badge.vue.d.ts +7 -8
  30. package/dist/Box.vue.d.ts +6 -7
  31. package/dist/Box.vue_vue_type_script_setup_true_lang-69e5176b.js.map +1 -1
  32. package/dist/Button.js.map +1 -1
  33. package/dist/Button.vue.d.ts +7 -8
  34. package/dist/ButtonGroup.js +29 -29
  35. package/dist/ButtonGroup.js.map +1 -1
  36. package/dist/ButtonGroup.vue.d.ts +8 -9
  37. package/dist/Card.js.map +1 -1
  38. package/dist/Card.vue.d.ts +6 -7
  39. package/dist/CardContent.vue.d.ts +3 -5
  40. package/dist/CardFooter.vue.d.ts +3 -5
  41. package/dist/CardHeader.js.map +1 -1
  42. package/dist/CardHeader.vue.d.ts +3 -4
  43. package/dist/CardMedia.js +6 -6
  44. package/dist/CardMedia.js.map +1 -1
  45. package/dist/CardMedia.vue.d.ts +3 -4
  46. package/dist/Carousel.js +249 -249
  47. package/dist/Carousel.js.map +1 -1
  48. package/dist/Carousel.vue.d.ts +9 -9
  49. package/dist/Checkbox.js +27 -27
  50. package/dist/Checkbox.js.map +1 -1
  51. package/dist/Checkbox.vue.d.ts +11 -12
  52. package/dist/ChevronToggle.js +1 -1
  53. package/dist/ChevronToggle.vue.d.ts +8 -9
  54. package/dist/{ChevronToggle.vue_vue_type_script_setup_true_lang-1591294c.js → ChevronToggle.vue_vue_type_script_setup_true_lang-fcdf0c19.js} +11 -11
  55. 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
  56. package/dist/Chip.js +30 -30
  57. package/dist/Chip.js.map +1 -1
  58. package/dist/Chip.vue.d.ts +9 -10
  59. package/dist/ConfirmationCodeInput.js +25 -25
  60. package/dist/ConfirmationCodeInput.js.map +1 -1
  61. package/dist/ConfirmationCodeInput.vue.d.ts +8 -9
  62. package/dist/ContextSwitcher.js +18 -18
  63. package/dist/ContextSwitcher.js.map +1 -1
  64. package/dist/ContextSwitcher.vue.d.ts +9 -10
  65. package/dist/Copy.js.map +1 -1
  66. package/dist/Copy.vue.d.ts +6 -7
  67. package/dist/CurrencyInput.js +93 -93
  68. package/dist/CurrencyInput.js.map +1 -1
  69. package/dist/CurrencyInput.vue.d.ts +10 -11
  70. package/dist/CustomRender.vue.d.ts +3 -15
  71. package/dist/DataView.js +97 -97
  72. package/dist/DataView.js.map +1 -1
  73. package/dist/DataView.vue.d.ts +9 -10
  74. package/dist/DataViewFilters.js +153 -150
  75. package/dist/DataViewFilters.js.map +1 -1
  76. package/dist/DataViewFilters.vue.d.ts +9 -10
  77. package/dist/DataViewSortButton.js.map +1 -1
  78. package/dist/DataViewSortButton.vue.d.ts +6 -7
  79. package/dist/DataViewToolbar.js +27 -27
  80. package/dist/DataViewToolbar.js.map +1 -1
  81. package/dist/DataViewToolbar.vue.d.ts +8 -9
  82. package/dist/DatePicker.js +738 -738
  83. package/dist/DatePicker.js.map +1 -1
  84. package/dist/DatePicker.vue.d.ts +11 -12
  85. package/dist/DescriptionList.js.map +1 -1
  86. package/dist/DescriptionList.vue.d.ts +6 -7
  87. package/dist/DescriptionListDetail.vue.d.ts +3 -5
  88. package/dist/DescriptionListGroup.vue.d.ts +3 -5
  89. package/dist/DescriptionListTerm.vue.d.ts +3 -5
  90. package/dist/Dialog.js +44 -44
  91. package/dist/Dialog.js.map +1 -1
  92. package/dist/Dialog.vue.d.ts +10 -11
  93. package/dist/Divider.vue.d.ts +3 -5
  94. package/dist/Dropdown.js +38 -38
  95. package/dist/Dropdown.js.map +1 -1
  96. package/dist/Dropdown.vue.d.ts +9 -10
  97. package/dist/EmptyState.js +20 -20
  98. package/dist/EmptyState.js.map +1 -1
  99. package/dist/EmptyState.vue.d.ts +6 -7
  100. package/dist/Expand.js +1 -1
  101. package/dist/Expand.vue.d.ts +8 -9
  102. package/dist/{Expand.vue_vue_type_script_setup_true_lang-1751f4a6.js → Expand.vue_vue_type_script_setup_true_lang-0f236267.js} +19 -19
  103. package/dist/Expand.vue_vue_type_script_setup_true_lang-0f236267.js.map +1 -0
  104. package/dist/Field.vue.d.ts +6 -7
  105. package/dist/Field.vue_vue_type_script_setup_true_lang-e1e4ff03.js.map +1 -1
  106. package/dist/FileUpload.js +65 -65
  107. package/dist/FileUpload.js.map +1 -1
  108. package/dist/FileUpload.vue.d.ts +10 -11
  109. package/dist/FilterChip.js +27 -27
  110. package/dist/FilterChip.js.map +1 -1
  111. package/dist/FilterChip.vue.d.ts +8 -9
  112. package/dist/FilterDrawerItem.js +26 -26
  113. package/dist/FilterDrawerItem.js.map +1 -1
  114. package/dist/FilterDrawerItem.vue.d.ts +5 -6
  115. package/dist/FilterDropdown.js +49 -49
  116. package/dist/FilterDropdown.js.map +1 -1
  117. package/dist/FilterDropdown.vue.d.ts +8 -9
  118. package/dist/FilterSelect.js +23 -23
  119. package/dist/FilterSelect.js.map +1 -1
  120. package/dist/FilterSelect.vue.d.ts +8 -9
  121. package/dist/Filters.js +112 -104
  122. package/dist/Filters.js.map +1 -1
  123. package/dist/Filters.vue.d.ts +2204 -65
  124. package/dist/HttpError.js +42 -42
  125. package/dist/HttpError.js.map +1 -1
  126. package/dist/HttpError.vue.d.ts +6 -7
  127. package/dist/Icon.js.map +1 -1
  128. package/dist/Icon.vue.d.ts +7 -8
  129. package/dist/IconLabel.js.map +1 -1
  130. package/dist/IconLabel.vue.d.ts +8 -9
  131. package/dist/Illustration.vue.d.ts +6 -7
  132. package/dist/Illustration.vue_vue_type_script_setup_true_lang-e26c3841.js.map +1 -1
  133. package/dist/Image.js +47 -47
  134. package/dist/Image.js.map +1 -1
  135. package/dist/Image.vue.d.ts +6 -7
  136. package/dist/InlineEdit.js +34 -34
  137. package/dist/InlineEdit.js.map +1 -1
  138. package/dist/InlineEdit.vue.d.ts +9 -10
  139. package/dist/Input.js +35 -35
  140. package/dist/Input.js.map +1 -1
  141. package/dist/Input.vue.d.ts +13 -14
  142. package/dist/InputOptions.js +33 -33
  143. package/dist/InputOptions.js.map +1 -1
  144. package/dist/InputOptions.vue.d.ts +8 -9
  145. package/dist/IntegrationIcon.js.map +1 -1
  146. package/dist/IntegrationIcon.vue.d.ts +7 -8
  147. package/dist/Label.vue.d.ts +6 -7
  148. package/dist/Label.vue_vue_type_script_setup_true_lang-4b02087f.js.map +1 -1
  149. package/dist/LicenseChip.js.map +1 -1
  150. package/dist/LicenseChip.vue.d.ts +6 -7
  151. package/dist/ListItem.vue.d.ts +225 -95
  152. package/dist/ListItemCell.vue.d.ts +4 -16
  153. package/dist/ListView.js +1 -1
  154. package/dist/ListView.vue.d.ts +5072 -470
  155. package/dist/Loading.js +16 -16
  156. package/dist/Loading.js.map +1 -1
  157. package/dist/Loading.vue.d.ts +3 -5
  158. package/dist/Logo.js +1 -1
  159. package/dist/Logo.vue.d.ts +9 -10
  160. package/dist/Logo.vue_vue_type_script_setup_true_lang-2a2597cb.js +196 -0
  161. package/dist/Logo.vue_vue_type_script_setup_true_lang-2a2597cb.js.map +1 -0
  162. package/dist/Menu.vue.d.ts +3 -5
  163. package/dist/MenuItem.vue.d.ts +3 -5
  164. package/dist/Metric.js.map +1 -1
  165. package/dist/Metric.vue.d.ts +6 -7
  166. package/dist/Modal.js +29 -29
  167. package/dist/Modal.js.map +1 -1
  168. package/dist/Modal.vue.d.ts +8 -9
  169. package/dist/Modals.js +8 -7
  170. package/dist/Modals.js.map +1 -1
  171. package/dist/Modals.vue.d.ts +3 -5
  172. package/dist/Module.js.map +1 -1
  173. package/dist/Module.vue.d.ts +7 -8
  174. package/dist/ModuleContent.vue.d.ts +3 -5
  175. package/dist/ModuleFooter.vue.d.ts +3 -5
  176. package/dist/ModuleHeader.js.map +1 -1
  177. package/dist/ModuleHeader.vue.d.ts +6 -7
  178. package/dist/ObfuscateText.js +1 -1
  179. package/dist/ObfuscateText.js.map +1 -1
  180. package/dist/ObfuscateText.vue.d.ts +6 -7
  181. package/dist/PageContent.vue.d.ts +3 -5
  182. package/dist/PageHeader.js.map +1 -1
  183. package/dist/PageHeader.vue.d.ts +6 -7
  184. package/dist/PageNavigation.js +30 -27
  185. package/dist/PageNavigation.js.map +1 -1
  186. package/dist/PageNavigation.vue.d.ts +8 -9
  187. package/dist/Paginate.js +32 -32
  188. package/dist/Paginate.js.map +1 -1
  189. package/dist/Paginate.vue.d.ts +8 -9
  190. package/dist/PlaidLink.js +29 -29
  191. package/dist/PlaidLink.js.map +1 -1
  192. package/dist/PlaidLink.vue.d.ts +11 -12
  193. package/dist/QuickAction.js.map +1 -1
  194. package/dist/QuickAction.vue.d.ts +4 -5
  195. package/dist/Radio.vue.d.ts +20 -1
  196. package/dist/RadioGroup.js +123 -123
  197. package/dist/RadioGroup.js.map +1 -1
  198. package/dist/RadioGroup.vue.d.ts +10 -11
  199. package/dist/RadioNew.js +102 -102
  200. package/dist/RadioNew.js.map +1 -1
  201. package/dist/RadioNew.vue.d.ts +10 -11
  202. package/dist/RangeInput.vue.d.ts +3 -5
  203. package/dist/SearchBar.js +36 -36
  204. package/dist/SearchBar.js.map +1 -1
  205. package/dist/SearchBar.vue.d.ts +9 -10
  206. package/dist/Select.js +792 -774
  207. package/dist/Select.js.map +1 -1
  208. package/dist/Select.vue.d.ts +14 -15
  209. package/dist/SelectStatus.js +27 -27
  210. package/dist/SelectStatus.js.map +1 -1
  211. package/dist/SelectStatus.vue.d.ts +12 -13
  212. package/dist/Skeleton.js.map +1 -1
  213. package/dist/Skeleton.vue.d.ts +7 -8
  214. package/dist/Step.js.map +1 -1
  215. package/dist/Step.vue.d.ts +7 -8
  216. package/dist/Stepper.js +19 -19
  217. package/dist/Stepper.js.map +1 -1
  218. package/dist/Stepper.vue.d.ts +9 -10
  219. package/dist/Switch.js +25 -25
  220. package/dist/Switch.js.map +1 -1
  221. package/dist/Switch.vue.d.ts +11 -12
  222. package/dist/Tab.js +2 -2
  223. package/dist/Tab.vue.d.ts +3 -4
  224. package/dist/{Tab.vue_vue_type_script_setup_true_lang-69d1b046.js → Tab.vue_vue_type_script_setup_true_lang-9aa53203.js} +5 -3
  225. package/dist/Tab.vue_vue_type_script_setup_true_lang-9aa53203.js.map +1 -0
  226. package/dist/Table.js +3 -3
  227. package/dist/Table.js.map +1 -1
  228. package/dist/{Table.keys-cf93df19.js → Table.keys-83e4f09b.js} +11 -11
  229. package/dist/{Table.keys-cf93df19.js.map → Table.keys-83e4f09b.js.map} +1 -1
  230. package/dist/Table.vue.d.ts +6 -7
  231. package/dist/TableCell.js +1 -1
  232. package/dist/TableCell.js.map +1 -1
  233. package/dist/TableCell.vue.d.ts +6 -7
  234. package/dist/TableHeaderCell.js +12 -12
  235. package/dist/TableHeaderCell.js.map +1 -1
  236. package/dist/TableHeaderCell.vue.d.ts +6 -7
  237. package/dist/TableHeaderRow.js +21 -21
  238. package/dist/TableHeaderRow.js.map +1 -1
  239. package/dist/TableHeaderRow.vue.d.ts +8 -9
  240. package/dist/TableRow.js +42 -42
  241. package/dist/TableRow.js.map +1 -1
  242. package/dist/TableRow.vue.d.ts +8 -9
  243. package/dist/Tabs.js +2 -2
  244. package/dist/Tabs.vue.d.ts +8 -9
  245. 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
  246. package/dist/Tabs.vue_used_vue_type_style_index_0_lang.module-3aa36673.js.map +1 -0
  247. package/dist/TextEditor.js +565 -565
  248. package/dist/TextEditor.js.map +1 -1
  249. package/dist/TextEditor.vue.d.ts +12 -13
  250. package/dist/Textarea.js +28 -28
  251. package/dist/Textarea.js.map +1 -1
  252. package/dist/Textarea.vue.d.ts +10 -11
  253. package/dist/Timeline.js.map +1 -1
  254. package/dist/Timeline.vue.d.ts +6 -7
  255. package/dist/TimelineItem.js +21 -21
  256. package/dist/TimelineItem.js.map +1 -1
  257. package/dist/TimelineItem.vue.d.ts +13 -6
  258. package/dist/Toast.js +134 -134
  259. package/dist/Toast.js.map +1 -1
  260. package/dist/Toast.vue.d.ts +6 -7
  261. package/dist/Toasts.vue.d.ts +3 -5
  262. package/dist/components.css +1 -1
  263. package/dist/index.js.map +1 -1
  264. package/dist/tailwind-base.js.map +1 -1
  265. package/dist/usePlaidLink.d.ts +1 -6
  266. package/dist/useScriptTag.d.ts +3 -8
  267. package/dist/useStepper.d.ts +7 -2
  268. package/package.json +1 -1
  269. package/tailwind-base.ts +13 -6
  270. package/dist/Expand.vue_vue_type_script_setup_true_lang-1751f4a6.js.map +0 -1
  271. package/dist/Logo.vue_vue_type_script_setup_true_lang-d7da48a0.js +0 -196
  272. package/dist/Logo.vue_vue_type_script_setup_true_lang-d7da48a0.js.map +0 -1
  273. package/dist/Tab.vue_vue_type_script_setup_true_lang-69d1b046.js.map +0 -1
  274. package/dist/Tabs.vue_used_vue_type_style_index_0_lang.module-2a131332.js.map +0 -1
@@ -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 type { LocationQuery } from 'vue-router';
7
6
  import { PropType } from 'vue';
8
- import { VNodeProps } from 'vue';
7
+ import { PublicProps } from 'vue';
9
8
 
10
9
  declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
11
10
 
@@ -36,7 +35,7 @@ declare const APPS: {
36
35
  readonly PAYMENTS: "payments";
37
36
  };
38
37
 
39
- declare type AppValues = typeof APPS[keyof typeof APPS];
38
+ declare type AppValues = (typeof APPS)[keyof typeof APPS];
40
39
 
41
40
  export declare interface ContextSwitcherProps {
42
41
  /**
@@ -57,13 +56,13 @@ export declare interface ContextSwitcherProps {
57
56
  routeQuery?: LocationQuery;
58
57
  }
59
58
 
60
- declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ContextSwitcherProps>, {
59
+ declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ContextSwitcherProps>, {
61
60
  portalAccess: () => {
62
61
  commercePortal: boolean;
63
62
  paymentsPortal: boolean;
64
63
  };
65
64
  routeQuery: () => {};
66
- }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
65
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
67
66
  click: (urlInfo: {
68
67
  from: string;
69
68
  to: string;
@@ -72,13 +71,13 @@ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRunt
72
71
  from: string;
73
72
  to: string;
74
73
  }) => void;
75
- }, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ContextSwitcherProps>, {
74
+ }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ContextSwitcherProps>, {
76
75
  portalAccess: () => {
77
76
  commercePortal: boolean;
78
77
  paymentsPortal: boolean;
79
78
  };
80
79
  routeQuery: () => {};
81
- }>>> & {
80
+ }>>> & Readonly<{
82
81
  onClick?: ((urlInfo: {
83
82
  from: string;
84
83
  to: string;
@@ -87,13 +86,13 @@ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRunt
87
86
  from: string;
88
87
  to: string;
89
88
  }) => any) | undefined;
90
- }, {
89
+ }>, {
91
90
  portalAccess: {
92
91
  commercePortal: boolean;
93
92
  paymentsPortal: boolean;
94
93
  };
95
94
  routeQuery: LocationQuery;
96
- }, {}>;
95
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
97
96
  export default _default;
98
97
 
99
98
  export { }
package/dist/Copy.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Copy.js","sources":["../src/components/Copy/Copy.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, ref, useCssModule } from 'vue';\n\n import { UI_TIMEOUT } from '../../constants';\n import vTooltip from '../../directives/tooltip/tooltip';\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import Icon from '../Icon/Icon.vue';\n\n export interface CopyProps {\n /**\n * Optional text to display instead of icon.\n */\n text?: string;\n\n /**\n * The value to copy to clipboard.\n */\n value?: string;\n\n /**\n * Sets the copy icon or text to always be visible. By default, icon/text only appears when hovering over slot content.\n */\n visible?: boolean;\n }\n\n const props = withDefaults(defineProps<CopyProps>(), {\n text: undefined,\n value: '', // Todo - We should default this to the content of the default slot so you can do <Copy>631f67a</Copy>.\n visible: false,\n });\n const classes = useCssModule();\n\n // Flag to indicate whether a user successfully copied the text to their clipboard.\n // Note: We reset this flag after a timeout to allow the user to copy the text multiple times.\n const isCopied = ref(false);\n\n const tooltip = computed(() => {\n return isCopied.value ? t('ll.copy.copied') : !props.text ? t('ll.copy.copyToClipboard') : null;\n });\n\n function handleCopy() {\n navigator.clipboard.writeText(props.value);\n isCopied.value = true;\n\n setTimeout(() => {\n isCopied.value = false;\n }, UI_TIMEOUT);\n }\n</script>\n\n<template>\n <div class=\"stash-copy tw-flex tw-items-center\" :class=\"{ [classes.hidden]: !props.visible }\" data-test=\"stash-copy\">\n <!-- @slot Anything you want to render. This is not what will be copied to the clipboard. -->\n <slot></slot>\n <div\n v-tooltip.top=\"tooltip\"\n class=\"stash-copy__copy-zone tw-ml-3 tw-cursor-pointer\"\n :class=\"classes.copy\"\n data-test=\"stash-copy|copy-zone\"\n >\n <Icon\n v-if=\"isCopied\"\n class=\"stash-copy__success-icon tw-text-green-500\"\n name=\"circle-check\"\n data-test=\"stash-copy|success-icon\"\n />\n <Button\n v-else-if=\"props.text\"\n class=\"stash-copy__copy-text\"\n inline\n data-test=\"stash-copy|copy-target\"\n @click=\"handleCopy\"\n >\n {{ props.text }}\n </Button>\n <Icon\n v-else\n class=\"stash-copy__copy-icon\"\n name=\"copy\"\n title=\"Copy to clipboard\"\n data-test=\"stash-copy|copy-target\"\n @click=\"handleCopy\"\n />\n </div>\n </div>\n</template>\n\n<style module>\n .hidden {\n .copy {\n visibility: hidden;\n }\n\n &:hover {\n .copy {\n visibility: visible;\n }\n }\n }\n</style>\n"],"names":["classes","useCssModule","isCopied","ref","tooltip","computed","t","props","handleCopy","UI_TIMEOUT"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;iBA+BQA,IAAUC,KAIVC,IAAWC,EAAI,EAAK,GAEpBC,IAAUC,EAAS,MAChBH,EAAS,QAAQI,EAAE,gBAAgB,IAAKC,EAAM,OAAsC,OAA/BD,EAAE,yBAAyB,CACxF;AAED,aAASE,IAAa;AACV,gBAAA,UAAU,UAAUD,EAAM,KAAK,GACzCL,EAAS,QAAQ,IAEjB,WAAW,MAAM;AACf,QAAAA,EAAS,QAAQ;AAAA,SAChBO,CAAU;AAAA,IACf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Copy.js","sources":["../src/components/Copy/Copy.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, ref, useCssModule } from 'vue';\n\n import { UI_TIMEOUT } from '../../constants';\n import vTooltip from '../../directives/tooltip/tooltip';\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import Icon from '../Icon/Icon.vue';\n\n export interface CopyProps {\n /**\n * Optional text to display instead of icon.\n */\n text?: string;\n\n /**\n * The value to copy to clipboard.\n */\n value?: string;\n\n /**\n * Sets the copy icon or text to always be visible. By default, icon/text only appears when hovering over slot content.\n */\n visible?: boolean;\n }\n\n const props = withDefaults(defineProps<CopyProps>(), {\n text: undefined,\n value: '', // Todo - We should default this to the content of the default slot so you can do <Copy>631f67a</Copy>.\n visible: false,\n });\n const classes = useCssModule();\n\n // Flag to indicate whether a user successfully copied the text to their clipboard.\n // Note: We reset this flag after a timeout to allow the user to copy the text multiple times.\n const isCopied = ref(false);\n\n const tooltip = computed(() => {\n return isCopied.value ? t('ll.copy.copied') : !props.text ? t('ll.copy.copyToClipboard') : null;\n });\n\n function handleCopy() {\n navigator.clipboard.writeText(props.value);\n isCopied.value = true;\n\n setTimeout(() => {\n isCopied.value = false;\n }, UI_TIMEOUT);\n }\n</script>\n\n<template>\n <div class=\"stash-copy tw-flex tw-items-center\" :class=\"{ [classes.hidden]: !props.visible }\" data-test=\"stash-copy\">\n <!-- @slot Anything you want to render. This is not what will be copied to the clipboard. -->\n <slot></slot>\n <div\n v-tooltip.top=\"tooltip\"\n class=\"stash-copy__copy-zone tw-ml-3 tw-cursor-pointer\"\n :class=\"classes.copy\"\n data-test=\"stash-copy|copy-zone\"\n >\n <Icon\n v-if=\"isCopied\"\n class=\"stash-copy__success-icon tw-text-green-500\"\n name=\"circle-check\"\n data-test=\"stash-copy|success-icon\"\n />\n <Button\n v-else-if=\"props.text\"\n class=\"stash-copy__copy-text\"\n inline\n data-test=\"stash-copy|copy-target\"\n @click=\"handleCopy\"\n >\n {{ props.text }}\n </Button>\n <Icon\n v-else\n class=\"stash-copy__copy-icon\"\n name=\"copy\"\n title=\"Copy to clipboard\"\n data-test=\"stash-copy|copy-target\"\n @click=\"handleCopy\"\n />\n </div>\n </div>\n</template>\n\n<style module>\n .hidden {\n .copy {\n visibility: hidden;\n }\n\n &:hover {\n .copy {\n visibility: visible;\n }\n }\n }\n</style>\n"],"names":["props","__props","classes","useCssModule","isCopied","ref","tooltip","computed","t","handleCopy","UI_TIMEOUT"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA0BE,UAAMA,IAAQC,GAKRC,IAAUC,KAIVC,IAAWC,EAAI,EAAK,GAEpBC,IAAUC,EAAS,MAChBH,EAAS,QAAQI,EAAE,gBAAgB,IAAKR,EAAM,OAAsC,OAA/BQ,EAAE,yBAAyB,CACxF;AAED,aAASC,IAAa;AACV,gBAAA,UAAU,UAAUT,EAAM,KAAK,GACzCI,EAAS,QAAQ,IAEjB,WAAW,MAAM;AACf,QAAAA,EAAS,QAAQ;AAAA,SAChBM,CAAU;AAAA,IACf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -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 { VNodeProps } from 'vue';
6
+ import { PublicProps } from 'vue';
8
7
 
9
8
  declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
10
9
 
@@ -48,19 +47,19 @@ export declare interface CopyProps {
48
47
  visible?: boolean;
49
48
  }
50
49
 
51
- declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CopyProps>, {
50
+ declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CopyProps>, {
52
51
  text: undefined;
53
52
  value: string;
54
53
  visible: boolean;
55
- }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CopyProps>, {
54
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CopyProps>, {
56
55
  text: undefined;
57
56
  value: string;
58
57
  visible: boolean;
59
- }>>>, {
58
+ }>>> & Readonly<{}>, {
60
59
  text: string;
61
60
  value: string;
62
61
  visible: boolean;
63
- }, {}>, {
62
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
64
63
  default?(_: {}): any;
65
64
  }>;
66
65
  export default _default;
@@ -18,14 +18,14 @@ import "./Label.vue_vue_type_script_setup_true_lang-4b02087f.js";
18
18
  * (c) 2018-2024 Matthias Stiller
19
19
  * @license MIT
20
20
  */
21
- var f;
21
+ var y;
22
22
  (function(s) {
23
23
  s.symbol = "symbol", s.narrowSymbol = "narrowSymbol", s.code = "code", s.name = "name", s.hidden = "hidden";
24
- })(f || (f = {}));
25
- var y;
24
+ })(y || (y = {}));
25
+ var v;
26
26
  (function(s) {
27
27
  s.precision = "precision", s.thousands = "thousands", s.millions = "millions", s.billions = "billions";
28
- })(y || (y = {}));
28
+ })(v || (v = {}));
29
29
  const D = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), M = (s) => s.replace(/^0+(0$|[^0])/, "$1"), E = (s, i) => (s.match(new RegExp(D(i), "g")) || []).length, X = (s, i) => s.substring(0, s.indexOf(i)), P = [
30
30
  ",",
31
31
  ".",
@@ -34,19 +34,19 @@ const D = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), M = (s) => s.replace(
34
34
  ], N = "(0|[1-9]\\d*)";
35
35
  class U {
36
36
  constructor(i) {
37
- var t, e, n, g, o, h;
38
- const { currency: d, currencyDisplay: p, locale: r, precision: u, accountingSign: a, useGrouping: l } = i;
37
+ var t, e, n, g, a, c;
38
+ const { currency: h, currencyDisplay: p, locale: r, precision: o, accountingSign: d, useGrouping: l } = i;
39
39
  this.locale = r, this.options = {
40
- currency: d,
40
+ currency: h,
41
41
  useGrouping: l,
42
42
  style: "currency",
43
- currencySign: a ? "accounting" : void 0,
44
- currencyDisplay: p !== f.hidden ? p : void 0
43
+ currencySign: d ? "accounting" : void 0,
44
+ currencyDisplay: p !== y.hidden ? p : void 0
45
45
  };
46
- const m = new Intl.NumberFormat(r, this.options), v = m.formatToParts(123456);
47
- this.currency = (t = v.find(({ type: c }) => c === "currency")) === null || t === void 0 ? void 0 : t.value, this.digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((c) => c.toLocaleString(r)), this.decimalSymbol = (e = v.find(({ type: c }) => c === "decimal")) === null || e === void 0 ? void 0 : e.value, this.groupingSymbol = (n = v.find(({ type: c }) => c === "group")) === null || n === void 0 ? void 0 : n.value, this.minusSign = (g = m.formatToParts(-1).find(({ type: c }) => c === "minusSign")) === null || g === void 0 ? void 0 : g.value, this.decimalSymbol === void 0 ? this.minimumFractionDigits = this.maximumFractionDigits = 0 : typeof u == "number" ? this.minimumFractionDigits = this.maximumFractionDigits = u : (this.minimumFractionDigits = (o = u == null ? void 0 : u.min) !== null && o !== void 0 ? o : m.resolvedOptions().minimumFractionDigits, this.maximumFractionDigits = (h = u == null ? void 0 : u.max) !== null && h !== void 0 ? h : m.resolvedOptions().maximumFractionDigits);
48
- const b = (c) => X(c, this.digits[1]), S = (c) => c.substring(c.lastIndexOf(this.decimalSymbol ? this.digits[0] : this.digits[1]) + 1);
49
- this.prefix = b(m.format(1)), this.suffix = S(m.format(1)), this.negativePrefix = b(m.format(-1)), this.negativeSuffix = S(m.format(-1));
46
+ const u = new Intl.NumberFormat(r, this.options), f = u.formatToParts(123456);
47
+ this.currency = (t = f.find(({ type: m }) => m === "currency")) === null || t === void 0 ? void 0 : t.value, this.digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((m) => m.toLocaleString(r)), this.decimalSymbol = (e = f.find(({ type: m }) => m === "decimal")) === null || e === void 0 ? void 0 : e.value, this.groupingSymbol = (n = f.find(({ type: m }) => m === "group")) === null || n === void 0 ? void 0 : n.value, this.minusSign = (g = u.formatToParts(-1).find(({ type: m }) => m === "minusSign")) === null || g === void 0 ? void 0 : g.value, this.decimalSymbol === void 0 ? this.minimumFractionDigits = this.maximumFractionDigits = 0 : typeof o == "number" ? this.minimumFractionDigits = this.maximumFractionDigits = o : (this.minimumFractionDigits = (a = o == null ? void 0 : o.min) !== null && a !== void 0 ? a : u.resolvedOptions().minimumFractionDigits, this.maximumFractionDigits = (c = o == null ? void 0 : o.max) !== null && c !== void 0 ? c : u.resolvedOptions().maximumFractionDigits);
48
+ const b = (m) => X(m, this.digits[1]), S = (m) => m.substring(m.lastIndexOf(this.decimalSymbol ? this.digits[0] : this.digits[1]) + 1);
49
+ this.prefix = b(u.format(1)), this.suffix = S(u.format(1)), this.negativePrefix = b(u.format(-1)), this.negativeSuffix = S(u.format(-1));
50
50
  }
51
51
  parse(i) {
52
52
  if (i) {
@@ -116,26 +116,26 @@ class C {
116
116
  }
117
117
  class q extends C {
118
118
  conformToMask(i, t = "") {
119
- const e = this.currencyFormat.isNegative(i), n = (m) => m === "" && e && !(this.currencyFormat.minusSign === void 0 ? t === this.currencyFormat.negativePrefix + this.currencyFormat.negativeSuffix : t === this.currencyFormat.negativePrefix), g = (m) => {
120
- if (n(m))
119
+ const e = this.currencyFormat.isNegative(i), n = (u) => u === "" && e && !(this.currencyFormat.minusSign === void 0 ? t === this.currencyFormat.negativePrefix + this.currencyFormat.negativeSuffix : t === this.currencyFormat.negativePrefix), g = (u) => {
120
+ if (n(u))
121
121
  return "";
122
122
  if (this.currencyFormat.maximumFractionDigits > 0) {
123
- if (this.currencyFormat.isFractionIncomplete(m))
124
- return m;
125
- if (m.startsWith(this.currencyFormat.decimalSymbol))
126
- return this.currencyFormat.toFraction(m);
123
+ if (this.currencyFormat.isFractionIncomplete(u))
124
+ return u;
125
+ if (u.startsWith(this.currencyFormat.decimalSymbol))
126
+ return this.currencyFormat.toFraction(u);
127
127
  }
128
128
  return null;
129
129
  };
130
- let o = i;
131
- o = this.currencyFormat.stripCurrency(o, e), o = this.currencyFormat.stripSignLiterals(o);
132
- const h = g(o);
133
- if (h != null)
134
- return this.currencyFormat.insertCurrency(h, e);
135
- const [d, ...p] = o.split(this.currencyFormat.decimalSymbol), r = M(this.currencyFormat.onlyDigits(d)), u = this.currencyFormat.onlyDigits(p.join("")).substring(0, this.currencyFormat.maximumFractionDigits), a = p.length > 0 && u.length === 0, l = r === "" && e && (this.currencyFormat.minusSign === void 0 ? t === i.slice(0, -2) + this.currencyFormat.negativeSuffix : t === i.slice(0, -1));
136
- return a || l || n(r) ? t : r.match(/\d+/) ? {
137
- numberValue: +`${e ? "-" : ""}${r}.${u}`,
138
- fractionDigits: u
130
+ let a = i;
131
+ a = this.currencyFormat.stripCurrency(a, e), a = this.currencyFormat.stripSignLiterals(a);
132
+ const c = g(a);
133
+ if (c != null)
134
+ return this.currencyFormat.insertCurrency(c, e);
135
+ const [h, ...p] = a.split(this.currencyFormat.decimalSymbol), r = M(this.currencyFormat.onlyDigits(h)), o = this.currencyFormat.onlyDigits(p.join("")).substring(0, this.currencyFormat.maximumFractionDigits), d = p.length > 0 && o.length === 0, l = r === "" && e && (this.currencyFormat.minusSign === void 0 ? t === i.slice(0, -2) + this.currencyFormat.negativeSuffix : t === i.slice(0, -1));
136
+ return d || l || n(r) ? t : r.match(/\d+/) ? {
137
+ numberValue: +`${e ? "-" : ""}${r}.${o}`,
138
+ fractionDigits: o
139
139
  } : "";
140
140
  }
141
141
  }
@@ -183,12 +183,12 @@ class H {
183
183
  ...i
184
184
  }, this.options.autoDecimalDigits && (this.options.hideNegligibleDecimalDigitsOnFocus = !1), this.el.getAttribute("inputmode") || this.el.setAttribute("inputmode", this.options.autoDecimalDigits ? "numeric" : "decimal"), this.currencyFormat = new U(this.options), this.numberMask = this.options.autoDecimalDigits ? new Y(this.currencyFormat) : new q(this.currencyFormat);
185
185
  const t = {
186
- [y.precision]: this.currencyFormat.maximumFractionDigits,
187
- [y.thousands]: 3,
188
- [y.millions]: 6,
189
- [y.billions]: 9
186
+ [v.precision]: this.currencyFormat.maximumFractionDigits,
187
+ [v.thousands]: 3,
188
+ [v.millions]: 6,
189
+ [v.billions]: 9
190
190
  };
191
- this.valueScaling = this.options.valueScaling ? t[this.options.valueScaling] : void 0, this.valueScalingFractionDigits = this.valueScaling !== void 0 && this.options.valueScaling !== y.precision ? this.valueScaling + this.currencyFormat.maximumFractionDigits : this.currencyFormat.maximumFractionDigits, this.minValue = this.getMinValue(), this.maxValue = this.getMaxValue();
191
+ this.valueScaling = this.options.valueScaling ? t[this.options.valueScaling] : void 0, this.valueScalingFractionDigits = this.valueScaling !== void 0 && this.options.valueScaling !== v.precision ? this.valueScaling + this.currencyFormat.maximumFractionDigits : this.currencyFormat.maximumFractionDigits, this.minValue = this.getMinValue(), this.maxValue = this.getMaxValue();
192
192
  }
193
193
  getMinValue() {
194
194
  var i, t;
@@ -215,16 +215,16 @@ class H {
215
215
  const e = this.numberMask.conformToMask(i, this.formattedValue);
216
216
  let n;
217
217
  if (typeof e == "object") {
218
- const { numberValue: g, fractionDigits: o } = e;
219
- let { maximumFractionDigits: h, minimumFractionDigits: d } = this.currencyFormat;
220
- this.focus ? d = t ? o.replace(/0+$/, "").length : Math.min(h, o.length) : Number.isInteger(g) && !this.options.autoDecimalDigits && (this.options.precision === void 0 || d === 0) && (d = h = 0), n = this.toInteger(Math.abs(g)) > Number.MAX_SAFE_INTEGER ? this.formattedValue : this.currencyFormat.format(g, {
218
+ const { numberValue: g, fractionDigits: a } = e;
219
+ let { maximumFractionDigits: c, minimumFractionDigits: h } = this.currencyFormat;
220
+ this.focus ? h = t ? a.replace(/0+$/, "").length : Math.min(c, a.length) : Number.isInteger(g) && !this.options.autoDecimalDigits && (this.options.precision === void 0 || h === 0) && (h = c = 0), n = this.toInteger(Math.abs(g)) > Number.MAX_SAFE_INTEGER ? this.formattedValue : this.currencyFormat.format(g, {
221
221
  useGrouping: this.options.useGrouping !== !1 && !(this.focus && this.options.hideGroupingSeparatorOnFocus),
222
- minimumFractionDigits: d,
223
- maximumFractionDigits: h
222
+ minimumFractionDigits: h,
223
+ maximumFractionDigits: c
224
224
  });
225
225
  } else
226
226
  n = e;
227
- this.maxValue <= 0 && !this.currencyFormat.isNegative(n) && this.currencyFormat.parse(n) !== 0 && (n = n.replace(this.currencyFormat.prefix, this.currencyFormat.negativePrefix)), this.minValue >= 0 && (n = n.replace(this.currencyFormat.negativePrefix, this.currencyFormat.prefix)), (this.options.currencyDisplay === f.hidden || this.focus && this.options.hideCurrencySymbolOnFocus) && (n = n.replace(this.currencyFormat.negativePrefix, this.currencyFormat.minusSign !== void 0 ? this.currencyFormat.minusSign : "(").replace(this.currencyFormat.negativeSuffix, this.currencyFormat.minusSign !== void 0 ? "" : ")").replace(this.currencyFormat.prefix, "").replace(this.currencyFormat.suffix, "")), this.el.value = n, this.numberValue = this.currencyFormat.parse(n);
227
+ this.maxValue <= 0 && !this.currencyFormat.isNegative(n) && this.currencyFormat.parse(n) !== 0 && (n = n.replace(this.currencyFormat.prefix, this.currencyFormat.negativePrefix)), this.minValue >= 0 && (n = n.replace(this.currencyFormat.negativePrefix, this.currencyFormat.prefix)), (this.options.currencyDisplay === y.hidden || this.focus && this.options.hideCurrencySymbolOnFocus) && (n = n.replace(this.currencyFormat.negativePrefix, this.currencyFormat.minusSign !== void 0 ? this.currencyFormat.minusSign : "(").replace(this.currencyFormat.negativeSuffix, this.currencyFormat.minusSign !== void 0 ? "" : ")").replace(this.currencyFormat.prefix, "").replace(this.currencyFormat.suffix, "")), this.el.value = n, this.numberValue = this.currencyFormat.parse(n);
228
228
  } else
229
229
  this.el.value = "", this.numberValue = null;
230
230
  this.formattedValue = this.el.value, this.onInput(this.getValue());
@@ -234,22 +234,22 @@ class H {
234
234
  const { value: t, selectionStart: e } = this.el, n = i;
235
235
  if (e && n.data && P.includes(n.data) && (this.decimalSymbolInsertedAt = e - 1), this.format(t), this.focus && e != null) {
236
236
  const g = () => {
237
- const { prefix: o, suffix: h, decimalSymbol: d, maximumFractionDigits: p, groupingSymbol: r } = this.currencyFormat;
238
- let u = t.length - e;
239
- const a = this.formattedValue.length;
237
+ const { prefix: a, suffix: c, decimalSymbol: h, maximumFractionDigits: p, groupingSymbol: r } = this.currencyFormat;
238
+ let o = t.length - e;
239
+ const d = this.formattedValue.length;
240
240
  if (this.currencyFormat.minusSign === void 0 && (t.startsWith("(") || t.startsWith("-")) && !t.endsWith(")"))
241
- return a - this.currencyFormat.negativeSuffix.length > 1 ? this.formattedValue.substring(e).length : 1;
241
+ return d - this.currencyFormat.negativeSuffix.length > 1 ? this.formattedValue.substring(e).length : 1;
242
242
  if (this.formattedValue.substring(e, 1) === r && E(this.formattedValue, r) === E(t, r) + 1)
243
- return a - u - 1;
244
- if (a < u)
243
+ return d - o - 1;
244
+ if (d < o)
245
245
  return e;
246
- if (d !== void 0 && t.indexOf(d) !== -1) {
247
- const l = t.indexOf(d) + 1;
248
- if (Math.abs(a - t.length) > 1 && e <= l)
249
- return this.formattedValue.indexOf(d) + 1;
250
- !this.options.autoDecimalDigits && e > l && this.currencyFormat.onlyDigits(t.substring(l)).length - 1 === p && (u -= 1);
246
+ if (h !== void 0 && t.indexOf(h) !== -1) {
247
+ const l = t.indexOf(h) + 1;
248
+ if (Math.abs(d - t.length) > 1 && e <= l)
249
+ return this.formattedValue.indexOf(h) + 1;
250
+ !this.options.autoDecimalDigits && e > l && this.currencyFormat.onlyDigits(t.substring(l)).length - 1 === p && (o -= 1);
251
251
  }
252
- return this.options.hideCurrencySymbolOnFocus || this.options.currencyDisplay === f.hidden ? a - u : Math.max(a - Math.max(u, h.length), o.length);
252
+ return this.options.hideCurrencySymbolOnFocus || this.options.currencyDisplay === y.hidden ? d - o : Math.max(d - Math.max(o, c.length), a.length);
253
253
  };
254
254
  this.setCaretPosition(g());
255
255
  }
@@ -270,8 +270,8 @@ class H {
270
270
  getCaretPositionOnFocus(i, t) {
271
271
  if (this.numberValue == null)
272
272
  return t;
273
- const { prefix: e, negativePrefix: n, suffix: g, negativeSuffix: o, groupingSymbol: h, currency: d } = this.currencyFormat, p = this.numberValue < 0, r = p ? n : e, u = r.length;
274
- if (this.options.hideCurrencySymbolOnFocus || this.options.currencyDisplay === f.hidden) {
273
+ const { prefix: e, negativePrefix: n, suffix: g, negativeSuffix: a, groupingSymbol: c, currency: h } = this.currencyFormat, p = this.numberValue < 0, r = p ? n : e, o = r.length;
274
+ if (this.options.hideCurrencySymbolOnFocus || this.options.currencyDisplay === y.hidden) {
275
275
  if (p) {
276
276
  if (t <= 1)
277
277
  return 1;
@@ -279,14 +279,14 @@ class H {
279
279
  return this.formattedValue.length - 1;
280
280
  }
281
281
  } else {
282
- const l = p ? o.length : g.length;
282
+ const l = p ? a.length : g.length;
283
283
  if (t >= i.length - l)
284
284
  return this.formattedValue.length - l;
285
- if (t < u)
286
- return u;
285
+ if (t < o)
286
+ return o;
287
287
  }
288
- let a = t;
289
- return this.options.hideCurrencySymbolOnFocus && this.options.currencyDisplay !== f.hidden && t >= u && d !== void 0 && r.includes(d) && (a -= u, p && (a += 1)), this.options.hideGroupingSeparatorOnFocus && h !== void 0 && (a -= E(i.substring(0, t), h)), a;
288
+ let d = t;
289
+ return this.options.hideCurrencySymbolOnFocus && this.options.currencyDisplay !== y.hidden && t >= o && h !== void 0 && r.includes(h) && (d -= o, p && (d += 1)), this.options.hideGroupingSeparatorOnFocus && c !== void 0 && (d -= E(i.substring(0, t), c)), d;
290
290
  }
291
291
  setCaretPosition(i, t = i) {
292
292
  this.el.setSelectionRange(i, t);
@@ -295,30 +295,30 @@ class H {
295
295
  const J = (s) => s != null && s.matches("input") ? s : s == null ? void 0 : s.querySelector("input");
296
296
  function K(s, i) {
297
297
  var t, e, n, g;
298
- let o;
299
- const h = O(null), d = O(null), p = O(null), r = R(), u = (r == null ? void 0 : r.emit) || ((e = (t = r == null ? void 0 : r.proxy) === null || t === void 0 ? void 0 : t.$emit) === null || e === void 0 ? void 0 : e.bind(r == null ? void 0 : r.proxy)), a = (r == null ? void 0 : r.props) || ((n = r == null ? void 0 : r.proxy) === null || n === void 0 ? void 0 : n.$props), l = $.startsWith("3"), m = l && ((g = r == null ? void 0 : r.attrs.modelModifiers) === null || g === void 0 ? void 0 : g.lazy), v = I(() => a == null ? void 0 : a[l ? "modelValue" : "value"]), b = l ? "update:modelValue" : "input", S = m ? "update:modelValue" : "change";
300
- return x(h, (c) => {
298
+ let a;
299
+ const c = O(null), h = O(null), p = O(null), r = R(), o = (r == null ? void 0 : r.emit) || ((e = (t = r == null ? void 0 : r.proxy) === null || t === void 0 ? void 0 : t.$emit) === null || e === void 0 ? void 0 : e.bind(r == null ? void 0 : r.proxy)), d = (r == null ? void 0 : r.props) || ((n = r == null ? void 0 : r.proxy) === null || n === void 0 ? void 0 : n.$props), l = $.startsWith("3"), u = l && ((g = r == null ? void 0 : r.attrs.modelModifiers) === null || g === void 0 ? void 0 : g.lazy), f = I(() => d == null ? void 0 : d[l ? "modelValue" : "value"]), b = l ? "update:modelValue" : "input", S = u ? "update:modelValue" : "change";
300
+ return x(c, (m) => {
301
301
  var V;
302
- if (c) {
303
- const _ = J((V = c == null ? void 0 : c.$el) !== null && V !== void 0 ? V : c);
304
- _ ? (o = new H({
302
+ if (m) {
303
+ const _ = J((V = m == null ? void 0 : m.$el) !== null && V !== void 0 ? V : m);
304
+ _ ? (a = new H({
305
305
  el: _,
306
306
  options: s,
307
307
  onInput: (F) => {
308
- !m && i !== !1 && v.value !== F.number && (u == null || u(b, F.number)), p.value = F.number, d.value = F.formatted;
308
+ !u && i !== !1 && f.value !== F.number && (o == null || o(b, F.number)), p.value = F.number, h.value = F.formatted;
309
309
  },
310
310
  onChange: (F) => {
311
- i !== !1 && (u == null || u(S, F.number));
311
+ i !== !1 && (o == null || o(S, F.number));
312
312
  }
313
- }), o.setValue(v.value)) : console.error('No input element found. Please make sure that the "inputRef" template ref is properly assigned.');
313
+ }), a.setValue(f.value)) : console.error('No input element found. Please make sure that the "inputRef" template ref is properly assigned.');
314
314
  } else
315
- o = null;
315
+ a = null;
316
316
  }), {
317
- inputRef: h,
317
+ inputRef: c,
318
318
  numberValue: p,
319
- formattedValue: d,
320
- setValue: (c) => o == null ? void 0 : o.setValue(c),
321
- setOptions: (c) => o == null ? void 0 : o.setOptions(c)
319
+ formattedValue: h,
320
+ setValue: (m) => a == null ? void 0 : a.setValue(m),
321
+ setOptions: (m) => a == null ? void 0 : a.setOptions(m)
322
322
  };
323
323
  }
324
324
  const gi = /* @__PURE__ */ A({
@@ -337,9 +337,9 @@ const gi = /* @__PURE__ */ A({
337
337
  },
338
338
  emits: ["update:model-value"],
339
339
  setup(s, { expose: i, emit: t }) {
340
- const e = s, n = {
340
+ const e = {
341
341
  currency: "USD",
342
- currencyDisplay: f.hidden,
342
+ currencyDisplay: y.hidden,
343
343
  precision: 2,
344
344
  hideCurrencySymbolOnFocus: !0,
345
345
  hideGroupingSeparatorOnFocus: !0,
@@ -347,34 +347,34 @@ const gi = /* @__PURE__ */ A({
347
347
  autoDecimalDigits: !0,
348
348
  useGrouping: !0,
349
349
  accountingSign: !1
350
- }, g = L(), o = I(() => ({
351
- ...n,
352
- ...z(e.inputOptions) ? {} : e.inputOptions
353
- })), { inputRef: h, setOptions: d, setValue: p, numberValue: r } = K(o.value, !1);
350
+ }, n = s, g = t, a = L(), c = I(() => ({
351
+ ...e,
352
+ ...z(n.inputOptions) ? {} : n.inputOptions
353
+ })), { inputRef: h, setOptions: p, setValue: r, numberValue: o } = K(c.value, !1);
354
354
  i({ inputEl: h }), x(
355
- () => r.value,
356
- (a) => {
357
- var m;
358
- let l;
359
- Object.is(a, -0) ? typeof o.value.precision == "number" ? l = "-0." + "0".repeat(o.value.precision) : l = "-0." + "0".repeat(((m = o.value.precision) == null ? void 0 : m.min) || 0) : l = typeof a == "number" ? a.toFixed(2) : a, t("update:model-value", l);
355
+ () => o.value,
356
+ (l) => {
357
+ var f;
358
+ let u;
359
+ Object.is(l, -0) ? typeof c.value.precision == "number" ? u = "-0." + "0".repeat(c.value.precision) : u = "-0." + "0".repeat(((f = c.value.precision) == null ? void 0 : f.min) || 0) : u = typeof l == "number" ? l.toFixed(2) : l, g("update:model-value", u);
360
360
  }
361
361
  ), x(
362
- () => e.modelValue,
363
- (a) => {
364
- let l;
365
- typeof a == "string" ? l = parseFloat(a || "0") : l = a, p(l);
362
+ () => n.modelValue,
363
+ (l) => {
364
+ let u;
365
+ typeof l == "string" ? u = parseFloat(l || "0") : u = l, r(u);
366
366
  }
367
367
  ), x(
368
- () => e.inputOptions,
368
+ () => n.inputOptions,
369
369
  () => {
370
- d(o.value);
370
+ p(c.value);
371
371
  }
372
372
  );
373
- const u = I(() => {
374
- const { inputOptions: a, ...l } = e;
375
- return { ...l, ...g };
373
+ const d = I(() => {
374
+ const { inputOptions: l, ...u } = n;
375
+ return { ...u, ...a };
376
376
  });
377
- return (a, l) => (T(), G(j, w(u.value, {
377
+ return (l, u) => (T(), G(j, w(d.value, {
378
378
  ref_key: "inputEl",
379
379
  ref: h,
380
380
  class: "stash-currency-input",