@leaflink/stash 44.0.0-beta.4 → 44.0.0-beta.6
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/dist/ActionsDropdown.js +16 -16
- package/dist/ActionsDropdown.js.map +1 -1
- package/dist/AddressSelect.js +2 -2
- package/dist/Alert.js +7 -7
- package/dist/Alert.js.map +1 -1
- package/dist/AppNavigationItem.js +11 -11
- package/dist/AppNavigationItem.js.map +1 -1
- package/dist/CurrencyInput.js +2 -2
- package/dist/DataViewFilters.js +2 -2
- package/dist/DataViewSortButton.js +22 -22
- package/dist/DataViewSortButton.js.map +1 -1
- package/dist/DatePicker.js +3 -6
- package/dist/DatePicker.js.map +1 -1
- package/dist/DescriptionListTerm.js +7 -7
- package/dist/DescriptionListTerm.js.map +1 -1
- package/dist/Divider.js +8 -8
- package/dist/Divider.js.map +1 -1
- package/dist/Dropdown.js +15 -15
- package/dist/Dropdown.js.map +1 -1
- package/dist/Field.js +2 -2
- package/dist/{Field.vue_vue_type_script_setup_true_lang-42cf79d4.js → Field.vue_vue_type_script_setup_true_lang-4483019d.js} +2 -2
- package/dist/{Field.vue_vue_type_script_setup_true_lang-42cf79d4.js.map → Field.vue_vue_type_script_setup_true_lang-4483019d.js.map} +1 -1
- package/dist/FileUpload.js +35 -35
- package/dist/FileUpload.js.map +1 -1
- package/dist/FilterSelect.js +2 -2
- package/dist/Filters.js +28 -28
- package/dist/Filters.js.map +1 -1
- package/dist/IconLabel.js +5 -5
- package/dist/IconLabel.js.map +1 -1
- package/dist/InlineEdit.js +2 -2
- package/dist/Input.js +2 -2
- package/dist/InputOptions.js +2 -2
- package/dist/Label.js +1 -1
- package/dist/{Label.vue_vue_type_script_setup_true_lang-c5589919.js → Label.vue_vue_type_script_setup_true_lang-2de35913.js} +6 -6
- package/dist/{Label.vue_vue_type_script_setup_true_lang-c5589919.js.map → Label.vue_vue_type_script_setup_true_lang-2de35913.js.map} +1 -1
- package/dist/ListView.js +49 -49
- package/dist/ListView.js.map +1 -1
- package/dist/Modals.js +13 -13
- package/dist/Modals.js.map +1 -1
- package/dist/RadioGroup.js +44 -44
- package/dist/RadioGroup.js.map +1 -1
- package/dist/RadioNew.js +2 -2
- package/dist/SearchBar.js +2 -2
- package/dist/Select.js +6 -6
- package/dist/Select.js.map +1 -1
- package/dist/SelectStatus.js +2 -2
- package/dist/Textarea.js +2 -2
- package/dist/components.css +1 -1
- package/dist/constants.d.ts +7 -7
- package/dist/constants.js +21 -21
- package/dist/constants.js.map +1 -1
- package/dist/utils/helpers.js +37 -37
- package/dist/utils/helpers.js.map +1 -1
- package/package.json +1 -1
package/dist/ActionsDropdown.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as c, useCssModule as p, openBlock as m, createBlock as u, unref as n, normalizeClass as s, createSlots as f, withCtx as e, createVNode as a, createTextVNode as
|
|
1
|
+
import { defineComponent as c, useCssModule as p, openBlock as m, createBlock as u, unref as n, normalizeClass as s, createSlots as f, withCtx as e, createVNode as a, createTextVNode as w, toDisplayString as _, renderSlot as b } from "vue";
|
|
2
2
|
import { t as C } from "./locale.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import x from "./Button.js";
|
|
4
|
+
import g from "./Dropdown.js";
|
|
5
5
|
import B from "./Icon.js";
|
|
6
6
|
import { _ as D } from "./_plugin-vue_export-helper-dad06003.js";
|
|
7
7
|
import "lodash-es/get";
|
|
@@ -25,23 +25,23 @@ const y = /* @__PURE__ */ c({
|
|
|
25
25
|
contentClass: { default: "" },
|
|
26
26
|
buttonText: { default: () => C("ll.actions") }
|
|
27
27
|
},
|
|
28
|
-
setup(
|
|
29
|
-
const
|
|
30
|
-
return (d, N) => (m(), u(
|
|
31
|
-
align:
|
|
32
|
-
"content-class": [n(
|
|
33
|
-
class: s(n(
|
|
28
|
+
setup(r) {
|
|
29
|
+
const t = r, o = p();
|
|
30
|
+
return (d, N) => (m(), u(g, {
|
|
31
|
+
align: t.align,
|
|
32
|
+
"content-class": [n(o).dropdownContent, t.contentClass],
|
|
33
|
+
class: s(n(o).actionsDropdown)
|
|
34
34
|
}, f({
|
|
35
|
-
toggle: e(({ isActive:
|
|
36
|
-
a(
|
|
37
|
-
class: s(["button
|
|
35
|
+
toggle: e(({ isActive: l, toggle: i }) => [
|
|
36
|
+
a(x, {
|
|
37
|
+
class: s(["button tw-flex tw-w-full tw-items-center tw-justify-between tw-border tw-border-blue-500 tw-text-blue-500", [n(o).actionButton, { [n(o).disabled]: t.disabled }]]),
|
|
38
38
|
secondary: "",
|
|
39
|
-
"aria-expanded":
|
|
40
|
-
disabled:
|
|
39
|
+
"aria-expanded": l.toString(),
|
|
40
|
+
disabled: t.disabled,
|
|
41
41
|
onClick: i
|
|
42
42
|
}, {
|
|
43
43
|
default: e(() => [
|
|
44
|
-
_(
|
|
44
|
+
w(_(t.buttonText) + " ", 1),
|
|
45
45
|
a(B, {
|
|
46
46
|
class: "tw-ml-1.5",
|
|
47
47
|
name: "caret-down"
|
|
@@ -52,7 +52,7 @@ const y = /* @__PURE__ */ c({
|
|
|
52
52
|
]),
|
|
53
53
|
_: 2
|
|
54
54
|
}, [
|
|
55
|
-
|
|
55
|
+
t.disabled ? void 0 : {
|
|
56
56
|
name: "default",
|
|
57
57
|
fn: e(() => [
|
|
58
58
|
b(d.$slots, "default")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionsDropdown.js","sources":["../src/components/ActionsDropdown/ActionsDropdown.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { useCssModule } from 'vue';\n\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import Dropdown from '../Dropdown/Dropdown.vue';\n import Icon from '../Icon/Icon.vue';\n\n defineOptions({\n name: 'll-actions-dropdown',\n });\n\n export interface ActionsDropdownProps {\n /**\n * Used to position the dropdown relative to target\n * Options: left, right\n */\n align?: 'left' | 'right';\n /**\n * Indicates whether the trigger button is disabled or not\n */\n disabled?: boolean;\n /**\n * Class to be applied to the dropdown content\n */\n contentClass?: string;\n /**\n * Text to be displayed on the trigger button\n */\n buttonText?: string;\n }\n\n const props = withDefaults(defineProps<ActionsDropdownProps>(), {\n align: 'left',\n disabled: false,\n contentClass: '',\n buttonText: () => t('ll.actions'),\n });\n\n const classes = useCssModule();\n</script>\n\n<template>\n <Dropdown\n :align=\"props.align\"\n :content-class=\"[classes.dropdownContent, props.contentClass]\"\n :class=\"classes.actionsDropdown\"\n >\n <template #toggle=\"{ isActive, toggle }\">\n <Button\n class=\"button
|
|
1
|
+
{"version":3,"file":"ActionsDropdown.js","sources":["../src/components/ActionsDropdown/ActionsDropdown.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { useCssModule } from 'vue';\n\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import Dropdown from '../Dropdown/Dropdown.vue';\n import Icon from '../Icon/Icon.vue';\n\n defineOptions({\n name: 'll-actions-dropdown',\n });\n\n export interface ActionsDropdownProps {\n /**\n * Used to position the dropdown relative to target\n * Options: left, right\n */\n align?: 'left' | 'right';\n /**\n * Indicates whether the trigger button is disabled or not\n */\n disabled?: boolean;\n /**\n * Class to be applied to the dropdown content\n */\n contentClass?: string;\n /**\n * Text to be displayed on the trigger button\n */\n buttonText?: string;\n }\n\n const props = withDefaults(defineProps<ActionsDropdownProps>(), {\n align: 'left',\n disabled: false,\n contentClass: '',\n buttonText: () => t('ll.actions'),\n });\n\n const classes = useCssModule();\n</script>\n\n<template>\n <Dropdown\n :align=\"props.align\"\n :content-class=\"[classes.dropdownContent, props.contentClass]\"\n :class=\"classes.actionsDropdown\"\n >\n <template #toggle=\"{ isActive, toggle }\">\n <Button\n class=\"\n button\n tw-flex tw-w-full tw-items-center tw-justify-between tw-border tw-border-blue-500 tw-text-blue-500\n \"\n secondary\n :aria-expanded=\"isActive.toString()\"\n :class=\"[classes.actionButton, { [classes.disabled]: props.disabled }]\"\n :disabled=\"props.disabled\"\n @click=\"toggle\"\n >\n {{ props.buttonText }} <Icon class=\"tw-ml-1.5\" name=\"caret-down\" />\n </Button>\n </template>\n\n <template v-if=\"!props.disabled\" #default>\n <!-- @slot Dropdown content -->\n <slot></slot>\n </template>\n </Dropdown>\n</template>\n\n<style module>\n .actionButton {\n min-width: 156px;\n white-space: normal;\n }\n\n .actionButton:hover {\n background-color: var(--color-blue-100);\n border-color: var(--color-blue-500) !important;\n }\n\n .disabled {\n background-color: var(--color-ice-100) !important;\n border-color: var(--color-ice-500) !important;\n color: var(--color-ice-500) !important;\n }\n\n .dropdownContent {\n margin-top: 4px;\n }\n\n .dropdownContent:global(.dropdown__content) {\n margin-left: 0;\n margin-right: 0;\n max-width: 90vw;\n }\n\n .dropdownContent:global(.dropdown__content)::after {\n display: none;\n }\n\n @media screen(md) {\n .actionsDropdown {\n min-width: 156px;\n }\n\n .dropdownContent:global(.dropdown__content) {\n min-width: 156px;\n }\n }\n</style>\n"],"names":["classes","useCssModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuCQA,IAAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/AddressSelect.js
CHANGED
|
@@ -24,8 +24,8 @@ import "./Icon.js";
|
|
|
24
24
|
import "./index-79ce320f.js";
|
|
25
25
|
import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
|
26
26
|
import "./_plugin-vue_export-helper-dad06003.js";
|
|
27
|
-
import "./Field.vue_vue_type_script_setup_true_lang-
|
|
28
|
-
import "./Label.vue_vue_type_script_setup_true_lang-
|
|
27
|
+
import "./Field.vue_vue_type_script_setup_true_lang-4483019d.js";
|
|
28
|
+
import "./Label.vue_vue_type_script_setup_true_lang-2de35913.js";
|
|
29
29
|
import "./locale.js";
|
|
30
30
|
const _ = "address-select-", ve = /* @__PURE__ */ M({
|
|
31
31
|
__name: "AddressSelect",
|
package/dist/Alert.js
CHANGED
|
@@ -19,8 +19,8 @@ const z = { class: "tw-m-0" }, A = /* @__PURE__ */ x({
|
|
|
19
19
|
variant: { default: "outlined" }
|
|
20
20
|
},
|
|
21
21
|
setup(b) {
|
|
22
|
-
const e = b, g = B("close-icon"), _ = $(), a = C(), c = I(!0),
|
|
23
|
-
return (
|
|
22
|
+
const e = b, g = B("close-icon"), _ = $(), a = C(), c = I(!0), u = s(() => M[y(e.severity)]), h = s(() => N[y(e.severity)]), k = s(() => e.variant === "filled" && ["warning", "success"].includes(e.severity) ? "tw-text-ice-900" : e.variant === "filled" && ["info", "error"].includes(e.severity) ? "tw-text-white" : `tw-text-${h.value}`), n = s(() => e.variant === "filled" && ["info", "error"].includes(e.severity) ? "tw-text-white" : "tw-text-ice-900");
|
|
23
|
+
return (d, v) => c.value ? S((i(), l("div", {
|
|
24
24
|
key: 0,
|
|
25
25
|
class: r(["stash-alert tw-relative tw-flex tw-items-center tw-border tw-border-solid tw-p-3 tw-leading-6", [
|
|
26
26
|
`stash-alert--${e.severity}`,
|
|
@@ -47,8 +47,8 @@ const z = { class: "tw-m-0" }, A = /* @__PURE__ */ x({
|
|
|
47
47
|
"data-test": "stash-alert"
|
|
48
48
|
}, [
|
|
49
49
|
w(p, {
|
|
50
|
-
class: r(["stash-alert__icon", [t(a).iconInfo, k.value, `stash-alert__icon--${
|
|
51
|
-
name:
|
|
50
|
+
class: r(["stash-alert__icon", [t(a).iconInfo, k.value, `stash-alert__icon--${u.value}`]]),
|
|
51
|
+
name: u.value,
|
|
52
52
|
title: `${e.severity} icon`,
|
|
53
53
|
"data-test": "stash-alert|status-icon"
|
|
54
54
|
}, null, 8, ["class", "name", "title"]),
|
|
@@ -59,14 +59,14 @@ const z = { class: "tw-m-0" }, A = /* @__PURE__ */ x({
|
|
|
59
59
|
}])
|
|
60
60
|
}, [
|
|
61
61
|
f("p", z, [
|
|
62
|
-
m(
|
|
62
|
+
m(d.$slots, "default")
|
|
63
63
|
]),
|
|
64
64
|
t(_).link ? (i(), l("div", {
|
|
65
65
|
key: 0,
|
|
66
|
-
class: r(["stash-alert__link tw-pointer tw-underline hover:tw-no-underline", [t(a).link, n.value, { "tw-ml-2": e.centered }]]),
|
|
66
|
+
class: r(["stash-alert__link tw-cursor-pointer tw-underline hover:tw-no-underline", [t(a).link, n.value, { "tw-ml-2": e.centered }]]),
|
|
67
67
|
"data-test": "stash-alert|link"
|
|
68
68
|
}, [
|
|
69
|
-
m(
|
|
69
|
+
m(d.$slots, "link")
|
|
70
70
|
], 2)) : o("", !0)
|
|
71
71
|
], 2),
|
|
72
72
|
e.permanent ? o("", !0) : (i(), l("button", {
|
package/dist/Alert.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.js","sources":["../src/components/Alert/Alert.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import capitalize from 'lodash-es/capitalize';\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, ref, useCssModule, useSlots } from 'vue';\n\n import { StatusColor, StatusColors, StatusIcon, StatusIcons, StatusSeverity } from '../../../types/statusLevels';\n import vSticky from '../../directives/sticky/sticky';\n import Icon from '../Icon/Icon.vue';\n\n defineOptions({\n name: 'll-alert',\n });\n\n export interface AlertProps {\n /**\n * Determines if the alert is centered\n */\n centered?: boolean;\n\n /**\n * Determines if the alert is permanent (doesn't have a close button).\n */\n permanent?: boolean;\n\n /**\n * The type of border radius to use. Available types:\n *\n * - `none` - no border radius\n * - `standard` - 4px border radius\n */\n radius?: 'none' | 'standard';\n\n /**\n * The type of alert. Available types:\n *\n * - `info`\n * - `success`\n * - `warning`\n * - `error`\n */\n severity?: StatusSeverity;\n\n /**\n * Determines if the alert is sticky. By default, it's not sticky. The provided `number` value is a top offset of alert.\n */\n sticky?: number | null;\n\n /**\n * The variant of alert. Available variants:\n *\n * - `filled` - previously alert component\n * - `outlined` - previously banner component\n */\n variant?: 'outlined' | 'filled';\n }\n\n const props = withDefaults(defineProps<AlertProps>(), {\n centered: false,\n permanent: false,\n radius: 'standard',\n severity: 'info',\n sticky: null,\n variant: 'outlined',\n });\n\n const iconId = uniqueId('close-icon');\n const slots = useSlots();\n const classes = useCssModule();\n const show = ref(true);\n const icon = computed<StatusIcon>(() => StatusIcons[capitalize(props.severity)]);\n const color = computed<StatusColor>(() => StatusColors[capitalize(props.severity)]);\n\n const iconColor = computed<string>(() => {\n if (props.variant === 'filled' && ['warning', 'success'].includes(props.severity)) {\n return 'tw-text-ice-900';\n }\n\n if (props.variant === 'filled' && ['info', 'error'].includes(props.severity)) {\n return 'tw-text-white';\n }\n\n return `tw-text-${color.value}`;\n });\n\n const computedTextColor = computed<string>(() => {\n if (props.variant === 'filled' && ['info', 'error'].includes(props.severity)) {\n return 'tw-text-white';\n }\n\n return 'tw-text-ice-900';\n });\n</script>\n\n<template>\n <div\n v-if=\"show\"\n v-sticky=\"props.sticky\"\n class=\"stash-alert tw-relative tw-flex tw-items-center tw-border tw-border-solid tw-p-3 tw-leading-6\"\n :class=\"[\n `stash-alert--${props.severity}`,\n `stash-alert--${props.variant}`,\n computedTextColor,\n {\n 'tw-my-6': props.variant === 'outlined', // Todo - this makes ZERO sense. We should remove this altogether and let the consumer handle the margin.\n 'tw-rounded': props.radius === 'standard',\n 'tw-border-red-500': props.severity === 'error',\n 'tw-border-orange-500': props.severity === 'warning',\n 'tw-border-blue-500': props.severity === 'info',\n 'tw-border-green-500': props.severity === 'success',\n 'tw-bg-red-500': props.severity === 'error' && props.variant === 'filled',\n 'tw-bg-orange-500': props.severity === 'warning' && props.variant === 'filled',\n 'tw-bg-blue-500': props.severity === 'info' && props.variant === 'filled',\n 'tw-bg-green-500': props.severity === 'success' && props.variant === 'filled',\n 'tw-bg-red-100': props.severity === 'error' && props.variant === 'outlined',\n 'tw-bg-orange-100': props.severity === 'warning' && props.variant === 'outlined',\n 'tw-bg-blue-100': props.severity === 'info' && props.variant === 'outlined',\n 'tw-bg-green-100': props.severity === 'success' && props.variant === 'outlined',\n },\n ]\"\n data-test=\"stash-alert\"\n >\n <Icon\n class=\"stash-alert__icon\"\n :class=\"[classes.iconInfo, iconColor, `stash-alert__icon--${icon}`]\"\n :name=\"icon\"\n :title=\"`${props.severity} icon`\"\n data-test=\"stash-alert|status-icon\"\n />\n\n <!-- Alert text elements -->\n <div\n class=\"tw-flex tw-flex-1 tw-flex-wrap tw-px-2\"\n :class=\"{\n 'tw-justify-center': props.centered,\n 'tw-justify-between': !props.centered,\n }\"\n >\n <p class=\"tw-m-0\">\n <slot></slot>\n </p>\n\n <div\n v-if=\"slots.link\"\n class=\"stash-alert__link tw-pointer tw-underline hover:tw-no-underline\"\n :class=\"[classes.link, computedTextColor, { 'tw-ml-2': props.centered }]\"\n data-test=\"stash-alert|link\"\n >\n <slot name=\"link\"></slot>\n </div>\n </div>\n\n <button\n v-if=\"!props.permanent\"\n class=\"stash-alert__close\"\n :class=\"[classes.button, computedTextColor]\"\n type=\"button\"\n data-test=\"stash-alert|close\"\n @click=\"show = false\"\n >\n <Icon :id=\"iconId\" name=\"close\" title=\"Dismiss alert\" />\n </button>\n </div>\n</template>\n\n<style module>\n :global(.stash-alert__link) {\n a,\n button {\n color: var(--color-ice-900);\n cursor: pointer;\n text-decoration: underline;\n\n &:hover {\n text-decoration: none;\n }\n }\n }\n\n :global(.stash-alert--filled.stash-alert--error),\n :global(.stash-alert--filled.stash-alert--info) {\n :global(.stash-alert__link) a,\n :global(.stash-alert__link) button {\n color: theme('colors.white');\n }\n }\n</style>\n"],"names":["iconId","uniqueId","slots","useSlots","classes","useCssModule","show","ref","icon","computed","StatusIcons","capitalize","props","color","StatusColors","iconColor","computedTextColor"],"mappings":";;;;;;;;;;;;;;;;;;;;;iBAiEQA,IAASC,EAAS,YAAY,GAC9BC,IAAQC,KACRC,IAAUC,KACVC,IAAOC,EAAI,EAAI,GACfC,IAAOC,EAAqB,MAAMC,EAAYC,EAAWC,EAAM,QAAQ,CAAC,CAAC,GACzEC,IAAQJ,EAAsB,MAAMK,EAAaH,EAAWC,EAAM,QAAQ,CAAC,CAAC,GAE5EG,IAAYN,EAAiB,MAC7BG,EAAM,YAAY,YAAY,CAAC,WAAW,SAAS,EAAE,SAASA,EAAM,QAAQ,IACvE,oBAGLA,EAAM,YAAY,YAAY,CAAC,QAAQ,OAAO,EAAE,SAASA,EAAM,QAAQ,IAClE,kBAGF,WAAWC,EAAM,KAAK,EAC9B,GAEKG,IAAoBP,EAAiB,MACrCG,EAAM,YAAY,YAAY,CAAC,QAAQ,OAAO,EAAE,SAASA,EAAM,QAAQ,IAClE,kBAGF,iBACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"Alert.js","sources":["../src/components/Alert/Alert.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import capitalize from 'lodash-es/capitalize';\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, ref, useCssModule, useSlots } from 'vue';\n\n import { StatusColor, StatusColors, StatusIcon, StatusIcons, StatusSeverity } from '../../../types/statusLevels';\n import vSticky from '../../directives/sticky/sticky';\n import Icon from '../Icon/Icon.vue';\n\n defineOptions({\n name: 'll-alert',\n });\n\n export interface AlertProps {\n /**\n * Determines if the alert is centered\n */\n centered?: boolean;\n\n /**\n * Determines if the alert is permanent (doesn't have a close button).\n */\n permanent?: boolean;\n\n /**\n * The type of border radius to use. Available types:\n *\n * - `none` - no border radius\n * - `standard` - 4px border radius\n */\n radius?: 'none' | 'standard';\n\n /**\n * The type of alert. Available types:\n *\n * - `info`\n * - `success`\n * - `warning`\n * - `error`\n */\n severity?: StatusSeverity;\n\n /**\n * Determines if the alert is sticky. By default, it's not sticky. The provided `number` value is a top offset of alert.\n */\n sticky?: number | null;\n\n /**\n * The variant of alert. Available variants:\n *\n * - `filled` - previously alert component\n * - `outlined` - previously banner component\n */\n variant?: 'outlined' | 'filled';\n }\n\n const props = withDefaults(defineProps<AlertProps>(), {\n centered: false,\n permanent: false,\n radius: 'standard',\n severity: 'info',\n sticky: null,\n variant: 'outlined',\n });\n\n const iconId = uniqueId('close-icon');\n const slots = useSlots();\n const classes = useCssModule();\n const show = ref(true);\n const icon = computed<StatusIcon>(() => StatusIcons[capitalize(props.severity)]);\n const color = computed<StatusColor>(() => StatusColors[capitalize(props.severity)]);\n\n const iconColor = computed<string>(() => {\n if (props.variant === 'filled' && ['warning', 'success'].includes(props.severity)) {\n return 'tw-text-ice-900';\n }\n\n if (props.variant === 'filled' && ['info', 'error'].includes(props.severity)) {\n return 'tw-text-white';\n }\n\n return `tw-text-${color.value}`;\n });\n\n const computedTextColor = computed<string>(() => {\n if (props.variant === 'filled' && ['info', 'error'].includes(props.severity)) {\n return 'tw-text-white';\n }\n\n return 'tw-text-ice-900';\n });\n</script>\n\n<template>\n <div\n v-if=\"show\"\n v-sticky=\"props.sticky\"\n class=\"stash-alert tw-relative tw-flex tw-items-center tw-border tw-border-solid tw-p-3 tw-leading-6\"\n :class=\"[\n `stash-alert--${props.severity}`,\n `stash-alert--${props.variant}`,\n computedTextColor,\n {\n 'tw-my-6': props.variant === 'outlined', // Todo - this makes ZERO sense. We should remove this altogether and let the consumer handle the margin.\n 'tw-rounded': props.radius === 'standard',\n 'tw-border-red-500': props.severity === 'error',\n 'tw-border-orange-500': props.severity === 'warning',\n 'tw-border-blue-500': props.severity === 'info',\n 'tw-border-green-500': props.severity === 'success',\n 'tw-bg-red-500': props.severity === 'error' && props.variant === 'filled',\n 'tw-bg-orange-500': props.severity === 'warning' && props.variant === 'filled',\n 'tw-bg-blue-500': props.severity === 'info' && props.variant === 'filled',\n 'tw-bg-green-500': props.severity === 'success' && props.variant === 'filled',\n 'tw-bg-red-100': props.severity === 'error' && props.variant === 'outlined',\n 'tw-bg-orange-100': props.severity === 'warning' && props.variant === 'outlined',\n 'tw-bg-blue-100': props.severity === 'info' && props.variant === 'outlined',\n 'tw-bg-green-100': props.severity === 'success' && props.variant === 'outlined',\n },\n ]\"\n data-test=\"stash-alert\"\n >\n <Icon\n class=\"stash-alert__icon\"\n :class=\"[classes.iconInfo, iconColor, `stash-alert__icon--${icon}`]\"\n :name=\"icon\"\n :title=\"`${props.severity} icon`\"\n data-test=\"stash-alert|status-icon\"\n />\n\n <!-- Alert text elements -->\n <div\n class=\"tw-flex tw-flex-1 tw-flex-wrap tw-px-2\"\n :class=\"{\n 'tw-justify-center': props.centered,\n 'tw-justify-between': !props.centered,\n }\"\n >\n <p class=\"tw-m-0\">\n <slot></slot>\n </p>\n\n <div\n v-if=\"slots.link\"\n class=\"stash-alert__link tw-cursor-pointer tw-underline hover:tw-no-underline\"\n :class=\"[classes.link, computedTextColor, { 'tw-ml-2': props.centered }]\"\n data-test=\"stash-alert|link\"\n >\n <slot name=\"link\"></slot>\n </div>\n </div>\n\n <button\n v-if=\"!props.permanent\"\n class=\"stash-alert__close\"\n :class=\"[classes.button, computedTextColor]\"\n type=\"button\"\n data-test=\"stash-alert|close\"\n @click=\"show = false\"\n >\n <Icon :id=\"iconId\" name=\"close\" title=\"Dismiss alert\" />\n </button>\n </div>\n</template>\n\n<style module>\n :global(.stash-alert__link) {\n a,\n button {\n color: var(--color-ice-900);\n cursor: pointer;\n text-decoration: underline;\n\n &:hover {\n text-decoration: none;\n }\n }\n }\n\n :global(.stash-alert--filled.stash-alert--error),\n :global(.stash-alert--filled.stash-alert--info) {\n :global(.stash-alert__link) a,\n :global(.stash-alert__link) button {\n color: theme('colors.white');\n }\n }\n</style>\n"],"names":["iconId","uniqueId","slots","useSlots","classes","useCssModule","show","ref","icon","computed","StatusIcons","capitalize","props","color","StatusColors","iconColor","computedTextColor"],"mappings":";;;;;;;;;;;;;;;;;;;;;iBAiEQA,IAASC,EAAS,YAAY,GAC9BC,IAAQC,KACRC,IAAUC,KACVC,IAAOC,EAAI,EAAI,GACfC,IAAOC,EAAqB,MAAMC,EAAYC,EAAWC,EAAM,QAAQ,CAAC,CAAC,GACzEC,IAAQJ,EAAsB,MAAMK,EAAaH,EAAWC,EAAM,QAAQ,CAAC,CAAC,GAE5EG,IAAYN,EAAiB,MAC7BG,EAAM,YAAY,YAAY,CAAC,WAAW,SAAS,EAAE,SAASA,EAAM,QAAQ,IACvE,oBAGLA,EAAM,YAAY,YAAY,CAAC,QAAQ,OAAO,EAAE,SAASA,EAAM,QAAQ,IAClE,kBAGF,WAAWC,EAAM,KAAK,EAC9B,GAEKG,IAAoBP,EAAiB,MACrCG,EAAM,YAAY,YAAY,CAAC,QAAQ,OAAO,EAAE,SAASA,EAAM,QAAQ,IAClE,kBAGF,iBACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -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-5fe03d51.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: "tw-flex tw-flex-1 tw-items-center tw-overflow-hidden" }, A = { class: "
|
|
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: {},
|
|
@@ -16,11 +16,11 @@ const C = { class: "tw-flex tw-flex-1 tw-items-center tw-overflow-hidden" }, A =
|
|
|
16
16
|
setup(u) {
|
|
17
17
|
const t = u, l = v(!1), f = y();
|
|
18
18
|
return (e, c) => {
|
|
19
|
-
const
|
|
19
|
+
const w = $("router-link");
|
|
20
20
|
return a(), r("li", null, [
|
|
21
|
-
|
|
21
|
+
b(f)["sub-items"] ? (a(), r("div", B, [
|
|
22
22
|
s("button", {
|
|
23
|
-
class: n([[e.$style.item, { [e.$style.expanded]: l.value }], "
|
|
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, [
|
|
@@ -35,7 +35,7 @@ const C = { class: "tw-flex tw-flex-1 tw-items-center tw-overflow-hidden" }, A =
|
|
|
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
40
|
class: n(e.$style.expand)
|
|
41
41
|
}, {
|
|
@@ -48,10 +48,10 @@ const C = { class: "tw-flex tw-flex-1 tw-items-center tw-overflow-hidden" }, A =
|
|
|
48
48
|
]),
|
|
49
49
|
_: 3
|
|
50
50
|
}, 8, ["is-expanded", "class"])
|
|
51
|
-
])) : (a(),
|
|
51
|
+
])) : (a(), h(w, {
|
|
52
52
|
key: 0,
|
|
53
53
|
to: t.to,
|
|
54
|
-
class: n([[e.$style.item, { [e.$style.active]: t.isActive }], "
|
|
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(() => [
|
|
@@ -77,7 +77,7 @@ const C = { class: "tw-flex tw-flex-1 tw-items-center tw-overflow-hidden" }, A =
|
|
|
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=\"
|
|
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/CurrencyInput.js
CHANGED
|
@@ -6,9 +6,9 @@ import "./utils/i18n.js";
|
|
|
6
6
|
import "./constants.js";
|
|
7
7
|
import "./locale.js";
|
|
8
8
|
import "lodash-es/get";
|
|
9
|
-
import "./Field.vue_vue_type_script_setup_true_lang-
|
|
9
|
+
import "./Field.vue_vue_type_script_setup_true_lang-4483019d.js";
|
|
10
10
|
import "lodash-es/uniqueId";
|
|
11
|
-
import "./Label.vue_vue_type_script_setup_true_lang-
|
|
11
|
+
import "./Label.vue_vue_type_script_setup_true_lang-2de35913.js";
|
|
12
12
|
import "./Icon.js";
|
|
13
13
|
import "./index-79ce320f.js";
|
|
14
14
|
import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
package/dist/DataViewFilters.js
CHANGED
|
@@ -9,7 +9,7 @@ import $ from "./Icon.js";
|
|
|
9
9
|
import "./Paginate.vue_used_vue_type_style_index_0_lang.module-1a2084f9.js";
|
|
10
10
|
import { D as G } from "./DataView.vue_used_vue_type_style_index_0_lang.module-d878ca9a.js";
|
|
11
11
|
import q from "./FilterChip.js";
|
|
12
|
-
import { _ as H } from "./Label.vue_vue_type_script_setup_true_lang-
|
|
12
|
+
import { _ as H } from "./Label.vue_vue_type_script_setup_true_lang-2de35913.js";
|
|
13
13
|
import K from "./Modal.js";
|
|
14
14
|
import X from "./SearchBar.js";
|
|
15
15
|
import { D as Y } from "./DataViewFilters.keys-c80ffabe.js";
|
|
@@ -26,7 +26,7 @@ import "./Backdrop.js";
|
|
|
26
26
|
import "./Input.js";
|
|
27
27
|
import "lodash-es/isNil";
|
|
28
28
|
import "./utils/i18n.js";
|
|
29
|
-
import "./Field.vue_vue_type_script_setup_true_lang-
|
|
29
|
+
import "./Field.vue_vue_type_script_setup_true_lang-4483019d.js";
|
|
30
30
|
function Pe({
|
|
31
31
|
schema: a,
|
|
32
32
|
dataViewRef: w
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as g, inject as y, openBlock as r, createBlock as
|
|
1
|
+
import { defineComponent as g, inject as y, openBlock as r, createBlock as n, withCtx as o, createVNode as i, createTextVNode as l, toDisplayString as c, unref as e, createElementVNode as d, createElementBlock as w, Fragment as f, renderList as D, normalizeClass as b, createCommentVNode as m } from "vue";
|
|
2
2
|
import { t as S } from "./locale.js";
|
|
3
3
|
import u from "./Button.js";
|
|
4
4
|
import "lodash-es/cloneDeep";
|
|
5
|
-
import
|
|
5
|
+
import k from "./Icon.js";
|
|
6
6
|
import "./Paginate.vue_used_vue_type_style_index_0_lang.module-1a2084f9.js";
|
|
7
|
-
import { D as
|
|
7
|
+
import { D as h } from "./DataView.vue_used_vue_type_style_index_0_lang.module-d878ca9a.js";
|
|
8
8
|
import V from "./Dropdown.js";
|
|
9
9
|
import v from "./IconLabel.js";
|
|
10
10
|
import { _ as B } from "./_plugin-vue_export-helper-dad06003.js";
|
|
@@ -28,24 +28,24 @@ const I = {
|
|
|
28
28
|
props: {
|
|
29
29
|
sortOptions: { default: () => [] }
|
|
30
30
|
},
|
|
31
|
-
setup(
|
|
32
|
-
const _ =
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
setup(x) {
|
|
32
|
+
const _ = x, { currentSortId: a, currentSortOrder: s, updateCurrentSort: p } = y(
|
|
33
|
+
h.key,
|
|
34
|
+
h.defaults
|
|
35
35
|
);
|
|
36
|
-
return (T, L) => _.sortOptions.length ? (r(),
|
|
36
|
+
return (T, L) => _.sortOptions.length ? (r(), n(V, {
|
|
37
37
|
key: 0,
|
|
38
38
|
align: "left",
|
|
39
39
|
class: "stash-data-view-sort-button",
|
|
40
40
|
"data-test": "stash-data-view-sort-button"
|
|
41
41
|
}, {
|
|
42
|
-
toggle: o(({ isActive: t, toggle:
|
|
42
|
+
toggle: o(({ isActive: t, toggle: C }) => [
|
|
43
43
|
i(u, {
|
|
44
44
|
"icon-label": "",
|
|
45
45
|
"aria-expanded": t.toString(),
|
|
46
46
|
class: "tw-text-blue-500",
|
|
47
47
|
"data-test": "stash-data-view-sort-button|sort-menu-button",
|
|
48
|
-
onClick:
|
|
48
|
+
onClick: C
|
|
49
49
|
}, {
|
|
50
50
|
default: o(() => [
|
|
51
51
|
i(v, {
|
|
@@ -53,7 +53,7 @@ const I = {
|
|
|
53
53
|
stacked: ""
|
|
54
54
|
}, {
|
|
55
55
|
default: o(() => [
|
|
56
|
-
|
|
56
|
+
l(c(e(S)("ll.sort")), 1)
|
|
57
57
|
]),
|
|
58
58
|
_: 1
|
|
59
59
|
})
|
|
@@ -62,12 +62,12 @@ const I = {
|
|
|
62
62
|
}, 1032, ["aria-expanded", "onClick"])
|
|
63
63
|
]),
|
|
64
64
|
default: o(() => [
|
|
65
|
-
|
|
66
|
-
(r(!0), f
|
|
65
|
+
d("ul", I, [
|
|
66
|
+
(r(!0), w(f, null, D(_.sortOptions, (t) => (r(), w(f, {
|
|
67
67
|
key: t.id
|
|
68
68
|
}, [
|
|
69
|
-
|
|
70
|
-
class:
|
|
69
|
+
d("li", {
|
|
70
|
+
class: b(["dropdown__item tw-rounded", { "tw-bg-blue-100 tw-text-ice-700": t.id === e(a) && e(s) === "asc" }]),
|
|
71
71
|
onClick: () => e(p)(t.id, { sortOrder: "asc", shouldEmit: !0 })
|
|
72
72
|
}, [
|
|
73
73
|
i(u, {
|
|
@@ -75,8 +75,8 @@ const I = {
|
|
|
75
75
|
class: "tw-h-9"
|
|
76
76
|
}, {
|
|
77
77
|
default: o(() => [
|
|
78
|
-
|
|
79
|
-
t.id === e(a) && e(s) === "asc" ? (r(),
|
|
78
|
+
l(c(t.labelAsc) + " ", 1),
|
|
79
|
+
t.id === e(a) && e(s) === "asc" ? (r(), n(k, {
|
|
80
80
|
key: 0,
|
|
81
81
|
name: "check",
|
|
82
82
|
class: "tw-ml-auto tw-text-blue-500"
|
|
@@ -85,8 +85,8 @@ const I = {
|
|
|
85
85
|
_: 2
|
|
86
86
|
}, 1024)
|
|
87
87
|
], 10, E),
|
|
88
|
-
|
|
89
|
-
class:
|
|
88
|
+
d("li", {
|
|
89
|
+
class: b(["dropdown__item tw-rounded", { "tw-bg-blue-100 tw-text-ice-700": t.id === e(a) && e(s) === "desc" }]),
|
|
90
90
|
onClick: () => e(p)(t.id, { sortOrder: "desc", shouldEmit: !0 })
|
|
91
91
|
}, [
|
|
92
92
|
i(u, {
|
|
@@ -94,8 +94,8 @@ const I = {
|
|
|
94
94
|
class: "tw-h-9"
|
|
95
95
|
}, {
|
|
96
96
|
default: o(() => [
|
|
97
|
-
|
|
98
|
-
t.id === e(a) && e(s) === "desc" ? (r(),
|
|
97
|
+
l(c(t.labelDesc) + " ", 1),
|
|
98
|
+
t.id === e(a) && e(s) === "desc" ? (r(), n(k, {
|
|
99
99
|
key: 0,
|
|
100
100
|
name: "check",
|
|
101
101
|
class: "tw-ml-auto tw-text-blue-500"
|
|
@@ -111,7 +111,7 @@ const I = {
|
|
|
111
111
|
})) : m("", !0);
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
|
-
const rt = /* @__PURE__ */ B(A, [["__scopeId", "data-v-
|
|
114
|
+
const rt = /* @__PURE__ */ B(A, [["__scopeId", "data-v-8b825319"]]);
|
|
115
115
|
export {
|
|
116
116
|
rt as default
|
|
117
117
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataViewSortButton.js","sources":["../src/components/DataViewSortButton/DataViewSortButton.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { inject } from 'vue';\n\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import { DATA_VIEW_INJECTION } from '../DataView/DataView.vue';\n import Dropdown from '../Dropdown/Dropdown.vue';\n import Icon from '../Icon/Icon.vue';\n import IconLabel from '../IconLabel/IconLabel.vue';\n import { SortOption } from './DataViewSortButton.types';\n\n export interface DataViewToolbarProps {\n /**\n * An array of sort options to display in the dropdown.\n */\n sortOptions?: SortOption[];\n }\n\n const props = withDefaults(defineProps<DataViewToolbarProps>(), {\n sortOptions: () => [],\n });\n\n const { currentSortId, currentSortOrder, updateCurrentSort } = inject(\n DATA_VIEW_INJECTION.key,\n DATA_VIEW_INJECTION.defaults,\n );\n</script>\n\n<template>\n <Dropdown\n v-if=\"props.sortOptions.length\"\n align=\"left\"\n class=\"stash-data-view-sort-button\"\n data-test=\"stash-data-view-sort-button\"\n >\n <template #toggle=\"{ isActive, toggle }\">\n <Button\n icon-label\n :aria-expanded=\"isActive.toString()\"\n class=\"tw-text-blue-500\"\n data-test=\"stash-data-view-sort-button|sort-menu-button\"\n @click=\"toggle\"\n >\n <IconLabel icon=\"sort\" stacked>\n {{ t('ll.sort') }}\n </IconLabel>\n </Button>\n </template>\n <ul class=\"dropdown__list\" data-test=\"stash-data-view-sort-button|sort-menu\">\n <template v-for=\"sortOption in props.sortOptions\" :key=\"sortOption.id\">\n <li\n class=\"dropdown__item tw-rounded\"\n :class=\"{ '
|
|
1
|
+
{"version":3,"file":"DataViewSortButton.js","sources":["../src/components/DataViewSortButton/DataViewSortButton.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { inject } from 'vue';\n\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import { DATA_VIEW_INJECTION } from '../DataView/DataView.vue';\n import Dropdown from '../Dropdown/Dropdown.vue';\n import Icon from '../Icon/Icon.vue';\n import IconLabel from '../IconLabel/IconLabel.vue';\n import { SortOption } from './DataViewSortButton.types';\n\n export interface DataViewToolbarProps {\n /**\n * An array of sort options to display in the dropdown.\n */\n sortOptions?: SortOption[];\n }\n\n const props = withDefaults(defineProps<DataViewToolbarProps>(), {\n sortOptions: () => [],\n });\n\n const { currentSortId, currentSortOrder, updateCurrentSort } = inject(\n DATA_VIEW_INJECTION.key,\n DATA_VIEW_INJECTION.defaults,\n );\n</script>\n\n<template>\n <Dropdown\n v-if=\"props.sortOptions.length\"\n align=\"left\"\n class=\"stash-data-view-sort-button\"\n data-test=\"stash-data-view-sort-button\"\n >\n <template #toggle=\"{ isActive, toggle }\">\n <Button\n icon-label\n :aria-expanded=\"isActive.toString()\"\n class=\"tw-text-blue-500\"\n data-test=\"stash-data-view-sort-button|sort-menu-button\"\n @click=\"toggle\"\n >\n <IconLabel icon=\"sort\" stacked>\n {{ t('ll.sort') }}\n </IconLabel>\n </Button>\n </template>\n <ul class=\"dropdown__list\" data-test=\"stash-data-view-sort-button|sort-menu\">\n <template v-for=\"sortOption in props.sortOptions\" :key=\"sortOption.id\">\n <li\n class=\"dropdown__item tw-rounded\"\n :class=\"{ 'tw-bg-blue-100 tw-text-ice-700': sortOption.id === currentSortId && currentSortOrder === 'asc' }\"\n @click=\"() => updateCurrentSort(sortOption.id, { sortOrder: 'asc', shouldEmit: true })\"\n >\n <Button inline class=\"tw-h-9\">\n {{ sortOption.labelAsc }}\n <Icon\n v-if=\"sortOption.id === currentSortId && currentSortOrder === 'asc'\"\n name=\"check\"\n class=\"tw-ml-auto tw-text-blue-500\"\n />\n </Button>\n </li>\n <li\n class=\"dropdown__item tw-rounded\"\n :class=\"{ 'tw-bg-blue-100 tw-text-ice-700': sortOption.id === currentSortId && currentSortOrder === 'desc' }\"\n @click=\"() => updateCurrentSort(sortOption.id, { sortOrder: 'desc', shouldEmit: true })\"\n >\n <Button inline class=\"tw-h-9\">\n {{ sortOption.labelDesc }}\n <Icon\n v-if=\"sortOption.id === currentSortId && currentSortOrder === 'desc'\"\n name=\"check\"\n class=\"tw-ml-auto tw-text-blue-500\"\n />\n </Button>\n </li>\n </template>\n </ul>\n </Dropdown>\n</template>\n\n<style scoped>\n .dropdown__item > button {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n</style>\n"],"names":["currentSortId","currentSortOrder","updateCurrentSort","inject","DATA_VIEW_INJECTION"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsBQ,EAAE,eAAAA,GAAe,kBAAAC,GAAkB,mBAAAC,EAAsB,IAAAC;AAAA,MAC7DC,EAAoB;AAAA,MACpBA,EAAoB;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/DatePicker.js
CHANGED
|
@@ -20,8 +20,8 @@ import "./index-79ce320f.js";
|
|
|
20
20
|
import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
|
21
21
|
import "lodash-es/isNil";
|
|
22
22
|
import "./utils/i18n.js";
|
|
23
|
-
import "./Field.vue_vue_type_script_setup_true_lang-
|
|
24
|
-
import "./Label.vue_vue_type_script_setup_true_lang-
|
|
23
|
+
import "./Field.vue_vue_type_script_setup_true_lang-4483019d.js";
|
|
24
|
+
import "./Label.vue_vue_type_script_setup_true_lang-2de35913.js";
|
|
25
25
|
function Uf(e, t) {
|
|
26
26
|
he(2, arguments);
|
|
27
27
|
var r = ge(e).getTime(), n = je(t);
|
|
@@ -11585,10 +11585,7 @@ const cY = /* @__PURE__ */ bt(sY, [["render", lY]]), fY = ["id"], dY = { class:
|
|
|
11585
11585
|
onClick: _[0] || (_[0] = (x) => o.value = void 0)
|
|
11586
11586
|
}, {
|
|
11587
11587
|
default: J(() => [
|
|
11588
|
-
U(Lr, {
|
|
11589
|
-
class: "color-light",
|
|
11590
|
-
name: "close"
|
|
11591
|
-
})
|
|
11588
|
+
U(Lr, { name: "close" })
|
|
11592
11589
|
]),
|
|
11593
11590
|
_: 1
|
|
11594
11591
|
}, 8, ["class"])) : (S(), $e(Lr, {
|