@sybilion/uilib 1.4.36 → 1.4.40

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.
Files changed (126) hide show
  1. package/README.md +2 -0
  2. package/dist/agent-glossary/workspace.generated.ts +1 -0
  3. package/dist/agent-glossary/workspace.index.md +1 -0
  4. package/dist/agent-glossary/workspace.md +1 -0
  5. package/dist/esm/src/components/ui/AppHeader/AppHeader.styl.js +1 -1
  6. package/dist/esm/src/components/ui/Banner/Banner.styl.js +1 -1
  7. package/dist/esm/src/components/ui/Card/Card.styl.js +1 -1
  8. package/dist/esm/src/components/ui/Chart/Chart.js +1 -2
  9. package/dist/esm/src/components/ui/Chip/Chip.js +9 -2
  10. package/dist/esm/src/components/ui/Chip/Chip.styl.js +2 -2
  11. package/dist/esm/src/components/ui/Dialog/Dialog.styl.js +1 -1
  12. package/dist/esm/src/components/ui/Drawer/Drawer.styl.js +1 -1
  13. package/dist/esm/src/components/ui/DropdownMenu/DropdownMenu.styl.js +1 -1
  14. package/dist/esm/src/components/ui/Input/Input.styl.js +1 -1
  15. package/dist/esm/src/components/ui/Logo/Logo.styl.js +1 -1
  16. package/dist/esm/src/components/ui/MobileAdaptiveSelector/MobileAdaptiveSelector.styl.js +1 -1
  17. package/dist/esm/src/components/ui/Page/PageHeader/PageHeader.styl.js +1 -1
  18. package/dist/esm/src/components/ui/Page/PageTabs/PageTabs.styl.js +1 -1
  19. package/dist/esm/src/components/ui/Select/Select.js +314 -6
  20. package/dist/esm/src/components/ui/Select/Select.styl.js +2 -2
  21. package/dist/esm/src/components/ui/Sheet/Sheet.styl.js +1 -1
  22. package/dist/esm/src/components/ui/SupplyChainMap/SupplyChainMap.js +384 -0
  23. package/dist/esm/src/components/ui/SupplyChainMap/SupplyChainMap.styl.js +7 -0
  24. package/dist/esm/src/components/ui/SupplyChainMap/map-colors.js +44 -0
  25. package/dist/esm/src/components/ui/SupplyChainMap/map-disclosure.js +142 -0
  26. package/dist/esm/src/components/ui/SupplyChainMap/map-labels.js +55 -0
  27. package/dist/esm/src/components/ui/SupplyChainMap/map-projection.js +186 -0
  28. package/dist/esm/src/components/ui/SupplyChainMap/supply-chain-map-clusters.js +96 -0
  29. package/dist/esm/src/components/ui/SupplyChainMap/supply-chain-map-draw.js +66 -0
  30. package/dist/esm/src/components/ui/SupplyChainMap/supply-chain-map-scene.js +59 -0
  31. package/dist/esm/src/components/ui/SupplyChainMap/supply-chain-map-types.js +10 -0
  32. package/dist/esm/src/components/ui/SupplyChainMap/use-map-base-renderer.js +122 -0
  33. package/dist/esm/src/components/ui/Table/Table.styl.js +1 -1
  34. package/dist/esm/src/components/ui/Tabs/Tabs.styl.js +1 -1
  35. package/dist/esm/src/components/ui/Tooltip/Tooltip.styl.js +1 -1
  36. package/dist/esm/src/components/widgets/DriverCard/DriverPerformanceChart.js +1 -2
  37. package/dist/esm/src/components/widgets/SybilionAppHeader/SybilionAppHeader.styl.js +1 -1
  38. package/dist/esm/src/index.js +2 -0
  39. package/dist/esm/types/src/components/ui/Chip/Chip.d.ts +1 -1
  40. package/dist/esm/types/src/components/ui/Chip/Chip.types.d.ts +2 -0
  41. package/dist/esm/types/src/components/ui/Chip/index.d.ts +1 -1
  42. package/dist/esm/types/src/components/ui/Select/Select.d.ts +3 -3
  43. package/dist/esm/types/src/components/ui/Select/Select.types.d.ts +3 -1
  44. package/dist/esm/types/src/components/ui/SupplyChainMap/SupplyChainMap.contract.test.d.ts +1 -0
  45. package/dist/esm/types/src/components/ui/SupplyChainMap/SupplyChainMap.d.ts +2 -0
  46. package/dist/esm/types/src/components/ui/SupplyChainMap/SupplyChainMap.example.d.ts +1 -0
  47. package/dist/esm/types/src/components/ui/SupplyChainMap/SupplyChainMap.render.worker.d.ts +15 -0
  48. package/dist/esm/types/src/components/ui/SupplyChainMap/SupplyChainMap.types.d.ts +10 -0
  49. package/dist/esm/types/src/components/ui/SupplyChainMap/index.d.ts +3 -0
  50. package/dist/esm/types/src/components/ui/SupplyChainMap/map-colors.d.ts +43 -0
  51. package/dist/esm/types/src/components/ui/SupplyChainMap/map-disclosure.d.ts +35 -0
  52. package/dist/esm/types/src/components/ui/SupplyChainMap/map-disclosure.test.d.ts +1 -0
  53. package/dist/esm/types/src/components/ui/SupplyChainMap/map-labels.d.ts +14 -0
  54. package/dist/esm/types/src/components/ui/SupplyChainMap/map-labels.test.d.ts +1 -0
  55. package/dist/esm/types/src/components/ui/SupplyChainMap/map-projection.d.ts +83 -0
  56. package/dist/esm/types/src/components/ui/SupplyChainMap/map-projection.test.d.ts +1 -0
  57. package/dist/esm/types/src/components/ui/SupplyChainMap/supply-chain-map-clusters.d.ts +25 -0
  58. package/dist/esm/types/src/components/ui/SupplyChainMap/supply-chain-map-clusters.test.d.ts +1 -0
  59. package/dist/esm/types/src/components/ui/SupplyChainMap/supply-chain-map-draw.d.ts +30 -0
  60. package/dist/esm/types/src/components/ui/SupplyChainMap/supply-chain-map-scene.d.ts +28 -0
  61. package/dist/esm/types/src/components/ui/SupplyChainMap/supply-chain-map-scene.test.d.ts +1 -0
  62. package/dist/esm/types/src/components/ui/SupplyChainMap/supply-chain-map-types.d.ts +31 -0
  63. package/dist/esm/types/src/components/ui/SupplyChainMap/use-map-base-renderer.d.ts +14 -0
  64. package/dist/esm/types/src/docs/pages/BannerPage.d.ts +1 -0
  65. package/dist/esm/types/src/docs/pages/SupplyChainMapPage.d.ts +1 -0
  66. package/dist/esm/types/src/index.d.ts +1 -0
  67. package/dist/esm/types/src/lib/logger.d.ts +1 -0
  68. package/package.json +7 -1
  69. package/src/components/ui/AppHeader/AppHeader.styl +2 -2
  70. package/src/components/ui/Banner/Banner.styl +1 -1
  71. package/src/components/ui/Card/Card.styl +3 -1
  72. package/src/components/ui/Chip/AGENT.md +1 -1
  73. package/src/components/ui/Chip/Chip.styl +66 -6
  74. package/src/components/ui/Chip/Chip.styl.d.ts +4 -0
  75. package/src/components/ui/Chip/Chip.tsx +15 -1
  76. package/src/components/ui/Chip/Chip.types.ts +3 -0
  77. package/src/components/ui/Chip/index.ts +1 -1
  78. package/src/components/ui/Dialog/Dialog.styl +2 -2
  79. package/src/components/ui/Drawer/Drawer.styl +2 -2
  80. package/src/components/ui/DropdownMenu/DropdownMenu.styl +2 -2
  81. package/src/components/ui/Input/Input.styl +9 -13
  82. package/src/components/ui/Logo/Logo.styl +1 -1
  83. package/src/components/ui/MobileAdaptiveSelector/MobileAdaptiveSelector.styl +1 -1
  84. package/src/components/ui/Page/PageHeader/PageHeader.styl +1 -1
  85. package/src/components/ui/Page/PageTabs/PageTabs.styl +3 -0
  86. package/src/components/ui/Select/AGENT.md +3 -1
  87. package/src/components/ui/Select/Select.styl +38 -6
  88. package/src/components/ui/Select/Select.styl.d.ts +28 -25
  89. package/src/components/ui/Select/Select.tsx +512 -5
  90. package/src/components/ui/Select/Select.types.ts +3 -1
  91. package/src/components/ui/Sheet/Sheet.styl +2 -2
  92. package/src/components/ui/SupplyChainMap/AGENT.md +45 -0
  93. package/src/components/ui/SupplyChainMap/SupplyChainMap.contract.test.ts +45 -0
  94. package/src/components/ui/SupplyChainMap/SupplyChainMap.example.tsx +176 -0
  95. package/src/components/ui/SupplyChainMap/SupplyChainMap.render.worker.ts +63 -0
  96. package/src/components/ui/SupplyChainMap/SupplyChainMap.styl +221 -0
  97. package/src/components/ui/SupplyChainMap/SupplyChainMap.styl.d.ts +25 -0
  98. package/src/components/ui/SupplyChainMap/SupplyChainMap.tsx +720 -0
  99. package/src/components/ui/SupplyChainMap/SupplyChainMap.types.ts +15 -0
  100. package/src/components/ui/SupplyChainMap/index.ts +11 -0
  101. package/src/components/ui/SupplyChainMap/map-colors.ts +66 -0
  102. package/src/components/ui/SupplyChainMap/map-disclosure.test.ts +237 -0
  103. package/src/components/ui/SupplyChainMap/map-disclosure.ts +226 -0
  104. package/src/components/ui/SupplyChainMap/map-labels.test.ts +102 -0
  105. package/src/components/ui/SupplyChainMap/map-labels.ts +85 -0
  106. package/src/components/ui/SupplyChainMap/map-projection.test.ts +172 -0
  107. package/src/components/ui/SupplyChainMap/map-projection.ts +281 -0
  108. package/src/components/ui/SupplyChainMap/supply-chain-map-clusters.test.ts +182 -0
  109. package/src/components/ui/SupplyChainMap/supply-chain-map-clusters.ts +127 -0
  110. package/src/components/ui/SupplyChainMap/supply-chain-map-draw.ts +114 -0
  111. package/src/components/ui/SupplyChainMap/supply-chain-map-scene.test.ts +196 -0
  112. package/src/components/ui/SupplyChainMap/supply-chain-map-scene.ts +118 -0
  113. package/src/components/ui/SupplyChainMap/supply-chain-map-types.ts +45 -0
  114. package/src/components/ui/SupplyChainMap/use-map-base-renderer.ts +145 -0
  115. package/src/components/ui/Table/Table.styl +4 -3
  116. package/src/components/ui/Tabs/Tabs.styl +4 -0
  117. package/src/components/ui/Tooltip/Tooltip.styl +7 -2
  118. package/src/components/widgets/SybilionAppHeader/SybilionAppHeader.styl +4 -4
  119. package/src/declarations.d.ts +4 -0
  120. package/src/docs/pages/BannerPage.tsx +83 -0
  121. package/src/docs/pages/ChipPage.tsx +20 -1
  122. package/src/docs/pages/FeedbackOverviewPage.tsx +7 -1
  123. package/src/docs/pages/SelectPage.tsx +30 -1
  124. package/src/docs/pages/SupplyChainMapPage.tsx +21 -0
  125. package/src/docs/registry.ts +12 -0
  126. package/src/index.ts +1 -0
