@dative-gpi/foundation-shared-components 0.0.26 → 0.0.27

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.
@@ -70,48 +70,45 @@ export default defineComponent({
70
70
  required: false,
71
71
  default: null
72
72
  },
73
- borderRadius: {
73
+ paddingTitle: {
74
74
  type: [String, Number],
75
75
  required: false,
76
- default: "4px"
76
+ default: "16px"
77
+ },
78
+ paddingContent: {
79
+ type: [String, Number],
80
+ required: false,
81
+ default: "16px"
77
82
  },
78
83
  divider: {
79
84
  type: Boolean,
80
85
  required: false,
81
- default: false
86
+ default: true
82
87
  },
83
88
  expandIcon: {
84
89
  type: String,
85
90
  required: false,
86
- default: "mdi-chevron-down"
91
+ default: ""
87
92
  },
88
93
  collapseIcon: {
89
94
  type: String,
90
95
  required: false,
91
- default: "mdi-chevron-up"
92
- },
93
- color: {
94
- type: String as PropType<ColorBase>,
95
- required: false,
96
- default: ColorEnum.Primary
96
+ default: ""
97
97
  }
98
98
  },
99
99
  setup(props) {
100
100
  const { getColors } = useColors();
101
101
 
102
- const colors = computed(() => getColors(props.color));
103
102
  const backgrounds = getColors(ColorEnum.Background);
104
- const darks = getColors(ColorEnum.Dark);
103
+ const lights = getColors(ColorEnum.Light);
105
104
 
106
105
  const style = computed((): {[code: string]: string} & Partial<CSSStyleDeclaration> => {
107
106
  return {
108
- "--fs-accordion-panel-border-radius" : sizeToVar(props.borderRadius),
109
- "--fs-accordion-panel-border-size" : props.divider ? "1px" : "0",
110
- "--fs-accordion-panel-border-color" : darks.base,
111
- "--fs-accordion-panel-background-color" : backgrounds.base,
112
- "--fs-accordion-panel-color" : darks.base,
113
- "--fs-accordion-panel-hover-background-color": colors.value.light,
114
- "--fs-accordion-panel-hover-color" : colors.value.base,
107
+ "--fs-accordion-panel-padding-title" : sizeToVar(props.paddingTitle),
108
+ "--fs-accordion-panel-padding-content" : sizeToVar(props.paddingContent),
109
+ "--fs-accordion-panel-divider-size" : props.divider ? "1px" : "0",
110
+ "--fs-accordion-panel-divider-color" : lights.dark,
111
+ "--fs-accordion-panel-background-color" : backgrounds.base
115
112
  };
116
113
  });
117
114
 
@@ -2,6 +2,7 @@
2
2
  <button
3
3
  v-if="!href"
4
4
  :class="wrapperClasses"
5
+ :type="$props.type"
5
6
  @click.stop="onClick"
6
7
  >
7
8
  <FSCard
@@ -69,10 +70,15 @@ export default defineComponent({
69
70
  required: false,
70
71
  default: "standard"
71
72
  },
73
+ type: {
74
+ type: String as PropType<"button" | "submit">,
75
+ required: false,
76
+ default: "submit"
77
+ },
72
78
  color: {
73
79
  type: String as PropType<ColorBase>,
74
80
  required: false,
75
- default: ColorEnum.Primary
81
+ default: ColorEnum.Light
76
82
  },
77
83
  fullWidth: {
78
84
  type: Boolean,
@@ -148,12 +148,12 @@ export default defineComponent({
148
148
  padding: {
149
149
  type: [String, Number],
150
150
  required: false,
151
- default: 0
151
+ default: "0"
152
152
  },
153
153
  gap: {
154
- type: Number,
154
+ type: [String, Number],
155
155
  required: false,
156
- default: 8
156
+ default: "8px"
157
157
  },
158
158
  multiple: {
159
159
  type: Boolean,
@@ -38,6 +38,7 @@
38
38
  </template>
39
39
  </FSTextField>
40
40
  <FSTextField
41
+ v-if="$props.allowOpacity"
41
42
  class="fs-color-field-opacity"
42
43
  :label="$tr('ui.color-field.opacity', 'Opacity')"
43
44
  :hideHeader="$props.hideHeader"
@@ -90,7 +91,7 @@
90
91
  class="fs-color-field-picker"
91
92
  mode="hexa"
92
93
  :elevation="0"
93
- :modes="['hexa', 'rgba']"
94
+ :modes="allowOpacity ? ['hexa', 'rgba'] : ['hex', 'rgb']"
94
95
  :modelValue="fullColor"
95
96
  @update:modelValue="onSubmit"
96
97
  />
@@ -153,6 +154,11 @@ export default defineComponent({
153
154
  type: Boolean,
154
155
  required: false,
155
156
  default: true
157
+ },
158
+ allowOpacity: {
159
+ type: Boolean,
160
+ required: false,
161
+ default: true
156
162
  }
157
163
  },
158
164
  emits: ["update:modelValue", "update:opacity"],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-shared-components",
3
3
  "sideEffects": false,
4
- "version": "0.0.26",
4
+ "version": "0.0.27",
5
5
  "description": "",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -10,8 +10,8 @@
10
10
  "author": "",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
- "@dative-gpi/foundation-shared-domain": "0.0.26",
14
- "@dative-gpi/foundation-shared-services": "0.0.26",
13
+ "@dative-gpi/foundation-shared-domain": "0.0.27",
14
+ "@dative-gpi/foundation-shared-services": "0.0.27",
15
15
  "@fontsource/montserrat": "^5.0.16",
16
16
  "@lexical/clipboard": "^0.12.5",
17
17
  "@lexical/history": "^0.12.5",
@@ -32,5 +32,5 @@
32
32
  "sass": "^1.69.5",
33
33
  "sass-loader": "^13.3.2"
34
34
  },
35
- "gitHead": "58a49a5422156548728d405e3c289ba4e80cbe39"
35
+ "gitHead": "b46c226b198f482eee4ca6e63ef2923522bf6e8c"
36
36
  }
@@ -1,38 +1,32 @@
1
1
  .fs-accordion-panel > .v-expansion-panel-title {
2
- border-radius: var(--fs-accordion-panel-border-radius) !important;
3
- transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
4
- min-height: 0 !important;
5
- cursor: pointer;
6
- padding: 12px;
7
-
8
2
  background-color: var(--fs-accordion-panel-background-color) !important;
9
- color: var(--fs-accordion-panel-color) !important;
3
+ padding: var(--fs-accordion-panel-padding-title);
4
+ min-height: 0 !important;
10
5
 
11
6
  &:hover,
12
7
  &--active {
13
- background-color: var(--fs-accordion-panel-hover-background-color) !important;
14
- color: var(--fs-accordion-panel-hover-color) !important;
15
- min-height: 0 !important;
8
+ background-color: var(--fs-accordion-panel-background-color) !important;
16
9
 
17
10
  & .fs-accordion-panel-title {
18
11
  @extend .text-button
19
12
  }
20
13
  }
14
+
15
+ & > .v-expansion-panel-title__overlay {
16
+ display: none !important;
17
+ }
21
18
  }
22
19
 
23
20
  .fs-accordion-panel > .v-expansion-panel-text {
24
- border-radius: var(--fs-accordion-panel-border-radius) !important;
25
- transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
26
- padding: 12px;
27
-
28
21
  background-color: var(--fs-accordion-panel-background-color) !important;
29
- color: var(--fs-accordion-panel-color) !important;
22
+ padding: 0px;
23
+
30
24
 
31
25
  & > .v-expansion-panel-text__wrapper {
32
- padding: 0;
26
+ padding: var(--fs-accordion-panel-padding-content);
33
27
  }
34
28
  }
35
29
 
36
30
  .v-expansion-panel:not(:first-child)::after {
37
- border-top: var(--fs-accordion-panel-border-size) solid var(--fs-accordion-panel-border-color) !important;
31
+ border-top: var(--fs-accordion-panel-divider-size) solid var(--fs-accordion-panel-divider-color) !important;
38
32
  }