@mittwald/flow-react-components 0.1.0-alpha.389 → 0.1.0-alpha.390

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 (32) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/css/MenuItem.css +1 -1
  3. package/dist/css/Navigation.css +1 -1
  4. package/dist/css/Select.css +1 -1
  5. package/dist/js/ContextMenu.js +7 -5
  6. package/dist/js/ContextMenuSection-CmajFz_f.js +43 -0
  7. package/dist/js/ContextMenuTrigger-BAV29sr-.js +102 -0
  8. package/dist/js/List.js +96 -84
  9. package/dist/js/MenuItem-BUyas6dP.js +64 -0
  10. package/dist/js/MenuItem.js +1 -1
  11. package/dist/js/Navigation.js +5 -4
  12. package/dist/js/Section-wjl9OuOK.js +49 -0
  13. package/dist/js/Section.js +1 -1
  14. package/dist/js/Select.js +4 -3
  15. package/dist/js/Switch-BhDMHWjv.js +39 -0
  16. package/dist/js/Switch.js +3 -36
  17. package/dist/js/Tabs.js +10 -9
  18. package/dist/js/all.css +1 -1
  19. package/dist/js/types/components/ContextMenu/ContextMenu.d.ts +2 -1
  20. package/dist/js/types/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.d.ts +7 -2
  21. package/dist/js/types/components/ContextMenu/index.d.ts +1 -0
  22. package/dist/js/types/components/ContextMenu/lib.d.ts +4 -0
  23. package/dist/js/types/components/ContextMenu/stories/Default.stories.d.ts +1 -0
  24. package/dist/js/types/components/List/model/loading/IncrementalLoader.d.ts +3 -0
  25. package/dist/js/types/components/MenuItem/MenuItem.d.ts +1 -1
  26. package/dist/js/types/components/MenuItem/MenuItemContent.d.ts +1 -1
  27. package/package.json +4 -4
  28. package/dist/js/ContextMenu.module-_LC3xtX0.js +0 -9
  29. package/dist/js/ContextMenuTrigger-CsnzKkVf.js +0 -96
  30. package/dist/js/MenuItem-BhQ--5y5.js +0 -59
  31. package/dist/js/Section-7khrqgxc.js +0 -61
  32. /package/dist/css/{ContextMenu.css → ContextMenuSection.css} +0 -0
package/dist/js/Select.js CHANGED
@@ -74,10 +74,11 @@ const f = "flow--select", D = "flow--select--toggle", M = {
74
74
  },
75
75
  /* @__PURE__ */ n.createElement(k, { type: "Select", controller: d }, /* @__PURE__ */ n.createElement(P, { props: A }, /* @__PURE__ */ n.createElement(F, null, /* @__PURE__ */ n.createElement(u.Button, { className: M.toggle }, /* @__PURE__ */ n.createElement(u.SelectValue, null), /* @__PURE__ */ n.createElement(b, null)), i, /* @__PURE__ */ n.createElement(U, null, /* @__PURE__ */ n.createElement(R, { id: "options" })), /* @__PURE__ */ n.createElement(K, { className: a.fieldError }))))
76
76
  );
77
- }), V = "flow--select--option", v = "flow--select--option--icon", w = "flow--select--option--text", J = "flow--select--option--control-icon", Z = "flow--select--option--avatar", W = {
77
+ }), V = "flow--select--option", w = "flow--select--option--icon", v = "flow--select--option--text", J = "flow--select--option--control-icon", Z = "flow--select--option--avatar", W = {
78
78
  option: V,
79
- icon: v,
80
- text: w,
79
+ switch: "flow--select--option--switch",
80
+ icon: w,
81
+ text: v,
81
82
  controlIcon: J,
82
83
  avatar: Z
83
84
  }, z = S("Option", (e) => {
@@ -0,0 +1,39 @@
1
+ "use client"
2
+ /* */
3
+ import e from "react";
4
+ import * as n from "react-aria-components";
5
+ import p from "clsx";
6
+ import "@tabler/icons-react";
7
+ import "./Icon--OEo4TjW.js";
8
+ import { I as f } from "./IconCheck-s8wGBc30.js";
9
+ import { I as h } from "./IconClose-Bf4k99aq.js";
10
+ import { L as w } from "./Label-BK8Njoxm.js";
11
+ import { C as b } from "./ClearPropsContext-CUvsbMn8.js";
12
+ import "./propsContext-DzAKlmhS.js";
13
+ import "@react-aria/utils";
14
+ import "remeda";
15
+ import "dot-prop";
16
+ import { f as d } from "./flowComponent-BQs9wMX_.js";
17
+ const E = "flow--switch--track", C = "flow--switch--handle", N = "flow--switch--label", t = {
18
+ switch: "flow--switch",
19
+ "label-leading": "flow--switch--label-leading",
20
+ track: E,
21
+ handle: C,
22
+ label: N
23
+ }, R = d("Switch", (a) => {
24
+ const {
25
+ children: l,
26
+ className: o,
27
+ labelPosition: r = "trailing",
28
+ refProp: s,
29
+ ...c
30
+ } = a, m = p(
31
+ t.switch,
32
+ t[`label-${r}`],
33
+ o
34
+ );
35
+ return /* @__PURE__ */ e.createElement(b, null, /* @__PURE__ */ e.createElement(n.Switch, { ...c, className: m, ref: s }, ({ isSelected: i }) => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: t.track }, /* @__PURE__ */ e.createElement("div", { className: t.handle }, i ? /* @__PURE__ */ e.createElement(f, { size: "s" }) : /* @__PURE__ */ e.createElement(h, { size: "s" }))), l && /* @__PURE__ */ e.createElement(w, { className: t.label }, l))));
36
+ });
37
+ export {
38
+ R as S
39
+ };
package/dist/js/Switch.js CHANGED
@@ -1,40 +1,7 @@
1
1
  "use client"
