@redis-ui/components 41.4.1 → 41.11.0

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 (167) hide show
  1. package/README.md +330 -0
  2. package/dist/Button/TextButton/TextButton.cjs +2 -0
  3. package/dist/Button/TextButton/TextButton.js +2 -0
  4. package/dist/Button/TextButton/TextButton.style.cjs +9 -3
  5. package/dist/Button/TextButton/TextButton.style.d.ts +1 -1
  6. package/dist/Button/TextButton/TextButton.style.js +9 -3
  7. package/dist/Button/TextButton/TextButton.types.d.ts +2 -0
  8. package/dist/Button/ToggleButton/ToggleButton.style.cjs +1 -1
  9. package/dist/Button/ToggleButton/ToggleButton.style.js +1 -1
  10. package/dist/ChipList/Components/ExtraItem.cjs +8 -7
  11. package/dist/ChipList/Components/ExtraItem.js +8 -7
  12. package/dist/Filters/components/MultiSelectFilter/MultiSelectFilter.cjs +2 -2
  13. package/dist/Filters/components/MultiSelectFilter/MultiSelectFilter.js +2 -2
  14. package/dist/Filters/components/MultiTreeSelectFilter/MultiTreeSelectFilter.cjs +2 -2
  15. package/dist/Filters/components/MultiTreeSelectFilter/MultiTreeSelectFilter.js +2 -2
  16. package/dist/FormField/FormField.context.cjs +4 -0
  17. package/dist/FormField/FormField.context.d.ts +3 -0
  18. package/dist/FormField/FormField.context.js +4 -0
  19. package/dist/FormField/components/Nested/Nested.cjs +4 -2
  20. package/dist/FormField/components/Nested/Nested.js +5 -3
  21. package/dist/Helpers/css.utils.cjs +4 -0
  22. package/dist/Helpers/css.utils.js +4 -0
  23. package/dist/Inputs/TextArea/components/TextAreaTag/TextAreaTag.cjs +6 -2
  24. package/dist/Inputs/TextArea/components/TextAreaTag/TextAreaTag.js +7 -3
  25. package/dist/Inputs/components/Compose/CommonCompose.cjs +16 -14
  26. package/dist/Inputs/components/Compose/CommonCompose.js +17 -15
  27. package/dist/Inputs/components/Context/InputValue.context.cjs +13 -9
  28. package/dist/Inputs/components/Context/InputValue.context.d.ts +270 -4
  29. package/dist/Inputs/components/Context/InputValue.context.js +13 -9
  30. package/dist/Inputs/components/Context/InputValueProvider.cjs +7 -2
  31. package/dist/Inputs/components/Context/InputValueProvider.js +8 -3
  32. package/dist/Inputs/components/Context/NumericInputValueProvider.cjs +6 -1
  33. package/dist/Inputs/components/Context/NumericInputValueProvider.js +7 -2
  34. package/dist/Inputs/components/InputTag/InputTag.cjs +6 -3
  35. package/dist/Inputs/components/InputTag/InputTag.js +7 -4
  36. package/dist/Inputs/components/InputTag/InputTag.style.cjs +1 -1
  37. package/dist/Inputs/components/InputTag/InputTag.style.js +1 -1
  38. package/dist/Inputs/components/ResetButton/ResetButton.cjs +7 -4
  39. package/dist/Inputs/components/ResetButton/ResetButton.js +7 -4
  40. package/dist/Label/components/Required/Required.cjs +8 -8
  41. package/dist/Label/components/Required/Required.js +8 -8
  42. package/dist/Layouts/FlexDivider/FlexDivider.cjs +22 -0
  43. package/dist/Layouts/FlexDivider/FlexDivider.d.ts +2 -0
  44. package/dist/Layouts/FlexDivider/FlexDivider.js +22 -0
  45. package/dist/Layouts/FlexDivider/FlexDivider.style.cjs +46 -0
  46. package/dist/Layouts/FlexDivider/FlexDivider.style.d.ts +6 -0
  47. package/dist/Layouts/FlexDivider/FlexDivider.style.js +44 -0
  48. package/dist/Layouts/FlexDivider/FlexDivider.types.d.ts +15 -0
  49. package/dist/Layouts/FlexGroup/FlexGroup.cjs +20 -0
  50. package/dist/Layouts/FlexGroup/FlexGroup.d.ts +2 -0
  51. package/dist/Layouts/FlexGroup/FlexGroup.js +20 -0
  52. package/dist/Layouts/FlexGroup/FlexGroup.style.cjs +20 -0
  53. package/dist/Layouts/FlexGroup/FlexGroup.style.d.ts +9 -0
  54. package/dist/Layouts/FlexGroup/FlexGroup.style.js +18 -0
  55. package/dist/Layouts/FlexGroup/FlexGroup.types.d.ts +19 -0
  56. package/dist/Layouts/FlexItem/FlexItem.cjs +16 -0
  57. package/dist/Layouts/FlexItem/FlexItem.d.ts +2 -0
  58. package/dist/Layouts/FlexItem/FlexItem.js +16 -0
  59. package/dist/Layouts/FlexItem/FlexItem.style.cjs +14 -0
  60. package/dist/Layouts/FlexItem/FlexItem.style.d.ts +5 -0
  61. package/dist/Layouts/FlexItem/FlexItem.style.js +12 -0
  62. package/dist/Layouts/FlexItem/FlexItem.types.d.ts +14 -0
  63. package/dist/Layouts/FlexSplit/FlexSplit.cjs +10 -0
  64. package/dist/Layouts/FlexSplit/FlexSplit.d.ts +2 -0
  65. package/dist/Layouts/FlexSplit/FlexSplit.js +10 -0
  66. package/dist/Layouts/FlexSplit/FlexSplit.style.cjs +27 -0
  67. package/dist/Layouts/FlexSplit/FlexSplit.style.d.ts +8 -0
  68. package/dist/Layouts/FlexSplit/FlexSplit.style.js +25 -0
  69. package/dist/Layouts/FlexSplit/FlexSplit.types.d.ts +8 -0
  70. package/dist/Layouts/index.d.ts +8 -0
  71. package/dist/MidBar/MidBar.cjs +30 -0
  72. package/dist/MidBar/MidBar.d.ts +22 -0
  73. package/dist/MidBar/MidBar.js +30 -0
  74. package/dist/MidBar/MidBar.types.d.ts +6 -0
  75. package/dist/MidBar/components/Header/Header.cjs +32 -0
  76. package/dist/MidBar/components/Header/Header.d.ts +15 -0
  77. package/dist/MidBar/components/Header/Header.js +32 -0
  78. package/dist/MidBar/components/Header/Header.types.d.ts +13 -0
  79. package/dist/MidBar/components/Header/components/Compose/Compose.cjs +8 -0
  80. package/dist/MidBar/components/Header/components/Compose/Compose.d.ts +3 -0
  81. package/dist/MidBar/components/Header/components/Compose/Compose.js +8 -0
  82. package/dist/MidBar/components/Header/components/Compose/Compose.style.cjs +31 -0
  83. package/dist/MidBar/components/Header/components/Compose/Compose.style.d.ts +1 -0
  84. package/dist/MidBar/components/Header/components/Compose/Compose.style.js +29 -0
  85. package/dist/MidBar/components/Header/components/Compose/Compose.types.d.ts +2 -0
  86. package/dist/MidBar/components/Header/components/Group/Group.cjs +12 -0
  87. package/dist/MidBar/components/Header/components/Group/Group.d.ts +3 -0
  88. package/dist/MidBar/components/Header/components/Group/Group.js +12 -0
  89. package/dist/MidBar/components/Header/components/Group/Group.style.cjs +22 -0
  90. package/dist/MidBar/components/Header/components/Group/Group.style.d.ts +4 -0
  91. package/dist/MidBar/components/Header/components/Group/Group.style.js +20 -0
  92. package/dist/MidBar/components/Header/components/Group/Group.types.d.ts +5 -0
  93. package/dist/MidBar/index.d.ts +2 -0
  94. package/dist/MoreInfoIcon/MoreInfoIcon.style.cjs +1 -1
  95. package/dist/MoreInfoIcon/MoreInfoIcon.style.js +1 -1
  96. package/dist/SearchBar/components/SearchSection/components/Actions/components/ColumnSelector/ColumnSelector.cjs +5 -7
  97. package/dist/SearchBar/components/SearchSection/components/Actions/components/ColumnSelector/ColumnSelector.js +5 -7
  98. package/dist/SearchBar/components/SearchSection/components/Actions/components/FiltersToggle/FiltersToggle.cjs +11 -9
  99. package/dist/SearchBar/components/SearchSection/components/Actions/components/FiltersToggle/FiltersToggle.js +11 -9
  100. package/dist/Select/components/Context/Context.cjs +6 -4
  101. package/dist/Select/components/Context/Context.js +7 -5
  102. package/dist/Select/components/Trigger/components/Compose/Compose.cjs +5 -0
  103. package/dist/Select/components/Trigger/components/Compose/Compose.js +6 -1
  104. package/dist/Select/components/Trigger/components/Compose/Compose.style.cjs +5 -0
  105. package/dist/Select/components/Trigger/components/Compose/Compose.style.js +5 -0
  106. package/dist/Stepper/Stepper.context.cjs +5 -10
  107. package/dist/Stepper/Stepper.context.d.ts +1 -2
  108. package/dist/Stepper/Stepper.context.js +5 -10
  109. package/dist/Stepper/Stepper.d.ts +4 -4
  110. package/dist/Stepper/components/Compose/Compose.cjs +6 -1
  111. package/dist/Stepper/components/Compose/Compose.d.ts +2 -2
  112. package/dist/Stepper/components/Compose/Compose.js +7 -2
  113. package/dist/Stepper/components/Step/Step.context.cjs +5 -10
  114. package/dist/Stepper/components/Step/Step.context.d.ts +1 -2
  115. package/dist/Stepper/components/Step/Step.context.js +5 -10
  116. package/dist/Stepper/components/Step/Step.d.ts +2 -3
  117. package/dist/Stepper/components/Step/components/Compose/Compose.cjs +1 -3
  118. package/dist/Stepper/components/Step/components/Compose/Compose.d.ts +1 -1
  119. package/dist/Stepper/components/Step/components/Compose/Compose.js +2 -4
  120. package/dist/Stepper/components/Step/components/Compose/Compose.style.cjs +2 -5
  121. package/dist/Stepper/components/Step/components/Compose/Compose.style.js +4 -7
  122. package/dist/Stepper/hooks/useStepperFocusing.cjs +31 -0
  123. package/dist/Stepper/hooks/useStepperFocusing.d.ts +16 -0
  124. package/dist/Stepper/hooks/useStepperFocusing.js +31 -0
  125. package/dist/Stepper/hooks/useStepperInteractive.cjs +30 -37
  126. package/dist/Stepper/hooks/useStepperInteractive.d.ts +2 -3
  127. package/dist/Stepper/hooks/useStepperInteractive.js +30 -37
  128. package/dist/ThemeModeSwitch/ThemeModeSwitch.cjs +64 -0
  129. package/dist/ThemeModeSwitch/ThemeModeSwitch.d.ts +2 -0
  130. package/dist/ThemeModeSwitch/ThemeModeSwitch.js +64 -0
  131. package/dist/ThemeModeSwitch/ThemeModeSwitch.style.cjs +38 -0
  132. package/dist/ThemeModeSwitch/ThemeModeSwitch.style.d.ts +4 -0
  133. package/dist/ThemeModeSwitch/ThemeModeSwitch.style.js +36 -0
  134. package/dist/ThemeModeSwitch/ThemeModeSwitch.types.d.ts +7 -0
  135. package/dist/ThemeModeSwitch/index.d.ts +3 -0
  136. package/dist/ThemeModeSwitch/useThemeModeSwitch.cjs +37 -0
  137. package/dist/ThemeModeSwitch/useThemeModeSwitch.d.ts +8 -0
  138. package/dist/ThemeModeSwitch/useThemeModeSwitch.js +37 -0
  139. package/dist/Toast/Toaster.cjs +4 -6
  140. package/dist/Toast/Toaster.d.ts +2 -1
  141. package/dist/Toast/Toaster.js +4 -6
  142. package/dist/Toast/Toaster.style.cjs +2 -2
  143. package/dist/Toast/Toaster.style.d.ts +2 -2
  144. package/dist/Toast/Toaster.style.js +3 -3
  145. package/dist/Toast/core/core.d.ts +3 -3
  146. package/dist/Toast/core/mapping.helpers.cjs +18 -2
  147. package/dist/Toast/core/mapping.helpers.d.ts +4 -3
  148. package/dist/Toast/core/mapping.helpers.js +22 -6
  149. package/dist/Toast/core/mapping.types.d.ts +3 -2
  150. package/dist/index.cjs +1092 -1
  151. package/dist/index.d.ts +3 -0
  152. package/dist/index.js +1139 -48
  153. package/dist/node_modules/clsx/dist/clsx.cjs +17 -0
  154. package/dist/node_modules/clsx/dist/clsx.js +17 -0
  155. package/dist/packages/components/node_modules/react-toastify/dist/react-toastify.esm.cjs +320 -0
  156. package/dist/packages/components/node_modules/react-toastify/dist/react-toastify.esm.js +318 -0
  157. package/dist/packages/icons/dist/multicolor/LoaderLarge.cjs +2 -2
  158. package/dist/packages/icons/dist/multicolor/LoaderLarge.js +2 -2
  159. package/dist/packages/icons/dist/multicolor/dark/LoaderLarge.cjs +3 -8
  160. package/dist/packages/icons/dist/multicolor/dark/LoaderLarge.js +3 -8
  161. package/dist/packages/icons/dist/multicolor/light/LoaderLarge.cjs +3 -8
  162. package/dist/packages/icons/dist/multicolor/light/LoaderLarge.js +3 -8
  163. package/package.json +4 -4
  164. package/dist/node_modules/clsx/dist/clsx.m.cjs +0 -15
  165. package/dist/node_modules/clsx/dist/clsx.m.js +0 -15
  166. package/dist/node_modules/react-toastify/dist/react-toastify.esm.cjs +0 -300
  167. package/dist/node_modules/react-toastify/dist/react-toastify.esm.js +0 -298
