@leaflink/stash 48.19.0 → 48.20.1

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 (73) hide show
  1. package/dist/ActionsDropdown.js +4 -4
  2. package/dist/AddressSelect.js +1 -1
  3. package/dist/Button.js +35 -20
  4. package/dist/Button.js.map +1 -1
  5. package/dist/Button.vue.d.ts +7 -0
  6. package/dist/Button.vue_used_vue_type_style_index_0_lang.module-4dabc2a9.js +17 -0
  7. package/dist/Button.vue_used_vue_type_style_index_0_lang.module-4dabc2a9.js.map +1 -0
  8. package/dist/Carousel.js +238 -231
  9. package/dist/Carousel.js.map +1 -1
  10. package/dist/ChevronToggle.js +2 -2
  11. package/dist/Copy.js +1 -1
  12. package/dist/DataViewFilters.js +1 -1
  13. package/dist/DataViewSortButton.js +1 -1
  14. package/dist/DataViewToolbar.js +3 -3
  15. package/dist/DatePicker.js +4767 -7898
  16. package/dist/DatePicker.js.map +1 -1
  17. package/dist/Dialog.js +1 -1
  18. package/dist/FileUpload.js +1 -1
  19. package/dist/FilterDropdown.js +3 -3
  20. package/dist/Filters.js +10 -10
  21. package/dist/Filters.vue.d.ts +19 -0
  22. package/dist/HttpError.js +16 -14
  23. package/dist/HttpError.js.map +1 -1
  24. package/dist/InputOptions.js +1 -1
  25. package/dist/ListView.js +8 -8
  26. package/dist/ListView.vue.d.ts +95 -0
  27. package/dist/Modal.js +1 -1
  28. package/dist/ObfuscateText.js +1 -1
  29. package/dist/SearchBar.js +1 -1
  30. package/dist/SearchBar.vue.d.ts +1 -1
  31. package/dist/Select.js +1 -1
  32. package/dist/SelectStatus.js +1 -1
  33. package/dist/Stepper.js +1 -1
  34. package/dist/Table.js +1 -1
  35. package/dist/Table.vue.d.ts +1 -1
  36. package/dist/TableCell.js +1 -1
  37. package/dist/TableHeaderCell.js +1 -1
  38. package/dist/TableHeaderRow.js +1 -1
  39. package/dist/TableRow.js +1 -1
  40. package/dist/TextEditor.js +3 -3
  41. package/dist/components.css +1 -1
  42. package/dist/formatDateTime-a5e70901.js +1336 -0
  43. package/dist/formatDateTime-a5e70901.js.map +1 -0
  44. package/dist/index.js +84 -83
  45. package/dist/index.js.map +1 -1
  46. package/dist/isValid-4b2b7a54.js +18 -0
  47. package/dist/isValid-4b2b7a54.js.map +1 -0
  48. package/dist/parseISO-ed4094c1.js +133 -0
  49. package/dist/parseISO-ed4094c1.js.map +1 -0
  50. package/dist/searchFuzzy-9b74ec4e.js +446 -0
  51. package/dist/searchFuzzy-9b74ec4e.js.map +1 -0
  52. package/dist/toTimeZone-a2ed6470.js +328 -0
  53. package/dist/toTimeZone-a2ed6470.js.map +1 -0
  54. package/dist/useSearch.js +1 -1
  55. package/dist/useValidation.js.map +1 -1
  56. package/dist/utils/createValidDate.js +2 -2
  57. package/dist/utils/formatDateTime.js +7 -1730
  58. package/dist/utils/formatDateTime.js.map +1 -1
  59. package/dist/utils/normalizeDate.js +1 -1
  60. package/dist/utils/searchFuzzy.js +1 -1
  61. package/dist/utils/toTimeZone.js +3 -4
  62. package/dist/utils/toTimeZone.js.map +1 -1
  63. package/package.json +29 -29
  64. package/dist/Button.vue_used_vue_type_style_index_0_lang.module-a9290468.js +0 -17
  65. package/dist/Button.vue_used_vue_type_style_index_0_lang.module-a9290468.js.map +0 -1
  66. package/dist/index-5e5945a9.js +0 -134
  67. package/dist/index-5e5945a9.js.map +0 -1
  68. package/dist/index-fe8d3765.js +0 -36
  69. package/dist/index-fe8d3765.js.map +0 -1
  70. package/dist/searchFuzzy-74a7de1c.js +0 -326
  71. package/dist/searchFuzzy-74a7de1c.js.map +0 -1
  72. package/dist/toTimeZone-e6e9ab75.js +0 -351
  73. package/dist/toTimeZone-e6e9ab75.js.map +0 -1
