@maxsteinwender/sort-ui 1.1.1 → 1.2.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.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 +67 -31
- package/package.json +2 -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
|
@@ -13007,14 +13007,20 @@
|
|
|
13007
13007
|
content: "\f69d";
|
|
13008
13008
|
}
|
|
13009
13009
|
|
|
13010
|
-
/*
|
|
13010
|
+
/*
|
|
13011
|
+
* ===== Redaction — Local Font Faces =====
|
|
13012
|
+
* Brand rule: Redaction MUST always render in its Regular weight, never Bold —
|
|
13013
|
+
* for headlines and quotes alike. The Bold faces are intentionally omitted and
|
|
13014
|
+
* the Regular/Italic faces span the full weight range (100–900), so any
|
|
13015
|
+
* requested font-weight maps to Regular with no synthetic bolding.
|
|
13016
|
+
*/
|
|
13011
13017
|
|
|
13012
13018
|
@font-face {
|
|
13013
13019
|
font-family: 'Redaction';
|
|
13014
13020
|
|
|
13015
13021
|
src: url('./fonts/Redaction/webfonts/Redaction-Regular.woff2') format('woff2');
|
|
13016
13022
|
|
|
13017
|
-
font-weight:
|
|
13023
|
+
font-weight: 100 900;
|
|
13018
13024
|
|
|
13019
13025
|
font-style: normal;
|
|
13020
13026
|
|
|
@@ -13026,33 +13032,21 @@
|
|
|
13026
13032
|
|
|
13027
13033
|
src: url('./fonts/Redaction/webfonts/Redaction-Italic.woff2') format('woff2');
|
|
13028
13034
|
|
|
13029
|
-
font-weight:
|
|
13035
|
+
font-weight: 100 900;
|
|
13030
13036
|
|
|
13031
13037
|
font-style: italic;
|
|
13032
13038
|
|
|
13033
13039
|
font-display: swap;
|
|
13034
13040
|
}
|
|
13035
13041
|
|
|
13036
|
-
|
|
13037
|
-
font-family: 'Redaction';
|
|
13038
|
-
|
|
13039
|
-
src: url('./fonts/Redaction/webfonts/Redaction-Bold.woff2') format('woff2');
|
|
13040
|
-
|
|
13041
|
-
font-weight: 700;
|
|
13042
|
-
|
|
13043
|
-
font-style: normal;
|
|
13044
|
-
|
|
13045
|
-
font-display: swap;
|
|
13046
|
-
}
|
|
13047
|
-
|
|
13048
|
-
/* ===== Redaction 35 — Local Font Faces ===== */
|
|
13042
|
+
/* ===== Redaction 35 — Local Font Faces (Regular weight only, see above) ===== */
|
|
13049
13043
|
|
|
13050
13044
|
@font-face {
|
|
13051
13045
|
font-family: 'Redaction 35';
|
|
13052
13046
|
|
|
13053
13047
|
src: url('./fonts/Redaction/webfonts/Redaction_35-Regular.woff2') format('woff2');
|
|
13054
13048
|
|
|
13055
|
-
font-weight:
|
|
13049
|
+
font-weight: 100 900;
|
|
13056
13050
|
|
|
13057
13051
|
font-style: normal;
|
|
13058
13052
|
|
|
@@ -13064,25 +13058,13 @@
|
|
|
13064
13058
|
|
|
13065
13059
|
src: url('./fonts/Redaction/webfonts/Redaction_35-Italic.woff2') format('woff2');
|
|
13066
13060
|
|
|
13067
|
-
font-weight:
|
|
13061
|
+
font-weight: 100 900;
|
|
13068
13062
|
|
|
13069
13063
|
font-style: italic;
|
|
13070
13064
|
|
|
13071
13065
|
font-display: swap;
|
|
13072
13066
|
}
|
|
13073
13067
|
|
|
13074
|
-
@font-face {
|
|
13075
|
-
font-family: 'Redaction 35';
|
|
13076
|
-
|
|
13077
|
-
src: url('./fonts/Redaction/webfonts/Redaction_35-Bold.woff2') format('woff2');
|
|
13078
|
-
|
|
13079
|
-
font-weight: 700;
|
|
13080
|
-
|
|
13081
|
-
font-style: normal;
|
|
13082
|
-
|
|
13083
|
-
font-display: swap;
|
|
13084
|
-
}
|
|
13085
|
-
|
|
13086
13068
|
*, ::before, ::after {
|
|
13087
13069
|
--tw-border-spacing-x: 0;
|
|
13088
13070
|
--tw-border-spacing-y: 0;
|
|
@@ -13663,7 +13645,8 @@ video {
|
|
|
13663
13645
|
--ring: 221 96.9% 62.5%;
|
|
13664
13646
|
--radius: 0.5rem;
|
|
13665
13647
|
/* Sort UI Font Family Tokens — Font A (default) */
|
|
13666
|
-
|
|
13648
|
+
/* Headlines use Redaction (display); body/UI stays Geist. */
|
|
13649
|
+
--font-headline: 'Redaction', Georgia, serif;
|
|
13667
13650
|
--font-body: var(--font-geist-sans);
|
|
13668
13651
|
--font-quote: 'Redaction', Georgia, serif;
|
|
13669
13652
|
--font-quote-alt: 'Redaction 35', Georgia, serif;
|
|
@@ -15005,6 +14988,14 @@ body {
|
|
|
15005
14988
|
text-rendering: optimizeLegibility;
|
|
15006
14989
|
}
|
|
15007
14990
|
|
|
14991
|
+
/* Headline 1–3 use the headline font (Redaction by default). h4–h6 inherit body. */
|
|
14992
|
+
|
|
14993
|
+
h1,
|
|
14994
|
+
h2,
|
|
14995
|
+
h3 {
|
|
14996
|
+
font-family: var(--font-headline), Georgia, serif;
|
|
14997
|
+
}
|
|
14998
|
+
|
|
15008
14999
|
/* #55 Document selection styling */
|
|
15009
15000
|
|
|
15010
15001
|
::-moz-selection {
|
|
@@ -16364,6 +16355,14 @@ button,
|
|
|
16364
16355
|
width: 1px;
|
|
16365
16356
|
}
|
|
16366
16357
|
|
|
16358
|
+
.w-sui-240 {
|
|
16359
|
+
width: var(--spacing-240);
|
|
16360
|
+
}
|
|
16361
|
+
|
|
16362
|
+
.w-sui-320 {
|
|
16363
|
+
width: var(--spacing-320);
|
|
16364
|
+
}
|
|
16365
|
+
|
|
16367
16366
|
.min-w-0 {
|
|
16368
16367
|
min-width: 0px;
|
|
16369
16368
|
}
|
|
@@ -17344,6 +17343,26 @@ button,
|
|
|
17344
17343
|
background-color: var(--color-bg);
|
|
17345
17344
|
}
|
|
17346
17345
|
|
|
17346
|
+
.bg-\[hsl\(var\(--chart-1\)\)\] {
|
|
17347
|
+
background-color: hsl(var(--chart-1));
|
|
17348
|
+
}
|
|
17349
|
+
|
|
17350
|
+
.bg-\[hsl\(var\(--chart-2\)\)\] {
|
|
17351
|
+
background-color: hsl(var(--chart-2));
|
|
17352
|
+
}
|
|
17353
|
+
|
|
17354
|
+
.bg-\[hsl\(var\(--chart-3\)\)\] {
|
|
17355
|
+
background-color: hsl(var(--chart-3));
|
|
17356
|
+
}
|
|
17357
|
+
|
|
17358
|
+
.bg-\[hsl\(var\(--chart-4\)\)\] {
|
|
17359
|
+
background-color: hsl(var(--chart-4));
|
|
17360
|
+
}
|
|
17361
|
+
|
|
17362
|
+
.bg-\[hsl\(var\(--chart-5\)\)\] {
|
|
17363
|
+
background-color: hsl(var(--chart-5));
|
|
17364
|
+
}
|
|
17365
|
+
|
|
17347
17366
|
.bg-\[rgba\(255\2c 255\2c 255\2c 0\.1\)\] {
|
|
17348
17367
|
background-color: rgba(255,255,255,0.1);
|
|
17349
17368
|
}
|
|
@@ -17369,6 +17388,10 @@ button,
|
|
|
17369
17388
|
background-color: rgb(245 158 11 / var(--tw-bg-opacity, 1));
|
|
17370
17389
|
}
|
|
17371
17390
|
|
|
17391
|
+
.bg-background {
|
|
17392
|
+
background-color: hsl(var(--background));
|
|
17393
|
+
}
|
|
17394
|
+
|
|
17372
17395
|
.bg-black\/80 {
|
|
17373
17396
|
background-color: rgb(0 0 0 / 0.8);
|
|
17374
17397
|
}
|
|
@@ -19199,6 +19222,10 @@ button,
|
|
|
19199
19222
|
--tw-ring-color: hsl(var(--primary));
|
|
19200
19223
|
}
|
|
19201
19224
|
|
|
19225
|
+
.ring-ring {
|
|
19226
|
+
--tw-ring-color: hsl(var(--ring));
|
|
19227
|
+
}
|
|
19228
|
+
|
|
19202
19229
|
.ring-sidebar-ring {
|
|
19203
19230
|
--tw-ring-color: hsl(var(--sidebar-ring));
|
|
19204
19231
|
}
|
|
@@ -21407,6 +21434,11 @@ button,
|
|
|
21407
21434
|
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
21435
|
}
|
|
21409
21436
|
|
|
21437
|
+
.\[\&\[data-state\=open\]\>i\]\:rotate-180[data-state=open]>i {
|
|
21438
|
+
--tw-rotate: 180deg;
|
|
21439
|
+
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));
|
|
21440
|
+
}
|
|
21441
|
+
|
|
21410
21442
|
.\[\&_\.recharts-cartesian-axis-tick_text\]\:fill-\[var\(--text-muted\)\] .recharts-cartesian-axis-tick text {
|
|
21411
21443
|
fill: var(--text-muted);
|
|
21412
21444
|
}
|
|
@@ -21841,6 +21873,10 @@ button,
|
|
|
21841
21873
|
background-color: var(--border-highlight);
|
|
21842
21874
|
}
|
|
21843
21875
|
|
|
21876
|
+
.\[\@media\(hover\:hover\)\]\:hover\:text-icon-default:hover {
|
|
21877
|
+
color: var(--icon-default);
|
|
21878
|
+
}
|
|
21879
|
+
|
|
21844
21880
|
.\[\@media\(hover\:hover\)\]\:hover\:text-icon-default-subtle:hover {
|
|
21845
21881
|
color: var(--icon-default-subtle);
|
|
21846
21882
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maxsteinwender/sort-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
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",
|
|
@@ -134,6 +134,7 @@
|
|
|
134
134
|
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
135
135
|
"react": "^19.0.0",
|
|
136
136
|
"react-dom": "^19.0.0",
|
|
137
|
+
"remark-gfm": "^4.0.1",
|
|
137
138
|
"storybook": "^10.2.19",
|
|
138
139
|
"tailwindcss": "^3.4.1",
|
|
139
140
|
"tsup": "^8.5.1",
|