@sybilion/uilib 1.5.0 → 1.6.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/README.md +17 -1
- package/assets/base.css +148 -0
- package/assets/globals.css +10 -564
- package/assets/tokens.css +288 -0
- package/dist/esm/src/components/ui/AnalysesSelector/AnalysesSelector.styl.js +1 -1
- package/dist/esm/src/components/ui/AppHeader/AppHeader.styl.js +1 -1
- package/dist/esm/src/components/ui/Breadcrumb/Breadcrumb.js +2 -2
- package/dist/esm/src/components/ui/Breadcrumb/Breadcrumb.styl.js +1 -1
- package/dist/esm/src/components/ui/Button/Button.styl.js +1 -1
- package/dist/esm/src/components/ui/Chat/ChatChrome/ChatChrome.js +1 -1
- package/dist/esm/src/components/ui/Checkbox/Checkbox.styl.js +1 -1
- package/dist/esm/src/components/ui/Chip/Chip.styl.js +1 -1
- package/dist/esm/src/components/ui/DatePicker/DatePicker.styl.js +1 -1
- package/dist/esm/src/components/ui/Dialog/Dialog.styl.js +1 -1
- package/dist/esm/src/components/ui/DropdownMenu/DropdownMenu.js +3 -3
- package/dist/esm/src/components/ui/DropdownMenu/DropdownMenu.styl.js +2 -2
- package/dist/esm/src/components/ui/FileChip/FileChip.styl.js +1 -1
- package/dist/esm/src/components/ui/Input/Input.styl.js +1 -1
- package/dist/esm/src/components/ui/LegacyPlatformLink/LegacyPlatformLink.styl.js +1 -1
- package/dist/esm/src/components/ui/Notifications/Notifications.styl.js +1 -1
- package/dist/esm/src/components/ui/RadioGroup/RadioGroup.styl.js +1 -1
- package/dist/esm/src/components/ui/Select/Select.styl.js +1 -1
- package/dist/esm/src/components/ui/Sheet/Sheet.js +1 -1
- package/dist/esm/src/components/ui/Sheet/Sheet.styl.js +1 -1
- package/dist/esm/src/components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.styl.js +1 -1
- package/dist/esm/src/components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.styl.js +1 -1
- package/dist/esm/src/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.styl.js +1 -1
- package/dist/esm/src/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.styl.js +1 -1
- package/dist/esm/src/components/ui/Sidebar/SidebarRail/SidebarRail.styl.js +1 -1
- package/dist/esm/src/components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.styl.js +1 -1
- package/dist/esm/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.js +1 -1
- package/dist/esm/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.styl.js +1 -1
- package/dist/esm/src/components/ui/Slider/Slider.styl.js +1 -1
- package/dist/esm/src/components/ui/SupplyChainMap/SupplyChainMap.styl.js +1 -1
- package/dist/esm/src/components/ui/SupplyChainMap/use-map-base-renderer.js +2 -2
- package/dist/esm/src/components/ui/Switch/Switch.styl.js +1 -1
- package/dist/esm/src/components/ui/Tabs/Tabs.styl.js +1 -1
- package/dist/esm/src/components/ui/Toggle/Toggle.styl.js +1 -1
- package/dist/esm/src/components/ui/ToggleGroup/ToggleGroup.styl.js +1 -1
- package/dist/esm/src/components/ui/WorkspaceAppSwitcher/WorkspaceAppSwitcher.styl.js +1 -1
- package/dist/esm/src/components/widgets/DriverMap/DriverIcon/DriverIcon.styl.js +1 -1
- package/dist/esm/src/components/widgets/DriverMap/driverCategoryIcon.js +23 -23
- package/dist/esm/types/src/docs/config/vite.config.d.ts +2 -0
- package/dist/esm/types/tests/buttonStyles.test.d.ts +1 -0
- package/dist/esm/types/tests/cssEntries.test.d.ts +1 -0
- package/dist/esm/types/tests/focusOutline.test.d.ts +1 -0
- package/package.json +9 -28
- package/src/components/ui/Breadcrumb/Breadcrumb.tsx +1 -2
- package/src/components/ui/Button/Button.styl +118 -104
- package/src/components/ui/Chat/ChatChrome/ChatChrome.tsx +1 -1
- package/src/components/ui/Chat/ChatPrompt/ChatPrompt.styl.d.ts +11 -11
- package/src/components/ui/DropdownMenu/DropdownMenu.styl +3 -0
- package/src/components/ui/DropdownMenu/DropdownMenu.styl.d.ts +1 -0
- package/src/components/ui/DropdownMenu/DropdownMenu.tsx +3 -3
- package/src/components/ui/Select/Select.styl.d.ts +28 -28
- package/src/components/ui/Sheet/Sheet.tsx +1 -1
- package/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.styl +1 -0
- package/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.tsx +1 -1
- package/src/components/ui/SupplyChainMap/SupplyChainMap.styl.d.ts +19 -19
- package/src/components/ui/SupplyChainMap/use-map-base-renderer.ts +2 -1
- package/src/components/widgets/DriverMap/driverCategoryIcon.tsx +23 -23
- package/src/docs/config/vite.config.ts +253 -0
- package/src/docs/pages/SpacingPage.tsx +1 -1
- package/src/lib/theme.styl +3 -1
- package/assets/index.html +0 -18
- package/src/docs/config/webpack.config.js +0 -275
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:
|
|
@@ -130,7 +146,7 @@ These areas expect the **app** to supply behavior or data (not vendored from pro
|
|
|
130
146
|
|
|
131
147
|
| Script | Description |
|
|
132
148
|
| --------------------- | ------------------------------------------- |
|
|
133
|
-
| `yarn dev` |
|
|
149
|
+
| `yarn dev` | Vite dev server for the docs app |
|
|
134
150
|
| `yarn docs:build` | Production build of docs to `build/` |
|
|
135
151
|
| `yarn build` | Rollup ESM build to `dist/esm` |
|
|
136
152
|
| `yarn build:watch` | Rollup in watch mode |
|
package/assets/base.css
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
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. Shown on
|
|
10
|
+
[aria-disabled] elements too: they stay focusable, so focus must stay visible. */
|
|
11
|
+
:where(
|
|
12
|
+
a,
|
|
13
|
+
button,
|
|
14
|
+
input,
|
|
15
|
+
textarea,
|
|
16
|
+
select,
|
|
17
|
+
summary,
|
|
18
|
+
[href],
|
|
19
|
+
[tabindex]:not([tabindex='-1']),
|
|
20
|
+
[contenteditable='true'],
|
|
21
|
+
[role='button'],
|
|
22
|
+
[role='tab'],
|
|
23
|
+
[role='menuitem'],
|
|
24
|
+
[role='menuitemcheckbox'],
|
|
25
|
+
[role='menuitemradio'],
|
|
26
|
+
[role='option'],
|
|
27
|
+
[role='checkbox'],
|
|
28
|
+
[role='radio'],
|
|
29
|
+
[role='switch'],
|
|
30
|
+
[role='slider'],
|
|
31
|
+
[role='combobox'],
|
|
32
|
+
[role='listbox'],
|
|
33
|
+
[role='link'],
|
|
34
|
+
[role='spinbutton']
|
|
35
|
+
):focus-visible:not(:disabled):not([data-disabled]) {
|
|
36
|
+
outline: var(--focus-outline-width, 2px) solid
|
|
37
|
+
var(--focus-outline-color, var(--ring));
|
|
38
|
+
outline-offset: var(--focus-outline-offset, 2px);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@layer base {
|
|
42
|
+
* {
|
|
43
|
+
margin: 0;
|
|
44
|
+
padding: 0;
|
|
45
|
+
border: 0;
|
|
46
|
+
font-family: 'Manrope', sans-serif;
|
|
47
|
+
outline: none;
|
|
48
|
+
-webkit-tap-highlight-color: transparent;
|
|
49
|
+
box-sizing: border-box;
|
|
50
|
+
border-collapse: collapse;
|
|
51
|
+
border-spacing: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
html,
|
|
55
|
+
body {
|
|
56
|
+
overscroll-behavior-y: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
html {
|
|
60
|
+
background-color: var(--background);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
body {
|
|
64
|
+
min-height: 100vh;
|
|
65
|
+
background-color: var(--background);
|
|
66
|
+
color: var(--foreground);
|
|
67
|
+
font-family: var(--font-family-body);
|
|
68
|
+
font-weight: 400;
|
|
69
|
+
font-size: var(--text-sm);
|
|
70
|
+
line-height: 1.6;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
#app-root {
|
|
74
|
+
max-height: 100vh;
|
|
75
|
+
overflow: hidden;
|
|
76
|
+
min-height: 100vh;
|
|
77
|
+
background-color: var(--background);
|
|
78
|
+
color: var(--foreground);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
h1,
|
|
82
|
+
h2,
|
|
83
|
+
h3 {
|
|
84
|
+
font-family: var(--font-family-heading);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
h1 {
|
|
88
|
+
font-weight: 500;
|
|
89
|
+
font-size: var(--text-3xl);
|
|
90
|
+
line-height: 1.4;
|
|
91
|
+
user-select: text;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
h2 {
|
|
95
|
+
font-weight: 300;
|
|
96
|
+
font-size: var(--text-2xl);
|
|
97
|
+
line-height: 1.4;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
h3 {
|
|
101
|
+
font-weight: 500;
|
|
102
|
+
font-size: var(--text-xl);
|
|
103
|
+
line-height: 1.4;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
label {
|
|
107
|
+
cursor: pointer;
|
|
108
|
+
font-weight: 500;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
button,
|
|
112
|
+
input,
|
|
113
|
+
select,
|
|
114
|
+
optgroup,
|
|
115
|
+
textarea,
|
|
116
|
+
::file-selector-button {
|
|
117
|
+
font: inherit; /* 1 */
|
|
118
|
+
font-feature-settings: inherit; /* 1 */
|
|
119
|
+
font-variation-settings: inherit; /* 1 */
|
|
120
|
+
letter-spacing: inherit; /* 1 */
|
|
121
|
+
color: inherit; /* 1 */
|
|
122
|
+
border-radius: 0; /* 2 */
|
|
123
|
+
background-color: transparent; /* 3 */
|
|
124
|
+
opacity: 1; /* 4 */
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
button {
|
|
128
|
+
font-weight: 500;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
a {
|
|
132
|
+
color: var(--link-color);
|
|
133
|
+
cursor: pointer;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
a:visited {
|
|
137
|
+
color: var(--link-color-active);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
a:hover {
|
|
141
|
+
text-decoration: underline;
|
|
142
|
+
color: var(--link-color-hover);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
::selection {
|
|
146
|
+
background-color: var(--brand-color-bg, var(--brand-color));
|
|
147
|
+
}
|
|
148
|
+
}
|