@quidgest/ui 0.16.30 → 0.16.32

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.
@@ -1,14 +1,14 @@
1
- import { defineComponent as Q, mergeModels as V, useModel as _, ref as x, computed as I, useTemplateRef as T, resolveComponent as F, createBlock as L, openBlock as u, unref as v, normalizeClass as U, withCtx as g, createElementVNode as $, withModifiers as z, createVNode as C, renderSlot as A, createElementBlock as M, createCommentVNode as w, toDisplayString as H, Fragment as j, normalizeProps as G, guardReactiveProps as J, mergeProps as W, nextTick as X } from "vue";
2
- import { QList as Y } from "../QList/index.js";
3
- import { QOverlay as Z } from "../QOverlay/index.js";
4
- import { QIcon as K } from "../QIcon/index.js";
5
- import { DEFAULT_ICONS as ee } from "./types.js";
6
- const te = {
1
+ import { defineComponent as F, mergeModels as x, useModel as C, ref as A, computed as M, useTemplateRef as U, resolveComponent as z, createBlock as q, openBlock as d, unref as y, normalizeClass as H, withCtx as r, createElementVNode as j, withModifiers as G, createVNode as E, renderSlot as f, createElementBlock as R, createCommentVNode as k, toDisplayString as J, Fragment as W, normalizeProps as b, guardReactiveProps as V, mergeProps as X, nextTick as Y } from "vue";
2
+ import { QList as Z } from "../QList/index.js";
3
+ import { QOverlay as K } from "../QOverlay/index.js";
4
+ import { QIcon as ee } from "../QIcon/index.js";
5
+ import { DEFAULT_ICONS as te } from "./types.js";
6
+ const oe = {
7
7
  key: 0,
8
8
  class: "q-dropdown-menu__extra"
9
- }, se = /* @__PURE__ */ Q({
9
+ }, re = /* @__PURE__ */ F({
10
10
  __name: "QDropdownMenuContent",
11
- props: /* @__PURE__ */ V({
11
+ props: /* @__PURE__ */ x({
12
12
  id: {},
13
13
  class: {},
14
14
  activator: {},
@@ -23,7 +23,7 @@ const te = {
23
23
  delay: { default: 500 },
24
24
  trigger: { default: "hover" },
25
25
  depth: { default: 0 },
26
- icons: { default: () => ee },
26
+ icons: { default: () => te },
27
27
  offset: { default: 0 },
28
28
  crossOffset: { default: -5 }
29
29
  }, {
@@ -32,139 +32,139 @@ const te = {
32
32
  highlighted: {},
33
33
  highlightedModifiers: {}
34
34
  }),
35
- emits: /* @__PURE__ */ V(["select", "hide", "focus-previous"], ["update:modelValue", "update:highlighted"]),
36
- setup(r, { emit: q }) {
37
- const e = r, d = q, c = _(r, "modelValue"), l = _(r, "highlighted"), i = x(void 0), y = x([]), E = I(() => e.depth !== 0 ? e.offset : 4), R = I(() => e.depth !== 0 ? e.crossOffset : void 0), f = T("qListRef");
38
- function P(t) {
35
+ emits: /* @__PURE__ */ x(["select", "hide", "focus-previous"], ["update:modelValue", "update:highlighted"]),
36
+ setup(u, { emit: P }) {
37
+ const e = u, c = P, m = C(u, "modelValue"), i = C(u, "highlighted"), s = A(void 0), _ = A([]), S = M(() => e.depth !== 0 ? e.offset : 4), B = M(() => e.depth !== 0 ? e.crossOffset : void 0), p = U("qListRef");
38
+ function D(t) {
39
39
  var o;
40
- const n = (o = e.items) == null ? void 0 : o.find((s) => s[e.itemValue] === t);
41
- y.value = (n == null ? void 0 : n.items) ?? [];
42
- const a = y.value.length > 0;
43
- l.value = t, a ? h(t) : k(t);
40
+ const n = (o = e.items) == null ? void 0 : o.find((l) => l[e.itemValue] === t);
41
+ _.value = (n == null ? void 0 : n.items) ?? [];
42
+ const a = _.value.length > 0;
43
+ i.value = t, a ? g(t) : I(t);
44
44
  }
45
- function S(t) {
45
+ function O(t) {
46
46
  var n;
47
47
  if (t.key)
48
48
  switch (["Enter", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"].includes(t.key) && (t.preventDefault(), t.stopPropagation()), t.key) {
49
49
  case "ArrowRight":
50
- const a = (n = f.value) == null ? void 0 : n.getActiveItemIndex();
51
- e.items && (a || a === 0) && e.items[a] && (l.value = e.items[a].key, h(e.items[a].key));
50
+ const a = (n = p.value) == null ? void 0 : n.getActiveItemIndex();
51
+ e.items && (a || a === 0) && e.items[a] && (i.value = e.items[a].key, g(e.items[a].key));
52
52
  break;
53
53
  case "ArrowLeft":
54
- m();
54
+ h();
55
55
  break;
56
56
  case "Escape":
57
57
  case "Tab":
58
- p();
58
+ v();
59
59
  break;
60
60
  }
61
61
  }
62
- function B(t) {
63
- e.trigger === "hover" && (l.value = t, h(t));
62
+ function $(t) {
63
+ e.trigger === "hover" && (i.value = t, g(t));
64
64
  }
65
- function k(t) {
66
- d("select", t), p();
65
+ function I(t) {
66
+ c("select", t), v();
67
67
  }
68
- function D() {
69
- m();
68
+ function N() {
69
+ h();
70
70
  }
71
- function m() {
72
- i.value = void 0, l.value = void 0, c.value = !1, d("focus-previous");
71
+ function h() {
72
+ s.value = void 0, i.value = void 0, m.value = !1, c("focus-previous");
73
73
  }
74
- function p() {
75
- m(), d("hide");
74
+ function v() {
75
+ h(), c("hide");
76
76
  }
77
- function h(t) {
78
- i.value = t;
77
+ function g(t) {
78
+ s.value = t;
79
79
  }
80
- function O() {
80
+ function Q() {
81
81
  var a, o;
82
82
  const t = (a = e.items) == null ? void 0 : a.findIndex(
83
- (s) => s[e.itemValue] === i.value
83
+ (l) => l[e.itemValue] === s.value
84
84
  );
85
85
  if (!t && t !== 0) return;
86
- const n = (o = f.value) == null ? void 0 : o.getItem(t);
87
- i.value = void 0, l.value = void 0, n == null || n.focus();
86
+ const n = (o = p.value) == null ? void 0 : o.getItem(t);
87
+ s.value = void 0, i.value = void 0, n == null || n.focus();
88
88
  }
89
- function N() {
90
- X(() => {
89
+ function T() {
90
+ Y(() => {
91
91
  var t;
92
- return (t = f.value) == null ? void 0 : t.$el.focus();
92
+ return (t = p.value) == null ? void 0 : t.$el.focus();
93
93
  });
94
94
  }
95
95
  return (t, n) => {
96
- const a = F("q-dropdown-menu-content", !0);
97
- return u(), L(v(Z), {
96
+ const a = z("q-dropdown-menu-content", !0);
97
+ return d(), q(y(K), {
98
98
  id: e.id,
99
- modelValue: c.value,
100
- "onUpdate:modelValue": n[0] || (n[0] = (o) => c.value = o),
99
+ modelValue: m.value,
100
+ "onUpdate:modelValue": n[0] || (n[0] = (o) => m.value = o),
101
101
  anchor: e.activator,
102
102
  appearance: e.appearance,
103
103
  inline: e.inline,
104
104
  delay: e.delay,
105
- offset: E.value,
106
- "cross-offset": R.value,
105
+ offset: S.value,
106
+ "cross-offset": B.value,
107
107
  placement: e.placement,
108
108
  transition: e.transition,
109
- class: U(e.class),
109
+ class: H(e.class),
110
110
  "scroll-lock": "",
111
111
  "non-modal": "",
112
- onEnter: N,
113
- onLeave: D
112
+ onEnter: T,
113
+ onLeave: N
114
114
  }, {
115
- default: g(() => [
116
- $(
115
+ default: r(() => [
116
+ j(
117
117
  "div",
118
118
  {
119
119
  class: "q-dropdown-menu__body",
120
120
  "data-testid": "dropdown-content",
121
121
  tabindex: "-1",
122
- onKeydown: z(S, ["stop"])
122
+ onKeydown: G(O, ["stop"])
123
123
  },
124
124
  [
125
- C(v(Y), {
125
+ E(y(Z), {
126
126
  ref: "qListRef",
127
127
  class: "q-dropdown-menu__items",
128
- highlighted: l.value,
128
+ highlighted: i.value,
129
129
  items: e.items,
130
130
  groups: e.groups,
131
131
  "item-label": e.itemLabel,
132
132
  "item-value": e.itemValue,
133
133
  selectable: !1,
134
- onClick: P,
135
- "onMouseenter:item": B
134
+ onClick: D,
135
+ "onMouseenter:item": $
136
136
  }, {
137
- item: g(({ item: o }) => [
138
- A(t.$slots, "item", { item: o })
137
+ item: r(({ item: o }) => [
138
+ f(t.$slots, "item", { item: o })
139
139
  ]),
140
- "item.append": g(({ item: o, element: s }) => {
141
- var b;
140
+ "item.append": r(({ item: o, element: l }) => {
141
+ var L;
142
142
  return [
143
- A(t.$slots, "item.append", { item: o }, () => [
144
- o.extraInfo ? (u(), M(
143
+ f(t.$slots, "item.append", { item: o }, () => [
144
+ o.extraInfo ? (d(), R(
145
145
  "span",
146
- te,
147
- H(o.extraInfo),
146
+ oe,
147
+ J(o.extraInfo),
148
148
  1
149
149
  /* TEXT */
150
- )) : w("v-if", !0)
150
+ )) : k("v-if", !0)
151
151
  ]),
152
- ((b = o.items) == null ? void 0 : b.length) > 0 ? (u(), M(
153
- j,
152
+ ((L = o.items) == null ? void 0 : L.length) > 0 ? (d(), R(
153
+ W,
154
154
  { key: 0 },
155
155
  [
156
- C(
157
- v(K),
158
- G(J(e.icons.expand)),
156
+ E(
157
+ y(ee),
158
+ b(V(e.icons.expand)),
159
159
  null,
160
160
  16
161
161
  /* FULL_PROPS */
162
162
  ),
163
- i.value === o.key ? (u(), L(a, W({
163
+ s.value === o.key ? (d(), q(a, X({
164
164
  key: 0,
165
- "model-value": r.modelValue
165
+ "model-value": u.modelValue
166
166
  }, e, {
167
- activator: s,
167
+ activator: l,
168
168
  items: o.items,
169
169
  groups: o.groups,
170
170
  depth: e.depth + 1,
@@ -172,14 +172,23 @@ const te = {
172
172
  placement: "right-start",
173
173
  "non-modal": "",
174
174
  inline: "",
175
- onHide: p,
176
- onSelect: k,
177
- onFocusPrevious: O
178
- }), null, 16, ["model-value", "activator", "items", "groups", "depth", "delay"])) : w("v-if", !0)
175
+ onHide: v,
176
+ onSelect: I,
177
+ onFocusPrevious: Q
178
+ }), {
179
+ item: r((w) => [
180
+ f(t.$slots, "item", b(V(w)))
181
+ ]),
182
+ "item.append": r((w) => [
183
+ f(t.$slots, "item.append", b(V(w)))
184
+ ]),
185
+ _: 2
186
+ /* DYNAMIC */
187
+ }, 1040, ["model-value", "activator", "items", "groups", "depth", "delay"])) : k("v-if", !0)
179
188
  ],
180
189
  64
181
190
  /* STABLE_FRAGMENT */
182
- )) : w("v-if", !0)
191
+ )) : k("v-if", !0)
183
192
  ];
184
193
  }),
185
194
  _: 3
@@ -197,5 +206,5 @@ const te = {
197
206
  }
198
207
  });
199
208
  export {
200
- se as default
209
+ re as default
201
210
  };
@@ -1,24 +1,58 @@
1
- declare const QDropdownMenu: import('vue').DefineComponent<{
2
- modelValue?: boolean;
3
- } & import('../../types/component').QBaseComponentProps & {
4
- activator?: import('../../utils/getElement').Selector;
5
- itemValue?: string;
6
- itemLabel?: string;
7
- items?: import('../QList/types').Item[];
8
- groups?: import('../QList/types').Group[];
9
- appearance?: import('../../composables/overlay').Appearance;
10
- placement?: import('../../composables/overlay').Placement;
11
- transition?: string;
12
- inline?: boolean;
13
- delay?: number;
14
- trigger?: import('../../composables/overlay').Trigger;
15
- depth?: number;
16
- icons?: typeof import('./types').DEFAULT_ICONS;
17
- }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
18
- "update:modelValue": (value: boolean) => any;
19
- } & {
20
- select: (item: any) => any;
21
- }, string, import('vue').PublicProps, Readonly<{
1
+ declare const QDropdownMenu: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
3
+ modelValue?: boolean;
4
+ } & import('../../types/component').QBaseComponentProps & {
5
+ activator?: import('../../utils/getElement').Selector;
6
+ itemValue?: string;
7
+ itemLabel?: string;
8
+ items?: import('../QList/types').Item[];
9
+ groups?: import('../QList/types').Group[];
10
+ appearance?: import('../../composables/overlay').Appearance;
11
+ placement?: import('../../composables/overlay').Placement;
12
+ transition?: string;
13
+ inline?: boolean;
14
+ delay?: number;
15
+ trigger?: import('../../composables/overlay').Trigger;
16
+ depth?: number;
17
+ icons?: typeof import('./types').DEFAULT_ICONS;
18
+ }> & Readonly<{
19
+ onSelect?: ((item: any) => any) | undefined;
20
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
21
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
22
+ "update:modelValue": (value: boolean) => any;
23
+ } & {
24
+ select: (item: any) => any;
25
+ }, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
26
+ P: {};
27
+ B: {};
28
+ D: {};
29
+ C: {};
30
+ M: {};
31
+ Defaults: {};
32
+ }, Readonly<{
33
+ modelValue?: boolean;
34
+ } & import('../../types/component').QBaseComponentProps & {
35
+ activator?: import('../../utils/getElement').Selector;
36
+ itemValue?: string;
37
+ itemLabel?: string;
38
+ items?: import('../QList/types').Item[];
39
+ groups?: import('../QList/types').Group[];
40
+ appearance?: import('../../composables/overlay').Appearance;
41
+ placement?: import('../../composables/overlay').Placement;
42
+ transition?: string;
43
+ inline?: boolean;
44
+ delay?: number;
45
+ trigger?: import('../../composables/overlay').Trigger;
46
+ depth?: number;
47
+ icons?: typeof import('./types').DEFAULT_ICONS;
48
+ }> & Readonly<{
49
+ onSelect?: ((item: any) => any) | undefined;
50
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
51
+ }>, {}, {}, {}, {}, {}>;
52
+ __isFragment?: never;
53
+ __isTeleport?: never;
54
+ __isSuspense?: never;
55
+ } & import('vue').ComponentOptionsBase<Readonly<{
22
56
  modelValue?: boolean;
23
57
  } & import('../../types/component').QBaseComponentProps & {
24
58
  activator?: import('../../utils/getElement').Selector;
@@ -37,6 +71,19 @@ declare const QDropdownMenu: import('vue').DefineComponent<{
37
71
  }> & Readonly<{
38
72
  onSelect?: ((item: any) => any) | undefined;
39
73
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
40
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
74
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
75
+ "update:modelValue": (value: boolean) => any;
76
+ } & {
77
+ select: (item: any) => any;
78
+ }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
79
+ $slots: {
80
+ item?(_: {
81
+ item: import('../QList/types').Item;
82
+ }): any;
83
+ 'item.append'?(_: {
84
+ item: import('../QList/types').Item;
85
+ }): any;
86
+ };
87
+ });
41
88
  export { QDropdownMenu };
42
89
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QDropdownMenu/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kFAAkC,CAAA;AAGrD,OAAO,EAAE,aAAa,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QDropdownMenu/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAkC,CAAA;AAGrD,OAAO,EAAE,aAAa,EAAE,CAAA"}
@@ -43,7 +43,7 @@ export type ThemeInstance = {
43
43
  /** A computed reference to the current theme definition. */
44
44
  readonly current: DeepReadonly<ComputedRef<ThemeDefinition>>;
45
45
  /** An array of available theme definitions. */
46
- readonly themes: DeepReadonly<ThemeDefinition[]>;
46
+ readonly themes: DeepReadonly<Ref<ThemeDefinition[]>>;
47
47
  /** The theme class name. */
48
48
  readonly class: ComputedRef<string>;
49
49
  /** The theme CSS definition. */
@@ -56,23 +56,22 @@ export type ThemeInstance = {
56
56
  */
57
57
  export declare function useTheme(): ThemeInstance;
58
58
  /**
59
- * Provides and manages a reactive theme instance within the Vue dependency injection system.
59
+ * Provides and manages a reactive theme instance within Vue’s dependency injection system.
60
60
  *
61
- * This function retrieves the current list of available themes from the theme context,
62
- * optionally adds a new `ThemeDefinition`, and creates a reactive theme instance.
63
- * The new theme instance is then provided using Vue's `provide`, making it accessible
64
- * to all descendant components via `inject`.
61
+ * This function:
62
+ * - Retrieves the current list of available themes from the existing theme context.
63
+ * - Resolves the input (`nameOrDef`) to either a theme name or a full `ThemeDefinition`.
64
+ * - If a `ThemeDefinition` is provided, it is appended to the existing list of themes.
65
+ * - Creates a new reactive `ThemeInstance` bound to the resolved name and theme list.
66
+ * - Provides the new `ThemeInstance` under `ThemeSymbol`, making it available to descendants via `useTheme()`.
65
67
  *
66
- * @param nameOrDef - Either:
67
- * - A string (or `Ref<string>`/getter) specifying the name of the theme to activate.
68
- * - A `ThemeDefinition` (or `Ref<ThemeDefinition>`/getter) to register and activate.
68
+ * @param nameOrDef - The theme to activate, given as either:
69
+ * - A theme name (`string`), or a reactive source (`Ref<string>`/getter).
70
+ * - A `ThemeDefinition`, or a reactive source (`Ref<ThemeDefinition>`/getter).
69
71
  *
70
- * @returns The newly created and provided `ThemeInstance`, containing:
71
- * - `name`: reactive theme name (`Ref<string>`),
72
- * - `current`: computed active theme (`Ref<ThemeDefinition>`),
73
- * - `themes`: array of all available themes,
74
- * - `class`: computed CSS class string for the theme,
75
- * - `css`: computed CSS variables string for the theme.
72
+ * @returns The newly created and provided `ThemeInstance`.
73
+ *
74
+ * @throws {Error} If the resolved theme name does not exist in the available themes.
76
75
  */
77
76
  export declare function provideTheme(nameOrDef: MaybeRefOrGetter<string | ThemeDefinition>): ThemeInstance;
78
77
  //# sourceMappingURL=theme.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/composables/theme.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AACzF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAMjD,eAAO,MAAM,WAAW,EAAE,YAAY,CAAC,aAAa,CAAyB,CAAA;AAE7E;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;AAExC;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG;IACvB,6DAA6D;IAC7D,YAAY,EAAE,MAAM,CAAA;IAEpB,mEAAmE;IACnE,MAAM,EAAE,KAAK,CAAC;QACb,6BAA6B;QAC7B,IAAI,EAAE,MAAM,CAAA;QAEZ,mDAAmD;QACnD,IAAI,EAA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BAAgB,CAAC,MAAM,GAAG,eAAe,CAAC,GAAG,aAAa,CA2CjG"}
@@ -1,22 +1,22 @@
1
- import { toValue as c, provide as i, inject as h } from "vue";
2
- import { createThemeInstance as u } from "../utils/theme.js";
1
+ import { computed as n, toValue as c, provide as a, inject as l } from "vue";
2
+ import { createThemeInstance as h } from "../utils/theme.js";
3
3
  const m = Symbol.for("q-theme");
4
- function f() {
5
- const e = h(m);
4
+ function v() {
5
+ const e = l(m);
6
6
  if (!e)
7
7
  throw new Error("[Quidgest UI] Could not find theme instance");
8
8
  return e;
9
9
  }
10
- function d(e) {
11
- const s = f();
12
- let n, o = structuredClone(s.themes);
13
- const t = c(e);
14
- typeof t != "string" ? (o = [...o, t], n = t.name) : n = t;
15
- const r = u(n, o);
16
- return i(m, r), r;
10
+ function p(e) {
11
+ const { themes: o } = v(), t = n(() => c(e)), s = n(() => typeof t.value != "string"), r = n(
12
+ () => s.value ? t.value.name : t.value
13
+ ), u = n(
14
+ () => s.value ? [...o.value, t.value] : o.value
15
+ ), i = h(r, u);
16
+ return a(m, i), i;
17
17
  }
18
18
  export {
19
19
  m as ThemeSymbol,
20
- d as provideTheme,
21
- f as useTheme
20
+ p as provideTheme,
21
+ v as useTheme
22
22
  };
package/esm/framework.js CHANGED
@@ -1,21 +1,21 @@
1
- import { DEFAULTS_SYMBOL as i } from "./composables/defaults.js";
1
+ import { DEFAULTS_SYMBOL as c } from "./composables/defaults.js";
2
2
  import { ThemeSymbol as h } from "./composables/theme.js";
3
3
  import { DismissibleLayerKey as f } from "./symbols/dismissibleLayer.js";
4
4
  import { ToastSymbol as d } from "./composables/useToast/types.js";
5
5
  import { useDismissibleLayerStack as u } from "./composables/useDismissibleLayerStack/index.js";
6
6
  import { createToastInstance as p } from "./composables/useToast/index.js";
7
- import { defaultLightColorScheme as r, defaultDarkColorScheme as l } from "./templates/theme.js";
8
- import { ref as c, watch as S } from "vue";
7
+ import { defaultLightColorScheme as l, defaultDarkColorScheme as i } from "./templates/theme.js";
8
+ import { ref as n, watch as S } from "vue";
9
9
  import { createThemeInstance as T, generateRootStyle as L } from "./utils/theme.js";
10
10
  function N(o = {}) {
11
11
  return { install: (t) => {
12
12
  const m = o.components || {};
13
- for (const n in m)
14
- t.component(n, m[n]);
13
+ for (const a in m)
14
+ t.component(a, m[a]);
15
15
  const e = o.defaults || {};
16
- t.provide(i, c(e)), y(t, o.themes);
17
- const a = u();
18
- t.provide(f, a), b(t);
16
+ t.provide(c, n(e)), y(t, o.themes);
17
+ const r = u();
18
+ t.provide(f, r), b(t);
19
19
  } };
20
20
  }
21
21
  function y(o, s) {
@@ -23,11 +23,11 @@ function y(o, s) {
23
23
  let m;
24
24
  if (s)
25
25
  for (const e of s.themes) {
26
- const n = { ...e.mode === "light" ? r : l, ...e.colors };
26
+ const a = { ...e.mode === "light" ? l : i, ...e.colors };
27
27
  t.push({
28
28
  name: e.name,
29
29
  mode: e.mode,
30
- scheme: n
30
+ scheme: a
31
31
  }), e.name === s.defaultTheme && (m = e.name);
32
32
  }
33
33
  else {
@@ -35,19 +35,19 @@ function y(o, s) {
35
35
  {
36
36
  name: "light",
37
37
  mode: "light",
38
- scheme: r
38
+ scheme: l
39
39
  },
40
40
  {
41
41
  name: "dark",
42
42
  mode: "dark",
43
- scheme: l
43
+ scheme: i
44
44
  }
45
45
  ];
46
46
  t.push(...e), m = "light";
47
47
  }
48
48
  if (m) {
49
- const e = c(m), a = T(e, t);
50
- L(t), S(a.class, k, { immediate: !0 }), o.provide(h, a);
49
+ const e = T(n(m), n(t));
50
+ L(t), S(e.class, k, { immediate: !0 }), o.provide(h, e);
51
51
  }
52
52
  }
53
53
  function b(o) {
@@ -1,4 +1,4 @@
1
- const f = {
1
+ const a = {
2
2
  primary: "#008ad2",
3
3
  primaryLight: "#cde5ff",
4
4
  primaryDark: "#006398",
@@ -34,44 +34,44 @@ const f = {
34
34
  onDanger: "#fff",
35
35
  onInfo: "#fff",
36
36
  onNeutral: "#fff"
37
- }, a = {
37
+ }, f = {
38
38
  primary: "#4da6e0",
39
- primaryLight: "#2d8bc7",
40
- primaryDark: "#87c4e8",
41
- secondary: "#4a6b82",
42
- secondaryLight: "#2c4a5e",
43
- secondaryDark: "#6b8ca3",
39
+ primaryLight: "#1a2832",
40
+ primaryDark: "#87c5f0",
41
+ secondary: "#b8d4e6",
42
+ secondaryLight: "#1a2832",
43
+ secondaryDark: "#e6f2ff",
44
44
  highlight: "#ff9966",
45
- highlightLight: "#e67344",
46
- highlightDark: "#ffb088",
47
- info: "#3bb5d1",
48
- infoLight: "#2a9bb8",
49
- infoDark: "#66c7dd",
50
- success: "#4caf50",
51
- successLight: "#388e3c",
52
- successDark: "#81c784",
53
- warning: "#ffb74d",
54
- warningLight: "#e67e22",
55
- warningDark: "#ffcc80",
56
- danger: "#e57373",
57
- dangerLight: "#c62828",
58
- dangerDark: "#ef9a9a",
45
+ highlightLight: "#2d1a0f",
46
+ highlightDark: "#ffb899",
47
+ info: "#4cb8d1",
48
+ infoLight: "#1f2a2d",
49
+ infoDark: "#7dcce0",
50
+ success: "#5cb85c",
51
+ successLight: "#1e2a20",
52
+ successDark: "#85d085",
53
+ warning: "#ffcc4d",
54
+ warningLight: "#332a1a",
55
+ warningDark: "#ffd966",
56
+ danger: "#e74c3c",
57
+ dangerLight: "#2d1a1a",
58
+ dangerDark: "#f17066",
59
59
  background: "#121212",
60
60
  container: "#1e1e1e",
61
- neutral: "#9e9e9e",
62
- neutralLight: "#666666",
63
- neutralDark: "#d0d0d0",
64
- onBackground: "#ffffff",
65
- onPrimary: "#ffffff",
66
- onSecondary: "#ffffff",
67
- onHighlight: "#ffffff",
68
- onSuccess: "#ffffff",
69
- onWarning: "#000000",
70
- onDanger: "#ffffff",
71
- onInfo: "#ffffff",
72
- onNeutral: "#000000"
61
+ neutral: "#9ca3ab",
62
+ neutralLight: "#2a2d31",
63
+ neutralDark: "#c8ced6",
64
+ onBackground: "#e0e0e0",
65
+ onPrimary: "#000",
66
+ onSecondary: "#000",
67
+ onHighlight: "#000",
68
+ onSuccess: "#000",
69
+ onWarning: "#000",
70
+ onDanger: "#000",
71
+ onInfo: "#000",
72
+ onNeutral: "#000"
73
73
  };
74
74
  export {
75
- a as defaultDarkColorScheme,
76
- f as defaultLightColorScheme
75
+ f as defaultDarkColorScheme,
76
+ a as defaultLightColorScheme
77
77
  };