@studiocms/ui 0.4.2 → 0.4.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.
@@ -102,14 +102,17 @@ const {
102
102
  role="option"
103
103
  aria-selected="false"
104
104
  >
105
- {icon && (
106
- <Icon width={24} height={24} name={icon} />
107
- )}
108
- {href ? (
109
- <a href={href} class="sui-dropdown-link">{label}</a>
110
- ) : (
111
- <span>{label}</span>
112
- )}
105
+ {href ? (
106
+ <a href={href} class="sui-dropdown-link sui-dropdown-line-container">
107
+ {icon && (<Icon width={24} height={24} name={icon} />)}
108
+ <span>{label}</span>
109
+ </a>
110
+ ) : (
111
+ <div class="sui-dropdown-line-container">
112
+ {icon && (<Icon width={24} height={24} name={icon} />)}
113
+ <span>{label}</span>
114
+ </div>
115
+ )}
113
116
  </li>
114
117
  ))}
115
118
  </ul>
@@ -100,18 +100,24 @@
100
100
  transform-origin: bottom right;
101
101
  }
102
102
  .sui-dropdown-option {
103
- padding: .5rem .75rem;
104
103
  cursor: pointer;
105
104
  font-size: .975em;
106
105
  transition: all .15s ease;
107
106
  display: flex;
108
107
  flex-direction: row;
109
- gap: .5rem;
110
108
  align-items: center;
111
109
  width: 100%;
112
110
  white-space: normal;
113
111
  user-select: none;
114
112
  }
113
+ .sui-dropdown-line-container {
114
+ display: flex;
115
+ flex-direction: row;
116
+ align-items: center;
117
+ padding: .5rem .75rem;
118
+ width: 100%;
119
+ gap: .5rem;
120
+ }
115
121
  .sui-dropdown-option:hover,
116
122
  .sui-dropdown-option:focus,
117
123
  .sui-dropdown-option.focused {
@@ -121,7 +127,6 @@
121
127
  padding: 0;
122
128
  }
123
129
  .sui-dropdown-link {
124
- padding: .5rem .75rem;
125
130
  width: 100%;
126
131
  text-decoration: none;
127
132
  color: hsl(var(--text-normal));
@@ -175,6 +180,6 @@
175
180
  .sui-dropdown-option.end {
176
181
  justify-content: space-between;
177
182
  }
178
- .sui-dropdown-option.has-icon {
183
+ .sui-dropdown-option.has-icon .sui-dropdown-line-container {
179
184
  padding-left: .5rem;
180
185
  }
@@ -35,7 +35,7 @@ for (const attr in attributes) {
35
35
  renderAttribsHTML += ` ${attr}="${attributes[attr]}"`;
36
36
  }
37
37
 
38
- const svg = `<svg xmlns="http://www.w3.org/2000/svg"${renderAttribsHTML}>${body}</svg>`;
38
+ const svg = `<svg style="min-width: ${attributes.height || 24}px" xmlns="http://www.w3.org/2000/svg"${renderAttribsHTML}>${body}</svg>`;
39
39
  ---
40
40
 
41
41
  <Fragment set:html={svg} />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studiocms/ui",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "The UI library for StudioCMS. Includes the layouts & components we use to build StudioCMS.",
5
5
  "repository": {
6
6
  "type": "git",