@pathscale/ui 0.0.61 → 0.0.62

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.
Files changed (2) hide show
  1. package/dist/index.js +21 -18
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7548,7 +7548,7 @@ const IndicatorItem = (props)=>{
7548
7548
  const indicator_Indicator = Object.assign(Indicator, {
7549
7549
  Item: IndicatorItem
7550
7550
  });
7551
- var Input_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<span>"), Input_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<label class="flex items-center gap-2 w-full"><input>');
7551
+ var Input_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<span>"), Input_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<label><input>");
7552
7552
  const Input = (props)=>{
7553
7553
  const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
7554
7554
  "size",
@@ -7571,21 +7571,16 @@ const Input = (props)=>{
7571
7571
  if ("password" === local.type) return passwordVisible() ? "text" : "password";
7572
7572
  return local.type;
7573
7573
  });
7574
- const classes = ()=>twMerge("input input-bordered w-full focus:outline-none focus:ring-1 focus:ring-primary", local.class, local.className, clsx({
7575
- "input-xl": "xl" === local.size,
7576
- "input-lg": "lg" === local.size,
7577
- "input-md": "md" === local.size,
7578
- "input-sm": "sm" === local.size,
7579
- "input-xs": "xs" === local.size,
7580
- "input-primary": "primary" === local.color,
7581
- "input-secondary": "secondary" === local.color,
7582
- "input-accent": "accent" === local.color,
7583
- "input-ghost": "ghost" === local.color,
7584
- "input-info": "info" === local.color,
7585
- "input-success": "success" === local.color,
7586
- "input-warning": "warning" === local.color,
7587
- "input-error": "error" === local.color
7588
- }));
7574
+ const colorFocusMap = {
7575
+ primary: "focus-within:border-primary",
7576
+ success: "focus-within:border-success",
7577
+ warning: "focus-within:border-warning",
7578
+ error: "focus-within:border-error",
7579
+ info: "focus-within:border-info",
7580
+ default: "focus-within:border-base-content"
7581
+ };
7582
+ const labelClasses = ()=>twMerge("input input-bordered w-full items-center gap-2 focus-within:outline-none", colorFocusMap[local.color || "default"], local.class, local.className);
7583
+ const inputClasses = ()=>"grow bg-transparent focus:outline-none";
7589
7584
  return (()=>{
7590
7585
  var _el$ = Input_tmpl$2(), _el$2 = _el$.firstChild;
7591
7586
  (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
@@ -7619,7 +7614,7 @@ const Input = (props)=>{
7619
7614
  return local.style;
7620
7615
  },
7621
7616
  get ["class"] () {
7622
- return classes();
7617
+ return inputClasses();
7623
7618
  }
7624
7619
  }), false, false);
7625
7620
  (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
@@ -7646,7 +7641,15 @@ const Input = (props)=>{
7646
7641
  return _el$3;
7647
7642
  }
7648
7643
  }), null);
7649
- (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "data-theme", local.dataTheme));
7644
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
7645
+ var _v$5 = labelClasses(), _v$6 = local.dataTheme;
7646
+ _v$5 !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$, _p$.e = _v$5);
7647
+ _v$6 !== _p$.t && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "data-theme", _p$.t = _v$6);
7648
+ return _p$;
7649
+ }, {
7650
+ e: void 0,
7651
+ t: void 0
7652
+ });
7650
7653
  return _el$;
7651
7654
  })();
7652
7655
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pathscale/ui",
3
- "version": "0.0.61",
3
+ "version": "0.0.62",
4
4
  "author": "pathscale",
5
5
  "repository": {
6
6
  "type": "git",