@pocketprep/ui-kit 3.5.6 → 3.5.7
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/@pocketprep/ui-kit.css +1 -1
- package/dist/@pocketprep/ui-kit.js +3148 -3067
- package/dist/@pocketprep/ui-kit.js.map +1 -1
- package/dist/@pocketprep/ui-kit.umd.cjs +7 -7
- package/dist/@pocketprep/ui-kit.umd.cjs.map +1 -1
- package/lib/components/Calendar/Calendar.vue +12 -0
- package/lib/components/Forms/Input.vue +20 -0
- package/lib/components/Forms/Select.vue +9 -2
- package/lib/components/Icons/Icon.vue +3 -0
- package/lib/components/Icons/IconQuickActions.vue +28 -0
- package/lib/components/Icons/icon.d.ts +2 -1
- package/lib/components/Tags/Tag.vue +40 -0
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
ref="calendarInput"
|
|
7
7
|
v-model="dateString"
|
|
8
8
|
:label="label"
|
|
9
|
+
:labelSubtext="labelSubtext"
|
|
9
10
|
class="uikit-calendar__input"
|
|
10
11
|
:placeholder="placeholder"
|
|
11
12
|
:is-dark-mode="isDarkMode"
|
|
@@ -25,6 +26,7 @@
|
|
|
25
26
|
class="uikit-calendar__clear-date-icon"
|
|
26
27
|
:class="{
|
|
27
28
|
'uikit-calendar__clear-date-icon--no-label': !label,
|
|
29
|
+
'uikit-calendar__clear-date-icon--with-subtext': !!labelSubtext
|
|
28
30
|
}"
|
|
29
31
|
@click.stop.prevent="clearCalendar"
|
|
30
32
|
>
|
|
@@ -43,6 +45,7 @@
|
|
|
43
45
|
:class="{
|
|
44
46
|
'uikit-calendar__calendar-icon--active': !disabled && (hover || isShowingCalendar),
|
|
45
47
|
'uikit-calendar__calendar-icon--no-label': !label,
|
|
48
|
+
'uikit-calendar__calendar-icon--with-subtext': !!labelSubtext
|
|
46
49
|
}"
|
|
47
50
|
>
|
|
48
51
|
<Icon type="calendarPicker" />
|
|
@@ -79,6 +82,7 @@ import type { ComponentPublicInstance } from 'vue'
|
|
|
79
82
|
})
|
|
80
83
|
export default class Calendar extends Vue {
|
|
81
84
|
@Prop() label!: string
|
|
85
|
+
@Prop() labelSubtext?: string
|
|
82
86
|
@Prop({ default: '' }) placeholder!: string
|
|
83
87
|
@Prop() modelValue!: Date | null
|
|
84
88
|
@Prop({ default: false }) isDarkMode!: boolean
|
|
@@ -215,6 +219,10 @@ export default class Calendar extends Vue {
|
|
|
215
219
|
color: $pewter;
|
|
216
220
|
}
|
|
217
221
|
|
|
222
|
+
&--with-subtext {
|
|
223
|
+
top: 48px;
|
|
224
|
+
}
|
|
225
|
+
|
|
218
226
|
&:hover {
|
|
219
227
|
color: $brand-blue;
|
|
220
228
|
|
|
@@ -262,6 +270,10 @@ export default class Calendar extends Vue {
|
|
|
262
270
|
}
|
|
263
271
|
}
|
|
264
272
|
|
|
273
|
+
&--with-subtext {
|
|
274
|
+
top: 48px;
|
|
275
|
+
}
|
|
276
|
+
|
|
265
277
|
svg {
|
|
266
278
|
width: 100%;
|
|
267
279
|
height: 100%;
|
|
@@ -14,8 +14,15 @@
|
|
|
14
14
|
'uikit-input__label--focus': focus || forceFocusStyle,
|
|
15
15
|
'uikit-input__label--error': error,
|
|
16
16
|
'uikit-input__input--hide-caret': hideInputCaret,
|
|
17
|
+
'uikit-input__label--with-subtext': !!labelSubtext,
|
|
17
18
|
}"
|
|
18
19
|
>{{ label }}</label>
|
|
20
|
+
<div
|
|
21
|
+
v-if="labelSubtext"
|
|
22
|
+
class="uikit-input__label-subtext"
|
|
23
|
+
>
|
|
24
|
+
{{ labelSubtext }}
|
|
25
|
+
</div>
|
|
19
26
|
<div
|
|
20
27
|
v-if="fieldType === 'password'"
|
|
21
28
|
class="uikit-input__password-container"
|
|
@@ -104,6 +111,7 @@ import { dark } from '../../directives'
|
|
|
104
111
|
})
|
|
105
112
|
export default class Input extends Vue {
|
|
106
113
|
@Prop() label?: string
|
|
114
|
+
@Prop() labelSubtext?: string
|
|
107
115
|
@Prop({ default: 'text' }) fieldType?: string
|
|
108
116
|
@Prop({ default: '' }) placeholder?: string
|
|
109
117
|
@Prop({ default: '524288' }) maxlength?: string // that's the default input field length
|
|
@@ -253,6 +261,18 @@ export default class Input extends Vue {
|
|
|
253
261
|
&--hide-caret {
|
|
254
262
|
caret-color: transparent;
|
|
255
263
|
}
|
|
264
|
+
|
|
265
|
+
&--with-subtext {
|
|
266
|
+
margin-bottom: 1px;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
&__label-subtext {
|
|
271
|
+
font-weight: 500;
|
|
272
|
+
font-size: 13px;
|
|
273
|
+
line-height: 18px;
|
|
274
|
+
color: $ash;
|
|
275
|
+
margin: 0 0 4px 12px;
|
|
256
276
|
}
|
|
257
277
|
|
|
258
278
|
&__password-container {
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
:class="{
|
|
98
98
|
'uikit-select__arrow--hover': hover,
|
|
99
99
|
'uikit-select__arrow--focus': focus,
|
|
100
|
-
'uikit-select__arrow--show-dropdown': showDropdown,
|
|
100
|
+
'uikit-select__arrow--show-dropdown': showDropdown && !disabled,
|
|
101
101
|
}"
|
|
102
102
|
@mousedown.prevent
|
|
103
103
|
@click="showDropdown = !showDropdown"
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
@mousedown.prevent
|
|
132
132
|
>
|
|
133
133
|
<slot name="dropdownListItem" :item="item">
|
|
134
|
-
{{ item.label }}
|
|
134
|
+
{{ item.label || emptyOptionLabel }}
|
|
135
135
|
<div
|
|
136
136
|
v-if="item.subtext"
|
|
137
137
|
v-dark="isDarkMode"
|
|
@@ -398,6 +398,7 @@ export default class Select extends Vue {
|
|
|
398
398
|
this.searchText = ''
|
|
399
399
|
} else {
|
|
400
400
|
this.showDropdown = false
|
|
401
|
+
this.emitClose()
|
|
401
402
|
}
|
|
402
403
|
}
|
|
403
404
|
|
|
@@ -444,6 +445,11 @@ export default class Select extends Vue {
|
|
|
444
445
|
emitOpenDropdown (open: boolean) {
|
|
445
446
|
return open
|
|
446
447
|
}
|
|
448
|
+
|
|
449
|
+
@Emit('close')
|
|
450
|
+
emitClose () {
|
|
451
|
+
return true
|
|
452
|
+
}
|
|
447
453
|
}
|
|
448
454
|
</script>
|
|
449
455
|
|
|
@@ -691,6 +697,7 @@ export default class Select extends Vue {
|
|
|
691
697
|
padding: 5px 11px;
|
|
692
698
|
font-size: 15px;
|
|
693
699
|
line-height: 20px;
|
|
700
|
+
height: 20px;
|
|
694
701
|
cursor: default;
|
|
695
702
|
user-select: none;
|
|
696
703
|
|
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
<IconPresent v-else-if="type === 'present'" :title="title" />
|
|
76
76
|
<IconLink v-else-if="type === 'link'" :title="title" />
|
|
77
77
|
<IconAssignment v-else-if="type === 'assignment'" :title="title" />
|
|
78
|
+
<IconQuickActions v-else-if="type === 'quickActions'" :title="title" />
|
|
78
79
|
</template>
|
|
79
80
|
|
|
80
81
|
<script lang="ts">
|
|
@@ -148,6 +149,7 @@ import IconTimer from './IconTimer.vue'
|
|
|
148
149
|
import IconPresent from './IconPresent.vue'
|
|
149
150
|
import IconLink from './IconLink.vue'
|
|
150
151
|
import IconAssignment from './IconAssignment.vue'
|
|
152
|
+
import IconQuickActions from './IconQuickActions.vue'
|
|
151
153
|
|
|
152
154
|
@Component({
|
|
153
155
|
name: 'Icon',
|
|
@@ -220,6 +222,7 @@ import IconAssignment from './IconAssignment.vue'
|
|
|
220
222
|
IconPresent,
|
|
221
223
|
IconLink,
|
|
222
224
|
IconAssignment,
|
|
225
|
+
IconQuickActions,
|
|
223
226
|
},
|
|
224
227
|
})
|
|
225
228
|
export default class Icon extends Vue {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
|
|
3
|
+
const { title } = defineProps<{
|
|
4
|
+
title: string
|
|
5
|
+
}>()
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<svg width="24"
|
|
10
|
+
height="24"
|
|
11
|
+
viewBox="0 0 24 24"
|
|
12
|
+
fill="none"
|
|
13
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
14
|
+
<title>{{ title }}</title>
|
|
15
|
+
<circle cx="5"
|
|
16
|
+
cy="12"
|
|
17
|
+
r="2"
|
|
18
|
+
fill="currentColor" />
|
|
19
|
+
<circle cx="12"
|
|
20
|
+
cy="12"
|
|
21
|
+
r="2"
|
|
22
|
+
fill="currentColor" />
|
|
23
|
+
<circle cx="19"
|
|
24
|
+
cy="12"
|
|
25
|
+
r="2"
|
|
26
|
+
fill="currentColor" />
|
|
27
|
+
</svg>
|
|
28
|
+
</template>
|
|
@@ -5,11 +5,16 @@
|
|
|
5
5
|
:class="{
|
|
6
6
|
'uikit-tag--small': size === 'small',
|
|
7
7
|
'uikit-tag--medium': size === 'medium',
|
|
8
|
+
'uikit-tag--large': size === 'large',
|
|
8
9
|
'uikit-tag--beta': isBetaTag,
|
|
9
10
|
'uikit-tag--learning': isLearningTag,
|
|
10
11
|
'uikit-tag--active': isActiveTag,
|
|
11
12
|
'uikit-tag--pending': isPendingTag,
|
|
12
13
|
'uikit-tag--archived': isArchivedTag,
|
|
14
|
+
'uikit-tag--draft': isDraftTag,
|
|
15
|
+
'uikit-tag--available': isAvailableTag,
|
|
16
|
+
'uikit-tag--upcoming': isUpcomingTag,
|
|
17
|
+
'uikit-tag--closed': isClosedTag,
|
|
13
18
|
}"
|
|
14
19
|
:style="tagStyles"
|
|
15
20
|
>
|
|
@@ -38,6 +43,10 @@ export default class Tag extends Vue {
|
|
|
38
43
|
@Prop({ default: false }) isActiveTag!: boolean
|
|
39
44
|
@Prop({ default: false }) isPendingTag!: boolean
|
|
40
45
|
@Prop({ default: false }) isArchivedTag!: boolean
|
|
46
|
+
@Prop({ default: false }) isDraftTag!: boolean
|
|
47
|
+
@Prop({ default: false }) isAvailableTag!: boolean
|
|
48
|
+
@Prop({ default: false }) isUpcomingTag!: boolean
|
|
49
|
+
@Prop({ default: false }) isClosedTag!: boolean
|
|
41
50
|
@Prop({ default: 'large' }) size!: 'small' | 'medium' | 'large'
|
|
42
51
|
@Prop({ default: false }) isDarkMode!: boolean
|
|
43
52
|
@Prop({ default: undefined }) backgroundColor!: string | undefined
|
|
@@ -89,6 +98,13 @@ export default class Tag extends Vue {
|
|
|
89
98
|
border: 1px solid $banana-bread;
|
|
90
99
|
}
|
|
91
100
|
|
|
101
|
+
&--large {
|
|
102
|
+
font-size: 14px;
|
|
103
|
+
height: 20px;
|
|
104
|
+
line-height: 19px;
|
|
105
|
+
padding: 0 3px;
|
|
106
|
+
}
|
|
107
|
+
|
|
92
108
|
&--medium {
|
|
93
109
|
font-size: 12px;
|
|
94
110
|
height: 17px;
|
|
@@ -147,5 +163,29 @@ export default class Tag extends Vue {
|
|
|
147
163
|
background: rgba($pewter, 0.30);
|
|
148
164
|
}
|
|
149
165
|
}
|
|
166
|
+
|
|
167
|
+
&--draft {
|
|
168
|
+
border: none;
|
|
169
|
+
background: $buttermilk;
|
|
170
|
+
color: $brand-black;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
&--available {
|
|
174
|
+
border: none;
|
|
175
|
+
background: $spectral-green;
|
|
176
|
+
color: $white;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
&--closed {
|
|
180
|
+
border: 1px solid rgba($pewter, 0.3);
|
|
181
|
+
background: none;
|
|
182
|
+
color: $brand-black;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
&--upcoming {
|
|
186
|
+
border: none;
|
|
187
|
+
background: rgba($spectral-green, 0.2);
|
|
188
|
+
color: $brand-black;
|
|
189
|
+
}
|
|
150
190
|
}
|
|
151
191
|
</style>
|