@ac-design/design-system 2.5.2 → 2.6.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.
@@ -3124,6 +3124,9 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
3124
3124
  .pb-1:where([data-ac-ds], [data-ac-ds] *) {
3125
3125
  padding-bottom: var(--spacing) !important;
3126
3126
  }
3127
+ .pb-1\.5:where([data-ac-ds], [data-ac-ds] *) {
3128
+ padding-bottom: calc(var(--spacing) * 1.5) !important;
3129
+ }
3127
3130
  .pb-2:where([data-ac-ds], [data-ac-ds] *) {
3128
3131
  padding-bottom: calc(var(--spacing) * 2) !important;
3129
3132
  }
@@ -32,7 +32,7 @@ export interface Props {
32
32
  isOfflineInstaller?: boolean;
33
33
  /** Replaces the built-in AppsCode list. Entries without `url` get one built from `baseUrl`; the self-host and org-type rules aren't applied. */
34
34
  apps?: AppSwitcherApp[];
35
- /** Hides the current app; defaults to `true` to match the old component. */
35
+ /** Hides the current app. By default it shows, highlighted with a check, so people see where they are; clicking it closes the menu. */
36
36
  hideCurrent?: boolean;
37
37
  /** Accessible name of the grid button, and the panel heading. */
38
38
  label?: string;
@@ -44,7 +44,7 @@ var ae = {
44
44
  apps: { default: void 0 },
45
45
  hideCurrent: {
46
46
  type: Boolean,
47
- default: !0
47
+ default: !1
48
48
  },
49
49
  label: { default: "AppsCode apps" },
50
50
  align: { default: "end" }
@@ -176,7 +176,11 @@ var ae = {
176
176
  let e = [`gorg=${encodeURIComponent(k.activeOrganization)}`, "path=/"];
177
177
  k.rootDomain && e.push(`domain=${k.rootDomain}`), document.cookie = e.join("; ");
178
178
  }
179
- function be(e) {
179
+ function be(e, t) {
180
+ if (K(e)) {
181
+ t?.preventDefault(), Z();
182
+ return;
183
+ }
180
184
  e.name === "grafana" && ye(), j("select", e);
181
185
  }
182
186
  function xe(e) {
@@ -262,7 +266,7 @@ var ae = {
262
266
  class: "group relative flex h-full flex-col items-center gap-2 rounded-8 px-1.5 pt-3 pb-2.5 text-center no-underline outline-none transition-colors duration-200 hover:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset aria-[current=page]:bg-accent",
263
267
  "data-ac-ds": "",
264
268
  "data-testid": "ac-app-switcher-app",
265
- onClick: (t) => be(e)
269
+ onClick: (t) => be(e, t)
266
270
  }, [
267
271
  u("span", {
268
272
  class: h(["relative inline-flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-10 ring-1 transition-transform duration-200 ring-inset motion-safe:group-hover:-translate-y-px", e.iconUrl || e.name === E && !e.icon ? "bg-surface ring-border" : I[e.color ?? "slate"]]),
@@ -18,8 +18,14 @@ export interface UserMenuWorkspace {
18
18
  displayName?: string;
19
19
  /** Logo or profile photo. Organisations without one show a building icon. */
20
20
  avatarUrl?: string;
21
- /** `user` is the personal account: a round avatar and "(Personal)". `organization` gets a square logo. */
21
+ /** `user` is the personal account: a round avatar and "(Personal)". `organization` gets a square building icon when it has no logo; a logo shows round. */
22
22
  type?: "user" | "organization";
23
+ /** What kind of account it is, under its name in the trigger and the current-account card, e.g. "Admin org". Defaults to "Personal account" or "Organization". */
24
+ kind?: string;
25
+ /** Line under the name in the switch list, e.g. "Your own clusters and settings". Defaults to the kind and `@name`. */
26
+ description?: string;
27
+ /** Tint of the current-account card: `primary` (default for a personal account), `info` (default for an organisation) or `warning`, e.g. for an admin org. */
28
+ tone?: "primary" | "info" | "warning";
23
29
  }
24
30
  export interface Props {
25
31
  /** The person's name or username. The avatar shows its initials. */
@@ -44,8 +50,12 @@ export interface Props {
44
50
  logoutLabel?: string;
45
51
  /** The person's account and organisations, listed at the top of the menu like cloud-ui's workspace switcher. Choosing one updates `v-model:workspace` and emits `switch-workspace`. */
46
52
  workspaces?: UserMenuWorkspace[];
47
- /** Heading of the workspace list. */
53
+ /** Heading of the workspace list. Defaults to "Switch to", or "Workspaces" with `workspace-style="list"`. */
48
54
  workspacesLabel?: string;
55
+ /** How `workspaces` show. `switcher`: the trigger names the current workspace and its kind, and the menu opens with a tinted current-account card and a "Switch to" list of the others. `list`: the trigger shows the person, and every workspace is one list with a check on the current one. */
56
+ workspaceStyle?: "switcher" | "list";
57
+ /** Heading above the current-account card in the `switcher` style. */
58
+ currentLabel?: string;
49
59
  /** Shows the name, email and avatar at the top of the menu. cloud-ui's workspace menu leaves it out and starts with the workspaces. */
50
60
  showProfile?: boolean;
51
61
  /** Shows the sign-out icon before `logoutLabel`. cloud-ui's workspace menu shows the text only. */
@@ -94,6 +104,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
94
104
  logoutLabel: string;
95
105
  workspaces: UserMenuWorkspace[];
96
106
  workspacesLabel: string;
107
+ workspaceStyle: "switcher" | "list";
108
+ currentLabel: string;
97
109
  showProfile: boolean;
98
110
  logoutIcon: boolean;
99
111
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -2,40 +2,46 @@ import { fixedFrame as e } from "./fixedFrame.js";
2
2
  import t from "./AcAvatar.js";
3
3
  import n from "./AcFontScale.js";
4
4
  import r from "./AcThemeMode.js";
5
- import { Fragment as i, Teleport as a, Transition as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, getCurrentInstance as ee, mergeModels as h, mergeProps as te, nextTick as g, normalizeClass as _, normalizeStyle as ne, onBeforeUnmount as re, openBlock as v, ref as y, renderList as b, renderSlot as x, resolveDynamicComponent as S, toDisplayString as C, unref as w, useId as ie, useModel as T, useSlots as ae, watch as E, withCtx as D } from "vue";
6
- import { Building2 as oe, Check as se, ChevronDown as ce, LogOut as le } from "@lucide/vue";
5
+ import { Fragment as i, Teleport as ee, Transition as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, getCurrentInstance as te, mergeModels as m, mergeProps as ne, nextTick as re, normalizeClass as h, normalizeStyle as ie, onBeforeUnmount as ae, openBlock as g, ref as _, renderList as v, renderSlot as y, resolveDynamicComponent as b, toDisplayString as x, unref as S, useId as oe, useModel as se, useSlots as ce, watch as C, withCtx as w } from "vue";
6
+ import { Building2 as le, Check as ue, ChevronDown as de, CircleCheck as fe, LogOut as pe } from "@lucide/vue";
7
7
  //#region src/lib/components/AcUserMenu.vue?vue&type=script&setup=true&lang.ts
8
- var ue = {
8
+ var me = {
9
9
  class: "inline-flex",
10
10
  "data-ac-ds": "",
11
11
  "data-testid": "ac-user-menu"
12
- }, de = [
12
+ }, he = [
13
13
  "aria-expanded",
14
14
  "aria-controls",
15
15
  "aria-label"
16
- ], fe = {
16
+ ], ge = {
17
17
  key: 0,
18
- class: "hidden max-w-36 truncate text-base font-medium text-heading md:block"
19
- }, pe = {
18
+ class: "hidden min-w-0 flex-col items-end leading-tight md:flex"
19
+ }, _e = { class: "max-w-36 truncate text-base font-medium text-heading" }, ve = { class: "max-w-36 truncate text-xs text-muted" }, ye = {
20
20
  key: 1,
21
+ class: "hidden max-w-36 truncate text-base font-medium text-heading md:block"
22
+ }, be = {
23
+ key: 2,
21
24
  class: "inline-flex shrink-0",
22
25
  "aria-hidden": "true"
23
- }, me = {
24
- key: 2,
26
+ }, xe = {
27
+ key: 4,
25
28
  class: "inline-flex size-9 shrink-0 rounded-full bg-linear-to-r from-primary/70 to-primary/90 p-0.5",
26
29
  "aria-hidden": "true"
27
- }, he = { class: "inline-flex size-full items-center justify-center overflow-hidden rounded-full bg-surface text-xs font-semibold text-primary-strong" }, ge = ["src"], _e = {
30
+ }, Se = { class: "inline-flex size-full items-center justify-center overflow-hidden rounded-full bg-surface text-xs font-semibold text-primary-strong" }, Ce = ["src"], we = {
28
31
  class: "inline-flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-full bg-primary/10 text-base font-semibold text-primary-strong ring-1 ring-primary/25 ring-inset",
29
32
  "aria-hidden": "true"
30
- }, ve = ["src"], ye = { class: "min-w-0 flex-1" }, be = { class: "block truncate text-base font-medium text-heading" }, xe = {
33
+ }, Te = ["src"], Ee = { class: "min-w-0 flex-1" }, De = { class: "block truncate text-base font-medium text-heading" }, Oe = {
31
34
  key: 0,
32
35
  class: "block truncate text-xs text-muted"
33
- }, Se = ["aria-labelledby"], Ce = ["id"], we = { class: "flex flex-col gap-1" }, Te = ["aria-checked", "onClick"], Ee = { class: "flex min-w-0 items-center gap-2" }, De = { class: "min-w-0" }, Oe = { class: "block truncate font-medium text-heading" }, ke = { class: "block truncate text-xs text-muted" }, Ae = ["aria-labelledby"], je = ["id"], Me = ["aria-labelledby"], Ne = ["id"], Pe = {
36
+ }, ke = {
37
+ class: "mt-1 border-t border-border px-2 pt-2 pb-1 first:mt-0 first:border-t-0",
38
+ "data-testid": "ac-user-menu-current"
39
+ }, Ae = { class: "m-0 px-1 pb-1.5 text-xs font-semibold tracking-wide text-muted uppercase" }, je = { class: "flex min-w-0 flex-1 flex-col leading-tight" }, Me = { class: "truncate text-base font-semibold text-heading" }, Ne = { class: "truncate text-xs text-muted" }, Pe = ["aria-labelledby"], Fe = ["id"], Ie = ["onClick"], Le = { class: "flex min-w-0 flex-col leading-tight" }, Re = { class: "truncate text-base font-medium text-heading" }, ze = { class: "truncate text-xs font-normal text-muted" }, Be = ["aria-labelledby"], Ve = ["id"], He = { class: "flex flex-col gap-1" }, Ue = ["aria-checked", "onClick"], We = { class: "flex min-w-0 items-center gap-2" }, Ge = { class: "min-w-0" }, Ke = { class: "block truncate font-medium text-heading" }, qe = { class: "block truncate text-xs text-muted" }, Je = ["aria-labelledby"], Ye = ["id"], Xe = ["aria-labelledby"], Ze = ["id"], Qe = {
34
40
  role: "group",
35
41
  class: "mt-1 flex flex-col border-t border-border py-1 first:mt-0 first:border-t-0"
36
- }, Fe = { class: "min-w-0 flex-1 truncate" }, O = "flex min-h-10 w-full cursor-pointer items-center gap-2 rounded-8 px-4 py-2.5 text-left text-base font-medium no-underline outline-none transition-colors duration-150 hover:bg-surface-sunken focus-visible:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0", Ie = "[role=\"menuitem\"]:not([aria-disabled=\"true\"]), [role=\"menuitemradio\"], [role=\"radio\"]", k = /*@__PURE__*/ m({
42
+ }, $e = { class: "min-w-0 flex-1 truncate" }, T = "flex min-h-10 w-full cursor-pointer items-center gap-2 rounded-8 px-4 py-2.5 text-left text-base font-medium no-underline outline-none transition-colors duration-150 hover:bg-surface-sunken focus-visible:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0", et = "[role=\"menuitem\"]:not([aria-disabled=\"true\"]), [role=\"menuitemradio\"], [role=\"radio\"]", E = /*@__PURE__*/ p({
37
43
  __name: "AcUserMenu",
38
- props: /*@__PURE__*/ h({
44
+ props: /*@__PURE__*/ m({
39
45
  name: {},
40
46
  email: { default: "" },
41
47
  avatarUrl: { default: "" },
@@ -56,7 +62,9 @@ var ue = {
56
62
  logoutUrl: { default: "" },
57
63
  logoutLabel: { default: "Sign out" },
58
64
  workspaces: { default: () => [] },
59
- workspacesLabel: { default: "Workspaces" },
65
+ workspacesLabel: { default: void 0 },
66
+ workspaceStyle: { default: "switcher" },
67
+ currentLabel: { default: "Current account" },
60
68
  showProfile: {
61
69
  type: Boolean,
62
70
  default: !0
@@ -74,254 +82,333 @@ var ue = {
74
82
  workspace: { default: "" },
75
83
  workspaceModifiers: {}
76
84
  }),
77
- emits: /*@__PURE__*/ h([
85
+ emits: /*@__PURE__*/ m([
78
86
  "select",
79
87
  "logout",
80
88
  "set:theme",
81
89
  "switch-workspace"
82
90
  ], ["update:open", "update:workspace"]),
83
- setup(m, { emit: h }) {
84
- let k = m, A = T(m, "open"), j = T(m, "workspace"), M = h, Le = ae(), N = `${O} text-heading [&>svg]:text-muted`, Re = `${O} text-danger-strong`, P = ee()?.appContext.components.RouterLink, F = ie(), I = `${F}-trigger`, L = `${F}-menu`, R = y(null), z = y(null), B = y(!1), V = y({
91
+ setup(p, { emit: m }) {
92
+ let E = p, D = se(p, "open"), O = se(p, "workspace"), k = m, tt = ce(), A = `${T} text-heading [&>svg]:text-muted`, nt = `${T} text-danger-strong`, j = te()?.appContext.components.RouterLink, M = oe(), N = `${M}-trigger`, rt = `${M}-menu`, P = _(null), F = _(null), I = _(!1), L = _({
85
93
  top: 0,
86
94
  right: 0
87
- }), H = s(() => {
88
- let e = k.name.trim().split(/[\s._-]+/).filter(Boolean);
95
+ }), R = o(() => {
96
+ let e = E.name.trim().split(/[\s._-]+/).filter(Boolean);
89
97
  return e.length ? (e[0].charAt(0) + (e.length > 1 ? e[e.length - 1].charAt(0) : "")).toUpperCase() : "?";
90
- }), U = s(() => !!k.avatarUrl && !B.value);
91
- function W(e) {
92
- return e.to && P && !e.disabled ? P : e.to || e.href ? "a" : "button";
98
+ }), it = o(() => !!E.avatarUrl && !I.value), z = o(() => E.workspaceStyle === "switcher" && E.workspaces.length > 0), B = o(() => E.workspaces.find((e) => e.name === O.value) ?? E.workspaces[0]), V = o(() => E.workspaces.filter((e) => e !== B.value)), H = o(() => E.workspacesLabel ?? (z.value ? "Switch to" : "Workspaces")), at = {
99
+ primary: {
100
+ card: "border-primary/40 bg-primary/8",
101
+ icon: "text-primary"
102
+ },
103
+ info: {
104
+ card: "border-info/40 bg-info/8",
105
+ icon: "text-info"
106
+ },
107
+ warning: {
108
+ card: "border-warning/40 bg-warning/10",
109
+ icon: "text-warning-strong"
110
+ }
111
+ }, U = (e) => e.displayName || e.name, W = (e) => e.kind || (e.type === "user" ? "Personal account" : "Organization"), ot = (e) => e.description || (e.type === "user" ? W(e) : `${W(e)} · @${e.name}`), G = (e) => at[e.tone ?? (e.type === "user" ? "primary" : "info")], K = (e) => e.type === "user" || e.avatarUrl ? "circle" : "square";
112
+ function q(e) {
113
+ return e.to && j && !e.disabled ? j : e.to || e.href ? "a" : "button";
93
114
  }
94
- function ze(e) {
95
- let t = W(e);
96
- return t === P ? { to: e.to } : t === "a" ? e.disabled ? { "aria-disabled": "true" } : { href: e.href ?? (typeof e.to == "string" ? e.to : void 0) } : {
115
+ function st(e) {
116
+ let t = q(e);
117
+ return t === j ? { to: e.to } : t === "a" ? e.disabled ? { "aria-disabled": "true" } : { href: e.href ?? (typeof e.to == "string" ? e.to : void 0) } : {
97
118
  type: "button",
98
119
  "aria-disabled": e.disabled ? "true" : void 0
99
120
  };
100
121
  }
101
- function G() {
102
- return [...z.value?.querySelectorAll(Ie) ?? []];
122
+ function J() {
123
+ return [...F.value?.querySelectorAll(et) ?? []];
103
124
  }
104
- function K(e) {
105
- let t = G();
125
+ function Y(e) {
126
+ let t = J();
106
127
  t.length && t[(e + t.length) % t.length].focus();
107
128
  }
108
- function q() {
109
- let t = R.value;
129
+ function X() {
130
+ let t = P.value;
110
131
  if (!t) return;
111
- let n = t.getBoundingClientRect(), r = e(), i = z.value?.offsetHeight ?? 320, a = z.value?.offsetWidth ?? 256, o = Math.max(8, Math.min(r.right - n.right, r.width - a - 8)), s = r.bottom - n.bottom - 6 - 8;
112
- V.value = s < i && n.top - r.top > s ? {
132
+ let n = t.getBoundingClientRect(), r = e(), i = F.value?.offsetHeight ?? 320, ee = F.value?.offsetWidth ?? 256, a = Math.max(8, Math.min(r.right - n.right, r.width - ee - 8)), o = r.bottom - n.bottom - 6 - 8;
133
+ L.value = o < i && n.top - r.top > o ? {
113
134
  bottom: r.bottom - n.top + 6,
114
- right: o
135
+ right: a
115
136
  } : {
116
137
  top: n.bottom + 6 - r.top,
117
- right: o
138
+ right: a
118
139
  };
119
140
  }
120
- async function J(e = "first") {
121
- A.value = !0, await g(), q(), K(e === "first" ? 0 : -1);
141
+ async function Z(e = "first") {
142
+ D.value = !0, await re(), X(), Y(e === "first" ? 0 : -1);
122
143
  }
123
- function Y(e = !0) {
124
- A.value && (A.value = !1, e && R.value?.focus());
144
+ function Q(e = !0) {
145
+ D.value && (D.value = !1, e && P.value?.focus());
125
146
  }
126
- function Be(e) {
147
+ function ct(e) {
127
148
  [
128
149
  "Enter",
129
150
  " ",
130
151
  "ArrowDown"
131
- ].includes(e.key) ? (e.preventDefault(), J("first")) : e.key === "ArrowUp" && (e.preventDefault(), J("last"));
152
+ ].includes(e.key) ? (e.preventDefault(), Z("first")) : e.key === "ArrowUp" && (e.preventDefault(), Z("last"));
132
153
  }
133
- function X(e) {
134
- let t = G().indexOf(document.activeElement);
135
- e.key === "ArrowDown" ? (e.preventDefault(), K(t + 1)) : e.key === "ArrowUp" ? (e.preventDefault(), K(t - 1)) : e.key === "Home" ? (e.preventDefault(), K(0)) : e.key === "End" ? (e.preventDefault(), K(-1)) : e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), Y()) : e.key === "Tab" && Y();
154
+ function lt(e) {
155
+ let t = J().indexOf(document.activeElement);
156
+ e.key === "ArrowDown" ? (e.preventDefault(), Y(t + 1)) : e.key === "ArrowUp" ? (e.preventDefault(), Y(t - 1)) : e.key === "Home" ? (e.preventDefault(), Y(0)) : e.key === "End" ? (e.preventDefault(), Y(-1)) : e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), Q()) : e.key === "Tab" && Q();
136
157
  }
137
- function Ve(e) {
138
- e.disabled || (M("select", e), Y());
158
+ function ut(e) {
159
+ e.disabled || (k("select", e), Q());
139
160
  }
140
- function He(e) {
141
- e.name !== j.value && (j.value = e.name, M("switch-workspace", e)), Y();
161
+ function dt(e) {
162
+ e.name !== O.value && (O.value = e.name, k("switch-workspace", e)), Q();
142
163
  }
143
- function Ue() {
144
- M("logout"), Y(!1);
164
+ function ft() {
165
+ k("logout"), Q(!1);
145
166
  }
146
- function Z(e) {
167
+ function pt(e) {
147
168
  let t = e.target;
148
- R.value?.contains(t) || z.value?.contains(t) || Y(!1);
149
- }
150
- function Q() {
151
- q();
169
+ P.value?.contains(t) || F.value?.contains(t) || Q(!1);
152
170
  }
153
171
  function $() {
154
- document.removeEventListener("pointerdown", Z, !0), window.removeEventListener("scroll", Q, !0), window.removeEventListener("resize", Q);
172
+ X();
173
+ }
174
+ function mt() {
175
+ document.removeEventListener("pointerdown", pt, !0), window.removeEventListener("scroll", $, !0), window.removeEventListener("resize", $);
155
176
  }
156
- return E(A, (e) => {
157
- if (!e) return $();
158
- document.addEventListener("pointerdown", Z, !0), window.addEventListener("scroll", Q, !0), window.addEventListener("resize", Q), g(q);
159
- }), E(() => k.avatarUrl, () => B.value = !1), re($), (e, s) => (v(), u("div", ue, [d("button", {
160
- id: I,
177
+ return C(D, (e) => {
178
+ if (!e) return mt();
179
+ document.addEventListener("pointerdown", pt, !0), window.addEventListener("scroll", $, !0), window.addEventListener("resize", $), re(X);
180
+ }), C(() => E.avatarUrl, () => I.value = !1), ae(mt), (e, o) => (g(), l("div", me, [u("button", {
181
+ id: N,
161
182
  ref_key: "trigger",
162
- ref: R,
183
+ ref: P,
163
184
  type: "button",
164
185
  "aria-haspopup": "menu",
165
- "aria-expanded": A.value,
166
- "aria-controls": A.value ? L : void 0,
167
- "aria-label": `${m.name}, account menu`,
168
- class: _(["group inline-flex shrink-0 cursor-pointer items-center gap-2 rounded-10 border border-transparent p-2 transition-colors duration-200 hover:border-border hover:bg-surface-sunken/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface", [m.showName && "md:px-4", A.value && "border-border bg-surface-sunken/50"]]),
186
+ "aria-expanded": D.value,
187
+ "aria-controls": D.value ? rt : void 0,
188
+ "aria-label": z.value && B.value ? `${U(B.value)}, ${W(B.value)}, account menu` : `${p.name}, account menu`,
189
+ class: h(["group inline-flex shrink-0 cursor-pointer items-center gap-2 rounded-10 border border-transparent p-2 transition-colors duration-200 hover:border-border hover:bg-surface-sunken/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface", [p.showName && "md:px-4", D.value && "border-border bg-surface-sunken/50"]]),
169
190
  "data-ac-ds": "",
170
191
  "data-testid": "ac-user-menu-trigger",
171
- onClick: s[1] ||= (e) => A.value ? Y() : J(),
172
- onKeydown: Be
192
+ onClick: o[1] ||= (e) => D.value ? Q() : Z(),
193
+ onKeydown: ct
173
194
  }, [
174
- m.showName ? (v(), u("span", fe, C(m.name), 1)) : l("", !0),
175
- Le.avatar ? (v(), u("span", pe, [x(e.$slots, "avatar")])) : (v(), u("span", me, [d("span", he, [U.value ? (v(), u("img", {
195
+ p.showName && z.value && B.value ? (g(), l("span", ge, [u("span", _e, x(U(B.value)), 1), u("span", ve, x(W(B.value)), 1)])) : p.showName ? (g(), l("span", ye, x(p.name), 1)) : c("", !0),
196
+ tt.avatar ? (g(), l("span", be, [y(e.$slots, "avatar")])) : z.value && B.value ? (g(), s(t, {
197
+ key: 3,
198
+ name: U(B.value),
199
+ "img-url": B.value.avatarUrl,
200
+ kind: B.value.type === "user" ? "person" : "organization",
201
+ shape: K(B.value),
202
+ alt: "",
203
+ class: "ring-1 ring-border"
204
+ }, null, 8, [
205
+ "name",
206
+ "img-url",
207
+ "kind",
208
+ "shape"
209
+ ])) : (g(), l("span", xe, [u("span", Se, [it.value ? (g(), l("img", {
176
210
  key: 0,
177
- src: m.avatarUrl,
211
+ src: p.avatarUrl,
178
212
  alt: "",
179
213
  class: "size-full object-cover",
180
- onError: s[0] ||= (e) => B.value = !0
181
- }, null, 40, ge)) : (v(), u(i, { key: 1 }, [f(C(H.value), 1)], 64))])])),
182
- m.showName ? (v(), c(w(ce), {
183
- key: 3,
184
- class: _(["hidden size-4 shrink-0 text-muted transition-transform duration-200 motion-reduce:transition-none sm:block", A.value && "rotate-180"]),
214
+ onError: o[0] ||= (e) => I.value = !0
215
+ }, null, 40, Ce)) : (g(), l(i, { key: 1 }, [d(x(R.value), 1)], 64))])])),
216
+ p.showName ? (g(), s(S(de), {
217
+ key: 5,
218
+ class: h(["hidden size-4 shrink-0 text-muted transition-transform duration-200 motion-reduce:transition-none sm:block", D.value && "rotate-180"]),
185
219
  "aria-hidden": "true"
186
- }, null, 8, ["class"])) : l("", !0)
187
- ], 42, de), (v(), c(a, { to: "body" }, [p(o, {
220
+ }, null, 8, ["class"])) : c("", !0)
221
+ ], 42, he), (g(), s(ee, { to: "body" }, [f(a, {
188
222
  "enter-active-class": "transition duration-150 ease-out motion-reduce:transition-none",
189
223
  "enter-from-class": "opacity-0 scale-95",
190
224
  "leave-active-class": "transition duration-100 ease-in",
191
225
  "leave-to-class": "opacity-0"
192
226
  }, {
193
- default: D(() => [A.value ? (v(), u("div", {
227
+ default: w(() => [D.value ? (g(), l("div", {
194
228
  key: 0,
195
- id: L,
229
+ id: rt,
196
230
  ref_key: "panel",
197
- ref: z,
231
+ ref: F,
198
232
  role: "menu",
199
- "aria-labelledby": I,
233
+ "aria-labelledby": N,
200
234
  class: "fixed z-[90] w-64 max-w-[calc(100vw-16px)] origin-top-right overflow-hidden rounded-14 border border-border/80 bg-surface p-1 shadow-lg",
201
- style: ne({
202
- top: V.value.top === void 0 ? void 0 : `${V.value.top}px`,
203
- bottom: V.value.bottom === void 0 ? void 0 : `${V.value.bottom}px`,
204
- right: `${V.value.right}px`
235
+ style: ie({
236
+ top: L.value.top === void 0 ? void 0 : `${L.value.top}px`,
237
+ bottom: L.value.bottom === void 0 ? void 0 : `${L.value.bottom}px`,
238
+ right: `${L.value.right}px`
205
239
  }),
206
240
  "data-ac-ds": "",
207
241
  "data-testid": "ac-user-menu-panel",
208
- onKeydown: X
242
+ onKeydown: lt
209
243
  }, [
210
- m.showProfile ? (v(), c(S(m.profileUrl ? "a" : "div"), {
244
+ p.showProfile ? (g(), s(b(p.profileUrl ? "a" : "div"), {
211
245
  key: 0,
212
- href: m.profileUrl || void 0,
213
- role: m.profileUrl ? "menuitem" : "presentation",
214
- tabindex: m.profileUrl ? -1 : void 0,
215
- class: _(["flex items-center gap-3 rounded-8 px-3 py-2.5 no-underline outline-none", m.profileUrl && "transition-colors duration-150 hover:bg-surface-sunken focus-visible:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset"])
246
+ href: p.profileUrl || void 0,
247
+ role: p.profileUrl ? "menuitem" : "presentation",
248
+ tabindex: p.profileUrl ? -1 : void 0,
249
+ class: h(["flex items-center gap-3 rounded-8 px-3 py-2.5 no-underline outline-none", p.profileUrl && "transition-colors duration-150 hover:bg-surface-sunken focus-visible:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset"])
216
250
  }, {
217
- default: D(() => [d("span", _e, [U.value ? (v(), u("img", {
251
+ default: w(() => [u("span", we, [it.value ? (g(), l("img", {
218
252
  key: 0,
219
- src: m.avatarUrl,
253
+ src: p.avatarUrl,
220
254
  alt: "",
221
255
  class: "size-full object-cover",
222
- onError: s[2] ||= (e) => B.value = !0
223
- }, null, 40, ve)) : (v(), u(i, { key: 1 }, [f(C(H.value), 1)], 64))]), d("span", ye, [d("span", be, C(m.name), 1), m.email ? (v(), u("span", xe, C(m.email), 1)) : l("", !0)])]),
256
+ onError: o[2] ||= (e) => I.value = !0
257
+ }, null, 40, Te)) : (g(), l(i, { key: 1 }, [d(x(R.value), 1)], 64))]), u("span", Ee, [u("span", De, x(p.name), 1), p.email ? (g(), l("span", Oe, x(p.email), 1)) : c("", !0)])]),
224
258
  _: 1
225
259
  }, 8, [
226
260
  "href",
227
261
  "role",
228
262
  "tabindex",
229
263
  "class"
230
- ])) : l("", !0),
231
- m.workspaces.length ? (v(), u("div", {
232
- key: 1,
264
+ ])) : c("", !0),
265
+ z.value && B.value ? (g(), l(i, { key: 1 }, [u("div", ke, [u("p", Ae, x(p.currentLabel), 1), u("div", {
266
+ class: h(["flex items-center gap-3 rounded-10 border px-3 py-2", G(B.value).card]),
267
+ "aria-current": "true"
268
+ }, [
269
+ f(t, {
270
+ name: U(B.value),
271
+ "img-url": B.value.avatarUrl,
272
+ kind: B.value.type === "user" ? "person" : "organization",
273
+ shape: K(B.value),
274
+ size: "small",
275
+ alt: ""
276
+ }, null, 8, [
277
+ "name",
278
+ "img-url",
279
+ "kind",
280
+ "shape"
281
+ ]),
282
+ u("span", je, [u("span", Me, x(U(B.value)), 1), u("span", Ne, x(W(B.value)), 1)]),
283
+ f(S(fe), {
284
+ class: h(["size-5 shrink-0", G(B.value).icon]),
285
+ "aria-label": p.currentLabel
286
+ }, null, 8, ["class", "aria-label"])
287
+ ], 2)]), V.value.length ? (g(), l("div", {
288
+ key: 0,
289
+ role: "group",
290
+ "aria-labelledby": `${S(M)}-workspaces`,
291
+ class: "px-1 pb-1"
292
+ }, [u("p", {
293
+ id: `${S(M)}-workspaces`,
294
+ class: "m-0 px-2 pt-2 pb-1 text-xs font-semibold tracking-wide text-muted uppercase"
295
+ }, x(H.value), 9, Fe), (g(!0), l(i, null, v(V.value, (e) => (g(), l("button", {
296
+ key: e.name,
297
+ type: "button",
298
+ role: "menuitem",
299
+ tabindex: "-1",
300
+ class: h(A),
301
+ "data-ac-ds": "",
302
+ "data-testid": "ac-user-menu-workspace",
303
+ onClick: (t) => dt(e)
304
+ }, [f(t, {
305
+ name: U(e),
306
+ "img-url": e.avatarUrl,
307
+ kind: e.type === "user" ? "person" : "organization",
308
+ shape: K(e),
309
+ size: "small",
310
+ alt: ""
311
+ }, null, 8, [
312
+ "name",
313
+ "img-url",
314
+ "kind",
315
+ "shape"
316
+ ]), u("span", Le, [u("span", Re, x(U(e)), 1), u("span", ze, x(ot(e)), 1)])], 8, Ie))), 128))], 8, Pe)) : c("", !0)], 64)) : p.workspaces.length ? (g(), l("div", {
317
+ key: 2,
233
318
  role: "group",
234
- "aria-labelledby": `${w(F)}-workspaces`,
319
+ "aria-labelledby": `${S(M)}-workspaces`,
235
320
  class: "mt-1 border-t border-border px-3 py-2 first:mt-0 first:border-t-0"
236
- }, [d("p", {
237
- id: `${w(F)}-workspaces`,
321
+ }, [u("p", {
322
+ id: `${S(M)}-workspaces`,
238
323
  class: "mb-2 flex items-center gap-2 text-xs font-semibold tracking-wide text-muted uppercase"
239
- }, [p(w(oe), {
324
+ }, [f(S(le), {
240
325
  class: "size-4",
241
326
  "aria-hidden": "true"
242
- }), f(" " + C(m.workspacesLabel), 1)], 8, Ce), d("div", we, [(v(!0), u(i, null, b(m.workspaces, (e) => (v(), u("button", {
327
+ }), d(" " + x(H.value), 1)], 8, Ve), u("div", He, [(g(!0), l(i, null, v(p.workspaces, (e) => (g(), l("button", {
243
328
  key: e.name,
244
329
  type: "button",
245
330
  role: "menuitemradio",
246
331
  tabindex: "-1",
247
- "aria-checked": e.name === j.value,
248
- class: _(["flex w-full cursor-pointer items-center justify-between gap-2 rounded-8 px-2 py-2 text-left text-base outline-none transition-colors duration-150 hover:bg-surface-sunken focus-visible:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset", e.name === j.value && "bg-surface-sunken/50"]),
332
+ "aria-checked": e.name === O.value,
333
+ class: h(["flex w-full cursor-pointer items-center justify-between gap-2 rounded-8 px-2 py-2 text-left text-base outline-none transition-colors duration-150 hover:bg-surface-sunken focus-visible:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset", e.name === O.value && "bg-surface-sunken/50"]),
249
334
  "data-ac-ds": "",
250
335
  "data-testid": "ac-user-menu-workspace",
251
- onClick: (t) => He(e)
252
- }, [d("span", Ee, [p(t, {
336
+ onClick: (t) => dt(e)
337
+ }, [u("span", We, [f(t, {
253
338
  name: e.displayName || e.name,
254
339
  "img-url": e.avatarUrl,
255
340
  kind: e.type === "user" ? "person" : "organization",
341
+ shape: K(e),
256
342
  alt: ""
257
343
  }, null, 8, [
258
344
  "name",
259
345
  "img-url",
260
- "kind"
261
- ]), d("span", De, [d("span", Oe, C(e.displayName || e.name), 1), d("span", ke, [f(C(e.name), 1), e.type === "user" ? (v(), u(i, { key: 0 }, [f(" (Personal)")], 64)) : l("", !0)])])]), e.name === j.value ? (v(), c(w(se), {
346
+ "kind",
347
+ "shape"
348
+ ]), u("span", Ge, [u("span", Ke, x(e.displayName || e.name), 1), u("span", qe, [d(x(e.name), 1), e.type === "user" ? (g(), l(i, { key: 0 }, [d(" (Personal)")], 64)) : c("", !0)])])]), e.name === O.value ? (g(), s(S(ue), {
262
349
  key: 0,
263
350
  class: "size-4 shrink-0 text-primary",
264
351
  "aria-hidden": "true"
265
- })) : l("", !0)], 10, Te))), 128))])], 8, Se)) : l("", !0),
266
- m.showThemeMode ? (v(), u("div", {
267
- key: 2,
352
+ })) : c("", !0)], 10, Ue))), 128))])], 8, Be)) : c("", !0),
353
+ p.showThemeMode ? (g(), l("div", {
354
+ key: 3,
268
355
  role: "group",
269
- "aria-labelledby": `${w(F)}-theme`,
356
+ "aria-labelledby": `${S(M)}-theme`,
270
357
  class: "mt-1 border-t border-border px-1 pt-2 pb-1 first:mt-0 first:border-t-0"
271
- }, [d("p", {
272
- id: `${w(F)}-theme`,
358
+ }, [u("p", {
359
+ id: `${S(M)}-theme`,
273
360
  class: "mb-2 px-2 text-sm font-semibold tracking-[0.08em] text-muted uppercase"
274
- }, "Theme", 8, je), p(r, {
361
+ }, "Theme", 8, Ye), f(r, {
275
362
  display: "labels",
276
- "onSet:theme": s[3] ||= (e) => M("set:theme", e)
277
- })], 8, Ae)) : l("", !0),
278
- m.showFontScale ? (v(), u("div", {
279
- key: 3,
363
+ "onSet:theme": o[3] ||= (e) => k("set:theme", e)
364
+ })], 8, Je)) : c("", !0),
365
+ p.showFontScale ? (g(), l("div", {
366
+ key: 4,
280
367
  role: "group",
281
- "aria-labelledby": `${w(F)}-scale`,
368
+ "aria-labelledby": `${S(M)}-scale`,
282
369
  class: "mt-1 border-t border-border px-1 pt-2 pb-1 first:mt-0 first:border-t-0"
283
- }, [d("p", {
284
- id: `${w(F)}-scale`,
370
+ }, [u("p", {
371
+ id: `${S(M)}-scale`,
285
372
  class: "mb-2 px-2 text-sm font-semibold tracking-[0.08em] text-muted uppercase"
286
- }, "Text size", 8, Ne), p(n, { display: "labels" })], 8, Me)) : l("", !0),
287
- d("div", Pe, [
288
- (v(!0), u(i, null, b(m.items, (e) => (v(), c(S(W(e)), te({ key: e.label }, { ref_for: !0 }, ze(e), {
373
+ }, "Text size", 8, Ze), f(n, { display: "labels" })], 8, Xe)) : c("", !0),
374
+ u("div", Qe, [
375
+ (g(!0), l(i, null, v(p.items, (e) => (g(), s(b(q(e)), ne({ key: e.label }, { ref_for: !0 }, st(e), {
289
376
  role: "menuitem",
290
377
  tabindex: "-1",
291
- class: N,
292
- onClick: (t) => Ve(e)
378
+ class: A,
379
+ onClick: (t) => ut(e)
293
380
  }), {
294
- default: D(() => [e.icon ? (v(), c(S(e.icon), {
381
+ default: w(() => [e.icon ? (g(), s(b(e.icon), {
295
382
  key: 0,
296
383
  "aria-hidden": "true"
297
- })) : l("", !0), d("span", Fe, C(e.label), 1)]),
384
+ })) : c("", !0), u("span", $e, x(e.label), 1)]),
298
385
  _: 2
299
386
  }, 1040, ["onClick"]))), 128)),
300
- x(e.$slots, "default", {
301
- close: Y,
302
- itemClass: N
387
+ y(e.$slots, "default", {
388
+ close: Q,
389
+ itemClass: A
303
390
  }),
304
- (v(), c(S(m.logoutUrl ? "a" : "button"), {
305
- href: m.logoutUrl || void 0,
306
- type: m.logoutUrl ? void 0 : "button",
391
+ (g(), s(b(p.logoutUrl ? "a" : "button"), {
392
+ href: p.logoutUrl || void 0,
393
+ type: p.logoutUrl ? void 0 : "button",
307
394
  role: "menuitem",
308
395
  tabindex: "-1",
309
- class: _(Re),
396
+ class: h(nt),
310
397
  "data-ac-ds": "",
311
398
  "data-testid": "ac-user-menu-logout",
312
- onClick: Ue
399
+ onClick: ft
313
400
  }, {
314
- default: D(() => [m.logoutIcon ? (v(), c(w(le), {
401
+ default: w(() => [p.logoutIcon ? (g(), s(S(pe), {
315
402
  key: 0,
316
403
  "aria-hidden": "true"
317
- })) : l("", !0), d("span", null, C(m.logoutLabel), 1)]),
404
+ })) : c("", !0), u("span", null, x(p.logoutLabel), 1)]),
318
405
  _: 1
319
406
  }, 8, ["href", "type"]))
320
407
  ])
321
- ], 36)) : l("", !0)]),
408
+ ], 36)) : c("", !0)]),
322
409
  _: 3
323
410
  })]))]));
324
411
  }
325
412
  });
326
413
  //#endregion
327
- export { k as default };
414
+ export { E as default };
@@ -0,0 +1,17 @@
1
+ import type { UserMenuWorkspace } from "../components/AcUserMenu.vue";
2
+ /** An AppsCode account as the APIs return it: the signed-in user or one of their organisations. */
3
+ export interface AppsCodeAccount {
4
+ username: string;
5
+ full_name?: string;
6
+ avatar_url?: string;
7
+ /** 2 Rancher org, 3 client org, 6 admin org. */
8
+ orgType?: number;
9
+ /** Set on the signed-in user's own account. */
10
+ isPersonalAccount?: boolean;
11
+ }
12
+ /** What kind of account it is, in the words every console uses: "Personal account", "Admin org", "Client org", "Rancher org" or "Organization". */
13
+ export declare function accountKind(account: AppsCodeAccount, personal?: boolean): string;
14
+ /** One account as an `AcUserMenu` workspace, with the kind, the line under it and the tint every console shows. */
15
+ export declare function toAccountWorkspace(account: AppsCodeAccount, personal?: boolean): UserMenuWorkspace;
16
+ /** The signed-in user's account, then their admin orgs, then the other organisations, as `AcUserMenu` workspaces. */
17
+ export declare function accountWorkspaces(user: AppsCodeAccount | undefined, organizations?: AppsCodeAccount[]): UserMenuWorkspace[];
@@ -0,0 +1,27 @@
1
+ //#region src/lib/composables/accounts.ts
2
+ var e = {
3
+ 2: "Rancher org",
4
+ 3: "Client org",
5
+ 6: "Admin org"
6
+ };
7
+ function t(t, n = !!t.isPersonalAccount) {
8
+ return n ? "Personal account" : e[t.orgType ?? -1] ?? "Organization";
9
+ }
10
+ function n(e, n = !!e.isPersonalAccount) {
11
+ let r = t(e, n);
12
+ return {
13
+ name: e.username,
14
+ displayName: e.full_name || e.username,
15
+ avatarUrl: e.avatar_url,
16
+ type: n ? "user" : "organization",
17
+ kind: r,
18
+ description: n ? "Your own clusters and settings" : `${r} · @${e.username}`,
19
+ tone: n ? "primary" : e.orgType === 6 ? "warning" : "info"
20
+ };
21
+ }
22
+ function r(e, t = []) {
23
+ let r = (e) => e.orgType === 6 ? 0 : 1, i = [...t].filter((t) => t.username && t.username !== e?.username).sort((e, t) => r(e) - r(t));
24
+ return [...e?.username ? [n(e, !0)] : [], ...i.map((e) => n(e, !1))];
25
+ }
26
+ //#endregion
27
+ export { t as accountKind, r as accountWorkspaces, n as toAccountWorkspace };
@@ -11,6 +11,8 @@ export type { ApiPagination, ApiPaginationProps, UseApiPaginationOptions } from
11
11
  export { useBulkSelection } from "./composables/useBulkSelection";
12
12
  export type { BulkSelection, UseBulkSelectionOptions } from "./composables/useBulkSelection";
13
13
  export { useFormValidation } from "./composables/useFormValidation";
14
+ export { accountKind, accountWorkspaces, toAccountWorkspace } from "./composables/accounts";
15
+ export type { AppsCodeAccount } from "./composables/accounts";
14
16
  export type { FieldPath, FormRules, FormValidationOptions, Rule, RuleFn, SimpleRuleName } from "./composables/useFormValidation";
15
17
  export { statusMeta, normalizeState, humanizeState } from "./components/status";
16
18
  export type { StatusMeta, StatusMetaOptions, StatusTone } from "./components/status";
package/dist/lib/index.js CHANGED
@@ -55,11 +55,11 @@ import re from "./components/AcHeaderItem.js";
55
55
  import ie from "./components/AcHeaderItems.js";
56
56
  import ae from "./components/AcInfoTable.js";
57
57
  import oe from "./components/AcKbd.js";
58
- import $ from "./components/AcSelect.js";
59
- import se from "./components/AcKeyValueInput.js";
60
- import ce from "./components/AcLoader.js";
61
- import le from "./components/AcLocaleSwitcher.js";
62
- import ue from "./components/AcProductTag.js";
58
+ import se from "./components/AcSelect.js";
59
+ import ce from "./components/AcKeyValueInput.js";
60
+ import le from "./components/AcLoader.js";
61
+ import ue from "./components/AcLocaleSwitcher.js";
62
+ import $ from "./components/AcProductTag.js";
63
63
  import de from "./components/AcNavbar.js";
64
64
  import fe from "./components/AcNotificationMenu.js";
65
65
  import pe from "./components/AcNumberInput.js";
@@ -102,5 +102,6 @@ import { useTablePagination as Xe } from "./composables/useTablePagination.js";
102
102
  import { useApiPagination as Ze } from "./composables/useApiPagination.js";
103
103
  import { useBulkSelection as Qe } from "./composables/useBulkSelection.js";
104
104
  import { useFormValidation as $e } from "./composables/useFormValidation.js";
105
- import { HSLToHex as et, HexToHSL as tt, MIN_CONTRAST as nt, contrastOnWhite as rt, getThemeHSL as it, hexToHsl as at, hslToHex as ot, readableLightness as st, setThemeHSL as ct, useBrandColor as lt } from "./composables/useBrandColor.js";
106
- export { ee as AcAccordion, te as AcAccordionItem, r as AcAlert, o as AcAppSwitcher, s as AcAvatar, d as AcBadge, f as AcBanner, p as AcBreadcrumb, m as AcBulkActionBar, n as AcButton, h as AcButtons, g as AcCard, y as AcCellValue, b as AcCheckBox, x as AcCheckList, S as AcCheckRadio, C as AcCircularProgress, w as AcClusterSwitcher, T as AcColorInput, E as AcCommandBlock, D as AcConfirmModal, O as AcContentHeader, k as AcContentLayout, j as AcContentTable, M as AcCopyButton, N as AcCostSummary, P as AcDatePicker, I as AcDeleteConfirmationModal, I as AcDeleteModal, L as AcDivider, R as AcDropdown, z as AcDropdownDivider, B as AcDropdownItem, V as AcEmptyState, H as AcErrorState, U as AcFeatureCard, W as AcFileUpload, q as AcFontScale, J as AcFooter, Y as AcForm, X as AcFormArray, Z as AcFormFooter, Q as AcFormSection, ne as AcHeader, re as AcHeaderItem, ie as AcHeaderItems, ae as AcInfoTable, F as AcInput, oe as AcKbd, se as AcKeyValueInput, ce as AcLoader, le as AcLocaleSwitcher, i as AcLogo, _ as AcModal, de as AcNavbar, a as AcNavbarItem, fe as AcNotificationMenu, pe as AcNumberInput, me as AcPage, he as AcPagination, ge as AcPreloader, ve as AcProductHero, ue as AcProductTag, _e as AcProgress, ye as AcRadioCard, xe as AcResourceCard, A as AcSearchBar, Se as AcSectionContent, Ce as AcSegmentedControl, $ as AcSelect, we as AcSettingsRow, ke as AcSidePanel, Ae as AcSideTabs, Te as AcSidebar, Ee as AcSidebarBrand, De as AcSidebarItem, Oe as AcSidebarSection, v as AcSkeleton, je as AcSlider, e as AcSpinner, Me as AcStatCard, Ne as AcStatusBar, Pe as AcSteps, Fe as AcSwitch, Ie as AcSwitchCard, Le as AcTable, Re as AcTabs, be as AcTag, ze as AcTagInput, Be as AcTaintInput, Ve as AcTextarea, Ue as AcThemeMode, We as AcTimePicker, qe as AcToaster, t as AcTooltip, Je as AcUsageCard, Ye as AcUserMenu, G as FONT_SCALES, et as HSLToHex, tt as HexToHSL, nt as MIN_CONTRAST, rt as contrastOnWhite, it as getThemeHSL, at as hexToHsl, ot as hslToHex, c as humanizeState, l as normalizeState, st as readableLightness, ct as setThemeHSL, Ge as showToast, u as statusMeta, Ze as useApiPagination, lt as useBrandColor, Qe as useBulkSelection, He as useColorMode, K as useFontScale, $e as useFormValidation, Xe as useTablePagination, Ke as useToast };
105
+ import { accountKind as et, accountWorkspaces as tt, toAccountWorkspace as nt } from "./composables/accounts.js";
106
+ import { HSLToHex as rt, HexToHSL as it, MIN_CONTRAST as at, contrastOnWhite as ot, getThemeHSL as st, hexToHsl as ct, hslToHex as lt, readableLightness as ut, setThemeHSL as dt, useBrandColor as ft } from "./composables/useBrandColor.js";
107
+ export { ee as AcAccordion, te as AcAccordionItem, r as AcAlert, o as AcAppSwitcher, s as AcAvatar, d as AcBadge, f as AcBanner, p as AcBreadcrumb, m as AcBulkActionBar, n as AcButton, h as AcButtons, g as AcCard, y as AcCellValue, b as AcCheckBox, x as AcCheckList, S as AcCheckRadio, C as AcCircularProgress, w as AcClusterSwitcher, T as AcColorInput, E as AcCommandBlock, D as AcConfirmModal, O as AcContentHeader, k as AcContentLayout, j as AcContentTable, M as AcCopyButton, N as AcCostSummary, P as AcDatePicker, I as AcDeleteConfirmationModal, I as AcDeleteModal, L as AcDivider, R as AcDropdown, z as AcDropdownDivider, B as AcDropdownItem, V as AcEmptyState, H as AcErrorState, U as AcFeatureCard, W as AcFileUpload, q as AcFontScale, J as AcFooter, Y as AcForm, X as AcFormArray, Z as AcFormFooter, Q as AcFormSection, ne as AcHeader, re as AcHeaderItem, ie as AcHeaderItems, ae as AcInfoTable, F as AcInput, oe as AcKbd, ce as AcKeyValueInput, le as AcLoader, ue as AcLocaleSwitcher, i as AcLogo, _ as AcModal, de as AcNavbar, a as AcNavbarItem, fe as AcNotificationMenu, pe as AcNumberInput, me as AcPage, he as AcPagination, ge as AcPreloader, ve as AcProductHero, $ as AcProductTag, _e as AcProgress, ye as AcRadioCard, xe as AcResourceCard, A as AcSearchBar, Se as AcSectionContent, Ce as AcSegmentedControl, se as AcSelect, we as AcSettingsRow, ke as AcSidePanel, Ae as AcSideTabs, Te as AcSidebar, Ee as AcSidebarBrand, De as AcSidebarItem, Oe as AcSidebarSection, v as AcSkeleton, je as AcSlider, e as AcSpinner, Me as AcStatCard, Ne as AcStatusBar, Pe as AcSteps, Fe as AcSwitch, Ie as AcSwitchCard, Le as AcTable, Re as AcTabs, be as AcTag, ze as AcTagInput, Be as AcTaintInput, Ve as AcTextarea, Ue as AcThemeMode, We as AcTimePicker, qe as AcToaster, t as AcTooltip, Je as AcUsageCard, Ye as AcUserMenu, G as FONT_SCALES, rt as HSLToHex, it as HexToHSL, at as MIN_CONTRAST, et as accountKind, tt as accountWorkspaces, ot as contrastOnWhite, st as getThemeHSL, ct as hexToHsl, lt as hslToHex, c as humanizeState, l as normalizeState, ut as readableLightness, dt as setThemeHSL, Ge as showToast, u as statusMeta, nt as toAccountWorkspace, Ze as useApiPagination, ft as useBrandColor, Qe as useBulkSelection, He as useColorMode, K as useFontScale, $e as useFormValidation, Xe as useTablePagination, Ke as useToast };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ac-design/design-system",
3
- "version": "2.5.2",
3
+ "version": "2.6.0",
4
4
  "description": "AppsCode design system: Tailwind CSS v4 theme and Vue 3 components.",
5
5
  "repository": {
6
6
  "type": "git",