@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
package/dist/ButtonGroup.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as b, computed as r, ref as m, openBlock as o, createElementBlock as s, normalizeClass as p, Fragment as g, renderList as $, withModifiers as y, toDisplayString as B } from "vue";
|
|
2
2
|
import h from "lodash-es/uniqueId";
|
|
3
|
-
import { _ as
|
|
4
|
-
const
|
|
3
|
+
import { _ as w } from "./_plugin-vue_export-helper-dad06003.js";
|
|
4
|
+
const z = ["data-test"], k = ["data-test", "disabled", "onClick"], C = {
|
|
5
5
|
name: "ll-button-group"
|
|
6
|
-
},
|
|
7
|
-
...
|
|
6
|
+
}, G = /* @__PURE__ */ b({
|
|
7
|
+
...C,
|
|
8
8
|
props: {
|
|
9
9
|
groupName: { default: h() },
|
|
10
10
|
options: {},
|
|
@@ -14,43 +14,43 @@ const C = ["data-test"], G = ["data-test", "disabled", "onClick"], w = {
|
|
|
14
14
|
},
|
|
15
15
|
emits: ["input"],
|
|
16
16
|
setup(v, { emit: _ }) {
|
|
17
|
-
const e = v, u = r(() => e.options.length === 1), i = r(() => e.allowDeactivate || u.value), a =
|
|
17
|
+
const e = v, u = r(() => e.options.length === 1), i = r(() => e.allowDeactivate || u.value), a = m(e.options.find((t) => t.active) || null);
|
|
18
18
|
function f(t) {
|
|
19
|
-
var
|
|
20
|
-
i.value && ((
|
|
19
|
+
var l;
|
|
20
|
+
i.value && ((l = a.value) == null ? void 0 : l.id) === t.id ? a.value = null : a.value = t, _("input", a.value);
|
|
21
21
|
}
|
|
22
|
-
return (t,
|
|
22
|
+
return (t, l) => (o(), s("div", {
|
|
23
23
|
class: p([
|
|
24
|
-
"flex",
|
|
24
|
+
"tw-flex",
|
|
25
25
|
t.$style.buttonGroup,
|
|
26
|
-
{ "w-full": e.fullWidth },
|
|
26
|
+
{ "tw-w-full": e.fullWidth },
|
|
27
27
|
{ [t.$style.single]: u.value },
|
|
28
28
|
{ [t.$style["can-deactivate"]]: i.value }
|
|
29
29
|
]),
|
|
30
30
|
"data-test": `button-group-${t.$props.groupName}`
|
|
31
31
|
}, [
|
|
32
|
-
(
|
|
32
|
+
(o(!0), s(g, null, $(e.options, (n) => {
|
|
33
33
|
var c, d;
|
|
34
|
-
return
|
|
35
|
-
key: `${e.groupName}-${
|
|
36
|
-
class: p([t.$style.button, { [t.$style.active]: ((c = a.value) == null ? void 0 : c.id) ===
|
|
37
|
-
"data-test": `${e.groupName}-button-${((d = a.value) == null ? void 0 : d.id) ===
|
|
34
|
+
return o(), s("button", {
|
|
35
|
+
key: `${e.groupName}-${n.id}`,
|
|
36
|
+
class: p([t.$style.button, { [t.$style.active]: ((c = a.value) == null ? void 0 : c.id) === n.id }]),
|
|
37
|
+
"data-test": `${e.groupName}-button-${((d = a.value) == null ? void 0 : d.id) === n.id ? "active" : "inactive"}`,
|
|
38
38
|
tabindex: 0,
|
|
39
39
|
disabled: e.disabled,
|
|
40
|
-
onClick: y((E) => f(
|
|
41
|
-
}, B(
|
|
40
|
+
onClick: y((E) => f(n), ["prevent"])
|
|
41
|
+
}, B(n.text), 11, k);
|
|
42
42
|
}), 128))
|
|
43
|
-
], 10,
|
|
43
|
+
], 10, z));
|
|
44
44
|
}
|
|
45
|
-
}),
|
|
46
|
-
buttonGroup:
|
|
47
|
-
button:
|
|
48
|
-
single:
|
|
49
|
-
active:
|
|
50
|
-
"can-deactivate": "_can-
|
|
51
|
-
},
|
|
52
|
-
$style:
|
|
53
|
-
}, j = /* @__PURE__ */
|
|
45
|
+
}), D = "_buttonGroup_1bnlz_3", N = "_button_1bnlz_3", M = "_single_1bnlz_17", S = "_active_1bnlz_29", W = {
|
|
46
|
+
buttonGroup: D,
|
|
47
|
+
button: N,
|
|
48
|
+
single: M,
|
|
49
|
+
active: S,
|
|
50
|
+
"can-deactivate": "_can-deactivate_1bnlz_42"
|
|
51
|
+
}, q = {
|
|
52
|
+
$style: W
|
|
53
|
+
}, j = /* @__PURE__ */ w(G, [["__cssModules", q]]);
|
|
54
54
|
export {
|
|
55
55
|
j as default
|
|
56
56
|
};
|
package/dist/ButtonGroup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonGroup.js","sources":["../src/components/ButtonGroup/ButtonGroup.vue"],"sourcesContent":["<script lang=\"ts\">\n /**\n * @deprecated use RadioGroup instead with `variant=\"button\"`.\n * RadioGroup uses pretty much the same API as the ButtonGroup,\n * but every button is a radio element which makes more sense semantically.\n */\n export default {\n name: 'll-button-group',\n };\n</script>\n\n<script lang=\"ts\" setup>\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, ref } from 'vue';\n\n export interface ButtonGroupOption {\n id: string;\n active?: boolean;\n text: string;\n }\n\n export interface ButtonGroupProps {\n /**\n * A name for the group, useful when multiple ButtonGroups exist on the page\n */\n groupName?: string;\n\n /**\n * The list of buttons to render\n */\n options: ButtonGroupOption[];\n\n /**\n * Whether the group should expand to the parent's width\n */\n fullWidth?: boolean;\n\n /**\n * Whether the entire group should be disabled\n */\n disabled?: boolean;\n\n /**\n * Whether the active button can be deactivated\n */\n allowDeactivate?: boolean;\n }\n\n const props = withDefaults(defineProps<ButtonGroupProps>(), {\n groupName: uniqueId(),\n fullWidth: false,\n disabled: false,\n allowDeactivate: false,\n });\n\n const emit =\n defineEmits<{\n (e: 'input', activeButton: ButtonGroupOption | null): void;\n }>();\n\n const isSingleButton = computed(() => props.options.length === 1);\n\n const canDeactivate = computed(() => props.allowDeactivate || isSingleButton.value);\n\n const activeButton = ref(props.options.find((o) => o.active) || null);\n\n function onClick(clickedOption: ButtonGroupOption) {\n if (canDeactivate.value && activeButton.value?.id === clickedOption.id) {\n activeButton.value = null;\n } else {\n activeButton.value = clickedOption;\n }\n\n emit('input', activeButton.value);\n }\n</script>\n\n<template>\n <div\n :class=\"[\n 'flex',\n $style.buttonGroup,\n { 'w-full': props.fullWidth },\n { [$style.single]: isSingleButton },\n { [$style['can-deactivate']]: canDeactivate },\n ]\"\n :data-test=\"`button-group-${$props.groupName}`\"\n >\n <button\n v-for=\"option in props.options\"\n :key=\"`${props.groupName}-${option.id}`\"\n :class=\"[$style.button, { [$style.active]: activeButton?.id === option.id }]\"\n :data-test=\"`${props.groupName}-button-${activeButton?.id === option.id ? 'active' : 'inactive'}`\"\n :tabindex=\"0\"\n :disabled=\"props.disabled\"\n @click.prevent=\"onClick(option)\"\n >\n {{ option.text }}\n </button>\n </div>\n</template>\n\n<style
|
|
1
|
+
{"version":3,"file":"ButtonGroup.js","sources":["../src/components/ButtonGroup/ButtonGroup.vue"],"sourcesContent":["<script lang=\"ts\">\n /**\n * @deprecated use RadioGroup instead with `variant=\"button\"`.\n * RadioGroup uses pretty much the same API as the ButtonGroup,\n * but every button is a radio element which makes more sense semantically.\n */\n export default {\n name: 'll-button-group',\n };\n</script>\n\n<script lang=\"ts\" setup>\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, ref } from 'vue';\n\n export interface ButtonGroupOption {\n id: string;\n active?: boolean;\n text: string;\n }\n\n export interface ButtonGroupProps {\n /**\n * A name for the group, useful when multiple ButtonGroups exist on the page\n */\n groupName?: string;\n\n /**\n * The list of buttons to render\n */\n options: ButtonGroupOption[];\n\n /**\n * Whether the group should expand to the parent's width\n */\n fullWidth?: boolean;\n\n /**\n * Whether the entire group should be disabled\n */\n disabled?: boolean;\n\n /**\n * Whether the active button can be deactivated\n */\n allowDeactivate?: boolean;\n }\n\n const props = withDefaults(defineProps<ButtonGroupProps>(), {\n groupName: uniqueId(),\n fullWidth: false,\n disabled: false,\n allowDeactivate: false,\n });\n\n const emit =\n defineEmits<{\n (e: 'input', activeButton: ButtonGroupOption | null): void;\n }>();\n\n const isSingleButton = computed(() => props.options.length === 1);\n\n const canDeactivate = computed(() => props.allowDeactivate || isSingleButton.value);\n\n const activeButton = ref(props.options.find((o) => o.active) || null);\n\n function onClick(clickedOption: ButtonGroupOption) {\n if (canDeactivate.value && activeButton.value?.id === clickedOption.id) {\n activeButton.value = null;\n } else {\n activeButton.value = clickedOption;\n }\n\n emit('input', activeButton.value);\n }\n</script>\n\n<template>\n <div\n :class=\"[\n 'tw-flex',\n $style.buttonGroup,\n { 'tw-w-full': props.fullWidth },\n { [$style.single]: isSingleButton },\n { [$style['can-deactivate']]: canDeactivate },\n ]\"\n :data-test=\"`button-group-${$props.groupName}`\"\n >\n <button\n v-for=\"option in props.options\"\n :key=\"`${props.groupName}-${option.id}`\"\n :class=\"[$style.button, { [$style.active]: activeButton?.id === option.id }]\"\n :data-test=\"`${props.groupName}-button-${activeButton?.id === option.id ? 'active' : 'inactive'}`\"\n :tabindex=\"0\"\n :disabled=\"props.disabled\"\n @click.prevent=\"onClick(option)\"\n >\n {{ option.text }}\n </button>\n </div>\n</template>\n\n<style module>\n /* full width buttons */\n .buttonGroup:global(.w-full) > button {\n flex: 1 1 50%;\n max-width: 100%;\n }\n\n .button {\n border: 1px solid var(--color-ice-500);\n border-radius: 0;\n font-weight: theme('fontWeight.semibold');\n line-height: theme('lineHeight.body');\n min-width: 100px;\n padding: 7px 8px;\n }\n\n .single .button {\n border: 1px solid var(--color-ice-700);\n color: var(--color-ice-700);\n }\n\n .button:focus,\n .button:hover {\n border: 1px solid var(--color-blue-500) !important;\n color: var(--color-blue-500);\n z-index: 1;\n }\n\n .button.active {\n background-color: var(--color-blue-100);\n border: 1px solid var(--color-blue-500) !important;\n color: var(--color-blue-500);\n cursor: default;\n z-index: 1;\n }\n\n .button.active + button {\n border-left: 1px solid transparent;\n }\n\n .single .button.active,\n .can-deactivate .button.active {\n cursor: pointer;\n }\n\n .button[disabled] {\n color: var(--color-ice-500);\n cursor: default;\n pointer-events: none;\n }\n\n .button:focus {\n box-shadow: none;\n outline: 0;\n }\n\n .button:not(:first-child) {\n margin-left: -1px;\n }\n\n .button:not(:last-child) {\n border-right: 1px solid transparent;\n }\n\n .button:first-child {\n border-bottom-left-radius: theme('borderRadius.DEFAULT');\n border-top-left-radius: theme('borderRadius.DEFAULT');\n }\n\n .button:last-child {\n border-bottom-right-radius: theme('borderRadius.DEFAULT');\n border-top-right-radius: theme('borderRadius.DEFAULT');\n }\n</style>\n"],"names":["isSingleButton","computed","props","canDeactivate","activeButton","ref","o","onClick","clickedOption","_a","emit"],"mappings":";;;uEAMiB;AAAA,EACb,MAAM;AACR;;;;;;;;;;;iBAoDMA,IAAiBC,EAAS,MAAMC,EAAM,QAAQ,WAAW,CAAC,GAE1DC,IAAgBF,EAAS,MAAMC,EAAM,mBAAmBF,EAAe,KAAK,GAE5EI,IAAeC,EAAIH,EAAM,QAAQ,KAAK,CAACI,MAAMA,EAAE,MAAM,KAAK,IAAI;AAEpE,aAASC,EAAQC,GAAkC;;AACjD,MAAIL,EAAc,WAASM,IAAAL,EAAa,UAAb,gBAAAK,EAAoB,QAAOD,EAAc,KAClEJ,EAAa,QAAQ,OAErBA,EAAa,QAAQI,GAGlBE,EAAA,SAASN,EAAa,KAAK;AAAA,IAClC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/Card.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as w, useSlots as i, openBlock as a, createElementBlock as r, unref as s, normalizeClass as n, createElementVNode as l, renderSlot as o, createCommentVNode as f } from "vue";
|
|
2
2
|
const p = {
|
|
3
|
-
class: "stash-card tw-
|
|
3
|
+
class: "stash-card tw-relative tw-inline-block tw-rounded tw-border tw-bg-white tw-shadow-md",
|
|
4
4
|
"data-test": "stash-card"
|
|
5
5
|
}, h = /* @__PURE__ */ w({
|
|
6
6
|
__name: "Card",
|
|
@@ -13,7 +13,7 @@ const p = {
|
|
|
13
13
|
s(t)["top-left"] || s(t)["top-right"] ? (a(), r("div", {
|
|
14
14
|
key: 0,
|
|
15
15
|
"data-test": "card-actions",
|
|
16
|
-
class: n([{ "tw-absolute tw-top-0 tw-w-full": c.detachActions }, "tw-flex tw-
|
|
16
|
+
class: n([{ "tw-absolute tw-top-0 tw-w-full": c.detachActions }, "tw-flex tw-flex-wrap tw-items-start tw-justify-between tw-p-6"])
|
|
17
17
|
}, [
|
|
18
18
|
l("div", null, [
|
|
19
19
|
o(e.$slots, "top-left")
|
|
@@ -23,7 +23,7 @@ const p = {
|
|
|
23
23
|
])
|
|
24
24
|
], 2)) : f("", !0),
|
|
25
25
|
l("div", {
|
|
26
|
-
class: n({ "tw-
|
|
26
|
+
class: n({ "tw-mb-6 tw-flex tw-h-full tw-flex-col tw-gap-y-6": s(t).default })
|
|
27
27
|
}, [
|
|
28
28
|
o(e.$slots, "default")
|
|
29
29
|
], 2)
|
package/dist/Card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sources":["../src/components/Card/Card.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n\n export interface CardProps {\n /**\n * Detach the actions from the top of the card, making them absolute-positioned.\n * @default false\n */\n detachActions?: boolean;\n }\n\n const props = withDefaults(defineProps<CardProps>(), {\n detachActions: false,\n });\n\n const slots = useSlots();\n</script>\n\n<template>\n <article\n class=\"stash-card tw-
|
|
1
|
+
{"version":3,"file":"Card.js","sources":["../src/components/Card/Card.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n\n export interface CardProps {\n /**\n * Detach the actions from the top of the card, making them absolute-positioned.\n * @default false\n */\n detachActions?: boolean;\n }\n\n const props = withDefaults(defineProps<CardProps>(), {\n detachActions: false,\n });\n\n const slots = useSlots();\n</script>\n\n<template>\n <article\n class=\"stash-card tw-relative tw-inline-block tw-rounded tw-border tw-bg-white tw-shadow-md\"\n data-test=\"stash-card\"\n >\n <div\n v-if=\"slots['top-left'] || slots['top-right']\"\n data-test=\"card-actions\"\n :class=\"{ 'tw-absolute tw-top-0 tw-w-full': props.detachActions }\"\n class=\"tw-flex tw-flex-wrap tw-items-start tw-justify-between tw-p-6\"\n >\n <div>\n <!-- @slot Top left actions slot, for rendering content on the card top-left -->\n <slot name=\"top-left\"></slot>\n </div>\n <div>\n <!-- @slot Top right actions slot, for rendering content on the card top-right -->\n <slot name=\"top-right\"></slot>\n </div>\n </div>\n\n <div :class=\"{ 'tw-mb-6 tw-flex tw-h-full tw-flex-col tw-gap-y-6': slots['default'] }\">\n <!-- @slot Default slot, for rendering card subcomponents -->\n <slot></slot>\n </div>\n </article>\n</template>\n"],"names":["slots","useSlots"],"mappings":";;;;;;;;;;iBAeQA,IAAQC;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/CardHeader.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as r, openBlock as e, createElementBlock as s, createElementVNode as n, toDisplayString as a, createCommentVNode as o } from "vue";
|
|
2
2
|
const d = {
|
|
3
|
-
class: "stash-card-header tw-px-6 tw-text-ice-900
|
|
3
|
+
class: "stash-card-header tw-px-6 tw-font-medium tw-text-ice-900",
|
|
4
4
|
"data-test": "stash-card-header"
|
|
5
5
|
}, i = { class: "tw-text-base" }, l = {
|
|
6
6
|
key: 0,
|
|
7
|
-
class: "tw-mt-1.5
|
|
7
|
+
class: "tw-mb-0 tw-mt-1.5"
|
|
8
8
|
}, m = {
|
|
9
9
|
key: 1,
|
|
10
|
-
class: "tw-text-ice-700
|
|
10
|
+
class: "tw-mt-1.5 tw-text-ice-700"
|
|
11
11
|
}, u = /* @__PURE__ */ r({
|
|
12
12
|
__name: "CardHeader",
|
|
13
13
|
props: {
|
package/dist/CardMedia.js
CHANGED
|
@@ -18,7 +18,7 @@ const h = {
|
|
|
18
18
|
return (E, e) => (l(), c("div", h, [
|
|
19
19
|
s.value || o.value ? (l(), c("div", {
|
|
20
20
|
key: 0,
|
|
21
|
-
class: n([d(r).placeholder, "tw-
|
|
21
|
+
class: n([d(r).placeholder, "tw-flex tw-w-full tw-items-center tw-justify-center tw-rounded-t tw-bg-ice-200"])
|
|
22
22
|
}, [
|
|
23
23
|
p(w, {
|
|
24
24
|
name: "image",
|
package/dist/CardMedia.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardMedia.js","sources":["../src/components/CardMedia/CardMedia.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { ref, useCssModule } from 'vue';\n\n import Icon from '../Icon/Icon.vue';\n\n export interface CardMediaProps {\n /**\n * The image source.\n */\n src: string;\n /**\n * The image alternative text.\n */\n alt?: string;\n }\n\n const isLoading = ref(true);\n\n const hasErrored = ref(false);\n\n const props = defineProps<CardMediaProps>();\n\n const classes = useCssModule();\n</script>\n\n<template>\n <div class=\"stash-card-media\" data-test=\"stash-card-media\">\n <div\n v-if=\"isLoading || hasErrored\"\n :class=\"classes.placeholder\"\n class=\"tw-
|
|
1
|
+
{"version":3,"file":"CardMedia.js","sources":["../src/components/CardMedia/CardMedia.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { ref, useCssModule } from 'vue';\n\n import Icon from '../Icon/Icon.vue';\n\n export interface CardMediaProps {\n /**\n * The image source.\n */\n src: string;\n /**\n * The image alternative text.\n */\n alt?: string;\n }\n\n const isLoading = ref(true);\n\n const hasErrored = ref(false);\n\n const props = defineProps<CardMediaProps>();\n\n const classes = useCssModule();\n</script>\n\n<template>\n <div class=\"stash-card-media\" data-test=\"stash-card-media\">\n <div\n v-if=\"isLoading || hasErrored\"\n :class=\"classes.placeholder\"\n class=\"tw-flex tw-w-full tw-items-center tw-justify-center tw-rounded-t tw-bg-ice-200\"\n >\n <Icon name=\"image\" :class=\"classes.iconSize\" />\n </div>\n <img\n :src=\"props.src\"\n class=\"tw-w-full tw-rounded-t\"\n :alt=\"props.alt\"\n @load=\"() => (isLoading = false)\"\n @error=\"() => (hasErrored = true)\"\n />\n </div>\n</template>\n\n<style module>\n .placeholder {\n height: 300px;\n width: 100%;\n }\n\n .iconSize {\n width: 189px;\n height: 189px;\n }\n</style>\n"],"names":["isLoading","ref","hasErrored","classes","useCssModule"],"mappings":";;;;;;;;;;;;;;;;iBAgBQA,IAAYC,EAAI,EAAI,GAEpBC,IAAaD,EAAI,EAAK,GAItBE,IAAUC;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|