@leaflink/stash 44.0.0 → 44.1.0

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.
@@ -0,0 +1,13 @@
1
+ <svg width="101" height="20" viewBox="0 0 101 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="2" y="2" width="16" height="16" rx="4" fill="#1E164B"/>
3
+ <path d="M12.7151 11.23C12.7151 10.0983 11.8401 9.45667 10.6618 9.14167L9.81012 8.92C9.02846 8.71 8.97012 8.30167 8.97012 8.09167C8.97012 7.57833 9.41346 7.19333 10.0318 7.19333C10.3908 7.19333 10.6803 7.32478 10.8638 7.54477C11.1148 7.84574 11.4036 8.20833 11.7955 8.20833C12.1767 8.20833 12.5017 7.89599 12.3951 7.53001C12.193 6.83589 11.6515 6.3224 10.8983 6.10689C10.636 6.03184 10.4285 5.80871 10.4285 5.53587V5.39667C10.4285 5.17759 10.2509 5 10.0318 5C9.81272 5 9.63512 5.17759 9.63512 5.39667V5.54285C9.63512 5.81358 9.4333 6.03739 9.17438 6.11649C8.23479 6.40357 7.54679 7.13884 7.54679 8.12667C7.54679 8.745 7.82679 9.70167 9.41346 10.11L10.3235 10.3667C11.0118 10.5533 11.3035 10.8917 11.3035 11.3C11.3035 11.825 10.8951 12.2567 10.1601 12.2567C9.69197 12.2567 9.33757 12.086 9.1257 11.8239C8.88139 11.5216 8.58505 11.1717 8.1964 11.1717C7.81066 11.1717 7.48441 11.4908 7.60755 11.8564C7.82787 12.5104 8.37612 13.04 9.15388 13.2812C9.42422 13.3651 9.63512 13.5987 9.63512 13.8818V14.0533C9.63512 14.2724 9.81272 14.45 10.0318 14.45C10.2509 14.45 10.4285 14.2724 10.4285 14.0533V13.9098C10.4285 13.6284 10.6465 13.3996 10.92 13.3334C11.9662 13.0799 12.7151 12.3047 12.7151 11.23Z" fill="white"/>
4
+ <path d="M24 14.8317H27.8026C30.5846 14.8317 32.1923 12.756 32.1923 10.021C32.1923 7.27209 30.5846 5.1683 27.8026 5.1683H24V14.8317ZM26.1949 12.9102V7.08976H27.8026C29.2425 7.08976 29.9834 8.50631 29.9834 10.021C29.9834 11.5217 29.2425 12.9102 27.8026 12.9102H26.1949Z" fill="#1E164B"/>
5
+ <path d="M33.8843 14.8317H36.0791V5.1683H33.8843V14.8317Z" fill="#1E164B"/>
6
+ <path d="M43.1587 14.8317H45.717L43.2286 11.3114C44.7804 10.9187 45.4933 9.72651 45.4933 8.36606C45.4933 6.76718 44.4868 5.1683 42.25 5.1683H38.3076V14.8317H40.5025V11.4376H40.9359L43.1587 14.8317ZM40.5025 7.08976H41.9564C42.8511 7.08976 43.2845 7.777 43.2845 8.42216C43.2845 9.06732 42.8651 9.69846 41.9005 9.69846H40.5025V7.08976Z" fill="#1E164B"/>
7
+ <path d="M49.4721 12.9102V11.0589H52.9671V9.08135H49.4721V7.08976H53.4564V5.1683H47.2772V14.8317H53.5822V12.9102H49.4721Z" fill="#1E164B"/>
8
+ <path d="M59.5157 15C61.2073 15 62.6892 14.1445 63.5699 12.8541L61.8643 11.662C61.3611 12.4474 60.6201 12.9243 59.5996 12.9243C57.9499 12.9243 56.8315 11.5778 56.8315 9.97896C56.8315 8.38008 57.9919 7.07574 59.6136 7.07574C60.6201 7.07574 61.3611 7.55259 61.8643 8.33801L63.5699 7.14586C62.6892 5.85554 61.2073 5 59.5157 5C56.8036 5 54.6227 7.25806 54.6227 9.97896C54.6227 12.7279 56.8036 15 59.5157 15Z" fill="#1E164B"/>
9
+ <path d="M71.4703 5.1683H64.1868V7.08976H66.7311V14.8317H68.926V7.08976H71.4703V5.1683Z" fill="#1E164B"/>
10
+ <path d="M79.6444 5.1683H75.674V14.8317H77.8689V11.5498H79.6444C81.8812 11.5498 82.8877 9.97896 82.8877 8.36606C82.8877 6.76718 81.8812 5.1683 79.6444 5.1683ZM79.5465 9.62833H77.8689V7.08976H79.5605C80.3713 7.08976 80.6789 7.74895 80.6789 8.36606C80.6789 8.98317 80.3713 9.62833 79.5465 9.62833Z" fill="#1E164B"/>
11
+ <path d="M89.78 14.8317H92.1146L88.5637 5.1683H86.1731L82.6082 14.8317H84.9569L85.6698 12.5877H89.053L89.78 14.8317ZM86.271 10.6802L87.3474 7.30014L88.4379 10.6802H86.271Z" fill="#1E164B"/>
12
+ <path d="M98.012 5.1683L95.7472 8.73072L93.5244 5.1683H90.9101L94.6568 10.4698V14.8317H96.8656V10.5119L100.626 5.1683H98.012Z" fill="#1E164B"/>
13
+ </svg>
@@ -0,0 +1,11 @@
1
+ <svg width="85" height="20" viewBox="0 0 85 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="2" y="2" width="16" height="16" rx="4" fill="#1E164B"/>
3
+ <path d="M12.7151 11.23C12.7151 10.0983 11.8401 9.45667 10.6618 9.14167L9.81012 8.92C9.02846 8.71 8.97012 8.30167 8.97012 8.09167C8.97012 7.57833 9.41346 7.19333 10.0318 7.19333C10.3908 7.19333 10.6803 7.32478 10.8638 7.54477C11.1148 7.84574 11.4036 8.20833 11.7955 8.20833C12.1767 8.20833 12.5017 7.89599 12.3951 7.53001C12.193 6.83589 11.6515 6.3224 10.8983 6.10689C10.636 6.03184 10.4285 5.80871 10.4285 5.53587V5.39667C10.4285 5.17759 10.2509 5 10.0318 5C9.81272 5 9.63512 5.17759 9.63512 5.39667V5.54285C9.63512 5.81358 9.4333 6.03739 9.17438 6.11649C8.23479 6.40357 7.54679 7.13884 7.54679 8.12667C7.54679 8.745 7.82679 9.70167 9.41346 10.11L10.3235 10.3667C11.0118 10.5533 11.3035 10.8917 11.3035 11.3C11.3035 11.825 10.8951 12.2567 10.1601 12.2567C9.69197 12.2567 9.33757 12.086 9.1257 11.8239C8.88139 11.5216 8.58505 11.1717 8.1964 11.1717C7.81066 11.1717 7.48441 11.4908 7.60755 11.8564C7.82787 12.5104 8.37612 13.04 9.15388 13.2812C9.42422 13.3651 9.63512 13.5987 9.63512 13.8818V14.0533C9.63512 14.2724 9.81272 14.45 10.0318 14.45C10.2509 14.45 10.4285 14.2724 10.4285 14.0533V13.9098C10.4285 13.6284 10.6465 13.3996 10.92 13.3334C11.9662 13.0799 12.7151 12.3047 12.7151 11.23Z" fill="white"/>
4
+ <path d="M30.0792 7.08967V5.16821H24V14.8316H26.1891V11.0308H29.2705V9.12333H26.1891V7.08967H30.0792Z" fill="#1E164B"/>
5
+ <path d="M31.6387 14.8316H37.3553V12.9101H33.8277V5.16821H31.6387V14.8316Z" fill="#1E164B"/>
6
+ <path d="M40.9218 12.9101V11.0588H44.4075V9.08126H40.9218V7.08967H44.8956V5.16821H38.7327V14.8316H45.021V12.9101H40.9218Z" fill="#1E164B"/>
7
+ <path d="M54.9778 14.8316L51.6454 9.68434L54.685 5.16821H52.0637L50.3487 7.93119L48.6616 5.16821H46.0124L49.038 9.68434L45.7335 14.8316H48.2991L50.3487 11.4375L52.3983 14.8316H54.9778Z" fill="#1E164B"/>
8
+ <path d="M63.8199 5.16821H59.8601V14.8316H62.0491V11.5497H63.8199C66.0507 11.5497 67.0546 9.97887 67.0546 8.36597C67.0546 6.76709 66.0507 5.16821 63.8199 5.16821ZM63.7223 9.62824H62.0491V7.08967H63.7362C64.5449 7.08967 64.8516 7.74886 64.8516 8.36597C64.8516 8.98308 64.5449 9.62824 63.7223 9.62824Z" fill="#1E164B"/>
9
+ <path d="M73.9286 14.8316H76.2571L72.7156 5.16821H70.3314L66.7759 14.8316H69.1183L69.8294 12.5876H73.2036L73.9286 14.8316ZM70.429 10.6801L71.5026 7.30005L72.5901 10.6801H70.429Z" fill="#1E164B"/>
10
+ <path d="M82.1389 5.16821L79.8801 8.73062L77.6632 5.16821H75.0559L78.7926 10.4698V14.8316H80.9956V10.5118L84.7462 5.16821H82.1389Z" fill="#1E164B"/>
11
+ </svg>
@@ -1,4 +1,4 @@
1
- import { defineComponent as n, useAttrs as a, computed as i, withDirectives as p, openBlock as u, createBlock as m, mergeProps as h, unref as C, withCtx as f, createTextVNode as d, toDisplayString as A, vShow as _ } from "vue";
1
+ import { defineComponent as a, useAttrs as p, computed as r, withDirectives as u, openBlock as m, createBlock as h, mergeProps as d, withCtx as C, createTextVNode as f, toDisplayString as A, vShow as _ } from "vue";
2
2
  import g from "./Chip.js";
