@appscode/design-system 2.6.31 → 2.6.33

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appscode/design-system",
3
- "version": "2.6.31",
3
+ "version": "2.6.33",
4
4
  "description": "A design system for Appscode websites and dashboards made using Bulma",
5
5
  "main": "main.scss",
6
6
  "scripts": {
@@ -176,6 +176,17 @@
176
176
  }
177
177
 
178
178
  .ac-switch {
179
+ &.is-fullwidth {
180
+ background-color: $primary-light-gray;
181
+ padding: 16px;
182
+ border-radius: 4px;
183
+ display: flex;
184
+ justify-content: space-between;
185
+ border: 1px solid $color-border;
186
+ label {
187
+ color: $color-heading;
188
+ }
189
+ }
179
190
  .switch {
180
191
  position: relative;
181
192
  display: inline-block;
@@ -24,7 +24,7 @@ const props = withDefaults(defineProps<prop>(), {
24
24
  optionType: "simple",
25
25
  });
26
26
 
27
- defineEmits(["onRefreshClick"]);
27
+ const emit = defineEmits(["select", "remove", "onRefreshClick"]);
28
28
 
29
29
  const selectedValue = ref<Option>();
30
30
  const labelHoisted = ref(false);
@@ -50,6 +50,7 @@ const filteredOptions = computed(() => {
50
50
  const onLabelClick = (op: Option) => {
51
51
  selectedValue.value = op;
52
52
  isOpen.value = false;
53
+ emit("select", op);
53
54
  };
54
55
 
55
56
  // handle label click
@@ -62,6 +63,7 @@ const selectClick = () => {
62
63
  const handleClear = () => {
63
64
  selectedValue.value = undefined;
64
65
  searchText.value = "";
66
+ emit("remove");
65
67
  };
66
68
 
67
69
  // handle depend on selected data
@@ -104,7 +106,7 @@ watch(isOpen, (n) => {
104
106
 
105
107
  <ac-buttons>
106
108
  <button class="button ac-button is-white" @click="handleClear">
107
- <ArrowIcon />
109
+ <CloseIcon />
108
110
  </button>
109
111
 
110
112
  <ac-button modifier-classes="is-white" @click="$emit('onRefreshClick')">
@@ -112,7 +114,7 @@ watch(isOpen, (n) => {
112
114
  </ac-button>
113
115
 
114
116
  <ac-button modifier-classes="is-white" @click="isOpen = !isOpen">
115
- <CloseIcon :direction="isOpen ? 'down' : 'up'" />
117
+ <ArrowIcon :direction="isOpen ? 'down' : 'up'" />
116
118
  </ac-button>
117
119
  </ac-buttons>
118
120
 
@@ -18,7 +18,7 @@ const model = defineModel({ type: Boolean });
18
18
  </script>
19
19
 
20
20
  <template>
21
- <div class="ac-switch is-flex is-align-items-center gap-8">
21
+ <div class="ac-switch is-flex is-align-items-center gap-8" :class="modifierClasses">
22
22
  <label :for="name">{{ label }}</label>
23
23
  <label class="switch">
24
24
  <input
@@ -27,7 +27,6 @@ const model = defineModel({ type: Boolean });
27
27
  type="checkbox"
28
28
  :name="name"
29
29
  class="switch is-rounded is-primary"
30
- :class="modifierClasses"
31
30
  :data-testid="dataTestId"
32
31
  />
33
32
  <span class="slider round"></span>