@dbcdk/react-components 0.0.139 → 0.0.140

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.
@@ -8,8 +8,8 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
8
8
 
9
9
  var styles__default = /*#__PURE__*/_interopDefault(styles);
10
10
 
11
- function ClearButton({ onClick, absolute, ariaLabel = "Ryd" }) {
12
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${styles__default.default.clearButton} ${absolute ? styles__default.default.absolute : ""}`, children: /* @__PURE__ */ jsxRuntime.jsx(
11
+ function ClearButton({ onClick, ariaLabel = "Ryd" }) {
12
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles__default.default.clearButton, children: /* @__PURE__ */ jsxRuntime.jsx(
13
13
  "button",
14
14
  {
15
15
  className: styles__default.default.button,
@@ -2,8 +2,7 @@ import type { ReactNode } from 'react';
2
2
  import * as React from 'react';
3
3
  interface ClearButtonProps {
4
4
  onClick?: (event?: React.MouseEvent | React.KeyboardEvent) => void;
5
- absolute?: boolean;
6
5
  ariaLabel?: string;
7
6
  }
8
- export declare function ClearButton({ onClick, absolute, ariaLabel }: ClearButtonProps): ReactNode;
7
+ export declare function ClearButton({ onClick, ariaLabel }: ClearButtonProps): ReactNode;
9
8
  export {};
@@ -2,8 +2,8 @@ import { jsx } from 'react/jsx-runtime';
2
2
  import { X } from 'lucide-react';
3
3
  import styles from './ClearButton.module.css';
4
4
 
5
- function ClearButton({ onClick, absolute, ariaLabel = "Ryd" }) {
6
- return /* @__PURE__ */ jsx("span", { className: `${styles.clearButton} ${absolute ? styles.absolute : ""}`, children: /* @__PURE__ */ jsx(
5
+ function ClearButton({ onClick, ariaLabel = "Ryd" }) {
6
+ return /* @__PURE__ */ jsx("span", { className: styles.clearButton, children: /* @__PURE__ */ jsx(
7
7
  "button",
8
8
  {
9
9
  className: styles.button,
@@ -1,3 +1,10 @@
1
+ .clearButton {
2
+ display: inline-flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ flex: 0 0 auto;
6
+ }
7
+
1
8
  .clearButton .button {
2
9
  appearance: none;
3
10
  display: flex;
@@ -17,10 +24,3 @@
17
24
  .clearButton .button:hover {
18
25
  background-color: var(--color-bg-contextual);
19
26
  }
20
-
21
- .clearButton.absolute .button {
22
- position: absolute;
23
- right: var(--spacing-xxs);
24
- top: 50%;
25
- transform: translateY(-50%);
26
- }
@@ -75,9 +75,7 @@
75
75
 
76
76
  /*
77
77
  When onClear exists, do not keep extra inline-end padding on the input itself.
78
- The clear affordance already reserves the needed space via:
79
- - the inline clearSlot inside endAdornment, or
80
- - the absolute clear button path.
78
+ The clear affordance already reserves the needed space via the inline clearSlot.
81
79
  */
82
80
  .withClear .input {
83
81
  padding-inline-end: 0;
@@ -118,7 +118,7 @@
118
118
  }
119
119
 
120
120
  /* FILTER */
121
- .filter button {
121
+ .filter > button {
122
122
  border-radius: 0;
123
123
  min-height: var(--component-size-md);
124
124
  width: 100%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dbcdk/react-components",
3
- "version": "0.0.139",
3
+ "version": "0.0.140",
4
4
  "description": "Reusable React components for DBC projects",
5
5
  "license": "ISC",
6
6
  "author": "",