@proteos/ui 0.32.0 → 0.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -233,6 +233,12 @@ declare const fieldControlStyles: tailwind_variants.TVReturnType<{
233
233
  content: string;
234
234
  };
235
235
  };
236
+ hasFocusRing: {
237
+ true: {};
238
+ false: {
239
+ box: string;
240
+ };
241
+ };
236
242
  }, {
237
243
  box: string[];
238
244
  content: string;
@@ -260,6 +266,12 @@ declare const fieldControlStyles: tailwind_variants.TVReturnType<{
260
266
  content: string;
261
267
  };
262
268
  };
269
+ hasFocusRing: {
270
+ true: {};
271
+ false: {
272
+ box: string;
273
+ };
274
+ };
263
275
  }, {
264
276
  box: string[];
265
277
  content: string;
@@ -287,6 +299,12 @@ declare const fieldControlStyles: tailwind_variants.TVReturnType<{
287
299
  content: string;
288
300
  };
289
301
  };
302
+ hasFocusRing: {
303
+ true: {};
304
+ false: {
305
+ box: string;
306
+ };
307
+ };
290
308
  }, {
291
309
  box: string[];
292
310
  content: string;
@@ -1372,12 +1390,15 @@ type InputProps = TextFieldProps & {
1372
1390
  /** Chrome variant. Defaults to `field`. `cell` flattens the box for
1373
1391
  * spreadsheet-style inline editing (2px radius, no halo / resting shadow). */
1374
1392
  appearance?: FieldAppearance;
1393
+ /** Set false to drop the focus/invalid ring — for tight hosts whose
1394
+ * overflow clip would cut it off. Border states stay. Defaults to true. */
1395
+ hasFocusRing?: boolean;
1375
1396
  /** Extra props forwarded to the underlying <input>. */
1376
1397
  inputProps?: Omit<InputProps$1, 'className'>;
1377
1398
  /** Visual override for the input control only. */
1378
1399
  inputClassName?: string;
1379
1400
  };
1380
- declare function Input({ label, description, errorMessage, placeholder, size, appearance, inputProps, inputClassName, className, ...props }: InputProps): react_jsx_runtime.JSX.Element;
1401
+ declare function Input({ label, description, errorMessage, placeholder, size, appearance, hasFocusRing, inputProps, inputClassName, className, ...props }: InputProps): react_jsx_runtime.JSX.Element;
1381
1402
 
1382
1403
  type KbdProps = HTMLAttributes<HTMLElement>;
1383
1404
  declare function Kbd({ className, children, ...props }: KbdProps): react_jsx_runtime.JSX.Element;
package/dist/index.d.ts CHANGED
@@ -233,6 +233,12 @@ declare const fieldControlStyles: tailwind_variants.TVReturnType<{
233
233
  content: string;
234
234
  };
235
235
  };
236
+ hasFocusRing: {
237
+ true: {};
238
+ false: {
239
+ box: string;
240
+ };
241
+ };
236
242
  }, {
237
243
  box: string[];
238
244
  content: string;
@@ -260,6 +266,12 @@ declare const fieldControlStyles: tailwind_variants.TVReturnType<{
260
266
  content: string;
261
267
  };
262
268
  };
269
+ hasFocusRing: {
270
+ true: {};
271
+ false: {
272
+ box: string;
273
+ };
274
+ };
263
275
  }, {
264
276
  box: string[];
265
277
  content: string;
@@ -287,6 +299,12 @@ declare const fieldControlStyles: tailwind_variants.TVReturnType<{
287
299
  content: string;
288
300
  };
289
301
  };
302
+ hasFocusRing: {
303
+ true: {};
304
+ false: {
305
+ box: string;
306
+ };
307
+ };
290
308
  }, {
291
309
  box: string[];
292
310
  content: string;
@@ -1372,12 +1390,15 @@ type InputProps = TextFieldProps & {
1372
1390
  /** Chrome variant. Defaults to `field`. `cell` flattens the box for
1373
1391
  * spreadsheet-style inline editing (2px radius, no halo / resting shadow). */
1374
1392
  appearance?: FieldAppearance;
1393
+ /** Set false to drop the focus/invalid ring — for tight hosts whose
1394
+ * overflow clip would cut it off. Border states stay. Defaults to true. */
1395
+ hasFocusRing?: boolean;
1375
1396
  /** Extra props forwarded to the underlying <input>. */
1376
1397
  inputProps?: Omit<InputProps$1, 'className'>;
1377
1398
  /** Visual override for the input control only. */
1378
1399
  inputClassName?: string;
1379
1400
  };
1380
- declare function Input({ label, description, errorMessage, placeholder, size, appearance, inputProps, inputClassName, className, ...props }: InputProps): react_jsx_runtime.JSX.Element;
1401
+ declare function Input({ label, description, errorMessage, placeholder, size, appearance, hasFocusRing, inputProps, inputClassName, className, ...props }: InputProps): react_jsx_runtime.JSX.Element;
1381
1402
 
1382
1403
  type KbdProps = HTMLAttributes<HTMLElement>;
1383
1404
  declare function Kbd({ className, children, ...props }: KbdProps): react_jsx_runtime.JSX.Element;
package/dist/index.js CHANGED
@@ -523,12 +523,25 @@ var fieldControlStyles = tv({
523
523
  box: "h-[29px] rounded-[4px] shadow-none focus:shadow-none data-[focused]:shadow-none data-[invalid]:shadow-none",
524
524
  content: "py-1"
525
525
  }
526
+ },
527
+ /* `hasFocusRing: false` — keep the full field chrome but drop the
528
+ focus/invalid ring, for tight hosts whose overflow clip would cut it
529
+ off (e.g. the editor-header title). The border still turns accent on
530
+ focus / danger on invalid. Declared after `appearance` so its
531
+ shadow-none wins the tailwind-merge order. */
532
+ hasFocusRing: {
533
+ true: {},
534
+ false: {
535
+ box: "focus:shadow-none data-[focused]:shadow-none data-[invalid]:shadow-none"
536
+ }
526
537
  }
527
538
  },
528
539
  compoundVariants: [
529
- { appearance: "cell", invalid: true, class: { box: "shadow-none" } }
540
+ { appearance: "cell", invalid: true, class: { box: "shadow-none" } },
541
+ // invalid:true's RESTING danger ring — reduce back to the inset shadow.
542
+ { hasFocusRing: false, invalid: true, class: { box: "shadow-[var(--shadow-inset)]" } }
530
543
  ],
531
- defaultVariants: { size: "md", invalid: false, appearance: "field" }
544
+ defaultVariants: { size: "md", invalid: false, appearance: "field", hasFocusRing: true }
532
545
  });
533
546
  var fieldTextStyles = {
534
547
  sm: "text-[13px]",
@@ -4185,12 +4198,13 @@ function Input({
4185
4198
  placeholder,
4186
4199
  size,
4187
4200
  appearance,
4201
+ hasFocusRing,
4188
4202
  inputProps,
4189
4203
  inputClassName,
4190
4204
  className,
4191
4205
  ...props
4192
4206
  }) {
4193
- const styles2 = fieldControlStyles({ size, appearance });
4207
+ const styles2 = fieldControlStyles({ size, appearance, hasFocusRing });
4194
4208
  return /* @__PURE__ */ jsxs(
4195
4209
  TextField,
4196
4210
  {