@sarunyu/system-one 4.8.4 → 4.9.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.cjs +28 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +28 -28
- package/dist/index.js.map +1 -1
- package/dist/src/components/card.d.ts +1 -1
- package/dist/src/components/card.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -494,7 +494,7 @@ const tagConfig = {
|
|
|
494
494
|
},
|
|
495
495
|
full: {
|
|
496
496
|
bg: "var(--error-bg)",
|
|
497
|
-
text: "var(--
|
|
497
|
+
text: "var(--bg-danger-primary)",
|
|
498
498
|
label: "เต็มแล้ว",
|
|
499
499
|
Icon: react.XCircle
|
|
500
500
|
}
|
|
@@ -599,7 +599,7 @@ const Card = React.forwardRef(function Card2({
|
|
|
599
599
|
),
|
|
600
600
|
style: {
|
|
601
601
|
backgroundColor: t.bg ?? "var(--disabled-bg)",
|
|
602
|
-
color: t.text ?? "var(--
|
|
602
|
+
color: t.text ?? "var(--text-default-primary)"
|
|
603
603
|
},
|
|
604
604
|
children: t.label
|
|
605
605
|
},
|
|
@@ -2147,7 +2147,7 @@ function DateScrollColumn({
|
|
|
2147
2147
|
style: {
|
|
2148
2148
|
fontSize: isSel ? 32 : 14,
|
|
2149
2149
|
lineHeight: 1,
|
|
2150
|
-
color: isSel ? "var(--
|
|
2150
|
+
color: isSel ? "var(--text-default-primary)" : "var(--disabled)",
|
|
2151
2151
|
transition: "font-size 0.1s, color 0.1s",
|
|
2152
2152
|
whiteSpace: "nowrap"
|
|
2153
2153
|
},
|
|
@@ -2291,14 +2291,14 @@ const DateInput = React.forwardRef(
|
|
|
2291
2291
|
const isFilled = mode === "single" ? Boolean(currentDate) : Boolean(currentRange == null ? void 0 : currentRange.from);
|
|
2292
2292
|
const bgClass = isDisabled ? "bg-disabled-bg" : "bg-background";
|
|
2293
2293
|
const labelColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
2294
|
-
const valueColor = isDisabled ? "var(--disabled)" : "var(--
|
|
2294
|
+
const valueColor = isDisabled ? "var(--disabled)" : "var(--text-default-primary)";
|
|
2295
2295
|
const iconColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
2296
|
-
const minusColor = isDisabled ? "var(--disabled)" : "var(--
|
|
2296
|
+
const minusColor = isDisabled ? "var(--disabled)" : "var(--text-default-primary)";
|
|
2297
2297
|
const asteriskColorEmpty = isDisabled ? "var(--disabled)" : "var(--error-dark)";
|
|
2298
2298
|
const asteriskColorFilled = isDisabled ? "var(--disabled)" : "var(--error-dark)";
|
|
2299
2299
|
const borderInset = isFocus || isError ? "-1px" : "0px";
|
|
2300
2300
|
const borderRad = isFocus || isError ? "9px" : "8px";
|
|
2301
|
-
const borderColor = isDisabled ? "var(--border-disabled)" : isError ? "var(--
|
|
2301
|
+
const borderColor = isDisabled ? "var(--border-disabled)" : isError ? "var(--bg-danger-primary)" : isFocus ? "var(--primary-action)" : "var(--border-default)";
|
|
2302
2302
|
const showBelow = isError || Boolean(helperText);
|
|
2303
2303
|
const leftText = isError ? errorMessage : helperText ?? "";
|
|
2304
2304
|
const leftColor = isError ? "var(--error-dark)" : "var(--muted-foreground)";
|
|
@@ -2587,7 +2587,7 @@ const DateInput = React.forwardRef(
|
|
|
2587
2587
|
className: "z-50 rounded-[8px] bg-popover p-3 outline-none text-popover-foreground",
|
|
2588
2588
|
style: {
|
|
2589
2589
|
boxShadow: "var(--elevation-popover)",
|
|
2590
|
-
border: "1px solid var(--border)"
|
|
2590
|
+
border: "1px solid var(--border-default)"
|
|
2591
2591
|
},
|
|
2592
2592
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
2593
2593
|
children: [
|
|
@@ -2635,7 +2635,7 @@ const Dropdown = React.forwardRef(
|
|
|
2635
2635
|
const isFocus = state === "focus";
|
|
2636
2636
|
const bg = isDisabled ? "bg-disabled-bg" : "bg-background";
|
|
2637
2637
|
const labelColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
2638
|
-
const filledColor = isDisabled ? "var(--disabled)" : "var(--
|
|
2638
|
+
const filledColor = isDisabled ? "var(--disabled)" : "var(--text-default-primary)";
|
|
2639
2639
|
const caretClassName = isDisabled ? "text-disabled" : "text-muted-foreground";
|
|
2640
2640
|
const hasExternalLabel = Boolean(label);
|
|
2641
2641
|
const borderInset = isFocus || isError ? "-1px" : "0px";
|
|
@@ -2643,7 +2643,7 @@ const Dropdown = React.forwardRef(
|
|
|
2643
2643
|
const borderColor = isDisabled ? "var(--border-disabled)" : isError ? "var(--border-danger)" : isFocus ? "var(--primary-action)" : "var(--border-default)";
|
|
2644
2644
|
const showBelow = isError || Boolean(helperText);
|
|
2645
2645
|
const leftText = isError ? errorMessage : helperText ?? "";
|
|
2646
|
-
const leftColor = isError ? "var(--
|
|
2646
|
+
const leftColor = isError ? "var(--bg-danger-primary)" : "var(--muted-foreground)";
|
|
2647
2647
|
const filteredOptions = search.trim() ? options.filter(
|
|
2648
2648
|
(o) => o.label.toLowerCase().includes(search.trim().toLowerCase())
|
|
2649
2649
|
) : options;
|
|
@@ -2782,7 +2782,7 @@ const Dropdown = React.forwardRef(
|
|
|
2782
2782
|
placeholder: placeholder + (required ? " *" : ""),
|
|
2783
2783
|
className: "flex-1 min-w-0 min-h-[1px] text-base leading-5 not-italic bg-transparent outline-none border-none p-0 m-0 placeholder:text-muted-foreground",
|
|
2784
2784
|
style: {
|
|
2785
|
-
color: "var(--
|
|
2785
|
+
color: "var(--text-default-primary)",
|
|
2786
2786
|
caretColor: "var(--caret-color)"
|
|
2787
2787
|
},
|
|
2788
2788
|
onClick: (e) => e.stopPropagation()
|
|
@@ -3094,10 +3094,10 @@ const DropdownMultiple = React.forwardRef(
|
|
|
3094
3094
|
const caretColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
3095
3095
|
const borderInset = isFocus || isError ? "-1px" : "0px";
|
|
3096
3096
|
const borderRad = isFocus || isError ? "9px" : "8px";
|
|
3097
|
-
const borderColor = isDisabled ? "var(--border-disabled)" : isError ? "var(--
|
|
3097
|
+
const borderColor = isDisabled ? "var(--border-disabled)" : isError ? "var(--bg-danger-primary)" : isFocus ? "var(--primary-action)" : "var(--border-default)";
|
|
3098
3098
|
const showBelow = isError || Boolean(helperText);
|
|
3099
3099
|
const leftText = isError ? errorMessage : helperText ?? "";
|
|
3100
|
-
const leftColor = isError ? "var(--
|
|
3100
|
+
const leftColor = isError ? "var(--bg-danger-primary)" : "var(--muted-foreground)";
|
|
3101
3101
|
const selectedOptions = React.useMemo(
|
|
3102
3102
|
() => currentValue.map((v) => options.find((o) => o.value === v)).filter(Boolean),
|
|
3103
3103
|
[currentValue, options]
|
|
@@ -3312,7 +3312,7 @@ const DropdownMultiple = React.forwardRef(
|
|
|
3312
3312
|
onKeyDown: handleInputKeyDown,
|
|
3313
3313
|
className: "flex-1 min-w-[40px] outline-none border-none bg-transparent text-[14px] leading-[20px]",
|
|
3314
3314
|
style: {
|
|
3315
|
-
color: "var(--
|
|
3315
|
+
color: "var(--text-default-primary)",
|
|
3316
3316
|
caretColor: "var(--caret-color)"
|
|
3317
3317
|
},
|
|
3318
3318
|
onClick: (e) => e.stopPropagation()
|
|
@@ -3334,7 +3334,7 @@ const DropdownMultiple = React.forwardRef(
|
|
|
3334
3334
|
onKeyDown: handleInputKeyDown,
|
|
3335
3335
|
className: "flex-1 min-w-[40px] outline-none border-none bg-transparent text-[14px] leading-[20px]",
|
|
3336
3336
|
style: {
|
|
3337
|
-
color: "var(--
|
|
3337
|
+
color: "var(--text-default-primary)",
|
|
3338
3338
|
caretColor: "var(--caret-color)"
|
|
3339
3339
|
},
|
|
3340
3340
|
onClick: (e) => e.stopPropagation()
|
|
@@ -3516,7 +3516,7 @@ const Input = React.forwardRef(function Input2({
|
|
|
3516
3516
|
const isFilled = currentValue.length > 0;
|
|
3517
3517
|
const bg = isDisabled ? "bg-disabled-bg" : "bg-background";
|
|
3518
3518
|
const floatLabel = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
3519
|
-
const filledValue = isDisabled ? "var(--disabled)" : "var(--
|
|
3519
|
+
const filledValue = isDisabled ? "var(--disabled)" : "var(--text-default-primary)";
|
|
3520
3520
|
const unitColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
3521
3521
|
const borderInset = isFocus || isError ? "-1px" : "0px";
|
|
3522
3522
|
const borderRad = isFocus || isError ? "9px" : "8px";
|
|
@@ -3526,7 +3526,7 @@ const Input = React.forwardRef(function Input2({
|
|
|
3526
3526
|
const charCount = currentValue.length;
|
|
3527
3527
|
const showBelow = isError || Boolean(helperText) || showCount;
|
|
3528
3528
|
const leftText = isError ? errorMessage : helperText ?? "";
|
|
3529
|
-
const leftColor = isError ? "var(--
|
|
3529
|
+
const leftColor = isError ? "var(--bg-danger-primary)" : "var(--muted-foreground)";
|
|
3530
3530
|
const handleChange = (e) => {
|
|
3531
3531
|
if (isDisabled) return;
|
|
3532
3532
|
let next = e.target.value;
|
|
@@ -4321,7 +4321,7 @@ const OptionList = React.forwardRef(
|
|
|
4321
4321
|
{
|
|
4322
4322
|
className: "min-h-[1px] min-w-0 flex-1 overflow-hidden text-sm leading-5 text-ellipsis whitespace-nowrap not-italic",
|
|
4323
4323
|
style: {
|
|
4324
|
-
color: disabled ? "var(--disabled)" : "var(--
|
|
4324
|
+
color: disabled ? "var(--disabled)" : "var(--text-default-primary)"
|
|
4325
4325
|
},
|
|
4326
4326
|
children: opt.label
|
|
4327
4327
|
}
|
|
@@ -4364,7 +4364,7 @@ const SearchInput = React.forwardRef(
|
|
|
4364
4364
|
const padding = size === "sm" ? "px-3.5 py-2" : "px-3.5 py-3";
|
|
4365
4365
|
const borderInset = focused ? "-1px" : "0px";
|
|
4366
4366
|
const borderRad = focused ? "9px" : "8px";
|
|
4367
|
-
const borderColor = focused ? "var(--primary-action)" : "var(--border)";
|
|
4367
|
+
const borderColor = focused ? "var(--primary-action)" : "var(--border-default)";
|
|
4368
4368
|
const handleChange = (next) => {
|
|
4369
4369
|
if (!controlled) setInternalValue(next);
|
|
4370
4370
|
onChange == null ? void 0 : onChange(next);
|
|
@@ -4432,7 +4432,7 @@ const SearchInput = React.forwardRef(
|
|
|
4432
4432
|
onBlur: () => setFocused(false),
|
|
4433
4433
|
className: "m-0 w-full border-none bg-transparent p-0 text-base leading-5 outline-none",
|
|
4434
4434
|
style: {
|
|
4435
|
-
color: isFilled ? "var(--
|
|
4435
|
+
color: isFilled ? "var(--text-default-primary)" : "transparent",
|
|
4436
4436
|
caretColor: "var(--caret-color)"
|
|
4437
4437
|
}
|
|
4438
4438
|
}
|
|
@@ -5092,14 +5092,14 @@ const TextArea = React.forwardRef(
|
|
|
5092
5092
|
const isFocus = state === "focus";
|
|
5093
5093
|
const isFilled = currentValue.length > 0;
|
|
5094
5094
|
const floatLabel = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
5095
|
-
const filledValue = isDisabled ? "var(--disabled)" : "var(--
|
|
5095
|
+
const filledValue = isDisabled ? "var(--disabled)" : "var(--text-default-primary)";
|
|
5096
5096
|
const borderInset = isFocus || isError ? "-1px" : "0px";
|
|
5097
5097
|
const borderRad = isFocus || isError ? "9px" : "8px";
|
|
5098
|
-
const borderColor = isDisabled ? "var(--border-disabled)" : isError ? "var(--
|
|
5098
|
+
const borderColor = isDisabled ? "var(--border-disabled)" : isError ? "var(--bg-danger-primary)" : isFocus ? "var(--primary-action)" : "var(--border-default)";
|
|
5099
5099
|
const charCount = currentValue.length;
|
|
5100
5100
|
const showBelow = isError || Boolean(helperText) || showCount;
|
|
5101
5101
|
const leftText = isError ? errorMessage : helperText ?? "";
|
|
5102
|
-
const leftColor = isError ? "var(--
|
|
5102
|
+
const leftColor = isError ? "var(--bg-danger-primary)" : "var(--muted-foreground)";
|
|
5103
5103
|
const countColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
5104
5104
|
const handleChange = (e) => {
|
|
5105
5105
|
let newValue = e.target.value;
|
|
@@ -5375,7 +5375,7 @@ function ScrollColumn({
|
|
|
5375
5375
|
style: {
|
|
5376
5376
|
fontSize: isSel ? 32 : 14,
|
|
5377
5377
|
lineHeight: 1,
|
|
5378
|
-
color: isSel ? "var(--
|
|
5378
|
+
color: isSel ? "var(--text-default-primary)" : "var(--disabled)",
|
|
5379
5379
|
transition: "font-size 0.1s, color 0.1s"
|
|
5380
5380
|
},
|
|
5381
5381
|
children: pad2(item)
|
|
@@ -5428,7 +5428,7 @@ function RangeSlotPicker({
|
|
|
5428
5428
|
className: "leading-[22px] relative shrink-0 text-[14px] text-center whitespace-nowrap",
|
|
5429
5429
|
style: {
|
|
5430
5430
|
fontVariationSettings: "'wdth' 100",
|
|
5431
|
-
color: isSelected ? "var(--on-primary-action)" : "var(--
|
|
5431
|
+
color: isSelected ? "var(--on-primary-action)" : "var(--text-default-primary)"
|
|
5432
5432
|
},
|
|
5433
5433
|
children: slot.label
|
|
5434
5434
|
}
|
|
@@ -5504,7 +5504,7 @@ function TimePickerContent({
|
|
|
5504
5504
|
style: {
|
|
5505
5505
|
fontSize: 32,
|
|
5506
5506
|
lineHeight: 1,
|
|
5507
|
-
color: "var(--
|
|
5507
|
+
color: "var(--text-default-primary)"
|
|
5508
5508
|
},
|
|
5509
5509
|
children: ":"
|
|
5510
5510
|
}
|
|
@@ -5574,14 +5574,14 @@ const TimeInput = React.forwardRef(
|
|
|
5574
5574
|
const isFilled = mode === "single" ? Boolean(currentValue) : true;
|
|
5575
5575
|
const bgClass = isDisabled ? "bg-disabled-bg" : "bg-background";
|
|
5576
5576
|
const labelColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
5577
|
-
const valueColor = isDisabled ? "var(--disabled)" : "var(--
|
|
5577
|
+
const valueColor = isDisabled ? "var(--disabled)" : "var(--text-default-primary)";
|
|
5578
5578
|
const iconColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
5579
5579
|
const minusColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
5580
5580
|
const asteriskColor = isDisabled ? "var(--disabled)" : "var(--error-dark)";
|
|
5581
5581
|
const asteriskSmall = isDisabled ? "var(--disabled)" : "var(--error-dark)";
|
|
5582
5582
|
const borderInset = isFocus || isError ? "-1px" : "0px";
|
|
5583
5583
|
const borderRad = isFocus || isError ? "9px" : "8px";
|
|
5584
|
-
const borderColor = isDisabled ? "var(--border-disabled)" : isError ? "var(--
|
|
5584
|
+
const borderColor = isDisabled ? "var(--border-disabled)" : isError ? "var(--bg-danger-primary)" : isFocus ? "var(--primary-action)" : "var(--border-default)";
|
|
5585
5585
|
const showBelow = isError || Boolean(helperText);
|
|
5586
5586
|
const leftText = isError ? errorMessage : helperText ?? "";
|
|
5587
5587
|
const leftColor = isError ? "var(--error-dark)" : "var(--muted-foreground)";
|
|
@@ -5869,7 +5869,7 @@ const TimeInput = React.forwardRef(
|
|
|
5869
5869
|
className: "z-50 rounded-[8px] bg-popover p-3 outline-none max-w-[340px] text-popover-foreground",
|
|
5870
5870
|
style: {
|
|
5871
5871
|
boxShadow: "var(--elevation-popover)",
|
|
5872
|
-
border: "1px solid var(--border)",
|
|
5872
|
+
border: "1px solid var(--border-default)",
|
|
5873
5873
|
minWidth: mode === "single" ? 327 : void 0
|
|
5874
5874
|
},
|
|
5875
5875
|
onOpenAutoFocus: (e) => e.preventDefault(),
|