@warp-ds/elements 1.4.0-next.2 → 1.4.0-next.3

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.js CHANGED
@@ -1045,7 +1045,7 @@ import { html as html3 } from "lit";
1045
1045
  import WarpElement from "@warp-ds/elements-core";
1046
1046
  import { ifDefined } from "lit/directives/if-defined.js";
1047
1047
 
1048
- // node_modules/.pnpm/@warp-ds+css@1.9.3/node_modules/@warp-ds/css/component-classes/index.js
1048
+ // node_modules/.pnpm/@warp-ds+css@1.9.6/node_modules/@warp-ds/css/component-classes/index.js
1049
1049
  var badge = {
1050
1050
  base: "py-4 px-8 border-0 rounded-4 text-xs inline-flex",
1051
1051
  neutral: "bg-[--w-color-badge-neutral-background] s-text",
@@ -1297,15 +1297,24 @@ var alert = {
1297
1297
  infoIcon: "s-icon-info"
1298
1298
  };
1299
1299
  var input = {
1300
- default: "block text-m mb-0 leading-m s-text s-bg s-border hover:s-border-hover active:s-border-selected rounded-4 py-12 px-8 block border-1 w-full focusable focus:[--w-outline-offset:-2px] caret-current",
1301
- textArea: "min-h-[42] sm:min-h-[45]",
1302
- disabled: "s-bg-disabled-subtle s-border-disabled hover:s-border-disabled! s-text-disabled pointer-events-none",
1303
- invalid: "s-border-negative s-text-negative! hover:s-border-negative-hover! outline-[--w-s-color-border-negative]!",
1304
- readOnly: "pl-0 bg-transparent! border-0! pointer-events-none",
1305
- placeholder: "placeholder:s-text-placeholder",
1300
+ // wrapper classes
1306
1301
  wrapper: "relative",
1302
+ // input classes
1303
+ base: "block text-m leading-m mb-0 px-8 py-12 rounded-4 w-full focusable focus:[--w-outline-offset:-2px] caret-current",
1304
+ // true
1305
+ default: "border-1 s-text s-bg s-border hover:s-border-hover active:s-border-selected",
1306
+ // !isInvalid && !isDisabled && !isReadOnly
1307
+ disabled: "border-1 s-text-disabled s-bg-disabled-subtle s-border-disabled pointer-events-none",
1308
+ // !isInvalid && isDisabled && !isReadOnly
1309
+ invalid: "border-1 s-text-negative s-bg s-border-negative hover:s-border-negative-hover outline-[--w-s-color-border-negative]!",
1310
+ // isInvalid && !isDisabled && !isReadOnly
1311
+ readOnly: "pl-0 bg-transparent pointer-events-none",
1312
+ // !isInvalid && !isDisabled && isReadOnly
1313
+ placeholder: "placeholder:s-text-placeholder",
1307
1314
  suffix: "pr-40",
1308
- prefix: "pl-40"
1315
+ prefix: "pl-[var(--w-prefix-width,_40px)]",
1316
+ // textarea classes
1317
+ textArea: "min-h-[42] sm:min-h-[45]"
1309
1318
  };
1310
1319
  var select = {
1311
1320
  default: "block text-m mb-0 leading-m s-text s-bg s-border hover:s-border-hover active:s-border-active rounded-4 py-12 px-8 block border-1 w-full focusable focus:[--w-outline-offset:-2px] appearance-none pr-32 cursor-pointer caret-current",
@@ -5152,19 +5161,18 @@ var WarpTextField = class extends WarpElement13 {
5152
5161
  this.type = "text";
5153
5162
  }
5154
5163
  get _inputStyles() {
5155
- return fclasses({
5156
- [input.default]: true,
5157
- [input.invalid]: this.invalid,
5158
- [input.disabled]: this.disabled,
5159
- [input.readOnly]: this.readOnly,
5164
+ return classes({
5165
+ [input.base]: true,
5166
+ [input.default]: !this.invalid && !this.disabled && !this.readOnly,
5167
+ [input.invalid]: this.invalid && !this.disabled && !this.readOnly,
5168
+ [input.disabled]: !this.invalid && this.disabled && !this.readOnly,
5169
+ [input.readOnly]: !this.invalid && !this.disabled && this.readOnly,
5160
5170
  [input.suffix]: this._hasSuffix,
5161
- // we style input with prefix here because we cannot use
5162
- // arbitrary values with commas in UnoCSS like pl-[var(--w-prefix-width, 40px)]
5163
- "warp-input-with-prefix": this._hasPrefix
5171
+ [input.prefix]: this._hasPrefix
5164
5172
  });
5165
5173
  }
5166
5174
  get _helpTextStyles() {
5167
- return fclasses({
5175
+ return classes({
5168
5176
  [helpText.helpText]: true,
5169
5177
  [helpText.helpTextColor]: !this.invalid,
5170
5178
  [helpText.helpTextColorInvalid]: this.invalid
@@ -5255,9 +5263,6 @@ __publicField(WarpTextField, "styles", [
5255
5263
  ::slotted(:last-child) {
5256
5264
  margin-bottom: 0px !important;
5257
5265
  }
5258
- .warp-input-with-prefix {
5259
- padding-left: var(--w-prefix-width, 40px);
5260
- }
5261
5266
  `
5262
5267
  ]);
5263
5268
  if (!customElements.get("w-textfield")) {