@leaflink/stash 44.0.0-beta.7 → 44.0.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/README.md +107 -39
  2. package/dist/ActionsDropdown.js +2 -2
  3. package/dist/ActionsDropdown.js.map +1 -1
  4. package/dist/AddressSelect.js +2 -2
  5. package/dist/AppNavigationItem.js +1 -1
  6. package/dist/AppSidebar.js +13 -13
  7. package/dist/AppSidebar.js.map +1 -1
  8. package/dist/Badge.vue.d.ts +1 -1
  9. package/dist/Button.js +1 -1
  10. package/dist/Button.js.map +1 -1
  11. package/dist/Button.vue_used_vue_type_style_index_0_lang.module-63d31dc0.js +17 -0
  12. package/dist/Button.vue_used_vue_type_style_index_0_lang.module-63d31dc0.js.map +1 -0
  13. package/dist/ButtonGroup.js +19 -19
  14. package/dist/ButtonGroup.js.map +1 -1
  15. package/dist/Checkbox.js +57 -46
  16. package/dist/Checkbox.js.map +1 -1
  17. package/dist/Checkbox.vue.d.ts +2 -0
  18. package/dist/Checkbox.vue_used_vue_type_style_index_0_lang.module-fa8d9c06.js +9 -0
  19. package/dist/Checkbox.vue_used_vue_type_style_index_0_lang.module-fa8d9c06.js.map +1 -0
  20. package/dist/ChevronToggle.js +1 -1
  21. package/dist/Copy.js +1 -1
  22. package/dist/CurrencyInput.js +2 -2
  23. package/dist/DataView.js +1 -1
  24. package/dist/DataViewFilters.js +4 -4
  25. package/dist/DataViewSortButton.js +47 -38
  26. package/dist/DataViewSortButton.js.map +1 -1
  27. package/dist/DataViewToolbar.js +2 -2
  28. package/dist/DatePicker.js +8 -8
  29. package/dist/DatePicker.js.map +1 -1
  30. package/dist/DescriptionListTerm.js +1 -1
  31. package/dist/DescriptionListTerm.js.map +1 -1
  32. package/dist/Dialog.js +33 -33
  33. package/dist/Dialog.js.map +1 -1
  34. package/dist/Divider.js +4 -4
  35. package/dist/Divider.js.map +1 -1
  36. package/dist/Expand.js +1 -1
  37. package/dist/{Expand.vue_vue_type_script_setup_true_lang-b6a57ae9.js → Expand.vue_vue_type_script_setup_true_lang-1751f4a6.js} +12 -13
  38. package/dist/Expand.vue_vue_type_script_setup_true_lang-1751f4a6.js.map +1 -0
  39. package/dist/Field.js +2 -2
  40. package/dist/Field.vue.d.ts +1 -1
  41. package/dist/{Field.vue_vue_type_script_setup_true_lang-4483019d.js → Field.vue_vue_type_script_setup_true_lang-42ba3c5a.js} +2 -2
  42. package/dist/Field.vue_vue_type_script_setup_true_lang-42ba3c5a.js.map +1 -0
  43. package/dist/FileUpload.js +7 -7
  44. package/dist/FileUpload.js.map +1 -1
  45. package/dist/FilterChip.js +30 -30
  46. package/dist/FilterChip.js.map +1 -1
  47. package/dist/FilterDropdown.js +2 -2
  48. package/dist/FilterSelect.js +2 -2
  49. package/dist/Filters.js +39 -39
  50. package/dist/Filters.js.map +1 -1
  51. package/dist/HttpError.js +6 -6
  52. package/dist/IconLabel.js +6 -6
  53. package/dist/IconLabel.js.map +1 -1
  54. package/dist/IconLabel.vue.d.ts +1 -1
  55. package/dist/Illustration.js +10 -60
  56. package/dist/Illustration.js.map +1 -1
  57. package/dist/Illustration.vue_vue_type_script_setup_true_lang-d6a94e17.js +56 -0
  58. package/dist/Illustration.vue_vue_type_script_setup_true_lang-d6a94e17.js.map +1 -0
  59. package/dist/Image.js +67 -72
  60. package/dist/Image.js.map +1 -1
  61. package/dist/InlineEdit.js +2 -2
  62. package/dist/Input.js +53 -53
  63. package/dist/Input.js.map +1 -1
  64. package/dist/InputOptions.js +2 -2
  65. package/dist/Label.js +1 -1
  66. package/dist/Label.vue.d.ts +13 -2
  67. package/dist/{Label.vue_vue_type_script_setup_true_lang-2de35913.js → Label.vue_vue_type_script_setup_true_lang-4b02087f.js} +12 -11
  68. package/dist/Label.vue_vue_type_script_setup_true_lang-4b02087f.js.map +1 -0
  69. package/dist/ListItem.js +11 -11
  70. package/dist/ListItem.js.map +1 -1
  71. package/dist/ListItemCell.js +9 -9
  72. package/dist/ListItemCell.js.map +1 -1
  73. package/dist/ListView.js +83 -80
  74. package/dist/ListView.js.map +1 -1
  75. package/dist/Loading.js +17 -10
  76. package/dist/Loading.js.map +1 -1
  77. package/dist/Loading.vue_used_vue_type_style_index_0_lang.module-ef5a3bc6.js +8 -0
  78. package/dist/Loading.vue_used_vue_type_style_index_0_lang.module-ef5a3bc6.js.map +1 -0
  79. package/dist/MenuItem.js +20 -14
  80. package/dist/MenuItem.js.map +1 -1
  81. package/dist/Modal.js +2 -2
  82. package/dist/Modal.js.map +1 -1
  83. package/dist/ObfuscateText.js +30 -32
  84. package/dist/ObfuscateText.js.map +1 -1
  85. package/dist/ObfuscateText.vue.d.ts +1 -1
  86. package/dist/PageContent.js +9 -9
  87. package/dist/PageContent.js.map +1 -1
  88. package/dist/PageHeader.js +22 -22
  89. package/dist/PageHeader.js.map +1 -1
  90. package/dist/Paginate.js +1 -1
  91. package/dist/Paginate.js.map +1 -1
  92. package/dist/Paginate.vue_used_vue_type_style_index_0_lang.module-18343da7.js +11 -0
  93. package/dist/Paginate.vue_used_vue_type_style_index_0_lang.module-18343da7.js.map +1 -0
  94. package/dist/Radio.js +24 -19
  95. package/dist/Radio.js.map +1 -1
  96. package/dist/RadioGroup.js +43 -43
  97. package/dist/RadioGroup.js.map +1 -1
  98. package/dist/SearchBar.js +32 -32
  99. package/dist/SearchBar.js.map +1 -1
  100. package/dist/Select.js +5 -5
  101. package/dist/Select.js.map +1 -1
  102. package/dist/SelectStatus.js +2 -2
  103. package/dist/Switch.js +41 -34
  104. package/dist/Switch.js.map +1 -1
  105. package/dist/Table.js +6 -6
  106. package/dist/Table.keys-cf93df19.js +27 -0
  107. package/dist/{Table.keys-75e99266.js.map → Table.keys-cf93df19.js.map} +1 -1
  108. package/dist/TableCell.js +5 -5
  109. package/dist/TableCell.js.map +1 -1
  110. package/dist/TableHeaderCell.js +32 -32
  111. package/dist/TableHeaderCell.js.map +1 -1
  112. package/dist/TableHeaderRow.js +10 -10
  113. package/dist/TableHeaderRow.js.map +1 -1
  114. package/dist/TableRow.js +6 -6
  115. package/dist/TableRow.js.map +1 -1
  116. package/dist/Textarea.js +49 -41
  117. package/dist/Textarea.js.map +1 -1
  118. package/dist/Toast.js +23 -23
  119. package/dist/Toast.js.map +1 -1
  120. package/dist/components.css +1 -1
  121. package/dist/constants.d.ts +26 -19
  122. package/dist/constants.js +41 -26
  123. package/dist/constants.js.map +1 -1
  124. package/dist/index.js +1 -1
  125. package/dist/tailwind-base.d.ts +16 -16
  126. package/dist/tailwind-base.js +7 -4
  127. package/dist/tailwind-base.js.map +1 -1
  128. package/package.json +1 -1
  129. package/styles/backwards-compat.css +41 -104
  130. package/styles/base.css +258 -112
  131. package/tailwind-base.ts +3 -0
  132. package/dist/Button.vue_used_vue_type_style_index_0_lang.module-b2ee90e6.js +0 -17
  133. package/dist/Button.vue_used_vue_type_style_index_0_lang.module-b2ee90e6.js.map +0 -1
  134. package/dist/Checkbox.vue_vue_type_style_index_0_scoped_dbd26d7f_lang-4ed993c7.js +0 -2
  135. package/dist/Checkbox.vue_vue_type_style_index_0_scoped_dbd26d7f_lang-4ed993c7.js.map +0 -1
  136. package/dist/Expand.vue_vue_type_script_setup_true_lang-b6a57ae9.js.map +0 -1
  137. package/dist/Field.vue_vue_type_script_setup_true_lang-4483019d.js.map +0 -1
  138. package/dist/Label.vue_vue_type_script_setup_true_lang-2de35913.js.map +0 -1
  139. package/dist/Loading.vue_vue_type_style_index_0_scoped_bb8d5f15_lang-4ed993c7.js +0 -2
  140. package/dist/Loading.vue_vue_type_style_index_0_scoped_bb8d5f15_lang-4ed993c7.js.map +0 -1
  141. package/dist/Paginate.vue_used_vue_type_style_index_0_lang.module-1a2084f9.js +0 -11
  142. package/dist/Paginate.vue_used_vue_type_style_index_0_lang.module-1a2084f9.js.map +0 -1
  143. package/dist/Table.keys-75e99266.js +0 -27
  144. package/styles/_base.scss +0 -493
  145. package/styles/elements/_links.scss +0 -32
  146. package/styles/elements/_lists.scss +0 -31
  147. package/styles/elements/_misc.scss +0 -16
  148. package/styles/main.scss +0 -38
