@scalar/components 0.13.21 → 0.13.24

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 (49) hide show
  1. package/dist/components/ScalarButton/ScalarButton.stories.d.ts +12 -12
  2. package/dist/components/ScalarButton/ScalarButton.vue.d.ts +1 -1
  3. package/dist/components/ScalarButton/ScalarButton.vue.d.ts.map +1 -1
  4. package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.d.ts +0 -1
  5. package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.d.ts.map +1 -1
  6. package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.js +76 -65
  7. package/dist/components/ScalarContextMenu/ScalarContextMenu.stories.d.ts +3 -3
  8. package/dist/components/ScalarDropdown/ScalarDropdown.stories.d.ts +3 -3
  9. package/dist/components/ScalarDropdown/ScalarDropdownButton.vue.d.ts.map +1 -1
  10. package/dist/components/ScalarDropdown/ScalarDropdownButton.vue.js +1 -1
  11. package/dist/components/ScalarDropdown/ScalarDropdownMenu.vue.d.ts.map +1 -1
  12. package/dist/components/ScalarFileUpload/ScalarFileUpload.stories.d.ts +364 -0
  13. package/dist/components/ScalarFileUpload/ScalarFileUpload.stories.d.ts.map +1 -0
  14. package/dist/components/ScalarFileUpload/ScalarFileUpload.test.d.ts +2 -0
  15. package/dist/components/ScalarFileUpload/ScalarFileUpload.test.d.ts.map +1 -0
  16. package/dist/components/ScalarFileUpload/ScalarFileUpload.vue.d.ts +86 -0
  17. package/dist/components/ScalarFileUpload/ScalarFileUpload.vue.d.ts.map +1 -0
  18. package/dist/components/ScalarFileUpload/ScalarFileUploadDropTarget.vue.d.ts +19 -0
  19. package/dist/components/ScalarFileUpload/ScalarFileUploadDropTarget.vue.d.ts.map +1 -0
  20. package/dist/components/ScalarFileUpload/ScalarFileUploadError.vue.d.ts +20 -0
  21. package/dist/components/ScalarFileUpload/ScalarFileUploadError.vue.d.ts.map +1 -0
  22. package/dist/components/ScalarFileUpload/ScalarFileUploadFileList.vue.d.ts +22 -0
  23. package/dist/components/ScalarFileUpload/ScalarFileUploadFileList.vue.d.ts.map +1 -0
  24. package/dist/components/ScalarFileUpload/ScalarFileUploadInput.vue.d.ts +21 -0
  25. package/dist/components/ScalarFileUpload/ScalarFileUploadInput.vue.d.ts.map +1 -0
  26. package/dist/components/ScalarFileUpload/ScalarFileUploadInputCompact.vue.d.ts +21 -0
  27. package/dist/components/ScalarFileUpload/ScalarFileUploadInputCompact.vue.d.ts.map +1 -0
  28. package/dist/components/ScalarFileUpload/ScalarFileUploadLoading.vue.d.ts +16 -0
  29. package/dist/components/ScalarFileUpload/ScalarFileUploadLoading.vue.d.ts.map +1 -0
  30. package/dist/components/ScalarFileUpload/index.d.ts +8 -0
  31. package/dist/components/ScalarFileUpload/index.d.ts.map +1 -0
  32. package/dist/components/ScalarFileUpload/types.d.ts +32 -0
  33. package/dist/components/ScalarFileUpload/types.d.ts.map +1 -0
  34. package/dist/components/ScalarIcon/icons/Lock.svg.js +12 -13
  35. package/dist/components/ScalarIcon/icons/Unlock.svg.js +12 -8
  36. package/dist/components/ScalarListbox/ScalarListbox.stories.d.ts +9 -9
  37. package/dist/components/ScalarListbox/ScalarListbox.vue.d.ts +3 -3
  38. package/dist/components/ScalarListbox/ScalarListbox.vue.d.ts.map +1 -1
  39. package/dist/components/ScalarLoading/ScalarLoading.stories.d.ts +3 -3
  40. package/dist/components/ScalarLoading/ScalarLoading.vue.d.ts.map +1 -1
  41. package/dist/components/ScalarLoading/ScalarLoading.vue.js +4 -4
  42. package/dist/components/ScalarLoading/ScalarLoading.vue2.js +18 -18
  43. package/dist/components/ScalarModal/ScalarModal.vue.js +3 -3
  44. package/dist/components/ScalarPopover/ScalarPopover.stories.d.ts +3 -3
  45. package/dist/components/ScalarSidebar/ScalarSidebarItem.vue.d.ts.map +1 -1
  46. package/dist/components/ScalarSidebar/ScalarSidebarItem.vue.js +4 -4
  47. package/dist/components/ScalarTooltip/ScalarTooltip.stories.d.ts +3 -3
  48. package/dist/style.css +1 -1
  49. package/package.json +8 -7
