@festo-ui/react 10.0.1-dev.850 → 10.0.1-dev.852

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 (209) hide show
  1. package/package.json +1 -1
  2. package/dist/components/accordion/Accordion.css +0 -4
  3. package/dist/components/accordion/Accordion.d.ts +0 -10
  4. package/dist/components/accordion/Accordion.js +0 -42
  5. package/dist/components/accordion/AccordionContext.d.ts +0 -11
  6. package/dist/components/accordion/AccordionContext.js +0 -3
  7. package/dist/components/accordion/accordion-header/AccordionHeader.css +0 -11
  8. package/dist/components/accordion/accordion-header/AccordionHeader.d.ts +0 -2
  9. package/dist/components/accordion/accordion-header/AccordionHeader.js +0 -12
  10. package/dist/components/accordion/accordion-item/AccordionItem.css +0 -64
  11. package/dist/components/accordion/accordion-item/AccordionItem.d.ts +0 -8
  12. package/dist/components/accordion/accordion-item/AccordionItem.js +0 -61
  13. package/dist/components/accordion/accordion-item/AccordionItemContext.d.ts +0 -7
  14. package/dist/components/accordion/accordion-item/AccordionItemContext.js +0 -3
  15. package/dist/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.css +0 -76
  16. package/dist/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.d.ts +0 -2
  17. package/dist/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.js +0 -56
  18. package/dist/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.css +0 -11
  19. package/dist/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.d.ts +0 -2
  20. package/dist/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.js +0 -21
  21. package/dist/components/bottom-sheet/BottomSheet.css +0 -18
  22. package/dist/components/bottom-sheet/BottomSheet.d.ts +0 -10
  23. package/dist/components/bottom-sheet/BottomSheet.js +0 -104
  24. package/dist/components/breadcrumb/Breadcrumb.d.ts +0 -13
  25. package/dist/components/breadcrumb/Breadcrumb.js +0 -61
  26. package/dist/components/button/Button.d.ts +0 -11
  27. package/dist/components/button/Button.js +0 -37
  28. package/dist/components/card/Card.d.ts +0 -3
  29. package/dist/components/card/Card.js +0 -11
  30. package/dist/components/card/CardBody.d.ts +0 -5
  31. package/dist/components/card/CardBody.js +0 -17
  32. package/dist/components/card/CardHeader.d.ts +0 -8
  33. package/dist/components/card/CardHeader.js +0 -33
  34. package/dist/components/card/CardHeader.stories.helper.js +0 -7
  35. package/dist/components/card/CardNotification.d.ts +0 -5
  36. package/dist/components/card/CardNotification.js +0 -30
  37. package/dist/components/chips/chip/Chip.d.ts +0 -16
  38. package/dist/components/chips/chip/Chip.js +0 -45
  39. package/dist/components/chips/chip-container/ChipContainer.d.ts +0 -5
  40. package/dist/components/chips/chip-container/ChipContainer.js +0 -16
  41. package/dist/components/icon-wrapper/IconWrapper.d.ts +0 -7
  42. package/dist/components/icon-wrapper/IconWrapper.js +0 -13
  43. package/dist/components/loading-indicator/LoadingIndicator.d.ts +0 -5
  44. package/dist/components/loading-indicator/LoadingIndicator.js +0 -42
  45. package/dist/components/mobile-flyout/MobileFlyout.d.ts +0 -11
  46. package/dist/components/mobile-flyout/MobileFlyout.js +0 -89
  47. package/dist/components/mobile-flyout/MobileFlyoutContext.d.ts +0 -8
  48. package/dist/components/mobile-flyout/MobileFlyoutContext.js +0 -3
  49. package/dist/components/mobile-flyout/mobile-flyout-item/MobileFlyoutItem.d.ts +0 -18
  50. package/dist/components/mobile-flyout/mobile-flyout-item/MobileFlyoutItem.js +0 -37
  51. package/dist/components/mobile-flyout/mobile-flyout-page/MobileFlyoutPage.css +0 -5
  52. package/dist/components/mobile-flyout/mobile-flyout-page/MobileFlyoutPage.d.ts +0 -8
  53. package/dist/components/mobile-flyout/mobile-flyout-page/MobileFlyoutPage.js +0 -36
  54. package/dist/components/modals/AlertModal.d.ts +0 -12
  55. package/dist/components/modals/AlertModal.js +0 -54
  56. package/dist/components/modals/ConfirmModal.d.ts +0 -11
  57. package/dist/components/modals/ConfirmModal.js +0 -47
  58. package/dist/components/modals/CustomModal.d.ts +0 -8
  59. package/dist/components/modals/CustomModal.js +0 -39
  60. package/dist/components/modals/Modal.css +0 -39
  61. package/dist/components/modals/Modal.d.ts +0 -8
  62. package/dist/components/modals/Modal.js +0 -32
  63. package/dist/components/modals/ModalBase.d.ts +0 -10
  64. package/dist/components/modals/ModalBase.js +0 -125
  65. package/dist/components/modals/ModalFooter.d.ts +0 -2
  66. package/dist/components/modals/ModalFooter.js +0 -14
  67. package/dist/components/modals/Prompt.d.ts +0 -15
  68. package/dist/components/modals/Prompt.js +0 -61
  69. package/dist/components/modals/image-gallery/ImageGallery.css +0 -833
  70. package/dist/components/modals/image-gallery/ImageGallery.d.ts +0 -21
  71. package/dist/components/modals/image-gallery/ImageGallery.helper.d.ts +0 -2
  72. package/dist/components/modals/image-gallery/ImageGallery.helper.js +0 -13
  73. package/dist/components/modals/image-gallery/ImageGallery.js +0 -104
  74. package/dist/components/modals/image-gallery/ImageGallery.stories.helper.js +0 -112
  75. package/dist/components/modals/image-gallery/ImageGalleryContent.d.ts +0 -8
  76. package/dist/components/modals/image-gallery/ImageGalleryContent.js +0 -15
  77. package/dist/components/modals/image-gallery/ImageGalleryScale.d.ts +0 -6
  78. package/dist/components/modals/image-gallery/ImageGalleryScale.js +0 -15
  79. package/dist/components/modals/image-gallery/ImageGallerySwiper.d.ts +0 -12
  80. package/dist/components/modals/image-gallery/ImageGallerySwiper.js +0 -40
  81. package/dist/components/modals/image-gallery/ImageGalleryThumbsSwiper.d.ts +0 -7
  82. package/dist/components/modals/image-gallery/ImageGalleryThumbsSwiper.js +0 -27
  83. package/dist/components/modals/image-gallery/internal/CloseButton.d.ts +0 -6
  84. package/dist/components/modals/image-gallery/internal/CloseButton.js +0 -14
  85. package/dist/components/modals/image-gallery/internal/ImageGalleryContainer.d.ts +0 -5
  86. package/dist/components/modals/image-gallery/internal/ImageGalleryContainer.js +0 -8
  87. package/dist/components/modals/image-gallery/internal/ImageGalleryPagination.d.ts +0 -5
  88. package/dist/components/modals/image-gallery/internal/ImageGalleryPagination.js +0 -29
  89. package/dist/components/pagination/Pagination.css +0 -10
  90. package/dist/components/pagination/Pagination.d.ts +0 -14
  91. package/dist/components/pagination/Pagination.js +0 -104
  92. package/dist/components/popovers/legend/Legend.d.ts +0 -11
  93. package/dist/components/popovers/legend/Legend.js +0 -25
  94. package/dist/components/popovers/popover/Popover.css +0 -9
  95. package/dist/components/popovers/popover/Popover.d.ts +0 -19
  96. package/dist/components/popovers/popover/Popover.js +0 -96
  97. package/dist/components/popovers/popover-menu/PopoverMenu.d.ts +0 -9
  98. package/dist/components/popovers/popover-menu/PopoverMenu.js +0 -33
  99. package/dist/components/popovers/popover-menu/PopoverMenuContext.d.ts +0 -4
  100. package/dist/components/popovers/popover-menu/PopoverMenuContext.js +0 -5
  101. package/dist/components/popovers/popover-menu/popover-menu-item/PopoverMenuItem.d.ts +0 -9
  102. package/dist/components/popovers/popover-menu/popover-menu-item/PopoverMenuItem.js +0 -31
  103. package/dist/components/popovers/tooltip/Tooltip.d.ts +0 -6
  104. package/dist/components/popovers/tooltip/Tooltip.js +0 -13
  105. package/dist/components/progress/Progress.d.ts +0 -6
  106. package/dist/components/progress/Progress.js +0 -30
  107. package/dist/components/search-input/ClearButton.d.ts +0 -1
  108. package/dist/components/search-input/ClearButton.js +0 -11
  109. package/dist/components/search-input/SearchInput.css +0 -13
  110. package/dist/components/search-input/SearchInput.d.ts +0 -13
  111. package/dist/components/search-input/SearchInput.js +0 -65
  112. package/dist/components/search-input/SearchSuggestion.d.ts +0 -17
  113. package/dist/components/search-input/SearchSuggestion.js +0 -21
  114. package/dist/components/search-input/useSearchInput.d.ts +0 -13
  115. package/dist/components/search-input/useSearchInput.js +0 -85
  116. package/dist/components/snackbar/Snackbar.css +0 -55
  117. package/dist/components/snackbar/Snackbar.d.ts +0 -21
  118. package/dist/components/snackbar/Snackbar.js +0 -82
  119. package/dist/components/snackbar/SnackbarContext.d.ts +0 -7
  120. package/dist/components/snackbar/SnackbarContext.js +0 -3
  121. package/dist/components/snackbar/SnackbarProvider.d.ts +0 -7
  122. package/dist/components/snackbar/SnackbarProvider.js +0 -69
  123. package/dist/components/snackbar/useSnackbar.d.ts +0 -2
  124. package/dist/components/snackbar/useSnackbar.js +0 -4
  125. package/dist/components/stepper-horizontal/StepperHorizontal.css +0 -6
  126. package/dist/components/stepper-horizontal/StepperHorizontal.d.ts +0 -7
  127. package/dist/components/stepper-horizontal/StepperHorizontal.js +0 -49
  128. package/dist/components/stepper-horizontal/step-horizontal/StepHorizontal.css +0 -24
  129. package/dist/components/stepper-horizontal/step-horizontal/StepHorizontal.d.ts +0 -6
  130. package/dist/components/stepper-horizontal/step-horizontal/StepHorizontal.js +0 -17
  131. package/dist/components/stepper-vertical/StepperVertical.d.ts +0 -6
  132. package/dist/components/stepper-vertical/StepperVertical.js +0 -26
  133. package/dist/components/stepper-vertical/step-vertical/StepVertical.css +0 -10
  134. package/dist/components/stepper-vertical/step-vertical/StepVertical.d.ts +0 -11
  135. package/dist/components/stepper-vertical/step-vertical/StepVertical.js +0 -59
  136. package/dist/components/tab/Tabs.css +0 -285
  137. package/dist/components/tab/Tabs.d.ts +0 -22
  138. package/dist/components/tab/Tabs.js +0 -194
  139. package/dist/components/tab/interfaces.d.ts +0 -5
  140. package/dist/components/tab/interfaces.js +0 -0
  141. package/dist/components/tab/tab-pane/TabPane.css +0 -8
  142. package/dist/components/tab/tab-pane/TabPane.d.ts +0 -8
  143. package/dist/components/tab/tab-pane/TabPane.js +0 -22
  144. package/dist/components/tab/useTabScroll.d.ts +0 -25
  145. package/dist/components/tab/useTabScroll.js +0 -151
  146. package/dist/components/table-header-cell/TableHeaderCell.d.ts +0 -6
  147. package/dist/components/table-header-cell/TableHeaderCell.js +0 -22
  148. package/dist/forms/checkbox/Checkbox.css +0 -134
  149. package/dist/forms/checkbox/Checkbox.d.ts +0 -12
  150. package/dist/forms/checkbox/Checkbox.js +0 -83
  151. package/dist/forms/combobox/ComboBox.css +0 -124
  152. package/dist/forms/combobox/ComboBox.d.ts +0 -27
  153. package/dist/forms/combobox/ComboBox.js +0 -174
  154. package/dist/forms/multi-select/MultiSelect.css +0 -13
  155. package/dist/forms/multi-select/MultiSelect.d.ts +0 -20
  156. package/dist/forms/multi-select/MultiSelect.js +0 -192
  157. package/dist/forms/radio/RadioButton.d.ts +0 -14
  158. package/dist/forms/radio/RadioButton.js +0 -57
  159. package/dist/forms/radio/RadioGroup.d.ts +0 -12
  160. package/dist/forms/radio/RadioGroup.js +0 -51
  161. package/dist/forms/radio/RadioGroupContext.d.ts +0 -12
  162. package/dist/forms/radio/RadioGroupContext.js +0 -3
  163. package/dist/forms/segment/Segment.d.ts +0 -12
  164. package/dist/forms/segment/Segment.js +0 -60
  165. package/dist/forms/segment/segment-control/SegmentControl.d.ts +0 -10
  166. package/dist/forms/segment/segment-control/SegmentControl.js +0 -59
  167. package/dist/forms/select/Select.d.ts +0 -25
  168. package/dist/forms/select/Select.js +0 -93
  169. package/dist/forms/select/internal/SelectButton.d.ts +0 -0
  170. package/dist/forms/select/internal/SelectButton.js +0 -0
  171. package/dist/forms/select/internal/SelectButtonContent.d.ts +0 -0
  172. package/dist/forms/select/internal/SelectButtonContent.js +0 -0
  173. package/dist/forms/select/internal/SelectOptionsContainer.d.ts +0 -0
  174. package/dist/forms/select/internal/SelectOptionsContainer.js +0 -0
  175. package/dist/forms/slider/Slider.css +0 -50
  176. package/dist/forms/slider/Slider.d.ts +0 -14
  177. package/dist/forms/slider/Slider.js +0 -98
  178. package/dist/forms/switch/Switch.d.ts +0 -10
  179. package/dist/forms/switch/Switch.js +0 -48
  180. package/dist/forms/text-area/TextArea.css +0 -14
  181. package/dist/forms/text-area/TextArea.d.ts +0 -13
  182. package/dist/forms/text-area/TextArea.js +0 -116
  183. package/dist/forms/text-input/TextInput.css +0 -31
  184. package/dist/forms/text-input/TextInput.d.ts +0 -13
  185. package/dist/forms/text-input/TextInput.js +0 -65
  186. package/dist/forms/time-picker/TimePicker.css +0 -10
  187. package/dist/forms/time-picker/TimePicker.d.ts +0 -25
  188. package/dist/forms/time-picker/TimePicker.js +0 -125
  189. package/dist/forms/time-picker/time-picker-dropdown/TimePickerDropdown.css +0 -4
  190. package/dist/forms/time-picker/time-picker-dropdown/TimePickerDropdown.d.ts +0 -19
  191. package/dist/forms/time-picker/time-picker-dropdown/TimePickerDropdown.js +0 -209
  192. package/dist/forms/time-picker/time-picker-dropdown/TimePickerInput.d.ts +0 -9
  193. package/dist/forms/time-picker/time-picker-dropdown/TimePickerInput.js +0 -15
  194. package/dist/index.d.ts +0 -60
  195. package/dist/index.js +0 -60
  196. package/dist/utils/index.d.ts +0 -1
  197. package/dist/utils/index.js +0 -7
  198. package/dist/utils/setRef.d.ts +0 -1
  199. package/dist/utils/setRef.js +0 -5
  200. package/dist/utils/types.d.ts +0 -23
  201. package/dist/utils/types.js +0 -0
  202. package/dist/utils/useControlled.d.ts +0 -7
  203. package/dist/utils/useControlled.js +0 -20
  204. package/dist/utils/useForkRef.d.ts +0 -2
  205. package/dist/utils/useForkRef.js +0 -15
  206. package/dist/utils/useId.d.ts +0 -1
  207. package/dist/utils/useId.js +0 -20
  208. package/dist/utils/useOnClickOutside.d.ts +0 -2
  209. package/dist/utils/useOnClickOutside.js +0 -20
