@sybilion/uilib 1.4.42 → 1.5.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.
Files changed (79) hide show
  1. package/README.md +2 -0
  2. package/assets/globals.css +38 -6
  3. package/dist/esm/src/components/ui/AnalysesSelector/AnalysesSelector.styl.js +1 -1
  4. package/dist/esm/src/components/ui/AppHeader/AppHeader.styl.js +1 -1
  5. package/dist/esm/src/components/ui/Breadcrumb/Breadcrumb.styl.js +1 -1
  6. package/dist/esm/src/components/ui/Button/Button.styl.js +1 -1
  7. package/dist/esm/src/components/ui/Chat/ChatPrompt/ChatPrompt.js +15 -2
  8. package/dist/esm/src/components/ui/Chat/ChatPrompt/ChatPrompt.styl.js +2 -2
  9. package/dist/esm/src/components/ui/Checkbox/Checkbox.styl.js +1 -1
  10. package/dist/esm/src/components/ui/Chip/Chip.styl.js +1 -1
  11. package/dist/esm/src/components/ui/DatePicker/DatePicker.styl.js +1 -1
  12. package/dist/esm/src/components/ui/Dialog/Dialog.styl.js +1 -1
  13. package/dist/esm/src/components/ui/DropdownMenu/DropdownMenu.styl.js +1 -1
  14. package/dist/esm/src/components/ui/FileChip/FileChip.styl.js +1 -1
  15. package/dist/esm/src/components/ui/Input/Input.styl.js +1 -1
  16. package/dist/esm/src/components/ui/LegacyPlatformLink/LegacyPlatformLink.styl.js +1 -1
  17. package/dist/esm/src/components/ui/Notifications/Notifications.styl.js +1 -1
  18. package/dist/esm/src/components/ui/RadioGroup/RadioGroup.styl.js +1 -1
  19. package/dist/esm/src/components/ui/Renamer/Renamer.styl.js +2 -2
  20. package/dist/esm/src/components/ui/Select/Select.styl.js +1 -1
  21. package/dist/esm/src/components/ui/Sheet/Sheet.styl.js +1 -1
  22. package/dist/esm/src/components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.styl.js +1 -1
  23. package/dist/esm/src/components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.styl.js +1 -1
  24. package/dist/esm/src/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.styl.js +1 -1
  25. package/dist/esm/src/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.styl.js +1 -1
  26. package/dist/esm/src/components/ui/Sidebar/SidebarRail/SidebarRail.styl.js +1 -1
  27. package/dist/esm/src/components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.styl.js +1 -1
  28. package/dist/esm/src/components/ui/Slider/Slider.styl.js +1 -1
  29. package/dist/esm/src/components/ui/SupplyChainMap/SupplyChainMap.styl.js +1 -1
  30. package/dist/esm/src/components/ui/Switch/Switch.styl.js +1 -1
  31. package/dist/esm/src/components/ui/Tabs/Tabs.styl.js +1 -1
  32. package/dist/esm/src/components/ui/Toggle/Toggle.styl.js +1 -1
  33. package/dist/esm/src/components/ui/ToggleGroup/ToggleGroup.styl.js +1 -1
  34. package/dist/esm/src/components/ui/WorkspaceAppSwitcher/WorkspaceAppSwitcher.styl.js +1 -1
  35. package/dist/esm/src/components/widgets/DriverMap/DriverIcon/DriverIcon.styl.js +1 -1
  36. package/dist/esm/src/index.js +0 -3
  37. package/dist/esm/src/signin.js +3 -0
  38. package/dist/esm/types/src/index.d.ts +0 -3
  39. package/dist/esm/types/src/signin.d.ts +3 -0
  40. package/package.json +11 -1
  41. package/src/components/ui/AnalysesSelector/AnalysesSelector.styl +3 -0
  42. package/src/components/ui/AppHeader/AppHeader.styl +3 -0
  43. package/src/components/ui/Breadcrumb/Breadcrumb.styl +1 -0
  44. package/src/components/ui/Button/Button.styl +3 -10
  45. package/src/components/ui/Chat/ChatPrompt/ChatPrompt.styl +8 -3
  46. package/src/components/ui/Chat/ChatPrompt/ChatPrompt.styl.d.ts +1 -0
  47. package/src/components/ui/Chat/ChatPrompt/ChatPrompt.tsx +28 -1
  48. package/src/components/ui/Checkbox/Checkbox.styl +3 -4
  49. package/src/components/ui/Chip/Chip.styl +3 -0
  50. package/src/components/ui/DatePicker/DatePicker.styl +5 -3
  51. package/src/components/ui/Dialog/Dialog.styl +1 -2
  52. package/src/components/ui/DropdownMenu/DropdownMenu.styl +4 -0
  53. package/src/components/ui/FileChip/FileChip.styl +3 -3
  54. package/src/components/ui/Input/Input.styl +13 -6
  55. package/src/components/ui/LegacyPlatformLink/LegacyPlatformLink.styl +1 -0
  56. package/src/components/ui/Notifications/Notifications.styl +7 -0
  57. package/src/components/ui/RadioGroup/RadioGroup.styl +3 -4
  58. package/src/components/ui/Renamer/Renamer.styl +5 -1
  59. package/src/components/ui/Select/Select.styl +5 -7
  60. package/src/components/ui/Select/Select.styl.d.ts +28 -28
  61. package/src/components/ui/Sheet/Sheet.styl +1 -6
  62. package/src/components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.styl +1 -2
  63. package/src/components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.styl +1 -2
  64. package/src/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.styl +1 -2
  65. package/src/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.styl +1 -2
  66. package/src/components/ui/Sidebar/SidebarRail/SidebarRail.styl +1 -0
  67. package/src/components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.styl +1 -0
  68. package/src/components/ui/Slider/Slider.styl +3 -4
  69. package/src/components/ui/SupplyChainMap/SupplyChainMap.styl +1 -0
  70. package/src/components/ui/SupplyChainMap/SupplyChainMap.styl.d.ts +19 -19
  71. package/src/components/ui/Switch/Switch.styl +3 -4
  72. package/src/components/ui/Tabs/Tabs.styl +3 -6
  73. package/src/components/ui/Toggle/Toggle.styl +3 -3
  74. package/src/components/ui/ToggleGroup/ToggleGroup.styl +3 -0
  75. package/src/components/ui/WorkspaceAppSwitcher/WorkspaceAppSwitcher.styl +1 -0
  76. package/src/components/widgets/DriverMap/DriverIcon/DriverIcon.styl +1 -3
  77. package/src/index.ts +1 -3
  78. package/src/lib/theme.styl +17 -0
  79. package/src/signin.ts +3 -0