@@ -0,0 +1,32 @@
1
+ export type FileExtension = `.${string}`;
2
+ export type ExtensionList = FileExtension[];
3
+ /**
4
+ * Type guard to check if a value is an ExtensionList
5
+ */
6
+ export declare function isExtensionList(value: ExtensionList | string): value is ExtensionList;
7
+ /**
8
+ * Props for both the default and compact variants of the FileUploadInput
9
+ */
10
+ export type FileUploadInputProps = {
11
+ /** Whether multiple files can be uploaded */
12
+ multiple?: boolean;
13
+ /** A list of extensions that are supported */
14
+ extensions?: ExtensionList;
15
+ };
16
+ /**
17
+ * Emits for both the default and compact variants of the FileUploadInput
18
+ */
19
+ export type FileUploadInputEmits = {
20
+ /** Emitted when the user clicks the browse button */
21
+ (e: 'click', event: MouseEvent): void;
22
+ };
23
+ /**
24
+ * Slots for both the default and compact variants of the FileUploadInput
25
+ */
26
+ export type FileUploadInputSlots = {
27
+ /** The default label slot */
28
+ default: () => any;
29
+ /** The sublabel or error slot */
30
+ sublabel: () => any;
31
+ };
32
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarFileUpload/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,IAAI,MAAM,EAAE,CAAA;AAExC,MAAM,MAAM,aAAa,GAAG,aAAa,EAAE,CAAA;AAE3C;;GAEG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,aAAa,GAAG,MAAM,GAC5B,KAAK,IAAI,aAAa,CAExB;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,aAAa,CAAA;CAC3B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,qDAAqD;IACrD,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,CAAA;CACtC,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,6BAA6B;IAC7B,OAAO,EAAE,MAAM,GAAG,CAAA;IAClB,iCAAiC;IACjC,QAAQ,EAAE,MAAM,GAAG,CAAA;CACpB,CAAA"}
@@ -1,21 +1,20 @@
1
- import { openBlock as o, createElementBlock as l, createElementVNode as n } from "vue";
1
+ import { openBlock as n, createElementBlock as t, createElementVNode as o } from "vue";
2
2
  const r = {
3
3
  xmlns: "http://www.w3.org/2000/svg",
4
4
  fill: "none",
5
- viewBox: "0 0 14 14"
5
+ stroke: "currentColor",
6
+ "stroke-linecap": "round",
7
+ "stroke-linejoin": "round",
8
+ viewBox: "0 0 24 24"
6
9
  };
