@eqtylab/equality 1.1.7 → 1.1.9

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.
@@ -81,8 +81,7 @@
81
81
  .dialog-header {
82
82
  display: flex;
83
83
  flex-shrink: 0;
84
- align-items: flex-start;
85
- justify-content: space-between;
84
+ align-items: center;
86
85
  gap: calc(0.25rem * 4);
87
86
  text-align: left;
88
87
  border-bottom-style: var(--tw-border-style);
@@ -91,11 +90,22 @@
91
90
  padding-inline: calc(0.25rem * 6);
92
91
  padding-block: calc(0.25rem * 3);
93
92
  }
93
+ .dialog-header-icon {
94
+ flex-shrink: 0;
95
+ display: flex;
96
+ align-items: center;
97
+ justify-content: center;
98
+ }
94
99
  .dialog-header-content {
95
100
  display: flex;
96
101
  min-width: calc(0.25rem * 0);
97
102
  flex: 1;
98
103
  flex-direction: column;
104
+ :where(& > :not(:last-child)) {
105
+ --tw-space-y-reverse: 0;
106
+ margin-block-start: calc(calc(0.25rem * 0.5) * var(--tw-space-y-reverse));
107
+ margin-block-end: calc(calc(0.25rem * 0.5) * calc(1 - var(--tw-space-y-reverse)));
108
+ }
99
109
  }
100
110
  .dialog-title {
101
111
  font-size: 1.125rem;
@@ -267,6 +277,11 @@
267
277
  inherits: false;
268
278
  initial-value: 0;
269
279
  }
280
+ @property --tw-space-y-reverse {
281
+ syntax: "*";
282
+ inherits: false;
283
+ initial-value: 0;
284
+ }
270
285
  @property --tw-leading {
271
286
  syntax: "*";
272
287
  inherits: false;
@@ -71,7 +71,7 @@
71
71
  padding-block: calc(0.25rem * 2);
72
72
  }
73
73
  .actions {
74
- margin-right: calc(0.25rem * 0.5);
74
+ margin-right: calc(0.25rem * 1);
75
75
  display: flex;
76
76
  align-items: center;
77
77
  }
@@ -37,19 +37,19 @@
37
37
  display: flex;
38
38
  }
39
39
  .size--sm {
40
- width: calc(0.25rem * 8);
41
- height: calc(0.25rem * 8);
40
+ width: calc(0.25rem * 7);
41
+ height: calc(0.25rem * 7);
42
42
  border-radius: var(--radius-md, 0.375rem);
43
43
  }
44
44
  .size--md {
45
45
  width: calc(0.25rem * 10);
46
46
  height: calc(0.25rem * 10);
47
- border-radius: 0.5rem;
47
+ border-radius: 8.5px;
48
48
  }
49
49
  .size--lg {
50
- width: calc(0.25rem * 12);
51
- height: calc(0.25rem * 12);
52
- border-radius: 0.75rem;
50
+ width: calc(0.25rem * 11);
51
+ height: calc(0.25rem * 11);
52
+ border-radius: 9.5px;
53
53
  }
54
54
  .icon-btn--primary {
55
55
  color: var(--color-text-primary);
package/dist/index.cjs CHANGED
@@ -949,8 +949,8 @@ var iconButtonVariants = classVarianceAuthority.cva(styles13__default.default["i
949
949
  });
950
950
  var iconSizeMap = {
951
951
  sm: 16,
952
- md: 20,
953
- lg: 32
952
+ md: 22,
953
+ lg: 26
954
954
  };
955
955
  function IconButton({
956
956
  className,
@@ -1229,10 +1229,22 @@ var DialogContainer = React15__namespace.forwardRef(({ className, children, size
1229
1229
  )
1230
1230
  ] }));
1231
1231
  DialogContainer.displayName = DialogPrimitive__namespace.Content.displayName;
1232
- var DialogHeader = ({ className, children, ...props }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(styles15__default.default["dialog-header"], className), ...props, children: [
1233
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles15__default.default["dialog-header-content"], children }),
1234
- /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(IconButton, { name: "X", label: "Close", size: "sm" }) })
1235
- ] });
1232
+ var DialogHeaderIcon = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(styles15__default.default["dialog-header-icon"], className), ...props });
1233
+ DialogHeaderIcon.displayName = "DialogHeaderIcon";
1234
+ var DialogHeader = ({ className, children, ...props }) => {
1235
+ const childrenArray = React15__namespace.Children.toArray(children);
1236
+ const icon = childrenArray.find(
1237
+ (child) => React15__namespace.isValidElement(child) && child.type === DialogHeaderIcon
1238
+ );
1239
+ const otherChildren = childrenArray.filter(
1240
+ (child) => !(React15__namespace.isValidElement(child) && child.type === DialogHeaderIcon)
1241
+ );
1242
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(styles15__default.default["dialog-header"], className), ...props, children: [
1243
+ icon,
1244
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles15__default.default["dialog-header-content"], children: otherChildren }),
1245
+ /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(IconButton, { name: "X", label: "Close", size: "sm" }) })
1246
+ ] });
1247
+ };
1236
1248
  DialogHeader.displayName = "DialogHeader";
1237
1249
  var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(styles15__default.default["dialog-footer"], className), ...props });
1238
1250
  DialogFooter.displayName = "DialogFooter";
@@ -3314,6 +3326,7 @@ exports.DialogContent = DialogContent;
3314
3326
  exports.DialogDescription = DialogDescription;
3315
3327
  exports.DialogFooter = DialogFooter;
3316
3328
  exports.DialogHeader = DialogHeader;
3329
+ exports.DialogHeaderIcon = DialogHeaderIcon;
3317
3330
  exports.DialogOverlay = DialogOverlay;
3318
3331
  exports.DialogPortal = DialogPortal;
3319
3332
  exports.DialogTitle = DialogTitle;