@@ -5,7 +5,10 @@ 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";
8
- import "./Button.vue_used_vue_type_style_index_0_lang.module-a9290468.js";
8
+ import "./Button.vue_used_vue_type_style_index_0_lang.module-4dabc2a9.js";
9
+ import "lodash-es/uniqueId";
10
+ import "./index-9e1095ef.js";
11
+ import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
9
12
  import "./constants.js";
10
13
  import "./clickoutside.js";
11
14
  import "./utils/calculateElementOverflow.js";
@@ -13,9 +16,6 @@ import "./utils/helpers.js";
13
16
  import "lodash-es/camelCase";
14
17
  import "lodash-es/isFinite";
15
18
  import "lodash-es/isPlainObject";
16
- import "lodash-es/uniqueId";
17
- import "./index-9e1095ef.js";
18
- import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
19
19
  const y = /* @__PURE__ */ c({
20
20
  name: "ll-actions-dropdown",
21
21
  __name: "ActionsDropdown",
@@ -11,7 +11,7 @@ import "lodash-es/isEqual";
11
11
  import "lodash-es/isPlainObject";
12
12
  import "./useSearch.js";
13
13
  import "lodash-es/get";
14
- import "./searchFuzzy-74a7de1c.js";
14
+ import "./searchFuzzy-9b74ec4e.js";
15
15
  import "./_commonjsHelpers-10dfc225.js";
16
16
  import "./utils/helpers.js";
17
17
  import "lodash-es/camelCase";
package/dist/Button.js CHANGED
@@ -1,8 +1,12 @@
1
- import { defineComponent as f, useCssModule as i, computed as n, openBlock as d, createBlock as p, resolveDynamicComponent as m, mergeProps as b, unref as a, withCtx as y, renderSlot as _ } from "vue";
2
- import { s as h } from "./Button.vue_used_vue_type_style_index_0_lang.module-a9290468.js";
3
- import { _ as v } from "./_plugin-vue_export-helper-dad06003.js";
4
- var s = /* @__PURE__ */ ((e) => (e.Icon = "icon", e.IconLabel = "iconLabel", e.Secondary = "secondary", e.Tertiary = "tertiary", e.Inline = "inline", e.Primary = "primary", e))(s || {});
5
- const $ = /* @__PURE__ */ f({
1
+ import { defineComponent as p, useCssModule as m, useAttrs as b, computed as n, openBlock as l, createBlock as i, resolveDynamicComponent as y, mergeProps as h, unref as r, withCtx as _, renderSlot as v } from "vue";
2
+ import g from "./Icon.js";
3
+ import { s as L } from "./Button.vue_used_vue_type_style_index_0_lang.module-4dabc2a9.js";
4
+ import { _ as $ } from "./_plugin-vue_export-helper-dad06003.js";
5
+ import "lodash-es/uniqueId";
6
+ import "./index-9e1095ef.js";
7
+ import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
8
+ var u = /* @__PURE__ */ ((e) => (e.Icon = "icon", e.IconLabel = "iconLabel", e.Secondary = "secondary", e.Tertiary = "tertiary", e.Inline = "inline", e.Primary = "primary", e))(u || {});
9
+ const k = /* @__PURE__ */ p({
6
10
  name: "ll-button",
7
11
  __name: "Button",
8
12
  props: {
@@ -13,38 +17,49 @@ const $ = /* @__PURE__ */ f({
13
17
  inline: { type: Boolean, default: !1 },
14
18
  color: { default: void 0 },
15
19
  to: { default: void 0 },
16
- href: { default: "" }
20
+ href: { default: "" },
21
+ isLoading: { type: Boolean, default: !1 }
17
22
  },
18
23
  setup(e) {
19
- const t = e, r = i(), l = n(() => {
20
- for (const o of Object.values(s))
24
+ const t = e, a = m(), c = b(), s = n(() => {
25
+ for (const o of Object.values(u))
21
26
  if (t[o])
22
27
  return o;
23
28
  return "primary";
24
- }), u = n(() => t.to ? "router-link" : t.href ? "a" : "button"), c = n(() => t.to ? {
29
+ }), f = n(() => t.to ? "router-link" : t.href ? "a" : "button"), d = n(() => t.to ? {
25
30
  to: t.to
26
31
  } : t.href ? {
27
32
  href: t.href
28
33
  } : {});
29
- return (o, C) => (d(), p(m(u.value), b(c.value, {
34
+ return (o, C) => (l(), i(y(f.value), h({
35
+ disabled: t.isLoading || r(c).disabled
36
+ }, d.value, {
30
37
  class: ["stash-button", [
31
- a(r).button,
32
- `stash-button--${l.value}`,
33
- a(r)[`button--${l.value}`],
34
- { [`stash-button--${t.color}`]: t.color, [a(r)[`button--${t.color}`]]: t.color }
38
+ r(a).button,
39
+ `stash-button--${s.value}`,
40
+ r(a)[`button--${s.value}`],
41
+ {
42
+ [`stash-button--${t.color}`]: t.color,
43
+ [r(a)[`button--${t.color}`]]: t.color,
44
+ "stash-button--is-loading": t.isLoading
45
+ }
35
46
  ]],
36
47
  "data-test": "ll-button"
37
48
  }), {
38
- default: y(() => [
39
- _(o.$slots, "default")
49
+ default: _(() => [
50
+ t.isLoading ? (l(), i(g, {
51
+ key: 0,
52
+ name: "loading-empty",
53
+ class: "tw-animate-spin"
54
+ })) : v(o.$slots, "default", { key: 1 })
40
55
  ]),
41
56
  _: 3
42
- }, 16, ["class"]));
57
+ }, 16, ["disabled", "class"]));
43
58
  }
44
59
  }), B = {
45
- $style: h
46
- }, L = /* @__PURE__ */ v($, [["__cssModules", B]]);
60
+ $style: L
61
+ }, j = /* @__PURE__ */ $(k, [["__cssModules", B]]);
47
62
  export {
48
- L as default
63
+ j as default
49
64
  };
50
65
  //# sourceMappingURL=Button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sources":["../src/components/Button/Button.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { computed, useCssModule } from 'vue';\n import { RouteLocationRaw } from 'vue-router';\n\n defineOptions({\n name: 'll-button',\n });\n\n export interface ButtonProps {\n /**\n * Renders the secondary variant\n */\n secondary?: boolean;\n\n /**\n * Renders the button as a container for an Icon\n */\n icon?: boolean;\n\n /**\n * Renders the button as a container for an IconLabel\n */\n iconLabel?: boolean;\n\n /**\n * Renders the tertiary variant\n */\n tertiary?: boolean;\n\n /**\n * Renders the component inline\n */\n inline?: boolean;\n\n /**\n * Renders a color variant\n */\n color?: 'blue' | 'red';\n\n /**\n * The `to` prop for vue-router's `RouterLink` component. If defined, the button will render as a `<router-link />`.\n */\n to?: RouteLocationRaw;\n\n /**\n * Button link. If defined, the button will render as an `<a />` tag.\n */\n href?: string;\n }\n\n const props = withDefaults(defineProps<ButtonProps>(), {\n secondary: false,\n icon: false,\n iconLabel: false,\n tertiary: false,\n inline: false,\n color: undefined,\n href: '',\n to: undefined,\n });\n const classes = useCssModule();\n\n enum ButtonTypes {\n Icon = 'icon',\n IconLabel = 'iconLabel',\n Secondary = 'secondary',\n Tertiary = 'tertiary',\n Inline = 'inline',\n Primary = 'primary',\n }\n\n type ButtonType = `${ButtonTypes}`;\n\n const buttonType = computed<ButtonType>(() => {\n for (const type of Object.values(ButtonTypes)) {\n if (props[type]) {\n return type;\n }\n }\n\n return ButtonTypes.Primary;\n });\n\n const is = computed(() => {\n if (props.to) {\n return 'router-link';\n }\n\n if (props.href) {\n return 'a';\n }\n\n return 'button';\n });\n\n const buttonAttrs = computed(() => {\n if (props.to) {\n return {\n to: props.to,\n };\n }\n\n if (props.href) {\n return {\n href: props.href,\n };\n }\n\n return {};\n });\n</script>\n\n<template>\n <component\n :is=\"is\"\n v-bind=\"buttonAttrs\"\n class=\"stash-button\"\n :class=\"[\n classes.button,\n `stash-button--${buttonType}`,\n classes[`button--${buttonType}`],\n { [`stash-button--${props.color}`]: props.color, [classes[`button--${props.color}`]]: props.color },\n ]\"\n data-test=\"ll-button\"\n >\n <!-- @slot default -->\n <slot></slot>\n </component>\n</template>\n\n<style module>\n .button {\n border-radius: theme('borderRadius.DEFAULT');\n border-width: 1px;\n display: inline-block;\n font-size: 0.875rem;\n font-weight: theme('fontWeight.semibold');\n line-height: 2.125rem;\n margin: 0;\n min-width: 144px;\n padding: 0 theme('spacing.3');\n text-align: center;\n text-decoration: none;\n vertical-align: middle;\n white-space: nowrap;\n }\n\n @media screen('lg') {\n /* `focus` and `hover` should be added only for large screens */\n .button:focus {\n box-shadow: 0 0 0 3px rgb(0 123 255 / 14%);\n outline: none;\n }\n\n .button:hover {\n text-decoration: none;\n }\n }\n\n .button[disabled] {\n cursor: default;\n pointer-events: none;\n }\n\n /* Solid treatment */\n .button--solid {\n background-color: var(--button-color);\n border-color: transparent;\n color: var(--text-color);\n }\n\n @media screen('lg') {\n /* `hover` should be added only for large screens */\n .button--solid:hover {\n background-color: var(--button-hover-color);\n }\n }\n\n .button--solid:active {\n background-color: var(--button-hover-color);\n }\n\n .button--solid[disabled] {\n --button-color: var(--color-ice-500) !important;\n }\n\n /* Ghost treatment */\n .button--ghost {\n background-color: rgb(0 0 0 / 0%);\n border-color: var(--button-color);\n color: var(--text-color);\n }\n\n @media screen('lg') {\n /* `hover` should be added only for large screens */\n .button--ghost:hover {\n background-color: var(--button-hover-color);\n }\n }\n\n .button--ghost:active {\n background-color: var(--button-hover-color);\n }\n\n .button--ghost[disabled] {\n --button-color: var(--color-ice-500) !important;\n --text-color: var(--color-ice-500) !important;\n }\n\n /* Types */\n .button--primary {\n composes: button--solid;\n --button-color: var(--color-blue-500);\n --button-hover-color: var(--color-blue-hover);\n --text-color: var(--color-white);\n }\n\n .button--secondary {\n composes: button--ghost;\n --button-color: var(--color-ice-500);\n --button-hover-color: var(--color-ice-700-hover);\n --text-color: var(--color-ice-700);\n }\n\n .button--tertiary {\n composes: button--ghost;\n --button-color: var(--color-white);\n --button-hover-color: var(--color-white-hover);\n --text-color: var(--color-white);\n }\n\n .button--icon,\n .button--iconLabel {\n /* https://developers.google.com/web/fundamentals/accessibility/accessible-styles */\n border: 0;\n border-radius: theme('borderRadius.DEFAULT');\n height: theme('spacing.12');\n min-width: theme('spacing.12');\n text-decoration: none;\n }\n\n .button--icon {\n padding: theme('spacing.3');\n width: theme('spacing.12');\n }\n\n .button--iconLabel {\n padding: 0;\n width: unset;\n }\n\n @media screen('lg') {\n /* `hover` should be added only for large screens */\n .button--icon:hover,\n .button--iconLabel:hover {\n text-decoration: none;\n }\n }\n\n .button--icon svg,\n .button--iconLabel svg {\n display: block;\n margin-left: auto;\n margin-right: auto;\n }\n\n .button--icon[disabled] svg,\n .button--iconLabel[disabled],\n .button--iconLabel[disabled] svg {\n color: var(--color-ice-500);\n }\n\n .button--inline {\n border: 0;\n color: var(--color-blue-500);\n font-weight: theme('fontWeight.medium');\n line-height: 1.5;\n min-width: 0;\n padding: 0;\n }\n\n .button--inline:hover {\n text-decoration: underline;\n }\n\n .button--inline[disabled] {\n color: var(--color-ice-500);\n }\n\n /* Colors */\n .button--blue.button--primary,\n .button--blue.button--secondary {\n --button-color: var(--color-blue-500);\n }\n\n .button--blue.button--primary {\n --button-hover-color: var(--color-blue-hover);\n }\n\n .button--blue.button--secondary {\n --text-color: var(--color-blue-500);\n --button-hover-color: var(--button-secondary-blue-hover);\n }\n\n .button--red.button--primary,\n .button--red.button--secondary {\n --button-color: var(--color-red-500);\n }\n\n .button--red.button--primary {\n --button-hover-color: var(--color-red-hover);\n }\n\n .button--red.button--secondary {\n --text-color: var(--color-red-500);\n --button-hover-color: var(--button-secondary-red-hover);\n }\n\n /**\n * Button Grid\n * TODO: Move into separate component\n * https://leaflink.atlassian.net/browse/STASH-230\n * See `styles/elements/_buttons.scss` for button-grid (parent element) specific styles.\n */\n :global(.button-grid) > .button,\n :global(.header-button-grid) > .button {\n width: 50%;\n }\n\n :global(.button-grid) > .button + .button {\n margin-left: theme('spacing.6');\n }\n\n @media screen('md') {\n :global(.button-grid) > .button {\n width: auto;\n }\n }\n\n :global(.header-button-grid) > .button + .button {\n margin-left: theme('spacing.6');\n }\n\n @media screen('lg') {\n :global(.header-button-grid) > .button {\n width: auto;\n }\n }\n</style>\n"],"names":["ButtonTypes","props","__props","classes","useCssModule","buttonType","computed","type","is","buttonAttrs"],"mappings":";;;AA8DE,IAAKA,sBAAAA,OACHA,EAAA,OAAO,QACPA,EAAA,YAAY,aACZA,EAAA,YAAY,aACZA,EAAA,WAAW,YACXA,EAAA,SAAS,UACTA,EAAA,UAAU,WANPA,IAAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;AAZL,UAAMC,IAAQC,GAURC,IAAUC,KAaVC,IAAaC,EAAqB,MAAM;AAC5C,iBAAWC,KAAQ,OAAO,OAAOP,CAAW;AACtC,YAAAC,EAAMM,CAAI;AACL,iBAAAA;AAIJ,aAAA;AAAA,IAAA,CACR,GAEKC,IAAKF,EAAS,MACdL,EAAM,KACD,gBAGLA,EAAM,OACD,MAGF,QACR,GAEKQ,IAAcH,EAAS,MACvBL,EAAM,KACD;AAAA,MACL,IAAIA,EAAM;AAAA,IAAA,IAIVA,EAAM,OACD;AAAA,MACL,MAAMA,EAAM;AAAA,IAAA,IAIT,EACR;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Button.js","sources":["../src/components/Button/Button.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { computed, useAttrs, useCssModule } from 'vue';\n import { RouteLocationRaw } from 'vue-router';\n\n import Icon from '../Icon/Icon.vue';\n\n defineOptions({\n name: 'll-button',\n });\n\n export interface ButtonProps {\n /**\n * Renders the secondary variant\n */\n secondary?: boolean;\n\n /**\n * Renders the button as a container for an Icon\n */\n icon?: boolean;\n\n /**\n * Renders the button as a container for an IconLabel\n */\n iconLabel?: boolean;\n\n /**\n * Renders the tertiary variant\n */\n tertiary?: boolean;\n\n /**\n * Renders the component inline\n */\n inline?: boolean;\n\n /**\n * Renders a color variant\n */\n color?: 'blue' | 'red';\n\n /**\n * The `to` prop for vue-router's `RouterLink` component. If defined, the button will render as a `<router-link />`.\n */\n to?: RouteLocationRaw;\n\n /**\n * Button link. If defined, the button will render as an `<a />` tag.\n */\n href?: string;\n\n /**\n * Displays a spinning loading icon in place of the button text and disables the button\n */\n isLoading?: boolean;\n }\n\n const props = withDefaults(defineProps<ButtonProps>(), {\n secondary: false,\n icon: false,\n iconLabel: false,\n tertiary: false,\n inline: false,\n color: undefined,\n href: '',\n to: undefined,\n isLoading: false,\n });\n const classes = useCssModule();\n const attrs = useAttrs();\n\n enum ButtonTypes {\n Icon = 'icon',\n IconLabel = 'iconLabel',\n Secondary = 'secondary',\n Tertiary = 'tertiary',\n Inline = 'inline',\n Primary = 'primary',\n }\n\n type ButtonType = `${ButtonTypes}`;\n\n const buttonType = computed<ButtonType>(() => {\n for (const type of Object.values(ButtonTypes)) {\n if (props[type]) {\n return type;\n }\n }\n\n return ButtonTypes.Primary;\n });\n\n const is = computed(() => {\n if (props.to) {\n return 'router-link';\n }\n\n if (props.href) {\n return 'a';\n }\n\n return 'button';\n });\n\n const buttonAttrs = computed(() => {\n if (props.to) {\n return {\n to: props.to,\n };\n }\n\n if (props.href) {\n return {\n href: props.href,\n };\n }\n\n return {};\n });\n</script>\n\n<template>\n <component\n :is=\"is\"\n :disabled=\"props.isLoading || attrs.disabled\"\n v-bind=\"buttonAttrs\"\n class=\"stash-button\"\n :class=\"[\n classes.button,\n `stash-button--${buttonType}`,\n classes[`button--${buttonType}`],\n {\n [`stash-button--${props.color}`]: props.color,\n [classes[`button--${props.color}`]]: props.color,\n 'stash-button--is-loading': props.isLoading,\n },\n ]\"\n data-test=\"ll-button\"\n >\n <Icon v-if=\"props.isLoading\" name=\"loading-empty\" class=\"tw-animate-spin\" />\n <!-- @slot default -->\n <slot v-else></slot>\n </component>\n</template>\n\n<style module>\n .button {\n border-radius: theme('borderRadius.DEFAULT');\n border-width: 1px;\n display: inline-block;\n font-size: 0.875rem;\n font-weight: theme('fontWeight.semibold');\n line-height: 2.125rem;\n margin: 0;\n min-width: 144px;\n padding: 0 theme('spacing.3');\n text-align: center;\n text-decoration: none;\n vertical-align: middle;\n white-space: nowrap;\n }\n\n @media screen('lg') {\n /* `focus` and `hover` should be added only for large screens */\n .button:focus {\n box-shadow: 0 0 0 3px rgb(0 123 255 / 14%);\n outline: none;\n }\n\n .button:hover {\n text-decoration: none;\n }\n }\n\n .button[disabled] {\n cursor: default;\n pointer-events: none;\n }\n\n /* Solid treatment */\n .button--solid {\n background-color: var(--button-color);\n border-color: transparent;\n color: var(--text-color);\n }\n\n @media screen('lg') {\n /* `hover` should be added only for large screens */\n .button--solid:hover {\n background-color: var(--button-hover-color);\n }\n }\n\n .button--solid:active {\n background-color: var(--button-hover-color);\n }\n\n .button--solid[disabled]:not(:global(.stash-button--is-loading)) {\n --button-color: var(--color-ice-500) !important;\n }\n\n /* Ghost treatment */\n .button--ghost {\n background-color: rgb(0 0 0 / 0%);\n border-color: var(--button-color);\n color: var(--text-color);\n }\n\n @media screen('lg') {\n /* `hover` should be added only for large screens */\n .button--ghost:hover {\n background-color: var(--button-hover-color);\n }\n }\n\n .button--ghost:active {\n background-color: var(--button-hover-color);\n }\n\n .button--ghost[disabled]:not(:global(.stash-button--is-loading)) {\n --button-color: var(--color-ice-500) !important;\n --text-color: var(--color-ice-500) !important;\n }\n\n /* Types */\n .button--primary {\n composes: button--solid;\n --button-color: var(--color-blue-500);\n --button-hover-color: var(--color-blue-hover);\n --text-color: var(--color-white);\n }\n\n .button--secondary {\n composes: button--ghost;\n --button-color: var(--color-ice-500);\n --button-hover-color: var(--color-ice-700-hover);\n --text-color: var(--color-ice-700);\n }\n\n .button--tertiary {\n composes: button--ghost;\n --button-color: var(--color-white);\n --button-hover-color: var(--color-white-hover);\n --text-color: var(--color-white);\n }\n\n .button--icon,\n .button--iconLabel {\n /* https://developers.google.com/web/fundamentals/accessibility/accessible-styles */\n border: 0;\n border-radius: theme('borderRadius.DEFAULT');\n height: theme('spacing.12');\n min-width: theme('spacing.12');\n text-decoration: none;\n }\n\n .button--icon {\n padding: theme('spacing.3');\n width: theme('spacing.12');\n }\n\n .button--iconLabel {\n padding: 0;\n width: unset;\n }\n\n @media screen('lg') {\n /* `hover` should be added only for large screens */\n .button--icon:hover,\n .button--iconLabel:hover {\n text-decoration: none;\n }\n }\n\n .button--icon svg,\n .button--iconLabel svg {\n display: block;\n margin-left: auto;\n margin-right: auto;\n }\n\n .button--icon[disabled]:not(:global(.stash-button--is-loading)) svg,\n .button--iconLabel[disabled]:not(:global(.stash-button--is-loading)),\n .button--iconLabel[disabled]:not(:global(.stash-button--is-loading)) svg {\n color: var(--color-ice-500);\n }\n\n .button--inline {\n border: 0;\n color: var(--color-blue-500);\n font-weight: theme('fontWeight.medium');\n line-height: 1.5;\n min-width: 0;\n padding: 0;\n }\n\n .button--inline:hover {\n text-decoration: underline;\n }\n\n .button--inline[disabled] {\n color: var(--color-ice-500);\n }\n\n /* Colors */\n .button--blue.button--primary,\n .button--blue.button--secondary {\n --button-color: var(--color-blue-500);\n }\n\n .button--blue.button--primary {\n --button-hover-color: var(--color-blue-hover);\n }\n\n .button--blue.button--secondary {\n --text-color: var(--color-blue-500);\n --button-hover-color: var(--button-secondary-blue-hover);\n }\n\n .button--red.button--primary,\n .button--red.button--secondary {\n --button-color: var(--color-red-500);\n }\n\n .button--red.button--primary {\n --button-hover-color: var(--color-red-hover);\n }\n\n .button--red.button--secondary {\n --text-color: var(--color-red-500);\n --button-hover-color: var(--button-secondary-red-hover);\n }\n\n /**\n * Button Grid\n * TODO: Move into separate component\n * https://leaflink.atlassian.net/browse/STASH-230\n * See `styles/elements/_buttons.scss` for button-grid (parent element) specific styles.\n */\n :global(.button-grid) > .button,\n :global(.header-button-grid) > .button {\n width: 50%;\n }\n\n :global(.button-grid) > .button + .button {\n margin-left: theme('spacing.6');\n }\n\n @media screen('md') {\n :global(.button-grid) > .button {\n width: auto;\n }\n }\n\n :global(.header-button-grid) > .button + .button {\n margin-left: theme('spacing.6');\n }\n\n @media screen('lg') {\n :global(.header-button-grid) > .button {\n width: auto;\n }\n }\n</style>\n"],"names":["ButtonTypes","props","__props","classes","useCssModule","attrs","useAttrs","buttonType","computed","type","is","buttonAttrs"],"mappings":";;;;;;;AAuEE,IAAKA,sBAAAA,OACHA,EAAA,OAAO,QACPA,EAAA,YAAY,aACZA,EAAA,YAAY,aACZA,EAAA,WAAW,YACXA,EAAA,SAAS,UACTA,EAAA,UAAU,WANPA,IAAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;AAdL,UAAMC,IAAQC,GAWRC,IAAUC,KACVC,IAAQC,KAaRC,IAAaC,EAAqB,MAAM;AAC5C,iBAAWC,KAAQ,OAAO,OAAOT,CAAW;AACtC,YAAAC,EAAMQ,CAAI;AACL,iBAAAA;AAIJ,aAAA;AAAA,IAAA,CACR,GAEKC,IAAKF,EAAS,MACdP,EAAM,KACD,gBAGLA,EAAM,OACD,MAGF,QACR,GAEKU,IAAcH,EAAS,MACvBP,EAAM,KACD;AAAA,MACL,IAAIA,EAAM;AAAA,IAAA,IAIVA,EAAM,OACD;AAAA,MACL,MAAMA,EAAM;AAAA,IAAA,IAIT,EACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -68,6 +68,10 @@ export declare interface ButtonProps {
68
68
  * Button link. If defined, the button will render as an `<a />` tag.
69
69
  */
70
70
  href?: string;
71
+ /**
72
+ * Displays a spinning loading icon in place of the button text and disables the button
73
+ */
74
+ isLoading?: boolean;
71
75
  }
72
76
 
73
77
  declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ButtonProps>, {
@@ -79,6 +83,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes
79
83
  color: undefined;
80
84
  href: string;
81
85
  to: undefined;
86
+ isLoading: boolean;
82
87
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ButtonProps>, {
83
88
  secondary: boolean;
84
89
  icon: boolean;
@@ -88,6 +93,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes
88
93
  color: undefined;
89
94
  href: string;
90
95
  to: undefined;
96
+ isLoading: boolean;
91
97
  }>>> & Readonly<{}>, {
92
98
  to: string | RouteLocationAsRelativeGeneric | RouteLocationAsPathGeneric;
93
99
  icon: boolean;
@@ -97,6 +103,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes
97
103
  tertiary: boolean;
98
104
  inline: boolean;
99
105
  color: "blue" | "red";
106
+ isLoading: boolean;
100
107
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
101
108
  default?(_: {}): any;
102
109
  }>;
@@ -0,0 +1,17 @@
1
+ const t = "_button_4w1qh_2", o = {
2
+ button: t,
3
+ "button--solid": "_button--solid_4w1qh_36",
4
+ "button--ghost": "_button--ghost_4w1qh_58",
5
+ "button--primary": "_button--primary_4w1qh_81 _button--solid_4w1qh_36",
6
+ "button--secondary": "_button--secondary_4w1qh_88 _button--ghost_4w1qh_58",
7
+ "button--tertiary": "_button--tertiary_4w1qh_95 _button--ghost_4w1qh_58",
8
+ "button--icon": "_button--icon_4w1qh_102",
9
+ "button--iconLabel": "_button--iconLabel_4w1qh_103",
10
+ "button--inline": "_button--inline_4w1qh_143",
11
+ "button--blue": "_button--blue_4w1qh_161",
12
+ "button--red": "_button--red_4w1qh_175"
13
+ };
14
+ export {
15
+ o as s
16
+ };
17
+ //# sourceMappingURL=Button.vue_used_vue_type_style_index_0_lang.module-4dabc2a9.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.vue_used_vue_type_style_index_0_lang.module-4dabc2a9.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}