@festo-ui/react 9.0.1-dev.780 → 9.0.1-dev.782

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 (203) hide show
  1. package/package.json +14 -18
  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 -41
  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 -11
  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 -60
  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 -61
  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 -20
  21. package/dist/components/bottom-sheet/BottomSheet.css +0 -18
  22. package/dist/components/bottom-sheet/BottomSheet.d.ts +0 -11
  23. package/dist/components/bottom-sheet/BottomSheet.js +0 -101
  24. package/dist/components/breadcrumb/Breadcrumb.d.ts +0 -14
  25. package/dist/components/breadcrumb/Breadcrumb.js +0 -87
  26. package/dist/components/button/Button.d.ts +0 -11
  27. package/dist/components/button/Button.js +0 -36
  28. package/dist/components/card/Card.d.ts +0 -4
  29. package/dist/components/card/Card.js +0 -9
  30. package/dist/components/card/CardBody.d.ts +0 -5
  31. package/dist/components/card/CardBody.js +0 -15
  32. package/dist/components/card/CardHeader.d.ts +0 -8
  33. package/dist/components/card/CardHeader.js +0 -31
  34. package/dist/components/card/CardHeader.stories.helper.js +0 -7
  35. package/dist/components/card/CardNotification.d.ts +0 -6
  36. package/dist/components/card/CardNotification.js +0 -26
  37. package/dist/components/chips/chip/Chip.d.ts +0 -17
  38. package/dist/components/chips/chip/Chip.js +0 -38
  39. package/dist/components/chips/chip-container/ChipContainer.d.ts +0 -5
  40. package/dist/components/chips/chip-container/ChipContainer.js +0 -12
  41. package/dist/components/icon-wrapper/IconWrapper.d.ts +0 -6
  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 -41
  45. package/dist/components/mobile-flyout/MobileFlyout.d.ts +0 -11
  46. package/dist/components/mobile-flyout/MobileFlyout.js +0 -88
  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 -17
  50. package/dist/components/mobile-flyout/mobile-flyout-item/MobileFlyoutItem.js +0 -36
  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 -35
  54. package/dist/components/modals/AlertModal.d.ts +0 -12
  55. package/dist/components/modals/AlertModal.js +0 -53
  56. package/dist/components/modals/ConfirmModal.d.ts +0 -11
  57. package/dist/components/modals/ConfirmModal.js +0 -46
  58. package/dist/components/modals/CustomModal.d.ts +0 -8
  59. package/dist/components/modals/CustomModal.js +0 -38
  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 -31
  63. package/dist/components/modals/ModalBase.d.ts +0 -9
  64. package/dist/components/modals/ModalBase.js +0 -124
  65. package/dist/components/modals/ModalFooter.d.ts +0 -2
  66. package/dist/components/modals/ModalFooter.js +0 -12
  67. package/dist/components/modals/Prompt.d.ts +0 -15
  68. package/dist/components/modals/Prompt.js +0 -58
  69. package/dist/components/modals/image-gallery/ImageGallery.css +0 -815
  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 -103
  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 -15
  91. package/dist/components/pagination/Pagination.js +0 -100
  92. package/dist/components/popovers/legend/Legend.d.ts +0 -9
  93. package/dist/components/popovers/legend/Legend.js +0 -21
  94. package/dist/components/popovers/popover/Popover.css +0 -56
  95. package/dist/components/popovers/popover/Popover.d.ts +0 -21
  96. package/dist/components/popovers/popover/Popover.js +0 -106
  97. package/dist/components/popovers/popover-menu/PopoverMenu.d.ts +0 -7
  98. package/dist/components/popovers/popover-menu/PopoverMenu.js +0 -37
  99. package/dist/components/popovers/popover-menu/PopoverMenuContext.d.ts +0 -3
  100. package/dist/components/popovers/popover-menu/PopoverMenuContext.js +0 -5
  101. package/dist/components/popovers/popover-menu-item/PopoverMenuItem.d.ts +0 -9
  102. package/dist/components/popovers/popover-menu-item/PopoverMenuItem.js +0 -28
  103. package/dist/components/popovers/tooltip/Tooltip.d.ts +0 -5
  104. package/dist/components/popovers/tooltip/Tooltip.js +0 -12
  105. package/dist/components/progress/Progress.d.ts +0 -7
  106. package/dist/components/progress/Progress.js +0 -26
  107. package/dist/components/search-input/ClearButton.d.ts +0 -2
  108. package/dist/components/search-input/ClearButton.js +0 -10
  109. package/dist/components/search-input/SearchInput.css +0 -13
  110. package/dist/components/search-input/SearchInput.d.ts +0 -14
  111. package/dist/components/search-input/SearchInput.js +0 -61
  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 -78
  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 -66
  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 -48
  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 -16
  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 -58
  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 -9
  143. package/dist/components/tab/tab-pane/TabPane.js +0 -18
  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 -5
  147. package/dist/components/table-header-cell/TableHeaderCell.js +0 -21
  148. package/dist/forms/checkbox/Checkbox.css +0 -134
  149. package/dist/forms/checkbox/Checkbox.d.ts +0 -15
  150. package/dist/forms/checkbox/Checkbox.js +0 -80
  151. package/dist/forms/combobox/ComboBox.css +0 -124
  152. package/dist/forms/combobox/ComboBox.d.ts +0 -28
  153. package/dist/forms/combobox/ComboBox.js +0 -170
  154. package/dist/forms/multi-select/MultiSelect.d.ts +0 -20
  155. package/dist/forms/multi-select/MultiSelect.js +0 -186
  156. package/dist/forms/multi-select/MultiSelect.module.js +0 -8
  157. package/dist/forms/multi-select/MultiSelect_module.css +0 -13
  158. package/dist/forms/radio/RadioButton.d.ts +0 -14
  159. package/dist/forms/radio/RadioButton.js +0 -61
  160. package/dist/forms/radio/RadioGroup.d.ts +0 -12
  161. package/dist/forms/radio/RadioGroup.js +0 -50
  162. package/dist/forms/radio/RadioGroupContext.d.ts +0 -12
  163. package/dist/forms/radio/RadioGroupContext.js +0 -3
  164. package/dist/forms/segment/Segment.d.ts +0 -13
  165. package/dist/forms/segment/Segment.js +0 -59
  166. package/dist/forms/segment/segment-control/SegmentControl.d.ts +0 -14
  167. package/dist/forms/segment/segment-control/SegmentControl.js +0 -57
  168. package/dist/forms/select/Select.d.ts +0 -25
  169. package/dist/forms/select/Select.js +0 -87
  170. package/dist/forms/slider/Slider.css +0 -50
  171. package/dist/forms/slider/Slider.d.ts +0 -17
  172. package/dist/forms/slider/Slider.js +0 -93
  173. package/dist/forms/switch/Switch.d.ts +0 -12
  174. package/dist/forms/switch/Switch.js +0 -42
  175. package/dist/forms/text-area/TextArea.css +0 -14
  176. package/dist/forms/text-area/TextArea.d.ts +0 -22
  177. package/dist/forms/text-area/TextArea.js +0 -99
  178. package/dist/forms/text-input/TextInput.d.ts +0 -24
  179. package/dist/forms/text-input/TextInput.js +0 -74
  180. package/dist/forms/time-picker/TimePicker.css +0 -10
  181. package/dist/forms/time-picker/TimePicker.d.ts +0 -24
  182. package/dist/forms/time-picker/TimePicker.js +0 -140
  183. package/dist/forms/time-picker/time-picker-dropdown/TimePickerDropdown.css +0 -4
  184. package/dist/forms/time-picker/time-picker-dropdown/TimePickerDropdown.d.ts +0 -19
  185. package/dist/forms/time-picker/time-picker-dropdown/TimePickerDropdown.js +0 -208
  186. package/dist/forms/time-picker/time-picker-dropdown/TimePickerInput.d.ts +0 -9
  187. package/dist/forms/time-picker/time-picker-dropdown/TimePickerInput.js +0 -14
  188. package/dist/index.d.ts +0 -59
  189. package/dist/index.js +0 -60
  190. package/dist/utils/index.d.ts +0 -1
  191. package/dist/utils/index.js +0 -7
  192. package/dist/utils/setRef.d.ts +0 -1
  193. package/dist/utils/setRef.js +0 -5
  194. package/dist/utils/types.d.ts +0 -36
  195. package/dist/utils/types.js +0 -0
  196. package/dist/utils/useControlled.d.ts +0 -7
  197. package/dist/utils/useControlled.js +0 -20
  198. package/dist/utils/useForkRef.d.ts +0 -2
  199. package/dist/utils/useForkRef.js +0 -15
  200. package/dist/utils/useId.d.ts +0 -1
  201. package/dist/utils/useId.js +0 -20
  202. package/dist/utils/useOnClickOutside.d.ts +0 -2
  203. package/dist/utils/useOnClickOutside.js +0 -20
