webcake-ui-kit 1.2.7 → 1.2.8

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": "webcake-ui-kit",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "description": "UI Kit for Vue 2 && 3 - Pure Options API",
5
5
  "main": "src/index.js",
6
6
  "module": "src/index.js",
@@ -39,6 +39,7 @@
39
39
  "./WkInput": "./src/components/input/Input.vue",
40
40
  "./WkInputCounter": "./src/components/input-counter/InputCounter.vue",
41
41
  "./WkInputNumber": "./src/components/input-number/InputNumber.vue",
42
+ "./WkItem": "./src/components/item/Item.vue",
42
43
  "./WkMenu": "./src/components/menu/Menu.vue",
43
44
  "./WkMenuItem": "./src/components/menuitem/MenuItem.vue",
44
45
  "./WkPagination": "./src/components/pagination/Pagination.vue",
@@ -0,0 +1,74 @@
1
+ <template>
2
+ <div
3
+ class="ui-item"
4
+ :class="[
5
+ `ui-item--variant-${variant}`,
6
+ asChild && `ui-item--as-child`,
7
+ active && 'ui-item--active',
8
+ `ui-item--size-${size}`,
9
+ `ui-item--layout-${layout}`
10
+ ]"
11
+ :style="{ width: typeof width == 'string' ? width : `${width}px` }"
12
+ >
13
+ <div class="ui-item--prefix">
14
+ <slot name="prefix"></slot>
15
+ </div>
16
+ <slot>
17
+ <div class="ui-item-label-wrapper">
18
+ <div class="ui-item--label wk-paragraph-small wk-weight-medium">
19
+ {{ label }}
20
+ </div>
21
+ <div v-if="description && layout == 'vertical'" class="ui-item--description wk-paragraph-mini">
22
+ {{ description }}
23
+ </div>
24
+ </div>
25
+ </slot>
26
+ <div class="ui-item--suffix">
27
+ <slot name="suffix"></slot>
28
+ </div>
29
+ </div>
30
+ </template>
31
+
32
+ <script>
33
+ export default {
34
+ name: 'WkItem',
35
+ props: {
36
+ label: String,
37
+ variant: {
38
+ type: String,
39
+ validator: v => ['default', 'muted', 'outline'].includes(v),
40
+ default: 'default'
41
+ },
42
+ asChild: Boolean,
43
+ active: Boolean,
44
+ size: {
45
+ type: String,
46
+ validator: v => ['md', 'sm'].includes(v),
47
+ default: 'md'
48
+ },
49
+ layout: {
50
+ type: String,
51
+ validator: v => ['horizontal', 'vertical'].includes(v),
52
+ default: 'horizontal'
53
+ },
54
+ description: String,
55
+ width: {
56
+ type: [String, Number]
57
+ }
58
+ },
59
+ emits: [],
60
+ data() {
61
+ return {
62
+ // Add component state
63
+ }
64
+ },
65
+ computed: {
66
+ // Add computed properties
67
+ },
68
+ methods: {
69
+ // Add methods
70
+ }
71
+ }
72
+ </script>
73
+
74
+ <style src="./item.css" scoped></style>
@@ -0,0 +1,54 @@
1
+ .ui-item {
2
+ display: flex;
3
+ align-items: center;
4
+ justify-content: space-between;
5
+ gap: var(--spacing-md);
6
+ padding: var(--spacing-md);
7
+ border: 1px solid transparent;
8
+ border-radius: var(--rounded-xl);
9
+ overflow: hidden;
10
+ min-height: 52px;
11
+ cursor: pointer;
12
+ }
13
+ .ui-item.ui-item--as-child.ui-item--variant-outline {
14
+ border: 1px solid var(--border-primary);
15
+ background: #ffffff;
16
+ }
17
+ .ui-item.ui-item--as-child.ui-item--variant-muted {
18
+ background: var(--muted-bg);
19
+ }
20
+ .ui-item.ui-item--as-child:hover,
21
+ .ui-item.ui-item--as-child.ui-item--variant-outline:hover {
22
+ background: var(--primary-hover);
23
+ }
24
+
25
+ .ui-item.ui-item--as-child.ui-item--active {
26
+ border: 1px solid var(--border-brand);
27
+ }
28
+ .ui-item.ui-item--size-sm {
29
+ min-height: 44px;
30
+ }
31
+
32
+ .ui-item.ui-item--layout-vertical {
33
+ flex-direction: column;
34
+ align-items: flex-start;
35
+ gap: var(--spacing-xs);
36
+ padding: var(--spacing-sm) var(--spacing-md);
37
+ }
38
+
39
+ .ui-item-label-wrapper {
40
+ display: flex;
41
+ flex-direction: column;
42
+ gap: var(--spacing-2xs);
43
+ }
44
+
45
+ .ui-item--label {
46
+ color: var(--primary-fg);
47
+ }
48
+ .ui-item--description {
49
+ color: var(--muted-fg);
50
+ }
51
+
52
+ .ui-item--prefix,
53
+ .ui-item--suffix {
54
+ }
package/src/index.js CHANGED
@@ -20,6 +20,7 @@ export { default as WkField } from './components/field/Field.vue'
20
20
  export { default as WkHoverCard } from './components/hover-card/HoverCard.vue'
21
21
  export { default as WkInput } from './components/input/Input.vue'
22
22
  export { default as WkInputCounter } from './components/input-counter/InputCounter.vue'
23
+ export { default as WkItem } from './components/item/Item.vue'
23
24
  export { default as WkInputNumber } from './components/input-number/InputNumber.vue'
24
25
  export { default as WkMenu } from './components/menu/Menu.vue'
25
26
  export { default as WkMenuItem } from './components/menuitem/MenuItem.vue'