@sybilion/uilib 1.5.0 → 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 (27) hide show
  1. package/README.md +16 -0
  2. package/assets/base.css +149 -0
  3. package/assets/globals.css +10 -564
  4. package/assets/tokens.css +288 -0
  5. package/dist/esm/src/components/ui/Breadcrumb/Breadcrumb.js +2 -2
  6. package/dist/esm/src/components/ui/Chat/ChatChrome/ChatChrome.js +1 -1
  7. package/dist/esm/src/components/ui/DropdownMenu/DropdownMenu.js +3 -3
  8. package/dist/esm/src/components/ui/DropdownMenu/DropdownMenu.styl.js +2 -2
  9. package/dist/esm/src/components/ui/Sheet/Sheet.js +1 -1
  10. package/dist/esm/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.js +1 -1
  11. package/dist/esm/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.styl.js +1 -1
  12. package/dist/esm/src/components/widgets/DriverMap/driverCategoryIcon.js +23 -23
  13. package/dist/esm/types/tests/cssEntries.test.d.ts +1 -0
  14. package/package.json +4 -3
  15. package/src/components/ui/Breadcrumb/Breadcrumb.tsx +1 -2
  16. package/src/components/ui/Chat/ChatChrome/ChatChrome.tsx +1 -1
  17. package/src/components/ui/Chat/ChatPrompt/ChatPrompt.styl.d.ts +11 -11
  18. package/src/components/ui/DropdownMenu/DropdownMenu.styl +3 -0
  19. package/src/components/ui/DropdownMenu/DropdownMenu.styl.d.ts +1 -0
  20. package/src/components/ui/DropdownMenu/DropdownMenu.tsx +3 -3
  21. package/src/components/ui/Select/Select.styl.d.ts +28 -28
  22. package/src/components/ui/Sheet/Sheet.tsx +1 -1
  23. package/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.styl +1 -0
  24. package/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.tsx +1 -1
  25. package/src/components/ui/SupplyChainMap/SupplyChainMap.styl.d.ts +19 -19
  26. package/src/components/widgets/DriverMap/driverCategoryIcon.tsx +23 -23
  27. package/src/docs/pages/SpacingPage.tsx +1 -1
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
+ }