3
3
  import "./utils/colorScheme.js";
4
4
  import "./Icon.js";
@@ -6,7 +6,7 @@ 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
8
  import "./_plugin-vue_export-helper-dad06003.js";
9
- const z = /* @__PURE__ */ n({
9
+ const z = /* @__PURE__ */ a({
10
10
  name: "ll-license-chip",
11
11
  inheritAttrs: !1,
12
12
  __name: "LicenseChip",
@@ -14,8 +14,11 @@ const z = /* @__PURE__ */ n({
14
14
  license: {},
15
15
  size: { default: "medium" }
16
16
  },
17
- setup(o) {
18
- const r = o, c = a(), s = Object.freeze({
17
+ setup(i) {
18
+ const s = i, c = p(), l = r(() => {
19
+ const e = { ...c };
20
+ return delete e["color-scheme"], delete e.radius, delete e.shade, e;
21
+ }), o = Object.freeze({
19
22
  MED: "yellow",
20
23
  MEDI: "yellow",
21
24
  REC: "blue",
@@ -30,24 +33,24 @@ const z = /* @__PURE__ */ n({
30
33
  CANN: "green",
31
34
  ADU: "blue",
32
35
  ADUL: "blue"
33
- }), l = i(() => e.value in s ? s[e.value] : "blue"), e = i(() => {
34
- const t = r.license.toUpperCase();
35
- return t.length > 4 ? t.slice(0, 3) : t;
36
+ }), n = r(() => t.value in o ? o[t.value] : "blue"), t = r(() => {
37
+ const e = s.license.toUpperCase();
38
+ return e.length > 4 ? e.slice(0, 3) : e;
36
39
  });
37
- return (t, v) => p((u(), m(g, h(C(c), {
38
- "color-scheme": l.value,
39
- size: r.size,
40
- shade: "main",
41
- radius: "pill",
40
+ return (e, v) => u((m(), h(g, d({
42
41
  class: "stash-license-chip",
43
- "data-test": "stash-license-chip"
44
- }), {
45
- default: f(() => [
46
- d(A(e.value), 1)
42
+ "data-test": "stash-license-chip",
43
+ radius: "pill",
44
+ shade: "main",
45
+ "color-scheme": n.value,
46
+ size: s.size
47
+ }, l.value), {
48
+ default: C(() => [
49
+ f(A(t.value), 1)
47
50
  ]),
48
51
  _: 1
49
52
  }, 16, ["color-scheme", "size"])), [
50
- [_, e.value.length]
53
+ [_, t.value.length]
51
54
  ]);
52
55
  }
53
56
  });
@@ -1 +1 @@
1
- {"version":3,"file":"LicenseChip.js","sources":["../src/components/LicenseChip/LicenseChip.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, useAttrs } from 'vue';\n\n import { StashPrimaryColorGroup } from '../../../types/colors';\n import Chip from '../Chip/Chip.vue';\n\n defineOptions({\n name: 'll-license-chip',\n inheritAttrs: false,\n });\n\n export interface LicenseChipProps {\n /**\n * License type to be displayed. This can be either the type code (e.g. \"MED\") or the full name (e.g. \"Medical\").\n */\n license: string;\n\n /**\n * Size of the chip. Defaults to medium. Available sizes: \"small\" | \"medium\".\n */\n size?: 'small' | 'medium';\n }\n\n const props = withDefaults(defineProps<LicenseChipProps>(), {\n size: 'medium',\n });\n const attrs = useAttrs();\n\n const COLOR_SCHEME_MAPPING = Object.freeze({\n MED: 'yellow',\n MEDI: 'yellow',\n REC: 'blue',\n RECR: 'blue',\n COM: 'royal',\n COMB: 'royal',\n ANC: 'orange',\n ANCI: 'orange',\n BUL: 'ice',\n BULK: 'ice',\n CAN: 'green',\n CANN: 'green',\n ADU: 'blue',\n ADUL: 'blue',\n });\n\n const color = computed<StashPrimaryColorGroup>(() => {\n if (formattedLicense.value in COLOR_SCHEME_MAPPING) {\n return COLOR_SCHEME_MAPPING[formattedLicense.value];\n }\n\n return 'blue';\n });\n\n const formattedLicense = computed(() => {\n const uppercaseLicense = props.license.toUpperCase();\n\n if (uppercaseLicense.length > 4) {\n return uppercaseLicense.slice(0, 3);\n }\n\n return uppercaseLicense;\n });\n</script>\n\n<template>\n <Chip\n v-show=\"formattedLicense.length\"\n v-bind=\"attrs\"\n :color-scheme=\"color\"\n :size=\"props.size\"\n shade=\"main\"\n radius=\"pill\"\n class=\"stash-license-chip\"\n data-test=\"stash-license-chip\"\n >\n {{ formattedLicense }}\n </Chip>\n</template>\n"],"names":["attrs","useAttrs","COLOR_SCHEME_MAPPING","color","computed","formattedLicense","uppercaseLicense","props"],"mappings":";;;;;;;;;;;;;;;;;iBA0BQA,IAAQC,KAERC,IAAuB,OAAO,OAAO;AAAA,MACzC,KAAK;AAAA,MACL,MAAM;AAAA,MACN,KAAK;AAAA,MACL,MAAM;AAAA,MACN,KAAK;AAAA,MACL,MAAM;AAAA,MACN,KAAK;AAAA,MACL,MAAM;AAAA,MACN,KAAK;AAAA,MACL,MAAM;AAAA,MACN,KAAK;AAAA,MACL,MAAM;AAAA,MACN,KAAK;AAAA,MACL,MAAM;AAAA,IAAA,CACP,GAEKC,IAAQC,EAAiC,MACzCC,EAAiB,SAASH,IACrBA,EAAqBG,EAAiB,KAAK,IAG7C,MACR,GAEKA,IAAmBD,EAAS,MAAM;AAChC,YAAAE,IAAmBC,EAAM,QAAQ,YAAY;AAE/C,aAAAD,EAAiB,SAAS,IACrBA,EAAiB,MAAM,GAAG,CAAC,IAG7BA;AAAA,IAAA,CACR;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"LicenseChip.js","sources":["../src/components/LicenseChip/LicenseChip.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, useAttrs } from 'vue';\n\n import { StashPrimaryColorGroup } from '../../../types/colors';\n import Chip from '../Chip/Chip.vue';\n\n defineOptions({\n name: 'll-license-chip',\n inheritAttrs: false,\n });\n\n export interface LicenseChipProps {\n /**\n * License type to be displayed. This can be either the type code (e.g. \"MED\") or the full name (e.g. \"Medical\").\n */\n license: string;\n\n /**\n * Size of the chip. Defaults to medium. Available sizes: \"small\" | \"medium\".\n */\n size?: 'small' | 'medium';\n }\n\n const props = withDefaults(defineProps<LicenseChipProps>(), {\n size: 'medium',\n });\n const attrs = useAttrs();\n const chipAttrs = computed(() => {\n const tempAttrs = { ...attrs };\n\n // prevents override to ensure license chips remain consistent\n delete tempAttrs['color-scheme'];\n delete tempAttrs['radius'];\n delete tempAttrs['shade'];\n\n return tempAttrs;\n });\n\n const COLOR_SCHEME_MAPPING = Object.freeze({\n MED: 'yellow',\n MEDI: 'yellow',\n REC: 'blue',\n RECR: 'blue',\n COM: 'royal',\n COMB: 'royal',\n ANC: 'orange',\n ANCI: 'orange',\n BUL: 'ice',\n BULK: 'ice',\n CAN: 'green',\n CANN: 'green',\n ADU: 'blue',\n ADUL: 'blue',\n });\n\n const color = computed<StashPrimaryColorGroup>(() => {\n if (formattedLicense.value in COLOR_SCHEME_MAPPING) {\n return COLOR_SCHEME_MAPPING[formattedLicense.value];\n }\n\n return 'blue';\n });\n\n const formattedLicense = computed(() => {\n const uppercaseLicense = props.license.toUpperCase();\n\n if (uppercaseLicense.length > 4) {\n return uppercaseLicense.slice(0, 3);\n }\n\n return uppercaseLicense;\n });\n</script>\n\n<template>\n <Chip\n v-show=\"formattedLicense.length\"\n class=\"stash-license-chip\"\n data-test=\"stash-license-chip\"\n radius=\"pill\"\n shade=\"main\"\n :color-scheme=\"color\"\n :size=\"props.size\"\n v-bind=\"chipAttrs\"\n >\n {{ formattedLicense }}\n </Chip>\n</template>\n"],"names":["attrs","useAttrs","chipAttrs","computed","tempAttrs","COLOR_SCHEME_MAPPING","color","formattedLicense","uppercaseLicense","props"],"mappings":";;;;;;;;;;;;;;;;;iBA0BQA,IAAQC,KACRC,IAAYC,EAAS,MAAM;AACzB,YAAAC,IAAY,EAAE,GAAGJ;AAGvB,oBAAOI,EAAU,cAAc,GAC/B,OAAOA,EAAU,QACjB,OAAOA,EAAU,OAEVA;AAAA,IAAA,CACR,GAEKC,IAAuB,OAAO,OAAO;AAAA,MACzC,KAAK;AAAA,MACL,MAAM;AAAA,MACN,KAAK;AAAA,MACL,MAAM;AAAA,MACN,KAAK;AAAA,MACL,MAAM;AAAA,MACN,KAAK;AAAA,MACL,MAAM;AAAA,MACN,KAAK;AAAA,MACL,MAAM;AAAA,MACN,KAAK;AAAA,MACL,MAAM;AAAA,MACN,KAAK;AAAA,MACL,MAAM;AAAA,IAAA,CACP,GAEKC,IAAQH,EAAiC,MACzCI,EAAiB,SAASF,IACrBA,EAAqBE,EAAiB,KAAK,IAG7C,MACR,GAEKA,IAAmBJ,EAAS,MAAM;AAChC,YAAAK,IAAmBC,EAAM,QAAQ,YAAY;AAE/C,aAAAD,EAAiB,SAAS,IACrBA,EAAiB,MAAM,GAAG,CAAC,IAG7BA;AAAA,IAAA,CACR;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leaflink/stash",
3
- "version": "44.0.0",
3
+ "version": "44.1.0",
4
4
  "description": "LeafLink's design system.",
5
5
  "homepage": "https://stash.leaflink.com",
6
6
  "main": "./dist/index.ts",