@nubitio/ui 0.11.3 → 1.0.0-rc.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/dist/index.cjs CHANGED
@@ -1402,7 +1402,6 @@ const Chip = ({ label, active = false, count, icon, size = "md", disabled = fals
1402
1402
  type: "button",
1403
1403
  role: "checkbox",
1404
1404
  "aria-checked": active,
1405
- "aria-pressed": active,
1406
1405
  disabled,
1407
1406
  className: `nb-chip${size !== "md" ? ` nb-chip--${size}` : ""}${active ? " is-active" : ""}${className ? ` ${className}` : ""}`,
1408
1407
  onClick,
@@ -2007,6 +2006,7 @@ const parseDisplayDate = (text, locale) => {
2007
2006
  const DatePicker = (0, react.forwardRef)(function DatePicker({ id, name, value, placeholder = "dd/mm/yyyy", disabled = false, readOnly = false, required = false, invalid = false, clearable = true, locale, min, max, className, ariaLabel, onChange, onBlur }, ref) {
2008
2007
  const generatedId = (0, react.useId)();
2009
2008
  const inputId = id ?? generatedId;
2009
+ const panelId = `${inputId}-panel`;
2010
2010
  const strings = useUiStrings();
2011
2011
  const selectedDate = parseIsoDate$1(value);
2012
2012
  const resolvedLocale = getLocale$1(locale);
@@ -2192,8 +2192,10 @@ const DatePicker = (0, react.forwardRef)(function DatePicker({ id, name, value,
2192
2192
  disabled,
2193
2193
  readOnly,
2194
2194
  "aria-label": ariaLabel,
2195
+ role: "combobox",
2195
2196
  "aria-haspopup": "dialog",
2196
2197
  "aria-expanded": open,
2198
+ "aria-controls": open ? panelId : void 0,
2197
2199
  "aria-invalid": invalid || void 0,
2198
2200
  "aria-required": required || void 0,
2199
2201
  autoComplete: "off",
@@ -2228,6 +2230,7 @@ const DatePicker = (0, react.forwardRef)(function DatePicker({ id, name, value,
2228
2230
  }),
2229
2231
  open && (0, react_dom.createPortal)(/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2230
2232
  ref: panelRef,
2233
+ id: panelId,
2231
2234
  className: "nb-date-picker__panel",
2232
2235
  role: "dialog",
2233
2236
  "aria-label": strings.selectDate,
package/dist/index.mjs CHANGED
@@ -1378,7 +1378,6 @@ const Chip = ({ label, active = false, count, icon, size = "md", disabled = fals
1378
1378
  type: "button",
1379
1379
  role: "checkbox",
1380
1380
  "aria-checked": active,
1381
- "aria-pressed": active,
1382
1381
  disabled,
1383
1382
  className: `nb-chip${size !== "md" ? ` nb-chip--${size}` : ""}${active ? " is-active" : ""}${className ? ` ${className}` : ""}`,
1384
1383
  onClick,
@@ -1983,6 +1982,7 @@ const parseDisplayDate = (text, locale) => {
1983
1982
  const DatePicker = forwardRef(function DatePicker({ id, name, value, placeholder = "dd/mm/yyyy", disabled = false, readOnly = false, required = false, invalid = false, clearable = true, locale, min, max, className, ariaLabel, onChange, onBlur }, ref) {
1984
1983
  const generatedId = useId();
1985
1984
  const inputId = id ?? generatedId;
1985
+ const panelId = `${inputId}-panel`;
1986
1986
  const strings = useUiStrings();
1987
1987
  const selectedDate = parseIsoDate$1(value);
1988
1988
  const resolvedLocale = getLocale$1(locale);
@@ -2168,8 +2168,10 @@ const DatePicker = forwardRef(function DatePicker({ id, name, value, placeholder
2168
2168
  disabled,
2169
2169
  readOnly,
2170
2170
  "aria-label": ariaLabel,
2171
+ role: "combobox",
2171
2172
  "aria-haspopup": "dialog",
2172
2173
  "aria-expanded": open,
2174
+ "aria-controls": open ? panelId : void 0,
2173
2175
  "aria-invalid": invalid || void 0,
2174
2176
  "aria-required": required || void 0,
2175
2177
  autoComplete: "off",
@@ -2204,6 +2206,7 @@ const DatePicker = forwardRef(function DatePicker({ id, name, value, placeholder
2204
2206
  }),
2205
2207
  open && createPortal(/* @__PURE__ */ jsxs("div", {
2206
2208
  ref: panelRef,
2209
+ id: panelId,
2207
2210
  className: "nb-date-picker__panel",
2208
2211
  role: "dialog",
2209
2212
  "aria-label": strings.selectDate,
package/dist/style.css CHANGED
@@ -226,7 +226,7 @@ samp {
226
226
  justify-content: center;
227
227
  border-radius: 50%;
228
228
  background: oklch(50% 0.14 calc(var(--avatar-hue, 218) * 1deg));
229
- color: var(--on-accent-color);
229
+ color: #ffffff;
230
230
  font-family: var(--font-family-sans);
231
231
  font-weight: var(--font-weight-bold);
232
232
  letter-spacing: -0.02em;
@@ -1365,7 +1365,7 @@ html[data-density=compact] .nb-dialog__footer {
1365
1365
  .nb-badge--primary {
1366
1366
  background: color-mix(in srgb, var(--accent-color) 15%, transparent);
1367
1367
  border-color: color-mix(in srgb, var(--accent-color) 30%, transparent);
1368
- color: var(--accent-color);
1368
+ color: var(--accent-on-subtle);
1369
1369
  }
1370
1370
  .nb-badge--success {
1371
1371
  background: var(--status-success-bg, color-mix(in srgb, var(--success-color) 15%, transparent));
@@ -1385,7 +1385,7 @@ html[data-density=compact] .nb-dialog__footer {
1385
1385
  .nb-badge--info {
1386
1386
  background: var(--status-info-bg, color-mix(in srgb, var(--info-color) 15%, transparent));
1387
1387
  border-color: var(--status-info-border, color-mix(in srgb, var(--info-color) 30%, transparent));
1388
- color: var(--status-info-text, var(--info-color));
1388
+ color: var(--status-info-text, var(--accent-on-subtle));
1389
1389
  }
1390
1390
  .nb-badge--secondary {
1391
1391
  background: var(--surface-2);
@@ -1654,7 +1654,7 @@ html[data-density=compact] .nb-badge--sm {
1654
1654
  padding: 0.5rem 1rem;
1655
1655
  font-size: var(--font-size-md);
1656
1656
  }
1657
- .nb-chip:hover:not(.is-active):not([aria-pressed=true]):not(:disabled) {
1657
+ .nb-chip:hover:not(.is-active):not([aria-checked=true]):not(:disabled) {
1658
1658
  background: var(--surface-2);
1659
1659
  border-color: color-mix(in srgb, var(--accent-color) 28%, transparent);
1660
1660
  }
@@ -1662,12 +1662,12 @@ html[data-density=compact] .nb-badge--sm {
1662
1662
  outline: 2px solid var(--focus-ring-color);
1663
1663
  outline-offset: 2px;
1664
1664
  }
1665
- .nb-chip.is-active, .nb-chip[aria-pressed=true] {
1665
+ .nb-chip.is-active, .nb-chip[aria-checked=true] {
1666
1666
  border-color: color-mix(in srgb, var(--accent-color) 28%, transparent);
1667
1667
  background: color-mix(in srgb, var(--accent-color) 12%, transparent);
1668
- color: var(--accent-color);
1668
+ color: var(--accent-on-subtle);
1669
1669
  }
1670
- .nb-chip.is-active .nb-chip__count, .nb-chip[aria-pressed=true] .nb-chip__count {
1670
+ .nb-chip.is-active .nb-chip__count, .nb-chip[aria-checked=true] .nb-chip__count {
1671
1671
  background: color-mix(in srgb, var(--accent-color) 14%, transparent);
1672
1672
  }
1673
1673
  .nb-chip:disabled, .nb-chip[aria-disabled=true] {
@@ -11,6 +11,7 @@
11
11
  --accent-color: #60a5fa;
12
12
  --accent-hover: #7ab8fc;
13
13
  --accent-pressed: #4b8ef3;
14
+ --accent-on-subtle: var(--accent-color);
14
15
  --accent-subtle: color-mix(in srgb, var(--accent-color) 18%, var(--surface-0));
15
16
  --success-color: #4cc84c;
16
17
  --info-color: var(--accent-color);
@@ -26,6 +27,7 @@
26
27
  --text-primary: var(--base-text-color);
27
28
  --text-secondary: #c7c7c7;
28
29
  --text-tertiary: #969696;
30
+ --text-decorative: #6e6e6e;
29
31
  --text-disabled: #4d4d4d;
30
32
  --text-on-accent: var(--on-accent-color);
31
33
  --texteditor-edit-color: var(--text-primary);
@@ -11,6 +11,7 @@
11
11
  --accent-color: #2463eb;
12
12
  --accent-hover: #1d52d4;
13
13
  --accent-pressed: #1641b8;
14
+ --accent-on-subtle: #1d52d4;
14
15
  --accent-subtle: color-mix(in srgb, var(--accent-color) 10%, #fff);
15
16
  --success-color: #0e7a0b;
16
17
  --info-color: var(--accent-color);
@@ -25,7 +26,8 @@
25
26
  --base-border-color: var(--border-color);
26
27
  --text-primary: var(--base-text-color);
27
28
  --text-secondary: #616161;
28
- --text-tertiary: #8a8a8a;
29
+ --text-tertiary: #6e6e6e;
30
+ --text-decorative: #8a8a8a;
29
31
  --text-disabled: #bdbdbd;
30
32
  --text-on-accent: var(--on-accent-color);
31
33
  --texteditor-edit-color: var(--text-primary);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nubitio/ui",
3
- "version": "0.11.3",
3
+ "version": "1.0.0-rc.1",
4
4
  "type": "module",
5
5
  "description": "Visual primitives and theme system for the Nubit admin stack (dialogs, cards, toolbar, light/dark theme).",
6
6
  "license": "MIT",