sellmate-design-system-react 9.0.0-beta.12 → 9.0.0-beta.13
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.
- package/AGENTS.md +6 -4
- package/dist/components/SDivider/README.md +2 -0
- package/dist/components/SList/README.md +5 -0
- package/dist/index.cjs +45 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +45 -20
- package/dist/index.js.map +1 -1
- package/dist/llms-full.txt +11 -4
- package/dist/llms.txt +6 -4
- package/dist/styles.css +0 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3626,7 +3626,49 @@ var SDraggableItemImpl = /* @__PURE__ */ forwardRef(function SDraggableItem({
|
|
|
3626
3626
|
] });
|
|
3627
3627
|
});
|
|
3628
3628
|
var SDraggableItem2 = /* @__PURE__ */ withDisplayName(SDraggableItemImpl, "SDraggableItem");
|
|
3629
|
+
var SDivider = /* @__PURE__ */ forwardRef(function SDivider2({ vertical = false, className, style, ...rest }, ref) {
|
|
3630
|
+
return /* @__PURE__ */ jsx(
|
|
3631
|
+
"hr",
|
|
3632
|
+
{
|
|
3633
|
+
ref,
|
|
3634
|
+
"aria-orientation": vertical ? "vertical" : "horizontal",
|
|
3635
|
+
className: cn(
|
|
3636
|
+
"shrink-0 border-0",
|
|
3637
|
+
vertical ? "inline-block h-auto w-px self-stretch" : "block h-px w-full",
|
|
3638
|
+
className
|
|
3639
|
+
),
|
|
3640
|
+
style: { backgroundColor: "var(--sys-color-divider-default, #E1E1E1)", ...style },
|
|
3641
|
+
...rest
|
|
3642
|
+
}
|
|
3643
|
+
);
|
|
3644
|
+
});
|
|
3645
|
+
var dividerStyle = { backgroundColor: "var(--cmp-listItem-border-default)" };
|
|
3646
|
+
function hasBorderedChild(children) {
|
|
3647
|
+
let bordered = false;
|
|
3648
|
+
Children.forEach(children, (child) => {
|
|
3649
|
+
if (!isValidElement(child)) return;
|
|
3650
|
+
if (child.props.bordered === true) {
|
|
3651
|
+
bordered = true;
|
|
3652
|
+
return;
|
|
3653
|
+
}
|
|
3654
|
+
Children.forEach(child.props.children, (wrapped) => {
|
|
3655
|
+
if (isValidElement(wrapped) && wrapped.props.bordered === true) {
|
|
3656
|
+
bordered = true;
|
|
3657
|
+
}
|
|
3658
|
+
});
|
|
3659
|
+
});
|
|
3660
|
+
return bordered;
|
|
3661
|
+
}
|
|
3662
|
+
function withDividers(children) {
|
|
3663
|
+
return Children.toArray(children).flatMap(
|
|
3664
|
+
(child, index) => index === 0 ? [child] : [
|
|
3665
|
+
/* @__PURE__ */ jsx(SDivider, { "aria-hidden": "true", style: dividerStyle }, `s-list-divider-${index}`),
|
|
3666
|
+
child
|
|
3667
|
+
]
|
|
3668
|
+
);
|
|
3669
|
+
}
|
|
3629
3670
|
var SListImpl = /* @__PURE__ */ forwardRef(function SList({ className, children, useGap = false, usePadding = false, ...rest }, ref) {
|
|
3671
|
+
const showDivider = !useGap && !hasBorderedChild(children);
|
|
3630
3672
|
return /* @__PURE__ */ jsx(
|
|
3631
3673
|
"div",
|
|
3632
3674
|
{
|
|
@@ -3634,11 +3676,10 @@ var SListImpl = /* @__PURE__ */ forwardRef(function SList({ className, children,
|
|
|
3634
3676
|
className: cn(
|
|
3635
3677
|
useGap && "flex flex-col gap-(--cmp-list-group-gap)",
|
|
3636
3678
|
usePadding && "p-(--cmp-list-group-padding)",
|
|
3637
|
-
"[&>*]:border-b [&>*]:border-(--cmp-listItem-border-default)",
|
|
3638
3679
|
className
|
|
3639
3680
|
),
|
|
3640
3681
|
...rest,
|
|
3641
|
-
children
|
|
3682
|
+
children: showDivider ? withDividers(children) : children
|
|
3642
3683
|
}
|
|
3643
3684
|
);
|
|
3644
3685
|
});
|
|
@@ -5353,22 +5394,6 @@ var SSectionHeaderCardRootImpl = /* @__PURE__ */ forwardRef(
|
|
|
5353
5394
|
}
|
|
5354
5395
|
);
|
|
5355
5396
|
var SSectionHeaderCard2 = /* @__PURE__ */ withDisplayName(SSectionHeaderCardRootImpl, "SSectionHeaderCard");
|
|
5356
|
-
var SDivider = /* @__PURE__ */ forwardRef(function SDivider2({ vertical = false, className, style, ...rest }, ref) {
|
|
5357
|
-
return /* @__PURE__ */ jsx(
|
|
5358
|
-
"hr",
|
|
5359
|
-
{
|
|
5360
|
-
ref,
|
|
5361
|
-
"aria-orientation": vertical ? "vertical" : "horizontal",
|
|
5362
|
-
className: cn(
|
|
5363
|
-
"shrink-0 border-0",
|
|
5364
|
-
vertical ? "inline-block h-auto w-px self-stretch" : "block h-px w-full",
|
|
5365
|
-
className
|
|
5366
|
-
),
|
|
5367
|
-
style: { backgroundColor: "var(--sys-color-divider-default, #E1E1E1)", ...style },
|
|
5368
|
-
...rest
|
|
5369
|
-
}
|
|
5370
|
-
);
|
|
5371
|
-
});
|
|
5372
5397
|
|
|
5373
5398
|
// src/lib/scrollbar.ts
|
|
5374
5399
|
var FIREFOX_SCROLLBAR_CLASS = "supports-[not_selector(::-webkit-scrollbar)]:[scrollbar-width:thin] supports-[not_selector(::-webkit-scrollbar)]:[scrollbar-color:var(--color-grey-45)_transparent]";
|
|
@@ -5451,7 +5476,7 @@ var SSplitterRoot = /* @__PURE__ */ forwardRef(function SSplitter({
|
|
|
5451
5476
|
vertical = false,
|
|
5452
5477
|
disabled = false,
|
|
5453
5478
|
dividerClassName,
|
|
5454
|
-
dividerStyle,
|
|
5479
|
+
dividerStyle: dividerStyle2,
|
|
5455
5480
|
className,
|
|
5456
5481
|
style,
|
|
5457
5482
|
children,
|
|
@@ -5576,7 +5601,7 @@ var SSplitterRoot = /* @__PURE__ */ forwardRef(function SSplitter({
|
|
|
5576
5601
|
),
|
|
5577
5602
|
style: {
|
|
5578
5603
|
...vertical ? { bottom: HIT_END, height: HIT } : { right: HIT_END, width: HIT },
|
|
5579
|
-
...
|
|
5604
|
+
...dividerStyle2
|
|
5580
5605
|
},
|
|
5581
5606
|
children: /* @__PURE__ */ jsx(
|
|
5582
5607
|
"span",
|