@umami/react-zen 0.213.0 → 0.214.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.css CHANGED
@@ -3848,7 +3848,7 @@ body a.Button_button__NGQyO {
3848
3848
  }
3849
3849
 
3850
3850
  /* virtual-css:css:f85c857d13f820fa4badfb09996080b9 */
3851
- .TextField_field__YzU1O {
3851
+ .TextField_field__Y2NlN {
3852
3852
  display: flex;
3853
3853
  align-items: center;
3854
3854
  padding: 0 var(--padding-x);
@@ -3879,8 +3879,8 @@ body a.Button_button__NGQyO {
3879
3879
  }
3880
3880
  }
3881
3881
  }
3882
- .TextField_field__YzU1O input,
3883
- .TextField_field__YzU1O textarea {
3882
+ .TextField_field__Y2NlN input,
3883
+ .TextField_field__Y2NlN textarea {
3884
3884
  border: none;
3885
3885
  outline: none;
3886
3886
  padding: var(--padding-y) 0;
@@ -3895,37 +3895,46 @@ body a.Button_button__NGQyO {
3895
3895
  -webkit-appearance: none;
3896
3896
  }
3897
3897
  }
3898
- .TextField_icon__MDJlY {
3898
+ .TextField_icon__N2IyN {
3899
3899
  color: var(--font-color-muted);
3900
3900
  cursor: pointer;
3901
3901
  &:hover {
3902
3902
  color: var(--font-color);
3903
3903
  }
3904
3904
  }
3905
- .TextField_novalue__NDg4Y .TextField_icon__MDJlY {
3905
+ .TextField_novalue__MzMzN .TextField_icon__N2IyN {
3906
3906
  color: var(--font-color-disabled);
3907
3907
  }
3908
- .TextField_textarea__NTQ3M {
3908
+ .TextField_textarea__MWJjN {
3909
3909
  padding: 0;
3910
3910
  & textarea {
3911
3911
  padding: var(--padding);
3912
3912
  }
3913
- & .TextField_icon__MDJlY {
3913
+ & .TextField_icon__N2IyN {
3914
3914
  position: absolute;
3915
3915
  top: var(--padding-x);
3916
3916
  right: var(--padding-x);
3917
3917
  z-index: 1;
3918
3918
  }
3919
3919
  }
3920
- .TextField_resize-vertical__ZDc3N textarea {
3920
+ .TextField_resize-vertical__OWYwN textarea {
3921
3921
  resize: vertical;
3922
3922
  }
3923
- .TextField_resize-horizontal__MzJjY textarea {
3923
+ .TextField_resize-horizontal__NDIyN textarea {
3924
3924
  resize: horizontal;
3925
3925
  }
3926
- .TextField_resize-none__ZmUxZ textarea {
3926
+ .TextField_resize-none__N2Q4Y textarea {
3927
3927
  resize: none;
3928
3928
  }
3929
+ .TextField_field__Y2NlN.TextField_variant-quiet__ZTExY {
3930
+ padding: 0;
3931
+ border: 0;
3932
+ outline: none;
3933
+ box-shadow: none;
3934
+ & input:focus {
3935
+ border-bottom: var(--border);
3936
+ }
3937
+ }
3929
3938
 
3930
3939
  /* virtual-css:css:603e8ab63f869366a7b9c81da6a1d757 */
3931
3940
  .ConfirmationDialog_dialog__YjQzN {
package/dist/index.d.mts CHANGED
@@ -521,9 +521,10 @@ interface TextFieldProps extends TextFieldProps$1 {
521
521
  allowCopy?: boolean;
522
522
  asTextArea?: boolean;
523
523
  resize?: 'vertical' | 'horizontal' | 'both' | 'none';
524
+ variant?: 'quiet' | 'none';
524
525
  onChange?: (e: any) => void;
525
526
  }
526
- declare function TextField({ value, defaultValue, label, placeholder, allowCopy, asTextArea, resize, onChange, isReadOnly, isDisabled, className, children, ...props }: TextFieldProps): react_jsx_runtime.JSX.Element;
527
+ declare function TextField({ value, defaultValue, label, placeholder, allowCopy, asTextArea, resize, variant, onChange, isReadOnly, isDisabled, className, children, ...props }: TextFieldProps): react_jsx_runtime.JSX.Element;
527
528
 
528
529
  interface InlineEditFieldProps extends TextFieldProps {
529
530
  name?: string;
package/dist/index.d.ts CHANGED
@@ -521,9 +521,10 @@ interface TextFieldProps extends TextFieldProps$1 {
521
521
  allowCopy?: boolean;
522
522
  asTextArea?: boolean;
523
523
  resize?: 'vertical' | 'horizontal' | 'both' | 'none';
524
+ variant?: 'quiet' | 'none';
524
525
  onChange?: (e: any) => void;
525
526
  }
526
- declare function TextField({ value, defaultValue, label, placeholder, allowCopy, asTextArea, resize, onChange, isReadOnly, isDisabled, className, children, ...props }: TextFieldProps): react_jsx_runtime.JSX.Element;
527
+ declare function TextField({ value, defaultValue, label, placeholder, allowCopy, asTextArea, resize, variant, onChange, isReadOnly, isDisabled, className, children, ...props }: TextFieldProps): react_jsx_runtime.JSX.Element;
527
528
 
528
529
  interface InlineEditFieldProps extends TextFieldProps {
529
530
  name?: string;
package/dist/index.js CHANGED
@@ -33501,8 +33501,8 @@ var import_react190 = require("react");
33501
33501
  var import_classnames26 = __toESM(require_classnames());
33502
33502
 
33503
33503
  // src/components/TextField.tsx
33504
- var import_react189 = require("react");
33505
33504
  var import_classnames25 = __toESM(require_classnames());
33505
+ var import_react189 = require("react");
33506
33506
 
33507
33507
  // src/components/CopyButton.tsx
33508
33508
  var import_react188 = require("react");
@@ -33529,7 +33529,7 @@ function CopyButton({ value, timeout = TIMEOUT, className, children, ...props })
33529
33529
  }
33530
33530
 
33531
33531
  // css-modules:E:\dev\umami-react-zen\src\components\TextField.module.css
33532
- var TextField_default = { "field": "TextField_field__YzU1O", "icon": "TextField_icon__MDJlY", "novalue": "TextField_novalue__NDg4Y", "textarea": "TextField_textarea__NTQ3M", "resize-vertical": "TextField_resize-vertical__ZDc3N", "resize-horizontal": "TextField_resize-horizontal__MzJjY", "resize-none": "TextField_resize-none__ZmUxZ" };
33532
+ var TextField_default = { "field": "TextField_field__Y2NlN", "icon": "TextField_icon__N2IyN", "novalue": "TextField_novalue__MzMzN", "textarea": "TextField_textarea__MWJjN", "resize-vertical": "TextField_resize-vertical__OWYwN", "resize-horizontal": "TextField_resize-horizontal__NDIyN", "resize-none": "TextField_resize-none__N2Q4Y", "variant-quiet": "TextField_variant-quiet__ZTExY" };
33533
33533
 
33534
33534
  // src/components/TextField.tsx
33535
33535
  var import_jsx_runtime35 = require("react/jsx-runtime");
@@ -33541,6 +33541,7 @@ function TextField2({
33541
33541
  allowCopy,
33542
33542
  asTextArea,
33543
33543
  resize,
33544
+ variant,
33544
33545
  onChange,
33545
33546
  isReadOnly,
33546
33547
  isDisabled,
@@ -33570,6 +33571,7 @@ function TextField2({
33570
33571
  allowCopy && TextField_default.copy,
33571
33572
  !inputValue && TextField_default.novalue,
33572
33573
  resize && TextField_default[`resize-${resize}`],
33574
+ variant && TextField_default[`variant-${variant}`],
33573
33575
  className
33574
33576
  ),
33575
33577
  value: inputValue,
@@ -34000,10 +34002,9 @@ function InlineEditField({
34000
34002
  const [value, setValue] = (0, import_react196.useState)(defaultValue);
34001
34003
  const [edit, setEdit] = (0, import_react196.useState)(defaultEdit);
34002
34004
  const handleEdit = () => setEdit(true);
34003
- const handleChange = (e) => {
34004
- const val = e.target.value;
34005
- setValue(val);
34006
- onChange?.(val);
34005
+ const handleChange = (value2) => {
34006
+ setValue(value2);
34007
+ onChange?.(value2);
34007
34008
  };
34008
34009
  const handleCommit = () => {
34009
34010
  setEdit(false);
package/dist/index.mjs CHANGED
@@ -33376,8 +33376,8 @@ var import_classnames26 = __toESM(require_classnames());
33376
33376
  import { useState as useState11 } from "react";
33377
33377
 
33378
33378
  // src/components/TextField.tsx
33379
- import { useEffect as useEffect9, useState as useState10 } from "react";
33380
33379
  var import_classnames25 = __toESM(require_classnames());
33380
+ import { useEffect as useEffect9, useState as useState10 } from "react";
33381
33381
 
33382
33382
  // src/components/CopyButton.tsx
33383
33383
  var import_classnames24 = __toESM(require_classnames());
@@ -33404,7 +33404,7 @@ function CopyButton({ value, timeout = TIMEOUT, className, children, ...props })
33404
33404
  }
33405
33405
 
33406
33406
  // css-modules:E:\dev\umami-react-zen\src\components\TextField.module.css
33407
- var TextField_default = { "field": "TextField_field__YzU1O", "icon": "TextField_icon__MDJlY", "novalue": "TextField_novalue__NDg4Y", "textarea": "TextField_textarea__NTQ3M", "resize-vertical": "TextField_resize-vertical__ZDc3N", "resize-horizontal": "TextField_resize-horizontal__MzJjY", "resize-none": "TextField_resize-none__ZmUxZ" };
33407
+ var TextField_default = { "field": "TextField_field__Y2NlN", "icon": "TextField_icon__N2IyN", "novalue": "TextField_novalue__MzMzN", "textarea": "TextField_textarea__MWJjN", "resize-vertical": "TextField_resize-vertical__OWYwN", "resize-horizontal": "TextField_resize-horizontal__NDIyN", "resize-none": "TextField_resize-none__N2Q4Y", "variant-quiet": "TextField_variant-quiet__ZTExY" };
33408
33408
 
33409
33409
  // src/components/TextField.tsx
33410
33410
  import { Fragment as Fragment5, jsx as jsx35, jsxs as jsxs17 } from "react/jsx-runtime";
@@ -33416,6 +33416,7 @@ function TextField2({
33416
33416
  allowCopy,
33417
33417
  asTextArea,
33418
33418
  resize,
33419
+ variant,
33419
33420
  onChange,
33420
33421
  isReadOnly,
33421
33422
  isDisabled,
@@ -33445,6 +33446,7 @@ function TextField2({
33445
33446
  allowCopy && TextField_default.copy,
33446
33447
  !inputValue && TextField_default.novalue,
33447
33448
  resize && TextField_default[`resize-${resize}`],
33449
+ variant && TextField_default[`variant-${variant}`],
33448
33450
  className
33449
33451
  ),
33450
33452
  value: inputValue,
@@ -33875,10 +33877,9 @@ function InlineEditField({
33875
33877
  const [value, setValue] = useState14(defaultValue);
33876
33878
  const [edit, setEdit] = useState14(defaultEdit);
33877
33879
  const handleEdit = () => setEdit(true);
33878
- const handleChange = (e) => {
33879
- const val = e.target.value;
33880
- setValue(val);
33881
- onChange?.(val);
33880
+ const handleChange = (value2) => {
33881
+ setValue(value2);
33882
+ onChange?.(value2);
33882
33883
  };
33883
33884
  const handleCommit = () => {
33884
33885
  setEdit(false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umami/react-zen",
3
- "version": "0.213.0",
3
+ "version": "0.214.0",
4
4
  "description": "Modern, minimalist React component library",
5
5
  "author": "Umami <hello@umami.is>",
6
6
  "license": "MIT",
package/styles.css CHANGED
@@ -4166,7 +4166,7 @@ body a.Button_button__NGQyO {
4166
4166
  }
4167
4167
 
4168
4168
  /* virtual-css:css:f85c857d13f820fa4badfb09996080b9 */
4169
- .TextField_field__YzU1O {
4169
+ .TextField_field__Y2NlN {
4170
4170
  display: flex;
4171
4171
  align-items: center;
4172
4172
  padding: 0 var(--padding-x);
@@ -4197,8 +4197,8 @@ body a.Button_button__NGQyO {
4197
4197
  }
4198
4198
  }
4199
4199
  }
4200
- .TextField_field__YzU1O input,
4201
- .TextField_field__YzU1O textarea {
4200
+ .TextField_field__Y2NlN input,
4201
+ .TextField_field__Y2NlN textarea {
4202
4202
  border: none;
4203
4203
  outline: none;
4204
4204
  padding: var(--padding-y) 0;
@@ -4213,37 +4213,46 @@ body a.Button_button__NGQyO {
4213
4213
  -webkit-appearance: none;
4214
4214
  }
4215
4215
  }
4216
- .TextField_icon__MDJlY {
4216
+ .TextField_icon__N2IyN {
4217
4217
  color: var(--font-color-muted);
4218
4218
  cursor: pointer;
4219
4219
  &:hover {
4220
4220
  color: var(--font-color);
4221
4221
  }
4222
4222
  }
4223
- .TextField_novalue__NDg4Y .TextField_icon__MDJlY {
4223
+ .TextField_novalue__MzMzN .TextField_icon__N2IyN {
4224
4224
  color: var(--font-color-disabled);
4225
4225
  }
4226
- .TextField_textarea__NTQ3M {
4226
+ .TextField_textarea__MWJjN {
4227
4227
  padding: 0;
4228
4228
  & textarea {
4229
4229
  padding: var(--padding);
4230
4230
  }
4231
- & .TextField_icon__MDJlY {
4231
+ & .TextField_icon__N2IyN {
4232
4232
  position: absolute;
4233
4233
  top: var(--padding-x);
4234
4234
  right: var(--padding-x);
4235
4235
  z-index: 1;
4236
4236
  }
4237
4237
  }
4238
- .TextField_resize-vertical__ZDc3N textarea {
4238
+ .TextField_resize-vertical__OWYwN textarea {
4239
4239
  resize: vertical;
4240
4240
  }
4241
- .TextField_resize-horizontal__MzJjY textarea {
4241
+ .TextField_resize-horizontal__NDIyN textarea {
4242
4242
  resize: horizontal;
4243
4243
  }
4244
- .TextField_resize-none__ZmUxZ textarea {
4244
+ .TextField_resize-none__N2Q4Y textarea {
4245
4245
  resize: none;
4246
4246
  }
4247
+ .TextField_field__Y2NlN.TextField_variant-quiet__ZTExY {
4248
+ padding: 0;
4249
+ border: 0;
4250
+ outline: none;
4251
+ box-shadow: none;
4252
+ & input:focus {
4253
+ border-bottom: var(--border);
4254
+ }
4255
+ }
4247
4256
 
4248
4257
  /* virtual-css:css:603e8ab63f869366a7b9c81da6a1d757 */
4249
4258
  .ConfirmationDialog_dialog__YjQzN {