@community-release/nx-ui 0.0.21 → 0.0.22

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/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "ui",
3
3
  "configKey": "ui",
4
- "version": "0.0.21"
4
+ "version": "0.0.22"
5
5
  }
@@ -33,17 +33,17 @@
33
33
  default: () => []
34
34
  },
35
35
  /**
36
- * Slide that is active(open) by default, null = all closed
37
- * @values 1, 2, 3, 1000, null
36
+ * Slide that is open by default, -1 = all closed
37
+ * @values -1, 1, 2, 3, 1000
38
38
  */
39
- active: {
40
- type: [Number, null],
41
- default: null
42
- }
39
+ open: {
40
+ type: Number,
41
+ default: -1
42
+ },
43
43
  });
44
44
 
45
- const activeItem = ref(props.active);
46
- const itemCounter = ref(0);
45
+ const open = ref(props.open);
46
+ const counter = ref(0);
47
47
 
48
48
  const iconLightComputed = computed(() => {
49
49
  return props.icon !== '' ? `url(${props.icon})` : 'none';
@@ -54,8 +54,8 @@
54
54
  });
55
55
 
56
56
  provide('accordionData', {
57
- itemCounter,
58
- activeItem,
57
+ counter,
58
+ open,
59
59
  haveIcon: !!props.icon
60
60
  });
61
61
  </script>
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <section class="component-ui-accordion-item"
3
- :class="{'tag-active': accordionData.activeItem.value === id, 'tag-icon': accordionData.haveIcon}"
3
+ :class="{'tag-active': accordionData.open.value === id, 'tag-icon': accordionData.haveIcon}"
4
4
  >
5
- <div class="header" @click="accordionData.activeItem.value = accordionData.activeItem.value === id ? null : id">
5
+ <div class="header" @click="accordionData.open.value = accordionData.open.value === id ? -1 : id">
6
6
  <i class="icon"></i>
7
7
  <div class="title">{{ title }}</div>
8
8
  <div class="btn-toggle"></div>
@@ -18,12 +18,12 @@
18
18
  import { inject } from 'vue'
19
19
 
20
20
  // Data
21
- const accordionData = inject('accordionData', null);
21
+ const accordionData = inject('accordionData');
22
22
  const props = defineProps({
23
23
  title: String,
24
24
  text: String,
25
25
  });
26
- const id = accordionData.itemCounter.value++;
26
+ const id = accordionData.counter.value++;
27
27
  </script>
28
28
 
29
29
  <style lang="less">
@@ -162,12 +162,6 @@
162
162
  }
163
163
 
164
164
  &.tag-icon {
165
- // .header {
166
- // position: relative;
167
- // padding: @com-space-small var(--ui-accordion-btn-padding) @com-space-small calc(var(--ui-accordion-icon-size) + @com-space-default);
168
- // margin-bottom: @com-space-mini;
169
- // cursor: pointer;
170
- // }
171
165
  --ui-accordion-icon-size: @com-icon-size;
172
166
  }
173
167
  }
@@ -177,7 +171,6 @@
177
171
  &.tag-icon {
178
172
  --ui-accordion-icon-size: @com-icon-size-small;
179
173
  }
180
- //--ui-accordion-icon-size: @com-icon-size-small;
181
174
  --ui-accordion-btn-padding: @com-btn-padding-small;
182
175
 
183
176
  font-size: @com-text-default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@community-release/nx-ui",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "description": "nx-ui - Nuxt UI library",
5
5
  "repository": {
6
6
  "type": "git",