package/dist/Checkbox.js CHANGED
@@ -1,9 +1,9 @@
1
- import { defineComponent as y, useAttrs as _, useSlots as T, computed as a, openBlock as l, createElementBlock as s, normalizeClass as d, unref as c, withDirectives as E, createElementVNode as i, mergeProps as C, vModelCheckbox as V, renderSlot as m, toDisplayString as n, createTextVNode as A, createCommentVNode as B } from "vue";
1
+ import { defineComponent as T, useAttrs as C, useSlots as E, useCssModule as V, computed as o, openBlock as d, createElementBlock as i, normalizeClass as n, unref as s, withDirectives as A, createElementVNode as p, mergeProps as B, vModelCheckbox as M, renderSlot as k, createTextVNode as w, toDisplayString as h, createCommentVNode as $ } from "vue";
2
2
  import I from "@leaflink/snitch";
3
- import v from "lodash-es/uniqueId";
4
- import "./Checkbox.vue_vue_type_style_index_0_scoped_dbd26d7f_lang-4ed993c7.js";
5
- import { _ as N } from "./_plugin-vue_export-helper-dad06003.js";
6
- const S = ["data-test"], D = ["id", "aria-invalid", "aria-errormessage", "disabled", "value"], $ = ["for"], q = ["id"], z = /* @__PURE__ */ y({
3
+ import m from "lodash-es/uniqueId";
4
+ import { s as N } from "./Checkbox.vue_used_vue_type_style_index_0_lang.module-fa8d9c06.js";
5
+ import { _ as S } from "./_plugin-vue_export-helper-dad06003.js";
6
+ const D = ["data-test"], q = ["id", "aria-invalid", "aria-errormessage", "disabled", "value"], z = ["for"], H = ["id"], P = /* @__PURE__ */ T({
7
7
  name: "ll-checkbox",
8
8
  inheritAttrs: !1,
9
9
  __name: "Checkbox",
@@ -19,70 +19,81 @@ const S = ["data-test"], D = ["id", "aria-invalid", "aria-errormessage", "disabl
19
19
  disabled: { type: Boolean, default: !1 }
20
20
  },
21
21
  emits: ["update:checked"],
22
- setup(x, { emit: b }) {
23
- const e = x, o = _(), f = T();
22
+ setup(v, { emit: f }) {
23
+ const e = v, a = C(), _ = E(), l = V();
24
24
  if (e.modelValue !== void 0)
25
25
  throw new Error("ll-checkbox: use :checked or v-model:checked instead of :model-value and v-model.");
26
- if (typeof e.value == "boolean" && I.warn("ll-checkbox: use `checked` to toggle the state; `value` is what will be set if `checked` is true"), o.onChange)
26
+ if (typeof e.value == "boolean" && I.warn("ll-checkbox: use `checked` to toggle the state; `value` is what will be set if `checked` is true"), a.onChange)
27
27
  throw new Error("ll-checkbox: use the @update:checked event instead of @change.");
28
- const k = a(() => {
29
- const t = { ...o };
28
+ const y = o(() => {
29
+ const t = { ...a };
30
30
  return delete t["data-test"], delete t.class, t;
31
- }), u = a({
31
+ }), r = o({
32
32
  get() {
33
33
  return e.checked;
34
34
  },
35
35
  set(t) {
36
- b("update:checked", t);
36
+ f("update:checked", t);
37
37
  }
38
- }), r = a(() => !!e.errorText || e.hasError), h = a(() => e.id || v("checkbox-")), p = a(() => e.errorText ? v("checkbox-error-") : void 0);
39
- return (t, w) => (l(), s("div", {
40
- class: d(["stash-checkbox tw-relative tw-m-0", [{ "has-error": r.value }, c(o).class]]),
41
- "data-test": c(o)["data-test"] || "stash-checkbox"
38
+ }), c = o(() => !!e.errorText || e.hasError), u = o(() => e.id || m("checkbox-")), x = o(() => e.errorText ? m("checkbox-error-") : void 0);
39
+ return (t, b) => (d(), i("div", {
40
+ class: n(["stash-checkbox tw-relative tw-m-0", [
41
+ s(a).class,
42
+ {
43
+ "stash-checkbox--checked": !!r.value,
44
+ [`stash-checkbox--has-error ${s(l)["has-error"]}`]: c.value
45
+ }
46
+ ]]),
47
+ "data-test": s(a)["data-test"] || "stash-checkbox"
42
48
  }, [
43
- E(i("input", C({
44
- id: h.value,
45
- "onUpdate:modelValue": w[0] || (w[0] = (g) => u.value = g),
49
+ A(p("input", B({
50
+ id: u.value,
51
+ "onUpdate:modelValue": b[0] || (b[0] = (g) => r.value = g),
46
52
  "aria-invalid": !!e.errorText,
47
- "aria-errormessage": p.value,
53
+ "aria-errormessage": x.value,
48
54
  disabled: e.disabled,
49
- class: "tw-sr-only lg:tw-m-0",
55
+ class: ["tw-sr-only lg:tw-m-0", s(l).input],
50
56
  type: "checkbox",
51
57
  value: t.value
52
- }, k.value), null, 16, D), [
53
- [V, u.value]
58
+ }, y.value), null, 16, q), [
59
+ [M, r.value]
54
60
  ]),
55
- i("label", {
61
+ p("label", {
56
62
  "data-test": "stash-checkbox|label",
57
- class: d(["tw-relative tw-inline-block tw-min-h-9 tw-cursor-pointer tw-overflow-visible tw-py-1.5 tw-pl-8 tw-align-top tw-text-sm tw-font-normal tw-leading-6", {
58
- "tw-text-ice-900": !r.value && !e.disabled,
59
- "tw-text-red-500": r.value,
60
- "tw-text-ice-500": e.disabled
61
- }]),
62
- for: h.value
63
+ class: n(["stash-checkbox__label tw-relative tw-inline-block tw-min-h-9 tw-cursor-pointer tw-overflow-visible tw-py-1.5 tw-pl-8 tw-align-top tw-text-sm tw-font-normal tw-leading-6", [
64
+ s(l).label,
65
+ {
66
+ "tw-text-ice-900": !c.value && !e.disabled,
67
+ "tw-text-red-500": c.value,
68
+ "tw-text-ice-500": e.disabled
69
+ }
70
+ ]]),
71
+ for: u.value
63
72
  }, [
64
- m(t.$slots, "default", {}, () => [
65
- i("span", null, n(t.label), 1)
66
- ], !0)
67
- ], 10, $),
68
- e.errorText ? (l(), s("span", {
73
+ k(t.$slots, "default", {}, () => [
74
+ w(h(t.label), 1)
75
+ ])
76
+ ], 10, z),
77
+ e.errorText ? (d(), i("span", {
69
78
  key: 0,
70
- id: p.value,
71
- class: "tw-ml-8 tw-block tw-whitespace-pre-line tw-text-xs tw-text-red-500",
79
+ id: x.value,
80
+ class: "stash-checkbox__error-text tw-ml-8 tw-block tw-whitespace-pre-line tw-text-xs tw-text-red-500",
72
81
  "data-test": "stash-checkbox|error"
73
- }, n(e.errorText), 9, q)) : e.hintText || c(f).hint ? (l(), s("span", {
82
+ }, h(e.errorText), 9, H)) : e.hintText || s(_).hint ? (d(), i("span", {
74
83
  key: 1,
75
- class: d(["tw-ml-8 tw-block tw-whitespace-pre-line tw-text-xs", { "tw-text-ice-500": e.disabled }]),
84
+ class: n(["stash-checkbox__hint-text tw-ml-8 tw-block tw-whitespace-pre-line tw-text-xs", { "tw-text-ice-500": e.disabled }]),
76
85
  "data-test": "stash-checkbox|hint"
77
86
  }, [
78
- m(t.$slots, "hint", {}, () => [
79
- A(n(e.hintText), 1)
80
- ], !0)
81
- ], 2)) : B("", !0)
82
- ], 10, S));
87
+ k(t.$slots, "hint", {}, () => [
88
+ w(h(e.hintText), 1)
89
+ ])
90
+ ], 2)) : $("", !0)
91
+ ], 10, D));
83
92
  }
84
- }), F = /* @__PURE__ */ N(z, [["__scopeId", "data-v-dbd26d7f"]]);
93
+ }), U = {
94
+ $style: N
95
+ }, L = /* @__PURE__ */ S(P, [["__cssModules", U]]);
85
96
  export {
86
- F as default
97
+ L as default
87
98
  };
88
99
  //# sourceMappingURL=Checkbox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","sources":["../src/components/Checkbox/Checkbox.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import logger from '@leaflink/snitch';\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, useAttrs, useSlots } from 'vue';\n\n export interface CheckboxProps {\n /**\n * Whether the checkbox is currently checked based on the current value.\n * Either defined by a boolean, or whether `checked` as an array includes `value`.\n */\n checked: boolean | Array<string | number>;\n\n /**\n * Whether the checkbox is in an error state (optional). For error styling without error text.\n */\n hasError?: boolean;\n\n /**\n * Unique ID for the checkbox, required for accessibility purposes\n */\n id?: string;\n\n /**\n * Label text to display with checkbox\n */\n label?: string;\n\n /**\n * Error text to display. Replaces `hintText` (if provided) and adds error styling (overrides `hasError`).\n */\n errorText?: string;\n\n /**\n * Displays text below the input; hidden when the isReadOnly prop is truthy.\n */\n hintText?: string;\n\n /**\n * @deprecated use the `checked` prop instead\n */\n modelValue?: boolean | Array<string | number>;\n\n /**\n * The value of the checkbox.\n */\n value?: string | number;\n\n /**\n * Whether the checkbox is disabled.\n */\n disabled?: boolean;\n }\n\n defineOptions({\n name: 'll-checkbox',\n inheritAttrs: false,\n });\n\n const props = withDefaults(defineProps<CheckboxProps>(), {\n checked: false,\n errorId: undefined,\n errorText: '',\n hasError: false,\n hintText: '',\n id: undefined,\n label: undefined,\n modelValue: undefined,\n value: undefined,\n disabled: false,\n });\n\n const attrs = useAttrs();\n const slots = useSlots();\n\n const emit =\n defineEmits<{\n (e: 'update:checked', value: CheckboxProps['checked']): void;\n }>();\n\n if (props.modelValue !== undefined) {\n throw new Error('ll-checkbox: use :checked or v-model:checked instead of :model-value and v-model.');\n }\n\n if (typeof props.value === 'boolean') {\n logger.warn('ll-checkbox: use `checked` to toggle the state; `value` is what will be set if `checked` is true');\n }\n\n if (attrs.onChange) {\n throw new Error('ll-checkbox: use the @update:checked event instead of @change.');\n }\n\n const inputAttrs = computed(() => {\n const tempAttrs = { ...attrs };\n\n delete tempAttrs['data-test'];\n delete tempAttrs.class;\n\n return tempAttrs;\n });\n\n const internalValue = computed({\n get() {\n return props.checked;\n },\n set(value) {\n emit('update:checked', value);\n },\n });\n\n const internalHasError = computed(() => !!props.errorText || props.hasError);\n const checkboxId = computed(() => props.id || uniqueId('checkbox-'));\n const checkboxErrorId = computed(() => (props.errorText ? uniqueId('checkbox-error-') : undefined));\n</script>\n\n<template>\n <div\n class=\"stash-checkbox tw-relative tw-m-0\"\n :data-test=\"attrs['data-test'] || 'stash-checkbox'\"\n :class=\"[{ 'has-error': internalHasError }, attrs.class]\"\n >\n <input\n :id=\"checkboxId\"\n v-model=\"internalValue\"\n :aria-invalid=\"!!props.errorText\"\n :aria-errormessage=\"checkboxErrorId\"\n :disabled=\"props.disabled\"\n class=\"tw-sr-only lg:tw-m-0\"\n type=\"checkbox\"\n :value=\"value\"\n v-bind=\"inputAttrs\"\n />\n\n <label\n data-test=\"stash-checkbox|label\"\n class=\"\n tw-relative\n tw-inline-block\n tw-min-h-9\n tw-cursor-pointer\n tw-overflow-visible\n tw-py-1.5\n tw-pl-8\n tw-align-top\n tw-text-sm\n tw-font-normal\n tw-leading-6\n \"\n :class=\"{\n 'tw-text-ice-900': !internalHasError && !props.disabled,\n 'tw-text-red-500': internalHasError,\n 'tw-text-ice-500': props.disabled,\n }\"\n :for=\"checkboxId\"\n >\n <slot>\n <span>{{ label }}</span>\n </slot>\n </label>\n\n <span\n v-if=\"props.errorText\"\n :id=\"checkboxErrorId\"\n class=\"tw-ml-8 tw-block tw-whitespace-pre-line tw-text-xs tw-text-red-500\"\n data-test=\"stash-checkbox|error\"\n >\n {{ props.errorText }}\n </span>\n <span\n v-else-if=\"props.hintText || slots.hint\"\n class=\"tw-ml-8 tw-block tw-whitespace-pre-line tw-text-xs\"\n :class=\"{ 'tw-text-ice-500': props.disabled }\"\n data-test=\"stash-checkbox|hint\"\n >\n <!-- @slot for displaying hint text -->\n <slot name=\"hint\">{{ props.hintText }}</slot>\n </span>\n </div>\n</template>\n\n<style scoped>\n input:disabled + label {\n cursor: auto;\n }\n\n label::before {\n content: '';\n border: 1px solid var(--color-ice-500);\n display: inline-block;\n vertical-align: top;\n }\n\n label::before,\n label::after {\n border-radius: theme('borderRadius.DEFAULT');\n height: 20px;\n left: 0;\n position: absolute;\n top: theme('spacing[1.5]');\n width: 20px;\n }\n\n .has-error label::before,\n .has-error input {\n border-color: var(--color-red-500);\n }\n\n input:indeterminate + label::after {\n content: url('data:image/svg+xml; utf8, <svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6 10.4C6 10.1791 6.17909 10 6.4 10H17.6C17.8209 10 18 10.1791 18 10.4V12.6C18 12.8209 17.8209 13 17.6 13H6.4C6.17909 13 6 12.8209 6 12.6V10.4Z\" fill=\"white\"/></svg>');\n }\n\n input:checked + label::after {\n content: url('data:image/svg+xml; utf8, <svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M17.89 8.281a.723.723 0 0 1 .22.531.723.723 0 0 1-.22.532l-6.718 6.719a.723.723 0 0 1-.531.218.723.723 0 0 1-.532-.218l-3.89-3.891A.723.723 0 0 1 6 11.64c0-.209.073-.386.219-.532l1.062-1.062a.723.723 0 0 1 .532-.219.72.72 0 0 1 .53.219l2.298 2.305 5.125-5.133a.723.723 0 0 1 .53-.219c.21 0 .386.073.532.219l1.063 1.062z\" fill=\"white\"/></svg>');\n background: var(--color-blue-500);\n height: 20px;\n width: 20px;\n top: theme('spacing[1.5]');\n }\n\n input:checked + label::before,\n input:indeterminate + label::before {\n background: var(--color-blue-500);\n border-color: var(--color-blue-500);\n }\n\n input:disabled + label::before,\n input:disabled + label::after {\n background: var(--color-ice-100);\n border: 1px solid var(--color-ice-500);\n }\n\n input:disabled:is(:checked, :indeterminate) + label::after {\n background: var(--color-ice-500);\n }\n\n input:not(:disabled, :checked, :indeterminate) + label:hover::before {\n border-color: var(--color-blue-500);\n }\n</style>\n"],"names":["attrs","useAttrs","slots","useSlots","props","logger","inputAttrs","computed","tempAttrs","internalValue","value","emit","internalHasError","checkboxId","uniqueId","checkboxErrorId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;iBAuEQA,IAAQC,KACRC,IAAQC;AAOV,QAAAC,EAAM,eAAe;AACjB,YAAA,IAAI,MAAM,mFAAmF;AAOrG,QAJI,OAAOA,EAAM,SAAU,aACzBC,EAAO,KAAK,kGAAkG,GAG5GL,EAAM;AACF,YAAA,IAAI,MAAM,gEAAgE;AAG5E,UAAAM,IAAaC,EAAS,MAAM;AAC1B,YAAAC,IAAY,EAAE,GAAGR;AAEvB,oBAAOQ,EAAU,WAAW,GAC5B,OAAOA,EAAU,OAEVA;AAAA,IAAA,CACR,GAEKC,IAAgBF,EAAS;AAAA,MAC7B,MAAM;AACJ,eAAOH,EAAM;AAAA,MACf;AAAA,MACA,IAAIM,GAAO;AACT,QAAAC,EAAK,kBAAkBD,CAAK;AAAA,MAC9B;AAAA,IAAA,CACD,GAEKE,IAAmBL,EAAS,MAAM,CAAC,CAACH,EAAM,aAAaA,EAAM,QAAQ,GACrES,IAAaN,EAAS,MAAMH,EAAM,MAAMU,EAAS,WAAW,CAAC,GAC7DC,IAAkBR,EAAS,MAAOH,EAAM,YAAYU,EAAS,iBAAiB,IAAI,MAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Checkbox.js","sources":["../src/components/Checkbox/Checkbox.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import logger from '@leaflink/snitch';\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, useAttrs, useCssModule, useSlots } from 'vue';\n\n export interface CheckboxProps {\n /**\n * Whether the checkbox is currently checked based on the current value.\n * Either defined by a boolean, or whether `checked` as an array includes `value`.\n */\n checked: boolean | Array<string | number>;\n\n /**\n * Whether the checkbox is in an error state (optional). For error styling without error text.\n *\n * @deprecated Just pass `error-text` instead.\n */\n hasError?: boolean;\n\n /**\n * Unique ID for the checkbox, required for accessibility purposes\n */\n id?: string;\n\n /**\n * Label text to display with checkbox\n */\n label?: string;\n\n /**\n * Error text to display. Replaces `hintText` (if provided) and adds error styling (overrides `hasError`).\n */\n errorText?: string;\n\n /**\n * Displays text below the input; hidden when the isReadOnly prop is truthy.\n */\n hintText?: string;\n\n /**\n * @deprecated use the `checked` prop instead\n */\n modelValue?: boolean | Array<string | number>;\n\n /**\n * The value of the checkbox.\n */\n value?: string | number;\n\n /**\n * Whether the checkbox is disabled.\n */\n disabled?: boolean;\n }\n\n defineOptions({\n name: 'll-checkbox',\n inheritAttrs: false,\n });\n\n const props = withDefaults(defineProps<CheckboxProps>(), {\n checked: false,\n errorId: undefined,\n errorText: '',\n hasError: false,\n hintText: '',\n id: undefined,\n label: undefined,\n modelValue: undefined,\n value: undefined,\n disabled: false,\n });\n\n const attrs = useAttrs();\n const slots = useSlots();\n const classes = useCssModule();\n\n const emit =\n defineEmits<{\n (e: 'update:checked', value: CheckboxProps['checked']): void;\n }>();\n\n if (props.modelValue !== undefined) {\n throw new Error('ll-checkbox: use :checked or v-model:checked instead of :model-value and v-model.');\n }\n\n if (typeof props.value === 'boolean') {\n logger.warn('ll-checkbox: use `checked` to toggle the state; `value` is what will be set if `checked` is true');\n }\n\n if (attrs.onChange) {\n throw new Error('ll-checkbox: use the @update:checked event instead of @change.');\n }\n\n const inputAttrs = computed(() => {\n const tempAttrs = { ...attrs };\n\n delete tempAttrs['data-test'];\n delete tempAttrs.class;\n\n return tempAttrs;\n });\n\n const internalValue = computed({\n get() {\n return props.checked;\n },\n set(value) {\n emit('update:checked', value);\n },\n });\n\n const internalHasError = computed(() => !!props.errorText || props.hasError);\n const checkboxId = computed(() => props.id || uniqueId('checkbox-'));\n const checkboxErrorId = computed(() => (props.errorText ? uniqueId('checkbox-error-') : undefined));\n</script>\n\n<template>\n <div\n class=\"stash-checkbox tw-relative tw-m-0\"\n :class=\"[\n attrs.class,\n {\n 'stash-checkbox--checked': !!internalValue,\n [`stash-checkbox--has-error ${classes['has-error']}`]: internalHasError,\n },\n ]\"\n :data-test=\"attrs['data-test'] || 'stash-checkbox'\"\n >\n <input\n :id=\"checkboxId\"\n v-model=\"internalValue\"\n :aria-invalid=\"!!props.errorText\"\n :aria-errormessage=\"checkboxErrorId\"\n :disabled=\"props.disabled\"\n class=\"tw-sr-only lg:tw-m-0\"\n :class=\"classes.input\"\n type=\"checkbox\"\n :value=\"value\"\n v-bind=\"inputAttrs\"\n />\n\n <label\n data-test=\"stash-checkbox|label\"\n class=\"\n stash-checkbox__label\n tw-relative\n tw-inline-block\n tw-min-h-9\n tw-cursor-pointer\n tw-overflow-visible\n tw-py-1.5\n tw-pl-8\n tw-align-top\n tw-text-sm\n tw-font-normal\n tw-leading-6\n \"\n :class=\"[\n classes.label,\n {\n 'tw-text-ice-900': !internalHasError && !props.disabled,\n 'tw-text-red-500': internalHasError,\n 'tw-text-ice-500': props.disabled,\n },\n ]\"\n :for=\"checkboxId\"\n >\n <slot>\n {{ label }}\n </slot>\n </label>\n\n <span\n v-if=\"props.errorText\"\n :id=\"checkboxErrorId\"\n class=\"stash-checkbox__error-text tw-ml-8 tw-block tw-whitespace-pre-line tw-text-xs tw-text-red-500\"\n data-test=\"stash-checkbox|error\"\n >\n {{ props.errorText }}\n </span>\n <span\n v-else-if=\"props.hintText || slots.hint\"\n class=\"stash-checkbox__hint-text tw-ml-8 tw-block tw-whitespace-pre-line tw-text-xs\"\n :class=\"{ 'tw-text-ice-500': props.disabled }\"\n data-test=\"stash-checkbox|hint\"\n >\n <!-- @slot for displaying hint text -->\n <slot name=\"hint\">{{ props.hintText }}</slot>\n </span>\n </div>\n</template>\n\n<style module>\n .input:disabled + .label {\n cursor: auto;\n }\n\n .label::before {\n content: '';\n border: 1px solid var(--color-ice-500);\n display: inline-block;\n vertical-align: top;\n }\n\n .label::before,\n .label::after {\n border-radius: theme('borderRadius.DEFAULT');\n height: 20px;\n left: 0;\n position: absolute;\n top: theme('spacing[1.5]');\n width: 20px;\n }\n\n .has-error .label::before,\n .has-error .input {\n border-color: var(--color-red-500);\n }\n\n .input:indeterminate + .label::after {\n content: url('data:image/svg+xml; utf8, <svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6 10.4C6 10.1791 6.17909 10 6.4 10H17.6C17.8209 10 18 10.1791 18 10.4V12.6C18 12.8209 17.8209 13 17.6 13H6.4C6.17909 13 6 12.8209 6 12.6V10.4Z\" fill=\"white\"/></svg>');\n }\n\n .input:checked + .label::after {\n content: url('data:image/svg+xml; utf8, <svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M17.89 8.281a.723.723 0 0 1 .22.531.723.723 0 0 1-.22.532l-6.718 6.719a.723.723 0 0 1-.531.218.723.723 0 0 1-.532-.218l-3.89-3.891A.723.723 0 0 1 6 11.64c0-.209.073-.386.219-.532l1.062-1.062a.723.723 0 0 1 .532-.219.72.72 0 0 1 .53.219l2.298 2.305 5.125-5.133a.723.723 0 0 1 .53-.219c.21 0 .386.073.532.219l1.063 1.062z\" fill=\"white\"/></svg>');\n background: var(--color-blue-500);\n height: 20px;\n width: 20px;\n top: theme('spacing[1.5]');\n }\n\n .input:checked + .label::before,\n .input:indeterminate + .label::before {\n background: var(--color-blue-500);\n border-color: var(--color-blue-500);\n }\n\n .input:disabled + .label::before,\n .input:disabled + .label::after {\n background: var(--color-ice-100);\n border: 1px solid var(--color-ice-500);\n }\n\n .input:disabled:is(:checked, :indeterminate) + .label::after {\n background: var(--color-ice-500);\n }\n\n .input:not(:disabled, :checked, :indeterminate) + .label:hover::before {\n border-color: var(--color-blue-500);\n }\n</style>\n"],"names":["attrs","useAttrs","slots","useSlots","classes","useCssModule","props","logger","inputAttrs","computed","tempAttrs","internalValue","value","emit","internalHasError","checkboxId","uniqueId","checkboxErrorId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;iBAyEQA,IAAQC,KACRC,IAAQC,KACRC,IAAUC;AAOZ,QAAAC,EAAM,eAAe;AACjB,YAAA,IAAI,MAAM,mFAAmF;AAOrG,QAJI,OAAOA,EAAM,SAAU,aACzBC,EAAO,KAAK,kGAAkG,GAG5GP,EAAM;AACF,YAAA,IAAI,MAAM,gEAAgE;AAG5E,UAAAQ,IAAaC,EAAS,MAAM;AAC1B,YAAAC,IAAY,EAAE,GAAGV;AAEvB,oBAAOU,EAAU,WAAW,GAC5B,OAAOA,EAAU,OAEVA;AAAA,IAAA,CACR,GAEKC,IAAgBF,EAAS;AAAA,MAC7B,MAAM;AACJ,eAAOH,EAAM;AAAA,MACf;AAAA,MACA,IAAIM,GAAO;AACT,QAAAC,EAAK,kBAAkBD,CAAK;AAAA,MAC9B;AAAA,IAAA,CACD,GAEKE,IAAmBL,EAAS,MAAM,CAAC,CAACH,EAAM,aAAaA,EAAM,QAAQ,GACrES,IAAaN,EAAS,MAAMH,EAAM,MAAMU,EAAS,WAAW,CAAC,GAC7DC,IAAkBR,EAAS,MAAOH,EAAM,YAAYU,EAAS,iBAAiB,IAAI,MAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -41,6 +41,8 @@ export declare interface CheckboxProps {
41
41
  checked: boolean | Array<string | number>;
42
42
  /**
43
43
  * Whether the checkbox is in an error state (optional). For error styling without error text.
44
+ *
45
+ * @deprecated Just pass `error-text` instead.
44
46
  */
45
47
  hasError?: boolean;
46
48
  /**
@@ -0,0 +1,9 @@
1
+ const o = "_input_bhz1o_2", _ = "_label_bhz1o_2", s = {
2
+ input: o,
3
+ label: _,
4
+ "has-error": "_has-error_bhz1o_23"
5
+ };
6
+ export {
7
+ s
8
+ };
9
+ //# sourceMappingURL=Checkbox.vue_used_vue_type_style_index_0_lang.module-fa8d9c06.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkbox.vue_used_vue_type_style_index_0_lang.module-fa8d9c06.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { _ as o } from "./ChevronToggle.vue_vue_type_script_setup_true_lang-1591294c.js";
2
2
  import "vue";
3
3
  import "./Button.js";
4
- import "./Button.vue_used_vue_type_style_index_0_lang.module-b2ee90e6.js";
4
+ import "./Button.vue_used_vue_type_style_index_0_lang.module-63d31dc0.js";
5
5
  import "./_plugin-vue_export-helper-dad06003.js";
6
6
  import "./Icon.js";
7
7
  import "lodash-es/uniqueId";
package/dist/Copy.js CHANGED
@@ -12,7 +12,7 @@ import "lodash-es/camelCase";
12
12
  import "lodash-es/get";
13
13
  import "lodash-es/isFinite";
14
14
  import "lodash-es/isPlainObject";
15
- import "./Button.vue_used_vue_type_style_index_0_lang.module-b2ee90e6.js";
15
+ import "./Button.vue_used_vue_type_style_index_0_lang.module-63d31dc0.js";
16
16
  import "lodash-es/uniqueId";
17
17
  import "./index-79ce320f.js";
18
18
  import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
@@ -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-4483019d.js";
9
+ import "./Field.vue_vue_type_script_setup_true_lang-42ba3c5a.js";
10
10
  import "lodash-es/uniqueId";
11
- import "./Label.vue_vue_type_script_setup_true_lang-2de35913.js";
11
+ import "./Label.vue_vue_type_script_setup_true_lang-4b02087f.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/DataView.js CHANGED
@@ -8,7 +8,7 @@ import "./Icon.js";
8
8
  import "lodash-es/uniqueId";
9
9
  import "./index-79ce320f.js";
10
10
  import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
11
- import "./Paginate.vue_used_vue_type_style_index_0_lang.module-1a2084f9.js";
11
+ import "./Paginate.vue_used_vue_type_style_index_0_lang.module-18343da7.js";
12
12
  function _(e) {
13
13
  const n = e[0] === "-" ? "desc" : "asc";
14
14
  return { id: n === "asc" ? e : e.slice(1), order: n };
@@ -6,16 +6,16 @@ import { _ as Z } from "./Box.vue_vue_type_script_setup_true_lang-69e5176b.js";
6
6
  import A from "./Button.js";
7
7
  import T from "lodash-es/cloneDeep";
8
8
  import $ from "./Icon.js";
9
- import "./Paginate.vue_used_vue_type_style_index_0_lang.module-1a2084f9.js";
9
+ import "./Paginate.vue_used_vue_type_style_index_0_lang.module-18343da7.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-2de35913.js";
12
+ import { _ as H } from "./Label.vue_vue_type_script_setup_true_lang-4b02087f.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";
16
16
  import { i as L } from "./isDefined-2ce6cde4.js";
17
17
  import "lodash-es/get";
18
- import "./Button.vue_used_vue_type_style_index_0_lang.module-b2ee90e6.js";
18
+ import "./Button.vue_used_vue_type_style_index_0_lang.module-63d31dc0.js";
19
19
  import "./_plugin-vue_export-helper-dad06003.js";
20
20
  import "lodash-es/uniqueId";
21
21
  import "./index-79ce320f.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-4483019d.js";
29
+ import "./Field.vue_vue_type_script_setup_true_lang-42ba3c5a.js";
30
30
  function Pe({
31
31
  schema: a,
32
32
  dataViewRef: w
@@ -1,15 +1,15 @@
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
- import { t as S } from "./locale.js";
1
+ import { defineComponent as y, useCssModule as D, inject as S, openBlock as r, createBlock as d, withCtx as o, createVNode as i, createTextVNode as n, toDisplayString as l, unref as t, createElementVNode as c, createElementBlock as f, Fragment as k, renderList as V, normalizeClass as b, createCommentVNode as m } from "vue";
2
+ import { t as B } from "./locale.js";
3
3
  import u from "./Button.js";
4
4
  import "lodash-es/cloneDeep";
5
- import k from "./Icon.js";
6
- import "./Paginate.vue_used_vue_type_style_index_0_lang.module-1a2084f9.js";
7
- import { D as h } from "./DataView.vue_used_vue_type_style_index_0_lang.module-d878ca9a.js";
8
- import V from "./Dropdown.js";
9
- import v from "./IconLabel.js";
10
- import { _ as B } from "./_plugin-vue_export-helper-dad06003.js";
5
+ import h from "./Icon.js";
6
+ import "./Paginate.vue_used_vue_type_style_index_0_lang.module-18343da7.js";
7
+ import { D as C } from "./DataView.vue_used_vue_type_style_index_0_lang.module-d878ca9a.js";
8
+ import E from "./Dropdown.js";
9
+ import I from "./IconLabel.js";
10
+ import { _ as N } from "./_plugin-vue_export-helper-dad06003.js";
11
11
  import "lodash-es/get";
12
- import "./Button.vue_used_vue_type_style_index_0_lang.module-b2ee90e6.js";
12
+ import "./Button.vue_used_vue_type_style_index_0_lang.module-63d31dc0.js";
13
13
  import "lodash-es/uniqueId";
14
14
  import "./index-79ce320f.js";
15
15
  import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
@@ -20,40 +20,40 @@ import "./utils/helpers.js";
20
20
  import "lodash-es/camelCase";
21
21
  import "lodash-es/isFinite";
22
22
  import "lodash-es/isPlainObject";
23
- const I = {
23
+ const v = {
24
24
  class: "dropdown__list",
25
25
  "data-test": "stash-data-view-sort-button|sort-menu"
26
- }, E = ["onClick"], N = ["onClick"], A = /* @__PURE__ */ g({
26
+ }, A = ["onClick"], M = ["onClick"], T = /* @__PURE__ */ y({
27
27
  __name: "DataViewSortButton",
28
28
  props: {
29
29
  sortOptions: { default: () => [] }
30
30
  },
31
31
  setup(x) {
32
- const _ = x, { currentSortId: a, currentSortOrder: s, updateCurrentSort: p } = y(
33
- h.key,
34
- h.defaults
32
+ const _ = x, p = D(), { currentSortId: s, currentSortOrder: a, updateCurrentSort: w } = S(
33
+ C.key,
34
+ C.defaults
35
35
  );
36
- return (T, L) => _.sortOptions.length ? (r(), n(V, {
36
+ return (q, F) => _.sortOptions.length ? (r(), d(E, {
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: C }) => [
42
+ toggle: o(({ isActive: e, toggle: g }) => [
43
43
  i(u, {
44
44
  "icon-label": "",
45
- "aria-expanded": t.toString(),
45
+ "aria-expanded": e.toString(),
46
46
  class: "tw-text-blue-500",
47
47
  "data-test": "stash-data-view-sort-button|sort-menu-button",
48
- onClick: C
48
+ onClick: g
49
49
  }, {
50
50
  default: o(() => [
51
- i(v, {
51
+ i(I, {
52
52
  icon: "sort",
53
53
  stacked: ""
54
54
  }, {
55
55
  default: o(() => [
56
- l(c(e(S)("ll.sort")), 1)
56
+ n(l(t(B)("ll.sort")), 1)
57
57
  ]),
58
58
  _: 1
59
59
  })
@@ -62,21 +62,24 @@ const I = {
62
62
  }, 1032, ["aria-expanded", "onClick"])
63
63
  ]),
64
64
  default: o(() => [
65
- d("ul", I, [
66
- (r(!0), w(f, null, D(_.sortOptions, (t) => (r(), w(f, {
67
- key: t.id
65
+ c("ul", v, [
66
+ (r(!0), f(k, null, V(_.sortOptions, (e) => (r(), f(k, {
67
+ key: e.id
68
68
  }, [
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
- onClick: () => e(p)(t.id, { sortOrder: "asc", shouldEmit: !0 })
69
+ c("li", {
70
+ class: b(["dropdown__item tw-rounded", [
71
+ t(p).dropdown__item,
72
+ { "tw-bg-blue-100 tw-text-ice-700": e.id === t(s) && t(a) === "asc" }
73
+ ]]),
74
+ onClick: () => t(w)(e.id, { sortOrder: "asc", shouldEmit: !0 })
72
75
  }, [
73
76
  i(u, {
74
77
  inline: "",
75
78
  class: "tw-h-9"
76
79
  }, {
77
80
  default: o(() => [
78
- l(c(t.labelAsc) + " ", 1),
79
- t.id === e(a) && e(s) === "asc" ? (r(), n(k, {
81
+ n(l(e.labelAsc) + " ", 1),
82
+ e.id === t(s) && t(a) === "asc" ? (r(), d(h, {
80
83
  key: 0,
81
84
  name: "check",
82
85
  class: "tw-ml-auto tw-text-blue-500"
@@ -84,18 +87,21 @@ const I = {
84
87
  ]),
85
88
  _: 2
86
89
  }, 1024)
87
- ], 10, E),
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
- onClick: () => e(p)(t.id, { sortOrder: "desc", shouldEmit: !0 })
90
+ ], 10, A),
91
+ c("li", {
92
+ class: b(["dropdown__item tw-rounded", [
93
+ t(p).dropdown__item,
94
+ { "tw-bg-blue-100 tw-text-ice-700": e.id === t(s) && t(a) === "desc" }
95
+ ]]),
96
+ onClick: () => t(w)(e.id, { sortOrder: "desc", shouldEmit: !0 })
91
97
  }, [
92
98
  i(u, {
93
99
  inline: "",
94
100
  class: "tw-h-9"
95
101
  }, {
96
102
  default: o(() => [
97
- l(c(t.labelDesc) + " ", 1),
98
- t.id === e(a) && e(s) === "desc" ? (r(), n(k, {
103
+ n(l(e.labelDesc) + " ", 1),
104
+ e.id === t(s) && t(a) === "desc" ? (r(), d(h, {
99
105
  key: 0,
100
106
  name: "check",
101
107
  class: "tw-ml-auto tw-text-blue-500"
@@ -103,16 +109,19 @@ const I = {
103
109
  ]),
104
110
  _: 2
105
111
  }, 1024)
106
- ], 10, N)
112
+ ], 10, M)
107
113
  ], 64))), 128))
108
114
  ])
109
115
  ]),
110
116
  _: 1
111
117
  })) : m("", !0);
112
118
  }
113
- });
114
- const rt = /* @__PURE__ */ B(A, [["__scopeId", "data-v-8b825319"]]);
119
+ }), z = "_dropdown__item_ozq17_2", L = {
120
+ dropdown__item: z
121
+ }, j = {
122
+ $style: L
123
+ }, nt = /* @__PURE__ */ N(T, [["__cssModules", j]]);
115
124
  export {
116
- rt as default
125
+ nt as default
117
126
  };
118
127
  //# sourceMappingURL=DataViewSortButton.js.map
@@ -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=\"{ '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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"DataViewSortButton.js","sources":["../src/components/DataViewSortButton/DataViewSortButton.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { inject, useCssModule } 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 const classes = useCssModule();\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=\"[\n classes.dropdown__item,\n { 'tw-bg-blue-100 tw-text-ice-700': sortOption.id === currentSortId && currentSortOrder === 'asc' },\n ]\"\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=\"[\n classes.dropdown__item,\n { 'tw-bg-blue-100 tw-text-ice-700': sortOption.id === currentSortId && currentSortOrder === 'desc' },\n ]\"\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 module>\n .dropdown__item > button {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n</style>\n"],"names":["classes","useCssModule","currentSortId","currentSortOrder","updateCurrentSort","inject","DATA_VIEW_INJECTION"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqBQA,IAAUC,KAEV,EAAE,eAAAC,GAAe,kBAAAC,GAAkB,mBAAAC,EAAsB,IAAAC;AAAA,MAC7DC,EAAoB;AAAA,MACpBA,EAAoB;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -3,11 +3,11 @@ import { t as z } from "./locale.js";
3
3
  import h from "./Button.js";
4
4
  import "lodash-es/cloneDeep";
5
5
  import x from "./Icon.js";
6
- import "./Paginate.vue_used_vue_type_style_index_0_lang.module-1a2084f9.js";
6
+ import "./Paginate.vue_used_vue_type_style_index_0_lang.module-18343da7.js";
7
7
  import { D as y } from "./DataView.vue_used_vue_type_style_index_0_lang.module-d878ca9a.js";
8
8
  import { _ as j } from "./_plugin-vue_export-helper-dad06003.js";
9
9
  import "lodash-es/get";
10
- import "./Button.vue_used_vue_type_style_index_0_lang.module-b2ee90e6.js";
10
+ import "./Button.vue_used_vue_type_style_index_0_lang.module-63d31dc0.js";
11
11
  import "lodash-es/uniqueId";
12
12
  import "./index-79ce320f.js";
13
13
  import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
@@ -15,13 +15,13 @@ import { _ as Bf } from "./_plugin-vue_export-helper-dad06003.js";
15
15
  import "lodash-es/get";
16
16
  import "./toTimeZone-e6e9ab75.js";
17
17
  import "./_commonjsHelpers-10dfc225.js";
18
- import "./Button.vue_used_vue_type_style_index_0_lang.module-b2ee90e6.js";
18
+ import "./Button.vue_used_vue_type_style_index_0_lang.module-63d31dc0.js";
19
19
  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-4483019d.js";
24
- import "./Label.vue_vue_type_script_setup_true_lang-2de35913.js";
23
+ import "./Field.vue_vue_type_script_setup_true_lang-42ba3c5a.js";
24
+ import "./Label.vue_vue_type_script_setup_true_lang-4b02087f.js";
25
25
  function Uf(e, t) {
26
26
  he(2, arguments);
27
27
  var r = ge(e).getTime(), n = je(t);
@@ -11625,12 +11625,12 @@ const cY = /* @__PURE__ */ bt(sY, [["render", lY]]), fY = ["id"], dY = { class:
11625
11625
  }, 8, ["available-dates", "disabled-dates", "max-date", "min-date", "max-page", "min-page", "mode", "model-value", "popover", "hide-time-header"])
11626
11626
  ], 2));
11627
11627
  }
11628
- }), pY = "_input_1p4vg_294", yY = {
11629
- "vc-overrides": "_vc-overrides_1p4vg_176",
11630
- "close-button": "_close-button_1p4vg_271",
11631
- "button-today": "_button-today_1p4vg_277",
11628
+ }), pY = "_input_1w1jz_144", yY = {
11629
+ "vc-overrides": "_vc-overrides_1w1jz_2",
11630
+ "close-button": "_close-button_1w1jz_117",
11631
+ "button-today": "_button-today_1w1jz_123",
11632
11632
  input: pY,
11633
- "calendar-icon": "_calendar-icon_1p4vg_300"
11633
+ "calendar-icon": "_calendar-icon_1w1jz_150"
11634
11634
  }, hY = {
11635
11635
  $style: yY
11636
11636
  }, FY = /* @__PURE__ */ Bf(vY, [["__cssModules", hY]]);