@assure-one/design-system 0.12.0 → 0.13.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.
- package/dist/index.d.ts +25 -5
- package/dist/index.js +34 -6
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2364,7 +2364,7 @@ type MessageBubbleComponent = React.ForwardRefExoticComponent<MessageBubbleProps
|
|
|
2364
2364
|
* <QuickReplyChips … />
|
|
2365
2365
|
* </ThreadComposer.Accessory>
|
|
2366
2366
|
* <ThreadComposer.Input>
|
|
2367
|
-
* <MentionInput … />
|
|
2367
|
+
* <MentionInput … /> // no chrome-override classes needed
|
|
2368
2368
|
* </ThreadComposer.Input>
|
|
2369
2369
|
* <ThreadComposer.Footer
|
|
2370
2370
|
* start={<Switch size="sm" … /> Show activity}
|
|
@@ -2373,10 +2373,30 @@ type MessageBubbleComponent = React.ForwardRefExoticComponent<MessageBubbleProps
|
|
|
2373
2373
|
* </ThreadComposer>
|
|
2374
2374
|
*
|
|
2375
2375
|
* The composer owns the rounded card chrome, hairline border, and the
|
|
2376
|
-
* subtle focus-within shadow lift. The
|
|
2377
|
-
*
|
|
2378
|
-
|
|
2379
|
-
|
|
2376
|
+
* subtle focus-within shadow lift. The `Input` slot bakes-in a chrome
|
|
2377
|
+
* reset on its direct children — so a `<MentionInput>` (or any wrapper
|
|
2378
|
+
* that paints its own `rounded-xl border bg-input-background shadow`)
|
|
2379
|
+
* drops to borderless automatically without the consumer having to
|
|
2380
|
+
* neutralise six classes inline.
|
|
2381
|
+
*
|
|
2382
|
+
* Disabled state: pass `disabled` on the root to grey-out the whole
|
|
2383
|
+
* card, block pointer events, and set `aria-disabled` + `data-state`
|
|
2384
|
+
* for analytics/CSS targeting. Input children that own their own
|
|
2385
|
+
* editing state (Tiptap, contenteditable) should also read
|
|
2386
|
+
* `aria-disabled` from the root and refuse edits themselves.
|
|
2387
|
+
*
|
|
2388
|
+
* Footer slot API: `start`/`end` props (rather than children) — Footer
|
|
2389
|
+
* has a fixed two-region horizontal layout, and arbitrary children
|
|
2390
|
+
* would invite consumers to over-pack it. Accessory and Input take
|
|
2391
|
+
* children because their content is open-ended.
|
|
2392
|
+
*/
|
|
2393
|
+
interface ThreadComposerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2394
|
+
/** When true, the composer renders disabled: 60% opacity, pointer
|
|
2395
|
+
* events blocked, `aria-disabled` set, `data-state="disabled"`.
|
|
2396
|
+
* Input children that own editing state should also refuse edits
|
|
2397
|
+
* themselves (e.g. pass `editable={!disabled}` to Tiptap). */
|
|
2398
|
+
disabled?: boolean;
|
|
2399
|
+
}
|
|
2380
2400
|
declare const ThreadComposer: ThreadComposerComponent;
|
|
2381
2401
|
type ThreadComposerAccessoryProps = React.HTMLAttributes<HTMLDivElement>;
|
|
2382
2402
|
declare const ThreadComposerAccessory: React$1.ForwardRefExoticComponent<ThreadComposerAccessoryProps & React$1.RefAttributes<HTMLDivElement>>;
|
package/dist/index.js
CHANGED
|
@@ -2627,16 +2627,16 @@ function BrandIcon({
|
|
|
2627
2627
|
);
|
|
2628
2628
|
}
|
|
2629
2629
|
function AssureProBrandIcon({ size = 24, ...props }) {
|
|
2630
|
-
return /* @__PURE__ */ jsx(BrandIcon, { size, accent: "
|
|
2630
|
+
return /* @__PURE__ */ jsx(BrandIcon, { size, accent: "var(--color-brand-pro)", title: "Assure Pro", ...props });
|
|
2631
2631
|
}
|
|
2632
2632
|
function AssureAuditBrandIcon({ size = 24, ...props }) {
|
|
2633
|
-
return /* @__PURE__ */ jsx(BrandIcon, { size, accent: "
|
|
2633
|
+
return /* @__PURE__ */ jsx(BrandIcon, { size, accent: "var(--color-brand-audit)", title: "Assure Audit", ...props });
|
|
2634
2634
|
}
|
|
2635
2635
|
function AssureBooksBrandIcon({ size = 24, ...props }) {
|
|
2636
|
-
return /* @__PURE__ */ jsx(BrandIcon, { size, accent: "
|
|
2636
|
+
return /* @__PURE__ */ jsx(BrandIcon, { size, accent: "var(--color-brand-books)", title: "Assure Books", ...props });
|
|
2637
2637
|
}
|
|
2638
2638
|
function AssureTaxBrandIcon({ size = 24, ...props }) {
|
|
2639
|
-
return /* @__PURE__ */ jsx(BrandIcon, { size, accent: "
|
|
2639
|
+
return /* @__PURE__ */ jsx(BrandIcon, { size, accent: "var(--color-brand-tax)", title: "Assure Tax", ...props });
|
|
2640
2640
|
}
|
|
2641
2641
|
var Breadcrumb = forwardRef(function Breadcrumb2({ className, ...props }, ref) {
|
|
2642
2642
|
return /* @__PURE__ */ jsx("nav", { ref, "aria-label": "Breadcrumb", className: cn(className), ...props });
|
|
@@ -9532,16 +9532,20 @@ MessageBubbleAction.displayName = "MessageBubble.Action";
|
|
|
9532
9532
|
MessageBubble.Tombstone = MessageBubbleTombstone;
|
|
9533
9533
|
MessageBubble.Action = MessageBubbleAction;
|
|
9534
9534
|
var ThreadComposer = forwardRef(
|
|
9535
|
-
function ThreadComposer2({ className, children, ...props }, ref) {
|
|
9535
|
+
function ThreadComposer2({ disabled = false, className, children, ...props }, ref) {
|
|
9536
9536
|
return /* @__PURE__ */ jsx(
|
|
9537
9537
|
"div",
|
|
9538
9538
|
{
|
|
9539
9539
|
ref,
|
|
9540
|
+
"data-slot": "thread-composer",
|
|
9541
|
+
"data-state": disabled ? "disabled" : "idle",
|
|
9542
|
+
"aria-disabled": disabled || void 0,
|
|
9540
9543
|
className: cn(
|
|
9541
9544
|
"relative flex flex-col",
|
|
9542
9545
|
"border-rule bg-input-background rounded-xl border",
|
|
9543
9546
|
"transition-shadow duration-150",
|
|
9544
9547
|
"focus-within:border-accent-ring focus-within:bg-surface focus-within:shadow-sm",
|
|
9548
|
+
disabled && "pointer-events-none opacity-60",
|
|
9545
9549
|
className
|
|
9546
9550
|
),
|
|
9547
9551
|
...props,
|
|
@@ -9557,6 +9561,7 @@ var ThreadComposerAccessory = forwardRef(
|
|
|
9557
9561
|
"div",
|
|
9558
9562
|
{
|
|
9559
9563
|
ref,
|
|
9564
|
+
"data-slot": "thread-composer-accessory",
|
|
9560
9565
|
className: cn(
|
|
9561
9566
|
"flex shrink-0 items-center gap-1.5 overflow-x-auto px-3 pt-2",
|
|
9562
9567
|
className
|
|
@@ -9570,7 +9575,29 @@ var ThreadComposerAccessory = forwardRef(
|
|
|
9570
9575
|
ThreadComposerAccessory.displayName = "ThreadComposer.Accessory";
|
|
9571
9576
|
var ThreadComposerInput = forwardRef(
|
|
9572
9577
|
function ThreadComposerInput2({ className, children, ...props }, ref) {
|
|
9573
|
-
return /* @__PURE__ */ jsx(
|
|
9578
|
+
return /* @__PURE__ */ jsx(
|
|
9579
|
+
"div",
|
|
9580
|
+
{
|
|
9581
|
+
ref,
|
|
9582
|
+
"data-slot": "thread-composer-input",
|
|
9583
|
+
className: cn(
|
|
9584
|
+
"min-h-0 flex-1 px-1 pt-1",
|
|
9585
|
+
// Bake-in chrome reset: the composer's outer card IS the input's
|
|
9586
|
+
// chrome. Direct child wrappers (e.g. mention/textarea wrappers
|
|
9587
|
+
// that paint their own border, bg, or shadow) drop that chrome
|
|
9588
|
+
// when nested here so consumers don't need to neutralise it
|
|
9589
|
+
// class-by-class at the call site. `!` is justified because the
|
|
9590
|
+
// composer's contract is "I own chrome; child input is
|
|
9591
|
+
// decoration-free."
|
|
9592
|
+
"[&>*]:!rounded-none [&>*]:!border-0 [&>*]:!bg-transparent [&>*]:!shadow-none",
|
|
9593
|
+
"[&>*:hover]:!border-0",
|
|
9594
|
+
"[&>*:focus-within]:!border-0 [&>*:focus-within]:!bg-transparent [&>*:focus-within]:!shadow-none",
|
|
9595
|
+
className
|
|
9596
|
+
),
|
|
9597
|
+
...props,
|
|
9598
|
+
children
|
|
9599
|
+
}
|
|
9600
|
+
);
|
|
9574
9601
|
}
|
|
9575
9602
|
);
|
|
9576
9603
|
ThreadComposerInput.displayName = "ThreadComposer.Input";
|
|
@@ -9580,6 +9607,7 @@ var ThreadComposerFooter = forwardRef(
|
|
|
9580
9607
|
"div",
|
|
9581
9608
|
{
|
|
9582
9609
|
ref,
|
|
9610
|
+
"data-slot": "thread-composer-footer",
|
|
9583
9611
|
className: cn(
|
|
9584
9612
|
"flex shrink-0 items-center justify-between gap-2 px-3 pb-2.5 pt-1.5",
|
|
9585
9613
|
className
|