@thinkpixellab-public/px-vue 3.0.3 → 3.0.4

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/README.md CHANGED
@@ -13,7 +13,7 @@ be preserved.
13
13
  There is no primary entry point into this package so individual components or other files need to be imported directly. The package uses the same project structure as most of our other Vue projects (e.g. components in the /components folder, etc.).
14
14
 
15
15
  ```javascript
16
- import PxToggle from '@thinkpixellab/px-vue/components/PxToggle.vue';
16
+ import PxToggle from '@thinkpixellab-public/px-vue/components/PxToggle.vue';
17
17
  ```
18
18
 
19
19
  ## Dependency on px-styles
@@ -57,7 +57,7 @@ Because we use a hard coded path to px-styles.scss, that file will get resolved
57
57
 
58
58
  ## Aliasing a Local Version During Development
59
59
 
60
- To resolve `@thinkpixellab/px-vue` from a local folder during development, you can extend webpack as follows
60
+ To resolve `@thinkpixellab-public/px-vue` from a local folder during development, you can extend webpack as follows
61
61
 
62
62
  ```js
63
63
  const path = require('path');
@@ -66,7 +66,7 @@ const path = require('path');
66
66
  {
67
67
  resolve: {
68
68
  alias: {
69
- '@thinkpixellab/px-vue': path.resolve(__dirname, '../px-vue'),
69
+ '@thinkpixellab-public/px-vue': path.resolve(__dirname, '../px-vue'),
70
70
  },
71
71
  }
72
72
  }
@@ -3,6 +3,13 @@
3
3
  -->
4
4
  <template>
5
5
  <div :class="bem()">
6
+ <div :class="bem('section')">
7
+ <h3 class="h3">Container</h3>
8
+ </div>
9
+ <div :class="[bem('container'), containerClass]">
10
+ <div :class="bem('container-inner')"></div>
11
+ </div>
12
+
6
13
  <div :class="bem('section', { color: true })">
7
14
  <h3 class="h3">Color</h3>
8
15
 
@@ -52,8 +59,6 @@ export default {
52
59
  ].includes(c);
53
60
  });
54
61
 
55
- console.log(`f: 👉 ${JSON.stringify(f, null, 4)}`);
56
-
57
62
  return f.map(colorName => {
58
63
  return {
59
64
  name: colorName,
@@ -61,6 +66,11 @@ export default {
61
66
  };
62
67
  });
63
68
  },
69
+
70
+ containerClass() {
71
+ let sel = this.config?.container?.selector;
72
+ return sel && sel.slice(1);
73
+ },
64
74
  },
65
75
  // watch: {},
66
76
  mounted() {
@@ -71,11 +81,10 @@ export default {
71
81
 
72
82
  try {
73
83
  this.config = JSON.parse(configStr);
84
+ console.log(`this.config: 👉 ${JSON.stringify(this.config, null, 4)}`);
74
85
  } catch {
75
86
  console.error('Could not parse px-styles config string.');
76
87
  }
77
-
78
- console.log(configStr);
79
88
  },
80
89
  // methods: {},
81
90
  };
@@ -125,5 +134,27 @@ export default {
125
134
  display: flex;
126
135
  gap: 1px;
127
136
  }
137
+
138
+ // container
139
+
140
+ &__container {
141
+ height: 100px;
142
+ position: relative;
143
+ @include after() {
144
+ position: absolute;
145
+ height: 1px;
146
+ background-color: black;
147
+ top: 50%;
148
+ left: 0;
149
+ right: 0;
150
+ }
151
+ }
152
+
153
+ &__container-inner {
154
+ height: 20px;
155
+ width: 100%;
156
+ border-left: 1px solid red;
157
+ border-right: 1px solid red;
158
+ }
128
159
  }
129
160
  </style>
@@ -3,7 +3,7 @@
3
3
  provided by vue-inline-svg, this component will ensure a consistent approach to sizing and
4
4
  perform basic string replacements.
5
5
 
6
- @import PxSvg from '@thinkpixellab/px-vue/components/PxSvg.vue';
6
+ @import PxSvg from '@thinkpixellab-public/px-vue/components/PxSvg.vue';
7
7
 
8
8
  // show the icon at it's natural size
9
9
  <px-svg src="require('~assets/icons/arrow.svg')" />
@@ -37,8 +37,8 @@
37
37
  </template>
38
38
 
39
39
  <script>
40
- import PxValidator from '@thinkpixellab/px-vue/components/PxValidator.vue';
41
- import PxTextbox from '@thinkpixellab/px-vue/components/PxTextbox.vue';
40
+ import PxValidator from '@thinkpixellab-public/px-vue/components/PxValidator.vue';
41
+ import PxTextbox from '@thinkpixellab-public/px-vue/components/PxTextbox.vue';
42
42
 
43
43
  export default {
44
44
  components: { PxValidator, PxTextbox },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkpixellab-public/px-vue",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "description": "General purpose Vue components and helpers that can be used across projects.",
5
5
  "author": "Pixel Lab",
6
6
  "license": "MIT",
@@ -14,7 +14,7 @@
14
14
  "dependencies": {
15
15
  "@floating-ui/dom": "^1.0.1",
16
16
  "@popperjs/core": "^2.11.5",
17
- "@thinkpixellab-public/px-styles": "^3.6.3",
17
+ "@thinkpixellab-public/px-styles": "^3.7.1",
18
18
  "@thinkpixellab-public/px-vue-tester": "^2.0.0",
19
19
  "@thinkpixellab-public/vue-resize-directive": "^1.2.2",
20
20
  "body-scroll-lock": "^3.1.5",
@@ -5,7 +5,7 @@
5
5
  To import include the following at the top of any scss file:
6
6
 
7
7
  // import px-vue helpers
8
- @use '@thinkpixellab/px-vue/styles/helpers.scss' as pxvue;
8
+ @use '@thinkpixellab-public/px-vue/styles/helpers.scss' as pxvue;
9
9
 
10
10
  And then access mixins from the prefix pxvue (or import as * if you're feeling dangerous).
11
11