@@ -3,25 +3,39 @@ import cn from 'classnames';
3
3
  import { TrendingDown, TrendingUp } from 'lucide-react';
4
4
 
5
5
  import S from './Chip.styl';
6
- import { ChipProps } from './Chip.types';
6
+ import { ChipProps, ChipSize } from './Chip.types';
7
+
8
+ const sizeClass = (s: ChipSize) =>
9
+ s === 'xs'
10
+ ? S.sizeXs
11
+ : s === 'sm'
12
+ ? S.sizeSm
13
+ : s === 'md'
14
+ ? S.sizeMd
15
+ : S.sizeLg;
7
16
 
8
17
  function Chip({
9
18
  className,
10
19
  variant = 'neutral',
20
+ size = 'sm',
11
21
  dot,
12
22
  trend,
13
23
  squared = false,
14
24
  children,
25
+ ref,
15
26
  ...props
16
27
  }: ChipProps) {
17
28
  const TrendIcon =
18
29
  trend === 'up' ? TrendingUp : trend === 'down' ? TrendingDown : null;
19
30
  return (
20
31
  <span
32
+ ref={ref}
21
33
  data-slot="chip"
34
+ data-size={size}
22
35
  className={cn(
23
36
  S.root,
24
37
  S[`variant-${variant}`],
38
+ sizeClass(size),
25
39
  squared && S.squared,
26
40
  className,
27
41
  )}
@@ -12,8 +12,11 @@ export type ChipVariant =
12
12
 
13
13
  export type ChipTrend = 'up' | 'down';
14
14
 
15
+ export type ChipSize = 'xs' | 'sm' | 'md' | 'lg';
16
+
15
17
  export interface ChipProps extends ComponentProps<'span'> {
16
18
  variant?: ChipVariant;
19
+ size?: ChipSize;
17
20
  /**
18
21
  * Show the 6px status dot. Defaults to true for the neutral variant
19
22
  * (when not squared) and false for all others.
@@ -1,2 +1,2 @@
1
1
  export { Chip } from './Chip';
2
- export type { ChipProps, ChipTrend, ChipVariant } from './Chip.types';
2
+ export type { ChipProps, ChipSize, ChipTrend, ChipVariant } from './Chip.types';
@@ -4,7 +4,7 @@
4
4
  .dialogOverlay
5
5
  position fixed
6
6
  inset 0
7
- z-index 50
7
+ z-index 1100
8
8
  background-color var(--background-alpha-700)
9
9
  backdrop-filter blur(4px)
10
10
  opacity 0
@@ -22,7 +22,7 @@
22
22
  position fixed
23
23
  left 50%
24
24
  top 50%
25
- z-index 50
25
+ z-index 1100
26
26
  display flex
27
27
 
28
28
  width fit-content
@@ -6,7 +6,7 @@ $md = 768px
6
6
  .overlay
7
7
  position fixed
8
8
  inset 0
9
- z-index 50
9
+ z-index 1100
10
10
  background-color rgba(0, 0, 0, 0.5)
11
11
  backface-visibility hidden
12
12
 
@@ -18,7 +18,7 @@ $md = 768px
18
18
 
19
19
  .content
20
20
  position fixed
21
- z-index 50
21
+ z-index 1100
22
22
  display flex
23
23
  flex-direction column
24
24
  height auto
@@ -1,7 +1,7 @@
1
1
  @import '../../../lib/theme.styl';
2
2
 
3
3
  .content
4
- z-index 50
4
+ z-index 1100
5
5
  min-width 8rem
6
6
  max-height var(--radix-dropdown-menu-content-available-height)
7
7
  padding var(--p-1)
@@ -221,7 +221,7 @@
221
221
  padding-left var(--p-8)
222
222
 
223
223
  .subContent
224
- z-index 50
224
+ z-index 1100
225
225
  min-width 8rem
226
226
  padding var(--p-1)
227
227
  border-radius 0.375rem
@@ -4,7 +4,8 @@
4
4
  min-width 0
5
5
  background-color transparent
6
6
  outline none
7
- transition color, box-shadow
7
+ overflow visible
8
+ transition color, box-shadow, outline-color
8
9
  transition-duration 150ms
9
10
 
10
11
  &.variant-default,
@@ -18,9 +19,13 @@
18
19
  border-radius var(--radius-input)
19
20
  box-shadow 0 0 0 1px var(--border)
20
21
 
21
- &:focus
22
- box-shadow: inset 0 0 0 2px var(--brand-color-400);
22
+ &:focus,
23
+ &:focus-visible
24
+ box-shadow inset 0 0 0 2px var(--brand-color-400)
23
25
 
26
+ &[aria-invalid="true"]
27
+ border-color var(--destructive)
28
+ box-shadow inset 0 0 0 2px var(--destructive)
24
29
 
25
30
  &.size-sm
26
31
  height 32px
@@ -41,15 +46,6 @@
41
46
  background-color var(--primary)
42
47
  color var(--primary-foreground)
43
48
 
44
- &.variant-default
45
- &:focus-visible
46
- border-color var(--ring)
47
- ring 3px var(--ring) / 0.5
48
-
49
- &[aria-invalid="true"]
50
- border-color var(--destructive)
51
- ring 3px var(--destructive) / 0.2
52
-
53
49
  &:disabled
54
50
  pointer-events none
55
51
  cursor not-allowed
@@ -70,4 +66,4 @@
70
66
  background-color var(--input) / 0.3
71
67
 
72
68
  &[aria-invalid="true"]
73
- ring 3px var(--destructive) / 0.4
69
+ box-shadow inset 0 0 0 2px var(--destructive)
@@ -2,7 +2,7 @@
2
2
  display flex
3
3
  align-items center
4
4
  gap 8px
5
- color var(--color-foreground)
5
+ color var(--foreground)
6
6
 
7
7
  .icon
8
8
  display block
@@ -12,7 +12,7 @@
12
12
  pointer-events none
13
13
 
14
14
  .selectContent
15
- z-index 50
15
+ z-index 1100
16
16
 
17
17
  .selectItem
18
18
  cursor pointer
@@ -87,7 +87,7 @@
87
87
  font-family var(--font-family-heading)
88
88
  font-weight 300
89
89
  font-size var(--text-2xl)
90
- line-height var(--text-2xl)
90
+ line-height 1.3em
91
91
  color var(--foreground)
92
92
 
93
93
  .subheader
@@ -23,3 +23,6 @@
23
23
  position relative
24
24
  display flex
25
25
  flex-direction column
26
+
27
+ &[hidden]
28
+ display none !important
@@ -4,12 +4,14 @@ Select is a Radix-based dropdown for choosing a single option from a list. Compo
4
4
 
5
5
  - To choose one option from a list of roughly five or more items.
6
6
  - In forms, toolbars, and filters where space is limited and options collapse behind a trigger.
7
+ - For a filterable single choice: pass `searchable` on `Select`.
7
8
 
8
9
  ## When not to use
9
10
 
10
11
  - For two to four options that benefit from being visible at once; use ToggleGroup or radio buttons.
11
- - For multi-select or searchable lists; use a combobox or multi-select component.
12
+ - For multi-select lists; use a multi-select component.
12
13
 
13
14
  ## Do
14
15
 
15
16
  - Use the clear variant for low-emphasis, inline selects embedded in text or toolbars.
17
+ - Pass `searchable` on `Select` when the list should be filtered by typing in the trigger.
@@ -1,6 +1,7 @@
1
1
  .selectTrigger
2
2
  position relative
3
3
  display flex
4
+ box-sizing border-box
4
5
  width fit-content
5
6
  align-items center
6
7
  justify-content space-between
@@ -47,30 +48,30 @@
47
48
  // color var(--muted-foreground)
48
49
 
49
50
  &[data-size="xs"]
50
- height auto
51
+ height 28px
51
52
  min-height 28px
52
53
  padding 0 10px
53
54
  border-radius var(--p-4)
54
55
  font-size var(--text-xs)
55
56
 
56
57
  &[data-size="sm"]
57
- height auto
58
+ height 32px
58
59
  min-height 32px
59
60
  padding 0 14px
60
61
  border-radius var(--p-4)
61
62
  font-size 13px
62
63
 
63
64
  &[data-size="md"]
64
- height auto
65
+ height 40px
65
66
  min-height 40px
66
- padding 11px 14px
67
+ padding 0 14px
67
68
  border-radius var(--p-4)
68
69
  font-size var(--text-sm)
69
70
 
70
71
  &[data-size="lg"]
71
- height auto
72
+ height 48px
72
73
  min-height 48px
73
- padding var(--p-4) var(--p-6)
74
+ padding 0 var(--p-6)
74
75
  border-radius var(--p-4)
75
76
  font-size var(--text-base)
76
77
 
@@ -95,6 +96,31 @@
95
96
  text-overflow ellipsis
96
97
  white-space nowrap
97
98
 
99
+ &.searchable
100
+ cursor text
101
+
102
+ .selectTriggerInput
103
+ flex 1
104
+ min-width 0
105
+ width 100%
106
+ border none
107
+ background transparent
108
+ outline none
109
+ font inherit
110
+ font-weight inherit
111
+ font-size inherit
112
+ color inherit
113
+ padding 0
114
+ margin 0
115
+ box-shadow none
116
+ cursor text
117
+
118
+ &::placeholder
119
+ color var(--muted-foreground)
120
+
121
+ &:disabled
122
+ cursor not-allowed
123
+
98
124
  svg
99
125
  pointer-events none
100
126
  flex-shrink 0
@@ -190,6 +216,11 @@
190
216
  font-size var(--text-xs)
191
217
  color var(--muted-foreground)
192
218
 
219
+ .selectEmpty
220
+ padding var(--p-2)
221
+ font-size var(--text-sm)
222
+ color var(--muted-foreground)
223
+
193
224
  .selectItem
194
225
  position relative
195
226
  display flex
@@ -218,6 +249,7 @@
218
249
  border-bottom-right-radius var(--radius-md)
219
250
 
220
251
  &:focus
252
+ &[data-highlighted="true"]
221
253
  background-color var(--accent)
222
254
  color var(--accent-foreground)
223
255
 
@@ -1,31 +1,34 @@
1
1
  // This file is automatically generated.
2
2
  // Please do not change this file!
3
3
  interface CssExports {
4
- 'clear': string;
5
- 'darker': string;
6
- 'fadeIn': string;
7
- 'fadeOut': string;
8
- 'selectContent': string;
9
- 'selectContentPopper': string;
10
- 'selectIcon': string;
11
- 'selectItem': string;
12
- 'selectItemIndicator': string;
13
- 'selectItemIndicatorContainer': string;
14
- 'selectItemText': string;
15
- 'selectLabel': string;
16
- 'selectScrollButton': string;
17
- 'selectScrollIcon': string;
18
- 'selectSeparator': string;
19
- 'selectTrigger': string;
20
- 'selectViewport': string;
21
- 'selectViewportPopper': string;
22
- 'selected': string;
23
- 'slideInFromBottom': string;
24
- 'slideInFromLeft': string;
25
- 'slideInFromRight': string;
26
- 'slideInFromTop': string;
27
- 'zoomIn': string;
28
- 'zoomOut': string;
4
+ clear: string;
5
+ darker: string;
6
+ fadeIn: string;
7
+ fadeOut: string;
8
+ searchable: string;
9
+ selectContent: string;
10
+ selectContentPopper: string;
11
+ selectEmpty: string;
12
+ selectIcon: string;
13
+ selectItem: string;
14
+ selectItemIndicator: string;
15
+ selectItemIndicatorContainer: string;
16
+ selectItemText: string;
17
+ selectLabel: string;
18
+ selectScrollButton: string;
19
+ selectScrollIcon: string;
20
+ selectSeparator: string;
21
+ selectTrigger: string;
22
+ selectTriggerInput: string;
23
+ selectViewport: string;
24
+ selectViewportPopper: string;
25
+ selected: string;
26
+ slideInFromBottom: string;
27
+ slideInFromLeft: string;
28
+ slideInFromRight: string;
29
+ slideInFromTop: string;
30
+ zoomIn: string;
31
+ zoomOut: string;
29
32
  }
30
33
  export const cssExports: CssExports;
31
34
  export default cssExports;