@@ -67,9 +67,7 @@
67
67
  &:hover
68
68
  background-color var(--sb-gray-50)
69
69
 
70
- &:focus-visible
71
- outline 2px solid var(--ring)
72
- outline-offset 2px
70
+ focus-outline()
73
71
 
74
72
  :global(.dark) &
75
73
  &:hover
@@ -103,6 +101,8 @@
103
101
  background-color var(--muted)
104
102
  color var(--foreground)
105
103
 
104
+ focus-outline()
105
+
106
106
  &:disabled
107
107
  opacity 0.5
108
108
  cursor not-allowed
@@ -1,3 +1,5 @@
1
+ @import 'lib/theme.styl'
2
+
1
3
  .root
2
4
  display flex
3
5
  width 100%
@@ -7,6 +9,7 @@
7
9
  overflow visible
8
10
  transition color, box-shadow, outline-color
9
11
  transition-duration 150ms
12
+ focus-outline()
10
13
 
11
14
  &.variant-default,
12
15
  &.variant-clean
@@ -19,14 +22,14 @@
19
22
  border-radius var(--radius-input)
20
23
  box-shadow 0 0 0 1px var(--border)
21
24
 
22
- &:focus,
23
- &:focus-visible
24
- box-shadow inset 0 0 0 2px var(--brand-color-400)
25
-
26
25
  &[aria-invalid="true"]
27
- border-color var(--destructive)
26
+ --focus-outline-color var(--destructive)
28
27
  box-shadow inset 0 0 0 2px var(--destructive)
29
28
 
29
+ &:focus,
30
+ &:focus-visible
31
+ box-shadow none
32
+
30
33
  &.size-sm
31
34
  height 32px
32
35
  font-size var(--text-xs)
@@ -65,5 +68,9 @@
65
68
  :global(.dark) &
66
69
  background-color var(--input) / 0.3
67
70
 
68
- &[aria-invalid="true"]
71
+ &.variant-default[aria-invalid="true"]
69
72
  box-shadow inset 0 0 0 2px var(--destructive)
73
+
74
+ &.variant-default:focus,
75
+ &.variant-default:focus-visible
76
+ box-shadow none
@@ -5,6 +5,7 @@
5
5
  text-underline-offset 2px
