softui-css 1.7.0 → 1.8.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 CHANGED
@@ -30,12 +30,13 @@
30
30
 
31
31
  ## Highlights
32
32
 
33
- | | |
33
+ | Feature | Description |
34
34
  |---|---|
35
- | **44+ Components** | Buttons, Cards, Modals, Tables, Tabs, Calendar, Charts, and more |
35
+ | **60+ Components** | Buttons, Cards, Modals, Tables, Tabs, Calendar, Charts, and more |
36
36
  | **Dark Mode** | Add `data-theme="dark"` and everything adapts |
37
37
  | **Zero Dependencies** | Pure CSS + vanilla JS. No build step required |
38
38
  | **CSS Variables** | Fully customizable via custom properties |
39
+ | **Design Tokens** | `tokens.json` for syncing with Tailwind, Figma, or any tool |
39
40
  | **Responsive Grid** | 12-column flexbox grid with breakpoints and gap utilities |
40
41
  | **Interactive Playground** | Write HTML and preview components live in the browser |
41
42
 
@@ -93,23 +94,23 @@ That's it. Every component adapts automatically.
93
94
 
94
95
  ## Components
95
96
 
96
- **Layout** — Container, Grid, Flex utilities
97
+ **Forms** — Input, Select, Textarea, Toggle, Checkbox, Radio, Slider, OTP, Combobox, Color Picker, File Upload, Tags Input, Number Input, Password Input
97
98
 
98
- **Forms** — Input, Select, Textarea, Toggle, Checkbox, Radio, Slider, OTP, Combobox
99
+ **General** — Buttons, Button Group, Card, Badge, Avatar, Chip, Divider, Kbd, Copy Button, Swap
99
100
 
100
- **Data Display** — Table, Data Table, Card, Badge, Avatar, Kbd, Chart
101
+ **Data Display** — Table, Data Table, Chart, Stat Card, Timeline, Chat Bubble, Calendar, Tree View, Radial Progress, Rating
101
102
 
102
- **Feedback** — Alert, Toast, Progress, Skeleton, Spinner
103
+ **Feedback** — Alert, Toast, Progress, Skeleton, Spinner, Loading Overlay
103
104
 
104
- **Navigation** — Navbar, Tabs, Breadcrumb, Pagination, Stepper, Menubar
105
+ **Navigation** — Navbar, Tabs, Breadcrumb, Pagination, Stepper, Menubar, Sidebar, Dock, Speed Dial, Tour
105
106
 
106
- **Overlay** — Modal, Sheet, Dropdown, Popover, Hover Card, Tooltip, Context Menu, Command Palette
107
+ **Overlays** — Modal, Sheet, Dropdown, Popover, Hover Card, Tooltip, Context Menu, Command Palette, Image Lightbox
107
108
 
108
- **Interactive** — Accordion, Collapsible, Carousel, Toggle Group, Calendar, Drag & Drop
109
+ **Layout** — Container, Grid, Flex utilities, Resizable, Scroll Area, Collapsible, Accordion, Carousel, Toggle Group, Drag & Drop
109
110
 
110
- **Content** — Chip, Divider, Scroll Area, Resizable, Button Group
111
+ **Media** — Diff, Stack, Browser Mockup, Phone Mockup, Marquee, Typewriter, Text Rotate
111
112
 
112
- **Utilities** — Shadows, Radius, Spacing, Text, Aspect Ratio, Typography
113
+ **Utilities** — Shadows, Radius, Spacing, Text, Typography, Aspect Ratio, Display, Position, Sizing, Opacity, Cursor, Flex
113
114
 
114
115
  > Browse all components at [softui-css.netlify.app](https://softui-css.netlify.app) or try them in the [Playground](https://softui-css.netlify.app/playground/).
115
116
 
@@ -127,6 +128,18 @@ SoftUI is built on CSS custom properties. Override them to make it yours:
127
128
  }
