@mittwald/flow-react-components 1.4.0-next.0 → 1.4.0-next.10

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 (138) hide show
  1. package/MIGRATION.md +2 -1
  2. package/README.md +4 -0
  3. package/USAGE.md +29 -3
  4. package/dist/assets/component-index.json +1 -1
  5. package/dist/assets/doc-properties.json +1 -1
  6. package/dist/css/all-layered.css +1 -1
  7. package/dist/css/all.css +1 -1
  8. package/dist/js/_virtual/_13.locale.mjs +5 -505
  9. package/dist/js/_virtual/_14.locale.mjs +505 -5
  10. package/dist/js/_virtual/_15.locale.mjs +9 -3
  11. package/dist/js/_virtual/_16.locale.mjs +3 -59
  12. package/dist/js/_virtual/_17.locale.mjs +63 -3
  13. package/dist/js/_virtual/_18.locale.mjs +3 -9
  14. package/dist/js/_virtual/_19.locale.mjs +5 -5
  15. package/dist/js/_virtual/_20.locale.mjs +5 -11
  16. package/dist/js/_virtual/_21.locale.mjs +15 -3
  17. package/dist/js/_virtual/_22.locale.mjs +3 -15
  18. package/dist/js/_virtual/_23.locale.mjs +15 -3
  19. package/dist/js/_virtual/_24.locale.mjs +3 -33
  20. package/dist/js/_virtual/_25.locale.mjs +29 -5
  21. package/dist/js/_virtual/_26.locale.mjs +9 -3
  22. package/dist/js/_virtual/_27.locale.mjs +3 -3
  23. package/dist/js/_virtual/_28.locale.mjs +3 -93
  24. package/dist/js/_virtual/_29.locale.mjs +93 -3
  25. package/dist/js/_virtual/_30.locale.mjs +3 -9
  26. package/dist/js/_virtual/_31.locale.mjs +5 -5
  27. package/dist/js/_virtual/_32.locale.mjs +5 -7
  28. package/dist/js/_virtual/_33.locale.mjs +7 -13
  29. package/dist/js/_virtual/_34.locale.mjs +23 -0
  30. package/dist/js/packages/components/src/components/CheckboxButton/CheckboxButton.mjs +1 -0
  31. package/dist/js/packages/components/src/components/CheckboxButton/CheckboxButton.mjs.map +1 -1
  32. package/dist/js/packages/components/src/components/CheckboxButton/CheckboxButton.module.mjs +4 -2
  33. package/dist/js/packages/components/src/components/CheckboxButton/CheckboxButton.module.mjs.map +1 -1
  34. package/dist/js/packages/components/src/components/ColumnLayout/ColumnLayout.mjs +7 -3
  35. package/dist/js/packages/components/src/components/ColumnLayout/ColumnLayout.mjs.map +1 -1
  36. package/dist/js/packages/components/src/components/ColumnLayout/lib/getColumns.mjs +1 -1
  37. package/dist/js/packages/components/src/components/ColumnLayout/lib/getColumns.mjs.map +1 -1
  38. package/dist/js/packages/components/src/components/ContextMenu/ContextMenu.mjs +9 -6
  39. package/dist/js/packages/components/src/components/ContextMenu/ContextMenu.mjs.map +1 -1
  40. package/dist/js/packages/components/src/components/ContextMenu/ContextMenu.module.mjs +4 -2
  41. package/dist/js/packages/components/src/components/ContextMenu/ContextMenu.module.mjs.map +1 -1
  42. package/dist/js/packages/components/src/components/ContextMenu/components/ContextMenuSelectAll/ContextMenuSelectAll.mjs +86 -0
  43. package/dist/js/packages/components/src/components/ContextMenu/components/ContextMenuSelectAll/ContextMenuSelectAll.mjs.map +1 -0
  44. package/dist/js/packages/components/src/components/CountryOptions/CountryOptions.mjs +1 -1
  45. package/dist/js/packages/components/src/components/FileCard/components/DeleteButton/DeleteButton.mjs +1 -1
  46. package/dist/js/packages/components/src/components/Heading/Heading.mjs +12 -3
  47. package/dist/js/packages/components/src/components/Heading/Heading.mjs.map +1 -1
  48. package/dist/js/packages/components/src/components/Heading/Heading.module.mjs +5 -1
  49. package/dist/js/packages/components/src/components/Heading/Heading.module.mjs.map +1 -1
  50. package/dist/js/packages/components/src/components/ImageCropper/ImageCropper.mjs +1 -1
  51. package/dist/js/packages/components/src/components/Kbd/Kbd.mjs +1 -1
  52. package/dist/js/packages/components/src/components/Label/Label.mjs +33 -25
  53. package/dist/js/packages/components/src/components/Label/Label.mjs.map +1 -1
  54. package/dist/js/packages/components/src/components/Label/Label.module.mjs +4 -2
  55. package/dist/js/packages/components/src/components/Label/Label.module.mjs.map +1 -1
  56. package/dist/js/packages/components/src/components/LightBox/LightBox.mjs +1 -1
  57. package/dist/js/packages/components/src/components/LightBox/components/LightBoxGallery/Controls.mjs +1 -1
  58. package/dist/js/packages/components/src/components/LightBox/components/LightBoxGallery/LightBoxGallery.mjs +1 -1
  59. package/dist/js/packages/components/src/components/LightBox/components/LightBoxGalleryItem/LightBoxGalleryItem.mjs +1 -1
  60. package/dist/js/packages/components/src/components/Link/components/LinkIcon/LinkIcon.mjs +1 -1
  61. package/dist/js/packages/components/src/components/List/components/EmptySearchResultView/EmptySearchResultView.mjs +1 -1
  62. package/dist/js/packages/components/src/components/List/components/EmptyView/EmptyView.mjs +1 -1
  63. package/dist/js/packages/components/src/components/List/components/Footer/Footer.mjs +1 -1
  64. package/dist/js/packages/components/src/components/List/components/Footer/components/PaginationInfos/PaginationInfos.mjs +1 -1
  65. package/dist/js/packages/components/src/components/List/components/Footer/components/ShowNextBatchButton/ShowNextBatchButton.mjs +1 -1
  66. package/dist/js/packages/components/src/components/List/components/Header/components/ActiveFilters/ActiveFilters.mjs +1 -1
  67. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/AllFiltersModal.mjs +3 -3
  68. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/AllFiltersModal.mjs.map +1 -1
  69. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionCheckboxGroup.mjs +15 -3
  70. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionCheckboxGroup.mjs.map +1 -1
  71. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionCheckboxGroup.module.mjs +9 -0
  72. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionCheckboxGroup.module.mjs.map +1 -0
  73. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionDateRange.mjs +3 -3
  74. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionDateRange.mjs.map +1 -1
  75. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionRadioGroup.mjs +3 -3
  76. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionRadioGroup.mjs.map +1 -1
  77. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/SortingAccordion.mjs +1 -1
  78. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/ViewModeAccordion.mjs +1 -1
  79. package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/DateRangeFilterPopover.mjs +1 -1
  80. package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/FilterContextMenu.mjs +3 -0
  81. package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/FilterContextMenu.mjs.map +1 -1
  82. package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/FilterMenuItem.mjs +1 -1
  83. package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/FilterMenuItem.mjs.map +1 -1
  84. package/dist/js/packages/components/src/components/List/components/Header/components/SortingContextMenu/SortingContextMenu.mjs +1 -1
  85. package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeContextMenu.mjs +1 -1
  86. package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeMenuItem.mjs +1 -1
  87. package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/AccordionButton.mjs +1 -1
  88. package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/OptionsButton/OptionsButton.mjs +1 -1
  89. package/dist/js/packages/components/src/components/List/components/ListItemView/ListItemView.module.mjs.map +1 -1
  90. package/dist/js/packages/components/src/components/List/hooks/useAriaAnnounceSearchState.mjs +1 -1
  91. package/dist/js/packages/components/src/components/List/model/filter/Filter.mjs +21 -0
  92. package/dist/js/packages/components/src/components/List/model/filter/Filter.mjs.map +1 -1
  93. package/dist/js/packages/components/src/components/List/views/EmptyView/EmptyView.mjs +1 -1
  94. package/dist/js/packages/components/src/components/MarkdownEditor/components/ModeButton.mjs +1 -1
  95. package/dist/js/packages/components/src/components/MarkdownEditor/components/ToolbarButton.mjs +1 -1
  96. package/dist/js/packages/components/src/components/MarkdownEditor/lib/useFileUpload.mjs +1 -1
  97. package/dist/js/packages/components/src/components/MenuItem/MenuItem.mjs +2 -1
  98. package/dist/js/packages/components/src/components/MenuItem/MenuItem.mjs.map +1 -1
  99. package/dist/js/packages/components/src/components/MenuItem/MenuItem.module.mjs +3 -1
  100. package/dist/js/packages/components/src/components/MenuItem/MenuItem.module.mjs.map +1 -1
  101. package/dist/js/packages/components/src/components/MenuItem/components/MenuItemContent/MenuItemContent.mjs +4 -3
  102. package/dist/js/packages/components/src/components/MenuItem/components/MenuItemContent/MenuItemContent.mjs.map +1 -1
  103. package/dist/js/packages/components/src/components/Message/Message.mjs +1 -1
  104. package/dist/js/packages/components/src/components/MessageThread/components/MessageSeparator/MessageSeparator.mjs +1 -1
  105. package/dist/js/packages/components/src/components/Modal/Modal.mjs +1 -1
  106. package/dist/js/packages/components/src/components/Modal/Modal.module.mjs.map +1 -1
  107. package/dist/js/packages/components/src/components/Modal/components/ConfirmUnsavedChangesModal/ConfirmUnsavedChangesModal.mjs +1 -1
  108. package/dist/js/packages/components/src/components/Notification/Notification.mjs +1 -1
  109. package/dist/js/packages/components/src/components/PasswordCreationField/PasswordCreationField.mjs +1 -1
  110. package/dist/js/packages/components/src/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.mjs +1 -1
  111. package/dist/js/packages/components/src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.mjs +1 -1
  112. package/dist/js/packages/components/src/components/PasswordCreationField/components/ValidationResultButton/ValidationResultButton.mjs +1 -1
  113. package/dist/js/packages/components/src/components/PasswordCreationField/components/ValidationResultEntry/ValidationResultEntry.mjs +1 -1
  114. package/dist/js/packages/components/src/components/PasswordCreationField/lib/ariaAnnounce.mjs +1 -1
  115. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/RatingSegment.mjs +1 -1
  116. package/dist/js/packages/components/src/components/SearchField/SearchField.mjs +1 -1
  117. package/dist/js/packages/components/src/components/Slider/Slider.mjs +1 -1
  118. package/dist/js/packages/components/src/components/TabNavigation/TabNavigation.mjs +1 -1
  119. package/dist/js/packages/components/src/components/TabNavigation/lib/useCollapsingItems.mjs +2 -1
  120. package/dist/js/packages/components/src/components/TabNavigation/lib/useCollapsingItems.mjs.map +1 -1
  121. package/dist/js/packages/components/src/components/Tabs/components/FallbackTab/FallbackTab.mjs +1 -1
  122. package/dist/js/packages/components/src/components/Tabs/lib/useTabIndicator.mjs +3 -2
  123. package/dist/js/packages/components/src/components/Tabs/lib/useTabIndicator.mjs.map +1 -1
  124. package/dist/js/packages/components/src/components/TextArea/TextArea.mjs +1 -1
  125. package/dist/js/packages/components/src/components/TextField/TextField.mjs +1 -1
  126. package/dist/js/packages/components/src/integrations/react-hook-form/components/Field/Field.mjs +1 -1
  127. package/dist/js/packages/design-tokens/dist/json-runtime/all-dark.mjs +4 -0
  128. package/dist/js/packages/design-tokens/dist/json-runtime/all-dark.mjs.map +1 -1
  129. package/dist/js/packages/design-tokens/dist/json-runtime/all-light.mjs +4 -0
  130. package/dist/js/packages/design-tokens/dist/json-runtime/all-light.mjs.map +1 -1
  131. package/dist/types/components/ContextMenu/ContextMenu.d.ts +5 -0
  132. package/dist/types/components/ContextMenu/components/ContextMenuSelectAll/ContextMenuSelectAll.d.ts +7 -0
  133. package/dist/types/components/List/model/filter/Filter.d.ts +6 -0
  134. package/dist/types/components/List/typedList.d.ts +3 -3
  135. package/dist/types/components/MenuItem/MenuItem.d.ts +5 -0
  136. package/dist/types/components/MenuItem/components/MenuItemContent/MenuItemContent.d.ts +1 -0
  137. package/dist/types/lib/theming/hooks/useDesignTokens.d.ts +4 -0
  138. package/package.json +9 -9