@@ -1,87 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import classnames from "classnames";
3
- import react from "react";
4
- function Breadcrumb({ locations, onClick, children, className }) {
5
- const containerRef = react.useRef(null);
6
- const measureRef = react.useRef(null);
7
- const [isMobile, setIsMobile] = react.useState(false);
8
- function isValidHtmlChildElement(child) {
9
- return /*#__PURE__*/ react.isValidElement(child);
10
- }
11
- const childrenList = react.Children.toArray(children).filter(isValidHtmlChildElement);
12
- const listItems = locations ? locations.map((location, index)=>{
13
- const isCurrent = index === locations.length - 1;
14
- return /*#__PURE__*/ jsx("li", {
15
- children: /*#__PURE__*/ jsx("a", {
16
- href: location.url,
17
- onClick: (e)=>onClick ? onClick(e) : void 0,
18
- "aria-current": isCurrent ? 'page' : void 0,
19
- children: location.label
20
- })
21
- }, location.url);
22
- }) : childrenList.map((child, index)=>{
23
- const isCurrent = index === childrenList.length - 1;
24
- const content = isCurrent ? /*#__PURE__*/ react.cloneElement(child, {
25
- 'aria-current': child.props['aria-current'] ?? 'page'
26
- }) : child;
27
- return /*#__PURE__*/ jsx("li", {
28
- children: content
29
- }, child.key ?? index);
30
- });
31
- const measure = react.useCallback(()=>{
32
- const container = containerRef.current;
33
- const measureElement = measureRef.current;
34
- if (!container || !measureElement) return;
35
- const availableWidth = container.clientWidth;
36
- const contentWidth = measureElement.scrollWidth;
37
- const nextIsMobile = contentWidth > availableWidth;
38
- setIsMobile((previous)=>previous === nextIsMobile ? previous : nextIsMobile);
39
- }, []);
40
- react.useEffect(()=>{
41
- measure();
42
- });
43
- react.useEffect(()=>{
44
- const container = containerRef.current;
45
- const measureElement = measureRef.current;
46
- if (!container || !measureElement) return;
47
- if ('undefined' == typeof ResizeObserver) {
48
- window.addEventListener('resize', measure);
49
- return ()=>window.removeEventListener('resize', measure);
50
- }
51
- const observer = new ResizeObserver(()=>measure());
52
- observer.observe(container);
53
- observer.observe(measureElement);
54
- return ()=>observer.disconnect();
55
- }, [
56
- measure
57
- ]);
58
- return /*#__PURE__*/ jsxs("div", {
59
- children: [
60
- /*#__PURE__*/ jsx("nav", {
61
- className: classnames('fwe-breadcrumb'),
62
- ref: measureRef,
63
- style: {
64
- position: 'absolute',
65
- visibility: 'hidden',
66
- pointerEvents: 'none',
67
- whiteSpace: 'nowrap',
68
- height: 0,
69
- overflow: 'hidden'
70
- },
71
- "aria-hidden": "true",
72
- children: /*#__PURE__*/ jsx("ol", {
73
- children: listItems
74
- })
75
- }),
76
- /*#__PURE__*/ jsx("nav", {
77
- className: classnames('fwe-breadcrumb', isMobile && 'fwe-breadcrumb--mobile', className),
78
- ref: containerRef,
79
- "aria-label": "Breadcrumb",
80
- children: /*#__PURE__*/ jsx("ol", {
81
- children: listItems
82
- })
83
- })
84
- ]
85
- });
86
- }
87
- export { Breadcrumb };
@@ -1,11 +0,0 @@
1
- import type { ComponentPropsWithoutRef } from 'react';
2
- export interface ButtonProps extends ComponentPropsWithoutRef<'button'> {
3
- icon?: React.ReactNode;
4
- disabled?: boolean;
5
- primary?: boolean;
6
- tertiary?: boolean;
7
- iconOnly?: boolean;
8
- large?: boolean;
9
- floating?: boolean;
10
- }
11
- export declare const Button: (props: ButtonProps & import("react").RefAttributes<HTMLButtonElement>) => React.ReactElement | null;
@@ -1,36 +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
- export { Button };
@@ -1,4 +0,0 @@
1
- import type { ClassNamePropsWithChildren } from '../../utils/types';
2
- export interface CardProps extends ClassNamePropsWithChildren {
3
- }
4
- export declare function Card({ children, className }: CardProps): JSX.Element;
@@ -1,9 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import classnames from "classnames";
3
- function Card({ children, className }) {
4
- return /*#__PURE__*/ jsx("div", {
5
- className: classnames('fwe-card', className),
6
- children: children
7
- });
8
- }
9
- export { Card };
@@ -1,5 +0,0 @@
1
- import type { ClassNamePropsWithChildren } from '../../utils/types';
2
- export interface CardBodyProps extends ClassNamePropsWithChildren {
3
- text: string;
4
- }
5
- export declare function CardBody({ children, text, className }: CardBodyProps): import("react/jsx-runtime").JSX.Element;
@@ -1,15 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import classnames from "classnames";
3
- function CardBody({ children, text, className }) {
4
- return /*#__PURE__*/ jsxs("div", {
5
- className: classnames('fwe-card-body', className),
6
- children: [
7
- /*#__PURE__*/ jsx("div", {
8
- className: "fwe-card-text",
9
- children: text
10
- }),
11
- children
12
- ]
13
- });
14
- }
15
- export { CardBody };
@@ -1,8 +0,0 @@
1
- import type { ClassNameProps, Image } from '../../utils/types';
2
- export interface CardHeaderProps extends ClassNameProps {
3
- title: string;
4
- subtitle?: string;
5
- action?: React.ReactNode;
6
- image?: Image;
7
- }
8
- export declare function CardHeader({ title, subtitle, action, image, className, }: CardHeaderProps): import("react/jsx-runtime").JSX.Element;
@@ -1,31 +0,0 @@
1
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
- import classnames from "classnames";
3
- function CardHeader({ title, subtitle, action, image, className }) {
4
- return /*#__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
- children: [
14
- /*#__PURE__*/ jsxs("div", {
15
- className: "fwe-card-title",
16
- children: [
17
- /*#__PURE__*/ jsx("h5", {
18
- children: title
19
- }),
20
- subtitle && /*#__PURE__*/ jsx("p", {
21
- children: subtitle
22
- })
23
- ]
24
- }),
25
- action
26
- ]
27
- })
28
- ]
29
- });
30
- }
31
- 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,6 +0,0 @@
1
- import type { ClassNameProps } from '../../utils/types';
2
- export interface CardNotificationProps extends ClassNameProps {
3
- title: string;
4
- message?: string;
5
- }
6
- export declare function CardNotification({ className, title, message, }: CardNotificationProps): import("react/jsx-runtime").JSX.Element;
@@ -1,26 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { IconWarning } from "@festo-ui/react-icons";
3
- import classnames from "classnames";
4
- function CardNotification({ className, title, message }) {
5
- const classes = classnames('fwe-card-notification', className);
6
- return /*#__PURE__*/ jsxs("div", {
7
- className: classes,
8
- children: [
9
- /*#__PURE__*/ jsx(IconWarning, {
10
- size: 24
11
- }),
12
- /*#__PURE__*/ jsxs("div", {
13
- className: "fwe-card-title",
14
- children: [
15
- /*#__PURE__*/ jsx("h6", {
16
- children: title
17
- }),
18
- message && /*#__PURE__*/ jsx("p", {
19
- children: message
20
- })
21
- ]
22
- })
23
- ]
24
- });
25
- }
26
- export { CardNotification };
@@ -1,17 +0,0 @@
1
- import type React from 'react';
2
- import type { ClassNamePropsWithChildren } from '../../../utils/types';
3
- export declare enum ChipType {
4
- Choice = 0,
5
- Category = 1,
6
- Filter = 2,
7
- Readonly = 3
8
- }
9
- export interface ChipProps extends ClassNamePropsWithChildren {
10
- readonly type?: ChipType;
11
- readonly icon?: React.ReactNode;
12
- readonly selected?: boolean;
13
- readonly disabled?: boolean;
14
- readonly large?: boolean;
15
- readonly onClick?: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
16
- }
17
- export declare function Chip({ type, selected, disabled, large, icon, children, onClick, className, }: ChipProps): import("react/jsx-runtime").JSX.Element;
@@ -1,38 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import classnames from "classnames";
3
- import { IconWrapper } from "../../icon-wrapper/IconWrapper.js";
4
- var Chip_ChipType = /*#__PURE__*/ function(ChipType) {
5
- ChipType[ChipType["Choice"] = 0] = "Choice";
6
- ChipType[ChipType["Category"] = 1] = "Category";
7
- ChipType[ChipType["Filter"] = 2] = "Filter";
8
- ChipType[ChipType["Readonly"] = 3] = "Readonly";
9
- return ChipType;
10
- }({});
11
- function Chip({ type = 0, selected = false, disabled = false, large = false, icon, children, onClick, className }) {
12
- const classes = classnames('fr-chip', 'fwe-chip', {
13
- 'fwe-selected': selected
14
- }, {
15
- 'fwe-disabled': disabled
16
- }, {
17
- 'fwe-chip-lg': large
18
- }, {
19
- 'fwe-category': 1 === type
20
- }, {
21
- 'fwe-filter': 2 === type
22
- }, {
23
- 'fwe-readonly': 3 === type
24
- }, className);
25
- return /*#__PURE__*/ jsxs("button", {
26
- type: "button",
27
- className: classes,
28
- onClick: onClick,
29
- disabled: disabled,
30
- children: [
31
- /*#__PURE__*/ jsx(IconWrapper, {
32
- icon: icon
33
- }),
34
- children
35
- ]
36
- });
37
- }
38
- export { Chip, Chip_ChipType as ChipType };
@@ -1,5 +0,0 @@
1
- import type { ClassNamePropsWithChildren } from '../../../utils/types';
2
- export interface ChipContainerProps extends ClassNamePropsWithChildren {
3
- readonly large?: boolean;
4
- }
5
- export declare function ChipContainer({ large, children, className, }: ChipContainerProps): import("react/jsx-runtime").JSX.Element;
@@ -1,12 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import classnames from "classnames";
3
- function ChipContainer({ large = false, children, className }) {
4
- const classes = classnames('fwe-chip-container', {
5
- 'fwe-chip-container-lg': large
6
- }, className);
7
- return /*#__PURE__*/ jsx("div", {
8
- className: classes,
9
- children: children
10
- });
11
- }
12
- export { ChipContainer };
@@ -1,6 +0,0 @@
1
- /**
2
- * Internal wrapper for icons.
3
- */
4
- export declare function IconWrapper({ icon }: {
5
- readonly icon: React.ReactNode;
6
- }): 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 ComponentPropsWithRef } from 'react';
2
- export interface LoadingIndicatorProps extends ComponentPropsWithRef<'div'> {
3
- readonly size: 'large' | 'medium' | 'small';
4
- }
5
- export declare const LoadingIndicator: (props: LoadingIndicatorProps & import("react").RefAttributes<HTMLDivElement>) => React.ReactElement | null;
@@ -1,41 +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
- 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,88 +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
- 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,17 +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
- }
10
- export type MobileFlyoutItemProps<C extends React.ElementType> = PolymorphicComponentPropWithRef<C, MobileFlyoutItemBaseProps>;
11
- export declare const MobileFlyoutItem: <C extends React.ElementType = "a">(props: MobileFlyoutItemBaseProps & {
12
- component?: C | undefined;
13
- } & {
14
- children?: import("react").ReactNode | undefined;
15
- } & Omit<import("react").PropsWithoutRef<import("react").ComponentProps<C>>, "component" | keyof MobileFlyoutItemBaseProps> & {
16
- ref?: PolymorphicRef<C> | undefined;
17
- } & import("react").RefAttributes<unknown>) => React.ReactElement | null;
@@ -1,36 +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, ...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: "fwe-mobile-flyout-item fwe-bb",
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
- 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,35 +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, ...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
- className: classnames('fwe-mobile-flyout-page', {
15
- 'fwe-opened': innerVisible
16
- }),
17
- ref: ref,
18
- ...props,
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
- 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 function AlertModal({ title, subtitle, alertType, strong, cancel, ok, onCancel, onOk, className, body, ...props }: AlertModalProps): import("react/jsx-runtime").JSX.Element;