@nurix/ui-component-library 1.1.4-stage.117 → 1.1.4-stage.118
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 +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +39 -16
- package/dist/index.mjs +39 -16
- package/dist/styles.css +16 -33
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1408,6 +1408,7 @@ declare const DEFAULT_THEME: {
|
|
|
1408
1408
|
readonly borderBrand: "#1d4885";
|
|
1409
1409
|
readonly borderDestructive: "#b91c1c";
|
|
1410
1410
|
readonly borderInput: "#e5e5e5";
|
|
1411
|
+
readonly borderInputHover: "#dadada";
|
|
1411
1412
|
readonly hovOpacityPrimary: "#0a0a0a0d";
|
|
1412
1413
|
readonly hovOpacitySecondary: "#0a0a0a0d";
|
|
1413
1414
|
readonly hovSolidPrimary: "#fafafa";
|
|
@@ -1494,6 +1495,7 @@ declare const DEFAULT_THEME: {
|
|
|
1494
1495
|
readonly borderBrand: "#bfdbfe";
|
|
1495
1496
|
readonly borderDestructive: "#f87171";
|
|
1496
1497
|
readonly borderInput: "#262626";
|
|
1498
|
+
readonly borderInputHover: "#404040";
|
|
1497
1499
|
readonly hovOpacityPrimary: "#ffffff0d";
|
|
1498
1500
|
readonly hovOpacitySecondary: "#ffffff1a";
|
|
1499
1501
|
readonly hovSolidPrimary: "#262626";
|
package/dist/index.d.ts
CHANGED
|
@@ -1408,6 +1408,7 @@ declare const DEFAULT_THEME: {
|
|
|
1408
1408
|
readonly borderBrand: "#1d4885";
|
|
1409
1409
|
readonly borderDestructive: "#b91c1c";
|
|
1410
1410
|
readonly borderInput: "#e5e5e5";
|
|
1411
|
+
readonly borderInputHover: "#dadada";
|
|
1411
1412
|
readonly hovOpacityPrimary: "#0a0a0a0d";
|
|
1412
1413
|
readonly hovOpacitySecondary: "#0a0a0a0d";
|
|
1413
1414
|
readonly hovSolidPrimary: "#fafafa";
|
|
@@ -1494,6 +1495,7 @@ declare const DEFAULT_THEME: {
|
|
|
1494
1495
|
readonly borderBrand: "#bfdbfe";
|
|
1495
1496
|
readonly borderDestructive: "#f87171";
|
|
1496
1497
|
readonly borderInput: "#262626";
|
|
1498
|
+
readonly borderInputHover: "#404040";
|
|
1497
1499
|
readonly hovOpacityPrimary: "#ffffff0d";
|
|
1498
1500
|
readonly hovOpacitySecondary: "#ffffff1a";
|
|
1499
1501
|
readonly hovSolidPrimary: "#262626";
|
package/dist/index.js
CHANGED
|
@@ -6974,6 +6974,7 @@ var DEFAULT_THEME = {
|
|
|
6974
6974
|
borderBrand: "#1d4885",
|
|
6975
6975
|
borderDestructive: "#b91c1c",
|
|
6976
6976
|
borderInput: "#e5e5e5",
|
|
6977
|
+
borderInputHover: "#dadada",
|
|
6977
6978
|
// Interaction tokens (Figma: color > interaction)
|
|
6978
6979
|
hovOpacityPrimary: "#0a0a0a0d",
|
|
6979
6980
|
hovOpacitySecondary: "#0a0a0a0d",
|
|
@@ -7065,6 +7066,7 @@ var DEFAULT_THEME = {
|
|
|
7065
7066
|
borderBrand: "#bfdbfe",
|
|
7066
7067
|
borderDestructive: "#f87171",
|
|
7067
7068
|
borderInput: "#262626",
|
|
7069
|
+
borderInputHover: "#404040",
|
|
7068
7070
|
// Interaction tokens (Figma: color > interaction)
|
|
7069
7071
|
hovOpacityPrimary: "#ffffff0d",
|
|
7070
7072
|
hovOpacitySecondary: "#ffffff1a",
|
|
@@ -7305,10 +7307,14 @@ var INPUT_TOKENS = {
|
|
|
7305
7307
|
// Borderless: used in table-like contexts (key-value editor). No visible
|
|
7306
7308
|
// border at rest. Focus reveals the brand border. No hover/pressed overlay.
|
|
7307
7309
|
fieldBgBorderless: "bg-transparent",
|
|
7308
|
-
// Base border + focus-within treatment.
|
|
7309
|
-
//
|
|
7310
|
-
//
|
|
7310
|
+
// Base border + focus-within treatment. Hover darkens the border (Figma
|
|
7311
|
+
// hover variant: #dadada). focus-within wins over hover via pseudo-class
|
|
7312
|
+
// ordering, so focus colour still applies when the field is hovered.
|
|
7311
7313
|
fieldBase: "border border-token-input focus-within:border-token-brand disabled:pointer-events-none transition-colors",
|
|
7314
|
+
// Hover-only border darkening for the active (non-invalid, non-disabled)
|
|
7315
|
+
// state. Applied conditionally by the component so it does not override
|
|
7316
|
+
// the destructive border on invalid fields.
|
|
7317
|
+
fieldHover: "hover:border-token-input-hover",
|
|
7312
7318
|
// Borderless base — transparent resting border, brand border only on focus.
|
|
7313
7319
|
// No hover/pressed overlay (these cells sit inside a larger interactive row).
|
|
7314
7320
|
// Layout-shift safe: border width stays 1px across states (color-only swap).
|
|
@@ -7359,6 +7365,7 @@ var Input = React2.forwardRef(
|
|
|
7359
7365
|
}, ref) => {
|
|
7360
7366
|
const isDisabled = forceState === "disabled" || disabled;
|
|
7361
7367
|
const isFocussed = forceState === "focussed";
|
|
7368
|
+
const isInvalid = invalid || supportingTextType === "error";
|
|
7362
7369
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
7363
7370
|
"div",
|
|
7364
7371
|
{
|
|
@@ -7377,9 +7384,10 @@ var Input = React2.forwardRef(
|
|
|
7377
7384
|
inputSize === "sm" ? INPUT_TOKENS.fieldSizeSm : INPUT_TOKENS.fieldSizeMd,
|
|
7378
7385
|
inputVariant === "borderless" ? INPUT_TOKENS.fieldBgBorderless : inputVariant === "white" ? INPUT_TOKENS.fieldBgWhite : INPUT_TOKENS.fieldBgGrey,
|
|
7379
7386
|
inputVariant === "borderless" ? INPUT_TOKENS.fieldBaseBorderless : INPUT_TOKENS.fieldBase,
|
|
7387
|
+
inputVariant !== "borderless" && !isDisabled && !isInvalid && INPUT_TOKENS.fieldHover,
|
|
7380
7388
|
isDisabled && INPUT_TOKENS.fieldDisabled,
|
|
7381
7389
|
isFocussed && "border-token-brand",
|
|
7382
|
-
|
|
7390
|
+
isInvalid && INPUT_TOKENS.fieldInvalid
|
|
7383
7391
|
),
|
|
7384
7392
|
style: {
|
|
7385
7393
|
borderRadius: INPUT_TOKENS.radius[input_border_radius],
|
|
@@ -7523,7 +7531,10 @@ var INPUT_GROUP_TOKENS = {
|
|
|
7523
7531
|
field: "flex h-[var(--input-height,40px)] w-full items-center gap-2 overflow-hidden px-[var(--input-padding-horizontal,12px)] py-[10px] text-sm shadow-none",
|
|
7524
7532
|
fieldBgGrey: "bg-token-white",
|
|
7525
7533
|
fieldBgWhite: "bg-token-white",
|
|
7526
|
-
fieldBase: "border border-token-light focus-within:border-token-brand disabled:pointer-events-none",
|
|
7534
|
+
fieldBase: "border border-token-light focus-within:border-token-brand disabled:pointer-events-none transition-colors",
|
|
7535
|
+
// Hover-only border darkening (Figma hover variant: #dadada). Applied
|
|
7536
|
+
// conditionally by the component so it does not override invalid/disabled.
|
|
7537
|
+
fieldHover: "hover:border-token-input-hover",
|
|
7527
7538
|
fieldInvalid: "border-token-destructive focus-within:border-token-destructive",
|
|
7528
7539
|
fieldDisabled: "border-token-xlight",
|
|
7529
7540
|
// Inner input area
|
|
@@ -7532,7 +7543,8 @@ var INPUT_GROUP_TOKENS = {
|
|
|
7532
7543
|
segment: "shrink-0 flex items-center text-xs font-normal text-fg-placeholder px-3",
|
|
7533
7544
|
segmentDivider: "border-token-light",
|
|
7534
7545
|
// Textarea
|
|
7535
|
-
textareaField: "w-full bg-token-white py-[10px] px-[var(--input-padding-horizontal,12px)] text-sm border border-token-light focus-visible:outline-none focus-visible:border-token-brand disabled:pointer-events-none shadow-none",
|
|
7546
|
+
textareaField: "w-full bg-token-white py-[10px] px-[var(--input-padding-horizontal,12px)] text-sm border border-token-light focus-visible:outline-none focus-visible:border-token-brand disabled:pointer-events-none shadow-none transition-colors",
|
|
7547
|
+
textareaHover: "hover:border-token-input-hover",
|
|
7536
7548
|
textareaInvalid: "border-token-destructive focus-visible:border-token-destructive",
|
|
7537
7549
|
textareaDisabled: "border-token-xlight",
|
|
7538
7550
|
radius: {
|
|
@@ -7582,6 +7594,7 @@ var InputGroup = React4.forwardRef(
|
|
|
7582
7594
|
const isDisabled = forceState === "disabled" || disabled;
|
|
7583
7595
|
const isFocussed = forceState === "focussed";
|
|
7584
7596
|
const isActive = forceState === "active";
|
|
7597
|
+
const isInvalid = !!invalid;
|
|
7585
7598
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
7586
7599
|
"div",
|
|
7587
7600
|
{
|
|
@@ -7596,9 +7609,10 @@ var InputGroup = React4.forwardRef(
|
|
|
7596
7609
|
INPUT_GROUP_TOKENS.field,
|
|
7597
7610
|
inputVariant === "white" ? INPUT_GROUP_TOKENS.fieldBgWhite : INPUT_GROUP_TOKENS.fieldBgGrey,
|
|
7598
7611
|
INPUT_GROUP_TOKENS.fieldBase,
|
|
7612
|
+
!isDisabled && !isInvalid && INPUT_GROUP_TOKENS.fieldHover,
|
|
7599
7613
|
isDisabled && INPUT_GROUP_TOKENS.fieldDisabled,
|
|
7600
7614
|
isFocussed && "border-token-brand",
|
|
7601
|
-
|
|
7615
|
+
isInvalid && INPUT_GROUP_TOKENS.fieldInvalid
|
|
7602
7616
|
),
|
|
7603
7617
|
style: {
|
|
7604
7618
|
borderRadius: INPUT_GROUP_TOKENS.radius[input_border_radius],
|
|
@@ -7691,16 +7705,18 @@ var TEXTAREA_TOKENS = {
|
|
|
7691
7705
|
labelRow: "flex items-center gap-[2px] text-xs font-medium leading-4 tracking-normal text-fg-black",
|
|
7692
7706
|
mandatory: "text-fg-destructive",
|
|
7693
7707
|
// Base shared field layout/typography.
|
|
7694
|
-
// `relative` + `overflow-hidden` so the `before:` overlay respects the
|
|
7695
|
-
// field's rounded corners via [border-radius:inherit].
|
|
7696
7708
|
field: "relative flex min-h-[80px] w-full flex-col overflow-hidden px-[var(--input-padding-horizontal,12px)] py-[10px] text-sm shadow-none",
|
|
7697
7709
|
fieldBgGrey: "bg-token-white",
|
|
7698
7710
|
fieldBgWhite: "bg-token-white",
|
|
7699
|
-
// Base border + focus treatment.
|
|
7700
|
-
//
|
|
7711
|
+
// Base border + focus treatment. Hover darkens the border (Figma hover
|
|
7712
|
+
// variant: #dadada). focus-within wins over hover via pseudo-class
|
|
7713
|
+
// ordering, so focus colour still applies when the field is hovered.
|
|
7701
7714
|
// Focus ring uses outline (not ring) so it doesn't contribute to box size.
|
|
7702
|
-
fieldBase: "border border-token-input focus-within:border-token-brand disabled:pointer-events-none
|
|
7703
|
-
|
|
7715
|
+
fieldBase: "border border-token-input focus-within:border-token-brand disabled:pointer-events-none transition-colors",
|
|
7716
|
+
// Hover-only border darkening. Applied conditionally by the component so
|
|
7717
|
+
// it does not override invalid/disabled borders.
|
|
7718
|
+
fieldHover: "hover:border-token-input-hover",
|
|
7719
|
+
fieldDisabled: "border-token-xlight",
|
|
7704
7720
|
fieldInvalid: "border-token-destructive focus-within:border-token-destructive",
|
|
7705
7721
|
// Textarea itself.
|
|
7706
7722
|
// `selection:` applies styles to the user's text selection (::selection):
|
|
@@ -7745,6 +7761,7 @@ var Textarea = React5.forwardRef(
|
|
|
7745
7761
|
}, ref) => {
|
|
7746
7762
|
const isDisabled = forceState === "disabled" || disabled;
|
|
7747
7763
|
const isFocussed = forceState === "focussed";
|
|
7764
|
+
const isInvalid = invalid || supportingTextType === "error";
|
|
7748
7765
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
7749
7766
|
"div",
|
|
7750
7767
|
{
|
|
@@ -7762,9 +7779,10 @@ var Textarea = React5.forwardRef(
|
|
|
7762
7779
|
TEXTAREA_TOKENS.field,
|
|
7763
7780
|
inputVariant === "white" ? TEXTAREA_TOKENS.fieldBgWhite : TEXTAREA_TOKENS.fieldBgGrey,
|
|
7764
7781
|
TEXTAREA_TOKENS.fieldBase,
|
|
7782
|
+
!isDisabled && !isInvalid && TEXTAREA_TOKENS.fieldHover,
|
|
7765
7783
|
isDisabled && TEXTAREA_TOKENS.fieldDisabled,
|
|
7766
7784
|
isFocussed && "border-token-brand outline outline-2 outline-token-brand outline-offset-2",
|
|
7767
|
-
|
|
7785
|
+
isInvalid && TEXTAREA_TOKENS.fieldInvalid
|
|
7768
7786
|
),
|
|
7769
7787
|
style: {
|
|
7770
7788
|
borderRadius: TEXTAREA_TOKENS.radius[input_border_radius],
|
|
@@ -8879,6 +8897,7 @@ var UI_COLOR_KEY_TO_CSS_VAR = {
|
|
|
8879
8897
|
borderBrand: "--border-brand",
|
|
8880
8898
|
borderDestructive: "--border-destructive",
|
|
8881
8899
|
borderInput: "--border-input",
|
|
8900
|
+
borderInputHover: "--border-input-hover",
|
|
8882
8901
|
// Interaction tokens (Figma: color > interaction)
|
|
8883
8902
|
hovOpacityPrimary: "--hov-opacity-primary",
|
|
8884
8903
|
hovOpacitySecondary: "--hov-opacity-secondary",
|
|
@@ -9249,8 +9268,12 @@ var import_lucide_react6 = require("lucide-react");
|
|
|
9249
9268
|
var SELECT_TOKENS = {
|
|
9250
9269
|
// Main select container
|
|
9251
9270
|
container: {
|
|
9252
|
-
// Figma: trigger uses rounded-xl (12px), border visible, padding px-12 py-10
|
|
9253
|
-
|
|
9271
|
+
// Figma: trigger uses rounded-xl (12px), border visible, padding px-12 py-10.
|
|
9272
|
+
// Hover darkens the border to match Figma (#dadada) — `data-[state=open]`
|
|
9273
|
+
// and `disabled:` use higher specificity (attribute / pseudo-class) so they
|
|
9274
|
+
// override the hover border when the dropdown is open or the trigger is
|
|
9275
|
+
// disabled.
|
|
9276
|
+
default: "rounded-[var(--rounded-xl,12px)] border border-token-input flex items-center justify-between gap-2 transition-colors hover:border-token-input-hover disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:border-token-input focus-visible:outline-none data-[state=open]:border-token-brand",
|
|
9254
9277
|
// bg variants: default = input (grey), white = card
|
|
9255
9278
|
bgDefault: "bg-token-white",
|
|
9256
9279
|
bgWhite: "bg-token-white",
|
package/dist/index.mjs
CHANGED
|
@@ -6870,6 +6870,7 @@ var DEFAULT_THEME = {
|
|
|
6870
6870
|
borderBrand: "#1d4885",
|
|
6871
6871
|
borderDestructive: "#b91c1c",
|
|
6872
6872
|
borderInput: "#e5e5e5",
|
|
6873
|
+
borderInputHover: "#dadada",
|
|
6873
6874
|
// Interaction tokens (Figma: color > interaction)
|
|
6874
6875
|
hovOpacityPrimary: "#0a0a0a0d",
|
|
6875
6876
|
hovOpacitySecondary: "#0a0a0a0d",
|
|
@@ -6961,6 +6962,7 @@ var DEFAULT_THEME = {
|
|
|
6961
6962
|
borderBrand: "#bfdbfe",
|
|
6962
6963
|
borderDestructive: "#f87171",
|
|
6963
6964
|
borderInput: "#262626",
|
|
6965
|
+
borderInputHover: "#404040",
|
|
6964
6966
|
// Interaction tokens (Figma: color > interaction)
|
|
6965
6967
|
hovOpacityPrimary: "#ffffff0d",
|
|
6966
6968
|
hovOpacitySecondary: "#ffffff1a",
|
|
@@ -7201,10 +7203,14 @@ var INPUT_TOKENS = {
|
|
|
7201
7203
|
// Borderless: used in table-like contexts (key-value editor). No visible
|
|
7202
7204
|
// border at rest. Focus reveals the brand border. No hover/pressed overlay.
|
|
7203
7205
|
fieldBgBorderless: "bg-transparent",
|
|
7204
|
-
// Base border + focus-within treatment.
|
|
7205
|
-
//
|
|
7206
|
-
//
|
|
7206
|
+
// Base border + focus-within treatment. Hover darkens the border (Figma
|
|
7207
|
+
// hover variant: #dadada). focus-within wins over hover via pseudo-class
|
|
7208
|
+
// ordering, so focus colour still applies when the field is hovered.
|
|
7207
7209
|
fieldBase: "border border-token-input focus-within:border-token-brand disabled:pointer-events-none transition-colors",
|
|
7210
|
+
// Hover-only border darkening for the active (non-invalid, non-disabled)
|
|
7211
|
+
// state. Applied conditionally by the component so it does not override
|
|
7212
|
+
// the destructive border on invalid fields.
|
|
7213
|
+
fieldHover: "hover:border-token-input-hover",
|
|
7208
7214
|
// Borderless base — transparent resting border, brand border only on focus.
|
|
7209
7215
|
// No hover/pressed overlay (these cells sit inside a larger interactive row).
|
|
7210
7216
|
// Layout-shift safe: border width stays 1px across states (color-only swap).
|
|
@@ -7255,6 +7261,7 @@ var Input = React2.forwardRef(
|
|
|
7255
7261
|
}, ref) => {
|
|
7256
7262
|
const isDisabled = forceState === "disabled" || disabled;
|
|
7257
7263
|
const isFocussed = forceState === "focussed";
|
|
7264
|
+
const isInvalid = invalid || supportingTextType === "error";
|
|
7258
7265
|
return /* @__PURE__ */ jsxs2(
|
|
7259
7266
|
"div",
|
|
7260
7267
|
{
|
|
@@ -7273,9 +7280,10 @@ var Input = React2.forwardRef(
|
|
|
7273
7280
|
inputSize === "sm" ? INPUT_TOKENS.fieldSizeSm : INPUT_TOKENS.fieldSizeMd,
|
|
7274
7281
|
inputVariant === "borderless" ? INPUT_TOKENS.fieldBgBorderless : inputVariant === "white" ? INPUT_TOKENS.fieldBgWhite : INPUT_TOKENS.fieldBgGrey,
|
|
7275
7282
|
inputVariant === "borderless" ? INPUT_TOKENS.fieldBaseBorderless : INPUT_TOKENS.fieldBase,
|
|
7283
|
+
inputVariant !== "borderless" && !isDisabled && !isInvalid && INPUT_TOKENS.fieldHover,
|
|
7276
7284
|
isDisabled && INPUT_TOKENS.fieldDisabled,
|
|
7277
7285
|
isFocussed && "border-token-brand",
|
|
7278
|
-
|
|
7286
|
+
isInvalid && INPUT_TOKENS.fieldInvalid
|
|
7279
7287
|
),
|
|
7280
7288
|
style: {
|
|
7281
7289
|
borderRadius: INPUT_TOKENS.radius[input_border_radius],
|
|
@@ -7419,7 +7427,10 @@ var INPUT_GROUP_TOKENS = {
|
|
|
7419
7427
|
field: "flex h-[var(--input-height,40px)] w-full items-center gap-2 overflow-hidden px-[var(--input-padding-horizontal,12px)] py-[10px] text-sm shadow-none",
|
|
7420
7428
|
fieldBgGrey: "bg-token-white",
|
|
7421
7429
|
fieldBgWhite: "bg-token-white",
|
|
7422
|
-
fieldBase: "border border-token-light focus-within:border-token-brand disabled:pointer-events-none",
|
|
7430
|
+
fieldBase: "border border-token-light focus-within:border-token-brand disabled:pointer-events-none transition-colors",
|
|
7431
|
+
// Hover-only border darkening (Figma hover variant: #dadada). Applied
|
|
7432
|
+
// conditionally by the component so it does not override invalid/disabled.
|
|
7433
|
+
fieldHover: "hover:border-token-input-hover",
|
|
7423
7434
|
fieldInvalid: "border-token-destructive focus-within:border-token-destructive",
|
|
7424
7435
|
fieldDisabled: "border-token-xlight",
|
|
7425
7436
|
// Inner input area
|
|
@@ -7428,7 +7439,8 @@ var INPUT_GROUP_TOKENS = {
|
|
|
7428
7439
|
segment: "shrink-0 flex items-center text-xs font-normal text-fg-placeholder px-3",
|
|
7429
7440
|
segmentDivider: "border-token-light",
|
|
7430
7441
|
// Textarea
|
|
7431
|
-
textareaField: "w-full bg-token-white py-[10px] px-[var(--input-padding-horizontal,12px)] text-sm border border-token-light focus-visible:outline-none focus-visible:border-token-brand disabled:pointer-events-none shadow-none",
|
|
7442
|
+
textareaField: "w-full bg-token-white py-[10px] px-[var(--input-padding-horizontal,12px)] text-sm border border-token-light focus-visible:outline-none focus-visible:border-token-brand disabled:pointer-events-none shadow-none transition-colors",
|
|
7443
|
+
textareaHover: "hover:border-token-input-hover",
|
|
7432
7444
|
textareaInvalid: "border-token-destructive focus-visible:border-token-destructive",
|
|
7433
7445
|
textareaDisabled: "border-token-xlight",
|
|
7434
7446
|
radius: {
|
|
@@ -7478,6 +7490,7 @@ var InputGroup = React4.forwardRef(
|
|
|
7478
7490
|
const isDisabled = forceState === "disabled" || disabled;
|
|
7479
7491
|
const isFocussed = forceState === "focussed";
|
|
7480
7492
|
const isActive = forceState === "active";
|
|
7493
|
+
const isInvalid = !!invalid;
|
|
7481
7494
|
return /* @__PURE__ */ jsxs4(
|
|
7482
7495
|
"div",
|
|
7483
7496
|
{
|
|
@@ -7492,9 +7505,10 @@ var InputGroup = React4.forwardRef(
|
|
|
7492
7505
|
INPUT_GROUP_TOKENS.field,
|
|
7493
7506
|
inputVariant === "white" ? INPUT_GROUP_TOKENS.fieldBgWhite : INPUT_GROUP_TOKENS.fieldBgGrey,
|
|
7494
7507
|
INPUT_GROUP_TOKENS.fieldBase,
|
|
7508
|
+
!isDisabled && !isInvalid && INPUT_GROUP_TOKENS.fieldHover,
|
|
7495
7509
|
isDisabled && INPUT_GROUP_TOKENS.fieldDisabled,
|
|
7496
7510
|
isFocussed && "border-token-brand",
|
|
7497
|
-
|
|
7511
|
+
isInvalid && INPUT_GROUP_TOKENS.fieldInvalid
|
|
7498
7512
|
),
|
|
7499
7513
|
style: {
|
|
7500
7514
|
borderRadius: INPUT_GROUP_TOKENS.radius[input_border_radius],
|
|
@@ -7587,16 +7601,18 @@ var TEXTAREA_TOKENS = {
|
|
|
7587
7601
|
labelRow: "flex items-center gap-[2px] text-xs font-medium leading-4 tracking-normal text-fg-black",
|
|
7588
7602
|
mandatory: "text-fg-destructive",
|
|
7589
7603
|
// Base shared field layout/typography.
|
|
7590
|
-
// `relative` + `overflow-hidden` so the `before:` overlay respects the
|
|
7591
|
-
// field's rounded corners via [border-radius:inherit].
|
|
7592
7604
|
field: "relative flex min-h-[80px] w-full flex-col overflow-hidden px-[var(--input-padding-horizontal,12px)] py-[10px] text-sm shadow-none",
|
|
7593
7605
|
fieldBgGrey: "bg-token-white",
|
|
7594
7606
|
fieldBgWhite: "bg-token-white",
|
|
7595
|
-
// Base border + focus treatment.
|
|
7596
|
-
//
|
|
7607
|
+
// Base border + focus treatment. Hover darkens the border (Figma hover
|
|
7608
|
+
// variant: #dadada). focus-within wins over hover via pseudo-class
|
|
7609
|
+
// ordering, so focus colour still applies when the field is hovered.
|
|
7597
7610
|
// Focus ring uses outline (not ring) so it doesn't contribute to box size.
|
|
7598
|
-
fieldBase: "border border-token-input focus-within:border-token-brand disabled:pointer-events-none
|
|
7599
|
-
|
|
7611
|
+
fieldBase: "border border-token-input focus-within:border-token-brand disabled:pointer-events-none transition-colors",
|
|
7612
|
+
// Hover-only border darkening. Applied conditionally by the component so
|
|
7613
|
+
// it does not override invalid/disabled borders.
|
|
7614
|
+
fieldHover: "hover:border-token-input-hover",
|
|
7615
|
+
fieldDisabled: "border-token-xlight",
|
|
7600
7616
|
fieldInvalid: "border-token-destructive focus-within:border-token-destructive",
|
|
7601
7617
|
// Textarea itself.
|
|
7602
7618
|
// `selection:` applies styles to the user's text selection (::selection):
|
|
@@ -7641,6 +7657,7 @@ var Textarea = React5.forwardRef(
|
|
|
7641
7657
|
}, ref) => {
|
|
7642
7658
|
const isDisabled = forceState === "disabled" || disabled;
|
|
7643
7659
|
const isFocussed = forceState === "focussed";
|
|
7660
|
+
const isInvalid = invalid || supportingTextType === "error";
|
|
7644
7661
|
return /* @__PURE__ */ jsxs5(
|
|
7645
7662
|
"div",
|
|
7646
7663
|
{
|
|
@@ -7658,9 +7675,10 @@ var Textarea = React5.forwardRef(
|
|
|
7658
7675
|
TEXTAREA_TOKENS.field,
|
|
7659
7676
|
inputVariant === "white" ? TEXTAREA_TOKENS.fieldBgWhite : TEXTAREA_TOKENS.fieldBgGrey,
|
|
7660
7677
|
TEXTAREA_TOKENS.fieldBase,
|
|
7678
|
+
!isDisabled && !isInvalid && TEXTAREA_TOKENS.fieldHover,
|
|
7661
7679
|
isDisabled && TEXTAREA_TOKENS.fieldDisabled,
|
|
7662
7680
|
isFocussed && "border-token-brand outline outline-2 outline-token-brand outline-offset-2",
|
|
7663
|
-
|
|
7681
|
+
isInvalid && TEXTAREA_TOKENS.fieldInvalid
|
|
7664
7682
|
),
|
|
7665
7683
|
style: {
|
|
7666
7684
|
borderRadius: TEXTAREA_TOKENS.radius[input_border_radius],
|
|
@@ -8775,6 +8793,7 @@ var UI_COLOR_KEY_TO_CSS_VAR = {
|
|
|
8775
8793
|
borderBrand: "--border-brand",
|
|
8776
8794
|
borderDestructive: "--border-destructive",
|
|
8777
8795
|
borderInput: "--border-input",
|
|
8796
|
+
borderInputHover: "--border-input-hover",
|
|
8778
8797
|
// Interaction tokens (Figma: color > interaction)
|
|
8779
8798
|
hovOpacityPrimary: "--hov-opacity-primary",
|
|
8780
8799
|
hovOpacitySecondary: "--hov-opacity-secondary",
|
|
@@ -9145,8 +9164,12 @@ import { Check as Check3, ChevronDown as ChevronDown3, Search } from "lucide-rea
|
|
|
9145
9164
|
var SELECT_TOKENS = {
|
|
9146
9165
|
// Main select container
|
|
9147
9166
|
container: {
|
|
9148
|
-
// Figma: trigger uses rounded-xl (12px), border visible, padding px-12 py-10
|
|
9149
|
-
|
|
9167
|
+
// Figma: trigger uses rounded-xl (12px), border visible, padding px-12 py-10.
|
|
9168
|
+
// Hover darkens the border to match Figma (#dadada) — `data-[state=open]`
|
|
9169
|
+
// and `disabled:` use higher specificity (attribute / pseudo-class) so they
|
|
9170
|
+
// override the hover border when the dropdown is open or the trigger is
|
|
9171
|
+
// disabled.
|
|
9172
|
+
default: "rounded-[var(--rounded-xl,12px)] border border-token-input flex items-center justify-between gap-2 transition-colors hover:border-token-input-hover disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:border-token-input focus-visible:outline-none data-[state=open]:border-token-brand",
|
|
9150
9173
|
// bg variants: default = input (grey), white = card
|
|
9151
9174
|
bgDefault: "bg-token-white",
|
|
9152
9175
|
bgWhite: "bg-token-white",
|
package/dist/styles.css
CHANGED
|
@@ -1517,9 +1517,6 @@
|
|
|
1517
1517
|
.lego-land .py-8 {
|
|
1518
1518
|
padding-block: calc(var(--spacing) * 8);
|
|
1519
1519
|
}
|
|
1520
|
-
.lego-land .py-10 {
|
|
1521
|
-
padding-block: calc(var(--spacing) * 10);
|
|
1522
|
-
}
|
|
1523
1520
|
.lego-land .py-\[3px\] {
|
|
1524
1521
|
padding-block: 3px;
|
|
1525
1522
|
}
|
|
@@ -2160,24 +2157,12 @@
|
|
|
2160
2157
|
inset: calc(var(--spacing) * 0);
|
|
2161
2158
|
}
|
|
2162
2159
|
}
|
|
2163
|
-
.lego-land .before\:\[border-radius\:inherit\] {
|
|
2164
|
-
.lego-land &::before {
|
|
2165
|
-
content: var(--tw-content);
|
|
2166
|
-
border-radius: inherit;
|
|
2167
|
-
}
|
|
2168
|
-
}
|
|
2169
2160
|
.lego-land .before\:rounded-full {
|
|
2170
2161
|
.lego-land &::before {
|
|
2171
2162
|
content: var(--tw-content);
|
|
2172
2163
|
border-radius: calc(infinity * 1px);
|
|
2173
2164
|
}
|
|
2174
2165
|
}
|
|
2175
|
-
.lego-land .before\:bg-transparent {
|
|
2176
|
-
.lego-land &::before {
|
|
2177
|
-
content: var(--tw-content);
|
|
2178
|
-
background-color: transparent;
|
|
2179
|
-
}
|
|
2180
|
-
}
|
|
2181
2166
|
.lego-land .before\:transition-colors {
|
|
2182
2167
|
.lego-land &::before {
|
|
2183
2168
|
content: var(--tw-content);
|
|
@@ -2311,6 +2296,13 @@
|
|
|
2311
2296
|
}
|
|
2312
2297
|
}
|
|
2313
2298
|
}
|
|
2299
|
+
.lego-land .hover\:border-token-input-hover {
|
|
2300
|
+
.lego-land &:hover {
|
|
2301
|
+
@media (hover: hover) {
|
|
2302
|
+
border-color: hsl(var(--border-input-hover));
|
|
2303
|
+
}
|
|
2304
|
+
}
|
|
2305
|
+
}
|
|
2314
2306
|
.lego-land .hover\:border-token-light {
|
|
2315
2307
|
.lego-land &:hover {
|
|
2316
2308
|
@media (hover: hover) {
|
|
@@ -2388,16 +2380,6 @@
|
|
|
2388
2380
|
}
|
|
2389
2381
|
}
|
|
2390
2382
|
}
|
|
2391
|
-
.lego-land .hover\:before\:bg-transparent {
|
|
2392
|
-
.lego-land &:hover {
|
|
2393
|
-
@media (hover: hover) {
|
|
2394
|
-
&::before {
|
|
2395
|
-
content: var(--tw-content);
|
|
2396
|
-
background-color: transparent;
|
|
2397
|
-
}
|
|
2398
|
-
}
|
|
2399
|
-
}
|
|
2400
|
-
}
|
|
2401
2383
|
.lego-land .hover\:after\:opacity-100 {
|
|
2402
2384
|
.lego-land &:hover {
|
|
2403
2385
|
@media (hover: hover) {
|
|
@@ -2531,14 +2513,6 @@
|
|
|
2531
2513
|
}
|
|
2532
2514
|
}
|
|
2533
2515
|
}
|
|
2534
|
-
.lego-land .active\:before\:bg-transparent {
|
|
2535
|
-
.lego-land &:active {
|
|
2536
|
-
.lego-land &::before {
|
|
2537
|
-
content: var(--tw-content);
|
|
2538
|
-
background-color: transparent;
|
|
2539
|
-
}
|
|
2540
|
-
}
|
|
2541
|
-
}
|
|
2542
2516
|
.lego-land .active\:after\:bg-black\/25 {
|
|
2543
2517
|
.lego-land &:active {
|
|
2544
2518
|
.lego-land &::after {
|
|
@@ -2608,6 +2582,15 @@
|
|
|
2608
2582
|
opacity: 100%;
|
|
2609
2583
|
}
|
|
2610
2584
|
}
|
|
2585
|
+
.lego-land .disabled\:hover\:border-token-input {
|
|
2586
|
+
.lego-land &:disabled {
|
|
2587
|
+
.lego-land &:hover {
|
|
2588
|
+
@media (hover: hover) {
|
|
2589
|
+
border-color: hsl(var(--border-input));
|
|
2590
|
+
}
|
|
2591
|
+
}
|
|
2592
|
+
}
|
|
2593
|
+
}
|
|
2611
2594
|
.lego-land .disabled\:hover\:before\:bg-transparent {
|
|
2612
2595
|
.lego-land &:disabled {
|
|
2613
2596
|
.lego-land &:hover {
|