@trackunit/react-form-components 2.6.48 → 2.6.50-alpha-7317206cecd.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/index.cjs.js +286 -308
- package/index.esm.js +287 -309
- package/package.json +8 -8
- package/src/components/ActionButton/ActionButton.variants.d.ts +60 -6
- package/src/components/BaseInput/BaseInput.variants.d.ts +317 -32
- package/src/components/BaseSelect/BaseSelect.variants.d.ts +248 -29
- package/src/components/Checkbox/Checkbox.variants.d.ts +71 -7
- package/src/components/ColorField/ColorField.variants.d.ts +30 -3
- package/src/components/DropZone/DropZone.variants.d.ts +101 -11
- package/src/components/FormGroup/FormGroup.variants.d.ts +57 -7
- package/src/components/Label/Label.variants.d.ts +55 -5
- package/src/components/OptionCard/OptionCard.variants.d.ts +164 -21
- package/src/components/RadioGroup/RadioGroup.variants.d.ts +70 -8
- package/src/components/Schedule/Schedule.variants.d.ts +12 -2
- package/src/components/Search/Search.variants.d.ts +34 -4
- package/src/components/TextAreaField/TextArea/TextAreaBaseInput.variants.d.ts +52 -5
- package/src/components/TimeRange/TimeRange.variants.d.ts +6 -1
- package/src/components/ToggleSwitch/ToggleSwitch.variants.d.ts +145 -12
- package/src/components/UploadInput/UploadInput.variants.d.ts +6 -1
- package/src/shared-cva/BinaryControlItem.variants.d.ts +46 -7
package/index.cjs.js
CHANGED
|
@@ -398,7 +398,8 @@ const useDateFieldLocale = () => {
|
|
|
398
398
|
}, [browserLocale, selectedLanguage]);
|
|
399
399
|
};
|
|
400
400
|
|
|
401
|
-
const cvaActionButton = cssClassVarianceUtilities.
|
|
401
|
+
const cvaActionButton = cssClassVarianceUtilities.cva({
|
|
402
|
+
base: ["drop-shadow-none", "rounded-md"],
|
|
402
403
|
variants: {
|
|
403
404
|
size: {
|
|
404
405
|
small: ["w-6", "h-6", "min-h-0"],
|
|
@@ -410,7 +411,8 @@ const cvaActionButton = cssClassVarianceUtilities.cvaMerge(["drop-shadow-none",
|
|
|
410
411
|
size: "medium",
|
|
411
412
|
},
|
|
412
413
|
});
|
|
413
|
-
const cvaActionContainer = cssClassVarianceUtilities.
|
|
414
|
+
const cvaActionContainer = cssClassVarianceUtilities.cva({
|
|
415
|
+
base: ["flex", "items-center"],
|
|
414
416
|
variants: {
|
|
415
417
|
size: {
|
|
416
418
|
//I just measured manually the top/bottom spacing
|
|
@@ -426,24 +428,24 @@ const cvaActionContainer = cssClassVarianceUtilities.cvaMerge(["flex", "items-ce
|
|
|
426
428
|
},
|
|
427
429
|
});
|
|
428
430
|
|
|
429
|
-
const cvaInputBase = cssClassVarianceUtilities.
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
"hover:border-neutral-300",
|
|
442
|
-
|
|
443
|
-
]);
|
|
444
|
-
const
|
|
445
|
-
const
|
|
446
|
-
|
|
431
|
+
const cvaInputBase = cssClassVarianceUtilities.cva({
|
|
432
|
+
base: [
|
|
433
|
+
"component-baseInput-shadow",
|
|
434
|
+
"component-baseInput-border",
|
|
435
|
+
"component-baseInput-background",
|
|
436
|
+
"border-neutral-300",
|
|
437
|
+
"hover:border-neutral-400",
|
|
438
|
+
"hover:bg-neutral-50",
|
|
439
|
+
"transition",
|
|
440
|
+
],
|
|
441
|
+
});
|
|
442
|
+
const cvaInputBaseDisabled = cssClassVarianceUtilities.cva({
|
|
443
|
+
base: ["bg-neutral-100", "hover:bg-neutral-100", "hover:border-neutral-300", "text-neutral-400"],
|
|
444
|
+
});
|
|
445
|
+
const cvaInputBaseInvalid = cssClassVarianceUtilities.cva({ base: ["border-danger-600"] });
|
|
446
|
+
const cvaInputBaseReadOnly = cssClassVarianceUtilities.cva({ base: ["text-neutral-500"] });
|
|
447
|
+
const cvaInputBaseSize = cssClassVarianceUtilities.cva({
|
|
448
|
+
base: "",
|
|
447
449
|
variants: {
|
|
448
450
|
size: {
|
|
449
451
|
small: ["h-7", "text-xs"],
|
|
@@ -455,18 +457,19 @@ const cvaInputBaseSize = cssClassVarianceUtilities.cvaMerge("", {
|
|
|
455
457
|
},
|
|
456
458
|
},
|
|
457
459
|
});
|
|
458
|
-
const cvaInput$1 = cssClassVarianceUtilities.
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
460
|
+
const cvaInput$1 = cssClassVarianceUtilities.cva({
|
|
461
|
+
base: [
|
|
462
|
+
"overflow-clip",
|
|
463
|
+
"grid",
|
|
464
|
+
// ! The layout of the grid is critical to the functioning of the cvaInputItemPlacementManager 👇
|
|
465
|
+
// The min restriction of the middle column (--spacing-20) is
|
|
466
|
+
// effectively the minimum width available for the text input
|
|
467
|
+
"grid-cols-[min-content_minmax(var(--spacing-20),1fr)_min-content]",
|
|
468
|
+
"grid-rows-1",
|
|
469
|
+
cvaInputBase(),
|
|
470
|
+
"focus-within:outline-native",
|
|
471
|
+
"text-neutral-900",
|
|
472
|
+
],
|
|
470
473
|
variants: {
|
|
471
474
|
size: {
|
|
472
475
|
small: cvaInputBaseSize({ size: "small" }),
|
|
@@ -514,7 +517,8 @@ const cvaInput$1 = cssClassVarianceUtilities.cvaMerge([
|
|
|
514
517
|
* The span position is used for the input field, which spans the entire grid.
|
|
515
518
|
*! Relies on the specific grid layout of cvaInput ☝️
|
|
516
519
|
*/
|
|
517
|
-
const cvaInputItemPlacementManager = cssClassVarianceUtilities.
|
|
520
|
+
const cvaInputItemPlacementManager = cssClassVarianceUtilities.cva({
|
|
521
|
+
base: [],
|
|
518
522
|
variants: {
|
|
519
523
|
position: {
|
|
520
524
|
before: ["col-start-1", "col-end-2", "row-start-1", "row-end-1"],
|
|
@@ -526,11 +530,12 @@ const cvaInputItemPlacementManager = cssClassVarianceUtilities.cvaMerge([], {
|
|
|
526
530
|
position: "span",
|
|
527
531
|
},
|
|
528
532
|
});
|
|
529
|
-
const cvaAccessoriesContainer = cssClassVarianceUtilities.
|
|
533
|
+
const cvaAccessoriesContainer = cssClassVarianceUtilities.cva({ base: ["grid", "h-full", "w-min", "auto-cols-min", "grid-flow-col"] });
|
|
530
534
|
/**
|
|
531
535
|
* Text size and color is handled by cvaInput
|
|
532
536
|
*/
|
|
533
|
-
const cvaInputElement = cssClassVarianceUtilities.
|
|
537
|
+
const cvaInputElement = cssClassVarianceUtilities.cva({
|
|
538
|
+
base: ["w-full", "px-3", "border-0", "bg-transparent", "placeholder-neutral-400", "truncate"],
|
|
534
539
|
variants: {
|
|
535
540
|
size: {
|
|
536
541
|
small: ["py-0.5"],
|
|
@@ -542,16 +547,17 @@ const cvaInputElement = cssClassVarianceUtilities.cvaMerge(["w-full", "px-3", "b
|
|
|
542
547
|
size: "medium",
|
|
543
548
|
},
|
|
544
549
|
});
|
|
545
|
-
const cvaInputAddon = cssClassVarianceUtilities.
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
550
|
+
const cvaInputAddon = cssClassVarianceUtilities.cva({
|
|
551
|
+
base: [
|
|
552
|
+
"flex",
|
|
553
|
+
"justify-center",
|
|
554
|
+
"items-center",
|
|
555
|
+
"px-3",
|
|
556
|
+
"border-neutral-300",
|
|
557
|
+
"text-neutral-500",
|
|
558
|
+
"bg-neutral-50",
|
|
559
|
+
"text-nowrap",
|
|
560
|
+
],
|
|
555
561
|
variants: {
|
|
556
562
|
size: {
|
|
557
563
|
small: ["text-xs"],
|
|
@@ -567,16 +573,17 @@ const cvaInputAddon = cssClassVarianceUtilities.cvaMerge([
|
|
|
567
573
|
size: "medium",
|
|
568
574
|
},
|
|
569
575
|
});
|
|
570
|
-
const cvaInputPrefix = cssClassVarianceUtilities.
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
576
|
+
const cvaInputPrefix = cssClassVarianceUtilities.cva({
|
|
577
|
+
base: [
|
|
578
|
+
"flex",
|
|
579
|
+
"justify-center",
|
|
580
|
+
"items-center",
|
|
581
|
+
"text-neutral-400",
|
|
582
|
+
"hover:component-search-prefix",
|
|
583
|
+
"component-baseInput-prefix",
|
|
584
|
+
"component-search-borderless",
|
|
585
|
+
"pl-2",
|
|
586
|
+
],
|
|
580
587
|
variants: {
|
|
581
588
|
disabled: {
|
|
582
589
|
true: ["text-neutral-500"],
|
|
@@ -587,7 +594,8 @@ const cvaInputPrefix = cssClassVarianceUtilities.cvaMerge([
|
|
|
587
594
|
disabled: false,
|
|
588
595
|
},
|
|
589
596
|
});
|
|
590
|
-
const cvaInputSuffix = cssClassVarianceUtilities.
|
|
597
|
+
const cvaInputSuffix = cssClassVarianceUtilities.cva({
|
|
598
|
+
base: ["flex", "justify-center", "items-center", "text-neutral-400", "pr-2"],
|
|
591
599
|
variants: {
|
|
592
600
|
disabled: {
|
|
593
601
|
true: ["text-neutral-500"],
|
|
@@ -1517,20 +1525,21 @@ const PhoneBaseInput = ({ "data-testid": dataTestId, isInvalid, disabled = false
|
|
|
1517
1525
|
return (jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-2", "data-testid": dataTestId ? `${dataTestId}-container` : null, children: jsxRuntime.jsx(BaseInput, { ...rest, actions: !disableAction && innerValue && innerValue.length > 0 ? (jsxRuntime.jsx(ActionButton, { "data-testid": dataTestId ? `${dataTestId}-phoneIcon` : undefined, disabled: isInvalid, size: fieldSize, title: t("phoneField.phoneNumber.label"), type: "PHONE_NUMBER", value: value?.toString() || "" })) : null, "data-testid": dataTestId ? `${dataTestId}-phoneNumberInput` : undefined, disabled: disabled, fieldSize: fieldSize, id: "phoneInput-number", isInvalid: isInvalid, name: name, onBlur: handleBlur, onChange: handleChange, onFocus: handleFocus, prefix: (countryCode && countryCodeToFlagEmoji(countryCode)) || undefined, readOnly: readOnly, ref: ref, type: "tel", value: innerValue }) }));
|
|
1518
1526
|
};
|
|
1519
1527
|
|
|
1520
|
-
const cvaTextAreaBaseInput = cssClassVarianceUtilities.
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1528
|
+
const cvaTextAreaBaseInput = cssClassVarianceUtilities.cva({
|
|
1529
|
+
base: [
|
|
1530
|
+
cvaInputBase(),
|
|
1531
|
+
"block",
|
|
1532
|
+
"overflow-auto",
|
|
1533
|
+
"appearance-none",
|
|
1534
|
+
"px-3",
|
|
1535
|
+
"py-2",
|
|
1536
|
+
"text-sm",
|
|
1537
|
+
"text-neutral-900",
|
|
1538
|
+
"placeholder-neutral-400",
|
|
1539
|
+
"w-full",
|
|
1540
|
+
"h-20",
|
|
1541
|
+
"transition",
|
|
1542
|
+
],
|
|
1534
1543
|
variants: {
|
|
1535
1544
|
disabled: {
|
|
1536
1545
|
true: cvaInputBaseDisabled(),
|
|
@@ -1568,7 +1577,8 @@ const TextBaseInput = ({ ref, ...rest }) => jsxRuntime.jsx(BaseInput, { ref: ref
|
|
|
1568
1577
|
* The container for the select component — with state styling
|
|
1569
1578
|
* !This is _the_ place in select styles to manage the aperance of the text and background
|
|
1570
1579
|
*/
|
|
1571
|
-
const cvaSelectContainer = cssClassVarianceUtilities.
|
|
1580
|
+
const cvaSelectContainer = cssClassVarianceUtilities.cva({
|
|
1581
|
+
base: [cvaInputBase(), "relative", "transition", "min-h-0"],
|
|
1572
1582
|
variants: {
|
|
1573
1583
|
fieldSize: {
|
|
1574
1584
|
small: cvaInputBaseSize({ size: "small" }),
|
|
@@ -1600,26 +1610,18 @@ const cvaSelectContainer = cssClassVarianceUtilities.cvaMerge([cvaInputBase(), "
|
|
|
1600
1610
|
},
|
|
1601
1611
|
},
|
|
1602
1612
|
});
|
|
1603
|
-
const cvaSelectControl = cssClassVarianceUtilities.
|
|
1604
|
-
const cvaSelectLoadingMessage = cssClassVarianceUtilities.
|
|
1605
|
-
const cvaSelectNoOptionsMessage = cssClassVarianceUtilities.
|
|
1606
|
-
const cvaSelectDropdownIconContainer = cssClassVarianceUtilities.
|
|
1607
|
-
"flex",
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
"hover:text-neutral-500",
|
|
1612
|
-
|
|
1613
|
-
const
|
|
1614
|
-
|
|
1615
|
-
"flex",
|
|
1616
|
-
"cursor-pointer",
|
|
1617
|
-
"items-center",
|
|
1618
|
-
"justify-center",
|
|
1619
|
-
"text-neutral-400",
|
|
1620
|
-
"hover:text-neutral-500",
|
|
1621
|
-
]);
|
|
1622
|
-
const cvaSelectDropdownIndicator = cssClassVarianceUtilities.cvaMerge(["transition-transform", "duration-200"], {
|
|
1613
|
+
const cvaSelectControl = cssClassVarianceUtilities.cva({ base: ["px-3", "gap-x-1", "flex", "h-full"] });
|
|
1614
|
+
const cvaSelectLoadingMessage = cssClassVarianceUtilities.cva({ base: ["text-neutral-400", "text-center"] });
|
|
1615
|
+
const cvaSelectNoOptionsMessage = cssClassVarianceUtilities.cva({ base: ["text-neutral-400", "text-center"] });
|
|
1616
|
+
const cvaSelectDropdownIconContainer = cssClassVarianceUtilities.cva({
|
|
1617
|
+
base: ["flex", "cursor-pointer", "place-items-center", "text-neutral-400", "hover:text-neutral-500"],
|
|
1618
|
+
});
|
|
1619
|
+
const cvaSelectPrefixSuffix = cssClassVarianceUtilities.cva({ base: ["flex", "items-center", "text-neutral-400"] });
|
|
1620
|
+
const cvaSelectClearIndicator = cssClassVarianceUtilities.cva({
|
|
1621
|
+
base: ["flex", "cursor-pointer", "items-center", "justify-center", "text-neutral-400", "hover:text-neutral-500"],
|
|
1622
|
+
});
|
|
1623
|
+
const cvaSelectDropdownIndicator = cssClassVarianceUtilities.cva({
|
|
1624
|
+
base: ["transition-transform", "duration-200"],
|
|
1623
1625
|
variants: {
|
|
1624
1626
|
menuIsOpen: {
|
|
1625
1627
|
true: "rotate-180",
|
|
@@ -1627,29 +1629,20 @@ const cvaSelectDropdownIndicator = cssClassVarianceUtilities.cvaMerge(["transiti
|
|
|
1627
1629
|
},
|
|
1628
1630
|
},
|
|
1629
1631
|
});
|
|
1630
|
-
const cvaSelectValueContainer = cssClassVarianceUtilities.
|
|
1631
|
-
"flex",
|
|
1632
|
-
|
|
1633
|
-
"items-center",
|
|
1634
|
-
"grow",
|
|
1635
|
-
"overflow-hidden",
|
|
1636
|
-
"relative",
|
|
1637
|
-
"gap-x-1",
|
|
1638
|
-
]);
|
|
1632
|
+
const cvaSelectValueContainer = cssClassVarianceUtilities.cva({
|
|
1633
|
+
base: ["flex", "flex-nowrap", "items-center", "grow", "overflow-hidden", "relative", "gap-x-1"],
|
|
1634
|
+
});
|
|
1639
1635
|
// for the placement of items inside the value container
|
|
1640
|
-
const insideValueContainerClasses = cssClassVarianceUtilities.
|
|
1641
|
-
const cvaSelectSingleValue = cssClassVarianceUtilities.
|
|
1642
|
-
insideValueContainerClasses(),
|
|
1643
|
-
|
|
1644
|
-
"overflow-hidden",
|
|
1645
|
-
"text-ellipsis",
|
|
1646
|
-
"whitespace-nowrap",
|
|
1647
|
-
]);
|
|
1636
|
+
const insideValueContainerClasses = cssClassVarianceUtilities.cva({ base: ["col-start-1", "col-end-3", "row-start-1", "row-end-2"] });
|
|
1637
|
+
const cvaSelectSingleValue = cssClassVarianceUtilities.cva({
|
|
1638
|
+
base: [insideValueContainerClasses(), "max-w-full", "overflow-hidden", "text-ellipsis", "whitespace-nowrap"],
|
|
1639
|
+
});
|
|
1648
1640
|
// No `w-full`: useCustomComponents.tsx's custom `Menu` applies edge-aware min/max-width and
|
|
1649
1641
|
// left/right alignment as an inline style (see utils/computeMenuGeometry.ts), so a
|
|
1650
1642
|
// static Tailwind width class here would just compete with that. The menu sizes intrinsically
|
|
1651
1643
|
// (shrink-to-fit, bounded by that inline min/max-width) as a result.
|
|
1652
|
-
const cvaSelectMenu = cssClassVarianceUtilities.
|
|
1644
|
+
const cvaSelectMenu = cssClassVarianceUtilities.cva({
|
|
1645
|
+
base: [reactComponents.cvaMenu({ limitWidth: false }), "absolute"],
|
|
1653
1646
|
variants: {
|
|
1654
1647
|
placement: {
|
|
1655
1648
|
bottom: "top-[calc(100%+var(--spacing-1))]",
|
|
@@ -1660,10 +1653,11 @@ const cvaSelectMenu = cssClassVarianceUtilities.cvaMerge([reactComponents.cvaMen
|
|
|
1660
1653
|
placement: "bottom",
|
|
1661
1654
|
},
|
|
1662
1655
|
});
|
|
1663
|
-
const cvaSelectMenuList = cssClassVarianceUtilities.
|
|
1664
|
-
const cvaSelectPlaceholder = cssClassVarianceUtilities.
|
|
1665
|
-
const cvaSelectIndicatorsContainer = cssClassVarianceUtilities.
|
|
1666
|
-
const cvaSelectMultiValue = cssClassVarianceUtilities.
|
|
1656
|
+
const cvaSelectMenuList = cssClassVarianceUtilities.cva({ base: [reactComponents.cvaMenuList(), "relative", "w-full"] });
|
|
1657
|
+
const cvaSelectPlaceholder = cssClassVarianceUtilities.cva({ base: ["absolute", "text-neutral-400"] });
|
|
1658
|
+
const cvaSelectIndicatorsContainer = cssClassVarianceUtilities.cva({ base: ["flex", "items-center", "gap-x-1"] });
|
|
1659
|
+
const cvaSelectMultiValue = cssClassVarianceUtilities.cva({
|
|
1660
|
+
base: [],
|
|
1667
1661
|
variants: {
|
|
1668
1662
|
hidden: {
|
|
1669
1663
|
true: "!hidden",
|
|
@@ -1712,26 +1706,29 @@ const MultiValue = ({ data, children, onClose, className, disabled, fieldSize, g
|
|
|
1712
1706
|
/**
|
|
1713
1707
|
* Shared CVA for binary control items: Checkbox, RadioItem, ToggleSwitchOption
|
|
1714
1708
|
*/
|
|
1715
|
-
const cvaBinaryControlWrapper = cssClassVarianceUtilities.
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
const
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1709
|
+
const cvaBinaryControlWrapper = cssClassVarianceUtilities.cva({
|
|
1710
|
+
base: [
|
|
1711
|
+
"grid-rows-subgrid", //* Children align to this parent grid
|
|
1712
|
+
"grid-cols-min-fr", //* explicit horizontal placement for input and label/description
|
|
1713
|
+
"auto-rows-auto", //* optional extra rows (suffix) will be auto-sized
|
|
1714
|
+
"group",
|
|
1715
|
+
"grid",
|
|
1716
|
+
"gap-x-2",
|
|
1717
|
+
],
|
|
1718
|
+
});
|
|
1719
|
+
const cvaBinaryControlLabelTooltip = cssClassVarianceUtilities.cva({ base: ["col-start-2", "w-full", "min-w-0", "self-center"] });
|
|
1720
|
+
const cvaBinaryControlDescriptionTooltip = cssClassVarianceUtilities.cva({ base: ["col-span-2", "col-start-2", "row-start-2", "w-full"] });
|
|
1721
|
+
const cvaBinaryControlDescription = cssClassVarianceUtilities.cva({
|
|
1722
|
+
base: [
|
|
1723
|
+
"text-sm",
|
|
1724
|
+
"font-normal",
|
|
1725
|
+
"text-neutral-500",
|
|
1726
|
+
"text-left",
|
|
1727
|
+
"whitespace-nowrap",
|
|
1728
|
+
"select-none",
|
|
1729
|
+
"text-ellipsis",
|
|
1730
|
+
"overflow-hidden",
|
|
1731
|
+
],
|
|
1735
1732
|
variants: {
|
|
1736
1733
|
disabled: {
|
|
1737
1734
|
true: ["text-neutral-400", "hover:text-neutral-400", "group-hover:text-neutral-400"],
|
|
@@ -1739,16 +1736,17 @@ const cvaBinaryControlDescription = cssClassVarianceUtilities.cvaMerge([
|
|
|
1739
1736
|
},
|
|
1740
1737
|
},
|
|
1741
1738
|
});
|
|
1742
|
-
const cvaBinaryControlSuffixContainer = cssClassVarianceUtilities.
|
|
1739
|
+
const cvaBinaryControlSuffixContainer = cssClassVarianceUtilities.cva({ base: ["flex", "col-start-3", "items-center"] });
|
|
1743
1740
|
|
|
1744
|
-
const cvaLabel = cssClassVarianceUtilities.
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1741
|
+
const cvaLabel = cssClassVarianceUtilities.cva({
|
|
1742
|
+
base: [
|
|
1743
|
+
"text-sm",
|
|
1744
|
+
"text-neutral-700",
|
|
1745
|
+
"hover:text-neutral-800",
|
|
1746
|
+
"group-hover:text-neutral-800",
|
|
1747
|
+
"active:text-neutral-800",
|
|
1748
|
+
"group-active:text-neutral-800",
|
|
1749
|
+
],
|
|
1752
1750
|
variants: {
|
|
1753
1751
|
invalid: {
|
|
1754
1752
|
true: "text-danger-600 hover:text-danger-700 active:text-danger-700 group-hover:text-danger-700 group-active:text-danger-700",
|
|
@@ -1784,30 +1782,31 @@ const CheckIcon = ({ className, "data-testid": dataTestId }) => {
|
|
|
1784
1782
|
* Checkbox input styling - directly styles the input element (no wrapper span needed).
|
|
1785
1783
|
* Uses appearance-none to remove native styling, similar to RadioItem.
|
|
1786
1784
|
*/
|
|
1787
|
-
const cvaCheckbox = cssClassVarianceUtilities.
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1785
|
+
const cvaCheckbox = cssClassVarianceUtilities.cva({
|
|
1786
|
+
base: [
|
|
1787
|
+
"appearance-none",
|
|
1788
|
+
"w-4",
|
|
1789
|
+
"h-4",
|
|
1790
|
+
"border-solid",
|
|
1791
|
+
"border",
|
|
1792
|
+
"shrink-0",
|
|
1793
|
+
"border-neutral-300",
|
|
1794
|
+
"rounded",
|
|
1795
|
+
"hover:bg-neutral-100",
|
|
1796
|
+
"bg-white",
|
|
1797
|
+
"shadow-sm",
|
|
1798
|
+
"box-border",
|
|
1799
|
+
"transition",
|
|
1800
|
+
"cursor-pointer",
|
|
1801
|
+
"active:bg-neutral-200",
|
|
1802
|
+
"active:ring-2",
|
|
1803
|
+
"active:ring-inset",
|
|
1804
|
+
"active:ring-primary-700",
|
|
1805
|
+
"group-active:ring-2",
|
|
1806
|
+
"group-active:ring-inset",
|
|
1807
|
+
"group-active:ring-primary-700",
|
|
1808
|
+
"focus:outline-native",
|
|
1809
|
+
],
|
|
1811
1810
|
variants: {
|
|
1812
1811
|
invalid: {
|
|
1813
1812
|
true: ["border-danger-600", "active:ring-danger-700", "group-focus:ring-2", "group-focus:ring-inset"],
|
|
@@ -1882,15 +1881,10 @@ const cvaCheckbox = cssClassVarianceUtilities.cvaMerge([
|
|
|
1882
1881
|
/**
|
|
1883
1882
|
* Icon overlay container - positioned on top of the input, receives no pointer events
|
|
1884
1883
|
*/
|
|
1885
|
-
const cvaCheckboxIconOverlay = cssClassVarianceUtilities.
|
|
1886
|
-
"flex",
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
"w-4",
|
|
1890
|
-
"h-4",
|
|
1891
|
-
"pointer-events-none",
|
|
1892
|
-
]);
|
|
1893
|
-
const cvaCheckboxIcon = cssClassVarianceUtilities.cvaMerge(["w-2.5", "h-2.5", "text-white"]);
|
|
1884
|
+
const cvaCheckboxIconOverlay = cssClassVarianceUtilities.cva({
|
|
1885
|
+
base: ["flex", "items-center", "justify-center", "w-4", "h-4", "pointer-events-none"],
|
|
1886
|
+
});
|
|
1887
|
+
const cvaCheckboxIcon = cssClassVarianceUtilities.cva({ base: ["w-2.5", "h-2.5", "text-white"] });
|
|
1894
1888
|
|
|
1895
1889
|
/**
|
|
1896
1890
|
* The IndeterminateIcon component is used by the checkbox to display the Indeterminate state.
|
|
@@ -3067,9 +3061,10 @@ const Label = ({ id, htmlFor, children, className, "data-testid": dataTestId, di
|
|
|
3067
3061
|
return (jsxRuntime.jsx("label", { className: cvaLabel({ invalid: isInvalid, disabled, className }), "data-testid": dataTestId, htmlFor: htmlFor || "", id: id || "", ref: ref, style: style, children: children }));
|
|
3068
3062
|
};
|
|
3069
3063
|
|
|
3070
|
-
const cvaFormGroup = cssClassVarianceUtilities.
|
|
3071
|
-
const cvaFormGroupContainerBefore = cssClassVarianceUtilities.
|
|
3072
|
-
const cvaFormGroupContainerAfter = cssClassVarianceUtilities.
|
|
3064
|
+
const cvaFormGroup = cssClassVarianceUtilities.cva({ base: ["component-formGroup-gap", "group", "form-group"] });
|
|
3065
|
+
const cvaFormGroupContainerBefore = cssClassVarianceUtilities.cva({ base: ["flex", "mb-1", "items-center"] });
|
|
3066
|
+
const cvaFormGroupContainerAfter = cssClassVarianceUtilities.cva({
|
|
3067
|
+
base: ["flex", "justify-between", "mt-1", "text-xs", "text-neutral-500"],
|
|
3073
3068
|
variants: {
|
|
3074
3069
|
invalid: {
|
|
3075
3070
|
true: "text-danger-500",
|
|
@@ -3088,7 +3083,7 @@ const cvaFormGroupContainerAfter = cssClassVarianceUtilities.cvaMerge(["flex", "
|
|
|
3088
3083
|
},
|
|
3089
3084
|
],
|
|
3090
3085
|
});
|
|
3091
|
-
const cvaHelpAddon = cssClassVarianceUtilities.
|
|
3086
|
+
const cvaHelpAddon = cssClassVarianceUtilities.cva({ base: ["ml-auto"] });
|
|
3092
3087
|
|
|
3093
3088
|
/**
|
|
3094
3089
|
* FormGroup wraps an input element with a label, optional tooltip, help text, and validation styling.
|
|
@@ -3193,16 +3188,17 @@ const validateColorCode = (colorCode, required) => {
|
|
|
3193
3188
|
return "INVALID_HEX_CODE";
|
|
3194
3189
|
};
|
|
3195
3190
|
|
|
3196
|
-
const cvaInputColorField = cssClassVarianceUtilities.
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
],
|
|
3191
|
+
const cvaInputColorField = cssClassVarianceUtilities.cva({
|
|
3192
|
+
base: [
|
|
3193
|
+
"ml-3",
|
|
3194
|
+
"h-4",
|
|
3195
|
+
"w-4",
|
|
3196
|
+
"self-center",
|
|
3197
|
+
"bg-inherit",
|
|
3198
|
+
"disabled:opacity-50",
|
|
3199
|
+
"disabled:pointer-events-none",
|
|
3200
|
+
"rounded-[4px]",
|
|
3201
|
+
],
|
|
3206
3202
|
variants: {
|
|
3207
3203
|
readOnly: {
|
|
3208
3204
|
true: "pointer-events-none",
|
|
@@ -3400,19 +3396,20 @@ const DateField = ({ label, id, tip, helpText, errorMessage, helpAddon, isInvali
|
|
|
3400
3396
|
};
|
|
3401
3397
|
DateField.displayName = "DateField";
|
|
3402
3398
|
|
|
3403
|
-
const cvaDropZone = cssClassVarianceUtilities.
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3399
|
+
const cvaDropZone = cssClassVarianceUtilities.cva({
|
|
3400
|
+
base: [
|
|
3401
|
+
"flex",
|
|
3402
|
+
"component-baseInput-background",
|
|
3403
|
+
"justify-center",
|
|
3404
|
+
"text-neutral-500",
|
|
3405
|
+
"rounded-lg",
|
|
3406
|
+
"border-2",
|
|
3407
|
+
"border-neutral-200",
|
|
3408
|
+
"border-dashed",
|
|
3409
|
+
"hover:bg-neutral-100",
|
|
3410
|
+
"hover:border-solid",
|
|
3411
|
+
"hover:border-primary-500",
|
|
3412
|
+
],
|
|
3416
3413
|
variants: {
|
|
3417
3414
|
size: {
|
|
3418
3415
|
small: ["p-2"],
|
|
@@ -3422,29 +3419,17 @@ const cvaDropZone = cssClassVarianceUtilities.cvaMerge([
|
|
|
3422
3419
|
disabled: { true: ["bg-neutral-100", "hover:bg-neutral-100"], false: "" },
|
|
3423
3420
|
dragActive: { true: ["border-neutral-200", "bg-neutral-100"], false: "" },
|
|
3424
3421
|
dropComplete: {
|
|
3425
|
-
true: [
|
|
3426
|
-
"border-solid",
|
|
3427
|
-
"border-primary-500",
|
|
3428
|
-
"bg-neutral-100",
|
|
3429
|
-
"hover:border-solid",
|
|
3430
|
-
"hover:border-neutral-200",
|
|
3431
|
-
],
|
|
3422
|
+
true: ["border-solid", "border-primary-500", "bg-neutral-100", "hover:border-solid", "hover:border-neutral-200"],
|
|
3432
3423
|
false: "",
|
|
3433
3424
|
},
|
|
3434
3425
|
invalid: { true: ["border-danger-600", "text-danger-500"], false: "" },
|
|
3435
3426
|
},
|
|
3436
3427
|
});
|
|
3437
|
-
const cvaDropZoneLabel = cssClassVarianceUtilities.
|
|
3438
|
-
"h-full",
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
"
|
|
3442
|
-
"items-center",
|
|
3443
|
-
"flex-col",
|
|
3444
|
-
"flex",
|
|
3445
|
-
"justify-center",
|
|
3446
|
-
]);
|
|
3447
|
-
const cvaDropZoneIconBackground = cssClassVarianceUtilities.cvaMerge(["relative", "flex", "items-center", "justify-center", "rounded-full", "p-3"], {
|
|
3428
|
+
const cvaDropZoneLabel = cssClassVarianceUtilities.cva({
|
|
3429
|
+
base: ["h-full", "pt-1", "pb-1", "gap-2", "items-center", "flex-col", "flex", "justify-center"],
|
|
3430
|
+
});
|
|
3431
|
+
const cvaDropZoneIconBackground = cssClassVarianceUtilities.cva({
|
|
3432
|
+
base: ["relative", "flex", "items-center", "justify-center", "rounded-full", "p-3"],
|
|
3448
3433
|
variants: {
|
|
3449
3434
|
invalid: { true: ["bg-danger-100"], false: ["bg-neutral-200"] },
|
|
3450
3435
|
},
|
|
@@ -4005,27 +3990,28 @@ const NumberField = ({ label, id, tip, helpText, errorMessage, helpAddon, isInva
|
|
|
4005
3990
|
};
|
|
4006
3991
|
NumberField.displayName = "NumberField";
|
|
4007
3992
|
|
|
4008
|
-
const cvaOptionCardLabel = cssClassVarianceUtilities.
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
3993
|
+
const cvaOptionCardLabel = cssClassVarianceUtilities.cva({
|
|
3994
|
+
base: [
|
|
3995
|
+
"group",
|
|
3996
|
+
"transition",
|
|
3997
|
+
"bg-white",
|
|
3998
|
+
"outline",
|
|
3999
|
+
"outline-1",
|
|
4000
|
+
"outline-neutral-300",
|
|
4001
|
+
"hover:bg-neutral-100",
|
|
4002
|
+
"focus:bg-neutral-200",
|
|
4003
|
+
"active:bg-neutral-200",
|
|
4004
|
+
"peer-checked:bg-primary-50",
|
|
4005
|
+
"peer-checked:outline-primary-600",
|
|
4006
|
+
"peer-checked:outline-2",
|
|
4007
|
+
"flex",
|
|
4008
|
+
"gap-2",
|
|
4009
|
+
"justify-center",
|
|
4010
|
+
"items-center",
|
|
4011
|
+
"text-center",
|
|
4012
|
+
"rounded-md",
|
|
4013
|
+
"relative",
|
|
4014
|
+
],
|
|
4029
4015
|
variants: {
|
|
4030
4016
|
disabled: {
|
|
4031
4017
|
true: ["cursor-not-allowed", "bg-neutral-100"],
|
|
@@ -4037,9 +4023,10 @@ const cvaOptionCardLabel = cssClassVarianceUtilities.cvaMerge([
|
|
|
4037
4023
|
},
|
|
4038
4024
|
},
|
|
4039
4025
|
});
|
|
4040
|
-
const cvaOptionCardContent = cssClassVarianceUtilities.
|
|
4041
|
-
const cvaOptionCardContainer = cssClassVarianceUtilities.
|
|
4042
|
-
const cvaOptionCardTitle = cssClassVarianceUtilities.
|
|
4026
|
+
const cvaOptionCardContent = cssClassVarianceUtilities.cva({ base: ["flex", "flex-col", "items-center"] });
|
|
4027
|
+
const cvaOptionCardContainer = cssClassVarianceUtilities.cva({ base: ["flex", "grow-0"] });
|
|
4028
|
+
const cvaOptionCardTitle = cssClassVarianceUtilities.cva({
|
|
4029
|
+
base: ["text-neutral-600"],
|
|
4043
4030
|
variants: {
|
|
4044
4031
|
layout: {
|
|
4045
4032
|
default: ["text-lg", "line-clamp-2"],
|
|
@@ -4051,7 +4038,8 @@ const cvaOptionCardTitle = cssClassVarianceUtilities.cvaMerge(["text-neutral-600
|
|
|
4051
4038
|
},
|
|
4052
4039
|
},
|
|
4053
4040
|
});
|
|
4054
|
-
const cvaOptionCardText = cssClassVarianceUtilities.
|
|
4041
|
+
const cvaOptionCardText = cssClassVarianceUtilities.cva({
|
|
4042
|
+
base: ["text-neutral-600", "text-sm"],
|
|
4055
4043
|
variants: {
|
|
4056
4044
|
type: {
|
|
4057
4045
|
subheading: ["font-medium"],
|
|
@@ -4063,8 +4051,9 @@ const cvaOptionCardText = cssClassVarianceUtilities.cvaMerge(["text-neutral-600"
|
|
|
4063
4051
|
},
|
|
4064
4052
|
},
|
|
4065
4053
|
});
|
|
4066
|
-
const cvaInput = cssClassVarianceUtilities.
|
|
4067
|
-
const cvaCustomImage = cssClassVarianceUtilities.
|
|
4054
|
+
const cvaInput = cssClassVarianceUtilities.cva({ base: ["peer", "absolute", "h-0", "w-0", "opacity-0"] });
|
|
4055
|
+
const cvaCustomImage = cssClassVarianceUtilities.cva({
|
|
4056
|
+
base: ["text-neutral-400"],
|
|
4068
4057
|
variants: {
|
|
4069
4058
|
disabled: {
|
|
4070
4059
|
true: ["!text-neutral-400"],
|
|
@@ -4072,7 +4061,8 @@ const cvaCustomImage = cssClassVarianceUtilities.cvaMerge(["text-neutral-400"],
|
|
|
4072
4061
|
},
|
|
4073
4062
|
},
|
|
4074
4063
|
});
|
|
4075
|
-
const cvaTag = cssClassVarianceUtilities.
|
|
4064
|
+
const cvaTag = cssClassVarianceUtilities.cva({
|
|
4065
|
+
base: [],
|
|
4076
4066
|
variants: {
|
|
4077
4067
|
layout: {
|
|
4078
4068
|
default: ["absolute", "top-2", "right-2"],
|
|
@@ -4343,31 +4333,33 @@ const PhoneFieldWithController = ({ control, controllerProps, name, value, ref,
|
|
|
4343
4333
|
};
|
|
4344
4334
|
PhoneFieldWithController.displayName = "PhoneFieldWithController";
|
|
4345
4335
|
|
|
4346
|
-
const cvaInputGroup = cssClassVarianceUtilities.
|
|
4336
|
+
const cvaInputGroup = cssClassVarianceUtilities.cva({
|
|
4337
|
+
base: ["flex", "gap-2", "flex-col", "items-start"],
|
|
4347
4338
|
variants: {
|
|
4348
4339
|
layout: {
|
|
4349
4340
|
inline: ["flex", "gap-3", "flex-row", "items-center"],
|
|
4350
4341
|
},
|
|
4351
4342
|
},
|
|
4352
4343
|
});
|
|
4353
|
-
const cvaRadioItem = cssClassVarianceUtilities.
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4344
|
+
const cvaRadioItem = cssClassVarianceUtilities.cva({
|
|
4345
|
+
base: [
|
|
4346
|
+
"self-center",
|
|
4347
|
+
"w-4",
|
|
4348
|
+
"h-4",
|
|
4349
|
+
"appearance-none",
|
|
4350
|
+
"rounded-3xl",
|
|
4351
|
+
"bg-white",
|
|
4352
|
+
"border-solid",
|
|
4353
|
+
"border",
|
|
4354
|
+
"border-neutral-300",
|
|
4355
|
+
"shadow-sm",
|
|
4356
|
+
"shrink-0",
|
|
4357
|
+
"transition",
|
|
4358
|
+
"box-border",
|
|
4359
|
+
"hover:cursor-pointer",
|
|
4360
|
+
"hover:bg-neutral-100",
|
|
4361
|
+
"focus:outline-native",
|
|
4362
|
+
],
|
|
4371
4363
|
variants: {
|
|
4372
4364
|
checked: {
|
|
4373
4365
|
true: [
|
|
@@ -4467,7 +4459,7 @@ const RadioGroupContext = react.createContext(null);
|
|
|
4467
4459
|
* @returns {ReactElement} RadioGroup component
|
|
4468
4460
|
*/
|
|
4469
4461
|
const RadioGroup = ({ children, id, name, value, disabled, onChange, label, inline = false, className, "data-testid": dataTestId, isInvalid, style, ref, }) => {
|
|
4470
|
-
return (jsxRuntime.jsx(FormGroup, { "data-testid": dataTestId ? `${dataTestId}-FormGroup` : undefined, label: label, children: jsxRuntime.jsx("div", { className: cvaInputGroup({ layout: inline ? "inline" :
|
|
4462
|
+
return (jsxRuntime.jsx(FormGroup, { "data-testid": dataTestId ? `${dataTestId}-FormGroup` : undefined, label: label, children: jsxRuntime.jsx("div", { className: cvaInputGroup({ layout: inline ? "inline" : undefined, className }), "data-testid": dataTestId, ref: ref, role: "radiogroup", style: style, children: jsxRuntime.jsx(RadioGroupContext.Provider, { value: {
|
|
4471
4463
|
id,
|
|
4472
4464
|
value,
|
|
4473
4465
|
name: name || id,
|
|
@@ -4531,15 +4523,9 @@ const useRadioItemChecked = (value) => {
|
|
|
4531
4523
|
return radioGroupContext?.value === value;
|
|
4532
4524
|
};
|
|
4533
4525
|
|
|
4534
|
-
const cvaTimeRange = cssClassVarianceUtilities.
|
|
4535
|
-
"flex",
|
|
4536
|
-
|
|
4537
|
-
"items-center",
|
|
4538
|
-
"gap-4",
|
|
4539
|
-
"max-sm:gap-2",
|
|
4540
|
-
"border-transparent",
|
|
4541
|
-
"rounded-md",
|
|
4542
|
-
]);
|
|
4526
|
+
const cvaTimeRange = cssClassVarianceUtilities.cva({
|
|
4527
|
+
base: ["flex", "flex-1", "items-center", "gap-4", "max-sm:gap-2", "border-transparent", "rounded-md"],
|
|
4528
|
+
});
|
|
4543
4529
|
|
|
4544
4530
|
/**
|
|
4545
4531
|
* TimeRange renders a pair of native `<input type="time">` fields for selecting a start and end time.
|
|
@@ -4581,14 +4567,10 @@ const TimeRange = ({ id, className, "data-testid": dataTestId, children, range,
|
|
|
4581
4567
|
};
|
|
4582
4568
|
const DEFAULT_TIME = "12:00";
|
|
4583
4569
|
|
|
4584
|
-
const cvaScheduleItem = cssClassVarianceUtilities.
|
|
4585
|
-
"grid",
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
"grid-cols-[60px_200px_60px_2fr]",
|
|
4589
|
-
"max-sm:grid-cols-1",
|
|
4590
|
-
]);
|
|
4591
|
-
const cvaScheduleItemText = cssClassVarianceUtilities.cvaMerge(["flex", "font-bold", "self-center"]);
|
|
4570
|
+
const cvaScheduleItem = cssClassVarianceUtilities.cva({
|
|
4571
|
+
base: ["grid", "pb-4", "gap-2", "grid-cols-[60px_200px_60px_2fr]", "max-sm:grid-cols-1"],
|
|
4572
|
+
});
|
|
4573
|
+
const cvaScheduleItemText = cssClassVarianceUtilities.cva({ base: ["flex", "font-bold", "self-center"] });
|
|
4592
4574
|
|
|
4593
4575
|
/**
|
|
4594
4576
|
* Schedule renders a weekly time-range editor where each row represents a day with an active toggle,
|
|
@@ -4780,15 +4762,16 @@ const hasConsecutiveDays = (schedule) => {
|
|
|
4780
4762
|
return schedule.every(({ day }, index) => day === days[index]);
|
|
4781
4763
|
};
|
|
4782
4764
|
|
|
4783
|
-
const cvaSearch = cssClassVarianceUtilities.
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4765
|
+
const cvaSearch = cssClassVarianceUtilities.cva({
|
|
4766
|
+
base: [
|
|
4767
|
+
"shadow-none",
|
|
4768
|
+
"component-search-border",
|
|
4769
|
+
"component-search-background",
|
|
4770
|
+
"hover:component-search-background",
|
|
4771
|
+
"hover:component-search-focus-hover",
|
|
4772
|
+
"transition-all",
|
|
4773
|
+
"duration-300",
|
|
4774
|
+
],
|
|
4792
4775
|
variants: {
|
|
4793
4776
|
border: { true: ["!component-search-borderless"], false: "" },
|
|
4794
4777
|
widenOnFocus: {
|
|
@@ -5246,9 +5229,10 @@ const TimeRangeField = ({ className, "data-testid": dataTestId, onChange, isInva
|
|
|
5246
5229
|
return (jsxRuntime.jsx(FormGroup, { "data-testid": dataTestId ? `${dataTestId}-FormGroup` : undefined, helpText: (renderAsInvalid && errorMessage) || helpText, htmlFor: htmlFor, isInvalid: renderAsInvalid, label: label, ref: ref, style: style, tip: tip, children: jsxRuntime.jsx(TimeRange, { className: className, "data-testid": dataTestId, isInvalid: renderAsInvalid, onChange: onChange, ...rest, children: children }) }));
|
|
5247
5230
|
};
|
|
5248
5231
|
|
|
5249
|
-
const cvaToggleSwitchWrapper = cssClassVarianceUtilities.
|
|
5250
|
-
const cvaToggleSwitchInput = cssClassVarianceUtilities.
|
|
5251
|
-
const cvaToggleSwitchTrack = cssClassVarianceUtilities.
|
|
5232
|
+
const cvaToggleSwitchWrapper = cssClassVarianceUtilities.cva({ base: ["grid", "grid-cols-[auto]", "items-center"] });
|
|
5233
|
+
const cvaToggleSwitchInput = cssClassVarianceUtilities.cva({ base: ["absolute", "pointer-events-none", "w-0", "h-0", "opacity-0"] });
|
|
5234
|
+
const cvaToggleSwitchTrack = cssClassVarianceUtilities.cva({
|
|
5235
|
+
base: ["items-center", "shrink-0", "rounded-full", "transition-colors"],
|
|
5252
5236
|
variants: {
|
|
5253
5237
|
size: {
|
|
5254
5238
|
small: ["w-5", "p-0.5"],
|
|
@@ -5287,7 +5271,8 @@ const cvaToggleSwitchTrack = cssClassVarianceUtilities.cvaMerge(["items-center",
|
|
|
5287
5271
|
disabled: false,
|
|
5288
5272
|
},
|
|
5289
5273
|
});
|
|
5290
|
-
const cvaToggleSwitchThumb = cssClassVarianceUtilities.
|
|
5274
|
+
const cvaToggleSwitchThumb = cssClassVarianceUtilities.cva({
|
|
5275
|
+
base: ["block", "rounded-full", "bg-white", "aspect-square", "translate-x-0", "transition-all"],
|
|
5291
5276
|
variants: {
|
|
5292
5277
|
toggled: {
|
|
5293
5278
|
true: "",
|
|
@@ -5485,16 +5470,9 @@ const ToggleSwitchOption = ({ label, className, description, suffix, id, "data-t
|
|
|
5485
5470
|
};
|
|
5486
5471
|
ToggleSwitchOption.displayName = "ToggleSwitchOption";
|
|
5487
5472
|
|
|
5488
|
-
const cvaUploadInputField = cssClassVarianceUtilities.
|
|
5489
|
-
"px-0",
|
|
5490
|
-
|
|
5491
|
-
"file:w-0",
|
|
5492
|
-
"file:h-0",
|
|
5493
|
-
"file:invisible",
|
|
5494
|
-
"file:px-0",
|
|
5495
|
-
"dark:text-neutral-400",
|
|
5496
|
-
"self-center",
|
|
5497
|
-
]);
|
|
5473
|
+
const cvaUploadInputField = cssClassVarianceUtilities.cva({
|
|
5474
|
+
base: ["px-0", "py-0", "file:w-0", "file:h-0", "file:invisible", "file:px-0", "dark:text-neutral-400", "self-center"],
|
|
5475
|
+
});
|
|
5498
5476
|
|
|
5499
5477
|
/**
|
|
5500
5478
|
* UploadInput renders a file upload input with a styled button label. It wraps `BaseInput` with `type="file"`
|