@mittwald/flow-react-components 0.2.0-alpha.764 → 0.2.0-alpha.766

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 (68) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/assets/doc-properties.json +341 -212
  3. package/dist/js/default.mjs +2 -2
  4. package/dist/js/packages/components/src/components/List/components/Items/Items.mjs +2 -2
  5. package/dist/js/packages/components/src/components/List/components/Items/Items.mjs.map +1 -1
  6. package/dist/js/packages/components/src/components/List/components/Items/components/Item/Item.mjs +7 -7
  7. package/dist/js/packages/components/src/components/List/components/Items/components/Item/Item.mjs.map +1 -1
  8. package/dist/js/packages/components/src/components/List/components/Items/components/Item/hooks/{useGridItemProps.mjs → useBoxItemProps.mjs} +5 -5
  9. package/dist/js/packages/components/src/components/List/components/Items/components/Item/hooks/useBoxItemProps.mjs.map +1 -0
  10. package/dist/js/packages/components/src/components/List/components/Items/views/{GridList/GridList.mjs → ListBox/ListBox.mjs} +4 -4
  11. package/dist/js/packages/components/src/components/List/components/Items/views/ListBox/ListBox.mjs.map +1 -0
  12. package/dist/js/packages/components/src/components/List/components/Items/views/{GridListItem/GridListItem.mjs → ListBoxItem/ListBoxItem.mjs} +4 -4
  13. package/dist/js/packages/components/src/components/List/components/Items/views/ListBoxItem/ListBoxItem.mjs.map +1 -0
  14. package/dist/js/packages/components/src/components/List/model/search/Search.mjs +0 -1
  15. package/dist/js/packages/components/src/components/List/model/search/Search.mjs.map +1 -1
  16. package/dist/js/packages/components/src/components/SettingsProvider/SettingsProvider.mjs +1 -0
  17. package/dist/js/packages/components/src/components/SettingsProvider/SettingsProvider.mjs.map +1 -1
  18. package/dist/js/packages/components/src/views/ItemsListBoxItemView.mjs +15 -0
  19. package/dist/js/packages/components/src/views/ItemsListBoxItemView.mjs.map +1 -0
  20. package/dist/js/packages/components/src/views/ItemsListBoxView.mjs +15 -0
  21. package/dist/js/packages/components/src/views/ItemsListBoxView.mjs.map +1 -0
  22. package/dist/types/components/List/components/Items/components/Item/Item.d.ts.map +1 -1
  23. package/dist/types/components/List/components/Items/components/Item/hooks/{useGridItemProps.d.ts → useBoxItemProps.d.ts} +4 -4
  24. package/dist/types/components/List/components/Items/components/Item/hooks/useBoxItemProps.d.ts.map +1 -0
  25. package/dist/types/components/List/components/Items/views/ListBox/ListBox.d.ts +9 -0
  26. package/dist/types/components/List/components/Items/views/ListBox/ListBox.d.ts.map +1 -0
  27. package/dist/types/components/List/components/Items/views/ListBox/index.d.ts +2 -0
  28. package/dist/types/components/List/components/Items/views/{GridList → ListBox}/index.d.ts.map +1 -1
  29. package/dist/types/components/List/components/Items/views/{GridList → ListBox}/view.d.ts +2 -2
  30. package/dist/types/components/List/components/Items/views/ListBox/view.d.ts.map +1 -0
  31. package/dist/types/components/List/components/Items/views/ListBoxItem/ListBoxItem.d.ts +10 -0
  32. package/dist/types/components/List/components/Items/views/ListBoxItem/ListBoxItem.d.ts.map +1 -0
  33. package/dist/types/components/List/components/Items/views/ListBoxItem/index.d.ts +3 -0
  34. package/dist/types/components/List/components/Items/views/{GridListItem → ListBoxItem}/index.d.ts.map +1 -1
  35. package/dist/types/components/List/components/Items/views/ListBoxItem/view.d.ts +8 -0
  36. package/dist/types/components/List/components/Items/views/ListBoxItem/view.d.ts.map +1 -0
  37. package/dist/types/components/List/index.d.ts +2 -2
  38. package/dist/types/components/List/index.d.ts.map +1 -1
  39. package/dist/types/components/List/model/search/Search.d.ts.map +1 -1
  40. package/dist/types/components/List/stories/Default.stories.d.ts.map +1 -1
  41. package/dist/types/components/List/typedList.d.ts +1 -1
  42. package/dist/types/components/SettingsProvider/SettingsProvider.d.ts.map +1 -1
  43. package/dist/types/views/ItemsListBoxItemView.d.ts +5 -0
  44. package/dist/types/views/ItemsListBoxItemView.d.ts.map +1 -0
  45. package/dist/types/views/ItemsListBoxView.d.ts +5 -0
  46. package/dist/types/views/ItemsListBoxView.d.ts.map +1 -0
  47. package/package.json +6 -6
  48. package/dist/js/packages/components/src/components/List/components/Items/components/Item/hooks/useGridItemProps.mjs.map +0 -1
  49. package/dist/js/packages/components/src/components/List/components/Items/views/GridList/GridList.mjs.map +0 -1
  50. package/dist/js/packages/components/src/components/List/components/Items/views/GridListItem/GridListItem.mjs.map +0 -1
  51. package/dist/js/packages/components/src/views/ItemsGridListItemView.mjs +0 -15
  52. package/dist/js/packages/components/src/views/ItemsGridListItemView.mjs.map +0 -1
  53. package/dist/js/packages/components/src/views/ItemsGridListView.mjs +0 -15
  54. package/dist/js/packages/components/src/views/ItemsGridListView.mjs.map +0 -1
  55. package/dist/types/components/List/components/Items/components/Item/hooks/useGridItemProps.d.ts.map +0 -1
  56. package/dist/types/components/List/components/Items/views/GridList/GridList.d.ts +0 -9
  57. package/dist/types/components/List/components/Items/views/GridList/GridList.d.ts.map +0 -1
  58. package/dist/types/components/List/components/Items/views/GridList/index.d.ts +0 -2
  59. package/dist/types/components/List/components/Items/views/GridList/view.d.ts.map +0 -1
  60. package/dist/types/components/List/components/Items/views/GridListItem/GridListItem.d.ts +0 -10
  61. package/dist/types/components/List/components/Items/views/GridListItem/GridListItem.d.ts.map +0 -1
  62. package/dist/types/components/List/components/Items/views/GridListItem/index.d.ts +0 -3
  63. package/dist/types/components/List/components/Items/views/GridListItem/view.d.ts +0 -8
  64. package/dist/types/components/List/components/Items/views/GridListItem/view.d.ts.map +0 -1
  65. package/dist/types/views/ItemsGridListItemView.d.ts +0 -5
  66. package/dist/types/views/ItemsGridListItemView.d.ts.map +0 -1
  67. package/dist/types/views/ItemsGridListView.d.ts +0 -5
  68. package/dist/types/views/ItemsGridListView.d.ts.map +0 -1
@@ -212,8 +212,8 @@ export { LightBoxTrigger } from './packages/components/src/components/LightBox/c
212
212
  export { LightBox } from './packages/components/src/components/LightBox/LightBox.mjs';
213
213
  export { Link } from './packages/components/src/components/Link/Link.mjs';
214
214
  export { SortingFunctions } from './packages/components/src/components/List/model/sorting/SortingFunctions.mjs';
215
- export { GridList } from './packages/components/src/components/List/components/Items/views/GridList/GridList.mjs';
216
- export { GridListItem } from './packages/components/src/components/List/components/Items/views/GridListItem/GridListItem.mjs';
215
+ export { ListBox } from './packages/components/src/components/List/components/Items/views/ListBox/ListBox.mjs';
216
+ export { ListBoxItem } from './packages/components/src/components/List/components/Items/views/ListBoxItem/ListBoxItem.mjs';
217
217
  export { ListItemView } from './packages/components/src/components/List/components/ListItemView/ListItemView.mjs';
218
218
  export { ListItemViewContent } from './packages/components/src/components/List/components/ListItemView/components/ListItemViewContent/ListItemViewContent.mjs';
219
219
  export { ListSummary } from './packages/components/src/components/List/components/ListSummary/ListSummary.mjs';
@@ -25,7 +25,7 @@ import 'mobx';
25
25
  import '../../List.mjs';
26
26
  import { Item } from './components/Item/Item.mjs';
27
27
  import DivView from '../../../../views/DivView.mjs';
28
- import ItemsGridListView from '../../../../views/ItemsGridListView.mjs';
28
+ import ItemsListBoxView from '../../../../views/ItemsListBoxView.mjs';
29
29
  import styles from './Items.module.scss.mjs';
30
30
  import { FallbackItems } from './components/FallbackItems/FallbackItems.mjs';
31
31
 
@@ -44,7 +44,7 @@ const Items = () => {
44
44
  tiles && styles.tiles
45
45
  );
