@rolster/react-components 19.7.3 → 19.7.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 (38) hide show
  1. package/LICENSE +21 -21
  2. package/dist/cjs/index.cjs +120 -41
  3. package/dist/cjs/index.cjs.map +1 -1
  4. package/dist/es/index.mjs +121 -43
  5. package/dist/es/index.mjs.map +1 -1
  6. package/dist/esm/components/molecules/Tabs/Tabs.d.ts +4 -1
  7. package/dist/esm/components/molecules/Tabs/Tabs.js +25 -11
  8. package/dist/esm/components/molecules/Tabs/Tabs.js.map +1 -1
  9. package/dist/esm/components/organisms/Confirmation/Confirmation.d.ts +2 -1
  10. package/dist/esm/components/organisms/Confirmation/Confirmation.js +13 -4
  11. package/dist/esm/components/organisms/Confirmation/Confirmation.js.map +1 -1
  12. package/dist/esm/components/organisms/FieldAutocomplete/FieldAutocompleteController.js +16 -3
  13. package/dist/esm/components/organisms/FieldAutocomplete/FieldAutocompleteController.js.map +1 -1
  14. package/dist/esm/components/organisms/FieldList/FieldListController.js +13 -3
  15. package/dist/esm/components/organisms/FieldList/FieldListController.js.map +1 -1
  16. package/dist/esm/components/organisms/FieldSelect/FieldSelectController.js +13 -3
  17. package/dist/esm/components/organisms/FieldSelect/FieldSelectController.js.map +1 -1
  18. package/dist/esm/components/organisms/Notifications/Notifications.d.ts +2 -1
  19. package/dist/esm/components/organisms/Notifications/Notifications.js +11 -5
  20. package/dist/esm/components/organisms/Notifications/Notifications.js.map +1 -1
  21. package/dist/esm/components/organisms/Snackbar/Snackbar.d.ts +2 -1
  22. package/dist/esm/components/organisms/Snackbar/Snackbar.js +12 -6
  23. package/dist/esm/components/organisms/Snackbar/Snackbar.js.map +1 -1
  24. package/dist/esm/context.js +3 -3
  25. package/dist/esm/context.js.map +1 -1
  26. package/dist/esm/controllers/DropdownController.js +2 -8
  27. package/dist/esm/controllers/DropdownController.js.map +1 -1
  28. package/dist/esm/controllers/ListController.js +3 -3
  29. package/dist/esm/controllers/ListController.js.map +1 -1
  30. package/dist/esm/controllers/PortalController.js +2 -2
  31. package/dist/esm/controllers/PortalController.js.map +1 -1
  32. package/dist/esm/controllers/TabsController.d.ts +18 -0
  33. package/dist/esm/controllers/TabsController.js +20 -0
  34. package/dist/esm/controllers/TabsController.js.map +1 -0
  35. package/dist/esm/index.d.ts +1 -0
  36. package/dist/esm/index.js +1 -0
  37. package/dist/esm/index.js.map +1 -1
  38. package/package.json +83 -83
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2022 Rolster Technology
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Rolster Technology
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -2300,32 +2300,46 @@ function RlsSliderComponent({ children, className, disabled, formControl, identi
2300
2300
  }
2301
2301
  const RlsSlider = require$$0.memo(RlsSliderComponent);
2302
2302
 
2303
- function RlsTab({ onSelect, tab, value }) {
2303
+ function RlsTab({ disabled, onSelect, tab, value }) {
2304
2304
  const className = renderClassStatus('rls-tabs__children', {
2305
2305
  active: tab.value === value,
2306
- disabled: tab.disabled
2306
+ disabled: disabled || tab.disabled
2307
2307
  });
2308
2308
  const onClick = require$$0.useCallback(() => {
2309
- if (!tab.disabled) {
2309
+ if (!disabled && !tab.disabled) {
2310
2310
  onSelect(tab.value);
2311
2311
  }
2312
- }, [tab.disabled]);
2312
+ }, [disabled, tab.disabled, onSelect]);
2313
2313
  return (jsxRuntimeExports.jsx("div", { className: className, onClick: onClick, children: jsxRuntimeExports.jsx("span", { children: tab.label }) }));
2314
2314
  }
2315
- function RlsTabsComponent({ tabs, onValue, rlsTheme }) {
2316
- const [value, setValue] = require$$0.useState();
2315
+ function RlsTabsComponent({ tabs, formControl, onValue, value, rlsTheme }) {
2316
+ const [valueInternal, setValueInternal] = require$$0.useState();
2317
+ const valueSelected = require$$0.useMemo(() => {
2318
+ return formControl ? formControl.value : valueInternal;
2319
+ }, [formControl?.value, valueInternal]);
2317
2320
  const onSelect = require$$0.useCallback((value) => {
2318
- setValue(value);
2321
+ if (formControl) {
2322
+ formControl?.setValue(value);
2323
+ }
2324
+ else {
2325
+ setValueInternal(value);
2326
+ }
2319
2327
  onValue?.(value);
2320
- }, [onValue]);
2328
+ }, [formControl, onValue]);
2321
2329
  require$$0.useEffect(() => {
2330
+ if (formControl?.value !== undefined) {
2331
+ return setValueInternal(formControl.value);
2332
+ }
2333
+ if (value !== undefined) {
2334
+ return setValueInternal(value);
2335
+ }
2322
2336
  const initial = tabs.find((tab) => tab.defaultActive) ?? tabs[0];
2323
2337
  if (initial) {
2324
2338
  onSelect(initial.value);
2325
2339
  }
2326
- }, []);
2340
+ }, [value, formControl?.value]);
2327
2341
  return (jsxRuntimeExports.jsx("div", { className: "rls-tabs", "rls-theme": rlsTheme, children: tabs.map((tab, index) => {
2328
- return (jsxRuntimeExports.jsx(RlsTab, { tab: tab, value: value, onSelect: onSelect }, index));
2342
+ return (jsxRuntimeExports.jsx(RlsTab, { tab: tab, disabled: formControl?.disabled, value: valueSelected, onSelect: onSelect }, index));
2329
2343
  }) }));
