@discuss-ds/ui 0.41.0 → 0.42.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @discuss-ds/ui
2
2
 
3
+ ## 0.42.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#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.
8
+
9
+ - [#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.
10
+
3
11
  ## 0.41.0
4
12
 
5
13
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -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
  ),