6
6
  color var(--foreground)
7
7
  white-space nowrap
8
+ focus-outline()
8
9
 
9
10
  &:hover
10
11
  color var(--link-color-hover)
@@ -1,3 +1,5 @@
1
+ @import 'lib/theme.styl'
2
+
1
3
  .root
2
4
  position fixed
3
5
  top var(--header-height)
@@ -103,6 +105,11 @@
103
105
  opacity 0
104
106
  transform scale(0.85)
105
107
  transition opacity 0.15s ease-out, transform 0.15s ease-out
108
+ focus-outline()
109
+
110
+ .closeButton:focus-visible
111
+ opacity 0.85
112
+ transform scale(1)
106
113
 
107
114
  .item:hover .closeButton
108
115
  opacity 0.85
@@ -8,6 +8,8 @@
8
8
  flex-wrap wrap
9
9
  gap var(--p-4)
10
10
 
11
+ @import 'lib/theme.styl'
12
+
11
13
  .radioRoot
12
14
  cursor pointer
13
15
  display flex
@@ -21,6 +23,7 @@
21
23
  box-shadow 0 1px 2px 0 rgba(0, 0, 0, 0.05)
22
24
  outline none
23
25
  transition box-shadow 0.15s ease-in-out
26
+ focus-outline()
24
27
 
25
28
  .dark &
26
29
  background-color var(--input-30)
@@ -31,10 +34,6 @@
31
34
  .dark &
32
35
  border-color var(--primary)
33
36
 
34
- &:focus-visible
35
- border-color var(--ring)
36
- box-shadow 0 0 0 3px var(--ring-50)
37
-
38
37
  &[aria-invalid=true]
39
38
  box-shadow 0 0 0 3px var(--destructive-200)
40
39
  border-color var(--destructive)
@@ -1,4 +1,4 @@
1
-
1
+ .root
2
2
  display inline-block
3
3
  max-width 100%
4
4
  vertical-align top
@@ -31,6 +31,10 @@
31
31
  border-radius var(--p-4)
32
32
  box-shadow 0 0 0 1px var(--border)
33
33
 
34
+ &:focus,
35
+ &:focus-visible
36
+ box-shadow none
37
+
34
38
  .empty.size-lg.root .input
35
39
  background-color var(--accent) / 0.1
36
40
 
@@ -1,3 +1,5 @@
1
+ @import 'lib/theme.styl'
2
+
1
3
  .selectTrigger
2
4
  position relative
3
5
  display flex
@@ -23,6 +25,7 @@
23
25
  outline none
24
26
  cursor pointer
25
27
  transition all 0.2s ease-in-out
28
+ focus-outline-within()
26
29
 
27
30
  // fade complex (non-text) content:
28
31
  &::before
@@ -78,9 +81,6 @@
78
81
  &[data-placeholder]
79
82
  color var(--muted-foreground)
80
83
 
81
- &:focus-visible
82
- border-color var(--ring)
83
-
84
84
  &[aria-invalid="true"]
85
85
  border-color var(--destructive)
86
86
 
@@ -143,10 +143,7 @@
143
143
  border none
144
144
  background-color transparent
145
145
  box-shadow none
146
-
147
- &:focus-visible
148
- border none
149
- box-shadow none
146
+ focus-outline()
150
147
 
151
148
  @media (prefers-color-scheme: dark)
152
149
  background-color transparent
@@ -235,6 +232,7 @@
235
232
  font-size var(--text-sm)
236
233
  outline none
237
234
  user-select none
235
+ focus-outline()
238
236
 
239
237
  &.selected
240
238
  font-weight 600
@@ -1,34 +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
- 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;
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;
32
32
  }
33
33
  export const cssExports: CssExports;
34
34
  export default cssExports;
@@ -115,12 +115,7 @@ $animationDuration = 200ms
115
115
  border-radius var(--radius-sm)
116
116
  outline none
117
117
  cursor pointer
118
-
119
- &:focus
120
- ring 2px
121
- ring-color var(--ring)
122
- ring-offset 2px
123
- ring-offset-color var(--background)
118
+ focus-outline()
124
119
 
125
120
  &:disabled
126
121
  pointer-events none
@@ -17,8 +17,7 @@
17
17
  &:hover
18
18
  background-color var(--sidebar-accent)
19
19
  color var(--sidebar-accent-foreground)
