@redseed/redseed-ui-vue3 6.2.3 → 6.3.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/index.js CHANGED
@@ -32,6 +32,7 @@ export * from './src/components/MetaInfo'
32
32
  export * from './src/components/Modal'
33
33
  export * from './src/components/Pagination'
34
34
  export * from './src/components/Progress'
35
+ export * from './src/components/Section'
35
36
  export * from './src/components/Social'
36
37
  export * from './src/components/Sorting'
37
38
  export * from './src/components/Switcher'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redseed/redseed-ui-vue3",
3
- "version": "6.2.3",
3
+ "version": "6.3.1",
4
4
  "description": "RedSeed UI Vue 3 components",
5
5
  "main": "index.js",
6
6
  "repository": "https://github.com/redseedtraining/redseed-ui",
@@ -108,19 +108,19 @@ function handleMoreActionsClick() {
108
108
  .rsui-section-header {
109
109
  @apply flex flex-col gap-x-3 gap-y-5 transition-all;
110
110
  @apply md:flex-row md:justify-between md:items-center;
111
- @apply border-b border-transparent;
111
+ // @apply border-b border-transparent;
112
112
 
113
- &--divider {
114
- @apply border-rsui-grey-400 pb-5;
115
- }
113
+ // &--divider {
114
+ // @apply border-rsui-grey-400 pb-5;
115
+ // }
116
116
 
117
117
  &__header {
118
118
  @apply flex-1 flex justify-between items-start gap-x-3;
119
119
  }
120
120
 
121
121
  &__icon {
122
- @apply size-12 rounded-full overflow-hidden flex items-center justify-center bg-rsui-grey-50;
123
- @apply mt-2.5 md:mt-0;
122
+ // @apply size-12 rounded-full overflow-hidden flex items-center justify-center bg-rsui-grey-50;
123
+ @apply size-10;
124
124
  }
125
125
 
126
126
  &__text {
@@ -7,6 +7,11 @@ const props = defineProps({
7
7
  type: Boolean,
8
8
  default: false,
9
9
  },
10
+ variant: {
11
+ type: String,
12
+ default: 'default',
13
+ validator: (value) => ['default', 'info', 'success', 'warning', 'error'].includes(value)
14
+ }
10
15
  })
11
16
 
12
17
  const emit = defineEmits(['close'])
@@ -20,7 +25,10 @@ function close() {
20
25
  </script>
21
26
  <template>
22
27
  <div v-if="!isClosed"
23
- class="rsui-message-box"
28
+ :class="[
29
+ 'rsui-message-box',
30
+ `rsui-message-box--${variant}`
31
+ ]"
24
32
  >
25
33
  <div class="rsui-message-box__head">
26
34
  <div class="rsui-message-box__title">
@@ -41,7 +49,28 @@ function close() {
41
49
  </template>
42
50
  <style lang="scss" scoped>
43
51
  .rsui-message-box {
44
- @apply border border-rsui-grey-100 rounded-lg bg-white overflow-hidden shadow-full-light transition duration-200 p-4;
52
+ @apply border rounded-lg overflow-hidden p-4;
53
+
54
+ &--default {
55
+ @apply bg-message-box-background-default border-message-box-border-default text-message-box-text-default;
56
+ }
57
+
58
+ &--info {
59
+ @apply bg-message-box-background-info border-message-box-border-info text-message-box-text-info;
60
+ }
61
+
62
+ &--success {
63
+ @apply bg-message-box-background-success border-message-box-border-success text-message-box-text-success;
64
+ }
65
+
66
+ &--warning {
67
+ @apply bg-message-box-background-warning border-message-box-border-warning text-message-box-text-warning;
68
+ }
69
+
70
+ &--error {
71
+ @apply bg-message-box-background-error border-message-box-border-error text-message-box-text-error;
72
+ }
73
+
45
74
  &__head {
46
75
  @apply flex justify-between items-center;
47
76
  }
@@ -0,0 +1,56 @@
1
+ <script setup>
2
+ const props = defineProps({
3
+ variant: {
4
+ type: String,
5
+ default: 'default',
6
+ validator: (value) => ['default', 'muted', 'accent', 'success', 'warning', 'error'].includes(value)
7
+ }
8
+ })
9
+ </script>
10
+
11
+ <template>
12
+ <section
13
+ :class="[
14
+ 'rsui-section',
15
+ `rsui-section--${variant}`
16
+ ]"
17
+
18
+ >
19
+ <div v-if="$slots.header" class="rsui-section__header">
20
+ <slot name="header"></slot>
21
+ </div>
22
+ <div v-if="$slots.default" class="rsui-section__content">
23
+ <slot></slot>
24
+ </div>
25
+ </section>
26
+ </template>
27
+
28
+ <style lang="scss" scoped>
29
+ .rsui-section {
30
+ @apply border border-solid rounded-xl p-6;
31
+
32
+ &--default {
33
+ @apply bg-section-background-default border-section-border-default text-section-text-default;
34
+ }
35
+
36
+ &--muted {
37
+ @apply bg-section-background-muted border-section-border-muted text-section-text-muted;
38
+ }
39
+
40
+ &--accent {
41
+ @apply bg-section-background-accent border-section-border-accent text-section-text-accent;
42
+ }
43
+
44
+ &--success {
45
+ @apply bg-section-background-success border-section-border-success text-section-text-success;
46
+ }
47
+
48
+ &--warning {
49
+ @apply bg-section-background-warning border-section-border-warning text-section-text-warning;
50
+ }
51
+
52
+ &--error {
53
+ @apply bg-section-background-error border-section-border-error text-section-text-error;
54
+ }
55
+ }
56
+ </style>
@@ -0,0 +1,5 @@
1
+ import Section from './Section.vue'
2
+
3
+ export {
4
+ Section,
5
+ }