@discuss-ds/ui 0.41.0 → 0.42.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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @discuss-ds/ui
2
2
 
3
+ ## 0.42.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#157](https://github.com/TamyresLucas/Discuss-UI-Storybook/pull/157) [`c2bf901`](https://github.com/TamyresLucas/Discuss-UI-Storybook/commit/c2bf9012c45f1ef264338c34a14d3c0796d247d5) Thanks [@TamyresLucas](https://github.com/TamyresLucas)! - An unselected tab in the default (filter) `TabNavigation` turns its text accent-foreground on hover (was the lighter accent).
8
+
9
+ ## 0.42.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#156](https://github.com/TamyresLucas/Discuss-UI-Storybook/pull/156) [`c2b4b3e`](https://github.com/TamyresLucas/Discuss-UI-Storybook/commit/c2b4b3e8f86c7b6e8b1f7f8d07fe09447d39ff15) Thanks [@TamyresLucas](https://github.com/TamyresLucas)! - `MediaInfo` gets `compact` (16px padding all round instead of 16px by 24px) and `VideoPlayer` passes it through as `compactInfo`, for players in small cards. Defaults are unchanged.
14
+
15
+ - [#154](https://github.com/TamyresLucas/Discuss-UI-Storybook/pull/154) [`6a3c7f1`](https://github.com/TamyresLucas/Discuss-UI-Storybook/commit/6a3c7f1c701f995bf2fba5376e3690971e2be375) Thanks [@TamyresLucas](https://github.com/TamyresLucas)! - `VideoPlayer` gets `aspect="video"`: the preview area is 16:9 (Full HD proportions) at the player's width instead of a fixed 242px. The default (`fixed`) is unchanged.
16
+
3
17
  ## 0.41.0
4
18
 
5
19
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -1297,7 +1297,7 @@ TabNavigation.displayName = "TabNavigation";
1297
1297
  // src/components/Navigation/TabItem.tsx
1298
1298
  var import_jsx_runtime21 = require("react/jsx-runtime");
1299
1299
  var base = "inline-flex h-7 items-center justify-center gap-1 whitespace-nowrap px-2.5 py-1 text-ui-label transition-colors disabled:pointer-events-none disabled:opacity-50";
1300
- var filter = "relative rounded-full text-surface-foreground hover:text-accent data-[state=active]:hover:bg-accent-soft data-[state=active]:hover:text-accent-soft-foreground disabled:text-muted-foreground";
1300
+ var filter = "relative rounded-full text-surface-foreground hover:text-accent-foreground data-[state=active]:hover:bg-accent-soft data-[state=active]:hover:text-accent-soft-foreground disabled:text-muted-foreground";
1301
1301
  var toggle = "relative rounded-sm text-secondary-muted-foreground hover:text-surface-foreground data-[state=active]:text-surface-foreground";
1302
1302
  var underline = "relative h-full rounded-none px-4 py-3 font-medium text-secondary-muted-foreground hover:text-surface-foreground data-[state=active]:font-semibold data-[state=active]:text-surface-foreground after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 data-[state=active]:after:bg-accent";
1303
1303
  var TabItem = React20.forwardRef(
@@ -2974,8 +2974,8 @@ var React42 = __toESM(require("react"), 1);
2974
2974
  var import_react21 = require("@phosphor-icons/react");
2975
2975
  var import_radix_ui21 = require("radix-ui");
2976
2976
  var import_jsx_runtime43 = require("react/jsx-runtime");
2977
- function MediaInfo({ name, details, onRemove, removeLabel, large, actions, className, ...props }) {
2978
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: cn("flex items-center justify-between border-t border-border bg-surface px-6 py-4", className), ...props, children: [
2977
+ function MediaInfo({ name, details, onRemove, removeLabel, large, actions, compact = false, className, ...props }) {
2978
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: cn("flex items-center justify-between border-t border-border bg-surface", compact ? "p-4" : "px-6 py-4", className), ...props, children: [
2979
2979
  /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
2980
2980
  /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex min-w-0 items-center gap-2", children: [
2981
2981
  /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: cn("min-w-0 flex-1 truncate text-surface-foreground", large ? "text-body-section" : "text-ui-label"), children: name }),
@@ -3053,7 +3053,7 @@ var formatTime = (seconds) => {
3053
3053
  return `${Math.floor(total / 60)}:${String(total % 60).padStart(2, "0")}`;
3054
3054
  };
3055
3055
  var VideoPlayer = React42.forwardRef(
3056
- ({ className, src, name, details, onRemove, onMore, initialTime = 0, initialDuration = 0, controls = "always", moreIn = "controls", badge, ...props }, ref) => {
3056
+ ({ className, src, name, details, onRemove, onMore, initialTime = 0, initialDuration = 0, controls = "always", moreIn = "controls", badge, aspect = "fixed", compactInfo = false, ...props }, ref) => {
3057
3057
  const video = React42.useRef(null);
3058
3058
  const [playing, setPlaying] = React42.useState(false);
3059
3059
  const [time, setTime] = React42.useState(initialTime);
@@ -3067,7 +3067,7 @@ var VideoPlayer = React42.forwardRef(
3067
3067
  else el.pause();
3068
3068
  };
3069
3069
  return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { ref, className: cn("flex w-full flex-col overflow-hidden rounded-lg border border-border bg-surface", className), ...props, children: [
3070
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "group/player relative flex h-60.5 w-full items-end bg-accent-soft", children: [
3070
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: cn("group/player relative flex w-full items-end bg-accent-soft", aspect === "video" ? "aspect-video" : "h-60.5"), children: [
3071
3071
  src && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3072
3072
  "video",
3073
3073
  {
@@ -3173,6 +3173,7 @@ var VideoPlayer = React42.forwardRef(
3173
3173
  name,
3174
3174
  details,
3175
3175
  onRemove,
3176
+ compact: compactInfo,
3176
3177
  actions: moreIn === "info" && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": "More", onClick: onMore, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react21.DotsThreeVertical, { size: 16, "aria-hidden": true }) })
3177
3178
  }
3178
3179
  ),