20
- &:focus-visible
21
- box-shadow 0 0 0 2px var(--sidebar-ring)
20
+ focus-outline()
22
21
  & > svg
23
22
  width 1rem
24
23
  height 1rem
@@ -30,8 +30,7 @@
30
30
  [data-slot="sidebar-menu-sub-item"]:hover &
31
31
  opacity 1
32
32
 
33
- &:focus-visible
34
- box-shadow 0 0 0 2px var(--sidebar-ring)
33
+ focus-outline()
35
34
 
36
35
  & > svg
37
36
  pointer-events none
@@ -35,8 +35,7 @@
35
35
  background-color var(--sidebar-accent)
36
36
  color var(--sidebar-accent-foreground)
37
37
 
38
- &:focus-visible
39
- box-shadow 0 0 0 2px var(--sidebar-ring)
38
+ focus-outline()
40
39
 
41
40
  &:disabled, &[aria-disabled="true"]
42
41
  pointer-events none
@@ -36,8 +36,7 @@
36
36
  background-color var(--sidebar-accent)
37
37
  color var(--sidebar-accent-foreground)
38
38
 
39
- &:focus-visible
40
- box-shadow 0 0 0 2px var(--sidebar-ring)
39
+ focus-outline()
41
40
 
42
41
  &:disabled, &[aria-disabled="true"]
43
42
  pointer-events none
@@ -8,6 +8,7 @@
8
8
  width 1rem
9
9
  // transform translateX(-50%)
10
10
  transition all ease-out
11
+ focus-outline()
11
12
  &:hover::after
12
13
  background-color var(--sidebar-border)
13
14
  &[data-side="left"]
@@ -14,6 +14,7 @@
14
14
  transition opacity 150ms ease-out
15
15
  background-color var(--page-color)
16
16
  opacity 0
17
+ focus-outline()
17
18
 
18
19
  &::before
19
20
  content ""
@@ -1,3 +1,5 @@
1
+ @import 'lib/theme.styl'
2
+
1
3
  .sliderRoot
2
4
  position relative
3
5
  display flex
@@ -53,15 +55,12 @@
53
55
  touch-action none
54
56
  user-select none
55
57
  pointer-events auto
58
+ focus-outline()
56
59
 
57
60
  &:hover
58
61
  transform translate(-50%, -50%) scale(1.1)
59
62
  box-shadow 0px 4px 8px rgba(0, 0, 0, 0.15)
60
63
 
61
- &:focus-visible
62
- outline 2px solid var(--primary)
63
- outline-offset 2px
64
-
65
64
  &:active
66
65
  cursor grabbing
67
66
  transform translate(-50%, -50%) scale(1.15)
@@ -117,6 +117,7 @@
117
117
  white-space nowrap
118
118
  cursor pointer
119
119
  transition border-color 120ms ease, box-shadow 120ms ease, background 120ms ease
120
+ focus-outline()
120
121
 
121
122
  &.primary
122
123
  font-weight 600
@@ -1,25 +1,25 @@
1
1
  // This file is automatically generated.
2
2
  // Please do not change this file!
3
3
  interface CssExports {
4
- action: string;
5
- baseCanvas: string;
6
- canvas: string;
7
- cluster: string;
8
- dimmed: string;
9
- disclosure: string;
10
- empty: string;
11
- fill: string;
12
- hint: string;
13
- inspection: string;
14
- kicker: string;
15
- label: string;
16
- marker: string;
17
- node: string;
18
- overlay: string;
19
- primary: string;
20
- root: string;
21
- selected: string;
22
- zoom: string;
4
+ 'action': string;
5
+ 'baseCanvas': string;
6
+ 'canvas': string;
7
+ 'cluster': string;
8
+ 'dimmed': string;
9
+ 'disclosure': string;
10
+ 'empty': string;
11
+ 'fill': string;
12
+ 'hint': string;
13
+ 'inspection': string;
14
+ 'kicker': string;
15
+ 'label': string;
16
+ 'marker': string;
17
+ 'node': string;
18
+ 'overlay': string;
19
+ 'primary': string;
20
+ 'root': string;
21
+ 'selected': string;
22
+ 'zoom': string;
23
23
  }
24
24
  export const cssExports: CssExports;
25
25
  export default cssExports;
@@ -1,3 +1,5 @@
1
+ @import 'lib/theme.styl'
2
+
1
3
  .switchRoot
2
4
  position relative
3
5
  display inline-flex
