@dust-tt/sparkle 0.2.256 → 0.2.257
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/dist/cjs/index.js +82 -19
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/Page.d.ts.map +1 -1
- package/dist/esm/components/Page.js +2 -2
- package/dist/esm/components/Page.js.map +1 -1
- package/dist/esm/components/Separator.d.ts +5 -0
- package/dist/esm/components/Separator.d.ts.map +1 -0
- package/dist/esm/components/Separator.js +11 -0
- package/dist/esm/components/Separator.js.map +1 -0
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/stories/Separator.stories.d.ts +8 -0
- package/dist/esm/stories/Separator.stories.d.ts.map +1 -0
- package/dist/esm/stories/Separator.stories.js +19 -0
- package/dist/esm/stories/Separator.stories.js.map +1 -0
- package/dist/sparkle.css +34 -4
- package/package.json +3 -2
- package/src/components/Page.tsx +2 -3
- package/src/components/Separator.tsx +30 -0
- package/src/components/index.ts +1 -0
- package/src/stories/Separator.stories.tsx +30 -0
package/dist/cjs/index.js
CHANGED
|
@@ -71466,7 +71466,7 @@ function getElementRef$1(element) {
|
|
|
71466
71466
|
}
|
|
71467
71467
|
|
|
71468
71468
|
// packages/react/primitive/src/Primitive.tsx
|
|
71469
|
-
var NODES = [
|
|
71469
|
+
var NODES$1 = [
|
|
71470
71470
|
"a",
|
|
71471
71471
|
"button",
|
|
71472
71472
|
"div",
|
|
@@ -71484,7 +71484,7 @@ var NODES = [
|
|
|
71484
71484
|
"svg",
|
|
71485
71485
|
"ul"
|
|
71486
71486
|
];
|
|
71487
|
-
var Primitive = NODES.reduce((primitive, node) => {
|
|
71487
|
+
var Primitive$1 = NODES$1.reduce((primitive, node) => {
|
|
71488
71488
|
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
71489
71489
|
const { asChild, ...primitiveProps } = props;
|
|
71490
71490
|
const Comp = asChild ? Slot : node;
|
|
@@ -71611,7 +71611,7 @@ var DismissableLayer = React__namespace.forwardRef(
|
|
|
71611
71611
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
71612
71612
|
}, []);
|
|
71613
71613
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
71614
|
-
Primitive.div,
|
|
71614
|
+
Primitive$1.div,
|
|
71615
71615
|
{
|
|
71616
71616
|
...layerProps,
|
|
71617
71617
|
ref: composedRefs,
|
|
@@ -71644,7 +71644,7 @@ var DismissableLayerBranch = React__namespace.forwardRef((props, forwardedRef) =
|
|
|
71644
71644
|
};
|
|
71645
71645
|
}
|
|
71646
71646
|
}, [context.branches]);
|
|
71647
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Primitive.div, { ...props, ref: composedRefs });
|
|
71647
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$1.div, { ...props, ref: composedRefs });
|
|
71648
71648
|
});
|
|
71649
71649
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
71650
71650
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
@@ -73690,11 +73690,11 @@ const arrow = (options, deps) => ({
|
|
|
73690
73690
|
});
|
|
73691
73691
|
|
|
73692
73692
|
// packages/react/arrow/src/Arrow.tsx
|
|
73693
|
-
var NAME$
|
|
73693
|
+
var NAME$2 = "Arrow";
|
|
73694
73694
|
var Arrow$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
73695
73695
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
73696
73696
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
73697
|
-
Primitive.svg,
|
|
73697
|
+
Primitive$1.svg,
|
|
73698
73698
|
{
|
|
73699
73699
|
...arrowProps,
|
|
73700
73700
|
ref: forwardedRef,
|
|
@@ -73706,8 +73706,8 @@ var Arrow$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
73706
73706
|
}
|
|
73707
73707
|
);
|
|
73708
73708
|
});
|
|
73709
|
-
Arrow$1.displayName = NAME$
|
|
73710
|
-
var Root$
|
|
73709
|
+
Arrow$1.displayName = NAME$2;
|
|
73710
|
+
var Root$2 = Arrow$1;
|
|
73711
73711
|
|
|
73712
73712
|
// packages/react/context/src/createContext.tsx
|
|
73713
73713
|
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
@@ -73823,7 +73823,7 @@ var PopperAnchor = React__namespace.forwardRef(
|
|
|
73823
73823
|
React__namespace.useEffect(() => {
|
|
73824
73824
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
73825
73825
|
});
|
|
73826
|
-
return virtualRef ? null : /* @__PURE__ */ jsxRuntime.jsx(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
73826
|
+
return virtualRef ? null : /* @__PURE__ */ jsxRuntime.jsx(Primitive$1.div, { ...anchorProps, ref: composedRefs });
|
|
73827
73827
|
}
|
|
73828
73828
|
);
|
|
73829
73829
|
PopperAnchor.displayName = ANCHOR_NAME;
|
|
@@ -73950,7 +73950,7 @@ var PopperContent = React__namespace.forwardRef(
|
|
|
73950
73950
|
arrowY,
|
|
73951
73951
|
shouldHideArrow: cannotCenterArrow,
|
|
73952
73952
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
73953
|
-
Primitive.div,
|
|
73953
|
+
Primitive$1.div,
|
|
73954
73954
|
{
|
|
73955
73955
|
"data-side": placedSide,
|
|
73956
73956
|
"data-align": placedAlign,
|
|
@@ -74010,7 +74010,7 @@ var PopperArrow = React__namespace.forwardRef(function PopperArrow2(props, forwa
|
|
|
74010
74010
|
visibility: contentContext.shouldHideArrow ? "hidden" : void 0
|
|
74011
74011
|
},
|
|
74012
74012
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
74013
|
-
Root$
|
|
74013
|
+
Root$2,
|
|
74014
74014
|
{
|
|
74015
74015
|
...arrowProps,
|
|
74016
74016
|
ref: forwardedRef,
|
|
@@ -74256,11 +74256,11 @@ function useUncontrolledState({
|
|
|
74256
74256
|
}
|
|
74257
74257
|
|
|
74258
74258
|
// packages/react/visually-hidden/src/VisuallyHidden.tsx
|
|
74259
|
-
var NAME = "VisuallyHidden";
|
|
74259
|
+
var NAME$1 = "VisuallyHidden";
|
|
74260
74260
|
var VisuallyHidden = React__namespace.forwardRef(
|
|
74261
74261
|
(props, forwardedRef) => {
|
|
74262
74262
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
74263
|
-
Primitive.span,
|
|
74263
|
+
Primitive$1.span,
|
|
74264
74264
|
{
|
|
74265
74265
|
...props,
|
|
74266
74266
|
ref: forwardedRef,
|
|
@@ -74282,8 +74282,8 @@ var VisuallyHidden = React__namespace.forwardRef(
|
|
|
74282
74282
|
);
|
|
74283
74283
|
}
|
|
74284
74284
|
);
|
|
74285
|
-
VisuallyHidden.displayName = NAME;
|
|
74286
|
-
var Root = VisuallyHidden;
|
|
74285
|
+
VisuallyHidden.displayName = NAME$1;
|
|
74286
|
+
var Root$1 = VisuallyHidden;
|
|
74287
74287
|
|
|
74288
74288
|
var [createTooltipContext, createTooltipScope] = createContextScope$1("Tooltip", [
|
|
74289
74289
|
createPopperScope
|
|
@@ -74434,7 +74434,7 @@ var TooltipTrigger$1 = React__namespace.forwardRef(
|
|
|
74434
74434
|
return () => document.removeEventListener("pointerup", handlePointerUp);
|
|
74435
74435
|
}, [handlePointerUp]);
|
|
74436
74436
|
return /* @__PURE__ */ jsxRuntime.jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
74437
|
-
Primitive.button,
|
|
74437
|
+
Primitive$1.button,
|
|
74438
74438
|
{
|
|
74439
74439
|
"aria-describedby": context.open ? context.contentId : void 0,
|
|
74440
74440
|
"data-state": context.stateAttribute,
|
|
@@ -74596,7 +74596,7 @@ var TooltipContentImpl = React__namespace.forwardRef(
|
|
|
74596
74596
|
},
|
|
74597
74597
|
children: [
|
|
74598
74598
|
/* @__PURE__ */ jsxRuntime.jsx(Slottable, { children }),
|
|
74599
|
-
/* @__PURE__ */ jsxRuntime.jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsxRuntime.jsx(Root, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
|
|
74599
|
+
/* @__PURE__ */ jsxRuntime.jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsxRuntime.jsx(Root$1, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
|
|
74600
74600
|
]
|
|
74601
74601
|
}
|
|
74602
74602
|
)
|
|
@@ -132203,6 +132203,69 @@ function Notification(_a) {
|
|
|
132203
132203
|
description && (React.createElement("div", { className: "s-line-clamp-3 s-pr-2 s-text-sm s-font-normal s-text-element-700" }, description)))));
|
|
132204
132204
|
}
|
|
132205
132205
|
|
|
132206
|
+
// packages/react/primitive/src/Primitive.tsx
|
|
132207
|
+
var NODES = [
|
|
132208
|
+
"a",
|
|
132209
|
+
"button",
|
|
132210
|
+
"div",
|
|
132211
|
+
"form",
|
|
132212
|
+
"h2",
|
|
132213
|
+
"h3",
|
|
132214
|
+
"img",
|
|
132215
|
+
"input",
|
|
132216
|
+
"label",
|
|
132217
|
+
"li",
|
|
132218
|
+
"nav",
|
|
132219
|
+
"ol",
|
|
132220
|
+
"p",
|
|
132221
|
+
"span",
|
|
132222
|
+
"svg",
|
|
132223
|
+
"ul"
|
|
132224
|
+
];
|
|
132225
|
+
var Primitive = NODES.reduce((primitive, node) => {
|
|
132226
|
+
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
132227
|
+
const { asChild, ...primitiveProps } = props;
|
|
132228
|
+
const Comp = asChild ? Slot : node;
|
|
132229
|
+
if (typeof window !== "undefined") {
|
|
132230
|
+
window[Symbol.for("radix-ui")] = true;
|
|
132231
|
+
}
|
|
132232
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
132233
|
+
});
|
|
132234
|
+
Node.displayName = `Primitive.${node}`;
|
|
132235
|
+
return { ...primitive, [node]: Node };
|
|
132236
|
+
}, {});
|
|
132237
|
+
|
|
132238
|
+
// packages/react/separator/src/Separator.tsx
|
|
132239
|
+
var NAME = "Separator";
|
|
132240
|
+
var DEFAULT_ORIENTATION = "horizontal";
|
|
132241
|
+
var ORIENTATIONS = ["horizontal", "vertical"];
|
|
132242
|
+
var Separator$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
132243
|
+
const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;
|
|
132244
|
+
const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;
|
|
132245
|
+
const ariaOrientation = orientation === "vertical" ? orientation : void 0;
|
|
132246
|
+
const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" };
|
|
132247
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
132248
|
+
Primitive.div,
|
|
132249
|
+
{
|
|
132250
|
+
"data-orientation": orientation,
|
|
132251
|
+
...semanticProps,
|
|
132252
|
+
...domProps,
|
|
132253
|
+
ref: forwardedRef
|
|
132254
|
+
}
|
|
132255
|
+
);
|
|
132256
|
+
});
|
|
132257
|
+
Separator$1.displayName = NAME;
|
|
132258
|
+
function isValidOrientation(orientation) {
|
|
132259
|
+
return ORIENTATIONS.includes(orientation);
|
|
132260
|
+
}
|
|
132261
|
+
var Root = Separator$1;
|
|
132262
|
+
|
|
132263
|
+
var Separator = React__namespace.forwardRef(function (_a, ref) {
|
|
132264
|
+
var className = _a.className, _b = _a.orientation, orientation = _b === void 0 ? "horizontal" : _b, _c = _a.decorative, decorative = _c === void 0 ? true : _c, props = __rest(_a, ["className", "orientation", "decorative"]);
|
|
132265
|
+
return (React__namespace.createElement(Root, __assign({ ref: ref, decorative: decorative, orientation: orientation, className: classNames("s-bg-separator s-shrink-0", orientation === "horizontal" ? "s-h-[1px] s-w-full" : "s-h-full s-w-[1px]", className !== null && className !== void 0 ? className : "") }, props)));
|
|
132266
|
+
});
|
|
132267
|
+
Separator.displayName = Root.displayName;
|
|
132268
|
+
|
|
132206
132269
|
function Page(_a) {
|
|
132207
132270
|
var children = _a.children, _b = _a.variant, variant = _b === void 0 ? "normal" : _b;
|
|
132208
132271
|
var mainVariantClasses = variant === "normal" ? "s-h-full s-py-16" : "s-h-full s-py-4 s-px-2";
|
|
@@ -132228,8 +132291,7 @@ Page.SectionHeader = function (_a) {
|
|
|
132228
132291
|
React.createElement(Button, __assign({}, action))))));
|
|
132229
132292
|
};
|
|
132230
132293
|
Page.Separator = function () {
|
|
132231
|
-
return (React.createElement(
|
|
132232
|
-
React.createElement("div", { className: "s-h-px s-w-full s-bg-structure-200" })));
|
|
132294
|
+
return (React.createElement(Separator, null));
|
|
132233
132295
|
};
|
|
132234
132296
|
var PsizeClasses = {
|
|
132235
132297
|
xs: "s-text-xs",
|
|
@@ -133212,6 +133274,7 @@ exports.SalesforceLogo = SvgSalesforce;
|
|
|
133212
133274
|
exports.ScanIcon = SvgScan$1;
|
|
133213
133275
|
exports.ScanStrokeIcon = SvgScan;
|
|
133214
133276
|
exports.Searchbar = Searchbar;
|
|
133277
|
+
exports.Separator = Separator;
|
|
133215
133278
|
exports.ServerIcon = SvgServer$1;
|
|
133216
133279
|
exports.ServerStrokeIcon = SvgServer;
|
|
133217
133280
|
exports.ShakeHandsIcon = SvgShakeHands$1;
|