@redseed/redseed-ui-vue3 1.9.2 → 2.0.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.
Files changed (65) hide show
  1. package/index.js +20 -111
  2. package/package.json +5 -5
  3. package/src/components/Badge/index.js +7 -0
  4. package/src/components/Button/ButtonDanger.vue +6 -12
  5. package/src/components/Button/ButtonDangerFull.vue +1 -7
  6. package/src/components/Button/ButtonDangerFullRounded.vue +1 -7
  7. package/src/components/Button/ButtonDangerRounded.vue +1 -7
  8. package/src/components/Button/ButtonPrimary.vue +6 -12
  9. package/src/components/Button/ButtonPrimaryFull.vue +1 -8
  10. package/src/components/Button/ButtonPrimaryFullRounded.vue +1 -8
  11. package/src/components/Button/ButtonPrimaryRounded.vue +1 -8
  12. package/src/components/Button/ButtonSecondary.vue +6 -12
  13. package/src/components/Button/ButtonSecondaryFull.vue +1 -8
  14. package/src/components/Button/ButtonSecondaryFullRounded.vue +1 -8
  15. package/src/components/Button/ButtonSecondaryRounded.vue +1 -8
  16. package/src/components/Button/ButtonSlot.vue +39 -98
  17. package/src/components/Button/ButtonTertiary.vue +6 -12
  18. package/src/components/Button/ButtonTertiaryFull.vue +1 -7
  19. package/src/components/Button/ButtonTertiaryFullRounded.vue +1 -7
  20. package/src/components/Button/ButtonTertiaryRounded.vue +1 -7
  21. package/src/components/Button/index.js +37 -0
  22. package/src/components/ButtonGroup/ButtonGroup.vue +2 -11
  23. package/src/components/ButtonGroup/ButtonGroupItem.vue +17 -25
  24. package/src/components/ButtonGroup/index.js +7 -0
  25. package/src/components/Card/Card.vue +21 -8
  26. package/src/components/Card/CardResource.vue +26 -0
  27. package/src/components/Card/index.js +7 -0
  28. package/src/components/DropdownMenu/DropdownMenu.vue +1 -6
  29. package/src/components/DropdownMenu/DropdownOption.vue +1 -1
  30. package/src/components/DropdownMenu/index.js +7 -0
  31. package/src/components/Form/index.js +13 -0
  32. package/src/components/FormField/FormFieldCheckbox.vue +1 -1
  33. package/src/components/FormField/FormFieldSearch.vue +1 -1
  34. package/src/components/FormField/FormFieldSelect.vue +209 -0
  35. package/src/components/FormField/FormFieldSlot.vue +8 -2
  36. package/src/components/FormField/index.js +23 -0
  37. package/src/components/Image/Image16By9.vue +7 -1
  38. package/src/components/Image/Image3By1.vue +7 -1
  39. package/src/components/Image/Image9By16.vue +7 -1
  40. package/src/components/Image/ImageCircle.vue +7 -1
  41. package/src/components/Image/index.js +13 -0
  42. package/src/components/Link/LinkPrimary.vue +19 -0
  43. package/src/components/Link/LinkSlot.vue +87 -0
  44. package/src/components/Link/index.js +7 -0
  45. package/src/components/List/List.vue +70 -0
  46. package/src/components/List/ListControl.vue +217 -0
  47. package/src/components/List/ListItem.vue +192 -0
  48. package/src/components/List/index.js +9 -0
  49. package/src/components/Logo/index.js +11 -0
  50. package/src/components/MessageBox/index.js +5 -0
  51. package/src/components/MetaInfo/MetaInfo.vue +2 -2
  52. package/src/components/MetaInfo/index.js +5 -0
  53. package/src/components/Modal/index.js +5 -0
  54. package/src/components/PageHeading/index.js +5 -0
  55. package/src/components/Pagination/Pagination.vue +275 -0
  56. package/src/components/Pagination/PaginationItem.vue +60 -0
  57. package/src/components/Pagination/PaginationItemCollapsed.vue +18 -0
  58. package/src/components/Pagination/PaginationItemNext.vue +17 -0
  59. package/src/components/Pagination/PaginationItemPrevious.vue +17 -0
  60. package/src/components/Pagination/index.js +13 -0
  61. package/src/components/Progress/index.js +5 -0
  62. package/src/components/Social/index.js +7 -0
  63. package/src/components/Sorting/Sorting.vue +79 -0
  64. package/src/components/Sorting/index.js +5 -0
  65. package/src/components/TwoColumnLayout/index.js +5 -0
