@awes-io/ui 2.78.0 → 2.79.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.79.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.78.0...@awes-io/ui@2.79.0) (2023-11-03)
7
+
8
+
9
+ ### Features
10
+
11
+ * add modifiers for button nav ([80c10dc](https://github.com/awes-io/client/commit/80c10dc39254387a82069b117cf71ce2c5134618))
12
+ * change logic for create page in pagination ([428c07c](https://github.com/awes-io/client/commit/428c07c3a79d741d7e28fe368361d60162195a41))
13
+
14
+
15
+
16
+
17
+
6
18
  # [2.78.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.77.0...@awes-io/ui@2.78.0) (2023-11-02)
7
19
 
8
20
 
@@ -128,6 +128,16 @@
128
128
  }
129
129
  }
130
130
 
131
+ &--without-min-with {
132
+ .aw-button-nav__toggler {
133
+ & > span {
134
+ padding-left: 1rem;
135
+ padding-right: 1rem;
136
+ min-width: 0;
137
+ }
138
+ }
139
+ }
140
+
131
141
  &__arrow-btn.aw-button.theme-ghost {
132
142
  align-items: center;
133
143
 
@@ -159,6 +169,7 @@
159
169
 
160
170
  & > span {
161
171
  height: 2.375rem;
172
+ border-radius: 0.5625rem;
162
173
  min-width: 0;
163
174
  width: 2.6rem;
164
175
 
@@ -320,6 +320,10 @@
320
320
  @apply bg-mono-900;
321
321
 
322
322
  pointer-events: none;
323
+
324
+ .aw-text-field__prefix {
325
+ @apply bg-mono-900;
326
+ }
323
327
  }
324
328
 
325
329
  .aw-button.theme-icon {
@@ -1,7 +1,18 @@
1
1
  <template>
2
2
  <AwSlider
3
3
  ref="slider"
4
- :class="[_cssClasses.base, _cssClasses.wrapper]"
4
+ :class="[
5
+ _cssClasses.base,
6
+ _cssClasses.wrapper,
7
+ {
8
+ [`${_cssClasses.base}--without-min-with`]: modifiers.includes(
9
+ 'without-min-with'
10
+ ),
11
+ [`${_cssClasses.base}--fullwidth`]: modifiers.includes(
12
+ 'fullwidth'
13
+ )
14
+ }
15
+ ]"
5
16
  @resized="scrollToActive(false)"
6
17
  >
7
18
  <template
@@ -27,7 +38,7 @@
27
38
  <AwIcon
28
39
  v-if="item.icon"
29
40
  v-bind="_toIconProps(item.icon)"
30
- :class="{ 'mr-1': !item.hideText }"
41
+ :class="{ 'mr-1': !item.hideText && text }"
31
42
  />
32
43
  <span v-if="item.hideText" class="sr-only">
33
44
  {{ text }}
@@ -131,6 +142,11 @@ export default {
131
142
  validator(val) {
132
143
  return Array.isArray(val) ? !val.every(isNaN) : !isNaN(val)
133
144
  }
145
+ },
146
+
147
+ modifiers: {
148
+ type: [Array, String],
149
+ default: ''
134
150
  }
135
151
  },
136
152
 
@@ -25,7 +25,9 @@ export default {
25
25
  text: {
26
26
  type: String,
27
27
  default: ''
28
- }
28
+ },
29
+
30
+ hideText: Boolean
29
31
  },
30
32
 
31
33
  render(h) {
@@ -77,10 +79,10 @@ export default {
77
79
  props: {
78
80
  theme: 'ghost',
79
81
  color: 'default',
80
- text: this.text
82
+ text: this.hideText ? '' : this.text
81
83
  },
82
84
  staticClass: this.buttonClass,
83
- class: { 'aw-context-menu--text': this.text },
85
+ class: { 'aw-context-menu--text': this.text && !this.hideText },
84
86
  attrs: {
85
87
  'data-arrow-focus': ''
86
88
  },
@@ -188,15 +188,15 @@ export default {
188
188
  const current = this.page
189
189
  const last = this.pagesTotal
190
190
 
191
- if (current < 6) {
192
- return [...range(1, 7), null, last]
193
- } else if (last - current < 5) {
194
- return [1, null, ...range(last - 5, last + 1)]
191
+ if (current < 5) {
192
+ return [...range(1, 6), null, ...range(last - 2, last + 1)]
193
+ } else if (last - current < 4) {
194
+ return [...range(1, 4), null, ...range(last - 4, last + 1)]
195
195
  } else {
196
196
  return [
197
197
  1,
198
198
  null,
199
- ...range(current - 2, current + 2),
199
+ ...range(current - 2, current + 3),
200
200
  null,
201
201
  last
202
202
  ]
@@ -6,6 +6,7 @@
6
6
  class="aw-page-menu-buttons__aw-context-menu"
7
7
  :options="$options.dropdownOptions"
8
8
  :text="$t('More')"
9
+ :hide-text="hideContextMenuText"
9
10
  >
10
11
  <AwDropdownButton
11
12
  v-for="({ listeners, tooltip, iconSize, ...attrs },
@@ -87,7 +88,9 @@ export default {
87
88
  expandOffset: {
88
89
  type: Number,
89
90
  default: 150 // px
90
- }
91
+ },
92
+
93
+ hideContextMenuText: Boolean
91
94
  },
92
95
 
93
96
  data() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awes-io/ui",
3
- "version": "2.78.0",
3
+ "version": "2.79.0",
4
4
  "description": "User Interface (UI) components",
5
5
  "keywords": [
6
6
  "ui",
@@ -113,5 +113,5 @@
113
113
  "rollup-plugin-visualizer": "^2.6.0",
114
114
  "rollup-plugin-vue": "^5.0.1"
115
115
  },
116
- "gitHead": "9c3291403739bbdddd26c63898cc196525a7cb2e"
116
+ "gitHead": "acc0cf881db35c97a082498b3ad12f686412904f"
117
117
  }