@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.
Files changed (270) hide show
  1. package/dist/Accordion.js +1 -1
  2. package/dist/Accordion.js.map +1 -1
  3. package/dist/Accordion.vue.d.ts +8 -9
  4. package/dist/ActionsDropdown.js.map +1 -1
  5. package/dist/ActionsDropdown.vue.d.ts +7 -8
  6. package/dist/AddressSelect.js +42 -38
  7. package/dist/AddressSelect.js.map +1 -1
  8. package/dist/AddressSelect.vue.d.ts +10 -11
  9. package/dist/Alert.js.map +1 -1
  10. package/dist/Alert.vue.d.ts +6 -7
  11. package/dist/AppNavigationItem.js +2 -2
  12. package/dist/AppNavigationItem.js.map +1 -1
  13. package/dist/AppNavigationItem.vue.d.ts +7 -8
  14. package/dist/AppSidebar.js +42 -42
  15. package/dist/AppSidebar.js.map +1 -1
  16. package/dist/AppSidebar.vue.d.ts +8 -9
  17. package/dist/AppTopbar.js +16 -16
  18. package/dist/AppTopbar.js.map +1 -1
  19. package/dist/AppTopbar.vue.d.ts +8 -9
  20. package/dist/Avatar.js.map +1 -1
  21. package/dist/Avatar.vue.d.ts +7 -8
  22. package/dist/Backdrop.vue.d.ts +3 -5
  23. package/dist/Badge.js +1 -1
  24. package/dist/Badge.js.map +1 -1
  25. package/dist/Badge.vue.d.ts +7 -8
  26. package/dist/Box.vue.d.ts +6 -7
  27. package/dist/Box.vue_vue_type_script_setup_true_lang-69e5176b.js.map +1 -1
  28. package/dist/Button.js.map +1 -1
  29. package/dist/Button.vue.d.ts +7 -8
  30. package/dist/ButtonGroup.js +29 -29
  31. package/dist/ButtonGroup.js.map +1 -1
  32. package/dist/ButtonGroup.vue.d.ts +8 -9
  33. package/dist/Card.js.map +1 -1
  34. package/dist/Card.vue.d.ts +6 -7
  35. package/dist/CardContent.vue.d.ts +3 -5
  36. package/dist/CardFooter.vue.d.ts +3 -5
  37. package/dist/CardHeader.js.map +1 -1
  38. package/dist/CardHeader.vue.d.ts +3 -4
  39. package/dist/CardMedia.js +6 -6
  40. package/dist/CardMedia.js.map +1 -1
  41. package/dist/CardMedia.vue.d.ts +3 -4
  42. package/dist/Carousel.js +249 -249
  43. package/dist/Carousel.js.map +1 -1
  44. package/dist/Carousel.vue.d.ts +9 -9
  45. package/dist/Checkbox.js +27 -27
  46. package/dist/Checkbox.js.map +1 -1
  47. package/dist/Checkbox.vue.d.ts +11 -12
  48. package/dist/ChevronToggle.js +1 -1
  49. package/dist/ChevronToggle.vue.d.ts +8 -9
  50. package/dist/{ChevronToggle.vue_vue_type_script_setup_true_lang-1591294c.js → ChevronToggle.vue_vue_type_script_setup_true_lang-fcdf0c19.js} +11 -11
  51. 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
  52. package/dist/Chip.js +30 -30
  53. package/dist/Chip.js.map +1 -1
  54. package/dist/Chip.vue.d.ts +9 -10
  55. package/dist/ConfirmationCodeInput.js +128 -105
  56. package/dist/ConfirmationCodeInput.js.map +1 -1
  57. package/dist/ConfirmationCodeInput.vue.d.ts +36 -11
  58. package/dist/ContextSwitcher.js +18 -18
  59. package/dist/ContextSwitcher.js.map +1 -1
  60. package/dist/ContextSwitcher.vue.d.ts +9 -10
  61. package/dist/Copy.js.map +1 -1
  62. package/dist/Copy.vue.d.ts +6 -7
  63. package/dist/CurrencyInput.js +93 -93
  64. package/dist/CurrencyInput.js.map +1 -1
  65. package/dist/CurrencyInput.vue.d.ts +10 -11
  66. package/dist/CustomRender.vue.d.ts +3 -15
  67. package/dist/DataView.js +97 -97
  68. package/dist/DataView.js.map +1 -1
  69. package/dist/DataView.vue.d.ts +9 -10
  70. package/dist/DataViewFilters.js +153 -150
  71. package/dist/DataViewFilters.js.map +1 -1
  72. package/dist/DataViewFilters.vue.d.ts +9 -10
  73. package/dist/DataViewSortButton.js.map +1 -1
  74. package/dist/DataViewSortButton.vue.d.ts +6 -7
  75. package/dist/DataViewToolbar.js +27 -27
  76. package/dist/DataViewToolbar.js.map +1 -1
  77. package/dist/DataViewToolbar.vue.d.ts +8 -9
  78. package/dist/DatePicker.js +738 -738
  79. package/dist/DatePicker.js.map +1 -1
  80. package/dist/DatePicker.vue.d.ts +11 -12
  81. package/dist/DescriptionList.js.map +1 -1
  82. package/dist/DescriptionList.vue.d.ts +6 -7
  83. package/dist/DescriptionListDetail.vue.d.ts +3 -5
  84. package/dist/DescriptionListGroup.vue.d.ts +3 -5
  85. package/dist/DescriptionListTerm.vue.d.ts +3 -5
  86. package/dist/Dialog.js +44 -44
  87. package/dist/Dialog.js.map +1 -1
  88. package/dist/Dialog.vue.d.ts +10 -11
  89. package/dist/Divider.vue.d.ts +3 -5
  90. package/dist/Dropdown.js +38 -38
  91. package/dist/Dropdown.js.map +1 -1
  92. package/dist/Dropdown.vue.d.ts +9 -10
  93. package/dist/EmptyState.js +20 -20
  94. package/dist/EmptyState.js.map +1 -1
  95. package/dist/EmptyState.vue.d.ts +6 -7
  96. package/dist/Expand.js +1 -1
  97. package/dist/Expand.vue.d.ts +8 -9
  98. package/dist/{Expand.vue_vue_type_script_setup_true_lang-1751f4a6.js → Expand.vue_vue_type_script_setup_true_lang-0f236267.js} +19 -19
  99. package/dist/Expand.vue_vue_type_script_setup_true_lang-0f236267.js.map +1 -0
  100. package/dist/Field.vue.d.ts +6 -7
  101. package/dist/Field.vue_vue_type_script_setup_true_lang-e1e4ff03.js.map +1 -1
  102. package/dist/FileUpload.js +65 -65
  103. package/dist/FileUpload.js.map +1 -1
  104. package/dist/FileUpload.vue.d.ts +10 -11
  105. package/dist/FilterChip.js +27 -27
  106. package/dist/FilterChip.js.map +1 -1
  107. package/dist/FilterChip.vue.d.ts +8 -9
  108. package/dist/FilterDrawerItem.js +26 -26
  109. package/dist/FilterDrawerItem.js.map +1 -1
  110. package/dist/FilterDrawerItem.vue.d.ts +5 -6
  111. package/dist/FilterDropdown.js +49 -49
  112. package/dist/FilterDropdown.js.map +1 -1
  113. package/dist/FilterDropdown.vue.d.ts +8 -9
  114. package/dist/FilterSelect.js +23 -23
  115. package/dist/FilterSelect.js.map +1 -1
  116. package/dist/FilterSelect.vue.d.ts +8 -9
  117. package/dist/Filters.js +112 -104
  118. package/dist/Filters.js.map +1 -1
  119. package/dist/Filters.vue.d.ts +2204 -65
  120. package/dist/HttpError.js +42 -42
  121. package/dist/HttpError.js.map +1 -1
  122. package/dist/HttpError.vue.d.ts +6 -7
  123. package/dist/Icon.js.map +1 -1
  124. package/dist/Icon.vue.d.ts +7 -8
  125. package/dist/IconLabel.js.map +1 -1
  126. package/dist/IconLabel.vue.d.ts +8 -9
  127. package/dist/Illustration.vue.d.ts +6 -7
  128. package/dist/Illustration.vue_vue_type_script_setup_true_lang-e26c3841.js.map +1 -1
  129. package/dist/Image.js +47 -47
  130. package/dist/Image.js.map +1 -1
  131. package/dist/Image.vue.d.ts +6 -7
  132. package/dist/InlineEdit.js +34 -34
  133. package/dist/InlineEdit.js.map +1 -1
  134. package/dist/InlineEdit.vue.d.ts +9 -10
  135. package/dist/Input.js +35 -35
  136. package/dist/Input.js.map +1 -1
  137. package/dist/Input.vue.d.ts +13 -14
  138. package/dist/InputOptions.js +33 -33
  139. package/dist/InputOptions.js.map +1 -1
  140. package/dist/InputOptions.vue.d.ts +8 -9
  141. package/dist/IntegrationIcon.js.map +1 -1
  142. package/dist/IntegrationIcon.vue.d.ts +7 -8
  143. package/dist/Label.vue.d.ts +6 -7
  144. package/dist/Label.vue_vue_type_script_setup_true_lang-4b02087f.js.map +1 -1
  145. package/dist/LicenseChip.js.map +1 -1
  146. package/dist/LicenseChip.vue.d.ts +6 -7
  147. package/dist/ListItem.vue.d.ts +225 -95
  148. package/dist/ListItemCell.vue.d.ts +4 -16
  149. package/dist/ListView.js +1 -1
  150. package/dist/ListView.vue.d.ts +5072 -470
  151. package/dist/Loading.js +16 -16
  152. package/dist/Loading.js.map +1 -1
  153. package/dist/Loading.vue.d.ts +3 -5
  154. package/dist/Logo.js +1 -1
  155. package/dist/Logo.vue.d.ts +9 -10
  156. package/dist/Logo.vue_vue_type_script_setup_true_lang-2a2597cb.js +196 -0
  157. package/dist/Logo.vue_vue_type_script_setup_true_lang-2a2597cb.js.map +1 -0
  158. package/dist/Menu.vue.d.ts +3 -5
  159. package/dist/MenuItem.vue.d.ts +3 -5
  160. package/dist/Metric.js.map +1 -1
  161. package/dist/Metric.vue.d.ts +6 -7
  162. package/dist/Modal.js +29 -29
  163. package/dist/Modal.js.map +1 -1
  164. package/dist/Modal.vue.d.ts +8 -9
  165. package/dist/Modals.js +8 -7
  166. package/dist/Modals.js.map +1 -1
  167. package/dist/Modals.vue.d.ts +3 -5
  168. package/dist/Module.js.map +1 -1
  169. package/dist/Module.vue.d.ts +7 -8
  170. package/dist/ModuleContent.vue.d.ts +3 -5
  171. package/dist/ModuleFooter.vue.d.ts +3 -5
  172. package/dist/ModuleHeader.js.map +1 -1
  173. package/dist/ModuleHeader.vue.d.ts +6 -7
  174. package/dist/ObfuscateText.js +1 -1
  175. package/dist/ObfuscateText.js.map +1 -1
  176. package/dist/ObfuscateText.vue.d.ts +6 -7
  177. package/dist/PageContent.vue.d.ts +3 -5
  178. package/dist/PageHeader.js.map +1 -1
  179. package/dist/PageHeader.vue.d.ts +6 -7
  180. package/dist/PageNavigation.js +30 -27
  181. package/dist/PageNavigation.js.map +1 -1
  182. package/dist/PageNavigation.vue.d.ts +8 -9
  183. package/dist/Paginate.js +32 -32
  184. package/dist/Paginate.js.map +1 -1
  185. package/dist/Paginate.vue.d.ts +8 -9
  186. package/dist/PlaidLink.js +29 -29
  187. package/dist/PlaidLink.js.map +1 -1
  188. package/dist/PlaidLink.vue.d.ts +11 -12
  189. package/dist/QuickAction.js.map +1 -1
  190. package/dist/QuickAction.vue.d.ts +4 -5
  191. package/dist/Radio.vue.d.ts +20 -1
  192. package/dist/RadioGroup.js +123 -123
  193. package/dist/RadioGroup.js.map +1 -1
  194. package/dist/RadioGroup.vue.d.ts +10 -11
  195. package/dist/RadioNew.js +102 -102
  196. package/dist/RadioNew.js.map +1 -1
  197. package/dist/RadioNew.vue.d.ts +10 -11
  198. package/dist/RangeInput.vue.d.ts +3 -5
  199. package/dist/SearchBar.js +36 -36
  200. package/dist/SearchBar.js.map +1 -1
  201. package/dist/SearchBar.vue.d.ts +9 -10
  202. package/dist/Select.js +792 -774
  203. package/dist/Select.js.map +1 -1
  204. package/dist/Select.vue.d.ts +14 -15
  205. package/dist/SelectStatus.js +27 -27
  206. package/dist/SelectStatus.js.map +1 -1
  207. package/dist/SelectStatus.vue.d.ts +12 -13
  208. package/dist/Skeleton.js.map +1 -1
  209. package/dist/Skeleton.vue.d.ts +7 -8
  210. package/dist/Step.js.map +1 -1
  211. package/dist/Step.vue.d.ts +7 -8
  212. package/dist/Stepper.js +19 -19
  213. package/dist/Stepper.js.map +1 -1
  214. package/dist/Stepper.vue.d.ts +9 -10
  215. package/dist/Switch.js +25 -25
  216. package/dist/Switch.js.map +1 -1
  217. package/dist/Switch.vue.d.ts +11 -12
  218. package/dist/Tab.js +2 -2
  219. package/dist/Tab.vue.d.ts +3 -4
  220. package/dist/{Tab.vue_vue_type_script_setup_true_lang-69d1b046.js → Tab.vue_vue_type_script_setup_true_lang-9aa53203.js} +5 -3
  221. package/dist/Tab.vue_vue_type_script_setup_true_lang-9aa53203.js.map +1 -0
  222. package/dist/Table.js +3 -3
  223. package/dist/Table.js.map +1 -1
  224. package/dist/{Table.keys-cf93df19.js → Table.keys-83e4f09b.js} +11 -11
  225. package/dist/{Table.keys-cf93df19.js.map → Table.keys-83e4f09b.js.map} +1 -1
  226. package/dist/Table.vue.d.ts +6 -7
  227. package/dist/TableCell.js +1 -1
  228. package/dist/TableCell.js.map +1 -1
  229. package/dist/TableCell.vue.d.ts +6 -7
  230. package/dist/TableHeaderCell.js +12 -12
  231. package/dist/TableHeaderCell.js.map +1 -1
  232. package/dist/TableHeaderCell.vue.d.ts +6 -7
  233. package/dist/TableHeaderRow.js +21 -21
  234. package/dist/TableHeaderRow.js.map +1 -1
  235. package/dist/TableHeaderRow.vue.d.ts +8 -9
  236. package/dist/TableRow.js +42 -42
  237. package/dist/TableRow.js.map +1 -1
  238. package/dist/TableRow.vue.d.ts +8 -9
  239. package/dist/Tabs.js +2 -2
  240. package/dist/Tabs.vue.d.ts +8 -9
  241. 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
  242. package/dist/Tabs.vue_used_vue_type_style_index_0_lang.module-3aa36673.js.map +1 -0
  243. package/dist/TextEditor.js +565 -565
  244. package/dist/TextEditor.js.map +1 -1
  245. package/dist/TextEditor.vue.d.ts +12 -13
  246. package/dist/Textarea.js +28 -28
  247. package/dist/Textarea.js.map +1 -1
  248. package/dist/Textarea.vue.d.ts +10 -11
  249. package/dist/Timeline.js.map +1 -1
  250. package/dist/Timeline.vue.d.ts +6 -7
  251. package/dist/TimelineItem.js +21 -21
  252. package/dist/TimelineItem.js.map +1 -1
  253. package/dist/TimelineItem.vue.d.ts +13 -6
  254. package/dist/Toast.js +134 -134
  255. package/dist/Toast.js.map +1 -1
  256. package/dist/Toast.vue.d.ts +6 -7
  257. package/dist/Toasts.vue.d.ts +3 -5
  258. package/dist/components.css +1 -1
  259. package/dist/index.js.map +1 -1
  260. package/dist/tailwind-base.js.map +1 -1
  261. package/dist/usePlaidLink.d.ts +1 -6
  262. package/dist/useScriptTag.d.ts +3 -8
  263. package/dist/useStepper.d.ts +7 -2
  264. package/package.json +1 -1
  265. package/tailwind-base.ts +13 -6
  266. package/dist/Expand.vue_vue_type_script_setup_true_lang-1751f4a6.js.map +0 -1
  267. package/dist/Logo.vue_vue_type_script_setup_true_lang-d7da48a0.js +0 -196
  268. package/dist/Logo.vue_vue_type_script_setup_true_lang-d7da48a0.js.map +0 -1
  269. package/dist/Tab.vue_vue_type_script_setup_true_lang-69d1b046.js.map +0 -1
  270. package/dist/Tabs.vue_used_vue_type_style_index_0_lang.module-2a131332.js.map +0 -1
