@maxsteinwender/sort-ui 1.1.1 → 1.1.2
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.mts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +87 -6
- package/dist/index.mjs +87 -6
- package/dist/styles.css +17 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -212,8 +212,10 @@ interface BadgeProps extends React$1.HTMLAttributes<HTMLSpanElement> {
|
|
|
212
212
|
* Use when Badge is nested inside a `<button>` (e.g. tags in a select trigger).
|
|
213
213
|
*/
|
|
214
214
|
closeAsSpan?: boolean;
|
|
215
|
+
/** Animate with a pulsing opacity (1 → 0.5 → 1). For live/online/recording indicators. Respects prefers-reduced-motion. */
|
|
216
|
+
pulse?: boolean;
|
|
215
217
|
}
|
|
216
|
-
declare function Badge({ color, size, shape, variant, src, icon, border, onClose, closeAsSpan, className, children, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
218
|
+
declare function Badge({ color, size, shape, variant, src, icon, border, onClose, closeAsSpan, pulse, className, children, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
217
219
|
|
|
218
220
|
declare const Breadcrumb: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
219
221
|
separator?: React$1.ReactNode;
|
|
@@ -1179,6 +1181,10 @@ declare const inlineTipsVariants: (props?: ({
|
|
|
1179
1181
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1180
1182
|
interface InlineTipsProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof inlineTipsVariants> {
|
|
1181
1183
|
title?: string;
|
|
1184
|
+
/** Additional detail content revealed in a collapsible panel below the main message. */
|
|
1185
|
+
details?: React$1.ReactNode;
|
|
1186
|
+
/** Whether the collapsible details panel is open by default. Only used when `details` is provided. */
|
|
1187
|
+
defaultOpen?: boolean;
|
|
1182
1188
|
}
|
|
1183
1189
|
declare const InlineTips: React$1.ForwardRefExoticComponent<InlineTipsProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1184
1190
|
|
|
@@ -1280,6 +1286,10 @@ interface InputFieldProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElem
|
|
|
1280
1286
|
tailAddon?: string;
|
|
1281
1287
|
/** Additional className applied to the inner <input> element */
|
|
1282
1288
|
inputClassName?: string;
|
|
1289
|
+
/** Show an × button when the field has a value. Only applies to the standard layout (no `tags`). */
|
|
1290
|
+
clearable?: boolean;
|
|
1291
|
+
/** Called after the field is cleared. */
|
|
1292
|
+
onClear?: () => void;
|
|
1283
1293
|
}
|
|
1284
1294
|
/**
|
|
1285
1295
|
* Sort UI InputField — labelled input with optional lead/tail/prefix/suffix slots.
|
package/dist/index.d.ts
CHANGED
|
@@ -212,8 +212,10 @@ interface BadgeProps extends React$1.HTMLAttributes<HTMLSpanElement> {
|
|
|
212
212
|
* Use when Badge is nested inside a `<button>` (e.g. tags in a select trigger).
|
|
213
213
|
*/
|
|
214
214
|
closeAsSpan?: boolean;
|
|
215
|
+
/** Animate with a pulsing opacity (1 → 0.5 → 1). For live/online/recording indicators. Respects prefers-reduced-motion. */
|
|
216
|
+
pulse?: boolean;
|
|
215
217
|
}
|
|
216
|
-
declare function Badge({ color, size, shape, variant, src, icon, border, onClose, closeAsSpan, className, children, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
218
|
+
declare function Badge({ color, size, shape, variant, src, icon, border, onClose, closeAsSpan, pulse, className, children, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
217
219
|
|
|
218
220
|
declare const Breadcrumb: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
219
221
|
separator?: React$1.ReactNode;
|
|
@@ -1179,6 +1181,10 @@ declare const inlineTipsVariants: (props?: ({
|
|
|
1179
1181
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1180
1182
|
interface InlineTipsProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof inlineTipsVariants> {
|
|
1181
1183
|
title?: string;
|
|
1184
|
+
/** Additional detail content revealed in a collapsible panel below the main message. */
|
|
1185
|
+
details?: React$1.ReactNode;
|
|
1186
|
+
/** Whether the collapsible details panel is open by default. Only used when `details` is provided. */
|
|
1187
|
+
defaultOpen?: boolean;
|
|
1182
1188
|
}
|
|
1183
1189
|
declare const InlineTips: React$1.ForwardRefExoticComponent<InlineTipsProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1184
1190
|
|
|
@@ -1280,6 +1286,10 @@ interface InputFieldProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElem
|
|
|
1280
1286
|
tailAddon?: string;
|
|
1281
1287
|
/** Additional className applied to the inner <input> element */
|
|
1282
1288
|
inputClassName?: string;
|
|
1289
|
+
/** Show an × button when the field has a value. Only applies to the standard layout (no `tags`). */
|
|
1290
|
+
clearable?: boolean;
|
|
1291
|
+
/** Called after the field is cleared. */
|
|
1292
|
+
onClear?: () => void;
|
|
1283
1293
|
}
|
|
1284
1294
|
/**
|
|
1285
1295
|
* Sort UI InputField — labelled input with optional lead/tail/prefix/suffix slots.
|
package/dist/index.js
CHANGED
|
@@ -1362,6 +1362,7 @@ function Badge(_a) {
|
|
|
1362
1362
|
border = false,
|
|
1363
1363
|
onClose,
|
|
1364
1364
|
closeAsSpan = false,
|
|
1365
|
+
pulse = false,
|
|
1365
1366
|
className,
|
|
1366
1367
|
children
|
|
1367
1368
|
} = _b, props = __objRest(_b, [
|
|
@@ -1374,6 +1375,7 @@ function Badge(_a) {
|
|
|
1374
1375
|
"border",
|
|
1375
1376
|
"onClose",
|
|
1376
1377
|
"closeAsSpan",
|
|
1378
|
+
"pulse",
|
|
1377
1379
|
"className",
|
|
1378
1380
|
"children"
|
|
1379
1381
|
]);
|
|
@@ -1393,6 +1395,7 @@ function Badge(_a) {
|
|
|
1393
1395
|
text,
|
|
1394
1396
|
isNeutral && "backdrop-blur-[4px]",
|
|
1395
1397
|
border && "ring-1 ring-inset ring-sui-border-default",
|
|
1398
|
+
pulse && "animate-pulse",
|
|
1396
1399
|
className
|
|
1397
1400
|
)
|
|
1398
1401
|
}, props), {
|
|
@@ -4368,6 +4371,10 @@ var InputField = React78__namespace.forwardRef(
|
|
|
4368
4371
|
leadAddon,
|
|
4369
4372
|
tailAddon,
|
|
4370
4373
|
inputClassName,
|
|
4374
|
+
clearable,
|
|
4375
|
+
onClear,
|
|
4376
|
+
value,
|
|
4377
|
+
onChange,
|
|
4371
4378
|
disabled,
|
|
4372
4379
|
id,
|
|
4373
4380
|
spellCheck,
|
|
@@ -4394,6 +4401,10 @@ var InputField = React78__namespace.forwardRef(
|
|
|
4394
4401
|
"leadAddon",
|
|
4395
4402
|
"tailAddon",
|
|
4396
4403
|
"inputClassName",
|
|
4404
|
+
"clearable",
|
|
4405
|
+
"onClear",
|
|
4406
|
+
"value",
|
|
4407
|
+
"onChange",
|
|
4397
4408
|
"disabled",
|
|
4398
4409
|
"id",
|
|
4399
4410
|
"spellCheck",
|
|
@@ -4407,6 +4418,27 @@ var InputField = React78__namespace.forwardRef(
|
|
|
4407
4418
|
const hasInlineTags = !!(tags && tags.length > 0 && !hasError && !disabled);
|
|
4408
4419
|
const innerRef = React78__namespace.useRef(null);
|
|
4409
4420
|
React78__namespace.useImperativeHandle(ref, () => innerRef.current, []);
|
|
4421
|
+
const [internalHasValue, setInternalHasValue] = React78__namespace.useState(false);
|
|
4422
|
+
const hasValue = clearable ? typeof value === "string" ? value.length > 0 : internalHasValue : false;
|
|
4423
|
+
const handleChange = (e) => {
|
|
4424
|
+
if (clearable && value === void 0) {
|
|
4425
|
+
setInternalHasValue(e.target.value.length > 0);
|
|
4426
|
+
}
|
|
4427
|
+
onChange == null ? void 0 : onChange(e);
|
|
4428
|
+
};
|
|
4429
|
+
const handleClear = () => {
|
|
4430
|
+
var _a2;
|
|
4431
|
+
if (!innerRef.current || disabled) return;
|
|
4432
|
+
const nativeInputValueSetter = (_a2 = Object.getOwnPropertyDescriptor(
|
|
4433
|
+
window.HTMLInputElement.prototype,
|
|
4434
|
+
"value"
|
|
4435
|
+
)) == null ? void 0 : _a2.set;
|
|
4436
|
+
nativeInputValueSetter == null ? void 0 : nativeInputValueSetter.call(innerRef.current, "");
|
|
4437
|
+
innerRef.current.dispatchEvent(new Event("input", { bubbles: true }));
|
|
4438
|
+
setInternalHasValue(false);
|
|
4439
|
+
innerRef.current.focus();
|
|
4440
|
+
onClear == null ? void 0 : onClear();
|
|
4441
|
+
};
|
|
4410
4442
|
const focusInputOnDecorationClick = (e) => {
|
|
4411
4443
|
var _a2;
|
|
4412
4444
|
if (disabled) return;
|
|
@@ -4487,6 +4519,8 @@ var InputField = React78__namespace.forwardRef(
|
|
|
4487
4519
|
__spreadValues({
|
|
4488
4520
|
ref: innerRef,
|
|
4489
4521
|
id: inputId,
|
|
4522
|
+
value,
|
|
4523
|
+
onChange: handleChange,
|
|
4490
4524
|
disabled,
|
|
4491
4525
|
required,
|
|
4492
4526
|
spellCheck: resolvedSpellCheck,
|
|
@@ -4529,6 +4563,8 @@ var InputField = React78__namespace.forwardRef(
|
|
|
4529
4563
|
__spreadValues({
|
|
4530
4564
|
ref: innerRef,
|
|
4531
4565
|
id: inputId,
|
|
4566
|
+
value,
|
|
4567
|
+
onChange: handleChange,
|
|
4532
4568
|
disabled,
|
|
4533
4569
|
required,
|
|
4534
4570
|
spellCheck: resolvedSpellCheck,
|
|
@@ -4549,6 +4585,22 @@ var InputField = React78__namespace.forwardRef(
|
|
|
4549
4585
|
"shrink-0 text-sm font-medium leading-5",
|
|
4550
4586
|
disabled ? "text-sui-text-hint" : "text-sui-text-muted"
|
|
4551
4587
|
), children: suffix }),
|
|
4588
|
+
clearable && hasValue && !disabled && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4589
|
+
"button",
|
|
4590
|
+
{
|
|
4591
|
+
type: "button",
|
|
4592
|
+
tabIndex: -1,
|
|
4593
|
+
onClick: handleClear,
|
|
4594
|
+
"aria-label": "Clear",
|
|
4595
|
+
className: cn(
|
|
4596
|
+
"flex size-5 shrink-0 items-center justify-center rounded-xs",
|
|
4597
|
+
"text-icon-default-muted transition-colors",
|
|
4598
|
+
"[@media(hover:hover)]:hover:text-icon-default",
|
|
4599
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sui-border-highlight"
|
|
4600
|
+
),
|
|
4601
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("i", { className: "ri-close-circle-fill text-base", "aria-hidden": "true" })
|
|
4602
|
+
}
|
|
4603
|
+
),
|
|
4552
4604
|
tailIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4553
4605
|
"span",
|
|
4554
4606
|
{
|
|
@@ -4750,7 +4802,7 @@ function DatePicker({
|
|
|
4750
4802
|
size: "md",
|
|
4751
4803
|
disabled,
|
|
4752
4804
|
className: cn(
|
|
4753
|
-
"w-
|
|
4805
|
+
"w-sui-240 justify-start gap-2 text-left font-normal",
|
|
4754
4806
|
!date && "text-sui-text-muted",
|
|
4755
4807
|
className
|
|
4756
4808
|
),
|
|
@@ -4791,7 +4843,7 @@ function DateRangePicker({
|
|
|
4791
4843
|
size: "md",
|
|
4792
4844
|
disabled,
|
|
4793
4845
|
className: cn(
|
|
4794
|
-
"w-
|
|
4846
|
+
"w-sui-320 justify-start gap-2 text-left font-normal",
|
|
4795
4847
|
!(dateRange == null ? void 0 : dateRange.from) && "text-sui-text-muted",
|
|
4796
4848
|
className
|
|
4797
4849
|
),
|
|
@@ -4842,7 +4894,7 @@ function DatePickerWithPresets({
|
|
|
4842
4894
|
size: "md",
|
|
4843
4895
|
disabled,
|
|
4844
4896
|
className: cn(
|
|
4845
|
-
"w-
|
|
4897
|
+
"w-sui-240 justify-start gap-2 text-left font-normal",
|
|
4846
4898
|
!date && "text-sui-text-muted",
|
|
4847
4899
|
className
|
|
4848
4900
|
),
|
|
@@ -6700,12 +6752,16 @@ var InlineTips = React78__namespace.forwardRef(
|
|
|
6700
6752
|
variant = "default",
|
|
6701
6753
|
colorStyle = "neutral",
|
|
6702
6754
|
title,
|
|
6755
|
+
details,
|
|
6756
|
+
defaultOpen = false,
|
|
6703
6757
|
children
|
|
6704
6758
|
} = _b, props = __objRest(_b, [
|
|
6705
6759
|
"className",
|
|
6706
6760
|
"variant",
|
|
6707
6761
|
"colorStyle",
|
|
6708
6762
|
"title",
|
|
6763
|
+
"details",
|
|
6764
|
+
"defaultOpen",
|
|
6709
6765
|
"children"
|
|
6710
6766
|
]);
|
|
6711
6767
|
const lineColor = lineColorMap[variant != null ? variant : "default"];
|
|
@@ -6727,7 +6783,32 @@ var InlineTips = React78__namespace.forwardRef(
|
|
|
6727
6783
|
style: { minWidth: 4 }
|
|
6728
6784
|
}
|
|
6729
6785
|
),
|
|
6730
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6786
|
+
details ? /* @__PURE__ */ jsxRuntime.jsxs(Collapsible, { defaultOpen, className: "flex-1 min-w-0", children: [
|
|
6787
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
6788
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex-1 min-w-0", children: [
|
|
6789
|
+
title && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-bold", children: [
|
|
6790
|
+
title,
|
|
6791
|
+
" "
|
|
6792
|
+
] }),
|
|
6793
|
+
children
|
|
6794
|
+
] }),
|
|
6795
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6796
|
+
CollapsibleTrigger2,
|
|
6797
|
+
{
|
|
6798
|
+
className: cn(
|
|
6799
|
+
"shrink-0 flex size-5 items-center justify-center rounded-xs",
|
|
6800
|
+
"text-icon-default-muted transition-transform duration-150",
|
|
6801
|
+
"[@media(hover:hover)]:hover:text-icon-default",
|
|
6802
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sui-border-highlight",
|
|
6803
|
+
"[&[data-state=open]>i]:rotate-180"
|
|
6804
|
+
),
|
|
6805
|
+
"aria-label": defaultOpen ? "Collapse details" : "Expand details",
|
|
6806
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("i", { className: "ri-arrow-down-s-line text-base transition-transform duration-150" })
|
|
6807
|
+
}
|
|
6808
|
+
)
|
|
6809
|
+
] }),
|
|
6810
|
+
/* @__PURE__ */ jsxRuntime.jsx(CollapsibleContent2, { className: "overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 text-sui-text-subtle", children: details }) })
|
|
6811
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex-1 min-w-0", children: [
|
|
6731
6812
|
title && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-bold", children: [
|
|
6732
6813
|
title,
|
|
6733
6814
|
" "
|
|
@@ -12774,7 +12855,7 @@ var TextAreaField = React78__namespace.forwardRef(
|
|
|
12774
12855
|
compact ? cn(
|
|
12775
12856
|
// Compact: single-row horizontal layout
|
|
12776
12857
|
"flex-row items-center gap-2.5",
|
|
12777
|
-
inputStyle === "soft" && !hasError && !disabled ? "p-
|
|
12858
|
+
inputStyle === "soft" && !hasError && !disabled ? "p-sui-12" : "p-3"
|
|
12778
12859
|
) : bottomToolbar ? cn(
|
|
12779
12860
|
// Toolbar mode: no padding on container, textarea gets its own
|
|
12780
12861
|
"flex-col gap-0 p-0"
|
|
@@ -13457,7 +13538,7 @@ var Userbar = React78__namespace.forwardRef(
|
|
|
13457
13538
|
align: dropdownAlign,
|
|
13458
13539
|
sideOffset: dropdownSideOffset != null ? dropdownSideOffset : defaultSideOffset,
|
|
13459
13540
|
alignOffset: dropdownAlignOffset != null ? dropdownAlignOffset : defaultAlignOffset,
|
|
13460
|
-
className: "w-
|
|
13541
|
+
className: "w-sui-240",
|
|
13461
13542
|
children: dropdownContent
|
|
13462
13543
|
}
|
|
13463
13544
|
)
|
package/dist/index.mjs
CHANGED
|
@@ -1319,6 +1319,7 @@ function Badge(_a) {
|
|
|
1319
1319
|
border = false,
|
|
1320
1320
|
onClose,
|
|
1321
1321
|
closeAsSpan = false,
|
|
1322
|
+
pulse = false,
|
|
1322
1323
|
className,
|
|
1323
1324
|
children
|
|
1324
1325
|
} = _b, props = __objRest(_b, [
|
|
@@ -1331,6 +1332,7 @@ function Badge(_a) {
|
|
|
1331
1332
|
"border",
|
|
1332
1333
|
"onClose",
|
|
1333
1334
|
"closeAsSpan",
|
|
1335
|
+
"pulse",
|
|
1334
1336
|
"className",
|
|
1335
1337
|
"children"
|
|
1336
1338
|
]);
|
|
@@ -1350,6 +1352,7 @@ function Badge(_a) {
|
|
|
1350
1352
|
text,
|
|
1351
1353
|
isNeutral && "backdrop-blur-[4px]",
|
|
1352
1354
|
border && "ring-1 ring-inset ring-sui-border-default",
|
|
1355
|
+
pulse && "animate-pulse",
|
|
1353
1356
|
className
|
|
1354
1357
|
)
|
|
1355
1358
|
}, props), {
|
|
@@ -4325,6 +4328,10 @@ var InputField = React78.forwardRef(
|
|
|
4325
4328
|
leadAddon,
|
|
4326
4329
|
tailAddon,
|
|
4327
4330
|
inputClassName,
|
|
4331
|
+
clearable,
|
|
4332
|
+
onClear,
|
|
4333
|
+
value,
|
|
4334
|
+
onChange,
|
|
4328
4335
|
disabled,
|
|
4329
4336
|
id,
|
|
4330
4337
|
spellCheck,
|
|
@@ -4351,6 +4358,10 @@ var InputField = React78.forwardRef(
|
|
|
4351
4358
|
"leadAddon",
|
|
4352
4359
|
"tailAddon",
|
|
4353
4360
|
"inputClassName",
|
|
4361
|
+
"clearable",
|
|
4362
|
+
"onClear",
|
|
4363
|
+
"value",
|
|
4364
|
+
"onChange",
|
|
4354
4365
|
"disabled",
|
|
4355
4366
|
"id",
|
|
4356
4367
|
"spellCheck",
|
|
@@ -4364,6 +4375,27 @@ var InputField = React78.forwardRef(
|
|
|
4364
4375
|
const hasInlineTags = !!(tags && tags.length > 0 && !hasError && !disabled);
|
|
4365
4376
|
const innerRef = React78.useRef(null);
|
|
4366
4377
|
React78.useImperativeHandle(ref, () => innerRef.current, []);
|
|
4378
|
+
const [internalHasValue, setInternalHasValue] = React78.useState(false);
|
|
4379
|
+
const hasValue = clearable ? typeof value === "string" ? value.length > 0 : internalHasValue : false;
|
|
4380
|
+
const handleChange = (e) => {
|
|
4381
|
+
if (clearable && value === void 0) {
|
|
4382
|
+
setInternalHasValue(e.target.value.length > 0);
|
|
4383
|
+
}
|
|
4384
|
+
onChange == null ? void 0 : onChange(e);
|
|
4385
|
+
};
|
|
4386
|
+
const handleClear = () => {
|
|
4387
|
+
var _a2;
|
|
4388
|
+
if (!innerRef.current || disabled) return;
|
|
4389
|
+
const nativeInputValueSetter = (_a2 = Object.getOwnPropertyDescriptor(
|
|
4390
|
+
window.HTMLInputElement.prototype,
|
|
4391
|
+
"value"
|
|
4392
|
+
)) == null ? void 0 : _a2.set;
|
|
4393
|
+
nativeInputValueSetter == null ? void 0 : nativeInputValueSetter.call(innerRef.current, "");
|
|
4394
|
+
innerRef.current.dispatchEvent(new Event("input", { bubbles: true }));
|
|
4395
|
+
setInternalHasValue(false);
|
|
4396
|
+
innerRef.current.focus();
|
|
4397
|
+
onClear == null ? void 0 : onClear();
|
|
4398
|
+
};
|
|
4367
4399
|
const focusInputOnDecorationClick = (e) => {
|
|
4368
4400
|
var _a2;
|
|
4369
4401
|
if (disabled) return;
|
|
@@ -4444,6 +4476,8 @@ var InputField = React78.forwardRef(
|
|
|
4444
4476
|
__spreadValues({
|
|
4445
4477
|
ref: innerRef,
|
|
4446
4478
|
id: inputId,
|
|
4479
|
+
value,
|
|
4480
|
+
onChange: handleChange,
|
|
4447
4481
|
disabled,
|
|
4448
4482
|
required,
|
|
4449
4483
|
spellCheck: resolvedSpellCheck,
|
|
@@ -4486,6 +4520,8 @@ var InputField = React78.forwardRef(
|
|
|
4486
4520
|
__spreadValues({
|
|
4487
4521
|
ref: innerRef,
|
|
4488
4522
|
id: inputId,
|
|
4523
|
+
value,
|
|
4524
|
+
onChange: handleChange,
|
|
4489
4525
|
disabled,
|
|
4490
4526
|
required,
|
|
4491
4527
|
spellCheck: resolvedSpellCheck,
|
|
@@ -4506,6 +4542,22 @@ var InputField = React78.forwardRef(
|
|
|
4506
4542
|
"shrink-0 text-sm font-medium leading-5",
|
|
4507
4543
|
disabled ? "text-sui-text-hint" : "text-sui-text-muted"
|
|
4508
4544
|
), children: suffix }),
|
|
4545
|
+
clearable && hasValue && !disabled && /* @__PURE__ */ jsx(
|
|
4546
|
+
"button",
|
|
4547
|
+
{
|
|
4548
|
+
type: "button",
|
|
4549
|
+
tabIndex: -1,
|
|
4550
|
+
onClick: handleClear,
|
|
4551
|
+
"aria-label": "Clear",
|
|
4552
|
+
className: cn(
|
|
4553
|
+
"flex size-5 shrink-0 items-center justify-center rounded-xs",
|
|
4554
|
+
"text-icon-default-muted transition-colors",
|
|
4555
|
+
"[@media(hover:hover)]:hover:text-icon-default",
|
|
4556
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sui-border-highlight"
|
|
4557
|
+
),
|
|
4558
|
+
children: /* @__PURE__ */ jsx("i", { className: "ri-close-circle-fill text-base", "aria-hidden": "true" })
|
|
4559
|
+
}
|
|
4560
|
+
),
|
|
4509
4561
|
tailIcon && /* @__PURE__ */ jsx(
|
|
4510
4562
|
"span",
|
|
4511
4563
|
{
|
|
@@ -4707,7 +4759,7 @@ function DatePicker({
|
|
|
4707
4759
|
size: "md",
|
|
4708
4760
|
disabled,
|
|
4709
4761
|
className: cn(
|
|
4710
|
-
"w-
|
|
4762
|
+
"w-sui-240 justify-start gap-2 text-left font-normal",
|
|
4711
4763
|
!date && "text-sui-text-muted",
|
|
4712
4764
|
className
|
|
4713
4765
|
),
|
|
@@ -4748,7 +4800,7 @@ function DateRangePicker({
|
|
|
4748
4800
|
size: "md",
|
|
4749
4801
|
disabled,
|
|
4750
4802
|
className: cn(
|
|
4751
|
-
"w-
|
|
4803
|
+
"w-sui-320 justify-start gap-2 text-left font-normal",
|
|
4752
4804
|
!(dateRange == null ? void 0 : dateRange.from) && "text-sui-text-muted",
|
|
4753
4805
|
className
|
|
4754
4806
|
),
|
|
@@ -4799,7 +4851,7 @@ function DatePickerWithPresets({
|
|
|
4799
4851
|
size: "md",
|
|
4800
4852
|
disabled,
|
|
4801
4853
|
className: cn(
|
|
4802
|
-
"w-
|
|
4854
|
+
"w-sui-240 justify-start gap-2 text-left font-normal",
|
|
4803
4855
|
!date && "text-sui-text-muted",
|
|
4804
4856
|
className
|
|
4805
4857
|
),
|
|
@@ -6657,12 +6709,16 @@ var InlineTips = React78.forwardRef(
|
|
|
6657
6709
|
variant = "default",
|
|
6658
6710
|
colorStyle = "neutral",
|
|
6659
6711
|
title,
|
|
6712
|
+
details,
|
|
6713
|
+
defaultOpen = false,
|
|
6660
6714
|
children
|
|
6661
6715
|
} = _b, props = __objRest(_b, [
|
|
6662
6716
|
"className",
|
|
6663
6717
|
"variant",
|
|
6664
6718
|
"colorStyle",
|
|
6665
6719
|
"title",
|
|
6720
|
+
"details",
|
|
6721
|
+
"defaultOpen",
|
|
6666
6722
|
"children"
|
|
6667
6723
|
]);
|
|
6668
6724
|
const lineColor = lineColorMap[variant != null ? variant : "default"];
|
|
@@ -6684,7 +6740,32 @@ var InlineTips = React78.forwardRef(
|
|
|
6684
6740
|
style: { minWidth: 4 }
|
|
6685
6741
|
}
|
|
6686
6742
|
),
|
|
6687
|
-
/* @__PURE__ */ jsxs(
|
|
6743
|
+
details ? /* @__PURE__ */ jsxs(Collapsible, { defaultOpen, className: "flex-1 min-w-0", children: [
|
|
6744
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
6745
|
+
/* @__PURE__ */ jsxs("p", { className: "flex-1 min-w-0", children: [
|
|
6746
|
+
title && /* @__PURE__ */ jsxs("span", { className: "font-bold", children: [
|
|
6747
|
+
title,
|
|
6748
|
+
" "
|
|
6749
|
+
] }),
|
|
6750
|
+
children
|
|
6751
|
+
] }),
|
|
6752
|
+
/* @__PURE__ */ jsx(
|
|
6753
|
+
CollapsibleTrigger2,
|
|
6754
|
+
{
|
|
6755
|
+
className: cn(
|
|
6756
|
+
"shrink-0 flex size-5 items-center justify-center rounded-xs",
|
|
6757
|
+
"text-icon-default-muted transition-transform duration-150",
|
|
6758
|
+
"[@media(hover:hover)]:hover:text-icon-default",
|
|
6759
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sui-border-highlight",
|
|
6760
|
+
"[&[data-state=open]>i]:rotate-180"
|
|
6761
|
+
),
|
|
6762
|
+
"aria-label": defaultOpen ? "Collapse details" : "Expand details",
|
|
6763
|
+
children: /* @__PURE__ */ jsx("i", { className: "ri-arrow-down-s-line text-base transition-transform duration-150" })
|
|
6764
|
+
}
|
|
6765
|
+
)
|
|
6766
|
+
] }),
|
|
6767
|
+
/* @__PURE__ */ jsx(CollapsibleContent2, { className: "overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", children: /* @__PURE__ */ jsx("div", { className: "mt-2 text-sui-text-subtle", children: details }) })
|
|
6768
|
+
] }) : /* @__PURE__ */ jsxs("p", { className: "flex-1 min-w-0", children: [
|
|
6688
6769
|
title && /* @__PURE__ */ jsxs("span", { className: "font-bold", children: [
|
|
6689
6770
|
title,
|
|
6690
6771
|
" "
|
|
@@ -12731,7 +12812,7 @@ var TextAreaField = React78.forwardRef(
|
|
|
12731
12812
|
compact ? cn(
|
|
12732
12813
|
// Compact: single-row horizontal layout
|
|
12733
12814
|
"flex-row items-center gap-2.5",
|
|
12734
|
-
inputStyle === "soft" && !hasError && !disabled ? "p-
|
|
12815
|
+
inputStyle === "soft" && !hasError && !disabled ? "p-sui-12" : "p-3"
|
|
12735
12816
|
) : bottomToolbar ? cn(
|
|
12736
12817
|
// Toolbar mode: no padding on container, textarea gets its own
|
|
12737
12818
|
"flex-col gap-0 p-0"
|
|
@@ -13414,7 +13495,7 @@ var Userbar = React78.forwardRef(
|
|
|
13414
13495
|
align: dropdownAlign,
|
|
13415
13496
|
sideOffset: dropdownSideOffset != null ? dropdownSideOffset : defaultSideOffset,
|
|
13416
13497
|
alignOffset: dropdownAlignOffset != null ? dropdownAlignOffset : defaultAlignOffset,
|
|
13417
|
-
className: "w-
|
|
13498
|
+
className: "w-sui-240",
|
|
13418
13499
|
children: dropdownContent
|
|
13419
13500
|
}
|
|
13420
13501
|
)
|
package/dist/styles.css
CHANGED
|
@@ -16364,6 +16364,14 @@ button,
|
|
|
16364
16364
|
width: 1px;
|
|
16365
16365
|
}
|
|
16366
16366
|
|
|
16367
|
+
.w-sui-240 {
|
|
16368
|
+
width: var(--spacing-240);
|
|
16369
|
+
}
|
|
16370
|
+
|
|
16371
|
+
.w-sui-320 {
|
|
16372
|
+
width: var(--spacing-320);
|
|
16373
|
+
}
|
|
16374
|
+
|
|
16367
16375
|
.min-w-0 {
|
|
16368
16376
|
min-width: 0px;
|
|
16369
16377
|
}
|
|
@@ -21407,6 +21415,11 @@ button,
|
|
|
21407
21415
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
21408
21416
|
}
|
|
21409
21417
|
|
|
21418
|
+
.\[\&\[data-state\=open\]\>i\]\:rotate-180[data-state=open]>i {
|
|
21419
|
+
--tw-rotate: 180deg;
|
|
21420
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
21421
|
+
}
|
|
21422
|
+
|
|
21410
21423
|
.\[\&_\.recharts-cartesian-axis-tick_text\]\:fill-\[var\(--text-muted\)\] .recharts-cartesian-axis-tick text {
|
|
21411
21424
|
fill: var(--text-muted);
|
|
21412
21425
|
}
|
|
@@ -21841,6 +21854,10 @@ button,
|
|
|
21841
21854
|
background-color: var(--border-highlight);
|
|
21842
21855
|
}
|
|
21843
21856
|
|
|
21857
|
+
.\[\@media\(hover\:hover\)\]\:hover\:text-icon-default:hover {
|
|
21858
|
+
color: var(--icon-default);
|
|
21859
|
+
}
|
|
21860
|
+
|
|
21844
21861
|
.\[\@media\(hover\:hover\)\]\:hover\:text-icon-default-subtle:hover {
|
|
21845
21862
|
color: var(--icon-default-subtle);
|
|
21846
21863
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maxsteinwender/sort-ui",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "A coded design system based on Sort UI Kit — Figma components as production-ready Next.js/Tailwind components",
|
|
5
5
|
"author": "Max Steinwender",
|
|
6
6
|
"license": "UNLICENSED",
|