vueless 1.4.7-beta.0 → 1.4.7-beta.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "1.4.7-beta.0",
3
+ "version": "1.4.7-beta.1",
4
4
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
5
5
  "author": "Johnny Grid <hello@vueless.com> (https://vueless.com)",
6
6
  "homepage": "https://vueless.com",
@@ -13,10 +13,12 @@ export default /*tw*/ {
13
13
  true: "w-full",
14
14
  },
15
15
  grow: {
16
- true: "flex-grow",
16
+ true: "grow",
17
+ false: "grow-0",
17
18
  },
18
19
  shrink: {
19
- true: "flex-shrink",
20
+ true: "shrink",
21
+ false: "shrink-0",
20
22
  },
21
23
  gap: {
22
24
  none: "gap-0",
@@ -141,29 +141,37 @@ describe("UCol.vue", () => {
141
141
  });
142
142
 
143
143
  it("Grow – applies the correct grow class", () => {
144
- const grow = true;
145
- const expectedClasses = "flex-grow";
144
+ const growClasses = {
145
+ true: "grow",
146
+ false: "grow-0",
147
+ };
146
148
 
147
- const component = mount(UCol, {
148
- props: {
149
- grow,
150
- },
151
- });
149
+ Object.entries(growClasses).forEach(([grow, classes]) => {
150
+ const component = mount(UCol, {
151
+ props: {
152
+ grow: grow === "true",
153
+ },
154
+ });
152
155
 
153
- expect(component.attributes("class")).toContain(expectedClasses);
156
+ expect(component.attributes("class")).toContain(classes);
157
+ });
154
158
  });
155
159
 
156
160
  it("Shrink – applies the correct shrink class", () => {
157
- const shrink = true;
158
- const expectedClasses = "flex-shrink";
161
+ const shrinkClasses = {
162
+ true: "shrink",
163
+ false: "shrink-0",
164
+ };
159
165
 
160
- const component = mount(UCol, {
161
- props: {
162
- shrink,
163
- },
164
- });
166
+ Object.entries(shrinkClasses).forEach(([shrink, classes]) => {
167
+ const component = mount(UCol, {
168
+ props: {
169
+ shrink: shrink === "true",
170
+ },
171
+ });
165
172
 
166
- expect(component.attributes("class")).toContain(expectedClasses);
173
+ expect(component.attributes("class")).toContain(classes);
174
+ });
167
175
  });
168
176
 
169
177
  it("Tag – renders the correct HTML tag", () => {
@@ -13,10 +13,12 @@ export default /*tw*/ {
13
13
  true: "w-full",
14
14
  },
15
15
  grow: {
16
- true: "flex-grow",
16
+ true: "grow",
17
+ false: "grow-0",
17
18
  },
18
19
  shrink: {
19
- true: "flex-shrink",
20
+ true: "shrink",
21
+ false: "shrink-0",
20
22
  },
21
23
  gap: {
22
24
  none: "gap-0",
@@ -141,29 +141,37 @@ describe("URow.vue", () => {
141
141
  });
142
142
 
143
143
  it("Grow – applies the correct grow class", () => {
144
- const grow = true;
145
- const expectedClasses = "flex-grow";
144
+ const growClasses = {
145
+ true: "grow",
146
+ false: "grow-0",
147
+ };
146
148
 
147
- const component = mount(URow, {
148
- props: {
149
- grow,
150
- },
151
- });
149
+ Object.entries(growClasses).forEach(([grow, classes]) => {
150
+ const component = mount(URow, {
151
+ props: {
152
+ grow: grow === "true",
153
+ },
154
+ });
152
155
 
153
- expect(component.attributes("class")).toContain(expectedClasses);
156
+ expect(component.attributes("class")).toContain(classes);
157
+ });
154
158
  });
155
159
 
156
160
  it("Shrink – applies the correct shrink class", () => {
157
- const shrink = true;
158
- const expectedClasses = "flex-shrink";
161
+ const shrinkClasses = {
162
+ true: "shrink",
163
+ false: "shrink-0",
164
+ };
159
165
 
160
- const component = mount(URow, {
161
- props: {
162
- shrink,
163
- },
164
- });
166
+ Object.entries(shrinkClasses).forEach(([shrink, classes]) => {
167
+ const component = mount(URow, {
168
+ props: {
169
+ shrink: shrink === "true",
170
+ },
171
+ });
165
172
 
166
- expect(component.attributes("class")).toContain(expectedClasses);
173
+ expect(component.attributes("class")).toContain(classes);
174
+ });
167
175
  });
168
176
 
169
177
  it("Tag – renders the correct HTML tag", () => {