draft-components 4.11.0 → 4.12.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.
@@ -3225,14 +3225,11 @@
3225
3225
 
3226
3226
  .dc-switch__input {
3227
3227
  position: absolute;
3228
- width: 1px;
3229
- height: 1px;
3230
- padding: 0;
3231
- margin: -1px;
3232
- overflow: hidden;
3233
- white-space: nowrap;
3234
- border: 0;
3235
- clip: rect(0, 0, 0, 0);
3228
+ inset: 0;
3229
+ -webkit-appearance: none;
3230
+ -moz-appearance: none;
3231
+ appearance: none;
3232
+ opacity: 0;
3236
3233
  }
3237
3234
 
3238
3235
  .dc-switch__track,
@@ -3241,6 +3238,7 @@
3241
3238
  top: 0;
3242
3239
  left: 0;
3243
3240
  display: inline-block;
3241
+ pointer-events: none;
3244
3242
  }
3245
3243
 
3246
3244
  .dc-switch__track {
@@ -3333,14 +3331,12 @@
3333
3331
 
3334
3332
  .dc-checkbox__input {
3335
3333
  position: absolute;
3336
- width: 1px;
3337
- height: 1px;
3338
- padding: 0;
3339
- margin: -1px;
3340
- overflow: hidden;
3341
- white-space: nowrap;
3342
- border: 0;
3343
- clip: rect(0, 0, 0, 0);
3334
+ inset: 0;
3335
+ margin: 0;
3336
+ -webkit-appearance: none;
3337
+ -moz-appearance: none;
3338
+ appearance: none;
3339
+ opacity: 0;
3344
3340
  }
3345
3341
 
3346
3342
  .dc-checkbox__check {
@@ -3352,6 +3348,7 @@
3352
3348
  width: 100%;
3353
3349
  height: 100%;
3354
3350
  vertical-align: middle;
3351
+ pointer-events: none;
3355
3352
  background: var(--background);
3356
3353
  border: 1px solid var(--border-color);
3357
3354
  border-radius: var(--radius);
@@ -3417,14 +3414,11 @@
3417
3414
 
3418
3415
  .dc-radio__input {
3419
3416
  position: absolute;
3420
- width: 1px;
3421
- height: 1px;
3422
- padding: 0;
3423
- margin: -1px;
3424
- overflow: hidden;
3425
- white-space: nowrap;
3426
- border: 0;
3427
- clip: rect(0, 0, 0, 0);
3417
+ inset: 0;
3418
+ -webkit-appearance: none;
3419
+ -moz-appearance: none;
3420
+ appearance: none;
3421
+ opacity: 0;
3428
3422
  }
3429
3423
 
3430
3424
  .dc-radio__check {
@@ -3436,6 +3430,7 @@
3436
3430
  width: var(--size);
3437
3431
  height: var(--size);
3438
3432
  vertical-align: middle;
3433
+ pointer-events: none;
3439
3434
  background: var(--background);
3440
3435
  border: 1px solid var(--border-color);
3441
3436
  border-radius: 50%;
@@ -4569,7 +4564,7 @@
4569
4564
  background: var(--row-background-selected);
4570
4565
  }
4571
4566
 
4572
- .dc-table_highlight_row tbody tr:hover td {
4567
+ .dc-table_highlight_row tbody tr:not([data-not-highlight-on-hover="true"]):hover td {
4573
4568
  background: var(--row-background-highlighted);
4574
4569
  }
4575
4570
 
@@ -20,14 +20,12 @@
20
20
 
21
21
  .dc-checkbox__input {
22
22
  position: absolute;
23
- width: 1px;
24
- height: 1px;
25
- padding: 0;
26
- margin: -1px;
27
- overflow: hidden;
28
- white-space: nowrap;
29
- border: 0;
30
- clip: rect(0, 0, 0, 0);
23
+ inset: 0;
24
+ margin: 0;
25
+ -webkit-appearance: none;
26
+ -moz-appearance: none;
27
+ appearance: none;
28
+ opacity: 0;
31
29
  }
32
30
 
33
31
  .dc-checkbox__check {
@@ -39,6 +37,7 @@
39
37
  width: 100%;
40
38
  height: 100%;
41
39
  vertical-align: middle;
40
+ pointer-events: none;
42
41
  background: var(--background);
43
42
  border: 1px solid var(--border-color);
44
43
  border-radius: var(--radius);
@@ -18,14 +18,11 @@
18
18
 
19
19
  .dc-radio__input {
20
20
  position: absolute;
21
- width: 1px;
22
- height: 1px;
23
- padding: 0;
24
- margin: -1px;
25
- overflow: hidden;
26
- white-space: nowrap;
27
- border: 0;
28
- clip: rect(0, 0, 0, 0);
21
+ inset: 0;
22
+ -webkit-appearance: none;
23
+ -moz-appearance: none;
24
+ appearance: none;
25
+ opacity: 0;
29
26
  }
30
27
 
31
28
  .dc-radio__check {
@@ -37,6 +34,7 @@
37
34
  width: var(--size);
38
35
  height: var(--size);
39
36
  vertical-align: middle;
37
+ pointer-events: none;
40
38
  background: var(--background);
41
39
  border: 1px solid var(--border-color);
42
40
  border-radius: 50%;
@@ -22,14 +22,11 @@
22
22
 
23
23
  .dc-switch__input {
24
24
  position: absolute;
25
- width: 1px;
26
- height: 1px;
27
- padding: 0;
28
- margin: -1px;
29
- overflow: hidden;
30
- white-space: nowrap;
31
- border: 0;
32
- clip: rect(0, 0, 0, 0);
25
+ inset: 0;
26
+ -webkit-appearance: none;
27
+ -moz-appearance: none;
28
+ appearance: none;
29
+ opacity: 0;
33
30
  }
34
31
 
35
32
  .dc-switch__track,
@@ -38,6 +35,7 @@
38
35
  top: 0;
39
36
  left: 0;
40
37
  display: inline-block;
38
+ pointer-events: none;
41
39
  }
42
40
 
43
41
  .dc-switch__track {
@@ -2,7 +2,8 @@ import { type ComponentProps } from 'react';
2
2
  type TableRowHTMLProps = ComponentProps<'tr'>;
3
3
  type TableRowBaseProps = {
4
4
  isSelected?: boolean;
5
+ shouldNotHighlightOnHover?: boolean;
5
6
  };
6
7
  export type TableRowProps = TableRowBaseProps & Omit<TableRowHTMLProps, keyof TableRowBaseProps>;
7
- export declare function TableRow({ isSelected, ...props }: TableRowProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function TableRow({ isSelected, shouldNotHighlightOnHover, ...props }: TableRowProps): import("react/jsx-runtime").JSX.Element;
8
9
  export {};
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import {} from 'react';
3
- export function TableRow({ isSelected, ...props }) {
4
- return (_jsx("tr", { ...props, "data-selected": isSelected }));
3
+ export function TableRow({ isSelected, shouldNotHighlightOnHover, ...props }) {
4
+ return (_jsx("tr", { ...props, "data-selected": isSelected, "data-not-highlight-on-hover": shouldNotHighlightOnHover }));
5
5
  }
6
6
  //# sourceMappingURL=table-row.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"table-row.js","sourceRoot":"","sources":["../../../src/components/table/table-row.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAuB,MAAM,OAAO,CAAC;AAY5C,MAAM,UAAU,QAAQ,CAAC,EACvB,UAAU,EACV,GAAG,KAAK,EACM;IACd,OAAO,CACL,gBACM,KAAK,mBACM,UAAU,GACzB,CACH,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"table-row.js","sourceRoot":"","sources":["../../../src/components/table/table-row.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAuB,MAAM,OAAO,CAAC;AAa5C,MAAM,UAAU,QAAQ,CAAC,EACvB,UAAU,EACV,yBAAyB,EACzB,GAAG,KAAK,EACM;IACd,OAAO,CACL,gBACM,KAAK,mBACM,UAAU,iCACI,yBAAyB,GACtD,CACH,CAAC;AACJ,CAAC"}
@@ -119,7 +119,7 @@
119
119
  background: var(--row-background-selected);
120
120
  }
121
121
 
122
- .dc-table_highlight_row tbody tr:hover td {
122
+ .dc-table_highlight_row tbody tr:not([data-not-highlight-on-hover="true"]):hover td {
123
123
  background: var(--row-background-highlighted);
124
124
  }
125
125
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "draft-components",
3
- "version": "4.11.0",
3
+ "version": "4.12.0",
4
4
  "description": "The React based UI components library.",
5
5
  "type": "module",
6
6
  "exports": {