@@ -1,22 +1,16 @@
1
1
  "use client"
2
2
  /* */
3
- //#region \0.locale.json@72ba2ce40f190df671686fec50c04ddf
3
+ //#region \0.locale.json@16189d7d260d7331b0e0a1936d5c7c52
4
4
  var __locale_default = {
5
5
  "de-DE": {
6
- "validation.max": "Maximale Anzahl von {number} erreicht",
7
- "validation.maxLength": "Bitte gib höchstens {number} Zeichen ein",
8
- "validation.min": "Minimale Anzahl von {number} noch nicht erreicht",
9
- "validation.minLength": "Bitte gib mindestens {number} Zeichen ein",
10
- "validation.pattern": "Entspricht nicht dem erwarteten Format: {pattern}",
11
- "validation.required": "Dieses Feld ist erforderlich"
6
+ "characters": "{maxCount, select, 0 {{count}} other {{count}/{maxCount}}} Zeichen",
7
+ "password.hide": "Passwort verbergen",
8
+ "password.show": "Passwort anzeigen"
12
9
  },
13
10
  "en-US": {
14
- "validation.max": "Maximum number of {number} reached",
15
- "validation.maxLength": "Please enter at most {number} characters",
16
- "validation.min": "Minimum number of {number} has not yet been reached",
17
- "validation.minLength": "Please enter at least {number} characters",
18
- "validation.pattern": "Does not match the expected format: {pattern}",
19
- "validation.required": "This field is required"
11
+ "characters": "{maxCount, select, 0 {{count}} other {{count}/{maxCount}}} characters",
12
+ "password.hide": "Show password",
13
+ "password.show": "Hide password"
20
14
  }
21
15
  };
22
16
  //#endregion
