@sybilion/uilib 1.4.43 → 1.6.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 (96) hide show
  1. package/README.md +16 -0
  2. package/assets/base.css +149 -0
  3. package/assets/globals.css +10 -532
  4. package/assets/tokens.css +288 -0
  5. package/dist/esm/src/components/ui/AnalysesSelector/AnalysesSelector.styl.js +1 -1
  6. package/dist/esm/src/components/ui/AppHeader/AppHeader.styl.js +1 -1
  7. package/dist/esm/src/components/ui/Breadcrumb/Breadcrumb.js +2 -2
  8. package/dist/esm/src/components/ui/Breadcrumb/Breadcrumb.styl.js +1 -1
  9. package/dist/esm/src/components/ui/Button/Button.styl.js +1 -1
  10. package/dist/esm/src/components/ui/Chat/ChatChrome/ChatChrome.js +1 -1
  11. package/dist/esm/src/components/ui/Chat/ChatPrompt/ChatPrompt.js +15 -2
  12. package/dist/esm/src/components/ui/Chat/ChatPrompt/ChatPrompt.styl.js +2 -2
  13. package/dist/esm/src/components/ui/Checkbox/Checkbox.styl.js +1 -1
  14. package/dist/esm/src/components/ui/Chip/Chip.styl.js +1 -1
  15. package/dist/esm/src/components/ui/DatePicker/DatePicker.styl.js +1 -1
  16. package/dist/esm/src/components/ui/Dialog/Dialog.styl.js +1 -1
  17. package/dist/esm/src/components/ui/DropdownMenu/DropdownMenu.js +3 -3
  18. package/dist/esm/src/components/ui/DropdownMenu/DropdownMenu.styl.js +2 -2
  19. package/dist/esm/src/components/ui/FileChip/FileChip.styl.js +1 -1
  20. package/dist/esm/src/components/ui/Input/Input.styl.js +1 -1
  21. package/dist/esm/src/components/ui/LegacyPlatformLink/LegacyPlatformLink.styl.js +1 -1
  22. package/dist/esm/src/components/ui/Notifications/Notifications.styl.js +1 -1
  23. package/dist/esm/src/components/ui/RadioGroup/RadioGroup.styl.js +1 -1
  24. package/dist/esm/src/components/ui/Renamer/Renamer.styl.js +2 -2
  25. package/dist/esm/src/components/ui/Select/Select.styl.js +1 -1
  26. package/dist/esm/src/components/ui/Sheet/Sheet.js +1 -1
  27. package/dist/esm/src/components/ui/Sheet/Sheet.styl.js +1 -1
  28. package/dist/esm/src/components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.styl.js +1 -1
  29. package/dist/esm/src/components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.styl.js +1 -1
  30. package/dist/esm/src/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.styl.js +1 -1
  31. package/dist/esm/src/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.styl.js +1 -1
  32. package/dist/esm/src/components/ui/Sidebar/SidebarRail/SidebarRail.styl.js +1 -1
  33. package/dist/esm/src/components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.styl.js +1 -1
  34. package/dist/esm/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.js +1 -1
  35. package/dist/esm/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.styl.js +1 -1
  36. package/dist/esm/src/components/ui/Slider/Slider.styl.js +1 -1
  37. package/dist/esm/src/components/ui/SupplyChainMap/SupplyChainMap.styl.js +1 -1
  38. package/dist/esm/src/components/ui/Switch/Switch.styl.js +1 -1
  39. package/dist/esm/src/components/ui/Tabs/Tabs.styl.js +1 -1
  40. package/dist/esm/src/components/ui/Toggle/Toggle.styl.js +1 -1
  41. package/dist/esm/src/components/ui/ToggleGroup/ToggleGroup.styl.js +1 -1
  42. package/dist/esm/src/components/ui/WorkspaceAppSwitcher/WorkspaceAppSwitcher.styl.js +1 -1
  43. package/dist/esm/src/components/widgets/DriverMap/DriverIcon/DriverIcon.styl.js +1 -1
  44. package/dist/esm/src/components/widgets/DriverMap/driverCategoryIcon.js +23 -23
  45. package/dist/esm/src/components/widgets/SignInPage/SignInPage.js +25 -0
  46. package/dist/esm/src/components/widgets/SybilionAppHeader/SybilionAppHeader.js +18 -0
  47. package/dist/esm/src/components/widgets/SybilionAppHeader/SybilionAppHeader.styl.js +7 -0
  48. package/dist/esm/src/components/widgets/SybilionSignInPanel/SybilionSignInPanel.js +11 -0
  49. package/dist/esm/src/components/widgets/SybilionSignInPanel/SybilionSignInPanel.styl.js +7 -0
  50. package/dist/esm/src/signin.js +3 -0
  51. package/dist/esm/types/tests/cssEntries.test.d.ts +1 -0
  52. package/package.json +4 -3
  53. package/src/components/ui/AnalysesSelector/AnalysesSelector.styl +3 -0
  54. package/src/components/ui/AppHeader/AppHeader.styl +3 -0
  55. package/src/components/ui/Breadcrumb/Breadcrumb.styl +1 -0
  56. package/src/components/ui/Breadcrumb/Breadcrumb.tsx +1 -2
  57. package/src/components/ui/Button/Button.styl +3 -10
  58. package/src/components/ui/Chat/ChatChrome/ChatChrome.tsx +1 -1
  59. package/src/components/ui/Chat/ChatPrompt/ChatPrompt.styl +8 -3
  60. package/src/components/ui/Chat/ChatPrompt/ChatPrompt.styl.d.ts +11 -10
  61. package/src/components/ui/Chat/ChatPrompt/ChatPrompt.tsx +28 -1
  62. package/src/components/ui/Checkbox/Checkbox.styl +3 -4
  63. package/src/components/ui/Chip/Chip.styl +3 -0
  64. package/src/components/ui/DatePicker/DatePicker.styl +5 -3
  65. package/src/components/ui/Dialog/Dialog.styl +1 -2
  66. package/src/components/ui/DropdownMenu/DropdownMenu.styl +7 -0
  67. package/src/components/ui/DropdownMenu/DropdownMenu.styl.d.ts +1 -0
  68. package/src/components/ui/DropdownMenu/DropdownMenu.tsx +3 -3
  69. package/src/components/ui/FileChip/FileChip.styl +3 -3
  70. package/src/components/ui/Input/Input.styl +13 -6
  71. package/src/components/ui/LegacyPlatformLink/LegacyPlatformLink.styl +1 -0
  72. package/src/components/ui/Notifications/Notifications.styl +7 -0
  73. package/src/components/ui/RadioGroup/RadioGroup.styl +3 -4
  74. package/src/components/ui/Renamer/Renamer.styl +5 -1
  75. package/src/components/ui/Select/Select.styl +5 -7
  76. package/src/components/ui/Sheet/Sheet.styl +1 -6
  77. package/src/components/ui/Sheet/Sheet.tsx +1 -1
  78. package/src/components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.styl +1 -2
  79. package/src/components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.styl +1 -2
  80. package/src/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.styl +1 -2
  81. package/src/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.styl +1 -2
  82. package/src/components/ui/Sidebar/SidebarRail/SidebarRail.styl +1 -0
  83. package/src/components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.styl +1 -0
  84. package/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.styl +1 -0
  85. package/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.tsx +1 -1
  86. package/src/components/ui/Slider/Slider.styl +3 -4
  87. package/src/components/ui/SupplyChainMap/SupplyChainMap.styl +1 -0
  88. package/src/components/ui/Switch/Switch.styl +3 -4
  89. package/src/components/ui/Tabs/Tabs.styl +3 -6
  90. package/src/components/ui/Toggle/Toggle.styl +3 -3
  91. package/src/components/ui/ToggleGroup/ToggleGroup.styl +3 -0
  92. package/src/components/ui/WorkspaceAppSwitcher/WorkspaceAppSwitcher.styl +1 -0
  93. package/src/components/widgets/DriverMap/DriverIcon/DriverIcon.styl +1 -3
  94. package/src/components/widgets/DriverMap/driverCategoryIcon.tsx +23 -23
  95. package/src/docs/pages/SpacingPage.tsx +1 -1
  96. package/src/lib/theme.styl +17 -0