7
- function t(a, e) {
8
- return o(), l("svg", r, e[0] || (e[0] = [
9
- n("path", {
10
- fill: "currentColor",
11
- "fill-rule": "evenodd",
12
- d: "M7 2a2 2 0 0 0-2 2v1h4V4a2 2 0 0 0-2-2M3 4v1a1.5 1.5 0 0 0-1.5 1.5v6A1.5 1.5 0 0 0 3 14h8a1.5 1.5 0 0 0 1.5-1.5v-6A1.5 1.5 0 0 0 11 5V4a4 4 0 1 0-8 0m4 6.75a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5",
13
- "clip-rule": "evenodd"
14
- }, null, -1)
10
+ function l(c, e) {
11
+ return n(), t("svg", r, e[0] || (e[0] = [
12
+ o("path", { d: "M12 17a1 1 0 1 0 0-2 1 1 0 0 0 0 2" }, null, -1),
13
+ o("path", { d: "M5.778 10h12.444c.982 0 1.778.895 1.778 2v8c0 1.105-.796 2-1.778 2H5.778C4.796 22 4 21.105 4 20v-8c0-1.105.796-2 1.778-2M7 10V7a5 5 0 1 1 10 0v3" }, null, -1)
15
14
  ]));
16
15
  }
17
- const c = { render: t };
16
+ const d = { render: l };
18
17
  export {
19
- c as default,
20
- t as render
18
+ d as default,
19
+ l as render
21
20
  };
@@ -1,16 +1,20 @@
1
- import { openBlock as t, createElementBlock as o, createElementVNode as r } from "vue";
2
- const n = {
1
+ import { openBlock as n, createElementBlock as t, createElementVNode as o } from "vue";
2
+ const r = {
3
3
  xmlns: "http://www.w3.org/2000/svg",
4
- fill: "currentColor",
4
+ fill: "none",
5
+ stroke: "currentColor",
6
+ "stroke-linecap": "round",
7
+ "stroke-linejoin": "round",
5
8
  viewBox: "0 0 24 24"
6
9
  };
7
- function l(a, e) {
8
- return t(), o("svg", n, e[0] || (e[0] = [
9
- r("path", { d: "M19.5 9.5h-.75V6.75A6.75 6.75 0 0 0 5.53 4.81a1.25 1.25 0 0 0 2.4.72 4.25 4.25 0 0 1 8.32 1.22V9a.5.5 0 0 1-.5.5H4.5a2 2 0 0 0-2 2V22a2 2 0 0 0 2 2h15a2 2 0 0 0 2-2V11.5a2 2 0 0 0-2-2m-7.5 9a2 2 0 1 1 2-2 2 2 0 0 1-2 2" }, null, -1)
10
+ function l(c, e) {
11
+ return n(), t("svg", r, e[0] || (e[0] = [
12
+ o("path", { d: "M12 17a1 1 0 1 0 0-2 1 1 0 0 0 0 2" }, null, -1),
13
+ o("path", { d: "M5.778 10h12.444c.982 0 1.778.895 1.778 2v8c0 1.105-.796 2-1.778 2H5.778C4.796 22 4 21.105 4 20v-8c0-1.105.796-2 1.778-2M17 10V7a5 5 0 0 0-9.33-2.5" }, null, -1)
10
14
  ]));
11
15
  }
12
- const s = { render: l };
16
+ const d = { render: l };
13
17
  export {
14
- s as default,
18
+ d as default,
15
19
  l as render
16
20
  };
@@ -7,15 +7,15 @@ declare const meta: {
7
7
  id?: string;
8
8
  label?: string;
9
9
  } & {
10
- multiple?: false;
11
- modelValue?: Option;
10
+ multiple?: false | undefined;
11
+ modelValue?: Option | undefined;
12
12
  } & import("../ScalarFloating").ScalarFloatingOptions) | ({
13
13
  options: Option[];
14
14
  id?: string;
15
15
  label?: string;
16
16
  } & {
17
17
  multiple: true;
18
- modelValue?: Option[];
18
+ modelValue?: Option[] | undefined;
19
19
  } & import("../ScalarFloating").ScalarFloatingOptions)> & Readonly<{
20
20
  "onUpdate:modelValue"?: ((v: Option) => any) | undefined;
21
21
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
@@ -32,15 +32,15 @@ declare const meta: {
32
32
  id?: string;
33
33
  label?: string;
34
34
  } & {
35
- multiple?: false;
36
- modelValue?: Option;
35
+ multiple?: false | undefined;
36
+ modelValue?: Option | undefined;
37
37
  } & import("../ScalarFloating").ScalarFloatingOptions) | ({
38
38
  options: Option[];
39
39
  id?: string;
40
40
  label?: string;
41
41
  } & {
42
42
  multiple: true;
43
- modelValue?: Option[];
43
+ modelValue?: Option[] | undefined;
44
44
  } & import("../ScalarFloating").ScalarFloatingOptions)> & Readonly<{
45
45
  "onUpdate:modelValue"?: ((v: Option) => any) | undefined;
46
46
  }>), {}, {}, {}, {}, {}>;
@@ -52,15 +52,15 @@ declare const meta: {
52
52
  id?: string;
53
53
  label?: string;
54
54
  } & {
55
- multiple?: false;
56
- modelValue?: Option;
55
+ multiple?: false | undefined;
56
+ modelValue?: Option | undefined;
57
57
  } & import("../ScalarFloating").ScalarFloatingOptions) | ({
58
58
  options: Option[];
59
59
  id?: string;
60
60
  label?: string;
61
61
  } & {
62
62
  multiple: true;
63
- modelValue?: Option[];
63
+ modelValue?: Option[] | undefined;
64
64
  } & import("../ScalarFloating").ScalarFloatingOptions)> & Readonly<{
65
65
  "onUpdate:modelValue"?: ((v: Option) => any) | undefined;
66
66
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
@@ -1,12 +1,12 @@
1
1
  import { type ScalarFloatingOptions } from '../ScalarFloating';
2
2
  import type { Option } from './types';
3
3
  type SingleSelectListboxProps = {
4
- multiple?: false;
5
- modelValue?: Option;
4
+ multiple?: false | undefined;
5
+ modelValue?: Option | undefined;
6
6
  };
7
7
  type MultipleSelectListboxProps = {
8
8
  multiple: true;
9
- modelValue?: Option[];
9
+ modelValue?: Option[] | undefined;
10
10
  };
11
11
  declare function __VLS_template(): {
12
12
  attrs: Partial<{}>;
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarListbox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarListbox/ScalarListbox.vue"],"names":[],"mappings":"AAwGA,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAA;AAE1B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAIrC,KAAK,wBAAwB,GAAG;IAC9B,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,KAAK,0BAA0B,GAAG;IAChC,QAAQ,EAAE,IAAI,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAA;AAkCD,iBAAS,cAAc;WA6HT,OAAO,IAA6B;;QA7IhD,4CAA4C;uBAC7B;YACb,yCAAyC;YACzC,IAAI,EAAE,OAAO,CAAA;SACd,GAAG,GAAG;;QAJP,4CAA4C;uBAC7B;YACb,yCAAyC;YACzC,IAAI,EAAE,OAAO,CAAA;SACd,GAAG,GAAG;;;;EA8IR;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;aAnLR,MAAM,EAAE;SACZ,MAAM;YACH,MAAM;;aAFL,MAAM,EAAE;SACZ,MAAM;YACH,MAAM;;;;aAFL,MAAM,EAAE;SACZ,MAAM;YACH,MAAM;;aAFL,MAAM,EAAE;SACZ,MAAM;YACH,MAAM;;;kFAwLhB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ScalarListbox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarListbox/ScalarListbox.vue"],"names":[],"mappings":"AAwGA,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAA;AAE1B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAIrC,KAAK,wBAAwB,GAAG;IAC9B,QAAQ,CAAC,EAAE,KAAK,GAAG,SAAS,CAAA;IAC5B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAChC,CAAA;AAED,KAAK,0BAA0B,GAAG;IAChC,QAAQ,EAAE,IAAI,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;CAClC,CAAA;AAkCD,iBAAS,cAAc;WA6HT,OAAO,IAA6B;;QA7IhD,4CAA4C;uBAC7B;YACb,yCAAyC;YACzC,IAAI,EAAE,OAAO,CAAA;SACd,GAAG,GAAG;;QAJP,4CAA4C;uBAC7B;YACb,yCAAyC;YACzC,IAAI,EAAE,OAAO,CAAA;SACd,GAAG,GAAG;;;;EA8IR;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;aAnLR,MAAM,EAAE;SACZ,MAAM;YACH,MAAM;;aAFL,MAAM,EAAE;SACZ,MAAM;YACH,MAAM;;;;aAFL,MAAM,EAAE;SACZ,MAAM;YACH,MAAM;;aAFL,MAAM,EAAE;SACZ,MAAM;YACH,MAAM;;;kFAwLhB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -32,7 +32,7 @@ declare const meta: {
32
32
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
33
33
  disabled?: boolean;
34
34
  fullWidth?: boolean;
35
- loading?: import("./ScalarLoading.vue.js").LoadingState;
35
+ loading?: import("./ScalarLoading.vue.js").LoadingState | undefined;
36
36
  size?: import("../ScalarButton/variants.js").Variants["size"];
37
37
  variant?: import("../ScalarButton/variants.js").Variants["variant"];
38
38
  type?: "button" | "submit" | "reset";
@@ -51,7 +51,7 @@ declare const meta: {
51
51
  }, Readonly<{
52
52
  disabled?: boolean;
53
53
  fullWidth?: boolean;
54
- loading?: import("./ScalarLoading.vue.js").LoadingState;
54
+ loading?: import("./ScalarLoading.vue.js").LoadingState | undefined;
55
55
  size?: import("../ScalarButton/variants.js").Variants["size"];
56
56
  variant?: import("../ScalarButton/variants.js").Variants["variant"];
57
57
  type?: "button" | "submit" | "reset";
@@ -67,7 +67,7 @@ declare const meta: {
67
67
  } & import("vue").ComponentOptionsBase<Readonly<{
68
68
  disabled?: boolean;
69
69
  fullWidth?: boolean;
70
- loading?: import("./ScalarLoading.vue.js").LoadingState;
70
+ loading?: import("./ScalarLoading.vue.js").LoadingState | undefined;
71
71
  size?: import("../ScalarButton/variants.js").Variants["size"];
72
72
  variant?: import("../ScalarButton/variants.js").Variants["variant"];
73
73
  type?: "button" | "submit" | "reset";
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarLoading.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarLoading/ScalarLoading.vue"],"names":[],"mappings":"AAgPA,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAA;AAE7D;;;;GAIG;AACH,wBAAgB,eAAe;;;;;;sCAWE,OAAO;wCAWJ,OAAO;;EAuB1C;;mBAOgB,YAAY;;;mBAAZ,YAAY;;;AAL7B,wBAyIK"}
1
+ {"version":3,"file":"ScalarLoading.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarLoading/ScalarLoading.vue"],"names":[],"mappings":"AAkPA,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAA;AAE7D;;;;GAIG;AACH,wBAAgB,eAAe;;;;;;sCAWE,OAAO;wCAWJ,OAAO;;EAuB1C;;mBAOgB,YAAY;;;mBAAZ,YAAY;;;AAL7B,wBAyIK"}
@@ -1,9 +1,9 @@
1
1
  import o from "./ScalarLoading.vue2.js";
2
- import { useLoadingState as d } from "./ScalarLoading.vue2.js";
2
+ import { useLoadingState as i } from "./ScalarLoading.vue2.js";
3
3
  /* empty css */
4
- import a from "../../_virtual/_plugin-vue_export-helper.js";
5
- const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-ca661d68"]]);
4
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
5
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-65265e87"]]);
6
6
  export {
7
7
  m as default,
8
- d as useLoadingState
8
+ i as useLoadingState
9
9
  };
@@ -1,12 +1,12 @@
1
- import { defineComponent as m, openBlock as t, createElementBlock as l, normalizeProps as c, mergeProps as h, unref as n, normalizeClass as o, createStaticVNode as p, createElementVNode as g, createCommentVNode as d, reactive as v } from "vue";
2
- import { cva as u } from "../../cva.js";
1
+ import { defineComponent as m, openBlock as t, createElementBlock as l, normalizeProps as h, mergeProps as p, unref as n, normalizeClass as o, createStaticVNode as g, createElementVNode as v, createCommentVNode as d, reactive as u } from "vue";
2
+ import { cva as c } from "../../cva.js";
3
3
  import { useBindCx as f } from "../../hooks/useBindCx.js";
4
4
  const z = {
5
5
  key: 0,
6
6
  class: "circular-loader"
7
7
  };
8
8
  function S() {
9
- return v({
9
+ return u({
10
10
  isValid: !1,
11
11
  isInvalid: !1,
12
12
  isLoading: !1,
@@ -16,25 +16,25 @@ function S() {
16
16
  stopLoading() {
17
17
  this.isLoading = !1;
18
18
  },
19
- validate(e = 800, s) {
19
+ validate(s = 800, e) {
20
20
  this.isInvalid = !1, this.isValid = !0;
21
- const i = s ? e - 300 : e;
21
+ const i = e ? s - 300 : s;
22
22
  return new Promise(
23
- (a) => setTimeout(s ? () => this.clear().then(() => a(!0)) : () => a(!0), i)
23
+ (a) => setTimeout(e ? () => this.clear().then(() => a(!0)) : () => a(!0), i)
24
24
  );
25
25
  },
26
- invalidate(e = 1100, s) {
26
+ invalidate(s = 1100, e) {
27
27
  this.isValid = !1, this.isInvalid = !0;
28
- const i = s ? e - 300 : e;
28
+ const i = e ? s - 300 : s;
29
29
  return new Promise(
30
- (a) => setTimeout(s ? () => this.clear().then(() => a(!0)) : () => a(!0), i)
30
+ (a) => setTimeout(e ? () => this.clear().then(() => a(!0)) : () => a(!0), i)
31
31
  );
32
32
  },
33
- clear(e = 300) {
34
- return this.isValid = !1, this.isInvalid = !1, this.isLoading = !1, new Promise((s) => {
33
+ clear(s = 300) {
34
+ return this.isValid = !1, this.isInvalid = !1, this.isLoading = !1, new Promise((e) => {
35
35
  setTimeout(() => {
36
- s(!0);
37
- }, e);
36
+ e(!0);
37
+ }, s);
38
38
  });
39
39
  }
40
40
  });
@@ -46,8 +46,8 @@ const V = /* @__PURE__ */ m({
46
46
  loadingState: {},
47
47
  size: {}
48
48
  },
49
- setup(e) {
50
- const { cx: s } = f(), i = u({
49
+ setup(s) {
50
+ const { cx: e } = f(), i = c({
51
51
  variants: {
52
52
  size: {
53
53
  xs: "size-3",
@@ -64,7 +64,7 @@ const V = /* @__PURE__ */ m({
64
64
  size: "full"
65
65
  }
66
66
  });
67
- return (a, r) => a.loadingState ? (t(), l("div", c(h({ key: 0 }, n(s)("loader-wrapper", n(i)({ size: a.size })))), [
67
+ return (a, r) => a.loadingState ? (t(), l("div", h(p({ key: 0 }, n(e)("loader-wrapper", n(i)({ size: a.size })))), [
68
68
  (t(), l("svg", {
69
69
  class: o(["svg-loader", {
70
70
  "icon-is-valid": a.loadingState.isValid,
@@ -74,9 +74,9 @@ const V = /* @__PURE__ */ m({
74
74
  xmlns: "http://www.w3.org/2000/svg",
75
75
  "xmlns:xlink": "http://www.w3.org/1999/xlink"
76
76
  }, [
77
- r[0] || (r[0] = p('<path class="svg-path svg-check-mark" d="m 0 60 l 30 30 l 70 -80" data-v-ca661d68></path><path class="svg-path svg-x-mark" d="m 50 50 l 40 -40" data-v-ca661d68></path><path class="svg-path svg-x-mark" d="m 50 50 l 40 40" data-v-ca661d68></path><path class="svg-path svg-x-mark" d="m 50 50 l -40 -40" data-v-ca661d68></path><path class="svg-path svg-x-mark" d="m 50 50 l -40 40" data-v-ca661d68></path>', 5)),
77
+ r[0] || (r[0] = g('<path class="svg-path svg-check-mark" d="m 0 60 l 30 30 l 70 -80" data-v-65265e87></path><path class="svg-path svg-x-mark" d="m 50 50 l 40 -40" data-v-65265e87></path><path class="svg-path svg-x-mark" d="m 50 50 l 40 40" data-v-65265e87></path><path class="svg-path svg-x-mark" d="m 50 50 l -40 -40" data-v-65265e87></path><path class="svg-path svg-x-mark" d="m 50 50 l -40 40" data-v-65265e87></path>', 5)),
78
78
  a.loadingState.isLoading ? (t(), l("g", z, [
79
- g("circle", {
79
+ v("circle", {
80
80
  class: o(["loader-path", {
81
81
  "loader-path-off": a.loadingState.isValid || a.loadingState.isInvalid
82
82
  }]),
@@ -1,9 +1,9 @@
1
1
  import o from "./ScalarModal.vue2.js";
2
2
  import { useModal as s } from "./ScalarModal.vue2.js";
3
3
  /* empty css */
4
- import a from "../../_virtual/_plugin-vue_export-helper.js";
5
- const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-e50aeea9"]]);
4
+ import r from "../../_virtual/_plugin-vue_export-helper.js";
5
+ const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0f8e0211"]]);
6
6
  export {
7
- m as default,
7
+ f as default,
8
8
  s as useModal
9
9
  };
@@ -63,7 +63,7 @@ declare const meta: {
63
63
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
64
64
  disabled?: boolean;
65
65
  fullWidth?: boolean;
66
- loading?: import("../ScalarLoading").LoadingState;
66
+ loading?: import("../ScalarLoading").LoadingState | undefined;
67
67
  size?: import("../ScalarButton/variants.js").Variants["size"];
68
68
  variant?: import("../ScalarButton/variants.js").Variants["variant"];
69
69
  type?: "button" | "submit" | "reset";
@@ -82,7 +82,7 @@ declare const meta: {
82
82
  }, Readonly<{
83
83
  disabled?: boolean;
84
84
  fullWidth?: boolean;
85
- loading?: import("../ScalarLoading").LoadingState;
85
+ loading?: import("../ScalarLoading").LoadingState | undefined;
86
86
  size?: import("../ScalarButton/variants.js").Variants["size"];
87
87
  variant?: import("../ScalarButton/variants.js").Variants["variant"];
88
88
  type?: "button" | "submit" | "reset";
@@ -98,7 +98,7 @@ declare const meta: {
98
98
  } & import("vue").ComponentOptionsBase<Readonly<{
99
99
  disabled?: boolean;
100
100
  fullWidth?: boolean;
101
- loading?: import("../ScalarLoading").LoadingState;
101
+ loading?: import("../ScalarLoading").LoadingState | undefined;
102
102
  size?: import("../ScalarButton/variants.js").Variants["size"];
103
103
  variant?: import("../ScalarButton/variants.js").Variants["variant"];
104
104
  type?: "button" | "submit" | "reset";
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarItem.vue"],"names":[],"mappings":"AAoDA,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAI7E;;;;;;;;;;;;;;;;;GAiBG;;AACH,wBAuFC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ScalarSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarItem.vue"],"names":[],"mappings":"AAmDA,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAK7E;;;;;;;;;;;;;;;;;GAiBG;;AACH,wBAuFC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as r, useSlots as s, openBlock as i, createElementBlock as l, createVNode as a, mergeProps as d, unref as p, createSlots as c, renderList as _, withCtx as f, renderSlot as m } from "vue";
2
- import { useSidebarGroups as u } from "./useSidebarGroups.js";
3
- import S from "./ScalarSidebarButton.vue.js";
2
+ import u from "./ScalarSidebarButton.vue.js";
3
+ import { useSidebarGroups as S } from "./useSidebarGroups.js";
4
4
  const h = { class: "contents" }, B = {}, g = /* @__PURE__ */ r({
5
5
  ...B,
6
6
  inheritAttrs: !1,
@@ -14,9 +14,9 @@ const h = { class: "contents" }, B = {}, g = /* @__PURE__ */ r({
14
14
  } }
15
15
  },
16
16
  setup($) {
17
- const o = s(), { level: n } = u();
17
+ const o = s(), { level: n } = S();
18
18
  return (e, b) => (i(), l("li", h, [
19
- a(S, d({ ...e.$attrs, ...e.$props }, {
19
+ a(u, d({ ...e.$attrs, ...e.$props }, {
20
20
  indent: e.indent ?? p(n)
21
21
  }), c({ _: 2 }, [
22
22
  _(o, (k, t) => ({
@@ -261,7 +261,7 @@ declare const meta: {
261
261
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
262
262
  disabled?: boolean;
263
263
  fullWidth?: boolean;
264
- loading?: import("../ScalarLoading").LoadingState;
264
+ loading?: import("../ScalarLoading").LoadingState | undefined;
265
265
  size?: import("../ScalarButton/variants.js").Variants["size"];
266
266
  variant?: import("../ScalarButton/variants.js").Variants["variant"];
267
267
  type?: "button" | "submit" | "reset";
@@ -280,7 +280,7 @@ declare const meta: {
280
280
  }, Readonly<{
281
281
  disabled?: boolean;
282
282
  fullWidth?: boolean;
283
- loading?: import("../ScalarLoading").LoadingState;
283
+ loading?: import("../ScalarLoading").LoadingState | undefined;
284
284
  size?: import("../ScalarButton/variants.js").Variants["size"];
285
285
  variant?: import("../ScalarButton/variants.js").Variants["variant"];
286
286
  type?: "button" | "submit" | "reset";
@@ -296,7 +296,7 @@ declare const meta: {
296
296
  } & import("vue").ComponentOptionsBase<Readonly<{
297
297
  disabled?: boolean;
298
298
  fullWidth?: boolean;
299
- loading?: import("../ScalarLoading").LoadingState;
299
+ loading?: import("../ScalarLoading").LoadingState | undefined;
300
300
  size?: import("../ScalarButton/variants.js").Variants["size"];
301
301
  variant?: import("../ScalarButton/variants.js").Variants["variant"];
302
302
  type?: "button" | "submit" | "reset";