@mittwald/flow-react-components 0.1.0-alpha.44 → 0.1.0-alpha.45

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.
package/dist/Initials.js CHANGED
@@ -1,16 +1,16 @@
1
1
  "use client"
2
2
  /* */
3
- import s from "react";
4
- import m from "clsx";
3
+ import e from "react";
4
+ import c from "clsx";
5
5
  import "./PropsContextProvider-C7Evvjhy.js";
6
6
  import "@react-aria/utils";
7
- import { u as c } from "./useProps-d5Do2me4.js";
8
- import { onlyText as p } from "react-children-utilities";
9
- const f = (i) => i.replace(/[^\p{L}\s]/giu, "").split(" ").map((t) => t.trim()[0]).filter((t) => t !== void 0).map((t) => t.toUpperCase()).slice(0, 2), u = "flow--initials", d = {
10
- initials: u
7
+ import { u as p } from "./useProps-d5Do2me4.js";
8
+ import { onlyText as f } from "react-children-utilities";
9
+ const u = (i) => i.replace(/[^\p{L}\s]/giu, "").split(" ").map((t) => t.trim()[0]).filter((t) => t !== void 0).map((t) => t.toUpperCase()).slice(0, 2), d = "flow--initials", x = {
10
+ initials: d
11
11
  }, v = (i) => {
12
- const { children: t, className: e } = c("Initials", i), a = f(p(t)), l = m(d.initials, e), o = a.map((r, n) => /* @__PURE__ */ s.createElement("span", { key: n }, r));
13
- return /* @__PURE__ */ s.createElement("div", { "aria-label": t, className: l }, o);
12
+ const { children: t, className: a } = p("Initials", i), s = f(t), n = u(s), o = c(x.initials, a), l = n.map((r, m) => /* @__PURE__ */ e.createElement("span", { key: m }, r));
13
+ return /* @__PURE__ */ e.createElement("div", { "aria-label": s, className: o }, l);
14
14
  };
15
15
  export {
16
16
  v as Initials,
package/dist/List.js CHANGED
@@ -1,15 +1,15 @@
1
1
  "use client"
2
2
  /* */
3
- var z = Object.defineProperty;
4
- var V = (i, t, e) => t in i ? z(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
5
- var n = (i, t, e) => (V(i, typeof t != "symbol" ? t + "" : t, e), e);
6
- import r, { createContext as B, useContext as U, Suspense as $, createElement as x, useMemo as O, useEffect as I, isValidElement as H } from "react";
3
+ var V = Object.defineProperty;
4
+ var B = (i, t, e) => t in i ? V(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
5
+ var n = (i, t, e) => (B(i, typeof t != "symbol" ? t + "" : t, e), e);
6
+ import r, { createContext as U, useContext as $, Suspense as D, createElement as x, useMemo as O, useEffect as I, isValidElement as H } from "react";
7
7
  import { useMessageFormatter as j, useLocalizedStringFormatter as q } from "react-aria";
8
8
  import { T as J } from "./Text-B5YK5s7t.js";
9
9
  import { B as b } from "./Button-FPl3fKiM.js";
10
10
  import "@tabler/icons-react";
11
11
  import "./Icon-S-6j_Kl3.js";
12
- import D from "clsx";
12
+ import R from "clsx";
13
13
  import "html-react-parser";
14
14
  import "./PropsContextProvider-C7Evvjhy.js";
15
15
  import "@react-aria/utils";
@@ -25,12 +25,12 @@ import { getAsyncResource as T } from "@mittwald/react-use-promise";
25
25
  import { deepFind as st, deepForEach as nt } from "react-children-utilities";
26
26
  import { I as rt } from "./InlineCode-CVs3jCiw.js";
27
27
  import { ListLoaderAsyncResource as ot } from "./List/ListLoaderAsyncResource.js";
28
- const R = B({}), g = () => U(R).list, lt = (i) => /* @__PURE__ */ r.createElement(r.Fragment, null, i.children()), ct = (i) => {
28
+ const M = U({}), g = () => $(M).list, lt = (i) => /* @__PURE__ */ r.createElement(r.Fragment, null, i.children()), ct = (i) => {
29
29
  const { pageIndex: t } = i;
30
30
  return g().loader.useSuspenseHook(t), null;
31
- }, ut = () => g().loader.getLoaderInvocationHooks().map((t, e) => /* @__PURE__ */ r.createElement($, { key: e, fallback: /* @__PURE__ */ r.createElement(ct, { pageIndex: e }) }, /* @__PURE__ */ r.createElement(lt, null, () => {
31
+ }, ut = () => g().loader.getLoaderInvocationHooks().map((t, e) => /* @__PURE__ */ r.createElement(D, { key: e, fallback: /* @__PURE__ */ r.createElement(ct, { pageIndex: e }) }, /* @__PURE__ */ r.createElement(lt, null, () => {
32
32
  t();
33
- }))), M = {
33
+ }))), A = {
34
34
  "de-DE": {
35
35
  paginationInfo: "{visibleItemsCount} von insgesamt {totalItemsCount} angezeigt",
36
36
  paginationInfoFiltered: "{visibleItemsCount} von insgesamt {filteredItemsCount} (gefiltert aus {totalItemsCount}) angezeigt",
@@ -42,7 +42,7 @@ const R = B({}), g = () => U(R).list, lt = (i) => /* @__PURE__ */ r.createElemen
42
42
  showMore: "Show more"
43
43
  }
44
44
  }, gt = (i) => {
45
- const t = j(M), e = g(), a = e.pagination, s = e.isFiltered() && !e.loader.manualFiltering, o = a.getTotalItemsCount(), c = a.getFilteredItemsCount(), l = a.getVisibleItemsCount();
45
+ const t = j(A), e = g(), a = e.pagination, s = e.isFiltered() && !e.loader.manualFiltering, o = a.getTotalItemsCount(), c = a.getFilteredItemsCount(), l = a.getVisibleItemsCount();
46
46
  if (o === 0)
47
47
  return null;
48
48
  const h = s ? t("paginationInfoFiltered", {
@@ -89,7 +89,7 @@ const R = B({}), g = () => U(R).list, lt = (i) => /* @__PURE__ */ r.createElemen
89
89
  filterBar: wt
90
90
  }, Ft = (i) => {
91
91
  const { className: t } = i;
92
- return /* @__PURE__ */ r.createElement("div", { className: D(t, Pt.filterBar) }, /* @__PURE__ */ r.createElement(ft, null), /* @__PURE__ */ r.createElement(vt, null));
92
+ return /* @__PURE__ */ r.createElement("div", { className: R(t, Pt.filterBar) }, /* @__PURE__ */ r.createElement(ft, null), /* @__PURE__ */ r.createElement(vt, null));
93
93
  }, Ct = "flow--list", It = "flow--list--filter-bar", Tt = "flow--list--items", Et = "flow--list--pagination-infos", Lt = "flow--list--show-more-button", d = {
94
94
  list: Ct,
95
95
  filterBar: It,
@@ -427,7 +427,7 @@ class zt {
427
427
  );
428
428
  }
429
429
  }
430
- let Vt = class A {
430
+ let Vt = class N {
431
431
  constructor(t) {
432
432
  n(this, "filters");
433
433
  n(this, "sorting");
@@ -451,14 +451,14 @@ let Vt = class A {
451
451
  });
452
452
  }
453
453
  static useNew(t) {
454
- return new A(t);
454
+ return new N(t);
455
455
  }
456
456
  isFiltered() {
457
457
  return this.filters.some((t) => t.isActive());
458
458
  }
459
459
  };
460
460
  const Bt = (i) => {
461
- const t = q(M), e = g(), a = e.loader.useIsLoading(), o = e.pagination.hasNextPage();
461
+ const t = q(A), e = g(), a = e.loader.useIsLoading(), o = e.pagination.hasNextPage();
462
462
  return /* @__PURE__ */ r.createElement(
463
463
  b,
464
464
  {
@@ -478,12 +478,12 @@ const Bt = (i) => {
478
478
  const { children: t } = i;
479
479
  return /* @__PURE__ */ r.createElement("div", { className: Ot.listItem }, t);
480
480
  }, jt = (i) => {
481
- const { className: t } = i, a = g().items.entries.map((s) => /* @__PURE__ */ r.createElement(Ht, { key: s.id }, s.render()));
482
- return /* @__PURE__ */ r.createElement("div", { className: D($t.items, t) }, a);
483
- }, N = (i, t) => H(i) ? typeof t == "string" ? typeof i.type == "string" ? i.type === t : !1 : i.type === t : !1, p = (i, t) => st(i, (e) => N(e, t)), k = (i, t) => {
481
+ const { className: t } = i, a = g().items.entries.map((s) => /* @__PURE__ */ r.createElement(Ht, { key: s.id }, /* @__PURE__ */ r.createElement(D, null, s.render())));
482
+ return /* @__PURE__ */ r.createElement("div", { className: R($t.items, t) }, a);
483
+ }, z = (i, t) => H(i) ? typeof t == "string" ? typeof i.type == "string" ? i.type === t : !1 : i.type === t : !1, p = (i, t) => st(i, (e) => z(e, t)), k = (i, t) => {
484
484
  const e = [];
485
485
  return nt(i, (a) => {
486
- N(a, t) && e.push(a);
486
+ z(a, t) && e.push(a);
487
487
  }), e;
488
488
  };
489
489
  function qt(i) {
@@ -525,7 +525,7 @@ function ye(i) {
525
525
  ...e
526
526
  });
527
527
  return /* @__PURE__ */ r.createElement(
528
- R.Provider,
528
+ M.Provider,
529
529
  {
530
530
  value: {
531
531
  list: h
@@ -1,7 +1,5 @@
1
1
  import { FC, PropsWithChildren } from "react";
2
- export interface InitialsProps extends PropsWithChildren<{
3
- children: string;
4
- }> {
2
+ export interface InitialsProps extends PropsWithChildren {
5
3
  className?: string;
6
4
  }
7
5
  export declare const Initials: FC<InitialsProps>;
@@ -1,5 +1,5 @@
1
1
  import { DependencyList, FC, PropsWithChildren } from "react";
2
- import { PropsContext as PropsContextShape } from '.';
2
+ import { PropsContext as PropsContextShape } from './types';
3
3
  interface Props extends PropsWithChildren {
4
4
  props: PropsContextShape;
5
5
  dependencies?: DependencyList;
@@ -1,5 +1,6 @@
1
1
  export { ClearPropsContext } from './ClearPropsContext';
2
- export { dynamic } from "./dynamicProps/dynamic";
3
2
  export { PropsContextProvider } from "./PropsContextProvider";
4
3
  export { useProps } from "./useProps";
5
4
  export type { PropsContext } from "./types";
5
+ import { useProps } from "./useProps";
6
+ export default useProps;
@@ -1,3 +1,3 @@
1
- import { PropsContext } from '.';
1
+ import { PropsContext } from './types';
2
2
  export declare const mergePropsContext: (firstContext: PropsContext, secondContext: PropsContext) => PropsContext;
3
3
  export default mergePropsContext;
@@ -1,3 +1,2 @@
1
- import { PropsContext } from '..';
2
- import { ComponentPropsContext } from '../types';
1
+ import { ComponentPropsContext, PropsContext } from '../types';
3
2
  export declare const pickPropsContext: <C extends keyof import('../../../components/propTypes').FlowComponentPropsTypes>(props: ComponentPropsContext<C>) => PropsContext;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.1.0-alpha.44",
3
+ "version": "0.1.0-alpha.45",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://mittwald.github.io/flow",
@@ -253,5 +253,5 @@
253
253
  "optional": true
254
254
  }
255
255
  },
256
- "gitHead": "79b1586d1ea438e712b3e4e1e0a57c554cb11ad0"
256
+ "gitHead": "be9d031d09a0fce11fbd3d7258edc95da99f106e"
257
257
  }