@pathscale/ui 0.0.63 → 0.0.65

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 (3) hide show
  1. package/LICENSE +1 -0
  2. package/dist/index.js +34 -15
  3. package/package.json +1 -1
package/LICENSE CHANGED
@@ -1,6 +1,7 @@
1
1
  MIT License
2
2
 
3
3
  Copyright (c) 2025 pathscale
4
+ Copyright (c) 2020 Pouya Saadeghi
4
5
 
5
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
7
  of this software and associated documentation files (the "Software"), to deal
package/dist/index.js CHANGED
@@ -6868,6 +6868,7 @@ const Dropdown_classesFn = ({ className, horizontal, vertical, end, hover, open
6868
6868
  const Dropdown = (props)=>{
6869
6869
  const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
6870
6870
  "children",
6871
+ "class",
6871
6872
  "className",
6872
6873
  "item",
6873
6874
  "horizontal",
@@ -6876,20 +6877,22 @@ const Dropdown = (props)=>{
6876
6877
  "hover",
6877
6878
  "open",
6878
6879
  "dataTheme",
6880
+ "style",
6879
6881
  "aria-label",
6880
6882
  "aria-describedby",
6881
6883
  "aria-expanded",
6882
6884
  "aria-haspopup",
6883
6885
  "aria-labelledby"
6884
6886
  ]);
6885
- const classes = ()=>Dropdown_classesFn({
6886
- className: local.className,
6887
- horizontal: local.horizontal,
6888
- vertical: local.vertical,
6889
- end: local.end,
6890
- hover: local.hover,
6891
- open: local.open
6892
- });
6887
+ const classes = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>twMerge("dropdown", local.class, local.className, clsx({
6888
+ "dropdown-left": "left" === local.horizontal,
6889
+ "dropdown-right": "right" === local.horizontal,
6890
+ "dropdown-top": "top" === local.vertical,
6891
+ "dropdown-bottom": "bottom" === local.vertical,
6892
+ "dropdown-end": local.end,
6893
+ "dropdown-hover": local.hover,
6894
+ "dropdown-open": local.open
6895
+ })));
6893
6896
  return (()=>{
6894
6897
  var _el$ = Dropdown_tmpl$3();
6895
6898
  (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)({
@@ -6903,6 +6906,9 @@ const Dropdown = (props)=>{
6903
6906
  get ["class"] () {
6904
6907
  return classes();
6905
6908
  },
6909
+ get style () {
6910
+ return local.style;
6911
+ },
6906
6912
  get ["aria-label"] () {
6907
6913
  return local["aria-label"];
6908
6914
  },
@@ -8795,17 +8801,24 @@ const Rating = Object.assign(Rating_Rating, {
8795
8801
  Item: rating_RatingItem,
8796
8802
  Hidden: rating_RatingHidden
8797
8803
  });
8798
- var Select_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<select>");
8804
+ var Select_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<select><option value disabled hidden>");
8799
8805
  const Select = (props)=>{
8800
- const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
8806
+ const merged = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.mergeProps)({
8807
+ value: "",
8808
+ placeholder: "Please, select an option"
8809
+ }, props);
8810
+ const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(merged, [
8801
8811
  "color",
8802
8812
  "size",
8803
8813
  "dataTheme",
8804
8814
  "class",
8805
8815
  "className",
8806
- "style"
8816
+ "style",
8817
+ "placeholder",
8818
+ "value",
8819
+ "children"
8807
8820
  ]);
8808
- const classes = ()=>twMerge("select", local.class, local.className, clsx({
8821
+ const classes = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>twMerge("select", local.class, local.className, clsx({
8809
8822
  "select-xl": "xl" === local.size,
8810
8823
  "select-lg": "lg" === local.size,
8811
8824
  "select-md": "md" === local.size,
@@ -8819,9 +8832,10 @@ const Select = (props)=>{
8819
8832
  "select-success": "success" === local.color,
8820
8833
  "select-warning": "warning" === local.color,
8821
8834
  "select-error": "error" === local.color
8822
- }));
8835
+ })));
8836
+ const hasValue = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>void 0 !== local.value && "" !== local.value);
8823
8837
  return (()=>{
8824
- var _el$ = Select_tmpl$();
8838
+ var _el$ = Select_tmpl$(), _el$2 = _el$.firstChild;
8825
8839
  (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
8826
8840
  get ["data-theme"] () {
8827
8841
  return local.dataTheme;
@@ -8831,9 +8845,14 @@ const Select = (props)=>{
8831
8845
  },
8832
8846
  get style () {
8833
8847
  return local.style;
8848
+ },
8849
+ get value () {
8850
+ return local.value;
8834
8851
  }
8835
8852
  }), false, true);
8836
- (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>props.children);
8853
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$2, ()=>local.placeholder);
8854
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>local.children, null);
8855
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>_el$2.selected = !hasValue());
8837
8856
  return _el$;
8838
8857
  })();
8839
8858
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pathscale/ui",
3
- "version": "0.0.63",
3
+ "version": "0.0.65",
4
4
  "author": "pathscale",
5
5
  "repository": {
6
6
  "type": "git",