128
129
  ```
129
130
 
131
+ ### Design Tokens
132
+
133
+ All design values are also available as JSON for use with Tailwind, Figma, or any tool:
134
+
135
+ ```js
136
+ import tokens from 'softui-css/dist/tokens.json';
137
+ // tokens.colors.primary → "#5B54E0"
138
+ // tokens.radius.default → "16px"
139
+ ```
140
+
141
+ See the [Theming Guide](https://softui-css.netlify.app/theming/) for the full variable reference.
142
+
130
143
  ---
131
144
 
132
145
  ## Browser Support
package/dist/softui.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! SoftUI v1.1.0 — A Neumorphic CSS Library */
1
+ /*! SoftUI v1.8.0 — A Neumorphic CSS Library */
2
2
 
3
3
  /* ===========================================
4
4
  CSS Variables / Tokens
@@ -23,8 +23,8 @@
23
23
  --sui-info-hover: #146BAE;
24
24
 
25
25
  --sui-text: #2D3748;
26
- --sui-text-muted: #8492A6;
27
- --sui-text-light: #A0AEC0;
26
+ --sui-text-muted: #5A6A7E;
27
+ --sui-text-light: #6A7D94;
28
28
 
29
29
  --sui-radius-xs: 6px;
30
30
  --sui-radius: 16px;
@@ -59,7 +59,7 @@
59
59
 
60
60
  --sui-text: #E2E8F0;
61
61
  --sui-text-muted: #9BA5B8;
62
- --sui-text-light: #7A8494;
62
+ --sui-text-light: #8A94A6;
63
63
  }
64
64
  [data-theme="dark"] .sui-badge-warning,
65
65
  [data-theme="dark"] .sui-btn-warning,
@@ -85,6 +85,7 @@ body {
85
85
  color: var(--sui-text);
86
86
  font-size: 15px;
87
87
  line-height: 1.6;
88
+ opacity: 1;
88
89
  -webkit-font-smoothing: antialiased;
89
90
  -moz-osx-font-smoothing: grayscale;
90
91
  transition: background var(--sui-transition-base) ease, color var(--sui-transition-base) ease;
@@ -131,6 +132,11 @@ a {
131
132
  a:hover {
132
133
  color: var(--sui-primary-hover);
133
134
  }
135
+ a:focus-visible {
136
+ outline: 2px solid var(--sui-primary);
137
+ outline-offset: 2px;
138
+ border-radius: 2px;
139
+ }
134
140
 
135
141
  /* ===========================================
136
142
  Buttons
@@ -4827,7 +4833,7 @@ a.sui-btn-warning:visited {
4827
4833
  color: var(--sui-text-light);
4828
4834
  }
4829
4835
 
4830
- .sui-combobox-input:focus {
4836
+ .sui-combobox-input:focus-visible {
4831
4837
  box-shadow: var(--sui-shadow-inset-sm), 0 0 0 2px rgba(124, 92, 252, 0.2);
4832
4838
  }
4833
4839
 
@@ -8298,6 +8304,12 @@ a.sui-btn-warning:visited {
8298
8304
  color: var(--sui-text);
8299
8305
  }
8300
8306
 
8307
+ .sui-sidebar-nav li a:focus-visible,
8308
+ .sui-sidebar-nav li button:focus-visible {
8309
+ outline: 2px solid var(--sui-primary);
8310
+ outline-offset: -2px;
8311
+ }
8312
+
8301
8313
  .sui-sidebar-nav li a.active,
8302
8314
  .sui-sidebar-nav li button.active {
8303
8315
  background: rgba(91, 84, 224, 0.1);
@@ -9835,7 +9847,7 @@ a.sui-btn-warning:visited {
9835
9847
  width: 100%;
9836
9848
  }
9837
9849
 
9838
- .sui-color-spectrum-hex input:focus {
9850
+ .sui-color-spectrum-hex input:focus-visible {
9839
9851
  box-shadow: var(--sui-shadow-inset-sm), 0 0 0 2px var(--sui-primary);
9840
9852
  }
9841
9853
 
@@ -9867,7 +9879,7 @@ a.sui-btn-warning:visited {
9867
9879
  outline: none;
9868
9880
  }
9869
9881
 
9870
- .sui-color-spectrum-rgb-field input:focus {
9882
+ .sui-color-spectrum-rgb-field input:focus-visible {
9871
9883
  box-shadow: var(--sui-shadow-inset-sm), 0 0 0 2px var(--sui-primary);
9872
9884
  }
9873
9885
 
@@ -12599,3 +12611,16 @@ a.sui-btn-warning:visited {
12599
12611
  box-shadow: var(--sui-shadow-raised);
12600
12612
  }
12601
12613
 
12614
+ /* ===========================================
12615
+ Reduced Motion
12616
+ =========================================== */
12617
+ @media (prefers-reduced-motion: reduce) {
12618
+ *, *::before, *::after {
12619
+ animation-duration: 0.01ms !important;
12620
+ animation-iteration-count: 1 !important;
12621
+ transition-duration: 0.01ms !important;
12622
+ scroll-behavior: auto !important;
12623
+ }
12624
+ }
12625
+
12626
+
package/dist/softui.js CHANGED
@@ -576,6 +576,7 @@ const SoftUI = (() => {
576
576
  el.className = cls;
577
577
  el.setAttribute('role', 'alert');
578
578
  el.setAttribute('aria-live', 'polite');
579
+ el.setAttribute('aria-atomic', 'true');
579
580
 
580
581
  let html = '<div class="sui-toast-body">';
581
582
  if (opts.title) html += '<div class="sui-toast-title">' + opts.title + '</div>';
@@ -675,15 +676,30 @@ const SoftUI = (() => {
675
676
  });
676
677
  });
677
678
 
678
- // Escape closes dropdowns
679
+ // Escape closes dropdowns, arrow keys navigate items
679
680
  document.addEventListener('keydown', (e) => {
680
681
  if (e.key === 'Escape') {
681
682
  document.querySelectorAll('.sui-dropdown.open, .sui-dropdown-split.open').forEach(d => {
682
683
  d.classList.remove('open');
683
684
  const t = d.querySelector('[data-sui-dropdown], .sui-dropdown-toggle');
684
- if (t) t.setAttribute('aria-expanded', 'false');
685
+ if (t) { t.setAttribute('aria-expanded', 'false'); t.focus(); }
685
686
  });
686
687
  }
688
+ if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {
689
+ const openDD = document.querySelector('.sui-dropdown.open, .sui-dropdown-split.open');
690
+ if (!openDD) return;
691
+ const items = Array.from(openDD.querySelectorAll('.sui-dropdown-item:not(.disabled)'));
692
+ if (!items.length) return;
693
+ e.preventDefault();
694
+ const cur = items.indexOf(document.activeElement);
695
+ let next;
696
+ if (e.key === 'ArrowDown') {
697
+ next = cur < items.length - 1 ? cur + 1 : 0;
698
+ } else {
699
+ next = cur > 0 ? cur - 1 : items.length - 1;
700
+ }
701
+ items[next].focus();
702
+ }
687
703
  });
688
704
  }
689
705