@studiolxd/brand 45.0.0 → 46.0.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.
Files changed (33) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/dist/_shared/tokens.js +9 -0
  3. package/dist/_types/messages/BrandMessages.d.ts +13 -1
  4. package/dist/_types/messages/index.d.ts +1 -1
  5. package/dist/_types/molecules/AppLauncher/AppLauncher.d.ts +43 -8
  6. package/dist/_types/molecules/CommandPalette/CommandPalette.d.ts +43 -8
  7. package/dist/_types/molecules/Consent/Consent.d.ts +93 -20
  8. package/dist/_types/molecules/NotificationButton/NotificationButton.d.ts +17 -4
  9. package/dist/_types/molecules/NotificationPanel/NotificationPanel.d.ts +54 -8
  10. package/dist/_types/sections/FloatingDock/FloatingDock.d.ts +33 -3
  11. package/dist/app-launcher.js +67 -61
  12. package/dist/brand.css +137 -6
  13. package/dist/command-palette.js +38 -36
  14. package/dist/consent.js +75 -73
  15. package/dist/floating-dock.js +42 -41
  16. package/dist/multi-select.css +1 -1
  17. package/dist/multi-select.js +1 -2
  18. package/dist/notification-button.js +18 -17
  19. package/dist/notification-panel.js +81 -80
  20. package/dist/select.css +1 -1
  21. package/dist/select.js +1 -2
  22. package/dist/tokens.css +137 -6
  23. package/package.json +1 -1
  24. package/src/tokens/components/control.css +4 -1
  25. package/src/tokens/components/multi-select.css +3 -0
  26. package/src/tokens/components/select.css +3 -0
  27. package/src/tokens/molecules/filter-bar.css +2 -2
  28. package/src/tokens/scss/components/_control.scss +4 -1
  29. package/src/tokens/scss/components/_multi-select.scss +3 -0
  30. package/src/tokens/scss/components/_select.scss +3 -0
  31. package/src/tokens/scss/molecules/_filter-bar.scss +2 -2
  32. package/src/tokens/surface-public.css +124 -2
  33. package/src/tokens/tokens.json +9 -0
@@ -1,119 +1,125 @@
1
1
  'use client';
2
2
  import './app-launcher.css';
3
- import { Icon as e } from "./icon.js";
4
- import { Tag as t } from "./tag.js";
5
- import { Modal as n } from "./modal.js";
6
- import { useState as r } from "react";
7
- import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
8
- import { Popover as s } from "@base-ui/react/popover";
3
+ import { n as e } from "./_shared/brandmessagescontext.js";
4
+ import { Icon as t } from "./icon.js";
5
+ import { Tag as n } from "./tag.js";
6
+ import { Modal as r } from "./modal.js";
7
+ import { useState as i } from "react";
8
+ import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
9
+ import { Popover as c } from "@base-ui/react/popover";
9
10
  //#region src/stories/molecules/AppLauncher/AppLauncher.tsx