@@ -11,13 +11,7 @@ defineOptions({
11
11
  full
12
12
  v-bind="$attrs"
13
13
  >
14
- <template #icon v-if="$slots.icon">
15
- <slot name="icon"></slot>
16
- </template>
17
-
18
- <template #default v-if="$slots.default">
19
- <slot></slot>
20
- </template>
14
+ <slot></slot>
21
15
  </ButtonTertiary>
22
16
  </template>
23
17
  <style lang="scss" scoped>
@@ -12,13 +12,7 @@ defineOptions({
12
12
  rounded
13
13
  v-bind="$attrs"
14
14
  >
15
- <template #icon v-if="$slots.icon">
16
- <slot name="icon"></slot>
17
- </template>
18
-
19
- <template #default v-if="$slots.default">
20
- <slot></slot>
21
- </template>
15
+ <slot></slot>
22
16
  </ButtonTertiary>
23
17
  </template>
24
18
  <style lang="scss" scoped>
@@ -11,13 +11,7 @@ defineOptions({
11
11
  rounded
12
12
  v-bind="$attrs"
13
13
  >
14
- <template #icon v-if="$slots.icon">
15
- <slot name="icon"></slot>
16
- </template>
17
-
18
- <template #default v-if="$slots.default">
19
- <slot></slot>
20
- </template>
14
+ <slot></slot>
21
15
  </ButtonTertiary>
22
16
  </template>
23
17
  <style lang="scss" scoped>
@@ -0,0 +1,37 @@
1
+ import ButtonDanger from './ButtonDanger.vue'
2
+ import ButtonDangerFull from './ButtonDangerFull.vue'
3
+ import ButtonDangerFullRounded from './ButtonDangerFullRounded.vue'
4
+ import ButtonDangerRounded from './ButtonDangerRounded.vue'
5
+ import ButtonPrimary from './ButtonPrimary.vue'
6
+ import ButtonPrimaryFull from './ButtonPrimaryFull.vue'
7
+ import ButtonPrimaryFullRounded from './ButtonPrimaryFullRounded.vue'
8
+ import ButtonPrimaryRounded from './ButtonPrimaryRounded.vue'
9
+ import ButtonSecondary from './ButtonSecondary.vue'
10
+ import ButtonSecondaryFull from './ButtonSecondaryFull.vue'
11
+ import ButtonSecondaryFullRounded from './ButtonSecondaryFullRounded.vue'
12
+ import ButtonSecondaryRounded from './ButtonSecondaryRounded.vue'
13
+ import ButtonSlot from './ButtonSlot.vue'
14
+ import ButtonTertiary from './ButtonTertiary.vue'
15
+ import ButtonTertiaryFull from './ButtonTertiaryFull.vue'
16
+ import ButtonTertiaryFullRounded from './ButtonTertiaryFullRounded.vue'
17
+ import ButtonTertiaryRounded from './ButtonTertiaryRounded.vue'
18
+
19
+ export {
20
+ ButtonDanger,
21
+ ButtonDangerFull,
22
+ ButtonDangerFullRounded,
23
+ ButtonDangerRounded,
24
+ ButtonPrimary,
25
+ ButtonPrimaryFull,
26
+ ButtonPrimaryFullRounded,
27
+ ButtonPrimaryRounded,
28
+ ButtonSecondary,
29
+ ButtonSecondaryFull,
30
+ ButtonSecondaryFullRounded,
31
+ ButtonSecondaryRounded,
32
+ ButtonSlot,
33
+ ButtonTertiary,
34
+ ButtonTertiaryFull,
35
+ ButtonTertiaryFullRounded,
36
+ ButtonTertiaryRounded,
37
+ }
@@ -1,10 +1,6 @@
1
1
  <script setup>
2
2
  import { computed } from 'vue'
3
3
 
4
- defineOptions({
5
- inheritAttrs: false,
6
- })
7
-
8
4
  const props = defineProps({
9
5
  sm: {
10
6
  type: Boolean,
@@ -12,7 +8,7 @@ const props = defineProps({
12
8
  },
13
9
  })
14
10
 
15
- const buttonClass = computed(() => [
11
+ const buttonGroupClass = computed(() => [
16
12
  'rsui-button-group',
17
13
  {
18
14
  'rsui-button-group--sm' : props.sm,
@@ -21,17 +17,12 @@ const buttonClass = computed(() => [
21
17
 
22
18
  </script>
23
19
  <template>
24
- <div :class="buttonClass">
20
+ <div :class="buttonGroupClass">
25
21
  <slot></slot>
26
22
  </div>
27
23
  </template>
28
24
  <style lang="scss">
29
25
  .rsui-button-group {
30
26
  @apply whitespace-nowrap;
31
- &--sm {
32
- .rsui-button-group-item {
33
- @apply text-xs px-2.5 py-1.5;
34
- }
35
- }
36
27
  }
37
28
  </style>
@@ -26,47 +26,39 @@ const buttonClass = computed(() => [
26
26
  v-bind="$attrs"
27
27
  @click="$emit('click', $event)"
28
28
  >
29
- <span v-if="$slots.icon" class="rsui-button-group-item__icon">
30
- <slot name="icon"></slot>
31
- </span>
32
- <span v-else class="rsui-button-group-item__label">
29
+ <span class="rsui-button-group-item__label">
33
30
  <slot></slot>
34
31
  </span>
35
32
  </button>
36
33
  </template>
37
34
  <style lang="scss" scoped>
38
35
  .rsui-button-group-item {
39
- // default shape and control
40
- @apply inline-flex justify-center items-center select-none outline-none p-2 font-semibold text-sm transition first:rounded-l first:border-l last:rounded-r last:border-r;
36
+ // default control
37
+ @apply inline-flex justify-center items-center select-none outline-none p-2 font-semibold text-sm transition;
38
+ // default shape
39
+ @apply first:rounded-l-md last:rounded-r-md first:border-l border-r border-y ring-0;
41
40
  // default colors
42
- @apply bg-white border-r text-default-dark ring-tertiary border-y border-tertiary ;
41
+ @apply bg-white text-segment-content border-segment-content/30;
43
42
  // default hover state
44
- @apply hover:border-tertiary hover:bg-tertiary/10 hover:text-default-dark;
45
- // default focus state unapplied
46
- // @apply focus-visible:border-tertiary focus-visible:text-tertiary focus-visible:ring-4 focus-visible:outline-none focus-visible:ring-gray-100 focus-visible:z-10 relative;
43
+ @apply hover:bg-segment-content/10;
47
44
  // default active/pressed state
48
- @apply active:ring-0 active:bg-tertiary-dark/10 active:text-default-dark;
45
+ @apply active:ring-0 active:bg-white;
49
46
  // default disabled state
50
- @apply disabled:text-tertiary-dark/10;
51
- :deep(svg) {
52
- @apply size-5;
53
- }
54
- &__icon {
55
- @apply size-6 inline-flex justify-center items-center;
56
- :deep(svg) {
57
- @apply size-6;
58
- }
47
+ @apply disabled:text-segment-content/20 disabled:bg-white;
48
+ &--selected {
49
+ @apply bg-segment-content/10 active:bg-segment-content/10 cursor-default;
59
50
  }
60
51
  &__label {
61
- @apply gap-x-2 px-1 inline-flex;
52
+ @apply gap-x-2 px-1 inline-flex items-center;
62
53
  }
63
- &--selected {
64
- @apply bg-tertiary-dark/20 hover:bg-tertiary-dark/20 cursor-default;
54
+ // child svg icon
55
+ :deep(svg) {
56
+ @apply size-5;
65
57
  }
66
58
  }
67
59
  .rsui-button-group--sm {
68
- .rsui-button-group-item--icon {
69
- @apply p-1 ;
60
+ .rsui-button-group-item {
61
+ @apply text-xs;
70
62
  :deep(svg) {
71
63
  @apply size-4;
72
64
  }
@@ -0,0 +1,7 @@
1
+ import ButtonGroup from './ButtonGroup.vue'
2
+ import ButtonGroupItem from './ButtonGroupItem.vue'
3
+
4
+ export {
5
+ ButtonGroup,
6
+ ButtonGroupItem,
7
+ }
@@ -39,18 +39,28 @@ function clicked() {
39
39
  </div>
40
40
  <div class="rsui-card__content">
41
41
  <div v-if="$slots.title || $slots.status"
42
- class="rsui-card__content-top"
42
+ :class="[
43
+ 'rsui-card__content-top',
44
+ {
45
+ 'rsui-card__content-top--action': $slots['title-action'],
46
+ }
47
+ ]"
43
48
  >
44
49
  <div v-if="$slots.title"
45
- class="rsui-card__content-title"
50
+ class="rsui-card__title"
46
51
  >
47
52
  <slot name="title"></slot>
48
53
  </div>
49
54
  <div v-if="$slots.status"
50
- class="rsui-card__content-status"
55
+ class="rsui-card__title-status"
51
56
  >
52
57
  <slot name="status"></slot>
53
58
  </div>
59
+ <div v-if="$slots['title-action']"
60
+ class="rsui-card__title-action"
61
+ >
62
+ <slot name="title-action"></slot>
63
+ </div>
54
64
  </div>
55
65
  <slot></slot>
56
66
  <div v-if="$slots.meta"
@@ -69,7 +79,7 @@ function clicked() {
69
79
  <style lang="scss" scoped>
70
80
  .rsui-card {
71
81
  @apply flex flex-col;
72
- @apply select-none overflow-hidden transition duration-200;
82
+ @apply select-none transition duration-200;
73
83
  @apply border border-gray-100 rounded-lg bg-white shadow-full-light;
74
84
  &--hoverable {
75
85
  @apply hover:shadow-md;
@@ -78,16 +88,19 @@ function clicked() {
78
88
  @apply cursor-pointer;
79
89
  }
80
90
  &__image {
81
- // @apply aspect-video overflow-hidden;
91
+ @apply rounded-t-lg overflow-hidden;
82
92
  }
83
93
  &__content {
84
94
  @apply min-h-14 p-3 flex-1;
85
95
  &-top {
86
96
  @apply flex justify-between space-x-2 pb-2;
97
+ &--action {
98
+ @apply items-center;
99
+ }
87
100
  }
88
- &-title {
89
- @apply h-12 text-lg font-semibold leading-6 line-clamp-2;
90
- }
101
+ }
102
+ &__title {
103
+ @apply max-h-12 text-lg font-semibold leading-6 line-clamp-2;
91
104
  }
92
105
  &__meta {
93
106
  @apply grid grid-cols-1 sm:grid-cols-2 gap-x-6 gap-y-2 mt-4;
@@ -0,0 +1,26 @@
1
+ <script setup>
2
+ import Card from '../Card/Card.vue'
3
+ </script>
4
+ <template>
5
+ <Card class="rsui-card-resource"
6
+ :clickable="false"
7
+ :hoverable="false"
8
+ >
9
+ <template #title>
10
+ <slot name="card-title"></slot>
11
+ </template>
12
+ <template #title-action>
13
+ <slot name="card-action"></slot>
14
+ </template>
15
+ <div class="rsui-card-resource__content">
16
+ <slot></slot>
17
+ </div>
18
+ </Card>
19
+ </template>
20
+ <style lang="scss" scoped>
21
+ .rsui-card-resource {
22
+ &__content {
23
+ @apply mt-4;
24
+ }
25
+ }
26
+ </style>
@@ -0,0 +1,7 @@
1
+ import Card from './Card.vue'
2
+ import CardResource from './CardResource.vue'
3
+
4
+ export {
5
+ Card,
6
+ CardResource,
7
+ }
@@ -47,12 +47,7 @@ onUnmounted(() => document.removeEventListener('keydown', closeOnEscape))
47
47
  <div class="rsui-dropdown-menu">
48
48
  <slot name="trigger" :open="open">
49
49
  <ButtonTertiary @click="open">
50
- <template #icon v-if="$slots['trigger-icon']">
51
- <slot name=trigger-icon></slot>
52
- </template>
53
- <template #default v-if="$slots['trigger-label']">
54
- <slot name="trigger-label"></slot>
55
- </template>
50
+ <slot name="trigger-label"></slot>
56
51
  </ButtonTertiary>
57
52
  </slot>
58
53
 
@@ -10,7 +10,7 @@ const emit = defineEmits(['click'])
10
10
  </template>
11
11
  <style lang="scss" scoped>
12
12
  .rsui-dropdown-option {
13
- @apply cursor-pointer p-4 bg-white rounded-md text-base text-default-dark transition;
13
+ @apply cursor-pointer p-4 bg-white rounded-md text-base text-rsui-default transition;
14
14
  @apply hover:bg-gray-200;
15
15
  }
16
16
  </style>
@@ -0,0 +1,7 @@
1
+ import DropdownMenu from './DropdownMenu.vue'
2
+ import DropdownOption from './DropdownOption.vue'
3
+
4
+ export {
5
+ DropdownMenu,
6
+ DropdownOption,
7
+ }
@@ -0,0 +1,13 @@
1
+ import FormFieldsLogin from './FormFieldsLogin.vue'
2
+ import FormFieldsRegister from './FormFieldsRegister.vue'
3
+ import FormSlot from './FormSlot.vue'
4
+ import FormWrapperBuild from './FormWrapperBuild.vue'
5
+ import FormWrapperLMS from './FormWrapperLMS.vue'
6
+
7
+ export {
8
+ FormFieldsLogin,
9
+ FormFieldsRegister,
10
+ FormSlot,
11
+ FormWrapperBuild,
12
+ FormWrapperLMS,
13
+ }
@@ -67,7 +67,7 @@ const proxyChecked = computed({
67
67
  @apply w-6 h-6 shrink-0 relative bg-white;
68
68
 
69
69
  input[type="checkbox"] {
70
- @apply appearance-none absolute inset-0 rounded transition shadow-sm;
70
+ @apply appearance-none absolute inset-0 rounded-md transition shadow-sm;
71
71
  @apply w-full h-full border border-gray-300 text-transparent bg-none;
72
72
  @apply focus:border-gray-300 focus:ring focus:ring-offset-0 focus:ring-gray-300 focus:ring-opacity-50;
73
73
  @apply invalid:border-red-500 invalid:ring invalid:ring-red-500 invalid:ring-opacity-20;
@@ -40,7 +40,7 @@ defineOptions({
40
40
  @apply w-10 pointer-events-none;
41
41
  }
42
42
  &__icon {
43
- @apply w-5 h-5;
43
+ @apply size-5 text-rsui-medium;
44
44
  }
45
45
  }
46
46
  </style>
@@ -0,0 +1,209 @@
1
+ <script setup>
2
+ import { ref } from 'vue'
3
+ import { onClickOutside } from '@vueuse/core'
4
+ import FormFieldSlot from './FormFieldSlot.vue'
5
+ import { ChevronDownIcon, CheckIcon } from '@heroicons/vue/24/outline'
6
+
7
+ // Apply all attributes to the input element, not the wrapper div
8
+ defineOptions({
9
+ inheritAttrs: false,
10
+ })
11
+
12
+ const props = defineProps({
13
+ modelValue: [
14
+ String,
15
+ Number
16
+ ], //vue3 specific v-model pattern
17
+ options: {
18
+ type: Array,
19
+ default: () => []
20
+ },
21
+ })
22
+
23
+ const emit = defineEmits(['update:modelValue']) //vue3 specific v-model pattern
24
+
25
+ const formFieldSelect = ref(null)
26
+
27
+ onClickOutside(formFieldSelect, () => close())
28
+
29
+ const isOpen = ref(false)
30
+
31
+ function toggle() {
32
+ isOpen.value = !isOpen.value
33
+ }
34
+
35
+ function close() {
36
+ isOpen.value = false
37
+ }
38
+
39
+
40
+ function onClick() {
41
+ toggle()
42
+ }
43
+
44
+ function onChange(event) {
45
+ emit('update:modelValue', event.target.value)
46
+ close()
47
+ }
48
+
49
+ function choose(option) {
50
+ emit('update:modelValue', option.value)
51
+ close()
52
+ }
53
+ </script>
54
+ <template>
55
+ <FormFieldSlot
56
+ ref="formFieldSelect"
57
+ class="rsui-form-field-select"
58
+ :id="$attrs.id"
59
+ >
60
+ <template #label v-if="$slots.label">
61
+ <slot name="label"></slot>
62
+ </template>
63
+ <div :class="{
64
+ 'rsui-form-field-select__group': true,
65
+ }">
66
+ <select
67
+ v-bind="$attrs"
68
+ @click="onClick"
69
+ @change="onChange"
70
+ >
71
+ <option value="">
72
+ <slot name="default-option">
73
+ Select an option
74
+ </slot>
75
+ </option>
76
+ <option
77
+ v-for="option in options"
78
+ :key="option.value"
79
+ :value="option.value"
80
+ :selected="option.value === modelValue"
81
+ >
82
+ {{ option.label }}
83
+ </option>
84
+ </select>
85
+
86
+ <transition
87
+ enter-active-class="enter-active-class"
88
+ enter-from-class="enter-from-class"
89
+ enter-to-class="enter-to-class"
90
+ leave-active-class="leave-active-class"
91
+ leave-from-class="leave-from-class"
92
+ leave-to-class="leave-to-class"
93
+ >
94
+ <div v-show="isOpen"
95
+ :class="[
96
+ 'rsui-form-field-select__options',
97
+ { 'rsui-form-field-select__options--open': isOpen }
98
+ ]"
99
+ >
100
+ <div class="rsui-form-field-select__option rsui-form-field-select__option--disabled"
101
+ value=""
102
+ >
103
+ <slot name="default-option">
104
+ Select an option
105
+ </slot>
106
+ </div>
107
+ <div v-for="option in options"
108
+ :key="option.value"
109
+ class="rsui-form-field-select__option"
110
+ @click="choose(option)"
111
+ >
112
+ <div class="rsui-form-field-select__option-label"
113
+ :title="option.label"
114
+ >
115
+ {{ option.label }}
116
+ </div>
117
+ <div class="rsui-form-field-select__option-icon">
118
+ <CheckIcon v-if="option.value === modelValue"></CheckIcon>
119
+ </div>
120
+ </div>
121
+ </div>
122
+ </transition>
123
+ <div :class="[
124
+ 'rsui-form-field-select__icon',
125
+ { 'rsui-form-field-select__icon--open': isOpen }
126
+ ]">
127
+ <ChevronDownIcon></ChevronDownIcon>
128
+ </div>
129
+ </div>
130
+
131
+ <template #help v-if="$slots.help">
132
+ <slot name="help"></slot>
133
+ </template>
134
+
135
+ <template #error v-if="$slots.error">
136
+ <slot name="error"></slot>
137
+ </template>
138
+ </FormFieldSlot>
139
+ </template>
140
+ <style lang="scss" scoped>
141
+ .enter-active-class {
142
+ @apply transition ease-out duration-200;
143
+ }
144
+ .enter-from-class {
145
+ @apply transform opacity-0 scale-95;
146
+ }
147
+ .enter-to-class {
148
+ @apply transform opacity-100 scale-100;
149
+ }
150
+ .leave-active-class {
151
+ @apply transition ease-in duration-75;
152
+ }
153
+ .leave-from-class {
154
+ @apply transform opacity-100 scale-100;
155
+ }
156
+ .leave-to-class {
157
+ @apply transform opacity-0 scale-95;
158
+ }
159
+
160
+ .rsui-form-field-select {
161
+ @apply relative;
162
+
163
+ &__group {
164
+ @apply relative;
165
+ }
166
+
167
+ select {
168
+ @apply pr-14 truncate;
169
+ }
170
+
171
+ &__options {
172
+ @apply hidden absolute origin-top w-full z-50;
173
+ @apply bg-white p-2 mt-2 rounded-md shadow-full-light;
174
+ &--open {
175
+ @apply block;
176
+ }
177
+ }
178
+
179
+ &__option {
180
+ @apply flex flex-nowrap items-center justify-between cursor-pointer px-4 py-3 rounded-md;
181
+ @apply bg-white hover:bg-gray-200 text-rsui-default transition;
182
+ &--disabled {
183
+ @apply opacity-50 hover:bg-white cursor-auto;
184
+ }
185
+ &-label {
186
+ @apply text-base truncate;
187
+ }
188
+ &-icon {
189
+ @apply size-5;
190
+ }
191
+ svg {
192
+ @apply size-5;
193
+ }
194
+ }
195
+
196
+ &__icon {
197
+ @apply absolute top-0 right-5 bottom-0 flex items-center justify-center;
198
+ @apply text-secondary h-full w-8 pointer-events-none;
199
+ &--open {
200
+ svg {
201
+ @apply -rotate-180;
202
+ }
203
+ }
204
+ svg {
205
+ @apply size-6 transform transition-transform;
206
+ }
207
+ }
208
+ }
209
+ </style>
@@ -58,11 +58,17 @@ const formFieldSlotClass = computed(() => [
58
58
  </style>
59
59
  <style lang="scss">
60
60
  .rsui-form-field-slot {
61
- input:not([type='checkbox']):not([type='radio']) {
62
- @apply block w-full border rounded shadow-sm text-base transition py-2 px-3;
61
+ input:not([type='checkbox']):not([type='radio']), select {
62
+ @apply block w-full border rounded-md shadow-sm text-base transition py-2 px-3;
63
63
  @apply bg-white placeholder-gray-300 border-gray-300;
64
64
  @apply focus:ring focus:ring-gray-300 focus:ring-opacity-50 focus:outline-none ring-0 focus:bg-white focus:border-gray-400;
65
65
  @apply invalid:border-red-500 invalid:ring invalid:ring-red-500 invalid:ring-opacity-20;
66
66
  }
67
+ select {
68
+ @apply appearance-none rounded-full px-5 cursor-pointer;
69
+ option {
70
+ @apply hidden;
71
+ }
72
+ }
67
73
  }
68
74
  </style>
@@ -0,0 +1,23 @@
1
+ import FormFieldCheckbox from './FormFieldCheckbox.vue'
2
+ import FormFieldEmail from './FormFieldEmail.vue'
3
+ import FormFieldHidden from './FormFieldHidden.vue'
4
+ import FormFieldPassword from './FormFieldPassword.vue'
5
+ import FormFieldPasswordToggle from './FormFieldPasswordToggle.vue'
6
+ import FormFieldSearch from './FormFieldSearch.vue'
7
+ import FormFieldSelect from './FormFieldSelect.vue'
8
+ import FormFieldSlot from './FormFieldSlot.vue'
9
+ import FormFieldText from './FormFieldText.vue'
10
+ import FormFieldTextSuffix from './FormFieldTextSuffix.vue'
11
+
12
+ export {
13
+ FormFieldCheckbox,
14
+ FormFieldEmail,
15
+ FormFieldHidden,
16
+ FormFieldPassword,
17
+ FormFieldPasswordToggle,
18
+ FormFieldSearch,
19
+ FormFieldSelect,
20
+ FormFieldSlot,
21
+ FormFieldText,
22
+ FormFieldTextSuffix,
23
+ }
@@ -7,7 +7,13 @@ defineOptions({
7
7
  </script>
8
8
  <template>
9
9
  <div class="rsui-image-16/9">
10
- <Image v-bind="$attrs"></Image>
10
+ <Image v-bind="$attrs">
11
+ <template v-for="(_, name) in $slots"
12
+ v-slot:[name]="slotProps"
13
+ >
14
+ <slot :name="name" v-bind="slotProps"></slot>
15
+ </template>
16
+ </Image>
11
17
  </div>
12
18
  </template>
13
19
  <style lang="scss" scoped>
@@ -7,7 +7,13 @@ defineOptions({
7
7
  </script>
8
8
  <template>
9
9
  <div class="rsui-image-3/1">
10
- <Image v-bind="$attrs"></Image>
10
+ <Image v-bind="$attrs">
11
+ <template v-for="(_, name) in $slots"
12
+ v-slot:[name]="slotProps"
13
+ >
14
+ <slot :name="name" v-bind="slotProps"></slot>
15
+ </template>
16
+ </Image>
11
17
  </div>
12
18
  </template>
13
19
  <style lang="scss" scoped>
@@ -7,7 +7,13 @@ defineOptions({
7
7
  </script>
8
8
  <template>
9
9
  <div class="rsui-image-9/16">
10
- <Image v-bind="$attrs"></Image>
10
+ <Image v-bind="$attrs">
11
+ <template v-for="(_, name) in $slots"
12
+ v-slot:[name]="slotProps"
13
+ >
14
+ <slot :name="name" v-bind="slotProps"></slot>
15
+ </template>
16
+ </Image>
11
17
  </div>
12
18
  </template>
13
19
  <style lang="scss" scoped>