@@ -1,13 +1,12 @@
1
- import { AllowedComponentProps } from 'vue';
2
- import { ComponentCustomProps } from 'vue';
3
1
  import { ComponentOptionsMixin } from 'vue';
2
+ import { ComponentProvideOptions } from 'vue';
4
3
  import { DateRangeSource } from 'v-calendar/dist/types/src/utils/date/range';
5
4
  import { DateRangeSource as DateRangeSource_2 } from 'v-calendar/dist/types/src/utils/date/range.js';
6
5
  import { DefineComponent } from 'vue';
7
6
  import { ExtractPropTypes } from 'vue';
8
7
  import { PopoverOptions } from 'v-calendar/dist/types/src/utils/popovers';
9
8
  import { PropType } from 'vue';
10
- import { VNodeProps } from 'vue';
9
+ import { PublicProps } from 'vue';
11
10
 
12
11
  declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
13
12
 
@@ -151,7 +150,7 @@ declare interface DatePickerProps {
151
150
  addBottomSpace?: boolean;
152
151
  }
153
152
 
154
- declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DatePickerProps>, {
153
+ declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DatePickerProps>, {
155
154
  availableDates: undefined;
156
155
  addBottomSpace: boolean;
157
156
  disabled: boolean;
@@ -173,10 +172,10 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
173
172
  placeholder: undefined;
174
173
  enableTeleport: boolean;
175
174
  timeZone: string;
176
- }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
175
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
177
176
  "update:model-value": (date: string | number | Date) => void;
178
177
  blur: () => void;
179
- }, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DatePickerProps>, {
178
+ }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DatePickerProps>, {
180
179
  availableDates: undefined;
181
180
  addBottomSpace: boolean;
182
181
  disabled: boolean;
@@ -198,21 +197,21 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
198
197
  placeholder: undefined;
199
198
  enableTeleport: boolean;
200
199
  timeZone: string;
201
- }>>> & {
200
+ }>>> & Readonly<{
202
201
  onBlur?: (() => any) | undefined;
203
202
  "onUpdate:model-value"?: ((date: string | number | Date) => any) | undefined;
204
- }, {
203
+ }>, {
205
204
  name: string;
205
+ disabled: boolean;
206
+ mode: "time" | "date" | "dateTime";
206
207
  label: string;
207
208
  id: string;
208
- disabled: boolean;
209
- placeholder: string;
210
209
  addBottomSpace: boolean;
211
210
  errorText: string;
212
211
  hintText: string;
212
+ placeholder: string;
213
213
  modelValue: string;
214
214
  enableTeleport: boolean;
215
- mode: "time" | "date" | "dateTime";
216
215
  timeZone: string;
217
216
  format: string;
218
217
  availableDates: DateRangeSource_2[];
@@ -229,7 +228,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
229
228
  month: number;
230
229
  year: number;
231
230
  };
