@platformatic/ui-components 0.1.118 → 0.1.120

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.
@@ -14,7 +14,7 @@ jobs:
14
14
  build:
15
15
  runs-on: ubuntu-latest
16
16
  steps:
17
- - uses: actions/checkout@v3
17
+ - uses: actions/checkout@v4
18
18
  - uses: actions/setup-node@v3
19
19
  with:
20
20
  node-version: 18
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- 18.17.1
1
+ 18.18.0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@platformatic/ui-components",
3
3
  "description": "Platformatic UI Components",
4
- "version": "0.1.118",
4
+ "version": "0.1.120",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
@@ -45,7 +45,7 @@
45
45
  "@types/react-dom": "^18.0.6",
46
46
  "@vitejs/plugin-react": "^4.0.0",
47
47
  "babel-loader": "^9.0.0",
48
- "happy-dom": "^10.0.0",
48
+ "happy-dom": "^12.0.0",
49
49
  "jsdom": "^22.0.0",
50
50
  "react-test-renderer": "^18.2.0",
51
51
  "snazzy": "^9.0.0",
@@ -15,7 +15,7 @@ function RadioGroup ({ name, radios, errorMessage, onChange, disabled, value })
15
15
  <div className={styles.radioGroupContainer}>
16
16
  {radios.map(radio => (
17
17
  <div className={radioContainerClass} key={radio.value}>
18
- <input className={styles.radio} type='radio' name={name} value={radio.value} onChange={onChange} disabled={disabled} checked={radio.value === value} />
18
+ <input className={styles.radio} type='radio' id={radio.name} name={name} value={radio.value} onChange={onChange} disabled={disabled} checked={radio.value === value} />
19
19
  <label className={styles.label} htmlFor={radio.name}>{radio.label}</label>
20
20
  </div>
21
21
  ))}
@@ -72,8 +72,10 @@ function Select ({
72
72
  return setSelected(option)
73
73
  }}
74
74
  >
75
- {option.iconName && <PlatformaticIcon iconName={option.iconName} color={optionsIconColor} size={SMALL} onClick={null} />}
76
- <span>{option.label}</span>
75
+ <div className={styles.liContent}>
76
+ {option.iconName && <PlatformaticIcon iconName={option.iconName} color={optionsIconColor} size={SMALL} onClick={null} />}
77
+ <span>{option.label}</span>
78
+ </div>
77
79
  </li>
78
80
  )
79
81
  }
@@ -82,7 +84,7 @@ function Select ({
82
84
  if (value.length === 0) {
83
85
  return (
84
86
  <ul className={styles.options}>
85
- {options.length > 0 ? options.map((option, index) => renderLi(option, index)) : <li className={styles.option}>No data found</li>}
87
+ {options.length > 0 ? options.map((option, index) => renderLi(option, index)) : <li className={styles.option}><div className={styles.liContent}>No data found</div></li>}
86
88
  </ul>
87
89
  )
88
90
  }
@@ -91,7 +93,7 @@ function Select ({
91
93
 
92
94
  return (
93
95
  <ul className={styles.options}>
94
- {filteredOptions.length > 0 ? filteredOptions.map((option, index) => renderLi(option, index)) : <li className={styles.option}>No data found</li>}
96
+ {filteredOptions.length > 0 ? filteredOptions.map((option, index) => renderLi(option, index)) : <li className={styles.option}><div className={styles.liContent}>No data found</div></li>}
95
97
  {notFilterableOptions.length > 0 && notFilterableOptions.map((option, index) => renderLi(option, index))}
96
98
  </ul>
97
99
  )
@@ -117,7 +119,7 @@ function Select ({
117
119
  if (showOptions) {
118
120
  setShowOptions(false)
119
121
  }
120
- }, 100)
122
+ }, 250)
121
123
  }
122
124
 
123
125
  return (
@@ -16,8 +16,11 @@
16
16
  box-shadow: 0px 0px 10px rgb(0 40 61 / 25%);
17
17
  }
18
18
  .option {
19
- @apply w-full px-4 py-2 border-b border-main-dark-blue/[.15] font-light cursor-pointer hover:bg-main-dark-blue hover:bg-opacity-10 inline-flex items-center gap-x-1
19
+ @apply w-full border-b border-main-dark-blue/[.15] font-light cursor-pointer hover:bg-main-dark-blue hover:bg-opacity-10 z-10;
20
20
  }
21
21
  .icons {
22
22
  @apply absolute top-[50%] right-[0.5rem] translate-y-[-50%] flex gap-x-2;
23
23
  }
24
+ .liContent {
25
+ @apply px-4 py-2 inline-flex items-center gap-x-1 relative z-[-1];
26
+ }