design-system-next 2.17.8 → 2.19.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.
@@ -32,54 +32,86 @@ export const useLozenge = (props: LozengePropTypes) => {
32
32
  'spr-border': !fill.value,
33
33
  'spr-cursor-pointer': isInteractive.value,
34
34
  // #region - Styles for hollow lozenge
35
+
35
36
  // Pending
36
- 'spr-text-mango-800 spr-background-color-pending-weak spr-border-mango-800': tone.value === 'pending' && !fill.value,
37
- 'hover:spr-bg-[#FFF89E] active:spr-bg-[#FFF56B]': tone.value === 'pending' && !fill.value && isInteractive.value,
37
+ 'spr-text-color-pending-base spr-background-color-pending-weak spr-border-color-pending-base':
38
+ tone.value === 'pending' && !fill.value,
39
+ 'hover:spr-background-color-pending-weak-hover active:spr-background-color-pending-weak-pressed':
40
+ tone.value === 'pending' && !fill.value && isInteractive.value,
41
+
38
42
  // Information
39
- 'spr-text-blueberry-800 spr-background-color-information-weak spr-border-blueberry-800': tone.value === 'information' && !fill.value,
40
- 'hover:spr-bg-[#ADD6FF] active:spr-bg-[#7ABDFF]': tone.value === 'information' && !fill.value && isInteractive.value,
43
+ 'spr-text-color-information-base spr-background-color-information-weak spr-border-color-information-base':
44
+ tone.value === 'information' && !fill.value,
45
+ 'hover:spr-background-color-information-weak-hover active:spr-background-color-information-weak-pressed':
46
+ tone.value === 'information' && !fill.value && isInteractive.value,
47
+
41
48
  // Success
42
- 'spr-text-kangkong-800 spr-background-color-success-weak spr-border-kangkong-800': tone.value === 'success' && !fill.value,
43
- 'hover:spr-bg-[#AFF8C6] active:spr-bg-[#80F4A4]': tone.value === 'success' && !fill.value && isInteractive.value,
49
+ 'spr-text-color-success-base spr-background-color-success-weak spr-border-color-success-base':
50
+ tone.value === 'success' && !fill.value,
51
+ 'hover:spr-background-color-success-weak-hover active:spr-background-color-success-weak-pressed':
52
+ tone.value === 'success' && !fill.value && isInteractive.value,
53
+
44
54
  // Neutral
45
- 'spr-text-mushroom-800 spr-background-color-base spr-border-mushroom-800': tone.value === 'neutral' && !fill.value,
46
- 'hover:spr-bg-[#D3D9D9] active:spr-bg-[#B8C1C1]': tone.value === 'neutral' && !fill.value && isInteractive.value,
55
+ 'spr-text-color-base spr-background-color-surface-adaptive spr-border-color-base':
56
+ tone.value === 'neutral' && !fill.value,
57
+
47
58
  // Danger
48
- 'spr-text-tomato-800 spr-background-color-danger-weak spr-border-tomato-800': tone.value === 'danger' && !fill.value,
49
- 'hover:spr-bg-[#FCB0B3] active:spr-bg-[#FB7F83]': tone.value === 'danger' && !fill.value && isInteractive.value,
59
+ 'spr-text-color-danger-base spr-background-color-danger-weak spr-border-color-danger-base':
60
+ tone.value === 'danger' && !fill.value,
61
+ 'hover:spr-background-color-danger-weak-hover active:spr-background-color-danger-weak-pressed':
62
+ tone.value === 'danger' && !fill.value && isInteractive.value,
63
+
50
64
  // Caution
51
- 'spr-text-carrot-800 spr-background-color-caution-weak spr-border-carrot-800': tone.value === 'caution' && !fill.value,
52
- 'hover:spr-bg-[#FFE79E] active:spr-bg-[#FFDA6B]': tone.value === 'caution' && !fill.value && isInteractive.value,
65
+ 'spr-text-color-caution-base spr-background-color-caution-weak spr-border-color-caution-base':
66
+ tone.value === 'caution' && !fill.value,
67
+ 'hover:spr-background-color-caution-weak-hover active:spr-background-color-caution-weak-pressed':
68
+ tone.value === 'caution' && !fill.value && isInteractive.value,
69
+
53
70
  // Plain
54
71
  'spr-text-color-strong spr-border-color-base spr-background-color': tone.value === 'plain' && !fill.value,
55
- 'hover:spr-bg-[#E6E6E6] active:spr-bg-[#CCCCCC]': tone.value === 'plain' && !fill.value && isInteractive.value,
72
+
73
+ // Shared hover/active for neutral and plain
74
+ 'hover:spr-background-color-hover active:spr-background-color-pressed':
75
+ (tone.value === 'neutral' || tone.value === 'plain') && !fill.value && isInteractive.value,
76
+
56
77
  // #endregion - Styles for hollow (!fill) lozenge
57
78
 
58
79
  // #region - Styles for filled lozenge
59
80
  'spr-border-0': fill.value,
60
- 'spr-text-color-strong': fill.value && (tone.value === 'pending' || tone.value === 'neutral' || tone.value === 'caution' || tone.value === 'plain'),
61
- 'spr-text-color-inverted-strong': fill.value && (tone.value === 'information' || tone.value === 'success' || tone.value === 'danger'),
81
+ 'spr-text-color-strong':
82
+ fill.value &&
83
+ (tone.value === 'pending' || tone.value === 'neutral' || tone.value === 'caution' || tone.value === 'plain'),
84
+ 'spr-text-color-inverted-strong':
85
+ fill.value && (tone.value === 'information' || tone.value === 'success' || tone.value === 'danger'),
62
86
  // Pending
63
87
  'spr-background-color-pending-base': tone.value === 'pending' && fill.value,
64
- 'hover:spr-background-color-pending-hover active:spr-background-color-pending-pressed': tone.value === 'pending' && fill.value && isInteractive.value,
88
+ 'hover:spr-background-color-pending-hover active:spr-background-color-pending-pressed':
89
+ tone.value === 'pending' && fill.value && isInteractive.value,
65
90
  // Information
66
91
  'spr-background-color-information-base': tone.value === 'information' && fill.value,
67
- 'hover:spr-background-color-information-hover active:spr-background-color-information-pressed': tone.value === 'information' && fill.value && isInteractive.value,
92
+ 'hover:spr-background-color-information-hover active:spr-background-color-information-pressed':
93
+ tone.value === 'information' && fill.value && isInteractive.value,
68
94
  // Success
69
95
  'spr-background-color-success-base': tone.value === 'success' && fill.value,
70
- 'hover:spr-background-color-success-hover active:spr-background-color-success-pressed': tone.value === 'success' && fill.value && isInteractive.value,
96
+ 'hover:spr-background-color-success-hover active:spr-background-color-success-pressed':
97
+ tone.value === 'success' && fill.value && isInteractive.value,
71
98
  // Neutral
72
- 'spr-background-color-base': tone.value === 'neutral' && fill.value,
73
- 'hover:spr-background-color-surface active:spr-background-color-pressed': tone.value === 'neutral' && fill.value && isInteractive.value,
99
+ 'spr-background-color-surface-adaptive': tone.value === 'neutral' && fill.value,
74
100
  // Danger
75
101
  'spr-background-color-danger-base': tone.value === 'danger' && fill.value,
76
- 'hover:spr-background-color-danger-hover active:spr-background-color-danger-pressed': tone.value === 'danger' && fill.value && isInteractive.value,
102
+ 'hover:spr-background-color-danger-hover active:spr-background-color-danger-pressed':
103
+ tone.value === 'danger' && fill.value && isInteractive.value,
77
104
  // Caution
78
105
  'spr-background-color-caution-base': tone.value === 'caution' && fill.value,
79
- 'hover:spr-background-color-caution-hover active:spr-background-color-caution-pressed': tone.value === 'caution' && fill.value && isInteractive.value,
106
+ 'hover:spr-background-color-caution-hover active:spr-background-color-caution-pressed':
107
+ tone.value === 'caution' && fill.value && isInteractive.value,
108
+
80
109
  // Plain
81
110
  'spr-background-color': tone.value === 'plain' && fill.value,
82
- 'hover:spr-background-color-hover active:spr-background-color-pressed': tone.value === 'plain' && fill.value && isInteractive.value,
111
+
112
+ // Shared hover/active for neutral and plain (filled)
113
+ 'hover:spr-background-color-surface active:spr-background-color-pressed':
114
+ (tone.value === 'neutral' || tone.value === 'plain') && fill.value && isInteractive.value,
83
115
  // #endregion - Styles for filled lozenge
84
116
  },
