@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.js
CHANGED
|
@@ -475,7 +475,7 @@ const tagConfig = {
|
|
|
475
475
|
},
|
|
476
476
|
full: {
|
|
477
477
|
bg: "var(--error-bg)",
|
|
478
|
-
text: "var(--
|
|
478
|
+
text: "var(--bg-danger-primary)",
|
|
479
479
|
label: "เต็มแล้ว",
|
|
480
480
|
Icon: XCircle
|
|
481
481
|
}
|
|
@@ -580,7 +580,7 @@ const Card = forwardRef(function Card2({
|
|
|
580
580
|
),
|
|
581
581
|
style: {
|
|
582
582
|
backgroundColor: t.bg ?? "var(--disabled-bg)",
|
|
583
|
-
color: t.text ?? "var(--
|
|
583
|
+
color: t.text ?? "var(--text-default-primary)"
|
|
584
584
|
},
|
|
585
585
|
children: t.label
|
|
586
586
|
},
|
|
@@ -2128,7 +2128,7 @@ function DateScrollColumn({
|
|
|
2128
2128
|
style: {
|
|
2129
2129
|
fontSize: isSel ? 32 : 14,
|
|
2130
2130
|
lineHeight: 1,
|
|
2131
|
-
color: isSel ? "var(--
|
|
2131
|
+
color: isSel ? "var(--text-default-primary)" : "var(--disabled)",
|
|
2132
2132
|
transition: "font-size 0.1s, color 0.1s",
|
|
2133
2133
|
whiteSpace: "nowrap"
|
|
2134
2134
|
},
|
|
@@ -2272,14 +2272,14 @@ const DateInput = forwardRef(
|
|
|
2272
2272
|
const isFilled = mode === "single" ? Boolean(currentDate) : Boolean(currentRange == null ? void 0 : currentRange.from);
|
|
2273
2273
|
const bgClass = isDisabled ? "bg-disabled-bg" : "bg-background";
|
|
2274
2274
|
const labelColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
2275
|
-
const valueColor = isDisabled ? "var(--disabled)" : "var(--
|
|
2275
|
+
const valueColor = isDisabled ? "var(--disabled)" : "var(--text-default-primary)";
|
|
2276
2276
|
const iconColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
2277
|
-
const minusColor = isDisabled ? "var(--disabled)" : "var(--
|
|
2277
|
+
const minusColor = isDisabled ? "var(--disabled)" : "var(--text-default-primary)";
|
|
2278
2278
|
const asteriskColorEmpty = isDisabled ? "var(--disabled)" : "var(--error-dark)";
|
|
2279
2279
|
const asteriskColorFilled = isDisabled ? "var(--disabled)" : "var(--error-dark)";
|
|
2280
2280
|
const borderInset = isFocus || isError ? "-1px" : "0px";
|
|
2281
2281
|
const borderRad = isFocus || isError ? "9px" : "8px";
|
|
2282
|
-
const borderColor = isDisabled ? "var(--border-disabled)" : isError ? "var(--
|
|
2282
|
+
const borderColor = isDisabled ? "var(--border-disabled)" : isError ? "var(--bg-danger-primary)" : isFocus ? "var(--primary-action)" : "var(--border-default)";
|
|
2283
2283
|
const showBelow = isError || Boolean(helperText);
|
|
2284
2284
|
const leftText = isError ? errorMessage : helperText ?? "";
|
|
2285
2285
|
const leftColor = isError ? "var(--error-dark)" : "var(--muted-foreground)";
|
|
@@ -2568,7 +2568,7 @@ const DateInput = forwardRef(
|
|
|
2568
2568
|
className: "z-50 rounded-[8px] bg-popover p-3 outline-none text-popover-foreground",
|
|
2569
2569
|
style: {
|
|
2570
2570
|
boxShadow: "var(--elevation-popover)",
|
|
2571
|
-
border: "1px solid var(--border)"
|
|
2571
|
+
border: "1px solid var(--border-default)"
|
|
2572
2572
|
},
|
|
2573
2573
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
2574
2574
|
children: [
|
|
@@ -2616,7 +2616,7 @@ const Dropdown = forwardRef(
|
|
|
2616
2616
|
const isFocus = state === "focus";
|
|
2617
2617
|
const bg = isDisabled ? "bg-disabled-bg" : "bg-background";
|
|
2618
2618
|
const labelColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
2619
|
-
const filledColor = isDisabled ? "var(--disabled)" : "var(--
|
|
2619
|
+
const filledColor = isDisabled ? "var(--disabled)" : "var(--text-default-primary)";
|
|
2620
2620
|
const caretClassName = isDisabled ? "text-disabled" : "text-muted-foreground";
|
|
2621
2621
|
const hasExternalLabel = Boolean(label);
|
|
2622
2622
|
const borderInset = isFocus || isError ? "-1px" : "0px";
|
|
@@ -2624,7 +2624,7 @@ const Dropdown = forwardRef(
|
|
|
2624
2624
|
const borderColor = isDisabled ? "var(--border-disabled)" : isError ? "var(--border-danger)" : isFocus ? "var(--primary-action)" : "var(--border-default)";
|
|
2625
2625
|
const showBelow = isError || Boolean(helperText);
|
|
2626
2626
|
const leftText = isError ? errorMessage : helperText ?? "";
|
|
2627
|
-
const leftColor = isError ? "var(--
|
|
2627
|
+
const leftColor = isError ? "var(--bg-danger-primary)" : "var(--muted-foreground)";
|
|
2628
2628
|
const filteredOptions = search.trim() ? options.filter(
|
|
2629
2629
|
(o) => o.label.toLowerCase().includes(search.trim().toLowerCase())
|
|
2630
2630
|
) : options;
|
|
@@ -2763,7 +2763,7 @@ const Dropdown = forwardRef(
|
|
|
2763
2763
|
placeholder: placeholder + (required ? " *" : ""),
|
|
2764
2764
|
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",
|
|
2765
2765
|
style: {
|
|
2766
|
-
color: "var(--
|
|
2766
|
+
color: "var(--text-default-primary)",
|
|
2767
2767
|
caretColor: "var(--caret-color)"
|
|
2768
2768
|
},
|
|
2769
2769
|
onClick: (e) => e.stopPropagation()
|
|
@@ -3075,10 +3075,10 @@ const DropdownMultiple = forwardRef(
|
|
|
3075
3075
|
const caretColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
3076
3076
|
const borderInset = isFocus || isError ? "-1px" : "0px";
|
|
3077
3077
|
const borderRad = isFocus || isError ? "9px" : "8px";
|
|
3078
|
-
const borderColor = isDisabled ? "var(--border-disabled)" : isError ? "var(--
|
|
3078
|
+
const borderColor = isDisabled ? "var(--border-disabled)" : isError ? "var(--bg-danger-primary)" : isFocus ? "var(--primary-action)" : "var(--border-default)";
|
|
3079
3079
|
const showBelow = isError || Boolean(helperText);
|
|
3080
3080
|
const leftText = isError ? errorMessage : helperText ?? "";
|
|
3081
|
-
const leftColor = isError ? "var(--
|
|
3081
|
+
const leftColor = isError ? "var(--bg-danger-primary)" : "var(--muted-foreground)";
|
|
3082
3082
|
const selectedOptions = useMemo(
|
|
3083
3083
|
() => currentValue.map((v) => options.find((o) => o.value === v)).filter(Boolean),
|
|
3084
3084
|
[currentValue, options]
|
|
@@ -3293,7 +3293,7 @@ const DropdownMultiple = forwardRef(
|
|
|
3293
3293
|
onKeyDown: handleInputKeyDown,
|
|
3294
3294
|
className: "flex-1 min-w-[40px] outline-none border-none bg-transparent text-[14px] leading-[20px]",
|
|
3295
3295
|
style: {
|
|
3296
|
-
color: "var(--
|
|
3296
|
+
color: "var(--text-default-primary)",
|
|
3297
3297
|
caretColor: "var(--caret-color)"
|
|
3298
3298
|
},
|
|
3299
3299
|
onClick: (e) => e.stopPropagation()
|
|
@@ -3315,7 +3315,7 @@ const DropdownMultiple = forwardRef(
|
|
|
3315
3315
|
onKeyDown: handleInputKeyDown,
|
|
3316
3316
|
className: "flex-1 min-w-[40px] outline-none border-none bg-transparent text-[14px] leading-[20px]",
|
|
3317
3317
|
style: {
|
|
3318
|
-
color: "var(--
|
|
3318
|
+
color: "var(--text-default-primary)",
|
|
3319
3319
|
caretColor: "var(--caret-color)"
|
|
3320
3320
|
},
|
|
3321
3321
|
onClick: (e) => e.stopPropagation()
|
|
@@ -3497,7 +3497,7 @@ const Input = forwardRef(function Input2({
|
|
|
3497
3497
|
const isFilled = currentValue.length > 0;
|
|
3498
3498
|
const bg = isDisabled ? "bg-disabled-bg" : "bg-background";
|
|
3499
3499
|
const floatLabel = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
3500
|
-
const filledValue = isDisabled ? "var(--disabled)" : "var(--
|
|
3500
|
+
const filledValue = isDisabled ? "var(--disabled)" : "var(--text-default-primary)";
|
|
3501
3501
|
const unitColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
3502
3502
|
const borderInset = isFocus || isError ? "-1px" : "0px";
|
|
3503
3503
|
const borderRad = isFocus || isError ? "9px" : "8px";
|
|
@@ -3507,7 +3507,7 @@ const Input = forwardRef(function Input2({
|
|
|
3507
3507
|
const charCount = currentValue.length;
|
|
3508
3508
|
const showBelow = isError || Boolean(helperText) || showCount;
|
|
3509
3509
|
const leftText = isError ? errorMessage : helperText ?? "";
|
|
3510
|
-
const leftColor = isError ? "var(--
|
|
3510
|
+
const leftColor = isError ? "var(--bg-danger-primary)" : "var(--muted-foreground)";
|
|
3511
3511
|
const handleChange = (e) => {
|
|
3512
3512
|
if (isDisabled) return;
|
|
3513
3513
|
let next = e.target.value;
|
|
@@ -4302,7 +4302,7 @@ const OptionList = forwardRef(
|
|
|
4302
4302
|
{
|
|
4303
4303
|
className: "min-h-[1px] min-w-0 flex-1 overflow-hidden text-sm leading-5 text-ellipsis whitespace-nowrap not-italic",
|
|
4304
4304
|
style: {
|
|
4305
|
-
color: disabled ? "var(--disabled)" : "var(--
|
|
4305
|
+
color: disabled ? "var(--disabled)" : "var(--text-default-primary)"
|
|
4306
4306
|
},
|
|
4307
4307
|
children: opt.label
|
|
4308
4308
|
}
|
|
@@ -4345,7 +4345,7 @@ const SearchInput = forwardRef(
|
|
|
4345
4345
|
const padding = size === "sm" ? "px-3.5 py-2" : "px-3.5 py-3";
|
|
4346
4346
|
const borderInset = focused ? "-1px" : "0px";
|
|
4347
4347
|
const borderRad = focused ? "9px" : "8px";
|
|
4348
|
-
const borderColor = focused ? "var(--primary-action)" : "var(--border)";
|
|
4348
|
+
const borderColor = focused ? "var(--primary-action)" : "var(--border-default)";
|
|
4349
4349
|
const handleChange = (next) => {
|
|
4350
4350
|
if (!controlled) setInternalValue(next);
|
|
4351
4351
|
onChange == null ? void 0 : onChange(next);
|
|
@@ -4413,7 +4413,7 @@ const SearchInput = forwardRef(
|
|
|
4413
4413
|
onBlur: () => setFocused(false),
|
|
4414
4414
|
className: "m-0 w-full border-none bg-transparent p-0 text-base leading-5 outline-none",
|
|
4415
4415
|
style: {
|
|
4416
|
-
color: isFilled ? "var(--
|
|
4416
|
+
color: isFilled ? "var(--text-default-primary)" : "transparent",
|
|
4417
4417
|
caretColor: "var(--caret-color)"
|
|
4418
4418
|
}
|
|
4419
4419
|
}
|
|
@@ -5073,14 +5073,14 @@ const TextArea = forwardRef(
|
|
|
5073
5073
|
const isFocus = state === "focus";
|
|
5074
5074
|
const isFilled = currentValue.length > 0;
|
|
5075
5075
|
const floatLabel = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
5076
|
-
const filledValue = isDisabled ? "var(--disabled)" : "var(--
|
|
5076
|
+
const filledValue = isDisabled ? "var(--disabled)" : "var(--text-default-primary)";
|
|
5077
5077
|
const borderInset = isFocus || isError ? "-1px" : "0px";
|
|
5078
5078
|
const borderRad = isFocus || isError ? "9px" : "8px";
|
|
5079
|
-
const borderColor = isDisabled ? "var(--border-disabled)" : isError ? "var(--
|
|
5079
|
+
const borderColor = isDisabled ? "var(--border-disabled)" : isError ? "var(--bg-danger-primary)" : isFocus ? "var(--primary-action)" : "var(--border-default)";
|
|
5080
5080
|
const charCount = currentValue.length;
|
|
5081
5081
|
const showBelow = isError || Boolean(helperText) || showCount;
|
|
5082
5082
|
const leftText = isError ? errorMessage : helperText ?? "";
|
|
5083
|
-
const leftColor = isError ? "var(--
|
|
5083
|
+
const leftColor = isError ? "var(--bg-danger-primary)" : "var(--muted-foreground)";
|
|
5084
5084
|
const countColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
5085
5085
|
const handleChange = (e) => {
|
|
5086
5086
|
let newValue = e.target.value;
|
|
@@ -5356,7 +5356,7 @@ function ScrollColumn({
|
|
|
5356
5356
|
style: {
|
|
5357
5357
|
fontSize: isSel ? 32 : 14,
|
|
5358
5358
|
lineHeight: 1,
|
|
5359
|
-
color: isSel ? "var(--
|
|
5359
|
+
color: isSel ? "var(--text-default-primary)" : "var(--disabled)",
|
|
5360
5360
|
transition: "font-size 0.1s, color 0.1s"
|
|
5361
5361
|
},
|
|
5362
5362
|
children: pad2(item)
|
|
@@ -5409,7 +5409,7 @@ function RangeSlotPicker({
|
|
|
5409
5409
|
className: "leading-[22px] relative shrink-0 text-[14px] text-center whitespace-nowrap",
|
|
5410
5410
|
style: {
|
|
5411
5411
|
fontVariationSettings: "'wdth' 100",
|
|
5412
|
-
color: isSelected ? "var(--on-primary-action)" : "var(--
|
|
5412
|
+
color: isSelected ? "var(--on-primary-action)" : "var(--text-default-primary)"
|
|
5413
5413
|
},
|
|
5414
5414
|
children: slot.label
|
|
5415
5415
|
}
|
|
@@ -5485,7 +5485,7 @@ function TimePickerContent({
|
|
|
5485
5485
|
style: {
|
|
5486
5486
|
fontSize: 32,
|
|
5487
5487
|
lineHeight: 1,
|
|
5488
|
-
color: "var(--
|
|
5488
|
+
color: "var(--text-default-primary)"
|
|
5489
5489
|
},
|
|
5490
5490
|
children: ":"
|
|
5491
5491
|
}
|
|
@@ -5555,14 +5555,14 @@ const TimeInput = forwardRef(
|
|
|
5555
5555
|
const isFilled = mode === "single" ? Boolean(currentValue) : true;
|
|
5556
5556
|
const bgClass = isDisabled ? "bg-disabled-bg" : "bg-background";
|
|
5557
5557
|
const labelColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
5558
|
-
const valueColor = isDisabled ? "var(--disabled)" : "var(--
|
|
5558
|
+
const valueColor = isDisabled ? "var(--disabled)" : "var(--text-default-primary)";
|
|
5559
5559
|
const iconColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
5560
5560
|
const minusColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
5561
5561
|
const asteriskColor = isDisabled ? "var(--disabled)" : "var(--error-dark)";
|
|
5562
5562
|
const asteriskSmall = isDisabled ? "var(--disabled)" : "var(--error-dark)";
|
|
5563
5563
|
const borderInset = isFocus || isError ? "-1px" : "0px";
|
|
5564
5564
|
const borderRad = isFocus || isError ? "9px" : "8px";
|
|
5565
|
-
const borderColor = isDisabled ? "var(--border-disabled)" : isError ? "var(--
|
|
5565
|
+
const borderColor = isDisabled ? "var(--border-disabled)" : isError ? "var(--bg-danger-primary)" : isFocus ? "var(--primary-action)" : "var(--border-default)";
|
|
5566
5566
|
const showBelow = isError || Boolean(helperText);
|
|
5567
5567
|
const leftText = isError ? errorMessage : helperText ?? "";
|
|
5568
5568
|
const leftColor = isError ? "var(--error-dark)" : "var(--muted-foreground)";
|
|
@@ -5850,7 +5850,7 @@ const TimeInput = forwardRef(
|
|
|
5850
5850
|
className: "z-50 rounded-[8px] bg-popover p-3 outline-none max-w-[340px] text-popover-foreground",
|
|
5851
5851
|
style: {
|
|
5852
5852
|
boxShadow: "var(--elevation-popover)",
|
|
5853
|
-
border: "1px solid var(--border)",
|
|
5853
|
+
border: "1px solid var(--border-default)",
|
|
5854
5854
|
minWidth: mode === "single" ? 327 : void 0
|
|
5855
5855
|
},
|
|
5856
5856
|
onOpenAutoFocus: (e) => e.preventDefault(),
|