2330
2344
  }
2331
2345
  const RlsTabs = require$$0.memo(RlsTabsComponent);
@@ -2366,10 +2380,19 @@ function RlsConfirmationComponent({ approved, className, content, reject, rlsThe
2366
2380
  return (jsxRuntimeExports.jsxs("div", { className: classConfirmation, "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsxs("div", { className: "rls-confirmation__component", children: [jsxRuntimeExports.jsxs("div", { className: "rls-confirmation__header", children: [title && jsxRuntimeExports.jsx("div", { className: "rls-confirmation__title", children: title }), subtitle && (jsxRuntimeExports.jsx("div", { className: "rls-confirmation__subtitle", children: subtitle }))] }), jsxRuntimeExports.jsx("div", { className: "rls-confirmation__body", children: content && (jsxRuntimeExports.jsx("div", { className: "rls-confirmation__content", children: content })) }), (approved || reject) && (jsxRuntimeExports.jsx("div", { className: "rls-confirmation__footer", children: jsxRuntimeExports.jsxs("div", { className: "rls-confirmation__actions", children: [approved && (jsxRuntimeExports.jsx(RlsButton, { identifier: approved.identifier, type: approved.type, onClick: approved.onClick, disabled: approved.disabled, rlsTheme: approved.rlsTheme, children: approved.label })), reject && (jsxRuntimeExports.jsx(RlsButton, { identifier: reject.identifier, type: reject.type, onClick: reject.onClick, disabled: reject.disabled, rlsTheme: reject.rlsTheme, children: reject.label }))] }) }))] }), jsxRuntimeExports.jsx("div", { className: "rls-confirmation__backdrop" })] }));
2367
2381
  }
2368
2382
  const RlsConfirmation = require$$0.memo(RlsConfirmationComponent);
2383
+ const RlsConfirmationBase = RlsConfirmation;
2369
2384
  function useConfirmation() {
2370
2385
  const [config, setConfig] = require$$0.useState({});
2371
2386
  const [visible, setVisible] = require$$0.useState(false);
2372
- const component = ReactDOM.createPortal(jsxRuntimeExports.jsx(RlsConfirmation, { ...config, visible: visible }), document.body);
2387
+ const configRef = require$$0.useRef(config);
2388
+ configRef.current = config;
2389
+ const visibleRef = require$$0.useRef(visible);
2390
+ visibleRef.current = visible;
2391
+ const RlsConfirmation = require$$0.useMemo(() => {
2392
+ return function RlsConfirmation(props) {
2393
+ return ReactDOM.createPortal(jsxRuntimeExports.jsx(RlsConfirmationBase, { ...props, ...configRef.current, visible: visibleRef.current }), document.body);
2394
+ };
2395
+ }, []);
2373
2396
  const confirmation = require$$0.useCallback((options) => {
2374
2397
  return new Promise((resolve) => {
2375
2398
  setConfig({
@@ -2403,8 +2426,8 @@ function useConfirmation() {
2403
2426
  });
2404
2427
  }, []);
2405
2428
  return {
2406
- RlsConfirmation: component,
2407
- confirmation
2429
+ confirmation,
2430
+ RlsConfirmation
2408
2431
  };
2409
2432
  }
2410
2433
 
@@ -2542,7 +2565,7 @@ function useListController({ suggestions, automatic, formControl, reference }) {
2542
2565
  const refInput = require$$0.useRef(null);
2543
2566
  const listIsOpen = require$$0.useRef(false);
2544
2567
  const stableSuggestions = useStableSuggestions(suggestions);
2545
- const collection = require$$0.useMemo(() => new components.ListCollection(stableSuggestions, reference), [stableSuggestions]);
2568
+ const collection = require$$0.useMemo(() => new components.ListCollection(stableSuggestions, reference), [stableSuggestions, reference]);
2546
2569
  const [state, refreshState] = require$$0.useState({
2547
2570
  focused: false,
2548
2571
  higher: false,
@@ -2651,7 +2674,7 @@ function useListController({ suggestions, automatic, formControl, reference }) {
2651
2674
  position: position.current
2652
2675
  });
2653
2676
  }, [state.higher]);
2654
- return {
2677
+ return require$$0.useMemo(() => ({
2655
2678
  ...state,
2656
2679
  navigationElement,
2657
2680
  navigationInput,
@@ -2660,7 +2683,7 @@ function useListController({ suggestions, automatic, formControl, reference }) {
2660
2683
  refList,
2661
2684
  setFormValue,
2662
2685
  setState
2663
- };
2686
+ }), [state, navigationElement, navigationInput, setFormValue, setState]);
2664
2687
  }
2665
2688
 
2666
2689
  const DURATION_ANIMATION$2 = 240;
@@ -2790,7 +2813,7 @@ function useFieldAutocomplete(props) {
2790
2813
  }
2791
2814
  };
2792
2815
  }, [onChange, controller.navigationElement]);
2793
- return {
2816
+ return require$$0.useMemo(() => ({
2794
2817
  ...controller,
2795
2818
  coincidences,
2796
2819
  onBlurInput,
@@ -2803,7 +2826,20 @@ function useFieldAutocomplete(props) {
2803
2826
  onKeydownInput,
2804
2827
  pattern,
2805
2828
  setPattern
2806
- };
2829
+ }), [
2830
+ controller,
2831
+ coincidences,
2832
+ onBlurInput,
2833
+ onClickAction,
2834
+ onClickBackdrop,
2835
+ onClickControl,
2836
+ onClickElement,
2837
+ onFocusInput,
2838
+ onKeydownElement,
2839
+ onKeydownInput,
2840
+ pattern,
2841
+ setPattern
2842
+ ]);
2807
2843
  }
2808
2844
 
2809
2845
  function RlsFieldAutocompleteTemplateComponent(props) {
@@ -3813,7 +3849,7 @@ function useFieldList(props) {
3813
3849
  }
3814
3850
  };
3815
3851
  }, [toggleElement]);
3816
- return {
3852
+ return require$$0.useMemo(() => ({
3817
3853
  ...state,
3818
3854
  selected,
3819
3855
  refContent,
@@ -3825,7 +3861,17 @@ function useFieldList(props) {
3825
3861
  onClickInput,
3826
3862
  onKeydownElement,
3827
3863
  onRemoveElement
3828
- };
3864
+ }), [
3865
+ state,
3866
+ selected,
3867
+ isSelected,
3868
+ onClickAction,
3869
+ onClickBackdrop,
3870
+ onClickElement,
3871
+ onClickInput,
3872
+ onKeydownElement,
3873
+ onRemoveElement
3874
+ ]);
3829
3875
  }
3830
3876
 
3831
3877
  function RlsFieldListInner({ render, suggestions, action, children, formControl, fieldList, msgErrorDisabled, placeholder, rlsTheme, ...props }) {
@@ -3948,7 +3994,7 @@ function useFieldSelect(props) {
3948
3994
  }
3949
3995
  };
3950
3996
  }, [onChange, controller.navigationElement]);