@@ -1,37 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import classnames from "classnames";
3
- import { forwardRef } from "react";
4
- import { IconWrapper } from "../icon-wrapper/IconWrapper.js";
5
- const Button = /*#__PURE__*/ forwardRef(({ icon, type = 'button', disabled = false, iconOnly = false, large = false, floating = false, onClick, primary = false, tertiary = false, className, children, ...props }, ref)=>{
6
- const classes = classnames('fwe-btn', 'fr-button', {
7
- 'fwe-btn-icon': iconOnly
8
- }, {
9
- 'fwe-disabled': disabled
10
- }, {
11
- 'fwe-btn-hero': primary && !tertiary
12
- }, {
13
- 'fwe-btn-link': tertiary && !primary
14
- }, {
15
- 'fwe-btn-lg': large
16
- }, {
17
- 'fwe-btn-floating': floating
18
- }, className);
19
- return /*#__PURE__*/ jsxs("button", {
20
- type: type,
21
- onClick: onClick,
22
- className: classes,
23
- disabled: disabled,
24
- ref: ref,
25
- ...props,
26
- children: [
27
- /*#__PURE__*/ jsx(IconWrapper, {
28
- icon: icon
29
- }),
30
- !iconOnly && /*#__PURE__*/ jsx("div", {
31
- children: children
32
- })
33
- ]
34
- });
35
- });
36
- Button.displayName = 'Button';
37
- export { Button };
@@ -1,3 +0,0 @@
1
- import type React from 'react';
2
- export type CardProps = React.ComponentPropsWithoutRef<'div'>;
3
- export declare const Card: (props: Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null;
@@ -1,11 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import classnames from "classnames";
3
- import { forwardRef } from "react";
4
- const Card = /*#__PURE__*/ forwardRef(({ children, className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
5
- className: classnames('fwe-card', className),
6
- ref: ref,
7
- ...props,
8
- children: children
9
- }));
10
- Card.displayName = 'Card';
11
- export { Card };
@@ -1,5 +0,0 @@
1
- import type React from 'react';
2
- export interface CardBodyProps extends React.ComponentPropsWithoutRef<'div'> {
3
- text: string;
4
- }
5
- export declare const CardBody: (props: CardBodyProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null;
@@ -1,17 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import classnames from "classnames";
3
- import { forwardRef } from "react";
4
- const CardBody = /*#__PURE__*/ forwardRef(({ children, text, className, ...props }, ref)=>/*#__PURE__*/ jsxs("div", {
5
- className: classnames('fwe-card-body', className),
6
- ref: ref,
7
- ...props,
8
- children: [
9
- /*#__PURE__*/ jsx("div", {
10
- className: "fwe-card-text",
11
- children: text
12
- }),
13
- children
14
- ]
15
- }));
16
- CardBody.displayName = 'CardBody';
17
- export { CardBody };
@@ -1,8 +0,0 @@
1
- import type { Image } from '../../utils/types';
2
- export interface CardHeaderProps extends React.ComponentPropsWithoutRef<'div'> {
3
- title: string;
4
- subtitle?: string;
5
- action?: React.ReactNode;
6
- image?: Image;
7
- }
8
- export declare const CardHeader: (props: CardHeaderProps & import("react").RefAttributes<HTMLDivElement>) => React.ReactElement | null;
@@ -1,33 +0,0 @@
1
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
- import classnames from "classnames";
3
- import { forwardRef } from "react";
4
- const CardHeader = /*#__PURE__*/ forwardRef(({ title, subtitle, action, image, className, ...props }, ref)=>/*#__PURE__*/ jsxs(Fragment, {
5
- children: [
6
- image ? /*#__PURE__*/ jsx("img", {
7
- alt: image.alt,
8
- className: `fwe-card-img-${'3/2' === image.aspectRatio ? '32' : '169'}`,
9
- src: image.src
10
- }) : null,
11
- /*#__PURE__*/ jsxs("div", {
12
- className: classnames('fwe-card-header', className),
13
- ref: ref,
14
- ...props,
15
- children: [
16
- /*#__PURE__*/ jsxs("div", {
17
- className: "fwe-card-title",
18
- children: [
19
- /*#__PURE__*/ jsx("h5", {
20
- children: title
21
- }),
22
- subtitle && /*#__PURE__*/ jsx("p", {
23
- children: subtitle
24
- })
25
- ]
26
- }),
27
- action
28
- ]
29
- })
30
- ]
31
- }));
32
- CardHeader.displayName = 'CardHeader';
33
- export { CardHeader };
@@ -1,7 +0,0 @@
1
- import gallery_01 from "../../../../web-essentials/stories/assets/gallery-01.webp";
2
- const cardImage = {
3
- src: gallery_01,
4
- alt: 'Asset',
5
- aspectRatio: '16/9'
6
- };
7
- export { cardImage };
@@ -1,5 +0,0 @@
1
- export interface CardNotificationProps extends React.ComponentPropsWithoutRef<'div'> {
2
- title: string;
3
- message?: string;
4
- }
5
- export declare const CardNotification: (props: CardNotificationProps & import("react").RefAttributes<HTMLDivElement>) => React.ReactElement | null;
@@ -1,30 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { IconWarning } from "@festo-ui/react-icons";
3
- import classnames from "classnames";
4
- import { forwardRef } from "react";
5
- const CardNotification = /*#__PURE__*/ forwardRef(({ className, title, message, ...props }, ref)=>{
6
- const classes = classnames('fwe-card-notification', className);
7
- return /*#__PURE__*/ jsxs("div", {
8
- className: classes,
9
- ref: ref,
10
- ...props,
11
- children: [
12
- /*#__PURE__*/ jsx(IconWarning, {
13
- size: 24
14
- }),
15
- /*#__PURE__*/ jsxs("div", {
16
- className: "fwe-card-title",
17
- children: [
18
- /*#__PURE__*/ jsx("h6", {
19
- children: title
20
- }),
21
- message && /*#__PURE__*/ jsx("p", {
22
- children: message
23
- })
24
- ]
25
- })
26
- ]
27
- });
28
- });
29
- CardNotification.displayName = 'CardNotification';
30
- export { CardNotification };
@@ -1,16 +0,0 @@
1
- import type React from 'react';
2
- export declare enum ChipType {
3
- Choice = 0,
4
- Category = 1,
5
- Filter = 2,
6
- Action = 3,
7
- Readonly = 4
8
- }
9
- export interface ChipProps extends Omit<React.ComponentPropsWithoutRef<'button'>, 'type'> {
10
- readonly type?: ChipType;
11
- readonly icon?: React.ReactNode;
12
- readonly selected?: boolean;
13
- readonly disabled?: boolean;
14
- readonly large?: boolean;
15
- }
16
- export declare const Chip: (props: ChipProps & React.RefAttributes<HTMLButtonElement>) => React.ReactElement | null;
@@ -1,45 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import classnames from "classnames";
3
- import { forwardRef } from "react";
4
- import { IconWrapper } from "../../icon-wrapper/IconWrapper.js";
5
- var Chip_ChipType = /*#__PURE__*/ function(ChipType) {
6
- ChipType[ChipType["Choice"] = 0] = "Choice";
7
- ChipType[ChipType["Category"] = 1] = "Category";
8
- ChipType[ChipType["Filter"] = 2] = "Filter";
9
- ChipType[ChipType["Action"] = 3] = "Action";
10
- ChipType[ChipType["Readonly"] = 4] = "Readonly";
11
- return ChipType;
12
- }({});
13
- const Chip = /*#__PURE__*/ forwardRef(({ type = 0, selected = false, disabled = false, large = false, icon, children, onClick, className, ...props }, ref)=>{
14
- const classes = classnames('fr-chip', 'fwe-chip', {
15
- 'fwe-selected': selected
16
- }, {
17
- 'fwe-disabled': disabled
18
- }, {
19
- 'fwe-chip-lg': large
20
- }, {
21
- 'fwe-category': 1 === type
22
- }, {
23
- 'fwe-filter': 2 === type
24
- }, {
25
- 'fwe-action': 3 === type
26
- }, {
27
- 'fwe-readonly': 4 === type
28
- }, className);
29
- return /*#__PURE__*/ jsxs("button", {
30
- type: "button",
31
- className: classes,
32
- onClick: onClick,
33
- disabled: disabled,
34
- ref: ref,
35
- ...props,
36
- children: [
37
- /*#__PURE__*/ jsx(IconWrapper, {
38
- icon: icon
39
- }),
40
- children
41
- ]
42
- });
43
- });
44
- Chip.displayName = 'Chip';
45
- export { Chip, Chip_ChipType as ChipType };
@@ -1,5 +0,0 @@
1
- import type React from 'react';
2
- export interface ChipContainerProps extends React.ComponentPropsWithoutRef<'div'> {
3
- readonly large?: boolean;
4
- }
5
- export declare const ChipContainer: (props: ChipContainerProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null;
@@ -1,16 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import classnames from "classnames";
3
- import { forwardRef } from "react";
4
- const ChipContainer = /*#__PURE__*/ forwardRef(({ large = false, children, className, ...props }, ref)=>{
5
- const classes = classnames('fwe-chip-container', {
6
- 'fwe-chip-container-lg': large
7
- }, className);
8
- return /*#__PURE__*/ jsx("div", {
9
- className: classes,
10
- ref: ref,
11
- ...props,
12
- children: children
13
- });
14
- });
15
- ChipContainer.displayName = 'ChipContainer';
16
- export { ChipContainer };
@@ -1,7 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- /**
3
- * Internal wrapper for icons.
4
- */
5
- export declare function IconWrapper({ icon }: {
6
- readonly icon: ReactNode;
7
- }): import("react/jsx-runtime").JSX.Element | null;
@@ -1,13 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- function IconWrapper({ icon }) {
3
- if (!icon) return null;
4
- if ('string' == typeof icon) {
5
- let iconName = icon;
6
- if (!icon.startsWith('fwe-icon-')) iconName = `fwe-icon-${icon}`;
7
- return /*#__PURE__*/ jsx("i", {
8
- className: `fwe-icon ${iconName}`
9
- });
10
- }
11
- return icon;
12
- }
13
- export { IconWrapper };
@@ -1,5 +0,0 @@
1
- import { type ComponentPropsWithoutRef } from 'react';
2
- export interface LoadingIndicatorProps extends ComponentPropsWithoutRef<'div'> {
3
- readonly size: 'large' | 'medium' | 'small';
4
- }
5
- export declare const LoadingIndicator: (props: LoadingIndicatorProps & import("react").RefAttributes<HTMLDivElement>) => React.ReactElement | null;
@@ -1,42 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import classnames from "classnames";
3
- import { forwardRef } from "react";
4
- const LoadingIndicator = /*#__PURE__*/ forwardRef(({ size = 'large', children, className, ...props }, ref)=>{
5
- const classes = classnames('fwe-waiting-indicator', {
6
- 'fwe-waiting-indicator-md': 'medium' === size
7
- }, {
8
- 'fwe-waiting-indicator-sm': 'small' === size
9
- });
10
- return /*#__PURE__*/ jsxs("div", {
11
- className: classnames('fwe-waiting-container', {
12
- 'fwe-waiting-container-sm': 'small' === size
13
- }, className),
14
- ref: ref,
15
- ...props,
16
- children: [
17
- /*#__PURE__*/ jsxs("div", {
18
- className: classes,
19
- children: [
20
- /*#__PURE__*/ jsx("div", {
21
- className: "fwe-waiting-circle-1"
22
- }),
23
- /*#__PURE__*/ jsx("div", {
24
- className: "fwe-waiting-circle-2"
25
- }),
26
- /*#__PURE__*/ jsx("div", {
27
- className: "fwe-waiting-circle-3"
28
- }),
29
- /*#__PURE__*/ jsx("div", {
30
- className: "fwe-waiting-circle-4"
31
- })
32
- ]
33
- }),
34
- children && /*#__PURE__*/ jsx("div", {
35
- className: "fwe-waiting-content-container",
36
- children: children
37
- })
38
- ]
39
- });
40
- });
41
- LoadingIndicator.displayName = 'LoadingIndicator';
42
- export { LoadingIndicator };
@@ -1,11 +0,0 @@
1
- import { type ComponentPropsWithoutRef } from 'react';
2
- export interface MobileFlyoutProps extends Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> {
3
- open?: boolean;
4
- defaultOpen?: boolean;
5
- visible?: string[];
6
- defaultVisible?: string[];
7
- onOpenChange?: (value: boolean) => void;
8
- onVisibleChange?: (value: string) => void;
9
- back?: string;
10
- }
11
- export declare const MobileFlyout: (props: MobileFlyoutProps & import("react").RefAttributes<HTMLDivElement>) => React.ReactElement | null;
@@ -1,89 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import classnames from "classnames";
3
- import { forwardRef, useCallback, useMemo, useRef } from "react";
4
- import { useControlled } from "../../utils/useControlled.js";
5
- import { useForkRef } from "../../utils/useForkRef.js";
6
- import { useOnClickOutside } from "../../utils/useOnClickOutside.js";
7
- import { MobileFlyoutContext } from "./MobileFlyoutContext.js";
8
- const defaultVisibleValue = [
9
- 'root'
10
- ];
11
- const MobileFlyout = /*#__PURE__*/ forwardRef(({ className, children, open, onOpenChange, onVisibleChange, defaultOpen, visible, defaultVisible = defaultVisibleValue, back, ...props }, ref)=>{
12
- const [openState, setOpen] = useControlled({
13
- controlled: open,
14
- default: defaultOpen
15
- });
16
- const [visibleState, setVisible] = useControlled({
17
- controlled: visible,
18
- default: defaultVisible
19
- });
20
- const innerRef = useRef(null);
21
- const combinedRef = useForkRef(ref, innerRef);
22
- const handleVisibleChange = useCallback((v)=>{
23
- if (void 0 !== visibleState) if (visibleState.includes(v)) {
24
- const newArray = visibleState.filter((entry)=>entry !== v);
25
- setVisible(newArray);
26
- } else {
27
- const newArray = [
28
- ...visibleState,
29
- v
30
- ];
31
- setVisible(newArray);
32
- }
33
- onVisibleChange?.(v);
34
- }, [
35
- onVisibleChange,
36
- setVisible,
37
- visibleState
38
- ]);
39
- const handleOpenChange = useCallback((v)=>{
40
- setOpen(v);
41
- onOpenChange?.(v);
42
- }, [
43
- onOpenChange,
44
- setOpen
45
- ]);
46
- function handleClickOutside() {
47
- handleOpenChange(false);
48
- }
49
- function toggle() {
50
- const newOpen = !openState;
51
- handleOpenChange(newOpen);
52
- }
53
- useOnClickOutside(innerRef, handleClickOutside);
54
- const contextValue = useMemo(()=>({
55
- visible: visibleState ?? defaultVisibleValue,
56
- setVisible: handleVisibleChange,
57
- setOpen: handleOpenChange,
58
- back
59
- }), [
60
- handleVisibleChange,
61
- visibleState,
62
- back,
63
- handleOpenChange
64
- ]);
65
- return /*#__PURE__*/ jsxs("div", {
66
- className: classnames('fwe-mobile-flyout', className),
67
- ...props,
68
- ref: combinedRef,
69
- children: [
70
- /*#__PURE__*/ jsx("button", {
71
- "aria-label": "menu",
72
- type: "button",
73
- className: openState ? 'fwe-close-button' : 'fwe-burger-button',
74
- onClick: toggle
75
- }),
76
- /*#__PURE__*/ jsx("div", {
77
- className: classnames('fwe-mobile-flyout-container', {
78
- 'fwe-opened': openState
79
- }),
80
- children: /*#__PURE__*/ jsx(MobileFlyoutContext.Provider, {
81
- value: contextValue,
82
- children: children
83
- })
84
- })
85
- ]
86
- });
87
- });
88
- MobileFlyout.displayName = 'MobileFlyout';
89
- export { MobileFlyout };
@@ -1,8 +0,0 @@
1
- interface MobileFlyoutContext {
2
- visible: string[];
3
- setVisible: (value: string) => void;
4
- setOpen: (value: boolean) => void;
5
- back?: string;
6
- }
7
- export declare const MobileFlyoutContext: import("react").Context<MobileFlyoutContext>;
8
- export {};
@@ -1,3 +0,0 @@
1
- import { createContext } from "react";
2
- const MobileFlyoutContext = /*#__PURE__*/ createContext(null);
3
- export { MobileFlyoutContext };
@@ -1,18 +0,0 @@
1
- import type { PolymorphicComponentPropWithRef, PolymorphicRef } from '../../../utils/types';
2
- declare module 'react' {
3
- function forwardRef<T, P = object>(render: (props: P, ref: React.Ref<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
4
- }
5
- export interface MobileFlyoutItemBaseProps {
6
- icon?: React.ReactNode;
7
- pageLink?: string;
8
- active?: boolean;
9
- className?: string;
10
- }
11
- export type MobileFlyoutItemProps<C extends React.ElementType> = PolymorphicComponentPropWithRef<C, MobileFlyoutItemBaseProps>;
12
- export declare const MobileFlyoutItem: <C extends React.ElementType = "a">(props: MobileFlyoutItemBaseProps & {
13
- component?: C | undefined;
14
- } & {
15
- children?: import("react").ReactNode | undefined;
16
- } & Omit<import("react").PropsWithoutRef<import("react").ComponentProps<C>>, "component" | keyof MobileFlyoutItemBaseProps> & {
17
- ref?: PolymorphicRef<C> | undefined;
18
- } & import("react").RefAttributes<unknown>) => React.ReactElement | null;
@@ -1,37 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { IconRight2 } from "@festo-ui/react-icons";
3
- import classnames from "classnames";
4
- import { forwardRef, useContext } from "react";
5
- import { IconWrapper } from "../../icon-wrapper/IconWrapper.js";
6
- import { MobileFlyoutContext } from "../MobileFlyoutContext.js";
7
- const MobileFlyoutItem = /*#__PURE__*/ forwardRef(({ component, children, pageLink, icon, onClick, active, className, ...props }, ref)=>{
8
- const Component = component || 'a';
9
- const { setVisible, setOpen } = useContext(MobileFlyoutContext);
10
- function handleClick(e) {
11
- if (pageLink) setVisible(pageLink);
12
- else setOpen(false);
13
- onClick?.(e);
14
- }
15
- return /*#__PURE__*/ jsxs(Component, {
16
- className: classnames('fwe-mobile-flyout-item fwe-bb', className),
17
- ...props,
18
- ref: ref,
19
- onClick: handleClick,
20
- children: [
21
- /*#__PURE__*/ jsx(IconWrapper, {
22
- icon: icon
23
- }),
24
- /*#__PURE__*/ jsx("div", {
25
- className: classnames('fwe-flex-grow-1', {
26
- 'fwe-color-hero': active
27
- }, {
28
- 'fwe-ml-xxs': !!icon
29
- }),
30
- children: children
31
- }),
32
- pageLink && /*#__PURE__*/ jsx(IconRight2, {})
33
- ]
34
- });
35
- });
36
- MobileFlyoutItem.displayName = 'MobileFlyoutItem';
37
- export { MobileFlyoutItem };
@@ -1,5 +0,0 @@
1
- .fr-mobile-flyout-page-back {
2
- border: none;
3
- width: 100%;
4
- }
5
-
@@ -1,8 +0,0 @@
1
- import './MobileFlyoutPage.scss';
2
- import { type ComponentPropsWithoutRef } from 'react';
3
- export interface MobileFlyoutPageProps extends ComponentPropsWithoutRef<'div'> {
4
- back?: string;
5
- name?: string;
6
- root?: boolean;
7
- }
8
- export declare const MobileFlyoutPage: (props: MobileFlyoutPageProps & import("react").RefAttributes<HTMLDivElement>) => React.ReactElement | null;
@@ -1,36 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import "./MobileFlyoutPage.css";
3
- import classnames from "classnames";
4
- import { forwardRef, useContext } from "react";
5
- import { MobileFlyoutContext } from "../MobileFlyoutContext.js";
6
- const MobileFlyoutPage = /*#__PURE__*/ forwardRef(({ back, children, name, root, className, ...props }, ref)=>{
7
- const { visible, setVisible, back: backContext } = useContext(MobileFlyoutContext);
8
- const innerVisible = root || name && visible.includes(name);
9
- const innerBack = back ?? backContext ?? 'Back';
10
- function handleChange() {
11
- if (name) setVisible(name);
12
- }
13
- return /*#__PURE__*/ jsxs("div", {
14
- ...props,
15
- className: classnames('fwe-mobile-flyout-page', {
16
- 'fwe-opened': innerVisible
17
- }, className),
18
- ref: ref,
19
- children: [
20
- !root && /*#__PURE__*/ jsx("button", {
21
- type: "button",
22
- className: "fwe-page-back fr-mobile-flyout-page-back",
23
- onClick: handleChange,
24
- children: /*#__PURE__*/ jsx("div", {
25
- children: innerBack
26
- })
27
- }),
28
- /*#__PURE__*/ jsx("div", {
29
- className: "fwe-mobile-flyout-item-container",
30
- children: children
31
- })
32
- ]
33
- });
34
- });
35
- MobileFlyoutPage.displayName = 'MobileFlyoutPage';
36
- export { MobileFlyoutPage };
@@ -1,12 +0,0 @@
1
- import { type ModalProps } from './Modal';
2
- export interface AlertModalProps extends Omit<ModalProps, 'head' | 'children'> {
3
- readonly title: string;
4
- readonly subtitle?: string;
5
- readonly alertType: 'info' | 'warning' | 'error';
6
- readonly strong?: boolean;
7
- readonly cancel?: string;
8
- readonly ok?: string;
9
- readonly onCancel?: () => void;
10
- readonly onOk?: () => void;
11
- }
12
- export declare const AlertModal: (props: AlertModalProps & import("react").RefAttributes<HTMLDivElement>) => React.ReactElement | null;
@@ -1,54 +0,0 @@
1
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
- import classnames from "classnames";
3
- import { forwardRef } from "react";
4
- import { Modal } from "./Modal.js";
5
- import { ModalFooter } from "./ModalFooter.js";
6
- const AlertModal = /*#__PURE__*/ forwardRef(({ title, subtitle, alertType, strong, cancel, ok, onCancel, onOk, className, body, ...props }, ref)=>/*#__PURE__*/ jsx(Modal, {
7
- className: classnames({
8
- 'fwe-modal--with-indicator-bar': strong,
9
- 'fwe-modal--warning': 'warning' === alertType,
10
- 'fwe-modal--error': 'error' === alertType,
11
- 'fwe-modal--info': 'info' === alertType
12
- }, className),
13
- head: /*#__PURE__*/ jsxs(Fragment, {
14
- children: [
15
- subtitle && /*#__PURE__*/ jsx("h2", {
16
- className: "fwe-modal-h2",
17
- children: subtitle
18
- }),
19
- /*#__PURE__*/ jsx("h1", {
20
- className: "fwe-modal-h1",
21
- children: title
22
- })
23
- ]
24
- }),
25
- body: 'string' == typeof body ? /*#__PURE__*/ jsx("p", {
26
- children: body
27
- }) : body,
28
- ref: ref,
29
- ...props,
30
- children: (cancel || ok) && /*#__PURE__*/ jsxs(ModalFooter, {
31
- children: [
32
- cancel && /*#__PURE__*/ jsx("button", {
33
- type: "button",
34
- "aria-label": "Cancel",
35
- className: classnames('fwe-btn fwe-btn-lg', {
36
- 'fwe-btn-link': strong
37
- }),
38
- onClick: onCancel,
39
- children: cancel
40
- }),
41
- ok && /*#__PURE__*/ jsx("button", {
42
- type: "button",
43
- "aria-label": "Ok",
44
- className: classnames('fwe-btn fwe-btn-lg', {
45
- 'fwe-btn-hero': !strong
46
- }),
47
- onClick: onOk,
48
- children: ok
49
- })
50
- ]
51
- })
52
- }));
53
- AlertModal.displayName = 'AlertModal';
54
- export { AlertModal };
@@ -1,11 +0,0 @@
1
- import { type ModalProps } from './Modal';
2
- export interface ConfirmModalProps extends Omit<ModalProps, 'head' | 'children'> {
3
- readonly title: string;
4
- readonly subtitle?: string;
5
- readonly cancel?: string;
6
- readonly ok?: string;
7
- readonly onCancel?: () => void;
8
- readonly onOk?: () => void;
9
- readonly large?: boolean;
10
- }
11
- export declare const ConfirmModal: (props: ConfirmModalProps & import("react").RefAttributes<HTMLDivElement>) => React.ReactElement | null;