232
- }, {}>, {
231
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
233
232
  hint?(_: {}): any;
234
233
  }>;
235
234
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"DescriptionList.js","sources":["../src/components/DescriptionList/DescriptionList.types.ts","../src/components/DescriptionList/DescriptionList.vue"],"sourcesContent":["export enum DescriptionListVariant {\n Columns = 'columns',\n Inline = 'inline',\n Stacked = 'stacked',\n SpaceBetween = 'space-between',\n}\n\nexport type DescriptionListVariants = `${DescriptionListVariant}`;\n\n/**\n * Description List provide/inject keys\n */\nexport interface DescriptionListInjection {\n /**\n * Divide the list groups with a border.\n */\n divide?: boolean;\n /**\n * Different variants of description lists.\n */\n variant?: DescriptionListVariants;\n}\n","<script lang=\"ts\">\n import type { DescriptionListVariants } from './DescriptionList.types';\n\n export * from './DescriptionList.keys';\n export * from './DescriptionList.types';\n\n export interface DescriptionListProps {\n /**\n * Divide the list groups with a border.\n */\n divide?: boolean;\n /**\n * Different variants of description lists.\n */\n variant?: DescriptionListVariants;\n }\n</script>\n\n<script setup lang=\"ts\">\n import { provide } from 'vue';\n\n import { DESCRIPTION_LIST_INJECTION } from './DescriptionList.keys';\n\n const props = withDefaults(defineProps<DescriptionListProps>(), {\n variant: 'columns',\n divide: false,\n });\n\n provide(DESCRIPTION_LIST_INJECTION.key, { divide: props.divide, variant: props.variant });\n</script>\n\n<template>\n <dl\n :data-variant=\"props.variant\"\n class=\"stash-description-list tw-text-sm\"\n :class=\"{\n 'tw-divide-y tw-divide-ice-200': props.divide,\n }\"\n data-test=\"stash-description-list\"\n >\n <!-- @slot Default slot, for rendering a description list -->\n <slot></slot>\n </dl>\n</template>\n./keys\n"],"names":["DescriptionListVariant","provide","DESCRIPTION_LIST_INJECTION","props"],"mappings":";;AAAY,IAAAA,sBAAAA,OACVA,EAAA,UAAU,WACVA,EAAA,SAAS,UACTA,EAAA,UAAU,WACVA,EAAA,eAAe,iBAJLA,IAAAA,KAAA,CAAA,CAAA;;;;;;;;;AC4BF,WAAAC,EAAAC,EAA2B,KAAK,EAAE,QAAQC,EAAM,QAAQ,SAASA,EAAM,QAAA,CAAS;;;;;;;;;;;"}
1
+ {"version":3,"file":"DescriptionList.js","sources":["../src/components/DescriptionList/DescriptionList.types.ts","../src/components/DescriptionList/DescriptionList.vue"],"sourcesContent":["export enum DescriptionListVariant {\n Columns = 'columns',\n Inline = 'inline',\n Stacked = 'stacked',\n SpaceBetween = 'space-between',\n}\n\nexport type DescriptionListVariants = `${DescriptionListVariant}`;\n\n/**\n * Description List provide/inject keys\n */\nexport interface DescriptionListInjection {\n /**\n * Divide the list groups with a border.\n */\n divide?: boolean;\n /**\n * Different variants of description lists.\n */\n variant?: DescriptionListVariants;\n}\n","<script lang=\"ts\">\n import type { DescriptionListVariants } from './DescriptionList.types';\n\n export * from './DescriptionList.keys';\n export * from './DescriptionList.types';\n\n export interface DescriptionListProps {\n /**\n * Divide the list groups with a border.\n */\n divide?: boolean;\n /**\n * Different variants of description lists.\n */\n variant?: DescriptionListVariants;\n }\n</script>\n\n<script setup lang=\"ts\">\n import { provide } from 'vue';\n\n import { DESCRIPTION_LIST_INJECTION } from './DescriptionList.keys';\n\n const props = withDefaults(defineProps<DescriptionListProps>(), {\n variant: 'columns',\n divide: false,\n });\n\n provide(DESCRIPTION_LIST_INJECTION.key, { divide: props.divide, variant: props.variant });\n</script>\n\n<template>\n <dl\n :data-variant=\"props.variant\"\n class=\"stash-description-list tw-text-sm\"\n :class=\"{\n 'tw-divide-y tw-divide-ice-200': props.divide,\n }\"\n data-test=\"stash-description-list\"\n >\n <!-- @slot Default slot, for rendering a description list -->\n <slot></slot>\n </dl>\n</template>\n./keys\n"],"names":["DescriptionListVariant","props","__props","provide","DESCRIPTION_LIST_INJECTION"],"mappings":";;AAAY,IAAAA,sBAAAA,OACVA,EAAA,UAAU,WACVA,EAAA,SAAS,UACTA,EAAA,UAAU,WACVA,EAAA,eAAe,iBAJLA,IAAAA,KAAA,CAAA,CAAA;;;;;;;;ACuBV,UAAMC,IAAQC;AAKN,WAAAC,EAAAC,EAA2B,KAAK,EAAE,QAAQH,EAAM,QAAQ,SAASA,EAAM,QAAA,CAAS;;;;;;;;;;;"}
@@ -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 { InjectionKey } from 'vue';
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
 
