pimelon-ui 0.1.79 → 0.1.81

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": "pimelon-ui",
3
- "version": "0.1.79",
3
+ "version": "0.1.81",
4
4
  "description": "A set of components and utilities for rapid UI development",
5
5
  "main": "./src/index.js",
6
6
  "scripts": {
@@ -136,12 +136,19 @@ const filterOptions = (options: DropdownOption[]) => {
136
136
 
137
137
  const groups = computed(() => {
138
138
  let groups: DropdownGroupOption[] = []
139
+ let currentGroup: DropdownGroupOption | null = null
139
140
  let i = 0
141
+
140
142
  for (let option of props.options) {
141
143
  if (option == null) {
142
144
  continue
143
145
  }
146
+
144
147
  if ('group' in option) {
148
+ if (currentGroup) {
149
+ groups.push(currentGroup)
150
+ currentGroup = null
151
+ }
145
152
  let groupOption = {
146
153
  key: i,
147
154
  ...option,
@@ -149,16 +156,23 @@ const groups = computed(() => {
149
156
  } as DropdownGroupOption
150
157
  groups.push(groupOption)
151
158
  } else {
152
- let groupOption = {
153
- key: i,
154
- group: '',
155
- hideLabel: true,
156
- items: filterOptions([option]),
157
- } as DropdownGroupOption
158
- groups.push(groupOption)
159
+ if (!currentGroup) {
160
+ currentGroup = {
161
+ key: i,
162
+ group: '',
163
+ hideLabel: true,
164
+ items: [],
165
+ } as DropdownGroupOption
166
+ }
167
+ currentGroup.items.push(...filterOptions([option]))
159
168
  }
160
169
  i++
161
170
  }
171
+
172
+ if (currentGroup) {
173
+ groups.push(currentGroup)
174
+ }
175
+
162
176
  return groups
163
177
  })
164
178
 
@@ -462,8 +462,8 @@ function themedCssVariables() {
462
462
  '--surface-cards': darkModeColors.gray[800],
463
463
  '--surface-cyan-1': darkModeColors.cyan[900],
464
464
  '--surface-gray-1': darkModeColors.gray[700],
465
- '--surface-gray-2': whiteOverlay[50],
466
- '--surface-gray-3': whiteOverlay[100],
465
+ '--surface-gray-2': darkModeColors.gray[650],
466
+ '--surface-gray-3': darkModeColors.gray[600],
467
467
  '--surface-gray-4': darkModeColors.gray[500],
468
468
  '--surface-gray-5': darkModeColors.gray[100],
469
469
  '--surface-gray-6': darkModeColors.gray[200],
@@ -219,6 +219,13 @@ module.exports = plugin(
219
219
  stroke: {
220
220
  ink: semanticColors.ink,
221
221
  },
222
+ borderColor: (theme) => ({
223
+ DEFAULT: theme('colors.gray.200'),
224
+ outline: semanticColors.outline,
225
+ }),
226
+ ringColor: {
227
+ outline: semanticColors.outline,
228
+ },
222
229
  spacing: {
223
230
  4.5: '1.125rem',
224
231
  5.5: '1.375rem',
@@ -250,10 +257,6 @@ module.exports = plugin(
250
257
  maxHeight: {
251
258
  52: '13rem',
252
259
  },
253
- borderColor: (theme) => ({
254
- DEFAULT: theme('colors.gray.200'),
255
- outline: semanticColors.outline,
256
- }),
257
260
  typography: (theme) => ({
258
261
  DEFAULT: {
259
262
  css: {