3951
- return {
3997
+ return require$$0.useMemo(() => ({
3952
3998
  ...controller,
3953
3999
  onBlurInput,
3954
4000
  onClickAction,
@@ -3958,7 +4004,17 @@ function useFieldSelect(props) {
3958
4004
  onFocusInput,
3959
4005
  onKeydownElement,
3960
4006
  onKeydownInput
3961
- };
4007
+ }), [
4008
+ controller,
4009
+ onBlurInput,
4010
+ onClickAction,
4011
+ onClickBackdrop,
4012
+ onClickInput,
4013
+ onClickElement,
4014
+ onFocusInput,
4015
+ onKeydownElement,
4016
+ onKeydownInput
4017
+ ]);
3962
4018
  }
3963
4019
 
3964
4020
  function RlsFieldSelectTemplateComponent(props) {
@@ -4455,6 +4511,8 @@ function RlsNotification({ content, icon, onClose, rlsTheme, title, visible }) {
4455
4511
  function useNotifications() {
4456
4512
  const [notifications, setNotifications] = require$$0.useState([]);
4457
4513
  const timersRef = require$$0.useRef(new Map());
4514
+ const notificationsRef = require$$0.useRef(notifications);
4515
+ notificationsRef.current = notifications;
4458
4516
  require$$0.useEffect(() => {
4459
4517
  const timers = timersRef.current;
4460
4518
  return () => {
@@ -4475,6 +4533,14 @@ function useNotifications() {
4475
4533
  setNotifications((notifications) => notifications.filter((notification) => notification.id !== id));
4476
4534
  }, DURATION_ANIMATION$1);
4477
4535
  }, []);
4536
+ const RlsNotifications = require$$0.useMemo(() => {
4537
+ return function RlsNotifications(props) {
4538
+ const className = renderClassStatus('rls-notifications', {
4539
+ visible: notificationsRef.current.length > 0
4540
+ });
4541
+ return ReactDOM.createPortal(jsxRuntimeExports.jsx("div", { className: className, ...props, children: notificationsRef.current.map((notification) => (jsxRuntimeExports.jsx(RlsNotification, { ...notification.config, visible: notification.visible, onClose: () => remove(notification.id) }, notification.id))) }), document.body);
4542
+ };
4543
+ }, [remove]);
4478
4544
  const notify = require$$0.useCallback((config) => {
4479
4545
  const id = generateId();
4480
4546
  const duration = config.duration ?? DURATION_DEFAULT;
@@ -4494,10 +4560,6 @@ function useNotifications() {
4494
4560
  }, duration);
4495
4561
  timersRef.current.set(id, timer);
4496
4562
  }, [remove]);
4497
- const className = renderClassStatus('rls-notifications', {
4498
- visible: notifications.length > 0
4499
- });
4500
- const RlsNotifications = ReactDOM.createPortal(jsxRuntimeExports.jsx("div", { className: className, children: notifications.map((notification) => (jsxRuntimeExports.jsx(RlsNotification, { ...notification.config, visible: notification.visible, onClose: () => remove(notification.id) }, notification.id))) }), document.body);
4501
4563
  return {
4502
4564
  RlsNotifications,
4503
4565
  notify
@@ -4524,6 +4586,7 @@ function RlsSnackbarComponent({ content, onClose, icon, rlsTheme, title, visible
4524
4586
  return (jsxRuntimeExports.jsxs("div", { className: className, "rls-theme": rlsTheme, children: [icon && (jsxRuntimeExports.jsx("div", { className: "rls-snackbar__avatar", children: jsxRuntimeExports.jsx(RlsIcon, { value: icon }) })), jsxRuntimeExports.jsxs("div", { className: "rls-snackbar__component", children: [jsxRuntimeExports.jsxs("div", { className: "rls-snackbar__header", children: [jsxRuntimeExports.jsx("div", { className: "rls-snackbar__title", children: title }), jsxRuntimeExports.jsx("button", { onClick: onClose, children: jsxRuntimeExports.jsx(RlsIcon, { value: "close" }) })] }), jsxRuntimeExports.jsx("div", { className: "rls-snackbar__content", children: content })] })] }));
4525
4587
  }
4526
4588
  const RlsSnackbar = require$$0.memo(RlsSnackbarComponent);
4589
+ const RlsSnackbarNode = RlsSnackbar;
4527
4590
  function useSnackbar() {
4528
4591
  const timeoutId = require$$0.useRef(undefined);
4529
4592
  const duration = require$$0.useRef(4000);
@@ -4531,6 +4594,8 @@ function useSnackbar() {
4531
4594
  config: {},
4532
4595
  visible: false
4533
4596
  });
4597
+ const stateRef = require$$0.useRef(state);
4598
+ stateRef.current = state;
4534
4599
  const onClose = require$$0.useCallback(() => {
4535
4600
  if (timeoutId.current) {
4536
4601
  clearTimeout(timeoutId.current);
@@ -4538,7 +4603,13 @@ function useSnackbar() {
4538
4603
  timeoutId.current = undefined;
4539
4604
  setState((state) => ({ ...state, visible: false }));
4540
4605
  }, []);
4541
- const rlsSnackbar = (jsxRuntimeExports.jsx(RlsSnackbar, { ...state.config, visible: state.visible, onClose: onClose }));
4606
+ const onCloseRef = require$$0.useRef(onClose);
4607
+ onCloseRef.current = onClose;
4608
+ const RlsSnackbar = require$$0.useMemo(() => {
4609
+ return function RlsSnackbar(props) {
4610
+ return (jsxRuntimeExports.jsx(RlsSnackbarNode, { ...props, ...stateRef.current.config, visible: stateRef.current.visible, onClose: onCloseRef.current }));
4611
+ };
4612
+ }, []);
4542
4613
  require$$0.useEffect(() => {
4543
4614
  if (state.visible) {
4544
4615
  timeoutId.current = setTimeout(() => {
@@ -4562,10 +4633,7 @@ function useSnackbar() {
4562
4633
  visible: !state.visible
4563
4634
  }));
4564
4635
  }, []);
4565
- return {
4566
- RlsSnackbar: rlsSnackbar,
4567
- snackbar
4568
- };
4636
+ return { RlsSnackbar, snackbar };
4569
4637
  }
4570
4638
 
4571
4639
  const RlsContext = require$$0.createContext(null);
@@ -4578,8 +4646,8 @@ function useRlsContext() {
4578
4646
  }
4579
4647
  function RlsApplication({ children }) {
4580
4648
  const { RlsConfirmation, confirmation } = useConfirmation();
4581
- const { RlsNotifications, notify } = useNotifications();
4582
4649
  const { RlsSnackbar, snackbar } = useSnackbar();
4650
+ const { RlsNotifications, notify } = useNotifications();
4583
4651
  const [navbarInApp, setNavbarInApp] = require$$0.useState(false);
4584
4652
  const [navbarIsCondense, setNavbarIsCondense] = require$$0.useState(false);
4585
4653
  const [appIsMobile, setIsMobile] = require$$0.useState(false);
@@ -4596,7 +4664,7 @@ function RlsApplication({ children }) {
4596
4664
  setNavbarIsCondense,
4597
4665
  snackbar
4598
4666
  }), [confirmation, notify, snackbar]);
4599
- return (jsxRuntimeExports.jsxs(RlsContext, { value: state, children: [jsxRuntimeExports.jsxs("div", { className: className, children: [children, RlsSnackbar] }), RlsNotifications, RlsConfirmation] }));
4667
+ return (jsxRuntimeExports.jsxs(RlsContext, { value: state, children: [jsxRuntimeExports.jsxs("div", { className: className, children: [children, jsxRuntimeExports.jsx(RlsSnackbar, {})] }), jsxRuntimeExports.jsx(RlsConfirmation, {}), jsxRuntimeExports.jsx(RlsNotifications, {})] }));
4600
4668
  }
4601
4669
 
4602
4670
  const DEFAULT_DESIGN_SYSTEM = 'bordered';
@@ -4702,13 +4770,7 @@ function useDropdownController(effect = '0% 0%') {
4702
4770
  const close = require$$0.useCallback(() => {
4703
4771
  setVisible(false);
4704
4772
  }, []);
4705
- return {
4706
- close,
4707
- component,
4708
- open,
4709
- openWithEvent,
4710
- visible
4711
- };
4773
+ return require$$0.useMemo(() => ({ close, component, open, openWithEvent, visible }), [close, open, openWithEvent, visible]);
4712
4774
  }
4713
4775
 
4714
4776
  function usePortalController() {
@@ -4719,7 +4781,23 @@ function usePortalController() {
4719
4781
  const close = require$$0.useCallback(() => {
4720
4782
  setVisible(false);
4721
4783
  }, []);
4722
- return { close, open, visible };
4784
+ return require$$0.useMemo(() => ({ close, open, visible }), [close, open, visible]);
4785
+ }
4786
+
4787
+ function useTabsController(options) {
4788
+ const formControl = reactForms.useFormControl(options.value);
4789
+ const tabsRef = require$$0.useRef(options.tabs);
4790
+ tabsRef.current = options.tabs;
4791
+ const onValueRef = require$$0.useRef(options.onValue);
4792
+ onValueRef.current = options.onValue;
4793
+ const formControlRef = require$$0.useRef(formControl);
4794
+ formControlRef.current = formControl;
4795
+ const Tabs = require$$0.useMemo(() => {
4796
+ return function Tabs(props) {
4797
+ return (jsxRuntimeExports.jsx(RlsTabs, { ...props, tabs: tabsRef.current, formControl: formControlRef.current, onValue: onValueRef.current }));
4798
+ };
4799
+ }, []);
4800
+ return require$$0.useMemo(() => ({ Tabs, formControl }), [Tabs, formControl]);
4723
4801
  }
4724
4802
 
4725
4803
  const APP_THEME_ATTRIBUTE = 'app-theme';
@@ -4890,4 +4968,5 @@ exports.useRelocationOnComponent = useRelocationOnComponent;
4890
4968
  exports.useResize = useResize;
4891
4969
  exports.useRlsContext = useRlsContext;
4892
4970
  exports.useSnackbar = useSnackbar;
4971
+ exports.useTabsController = useTabsController;
4893
4972
  //# sourceMappingURL=index.cjs.map