@leaflink/stash 52.0.2 → 53.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -49
- package/dist/Accordion.js +16 -16
- package/dist/Accordion.js.map +1 -1
- package/dist/AccordionGroup.js +7 -7
- package/dist/AccordionGroup.js.map +1 -1
- package/dist/ActionsDropdown.js +16 -16
- package/dist/ActionsDropdown.js.map +1 -1
- package/dist/AddressSelect.js.map +1 -1
- package/dist/AddressSelect.vue.d.ts +1 -1
- package/dist/Alert.js +34 -34
- package/dist/Alert.js.map +1 -1
- package/dist/AppNavigationItem.js +31 -31
- package/dist/AppNavigationItem.js.map +1 -1
- package/dist/AppSidebar.js +19 -19
- package/dist/AppSidebar.js.map +1 -1
- package/dist/AppTopbar.js +32 -32
- package/dist/AppTopbar.js.map +1 -1
- package/dist/Avatar.js +18 -18
- package/dist/Avatar.js.map +1 -1
- package/dist/Backdrop.js +5 -5
- package/dist/Backdrop.js.map +1 -1
- package/dist/Badge.js +38 -38
- package/dist/Badge.js.map +1 -1
- package/dist/Box.js +1 -1
- package/dist/{Box.vue_vue_type_script_setup_true_lang-rFnvwLVY.js → Box.vue_vue_type_script_setup_true_lang-dFFZN40_.js} +6 -6
- package/dist/{Box.vue_vue_type_script_setup_true_lang-rFnvwLVY.js.map → Box.vue_vue_type_script_setup_true_lang-dFFZN40_.js.map} +1 -1
- package/dist/Button.js +21 -21
- package/dist/Button.js.map +1 -1
- package/dist/ButtonGroup.js +26 -26
- package/dist/ButtonGroup.js.map +1 -1
- package/dist/Card.js +14 -14
- package/dist/Card.js.map +1 -1
- package/dist/CardContent.js +1 -1
- package/dist/CardContent.js.map +1 -1
- package/dist/CardFooter.js +1 -1
- package/dist/CardFooter.js.map +1 -1
- package/dist/CardHeader.js +4 -4
- package/dist/CardHeader.js.map +1 -1
- package/dist/CardMedia.js +20 -20
- package/dist/CardMedia.js.map +1 -1
- package/dist/Carousel.js +88 -93
- package/dist/Carousel.js.map +1 -1
- package/dist/Checkbox.js +30 -30
- package/dist/Checkbox.js.map +1 -1
- package/dist/Checkbox.vue.d.ts +0 -3
- package/dist/Chip.js +33 -33
- package/dist/Chip.js.map +1 -1
- package/dist/ConfirmationCodeInput.js +72 -72
- package/dist/ConfirmationCodeInput.js.map +1 -1
- package/dist/ContextSwitcher.js +27 -27
- package/dist/ContextSwitcher.js.map +1 -1
- package/dist/Copy.js +47 -48
- package/dist/Copy.js.map +1 -1
- package/dist/CurrencyInput.js +1 -1
- package/dist/CurrencyInput.js.map +1 -1
- package/dist/CurrencyInput.vue.d.ts +5 -5
- package/dist/DataView.js +23 -23
- package/dist/DataView.js.map +1 -1
- package/dist/DataViewFilters.js +26 -26
- package/dist/DataViewFilters.js.map +1 -1
- package/dist/DataViewSortButton.js +22 -22
- package/dist/DataViewSortButton.js.map +1 -1
- package/dist/DataViewToolbar.js +52 -52
- package/dist/DataViewToolbar.js.map +1 -1
- package/dist/DatePicker.js +10 -10
- package/dist/DatePicker.js.map +1 -1
- package/dist/DescriptionList.js +2 -2
- package/dist/DescriptionList.js.map +1 -1
- package/dist/DescriptionListDetail.js +2 -2
- package/dist/DescriptionListDetail.js.map +1 -1
- package/dist/DescriptionListGroup.js +9 -9
- package/dist/DescriptionListGroup.js.map +1 -1
- package/dist/DescriptionListTerm.js +8 -8
- package/dist/DescriptionListTerm.js.map +1 -1
- package/dist/Dialog.js +47 -47
- package/dist/Dialog.js.map +1 -1
- package/dist/Divider.js +6 -6
- package/dist/Divider.js.map +1 -1
- package/dist/Dropdown.js +20 -20
- package/dist/Dropdown.js.map +1 -1
- package/dist/EmptyState.js +26 -26
- package/dist/EmptyState.js.map +1 -1
- package/dist/Field.js +1 -1
- package/dist/{Field.vue_vue_type_script_setup_true_lang-DI6z3AE9.js → Field.vue_vue_type_script_setup_true_lang-dAGKfjf5.js} +17 -17
- package/dist/Field.vue_vue_type_script_setup_true_lang-dAGKfjf5.js.map +1 -0
- package/dist/FileUpload.js +47 -49
- package/dist/FileUpload.js.map +1 -1
- package/dist/FilterChip.js +20 -20
- package/dist/FilterChip.js.map +1 -1
- package/dist/FilterDrawerItem.js +13 -13
- package/dist/FilterDrawerItem.js.map +1 -1
- package/dist/FilterDropdown.js +27 -27
- package/dist/FilterDropdown.js.map +1 -1
- package/dist/FilterSelect.js +33 -33
- package/dist/FilterSelect.js.map +1 -1
- package/dist/Filters.js +29 -29
- package/dist/Filters.js.map +1 -1
- package/dist/Filters.vue.d.ts +2 -8
- package/dist/HttpError.js +29 -29
- package/dist/HttpError.js.map +1 -1
- package/dist/HttpError.vue.d.ts +0 -3
- package/dist/Icon.js +12 -12
- package/dist/Icon.js.map +1 -1
- package/dist/IconLabel.js +19 -19
- package/dist/IconLabel.js.map +1 -1
- package/dist/IconLabel.vue.d.ts +1 -1
- package/dist/Illustration.js +2 -2
- package/dist/{Illustration.vue_vue_type_script_setup_true_lang-BrqEF8xe.js → Illustration.vue_vue_type_script_setup_true_lang-C1bPkWZZ.js} +4 -4
- package/dist/{Illustration.vue_vue_type_script_setup_true_lang-BrqEF8xe.js.map → Illustration.vue_vue_type_script_setup_true_lang-C1bPkWZZ.js.map} +1 -1
- package/dist/Image.js +2 -2
- package/dist/Image.vue.d.ts +0 -3
- package/dist/{Image.vue_vue_type_script_setup_true_lang-D5u4av0_.js → Image.vue_vue_type_script_setup_true_lang-CAj0FH9h.js} +11 -11
- package/dist/Image.vue_vue_type_script_setup_true_lang-CAj0FH9h.js.map +1 -0
- package/dist/InlineEdit.js +8 -8
- package/dist/InlineEdit.js.map +1 -1
- package/dist/Input.js +29 -29
- package/dist/Input.js.map +1 -1
- package/dist/InputOptions.js +87 -84
- package/dist/InputOptions.js.map +1 -1
- package/dist/InputOptions.vue.d.ts +2 -2
- package/dist/IntegrationIcon.js +11 -11
- package/dist/IntegrationIcon.js.map +1 -1
- package/dist/Label.js +1 -1
- package/dist/{Label.vue_vue_type_script_setup_true_lang-CNquF3AP.js → Label.vue_vue_type_script_setup_true_lang-xwY3X-iV.js} +16 -16
- package/dist/{Label.vue_vue_type_script_setup_true_lang-CNquF3AP.js.map → Label.vue_vue_type_script_setup_true_lang-xwY3X-iV.js.map} +1 -1
- package/dist/ListItem.js +14 -14
- package/dist/ListItem.js.map +1 -1
- package/dist/ListItem.vue.d.ts +0 -6
- package/dist/ListItemCell.js +9 -9
- package/dist/ListItemCell.js.map +1 -1
- package/dist/ListView.js +138 -141
- package/dist/ListView.js.map +1 -1
- package/dist/ListView.vue.d.ts +2 -26
- package/dist/Loading.js +8 -8
- package/dist/Loading.js.map +1 -1
- package/dist/Logo.js +1 -1
- package/dist/{Logo.vue_vue_type_script_setup_true_lang-Dz8c98sc.js → Logo.vue_vue_type_script_setup_true_lang-DghNC_k6.js} +3 -3
- package/dist/{Logo.vue_vue_type_script_setup_true_lang-Dz8c98sc.js.map → Logo.vue_vue_type_script_setup_true_lang-DghNC_k6.js.map} +1 -1
- package/dist/Menu.js +5 -5
- package/dist/Menu.js.map +1 -1
- package/dist/MenuItem.js +12 -12
- package/dist/MenuItem.js.map +1 -1
- package/dist/Metric.js +24 -24
- package/dist/Metric.js.map +1 -1
- package/dist/Modal.js +60 -60
- package/dist/Modal.js.map +1 -1
- package/dist/Modals.js +1 -1
- package/dist/Modals.js.map +1 -1
- package/dist/Module.js +6 -6
- package/dist/Module.js.map +1 -1
- package/dist/ModuleContent.js +16 -16
- package/dist/ModuleContent.js.map +1 -1
- package/dist/ModuleFooter.js +13 -13
- package/dist/ModuleFooter.js.map +1 -1
- package/dist/ModuleHeader.js +29 -29
- package/dist/ModuleHeader.js.map +1 -1
- package/dist/MoreActions.js +81 -84
- package/dist/MoreActions.js.map +1 -1
- package/dist/ObfuscateText.js +4 -4
- package/dist/ObfuscateText.js.map +1 -1
- package/dist/PageContent.js +13 -13
- package/dist/PageContent.js.map +1 -1
- package/dist/PageHeader.js +28 -28
- package/dist/PageHeader.js.map +1 -1
- package/dist/PageNavigation.js +1 -1
- package/dist/Paginate.js +45 -45
- package/dist/Paginate.js.map +1 -1
- package/dist/QuickAction.js +18 -18
- package/dist/QuickAction.js.map +1 -1
- package/dist/Radio.js +17 -17
- package/dist/Radio.js.map +1 -1
- package/dist/RadioGroup.js +158 -154
- package/dist/RadioGroup.js.map +1 -1
- package/dist/RadioNew.js +80 -80
- package/dist/RadioNew.js.map +1 -1
- package/dist/RadioNew.vue.d.ts +0 -3
- package/dist/RangeInput.js +2 -2
- package/dist/RangeInput.js.map +1 -1
- package/dist/SearchBar.js +9 -9
- package/dist/SearchBar.js.map +1 -1
- package/dist/SectionHeader.js +14 -14
- package/dist/SectionHeader.js.map +1 -1
- package/dist/Select.js +369 -366
- package/dist/Select.js.map +1 -1
- package/dist/SelectStatus.js +26 -27
- package/dist/SelectStatus.js.map +1 -1
- package/dist/Skeleton.js +20 -20
- package/dist/Skeleton.js.map +1 -1
- package/dist/Step.js +37 -40
- package/dist/Step.js.map +1 -1
- package/dist/Stepper.js +17 -17
- package/dist/Stepper.js.map +1 -1
- package/dist/Switch.js +57 -57
- package/dist/Switch.js.map +1 -1
- package/dist/Tab.js +17 -19
- package/dist/Tab.js.map +1 -1
- package/dist/TabPanel.js +1 -1
- package/dist/TabPanel.js.map +1 -1
- package/dist/Table.js +22 -22
- package/dist/Table.js.map +1 -1
- package/dist/TableCell.js +32 -32
- package/dist/TableCell.js.map +1 -1
- package/dist/TableHeaderCell.js +35 -35
- package/dist/TableHeaderCell.js.map +1 -1
- package/dist/TableHeaderRow.js +10 -10
- package/dist/TableHeaderRow.js.map +1 -1
- package/dist/TableRow.js +51 -51
- package/dist/TableRow.js.map +1 -1
- package/dist/Tabs.js +2 -2
- package/dist/{Tabs.vue_vue_type_script_setup_true_lang-B3Irnlcd.js → Tabs.vue_vue_type_script_setup_true_lang-BVTCcK6M.js} +33 -33
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-BVTCcK6M.js.map +1 -0
- package/dist/TextEditor.js +8 -8
- package/dist/TextEditor.js.map +1 -1
- package/dist/Textarea.js +15 -15
- package/dist/Textarea.js.map +1 -1
- package/dist/Thumbnail.js +41 -41
- package/dist/Thumbnail.js.map +1 -1
- package/dist/ThumbnailEmpty.js +3 -3
- package/dist/ThumbnailEmpty.js.map +1 -1
- package/dist/ThumbnailGroup.js +22 -22
- package/dist/ThumbnailGroup.js.map +1 -1
- package/dist/Timeline.js +3 -3
- package/dist/Timeline.js.map +1 -1
- package/dist/TimelineItem.js +22 -22
- package/dist/TimelineItem.js.map +1 -1
- package/dist/Toast.js +29 -29
- package/dist/Toast.js.map +1 -1
- package/dist/Toast.vue.d.ts +3 -0
- package/dist/Toasts.js +11 -11
- package/dist/Toasts.js.map +1 -1
- package/dist/Tooltip.js +2 -81
- package/dist/Tooltip.js.map +1 -1
- package/dist/Tooltip.vue.d.ts +1 -1
- package/dist/Tooltip.vue_vue_type_script_setup_true_lang-mzBLSXy3.js +84 -0
- package/dist/Tooltip.vue_vue_type_script_setup_true_lang-mzBLSXy3.js.map +1 -0
- package/dist/components.css +2 -2
- package/dist/constants.d.ts +9 -9
- package/dist/constants.js +17 -17
- package/dist/constants.js.map +1 -1
- package/dist/directives/tooltip.js +2 -2
- package/dist/directives/tooltip.js.map +1 -1
- package/dist/{index-C14LhAwV.js → index-DBV9Uz0C.js} +3 -3
- package/dist/{index-C14LhAwV.js.map → index-DBV9Uz0C.js.map} +1 -1
- package/dist/tailwind-base.js.d.ts +12 -0
- package/dist/tailwind-base.js.map +1 -1
- package/dist/useSortable.js +1 -1
- package/dist/utils/helpers.js +15 -15
- package/dist/utils/helpers.js.map +1 -1
- package/package.json +15 -15
- package/styles/backwards-compat.css +373 -2851
- package/styles/main.css +8 -0
- package/styles/sofia-font.css +23 -27
- package/styles/theme.css +1033 -0
- package/dist/Field.vue_vue_type_script_setup_true_lang-DI6z3AE9.js.map +0 -1
- package/dist/Image.vue_vue_type_script_setup_true_lang-D5u4av0_.js.map +0 -1
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-B3Irnlcd.js.map +0 -1
- package/dist/tailwind-base.d.ts +0 -333
- package/styles/base.css +0 -902
- package/tailwind-base.ts +0 -455
package/dist/DescriptionList.js
CHANGED
|
@@ -11,8 +11,8 @@ const p = ["data-variant"], f = /* @__PURE__ */ d({
|
|
|
11
11
|
const t = e;
|
|
12
12
|
return n(r.key, { divide: t.divide, variant: t.variant }), (a, v) => (i(), s("dl", {
|
|
13
13
|
"data-variant": t.variant,
|
|
14
|
-
class: o(["stash-description-list
|
|
15
|
-
"
|
|
14
|
+
class: o(["stash-description-list text-sm", {
|
|
15
|
+
"divide-y divide-ice-200": t.divide
|
|
16
16
|
}]),
|
|
17
17
|
"data-test": "stash-description-list"
|
|
18
18
|
}, [
|
|
@@ -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
|
|
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 text-sm\"\n :class=\"{\n 'divide-y 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"],"names":["DescriptionListVariant","props","__props","provide","DESCRIPTION_LIST_INJECTION"],"mappings":";;AAAO,IAAKA,sBAAAA,OACVA,EAAA,UAAU,WACVA,EAAA,SAAS,UACTA,EAAA,UAAU,WACVA,EAAA,eAAe,iBAJLA,IAAAA,KAAA,CAAA,CAAA;;;;;;;;ACuBV,UAAMC,IAAQC;AAKd,WAAAC,EAAQC,EAA2B,KAAK,EAAE,QAAQH,EAAM,QAAQ,SAASA,EAAM,SAAS;;;;;;;;;;;"}
|
|
@@ -8,8 +8,8 @@ const p = ["data-variant"], h = /* @__PURE__ */ a({
|
|
|
8
8
|
throw new Error("DescriptionListDetail must be used within a DescriptionList component.");
|
|
9
9
|
const { variant: e } = t;
|
|
10
10
|
return (s, _) => (r(), o("dd", {
|
|
11
|
-
class: c(["stash-description-list-detail
|
|
12
|
-
"md:
|
|
11
|
+
class: c(["stash-description-list-detail flex-1 text-ice-900", {
|
|
12
|
+
"md:text-right": i(e) === "space-between"
|
|
13
13
|
}]),
|
|
14
14
|
"data-test": "stash-description-list-detail",
|
|
15
15
|
"data-variant": i(e)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DescriptionListDetail.js","sources":["../src/components/DescriptionListDetail/DescriptionListDetail.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { inject } from 'vue';\n\n import { DESCRIPTION_LIST_INJECTION } from '../DescriptionList/DescriptionList.keys';\n\n const descriptionListInjectedValues = inject(DESCRIPTION_LIST_INJECTION.key);\n if (!descriptionListInjectedValues) {\n throw new Error('DescriptionListDetail must be used within a DescriptionList component.');\n }\n const { variant } = descriptionListInjectedValues;\n</script>\n\n<template>\n <dd\n class=\"stash-description-list-detail
|
|
1
|
+
{"version":3,"file":"DescriptionListDetail.js","sources":["../src/components/DescriptionListDetail/DescriptionListDetail.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { inject } from 'vue';\n\n import { DESCRIPTION_LIST_INJECTION } from '../DescriptionList/DescriptionList.keys';\n\n const descriptionListInjectedValues = inject(DESCRIPTION_LIST_INJECTION.key);\n if (!descriptionListInjectedValues) {\n throw new Error('DescriptionListDetail must be used within a DescriptionList component.');\n }\n const { variant } = descriptionListInjectedValues;\n</script>\n\n<template>\n <dd\n class=\"stash-description-list-detail flex-1 text-ice-900\"\n :class=\"{\n 'md:text-right': variant === 'space-between',\n }\"\n data-test=\"stash-description-list-detail\"\n :data-variant=\"variant\"\n >\n <!-- @slot Default slot, for rendering a description detail -->\n <slot></slot>\n </dd>\n</template>\n"],"names":["descriptionListInjectedValues","inject","DESCRIPTION_LIST_INJECTION","variant"],"mappings":";;;;;AAKE,UAAMA,IAAgCC,EAAOC,EAA2B,GAAG;AAC3E,QAAI,CAACF;AACH,YAAM,IAAI,MAAM,wEAAwE;AAE1F,UAAM,EAAE,SAAAG,MAAYH;;;;;;;;;;;;"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { defineComponent as n, inject as r, createElementBlock as o, openBlock as d, unref as t, normalizeClass as p, renderSlot as c } from "vue";
|
|
2
2
|
import { D as l } from "./DescriptionList.keys-BHlHYV6b.js";
|
|
3
|
-
const m = ["data-divide", "data-variant"],
|
|
3
|
+
const m = ["data-divide", "data-variant"], b = /* @__PURE__ */ n({
|
|
4
4
|
__name: "DescriptionListGroup",
|
|
5
|
-
setup(
|
|
5
|
+
setup(u) {
|
|
6
6
|
const i = r(l.key);
|
|
7
7
|
if (!i)
|
|
8
8
|
throw new Error("DescriptionListDetail must be used within a DescriptionList component.");
|
|
9
9
|
const { divide: s, variant: e } = i;
|
|
10
|
-
return (a,
|
|
10
|
+
return (a, f) => (d(), o("div", {
|
|
11
11
|
class: p(["stash-description-list-group", {
|
|
12
|
-
"md:
|
|
13
|
-
"
|
|
14
|
-
"md:
|
|
15
|
-
"
|
|
16
|
-
"
|
|
12
|
+
"md:flex md:items-start md:gap-x-6": t(e) === "columns" || t(e) === "space-between",
|
|
13
|
+
"justify-between": t(e) === "space-between",
|
|
14
|
+
"md:flex md:items-start": t(e) === "inline",
|
|
15
|
+
"py-1.5 first:pt-0 last:pb-0": !t(s),
|
|
16
|
+
"py-3 first:pt-0 last:pb-0": t(s)
|
|
17
17
|
}]),
|
|
18
18
|
"data-test": "stash-description-list-group",
|
|
19
19
|
"data-divide": t(s),
|
|
@@ -24,6 +24,6 @@ const m = ["data-divide", "data-variant"], v = /* @__PURE__ */ n({
|
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
b as default
|
|
28
28
|
};
|
|
29
29
|
//# sourceMappingURL=DescriptionListGroup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DescriptionListGroup.js","sources":["../src/components/DescriptionListGroup/DescriptionListGroup.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { inject } from 'vue';\n\n import { DESCRIPTION_LIST_INJECTION } from '../DescriptionList/DescriptionList.keys';\n\n const descriptionListInjectedValues = inject(DESCRIPTION_LIST_INJECTION.key);\n if (!descriptionListInjectedValues) {\n throw new Error('DescriptionListDetail must be used within a DescriptionList component.');\n }\n const { divide, variant } = descriptionListInjectedValues;\n</script>\n\n<template>\n <div\n class=\"stash-description-list-group\"\n :class=\"{\n 'md:
|
|
1
|
+
{"version":3,"file":"DescriptionListGroup.js","sources":["../src/components/DescriptionListGroup/DescriptionListGroup.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { inject } from 'vue';\n\n import { DESCRIPTION_LIST_INJECTION } from '../DescriptionList/DescriptionList.keys';\n\n const descriptionListInjectedValues = inject(DESCRIPTION_LIST_INJECTION.key);\n if (!descriptionListInjectedValues) {\n throw new Error('DescriptionListDetail must be used within a DescriptionList component.');\n }\n const { divide, variant } = descriptionListInjectedValues;\n</script>\n\n<template>\n <div\n class=\"stash-description-list-group\"\n :class=\"{\n 'md:flex md:items-start md:gap-x-6': variant === 'columns' || variant === 'space-between',\n 'justify-between': variant === 'space-between',\n 'md:flex md:items-start': variant === 'inline',\n 'py-1.5 first:pt-0 last:pb-0': !divide,\n 'py-3 first:pt-0 last:pb-0': divide,\n }\"\n data-test=\"stash-description-list-group\"\n :data-divide=\"divide\"\n :data-variant=\"variant\"\n >\n <!-- @slot Default slot, for rendering a description detail -->\n <slot></slot>\n </div>\n</template>\n"],"names":["descriptionListInjectedValues","inject","DESCRIPTION_LIST_INJECTION","divide","variant"],"mappings":";;;;;AAKE,UAAMA,IAAgCC,EAAOC,EAA2B,GAAG;AAC3E,QAAI,CAACF;AACH,YAAM,IAAI,MAAM,wEAAwE;AAE1F,UAAM,EAAE,QAAAG,GAAQ,SAAAC,EAAA,IAAYJ;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { defineComponent as a, inject as o, createElementBlock as r, openBlock as c, unref as e, normalizeClass as p, renderSlot as n } from "vue";
|
|
2
2
|
import { D as d } from "./DescriptionList.keys-BHlHYV6b.js";
|
|
3
|
-
const m = ["data-variant"],
|
|
3
|
+
const m = ["data-variant"], b = /* @__PURE__ */ a({
|
|
4
4
|
__name: "DescriptionListTerm",
|
|
5
5
|
setup(l) {
|
|
6
6
|
const i = o(d.key);
|
|
7
7
|
if (!i)
|
|
8
8
|
throw new Error("DescriptionListDetail must be used within a DescriptionList component.");
|
|
9
9
|
const { variant: t } = i;
|
|
10
|
-
return (s,
|
|
11
|
-
class: p(["stash-description-list-term
|
|
12
|
-
"md:
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
10
|
+
return (s, f) => (c(), r("dt", {
|
|
11
|
+
class: p(["stash-description-list-term flex items-center gap-x-1 font-bold text-ice-900", {
|
|
12
|
+
"md:max-w-40 md:basis-2/5": e(t) === "columns",
|
|
13
|
+
"mr-1.5": e(t) === "inline",
|
|
14
|
+
"pb-1.5": e(t) === "stacked",
|
|
15
|
+
"pb-1.5 md:pb-0": e(t) !== "stacked"
|
|
16
16
|
}]),
|
|
17
17
|
"data-test": "stash-description-list-term",
|
|
18
18
|
"data-variant": e(t)
|
|
@@ -24,6 +24,6 @@ const m = ["data-variant"], _ = /* @__PURE__ */ a({
|
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
b as default
|
|
28
28
|
};
|
|
29
29
|
//# sourceMappingURL=DescriptionListTerm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DescriptionListTerm.js","sources":["../src/components/DescriptionListTerm/DescriptionListTerm.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { inject } from 'vue';\n\n import { DESCRIPTION_LIST_INJECTION } from '../DescriptionList/DescriptionList.keys';\n\n const descriptionListInjectedValues = inject(DESCRIPTION_LIST_INJECTION.key);\n if (!descriptionListInjectedValues) {\n throw new Error('DescriptionListDetail must be used within a DescriptionList component.');\n }\n const { variant } = descriptionListInjectedValues;\n</script>\n\n<template>\n <dt\n class=\"stash-description-list-term
|
|
1
|
+
{"version":3,"file":"DescriptionListTerm.js","sources":["../src/components/DescriptionListTerm/DescriptionListTerm.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { inject } from 'vue';\n\n import { DESCRIPTION_LIST_INJECTION } from '../DescriptionList/DescriptionList.keys';\n\n const descriptionListInjectedValues = inject(DESCRIPTION_LIST_INJECTION.key);\n if (!descriptionListInjectedValues) {\n throw new Error('DescriptionListDetail must be used within a DescriptionList component.');\n }\n const { variant } = descriptionListInjectedValues;\n</script>\n\n<template>\n <dt\n class=\"stash-description-list-term flex items-center gap-x-1 font-bold text-ice-900\"\n :class=\"{\n 'md:max-w-40 md:basis-2/5': variant === 'columns',\n 'mr-1.5': variant === 'inline',\n 'pb-1.5': variant === 'stacked',\n 'pb-1.5 md:pb-0': variant !== 'stacked',\n }\"\n data-test=\"stash-description-list-term\"\n :data-variant=\"variant\"\n >\n <!-- @slot Prepend slot, for rendering a prepended element -->\n <slot name=\"prepend\"></slot>\n <!-- @slot Default slot, for rendering a term -->\n <slot></slot>\n <!-- @slot Append slot, for rendering an appended element -->\n <slot name=\"append\"></slot>\n </dt>\n</template>\n"],"names":["descriptionListInjectedValues","inject","DESCRIPTION_LIST_INJECTION","variant"],"mappings":";;;;;AAKE,UAAMA,IAAgCC,EAAOC,EAA2B,GAAG;AAC3E,QAAI,CAACF;AACH,YAAM,IAAI,MAAM,wEAAwE;AAE1F,UAAM,EAAE,SAAAG,MAAYH;;;;;;;;;;;;;;;;;"}
|
package/dist/Dialog.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as A, useSlots as H, useAttrs as K, useCssModule as L, ref as
|
|
1
|
+
import { defineComponent as A, useSlots as H, useAttrs as K, useCssModule as L, ref as S, computed as s, watchEffect as q, nextTick as F, createBlock as f, openBlock as l, Transition as P, withCtx as m, createElementBlock as _, createCommentVNode as d, mergeProps as Y, unref as e, withKeys as j, createElementVNode as a, normalizeClass as o, toDisplayString as p, renderSlot as G, createVNode as J, createTextVNode as B } from "vue";
|
|
2
2
|
import y from "lodash-es/capitalize";
|
|
3
3
|
import O from "lodash-es/uniqueId";
|
|
4
|
-
import { S as
|
|
5
|
-
import { t as
|
|
6
|
-
import
|
|
4
|
+
import { S as I, b as g, a as w } from "./statusLevels-D8EgtE_L.js";
|
|
5
|
+
import { t as i } from "./locale.js";
|
|
6
|
+
import D from "./Button.js";
|
|
7
7
|
import Q from "./Icon.js";
|
|
8
8
|
import { _ as R } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
9
|
const U = ["open", "aria-labelledby", "data-test"], W = ["id"], X = {
|
|
10
10
|
key: 0,
|
|
11
|
-
class: "
|
|
12
|
-
}, tt = ["innerHTML"], et = { class: "
|
|
11
|
+
class: "mb-0"
|
|
12
|
+
}, tt = ["innerHTML"], et = { class: "text-right" }, ot = /* @__PURE__ */ A({
|
|
13
13
|
name: "ll-dialog",
|
|
14
14
|
inheritAttrs: !1,
|
|
15
15
|
__name: "Dialog",
|
|
@@ -17,9 +17,9 @@ const U = ["open", "aria-labelledby", "data-test"], W = ["id"], X = {
|
|
|
17
17
|
open: { type: Boolean, default: !1 },
|
|
18
18
|
disabled: { type: Boolean, default: !1 },
|
|
19
19
|
dangerZone: { type: Boolean, default: !1 },
|
|
20
|
-
header: { default:
|
|
20
|
+
header: { default: i("ll.areYouSure") },
|
|
21
21
|
description: { default: "" },
|
|
22
|
-
cancelText: { default:
|
|
22
|
+
cancelText: { default: i("ll.cancel") },
|
|
23
23
|
confirmText: { default: "" },
|
|
24
24
|
onConfirm: { type: Function, default: () => {
|
|
25
25
|
} },
|
|
@@ -27,18 +27,18 @@ const U = ["open", "aria-labelledby", "data-test"], W = ["id"], X = {
|
|
|
27
27
|
status: { default: void 0 }
|
|
28
28
|
},
|
|
29
29
|
emits: ["update:open", "cancel"],
|
|
30
|
-
setup(
|
|
31
|
-
const t =
|
|
32
|
-
() => t.status ? B[y(t.status)] : B.Info
|
|
33
|
-
), V = s(
|
|
34
|
-
() => t.status ? g[y(t.status)] : g.Info
|
|
35
|
-
), k = s(
|
|
30
|
+
setup(M, { emit: E }) {
|
|
31
|
+
const t = M, b = E, h = H(), v = K(), n = L(), x = O("dialog-header-"), r = S(!1), c = S(), N = s(() => t.confirmText || (t.alert ? i("ll.okay") : i("ll.confirm"))), k = s(() => !!h.default || t.description), V = s(
|
|
36
32
|
() => t.status ? I[y(t.status)] : I.Info
|
|
37
|
-
), $ = s(
|
|
38
|
-
|
|
33
|
+
), $ = s(
|
|
34
|
+
() => t.status ? g[y(t.status)] : g.Info
|
|
35
|
+
), C = s(
|
|
36
|
+
() => t.status ? w[y(t.status)] : w.Info
|
|
37
|
+
), Z = s(() => t.dangerZone || t.status === g.Error);
|
|
38
|
+
function T() {
|
|
39
39
|
b("update:open", !1), b("cancel");
|
|
40
40
|
}
|
|
41
|
-
async function
|
|
41
|
+
async function z(u) {
|
|
42
42
|
if (!r.value) {
|
|
43
43
|
r.value = !0;
|
|
44
44
|
try {
|
|
@@ -49,30 +49,30 @@ const U = ["open", "aria-labelledby", "data-test"], W = ["id"], X = {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
return q(() => {
|
|
52
|
-
t.open &&
|
|
53
|
-
|
|
52
|
+
t.open && c.value && F(function() {
|
|
53
|
+
c.value.focus();
|
|
54
54
|
});
|
|
55
|
-
}), (u,
|
|
55
|
+
}), (u, ct) => (l(), f(P, { name: "fade" }, {
|
|
56
56
|
default: m(() => [
|
|
57
57
|
t.open ? (l(), _("dialog", Y({
|
|
58
58
|
key: 0,
|
|
59
59
|
ref_key: "root",
|
|
60
|
-
ref:
|
|
60
|
+
ref: c,
|
|
61
61
|
open: t.open,
|
|
62
62
|
tabindex: "0",
|
|
63
|
-
"aria-labelledby": e(
|
|
63
|
+
"aria-labelledby": e(x),
|
|
64
64
|
"aria-modal": "true",
|
|
65
65
|
class: ["stash-dialog", e(n).dialog],
|
|
66
66
|
"data-test": e(v)["data-test"] || "ll-dialog"
|
|
67
67
|
}, e(v), {
|
|
68
|
-
onKeydown: j(
|
|
68
|
+
onKeydown: j(T, ["esc"])
|
|
69
69
|
}), [
|
|
70
70
|
a("div", {
|
|
71
71
|
class: o(["stash-dialog__body", [
|
|
72
72
|
e(n).body,
|
|
73
|
-
`
|
|
73
|
+
`border-${C.value}`,
|
|
74
74
|
{
|
|
75
|
-
"
|
|
75
|
+
"border-t-6": t.status
|
|
76
76
|
}
|
|
77
77
|
]]),
|
|
78
78
|
"data-test": "stash-dialog|body"
|
|
@@ -82,26 +82,26 @@ const U = ["open", "aria-labelledby", "data-test"], W = ["id"], X = {
|
|
|
82
82
|
"data-test": "stash-dialog|body-content"
|
|
83
83
|
}, [
|
|
84
84
|
a("div", {
|
|
85
|
-
class: o(["
|
|
85
|
+
class: o(["flex items-start", k.value && "mb-1.5"])
|
|
86
86
|
}, [
|
|
87
87
|
t.status ? (l(), f(Q, {
|
|
88
88
|
key: 0,
|
|
89
89
|
"data-test": "dialog-status-icon",
|
|
90
|
-
name:
|
|
91
|
-
title:
|
|
92
|
-
class: o(`
|
|
93
|
-
}, null, 8, ["name", "title", "class"])) :
|
|
90
|
+
name: V.value,
|
|
91
|
+
title: $.value,
|
|
92
|
+
class: o(`text-${C.value}`)
|
|
93
|
+
}, null, 8, ["name", "title", "class"])) : d("", !0),
|
|
94
94
|
a("h3", {
|
|
95
|
-
id: e(
|
|
96
|
-
class: o({ "
|
|
95
|
+
id: e(x),
|
|
96
|
+
class: o({ "ml-1.5 mt-px": t.status })
|
|
97
97
|
}, p(t.header), 11, W)
|
|
98
98
|
], 2),
|
|
99
|
-
|
|
99
|
+
k.value ? (l(), _("p", X, [
|
|
100
100
|
e(h).default ? G(u.$slots, "default", { key: 0 }) : (l(), _("span", {
|
|
101
101
|
key: 1,
|
|
102
102
|
innerHTML: t.description
|
|
103
103
|
}, null, 8, tt))
|
|
104
|
-
])) :
|
|
104
|
+
])) : d("", !0)
|
|
105
105
|
], 2),
|
|
106
106
|
a("footer", {
|
|
107
107
|
class: o(["stash-dialog__footer", e(n).footer]),
|
|
@@ -111,29 +111,29 @@ const U = ["open", "aria-labelledby", "data-test"], W = ["id"], X = {
|
|
|
111
111
|
a("div", {
|
|
112
112
|
class: o({ "button-grid": !t.alert })
|
|
113
113
|
}, [
|
|
114
|
-
t.alert ?
|
|
114
|
+
t.alert ? d("", !0) : (l(), f(D, {
|
|
115
115
|
key: 0,
|
|
116
116
|
"data-test": "button|cancel",
|
|
117
117
|
secondary: "",
|
|
118
|
-
onClick:
|
|
118
|
+
onClick: T
|
|
119
119
|
}, {
|
|
120
120
|
default: m(() => [
|
|
121
|
-
|
|
121
|
+
B(p(t.cancelText), 1)
|
|
122
122
|
]),
|
|
123
123
|
_: 1
|
|
124
124
|
})),
|
|
125
|
-
J(
|
|
125
|
+
J(D, {
|
|
126
126
|
"data-test": "button|confirm",
|
|
127
127
|
disabled: t.disabled,
|
|
128
128
|
"is-loading": r.value,
|
|
129
|
-
color:
|
|
129
|
+
color: Z.value ? "red" : "blue",
|
|
130
130
|
class: o({
|
|
131
|
-
"
|
|
131
|
+
"w-full": t.alert
|
|
132
132
|
}),
|
|
133
|
-
onClick:
|
|
133
|
+
onClick: z
|
|
134
134
|
}, {
|
|
135
135
|
default: m(() => [
|
|
136
|
-
|
|
136
|
+
B(p(N.value), 1)
|
|
137
137
|
]),
|
|
138
138
|
_: 1
|
|
139
139
|
}, 8, ["disabled", "is-loading", "color", "class"])
|
|
@@ -141,20 +141,20 @@ const U = ["open", "aria-labelledby", "data-test"], W = ["id"], X = {
|
|
|
141
141
|
])
|
|
142
142
|
], 2)
|
|
143
143
|
], 2)
|
|
144
|
-
], 16, U)) :
|
|
144
|
+
], 16, U)) : d("", !0)
|
|
145
145
|
]),
|
|
146
146
|
_: 3
|
|
147
147
|
}));
|
|
148
148
|
}
|
|
149
|
-
}), at = "
|
|
149
|
+
}), at = "_dialog_u78oe_5", st = "_body_u78oe_22", lt = "_grey_u78oe_35", nt = "_content_u78oe_45", rt = "_footer_u78oe_50", dt = {
|
|
150
150
|
dialog: at,
|
|
151
151
|
body: st,
|
|
152
152
|
grey: lt,
|
|
153
153
|
content: nt,
|
|
154
154
|
footer: rt
|
|
155
|
-
},
|
|
156
|
-
$style:
|
|
157
|
-
}, ht = /* @__PURE__ */ R(ot, [["__cssModules",
|
|
155
|
+
}, it = {
|
|
156
|
+
$style: dt
|
|
157
|
+
}, ht = /* @__PURE__ */ R(ot, [["__cssModules", it]]);
|
|
158
158
|
export {
|
|
159
159
|
ht as default
|
|
160
160
|
};
|
package/dist/Dialog.js.map
CHANGED
|
@@ -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 * Callback function when the confirm button is clicked.\n */\n onConfirm?: (event: Event) => Promise<void> | void;\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 onConfirm: () => undefined,\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 if (isConfirming.value) {\n return;\n }\n\n isConfirming.value = true;\n\n try {\n await props.onConfirm(event);\n } finally {\n isConfirming.value = false;\n }\n }\n\n watchEffect(() => {\n if (props.open && root.value) {\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 `
|
|
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 * Callback function when the confirm button is clicked.\n */\n onConfirm?: (event: Event) => Promise<void> | void;\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 onConfirm: () => undefined,\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 if (isConfirming.value) {\n return;\n }\n\n isConfirming.value = true;\n\n try {\n await props.onConfirm(event);\n } finally {\n isConfirming.value = false;\n }\n }\n\n watchEffect(() => {\n if (props.open && root.value) {\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 `border-${statusColor}`,\n {\n '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=\"flex items-start\" :class=\"hasDescription && 'mb-1.5'\">\n <Icon\n v-if=\"props.status\"\n data-test=\"dialog-status-icon\"\n :name=\"statusIcon\"\n :title=\"statusTitle\"\n :class=\"`text-${statusColor}`\"\n />\n <h3 :id=\"headerId\" :class=\"{ 'ml-1.5 mt-px': props.status }\">{{ props.header }}</h3>\n </div>\n\n <p v-if=\"hasDescription\" class=\"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=\"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\"\n :is-loading=\"isConfirming\"\n :color=\"computedDangerZone ? 'red' : 'blue'\"\n :class=\"{\n '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 @reference \"../../../styles/main.css\";\n\n @layer utilities {\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: var(--z-index-dialog);\n width: 100%;\n height: 100vh;\n }\n\n .body {\n @apply shadow-3xl;\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 150 var(--ease-swing);\n width: 100%;\n\n &.grey {\n background: var(--color-ice-200);\n border-radius: var(--radius-sm);\n }\n\n @media (width >= theme(--breakpoint-md)) {\n border-radius: var(--radius-sm);\n }\n }\n\n .content {\n flex-grow: 1;\n padding: --spacing(6) var(--grid-gutter);\n }\n\n .footer {\n background: var(--color-ice-200);\n border-top: var(--border-width) solid var(--color-ice-500);\n display: initial; /* TEMP. Will need to fix marketplace `footer` style */\n padding: --spacing(6) var(--grid-gutter);\n\n @media (width >= theme(--breakpoint-md)) {\n border-bottom-left-radius: var(--radius-sm);\n border-bottom-right-radius: var(--radius-sm);\n }\n }\n\n :global(.fade-enter-from),\n :global(.fade-leave-active) {\n .body {\n transform: translate3d(0, --spacing(3), 0);\n }\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","watchEffect","nextTick"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0EE,UAAMA,IAAQC,GAkBRC,IAAQC,GAKRC,IAAQC,EAAA,GACRC,IAAQC,EAAA,GACRC,IAAUC,EAAA,GACVC,IAAWC,EAAS,gBAAgB,GAEpCC,IAAeC,EAAI,EAAK,GACxBC,IAAOD,EAAA,GAKPE,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,UAAI,CAAAjB,EAAa,OAIjB;AAAA,QAAAA,EAAa,QAAQ;AAErB,YAAI;AACF,gBAAMZ,EAAM,UAAU6B,CAAK;AAAA,QAC7B,UAAA;AACE,UAAAjB,EAAa,QAAQ;AAAA,QACvB;AAAA;AAAA,IACF;AAEA,WAAAkB,EAAY,MAAM;AAChB,MAAI9B,EAAM,QAAQc,EAAK,SAErBiB,EAAS,WAAY;AACnB,QAAAjB,EAAK,MAAM,MAAA;AAAA,MACb,CAAC;AAAA,IAEL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/Divider.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { createElementBlock as
|
|
1
|
+
import { createElementBlock as s, openBlock as r, normalizeClass as t, renderSlot as o } from "vue";
|
|
2
2
|
import { _ as a } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
-
const c = "
|
|
3
|
+
const c = "_separator_9qzqr_5", l = {
|
|
4
4
|
separator: c
|
|
5
5
|
}, n = {
|
|
6
6
|
name: "ll-divider"
|
|
7
7
|
};
|
|
8
8
|
function p(e, i, _, f, m, u) {
|
|
9
|
-
return
|
|
10
|
-
class:
|
|
9
|
+
return r(), s("div", {
|
|
10
|
+
class: t(["flex items-center text-center uppercase", e.$style.separator]),
|
|
11
11
|
role: "separator"
|
|
12
12
|
}, [
|
|
13
13
|
o(e.$slots, "default")
|
|
@@ -15,8 +15,8 @@ function p(e, i, _, f, m, u) {
|
|
|
15
15
|
}
|
|
16
16
|
const d = {
|
|
17
17
|
$style: l
|
|
18
|
-
},
|
|
18
|
+
}, x = /* @__PURE__ */ a(n, [["render", p], ["__cssModules", d]]);
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
x as default
|
|
21
21
|
};
|
|
22
22
|
//# sourceMappingURL=Divider.js.map
|
package/dist/Divider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.js","sources":["../src/components/Divider/Divider.vue"],"sourcesContent":["<script>\n export default {\n name: 'll-divider',\n };\n</script>\n\n<template>\n <div class=\"
|
|
1
|
+
{"version":3,"file":"Divider.js","sources":["../src/components/Divider/Divider.vue"],"sourcesContent":["<script>\n export default {\n name: 'll-divider',\n };\n</script>\n\n<template>\n <div class=\"flex items-center text-center uppercase\" :class=\"$style.separator\" role=\"separator\">\n <slot></slot>\n </div>\n</template>\n\n<style module>\n @reference \"../../../styles/main.css\";\n\n @layer utilities {\n .separator::before,\n .separator::after {\n border-bottom: 1px solid var(--color-ice-200);\n content: '';\n flex: 1;\n }\n\n .separator:not(:empty)::before {\n margin-right: --spacing(3);\n }\n\n .separator:not(:empty)::after {\n margin-left: --spacing(3);\n }\n }\n</style>\n"],"names":["_sfc_main","_createElementBlock","_normalizeClass","_ctx","_renderSlot"],"mappings":";;;;GACOA,IAAU;AAAA,EACb,MAAM;;;cAKRC,EAEM,OAAA;AAAA,IAFD,OAPPC,EAAA,CAOa,2CAAkDC,EAAA,OAAO,SAAS,CAAA;AAAA,IAAE,MAAK;AAAA;IAClFC,EAAaD,EAAA,QAAA,SAAA;AAAA;;;;;"}
|
package/dist/Dropdown.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as I, ref as r, useCssModule as q, watch as C, onMounted as K, onBeforeUnmount as R, computed as U, withDirectives as _, createElementBlock as k, openBlock as m, renderSlot as x, createVNode as E, createElementVNode as b, normalizeClass as S, createBlock as V, createTextVNode as W, toDisplayString as Y, Transition as F, withCtx as j, normalizeStyle as G, unref as M, vShow as H, nextTick as A } from "vue";
|
|
2
|
-
import { KEY_CODES as
|
|
2
|
+
import { KEY_CODES as d } from "./constants.js";
|
|
3
3
|
import J from "./directives/clickoutside.js";
|
|
4
4
|
import Q from "./utils/calculateElementOverflow.js";
|
|
5
5
|
import { getMountPoint as X } from "./utils/helpers.js";
|
|
@@ -7,7 +7,7 @@ import B from "./Icon.js";
|
|
|
7
7
|
import { _ as Z } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const ee = ["aria-expanded"], te = {
|
|
9
9
|
key: 0,
|
|
10
|
-
class: "
|
|
10
|
+
class: "flex items-center font-medium text-blue-500 hover:text-blue-700"
|
|
11
11
|
}, le = /* @__PURE__ */ I({
|
|
12
12
|
name: "ll-dropdown",
|
|
13
13
|
__name: "Dropdown",
|
|
@@ -22,18 +22,18 @@ const ee = ["aria-expanded"], te = {
|
|
|
22
22
|
},
|
|
23
23
|
emits: ["toggle", "dismiss"],
|
|
24
24
|
setup(D, { expose: $, emit: L }) {
|
|
25
|
-
const a = D, p = L, t = r(null),
|
|
25
|
+
const a = D, p = L, t = r(null), g = r(null), f = [], s = r(f), i = r(-1), l = r(!1), y = r({}), T = q();
|
|
26
26
|
C(l, (e) => {
|
|
27
27
|
e || (i.value = -1), p("toggle", e);
|
|
28
28
|
}), C(i, (e, o) => {
|
|
29
|
-
e in s.value && s.value[e].classList.add("
|
|
29
|
+
e in s.value && s.value[e].classList.add("bg-ice-200"), o in s.value && s.value[o].classList.remove("bg-ice-200");
|
|
30
30
|
}), K(() => {
|
|
31
31
|
var e, o, n;
|
|
32
32
|
if (a.reattach) {
|
|
33
33
|
const c = X();
|
|
34
34
|
t.value && c.appendChild(t.value);
|
|
35
35
|
}
|
|
36
|
-
(e = t.value) != null && e.querySelector(".stash-menu") ? s.value = ((o = t.value) == null ? void 0 : o.querySelectorAll(".stash-menu-item")) ??
|
|
36
|
+
(e = t.value) != null && e.querySelector(".stash-menu") ? s.value = ((o = t.value) == null ? void 0 : o.querySelectorAll(".stash-menu-item")) ?? f : s.value = ((n = t.value) == null ? void 0 : n.querySelectorAll(".dropdown__item")) ?? f, window.addEventListener("resize", () => u());
|
|
37
37
|
}), R(() => {
|
|
38
38
|
var e, o;
|
|
39
39
|
window.removeEventListener("resize", () => u()), (o = (e = t == null ? void 0 : t.value) == null ? void 0 : e.parentNode) == null || o.removeChild(t.value);
|
|
@@ -50,13 +50,13 @@ const ee = ["aria-expanded"], te = {
|
|
|
50
50
|
l.value ? l.value = !1 : (l.value = !0, await z(), (e = t.value) == null || e.focus());
|
|
51
51
|
}
|
|
52
52
|
function N(e) {
|
|
53
|
-
if (e.keyCode ===
|
|
53
|
+
if (e.keyCode === d.ESCAPE)
|
|
54
54
|
u();
|
|
55
|
-
else if (e.keyCode ===
|
|
55
|
+
else if (e.keyCode === d.DOWN && i.value < s.value.length - 1 && l.value)
|
|
56
56
|
i.value++;
|
|
57
|
-
else if (e.keyCode ===
|
|
57
|
+
else if (e.keyCode === d.UP && i.value > -1 && l.value)
|
|
58
58
|
i.value--;
|
|
59
|
-
else if (e.keyCode ===
|
|
59
|
+
else if (e.keyCode === d.ENTER && i.value !== -1 && l.value)
|
|
60
60
|
s[i.value].click();
|
|
61
61
|
else
|
|
62
62
|
return;
|
|
@@ -67,14 +67,14 @@ const ee = ["aria-expanded"], te = {
|
|
|
67
67
|
(e = t.value) == null || e.style.setProperty("--offset", "0");
|
|
68
68
|
}
|
|
69
69
|
async function z() {
|
|
70
|
-
var
|
|
70
|
+
var w, h;
|
|
71
71
|
await A();
|
|
72
|
-
const e = ((
|
|
72
|
+
const e = ((w = g.value) == null ? void 0 : w.getBoundingClientRect()) || {}, o = e.top + e.height, n = {
|
|
73
73
|
x: 0,
|
|
74
74
|
y: 0,
|
|
75
75
|
...a.offset
|
|
76
76
|
};
|
|
77
|
-
a.reattach && (
|
|
77
|
+
a.reattach && (y.value = {
|
|
78
78
|
left: a.align === "left" ? `${Math.round(e.left) + n.x}px` : void 0,
|
|
79
79
|
right: a.align === "right" ? `${document.documentElement.clientWidth - Math.round(e.right) + n.x}px` : void 0,
|
|
80
80
|
top: `${window.scrollY + o + n.y}px`
|
|
@@ -91,8 +91,8 @@ const ee = ["aria-expanded"], te = {
|
|
|
91
91
|
dismiss: u
|
|
92
92
|
}), (e, o) => _((m(), k("div", {
|
|
93
93
|
ref_key: "dropdownRef",
|
|
94
|
-
ref:
|
|
95
|
-
class: "
|
|
94
|
+
ref: g,
|
|
95
|
+
class: "relative inline-block",
|
|
96
96
|
"data-test": "ll-dropdown",
|
|
97
97
|
onKeydown: N
|
|
98
98
|
}, [
|
|
@@ -103,7 +103,7 @@ const ee = ["aria-expanded"], te = {
|
|
|
103
103
|
b("button", {
|
|
104
104
|
"data-test": "button|toggle",
|
|
105
105
|
"aria-expanded": l.value,
|
|
106
|
-
class: S([e.label ? "
|
|
106
|
+
class: S([e.label ? "outline-hidden min-w-auto" : "rounded p-3"]),
|
|
107
107
|
onClick: v
|
|
108
108
|
}, [
|
|
109
109
|
e.label ? (m(), k("span", te, [
|
|
@@ -128,12 +128,12 @@ const ee = ["aria-expanded"], te = {
|
|
|
128
128
|
M(T).content,
|
|
129
129
|
e.contentClass,
|
|
130
130
|
{
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"
|
|
131
|
+
"left-0 after:left-6": a.align === "left",
|
|
132
|
+
"right-0": a.align === "right",
|
|
133
|
+
"max-w-[360px]": !a.fluidContent
|
|
134
134
|
}
|
|
135
135
|
]),
|
|
136
|
-
style: G(
|
|
136
|
+
style: G(y.value)
|
|
137
137
|
}, [
|
|
138
138
|
x(e.$slots, "default", {
|
|
139
139
|
dismiss: u,
|
|
@@ -149,7 +149,7 @@ const ee = ["aria-expanded"], te = {
|
|
|
149
149
|
[M(J), u]
|
|
150
150
|
]);
|
|
151
151
|
}
|
|
152
|
-
}), oe = "
|
|
152
|
+
}), oe = "_content_81ltz_5", ae = {
|
|
153
153
|
content: oe
|
|
154
154
|
}, ne = {
|
|
155
155
|
$style: ae
|