@bunnix/components 0.11.0 → 0.11.1

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": "@bunnix/components",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "Bunnix components: a set of bunnix ready components for modern web apps.",
5
5
  "keywords": [
6
6
  "bunnix",
package/src/core/core.css CHANGED
@@ -16,7 +16,7 @@
16
16
  --color-fg-primary: light-dark(black, white);
17
17
  --color-fg-primary-dimmed: light-dark(#868686, #ebebeb);
18
18
  --color-fg-primary-inverted: light-dark(white, black);
19
- --color-fg-secondary: light-dark(#444, #aaa);
19
+ --color-fg-secondary: light-dark(#737373, #aaa);
20
20
  --color-fg-tertiary: light-dark(#888, #777);
21
21
  --color-fg-on-danger: light-dark(#fff, #fff);
22
22
 
@@ -397,8 +397,10 @@ const PickerCore = (props, _) => {
397
397
  Menu({
398
398
  ...(anchor ? { anchor } : {}),
399
399
  items: menuOptions,
400
- trigger: ({ toggle }) =>
401
- button(
400
+ trigger: ({ toggle }) => {
401
+ const triggerColor = finalTriggerProps.style?.color;
402
+
403
+ return button(
402
404
  {
403
405
  ...finalTriggerProps,
404
406
  type: "button",
@@ -416,16 +418,35 @@ const PickerCore = (props, _) => {
416
418
  div(
417
419
  { class: "picker-selection" },
418
420
  ...(selectedItem?.icon
419
- ? [Icon({ name: selectedItem.icon, size: 16 })]
421
+ ? [
422
+ Icon({
423
+ name: selectedItem.icon,
424
+ size: 16,
425
+ ...(triggerColor ? { color: triggerColor } : {}),
426
+ }),
427
+ ]
420
428
  : []),
421
429
  ...(selectedItem
422
- ? [Text({ weight: "heavy" }, selectedItem.text ?? selectedItem.key)]
430
+ ? [
431
+ Text(
432
+ {
433
+ weight: "heavy",
434
+ ...(triggerColor ? { color: triggerColor } : {}),
435
+ },
436
+ selectedItem.text ?? selectedItem.key,
437
+ ),
438
+ ]
423
439
  : []),
424
440
  ),
425
441
  Spacer(),
426
- Icon({ name: "chevron_down", size: 16, color: "secondary" }),
442
+ Icon({
443
+ name: "chevron_down",
444
+ size: 16,
445
+ ...(triggerColor ? { color: triggerColor } : { color: "secondary" }),
446
+ }),
427
447
  ),
428
- ),
448
+ );
449
+ },
429
450
  })
430
451
  )({ minHeight: 32, textSize: "1rem", ...triggerProps }),
431
452
  ),