@@ -34,16 +33,16 @@ declare type __VLS_WithTemplateSlots<T, S> = T & {
34
33
  };
35
34
  };
36
35
 
37
- declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DescriptionListProps>, {
36
+ declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DescriptionListProps>, {
38
37
  variant: string;
39
38
  divide: boolean;
40
- }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DescriptionListProps>, {
39
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DescriptionListProps>, {
41
40
  variant: string;
42
41
  divide: boolean;
43
- }>>>, {
42
+ }>>> & Readonly<{}>, {
44
43
  variant: "inline" | "stacked" | "columns" | "space-between";
45
44
  divide: boolean;
46
- }, {}>, {
45
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
47
46
  default?(_: {}): any;
48
47
  }>;
49
48
  export default _default;
@@ -1,9 +1,7 @@
1
- import { AllowedComponentProps } from 'vue';
2
- import { ComponentCustomProps } from 'vue';
3
1
  import { ComponentOptionsMixin } from 'vue';
2
+ import { ComponentProvideOptions } from 'vue';
4
3
  import { DefineComponent } from 'vue';
5
- import { ExtractPropTypes } from 'vue';
6
- import { VNodeProps } from 'vue';
4
+ import { PublicProps } from 'vue';
7
5
 
8
6
  declare type __VLS_WithTemplateSlots<T, S> = T & {
9
7
  new (): {
@@ -11,7 +9,7 @@ declare type __VLS_WithTemplateSlots<T, S> = T & {
11
9
  };
12
10
  };
13
11
 
14
- declare const _default: __VLS_WithTemplateSlots<DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{}>>, {}, {}>, {
12
+ declare const _default: __VLS_WithTemplateSlots<DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
15
13
  default?(_: {}): any;
16
14
  }>;
17
15
  export default _default;
@@ -1,9 +1,7 @@
1
- import { AllowedComponentProps } from 'vue';
2
- import { ComponentCustomProps } from 'vue';
3
1
  import { ComponentOptionsMixin } from 'vue';
2
+ import { ComponentProvideOptions } from 'vue';
4
3
  import { DefineComponent } from 'vue';
5
- import { ExtractPropTypes } from 'vue';
6
- import { VNodeProps } from 'vue';
4
+ import { PublicProps } from 'vue';
7
5
 
8
6
  declare type __VLS_WithTemplateSlots<T, S> = T & {
9
7
  new (): {
@@ -11,7 +9,7 @@ declare type __VLS_WithTemplateSlots<T, S> = T & {
11
9
  };
12
10
  };
13
11
 
14
- declare const _default: __VLS_WithTemplateSlots<DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{}>>, {}, {}>, {
12
+ declare const _default: __VLS_WithTemplateSlots<DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
15
13
  default?(_: {}): any;
16
14
  }>;
17
15
  export default _default;
@@ -1,9 +1,7 @@
1
- import { AllowedComponentProps } from 'vue';
2
- import { ComponentCustomProps } from 'vue';
3
1
  import { ComponentOptionsMixin } from 'vue';
2
+ import { ComponentProvideOptions } from 'vue';
4
3
  import { DefineComponent } from 'vue';
5
- import { ExtractPropTypes } from 'vue';
6
- import { VNodeProps } from 'vue';
4
+ import { PublicProps } from 'vue';
7
5
 
8
6
  declare type __VLS_WithTemplateSlots<T, S> = T & {
9
7
  new (): {
@@ -11,7 +9,7 @@ declare type __VLS_WithTemplateSlots<T, S> = T & {
11
9
  };
12
10
  };
13
11
 
14
- declare const _default: __VLS_WithTemplateSlots<DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{}>>, {}, {}>, {
12
+ declare const _default: __VLS_WithTemplateSlots<DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
15
13
  default?(_: {}): any;
16
14
  }>;
17
15
  export default _default;
package/dist/Dialog.js CHANGED
@@ -1,19 +1,19 @@
1
- import { defineComponent as z, useSlots as A, useAttrs as H, useCssModule as L, ref as S, computed as s, watchEffect as q, nextTick as P, openBlock as l, createBlock as f, Transition as Y, withCtx as m, createElementBlock as p, mergeProps as j, unref as e, withKeys as F, createElementVNode as a, normalizeClass as o, createCommentVNode as r, toDisplayString as _, renderSlot as G, createTextVNode as B, createVNode as J } from "vue";
1
+ import { defineComponent as H, useSlots as K, useAttrs as L, useCssModule as q, ref as S, computed as s, watchEffect as P, nextTick as Y, openBlock as l, createBlock as f, Transition as j, withCtx as m, createElementBlock as p, mergeProps as F, unref as e, withKeys as G, createElementVNode as a, normalizeClass as o, createCommentVNode as r, toDisplayString as _, renderSlot as J, createTextVNode as B, createVNode as O } from "vue";
2
2
  import y from "lodash-es/capitalize";
3
- import O from "lodash-es/uniqueId";
3
+ import Q from "lodash-es/uniqueId";
4
4
  import { S as I, b as g, a as D } from "./statusLevels-a8b041f4.js";
5
- import { t as d } from "./locale.js";
5
+ import { t as c } from "./locale.js";
6
6
  import M from "./Button.js";
7
- import Q from "./Icon.js";
8
- import { _ as R } from "./_plugin-vue_export-helper-dad06003.js";
7
+ import R from "./Icon.js";
8
+ import { _ as U } from "./_plugin-vue_export-helper-dad06003.js";
9
9
  import "lodash-es/get";
10
10
  import "./Button.vue_used_vue_type_style_index_0_lang.module-a9290468.js";
11
11
  import "./index-9e1095ef.js";
12
12
  import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
13
- const U = ["open", "aria-labelledby", "data-test", "onKeydown"], W = ["id"], X = {
13
+ const W = ["open", "aria-labelledby", "data-test"], X = ["id"], tt = {
14
14
  key: 0,
15
15
  class: "tw-mb-0"
16
- }, tt = ["innerHTML"], et = { class: "tw-text-right" }, ot = /* @__PURE__ */ z({
16
+ }, et = ["innerHTML"], ot = { class: "tw-text-right" }, at = /* @__PURE__ */ H({
17
17
  name: "ll-dialog",
18
18
  inheritAttrs: !1,
19
19
  __name: "Dialog",
@@ -21,37 +21,37 @@ const U = ["open", "aria-labelledby", "data-test", "onKeydown"], W = ["id"], X =
21
21
  open: { type: Boolean, default: !1 },
22
22
  disabled: { type: Boolean, default: !1 },
23
23
  dangerZone: { type: Boolean, default: !1 },
24
- header: { default: d("ll.areYouSure") },
24
+ header: { default: c("ll.areYouSure") },
25
25
  description: { default: "" },
26
- cancelText: { default: d("ll.cancel") },
26
+ cancelText: { default: c("ll.cancel") },
27
27
  confirmText: { default: "" },
28
28
  alert: { type: Boolean, default: !1 },
29
29
  status: { default: void 0 }
30
30
  },
31
31
  emits: ["update:open", "cancel"],
32
- setup(E, { emit: b }) {
33
- const t = E, h = A(), c = H(), n = L(), k = O("dialog-header-"), i = S(!1), v = S(), N = s(() => t.confirmText || (t.alert ? d("ll.okay") : d("ll.confirm"))), w = s(() => !!h.default || t.description), V = s(
32
+ setup(E, { emit: N }) {
33
+ const t = E, b = N, h = K(), d = L(), n = q(), k = Q("dialog-header-"), i = S(!1), v = S(), V = s(() => t.confirmText || (t.alert ? c("ll.okay") : c("ll.confirm"))), w = s(() => !!h.default || t.description), $ = s(
34
34
  () => t.status ? I[y(t.status)] : I.Info
35
- ), $ = s(
35
+ ), Z = s(
36
36
  () => t.status ? g[y(t.status)] : g.Info
37
37
  ), x = s(
38
38
  () => t.status ? D[y(t.status)] : D.Info
39
- ), K = s(() => t.dangerZone || t.status === g.Error);
39
+ ), z = s(() => t.dangerZone || t.status === g.Error);
40
40
  function C() {
41
41
  b("update:open", !1), b("cancel");
42
42
  }
43
- async function Z(u) {
43
+ async function A(u) {
44
44
  i.value = !0;
45
- const T = c.onConfirm;
45
+ const T = d.onConfirm;
46
46
  await T(u), i.value = !1;
47
47
  }
48
- return q(() => {
49
- t.open && P(function() {
48
+ return P(() => {
49
+ t.open && Y(function() {
50
50
  v.value.focus();
51
51
  });
52
- }), (u, T) => (l(), f(Y, { name: "fade" }, {
52
+ }), (u, T) => (l(), f(j, { name: "fade" }, {
53
53
  default: m(() => [
54
- t.open ? (l(), p("dialog", j({
54
+ t.open ? (l(), p("dialog", F({
55
55
  key: 0,
56
56
  ref_key: "root",
57
57
  ref: v,
@@ -60,9 +60,9 @@ const U = ["open", "aria-labelledby", "data-test", "onKeydown"], W = ["id"], X =
60
60
  "aria-labelledby": e(k),
61
61
  "aria-modal": "true",
62
62
  class: ["stash-dialog", e(n).dialog],
63
- "data-test": e(c)["data-test"] || "ll-dialog"
64
- }, e(c), {
65
- onKeydown: F(C, ["esc"])
63
+ "data-test": e(d)["data-test"] || "ll-dialog"
64
+ }, e(d), {
65
+ onKeydown: G(C, ["esc"])
66
66
  }), [
67
67
  a("div", {
68
68
  class: o(["stash-dialog__body", [
@@ -81,30 +81,30 @@ const U = ["open", "aria-labelledby", "data-test", "onKeydown"], W = ["id"], X =
81
81
  a("div", {
82
82
  class: o(["tw-flex tw-items-center", w.value && "tw-mb-1.5"])
83
83
  }, [
84
- t.status ? (l(), f(Q, {
84
+ t.status ? (l(), f(R, {
85
85
  key: 0,
86
86
  "data-test": "dialog-status-icon",
87
- name: V.value,
88
- title: $.value,
87
+ name: $.value,
88
+ title: Z.value,
89
89
  class: o(`tw-text-${x.value}`)
90
90
  }, null, 8, ["name", "title", "class"])) : r("", !0),
91
91
  a("h3", {
92
92
  id: e(k),
93
93
  class: o({ "tw-ml-1.5 tw-mt-px": t.status })
94
- }, _(t.header), 11, W)
94
+ }, _(t.header), 11, X)
95
95
  ], 2),
96
- w.value ? (l(), p("p", X, [
97
- e(h).default ? G(u.$slots, "default", { key: 0 }) : (l(), p("span", {
96
+ w.value ? (l(), p("p", tt, [
97
+ e(h).default ? J(u.$slots, "default", { key: 0 }) : (l(), p("span", {
98
98
  key: 1,
99
99
  innerHTML: t.description
100
- }, null, 8, tt))
100
+ }, null, 8, et))
101
101
  ])) : r("", !0)
102
102
  ], 2),
103
103
  a("footer", {
104
104
  class: o(["stash-dialog__footer", e(n).footer]),
105
105
  "data-test": "stash-dialog|footer"
106
106
  }, [
107
- a("div", et, [
107
+ a("div", ot, [
108
108
  a("div", {
109
109
  class: o({ "button-grid": !t.alert })
110
110
  }, [
@@ -119,17 +119,17 @@ const U = ["open", "aria-labelledby", "data-test", "onKeydown"], W = ["id"], X =
119
119
  ]),
120
120
  _: 1
121
121
  })),
122
- J(M, {
122
+ O(M, {
123
123
  "data-test": "button|confirm",
124
124
  disabled: t.disabled || i.value,
125
- color: K.value ? "red" : "blue",
125
+ color: z.value ? "red" : "blue",
126
126
  class: o({
127
127
  "tw-w-full": t.alert
128
128
  }),
129
- onClick: Z
129
+ onClick: A
130
130
  }, {
131
131
  default: m(() => [
132
- B(_(N.value), 1)
132
+ B(_(V.value), 1)
133
133
  ]),
134
134
  _: 1
135
135
  }, 8, ["disabled", "color", "class"])
@@ -137,21 +137,21 @@ const U = ["open", "aria-labelledby", "data-test", "onKeydown"], W = ["id"], X =
137
137
  ])
138
138
  ], 2)
139
139
  ], 2)
140
- ], 16, U)) : r("", !0)
140
+ ], 16, W)) : r("", !0)
141
141
  ]),
142
142
  _: 3
143
143
  }));
144
144
  }
145
- }), at = "_dialog_17klt_2", st = "_body_17klt_19", lt = "_grey_17klt_32", nt = "_content_17klt_42", rt = "_footer_17klt_47", dt = {
146
- dialog: at,
147
- body: st,
148
- grey: lt,
149
- content: nt,
150
- footer: rt
151
- }, ct = {
145
+ }), st = "_dialog_17klt_2", lt = "_body_17klt_19", nt = "_grey_17klt_32", rt = "_content_17klt_42", ct = "_footer_17klt_47", dt = {
146
+ dialog: st,
147
+ body: lt,
148
+ grey: nt,
149
+ content: rt,
150
+ footer: ct
151
+ }, it = {
152
152
  $style: dt
153
- }, wt = /* @__PURE__ */ R(ot, [["__cssModules", ct]]);
153
+ }, xt = /* @__PURE__ */ U(at, [["__cssModules", it]]);
154
154
  export {
155
- wt as default
155
+ xt as default
156
156
  };
157
157
  //# sourceMappingURL=Dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","sources":["../src/components/Dialog/Dialog.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import capitalize from 'lodash-es/capitalize';\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, nextTick, ref, useAttrs, useCssModule, useSlots, watchEffect } from 'vue';\n\n import {\n StatusColor,\n StatusColors,\n StatusIcon,\n StatusIcons,\n StatusSeverities,\n StatusSeverity,\n } from '../../../types/statusLevels';\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import Icon from '../Icon/Icon.vue';\n\n export interface DialogProps {\n /**\n * Shows or hides the dialog.\n * Usage: v-model:open=\"isOpen\"\n */\n open?: boolean;\n\n /**\n * Whether the confirmation button is enabled or not.\n */\n disabled?: boolean;\n\n /**\n * Is this a dangerous action? Will turn the confirmation button red.\n */\n dangerZone?: boolean;\n\n /**\n * Header text.\n */\n header?: string;\n\n /**\n * Description text.\n */\n description?: string;\n\n /**\n * Cancel button text.\n */\n cancelText?: string;\n\n /**\n * Confirm button text.\n */\n confirmText?: string;\n\n /**\n * Treats it like an Alert Dialog, with only the confirmation button showing.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Window/alert}\n */\n alert?: boolean;\n\n /**\n * Adds a top accent border and icon next to the header.\n * This behaves similarly to the Alert component in respect to the levels, icons, and colors\n * passing `error` will treat the dialog the same as `dangerZone`\n */\n status?: StatusSeverity;\n }\n\n const props = withDefaults(defineProps<DialogProps>(), {\n open: false,\n disabled: false,\n dangerZone: false,\n header: t('ll.areYouSure'),\n description: '',\n cancelText: t('ll.cancel'),\n confirmText: '',\n alert: false,\n status: undefined,\n });\n\n defineOptions({\n name: 'll-dialog',\n inheritAttrs: false,\n });\n\n const emits =\n defineEmits<{\n (e: 'update:open', value: boolean): void;\n (e: 'cancel'): void;\n }>();\n\n const slots = useSlots();\n const attrs = useAttrs();\n const classes = useCssModule();\n const headerId = uniqueId('dialog-header-');\n\n const isConfirming = ref(false);\n const root = ref();\n\n // Set the default confirm button text to \"Confirm\".\n // If the `alert` prop is true, the default text is \"Okay\".\n // If the `confirmText` prop is provided, `confirmText` is used whether the alert prop is true.\n const modifiedConfirmText = computed(() => props.confirmText || (props.alert ? t('ll.okay') : t('ll.confirm')));\n\n const hasDescription = computed(() => !!slots.default || props.description);\n\n const statusIcon = computed<StatusIcon>(() =>\n props.status ? StatusIcons[capitalize(props.status)] : StatusIcons.Info,\n );\n const statusTitle = computed<StatusSeverity>(() =>\n props.status ? StatusSeverities[capitalize(props.status)] : StatusSeverities.Info,\n );\n const statusColor = computed<StatusColor>(() =>\n props.status ? StatusColors[capitalize(props.status)] : StatusColors.Info,\n );\n\n const computedDangerZone = computed(() => props.dangerZone || props.status === StatusSeverities.Error);\n\n function cancel() {\n emits('update:open', false);\n emits('cancel');\n }\n\n async function handleConfirm(event: Event) {\n isConfirming.value = true;\n\n // useAttrs returns a Record<string, unknown> type, which causes\n // TS errors when trying to call a passed listener\n const onConfirm = attrs.onConfirm as (event: Event) => void;\n\n // Call the parent confirm listener and await it. Using Async/Await lets\n // us await even non-promises. Pass the event so modifiers can work.\n await onConfirm(event);\n isConfirming.value = false;\n }\n\n watchEffect(() => {\n if (props.open) {\n // Move focus to confirm button\n nextTick(function () {\n root.value.focus();\n });\n }\n });\n</script>\n\n<template>\n <transition name=\"fade\">\n <dialog\n v-if=\"props.open\"\n ref=\"root\"\n :open=\"props.open\"\n tabindex=\"0\"\n :aria-labelledby=\"headerId\"\n aria-modal=\"true\"\n class=\"stash-dialog\"\n :class=\"classes.dialog\"\n :data-test=\"attrs['data-test'] || 'll-dialog'\"\n v-bind=\"attrs\"\n @keydown.esc=\"cancel\"\n >\n <div\n class=\"stash-dialog__body\"\n :class=\"[\n classes.body,\n `tw-border-${statusColor}`,\n {\n 'tw-border-t-6': props.status,\n },\n ]\"\n data-test=\"stash-dialog|body\"\n >\n <div class=\"stash-dialog__body__content\" :class=\"classes.content\" data-test=\"stash-dialog|body-content\">\n <div class=\"tw-flex tw-items-center\" :class=\"hasDescription && 'tw-mb-1.5'\">\n <Icon\n v-if=\"props.status\"\n data-test=\"dialog-status-icon\"\n :name=\"statusIcon\"\n :title=\"statusTitle\"\n :class=\"`tw-text-${statusColor}`\"\n />\n <h3 :id=\"headerId\" :class=\"{ 'tw-ml-1.5 tw-mt-px': props.status }\">{{ props.header }}</h3>\n </div>\n\n <p v-if=\"hasDescription\" class=\"tw-mb-0\">\n <slot v-if=\"slots.default\"></slot>\n <!-- eslint-disable-next-line vue/no-v-html -->\n <span v-else v-html=\"props.description\"></span>\n </p>\n </div>\n\n <footer class=\"stash-dialog__footer\" :class=\"classes.footer\" data-test=\"stash-dialog|footer\">\n <div class=\"tw-text-right\">\n <div :class=\"{ 'button-grid': !props.alert }\">\n <Button v-if=\"!props.alert\" data-test=\"button|cancel\" secondary @click=\"cancel\">\n {{ props.cancelText }}\n </Button>\n\n <Button\n data-test=\"button|confirm\"\n :disabled=\"props.disabled || isConfirming\"\n :color=\"computedDangerZone ? 'red' : 'blue'\"\n :class=\"{\n 'tw-w-full': props.alert,\n }\"\n @click=\"handleConfirm\"\n >\n {{ modifiedConfirmText }}\n </Button>\n </div>\n </div>\n </footer>\n </div>\n </dialog>\n </transition>\n</template>\n\n<style module>\n .dialog {\n background: rgb(0 0 0 / 30%);\n bottom: 0;\n display: flex;\n flex-direction: column;\n left: 0;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n place-content: center;\n position: fixed;\n right: 0;\n top: 0;\n z-index: theme('zIndex.dialog');\n width: 100%;\n height: 100vh;\n }\n\n .body {\n @apply tw-shadow;\n\n background: var(--color-white);\n color: var(--color-ice-700);\n display: flex;\n flex-direction: column;\n margin: 0 auto;\n max-height: 100vh;\n max-width: 360px;\n transition: transform theme('transitionDuration.150') theme('transitionTimingFunction.swing');\n width: 100%;\n\n &.grey {\n background: var(--color-ice-200);\n border-radius: theme('borderRadius.DEFAULT');\n }\n\n @media screen('md') {\n border-radius: theme('borderRadius.DEFAULT');\n }\n }\n\n .content {\n flex-grow: 1;\n padding: theme('spacing.6') var(--grid-gutter);\n }\n\n .footer {\n background: var(--color-ice-200);\n border-top: theme('borderWidth.DEFAULT') solid var(--color-ice-500);\n display: initial; /* TEMP. Will need to fix marketplace `footer` style */\n padding: theme('spacing.6') var(--grid-gutter);\n\n @media screen('md') {\n border-bottom-left-radius: theme('borderRadius.DEFAULT');\n border-bottom-right-radius: theme('borderRadius.DEFAULT');\n }\n }\n\n :global(.fade-enter-from),\n :global(.fade-leave-active) {\n .body {\n transform: translate3d(0, theme('spacing.3'), 0);\n }\n }\n</style>\n"],"names":["slots","useSlots","attrs","useAttrs","classes","useCssModule","headerId","uniqueId","isConfirming","ref","root","modifiedConfirmText","computed","props","t","hasDescription","statusIcon","StatusIcons","capitalize","statusTitle","StatusSeverities","statusColor","StatusColors","computedDangerZone","cancel","emits","handleConfirm","event","onConfirm","watchEffect","nextTick"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4FQA,IAAQC,KACRC,IAAQC,KACRC,IAAUC,KACVC,IAAWC,EAAS,gBAAgB,GAEpCC,IAAeC,EAAI,EAAK,GACxBC,IAAOD,KAKPE,IAAsBC,EAAS,MAAMC,EAAM,gBAAgBA,EAAM,QAAQC,EAAE,SAAS,IAAIA,EAAE,YAAY,EAAE,GAExGC,IAAiBH,EAAS,MAAM,CAAC,CAACZ,EAAM,WAAWa,EAAM,WAAW,GAEpEG,IAAaJ;AAAA,MAAqB,MACtCC,EAAM,SAASI,EAAYC,EAAWL,EAAM,MAAM,CAAC,IAAII,EAAY;AAAA,IAAA,GAE/DE,IAAcP;AAAA,MAAyB,MAC3CC,EAAM,SAASO,EAAiBF,EAAWL,EAAM,MAAM,CAAC,IAAIO,EAAiB;AAAA,IAAA,GAEzEC,IAAcT;AAAA,MAAsB,MACxCC,EAAM,SAASS,EAAaJ,EAAWL,EAAM,MAAM,CAAC,IAAIS,EAAa;AAAA,IAAA,GAGjEC,IAAqBX,EAAS,MAAMC,EAAM,cAAcA,EAAM,WAAWO,EAAiB,KAAK;AAErG,aAASI,IAAS;AAChB,MAAAC,EAAM,eAAe,EAAK,GAC1BA,EAAM,QAAQ;AAAA,IAChB;AAEA,mBAAeC,EAAcC,GAAc;AACzC,MAAAnB,EAAa,QAAQ;AAIrB,YAAMoB,IAAY1B,EAAM;AAIxB,YAAM0B,EAAUD,CAAK,GACrBnB,EAAa,QAAQ;AAAA,IACvB;AAEA,WAAAqB,EAAY,MAAM;AAChB,MAAIhB,EAAM,QAERiB,EAAS,WAAY;AACnB,QAAApB,EAAK,MAAM;MAAM,CAClB;AAAA,IACH,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Dialog.js","sources":["../src/components/Dialog/Dialog.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import capitalize from 'lodash-es/capitalize';\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, nextTick, ref, useAttrs, useCssModule, useSlots, watchEffect } from 'vue';\n\n import {\n StatusColor,\n StatusColors,\n StatusIcon,\n StatusIcons,\n StatusSeverities,\n StatusSeverity,\n } from '../../../types/statusLevels';\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import Icon from '../Icon/Icon.vue';\n\n export interface DialogProps {\n /**\n * Shows or hides the dialog.\n * Usage: v-model:open=\"isOpen\"\n */\n open?: boolean;\n\n /**\n * Whether the confirmation button is enabled or not.\n */\n disabled?: boolean;\n\n /**\n * Is this a dangerous action? Will turn the confirmation button red.\n */\n dangerZone?: boolean;\n\n /**\n * Header text.\n */\n header?: string;\n\n /**\n * Description text.\n */\n description?: string;\n\n /**\n * Cancel button text.\n */\n cancelText?: string;\n\n /**\n * Confirm button text.\n */\n confirmText?: string;\n\n /**\n * Treats it like an Alert Dialog, with only the confirmation button showing.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Window/alert}\n */\n alert?: boolean;\n\n /**\n * Adds a top accent border and icon next to the header.\n * This behaves similarly to the Alert component in respect to the levels, icons, and colors\n * passing `error` will treat the dialog the same as `dangerZone`\n */\n status?: StatusSeverity;\n }\n\n const props = withDefaults(defineProps<DialogProps>(), {\n open: false,\n disabled: false,\n dangerZone: false,\n header: t('ll.areYouSure'),\n description: '',\n cancelText: t('ll.cancel'),\n confirmText: '',\n alert: false,\n status: undefined,\n });\n\n defineOptions({\n name: 'll-dialog',\n inheritAttrs: false,\n });\n\n const emits = defineEmits<{\n (e: 'update:open', value: boolean): void;\n (e: 'cancel'): void;\n }>();\n\n const slots = useSlots();\n const attrs = useAttrs();\n const classes = useCssModule();\n const headerId = uniqueId('dialog-header-');\n\n const isConfirming = ref(false);\n const root = ref();\n\n // Set the default confirm button text to \"Confirm\".\n // If the `alert` prop is true, the default text is \"Okay\".\n // If the `confirmText` prop is provided, `confirmText` is used whether the alert prop is true.\n const modifiedConfirmText = computed(() => props.confirmText || (props.alert ? t('ll.okay') : t('ll.confirm')));\n\n const hasDescription = computed(() => !!slots.default || props.description);\n\n const statusIcon = computed<StatusIcon>(() =>\n props.status ? StatusIcons[capitalize(props.status)] : StatusIcons.Info,\n );\n const statusTitle = computed<StatusSeverity>(() =>\n props.status ? StatusSeverities[capitalize(props.status)] : StatusSeverities.Info,\n );\n const statusColor = computed<StatusColor>(() =>\n props.status ? StatusColors[capitalize(props.status)] : StatusColors.Info,\n );\n\n const computedDangerZone = computed(() => props.dangerZone || props.status === StatusSeverities.Error);\n\n function cancel() {\n emits('update:open', false);\n emits('cancel');\n }\n\n async function handleConfirm(event: Event) {\n isConfirming.value = true;\n\n // useAttrs returns a Record<string, unknown> type, which causes\n // TS errors when trying to call a passed listener\n const onConfirm = attrs.onConfirm as (event: Event) => void;\n\n // Call the parent confirm listener and await it. Using Async/Await lets\n // us await even non-promises. Pass the event so modifiers can work.\n await onConfirm(event);\n isConfirming.value = false;\n }\n\n watchEffect(() => {\n if (props.open) {\n // Move focus to confirm button\n nextTick(function () {\n root.value.focus();\n });\n }\n });\n</script>\n\n<template>\n <transition name=\"fade\">\n <dialog\n v-if=\"props.open\"\n ref=\"root\"\n :open=\"props.open\"\n tabindex=\"0\"\n :aria-labelledby=\"headerId\"\n aria-modal=\"true\"\n class=\"stash-dialog\"\n :class=\"classes.dialog\"\n :data-test=\"attrs['data-test'] || 'll-dialog'\"\n v-bind=\"attrs\"\n @keydown.esc=\"cancel\"\n >\n <div\n class=\"stash-dialog__body\"\n :class=\"[\n classes.body,\n `tw-border-${statusColor}`,\n {\n 'tw-border-t-6': props.status,\n },\n ]\"\n data-test=\"stash-dialog|body\"\n >\n <div class=\"stash-dialog__body__content\" :class=\"classes.content\" data-test=\"stash-dialog|body-content\">\n <div class=\"tw-flex tw-items-center\" :class=\"hasDescription && 'tw-mb-1.5'\">\n <Icon\n v-if=\"props.status\"\n data-test=\"dialog-status-icon\"\n :name=\"statusIcon\"\n :title=\"statusTitle\"\n :class=\"`tw-text-${statusColor}`\"\n />\n <h3 :id=\"headerId\" :class=\"{ 'tw-ml-1.5 tw-mt-px': props.status }\">{{ props.header }}</h3>\n </div>\n\n <p v-if=\"hasDescription\" class=\"tw-mb-0\">\n <slot v-if=\"slots.default\"></slot>\n <!-- eslint-disable-next-line vue/no-v-html -->\n <span v-else v-html=\"props.description\"></span>\n </p>\n </div>\n\n <footer class=\"stash-dialog__footer\" :class=\"classes.footer\" data-test=\"stash-dialog|footer\">\n <div class=\"tw-text-right\">\n <div :class=\"{ 'button-grid': !props.alert }\">\n <Button v-if=\"!props.alert\" data-test=\"button|cancel\" secondary @click=\"cancel\">\n {{ props.cancelText }}\n </Button>\n\n <Button\n data-test=\"button|confirm\"\n :disabled=\"props.disabled || isConfirming\"\n :color=\"computedDangerZone ? 'red' : 'blue'\"\n :class=\"{\n 'tw-w-full': props.alert,\n }\"\n @click=\"handleConfirm\"\n >\n {{ modifiedConfirmText }}\n </Button>\n </div>\n </div>\n </footer>\n </div>\n </dialog>\n </transition>\n</template>\n\n<style module>\n .dialog {\n background: rgb(0 0 0 / 30%);\n bottom: 0;\n display: flex;\n flex-direction: column;\n left: 0;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n place-content: center;\n position: fixed;\n right: 0;\n top: 0;\n z-index: theme('zIndex.dialog');\n width: 100%;\n height: 100vh;\n }\n\n .body {\n @apply tw-shadow;\n\n background: var(--color-white);\n color: var(--color-ice-700);\n display: flex;\n flex-direction: column;\n margin: 0 auto;\n max-height: 100vh;\n max-width: 360px;\n transition: transform theme('transitionDuration.150') theme('transitionTimingFunction.swing');\n width: 100%;\n\n &.grey {\n background: var(--color-ice-200);\n border-radius: theme('borderRadius.DEFAULT');\n }\n\n @media screen('md') {\n border-radius: theme('borderRadius.DEFAULT');\n }\n }\n\n .content {\n flex-grow: 1;\n padding: theme('spacing.6') var(--grid-gutter);\n }\n\n .footer {\n background: var(--color-ice-200);\n border-top: theme('borderWidth.DEFAULT') solid var(--color-ice-500);\n display: initial; /* TEMP. Will need to fix marketplace `footer` style */\n padding: theme('spacing.6') var(--grid-gutter);\n\n @media screen('md') {\n border-bottom-left-radius: theme('borderRadius.DEFAULT');\n border-bottom-right-radius: theme('borderRadius.DEFAULT');\n }\n }\n\n :global(.fade-enter-from),\n :global(.fade-leave-active) {\n .body {\n transform: translate3d(0, theme('spacing.3'), 0);\n }\n }\n</style>\n"],"names":["props","__props","emits","__emit","slots","useSlots","attrs","useAttrs","classes","useCssModule","headerId","uniqueId","isConfirming","ref","root","modifiedConfirmText","computed","t","hasDescription","statusIcon","StatusIcons","capitalize","statusTitle","StatusSeverities","statusColor","StatusColors","computedDangerZone","cancel","handleConfirm","event","onConfirm","watchEffect","nextTick"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqEE,UAAMA,IAAQC,GAiBRC,IAAQC,GAKRC,IAAQC,KACRC,IAAQC,KACRC,IAAUC,KACVC,IAAWC,EAAS,gBAAgB,GAEpCC,IAAeC,EAAI,EAAK,GACxBC,IAAOD,KAKPE,IAAsBC,EAAS,MAAMhB,EAAM,gBAAgBA,EAAM,QAAQiB,EAAE,SAAS,IAAIA,EAAE,YAAY,EAAE,GAExGC,IAAiBF,EAAS,MAAM,CAAC,CAACZ,EAAM,WAAWJ,EAAM,WAAW,GAEpEmB,IAAaH;AAAA,MAAqB,MACtChB,EAAM,SAASoB,EAAYC,EAAWrB,EAAM,MAAM,CAAC,IAAIoB,EAAY;AAAA,IAAA,GAE/DE,IAAcN;AAAA,MAAyB,MAC3ChB,EAAM,SAASuB,EAAiBF,EAAWrB,EAAM,MAAM,CAAC,IAAIuB,EAAiB;AAAA,IAAA,GAEzEC,IAAcR;AAAA,MAAsB,MACxChB,EAAM,SAASyB,EAAaJ,EAAWrB,EAAM,MAAM,CAAC,IAAIyB,EAAa;AAAA,IAAA,GAGjEC,IAAqBV,EAAS,MAAMhB,EAAM,cAAcA,EAAM,WAAWuB,EAAiB,KAAK;AAErG,aAASI,IAAS;AAChB,MAAAzB,EAAM,eAAe,EAAK,GAC1BA,EAAM,QAAQ;AAAA,IAChB;AAEA,mBAAe0B,EAAcC,GAAc;AACzC,MAAAjB,EAAa,QAAQ;AAIrB,YAAMkB,IAAYxB,EAAM;AAIxB,YAAMwB,EAAUD,CAAK,GACrBjB,EAAa,QAAQ;AAAA,IACvB;AAEA,WAAAmB,EAAY,MAAM;AAChB,MAAI/B,EAAM,QAERgC,EAAS,WAAY;AACnB,QAAAlB,EAAK,MAAM;MAAM,CAClB;AAAA,IACH,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -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
 
@@ -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<DialogProps>, {
35
+ declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DialogProps>, {
37
36
  open: boolean;
38
37
  disabled: boolean;
39
38
  dangerZone: boolean;
@@ -43,10 +42,10 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
43
42
  confirmText: string;
44
43
  alert: boolean;
45
44
  status: undefined;
46
- }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
45
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
47
46
  "update:open": (value: boolean) => void;
48
47
  cancel: () => void;
49
- }, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DialogProps>, {
48
+ }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DialogProps>, {
50
49
  open: boolean;
51
50
  disabled: boolean;
52
51
  dangerZone: boolean;
@@ -56,12 +55,12 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
56
55
  confirmText: string;
57
56
  alert: boolean;
58
57
  status: undefined;
59
- }>>> & {
60
- "onUpdate:open"?: ((value: boolean) => any) | undefined;
58
+ }>>> & Readonly<{
61
59
  onCancel?: (() => any) | undefined;
62
- }, {
63
- header: string;
60
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
61
+ }>, {
64
62
  disabled: boolean;
63
+ header: string;
65
64
  description: string;
66
65
  open: boolean;
67
66
  dangerZone: boolean;
@@ -69,7 +68,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
69
68
  confirmText: string;
70
69
  alert: boolean;
71
70
  status: "error" | "warning" | "info" | "success";
72
- }, {}>, {
71
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
73
72
  default?(_: {}): any;
74
73
  }>;
75
74
  export default _default;
@@ -1,11 +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
- import { ExtractPropTypes } from 'vue';
6
- import { VNodeProps } from 'vue';
4
+ import { PublicProps } from 'vue';
7
5
 
8
- declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{}>>, {}, {}>;
6
+ declare const _default: DefineComponent<any, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<any> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
9
7
  export default _default;
10
8
 
11
9
  export { }