85
117
  );
@@ -127,6 +127,10 @@ export const multiSelectPropTypes = {
127
127
  type: Boolean,
128
128
  default: false,
129
129
  },
130
+ displayListItemSelected: {
131
+ type: Boolean,
132
+ default: false,
133
+ },
130
134
  displayHelper: {
131
135
  type: Boolean,
132
136
  default: false,
@@ -49,9 +49,7 @@
49
49
  class="spr-text-color-supporting spr-px-3"
50
50
  :aria-label="`${multiSelectedListItems.length} selected options`"
51
51
  >
52
- {{ multiSelectedListItems.length }} item{{
53
- multiSelectedListItems.length === 1 ? '' : 's'
54
- }}
52
+ {{ multiSelectedListItems.length }} item{{ multiSelectedListItems.length === 1 ? '' : 's' }}
55
53
  selected
56
54
  </span>
57
55
  </template>
@@ -164,8 +162,9 @@
164
162
  :loading="props.loading"
165
163
  :item-icon="props.itemIcon"
166
164
  :lozenge="props.lozenge"
167
- multi-select
165
+ :display-list-item-selected="props.displayListItemSelected"
168
166
  :disabled-local-search="props.disabledLocalSearch"
167
+ multi-select
169
168
  @update:model-value="handleMultiSelectedItem"
170
169
  />
171
170
  </div>
@@ -18,11 +18,11 @@
18
18
  </div>
19
19
  <div :class="getTableClasses.tableBackgroundClasses">
20
20
  <table
21
+ :key="tableKey"
21
22
  aria-describedby="describe"
22
23
  class="spr-h-full spr-w-full spr-table-fixed"
23
24
  cellspacing="0"
24
25
  cellpadding="0"
25
- :key="tableKey"
26
26
  >
27
27
  <thead>
28
28
  <tr v-if="!(props.removeHeaderOnEmpty && tableData.length <= 0)">
@@ -240,7 +240,6 @@ const {
240
240
  dragOptions,
241
241
  tableKey,
242
242
  isDragging,
243
-
244
243
 
245
244
  isRowSelected,
246
245
  sortData,
@@ -251,13 +250,13 @@ const {
251
250
  sortedDataItem,
252
251
  getSortIcon,
253
252
  getRowKey,
254
- clearSelectedData
253
+ clearSelectedData,
255
254
  } = useTable(props, emit, slots);
256
255
 
257
256
  const { reinitializeSortable } = useDraggableTableRows(sortableTBody, dragOptions);
258
257
 
259
258
  defineExpose({
260
- clearSelectedData
259
+ clearSelectedData,
261
260
  });
262
261
 
263
262
  watch(tableKey, () => {