@leaflink/stash 43.5.2 → 44.0.0-beta.10
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 +107 -39
- package/assets/illustrations/FileUpload/document.svg +1 -17
- package/dist/ActionsDropdown.js +25 -25
- package/dist/ActionsDropdown.js.map +1 -1
- package/dist/AddressSelect.js +12 -11
- package/dist/AddressSelect.js.map +1 -1
- package/dist/Alert.js +9 -9
- package/dist/Alert.js.map +1 -1
- package/dist/AppNavigationItem.js +22 -22
- package/dist/AppNavigationItem.js.map +1 -1
- package/dist/AppSidebar.js +11 -11
- package/dist/AppSidebar.js.map +1 -1
- package/dist/AppTopbar.js +12 -12
- package/dist/Avatar.js +12 -12
- package/dist/Avatar.js.map +1 -1
- package/dist/Backdrop.js +1 -1
- package/dist/Backdrop.js.map +1 -1
- package/dist/Badge.js +12 -12
- package/dist/Badge.js.map +1 -1
- package/dist/Badge.vue.d.ts +1 -1
- package/dist/Button.js +1 -1
- package/dist/Button.js.map +1 -1
- package/dist/Button.vue_used_vue_type_style_index_0_lang.module-63d31dc0.js +17 -0
- package/dist/Button.vue_used_vue_type_style_index_0_lang.module-63d31dc0.js.map +1 -0
- package/dist/ButtonGroup.js +28 -28
- package/dist/ButtonGroup.js.map +1 -1
- package/dist/Card.js +3 -3
- package/dist/Card.js.map +1 -1
- package/dist/CardHeader.js +3 -3
- package/dist/CardMedia.js +1 -1
- package/dist/CardMedia.js.map +1 -1
- package/dist/Carousel.js +260 -248
- package/dist/Carousel.js.map +1 -1
- package/dist/Checkbox.js +58 -46
- package/dist/Checkbox.js.map +1 -1
- package/dist/Checkbox.vue.d.ts +2 -0
- package/dist/Checkbox.vue_used_vue_type_style_index_0_lang.module-fa8d9c06.js +9 -0
- package/dist/Checkbox.vue_used_vue_type_style_index_0_lang.module-fa8d9c06.js.map +1 -0
- package/dist/ChevronToggle.js +1 -1
- package/dist/Chip.js +1 -1
- package/dist/Chip.js.map +1 -1
- package/dist/ConfirmationCodeInput.js +21 -21
- package/dist/ConfirmationCodeInput.js.map +1 -1
- package/dist/ContextSwitcher.js +6 -5
- package/dist/ContextSwitcher.js.map +1 -1
- package/dist/Copy.js +1 -1
- package/dist/CurrencyInput.js +2 -2
- package/dist/DataView.js +1 -1
- package/dist/DataViewFilters.js +7 -7
- package/dist/DataViewFilters.js.map +1 -1
- package/dist/DataViewSortButton.js +47 -38
- package/dist/DataViewSortButton.js.map +1 -1
- package/dist/DataViewToolbar.js +4 -4
- package/dist/DataViewToolbar.js.map +1 -1
- package/dist/DatePicker.js +12 -15
- package/dist/DatePicker.js.map +1 -1
- package/dist/DescriptionListTerm.js +8 -8
- package/dist/DescriptionListTerm.js.map +1 -1
- package/dist/Dialog.js +46 -46
- package/dist/Dialog.js.map +1 -1
- package/dist/Divider.js +9 -9
- package/dist/Divider.js.map +1 -1
- package/dist/Dropdown.js +17 -17
- package/dist/Dropdown.js.map +1 -1
- package/dist/EmptyState.js +1 -1
- package/dist/EmptyState.js.map +1 -1
- package/dist/Expand.js +1 -1
- package/dist/{Expand.vue_vue_type_script_setup_true_lang-5fe03d51.js → Expand.vue_vue_type_script_setup_true_lang-1751f4a6.js} +14 -15
- package/dist/Expand.vue_vue_type_script_setup_true_lang-1751f4a6.js.map +1 -0
- package/dist/Field.js +2 -2
- package/dist/Field.vue.d.ts +1 -1
- package/dist/{Field.vue_vue_type_script_setup_true_lang-475832fe.js → Field.vue_vue_type_script_setup_true_lang-42ba3c5a.js} +5 -5
- package/dist/Field.vue_vue_type_script_setup_true_lang-42ba3c5a.js.map +1 -0
- package/dist/FileUpload.js +49 -47
- package/dist/FileUpload.js.map +1 -1
- package/dist/FilterChip.js +20 -20
- package/dist/FilterChip.js.map +1 -1
- package/dist/FilterDrawerItem.js +4 -4
- package/dist/FilterDrawerItem.js.map +1 -1
- package/dist/FilterDropdown.js +19 -19
- package/dist/FilterDropdown.js.map +1 -1
- package/dist/FilterSelect.js +27 -27
- package/dist/FilterSelect.js.map +1 -1
- package/dist/Filters.js +51 -50
- package/dist/Filters.js.map +1 -1
- package/dist/HttpError.js +28 -28
- package/dist/HttpError.js.map +1 -1
- package/dist/IconLabel.js +17 -17
- package/dist/IconLabel.js.map +1 -1
- package/dist/IconLabel.vue.d.ts +1 -1
- package/dist/Illustration.js +10 -60
- package/dist/Illustration.js.map +1 -1
- package/dist/Illustration.vue_vue_type_script_setup_true_lang-d6a94e17.js +56 -0
- package/dist/Illustration.vue_vue_type_script_setup_true_lang-d6a94e17.js.map +1 -0
- package/dist/Image.js +67 -72
- package/dist/Image.js.map +1 -1
- package/dist/InlineEdit.js +3 -3
- package/dist/InlineEdit.js.map +1 -1
- package/dist/Input.js +43 -43
- package/dist/Input.js.map +1 -1
- package/dist/InputOptions.js +34 -33
- package/dist/InputOptions.js.map +1 -1
- package/dist/Label.js +1 -1
- package/dist/Label.vue.d.ts +13 -2
- package/dist/Label.vue_vue_type_script_setup_true_lang-4b02087f.js +38 -0
- package/dist/Label.vue_vue_type_script_setup_true_lang-4b02087f.js.map +1 -0
- package/dist/ListItem.js +16 -15
- package/dist/ListItem.js.map +1 -1
- package/dist/ListItemCell.js +9 -9
- package/dist/ListItemCell.js.map +1 -1
- package/dist/ListView.js +143 -139
- package/dist/ListView.js.map +1 -1
- package/dist/Loading.js +17 -10
- package/dist/Loading.js.map +1 -1
- package/dist/Loading.vue_used_vue_type_style_index_0_lang.module-ef5a3bc6.js +8 -0
- package/dist/Loading.vue_used_vue_type_style_index_0_lang.module-ef5a3bc6.js.map +1 -0
- package/dist/Menu.js +1 -1
- package/dist/Menu.js.map +1 -1
- package/dist/MenuItem.js +20 -14
- package/dist/MenuItem.js.map +1 -1
- package/dist/Metric.js +4 -4
- package/dist/Metric.js.map +1 -1
- package/dist/Modal.js +21 -21
- package/dist/Modal.js.map +1 -1
- package/dist/Modals.js +13 -13
- package/dist/Modals.js.map +1 -1
- package/dist/Module.js +2 -2
- package/dist/Module.js.map +1 -1
- package/dist/ModuleContent.js +2 -2
- package/dist/ModuleContent.js.map +1 -1
- package/dist/ModuleFooter.js +11 -11
- package/dist/ModuleFooter.js.map +1 -1
- package/dist/ModuleHeader.js +6 -6
- package/dist/ModuleHeader.js.map +1 -1
- package/dist/ObfuscateText.js +30 -32
- package/dist/ObfuscateText.js.map +1 -1
- package/dist/ObfuscateText.vue.d.ts +1 -1
- package/dist/PageContent.js +9 -9
- package/dist/PageContent.js.map +1 -1
- package/dist/PageHeader.js +24 -24
- package/dist/PageHeader.js.map +1 -1
- package/dist/PageNavigation.js +3 -3
- package/dist/PageNavigation.js.map +1 -1
- package/dist/Paginate.js +1 -1
- package/dist/Paginate.js.map +1 -1
- package/dist/Paginate.vue_used_vue_type_style_index_0_lang.module-18343da7.js +11 -0
- package/dist/Paginate.vue_used_vue_type_style_index_0_lang.module-18343da7.js.map +1 -0
- package/dist/QuickAction.js +20 -17
- package/dist/QuickAction.js.map +1 -1
- package/dist/Radio.js +30 -15
- package/dist/Radio.js.map +1 -1
- package/dist/RadioGroup.js +177 -148
- package/dist/RadioGroup.js.map +1 -1
- package/dist/RadioNew.js +118 -91
- package/dist/RadioNew.js.map +1 -1
- package/dist/SearchBar.js +27 -27
- package/dist/SearchBar.js.map +1 -1
- package/dist/Select.js +189 -188
- package/dist/Select.js.map +1 -1
- package/dist/SelectStatus.js +22 -21
- package/dist/SelectStatus.js.map +1 -1
- package/dist/Step.js +37 -37
- package/dist/Step.js.map +1 -1
- package/dist/Switch.js +44 -36
- package/dist/Switch.js.map +1 -1
- package/dist/Tab.js +3 -2
- package/dist/Tab.js.map +1 -1
- package/dist/{Tab.vue_vue_type_script_setup_true_lang-b810bee8.js → Tab.vue_vue_type_script_setup_true_lang-69d1b046.js} +23 -22
- package/dist/Tab.vue_vue_type_script_setup_true_lang-69d1b046.js.map +1 -0
- package/dist/Table.js +23 -22
- package/dist/Table.js.map +1 -1
- package/dist/Table.keys-cf93df19.js +27 -0
- package/dist/{Table.keys-1ebe4ecb.js.map → Table.keys-cf93df19.js.map} +1 -1
- package/dist/TableCell.js +24 -23
- package/dist/TableCell.js.map +1 -1
- package/dist/TableHeaderCell.js +37 -36
- package/dist/TableHeaderCell.js.map +1 -1
- package/dist/TableHeaderRow.js +13 -12
- package/dist/TableHeaderRow.js.map +1 -1
- package/dist/TableRow.js +36 -34
- package/dist/TableRow.js.map +1 -1
- package/dist/Tabs.js +2 -2
- package/dist/{Tabs.vue_used_vue_type_style_index_0_lang.module-4f247ed7.js → Tabs.vue_used_vue_type_style_index_0_lang.module-2a131332.js} +26 -26
- package/dist/Tabs.vue_used_vue_type_style_index_0_lang.module-2a131332.js.map +1 -0
- package/dist/Textarea.js +61 -53
- package/dist/Textarea.js.map +1 -1
- package/dist/Toast.js +23 -23
- package/dist/Toast.js.map +1 -1
- package/dist/components.css +1 -1
- package/dist/constants.d.ts +33 -26
- package/dist/constants.js +56 -41
- package/dist/constants.js.map +1 -1
- package/dist/index.js +21 -20
- package/dist/index.js.map +1 -1
- package/dist/storage.js +3 -2
- package/dist/storage.js.map +1 -1
- package/dist/tailwind-base.d.ts +16 -16
- package/dist/tailwind-base.js +16 -6
- package/dist/tailwind-base.js.map +1 -1
- package/dist/useGoogleMaps.js.map +1 -1
- package/dist/utils/helpers.js +37 -37
- package/dist/utils/helpers.js.map +1 -1
- package/dist/utils/storage.js +30 -29
- package/dist/utils/storage.js.map +1 -1
- package/package.json +2 -2
- package/styles/_core.scss +49 -1
- package/styles/backwards-compat.css +1467 -106
- package/styles/base.css +537 -22
- package/tailwind-base.ts +6 -1
- package/dist/Button.vue_used_vue_type_style_index_0_lang.module-b77978d6.js +0 -17
- package/dist/Button.vue_used_vue_type_style_index_0_lang.module-b77978d6.js.map +0 -1
- package/dist/Checkbox.vue_vue_type_style_index_0_scoped_0d7e7fd0_lang-4ed993c7.js +0 -2
- package/dist/Checkbox.vue_vue_type_style_index_0_scoped_0d7e7fd0_lang-4ed993c7.js.map +0 -1
- package/dist/Expand.vue_vue_type_script_setup_true_lang-5fe03d51.js.map +0 -1
- package/dist/Field.vue_vue_type_script_setup_true_lang-475832fe.js.map +0 -1
- package/dist/Label.vue_vue_type_script_setup_true_lang-1d29d98a.js +0 -37
- package/dist/Label.vue_vue_type_script_setup_true_lang-1d29d98a.js.map +0 -1
- package/dist/Loading.vue_vue_type_style_index_0_scoped_bb8d5f15_lang-4ed993c7.js +0 -2
- package/dist/Loading.vue_vue_type_style_index_0_scoped_bb8d5f15_lang-4ed993c7.js.map +0 -1
- package/dist/Paginate.vue_used_vue_type_style_index_0_lang.module-bfccf992.js +0 -11
- package/dist/Paginate.vue_used_vue_type_style_index_0_lang.module-bfccf992.js.map +0 -1
- package/dist/Tab.vue_vue_type_script_setup_true_lang-b810bee8.js.map +0 -1
- package/dist/Table.keys-1ebe4ecb.js +0 -27
- package/dist/Tabs.vue_used_vue_type_style_index_0_lang.module-4f247ed7.js.map +0 -1
- package/styles/_base.scss +0 -493
- package/styles/components/_all.scss +0 -14
- package/styles/components/_box.scss +0 -13
- package/styles/components/_item-list.scss +0 -78
- package/styles/components/_sidebar.scss +0 -404
- package/styles/components/_top-header.scss +0 -219
- package/styles/elements/_all.scss +0 -15
- package/styles/elements/_buttons.scss +0 -235
- package/styles/elements/_forms.scss +0 -300
- package/styles/elements/_links.scss +0 -32
- package/styles/elements/_lists.scss +0 -31
- package/styles/elements/_misc.scss +0 -16
- package/styles/elements/_tables.scss +0 -80
- package/styles/elements/_tooltips.scss +0 -110
- package/styles/main.scss +0 -38
- package/styles/utility/_all.scss +0 -12
- package/styles/utility/_animations.scss +0 -103
- package/styles/utility/_display.scss +0 -167
- package/styles/utility/_grid.scss +0 -200
- package/styles/utility/_icons.scss +0 -31
- package/styles/utility/_transitions.scss +0 -110
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { _ as
|
|
1
|
+
import { defineComponent as _, ref as v, useSlots as y, resolveComponent as $, openBlock as a, createElementBlock as r, unref as b, createBlock as h, normalizeClass as n, withCtx as m, createElementVNode as s, createVNode as o, toDisplayString as d, renderSlot as p } from "vue";
|
|
2
|
+
import { _ as k } from "./Expand.vue_vue_type_script_setup_true_lang-1751f4a6.js";
|
|
3
3
|
import i from "./Icon.js";
|
|
4
|
-
import { _ as
|
|
4
|
+
import { _ as x } from "./_plugin-vue_export-helper-dad06003.js";
|
|
5
5
|
import "lodash-es/uniqueId";
|
|
6
6
|
import "./index-79ce320f.js";
|
|
7
7
|
import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
|
8
|
-
const C = { class: "flex-1
|
|
8
|
+
const C = { class: "tw-flex tw-flex-1 tw-items-center tw-overflow-hidden" }, A = { class: "tw-truncate" }, B = { key: 1 }, I = { class: "tw-flex tw-flex-1 tw-items-center tw-overflow-hidden" }, N = { class: "tw-truncate" }, g = /* @__PURE__ */ _({
|
|
9
9
|
__name: "AppNavigationItem",
|
|
10
10
|
props: {
|
|
11
11
|
to: {},
|
|
@@ -14,13 +14,13 @@ const C = { class: "flex-1 flex items-center overflow-hidden" }, A = { class: "t
|
|
|
14
14
|
isActive: { type: Boolean, default: !1 }
|
|
15
15
|
},
|
|
16
16
|
setup(u) {
|
|
17
|
-
const t = u, l =
|
|
17
|
+
const t = u, l = v(!1), f = y();
|
|
18
18
|
return (e, c) => {
|
|
19
|
-
const
|
|
20
|
-
return
|
|
21
|
-
b(f)["sub-items"] ? (
|
|
19
|
+
const w = $("router-link");
|
|
20
|
+
return a(), r("li", null, [
|
|
21
|
+
b(f)["sub-items"] ? (a(), r("div", B, [
|
|
22
22
|
s("button", {
|
|
23
|
-
class:
|
|
23
|
+
class: n([[e.$style.item, { [e.$style.expanded]: l.value }], "tw-flex tw-w-full tw-items-center tw-justify-between tw-font-normal tw-capitalize"]),
|
|
24
24
|
onClick: c[0] || (c[0] = () => l.value = !l.value)
|
|
25
25
|
}, [
|
|
26
26
|
s("div", I, [
|
|
@@ -28,30 +28,30 @@ const C = { class: "flex-1 flex items-center overflow-hidden" }, A = { class: "t
|
|
|
28
28
|
name: t.icon,
|
|
29
29
|
class: "tw-mr-3"
|
|
30
30
|
}, null, 8, ["name"]),
|
|
31
|
-
s("span", N,
|
|
31
|
+
s("span", N, d(t.label), 1)
|
|
32
32
|
]),
|
|
33
33
|
o(i, {
|
|
34
|
-
class:
|
|
34
|
+
class: n([e.$style.caret, { [e.$style.expandedIcon]: l.value }]),
|
|
35
35
|
name: "chevron-left"
|
|
36
36
|
}, null, 8, ["class"])
|
|
37
37
|
], 2),
|
|
38
|
-
o(
|
|
38
|
+
o(k, {
|
|
39
39
|
"is-expanded": l.value,
|
|
40
|
-
class:
|
|
40
|
+
class: n(e.$style.expand)
|
|
41
41
|
}, {
|
|
42
42
|
default: m(() => [
|
|
43
43
|
s("ul", {
|
|
44
|
-
class:
|
|
44
|
+
class: n(e.$style["sub-items"])
|
|
45
45
|
}, [
|
|
46
|
-
|
|
46
|
+
p(e.$slots, "sub-items")
|
|
47
47
|
], 2)
|
|
48
48
|
]),
|
|
49
49
|
_: 3
|
|
50
50
|
}, 8, ["is-expanded", "class"])
|
|
51
|
-
])) : (
|
|
51
|
+
])) : (a(), h(w, {
|
|
52
52
|
key: 0,
|
|
53
53
|
to: t.to,
|
|
54
|
-
class:
|
|
54
|
+
class: n([[e.$style.item, { [e.$style.active]: t.isActive }], "tw-flex tw-w-full tw-items-center tw-justify-between tw-font-normal tw-capitalize"]),
|
|
55
55
|
"active-class": e.$style.active
|
|
56
56
|
}, {
|
|
57
57
|
default: m(() => [
|
|
@@ -60,24 +60,24 @@ const C = { class: "flex-1 flex items-center overflow-hidden" }, A = { class: "t
|
|
|
60
60
|
name: t.icon,
|
|
61
61
|
class: "tw-mr-3"
|
|
62
62
|
}, null, 8, ["name"]),
|
|
63
|
-
s("span", A,
|
|
63
|
+
s("span", A, d(t.label), 1)
|
|
64
64
|
]),
|
|
65
|
-
|
|
65
|
+
p(e.$slots, "default")
|
|
66
66
|
]),
|
|
67
67
|
_: 3
|
|
68
68
|
}, 8, ["to", "class", "active-class"]))
|
|
69
69
|
]);
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
}), z = "
|
|
72
|
+
}), z = "_item_n8mr7_2", E = "_expanded_n8mr7_19", S = "_active_n8mr7_23", j = "_caret_n8mr7_29", M = {
|
|
73
73
|
item: z,
|
|
74
|
-
"sub-items": "_sub-
|
|
74
|
+
"sub-items": "_sub-items_n8mr7_15",
|
|
75
75
|
expanded: E,
|
|
76
76
|
active: S,
|
|
77
77
|
caret: j
|
|
78
78
|
}, V = {
|
|
79
79
|
$style: M
|
|
80
|
-
}, L = /* @__PURE__ */
|
|
80
|
+
}, L = /* @__PURE__ */ x(g, [["__cssModules", V]]);
|
|
81
81
|
export {
|
|
82
82
|
L as default
|
|
83
83
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppNavigationItem.js","sources":["../src/components/AppNavigationItem/AppNavigationItem.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { ref, useSlots } from 'vue';\n import { type RouteLocationRaw } from 'vue-router';\n\n import Expand from '../Expand/Expand.vue';\n import { IconName } from '../Icon/Icon.types';\n import Icon from '../Icon/Icon.vue';\n\n export interface AppNavigationItemProps {\n /**\n * Location to navigate to\n */\n to: RouteLocationRaw,\n /**\n * Icon to render on the left side\n */\n icon: IconName;\n /**\n * Text label to render\n */\n label: string;\n /**\n * Indicates whether the route is active or not\n */\n isActive?: boolean;\n }\n\n const isExpanded = ref(false);\n\n const props = withDefaults(defineProps<AppNavigationItemProps>(), {\n isActive: false,\n });\n\n const slots = useSlots();\n</script>\n\n<template>\n <li>\n <router-link\n v-if=\"!slots['sub-items']\"\n :to=\"props.to\"\n :class=\"[$style.item, { [$style.active]: props.isActive }]\"\n :active-class=\"$style.active\"\n class=\"flex items-center justify-between
|
|
1
|
+
{"version":3,"file":"AppNavigationItem.js","sources":["../src/components/AppNavigationItem/AppNavigationItem.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { ref, useSlots } from 'vue';\n import { type RouteLocationRaw } from 'vue-router';\n\n import Expand from '../Expand/Expand.vue';\n import { IconName } from '../Icon/Icon.types';\n import Icon from '../Icon/Icon.vue';\n\n export interface AppNavigationItemProps {\n /**\n * Location to navigate to\n */\n to: RouteLocationRaw,\n /**\n * Icon to render on the left side\n */\n icon: IconName;\n /**\n * Text label to render\n */\n label: string;\n /**\n * Indicates whether the route is active or not\n */\n isActive?: boolean;\n }\n\n const isExpanded = ref(false);\n\n const props = withDefaults(defineProps<AppNavigationItemProps>(), {\n isActive: false,\n });\n\n const slots = useSlots();\n</script>\n\n<template>\n <li>\n <router-link\n v-if=\"!slots['sub-items']\"\n :to=\"props.to\"\n :class=\"[$style.item, { [$style.active]: props.isActive }]\"\n :active-class=\"$style.active\"\n class=\"tw-flex tw-w-full tw-items-center tw-justify-between tw-font-normal tw-capitalize\"\n >\n <div class=\"tw-flex tw-flex-1 tw-items-center tw-overflow-hidden\">\n <Icon :name=\"props.icon\" class=\"tw-mr-3\" />\n <span class=\"tw-truncate\">{{ props.label }}</span>\n </div>\n <!-- @slot Default component slot, for content to the right side of item -->\n <slot></slot>\n </router-link>\n <div v-else>\n <button\n :class=\"[$style.item, { [$style.expanded]: isExpanded }]\"\n class=\"tw-flex tw-w-full tw-items-center tw-justify-between tw-font-normal tw-capitalize\"\n @click=\"() => (isExpanded = !isExpanded)\"\n >\n <div class=\"tw-flex tw-flex-1 tw-items-center tw-overflow-hidden\">\n <Icon :name=\"props.icon\" class=\"tw-mr-3\" />\n <span class=\"tw-truncate\">{{ props.label }}</span>\n </div>\n <Icon :class=\"[$style.caret, { [$style.expandedIcon]: isExpanded }]\" name=\"chevron-left\" />\n </button>\n <Expand :is-expanded=\"isExpanded\" :class=\"$style.expand\">\n <ul :class=\"$style['sub-items']\">\n <!-- @slot Sub items component slot, for rendering nested navigation items -->\n <slot name=\"sub-items\"></slot>\n </ul>\n </Expand>\n </div>\n </li>\n</template>\n\n<style module>\n .item {\n border-left: 6px solid transparent;\n color: var(--color-ice-500);\n padding: 10px 12px;\n transition: background-color 150ms;\n }\n\n .item:hover,\n .item:focus {\n text-decoration: none;\n background: #140e35;\n }\n\n .sub-items .item {\n padding-left: 40px;\n }\n\n .expanded {\n background-color: #263256;\n }\n\n .active {\n color: var(--color-seafoam-500);\n border-color: var(--color-seafoam-500);\n background: #140e35;\n }\n\n .caret {\n transition: transform 300ms ease-in-out;\n }\n\n .expanded .caret {\n transform: rotate(-90deg);\n }\n</style>\n"],"names":["isExpanded","ref","slots","useSlots"],"mappings":";;;;;;;;;;;;;;;;iBA2BQA,IAAaC,EAAI,EAAK,GAMtBC,IAAQC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/AppSidebar.js
CHANGED
|
@@ -3,8 +3,8 @@ import $ from "./useMediaQuery.js";
|
|
|
3
3
|
import z from "./Backdrop.js";
|
|
4
4
|
import A from "./Divider.js";
|
|
5
5
|
import { _ as N } from "./_plugin-vue_export-helper-dad06003.js";
|
|
6
|
-
const j = (t) => (I("data-v-
|
|
7
|
-
class: "stash-app-sidebar__aside tw-fixed tw-
|
|
6
|
+
const j = (t) => (I("data-v-78582cf0"), t = t(), V(), t), D = {
|
|
7
|
+
class: "stash-app-sidebar__aside tw-fixed tw-flex tw-h-screen tw-flex-col tw-bg-purple-500",
|
|
8
8
|
"data-test": "stash-app-sidebar__aside"
|
|
9
9
|
}, M = {
|
|
10
10
|
key: 0,
|
|
@@ -25,21 +25,21 @@ const j = (t) => (I("data-v-7962d89f"), t = t(), V(), t), D = {
|
|
|
25
25
|
},
|
|
26
26
|
emits: ["dismiss", "update:is-open"],
|
|
27
27
|
setup(t, { emit: _ }) {
|
|
28
|
-
const f = t, r = x(), l = $("screen and (min-width: 1321px)"), e = m(() => f.isOpen && !l.value),
|
|
28
|
+
const f = t, r = x(), l = $("screen and (min-width: 1321px)"), e = m(() => f.isOpen && !l.value), p = C({ height: "", overflow: "" }), h = m(() => f.isOpen || l.value);
|
|
29
29
|
function S() {
|
|
30
30
|
_("dismiss"), _("update:is-open", !1);
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function d() {
|
|
33
33
|
return document.scrollingElement || document.body;
|
|
34
34
|
}
|
|
35
35
|
return E(() => {
|
|
36
|
-
l.value || (e.value && Object.assign(
|
|
37
|
-
overflow:
|
|
38
|
-
height:
|
|
39
|
-
}), Object.assign(
|
|
40
|
-
overflow: e.value ? "hidden" :
|
|
36
|
+
l.value || (e.value && Object.assign(p.value, {
|
|
37
|
+
overflow: d().style.overflow,
|
|
38
|
+
height: d().style.height
|
|
39
|
+
}), Object.assign(d().style, {
|
|
40
|
+
overflow: e.value ? "hidden" : p.value.overflow,
|
|
41
41
|
// Prevents page from scrolling when AppSidebar is open
|
|
42
|
-
height: e.value ? "100%" :
|
|
42
|
+
height: e.value ? "100%" : p.value.height
|
|
43
43
|
// Ensures the backdrop covers the entire page when AppSidebar is open
|
|
44
44
|
}));
|
|
45
45
|
}), (s, F) => (a(), o("div", {
|
|
@@ -88,7 +88,7 @@ const j = (t) => (I("data-v-7962d89f"), t = t(), V(), t), D = {
|
|
|
88
88
|
], 2));
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
|
-
const U = /* @__PURE__ */ N(q, [["__scopeId", "data-v-
|
|
91
|
+
const U = /* @__PURE__ */ N(q, [["__scopeId", "data-v-78582cf0"]]);
|
|
92
92
|
export {
|
|
93
93
|
U as default
|
|
94
94
|
};
|
package/dist/AppSidebar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppSidebar.js","sources":["../src/components/AppSidebar/AppSidebar.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, ref, useSlots, watchEffect } from 'vue';\n\n import useMediaQuery from '../../composables/useMediaQuery/useMediaQuery';\n import Backdrop from '../Backdrop/Backdrop.vue';\n import Divider from '../Divider/Divider.vue';\n\n export interface AppSidebarProps {\n /**\n * Controls wether the sidebar is opened or not\n */\n isOpen?: boolean;\n }\n\n const props = withDefaults(defineProps<AppSidebarProps>(), {\n isOpen: false,\n });\n\n const slots = useSlots();\n\n const emit =\n defineEmits<{\n /**\n * @deprecated Use the `update:is-open` event instead\n */\n (e: 'dismiss'): void;\n (e: 'update:is-open', isOpen: boolean): void;\n }>();\n\n const isExtraLargeScreen = useMediaQuery('screen and (min-width: 1321px)');\n const isBackdropVisible = computed(() => props.isOpen && !isExtraLargeScreen.value);\n const initialPageScrollingElementStyle = ref({ height: '', overflow: '' });\n const isSidebarOpen = computed(() => props.isOpen || isExtraLargeScreen.value);\n\n function onBackdropClick() {\n emit('dismiss');\n emit('update:is-open', false);\n }\n\n function getPageScrollingElement() {\n return (document.scrollingElement || document.body) as HTMLElement;\n }\n\n watchEffect(() => {\n if (isExtraLargeScreen.value) {\n return;\n }\n\n if (isBackdropVisible.value) {\n Object.assign(initialPageScrollingElementStyle.value, {\n overflow: getPageScrollingElement().style.overflow,\n height: getPageScrollingElement().style.height,\n });\n }\n\n Object.assign(getPageScrollingElement().style, {\n overflow: isBackdropVisible.value ? 'hidden' : initialPageScrollingElementStyle.value.overflow, // Prevents page from scrolling when AppSidebar is open\n height: isBackdropVisible.value ? '100%' : initialPageScrollingElementStyle.value.height, // Ensures the backdrop covers the entire page when AppSidebar is open\n });\n });\n</script>\n\n<template>\n <div\n id=\"stash-app-sidebar\"\n class=\"stash-app-sidebar tw-relative\"\n :class=\"{\n 'stash-app-sidebar--is-open': isSidebarOpen,\n 'tw-z-modal': isBackdropVisible,\n 'tw-z-[301]': !isBackdropVisible,\n }\"\n data-test=\"stash-app-sidebar\"\n >\n <Transition name=\"backdrop\">\n <Backdrop v-show=\"isBackdropVisible\" class=\"stash-app-sidebar__backdrop\" @click.stop=\"onBackdropClick\" />\n </Transition>\n <Transition name=\"aside\">\n <aside\n v-show=\"isSidebarOpen\"\n class=\"stash-app-sidebar__aside tw-fixed tw-
|
|
1
|
+
{"version":3,"file":"AppSidebar.js","sources":["../src/components/AppSidebar/AppSidebar.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, ref, useSlots, watchEffect } from 'vue';\n\n import useMediaQuery from '../../composables/useMediaQuery/useMediaQuery';\n import Backdrop from '../Backdrop/Backdrop.vue';\n import Divider from '../Divider/Divider.vue';\n\n export interface AppSidebarProps {\n /**\n * Controls wether the sidebar is opened or not\n */\n isOpen?: boolean;\n }\n\n const props = withDefaults(defineProps<AppSidebarProps>(), {\n isOpen: false,\n });\n\n const slots = useSlots();\n\n const emit =\n defineEmits<{\n /**\n * @deprecated Use the `update:is-open` event instead\n */\n (e: 'dismiss'): void;\n (e: 'update:is-open', isOpen: boolean): void;\n }>();\n\n const isExtraLargeScreen = useMediaQuery('screen and (min-width: 1321px)');\n const isBackdropVisible = computed(() => props.isOpen && !isExtraLargeScreen.value);\n const initialPageScrollingElementStyle = ref({ height: '', overflow: '' });\n const isSidebarOpen = computed(() => props.isOpen || isExtraLargeScreen.value);\n\n function onBackdropClick() {\n emit('dismiss');\n emit('update:is-open', false);\n }\n\n function getPageScrollingElement() {\n return (document.scrollingElement || document.body) as HTMLElement;\n }\n\n watchEffect(() => {\n if (isExtraLargeScreen.value) {\n return;\n }\n\n if (isBackdropVisible.value) {\n Object.assign(initialPageScrollingElementStyle.value, {\n overflow: getPageScrollingElement().style.overflow,\n height: getPageScrollingElement().style.height,\n });\n }\n\n Object.assign(getPageScrollingElement().style, {\n overflow: isBackdropVisible.value ? 'hidden' : initialPageScrollingElementStyle.value.overflow, // Prevents page from scrolling when AppSidebar is open\n height: isBackdropVisible.value ? '100%' : initialPageScrollingElementStyle.value.height, // Ensures the backdrop covers the entire page when AppSidebar is open\n });\n });\n</script>\n\n<template>\n <div\n id=\"stash-app-sidebar\"\n class=\"stash-app-sidebar tw-relative\"\n :class=\"{\n 'stash-app-sidebar--is-open': isSidebarOpen,\n 'tw-z-modal': isBackdropVisible,\n 'tw-z-[301]': !isBackdropVisible,\n }\"\n data-test=\"stash-app-sidebar\"\n >\n <Transition name=\"backdrop\">\n <Backdrop v-show=\"isBackdropVisible\" class=\"stash-app-sidebar__backdrop\" @click.stop=\"onBackdropClick\" />\n </Transition>\n <Transition name=\"aside\">\n <aside\n v-show=\"isSidebarOpen\"\n class=\"stash-app-sidebar__aside tw-fixed tw-flex tw-h-screen tw-flex-col tw-bg-purple-500\"\n data-test=\"stash-app-sidebar__aside\"\n >\n <Divider class=\"stash-app-sidebar__divider\" />\n <div v-if=\"slots['app-context']\" class=\"tw-px-3 tw-pt-6\">\n <!-- @slot App Context component slot, ideally for rendering the context switcher -->\n <slot name=\"app-context\"></slot>\n </div>\n <div v-if=\"slots['company-context']\" class=\"tw-px-3 tw-pt-6\">\n <!-- @slot Company Context component slot, ideally for rendering the company picker -->\n <slot name=\"company-context\"></slot>\n </div>\n <nav v-if=\"slots['navigation']\" class=\"tw-pt-6\">\n <ul role=\"menubar\" aria-orientation=\"vertical\">\n <!-- @slot Navigation component slot, for rendering navigation items -->\n <slot name=\"navigation\"></slot>\n </ul>\n </nav>\n <div class=\"tw-flex-1\"></div>\n <!-- @slot Footer component slot, for rendering version/environment notes -->\n <slot name=\"footer\"></slot>\n </aside>\n </Transition>\n </div>\n</template>\n\n<style scoped>\n .stash-app-sidebar__aside {\n padding-top: calc(theme('height.topbar') - 1px); /* -1px to compensate for the border height */\n width: theme('width.sidebar');\n }\n\n .stash-app-sidebar__divider::before,\n .stash-app-sidebar__divider::after {\n border-bottom: 1px solid rgb(255 255 255 / 12%);\n }\n\n .backdrop-enter-active,\n .backdrop-leave-active {\n transition: opacity 200ms ease-in-out;\n }\n\n .backdrop-enter-from,\n .backdrop-leave-to {\n opacity: 0;\n }\n\n .aside-enter-active,\n .aside-leave-active {\n transition: opacity 200ms ease-in-out, transform 200ms ease-in-out;\n }\n\n .aside-enter-from,\n .aside-leave-to {\n opacity: 0;\n transform: translateX(-20%);\n }\n</style>\n"],"names":["slots","useSlots","isExtraLargeScreen","useMediaQuery","isBackdropVisible","computed","props","initialPageScrollingElementStyle","ref","isSidebarOpen","onBackdropClick","emit","getPageScrollingElement","watchEffect"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkBQA,IAAQC,KAWRC,IAAqBC,EAAc,gCAAgC,GACnEC,IAAoBC,EAAS,MAAMC,EAAM,UAAU,CAACJ,EAAmB,KAAK,GAC5EK,IAAmCC,EAAI,EAAE,QAAQ,IAAI,UAAU,IAAI,GACnEC,IAAgBJ,EAAS,MAAMC,EAAM,UAAUJ,EAAmB,KAAK;AAE7E,aAASQ,IAAkB;AACzB,MAAAC,EAAK,SAAS,GACdA,EAAK,kBAAkB,EAAK;AAAA,IAC9B;AAEA,aAASC,IAA0B;AACzB,aAAA,SAAS,oBAAoB,SAAS;AAAA,IAChD;AAEA,WAAAC,EAAY,MAAM;AAChB,MAAIX,EAAmB,UAInBE,EAAkB,SACb,OAAA,OAAOG,EAAiC,OAAO;AAAA,QACpD,UAAUK,IAA0B,MAAM;AAAA,QAC1C,QAAQA,IAA0B,MAAM;AAAA,MAAA,CACzC,GAGI,OAAA,OAAOA,EAAwB,EAAE,OAAO;AAAA,QAC7C,UAAUR,EAAkB,QAAQ,WAAWG,EAAiC,MAAM;AAAA;AAAA,QACtF,QAAQH,EAAkB,QAAQ,SAASG,EAAiC,MAAM;AAAA;AAAA,MAAA,CACnF;AAAA,IAAA,CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/AppTopbar.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { openBlock as n, createElementBlock as p, createStaticVNode as h, defineComponent as c, createElementVNode as t, normalizeClass as i, createVNode as
|
|
1
|
+
import { openBlock as n, createElementBlock as p, createStaticVNode as h, defineComponent as c, createElementVNode as t, normalizeClass as i, createVNode as s, unref as m, renderSlot as o } from "vue";
|
|
2
2
|
import d from "./Icon.js";
|
|
3
3
|
import "lodash-es/uniqueId";
|
|
4
4
|
import "./index-79ce320f.js";
|
|
@@ -16,8 +16,8 @@ function b(r, w) {
|
|
|
16
16
|
}
|
|
17
17
|
const H = { render: b }, u = {
|
|
18
18
|
"data-test": "stash-app-topbar",
|
|
19
|
-
class: "stash-app-topbar tw-absolute tw-
|
|
20
|
-
}, x = ["href"], _ = { class: "tw-flex tw-items-center" }, g = { class: "tw-ml-6" }, v = { class: "tw-hidden xl:tw-block
|
|
19
|
+
class: "stash-app-topbar tw-absolute tw-left-0 tw-top-0"
|
|
20
|
+
}, x = ["href"], _ = { class: "tw-flex tw-items-center" }, g = { class: "tw-ml-6" }, v = { class: "tw-hidden tw-pl-3 xl:tw-block" }, y = /* @__PURE__ */ c({
|
|
21
21
|
__name: "AppTopbar",
|
|
22
22
|
props: {
|
|
23
23
|
sidebarOpened: { type: Boolean, default: !1 },
|
|
@@ -25,38 +25,38 @@ const H = { render: b }, u = {
|
|
|
25
25
|
},
|
|
26
26
|
emits: ["toggle-sidebar"],
|
|
27
27
|
setup(r, { emit: w }) {
|
|
28
|
-
const
|
|
28
|
+
const a = r;
|
|
29
29
|
return (e, l) => (n(), p("header", u, [
|
|
30
30
|
t("div", {
|
|
31
|
-
class: i(["tw-fixed tw-top-0 tw-
|
|
32
|
-
"tw-
|
|
33
|
-
"tw-text-purple-500
|
|
31
|
+
class: i(["tw-fixed tw-top-0 tw-flex tw-h-topbar tw-w-sidebar tw-items-center tw-pl-3 tw-transition-colors tw-duration-500 xl:tw-text-white", {
|
|
32
|
+
"tw-z-dialog tw-text-white": a.sidebarOpened,
|
|
33
|
+
"tw-z-[401] tw-text-purple-500": !a.sidebarOpened
|
|
34
34
|
}])
|
|
35
35
|
}, [
|
|
36
36
|
t("button", {
|
|
37
37
|
class: "xl:tw-hidden",
|
|
38
38
|
onClick: l[0] || (l[0] = (M) => w("toggle-sidebar"))
|
|
39
39
|
}, [
|
|
40
|
-
|
|
40
|
+
s(d, {
|
|
41
41
|
name: "menu",
|
|
42
42
|
class: "tw-mr-3",
|
|
43
43
|
"aria-label": "open sidebar navigation"
|
|
44
44
|
})
|
|
45
45
|
]),
|
|
46
46
|
t("a", {
|
|
47
|
-
href:
|
|
47
|
+
href: a.href,
|
|
48
48
|
class: "tw-flex tw-items-center tw-text-inherit"
|
|
49
49
|
}, [
|
|
50
|
-
|
|
50
|
+
s(d, {
|
|
51
51
|
name: "logo-ll",
|
|
52
52
|
class: "tw-mr-1.5",
|
|
53
53
|
size: "large"
|
|
54
54
|
}),
|
|
55
|
-
|
|
55
|
+
s(m(H), { class: "tw-hidden tw-h-6 tw-w-full tw-max-w-[104px] md:tw-block" })
|
|
56
56
|
], 8, x)
|
|
57
57
|
], 2),
|
|
58
58
|
t("div", {
|
|
59
|
-
class: i([[e.$attrs.class], "tw-fixed tw-top-0 tw-
|
|
59
|
+
class: i([[e.$attrs.class], "tw-fixed tw-top-0 tw-z-page tw-flex tw-h-topbar tw-w-full tw-flex-row-reverse tw-items-center tw-justify-between tw-bg-white tw-py-3 tw-pl-sidebar tw-pr-3 tw-shadow-md"])
|
|
60
60
|
}, [
|
|
61
61
|
t("div", _, [
|
|
62
62
|
o(e.$slots, "actions"),
|
package/dist/Avatar.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as p, useAttrs as
|
|
1
|
+
import { defineComponent as p, useAttrs as v, useCssModule as _, computed as c, openBlock as i, createElementBlock as d, mergeProps as u, unref as a, toDisplayString as h } from "vue";
|
|
2
2
|
import b from "./utils/colorScheme.js";
|
|
3
3
|
import { _ as k } from "./_plugin-vue_export-helper-dad06003.js";
|
|
4
|
-
const
|
|
4
|
+
const g = ["alt", "src", "tabindex"], x = ["tabindex"], C = /* @__PURE__ */ p({
|
|
5
5
|
name: "ll-avatar",
|
|
6
6
|
__name: "Avatar",
|
|
7
7
|
props: {
|
|
@@ -14,12 +14,12 @@ const x = ["alt", "src", "tabindex"], C = ["tabindex"], w = /* @__PURE__ */ p({
|
|
|
14
14
|
textColor: { default: void 0 }
|
|
15
15
|
},
|
|
16
16
|
setup(m) {
|
|
17
|
-
const t = m, s =
|
|
17
|
+
const t = m, s = v(), e = _(), n = c(
|
|
18
18
|
() => b({
|
|
19
19
|
shade: t.shade,
|
|
20
20
|
color: t.colorScheme
|
|
21
21
|
})
|
|
22
|
-
),
|
|
22
|
+
), f = c(() => {
|
|
23
23
|
const [l, r] = String(t.name).toUpperCase().split(" ");
|
|
24
24
|
return r ? l.charAt(0) + r.charAt(0) : l.charAt(0);
|
|
25
25
|
}), o = c(() => !!s.onClick);
|
|
@@ -30,9 +30,9 @@ const x = ["alt", "src", "tabindex"], C = ["tabindex"], w = /* @__PURE__ */ p({
|
|
|
30
30
|
src: t.src,
|
|
31
31
|
tabindex: o.value ? 0 : -1,
|
|
32
32
|
"data-test": "stash-avatar"
|
|
33
|
-
}, a(s)), null, 16,
|
|
33
|
+
}, a(s)), null, 16, g)) : (i(), d("div", u({
|
|
34
34
|
key: 1,
|
|
35
|
-
class: ["stash-avatar stash-avatar--initials tw-inline-block tw-rounded-full tw-text-center tw-font-semibold
|
|
35
|
+
class: ["stash-avatar stash-avatar--initials tw-inline-block tw-cursor-default tw-rounded-full tw-text-center tw-font-semibold", [
|
|
36
36
|
a(e).root,
|
|
37
37
|
`tw-text-${t.textColor || n.value.computedTextColor}`,
|
|
38
38
|
`tw-bg-${t.bgColor || n.value.computedBgColor}`,
|
|
@@ -40,14 +40,14 @@ const x = ["alt", "src", "tabindex"], C = ["tabindex"], w = /* @__PURE__ */ p({
|
|
|
40
40
|
]],
|
|
41
41
|
tabindex: o.value ? 0 : -1,
|
|
42
42
|
"data-test": "stash-avatar"
|
|
43
|
-
}, a(s)), h(
|
|
43
|
+
}, a(s)), h(f.value), 17, x));
|
|
44
44
|
}
|
|
45
|
-
}),
|
|
46
|
-
root:
|
|
47
|
-
clickable:
|
|
45
|
+
}), w = "_root_g79af_2", A = "_clickable_g79af_9", y = {
|
|
46
|
+
root: w,
|
|
47
|
+
clickable: A
|
|
48
48
|
}, S = {
|
|
49
|
-
$style:
|
|
50
|
-
}, D = /* @__PURE__ */ k(
|
|
49
|
+
$style: y
|
|
50
|
+
}, D = /* @__PURE__ */ k(C, [["__cssModules", S]]);
|
|
51
51
|
export {
|
|
52
52
|
D as default
|
|
53
53
|
};
|
package/dist/Avatar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.js","sources":["../src/components/Avatar/Avatar.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, useAttrs, useCssModule } from 'vue';\n\n import { StashCommonColor, StashPrimaryColorGroup } from '../../../types/colors';\n import colorSchemeUtil from '../../utils/colorScheme';\n\n defineOptions({\n name: 'll-avatar',\n });\n\n export interface AvatarProps {\n /**\n * The name of the user will be parsed and have its initial displayed in case the src prop is empty\n */\n name?: string;\n\n /**\n * The color for the chip that determines both the text and bg color. Needs to\n * be one of the brand colors in our design system (not a shade).\n */\n colorScheme?: StashPrimaryColorGroup;\n\n /**\n * The shade of the provided color to use for the background color. This effects the inferred\n * text color unless a specific text color is provided. Currently only `light` and `main`\n * shades are supported. `dark` may be added in the future.\n */\n shade?: 'light' | 'main';\n\n /**\n * The image that will be displayed within the avatar\n */\n src?: string;\n\n /**\n * The alternative text to be displayed in case the image is unavailable\n */\n alt?: string;\n\n /**\n * The background color of the chip. Needs to be one of our design system colors.\n */\n bgColor?: StashCommonColor;\n\n /**\n * The color of the chip text. Needs to be one of our design system colors.\n */\n textColor?: StashCommonColor;\n }\n\n const props = withDefaults(defineProps<AvatarProps>(), {\n src: undefined,\n name: '',\n alt: undefined,\n colorScheme: 'ice',\n shade: 'light',\n bgColor: undefined,\n textColor: undefined,\n });\n\n const attrs = useAttrs();\n const classes = useCssModule();\n\n const computedColors = computed(() =>\n colorSchemeUtil({\n shade: props.shade,\n color: props.colorScheme,\n }),\n );\n\n const initials = computed(() => {\n const [firstName, lastName] = String(props.name).toUpperCase().split(' ');\n const initials = lastName ? firstName.charAt(0) + lastName.charAt(0) : firstName.charAt(0);\n\n return initials;\n });\n\n const isClickable = computed(() => {\n return !!attrs.onClick;\n });\n</script>\n\n<template>\n <img\n v-if=\"props.src\"\n class=\"stash-avatar stash-avatar--image tw-inline-block tw-rounded-full\"\n :class=\"[classes.root, { [classes.clickable]: isClickable }]\"\n :alt=\"props.alt\"\n :src=\"props.src\"\n :tabindex=\"isClickable ? 0 : -1\"\n data-test=\"stash-avatar\"\n v-bind=\"attrs\"\n />\n <div\n v-else\n class=\"\n stash-avatar stash-avatar--initials\n tw-inline-block tw-rounded-full tw-text-center tw-font-semibold
|
|
1
|
+
{"version":3,"file":"Avatar.js","sources":["../src/components/Avatar/Avatar.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, useAttrs, useCssModule } from 'vue';\n\n import { StashCommonColor, StashPrimaryColorGroup } from '../../../types/colors';\n import colorSchemeUtil from '../../utils/colorScheme';\n\n defineOptions({\n name: 'll-avatar',\n });\n\n export interface AvatarProps {\n /**\n * The name of the user will be parsed and have its initial displayed in case the src prop is empty\n */\n name?: string;\n\n /**\n * The color for the chip that determines both the text and bg color. Needs to\n * be one of the brand colors in our design system (not a shade).\n */\n colorScheme?: StashPrimaryColorGroup;\n\n /**\n * The shade of the provided color to use for the background color. This effects the inferred\n * text color unless a specific text color is provided. Currently only `light` and `main`\n * shades are supported. `dark` may be added in the future.\n */\n shade?: 'light' | 'main';\n\n /**\n * The image that will be displayed within the avatar\n */\n src?: string;\n\n /**\n * The alternative text to be displayed in case the image is unavailable\n */\n alt?: string;\n\n /**\n * The background color of the chip. Needs to be one of our design system colors.\n */\n bgColor?: StashCommonColor;\n\n /**\n * The color of the chip text. Needs to be one of our design system colors.\n */\n textColor?: StashCommonColor;\n }\n\n const props = withDefaults(defineProps<AvatarProps>(), {\n src: undefined,\n name: '',\n alt: undefined,\n colorScheme: 'ice',\n shade: 'light',\n bgColor: undefined,\n textColor: undefined,\n });\n\n const attrs = useAttrs();\n const classes = useCssModule();\n\n const computedColors = computed(() =>\n colorSchemeUtil({\n shade: props.shade,\n color: props.colorScheme,\n }),\n );\n\n const initials = computed(() => {\n const [firstName, lastName] = String(props.name).toUpperCase().split(' ');\n const initials = lastName ? firstName.charAt(0) + lastName.charAt(0) : firstName.charAt(0);\n\n return initials;\n });\n\n const isClickable = computed(() => {\n return !!attrs.onClick;\n });\n</script>\n\n<template>\n <img\n v-if=\"props.src\"\n class=\"stash-avatar stash-avatar--image tw-inline-block tw-rounded-full\"\n :class=\"[classes.root, { [classes.clickable]: isClickable }]\"\n :alt=\"props.alt\"\n :src=\"props.src\"\n :tabindex=\"isClickable ? 0 : -1\"\n data-test=\"stash-avatar\"\n v-bind=\"attrs\"\n />\n <div\n v-else\n class=\"\n stash-avatar stash-avatar--initials\n tw-inline-block tw-cursor-default tw-rounded-full tw-text-center tw-font-semibold\n \"\n :class=\"[\n classes.root,\n `tw-text-${props.textColor || computedColors.computedTextColor}`,\n `tw-bg-${props.bgColor || computedColors.computedBgColor}`,\n { [classes.clickable]: isClickable },\n ]\"\n :tabindex=\"isClickable ? 0 : -1\"\n data-test=\"stash-avatar\"\n v-bind=\"attrs\"\n >\n {{ initials }}\n </div>\n</template>\n\n<style module>\n .root {\n font-size: theme('fontSize.sm');\n height: theme('spacing.9');\n line-height: calc(theme('spacing.9') + 2px);\n width: theme('spacing.9');\n }\n\n .clickable:hover,\n .clickable:focus,\n .clickable:active {\n outline: 1px solid var(--color-blue-500);\n outline-offset: -1px;\n }\n\n .clickable:focus,\n .clickable:active {\n box-shadow: 0 0 0 4px rgb(0 114 240 / 15%);\n }\n</style>\n"],"names":["attrs","useAttrs","classes","useCssModule","computedColors","computed","colorSchemeUtil","props","initials","firstName","lastName","isClickable"],"mappings":";;;;;;;;;;;;;;;;iBA4DQA,IAAQC,KACRC,IAAUC,KAEVC,IAAiBC;AAAA,MAAS,MAC9BC,EAAgB;AAAA,QACd,OAAOC,EAAM;AAAA,QACb,OAAOA,EAAM;AAAA,MAAA,CACd;AAAA,IAAA,GAGGC,IAAWH,EAAS,MAAM;AACxB,YAAA,CAACI,GAAWC,CAAQ,IAAI,OAAOH,EAAM,IAAI,EAAE,YAAA,EAAc,MAAM,GAAG;AAGjEC,aAFUE,IAAWD,EAAU,OAAO,CAAC,IAAIC,EAAS,OAAO,CAAC,IAAID,EAAU,OAAO,CAAC;AAAA,IAElF,CACR,GAEKE,IAAcN,EAAS,MACpB,CAAC,CAACL,EAAM,OAChB;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/Backdrop.js
CHANGED
|
@@ -2,7 +2,7 @@ import { openBlock as e, createElementBlock as r, renderSlot as o } from "vue";
|
|
|
2
2
|
import { _ as s } from "./_plugin-vue_export-helper-dad06003.js";
|
|
3
3
|
const a = {}, c = {
|
|
4
4
|
"aria-hidden": "true",
|
|
5
|
-
class: "stash-backdrop tw-fixed tw-z-behind tw-bg-black/50
|
|
5
|
+
class: "stash-backdrop tw-fixed tw-inset-0 tw-z-behind tw-bg-black/50",
|
|
6
6
|
"data-test": "stash-backdrop"
|
|
7
7
|
};
|
|
8
8
|
function d(t, n) {
|
package/dist/Backdrop.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Backdrop.js","sources":["../src/components/Backdrop/Backdrop.vue"],"sourcesContent":["<template>\n <div\n aria-hidden=\"true\"\n class=\"stash-backdrop tw-fixed tw-z-behind tw-bg-black/50
|
|
1
|
+
{"version":3,"file":"Backdrop.js","sources":["../src/components/Backdrop/Backdrop.vue"],"sourcesContent":["<template>\n <div\n aria-hidden=\"true\"\n class=\"stash-backdrop tw-fixed tw-inset-0 tw-z-behind tw-bg-black/50\"\n data-test=\"stash-backdrop\"\n >\n <slot></slot>\n </div>\n</template>\n"],"names":["_hoisted_1","_sfc_render","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;cAEIA,IAAkB;AAAA,EAClB,eAAqE;AAAA,EACrE,OAAA;AAAA;;AAHF,SAAAC,EAAAC,GAAAC,GAAA;SAKeC,EAAA,GAAAC,EAAA,OAAAL,GAAA;AAAA;;;;"}
|
package/dist/Badge.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as u, useCssModule as g, computed as
|
|
1
|
+
import { defineComponent as u, useCssModule as g, computed as r, ref as w, watch as m, openBlock as v, createElementBlock as b, renderSlot as h, withDirectives as _, createElementVNode as d, normalizeClass as c, unref as i, normalizeStyle as x, toDisplayString as y, vShow as B } from "vue";
|
|
2
2
|
import { _ as D } from "./_plugin-vue_export-helper-dad06003.js";
|
|
3
3
|
const S = {
|
|
4
4
|
class: "stash-badge tw-relative tw-inline-block",
|
|
@@ -21,12 +21,12 @@ const S = {
|
|
|
21
21
|
variant: { default: "standard" }
|
|
22
22
|
},
|
|
23
23
|
setup(p) {
|
|
24
|
-
const t = p, o = g(), s =
|
|
24
|
+
const t = p, o = g(), s = r(() => {
|
|
25
25
|
const e = parseInt(t.content, 10), a = parseInt(t.max, 10);
|
|
26
26
|
return e != t.content || a != t.max ? t.content : e > a ? `${a}+` : e;
|
|
27
|
-
}),
|
|
28
|
-
top: t.offset.top !== void 0 ?
|
|
29
|
-
right: t.offset.right !== void 0 ?
|
|
27
|
+
}), l = (e) => e === 0 ? "0" : `${e}px`, f = r(() => ({
|
|
28
|
+
top: t.offset.top !== void 0 ? l(t.offset.top) : void 0,
|
|
29
|
+
right: t.offset.right !== void 0 ? l(t.offset.right) : void 0
|
|
30
30
|
})), n = w(!1);
|
|
31
31
|
return m(
|
|
32
32
|
() => t.content,
|
|
@@ -35,9 +35,9 @@ const S = {
|
|
|
35
35
|
n.value = !1;
|
|
36
36
|
}, 1e3));
|
|
37
37
|
}
|
|
38
|
-
), (e, a) => (
|
|
38
|
+
), (e, a) => (v(), b("span", S, [
|
|
39
39
|
h(e.$slots, "default"),
|
|
40
|
-
_(
|
|
40
|
+
_(d("span", {
|
|
41
41
|
"data-test": "stash-badge|content-wrapper",
|
|
42
42
|
class: c([
|
|
43
43
|
{
|
|
@@ -48,9 +48,9 @@ const S = {
|
|
|
48
48
|
]),
|
|
49
49
|
style: x(t.variant === "dot" || t.position === "top-right" ? f.value : "")
|
|
50
50
|
}, [
|
|
51
|
-
|
|
51
|
+
d("span", {
|
|
52
52
|
"data-test": "stash-badge|content",
|
|
53
|
-
class: c(["tw-
|
|
53
|
+
class: c(["tw-inline-block tw-whitespace-nowrap tw-rounded-full tw-text-center tw-text-[10px] tw-font-semibold tw-leading-[0.875rem] tw-text-white", [
|
|
54
54
|
{
|
|
55
55
|
"tw-animate-grow": n.value,
|
|
56
56
|
"tw-bg-red-500": t.color === "red" && !t.isDisabled,
|
|
@@ -69,9 +69,9 @@ const S = {
|
|
|
69
69
|
]));
|
|
70
70
|
}
|
|
71
71
|
}), k = {
|
|
72
|
-
"badge-standard": "_badge-
|
|
73
|
-
"badge-dot": "_badge-
|
|
74
|
-
"top-right": "_top-
|
|
72
|
+
"badge-standard": "_badge-standard_fulr7_2",
|
|
73
|
+
"badge-dot": "_badge-dot_fulr7_8",
|
|
74
|
+
"top-right": "_top-right_fulr7_15"
|
|
75
75
|
}, M = {
|
|
76
76
|
$style: k
|
|
77
77
|
}, E = /* @__PURE__ */ D(C, [["__cssModules", M]]);
|
package/dist/Badge.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","sources":["../src/components/Badge/Badge.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { computed, ref, useCssModule, watch } from 'vue';\n\n defineOptions({\n name: 'll-badge',\n });\n\n const classes = useCssModule();\n\n export interface BadgeProps {\n /**\n * If true, the badge will animate when the content changes\n */\n animate?: boolean;\n\n /**\n * Color of the badge\n * Options: 'red' or 'blue'\n */\n color?: 'red' | 'blue';\n\n /**\n * The badge's content\n */\n content?: number | string;\n\n /**\n * Shows a gray badge with content\n */\n isDisabled?: boolean;\n\n /**\n * The max value of the `content` prop. If the value is greater than this, the badge will show the max value and a `+` sign.\n */\n max?: number | string;\n\n /**\n * Offset to adjust the badge's position. It does not apply to inline position badges.\n */\n offset?: {\n top?: number;\n right?: number;\n };\n\n /**\n * Badge position. Options:\n *\n * - inline: shows the badge directly next to the content (on the right), with a left margin of 6px\n * - top-right: will overlap the badge over whatever is passed in the default slot\n */\n position?: 'top-right' | 'inline';\n\n /**\n * The badge will be hidden if the content is `0` unless this prop is set to true.\n */\n showZero?: boolean;\n\n /**\n * Badge variant\n */\n variant?: 'dot' | 'standard';\n }\n\n const props = withDefaults(defineProps<BadgeProps>(), {\n animate: false,\n color: 'red',\n content: undefined,\n isDisabled: false,\n max: 99,\n position: 'top-right',\n offset: () => ({\n top: undefined,\n right: undefined,\n }),\n showZero: false,\n variant: 'standard',\n });\n\n const computedContent = computed(() => {\n const numericContent = parseInt(props.content as string, 10);\n const numericMax = parseInt(props.max as string, 10);\n // We want to compare the values, not the types, so it's okay to use `!=` here. i.e. if '23' = 23, then we know\n // the props are numbers, and we can compare the values. If you pass '23foobar' parseInt will return still return 23\n // but this check will fail like we want it to.\n // eslint-disable-next-line eqeqeq\n if (numericContent != props.content || numericMax != props.max) {\n return props.content;\n }\n\n return numericContent > numericMax ? `${numericMax}+` : numericContent;\n });\n\n const formatOffsetStyleValue = (value: number) => (value === 0 ? '0' : `${value}px`);\n\n const computedOffsetStyle = computed(() => ({\n top: props.offset.top !== undefined ? formatOffsetStyleValue(props.offset.top) : undefined,\n right: props.offset.right !== undefined ? formatOffsetStyleValue(props.offset.right) : undefined,\n }));\n\n const playAnimation = ref(false);\n\n watch(\n () => props.content,\n (value, oldValue) => {\n if (!props.animate) {\n return;\n }\n\n if (oldValue !== value) {\n playAnimation.value = true;\n\n setTimeout(() => {\n playAnimation.value = false;\n }, 1000);\n }\n },\n );\n</script>\n\n<template>\n <span class=\"stash-badge tw-relative tw-inline-block\" data-test=\"stash-badge\">\n <slot />\n <span\n v-show=\"props.variant === 'dot' || computedContent || (computedContent === 0 && props.showZero)\"\n data-test=\"stash-badge|content-wrapper\"\n :class=\"[\n {\n [classes['top-right']]: props.position === 'top-right' && props.variant !== 'dot',\n 'tw-absolute': props.variant === 'dot' || props.position === 'top-right',\n 'tw-ml-1.5': props.position === 'inline',\n },\n ]\"\n :style=\"props.variant === 'dot' || props.position === 'top-right' ? computedOffsetStyle : ''\"\n >\n <span\n data-test=\"stash-badge|content\"\n class=\"\n tw-
|
|
1
|
+
{"version":3,"file":"Badge.js","sources":["../src/components/Badge/Badge.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { computed, ref, useCssModule, watch } from 'vue';\n\n defineOptions({\n name: 'll-badge',\n });\n\n const classes = useCssModule();\n\n export interface BadgeProps {\n /**\n * If true, the badge will animate when the content changes\n */\n animate?: boolean;\n\n /**\n * Color of the badge\n * Options: 'red' or 'blue'\n */\n color?: 'red' | 'blue';\n\n /**\n * The badge's content\n */\n content?: number | string;\n\n /**\n * Shows a gray badge with content\n */\n isDisabled?: boolean;\n\n /**\n * The max value of the `content` prop. If the value is greater than this, the badge will show the max value and a `+` sign.\n */\n max?: number | string;\n\n /**\n * Offset to adjust the badge's position. It does not apply to inline position badges.\n */\n offset?: {\n top?: number;\n right?: number;\n };\n\n /**\n * Badge position. Options:\n *\n * - inline: shows the badge directly next to the content (on the right), with a left margin of 6px\n * - top-right: will overlap the badge over whatever is passed in the default slot\n */\n position?: 'top-right' | 'inline';\n\n /**\n * The badge will be hidden if the content is `0` unless this prop is set to true.\n */\n showZero?: boolean;\n\n /**\n * Badge variant\n */\n variant?: 'dot' | 'standard';\n }\n\n const props = withDefaults(defineProps<BadgeProps>(), {\n animate: false,\n color: 'red',\n content: undefined,\n isDisabled: false,\n max: 99,\n position: 'top-right',\n offset: () => ({\n top: undefined,\n right: undefined,\n }),\n showZero: false,\n variant: 'standard',\n });\n\n const computedContent = computed(() => {\n const numericContent = parseInt(props.content as string, 10);\n const numericMax = parseInt(props.max as string, 10);\n // We want to compare the values, not the types, so it's okay to use `!=` here. i.e. if '23' = 23, then we know\n // the props are numbers, and we can compare the values. If you pass '23foobar' parseInt will return still return 23\n // but this check will fail like we want it to.\n // eslint-disable-next-line eqeqeq\n if (numericContent != props.content || numericMax != props.max) {\n return props.content;\n }\n\n return numericContent > numericMax ? `${numericMax}+` : numericContent;\n });\n\n const formatOffsetStyleValue = (value: number) => (value === 0 ? '0' : `${value}px`);\n\n const computedOffsetStyle = computed(() => ({\n top: props.offset.top !== undefined ? formatOffsetStyleValue(props.offset.top) : undefined,\n right: props.offset.right !== undefined ? formatOffsetStyleValue(props.offset.right) : undefined,\n }));\n\n const playAnimation = ref(false);\n\n watch(\n () => props.content,\n (value, oldValue) => {\n if (!props.animate) {\n return;\n }\n\n if (oldValue !== value) {\n playAnimation.value = true;\n\n setTimeout(() => {\n playAnimation.value = false;\n }, 1000);\n }\n },\n );\n</script>\n\n<template>\n <span class=\"stash-badge tw-relative tw-inline-block\" data-test=\"stash-badge\">\n <slot />\n <span\n v-show=\"props.variant === 'dot' || computedContent || (computedContent === 0 && props.showZero)\"\n data-test=\"stash-badge|content-wrapper\"\n :class=\"[\n {\n [classes['top-right']]: props.position === 'top-right' && props.variant !== 'dot',\n 'tw-absolute': props.variant === 'dot' || props.position === 'top-right',\n 'tw-ml-1.5': props.position === 'inline',\n },\n ]\"\n :style=\"props.variant === 'dot' || props.position === 'top-right' ? computedOffsetStyle : ''\"\n >\n <span\n data-test=\"stash-badge|content\"\n class=\"\n tw-inline-block\n tw-whitespace-nowrap\n tw-rounded-full\n tw-text-center\n tw-text-[10px]\n tw-font-semibold\n tw-leading-[0.875rem]\n tw-text-white\n \"\n :class=\"[\n {\n 'tw-animate-grow': playAnimation,\n 'tw-bg-red-500': props.color === 'red' && !props.isDisabled,\n 'tw-bg-blue-500': props.color === 'blue' && !props.isDisabled,\n 'tw-absolute': props.variant === 'dot',\n 'tw-bg-ice-200 tw-text-white': props.isDisabled,\n [classes['badge-dot']]: props.variant === 'dot',\n [classes['badge-standard']]: props.variant === 'standard',\n 'tw-px-1.5': props.variant !== 'dot',\n },\n ]\"\n >\n {{ props.variant === 'dot' ? null : computedContent }}\n </span>\n </span>\n </span>\n</template>\n\n<style module>\n .badge-standard {\n height: 15px;\n line-height: 1.05rem;\n vertical-align: middle;\n }\n\n .badge-dot {\n border: 2px solid var(--color-ice-100);\n height: 10px;\n right: 0;\n width: 10px;\n }\n\n .top-right {\n top: 0;\n right: 0;\n transform: translateX(50%) translateY(-48%);\n }\n</style>\n"],"names":["classes","useCssModule","computedContent","computed","numericContent","props","numericMax","formatOffsetStyleValue","value","computedOffsetStyle","playAnimation","ref","watch","oldValue"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;iBAOQA,IAAUC,KAuEVC,IAAkBC,EAAS,MAAM;AACrC,YAAMC,IAAiB,SAASC,EAAM,SAAmB,EAAE,GACrDC,IAAa,SAASD,EAAM,KAAe,EAAE;AAKnD,aAAID,KAAkBC,EAAM,WAAWC,KAAcD,EAAM,MAClDA,EAAM,UAGRD,IAAiBE,IAAa,GAAGA,CAAU,MAAMF;AAAA,IAAA,CACzD,GAEKG,IAAyB,CAACC,MAAmBA,MAAU,IAAI,MAAM,GAAGA,CAAK,MAEzEC,IAAsBN,EAAS,OAAO;AAAA,MAC1C,KAAKE,EAAM,OAAO,QAAQ,SAAYE,EAAuBF,EAAM,OAAO,GAAG,IAAI;AAAA,MACjF,OAAOA,EAAM,OAAO,UAAU,SAAYE,EAAuBF,EAAM,OAAO,KAAK,IAAI;AAAA,IACvF,EAAA,GAEIK,IAAgBC,EAAI,EAAK;AAE/B,WAAAC;AAAA,MACE,MAAMP,EAAM;AAAA,MACZ,CAACG,GAAOK,MAAa;AACf,QAACR,EAAM,WAIPQ,MAAaL,MACfE,EAAc,QAAQ,IAEtB,WAAW,MAAM;AACf,UAAAA,EAAc,QAAQ;AAAA,WACrB,GAAI;AAAA,MAEX;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/Badge.vue.d.ts
CHANGED
|
@@ -108,12 +108,12 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
|
|
|
108
108
|
}>>>, {
|
|
109
109
|
color: "blue" | "red";
|
|
110
110
|
animate: boolean;
|
|
111
|
+
max: string | number;
|
|
111
112
|
offset: {
|
|
112
113
|
top?: number | undefined;
|
|
113
114
|
right?: number | undefined;
|
|
114
115
|
};
|
|
115
116
|
content: string | number;
|
|
116
|
-
max: string | number;
|
|
117
117
|
position: "inline" | "top-right";
|
|
118
118
|
variant: "standard" | "dot";
|
|
119
119
|
isDisabled: boolean;
|
package/dist/Button.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as f, computed as c, openBlock as a, createElementBlock as n, normalizeClass as r, renderSlot as s } from "vue";
|
|
2
|
-
import { s as i } from "./Button.vue_used_vue_type_style_index_0_lang.module-
|
|
2
|
+
import { s as i } from "./Button.vue_used_vue_type_style_index_0_lang.module-63d31dc0.js";
|
|
3
3
|
import { _ as d } from "./_plugin-vue_export-helper-dad06003.js";
|
|
4
4
|
const y = ["href"];
|
|
5
5
|
var u = /* @__PURE__ */ ((t) => (t.Primary = "primary", t.Secondary = "secondary", t.Tertiary = "tertiary", t.Icon = "icon", t.IconLabel = "iconLabel", t.Inline = "inline", t))(u || {});
|
package/dist/Button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../src/components/Button/Button.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { computed } from 'vue';\n\n defineOptions({\n name: 'll-button',\n });\n\n export interface ButtonProps {\n /**\n * Renders the secondary variant\n */\n secondary?: boolean;\n /**\n * Renders the button as a container for an Icon\n */\n icon?: boolean;\n /**\n * Renders the button as a container for an IconLabel\n */\n iconLabel?: boolean;\n /**\n * Renders the tertiary variant\n */\n tertiary?: boolean;\n /**\n * Renders the component inline\n */\n inline?: boolean;\n /**\n * Renders a color variant\n */\n color?: 'blue' | 'red';\n /**\n * Button link. If defined, the button will render as an `<a />` tag.\n */\n href?: string;\n }\n\n const props = withDefaults(defineProps<ButtonProps>(), {\n secondary: false,\n icon: false,\n iconLabel: false,\n tertiary: false,\n inline: false,\n color: undefined,\n href: '',\n });\n\n enum ButtonTypes {\n Primary = 'primary',\n Secondary = 'secondary',\n Tertiary = 'tertiary',\n Icon = 'icon',\n IconLabel = 'iconLabel',\n Inline = 'inline',\n }\n\n type ButtonType = `${ButtonTypes}`;\n\n const buttonType = computed<ButtonType>(() => {\n for (const type of Object.values(ButtonTypes)) {\n if (props[type]) {\n return type;\n }\n }\n\n return ButtonTypes.Primary;\n });\n</script>\n\n<template>\n <a\n v-if=\"props.href\"\n data-test=\"ll-button\"\n class=\"stash-button\"\n :class=\"[$style.button, $style[`button--${buttonType}`], { [$style[`button--${props.color}`]]: props.color }]\"\n :href=\"props.href\"\n >\n <!-- @slot default -->\n <slot></slot>\n </a>\n <button\n v-else\n data-test=\"ll-button\"\n class=\"stash-button\"\n :class=\"[$style.button, $style[`button--${buttonType}`], { [$style[`button--${props.color}`]]: props.color }]\"\n >\n <!-- @slot default -->\n <slot></slot>\n </button>\n</template>\n\n<style module>\n .button {\n border-radius:
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../src/components/Button/Button.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { computed } from 'vue';\n\n defineOptions({\n name: 'll-button',\n });\n\n export interface ButtonProps {\n /**\n * Renders the secondary variant\n */\n secondary?: boolean;\n\n /**\n * Renders the button as a container for an Icon\n */\n icon?: boolean;\n\n /**\n * Renders the button as a container for an IconLabel\n */\n iconLabel?: boolean;\n\n /**\n * Renders the tertiary variant\n */\n tertiary?: boolean;\n\n /**\n * Renders the component inline\n */\n inline?: boolean;\n\n /**\n * Renders a color variant\n */\n color?: 'blue' | 'red';\n\n /**\n * Button link. If defined, the button will render as an `<a />` tag.\n */\n href?: string;\n }\n\n const props = withDefaults(defineProps<ButtonProps>(), {\n secondary: false,\n icon: false,\n iconLabel: false,\n tertiary: false,\n inline: false,\n color: undefined,\n href: '',\n });\n\n enum ButtonTypes {\n Primary = 'primary',\n Secondary = 'secondary',\n Tertiary = 'tertiary',\n Icon = 'icon',\n IconLabel = 'iconLabel',\n Inline = 'inline',\n }\n\n type ButtonType = `${ButtonTypes}`;\n\n const buttonType = computed<ButtonType>(() => {\n for (const type of Object.values(ButtonTypes)) {\n if (props[type]) {\n return type;\n }\n }\n\n return ButtonTypes.Primary;\n });\n</script>\n\n<template>\n <a\n v-if=\"props.href\"\n data-test=\"ll-button\"\n class=\"stash-button\"\n :class=\"[$style.button, $style[`button--${buttonType}`], { [$style[`button--${props.color}`]]: props.color }]\"\n :href=\"props.href\"\n >\n <!-- @slot default -->\n <slot></slot>\n </a>\n <button\n v-else\n data-test=\"ll-button\"\n class=\"stash-button\"\n :class=\"[$style.button, $style[`button--${buttonType}`], { [$style[`button--${props.color}`]]: props.color }]\"\n >\n <!-- @slot default -->\n <slot></slot>\n </button>\n</template>\n\n<style module>\n .button {\n border-radius: theme('borderRadius.DEFAULT');\n border-width: 1px;\n display: inline-block;\n font-size: 0.875rem;\n font-weight: theme('fontWeight.semibold');\n line-height: 2.125rem;\n margin: 0;\n min-width: 144px;\n padding: 0 theme('spacing.3');\n text-align: center;\n text-decoration: none;\n vertical-align: middle;\n white-space: nowrap;\n }\n\n @media screen('lg') {\n /* `focus` and `hover` should be added only for large screens */\n .button:focus {\n box-shadow: 0 0 0 3px rgb(0 123 255 / 14%);\n outline: none;\n }\n\n .button:hover {\n text-decoration: none;\n }\n }\n\n .button[disabled] {\n cursor: default;\n pointer-events: none;\n }\n\n /* Solid treatment */\n .button--solid {\n background-color: var(--button-color);\n border-color: transparent;\n color: var(--text-color);\n }\n\n @media screen('lg') {\n /* `hover` should be added only for large screens */\n .button--solid:hover {\n background-color: var(--button-hover-color);\n }\n }\n\n .button--solid:active {\n background-color: var(--button-hover-color);\n }\n\n .button--solid[disabled] {\n --button-color: var(--color-ice-500) !important;\n }\n\n /* Ghost treatment */\n .button--ghost {\n background-color: rgb(0 0 0 / 0%);\n border-color: var(--button-color);\n color: var(--text-color);\n }\n\n @media screen('lg') {\n /* `hover` should be added only for large screens */\n .button--ghost:hover {\n background-color: var(--button-hover-color);\n }\n }\n\n .button--ghost:active {\n background-color: var(--button-hover-color);\n }\n\n .button--ghost[disabled] {\n --button-color: var(--color-ice-500) !important;\n --text-color: var(--color-ice-500) !important;\n }\n\n /* Types */\n .button--primary {\n composes: button--solid;\n --button-color: var(--color-blue-500);\n --button-hover-color: var(--color-blue-hover);\n --text-color: var(--color-white);\n }\n\n .button--secondary {\n composes: button--ghost;\n --button-color: var(--color-ice-500);\n --button-hover-color: var(--color-ice-700-hover);\n --text-color: var(--color-ice-700);\n }\n\n .button--tertiary {\n composes: button--ghost;\n --button-color: var(--color-white);\n --button-hover-color: var(--color-white-hover);\n --text-color: var(--color-white);\n }\n\n .button--icon,\n .button--iconLabel {\n /* https://developers.google.com/web/fundamentals/accessibility/accessible-styles */\n border: 0;\n border-radius: theme('borderRadius.DEFAULT');\n height: theme('spacing.12');\n min-width: theme('spacing.12');\n text-decoration: none;\n }\n\n .button--icon {\n padding: theme('spacing.3');\n width: theme('spacing.12');\n }\n\n .button--iconLabel {\n padding: 0;\n width: unset;\n }\n\n @media screen('lg') {\n /* `hover` should be added only for large screens */\n .button--icon:hover,\n .button--iconLabel:hover {\n text-decoration: none;\n }\n }\n\n .button--icon svg,\n .button--iconLabel svg {\n display: block;\n margin-left: auto;\n margin-right: auto;\n }\n\n .button--icon[disabled] svg,\n .button--iconLabel[disabled],\n .button--iconLabel[disabled] svg {\n color: var(--color-ice-500);\n }\n\n .button--inline {\n border: 0;\n color: var(--color-blue-500);\n font-weight: theme('fontWeight.medium');\n line-height: 1.5;\n min-width: 0;\n padding: 0;\n }\n\n .button--inline:hover {\n text-decoration: underline;\n }\n\n .button--inline[disabled] {\n color: var(--color-ice-900);\n }\n\n /* Colors */\n .button--blue.button--primary,\n .button--blue.button--secondary {\n --button-color: var(--color-blue-500);\n }\n\n .button--blue.button--primary {\n --button-hover-color: var(--color-blue-hover);\n }\n\n .button--blue.button--secondary {\n --text-color: var(--color-blue-500);\n --button-hover-color: var(--button-secondary-blue-hover);\n }\n\n .button--red.button--primary,\n .button--red.button--secondary {\n --button-color: var(--color-red-500);\n }\n\n .button--red.button--primary {\n --button-hover-color: var(--color-red-hover);\n }\n\n .button--red.button--secondary {\n --text-color: var(--color-red-500);\n --button-hover-color: var(--button-secondary-red-hover);\n }\n\n /**\n * Button Grid\n * TODO: Move into separate component\n * https://leaflink.atlassian.net/browse/STASH-230\n * See `styles/elements/_buttons.scss` for button-grid (parent element) specific styles.\n */\n :global(.button-grid) > .button,\n :global(.header-button-grid) > .button {\n width: 50%;\n }\n\n :global(.button-grid) > .button + .button {\n margin-left: theme('spacing.6');\n }\n\n @media screen('md') {\n :global(.button-grid) > .button {\n width: auto;\n }\n }\n\n :global(.header-button-grid) > .button + .button {\n margin-left: theme('spacing.6');\n }\n\n @media screen('lg') {\n :global(.header-button-grid) > .button {\n width: auto;\n }\n }\n</style>\n"],"names":["ButtonTypes","buttonType","computed","type","props"],"mappings":";;;;AAsDE,IAAKA,sBAAAA,OACHA,EAAA,UAAU,WACVA,EAAA,YAAY,aACZA,EAAA,WAAW,YACXA,EAAA,OAAO,QACPA,EAAA,YAAY,aACZA,EAAA,SAAS,UANNA,IAAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;iBAWCC,IAAaC,EAAqB,MAAM;AAC5C,iBAAWC,KAAQ,OAAO,OAAOH,CAAW;AACtC,YAAAI,EAAMD,CAAI;AACL,iBAAAA;AAIJ,aAAA;AAAA,IAAA,CACR;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const t = "_button_mair8_2", o = {
|
|
2
|
+
button: t,
|
|
3
|
+
"button--solid": "_button--solid_mair8_36",
|
|
4
|
+
"button--ghost": "_button--ghost_mair8_58",
|
|
5
|
+
"button--primary": "_button--primary_mair8_81 _button--solid_mair8_36",
|
|
6
|
+
"button--secondary": "_button--secondary_mair8_88 _button--ghost_mair8_58",
|
|
7
|
+
"button--tertiary": "_button--tertiary_mair8_95 _button--ghost_mair8_58",
|
|
8
|
+
"button--icon": "_button--icon_mair8_102",
|
|
9
|
+
"button--iconLabel": "_button--iconLabel_mair8_103",
|
|
10
|
+
"button--inline": "_button--inline_mair8_143",
|
|
11
|
+
"button--blue": "_button--blue_mair8_161",
|
|
12
|
+
"button--red": "_button--red_mair8_175"
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
o as s
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=Button.vue_used_vue_type_style_index_0_lang.module-63d31dc0.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.vue_used_vue_type_style_index_0_lang.module-63d31dc0.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
|