@rolster/react-components 18.23.10 → 18.23.11

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.
@@ -94,13 +94,20 @@
94
94
  width: auto;
95
95
  padding: var(--rlc-badge-padding, var(--rls-sizing-x2));
96
96
  box-sizing: border-box;
97
- font-size: var(--rls-caption-font-size);
98
- letter-spacing: var(--rls-caption-letter-spacing);
99
- line-height: var(--rls-caption-line-height);
97
+ font-size: var(--rlc-badge-font-size, var(--rls-caption-font-size));
98
+ letter-spacing: var(
99
+ --rlc-badge-letter-spacing,
100
+ var(--rls-caption-letter-spacing)
101
+ );
102
+ line-height: var(--rlc-badge-line-height, var(--rls-caption-line-height));
100
103
  color: var(--rls-theme-color-100);
101
104
  background: var(--rls-theme-color-500);
102
105
  border-radius: var(--rls-sizing-x2);
103
106
  }
107
+ .rls-badge--contrast {
108
+ background: var(--rls-theme-color-100);
109
+ color: var(--rls-theme-color-700);
110
+ }
104
111
  .rls-badge > span {
105
112
  font-size: inherit;
106
113
  letter-spacing: inherit;
package/dist/es/index.js CHANGED
@@ -1393,8 +1393,11 @@ function RlsAvatar({ children, rounded, skeleton, rlsTheme }) {
1393
1393
  return (jsxRuntimeExports.jsx("div", { className: className, "rls-theme": rlsTheme, children: children }));
1394
1394
  }
1395
1395
 
1396
- function RlsBadge({ children, rlsTheme }) {
1397
- return (jsxRuntimeExports.jsx("div", { className: "rls-badge", "rls-theme": rlsTheme, children: children }));
1396
+ function RlsBadge({ children, contrast, rlsTheme }) {
1397
+ const className = useMemo(() => {
1398
+ return renderClassStatus('rls-badge', { contrast });
1399
+ }, [contrast]);
1400
+ return (jsxRuntimeExports.jsx("div", { className: className, "rls-theme": rlsTheme, children: children }));
1398
1401
  }
1399
1402
 
1400
1403
  function RlsBreadcrumbLabel({ label }) {
@@ -2720,7 +2723,7 @@ function useFieldAutocomplete(props) {
2720
2723
  else {
2721
2724
  controller.setFormValue(element);
2722
2725
  }
2723
- if (props.selectionContinuos) {
2726
+ if (props.keepOpen) {
2724
2727
  setPattern('');
2725
2728
  controller.refInput?.current?.focus();
2726
2729
  }
@@ -2732,7 +2735,7 @@ function useFieldAutocomplete(props) {
2732
2735
  controller.setState,
2733
2736
  controller.setFormValue,
2734
2737
  setPattern,
2735
- props.selectionContinuos,
2738
+ props.keepOpen,
2736
2739
  props.onSelect,
2737
2740
  props.onValue
2738
2741
  ]);