@@ -9,14 +11,11 @@
9
11
  background-color var(--input)
10
12
  transition background-color 0.15s ease-in-out
11
13
  outline none
14
+ focus-outline()
12
15
 
13
16
  &[data-state=checked]
14
17
  background-color var(--primary)
15
18
 
16
- &:focus-visible
17
- outline 2px solid var(--primary)
18
- outline-offset 2px
19
-
20
19
  &:disabled
21
20
  cursor not-allowed
22
21
  opacity 0.5
@@ -1,3 +1,5 @@
1
+ @import 'lib/theme.styl'
2
+
1
3
  .root
2
4
  display flex
3
5
  flex-direction column
@@ -48,12 +50,7 @@
48
50
  color var(--muted-foreground)
49
51
  transition color 0.2s, box-shadow 0.2s
50
52
  cursor pointer
51
-
52
- &:focus-visible
53
- outline 1px solid var(--ring)
54
- outline-offset 0
55
- border-color var(--ring)
56
- box-shadow 0 0 0 3px var(--ring-50)
53
+ focus-outline()
57
54
 
58
55
  &:disabled
59
56
  pointer-events none
@@ -1,3 +1,5 @@
1
+ @import 'lib/theme.styl'
2
+
1
3
  .toggle
2
4
  display inline-flex
3
5
  align-items center
@@ -33,9 +35,7 @@
33
35
  width 1rem
34
36
  height 1rem
35
37
 
36
- &:focus-visible
37
- outline none
38
- box-shadow 0 0 0 2px var(--ring)
38
+ focus-outline()
39
39
 
40
40
  transition all 0.15s ease-in-out
41
41
 
@@ -1,3 +1,4 @@
1
+ @import 'lib/theme.styl'
1
2
 
2
3
  // Container styles for ToggleGroup
3
4
  .container
@@ -26,6 +27,8 @@
26
27
  &:focus
27
28
  z-index 10
28
29
 
30
+ focus-outline()
31
+
29
32
  &:focus-visible
30
33
  z-index 10
31
34
 
@@ -113,6 +113,7 @@
113
113
  padding var(--p-3)
114
114
  cursor pointer
115
115
  outline none
116
+ focus-outline()
116
117
 
117
118
  .itemActive
118
119
  background-color var(--muted)
@@ -9,13 +9,11 @@ $msOffset = 30ms
9
9
  transform translateX(-50%) translateY(-50%)
10
10
  cursor pointer
11
11
  outline none
12
+ focus-outline()
12
13
 
13
14
  &:hover
14
15
  transition transform 300ms ease-out
15
16
 
16
- &:focus
17
- outline none
18
-
19
17
  .loadingHidden
20
18
  opacity 0
21
19
  pointer-events none
package/src/index.ts CHANGED
@@ -85,7 +85,5 @@ export * from './components/widgets/DriverCard';
85
85
  export * from './components/widgets/DriverMap';
86
86
  export * from './components/widgets/DriversComparisonChart';
87
87
  export * from './components/widgets/PerformanceChart';
88
- export * from './components/widgets/SybilionAppHeader';
89
88
  export * from './components/widgets/SybilionAuthLayout';
90
- export * from './components/widgets/SybilionSignInPanel';
91
- export * from './components/widgets/SignInPage';
89
+ // SPA/router widgets (react-router-dom): `@sybilion/uilib/signin`
@@ -17,6 +17,23 @@ line-clamp($lines)
17
17
  -webkit-line-clamp $lines
18
18
  -webkit-box-orient vertical
19
19
 
20
+ focus-outline-style()
21
+ outline var(--focus-outline-width, 2px) solid var(--focus-outline-color, var(--ring))
22
+ outline-offset var(--focus-outline-offset, 2px)
23
+
24
+ focus-outline-target()
25
+ &:not(:disabled):not([aria-disabled='true']):not([data-disabled])
26
+ focus-outline-style()
27
+
28
+ focus-outline()
29
+ &:focus-visible
30
+ focus-outline-target()
31
+
32
+ focus-outline-within()
33
+ &:focus-visible
34
+ &:focus-within
35
+ focus-outline-target()
36
+
20
37
  :global(:root)
21
38
  @media (max-width: MOBILE)
22
39
  --page-x-padding: var(--p-6)
package/src/signin.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * from './components/widgets/SybilionSignInPanel';
2
+ export * from './components/widgets/SignInPage';
3
+ export * from './components/widgets/SybilionAppHeader';