10
- function c({ app: e, isCurrent: n, newLabel: r }) {
11
- return /* @__PURE__ */ o("a", {
12
- href: e.url,
13
- className: `app-launcher__tile${n ? " app-launcher__tile--active" : ""}`,
14
- "aria-current": n ? "page" : void 0,
15
- children: [/* @__PURE__ */ a("span", {
11
+ function l({ app: t, isCurrent: r, newLabel: i }) {
12
+ let a = e("appLauncher");
13
+ return /* @__PURE__ */ s("a", {
14
+ href: t.url,
15
+ className: `app-launcher__tile${r ? " app-launcher__tile--active" : ""}`,
16
+ "aria-current": r ? "page" : void 0,
17
+ children: [/* @__PURE__ */ o("span", {
16
18
  className: "app-launcher__tile-name",
17
- children: e.name
18
- }), e.isNew && /* @__PURE__ */ a(t, {
19
+ children: t.name
20
+ }), t.isNew && /* @__PURE__ */ o(n, {
19
21
  variant: "info",
20
22
  className: "app-launcher__tile-badge",
21
- children: r
23
+ children: a("new", i)
22
24
  })]
23
25
  });
24
26
  }
25
- function l({ apps: e, currentAppId: t, newLabel: n }) {
26
- return /* @__PURE__ */ a("ul", {
27
+ function u({ apps: e, currentAppId: t, newLabel: n }) {
28
+ return /* @__PURE__ */ o("ul", {
27
29
  className: "app-launcher__grid",
28
30
  role: "list",
29
- children: e.map((e) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(c, {
31
+ children: e.map((e) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(l, {
30
32
  app: e,
31
33
  isCurrent: e.id === t,
32
34
  newLabel: n
33
35
  }) }, e.id))
34
36
  });
35
37
  }
36
- function u({ apps: t, labels: n, currentAppId: r, open: i, defaultOpen: c, onOpenChange: u }) {
37
- return /* @__PURE__ */ o(s.Root, {
38
- open: i,
39
- defaultOpen: c,
40
- onOpenChange: (e) => u?.(e),
41
- children: [/* @__PURE__ */ a(s.Trigger, { render: n.trigger ? /* @__PURE__ */ o("button", {
38
+ function d({ apps: n, labels: r, currentAppId: i, open: a, defaultOpen: l, onOpenChange: d }) {
39
+ let f = e("appLauncher");
40
+ return /* @__PURE__ */ s(c.Root, {
41
+ open: a,
42
+ defaultOpen: l,
43
+ onOpenChange: (e) => d?.(e),
44
+ children: [/* @__PURE__ */ o(c.Trigger, { render: r.trigger ? /* @__PURE__ */ s("button", {
42
45
  type: "button",
43
46
  className: "app-launcher__trigger app-launcher__trigger--label",
44
- children: [/* @__PURE__ */ a(e, {
47
+ children: [/* @__PURE__ */ o(t, {
45
48
  name: "grid",
46
49
  size: "md"
47
- }), /* @__PURE__ */ a("span", {
50
+ }), /* @__PURE__ */ o("span", {
48
51
  className: "app-launcher__trigger-label",
49
- children: n.trigger
52
+ children: r.trigger
50
53
  })]
51
- }) : /* @__PURE__ */ a("button", {
54
+ }) : /* @__PURE__ */ o("button", {
52
55
  type: "button",
53
56
  className: "app-launcher__trigger",
54
- "aria-label": n.open,
55
- children: /* @__PURE__ */ a(e, {
57
+ "aria-label": f("open", r.open),
58
+ children: /* @__PURE__ */ o(t, {
56
59
  name: "grid",
57
60
  size: "md"
58
61
  })
59
- }) }), /* @__PURE__ */ a(s.Portal, { children: /* @__PURE__ */ a(s.Positioner, {
62
+ }) }), /* @__PURE__ */ o(c.Portal, { children: /* @__PURE__ */ o(c.Positioner, {
60
63
  className: "app-launcher__positioner",
61
64
  sideOffset: 4,
62
65
  align: "end",
63
- children: /* @__PURE__ */ a(s.Popup, {
66
+ children: /* @__PURE__ */ o(c.Popup, {
64
67
  className: "app-launcher__content",
65
- children: /* @__PURE__ */ a(l, {
66
- apps: t,
67
- currentAppId: r,
68
- newLabel: n.new
68
+ children: /* @__PURE__ */ o(u, {
69
+ apps: n,
70
+ currentAppId: i,
71
+ newLabel: r.new
69
72
  })
70
73
  })
71
74
  }) })]
72
75
  });
73
76
  }
74
- function d(e, t, n) {
75
- let [i, a] = r(t ?? !1);
76
- return [e ?? i, (t) => {
77
+ function f(e, t, n) {
78
+ let [r, a] = i(t ?? !1);
79
+ return [e ?? r, (t) => {
77
80
  e === void 0 && a(t), n?.(t);
78
81
  }];
79
82
  }
80
- function f({ apps: t, labels: r, currentAppId: s, open: c, defaultOpen: u, onOpenChange: f }) {
81
- let [p, m] = d(c, u, f);
82
- return /* @__PURE__ */ o(i, { children: [r.trigger ? /* @__PURE__ */ o("button", {
83
+ function p({ apps: n, labels: i, currentAppId: c, open: l, defaultOpen: d, onOpenChange: p }) {
84
+ let m = e("appLauncher"), [h, g] = f(l, d, p);
85
+ return /* @__PURE__ */ s(a, { children: [i.trigger ? /* @__PURE__ */ s("button", {
83
86
  type: "button",
84
87
  className: "app-launcher__trigger app-launcher__trigger--label",
85
88
  "aria-haspopup": "dialog",
86
- onClick: () => m(!0),
87
- children: [/* @__PURE__ */ a(e, {
89
+ onClick: () => g(!0),
90
+ children: [/* @__PURE__ */ o(t, {
88
91
  name: "grid",
89
92
  size: "md"
90
- }), /* @__PURE__ */ a("span", {
93
+ }), /* @__PURE__ */ o("span", {
91
94
  className: "app-launcher__trigger-label",
92
- children: r.trigger
95
+ children: i.trigger
93
96
  })]
94
- }) : /* @__PURE__ */ a("button", {
97
+ }) : /* @__PURE__ */ o("button", {
95
98
  type: "button",
96
99
  className: "app-launcher__trigger",
97
- "aria-label": r.open,
100
+ "aria-label": m("open", i.open),
98
101
  "aria-haspopup": "dialog",
99
- onClick: () => m(!0),
100
- children: /* @__PURE__ */ a(e, {
102
+ onClick: () => g(!0),
103
+ children: /* @__PURE__ */ o(t, {
101
104
  name: "grid",
102
105
  size: "md"
103
106
  })
104
- }), /* @__PURE__ */ a(n, {
105
- open: p,
106
- onClose: () => m(!1),
107
- title: r.title ?? "Aplicaciones",
108
- children: /* @__PURE__ */ a(l, {
109
- apps: t,
110
- currentAppId: s,
111
- newLabel: r.new
107
+ }), /* @__PURE__ */ o(r, {
108
+ open: h,
109
+ onClose: () => g(!1),
110
+ title: m("title", i.title),
111
+ children: /* @__PURE__ */ o(u, {
112
+ apps: n,
113
+ currentAppId: c,
114
+ newLabel: i.new
112
115
  })
113
116
  })] });
114
117
  }
115
- function p({ presentation: e = "modal", ...t }) {
116
- return a(e === "popover" ? u : f, { ...t });
118
+ function m({ presentation: e = "modal", labels: t = {}, ...n }) {
119
+ return o(e === "popover" ? d : p, {
120
+ labels: t,
121
+ ...n
122
+ });
117
123
  }
118
124
  //#endregion
119
- export { p as AppLauncher };
125
+ export { m as AppLauncher };