@morscherlab/mint-sdk 1.2.0-beta.14 → 1.2.0-beta.15
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/styles.css
CHANGED
|
@@ -4148,6 +4148,14 @@ code, pre {
|
|
|
4148
4148
|
width: 1.5rem;
|
|
4149
4149
|
height: 1.5rem;
|
|
4150
4150
|
}
|
|
4151
|
+
/* A bare <svg> in the slot has no intrinsic size and collapses to 0 width as a
|
|
4152
|
+
flex item; fill the sized icon box so callers need not size their icon. */
|
|
4153
|
+
.mint-icon-button__icon--sm > svg,
|
|
4154
|
+
.mint-icon-button__icon--md > svg,
|
|
4155
|
+
.mint-icon-button__icon--lg > svg {
|
|
4156
|
+
width: 100%;
|
|
4157
|
+
height: 100%;
|
|
4158
|
+
}
|
|
4151
4159
|
/* Spinner */
|
|
4152
4160
|
.mint-icon-button__spinner {
|
|
4153
4161
|
animation: mint-spin 1s linear infinite;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morscherlab/mint-sdk",
|
|
3
|
-
"version": "1.2.0-beta.
|
|
3
|
+
"version": "1.2.0-beta.15",
|
|
4
4
|
"description": "MINT Platform SDK — Vue 3 components, composables, and types for plugin development. MINT = Mass-spec INtegrated Toolkit.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs'
|
|
2
|
+
import { resolve } from 'node:path'
|
|
3
|
+
import { describe, expect, it } from 'vitest'
|
|
4
|
+
|
|
5
|
+
// jsdom has no layout, so this pins the stylesheet contract instead: a bare
|
|
6
|
+
// <svg> passed to IconButton's slot must be sized by the icon box, otherwise it
|
|
7
|
+
// collapses to zero width as a flex item (FilePicker source toggles, beta.14).
|
|
8
|
+
describe('IconButton icon sizing', () => {
|
|
9
|
+
it('should size a bare slot svg to the icon box when the caller passes no dimensions', () => {
|
|
10
|
+
const css = readFileSync(
|
|
11
|
+
resolve(__dirname, '../../styles/components/icon-button.css'),
|
|
12
|
+
'utf8',
|
|
13
|
+
)
|
|
14
|
+
expect(css).toMatch(
|
|
15
|
+
/\.mint-icon-button__icon--sm > svg,\s*\.mint-icon-button__icon--md > svg,\s*\.mint-icon-button__icon--lg > svg \{\s*width: 100%;\s*height: 100%;\s*\}/,
|
|
16
|
+
)
|
|
17
|
+
})
|
|
18
|
+
})
|
|
@@ -167,6 +167,15 @@
|
|
|
167
167
|
height: 1.5rem;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
+
/* A bare <svg> in the slot has no intrinsic size and collapses to 0 width as a
|
|
171
|
+
flex item; fill the sized icon box so callers need not size their icon. */
|
|
172
|
+
.mint-icon-button__icon--sm > svg,
|
|
173
|
+
.mint-icon-button__icon--md > svg,
|
|
174
|
+
.mint-icon-button__icon--lg > svg {
|
|
175
|
+
width: 100%;
|
|
176
|
+
height: 100%;
|
|
177
|
+
}
|
|
178
|
+
|
|
170
179
|
/* Spinner */
|
|
171
180
|
.mint-icon-button__spinner {
|
|
172
181
|
animation: mint-spin 1s linear infinite;
|