@@ -0,0 +1,23 @@
1
+ "use client"
2
+ /* */
3
+ //#region \0.locale.json@72ba2ce40f190df671686fec50c04ddf
4
+ var __locale_default = {
5
+ "de-DE": {
6
+ "validation.max": "Maximale Anzahl von {number} erreicht",
7
+ "validation.maxLength": "Bitte gib höchstens {number} Zeichen ein",
8
+ "validation.min": "Minimale Anzahl von {number} noch nicht erreicht",
9
+ "validation.minLength": "Bitte gib mindestens {number} Zeichen ein",
10
+ "validation.pattern": "Entspricht nicht dem erwarteten Format: {pattern}",
11
+ "validation.required": "Dieses Feld ist erforderlich"
12
+ },
13
+ "en-US": {
14
+ "validation.max": "Maximum number of {number} reached",
15
+ "validation.maxLength": "Please enter at most {number} characters",
16
+ "validation.min": "Minimum number of {number} has not yet been reached",
17
+ "validation.minLength": "Please enter at least {number} characters",
18
+ "validation.pattern": "Does not match the expected format: {pattern}",
19
+ "validation.required": "This field is required"
20
+ }
21
+ };
22
+ //#endregion
23
+ export { __locale_default as default };
@@ -22,6 +22,7 @@ var CheckboxButton = flowComponent("CheckboxButton", (props) => {
22
22
  className: clsx(fieldProps.className, CheckboxButton_module_default.checkboxButton, className),
23
23
  children: [/* @__PURE__ */ jsx(FieldErrorCaptureContext, { children: /* @__PURE__ */ jsx(Checkbox, {
24
24
  ...rest,
25
+ className: CheckboxButton_module_default.checkbox,
25
26
  inputClassName: clsx(inputClassName, CheckboxButton_module_default.input),
26
27
  children: /* @__PURE__ */ jsx(PropsContextProvider, {
27
28
  props: mergedPropsContext,
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxButton.mjs","names":[],"sources":["../../../../../../../src/components/CheckboxButton/CheckboxButton.tsx"],"sourcesContent":["import styles from \"./CheckboxButton.module.scss\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { CheckboxProps } from \"@/components/Checkbox\";\nimport { Checkbox } from \"@/components/Checkbox\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\n\nexport interface CheckboxButtonProps\n extends CheckboxProps, FlowComponentProps<HTMLInputElement> {}\n\n/** @flr-generate all */\nexport const CheckboxButton = flowComponent(\"CheckboxButton\", (props) => {\n const { children, className, inputClassName, ...rest } = props;\n\n const {\n fieldPropsContext,\n fieldProps,\n FieldErrorView,\n FieldErrorCaptureContext,\n } = useFieldComponent(props, \"CheckboxButton\");\n\n const mergedPropsContext: PropsContext = {\n Text: {\n className: styles.label,\n },\n Content: {\n className: styles.content,\n },\n ...fieldPropsContext,\n };\n\n return (\n <div\n {...fieldProps}\n className={clsx(fieldProps.className, styles.checkboxButton, className)}\n >\n <FieldErrorCaptureContext>\n <Checkbox {...rest} inputClassName={clsx(inputClassName, styles.input)}>\n <PropsContextProvider props={mergedPropsContext}>\n {children}\n </PropsContextProvider>\n </Checkbox>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </div>\n );\n});\n\nexport default CheckboxButton;\n"],"mappings":";;;;;;;;;;;AAcA,IAAa,iBAAiB,cAAc,mBAAmB,UAAU;CACvE,MAAM,EAAE,UAAU,WAAW,gBAAgB,GAAG,SAAS;CAEzD,MAAM,EACJ,mBACA,YACA,gBACA,6BACE,kBAAkB,OAAO,gBAAgB;CAE7C,MAAM,qBAAmC;EACvC,MAAM,EACJ,WAAW,8BAAO,MACpB;EACA,SAAS,EACP,WAAW,8BAAO,QACpB;EACA,GAAG;CACL;CAEA,OACE,qBAAC,OAAD;EACE,GAAI;EACJ,WAAW,KAAK,WAAW,WAAW,8BAAO,gBAAgB,SAAS;EAFxE,UAAA,CAIE,oBAAC,0BAAD,EAAA,UACE,oBAAC,UAAD;GAAU,GAAI;GAAM,gBAAgB,KAAK,gBAAgB,8BAAO,KAAK;GACnE,UAAA,oBAAC,sBAAD;IAAsB,OAAO;IAC1B;GACmB,CAAA;EACd,CAAA,EACc,CAAA,GAC1B,oBAAC,gBAAD,CAAiB,CAAA,CACd;;AAET,CAAC"}
1
+ {"version":3,"file":"CheckboxButton.mjs","names":[],"sources":["../../../../../../../src/components/CheckboxButton/CheckboxButton.tsx"],"sourcesContent":["import styles from \"./CheckboxButton.module.scss\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { CheckboxProps } from \"@/components/Checkbox\";\nimport { Checkbox } from \"@/components/Checkbox\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\n\nexport interface CheckboxButtonProps\n extends CheckboxProps, FlowComponentProps<HTMLInputElement> {}\n\n/** @flr-generate all */\nexport const CheckboxButton = flowComponent(\"CheckboxButton\", (props) => {\n const { children, className, inputClassName, ...rest } = props;\n\n const {\n fieldPropsContext,\n fieldProps,\n FieldErrorView,\n FieldErrorCaptureContext,\n } = useFieldComponent(props, \"CheckboxButton\");\n\n const mergedPropsContext: PropsContext = {\n Text: {\n className: styles.label,\n },\n Content: {\n className: styles.content,\n },\n ...fieldPropsContext,\n };\n\n return (\n <div\n {...fieldProps}\n className={clsx(fieldProps.className, styles.checkboxButton, className)}\n >\n <FieldErrorCaptureContext>\n <Checkbox\n {...rest}\n className={styles.checkbox}\n inputClassName={clsx(inputClassName, styles.input)}\n >\n <PropsContextProvider props={mergedPropsContext}>\n {children}\n </PropsContextProvider>\n </Checkbox>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </div>\n );\n});\n\nexport default CheckboxButton;\n"],"mappings":";;;;;;;;;;;AAcA,IAAa,iBAAiB,cAAc,mBAAmB,UAAU;CACvE,MAAM,EAAE,UAAU,WAAW,gBAAgB,GAAG,SAAS;CAEzD,MAAM,EACJ,mBACA,YACA,gBACA,6BACE,kBAAkB,OAAO,gBAAgB;CAE7C,MAAM,qBAAmC;EACvC,MAAM,EACJ,WAAW,8BAAO,MACpB;EACA,SAAS,EACP,WAAW,8BAAO,QACpB;EACA,GAAG;CACL;CAEA,OACE,qBAAC,OAAD;EACE,GAAI;EACJ,WAAW,KAAK,WAAW,WAAW,8BAAO,gBAAgB,SAAS;EAFxE,UAAA,CAIE,oBAAC,0BAAD,EAAA,UACE,oBAAC,UAAD;GACE,GAAI;GACJ,WAAW,8BAAO;GAClB,gBAAgB,KAAK,gBAAgB,8BAAO,KAAK;GAEjD,UAAA,oBAAC,sBAAD;IAAsB,OAAO;IAC1B;GACmB,CAAA;EACd,CAAA,EACc,CAAA,GAC1B,oBAAC,gBAAD,CAAiB,CAAA,CACd;;AAET,CAAC"}
@@ -6,14 +6,16 @@ var input = "flow--checkbox-button--input";
6
6
  var readonly = "flow--checkbox-button--readonly";
7
7
  var content = "flow--checkbox-button--content";
8
8
  var label = "flow--checkbox-button--label";
9
+ var checkbox = "flow--checkbox-button--checkbox";
9
10
  var CheckboxButton_module_default = {
10
11
  checkboxButton,
11
12
  input,
12
13
  readonly,
13
14
  content,
14
- label
15
+ label,
16
+ checkbox
15
17
  };
16
18
  //#endregion
17
- export { checkboxButton, content, CheckboxButton_module_default as default, input, label, readonly };
19
+ export { checkbox, checkboxButton, content, CheckboxButton_module_default as default, input, label, readonly };
18
20
 
19
21
  //# sourceMappingURL=CheckboxButton.module.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxButton.module.mjs","names":[],"sources":["../../../../../../../src/components/CheckboxButton/CheckboxButton.module.scss"],"sourcesContent":["@use \"@/styles/mixins/formControl\";\n\n.checkboxButton {\n @include formControl.formHiddenInputScrollBehaviorFix;\n\n align-self: normal;\n width: fit-content;\n\n .input {\n @include formControl.formControl();\n\n & {\n order: unset;\n }\n\n /* With content */\n &:focus-within:not([data-selected], [data-focus-visible]) {\n border-color: var(--form-control--border-color--default);\n }\n\n &[data-invalid]:not([data-selected]) {\n border-color: var(--form-control--border-color--invalid);\n background-color: var(--form-control--background-color--invalid);\n }\n\n &:has(.content) {\n display: grid;\n grid-template-areas:\n \"icon label\"\n \". content\";\n grid-template-rows: auto 1fr;\n\n .label {\n font-weight: var(--font-weight--bold);\n }\n }\n }\n\n /* Elements */\n .label {\n grid-area: label;\n }\n\n .content {\n grid-area: content;\n }\n}\n"],"mappings":""}
1
+ {"version":3,"file":"CheckboxButton.module.mjs","names":[],"sources":["../../../../../../../src/components/CheckboxButton/CheckboxButton.module.scss"],"sourcesContent":["@use \"@/styles/mixins/formControl\";\n\n.checkboxButton {\n @include formControl.formHiddenInputScrollBehaviorFix;\n\n align-self: normal;\n width: fit-content;\n\n .input {\n @include formControl.formControl();\n\n & {\n order: unset;\n height: 100%;\n }\n\n /* With content */\n &:focus-within:not([data-selected], [data-focus-visible]) {\n border-color: var(--form-control--border-color--default);\n }\n\n &[data-invalid]:not([data-selected]) {\n border-color: var(--form-control--border-color--invalid);\n background-color: var(--form-control--background-color--invalid);\n }\n\n &:has(.content) {\n display: grid;\n grid-template:\n \"icon label\" auto\n \". content\" 1fr\n / auto 1fr;\n\n .label {\n font-weight: var(--font-weight--bold);\n }\n }\n }\n\n /* Elements */\n .checkbox {\n flex-grow: 1;\n }\n\n .label {\n grid-area: label;\n }\n\n .content {\n grid-area: content;\n }\n}\n"],"mappings":""}
@@ -21,9 +21,13 @@ var ColumnLayout = flowComponent("ColumnLayout", (props) => {
21
21
  l?.map((v, i) => {
22
22
  if (v === null) elementClassName = clsx(elementClassName, styleClassname(ColumnLayout_module_default, `hide-l-${i + 1}`));
23
23
  });
24
- const columnsS = s ? getColumns(s) : "1fr";
25
- const columnsM = m ? getColumns(m) : s ? columnsS : "1fr 1fr";
26
- const columnsL = l ? getColumns(l) : m || s ? columnsM : "1fr 1fr 1fr";
24
+ const columnsS = getColumns(s ?? [1]);
25
+ const columnsM = m ? getColumns(m) : s ? columnsS : getColumns([1, 1]);
26
+ const columnsL = l ? getColumns(l) : m || s ? columnsM : getColumns([
27
+ 1,
28
+ 1,
29
+ 1
30
+ ]);
27
31
  const style = {
28
32
  ...styleFromProps,
29
33
  "--column-layout--columns-s": columnsS,
@@ -1 +1 @@
1
- {"version":3,"file":"ColumnLayout.mjs","names":[],"sources":["../../../../../../../src/components/ColumnLayout/ColumnLayout.tsx"],"sourcesContent":["import type { CSSProperties, PropsWithChildren } from \"react\";\nimport styles from \"./ColumnLayout.module.scss\";\nimport { styleClassname } from \"@/lib/scss/selectors\";\nimport { getColumns } from \"./lib/getColumns\";\nimport clsx from \"clsx\";\nimport type {\n PropsWithClassName,\n PropsWithElementType,\n} from \"@/lib/types/props\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\n\ntype GapSize = \"s\" | \"m\" | \"l\" | \"xl\";\n\nexport interface ColumnLayoutProps<\n T extends keyof HTMLElementTagNameMap = \"div\" | \"ul\",\n>\n extends\n PropsWithChildren,\n PropsWithElementType<T>,\n PropsWithClassName,\n FlowComponentProps<HTMLElementTagNameMap[T]> {\n /** Column layout for container size s. */\n s?: (number | null)[];\n /** Column layout for container size m. */\n m?: (number | null)[];\n /** Column layout for container size l. */\n l?: (number | null)[];\n /**\n * Size of the row and column gap between the content blocks inside the column\n * layout.\n *\n * @default \"m\"\n */\n gap?: GapSize;\n /** Size of the row gap between the content blocks inside the column layout. */\n rowGap?: GapSize;\n /** Size of the column gap between the content blocks inside the column layout. */\n columnGap?: GapSize;\n}\n\n/** @flr-generate all */\nexport const ColumnLayout = flowComponent(\n \"ColumnLayout\",\n (props) => {\n const {\n children,\n className,\n s,\n m,\n l,\n gap = \"m\",\n rowGap = gap,\n columnGap = gap,\n elementType = \"div\",\n \"aria-label\": ariaLabel,\n ref,\n style: styleFromProps,\n } = props;\n\n let elementClassName: string = styles.columnLayout;\n\n s?.map((v, i) => {\n if (v === null) {\n elementClassName = clsx(\n elementClassName,\n styleClassname(styles, `hide-s-${i + 1}`),\n );\n }\n });\n m?.map((v, i) => {\n if (v === null) {\n elementClassName = clsx(\n elementClassName,\n styleClassname(styles, `hide-m-${i + 1}`),\n );\n }\n });\n l?.map((v, i) => {\n if (v === null) {\n elementClassName = clsx(\n elementClassName,\n styleClassname(styles, `hide-l-${i + 1}`),\n );\n }\n });\n\n const columnsS = s ? getColumns(s) : \"1fr\";\n const columnsM = m ? getColumns(m) : s ? columnsS : \"1fr 1fr\";\n const columnsL = l ? getColumns(l) : m || s ? columnsM : \"1fr 1fr 1fr\";\n\n const style = {\n ...styleFromProps,\n \"--column-layout--columns-s\": columnsS,\n \"--column-layout--columns-m\": columnsM,\n \"--column-layout--columns-l\": columnsL,\n \"--column-layout--row-gap\": `var(--column-layout--gap--${rowGap})`,\n \"--column-layout--column-gap\": `var(--column-layout--gap--${columnGap})`,\n } as CSSProperties;\n\n const rootClassName = clsx(styles.columnLayoutContainer, className);\n\n const Element = elementType;\n\n const propsContext: PropsContext = {\n Section: {\n hideSeparator: true,\n },\n };\n\n return (\n <div className={rootClassName} style={style}>\n <Element\n ref={ref as never}\n aria-label={ariaLabel}\n className={elementClassName}\n >\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </Element>\n </div>\n );\n },\n {\n type: \"layout\",\n },\n);\n\nexport default ColumnLayout;\n"],"mappings":";;;;;;;;;;;AA8CA,IAAa,eAAe,cAC1B,iBACC,UAAU;CACT,MAAM,EACJ,UACA,WACA,GACA,GACA,GACA,MAAM,KACN,SAAS,KACT,YAAY,KACZ,cAAc,OACd,cAAc,WACd,KACA,OAAO,mBACL;CAEJ,IAAI,mBAA2B,4BAAO;CAEtC,GAAG,KAAK,GAAG,MAAM;EACf,IAAI,MAAM,MACR,mBAAmB,KACjB,kBACA,eAAe,6BAAQ,UAAU,IAAI,GAAG,CAC1C;CAEJ,CAAC;CACD,GAAG,KAAK,GAAG,MAAM;EACf,IAAI,MAAM,MACR,mBAAmB,KACjB,kBACA,eAAe,6BAAQ,UAAU,IAAI,GAAG,CAC1C;CAEJ,CAAC;CACD,GAAG,KAAK,GAAG,MAAM;EACf,IAAI,MAAM,MACR,mBAAmB,KACjB,kBACA,eAAe,6BAAQ,UAAU,IAAI,GAAG,CAC1C;CAEJ,CAAC;CAED,MAAM,WAAW,IAAI,WAAW,CAAC,IAAI;CACrC,MAAM,WAAW,IAAI,WAAW,CAAC,IAAI,IAAI,WAAW;CACpD,MAAM,WAAW,IAAI,WAAW,CAAC,IAAI,KAAK,IAAI,WAAW;CAEzD,MAAM,QAAQ;EACZ,GAAG;EACH,8BAA8B;EAC9B,8BAA8B;EAC9B,8BAA8B;EAC9B,4BAA4B,6BAA6B,OAAO;EAChE,+BAA+B,6BAA6B,UAAU;CACxE;CAEA,MAAM,gBAAgB,KAAK,4BAAO,uBAAuB,SAAS;CAUlE,OACE,oBAAC,OAAD;EAAK,WAAW;EAAsB;EACpC,UAAA,oBAAC,aAAD;GACO;GACL,cAAY;GACZ,WAAW;GAEX,UAAA,oBAAC,sBAAD;IAAsB,OAAO,EAZjC,SAAS,EACP,eAAe,KACjB,EAUiC;IAC1B;GACmB,CAAA;EACf,CAAA;CACN,CAAA;AAET,GACA,EACE,MAAM,SACR,CACF"}
1
+ {"version":3,"file":"ColumnLayout.mjs","names":[],"sources":["../../../../../../../src/components/ColumnLayout/ColumnLayout.tsx"],"sourcesContent":["import type { CSSProperties, PropsWithChildren } from \"react\";\nimport styles from \"./ColumnLayout.module.scss\";\nimport { styleClassname } from \"@/lib/scss/selectors\";\nimport { getColumns } from \"./lib/getColumns\";\nimport clsx from \"clsx\";\nimport type {\n PropsWithClassName,\n PropsWithElementType,\n} from \"@/lib/types/props\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\n\ntype GapSize = \"s\" | \"m\" | \"l\" | \"xl\";\n\nexport interface ColumnLayoutProps<\n T extends keyof HTMLElementTagNameMap = \"div\" | \"ul\",\n>\n extends\n PropsWithChildren,\n PropsWithElementType<T>,\n PropsWithClassName,\n FlowComponentProps<HTMLElementTagNameMap[T]> {\n /** Column layout for container size s. */\n s?: (number | null)[];\n /** Column layout for container size m. */\n m?: (number | null)[];\n /** Column layout for container size l. */\n l?: (number | null)[];\n /**\n * Size of the row and column gap between the content blocks inside the column\n * layout.\n *\n * @default \"m\"\n */\n gap?: GapSize;\n /** Size of the row gap between the content blocks inside the column layout. */\n rowGap?: GapSize;\n /** Size of the column gap between the content blocks inside the column layout. */\n columnGap?: GapSize;\n}\n\n/** @flr-generate all */\nexport const ColumnLayout = flowComponent(\n \"ColumnLayout\",\n (props) => {\n const {\n children,\n className,\n s,\n m,\n l,\n gap = \"m\",\n rowGap = gap,\n columnGap = gap,\n elementType = \"div\",\n \"aria-label\": ariaLabel,\n ref,\n style: styleFromProps,\n } = props;\n\n let elementClassName: string = styles.columnLayout;\n\n s?.map((v, i) => {\n if (v === null) {\n elementClassName = clsx(\n elementClassName,\n styleClassname(styles, `hide-s-${i + 1}`),\n );\n }\n });\n m?.map((v, i) => {\n if (v === null) {\n elementClassName = clsx(\n elementClassName,\n styleClassname(styles, `hide-m-${i + 1}`),\n );\n }\n });\n l?.map((v, i) => {\n if (v === null) {\n elementClassName = clsx(\n elementClassName,\n styleClassname(styles, `hide-l-${i + 1}`),\n );\n }\n });\n\n const columnsS = getColumns(s ?? [1]);\n const columnsM = m ? getColumns(m) : s ? columnsS : getColumns([1, 1]);\n const columnsL = l\n ? getColumns(l)\n : m || s\n ? columnsM\n : getColumns([1, 1, 1]);\n\n const style = {\n ...styleFromProps,\n \"--column-layout--columns-s\": columnsS,\n \"--column-layout--columns-m\": columnsM,\n \"--column-layout--columns-l\": columnsL,\n \"--column-layout--row-gap\": `var(--column-layout--gap--${rowGap})`,\n \"--column-layout--column-gap\": `var(--column-layout--gap--${columnGap})`,\n } as CSSProperties;\n\n const rootClassName = clsx(styles.columnLayoutContainer, className);\n\n const Element = elementType;\n\n const propsContext: PropsContext = {\n Section: {\n hideSeparator: true,\n },\n };\n\n return (\n <div className={rootClassName} style={style}>\n <Element\n ref={ref as never}\n aria-label={ariaLabel}\n className={elementClassName}\n >\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </Element>\n </div>\n );\n },\n {\n type: \"layout\",\n },\n);\n\nexport default ColumnLayout;\n"],"mappings":";;;;;;;;;;;AA8CA,IAAa,eAAe,cAC1B,iBACC,UAAU;CACT,MAAM,EACJ,UACA,WACA,GACA,GACA,GACA,MAAM,KACN,SAAS,KACT,YAAY,KACZ,cAAc,OACd,cAAc,WACd,KACA,OAAO,mBACL;CAEJ,IAAI,mBAA2B,4BAAO;CAEtC,GAAG,KAAK,GAAG,MAAM;EACf,IAAI,MAAM,MACR,mBAAmB,KACjB,kBACA,eAAe,6BAAQ,UAAU,IAAI,GAAG,CAC1C;CAEJ,CAAC;CACD,GAAG,KAAK,GAAG,MAAM;EACf,IAAI,MAAM,MACR,mBAAmB,KACjB,kBACA,eAAe,6BAAQ,UAAU,IAAI,GAAG,CAC1C;CAEJ,CAAC;CACD,GAAG,KAAK,GAAG,MAAM;EACf,IAAI,MAAM,MACR,mBAAmB,KACjB,kBACA,eAAe,6BAAQ,UAAU,IAAI,GAAG,CAC1C;CAEJ,CAAC;CAED,MAAM,WAAW,WAAW,KAAK,CAAC,CAAC,CAAC;CACpC,MAAM,WAAW,IAAI,WAAW,CAAC,IAAI,IAAI,WAAW,WAAW,CAAC,GAAG,CAAC,CAAC;CACrE,MAAM,WAAW,IACb,WAAW,CAAC,IACZ,KAAK,IACH,WACA,WAAW;EAAC;EAAG;EAAG;CAAC,CAAC;CAE1B,MAAM,QAAQ;EACZ,GAAG;EACH,8BAA8B;EAC9B,8BAA8B;EAC9B,8BAA8B;EAC9B,4BAA4B,6BAA6B,OAAO;EAChE,+BAA+B,6BAA6B,UAAU;CACxE;CAEA,MAAM,gBAAgB,KAAK,4BAAO,uBAAuB,SAAS;CAUlE,OACE,oBAAC,OAAD;EAAK,WAAW;EAAsB;EACpC,UAAA,oBAAC,aAAD;GACO;GACL,cAAY;GACZ,WAAW;GAEX,UAAA,oBAAC,sBAAD;IAAsB,OAAO,EAZjC,SAAS,EACP,eAAe,KACjB,EAUiC;IAC1B;GACmB,CAAA;EACf,CAAA;CACN,CAAA;AAET,GACA,EACE,MAAM,SACR,CACF"}
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  //#region src/components/ColumnLayout/lib/getColumns.ts
4
4
  var getColumns = (values) => {
5
- return values.filter((v) => v !== null).map((value) => `${value}fr`).join(" ");
5
+ return values.filter((v) => v !== null).map((value) => `minmax(0, ${value}fr)`).join(" ");
6
6
  };
7
7
  //#endregion
8
8
  export { getColumns };
@@ -1 +1 @@
1
- {"version":3,"file":"getColumns.mjs","names":[],"sources":["../../../../../../../../src/components/ColumnLayout/lib/getColumns.ts"],"sourcesContent":["export const getColumns = (values: (number | null)[]): string => {\n const fractionValues = values\n .filter((v) => v !== null)\n .map((value) => `${value}fr`);\n\n return fractionValues.join(\" \");\n};\n"],"mappings":";;;AAAA,IAAa,cAAc,WAAsC;CAK/D,OAJuB,OACpB,QAAQ,MAAM,MAAM,IAAI,CAAC,CACzB,KAAK,UAAU,GAAG,MAAM,GAEpB,CAAA,CAAe,KAAK,GAAG;AAChC"}
1
+ {"version":3,"file":"getColumns.mjs","names":[],"sources":["../../../../../../../../src/components/ColumnLayout/lib/getColumns.ts"],"sourcesContent":["export const getColumns = (values: (number | null)[]): string => {\n const fractionValues = values\n .filter((v) => v !== null)\n .map((value) => `minmax(0, ${value}fr)`);\n\n return fractionValues.join(\" \");\n};\n"],"mappings":";;;AAAA,IAAa,cAAc,WAAsC;CAK/D,OAJuB,OACpB,QAAQ,MAAM,MAAM,IAAI,CAAC,CACzB,KAAK,UAAU,aAAa,MAAM,IAE9B,CAAA,CAAe,KAAK,GAAG;AAChC"}
@@ -10,16 +10,19 @@ import { closesOnSelect, getAriaSelectionMode, getMenuItemSelectionVariant } fro
10
10
  import ContextMenuContentView from "../../views/ContextMenuContentView.mjs";
11
11
  import ContextMenu_module_default from "./ContextMenu.module.mjs";
12
12
  import { OverlayContentSuspendWatcher } from "../../lib/controller/overlay/OverlayContentSuspendWatcher.mjs";
13
- import { jsx } from "react/jsx-runtime";
13
+ import { ContextMenuSelectAll } from "./components/ContextMenuSelectAll/ContextMenuSelectAll.mjs";
14
+ import { jsx, jsxs } from "react/jsx-runtime";
14
15
  //#region src/components/ContextMenu/ContextMenu.tsx
15
16
  /** @flr-generate all */
16
17
  var ContextMenu = flowComponent("ContextMenu", (props) => {
17
- const { children, onAction, selectionMode, selectedKeys, defaultSelectedKeys, disabledKeys, onSelectionChange, renderEmptyState, ref, controller: overlayControllerFromProps, ...rest } = props;
18
+ const { children, onAction, selectionMode, selectedKeys, defaultSelectedKeys, disabledKeys, onSelectionChange, renderEmptyState, showSelectAll, ref, controller: overlayControllerFromProps, ...rest } = props;
18
19
  const overlayControllerFromContext = useOverlayController("ContextMenu", { reuseControllerFromContext: true });
19
20
  const overlayController = overlayControllerFromProps ?? overlayControllerFromContext;
21
+ const selectionVariant = getMenuItemSelectionVariant(selectionMode);
22
+ const selectAll = showSelectAll && selectionMode === "multiple" && /* @__PURE__ */ jsx(ContextMenuSelectAll, {});
20
23
  const propsContext = {
21
24
  MenuItem: {
22
- selectionVariant: getMenuItemSelectionVariant(selectionMode),
25
+ selectionVariant,
23
26
  Avatar: { size: "l" }
24
27
  },
25
28
  Section: {
@@ -38,7 +41,7 @@ var ContextMenu = flowComponent("ContextMenu", (props) => {
38
41
  children: /* @__PURE__ */ jsx(OverlayContextProvider, {
39
42
  type: "ContextMenu",
40
43
  controller: overlayController,
41
- children: /* @__PURE__ */ jsx(ContextMenuContentView, {
44
+ children: /* @__PURE__ */ jsxs(ContextMenuContentView, {
42
45
  className: ContextMenu_module_default.contextMenu,
43
46
  onAction,
44
47
  selectionMode: getAriaSelectionMode(selectionMode),
@@ -48,13 +51,13 @@ var ContextMenu = flowComponent("ContextMenu", (props) => {
48
51
  onSelectionChange,
49
52
  renderEmptyState,
50
53
  ref,
51
- children: /* @__PURE__ */ jsx(PropsContextProvider, {
54
+ children: [selectAll, /* @__PURE__ */ jsx(PropsContextProvider, {
52
55
  props: propsContext,
53
56
  children: /* @__PURE__ */ jsx(Action, {
54
57
  closeOverlay: closesOnSelect(selectionMode),
55
58
  children
56
59
  })
57
- })
60
+ })]
58
61
  })
59
62
  })
60
63
  })
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenu.mjs","names":[],"sources":["../../../../../../../src/components/ContextMenu/ContextMenu.tsx"],"sourcesContent":["import { Action } from \"@/components/Action\";\nimport type { ContextMenuSelectionMode } from \"@/components/ContextMenu/lib\";\nimport {\n getAriaSelectionMode,\n closesOnSelect,\n getMenuItemSelectionVariant,\n} from \"@/components/ContextMenu/lib\";\nimport type { MenuItemProps } from \"@/components/MenuItem\";\nimport { Popover, type PopoverProps } from \"@/components/Popover/Popover\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport { OverlayContextProvider } from \"@/lib/controller/overlay/OverlayContextProvider\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport ContextMenuContentView from \"@/views/ContextMenuContentView\";\nimport type * as Aria from \"react-aria-components\";\nimport styles from \"./ContextMenu.module.scss\";\nimport { OverlayContentSuspendWatcher } from \"@/lib/controller/overlay/OverlayContentSuspendWatcher\";\n\nexport interface ContextMenuProps\n extends\n Omit<PopoverProps, \"withTip\" | \"modality\">,\n Pick<\n Aria.MenuProps<MenuItemProps>,\n | \"onAction\"\n | \"selectedKeys\"\n | \"defaultSelectedKeys\"\n | \"onSelectionChange\"\n | \"disabledKeys\"\n | \"renderEmptyState\"\n >,\n FlowComponentProps {\n /** The type of selection that is allowed in the context menu. */\n selectionMode?: ContextMenuSelectionMode;\n /** Sets the context menu to a fixed width. */\n width?: string | number;\n}\n\n/** @flr-generate all */\nexport const ContextMenu = flowComponent(\"ContextMenu\", (props) => {\n const {\n children,\n onAction,\n selectionMode,\n selectedKeys,\n defaultSelectedKeys,\n disabledKeys,\n onSelectionChange,\n renderEmptyState,\n ref,\n controller: overlayControllerFromProps,\n ...rest\n } = props;\n\n const overlayControllerFromContext = useOverlayController(\"ContextMenu\", {\n reuseControllerFromContext: true,\n });\n\n const overlayController =\n overlayControllerFromProps ?? overlayControllerFromContext;\n\n const selectionVariant = getMenuItemSelectionVariant(selectionMode);\n\n const propsContext: PropsContext = {\n MenuItem: {\n selectionVariant,\n Avatar: {\n size: \"l\",\n },\n },\n\n Section: {\n MenuItem: {\n Avatar: {\n size: \"l\",\n },\n },\n renderContextMenuSection: true,\n },\n\n ContextMenuSection: {\n MenuItem: {\n Avatar: {\n size: \"l\",\n },\n },\n },\n };\n\n return (\n <OverlayContentSuspendWatcher overlayController={overlayController}>\n <Popover\n {...rest}\n className={styles.popover}\n controller={overlayController}\n isDialogContent={false}\n >\n <OverlayContextProvider\n type=\"ContextMenu\"\n controller={overlayController}\n >\n <ContextMenuContentView\n className={styles.contextMenu}\n onAction={onAction}\n selectionMode={getAriaSelectionMode(selectionMode)}\n selectedKeys={selectedKeys}\n defaultSelectedKeys={defaultSelectedKeys}\n disabledKeys={disabledKeys}\n onSelectionChange={onSelectionChange}\n renderEmptyState={renderEmptyState}\n ref={ref}\n >\n <PropsContextProvider props={propsContext}>\n <Action closeOverlay={closesOnSelect(selectionMode)}>\n {children}\n </Action>\n </PropsContextProvider>\n </ContextMenuContentView>\n </OverlayContextProvider>\n </Popover>\n </OverlayContentSuspendWatcher>\n );\n});\n\nexport default ContextMenu;\n"],"mappings":";;;;;;;;;;;;;;;AAwCA,IAAa,cAAc,cAAc,gBAAgB,UAAU;CACjE,MAAM,EACJ,UACA,UACA,eACA,cACA,qBACA,cACA,mBACA,kBACA,KACA,YAAY,4BACZ,GAAG,SACD;CAEJ,MAAM,+BAA+B,qBAAqB,eAAe,EACvE,4BAA4B,KAC9B,CAAC;CAED,MAAM,oBACJ,8BAA8B;CAIhC,MAAM,eAA6B;EACjC,UAAU;GACR,kBAJqB,4BAA4B,aAIjD;GACA,QAAQ,EACN,MAAM,IACR;EACF;EAEA,SAAS;GACP,UAAU,EACR,QAAQ,EACN,MAAM,IACR,EACF;GACA,0BAA0B;EAC5B;EAEA,oBAAoB,EAClB,UAAU,EACR,QAAQ,EACN,MAAM,IACR,EACF,EACF;CACF;CAEA,OACE,oBAAC,8BAAD;EAAiD;EAC/C,UAAA,oBAAC,SAAD;GACE,GAAI;GACJ,WAAW,2BAAO;GAClB,YAAY;GACZ,iBAAiB;GAEjB,UAAA,oBAAC,wBAAD;IACE,MAAK;IACL,YAAY;IAEZ,UAAA,oBAAC,wBAAD;KACE,WAAW,2BAAO;KACR;KACV,eAAe,qBAAqB,aAAa;KACnC;KACO;KACP;KACK;KACD;KACb;KAEL,UAAA,oBAAC,sBAAD;MAAsB,OAAO;MAC3B,UAAA,oBAAC,QAAD;OAAQ,cAAc,eAAe,aAAa;OAC/C;MACK,CAAA;KACY,CAAA;IACA,CAAA;GACF,CAAA;EACjB,CAAA;CACmB,CAAA;AAElC,CAAC"}
1
+ {"version":3,"file":"ContextMenu.mjs","names":[],"sources":["../../../../../../../src/components/ContextMenu/ContextMenu.tsx"],"sourcesContent":["import { Action } from \"@/components/Action\";\nimport type { ContextMenuSelectionMode } from \"@/components/ContextMenu/lib\";\nimport {\n getAriaSelectionMode,\n closesOnSelect,\n getMenuItemSelectionVariant,\n} from \"@/components/ContextMenu/lib\";\nimport type { MenuItemProps } from \"@/components/MenuItem\";\nimport { Popover, type PopoverProps } from \"@/components/Popover/Popover\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport { OverlayContextProvider } from \"@/lib/controller/overlay/OverlayContextProvider\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport ContextMenuContentView from \"@/views/ContextMenuContentView\";\nimport type * as Aria from \"react-aria-components\";\nimport styles from \"./ContextMenu.module.scss\";\nimport { OverlayContentSuspendWatcher } from \"@/lib/controller/overlay/OverlayContentSuspendWatcher\";\nimport { ContextMenuSelectAll } from \"@/components/ContextMenu/components/ContextMenuSelectAll/ContextMenuSelectAll\";\n\nexport interface ContextMenuProps\n extends\n Omit<PopoverProps, \"withTip\" | \"modality\">,\n Pick<\n Aria.MenuProps<MenuItemProps>,\n | \"onAction\"\n | \"selectedKeys\"\n | \"defaultSelectedKeys\"\n | \"onSelectionChange\"\n | \"disabledKeys\"\n | \"renderEmptyState\"\n >,\n FlowComponentProps {\n /** The type of selection that is allowed in the context menu. */\n selectionMode?: ContextMenuSelectionMode;\n /** Sets the context menu to a fixed width. */\n width?: string | number;\n /**\n * Adds a first entry that selects or deselects all items at once. Only\n * applies to `selectionMode=\"multiple\"`.\n */\n showSelectAll?: boolean;\n}\n\n/** @flr-generate all */\nexport const ContextMenu = flowComponent(\"ContextMenu\", (props) => {\n const {\n children,\n onAction,\n selectionMode,\n selectedKeys,\n defaultSelectedKeys,\n disabledKeys,\n onSelectionChange,\n renderEmptyState,\n showSelectAll,\n ref,\n controller: overlayControllerFromProps,\n ...rest\n } = props;\n\n const overlayControllerFromContext = useOverlayController(\"ContextMenu\", {\n reuseControllerFromContext: true,\n });\n\n const overlayController =\n overlayControllerFromProps ?? overlayControllerFromContext;\n\n const selectionVariant = getMenuItemSelectionVariant(selectionMode);\n\n const selectAll = showSelectAll && selectionMode === \"multiple\" && (\n <ContextMenuSelectAll />\n );\n\n const propsContext: PropsContext = {\n MenuItem: {\n selectionVariant,\n Avatar: {\n size: \"l\",\n },\n },\n\n Section: {\n MenuItem: {\n Avatar: {\n size: \"l\",\n },\n },\n renderContextMenuSection: true,\n },\n\n ContextMenuSection: {\n MenuItem: {\n Avatar: {\n size: \"l\",\n },\n },\n },\n };\n\n return (\n <OverlayContentSuspendWatcher overlayController={overlayController}>\n <Popover\n {...rest}\n className={styles.popover}\n controller={overlayController}\n isDialogContent={false}\n >\n <OverlayContextProvider\n type=\"ContextMenu\"\n controller={overlayController}\n >\n <ContextMenuContentView\n className={styles.contextMenu}\n onAction={onAction}\n selectionMode={getAriaSelectionMode(selectionMode)}\n selectedKeys={selectedKeys}\n defaultSelectedKeys={defaultSelectedKeys}\n disabledKeys={disabledKeys}\n onSelectionChange={onSelectionChange}\n renderEmptyState={renderEmptyState}\n ref={ref}\n >\n {selectAll}\n <PropsContextProvider props={propsContext}>\n <Action closeOverlay={closesOnSelect(selectionMode)}>\n {children}\n </Action>\n </PropsContextProvider>\n </ContextMenuContentView>\n </OverlayContextProvider>\n </Popover>\n </OverlayContentSuspendWatcher>\n );\n});\n\nexport default ContextMenu;\n"],"mappings":";;;;;;;;;;;;;;;;AA8CA,IAAa,cAAc,cAAc,gBAAgB,UAAU;CACjE,MAAM,EACJ,UACA,UACA,eACA,cACA,qBACA,cACA,mBACA,kBACA,eACA,KACA,YAAY,4BACZ,GAAG,SACD;CAEJ,MAAM,+BAA+B,qBAAqB,eAAe,EACvE,4BAA4B,KAC9B,CAAC;CAED,MAAM,oBACJ,8BAA8B;CAEhC,MAAM,mBAAmB,4BAA4B,aAAa;CAElE,MAAM,YAAY,iBAAiB,kBAAkB,cACnD,oBAAC,sBAAD,CAAuB,CAAA;CAGzB,MAAM,eAA6B;EACjC,UAAU;GACR;GACA,QAAQ,EACN,MAAM,IACR;EACF;EAEA,SAAS;GACP,UAAU,EACR,QAAQ,EACN,MAAM,IACR,EACF;GACA,0BAA0B;EAC5B;EAEA,oBAAoB,EAClB,UAAU,EACR,QAAQ,EACN,MAAM,IACR,EACF,EACF;CACF;CAEA,OACE,oBAAC,8BAAD;EAAiD;EAC/C,UAAA,oBAAC,SAAD;GACE,GAAI;GACJ,WAAW,2BAAO;GAClB,YAAY;GACZ,iBAAiB;GAEjB,UAAA,oBAAC,wBAAD;IACE,MAAK;IACL,YAAY;IAEZ,UAAA,qBAAC,wBAAD;KACE,WAAW,2BAAO;KACR;KACV,eAAe,qBAAqB,aAAa;KACnC;KACO;KACP;KACK;KACD;KACb;KATP,UAAA,CAWG,WACD,oBAAC,sBAAD;MAAsB,OAAO;MAC3B,UAAA,oBAAC,QAAD;OAAQ,cAAc,eAAe,aAAa;OAC/C;MACK,CAAA;KACY,CAAA,CACA;;GACF,CAAA;EACjB,CAAA;CACmB,CAAA;AAElC,CAAC"}
@@ -4,12 +4,14 @@
4
4
  var contextMenu = "flow--context-menu";
5
5
  var section = "flow--context-menu--section";
6
6
  var popover = "flow--context-menu--popover";
7
+ var selectAll = "flow--context-menu--select-all";
7
8
  var ContextMenu_module_default = {
8
9
  contextMenu,
9
10
  section,
10
- popover
11
+ popover,
12
+ selectAll
11
13
  };
12
14
  //#endregion
13
- export { contextMenu, ContextMenu_module_default as default, popover, section };
15
+ export { contextMenu, ContextMenu_module_default as default, popover, section, selectAll };
14
16
 
15
17
  //# sourceMappingURL=ContextMenu.module.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenu.module.mjs","names":[],"sources":["../../../../../../../src/components/ContextMenu/ContextMenu.module.scss"],"sourcesContent":[".contextMenu {\n display: flex;\n flex-direction: column;\n row-gap: var(--menu--item-to-item-spacing);\n padding: var(--popover--padding--s);\n\n // A consumer-placed `Separator`. Its `flow--separator` class also covers the\n // vertical `<div>` variant, which must not get this block margin.\n // stylelint-disable-next-line selector-max-type -- see above\n > hr {\n margin-block: var(--popover--spacing);\n }\n\n &:focus-visible {\n outline: none;\n }\n}\n\n.section {\n display: flex;\n flex-direction: column;\n row-gap: var(--menu--item-to-item-spacing);\n\n &:has(:global(.flow--avatar)) {\n align-items: center;\n padding-top: var(--menu--item-to-item-spacing);\n }\n}\n\n.popover {\n max-width: fit-content;\n}\n"],"mappings":""}
1
+ {"version":3,"file":"ContextMenu.module.mjs","names":[],"sources":["../../../../../../../src/components/ContextMenu/ContextMenu.module.scss"],"sourcesContent":[".contextMenu {\n display: flex;\n flex-direction: column;\n row-gap: var(--menu--item-to-item-spacing);\n padding: var(--popover--padding--s);\n\n // A consumer-placed `Separator`. Its `flow--separator` class also covers the\n // vertical `<div>` variant, which must not get this block margin.\n // stylelint-disable-next-line selector-max-type -- see above\n > hr {\n margin-block: var(--popover--spacing);\n }\n\n &:focus-visible {\n outline: none;\n }\n}\n\n.section {\n display: flex;\n flex-direction: column;\n row-gap: var(--menu--item-to-item-spacing);\n\n &:has(:global(.flow--avatar)) {\n align-items: center;\n padding-top: var(--menu--item-to-item-spacing);\n }\n}\n\n.popover {\n max-width: fit-content;\n}\n\n.selectAll {\n margin-block-end: var(--menu--select-all-to-item-spacing);\n}\n"],"mappings":""}
@@ -0,0 +1,86 @@
1
+ "use client"
2
+ /* */
3
+ import { useLocalizedStringFormatter } from "../../../TranslationProvider/useLocalizedStringFormatter.mjs";
4
+ import { Text } from "../../../Text/Text.mjs";
5
+ import MenuItem_module_default from "../../../MenuItem/MenuItem.module.mjs";
6
+ import { MenuItemContent } from "../../../MenuItem/components/MenuItemContent/MenuItemContent.mjs";
7
+ import ContextMenu_module_default from "../../ContextMenu.module.mjs";
8
+ import __locale_default from "../../../../../../../_virtual/_13.locale.mjs";
9
+ import { useContext, useRef } from "react";
10
+ import { jsx } from "react/jsx-runtime";
11
+ import * as Aria from "react-aria-components";
12
+ //#region src/components/ContextMenu/components/ContextMenuSelectAll/ContextMenuSelectAll.tsx
13
+ var selectAllSectionId = "flow--context-menu--select-all";
14
+ /**
15
+ * Keys that share the menu's selection: enabled items at the top level and in
16
+ * sections without a selection mode of their own.
17
+ */
18
+ var getSelectableKeys = (state) => {
19
+ const keys = [];
20
+ const collect = (nodes) => {
21
+ for (const node of nodes) if (node.type === "item") {
22
+ if (!state.selectionManager.isDisabled(node.key)) keys.push(node.key);
23
+ } else if (node.type === "section" && node.key !== selectAllSectionId && node.props?.selectionMode === void 0) collect(state.collection.getChildren?.(node.key) ?? node.childNodes);
24
+ };
25
+ collect(state.collection);
26
+ return keys;
27
+ };
28
+ /**
29
+ * Rendered by the visible menu item. The collection renders the item's element
30
+ * a second time outside the menu, where `MenuStateContext` is missing.
31
+ */
32
+ var SelectAllMenuItemContent = (props) => {
33
+ const { selectAll, ...renderProps } = props;
34
+ const state = useContext(Aria.MenuStateContext);
35
+ const formatter = useLocalizedStringFormatter(__locale_default, "ContextMenu");
36
+ const selectionManager = state?.selectionManager;
37
+ const keys = state ? getSelectableKeys(state) : [];
38
+ const selectedCount = keys.filter((key) => selectionManager?.isSelected(key)).length;
39
+ const isEverySelected = keys.length > 0 && selectedCount === keys.length;
40
+ const isIndeterminate = selectedCount > 0 && !isEverySelected;
41
+ selectAll.current = {
42
+ isEverySelected,
43
+ toggle: () => {
44
+ if (!selectionManager) return;
45
+ const keySet = new Set(keys);
46
+ const otherSelectedKeys = [...selectionManager.selectedKeys].filter((key) => !keySet.has(key));
47
+ selectionManager.setSelectedKeys(isEverySelected ? otherSelectedKeys : [...otherSelectedKeys, ...keys]);
48
+ }
49
+ };
50
+ return /* @__PURE__ */ jsx(MenuItemContent, {
51
+ ...renderProps,
52
+ selectionMode: "multiple",
53
+ isSelected: isEverySelected,
54
+ isIndeterminate,
55
+ children: /* @__PURE__ */ jsx(Text, { children: formatter.format(isEverySelected ? "deselectAll" : "selectAll") })
56
+ });
57
+ };
58
+ var SelectAllMenuItem = () => {
59
+ const selectAll = useRef(void 0);
60
+ const formatter = useLocalizedStringFormatter(__locale_default, "ContextMenu");
61
+ return /* @__PURE__ */ jsx(Aria.MenuItem, {
62
+ id: `${selectAllSectionId}--item`,
63
+ textValue: formatter.format("selectAll"),
64
+ shouldCloseOnSelect: false,
65
+ onAction: () => selectAll.current?.toggle(),
66
+ className: MenuItem_module_default.menuItem,
67
+ children: (renderProps) => /* @__PURE__ */ jsx(SelectAllMenuItemContent, {
68
+ ...renderProps,
69
+ selectAll
70
+ })
71
+ });
72
+ };
73
+ /**
74
+ * The entry lives in a section without selection, so pressing it runs its
75
+ * action only and sets the whole selection in one change.
76
+ */
77
+ var ContextMenuSelectAll = () => /* @__PURE__ */ jsx(Aria.MenuSection, {
78
+ id: selectAllSectionId,
79
+ selectionMode: "none",
80
+ className: ContextMenu_module_default.selectAll,
81
+ children: /* @__PURE__ */ jsx(SelectAllMenuItem, {})
82
+ });
83
+ //#endregion
84
+ export { ContextMenuSelectAll, ContextMenuSelectAll as default };
85
+
86
+ //# sourceMappingURL=ContextMenuSelectAll.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextMenuSelectAll.mjs","names":[],"sources":["../../../../../../../../../src/components/ContextMenu/components/ContextMenuSelectAll/ContextMenuSelectAll.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport { useContext, useRef, type FC } from \"react\";\nimport type { Key, Node } from \"@react-types/shared\";\nimport type { TreeState } from \"react-stately\";\nimport { MenuItemContent } from \"@/components/MenuItem/components/MenuItemContent/MenuItemContent\";\nimport menuItemStyles from \"@/components/MenuItem/MenuItem.module.scss\";\nimport { Text } from \"@/components/Text\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"../../locales/*.locale.json\";\nimport styles from \"../../ContextMenu.module.scss\";\n\nconst selectAllSectionId = \"flow--context-menu--select-all\";\n\n/**\n * Keys that share the menu's selection: enabled items at the top level and in\n * sections without a selection mode of their own.\n */\nconst getSelectableKeys = (state: TreeState<unknown>): Key[] => {\n const keys: Key[] = [];\n\n const collect = (nodes: Iterable<Node<unknown>>) => {\n for (const node of nodes) {\n if (node.type === \"item\") {\n if (!state.selectionManager.isDisabled(node.key)) {\n keys.push(node.key);\n }\n } else if (\n node.type === \"section\" &&\n node.key !== selectAllSectionId &&\n node.props?.selectionMode === undefined\n ) {\n collect(state.collection.getChildren?.(node.key) ?? node.childNodes);\n }\n }\n };\n\n collect(state.collection);\n return keys;\n};\n\ninterface SelectAll {\n isEverySelected: boolean;\n toggle: () => void;\n}\n\n/**\n * Rendered by the visible menu item. The collection renders the item's element\n * a second time outside the menu, where `MenuStateContext` is missing.\n */\nconst SelectAllMenuItemContent: FC<\n Aria.MenuItemRenderProps & { selectAll: { current?: SelectAll } }\n> = (props) => {\n const { selectAll, ...renderProps } = props;\n const state = useContext(Aria.MenuStateContext);\n const formatter = useLocalizedStringFormatter(locales, \"ContextMenu\");\n\n const selectionManager = state?.selectionManager;\n const keys = state ? getSelectableKeys(state) : [];\n const selectedCount = keys.filter((key) =>\n selectionManager?.isSelected(key),\n ).length;\n const isEverySelected = keys.length > 0 && selectedCount === keys.length;\n const isIndeterminate = selectedCount > 0 && !isEverySelected;\n\n selectAll.current = {\n isEverySelected,\n toggle: () => {\n if (!selectionManager) {\n return;\n }\n const keySet = new Set(keys);\n const otherSelectedKeys = [...selectionManager.selectedKeys].filter(\n (key) => !keySet.has(key),\n );\n selectionManager.setSelectedKeys(\n isEverySelected ? otherSelectedKeys : [...otherSelectedKeys, ...keys],\n );\n },\n };\n\n return (\n <MenuItemContent\n {...renderProps}\n selectionMode=\"multiple\"\n isSelected={isEverySelected}\n isIndeterminate={isIndeterminate}\n >\n <Text>\n {formatter.format(isEverySelected ? \"deselectAll\" : \"selectAll\")}\n </Text>\n </MenuItemContent>\n );\n};\n\nconst SelectAllMenuItem: FC = () => {\n const selectAll = useRef<SelectAll>(undefined);\n const formatter = useLocalizedStringFormatter(locales, \"ContextMenu\");\n\n return (\n <Aria.MenuItem\n id={`${selectAllSectionId}--item`}\n textValue={formatter.format(\"selectAll\")}\n shouldCloseOnSelect={false}\n onAction={() => selectAll.current?.toggle()}\n className={menuItemStyles.menuItem}\n >\n {(renderProps) => (\n <SelectAllMenuItemContent {...renderProps} selectAll={selectAll} />\n )}\n </Aria.MenuItem>\n );\n};\n\n/**\n * The entry lives in a section without selection, so pressing it runs its\n * action only and sets the whole selection in one change.\n */\nexport const ContextMenuSelectAll: FC = () => (\n <Aria.MenuSection\n id={selectAllSectionId}\n selectionMode=\"none\"\n className={styles.selectAll}\n >\n <SelectAllMenuItem />\n </Aria.MenuSection>\n);\n\nexport default ContextMenuSelectAll;\n"],"mappings":";;;;;;;;;;;;AAWA,IAAM,qBAAqB;;;;;AAM3B,IAAM,qBAAqB,UAAqC;CAC9D,MAAM,OAAc,CAAC;CAErB,MAAM,WAAW,UAAmC;EAClD,KAAK,MAAM,QAAQ,OACjB,IAAI,KAAK,SAAS,QACZ;OAAA,CAAC,MAAM,iBAAiB,WAAW,KAAK,GAAG,GAC7C,KAAK,KAAK,KAAK,GAAG;EAAA,OAEf,IACL,KAAK,SAAS,aACd,KAAK,QAAQ,sBACb,KAAK,OAAO,kBAAkB,KAAA,GAE9B,QAAQ,MAAM,WAAW,cAAc,KAAK,GAAG,KAAK,KAAK,UAAU;CAGzE;CAEA,QAAQ,MAAM,UAAU;CACxB,OAAO;AACT;;;;;AAWA,IAAM,4BAED,UAAU;CACb,MAAM,EAAE,WAAW,GAAG,gBAAgB;CACtC,MAAM,QAAQ,WAAW,KAAK,gBAAgB;CAC9C,MAAM,YAAY,4BAA4B,kBAAS,aAAa;CAEpE,MAAM,mBAAmB,OAAO;CAChC,MAAM,OAAO,QAAQ,kBAAkB,KAAK,IAAI,CAAC;CACjD,MAAM,gBAAgB,KAAK,QAAQ,QACjC,kBAAkB,WAAW,GAAG,CAClC,CAAC,CAAC;CACF,MAAM,kBAAkB,KAAK,SAAS,KAAK,kBAAkB,KAAK;CAClE,MAAM,kBAAkB,gBAAgB,KAAK,CAAC;CAE9C,UAAU,UAAU;EAClB;EACA,cAAc;GACZ,IAAI,CAAC,kBACH;GAEF,MAAM,SAAS,IAAI,IAAI,IAAI;GAC3B,MAAM,oBAAoB,CAAC,GAAG,iBAAiB,YAAY,CAAC,CAAC,QAC1D,QAAQ,CAAC,OAAO,IAAI,GAAG,CAC1B;GACA,iBAAiB,gBACf,kBAAkB,oBAAoB,CAAC,GAAG,mBAAmB,GAAG,IAAI,CACtE;EACF;CACF;CAEA,OACE,oBAAC,iBAAD;EACE,GAAI;EACJ,eAAc;EACd,YAAY;EACK;EAEjB,UAAA,oBAAC,MAAD,EAAA,UACG,UAAU,OAAO,kBAAkB,gBAAgB,WAAW,EAC3D,CAAA;CACS,CAAA;AAErB;AAEA,IAAM,0BAA8B;CAClC,MAAM,YAAY,OAAkB,KAAA,CAAS;CAC7C,MAAM,YAAY,4BAA4B,kBAAS,aAAa;CAEpE,OACE,oBAAC,KAAK,UAAN;EACE,IAAI,GAAG,mBAAmB;EAC1B,WAAW,UAAU,OAAO,WAAW;EACvC,qBAAqB;EACrB,gBAAgB,UAAU,SAAS,OAAO;EAC1C,WAAW,wBAAe;EAExB,WAAA,gBACA,oBAAC,0BAAD;GAA0B,GAAI;GAAwB;EAAY,CAAA;CAEvD,CAAA;AAEnB;;;;;AAMA,IAAa,6BACX,oBAAC,KAAK,aAAN;CACE,IAAI;CACJ,eAAc;CACd,WAAW,2BAAO;CAElB,UAAA,oBAAC,mBAAD,CAAoB,CAAA;AACJ,CAAA"}
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  /* */
3
3
  import { useLocalizedStringFormatter } from "../TranslationProvider/useLocalizedStringFormatter.mjs";
4
- import __locale_default from "../../../../../_virtual/_13.locale.mjs";
4
+ import __locale_default from "../../../../../_virtual/_14.locale.mjs";
5
5
  import OptionView from "../../views/OptionView.mjs";
6
6
  import { useMemo } from "react";
7
7
  import { jsx } from "react/jsx-runtime";
@@ -3,7 +3,7 @@
3
3
  import { IconClose } from "../../../Icon/components/icons/IconClose.mjs";
4
4
  import { useLocalizedStringFormatter } from "../../../TranslationProvider/useLocalizedStringFormatter.mjs";
5
5
  import { Button } from "../../../Button/Button.mjs";
6
- import __locale_default from "../../../../../../../_virtual/_15.locale.mjs";
6
+ import __locale_default from "../../../../../../../_virtual/_16.locale.mjs";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  //#region src/components/FileCard/components/DeleteButton/DeleteButton.tsx
9
9
  var DeleteButton = (props) => {
@@ -6,6 +6,7 @@ import { UiComponentTunnelExit } from "../UiComponentTunnel/UiComponentTunnelExi
6
6
  import { styleClassname } from "../../lib/scss/selectors.mjs";
7
7
  import Heading_module_default from "./Heading.module.mjs";
8
8
  import clsx from "clsx";
9
+ import { Children } from "react";
9
10
  import { jsx, jsxs } from "react/jsx-runtime";
10
11
  import * as Aria from "react-aria-components";
11
12
  //#region src/components/Heading/Heading.tsx
@@ -69,14 +70,22 @@ var Heading = flowComponent("Heading", (props) => {
69
70
  ...rest,
70
71
  ref,
71
72
  level,
72
- children: [/* @__PURE__ */ jsx("span", {
73
+ children: [/* @__PURE__ */ jsxs("span", {
73
74
  className: Heading_module_default.headingText,
74
- children
75
+ children: [children, /* @__PURE__ */ jsx(UiComponentTunnelExit, {
76
+ id: "headingContent",
77
+ component: "Heading",
78
+ children: (items) => Children.count(items) > 0 && /* @__PURE__ */ jsx("span", { className: Heading_module_default.headingTextSpacer })
79
+ })]
75
80
  }), /* @__PURE__ */ jsx("span", {
76
81
  className: Heading_module_default.headingContent,
77
82
  children: /* @__PURE__ */ jsx(UiComponentTunnelExit, {
78
83
  id: "headingContent",
79
- component: "Heading"
84
+ component: "Heading",
85
+ children: (items) => Children.map(items, (item) => /* @__PURE__ */ jsx("span", {
86
+ className: Heading_module_default.headingContentItem,
87
+ children: item
88
+ }))
80
89
  })
81
90
  })]
82
91
  })
@@ -1 +1 @@
1
- {"version":3,"file":"Heading.mjs","names":[],"sources":["../../../../../../../src/components/Heading/Heading.tsx"],"sourcesContent":["import type { AlphaColor, PropsWithElementType } from \"@/lib/types/props\";\nimport styles from \"./Heading.module.scss\";\nimport { styleClassname } from \"@/lib/scss/selectors\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport * as Aria from \"react-aria-components\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\n\nexport interface HeadingProps\n extends\n Aria.HeadingProps,\n FlowComponentProps,\n PropsWithElementType<\"span\" | \"p\"> {\n /** The font size of the heading. */\n size?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\";\n /** The color of the heading. @default \"default\" */\n color?: \"default\" | \"danger\" | \"unavailable\" | AlphaColor;\n /** The text-wrap property of the text. @default undefined */\n wrap?: \"wrap\" | \"balance\";\n}\n\n/**\n * The font size each heading level renders at — the TypeScript half of the\n * level-based `--font-size` rules in Heading.module.scss. Levels 4 to 6 fall\n * through to the `xs` default.\n */\nconst sizeByLevel: Record<number, NonNullable<HeadingProps[\"size\"]>> = {\n 1: \"xl\",\n 2: \"m\",\n 3: \"s\",\n};\n\n/** @flr-generate all */\nexport const Heading = flowComponent(\"Heading\", (props) => {\n const {\n children,\n className,\n level = 2,\n color = \"default\",\n wrap,\n size,\n ref,\n elementType,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.heading,\n size && styles[`size-${size}`],\n color !== \"default\" && styles[color],\n wrap && styles[`wrap-${wrap}`],\n // The level class carries the font size. Emitted for every heading — not\n // just the `elementType` ones — so the stylesheet can select on the class\n // instead of the h1–h6 element react-aria renders without one.\n styleClassname(styles, `h${level}`),\n className,\n );\n\n const Element = elementType ?? Aria.Heading;\n\n const effectiveSize = size ?? sizeByLevel[level] ?? \"xs\";\n const buttonSize =\n effectiveSize === \"xl\" || effectiveSize === \"xxl\" ? \"m\" : \"s\";\n\n const propsContext: PropsContext = {\n Icon: {\n \"aria-hidden\": true,\n className: styles.icon,\n },\n AlertBadge: {\n tunnel: {\n id: \"headingContent\",\n component: \"Heading\",\n },\n },\n Badge: {\n tunnel: {\n id: \"headingContent\",\n component: \"Heading\",\n },\n },\n Button: {\n tunnel: {\n id: \"headingContent\",\n component: \"Heading\",\n },\n size: buttonSize,\n },\n CopyButton: {\n tunnel: {\n id: \"headingContent\",\n component: \"Heading\",\n },\n size: buttonSize,\n },\n ContextualHelpTrigger: {\n tunnel: {\n id: \"headingContent\",\n component: \"Heading\",\n },\n Button: {\n tunnel: null,\n },\n },\n AlertText: {\n Icon: {\n className: styles.icon,\n },\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <Element className={rootClassName} {...rest} ref={ref} level={level}>\n <span className={styles.headingText}>{children}</span>\n <span className={styles.headingContent}>\n <UiComponentTunnelExit id=\"headingContent\" component=\"Heading\" />\n </span>\n </Element>\n </PropsContextProvider>\n );\n});\n\nexport default Heading;\n"],"mappings":";;;;;;;;;;;;;;;;AA6BA,IAAM,cAAiE;CACrE,GAAG;CACH,GAAG;CACH,GAAG;AACL;;AAGA,IAAa,UAAU,cAAc,YAAY,UAAU;CACzD,MAAM,EACJ,UACA,WACA,QAAQ,GACR,QAAQ,WACR,MACA,MACA,KACA,aACA,GAAG,SACD;CAEJ,MAAM,gBAAgB,KACpB,uBAAO,SACP,QAAQ,uBAAO,QAAQ,SACvB,UAAU,aAAa,uBAAO,QAC9B,QAAQ,uBAAO,QAAQ,SAIvB,eAAe,wBAAQ,IAAI,OAAO,GAClC,SACF;CAEA,MAAM,UAAU,eAAe,KAAK;CAEpC,MAAM,gBAAgB,QAAQ,YAAY,UAAU;CACpD,MAAM,aACJ,kBAAkB,QAAQ,kBAAkB,QAAQ,MAAM;CAE5D,MAAM,eAA6B;EACjC,MAAM;GACJ,eAAe;GACf,WAAW,uBAAO;EACpB;EACA,YAAY,EACV,QAAQ;GACN,IAAI;GACJ,WAAW;EACb,EACF;EACA,OAAO,EACL,QAAQ;GACN,IAAI;GACJ,WAAW;EACb,EACF;EACA,QAAQ;GACN,QAAQ;IACN,IAAI;IACJ,WAAW;GACb;GACA,MAAM;EACR;EACA,YAAY;GACV,QAAQ;IACN,IAAI;IACJ,WAAW;GACb;GACA,MAAM;EACR;EACA,uBAAuB;GACrB,QAAQ;IACN,IAAI;IACJ,WAAW;GACb;GACA,QAAQ,EACN,QAAQ,KACV;EACF;EACA,WAAW,EACT,MAAM,EACJ,WAAW,uBAAO,KACpB,EACF;CACF;CAEA,OACE,oBAAC,sBAAD;EAAsB,OAAO;EAC3B,UAAA,qBAAC,SAAD;GAAS,WAAW;GAAe,GAAI;GAAW;GAAY;GAA9D,UAAA,CACE,oBAAC,QAAD;IAAM,WAAW,uBAAO;IAAc;GAAe,CAAA,GACrD,oBAAC,QAAD;IAAM,WAAW,uBAAO;IACtB,UAAA,oBAAC,uBAAD;KAAuB,IAAG;KAAiB,WAAU;IAAW,CAAA;GAC5D,CAAA,CACC;;CACW,CAAA;AAE1B,CAAC"}
1
+ {"version":3,"file":"Heading.mjs","names":[],"sources":["../../../../../../../src/components/Heading/Heading.tsx"],"sourcesContent":["import type { AlphaColor, PropsWithElementType } from \"@/lib/types/props\";\nimport styles from \"./Heading.module.scss\";\nimport { styleClassname } from \"@/lib/scss/selectors\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport * as Aria from \"react-aria-components\";\nimport { Children } from \"react\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\n\nexport interface HeadingProps\n extends\n Aria.HeadingProps,\n FlowComponentProps,\n PropsWithElementType<\"span\" | \"p\"> {\n /** The font size of the heading. */\n size?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\";\n /** The color of the heading. @default \"default\" */\n color?: \"default\" | \"danger\" | \"unavailable\" | AlphaColor;\n /** The text-wrap property of the text. @default undefined */\n wrap?: \"wrap\" | \"balance\";\n}\n\n/**\n * The font size each heading level renders at — the TypeScript half of the\n * level-based `--font-size` rules in Heading.module.scss. Levels 4 to 6 fall\n * through to the `xs` default.\n */\nconst sizeByLevel: Record<number, NonNullable<HeadingProps[\"size\"]>> = {\n 1: \"xl\",\n 2: \"m\",\n 3: \"s\",\n};\n\n/** @flr-generate all */\nexport const Heading = flowComponent(\"Heading\", (props) => {\n const {\n children,\n className,\n level = 2,\n color = \"default\",\n wrap,\n size,\n ref,\n elementType,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.heading,\n size && styles[`size-${size}`],\n color !== \"default\" && styles[color],\n wrap && styles[`wrap-${wrap}`],\n // The level class carries the font size. Emitted for every heading — not\n // just the `elementType` ones — so the stylesheet can select on the class\n // instead of the h1–h6 element react-aria renders without one.\n styleClassname(styles, `h${level}`),\n className,\n );\n\n const Element = elementType ?? Aria.Heading;\n\n const effectiveSize = size ?? sizeByLevel[level] ?? \"xs\";\n const buttonSize =\n effectiveSize === \"xl\" || effectiveSize === \"xxl\" ? \"m\" : \"s\";\n\n const propsContext: PropsContext = {\n Icon: {\n \"aria-hidden\": true,\n className: styles.icon,\n },\n AlertBadge: {\n tunnel: {\n id: \"headingContent\",\n component: \"Heading\",\n },\n },\n Badge: {\n tunnel: {\n id: \"headingContent\",\n component: \"Heading\",\n },\n },\n Button: {\n tunnel: {\n id: \"headingContent\",\n component: \"Heading\",\n },\n size: buttonSize,\n },\n CopyButton: {\n tunnel: {\n id: \"headingContent\",\n component: \"Heading\",\n },\n size: buttonSize,\n },\n ContextualHelpTrigger: {\n tunnel: {\n id: \"headingContent\",\n component: \"Heading\",\n },\n Button: {\n tunnel: null,\n },\n },\n AlertText: {\n Icon: {\n className: styles.icon,\n },\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <Element className={rootClassName} {...rest} ref={ref} level={level}>\n <span className={styles.headingText}>\n {children}\n <UiComponentTunnelExit id=\"headingContent\" component=\"Heading\">\n {(items) =>\n Children.count(items) > 0 && (\n <span className={styles.headingTextSpacer} />\n )\n }\n </UiComponentTunnelExit>\n </span>\n <span className={styles.headingContent}>\n <UiComponentTunnelExit id=\"headingContent\" component=\"Heading\">\n {(items) =>\n Children.map(items, (item) => (\n <span className={styles.headingContentItem}>{item}</span>\n ))\n }\n </UiComponentTunnelExit>\n </span>\n </Element>\n </PropsContextProvider>\n );\n});\n\nexport default Heading;\n"],"mappings":";;;;;;;;;;;;;;;;;AA8BA,IAAM,cAAiE;CACrE,GAAG;CACH,GAAG;CACH,GAAG;AACL;;AAGA,IAAa,UAAU,cAAc,YAAY,UAAU;CACzD,MAAM,EACJ,UACA,WACA,QAAQ,GACR,QAAQ,WACR,MACA,MACA,KACA,aACA,GAAG,SACD;CAEJ,MAAM,gBAAgB,KACpB,uBAAO,SACP,QAAQ,uBAAO,QAAQ,SACvB,UAAU,aAAa,uBAAO,QAC9B,QAAQ,uBAAO,QAAQ,SAIvB,eAAe,wBAAQ,IAAI,OAAO,GAClC,SACF;CAEA,MAAM,UAAU,eAAe,KAAK;CAEpC,MAAM,gBAAgB,QAAQ,YAAY,UAAU;CACpD,MAAM,aACJ,kBAAkB,QAAQ,kBAAkB,QAAQ,MAAM;CAE5D,MAAM,eAA6B;EACjC,MAAM;GACJ,eAAe;GACf,WAAW,uBAAO;EACpB;EACA,YAAY,EACV,QAAQ;GACN,IAAI;GACJ,WAAW;EACb,EACF;EACA,OAAO,EACL,QAAQ;GACN,IAAI;GACJ,WAAW;EACb,EACF;EACA,QAAQ;GACN,QAAQ;IACN,IAAI;IACJ,WAAW;GACb;GACA,MAAM;EACR;EACA,YAAY;GACV,QAAQ;IACN,IAAI;IACJ,WAAW;GACb;GACA,MAAM;EACR;EACA,uBAAuB;GACrB,QAAQ;IACN,IAAI;IACJ,WAAW;GACb;GACA,QAAQ,EACN,QAAQ,KACV;EACF;EACA,WAAW,EACT,MAAM,EACJ,WAAW,uBAAO,KACpB,EACF;CACF;CAEA,OACE,oBAAC,sBAAD;EAAsB,OAAO;EAC3B,UAAA,qBAAC,SAAD;GAAS,WAAW;GAAe,GAAI;GAAW;GAAY;GAA9D,UAAA,CACE,qBAAC,QAAD;IAAM,WAAW,uBAAO;IAAxB,UAAA,CACG,UACD,oBAAC,uBAAD;KAAuB,IAAG;KAAiB,WAAU;KACjD,WAAA,UACA,SAAS,MAAM,KAAK,IAAI,KACtB,oBAAC,QAAD,EAAM,WAAW,uBAAO,kBAAoB,CAAA;IAG3B,CAAA,CACnB;GACN,CAAA,GAAA,oBAAC,QAAD;IAAM,WAAW,uBAAO;IACtB,UAAA,oBAAC,uBAAD;KAAuB,IAAG;KAAiB,WAAU;KACjD,WAAA,UACA,SAAS,IAAI,QAAQ,SACnB,oBAAC,QAAD;MAAM,WAAW,uBAAO;MAAqB,UAAA;KAAW,CAAA,CACzD;IAEkB,CAAA;GACnB,CAAA,CACC;;CACW,CAAA;AAE1B,CAAC"}
@@ -9,6 +9,8 @@ var light = "flow--heading--light";
9
9
  var headingText = "flow--heading--heading-text";
10
10
  var icon = "flow--heading--icon";
11
11
  var headingContent = "flow--heading--heading-content";
12
+ var headingTextSpacer = "flow--heading--heading-text-spacer";
13
+ var headingContentItem = "flow--heading--heading-content-item";
12
14
  var h1 = "flow--heading--h1";
13
15
  var h2 = "flow--heading--h2";
14
16
  var h3 = "flow--heading--h3";
@@ -26,6 +28,8 @@ var Heading_module_default = {
26
28
  headingText,
27
29
  icon,
28
30
  headingContent,
31
+ headingTextSpacer,
32
+ headingContentItem,
29
33
  h1,
30
34
  h2,
31
35
  h3,
@@ -42,6 +46,6 @@ var Heading_module_default = {
42
46
  "wrap-balance": "flow--heading--wrap-balance"
43
47
  };
44
48
  //#endregion
45
- export { danger, dark, Heading_module_default as default, h1, h2, h3, h4, h5, h6, heading, headingContent, headingText, icon, light, unavailable };
49
+ export { danger, dark, Heading_module_default as default, h1, h2, h3, h4, h5, h6, heading, headingContent, headingContentItem, headingText, headingTextSpacer, icon, light, unavailable };
46
50
 
47
51
  //# sourceMappingURL=Heading.module.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Heading.module.mjs","names":[],"sources":["../../../../../../../src/components/Heading/Heading.module.scss"],"sourcesContent":[".heading {\n color: var(--heading--color);\n font-size: var(--font-size);\n font-weight: var(--heading--font-weight);\n text-wrap-style: pretty;\n\n --heading-line-height: calc(var(--font-size) * var(--line-height));\n\n @mixin color($color) {\n &.#{$color} {\n color: var(--heading--color-#{$color});\n }\n }\n\n @include color(\"danger\");\n @include color(\"unavailable\");\n @include color(\"dark\");\n @include color(\"light\");\n @include color(\"dark-static\");\n @include color(\"light-static\");\n\n .headingText {\n .icon {\n height: var(--heading-line-height);\n width: var(--heading-line-height);\n vertical-align: bottom;\n display: inline-block;\n margin-inline-end: var(--heading--icon-to-text-spacing);\n }\n }\n\n .headingContent {\n vertical-align: bottom;\n display: inline-flex;\n margin-inline-start: var(--heading--icon-to-text-spacing);\n min-height: var(--heading-line-height);\n align-items: center;\n gap: var(--heading--icon-to-text-spacing);\n flex-wrap: wrap;\n\n &:empty {\n display: none;\n }\n }\n\n &:where(.h1) {\n --font-size: var(--font-size-heading--xl);\n }\n\n &:where(.h2) {\n --font-size: var(--font-size-heading--m);\n }\n\n &:where(.h3) {\n --font-size: var(--font-size-heading--s);\n }\n\n &:where(.h4),\n &:where(.h5),\n &:where(.h6) {\n --font-size: var(--font-size-heading--xs);\n }\n\n @mixin size($size) {\n &.size-#{$size} {\n --font-size: var(--font-size-heading--#{$size});\n }\n }\n\n @include size(\"xs\");\n @include size(\"s\");\n @include size(\"m\");\n @include size(\"l\");\n @include size(\"xl\");\n @include size(\"xxl\");\n\n &:where(.wrap-wrap) {\n text-wrap: wrap;\n }\n\n &:where(.wrap-balance) {\n text-wrap: balance;\n }\n}\n\n@media (max-width: 768px) {\n .heading {\n &:where(.h1),\n &.size-xl {\n --font-size: var(--font-size-heading--l);\n }\n\n &.size-l {\n --font-size: var(--font-size-heading--m);\n }\n\n &:where(.h2),\n &.size-m {\n --font-size: var(--font-size-heading--s);\n }\n\n &:where(.h3),\n &.size-s {\n --font-size: var(--font-size-heading--xs);\n }\n }\n}\n"],"mappings":""}
1
+ {"version":3,"file":"Heading.module.mjs","names":[],"sources":["../../../../../../../src/components/Heading/Heading.module.scss"],"sourcesContent":[".heading {\n color: var(--heading--color);\n font-size: var(--font-size);\n font-weight: var(--heading--font-weight);\n text-wrap-style: pretty;\n\n --heading-line-height: calc(var(--font-size) * var(--line-height));\n\n @mixin color($color) {\n &.#{$color} {\n color: var(--heading--color-#{$color});\n }\n }\n\n @include color(\"danger\");\n @include color(\"unavailable\");\n @include color(\"dark\");\n @include color(\"light\");\n @include color(\"dark-static\");\n @include color(\"light-static\");\n\n .headingText {\n .icon {\n height: var(--heading-line-height);\n width: var(--heading-line-height);\n vertical-align: bottom;\n display: inline-block;\n margin-inline-end: var(--heading--icon-to-text-spacing);\n }\n }\n\n .headingContent {\n &:empty {\n display: none;\n }\n }\n\n .headingTextSpacer {\n margin-inline-end: var(--heading--icon-to-text-spacing);\n }\n\n .headingContentItem {\n vertical-align: bottom;\n display: inline-flex;\n max-width: 100%;\n min-height: var(--heading-line-height);\n align-items: center;\n\n &:not(:last-child) {\n margin-inline-end: var(--heading--icon-to-text-spacing);\n }\n }\n\n &:where(.h1) {\n --font-size: var(--font-size-heading--xl);\n }\n\n &:where(.h2) {\n --font-size: var(--font-size-heading--m);\n }\n\n &:where(.h3) {\n --font-size: var(--font-size-heading--s);\n }\n\n &:where(.h4),\n &:where(.h5),\n &:where(.h6) {\n --font-size: var(--font-size-heading--xs);\n }\n\n @mixin size($size) {\n &.size-#{$size} {\n --font-size: var(--font-size-heading--#{$size});\n }\n }\n\n @include size(\"xs\");\n @include size(\"s\");\n @include size(\"m\");\n @include size(\"l\");\n @include size(\"xl\");\n @include size(\"xxl\");\n\n &:where(.wrap-wrap) {\n text-wrap: wrap;\n }\n\n &:where(.wrap-balance) {\n text-wrap: balance;\n }\n}\n\n@media (max-width: 768px) {\n .heading {\n &:where(.h1),\n &.size-xl {\n --font-size: var(--font-size-heading--l);\n }\n\n &.size-l {\n --font-size: var(--font-size-heading--m);\n }\n\n &:where(.h2),\n &.size-m {\n --font-size: var(--font-size-heading--s);\n }\n\n &:where(.h3),\n &.size-s {\n --font-size: var(--font-size-heading--xs);\n }\n }\n}\n"],"mappings":""}
@@ -7,7 +7,7 @@ import { IllustratedMessage } from "../IllustratedMessage/IllustratedMessage.mjs
7
7
  import ImageCropper_module_default from "./ImageCropper.module.mjs";
8
8
  import { Slider } from "../Slider/Slider.mjs";
9
9
  import { getCroppedImageFile } from "./lib/getCroppedImageFile.mjs";
10
- import __locale_default from "../../../../../_virtual/_19.locale.mjs";
10
+ import __locale_default from "../../../../../_virtual/_20.locale.mjs";
11
11
  import { useImageSrc } from "../../lib/hooks/useImageSrc.mjs";
12
12
  import clsx from "clsx";
13
13
  import { useEffect, useRef, useState } from "react";
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  import { flowComponent } from "../../lib/componentFactory/flowComponent.mjs";
4
4
  import { useLocalizedStringFormatter as useLocalizedStringFormatter$1 } from "../TranslationProvider/useLocalizedStringFormatter.mjs";
5
- import __locale_default from "../../../../../_virtual/_30.locale.mjs";
5
+ import __locale_default from "../../../../../_virtual/_31.locale.mjs";
6
6
  import Kbd_module_default from "./Kbd.module.mjs";
7
7
  import clsx from "clsx";
8
8
  import { Fragment } from "react";
@@ -15,6 +15,8 @@ import * as Aria from "react-aria-components";
15
15
  /** @flr-generate all */
16
16
  var Label = flowComponent("Label", (props) => {
17
17
  const { children, className, optional, isDisabled, ref, unstyled = false, ...rest } = props;
18
+ const [labelProps, labelRef] = Aria.useContextProps(rest, ref, Aria.LabelContext);
19
+ const { id, ...rootProps } = labelProps;
18
20
  const stringFormatter = useLocalizedStringFormatter(__locale_default, "Label");
19
21
  const rootClassName = unstyled ? className : clsx(Label_module_default.label, isDisabled && Label_module_default.disabled, className);
20
22
  const optionalMarker = /* @__PURE__ */ jsx("span", {
@@ -42,31 +44,37 @@ var Label = flowComponent("Label", (props) => {
42
44
  };
43
45
  return /* @__PURE__ */ jsx(PropsContextProvider, {
44
46
  props: propsContext,
45
- children: /* @__PURE__ */ jsxs(Aria.Label, {
46
- ...rest,
47
- className: rootClassName,
48
- ref,
49
- children: [
50
- children,
51
- optional && optionalMarker,
52
- /* @__PURE__ */ jsx(UiComponentTunnelExit, {
53
- id: "contextualHelp",
54
- component: "Label",
55
- children: (children) => {
56
- if (React.Children.count(children) >= 1) return children;
57
- }
58
- }),
59
- /* @__PURE__ */ jsx(UiComponentTunnelExit, {
60
- id: "right",
61
- component: "Label",
62
- children: (children) => {
63
- if (React.Children.count(children) >= 1) return /* @__PURE__ */ jsx("div", {
64
- className: Label_module_default.right,
65
- children
66
- });
67
- }
68
- })
69
- ]
47
+ children: /* @__PURE__ */ jsx(Aria.LabelContext.Provider, {
48
+ value: null,
49
+ children: /* @__PURE__ */ jsxs(Aria.Label, {
50
+ ...rootProps,
51
+ className: rootClassName,
52
+ ref: labelRef,
53
+ children: [
54
+ /* @__PURE__ */ jsxs("span", {
55
+ id,
56
+ className: Label_module_default.text,
57
+ children: [children, optional && optionalMarker]
58
+ }),
59
+ /* @__PURE__ */ jsx(UiComponentTunnelExit, {
60
+ id: "contextualHelp",
61
+ component: "Label",
62
+ children: (children) => {
63
+ if (React.Children.count(children) >= 1) return children;
64
+ }
65
+ }),
66
+ /* @__PURE__ */ jsx(UiComponentTunnelExit, {
67
+ id: "right",
68
+ component: "Label",
69
+ children: (children) => {
70
+ if (React.Children.count(children) >= 1) return /* @__PURE__ */ jsx("div", {
71
+ className: Label_module_default.right,
72
+ children
73
+ });
74
+ }
75
+ })
76
+ ]
77
+ })
70
78
  })
71
79
  });
72
80
  });