@thinkpixellab-public/px-vue 4.0.8 → 4.0.9
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.
package/bases/PxBaseToggle.vue
CHANGED
package/components/PxContain.vue
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
Keeps a child element contained within boundaries.
|
|
5
5
|
|
|
6
|
-
<px-contain #default="{width, height, left
|
|
7
|
-
<div :style="{position: 'absolute', left: left top: top width: width height: height}" />
|
|
6
|
+
<px-contain #default="{width, height, left, top }" :aspect="16/9" :round="true" :to-px="true">
|
|
7
|
+
<div :style="{position: 'absolute', left: left top: top, width: width, height: height}" />
|
|
8
8
|
</px-contain>
|
|
9
9
|
|
|
10
10
|
-->
|
package/package.json
CHANGED
package/stories/PxIcon.mdx
CHANGED
|
@@ -10,8 +10,7 @@ by name, default replacements collection that converts the color black to `curre
|
|
|
10
10
|
properties for customizing stroke width, offset and spacing.
|
|
11
11
|
|
|
12
12
|
To make named app icons available, create a plugin in the project that calls
|
|
13
|
-
`app.provide('PxIcon.icons', appIcons)` where `appIcons` is a collection of icons like `{ iconOne:
|
|
14
|
-
srcOne, iconTwo: srcTwo }`.
|
|
13
|
+
`app.provide('PxIcon.icons', appIcons)` where `appIcons` is a collection of icons like `{ iconOne: srcOne, iconTwo: srcTwo }`.
|
|
15
14
|
|
|
16
15
|
PxVue contains the full set of [feather icons](https://feathericons.com/) and a helper for making
|
|
17
16
|
those available by name within the application. See the plugin reference below.
|
|
@@ -20,8 +19,6 @@ those available by name within the application. See the plugin reference below.
|
|
|
20
19
|
|
|
21
20
|
<Controls of={PxIconStories.Basic} />
|
|
22
21
|
|
|
23
|
-
### Nuxt 3 Plugin Example
|
|
24
|
-
|
|
25
22
|
```js
|
|
26
23
|
// px-vue feather icons helper
|
|
27
24
|
import getFeatherIcons from '@thinkpixellab-public/px-vue/utils/getFeatherIcons.js';
|
|
@@ -30,15 +27,14 @@ export default defineNuxtPlugin(nuxtApp => {
|
|
|
30
27
|
const vueApp = nuxtApp.vueApp;
|
|
31
28
|
|
|
32
29
|
// search for icons in the @/assets/feather folder
|
|
33
|
-
const icons = Object.values(
|
|
34
|
-
(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
);
|
|
30
|
+
const icons = Object.values(
|
|
31
|
+
import.meta.globEager('@thinkpixellab-public/px-vue/assets/feather/*.svg')
|
|
32
|
+
).reduce((obj, value) => {
|
|
33
|
+
const url = value.default;
|
|
34
|
+
const name = url.match(/([^\/]+)(?=\.\w+$)/)[0];
|
|
35
|
+
obj[name] = url;
|
|
36
|
+
return obj;
|
|
37
|
+
}, {});
|
|
42
38
|
|
|
43
39
|
vueApp.provide('PxIcon.icons', {
|
|
44
40
|
// local icons
|