2
2
  /* */
3
- import e from "react";
4
- import * as n from "react-aria-components";
5
- import f from "clsx";
6
- import "@tabler/icons-react";
7
- import "./Icon--OEo4TjW.js";
8
- import { I as p } from "./IconCheck-s8wGBc30.js";
9
- import { I as h } from "./IconClose-Bf4k99aq.js";
10
- import { L as w } from "./Label-BK8Njoxm.js";
11
- import { C as d } from "./ClearPropsContext-CUvsbMn8.js";
12
- import "./propsContext-DzAKlmhS.js";
13
- import "@react-aria/utils";
14
- import "remeda";
15
- import "dot-prop";
16
- import { f as b } from "./flowComponent-BQs9wMX_.js";
17
- const E = "flow--switch--track", C = "flow--switch--handle", N = "flow--switch--label", t = {
18
- switch: "flow--switch",
19
- "label-leading": "flow--switch--label-leading",
20
- track: E,
21
- handle: C,
22
- label: N
23
- }, R = b("Switch", (a) => {
24
- const {
25
- children: l,
26
- className: o,
27
- labelPosition: r = "trailing",
28
- refProp: s,
29
- ...c
30
- } = a, m = f(
31
- t.switch,
32
- t[`label-${r}`],
33
- o
34
- );
35
- return /* @__PURE__ */ e.createElement(d, null, /* @__PURE__ */ e.createElement(n.Switch, { ...c, className: m, ref: s }, ({ isSelected: i }) => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: t.track }, /* @__PURE__ */ e.createElement("div", { className: t.handle }, i ? /* @__PURE__ */ e.createElement(p, { size: "s" }) : /* @__PURE__ */ e.createElement(h, { size: "s" }))), l && /* @__PURE__ */ e.createElement(w, { className: t.label }, l))));
36
- });
3
+ import { S as a } from "./Switch-BhDMHWjv.js";
37
4
  export {
38
- R as Switch,
39
- R as default
5
+ a as Switch,
6
+ a as default
40
7
  };
package/dist/js/Tabs.js CHANGED
@@ -6,8 +6,9 @@ import u from "clsx";
6
6
  import { TunnelExit as E, TunnelProvider as P, TunnelEntry as f } from "@mittwald/react-tunnel";
7
7
  import { f as O } from "./flowComponent-BQs9wMX_.js";
8
8
  import { useCallbackRef as S } from "use-callback-ref";
9
- import { a as A, C as B } from "./ContextMenuTrigger-CsnzKkVf.js";
10
- import { M as K } from "./MenuItem-BhQ--5y5.js";
9
+ import { a as A, C as B } from "./ContextMenuTrigger-BAV29sr-.js";
10
+ import { M as K } from "./MenuItem-BUyas6dP.js";
11
+ import "./ContextMenuSection-CmajFz_f.js";
11
12
  import { B as L } from "./Button-BTc_iJae.js";
12
13
  import "@tabler/icons-react";
13
14
  import "./Icon--OEo4TjW.js";
@@ -80,7 +81,7 @@ const $ = "flow--tabs", k = "flow--tabs--list", j = {
80
81
  /* @__PURE__ */ e.createElement(E, { id: "ContextMenuItems" })
81
82
  ));
82
83
  return /* @__PURE__ */ e.createElement("div", { className: t }, m, d, T);
83
- }, Te = O("Tabs", (s) => {
84
+ }, ve = O("Tabs", (s) => {
84
85
  const {
85
86
  children: n,
86
87
  className: r,
@@ -114,12 +115,12 @@ const $ = "flow--tabs", k = "flow--tabs--list", j = {
114
115
  ));
115
116
  }), g = I({
116
117
  id: "undefined"
117
- }), Y = () => y(g), Z = g.Provider, ve = (s) => {
118
+ }), Y = () => y(g), Z = g.Provider, xe = (s) => {
118
119
  const { children: n, className: r, ...o } = s, { id: a } = Y(), c = u(p.tabTitle, r);
119
120
  return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(f, { id: "Titles" }, /* @__PURE__ */ e.createElement(C.Tab, { ...o, id: a, className: c }, (l) => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(F, { emulateBoldWidth: !0 }, /* @__PURE__ */ e.createElement("span", { className: p.text }, n)), /* @__PURE__ */ e.createElement(f, { id: "ActiveTitle" }, l.isSelected && n)))), /* @__PURE__ */ e.createElement(f, { id: "ContextMenuItems" }, /* @__PURE__ */ e.createElement(K, { className: p.menuItem, id: a }, n)));
120
121
  }, _ = "flow--tabs--tab--tab-panel", ee = {
121
122
  tabPanel: _
122
- }, xe = (s) => {
123
+ }, we = (s) => {
123
124
  const { children: n, className: r, id: o, ...a } = s, c = u(ee.tabPanel, r), l = N(), t = o ?? l, i = (m) => {
124
125
  const d = m.state.selectedKey === t, T = {
125
126
  Content: {
@@ -150,8 +151,8 @@ const $ = "flow--tabs", k = "flow--tabs--list", j = {
150
151
  )));
151
152
  };
152
153
  export {
153
- xe as Tab,
154
- ve as TabTitle,
155
- Te as Tabs,
156
- Te as default
154
+ we as Tab,
155
+ xe as TabTitle,
156
+ ve as Tabs,
157
+ ve as default
157
158
  };