package/README.md CHANGED
@@ -22,6 +22,22 @@ Equivalent in `package.json`:
22
22
  }
23
23
  ```
24
24
 
25
+ ### Global styles
26
+
27
+ Import the design tokens (and optionally the base element styles) once, from your app's global stylesheet. Don't copy them into the app.
28
+
29
+ ```css
30
+ @import '@sybilion/uilib/tokens.css'; /* :root + .dark custom properties, fonts */
31
+ @import '@sybilion/uilib/base.css'; /* optional: reset, element defaults, focus ring */
32
+
33
+ :root {
34
+ /* app overrides go after the imports, e.g. the brand slot (default: purple) */
35
+ --brand-color: var(--sb-cyan-400);
36
+ }
37
+ ```
38
+
39
+ Both files are plain CSS; uilib does not use Tailwind. Apps that run Tailwind keep their own `@theme` mapping onto these tokens.
40
+
25
41
  ### Bare `uilib` imports + scoped install
26
42
 
27
43
  When the package is installed as `@sybilion/uilib` but you keep imports as `from 'uilib'`, add a bundler alias and matching TypeScript paths:
@@ -0,0 +1,149 @@
1
+ /*
2
+ * Sybilion base element styles. Plain CSS, no Tailwind. Requires tokens.css.
3
+ * Import: @import '@sybilion/uilib/base.css';
4
+ * Everything except the focus ring lives in `@layer base`, so any unlayered
5
+ * app or component rule wins over it.
6
+ */
7
+
8
+ /* Keyboard focus ring. Intentionally unlayered so it wins over component
9
+ `outline: none` resets; override via --focus-outline-* tokens. */
10
+ :where(
11
+ a,
12
+ button,
13
+ input,
14
+ textarea,
15
+ select,
16
+ summary,
17
+ [href],
18
+ [tabindex]:not([tabindex='-1']),
19
+ [contenteditable='true'],
20
+ [role='button'],
21
+ [role='tab'],
22
+ [role='menuitem'],
23
+ [role='menuitemcheckbox'],
24
+ [role='menuitemradio'],
25
+ [role='option'],
26
+ [role='checkbox'],
27
+ [role='radio'],
28
+ [role='switch'],
29
+ [role='slider'],
30
+ [role='combobox'],
31
+ [role='listbox'],
32
+ [role='link'],
33
+ [role='spinbutton']
34
+ ):focus-visible:not(:disabled):not([aria-disabled='true']):not(
35
+ [data-disabled]
36
+ ) {
37
+ outline: var(--focus-outline-width, 2px) solid
38
+ var(--focus-outline-color, var(--ring));
39
+ outline-offset: var(--focus-outline-offset, 2px);
40
+ }
41
+
42
+ @layer base {
43
+ * {
44
+ margin: 0;
45
+ padding: 0;
46
+ border: 0;
47
+ font-family: 'Manrope', sans-serif;
48
+ outline: none;
49
+ -webkit-tap-highlight-color: transparent;
50
+ box-sizing: border-box;
51
+ border-collapse: collapse;
52
+ border-spacing: 0;
53
+ }
54
+
55
+ html,
56
+ body {
57
+ overscroll-behavior-y: none;
58
+ }
59
+
60
+ html {
61
+ background-color: var(--background);
62
+ }
63
+
64
+ body {
65
+ min-height: 100vh;
66
+ background-color: var(--background);
67
+ color: var(--foreground);
68
+ font-family: var(--font-family-body);
69
+ font-weight: 400;
70
+ font-size: var(--text-sm);
71
+ line-height: 1.6;
72
+ }
73
+
74
+ #app-root {
75
+ max-height: 100vh;
76
+ overflow: hidden;
77
+ min-height: 100vh;
78
+ background-color: var(--background);
79
+ color: var(--foreground);
80
+ }
81
+
82
+ h1,
83
+ h2,
84
+ h3 {
85
+ font-family: var(--font-family-heading);
86
+ }
87
+
88
+ h1 {
89
+ font-weight: 500;
90
+ font-size: var(--text-3xl);
91
+ line-height: 1.4;
92
+ user-select: text;
93
+ }
94
+
95
+ h2 {
96
+ font-weight: 300;
97
+ font-size: var(--text-2xl);
98
+ line-height: 1.4;
99
+ }
100
+
101
+ h3 {
102
+ font-weight: 500;
103
+ font-size: var(--text-xl);
104
+ line-height: 1.4;
105
+ }
106
+
107
+ label {
108
+ cursor: pointer;
109
+ font-weight: 500;
110
+ }
111
+
112
+ button,
113
+ input,
114
+ select,
115
+ optgroup,
116
+ textarea,
117
+ ::file-selector-button {
118
+ font: inherit; /* 1 */
119
+ font-feature-settings: inherit; /* 1 */
120
+ font-variation-settings: inherit; /* 1 */
121
+ letter-spacing: inherit; /* 1 */
122
+ color: inherit; /* 1 */
123
+ border-radius: 0; /* 2 */
124
+ background-color: transparent; /* 3 */
125
+ opacity: 1; /* 4 */
126
+ }
127
+
128
+ button {
129
+ font-weight: 500;
130
+ }
131
+
132
+ a {
133
+ color: var(--link-color);
134
+ cursor: pointer;
135
+ }
136
+
137
+ a:visited {
138
+ color: var(--link-color-active);
139
+ }
140
+
141
+ a:hover {
142
+ text-decoration: underline;
143
+ color: var(--link-color-hover);
144
+ }
145
+
146
+ ::selection {
147
+ background-color: var(--brand-color-bg, var(--brand-color));
148
+ }
149
+ }