@@ -1,5 +1,5 @@
1
1
  import { j as jsxRuntimeExports } from "../../../node_modules/react/jsx-runtime.js";
2
- import { useMemo } from "react";
2
+ import { useRef, useMemo } from "react";
3
3
  import { useControllableState } from "../../../node_modules/@radix-ui/react-use-controllable-state/dist/index.js";
4
4
  import { ContextProvider } from "./InputValue.context.js";
5
5
  import { useNumericInput } from "../../hooks/numericInput/useNumericInput.js";
@@ -27,8 +27,10 @@ const NumericInputValueProvider = ({
27
27
  onChange: setInputValue,
28
28
  ...restProps
29
29
  });
30
+ const inputRef = useRef(null);
30
31
  const context = useMemo(() => ({
31
32
  api: {
33
+ inputRef,
32
34
  value: inputProps.value,
33
35
  resetValue: () => forceChange(""),
34
36
  canIncrement,
@@ -36,7 +38,10 @@ const NumericInputValueProvider = ({
36
38
  increment,
37
39
  decrement
38
40
  },
39
- props: inputProps
41
+ props: {
42
+ ...inputProps,
43
+ ref: inputRef
44
+ }
40
45
  }), [inputProps, canIncrement, canDecrement, increment, decrement, forceChange]);
41
46
  return jsxRuntimeExports.jsx(ContextProvider, {
42
47
  value: context,
@@ -19,20 +19,25 @@ const InputTag = React.forwardRef(({
19
19
  }, ref) => {
20
20
  const fieldDisabled = Field_context.useFieldDisabled(disabled);
21
21
  const sharedId = SharedId_context.useSharedId(id);
22
- const inputValueProps = InputValue_context.useInputValueProps(restProps);
22
+ const inputValueProps = InputValue_context.useInputValueProps(restProps, ref);
23
23
  const status = FormField_context.useFieldStatus();
24
+ const required = FormField_context.useFieldRequired();
24
25
  const errorContent = Field_context.useErrorContent();
25
26
  const errorId = index.useId();
26
27
  const statusProps = status === "error" ? {
27
28
  "aria-invalid": true,
28
29
  "aria-describedby": `${errorId} ${restProps["aria-describedby"] || ""}`
29
30
  } : null;
31
+ const requiredProps = required ? {
32
+ "aria-required": true
33
+ } : null;
30
34
  const inputProps = {
31
35
  id: sharedId,
32
36
  type,
33
37
  disabled: fieldDisabled,
34
38
  autoComplete,
35
39
  ...statusProps,
40
+ ...requiredProps,
36
41
  ...restProps,
37
42
  ...inputValueProps
38
43
  };
@@ -40,11 +45,9 @@ const InputTag = React.forwardRef(({
40
45
  ...inputProps,
41
46
  value: inputProps.value,
42
47
  children: (props) => jsxRuntime.jsxRuntimeExports.jsx(InputTag_style.InputTag, {
43
- ref,
44
48
  ...props
45
49
  })
46
50
  }) : jsxRuntime.jsxRuntimeExports.jsx(InputTag_style.InputTag, {
47
- ref,
48
51
  ...inputProps
49
52
  });
50
53
  return jsxRuntime.jsxRuntimeExports.jsxs(jsxRuntime.jsxRuntimeExports.Fragment, {
@@ -5,7 +5,7 @@ import { VisuallyHidden } from "../../../node_modules/@radix-ui/react-visually-h
5
5
  import { useFieldDisabled, useErrorContent } from "../Context/Field.context.js";
6
6
  import { useInputValueProps } from "../Context/InputValue.context.js";
7
7
  import { AutoSizeInputTag, InputTag as InputTag$1 } from "./InputTag.style.js";
8
- import { useFieldStatus } from "../../../FormField/FormField.context.js";
8
+ import { useFieldStatus, useFieldRequired } from "../../../FormField/FormField.context.js";
9
9
  import { useSharedId } from "../../../Helpers/contexts/SharedId.context.js";
10
10
  const InputTag = forwardRef(({
11
11
  autoSize,
@@ -17,20 +17,25 @@ const InputTag = forwardRef(({
17
17
  }, ref) => {
18
18
  const fieldDisabled = useFieldDisabled(disabled);
19
19
  const sharedId = useSharedId(id);
20
- const inputValueProps = useInputValueProps(restProps);
20
+ const inputValueProps = useInputValueProps(restProps, ref);
21
21
  const status = useFieldStatus();
22
+ const required = useFieldRequired();
22
23
  const errorContent = useErrorContent();
23
24
  const errorId = useId();
24
25
  const statusProps = status === "error" ? {
25
26
  "aria-invalid": true,
26
27
  "aria-describedby": `${errorId} ${restProps["aria-describedby"] || ""}`
27
28
  } : null;
29
+ const requiredProps = required ? {
30
+ "aria-required": true
31
+ } : null;
28
32
  const inputProps = {
29
33
  id: sharedId,
30
34
  type,
31
35
  disabled: fieldDisabled,
32
36
  autoComplete,
33
37
  ...statusProps,
38
+ ...requiredProps,
34
39
  ...restProps,
35
40
  ...inputValueProps
36
41
  };
@@ -38,11 +43,9 @@ const InputTag = forwardRef(({
38
43
  ...inputProps,
39
44
  value: inputProps.value,
40
45
  children: (props) => jsxRuntimeExports.jsx(InputTag$1, {
41
- ref,
42
46
  ...props
43
47
  })
44
48
  }) : jsxRuntimeExports.jsx(InputTag$1, {
45
- ref,
46
49
  ...inputProps
47
50
  });
48
51
  return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
@@ -54,7 +54,7 @@ const InputStyle = _styled.css`
54
54
  const InputTag = _styled__default.default.input.withConfig({
55
55
  displayName: "InputTagstyle__InputTag",
56
56
  componentId: "RedisUI__sc-15tql6o-0"
57
- })(["", ";align-self:stretch;padding:0;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}&[type='number']{-moz-appearance:textfield;}&[type='password']:not(:placeholder-shown){font-size:", ";}"], InputStyle, () => redisUiStyles.useTheme().components.input.password.fontSize);
57
+ })(["", ";align-self:stretch;padding:0;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}&[type='number']{-moz-appearance:textfield;}&[type='password']:not(:placeholder-shown){font-family:", ";font-size:", ";@supports not (-moz-appearance:none){font-size-adjust:", ";}}"], InputStyle, () => redisUiStyles.useTheme().components.input.password.fontFamily, () => redisUiStyles.useTheme().components.input.password.fontSize, () => redisUiStyles.useTheme().components.input.password.fontSizeAdjust);
58
58
  const AutoSizeInputTag = _styled__default.default(AutoSizeInput.AutoSizeInput).withConfig({
59
59
  displayName: "InputTagstyle__AutoSizeInputTag",
60
60
  componentId: "RedisUI__sc-15tql6o-1"
@@ -50,7 +50,7 @@ const InputStyle = css`
50
50
  const InputTag = _styled.input.withConfig({
51
51
  displayName: "InputTagstyle__InputTag",
52
52
  componentId: "RedisUI__sc-15tql6o-0"
53
- })(["", ";align-self:stretch;padding:0;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}&[type='number']{-moz-appearance:textfield;}&[type='password']:not(:placeholder-shown){font-size:", ";}"], InputStyle, () => useTheme().components.input.password.fontSize);
53
+ })(["", ";align-self:stretch;padding:0;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}&[type='number']{-moz-appearance:textfield;}&[type='password']:not(:placeholder-shown){font-family:", ";font-size:", ";@supports not (-moz-appearance:none){font-size-adjust:", ";}}"], InputStyle, () => useTheme().components.input.password.fontFamily, () => useTheme().components.input.password.fontSize, () => useTheme().components.input.password.fontSizeAdjust);
54
54
  const AutoSizeInputTag = _styled(AutoSizeInput).withConfig({
55
55
  displayName: "InputTagstyle__AutoSizeInputTag",
56
56
  componentId: "RedisUI__sc-15tql6o-1"
@@ -19,7 +19,8 @@ const ResetButton = ({
19
19
  const fieldDisabled = Field_context.useFieldDisabled();
20
20
  const {
21
21
  value,
22
- resetValue
22
+ resetValue,
23
+ inputRef
23
24
  } = InputValue_context.useInputValueApi();
24
25
  return !fieldReadonly && allowReset && value ? jsxRuntime.jsxRuntimeExports.jsx(ResetButton_style.ResetButton, {
25
26
  disabled: fieldDisabled,
@@ -27,10 +28,12 @@ const ResetButton = ({
27
28
  icon,
28
29
  title: "Reset",
29
30
  ...restProps,
30
- onClick: react_utils.combineHandlers(resetValue, onClick),
31
+ onClick: react_utils.combineHandlers(() => {
32
+ var _a;
33
+ return (_a = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a.focus();
34
+ }, resetValue, onClick),
31
35
  // prevent focus on the buttons
32
- onMouseDown: react_utils.combineHandlers((e) => e.preventDefault(), onMouseDown),
33
- tabIndex: -1
36
+ onMouseDown: react_utils.combineHandlers((e) => e.preventDefault(), onMouseDown)
34
37
  }) : null;
35
38
  };
36
39
  exports.ResetButton = ResetButton;
@@ -17,7 +17,8 @@ const ResetButton = ({
17
17
  const fieldDisabled = useFieldDisabled();
18
18
  const {
19
19
  value,
20
- resetValue
20
+ resetValue,
21
+ inputRef
21
22
  } = useInputValueApi();
22
23
  return !fieldReadonly && allowReset && value ? jsxRuntimeExports.jsx(ResetButton$1, {
23
24
  disabled: fieldDisabled,
@@ -25,10 +26,12 @@ const ResetButton = ({
25
26
  icon,
26
27
  title: "Reset",
27
28
  ...restProps,
28
- onClick: combineHandlers(resetValue, onClick),
29
+ onClick: combineHandlers(() => {
30
+ var _a;
31
+ return (_a = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a.focus();
32
+ }, resetValue, onClick),
29
33
  // prevent focus on the buttons
30
- onMouseDown: combineHandlers((e) => e.preventDefault(), onMouseDown),
31
- tabIndex: -1
34
+ onMouseDown: combineHandlers((e) => e.preventDefault(), onMouseDown)
32
35
  }) : null;
33
36
  };
34
37
  export {
@@ -2,17 +2,17 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const jsxRuntime = require("../../../node_modules/react/jsx-runtime.cjs");
4
4
  const Required_style = require("./Required.style.cjs");
5
+ const FormField_context = require("../../../FormField/FormField.context.cjs");
5
6
  const Required = ({
6
7
  children = "*",
7
8
  show = true,
8
9
  size,
9
10
  ...restProps
10
- }) => {
11
- return show ? jsxRuntime.jsxRuntimeExports.jsx(Required_style.Required, {
12
- component: "span",
13
- size: size ?? "S",
14
- ...restProps,
15
- children
16
- }) : null;
17
- };
11
+ }) => FormField_context.useFieldRequired(show) ? jsxRuntime.jsxRuntimeExports.jsx(Required_style.Required, {
12
+ component: "span",
13
+ size: size ?? "S",
14
+ "aria-hidden": true,
15
+ ...restProps,
16
+ children
17
+ }) : null;
18
18
  exports.default = Required;
@@ -1,18 +1,18 @@
1
1
  import { j as jsxRuntimeExports } from "../../../node_modules/react/jsx-runtime.js";
2
2
  import { Required as Required$1 } from "./Required.style.js";
3
+ import { useFieldRequired } from "../../../FormField/FormField.context.js";
3
4
  const Required = ({
4
5
  children = "*",
5
6
  show = true,
6
7
  size,
7
8
  ...restProps
8
- }) => {
9
- return show ? jsxRuntimeExports.jsx(Required$1, {
10
- component: "span",
11
- size: size ?? "S",
12
- ...restProps,
13
- children
14
- }) : null;
15
- };
9
+ }) => useFieldRequired(show) ? jsxRuntimeExports.jsx(Required$1, {
10
+ component: "span",
11
+ size: size ?? "S",
12
+ "aria-hidden": true,
13
+ ...restProps,
14
+ children
15
+ }) : null;
16
16
  export {
17
17
  Required as default
18
18
  };
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("../../node_modules/react/jsx-runtime.cjs");
4
+ const FlexDivider_style = require("./FlexDivider.style.cjs");
5
+ const FlexDivider = ({
6
+ padding = "none",
7
+ spacing = "none",
8
+ orientation,
9
+ autoHide = true,
10
+ ...restProps
11
+ }) => jsxRuntime.jsxRuntimeExports.jsx(FlexDivider_style.FlexDivider, {
12
+ role: "separator",
13
+ ...restProps,
14
+ "$padding": padding,
15
+ "$spacing": spacing,
16
+ "$autoHide": autoHide,
17
+ ...orientation && {
18
+ "data-orientation": orientation,
19
+ "aria-orientation": orientation
20
+ }
21
+ });
22
+ exports.FlexDivider = FlexDivider;
@@ -0,0 +1,2 @@
1
+ import { FlexDividerProps } from './FlexDivider.types';
2
+ export declare const FlexDivider: ({ padding, spacing, orientation, autoHide, ...restProps }: FlexDividerProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { j as jsxRuntimeExports } from "../../node_modules/react/jsx-runtime.js";
2
+ import { FlexDivider as FlexDivider$1 } from "./FlexDivider.style.js";
3
+ const FlexDivider = ({
4
+ padding = "none",
5
+ spacing = "none",
6
+ orientation,
7
+ autoHide = true,
8
+ ...restProps
9
+ }) => jsxRuntimeExports.jsx(FlexDivider$1, {
10
+ role: "separator",
11
+ ...restProps,
12
+ "$padding": padding,
13
+ "$spacing": spacing,
14
+ "$autoHide": autoHide,
15
+ ...orientation && {
16
+ "data-orientation": orientation,
17
+ "aria-orientation": orientation
18
+ }
19
+ });
20
+ export {
21
+ FlexDivider
22
+ };
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const _styled = require("styled-components");
4
+ const redisUiStyles = require("@redislabsdev/redis-ui-styles");
5
+ const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
6
+ const _styled__default = /* @__PURE__ */ _interopDefault(_styled);
7
+ const FlexDivider = _styled__default.default.div.withConfig({
8
+ displayName: "FlexDividerstyle__FlexDivider",
9
+ componentId: "RedisUI__sc-i92bia-0"
10
+ })(["flex:none;align-self:stretch;", " ", ""], ({
11
+ $padding,
12
+ $spacing
13
+ }) => {
14
+ const styles = redisUiStyles.useTheme().components.layouts.flexDivider;
15
+ const padding = styles.padding[$padding] ?? $padding;
16
+ const spacing = styles.spacing[$spacing] ?? $spacing;
17
+ return _styled.css`
18
+ background-color: ${styles.color};
19
+ [data-flex-direction='row'] > :where(&&:not([data-orientation])),
20
+ [data-flex-direction='row-reverse'] > :where(&&:not([data-orientation])),
21
+ &[data-orientation='vertical'] {
22
+ width: ${styles.size};
23
+ margin-block: ${padding};
24
+ margin-inline: ${spacing};
25
+ display: inline-block;
26
+ }
27
+
28
+ [data-flex-direction='column'] > :where(&&:not([data-orientation])),
29
+ [data-flex-direction='column-reverse'] > :where(&&:not([data-orientation])),
30
+ &[data-orientation='horizontal'] {
31
+ height: ${styles.size};
32
+ margin-inline: ${padding};
33
+ margin-block: ${spacing};
34
+ display: block;
35
+ }
36
+ `;
37
+ }, ({
38
+ $autoHide
39
+ }) => $autoHide && _styled.css`
40
+ &:first-child,
41
+ &:last-child,
42
+ & + & {
43
+ display: none;
44
+ }
45
+ `);
46
+ exports.FlexDivider = FlexDivider;
@@ -0,0 +1,6 @@
1
+ import { FlexDividerPaddingSize } from './FlexDivider.types';
2
+ export declare const FlexDivider: import("styled-components").StyledComponent<"div", any, {
3
+ $padding: FlexDividerPaddingSize;
4
+ $spacing: FlexDividerPaddingSize;
5
+ $autoHide: boolean;
6
+ }, never>;
@@ -0,0 +1,44 @@
1
+ import _styled, { css } from "styled-components";
2
+ import { useTheme } from "@redislabsdev/redis-ui-styles";
3
+ const FlexDivider = _styled.div.withConfig({
4
+ displayName: "FlexDividerstyle__FlexDivider",
5
+ componentId: "RedisUI__sc-i92bia-0"
6
+ })(["flex:none;align-self:stretch;", " ", ""], ({
7
+ $padding,
8
+ $spacing
9
+ }) => {
10
+ const styles = useTheme().components.layouts.flexDivider;
11
+ const padding = styles.padding[$padding] ?? $padding;
12
+ const spacing = styles.spacing[$spacing] ?? $spacing;
13
+ return css`
14
+ background-color: ${styles.color};
15
+ [data-flex-direction='row'] > :where(&&:not([data-orientation])),
16
+ [data-flex-direction='row-reverse'] > :where(&&:not([data-orientation])),
17
+ &[data-orientation='vertical'] {
18
+ width: ${styles.size};
19
+ margin-block: ${padding};
20
+ margin-inline: ${spacing};
21
+ display: inline-block;
22
+ }
23
+
24
+ [data-flex-direction='column'] > :where(&&:not([data-orientation])),
25
+ [data-flex-direction='column-reverse'] > :where(&&:not([data-orientation])),
26
+ &[data-orientation='horizontal'] {
27
+ height: ${styles.size};
28
+ margin-inline: ${padding};
29
+ margin-block: ${spacing};
30
+ display: block;
31
+ }
32
+ `;
33
+ }, ({
34
+ $autoHide
35
+ }) => $autoHide && css`
36
+ &:first-child,
37
+ &:last-child,
38
+ & + & {
39
+ display: none;
40
+ }
41
+ `);
42
+ export {
43
+ FlexDivider
44
+ };
@@ -0,0 +1,15 @@
1
+ import { AnyOtherString, ChildFree, ComposeElementProps } from '../../Helpers';
2
+ type FlexDividerOrientation = 'horizontal' | 'vertical';
3
+ export type FlexDividerPaddingSize = 'XXS' | 'XS' | 'S' | 'M' | 'L' | 'XL' | 'XXL' | 'none' | AnyOtherString;
4
+ export type OwnFlexDividerProps = {
5
+ /** Paddings from the edges of the container */
6
+ padding?: FlexDividerPaddingSize;
7
+ /** Additional margins between divider line and dividing elements. Gap of flex container is preferred. Default - none */
8
+ spacing?: FlexDividerPaddingSize;
9
+ /** The orientation of the divider line when used in a custom container. FlexGroup automatically defines its orientation. */
10
+ orientation?: FlexDividerOrientation;
11
+ /** Hide extra Dividers if there are multiple ones next to each other or if one is displayed as the first/last element. Defaults to true. */
12
+ autoHide?: boolean;
13
+ };
14
+ export type FlexDividerProps = OwnFlexDividerProps & ChildFree<ComposeElementProps>;
15
+ export {};
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("../../node_modules/react/jsx-runtime.cjs");
4
+ const FlexGroup_style = require("./FlexGroup.style.cjs");
5
+ const FlexGroup = ({
6
+ gap = "S",
7
+ direction = "row",
8
+ align = direction.includes("column") ? "stretch" : "center",
9
+ justify,
10
+ wrap,
11
+ ...restProps
12
+ }) => jsxRuntime.jsxRuntimeExports.jsx(FlexGroup_style.FlexGroup, {
13
+ ...restProps,
14
+ "$gap": gap,
15
+ "$align": align,
16
+ "$justify": justify,
17
+ "$wrap": wrap,
18
+ "data-flex-direction": direction
19
+ });
20
+ exports.FlexGroup = FlexGroup;
@@ -0,0 +1,2 @@
1
+ import { FlexGroupProps } from './FlexGroup.types';
2
+ export declare const FlexGroup: ({ gap, direction, align, justify, wrap, ...restProps }: FlexGroupProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,20 @@
1
+ import { j as jsxRuntimeExports } from "../../node_modules/react/jsx-runtime.js";
2
+ import { FlexGroup as FlexGroup$1 } from "./FlexGroup.style.js";
3
+ const FlexGroup = ({
4
+ gap = "S",
5
+ direction = "row",
6
+ align = direction.includes("column") ? "stretch" : "center",
7
+ justify,
8
+ wrap,
9
+ ...restProps
10
+ }) => jsxRuntimeExports.jsx(FlexGroup$1, {
11
+ ...restProps,
12
+ "$gap": gap,
13
+ "$align": align,
14
+ "$justify": justify,
15
+ "$wrap": wrap,
16
+ "data-flex-direction": direction
17
+ });
18
+ export {
19
+ FlexGroup
20
+ };
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const _styled = require("styled-components");
4
+ const redisUiStyles = require("@redislabsdev/redis-ui-styles");
5
+ const FlexItem = require("../FlexItem/FlexItem.cjs");
6
+ const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
7
+ const _styled__default = /* @__PURE__ */ _interopDefault(_styled);
8
+ const FlexGroup = _styled__default.default(FlexItem.FlexItem).withConfig({
9
+ displayName: "FlexGroupstyle__FlexGroup",
10
+ componentId: "RedisUI__sc-1t0rzwk-0"
11
+ })(["display:flex;flex-wrap:", ";align-items:", ";justify-content:", ";flex-direction:", ";gap:", ";"], ({
12
+ $wrap
13
+ }) => $wrap ? "wrap" : "nowrap", ({
14
+ $align
15
+ }) => $align, ({
16
+ $justify
17
+ }) => $justify, (props) => props["data-flex-direction"], ({
18
+ $gap
19
+ }) => redisUiStyles.useTheme().components.layouts.flexGroup.gap[$gap] ?? $gap);
20
+ exports.FlexGroup = FlexGroup;
@@ -0,0 +1,9 @@
1
+ import { FlexAlign } from '../FlexItem/FlexItem.types';
2
+ import { FlexDirection, FlexGroupGapSize, FlexJustify } from './FlexGroup.types';
3
+ export declare const FlexGroup: import("styled-components").StyledComponent<({ flex, selfAlign, component, ...restProps }: import("../FlexItem/FlexItem.types").FlexItemProps) => import("react/jsx-runtime").JSX.Element, any, {
4
+ $gap: FlexGroupGapSize;
5
+ $align: FlexAlign;
6
+ $justify?: FlexJustify | undefined;
7
+ $wrap?: boolean | undefined;
8
+ 'data-flex-direction': FlexDirection;
9
+ }, never>;
@@ -0,0 +1,18 @@
1
+ import _styled from "styled-components";
2
+ import { useTheme } from "@redislabsdev/redis-ui-styles";
3
+ import { FlexItem } from "../FlexItem/FlexItem.js";
4
+ const FlexGroup = _styled(FlexItem).withConfig({
5
+ displayName: "FlexGroupstyle__FlexGroup",
6
+ componentId: "RedisUI__sc-1t0rzwk-0"
7
+ })(["display:flex;flex-wrap:", ";align-items:", ";justify-content:", ";flex-direction:", ";gap:", ";"], ({
8
+ $wrap
9
+ }) => $wrap ? "wrap" : "nowrap", ({
10
+ $align
11
+ }) => $align, ({
12
+ $justify
13
+ }) => $justify, (props) => props["data-flex-direction"], ({
14
+ $gap
15
+ }) => useTheme().components.layouts.flexGroup.gap[$gap] ?? $gap);
16
+ export {
17
+ FlexGroup
18
+ };
@@ -0,0 +1,19 @@
1
+ import { AnyOtherString } from '../../Helpers';
2
+ import { FlexAlign, OwnFlexItemProps, RestFlexItemProps } from '../FlexItem/FlexItem.types';
3
+ export type FlexGroupGapSize = 'XXS' | 'XS' | 'S' | 'M' | 'L' | 'XL' | 'XXL' | AnyOtherString;
4
+ export type FlexDirection = 'column' | 'row' | 'column-reverse' | 'row-reverse';
5
+ export type FlexJustify = 'start' | 'end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
6
+ export type OwnFlexGroupProps = OwnFlexItemProps & {
7
+ /** Gap size between items. Supports predefined T-Shirt sizes and free text for applying values from theme */
8
+ gap?: FlexGroupGapSize;
9
+ /** Flex direction */
10
+ direction?: FlexDirection;
11
+ /** Align items along the cross axis */
12
+ align?: FlexAlign;
13
+ /** Justify content along the main axis */
14
+ justify?: FlexJustify;
15
+ /** Whether items should wrap to new lines */
16
+ wrap?: boolean;
17
+ };
18
+ export type RestFlexGroupProps = RestFlexItemProps;
19
+ export type FlexGroupProps = OwnFlexGroupProps & RestFlexGroupProps;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("../../node_modules/react/jsx-runtime.cjs");
4
+ const FlexItem_style = require("./FlexItem.style.cjs");
5
+ const FlexItem = ({
6
+ flex,
7
+ selfAlign,
8
+ component,
9
+ ...restProps
10
+ }) => jsxRuntime.jsxRuntimeExports.jsx(FlexItem_style.FlexItem, {
11
+ ...restProps,
12
+ "$flex": flex,
13
+ "$selfAlign": selfAlign,
14
+ as: component
15
+ });
16
+ exports.FlexItem = FlexItem;
@@ -0,0 +1,2 @@
1
+ import { FlexItemProps } from './FlexItem.types';
2
+ export declare const FlexItem: ({ flex, selfAlign, component, ...restProps }: FlexItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { j as jsxRuntimeExports } from "../../node_modules/react/jsx-runtime.js";
2
+ import { FlexItem as FlexItem$1 } from "./FlexItem.style.js";
3
+ const FlexItem = ({
4
+ flex,
5
+ selfAlign,
6
+ component,
7
+ ...restProps
8
+ }) => jsxRuntimeExports.jsx(FlexItem$1, {
9
+ ...restProps,
10
+ "$flex": flex,
11
+ "$selfAlign": selfAlign,
12
+ as: component
13
+ });
14
+ export {
15
+ FlexItem
16
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const _styled = require("styled-components");
4
+ const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
5
+ const _styled__default = /* @__PURE__ */ _interopDefault(_styled);
6
+ const FlexItem = _styled__default.default.div.withConfig({
7
+ displayName: "FlexItemstyle__FlexItem",
8
+ componentId: "RedisUI__sc-sfog54-0"
9
+ })(["flex:", ";align-self:", ";"], ({
10
+ $flex
11
+ }) => $flex, ({
12
+ $selfAlign
13
+ }) => $selfAlign);
14
+ exports.FlexItem = FlexItem;
@@ -0,0 +1,5 @@
1
+ import { FlexAlign, FlexFlex } from './FlexItem.types';
2
+ export declare const FlexItem: import("styled-components").StyledComponent<"div", any, {
3
+ $selfAlign?: FlexAlign | undefined;
4
+ $flex?: FlexFlex | undefined;
5
+ }, never>;
@@ -0,0 +1,12 @@
1
+ import _styled from "styled-components";
2
+ const FlexItem = _styled.div.withConfig({
3
+ displayName: "FlexItemstyle__FlexItem",
4
+ componentId: "RedisUI__sc-sfog54-0"
5
+ })(["flex:", ";align-self:", ";"], ({
6
+ $flex
7
+ }) => $flex, ({
8
+ $selfAlign
9
+ }) => $selfAlign);
10
+ export {
11
+ FlexItem
12
+ };
@@ -0,0 +1,14 @@
1
+ import { ComponentType } from 'react';
2
+ import { AnyOtherString, ComposeElementProps } from '../../Helpers';
3
+ export type FlexAlign = 'start' | 'end' | 'center' | 'stretch';
4
+ export type FlexFlex = 'auto' | 'none' | AnyOtherString;
5
+ export type OwnFlexItemProps = {
6
+ /** Flex grow/shrink/basis value */
7
+ flex?: FlexFlex;
8
+ /** Align self in parent flex container along the cross axis of the parent flex */
9
+ selfAlign?: FlexAlign;
10
+ /** Use different component with Flex styling, default is `div` */
11
+ component?: string | ComponentType;
12
+ };
13
+ export type RestFlexItemProps = ComposeElementProps;
14
+ export type FlexItemProps = OwnFlexItemProps & RestFlexItemProps;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("../../node_modules/react/jsx-runtime.cjs");
4
+ const FlexSplit_style = require("./FlexSplit.style.cjs");
5
+ const FlexSplit = ({
6
+ extraMinSpace
7
+ }) => jsxRuntime.jsxRuntimeExports.jsx(FlexSplit_style.FlexSplit, {
8
+ "$extraMinSpace": extraMinSpace
9
+ });
10
+ exports.FlexSplit = FlexSplit;
@@ -0,0 +1,2 @@
1
+ import { FlexSplitProps } from './FlexSplit.types';
2
+ export declare const FlexSplit: ({ extraMinSpace }: FlexSplitProps) => import("react/jsx-runtime").JSX.Element;