46
46
  return /* @__PURE__ */ jsx(DivView, { "aria-hidden": isInitiallyLoading, "aria-busy": isLoading, children: /* @__PURE__ */ jsx(
47
- ItemsGridListView,
47
+ ItemsListBoxView,
48
48
  {
49
49
  className: rootClassName,
50
50
  ...list.componentProps,
@@ -1 +1 @@
1
- {"version":3,"file":"Items.mjs","sources":["../../../../../../../../../src/components/List/components/Items/Items.tsx"],"sourcesContent":["import { EmptyView } from \"@/components/List\";\nimport Item from \"@/components/List/components/Items/components/Item/Item\";\nimport { useList } from \"@/components/List/hooks/useList\";\nimport DivView from \"@/views/DivView\";\nimport ItemsGridListView from \"@/views/ItemsGridListView\";\nimport clsx from \"clsx\";\nimport type { FC } from \"react\";\nimport styles from \"./Items.module.scss\";\nimport { FallbackItems } from \"./components/FallbackItems\";\n\nexport const Items: FC = () => {\n const list = useList();\n const tiles = list.viewMode.isTiles;\n const isLoading = list.loader.useIsLoading();\n const isInitiallyLoading = list.loader.useIsInitiallyLoading();\n\n if (!list.itemView) {\n return null;\n }\n\n const items = list.items.entries.map((item) => (\n <Item key={item.id} data={item.data} id={item.id} />\n ));\n\n const rootClassName = clsx(\n styles.items,\n isLoading && styles.isLoading,\n tiles && styles.tiles,\n );\n\n return (\n <DivView aria-hidden={isInitiallyLoading} aria-busy={isLoading}>\n <ItemsGridListView\n className={rootClassName}\n {...list.componentProps}\n renderEmptyState={() => <EmptyView />}\n layout={tiles ? \"grid\" : \"stack\"}\n tileMaxWidth={list.itemView.tileMaxWidth}\n >\n {items.length === 0 && isInitiallyLoading ? <FallbackItems /> : items}\n </ItemsGridListView>\n </DivView>\n );\n};\n\nexport default Items;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUO,MAAM,QAAY,MAAM;AAC7B,EAAA,MAAM,OAAO,OAAA,EAAQ;AACrB,EAAA,MAAM,KAAA,GAAQ,KAAK,QAAA,CAAS,OAAA;AAC5B,EAAA,MAAM,SAAA,GAAY,IAAA,CAAK,MAAA,CAAO,YAAA,EAAa;AAC3C,EAAA,MAAM,kBAAA,GAAqB,IAAA,CAAK,MAAA,CAAO,qBAAA,EAAsB;AAE7D,EAAA,IAAI,CAAC,KAAK,QAAA,EAAU;AAClB,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,MAAM,QAAQ,IAAA,CAAK,KAAA,CAAM,OAAA,CAAQ,GAAA,CAAI,CAAC,IAAA,qBACpC,GAAA,CAAC,IAAA,EAAA,EAAmB,IAAA,EAAM,KAAK,IAAA,EAAM,EAAA,EAAI,KAAK,EAAA,EAAA,EAAnC,IAAA,CAAK,EAAkC,CACnD,CAAA;AAED,EAAA,MAAM,aAAA,GAAgB,IAAA;AAAA,IACpB,MAAA,CAAO,KAAA;AAAA,IACP,aAAa,MAAA,CAAO,SAAA;AAAA,IACpB,SAAS,MAAA,CAAO;AAAA,GAClB;AAEA,EAAA,uBACE,GAAA,CAAC,OAAA,EAAA,EAAQ,aAAA,EAAa,kBAAA,EAAoB,aAAW,SAAA,EACnD,QAAA,kBAAA,GAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,aAAA;AAAA,MACV,GAAG,IAAA,CAAK,cAAA;AAAA,MACT,gBAAA,EAAkB,sBAAM,GAAA,CAAC,SAAA,EAAA,EAAU,CAAA;AAAA,MACnC,MAAA,EAAQ,QAAQ,MAAA,GAAS,OAAA;AAAA,MACzB,YAAA,EAAc,KAAK,QAAA,CAAS,YAAA;AAAA,MAE3B,gBAAM,MAAA,KAAW,CAAA,IAAK,kBAAA,mBAAqB,GAAA,CAAC,iBAAc,CAAA,GAAK;AAAA;AAAA,GAClE,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Items.mjs","sources":["../../../../../../../../../src/components/List/components/Items/Items.tsx"],"sourcesContent":["import { EmptyView } from \"@/components/List\";\nimport Item from \"@/components/List/components/Items/components/Item/Item\";\nimport { useList } from \"@/components/List/hooks/useList\";\nimport DivView from \"@/views/DivView\";\nimport ItemsListBoxView from \"@/views/ItemsListBoxView\";\nimport clsx from \"clsx\";\nimport type { FC } from \"react\";\nimport styles from \"./Items.module.scss\";\nimport { FallbackItems } from \"./components/FallbackItems\";\n\nexport const Items: FC = () => {\n const list = useList();\n const tiles = list.viewMode.isTiles;\n const isLoading = list.loader.useIsLoading();\n const isInitiallyLoading = list.loader.useIsInitiallyLoading();\n\n if (!list.itemView) {\n return null;\n }\n\n const items = list.items.entries.map((item) => (\n <Item key={item.id} data={item.data} id={item.id} />\n ));\n\n const rootClassName = clsx(\n styles.items,\n isLoading && styles.isLoading,\n tiles && styles.tiles,\n );\n\n return (\n <DivView aria-hidden={isInitiallyLoading} aria-busy={isLoading}>\n <ItemsListBoxView\n className={rootClassName}\n {...list.componentProps}\n renderEmptyState={() => <EmptyView />}\n layout={tiles ? \"grid\" : \"stack\"}\n tileMaxWidth={list.itemView.tileMaxWidth}\n >\n {items.length === 0 && isInitiallyLoading ? <FallbackItems /> : items}\n </ItemsListBoxView>\n </DivView>\n );\n};\n\nexport default Items;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUO,MAAM,QAAY,MAAM;AAC7B,EAAA,MAAM,OAAO,OAAA,EAAQ;AACrB,EAAA,MAAM,KAAA,GAAQ,KAAK,QAAA,CAAS,OAAA;AAC5B,EAAA,MAAM,SAAA,GAAY,IAAA,CAAK,MAAA,CAAO,YAAA,EAAa;AAC3C,EAAA,MAAM,kBAAA,GAAqB,IAAA,CAAK,MAAA,CAAO,qBAAA,EAAsB;AAE7D,EAAA,IAAI,CAAC,KAAK,QAAA,EAAU;AAClB,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,MAAM,QAAQ,IAAA,CAAK,KAAA,CAAM,OAAA,CAAQ,GAAA,CAAI,CAAC,IAAA,qBACpC,GAAA,CAAC,IAAA,EAAA,EAAmB,IAAA,EAAM,KAAK,IAAA,EAAM,EAAA,EAAI,KAAK,EAAA,EAAA,EAAnC,IAAA,CAAK,EAAkC,CACnD,CAAA;AAED,EAAA,MAAM,aAAA,GAAgB,IAAA;AAAA,IACpB,MAAA,CAAO,KAAA;AAAA,IACP,aAAa,MAAA,CAAO,SAAA;AAAA,IACpB,SAAS,MAAA,CAAO;AAAA,GAClB;AAEA,EAAA,uBACE,GAAA,CAAC,OAAA,EAAA,EAAQ,aAAA,EAAa,kBAAA,EAAoB,aAAW,SAAA,EACnD,QAAA,kBAAA,GAAA;AAAA,IAAC,gBAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,aAAA;AAAA,MACV,GAAG,IAAA,CAAK,cAAA;AAAA,MACT,gBAAA,EAAkB,sBAAM,GAAA,CAAC,SAAA,EAAA,EAAU,CAAA;AAAA,MACnC,MAAA,EAAQ,QAAQ,MAAA,GAAS,OAAA;AAAA,MACzB,YAAA,EAAc,KAAK,QAAA,CAAS,YAAA;AAAA,MAE3B,gBAAM,MAAA,KAAW,CAAA,IAAK,kBAAA,mBAAqB,GAAA,CAAC,iBAAc,CAAA,GAAK;AAAA;AAAA,GAClE,EACF,CAAA;AAEJ;;;;"}
@@ -1,9 +1,9 @@
1
1
  "use client"
2
2
  /* */
3
3
  import { jsx } from 'react/jsx-runtime';
4
- import { useGridItemProps } from './hooks/useGridItemProps.mjs';
4
+ import { useBoxItemProps } from './hooks/useBoxItemProps.mjs';
5
5
  import { useList } from '../../../../hooks/useList.mjs';
6
- import ItemsGridListItemView from '../../../../../../views/ItemsGridListItemView.mjs';
6
+ import ItemsListBoxItemView from '../../../../../../views/ItemsListBoxItemView.mjs';
7
7
  import { Suspense } from 'react';
8
8
  import styles from './Item.module.scss.mjs';
9
9
  import { ListItemSkeletonView } from './components/ListItemSkeletonView/ListItemSkeletonView.mjs';
@@ -12,15 +12,15 @@ const Item = (props) => {
12
12
  const { id, data } = props;
13
13
  const list = useList();
14
14
  const itemView = list.itemView;
15
- const { gridItemProps, children } = useGridItemProps(props);
15
+ const { boxItemProps, children } = useBoxItemProps(props);
16
16
  if (!itemView) {
17
17
  return null;
18
18
  }
19
19
  const textValue = itemView.textValue ? itemView.textValue(data) : void 0;
20
20
  const href = itemView.href ? itemView.href(data) : void 0;
21
- const hasAction = !!gridItemProps.onAction || !!href;
21
+ const hasAction = !!boxItemProps.onAction || !!href;
22
22
  return /* @__PURE__ */ jsx(
23
- ItemsGridListItemView,
23
+ ItemsListBoxItemView,
24
24
  {
25
25
  id,
26
26
  textValue,
@@ -28,7 +28,7 @@ const Item = (props) => {
28
28
  target: itemView.target,
29
29
  hasAction,
30
30
  isTile: list.viewMode.isTiles,
31
- ...gridItemProps,
31
+ ...boxItemProps,
32
32
  children: /* @__PURE__ */ jsx(
33
33
  Suspense,
34
34
  {
@@ -42,7 +42,7 @@ const Item = (props) => {
42
42
  const ItemContainer = (props) => {
43
43
  const list = useList();
44
44
  return /* @__PURE__ */ jsx(
45
- ItemsGridListItemView,
45
+ ItemsListBoxItemView,
46
46
  {
47
47
  textValue: "-",
48
48
  className: styles.item,
@@ -1 +1 @@
1
- {"version":3,"file":"Item.mjs","sources":["../../../../../../../../../../../src/components/List/components/Items/components/Item/Item.tsx"],"sourcesContent":["import { useGridItemProps } from \"@/components/List/components/Items/components/Item/hooks/useGridItemProps\";\nimport { useList } from \"@/components/List/hooks/useList\";\nimport ItemsGridListItemView from \"@/views/ItemsGridListItemView\";\nimport type { FC, PropsWithChildren } from \"react\";\nimport { Suspense } from \"react\";\nimport type { Key } from \"react-aria-components\";\nimport styles from \"./Item.module.scss\";\nimport { ListItemSkeletonView } from \"./components/ListItemSkeletonView/ListItemSkeletonView\";\n\ninterface Props extends PropsWithChildren {\n id: Key;\n data: never;\n}\n\nexport const Item = (props: Props) => {\n const { id, data } = props;\n const list = useList();\n\n const itemView = list.itemView;\n\n const { gridItemProps, children } = useGridItemProps(props);\n\n if (!itemView) {\n return null;\n }\n\n const textValue = itemView.textValue ? itemView.textValue(data) : undefined;\n const href = itemView.href ? itemView.href(data) : undefined;\n const hasAction = !!gridItemProps.onAction || !!href;\n\n return (\n <ItemsGridListItemView\n id={id}\n textValue={textValue}\n href={href}\n target={itemView.target}\n hasAction={hasAction}\n isTile={list.viewMode.isTiles}\n {...gridItemProps}\n >\n <Suspense\n fallback={<ListItemSkeletonView viewMode={list.viewMode.value} />}\n >\n {children}\n </Suspense>\n </ItemsGridListItemView>\n );\n};\n\nexport const ItemContainer: FC<Props> = (props) => {\n const list = useList();\n return (\n <ItemsGridListItemView\n textValue=\"-\"\n className={styles.item}\n isTile={list.viewMode.isTiles}\n >\n {props.children}\n </ItemsGridListItemView>\n );\n};\n\nexport default Item;\n"],"names":[],"mappings":";;;;;;;;AAcO,MAAM,IAAA,GAAO,CAAC,KAAA,KAAiB;AACpC,EAAA,MAAM,EAAE,EAAA,EAAI,IAAA,EAAK,GAAI,KAAA;AACrB,EAAA,M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J;;;;"}
1
+ {"version":3,"file":"Item.mjs","sources":["../../../../../../../../../../../src/components/List/components/Items/components/Item/Item.tsx"],"sourcesContent":["import { useBoxItemProps } from \"@/components/List/components/Items/components/Item/hooks/useBoxItemProps\";\nimport { useList } from \"@/components/List/hooks/useList\";\nimport ItemsListBoxItemView from \"@/views/ItemsListBoxItemView\";\nimport type { FC, PropsWithChildren } from \"react\";\nimport { Suspense } from \"react\";\nimport type { Key } from \"react-aria-components\";\nimport styles from \"./Item.module.scss\";\nimport { ListItemSkeletonView } from \"./components/ListItemSkeletonView/ListItemSkeletonView\";\n\ninterface Props extends PropsWithChildren {\n id: Key;\n data: never;\n}\n\nexport const Item = (props: Props) => {\n const { id, data } = props;\n const list = useList();\n\n const itemView = list.itemView;\n\n const { boxItemProps, children } = useBoxItemProps(props);\n\n if (!itemView) {\n return null;\n }\n\n const textValue = itemView.textValue ? itemView.textValue(data) : undefined;\n const href = itemView.href ? itemView.href(data) : undefined;\n\n const hasAction = !!boxItemProps.onAction || !!href;\n\n return (\n <ItemsListBoxItemView\n id={id}\n textValue={textValue}\n href={href}\n target={itemView.target}\n hasAction={hasAction}\n isTile={list.viewMode.isTiles}\n {...boxItemProps}\n >\n <Suspense\n fallback={<ListItemSkeletonView viewMode={list.viewMode.value} />}\n >\n {children}\n </Suspense>\n </ItemsListBoxItemView>\n );\n};\n\nexport const ItemContainer: FC<Props> = (props) => {\n const list = useList();\n return (\n <ItemsListBoxItemView\n textValue=\"-\"\n className={styles.item}\n isTile={list.viewMode.isTiles}\n >\n {props.children}\n </ItemsListBoxItemView>\n );\n};\n\nexport default Item;\n"],"names":[],"mappings":";;;;;;;;AAcO,MAAM,IAAA,GAAO,CAAC,KAAA,KAAiB;AACpC,EAAA,MAAM,EAAE,EAAA,EAAI,IAAA,EAAK,GAAI,KAAA;AACrB,EAAA,MAAM,OAAO,OAAA,EAAQ;AAErB,EAAA,MAAM,WAAW,IAAA,CAAK,QAAA;AAEtB,EAAA,MAAM,EAAE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Button.mjs';
30
30
 
31
- const useGridItemProps = (props) => {
31
+ const useBoxItemProps = (props) => {
32
32
  const { data, children: childrenFromProps } = props;
33
33
  const list = useList();
34
34
  const itemView = list.itemView;
@@ -48,7 +48,7 @@ const useGridItemProps = (props) => {
48
48
  }, [isExpanded, contentElementId, itemRef.current, accordion]);
49
49
  if (!accordion) {
50
50
  return {
51
- gridItemProps: {
51
+ boxItemProps: {
52
52
  onAction: onAction ? () => {
53
53
  onAction?.(data);
54
54
  } : void 0
@@ -76,7 +76,7 @@ const useGridItemProps = (props) => {
76
76
  }
77
77
  };
78
78
  return {
79
- gridItemProps: {
79
+ boxItemProps: {
80
80
  ref: itemRef,
81
81
  onAction: toggleAccordion
82
82
  },
@@ -91,5 +91,5 @@ const useGridItemProps = (props) => {
91
91
  };
92
92
  };
93
93
 
94
- export { useGridItemProps };
95
- //# sourceMappingURL=useGridItemProps.mjs.map
94
+ export { useBoxItemProps };
95
+ //# sourceMappingURL=useBoxItemProps.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBoxItemProps.mjs","sources":["../../../../../../../../../../../../src/components/List/components/Items/components/Item/hooks/useBoxItemProps.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport { useEffect, useId, useRef, useState } from \"react\";\nimport { useList } from \"@/components/List\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport { AccordionButton } from \"@/components/List/components/Items/components/Item/components/AccordionButton\";\n\ninterface P extends PropsWithChildren {\n data: never;\n}\n\nexport const useBoxItemProps = (props: P) => {\n const { data, children: childrenFromProps } = props;\n const list = useList();\n const itemView = list.itemView;\n const onAction = list.onAction;\n\n const [isExpanded, setIsExpanded] = useState(\n itemView?.defaultExpanded?.(data) ?? false,\n );\n const contentElementId = useId();\n const itemRef = useRef<HTMLDivElement>(null);\n\n const accordion = list.accordion;\n const children = childrenFromProps ?? itemView?.render(data);\n\n useEffect(() => {\n if (accordion) {\n itemRef.current?.setAttribute(\"aria-expanded\", String(isExpanded));\n itemRef.current?.setAttribute(\"aria-controls\", contentElementId);\n }\n }, [isExpanded, contentElementId, itemRef.current, accordion]);\n\n if (!accordion) {\n return {\n boxItemProps: {\n onAction: onAction\n ? () => {\n onAction?.(data);\n }\n : undefined,\n },\n children,\n };\n }\n\n const toggleAccordion = () => {\n setIsExpanded((current) => !current);\n onAction?.(data);\n };\n\n const propsContext: PropsContext = {\n Content: {\n id: dynamic((p) => (p.slot === \"bottom\" ? contentElementId : undefined)),\n wrapWith: dynamic((p) =>\n p.slot === \"bottom\" ? (\n <AccordionButton\n contentElementId={contentElementId}\n toggle={toggleAccordion}\n isExpanded={isExpanded}\n />\n ) : undefined,\n ),\n },\n };\n\n return {\n boxItemProps: {\n ref: itemRef,\n onAction: toggleAccordion,\n },\n children: (\n <PropsContextProvider\n props={propsContext}\n dependencies={[contentElementId, isExpanded]}\n >\n {children}\n </PropsContextProvider>\n ),\n };\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWO,MAAM,eAAA,GAAkB,CAAC,KAAA,KAAa;AAC3C,EAAA,MAAM,EAAE,IAAA,EAAM,QAAA,EAAU,iBAAA,EAAkB,GAAI,KAAA;AAC9C,EAAA,MAAM,OAAO,OAAA,EAAQ;AACrB,EAAA,MAAM,WAAW,IAAA,CAAK,QAAA;AACtB,EAAA,MAAM,WAAW,IAAA,CAAK,QAAA;AAEtB,EAAA,MAAM,CAAC,UAAA,EAAY,aAAa,CAAA,GAAI,QAAA;AAAA,IAClC,QAAA,EAAU,eAAA,GAAkB,IAAI,CAAA,IAAK;AAAA,GACvC;AACA,EAAA,MAAM,mBAAmB,KAAA,EAAM;AAC/B,EAAA,MAAM,OAAA,GAAU,OAAuB,IAAI,CAAA;AAE3C,EAAA,MAAM,YAAY,IAAA,CAAK,SAAA;AACvB,EAAA,MAAM,QAAA,GAAW,iBAAA,IAAqB,QAAA,EAAU,MAAA,CAAO,IA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C,oBAAA;AAAA,MAAA;AAAA,QACC,KAAA,EAAO,YAAA;AAAA,QACP,YAAA,EAAc,CAAC,gBAAA,EAAkB,UAAU,CAAA;AAAA,QAE1C;AAAA;AAAA;AACH,GAEJ;AACF;;;;"}
@@ -4,10 +4,10 @@ import { jsx } from 'react/jsx-runtime';
4
4
  import * as Aria from 'react-aria-components';
5
5
  import { EmptyView } from '../../../../views/EmptyView/EmptyView.mjs';
6
6
 
7
- const GridList = (props) => {
7
+ const ListBox = (props) => {
8
8
  const { tileMaxWidth, ...rest } = props;
9
9
  return /* @__PURE__ */ jsx(
10
- Aria.GridList,
10
+ Aria.ListBox,
11
11
  {
12
12
  ...rest,
13
13
  renderEmptyState: () => /* @__PURE__ */ jsx(EmptyView, {}),
@@ -18,5 +18,5 @@ const GridList = (props) => {
18
18
  );
19
19
  };
20
20
 
21
- export { GridList };
22
- //# sourceMappingURL=GridList.mjs.map
21
+ export { ListBox };
22
+ //# sourceMappingURL=ListBox.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListBox.mjs","sources":["../../../../../../../../../../../src/components/List/components/Items/views/ListBox/ListBox.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { FC } from \"react\";\nimport { EmptyView } from \"@/components/List/views/EmptyView\";\n\nexport type ListBoxProps = Aria.ListBoxProps<never> & {\n tileMaxWidth: number;\n};\n\n/** @flr-generate all */\nexport const ListBox: FC<ListBoxProps> = (props) => {\n const { tileMaxWidth, ...rest } = props;\n\n return (\n <Aria.ListBox\n {...rest}\n renderEmptyState={() => <EmptyView />}\n style={{\n gridTemplateColumns: `repeat(auto-fill, minmax(${tileMaxWidth}px, 1fr))`,\n }}\n />\n );\n};\n\nexport default ListBox;\n"],"names":[],"mappings":";;;;AASO,MAAM,OAAA,GAA4B,CAAC,KAAA,KAAU;AAClD,EAAA,MAAM,EAAE,YAAA,EAAc,GAAG,IAAA,EAAK,GAAI,KAAA;AAElC,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA,CAAK,OAAA;AAAA,IAAL;AAAA,MACE,GAAG,IAAA;AAAA,MACJ,gBAAA,EAAkB,sBAAM,GAAA,CAAC,SAAA,EAAA,EAAU,CAAA;AAAA,MACnC,KAAA,EAAO;AAAA,QACL,mBAAA,EAAqB,4BAA4B,YAAY,CAAA,SAAA;AAAA;AAC/D;AAAA,GACF;AAEJ;;;;"}
@@ -5,10 +5,10 @@ import * as Aria from 'react-aria-components';
5
5
  import styles from '../../components/Item/Item.module.scss.mjs';
6
6
  import clsx from 'clsx';
7
7
 
8
- const GridListItem = (props) => {
8
+ const ListBoxItem = (props) => {
9
9
  const { hasAction, isTile, ...restProps } = props;
10
10
  return /* @__PURE__ */ jsx(
11
- Aria.GridListItem,
11
+ Aria.ListBoxItem,
12
12
  {
13
13
  ...restProps,
14
14
  className: (renderProps) => clsx(
@@ -21,5 +21,5 @@ const GridListItem = (props) => {
21
21
  );
22
22
  };
23
23
 
24
- export { GridListItem };
25
- //# sourceMappingURL=GridListItem.mjs.map
24
+ export { ListBoxItem };
25
+ //# sourceMappingURL=ListBoxItem.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListBoxItem.mjs","sources":["../../../../../../../../../../../src/components/List/components/Items/views/ListBoxItem/ListBoxItem.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { FC } from \"react\";\nimport styles from \"@/components/List/components/Items/components/Item/Item.module.scss\";\nimport clsx from \"clsx\";\n\nexport type ListBoxItemProps = Aria.ListBoxItemProps<never> & {\n hasAction?: boolean;\n isTile?: boolean;\n};\n\n/** @flr-generate all */\nexport const ListBoxItem: FC<ListBoxItemProps> = (props) => {\n const { hasAction, isTile, ...restProps } = props;\n return (\n <Aria.ListBoxItem\n {...restProps}\n className={(renderProps) =>\n clsx(\n styles.item,\n hasAction && styles.hasAction,\n isTile && styles.tile,\n renderProps.isSelected && styles.isSelected,\n )\n }\n />\n );\n};\n\nexport default ListBoxItem;\n"],"names":[],"mappings":";;;;;AAWO,MAAM,WAAA,GAAoC,CAAC,KAAA,KAAU;AAC1D,EAAA,MAAM,EAAE,SAAA,EAAW,MAAA,EAAQ,GAAG,WAAU,GAAI,KAAA;AAC5C,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA,CAAK,WAAA;AAAA,IAAL;AAAA,MACE,GAAG,SAAA;AAAA,MACJ,SAAA,EAAW,CAAC,WAAA,KACV,IAAA;AAAA,QACE,MAAA,CAAO,IAAA;AAAA,QACP,aAAa,MAAA,CAAO,SAAA;AAAA,QACpB,UAAU,MAAA,CAAO,IAAA;AAAA,QACjB,WAAA,CAAY,cAAc,MAAA,CAAO;AAAA;AACnC;AAAA,GAEJ;AAEJ;;;;"}
@@ -47,7 +47,6 @@ class Search {
47
47
  this.list.reactTable.table.setGlobalFilter(value);
48
48
  this.callOnUpdateCallbacks();
49
49
  }
50
- console.log("Storing search value:", value, this.autosave);
51
50
  this.list.settingsStorage?.store(
52
51
  "search",
53
52
  { value },
@@ -1 +1 @@
1
- {"version":3,"file":"Search.mjs","sources":["../../../../../../../../../src/components/List/model/search/Search.ts"],"sourcesContent":["import type List from \"@/components/List/model/List\";\nimport type {\n SearchFieldRenderComponent,\n SearchShape,\n SearchValue,\n} from \"@/components/List/model/search/types\";\nimport type { InitialTableState } from \"@tanstack/react-table\";\n\nexport class Search<T> {\n public readonly list: List<T>;\n public readonly render?: SearchFieldRenderComponent;\n public readonly textFieldProps: SearchShape<T>[\"textFieldProps\"];\n private onUpdateCallbacks = new Set<() => unknown>();\n private readonly initialValue?: string;\n private readonly defaultValue?: string;\n private readonly autosave: boolean;\n\n public constructor(list: List<T>, searchShape: SearchShape<T>) {\n const {\n autosave = list.settingsStorageDefaults?.search?.autosave ?? false,\n render,\n textFieldProps,\n defaultValue,\n } = searchShape;\n\n this.autosave = autosave;\n this.list = list;\n this.render = render;\n this.textFieldProps = textFieldProps;\n this.defaultValue = defaultValue;\n\n this.initialValue = this.getInitialValue();\n }\n\n public get value(): SearchValue {\n return this.list.reactTable.searchString;\n }\n\n public get isSet() {\n return this.value !== undefined;\n }\n\n private callOnUpdateCallbacks(): void {\n this.onUpdateCallbacks.forEach((cb) => cb());\n }\n\n private getInitialValue() {\n return (\n this.list.settingsStorage?.get(\"search\", { autosave: this.autosave })\n ?.value ?? this.defaultValue\n );\n }\n\n public updateInitialState(initialState: InitialTableState) {\n initialState.globalFilter = this.initialValue;\n }\n\n public setValue(value: SearchValue): void {\n if (value === undefined || value.trim() === \"\") {\n if (this.list.reactTable.table.getState().globalFilter) {\n this.list.reactTable.table.setGlobalFilter(undefined);\n this.callOnUpdateCallbacks();\n }\n } else {\n this.list.reactTable.table.setGlobalFilter(value);\n this.callOnUpdateCallbacks();\n }\n\n console.log(\"Storing search value:\", value, this.autosave);\n\n this.list.settingsStorage?.store(\n \"search\",\n { value },\n { autosave: this.autosave },\n );\n }\n\n public clear(): void {\n this.setValue(undefined);\n }\n\n public onUpdated(cb: () => unknown): void {\n this.onUpdateCallbacks.add(cb);\n }\n}\n"],"names":[],"mappings":"AAQO,MAAM,MAAA,CAAU;AAAA,EACL,IAAA;AAAA,EACA,MAAA;AAAA,EACA,cAAA;AAAA,EACR,iBAAA,uBAAwB,GAAA,EAAmB;AAAA,EAClC,YAAA;AAAA,EACA,YAAA;AAAA,EACA,QAAA;AAAA,EAEV,WAAA,CAAY,MAAe,WAAA,EAA6B;AAC7D,IAAA,MAAM;AAAA,MACJ,QAAA,GAAW,IAAA,CAAK,uBAAA,EAAyB,MAAA,EAAQ,QAAA,IAAY,KAAA;AAAA,MAC7D,MAAA;AAAA,MACA,cAAA;AAAA,MACA;AAAA,KACF,GAAI,WAAA;AAEJ,IAAA,IAAA,CAAK,QAAA,GAAW,QAAA;AAChB,IAAA,IAAA,CAAK,IAAA,GAAO,IAAA;AACZ,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AACd,IAAA,IAAA,CAAK,cAAA,GAAiB,cAAA;AACtB,IAAA,IAAA,CAAK,YAAA,GAAe,YAAA;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A,CAAK,QAAQ,CAAA;AAEzD,IAAA,IAAA,CAAK,KAAK,eAAA,EAAiB,KAAA;AAAA,MACzB,QAAA;AAAA,MACA,EAAE,KAAA,EAAM;AAAA,MACR,EAAE,QAAA,EAAU,IAAA,CAAK,QAAA;AAAS,KAC5B;AAAA,EACF;AAAA,EAEO,KAAA,GAAc;AACnB,IAAA,IAAA,CAAK,SAAS,MAAS,CAAA;AAAA,EACzB;AAAA,EAEO,UAAU,EAAA,EAAyB;AACxC,IAAA,IAAA,CAAK,iBAAA,CAAkB,IAAI,EAAE,CAAA;AAAA,EAC/B;AACF;;;;"}
1
+ {"version":3,"file":"Search.mjs","sources":["../../../../../../../../../src/components/List/model/search/Search.ts"],"sourcesContent":["import type List from \"@/components/List/model/List\";\nimport type {\n SearchFieldRenderComponent,\n SearchShape,\n SearchValue,\n} from \"@/components/List/model/search/types\";\nimport type { InitialTableState } from \"@tanstack/react-table\";\n\nexport class Search<T> {\n public readonly list: List<T>;\n public readonly render?: SearchFieldRenderComponent;\n public readonly textFieldProps: SearchShape<T>[\"textFieldProps\"];\n private onUpdateCallbacks = new Set<() => unknown>();\n private readonly initialValue?: string;\n private readonly defaultValue?: string;\n private readonly autosave: boolean;\n\n public constructor(list: List<T>, searchShape: SearchShape<T>) {\n const {\n autosave = list.settingsStorageDefaults?.search?.autosave ?? false,\n render,\n textFieldProps,\n defaultValue,\n } = searchShape;\n\n this.autosave = autosave;\n this.list = list;\n this.render = render;\n this.textFieldProps = textFieldProps;\n this.defaultValue = defaultValue;\n\n this.initialValue = this.getInitialValue();\n }\n\n public get value(): SearchValue {\n return this.list.reactTable.searchString;\n }\n\n public get isSet() {\n return this.value !== undefined;\n }\n\n private callOnUpdateCallbacks(): void {\n this.onUpdateCallbacks.forEach((cb) => cb());\n }\n\n private getInitialValue() {\n return (\n this.list.settingsStorage?.get(\"search\", { autosave: this.autosave })\n ?.value ?? this.defaultValue\n );\n }\n\n public updateInitialState(initialState: InitialTableState) {\n initialState.globalFilter = this.initialValue;\n }\n\n public setValue(value: SearchValue): void {\n if (value === undefined || value.trim() === \"\") {\n if (this.list.reactTable.table.getState().globalFilter) {\n this.list.reactTable.table.setGlobalFilter(undefined);\n this.callOnUpdateCallbacks();\n }\n } else {\n this.list.reactTable.table.setGlobalFilter(value);\n this.callOnUpdateCallbacks();\n }\n\n this.list.settingsStorage?.store(\n \"search\",\n { value },\n { autosave: this.autosave },\n );\n }\n\n public clear(): void {\n this.setValue(undefined);\n }\n\n public onUpdated(cb: () => unknown): void {\n this.onUpdateCallbacks.add(cb);\n }\n}\n"],"names":[],"mappings":"AAQO,MAAM,MAAA,CAAU;AAAA,EACL,IAAA;AAAA,EACA,MAAA;AAAA,EACA,cAAA;AAAA,EACR,iBAAA,uBAAwB,GAAA,EAAmB;AAAA,EAClC,YAAA;AAAA,EACA,YAAA;AAAA,EACA,QAAA;AAAA,EAEV,WAAA,CAAY,MAAe,WAAA,EAA6B;AAC7D,IAAA,MAAM;AAAA,MACJ,QAAA,GAAW,IAAA,CAAK,uBAAA,EAAyB,MAAA,EAAQ,QAAA,IAAY,KAAA;AAAA,MAC7D,MAAA;AAAA,MACA,cAAA;AAAA,MACA;AAAA,KACF,GAAI,WAAA;AAEJ,IAAA,IAAA,CAAK,QAAA,GAAW,QAAA;AAChB,IAAA,IAAA,CAAK,IAAA,GAAO,IAAA;AACZ,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AACd,IAAA,IAAA,CAAK,cAAA,GAAiB,cAAA;AACtB,IAAA,IAAA,CAAK,YAAA,GAAe,YAAA;AAEpB,IAAA,IAAA,CAAK,YAAA,GAAe,KAAK,eAAA,EAAgB;AAAA,EAC3C;AAAA,EAEA,IAAW,KAAA,GAAqB;AAC9B,IAAA,OAAO,IAAA,CAAK,KAAK,UAAA,CAAW,YAAA;AAAA,EAC9B;AAAA,EAEA,IAAW,KAAA,GAAQ;AACjB,IAAA,OAAO,KAAK,KAAA,KAAU,MAAA;AAAA,EACxB;AAAA,EAEQ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AAA,EAC/B;AACF;;;;"}
@@ -26,6 +26,7 @@ const SettingsProvider = (props) => {
26
26
  const json = settingsStore.asJson;
27
27
  storingPromise.current = storingPromise.current.then(async () => {
28
28
  await backend.store(json);
29
+ settingsResource.refresh();
29
30
  });
30
31
  };
31
32
  useEffect(() => autorun(watchAndStoreSettings), [id]);
@@ -1 +1 @@
1
- {"version":3,"file":"SettingsProvider.mjs","sources":["../../../../../../../src/components/SettingsProvider/SettingsProvider.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport { createContext, useContext, useEffect, useMemo, useRef } from \"react\";\nimport type { SupportedSettingsBackend } from \"@/components/SettingsProvider/backends/types\";\nimport { autorun } from \"mobx\";\nimport { getAsyncResource } from \"@mittwald/react-use-promise\";\nimport {\n SettingsStore,\n type SettingsStoreOptions,\n} from \"@/components/SettingsProvider/models/SettingsStore\";\nimport { settingsBackendFactory } from \"@/components/SettingsProvider/backends/settingsBackendFactory\";\n\ntype Props = PropsWithChildren &\n SupportedSettingsBackend & {\n id?: string;\n } & Pick<SettingsStoreOptions, \"middleware\">;\n\nconst context = createContext<SettingsStore | undefined>(undefined);\n\nexport const useSettings = () => useContext(context);\n\nexport const SettingsProvider: FC<Props> = (props) => {\n const { children, middleware, id = \"static\", ...storeShape } = props;\n const backend = settingsBackendFactory(storeShape);\n\n const settingsResource = getAsyncResource(() => backend.load(), [], {\n loaderId: id,\n });\n const settings = settingsResource.use();\n\n const storingPromise = useRef(Promise.resolve());\n const parentStore = useSettings();\n\n const settingsStore = useMemo(\n () => SettingsStore.fromJson(settings, { middleware, parentStore }),\n [id],\n );\n\n const watchAndStoreSettings = () => {\n const json = settingsStore.asJson;\n storingPromise.current = storingPromise.current.then(async () => {\n await backend.store(json);\n });\n };\n\n useEffect(() => autorun(watchAndStoreSettings), [id]);\n\n return <context.Provider value={settingsStore}>{children}</context.Provider>;\n};\n\nexport default SettingsProvider;\n"],"names":[],"mappings":";;;;;;;AAgBA,MAAM,OAAA,GAA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, PropsWithChildren } from \"react\";\nimport { createContext, useContext, useEffect, useMemo, useRef } from \"react\";\nimport type { SupportedSettingsBackend } from \"@/components/SettingsProvider/backends/types\";\nimport { autorun } from \"mobx\";\nimport { getAsyncResource } from \"@mittwald/react-use-promise\";\nimport {\n SettingsStore,\n type SettingsStoreOptions,\n} from \"@/components/SettingsProvider/models/SettingsStore\";\nimport { settingsBackendFactory } from \"@/components/SettingsProvider/backends/settingsBackendFactory\";\n\ntype Props = PropsWithChildren &\n SupportedSettingsBackend & {\n id?: string;\n } & Pick<SettingsStoreOptions, \"middleware\">;\n\nconst context = createContext<SettingsStore | undefined>(undefined);\n\nexport const useSettings = () => useContext(context);\n\nexport const SettingsProvider: FC<Props> = (props) => {\n const { children, middleware, id = \"static\", ...storeShape } = props;\n const backend = settingsBackendFactory(storeShape);\n\n const settingsResource = getAsyncResource(() => backend.load(), [], {\n loaderId: id,\n });\n const settings = settingsResource.use();\n\n const storingPromise = useRef(Promise.resolve());\n const parentStore = useSettings();\n\n const settingsStore = useMemo(\n () => SettingsStore.fromJson(settings, { middleware, parentStore }),\n [id],\n );\n\n const watchAndStoreSettings = () => {\n const json = settingsStore.asJson;\n storingPromise.current = storingPromise.current.then(async () => {\n await backend.store(json);\n settingsResource.refresh();\n });\n };\n\n useEffect(() => autorun(watchAndStoreSettings), [id]);\n\n return <context.Provider value={settingsStore}>{children}</context.Provider>;\n};\n\nexport default SettingsProvider;\n"],"names":[],"mappings":";;;;;;;AAgBA,MAAM,OAAA,GAAU,cAAyC,MAAS,CAAA;AAE3D,MAAM,WAAA,GAAc,MAAM,UAAA,CAAW,OAAO;AAE5C,MAAM,gBAAA,GAA8B,CAAC,KAAA,KAAU;AACpD,EAAA,MAAM,EAAE,QAAA,EAAU,UAAA,EAAY,KAAK,QAAA,EAAU,GAAG,YAAW,GAAI,KAAA;AAC/D,EAAA,MAAM,OAAA,GAAU,uBAAuB,UAAU,CAAA;AAEjD,EAAA,MAAM,mBAAmB,gBAAA,CAAiB,MAAM,QAAQ,IAAA,EAAK,EAAG,EAAC,EAAG;AAAA,IAClE,QAAA,EAAU;AAAA,GACX,CAAA;AACD,EAAA,MAAM,QAAA,GAAW,iBAAiB,GAAA,EAAI;AAEtC,EAAA,MAAM,cAAA,GAAiB,MAAA,CAAO,OAAA,CAAQ,OAAA,EAAS,CAAA;AAC/C,EAAA,MAAM,cAAc,WAAA,EAAY;AAEhC,EAAA,MAAM,aAAA,GAAgB,OAAA;AAAA,IACpB,MAAM,aAAA,CAAc,QAAA,CAAS,UAAU,EAAE,UAAA,EAAY,aAAa,CAAA;AAAA,IAClE,CAAC,EAAE;AAAA,GACL;AAEA,EAAA,MAAM,wBAAwB,MAAM;AAClC,IAAA,MAAM,OAAO,aAAA,CAAc,MAAA;AAC3B,IAAA,cAAA,CAAe,OAAA,GAAU,cAAA,CAAe,OAAA,CAAQ,IAAA,CAAK,YAAY;AAC/D,MAAA,MAAM,OAAA,CAAQ,MAAM,IAAI,CAAA;AACxB,MAAA,gBAAA,CAAiB,OAAA,EAAQ;AAAA,IAC3B,CAAC,CAAA;AAAA,EACH,CAAA;AAEA,EAAA,SAAA,CAAU,MAAM,OAAA,CAAQ,qBAAqB,CAAA,EAAG,CAAC,EAAE,CAAC,CAAA;AAEpD,EAAA,2BAAQ,OAAA,CAAQ,QAAA,EAAR,EAAiB,KAAA,EAAO,eAAgB,QAAA,EAAS,CAAA;AAC3D;;;;"}
@@ -0,0 +1,15 @@
1
+ "use client"
2
+ /* */
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import { memo, useContext } from 'react';
5
+ import { ListBoxItem } from '../components/List/components/Items/views/ListBoxItem/ListBoxItem.mjs';
6
+ import { viewComponentContext } from '../lib/viewComponentContext/viewComponentContext.mjs';
7
+
8
+ const ItemsListBoxItemView = memo((props) => {
9
+ const View = useContext(viewComponentContext)["ItemsListBoxItem"] ?? ListBoxItem;
10
+ return /* @__PURE__ */ jsx(View, { ...props });
11
+ });
12
+ ItemsListBoxItemView.displayName = "ItemsListBoxItemView";
13
+
14
+ export { ItemsListBoxItemView as default };
15
+ //# sourceMappingURL=ItemsListBoxItemView.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ItemsListBoxItemView.mjs","sources":["../../../../../../src/views/ItemsListBoxItemView.tsx"],"sourcesContent":["/* prettier-ignore */\n/* This file is auto-generated with the remote-components-generator */\nimport React, { memo, type FC, useContext } from \"react\";\nimport {\n ListBoxItem,\n type ListBoxItemProps,\n} from \"@/components/List/components/Items/views/ListBoxItem/ListBoxItem\";\nimport { viewComponentContext } from \"@/lib/viewComponentContext/viewComponentContext\";\n\nconst ItemsListBoxItemView: FC<ListBoxItemProps> = memo((props) => {\n const View =\n useContext(viewComponentContext)[\"ItemsListBoxItem\"] ?? ListBoxItem;\n return <View {...props} />;\n});\nItemsListBoxItemView.displayName = \"ItemsListBoxItemView\";\n\nexport default ItemsListBoxItemView;\n"],"names":[],"mappings":";;;;;AASA,MAAM,oBAAA,GAA6C,IAAA,CAAK,CAAC,KAAA,KAAU;AACjE,EAAA,MAAM,IAAA,GACJ,UAAA,CAAW,oBAAoB,CAAA,CAAE,kBAAkB,CAAA,IAAK,WAAA;AAC1D,EAAA,uBAAO,GAAA,CAAC,IAAA,EAAA,EAAM,GAAG,KAAA,EAAO,CAAA;AAC1B,CAAC;AACD,oBAAA,CAAqB,WAAA,GAAc,sBAAA;;;;"}
@@ -0,0 +1,15 @@
1
+ "use client"
2
+ /* */
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import { memo, useContext } from 'react';
5
+ import { ListBox } from '../components/List/components/Items/views/ListBox/ListBox.mjs';
6
+ import { viewComponentContext } from '../lib/viewComponentContext/viewComponentContext.mjs';
7
+
8
+ const ItemsListBoxView = memo((props) => {
9
+ const View = useContext(viewComponentContext)["ItemsListBox"] ?? ListBox;
10
+ return /* @__PURE__ */ jsx(View, { ...props });
11
+ });
12
+ ItemsListBoxView.displayName = "ItemsListBoxView";
13
+
14
+ export { ItemsListBoxView as default };
15
+ //# sourceMappingURL=ItemsListBoxView.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ItemsListBoxView.mjs","sources":["../../../../../../src/views/ItemsListBoxView.tsx"],"sourcesContent":["/* prettier-ignore */\n/* This file is auto-generated with the remote-components-generator */\nimport React, { memo, type FC, useContext } from \"react\";\nimport {\n ListBox,\n type ListBoxProps,\n} from \"@/components/List/components/Items/views/ListBox/ListBox\";\nimport { viewComponentContext } from \"@/lib/viewComponentContext/viewComponentContext\";\n\nconst ItemsListBoxView: FC<ListBoxProps> = memo((props) => {\n const View = useContext(viewComponentContext)[\"ItemsListBox\"] ?? ListBox;\n return <View {...props} />;\n});\nItemsListBoxView.displayName = \"ItemsListBoxView\";\n\nexport default ItemsListBoxView;\n"],"names":[],"mappings":";;;;;AASA,MAAM,gBAAA,GAAqC,IAAA,CAAK,CAAC,KAAA,KAAU;AACzD,EAAA,MAAM,IAAA,GAAO,UAAA,CAAW,oBAAoB,CAAA,CAAE,cAAc,CAAA,IAAK,OAAA;AACjE,EAAA,uBAAO,GAAA,CAAC,IAAA,EAAA,EAAM,GAAG,KAAA,EAAO,CAAA;AAC1B,CAAC;AACD,gBAAA,CAAiB,WAAA,GAAc,kBAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/List/components/Items/components/Item/Item.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAIjD,UAAU,KAAM,SAAQ,iBAAiB;IACvC,EAAE,EAAE,GAAG,CAAC;IACR,IAAI,EAAE,KAAK,CAAC;CACb;AAED,eAAO,MAAM,IAAI,GAAI,OAAO,KAAK,mDAiChC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,KAAK,CAWnC,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/List/components/Items/components/Item/Item.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAIjD,UAAU,KAAM,SAAQ,iBAAiB;IACvC,EAAE,EAAE,GAAG,CAAC;IACR,IAAI,EAAE,KAAK,CAAC;CACb;AAED,eAAO,MAAM,IAAI,GAAI,OAAO,KAAK,mDAkChC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,KAAK,CAWnC,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -2,18 +2,18 @@ import { PropsWithChildren } from 'react';
2
2
  interface P extends PropsWithChildren {
3
3
  data: never;
4
4
  }
5
- export declare const useGridItemProps: (props: P) => {
6
- gridItemProps: {
5
+ export declare const useBoxItemProps: (props: P) => {
6
+ boxItemProps: {
7
7
  onAction: (() => void) | undefined;
8
8
  ref?: undefined;
9
9
  };
10
10
  children: import('react').ReactNode;
11
11
  } | {
12
- gridItemProps: {
12
+ boxItemProps: {
13
13
  ref: import('react').RefObject<HTMLDivElement | null>;
14
14
  onAction: () => void;
15
15
  };
16
16
  children: import("react/jsx-runtime").JSX.Element;
17
17
  };
18
18
  export {};
19
- //# sourceMappingURL=useGridItemProps.d.ts.map
19
+ //# sourceMappingURL=useBoxItemProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBoxItemProps.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/components/List/components/Items/components/Item/hooks/useBoxItemProps.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAO/C,UAAU,CAAE,SAAQ,iBAAiB;IACnC,IAAI,EAAE,KAAK,CAAC;CACb;AAED,eAAO,MAAM,eAAe,GAAI,OAAO,CAAC;;;;;;;;;;;;CAqEvC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ import * as Aria from "react-aria-components";
3
+ export type ListBoxProps = Aria.ListBoxProps<never> & {
4
+ tileMaxWidth: number;
5
+ };
6
+ /** @flr-generate all */
7
+ export declare const ListBox: FC<ListBoxProps>;
8
+ export default ListBox;
9
+ //# sourceMappingURL=ListBox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListBox.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/List/components/Items/views/ListBox/ListBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAC9C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG;IACpD,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,wBAAwB;AACxB,eAAO,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,CAYpC,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './ListBox';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/List/components/Items/views/GridList/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/List/components/Items/views/ListBox/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
@@ -1,8 +1,8 @@
1
- import { GridList } from './GridList';
1
+ import { ListBox } from './ListBox';
2
2
  import { ViewComponent } from '../../../../../../lib/viewComponentContext';
3
3
  declare global {
4
4
  interface FlowViewComponents {
5
- ItemsGridList: ViewComponent<typeof GridList>;
5
+ ItemsListBox: ViewComponent<typeof ListBox>;
6
6
  }
7
7
  }
8
8
  //# sourceMappingURL=view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/List/components/Items/views/ListBox/view.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEhE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,kBAAkB;QAC1B,YAAY,EAAE,aAAa,CAAC,OAAO,OAAO,CAAC,CAAC;KAC7C;CACF"}
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ import * as Aria from "react-aria-components";
3
+ export type ListBoxItemProps = Aria.ListBoxItemProps<never> & {
4
+ hasAction?: boolean;
5
+ isTile?: boolean;
6
+ };
7
+ /** @flr-generate all */
8
+ export declare const ListBoxItem: FC<ListBoxItemProps>;
9
+ export default ListBoxItem;
10
+ //# sourceMappingURL=ListBoxItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListBoxItem.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/List/components/Items/views/ListBoxItem/ListBoxItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAC9C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAG;IAC5D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,wBAAwB;AACxB,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAe5C,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './view';
2
+ export * from './ListBoxItem';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/List/components/Items/views/GridListItem/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/List/components/Items/views/ListBoxItem/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { ListBoxItem } from './ListBoxItem';
2
+ import { ViewComponent } from '../../../../../../lib/viewComponentContext';
3
+ declare global {
4
+ interface FlowViewComponents {
5
+ ItemsListBoxItem: ViewComponent<typeof ListBoxItem>;
6
+ }
7
+ }
8
+ //# sourceMappingURL=view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/List/components/Items/views/ListBoxItem/view.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEhE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,kBAAkB;QAC1B,gBAAgB,EAAE,aAAa,CAAC,OAAO,WAAW,CAAC,CAAC;KACrD;CACF"}
@@ -2,8 +2,8 @@ export type { RenderItemFn } from './model/item/types';
2
2
  export type { AsyncDataLoader, AsyncResourceFactory, DataLoaderOptions, DataLoaderResult, } from './model/loading/types';
3
3
  export type { SortingFn } from './model/sorting/types';
4
4
  export { SortingFunctions } from './model/sorting/SortingFunctions';
5
- export * from './components/Items/views/GridList';
6
- export * from './components/Items/views/GridListItem';
5
+ export * from './components/Items/views/ListBox';
6
+ export * from './components/Items/views/ListBoxItem';
7
7
  export * from './components/ListItemView';
8
8
  export * from './components/ListSummary';
9
9
  export * from './views/EmptyView';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/List/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,YAAY,EACV,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,uCAAuC,CAAC;AAE/C,YAAY,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAEvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AAEzC,cAAc,mBAAmB,CAAC;AAElC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAE5B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/List/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,YAAY,EACV,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,uCAAuC,CAAC;AAE/C,YAAY,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAEvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AAEzC,cAAc,mBAAmB,CAAC;AAElC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAE5B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Search.d.ts","sourceRoot":"","sources":["../../../../../../src/components/List/model/search/Search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,8BAA8B,CAAC;AACrD,OAAO,KAAK,EACV,0BAA0B,EAC1B,WAAW,EACX,WAAW,EACZ,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,qBAAa,MAAM,CAAC,CAAC;IACnB,SAAgB,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAC9B,SAAgB,MAAM,CAAC,EAAE,0BAA0B,CAAC;IACpD,SAAgB,cAAc,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;IACjE,OAAO,CAAC,iBAAiB,CAA4B;IACrD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;gBAEhB,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;IAiB7D,IAAW,KAAK,IAAI,WAAW,CAE9B;IAED,IAAW,KAAK,YAEf;IAED,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,eAAe;IAOhB,kBAAkB,CAAC,YAAY,EAAE,iBAAiB;IAIlD,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAoBlC,KAAK,IAAI,IAAI;IAIb,SAAS,CAAC,EAAE,EAAE,MAAM,OAAO,GAAG,IAAI;CAG1C"}
1
+ {"version":3,"file":"Search.d.ts","sourceRoot":"","sources":["../../../../../../src/components/List/model/search/Search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,8BAA8B,CAAC;AACrD,OAAO,KAAK,EACV,0BAA0B,EAC1B,WAAW,EACX,WAAW,EACZ,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,qBAAa,MAAM,CAAC,CAAC;IACnB,SAAgB,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAC9B,SAAgB,MAAM,CAAC,EAAE,0BAA0B,CAAC;IACpD,SAAgB,cAAc,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;IACjE,OAAO,CAAC,iBAAiB,CAA4B;IACrD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;gBAEhB,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;IAiB7D,IAAW,KAAK,IAAI,WAAW,CAE9B;IAED,IAAW,KAAK,YAEf;IAED,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,eAAe;IAOhB,kBAAkB,CAAC,YAAY,EAAE,iBAAiB;IAIlD,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAkBlC,KAAK,IAAI,IAAI;IAIb,SAAS,CAAC,EAAE,EAAE,MAAM,OAAO,GAAG,IAAI;CAG1C"}
@@ -1 +1 @@
1
- {"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,IAAI,MAAM,SAAS,CAAC;AAuD3B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,IAAI,CA4G3B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,WAAW,EAAE,KAwCzB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAwC/B,CAAC;AACF,eAAO,MAAM,aAAa,EAAE,KAyC3B,CAAC;AAMF,eAAO,MAAM,WAAW,EAAE,KA8CzB,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAqElC,CAAC"}
1
+ {"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,IAAI,MAAM,SAAS,CAAC;AAuD3B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,IAAI,CA+G3B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,WAAW,EAAE,KAwCzB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAwC/B,CAAC;AACF,eAAO,MAAM,aAAa,EAAE,KAyC3B,CAAC;AAMF,eAAO,MAAM,WAAW,EAAE,KA8CzB,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAqElC,CAAC"}
@@ -216,9 +216,9 @@ export declare const typedList: <T, TMeta = unknown>() => {
216
216
  selectionMode?: import('react-stately').SelectionMode | undefined;
217
217
  dragAndDropHooks?: import('react-aria-components').DragAndDropHooks | undefined;
218
218
  verticalAlign?: "top" | "middle" | undefined;
219
- disabledBehavior?: import('react-stately').DisabledBehavior | undefined;
220
219
  sortDescriptor?: import('react-stately').SortDescriptor | undefined;
221
220
  onSortChange?: ((descriptor: import('react-stately').SortDescriptor) => any) | undefined;
221
+ disabledBehavior?: import('react-stately').DisabledBehavior | undefined;
222
222
  onRowAction?: ((key: import('react-aria').Key) => void) | undefined;
223
223
  }) => null;
224
224
  StaticData: ComponentType<{
@@ -1 +1 @@
1
- {"version":3,"file":"SettingsProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/SettingsProvider/SettingsProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAG7F,OAAO,EACL,aAAa,EACb,KAAK,oBAAoB,EAC1B,MAAM,oDAAoD,CAAC;AAG5D,KAAK,KAAK,GAAG,iBAAiB,GAC5B,wBAAwB,GAAG;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,GAAG,IAAI,CAAC,oBAAoB,EAAE,YAAY,CAAC,CAAC;AAI/C,eAAO,MAAM,WAAW,iCAA4B,CAAC;AAErD,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,KAAK,CA2BtC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"SettingsProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/SettingsProvider/SettingsProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAG7F,OAAO,EACL,aAAa,EACb,KAAK,oBAAoB,EAC1B,MAAM,oDAAoD,CAAC;AAG5D,KAAK,KAAK,GAAG,iBAAiB,GAC5B,wBAAwB,GAAG;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,GAAG,IAAI,CAAC,oBAAoB,EAAE,YAAY,CAAC,CAAC;AAI/C,eAAO,MAAM,WAAW,iCAA4B,CAAC;AAErD,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,KAAK,CA4BtC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { ListBoxItemProps } from '../components/List/components/Items/views/ListBoxItem/ListBoxItem';
3
+ declare const ItemsListBoxItemView: FC<ListBoxItemProps>;
4
+ export default ItemsListBoxItemView;
5
+ //# sourceMappingURL=ItemsListBoxItemView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ItemsListBoxItemView.d.ts","sourceRoot":"","sources":["../../../src/views/ItemsListBoxItemView.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAQ,KAAK,EAAE,EAAc,MAAM,OAAO,CAAC;AACzD,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,kEAAkE,CAAC;AAG1E,QAAA,MAAM,oBAAoB,EAAE,EAAE,CAAC,gBAAgB,CAI7C,CAAC;AAGH,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { ListBoxProps } from '../components/List/components/Items/views/ListBox/ListBox';
3
+ declare const ItemsListBoxView: FC<ListBoxProps>;
4
+ export default ItemsListBoxView;
5
+ //# sourceMappingURL=ItemsListBoxView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ItemsListBoxView.d.ts","sourceRoot":"","sources":["../../../src/views/ItemsListBoxView.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAQ,KAAK,EAAE,EAAc,MAAM,OAAO,CAAC;AACzD,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,0DAA0D,CAAC;AAGlE,QAAA,MAAM,gBAAgB,EAAE,EAAE,CAAC,YAAY,CAGrC,CAAC;AAGH,eAAe,gBAAgB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.2.0-alpha.764",
3
+ "version": "0.2.0-alpha.766",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://mittwald.github.io/flow",
@@ -60,9 +60,9 @@
60
60
  "@codemirror/lint": "^6.9.5",
61
61
  "@internationalized/string-compiler": "^3.2.6",
62
62
  "@lezer/highlight": "^1.2.3",
63
- "@mittwald/flow-icons": "0.2.0-alpha.764",
63
+ "@mittwald/flow-icons": "0.2.0-alpha.766",
64
64
  "@mittwald/password-tools-js": "3.0.0-alpha.18",
65
- "@mittwald/react-tunnel": "0.2.0-alpha.764",
65
+ "@mittwald/react-tunnel": "0.2.0-alpha.766",
66
66
  "@mittwald/react-use-promise": "^4.2.2",
67
67
  "@react-aria/form": "^3.1.3",
68
68
  "@react-aria/live-announcer": "^3.4.4",
@@ -112,7 +112,7 @@
112
112
  "@lezer/generator": "^1.8.0",
113
113
  "@lezer/lr": "^1.4.8",
114
114
  "@mittwald/flow-core": "",
115
- "@mittwald/flow-design-tokens": "0.2.0-alpha.764",
115
+ "@mittwald/flow-design-tokens": "0.2.0-alpha.766",
116
116
  "@mittwald/flow-icons-base": "",
117
117
  "@mittwald/react-use-promise": "^4.2.2",
118
118
  "@mittwald/remote-dom-react": "1.2.2-mittwald.10",
@@ -165,7 +165,7 @@
165
165
  },
166
166
  "peerDependencies": {
167
167
  "@internationalized/date": "^3.10.0",
168
- "@mittwald/flow-icons-pro": "0.2.0-alpha.763",
168
+ "@mittwald/flow-icons-pro": "0.2.0-alpha.765",
169
169
  "@mittwald/react-use-promise": "^4.2.2",
170
170
  "next": "*",
171
171
  "react": "^19.2.0",
@@ -186,5 +186,5 @@
186
186
  "optional": true
187
187
  }
188
188
  },
189
- "gitHead": "871c224b0ef4b398a42e00c9644a9c1c9912b74b"
189
+ "gitHead": "bc4a6c0fc89ff6377f85db2f8e701b9863cfd12f"
190
190
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"useGridItemProps.mjs","sources":["../../../../../../../../../../../../src/components/List/components/Items/components/Item/hooks/useGridItemProps.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport { useEffect, useId, useRef, useState } from \"react\";\nimport { useList } from \"@/components/List\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport { AccordionButton } from \"@/components/List/components/Items/components/Item/components/AccordionButton\";\n\ninterface P extends PropsWithChildren {\n data: never;\n}\n\nexport const useGridItemProps = (props: P) => {\n const { data, children: childrenFromProps } = props;\n const list = useList();\n const itemView = list.itemView;\n const onAction = list.onAction;\n\n const [isExpanded, setIsExpanded] = useState(\n itemView?.defaultExpanded?.(data) ?? false,\n );\n const contentElementId = useId();\n const itemRef = useRef<HTMLDivElement>(null);\n\n const accordion = list.accordion;\n const children = childrenFromProps ?? itemView?.render(data);\n\n useEffect(() => {\n if (accordion) {\n itemRef.current?.setAttribute(\"aria-expanded\", String(isExpanded));\n itemRef.current?.setAttribute(\"aria-controls\", contentElementId);\n }\n }, [isExpanded, contentElementId, itemRef.current, accordion]);\n\n if (!accordion) {\n return {\n gridItemProps: {\n onAction: onAction\n ? () => {\n onAction?.(data);\n }\n : undefined,\n },\n children,\n };\n }\n\n const toggleAccordion = () => {\n setIsExpanded((current) => !current);\n onAction?.(data);\n };\n\n const propsContext: PropsContext = {\n Content: {\n id: dynamic((p) => (p.slot === \"bottom\" ? contentElementId : undefined)),\n wrapWith: dynamic((p) =>\n p.slot === \"bottom\" ? (\n <AccordionButton\n contentElementId={contentElementId}\n toggle={toggleAccordion}\n isExpanded={isExpanded}\n />\n ) : undefined,\n ),\n },\n };\n\n return {\n gridItemProps: {\n ref: itemRef,\n onAction: toggleAccordion,\n },\n children: (\n <PropsContextProvider\n props={propsContext}\n dependencies={[contentElementId, isExpanded]}\n >\n {children}\n </PropsContextProvider>\n ),\n };\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWO,MAAM,gBAAA,GAAmB,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,EACjB,CAAA;AAEA,EAAA,MAAM,YAAA,GAA6B;AAAA,IACjC,OAAA,EAAS;AAAA,MACP,EAAA,EAAI,QAAQ,CAAC,CAAA,KAAO,EAAE,IAAA,KAAS,QAAA,GAAW,mBAAmB,MAAU,CAAA;AAAA,MACvE,QAAA,EAAU,OAAA;AAAA,QAAQ,CAAC,CAAA,KACjB,CAAA,CAAE,IAAA,KAAS,QAAA,mBACT,GAAA;AAAA,UAAC,eAAA;AAAA,UAAA;AAAA,YACC,gBAAA;AAAA,YACA,MAAA,EAAQ,eAAA;AAAA,YACR;AAAA;AAAA,SACF,GACE;AAAA;AACN;AACF,GACF;AAEA,EAAA,OAAO;AAAA,IACL,aAAA,EAAe;AAAA,MACb,GAAA,EAAK,OAAA;AAAA,MACL,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,QAAA,kBACE,GAAA;AAAA,MAAC,oBAAA;AAAA,MAAA;AAAA,QACC,KAAA,EAAO,YAAA;AAAA,QACP,YAAA,EAAc,CAAC,gBAAA,EAAkB,UAAU,CAAA;AAAA,QAE1C;AAAA;AAAA;AACH,GAEJ;AACF;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"GridList.mjs","sources":["../../../../../../../../../../../src/components/List/components/Items/views/GridList/GridList.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { FC } from \"react\";\nimport { EmptyView } from \"@/components/List/views/EmptyView\";\n\nexport type GridListProps = Aria.GridListProps<never> & {\n tileMaxWidth: number;\n};\n\n/** @flr-generate all */\nexport const GridList: FC<GridListProps> = (props) => {\n const { tileMaxWidth, ...rest } = props;\n\n return (\n <Aria.GridList\n {...rest}\n renderEmptyState={() => <EmptyView />}\n style={{\n gridTemplateColumns: `repeat(auto-fill, minmax(${tileMaxWidth}px, 1fr))`,\n }}\n />\n );\n};\n\nexport default GridList;\n"],"names":[],"mappings":";;;;AASO,MAAM,QAAA,GAA8B,CAAC,KAAA,KAAU;AACpD,EAAA,MAAM,EAAE,YAAA,EAAc,GAAG,IAAA,EAAK,GAAI,KAAA;AAElC,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA,CAAK,QAAA;AAAA,IAAL;AAAA,MACE,GAAG,IAAA;AAAA,MACJ,gBAAA,EAAkB,sBAAM,GAAA,CAAC,SAAA,EAAA,EAAU,CAAA;AAAA,MACnC,KAAA,EAAO;AAAA,QACL,mBAAA,EAAqB,4BAA4B,YAAY,CAAA,SAAA;AAAA;AAC/D;AAAA,GACF;AAEJ;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"GridListItem.mjs","sources":["../../../../../../../../../../../src/components/List/components/Items/views/GridListItem/GridListItem.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { FC } from \"react\";\nimport styles from \"@/components/List/components/Items/components/Item/Item.module.scss\";\nimport clsx from \"clsx\";\n\nexport type GridListItemProps = Aria.GridListItemProps<never> & {\n hasAction?: boolean;\n isTile?: boolean;\n};\n\n/** @flr-generate all */\nexport const GridListItem: FC<GridListItemProps> = (props) => {\n const { hasAction, isTile, ...restProps } = props;\n return (\n <Aria.GridListItem\n {...restProps}\n className={(renderProps) =>\n clsx(\n styles.item,\n hasAction && styles.hasAction,\n isTile && styles.tile,\n renderProps.isSelected && styles.isSelected,\n )\n }\n />\n );\n};\n\nexport default GridListItem;\n"],"names":[],"mappings":";;;;;AAWO,MAAM,YAAA,GAAsC,CAAC,KAAA,KAAU;AAC5D,EAAA,MAAM,EAAE,SAAA,EAAW,MAAA,EAAQ,GAAG,WAAU,GAAI,KAAA;AAC5C,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA,CAAK,YAAA;AAAA,IAAL;AAAA,MACE,GAAG,SAAA;AAAA,MACJ,SAAA,EAAW,CAAC,WAAA,KACV,IAAA;AAAA,QACE,MAAA,CAAO,IAAA;AAAA,QACP,aAAa,MAAA,CAAO,SAAA;AAAA,QACpB,UAAU,MAAA,CAAO,IAAA;AAAA,QACjB,WAAA,CAAY,cAAc,MAAA,CAAO;AAAA;AACnC;AAAA,GAEJ;AAEJ;;;;"}