@os-legal/ui 0.1.13 → 0.1.15

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.js CHANGED
@@ -123,7 +123,7 @@ __export(index_exports, {
123
123
  ModalHeader: () => ModalHeader,
124
124
  NavBar: () => NavBar,
125
125
  NewDiscussionButton: () => NewDiscussionButton,
126
- Node: () => Node,
126
+ Node: () => Node2,
127
127
  PageHeader: () => PageHeader,
128
128
  Pane: () => Pane,
129
129
  PanelAction: () => PanelAction,
@@ -6237,6 +6237,7 @@ function countMenuItems(children) {
6237
6237
  }
6238
6238
  function DropdownInner({
6239
6239
  mode,
6240
+ size = "md",
6240
6241
  options = [],
6241
6242
  value,
6242
6243
  defaultValue,
@@ -6248,6 +6249,7 @@ function DropdownInner({
6248
6249
  searchable = false,
6249
6250
  onSearchChange,
6250
6251
  searchDebounceMs = 300,
6252
+ iconSize,
6251
6253
  fluid = false,
6252
6254
  upward = false,
6253
6255
  align = "left",
@@ -6255,6 +6257,8 @@ function DropdownInner({
6255
6257
  renderOption,
6256
6258
  renderTag,
6257
6259
  renderEmpty,
6260
+ wrapDescriptions = false,
6261
+ showDescriptionInTrigger = false,
6258
6262
  maxMenuHeight = 300,
6259
6263
  className = "",
6260
6264
  style,
@@ -6262,6 +6266,7 @@ function DropdownInner({
6262
6266
  "aria-labelledby": ariaLabelledBy,
6263
6267
  onOpen,
6264
6268
  onClose,
6269
+ onBlur,
6265
6270
  children
6266
6271
  }, ref) {
6267
6272
  const generatedId = (0, import_react20.useId)();
@@ -6573,9 +6578,13 @@ function DropdownInner({
6573
6578
  };
6574
6579
  const selectedOpt = getSelectedOption();
6575
6580
  const hasValue = mode === "multiselect" ? (currentValue || []).length > 0 : currentValue != null;
6576
- const renderIcon = (icon) => {
6581
+ const renderIcon = (icon, size2) => {
6582
+ const sizeStyle = size2 ? { "--oc-dropdown-icon-size": `${size2}px` } : void 0;
6577
6583
  if (typeof icon === "string") {
6578
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("img", { src: icon, alt: "", className: "oc-dropdown__option-icon-img" });
6584
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("img", { src: icon, alt: "", className: "oc-dropdown__option-icon-img", style: sizeStyle });
6585
+ }
6586
+ if (size2) {
6587
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { style: sizeStyle, children: icon });
6579
6588
  }
6580
6589
  return icon;
6581
6590
  };
@@ -6606,8 +6615,11 @@ function DropdownInner({
6606
6615
  }
6607
6616
  if (mode === "select" && selectedOpt && !Array.isArray(selectedOpt)) {
6608
6617
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "oc-dropdown__trigger-content", children: [
6609
- selectedOpt.icon && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "oc-dropdown__trigger-icon", children: renderIcon(selectedOpt.icon) }),
6610
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "oc-dropdown__value", children: selectedOpt.label })
6618
+ selectedOpt.icon && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "oc-dropdown__trigger-icon", children: renderIcon(selectedOpt.icon, selectedOpt.iconSize ?? iconSize) }),
6619
+ showDescriptionInTrigger && selectedOpt.description ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "oc-dropdown__trigger-value-group", children: [
6620
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "oc-dropdown__value", children: selectedOpt.label }),
6621
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "oc-dropdown__trigger-description", children: selectedOpt.description })
6622
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "oc-dropdown__value", children: selectedOpt.label })
6611
6623
  ] });
6612
6624
  }
6613
6625
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "oc-dropdown__trigger-content", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "oc-dropdown__placeholder", children: placeholder }) });
@@ -6743,7 +6755,7 @@ function DropdownInner({
6743
6755
  onMouseEnter: () => !opt.disabled && setFocusedIndex(index),
6744
6756
  "data-oc-dropdown-index": index,
6745
6757
  children: [
6746
- opt.icon && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "oc-dropdown__option-icon", children: renderIcon(opt.icon) }),
6758
+ opt.icon && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "oc-dropdown__option-icon", children: renderIcon(opt.icon, opt.iconSize ?? iconSize) }),
6747
6759
  /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "oc-dropdown__option-content", children: [
6748
6760
  /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "oc-dropdown__option-label", children: opt.label }),
6749
6761
  opt.description && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "oc-dropdown__option-description", children: opt.description })
@@ -6829,12 +6841,24 @@ function DropdownInner({
6829
6841
  itemCounterRef.current = 0;
6830
6842
  }
6831
6843
  }, [isOpen, mode]);
6844
+ const handleFocusOut = (0, import_react20.useCallback)(
6845
+ (e) => {
6846
+ if (!onBlur) return;
6847
+ if (containerRef.current && e.relatedTarget instanceof Node && containerRef.current.contains(e.relatedTarget)) {
6848
+ return;
6849
+ }
6850
+ onBlur(e);
6851
+ },
6852
+ [onBlur]
6853
+ );
6832
6854
  const rootClasses = [
6833
6855
  "oc-dropdown",
6834
6856
  `oc-dropdown--${mode}`,
6857
+ size !== "md" && `oc-dropdown--${size}`,
6835
6858
  fluid && "oc-dropdown--fluid",
6836
6859
  isOpen && "oc-dropdown--open",
6837
6860
  disabled && "oc-dropdown--disabled",
6861
+ wrapDescriptions && "oc-dropdown--wrap-descriptions",
6838
6862
  className
6839
6863
  ].filter(Boolean).join(" ");
6840
6864
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
@@ -6851,6 +6875,7 @@ function DropdownInner({
6851
6875
  className: rootClasses,
6852
6876
  style,
6853
6877
  onKeyDown: mode === "menu" ? handleMenuKeyDown : handleKeyDown,
6878
+ onBlur: handleFocusOut,
6854
6879
  children: [
6855
6880
  renderTriggerElement(),
6856
6881
  renderMenu()
@@ -6879,6 +6904,34 @@ var dropdownStyles = `
6879
6904
  width: 100%;
6880
6905
  }
6881
6906
 
6907
+ /* \u2500\u2500\u2500 Size variants \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
6908
+
6909
+ .oc-dropdown--sm .oc-dropdown__trigger {
6910
+ min-height: 30px;
6911
+ padding: 4px 8px;
6912
+ font-size: var(--oc-font-size-xs);
6913
+ }
6914
+
6915
+ .oc-dropdown--lg .oc-dropdown__trigger {
6916
+ min-height: 44px;
6917
+ padding: 8px 16px;
6918
+ font-size: var(--oc-font-size-md);
6919
+ }
6920
+
6921
+ .oc-dropdown--sm .oc-dropdown__option,
6922
+ .oc-dropdown--sm .oc-dropdown__item {
6923
+ min-height: 30px;
6924
+ padding: 4px 8px;
6925
+ font-size: var(--oc-font-size-xs);
6926
+ }
6927
+
6928
+ .oc-dropdown--lg .oc-dropdown__option,
6929
+ .oc-dropdown--lg .oc-dropdown__item {
6930
+ min-height: 44px;
6931
+ padding: 10px 16px;
6932
+ font-size: var(--oc-font-size-md);
6933
+ }
6934
+
6882
6935
  /* \u2500\u2500\u2500 Trigger \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
6883
6936
 
6884
6937
  .oc-dropdown__trigger {
@@ -6886,7 +6939,7 @@ var dropdownStyles = `
6886
6939
  align-items: center;
6887
6940
  justify-content: space-between;
6888
6941
  gap: var(--oc-spacing-sm);
6889
- min-height: 38px;
6942
+ min-height: 44px;
6890
6943
  padding: 6px 12px;
6891
6944
  background: var(--oc-bg-surface);
6892
6945
  border: 1px solid var(--oc-border-default);
@@ -6962,8 +7015,15 @@ var dropdownStyles = `
6962
7015
  }
6963
7016
 
6964
7017
  .oc-dropdown__trigger-icon svg {
6965
- width: 16px;
6966
- height: 16px;
7018
+ width: var(--oc-dropdown-icon-size, 16px);
7019
+ height: var(--oc-dropdown-icon-size, 16px);
7020
+ }
7021
+
7022
+ .oc-dropdown__trigger-icon .oc-dropdown__option-icon-img {
7023
+ width: var(--oc-dropdown-icon-size, 16px);
7024
+ height: var(--oc-dropdown-icon-size, 16px);
7025
+ object-fit: contain;
7026
+ border-radius: 2px;
6967
7027
  }
6968
7028
 
6969
7029
  .oc-dropdown__value {
@@ -6974,6 +7034,22 @@ var dropdownStyles = `
6974
7034
  color: var(--oc-fg-primary);
6975
7035
  }
6976
7036
 
7037
+ .oc-dropdown__trigger-value-group {
7038
+ display: flex;
7039
+ flex-direction: column;
7040
+ flex: 1;
7041
+ min-width: 0;
7042
+ }
7043
+
7044
+ .oc-dropdown__trigger-description {
7045
+ font-size: var(--oc-font-size-xs);
7046
+ color: var(--oc-fg-secondary);
7047
+ line-height: var(--oc-line-height-normal);
7048
+ white-space: nowrap;
7049
+ overflow: hidden;
7050
+ text-overflow: ellipsis;
7051
+ }
7052
+
6977
7053
  .oc-dropdown__placeholder {
6978
7054
  flex: 1;
6979
7055
  white-space: nowrap;
@@ -7140,6 +7216,7 @@ var dropdownStyles = `
7140
7216
  display: flex;
7141
7217
  align-items: center;
7142
7218
  gap: var(--oc-spacing-sm);
7219
+ min-height: 44px;
7143
7220
  padding: 10px 14px;
7144
7221
  border-bottom: 1px solid var(--oc-border-default);
7145
7222
  }
@@ -7218,6 +7295,7 @@ var dropdownStyles = `
7218
7295
  display: flex;
7219
7296
  align-items: center;
7220
7297
  gap: var(--oc-spacing-sm);
7298
+ min-height: 44px;
7221
7299
  padding: 10px 14px;
7222
7300
  font-size: var(--oc-font-size-sm);
7223
7301
  color: var(--oc-fg-primary);
@@ -7261,13 +7339,13 @@ var dropdownStyles = `
7261
7339
  }
7262
7340
 
7263
7341
  .oc-dropdown__option-icon svg {
7264
- width: 16px;
7265
- height: 16px;
7342
+ width: var(--oc-dropdown-icon-size, 16px);
7343
+ height: var(--oc-dropdown-icon-size, 16px);
7266
7344
  }
7267
7345
 
7268
7346
  .oc-dropdown__option-icon-img {
7269
- width: 16px;
7270
- height: 16px;
7347
+ width: var(--oc-dropdown-icon-size, 16px);
7348
+ height: var(--oc-dropdown-icon-size, 16px);
7271
7349
  object-fit: contain;
7272
7350
  border-radius: 2px;
7273
7351
  }
@@ -7295,6 +7373,12 @@ var dropdownStyles = `
7295
7373
  text-overflow: ellipsis;
7296
7374
  }
7297
7375
 
7376
+ .oc-dropdown--wrap-descriptions .oc-dropdown__option-description {
7377
+ white-space: normal;
7378
+ overflow: visible;
7379
+ text-overflow: clip;
7380
+ }
7381
+
7298
7382
  .oc-dropdown__option--selected .oc-dropdown__option-description {
7299
7383
  color: var(--oc-accent);
7300
7384
  opacity: 0.7;
@@ -7314,6 +7398,7 @@ var dropdownStyles = `
7314
7398
  display: flex;
7315
7399
  align-items: center;
7316
7400
  gap: var(--oc-spacing-sm);
7401
+ min-height: 44px;
7317
7402
  padding: 10px 14px;
7318
7403
  font-size: var(--oc-font-size-sm);
7319
7404
  color: var(--oc-fg-primary);
@@ -7348,8 +7433,8 @@ var dropdownStyles = `
7348
7433
  }
7349
7434
 
7350
7435
  .oc-dropdown__item-icon svg {
7351
- width: 16px;
7352
- height: 16px;
7436
+ width: var(--oc-dropdown-icon-size, 16px);
7437
+ height: var(--oc-dropdown-icon-size, 16px);
7353
7438
  }
7354
7439
 
7355
7440
  .oc-dropdown__item-label {
@@ -7407,8 +7492,13 @@ var dropdownStyles = `
7407
7492
  /* \u2500\u2500\u2500 Responsive \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
7408
7493
 
7409
7494
  @media (max-width: 600px) {
7495
+ /* 16px minimum prevents iOS Safari auto-zoom on focus */
7410
7496
  .oc-dropdown__trigger {
7411
- min-height: 44px;
7497
+ font-size: 16px;
7498
+ }
7499
+
7500
+ .oc-dropdown__search-input {
7501
+ font-size: 16px;
7412
7502
  }
7413
7503
 
7414
7504
  .oc-dropdown--fluid .oc-dropdown__menu {
@@ -7416,6 +7506,18 @@ var dropdownStyles = `
7416
7506
  right: 0;
7417
7507
  }
7418
7508
  }
7509
+
7510
+ /* \u2500\u2500\u2500 Coarse pointer (touch) feedback \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
7511
+
7512
+ @media (pointer: coarse) {
7513
+ .oc-dropdown__option:active:not(.oc-dropdown__option--disabled) {
7514
+ background: rgba(15, 118, 110, 0.12);
7515
+ }
7516
+
7517
+ .oc-dropdown__item:active:not(.oc-dropdown__item--disabled) {
7518
+ background: rgba(15, 118, 110, 0.12);
7519
+ }
7520
+ }
7419
7521
  `;
7420
7522
 
7421
7523
  // src/Checkbox/Checkbox.tsx
@@ -18654,7 +18756,7 @@ var dataGridStyles = `
18654
18756
  // src/Node/Node.tsx
18655
18757
  var import_react52 = require("react");
18656
18758
  var import_jsx_runtime52 = require("react/jsx-runtime");
18657
- var Node = (0, import_react52.forwardRef)(
18759
+ var Node2 = (0, import_react52.forwardRef)(
18658
18760
  ({
18659
18761
  size = "sm",
18660
18762
  variant = "default",
@@ -18679,7 +18781,7 @@ var Node = (0, import_react52.forwardRef)(
18679
18781
  ] });
18680
18782
  }
18681
18783
  );
18682
- Node.displayName = "Node";
18784
+ Node2.displayName = "Node";
18683
18785
 
18684
18786
  // src/Node/Node.styles.ts
18685
18787
  var nodeStyles = `
@@ -19041,7 +19143,7 @@ var RelationshipBadge = (0, import_react54.forwardRef)(
19041
19143
  ...props,
19042
19144
  children: [
19043
19145
  /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
19044
- Node,
19146
+ Node2,
19045
19147
  {
19046
19148
  size: size === "sm" ? "xs" : "sm",
19047
19149
  variant: active ? "active" : "muted",
@@ -19182,7 +19284,7 @@ var RelationshipPill = (0, import_react55.forwardRef)(
19182
19284
  ...props,
19183
19285
  children: [
19184
19286
  /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
19185
- Node,
19287
+ Node2,
19186
19288
  {
19187
19289
  size: "xs",
19188
19290
  variant: active ? "active" : "default"
package/dist/index.mjs CHANGED
@@ -5976,6 +5976,7 @@ function countMenuItems(children) {
5976
5976
  }
5977
5977
  function DropdownInner({
5978
5978
  mode,
5979
+ size = "md",
5979
5980
  options = [],
5980
5981
  value,
5981
5982
  defaultValue,
@@ -5987,6 +5988,7 @@ function DropdownInner({
5987
5988
  searchable = false,
5988
5989
  onSearchChange,
5989
5990
  searchDebounceMs = 300,
5991
+ iconSize,
5990
5992
  fluid = false,
5991
5993
  upward = false,
5992
5994
  align = "left",
@@ -5994,6 +5996,8 @@ function DropdownInner({
5994
5996
  renderOption,
5995
5997
  renderTag,
5996
5998
  renderEmpty,
5999
+ wrapDescriptions = false,
6000
+ showDescriptionInTrigger = false,
5997
6001
  maxMenuHeight = 300,
5998
6002
  className = "",
5999
6003
  style,
@@ -6001,6 +6005,7 @@ function DropdownInner({
6001
6005
  "aria-labelledby": ariaLabelledBy,
6002
6006
  onOpen,
6003
6007
  onClose,
6008
+ onBlur,
6004
6009
  children
6005
6010
  }, ref) {
6006
6011
  const generatedId = useId4();
@@ -6312,9 +6317,13 @@ function DropdownInner({
6312
6317
  };
6313
6318
  const selectedOpt = getSelectedOption();
6314
6319
  const hasValue = mode === "multiselect" ? (currentValue || []).length > 0 : currentValue != null;
6315
- const renderIcon = (icon) => {
6320
+ const renderIcon = (icon, size2) => {
6321
+ const sizeStyle = size2 ? { "--oc-dropdown-icon-size": `${size2}px` } : void 0;
6316
6322
  if (typeof icon === "string") {
6317
- return /* @__PURE__ */ jsx20("img", { src: icon, alt: "", className: "oc-dropdown__option-icon-img" });
6323
+ return /* @__PURE__ */ jsx20("img", { src: icon, alt: "", className: "oc-dropdown__option-icon-img", style: sizeStyle });
6324
+ }
6325
+ if (size2) {
6326
+ return /* @__PURE__ */ jsx20("span", { style: sizeStyle, children: icon });
6318
6327
  }
6319
6328
  return icon;
6320
6329
  };
@@ -6345,8 +6354,11 @@ function DropdownInner({
6345
6354
  }
6346
6355
  if (mode === "select" && selectedOpt && !Array.isArray(selectedOpt)) {
6347
6356
  return /* @__PURE__ */ jsxs17("div", { className: "oc-dropdown__trigger-content", children: [
6348
- selectedOpt.icon && /* @__PURE__ */ jsx20("span", { className: "oc-dropdown__trigger-icon", children: renderIcon(selectedOpt.icon) }),
6349
- /* @__PURE__ */ jsx20("span", { className: "oc-dropdown__value", children: selectedOpt.label })
6357
+ selectedOpt.icon && /* @__PURE__ */ jsx20("span", { className: "oc-dropdown__trigger-icon", children: renderIcon(selectedOpt.icon, selectedOpt.iconSize ?? iconSize) }),
6358
+ showDescriptionInTrigger && selectedOpt.description ? /* @__PURE__ */ jsxs17("div", { className: "oc-dropdown__trigger-value-group", children: [
6359
+ /* @__PURE__ */ jsx20("span", { className: "oc-dropdown__value", children: selectedOpt.label }),
6360
+ /* @__PURE__ */ jsx20("span", { className: "oc-dropdown__trigger-description", children: selectedOpt.description })
6361
+ ] }) : /* @__PURE__ */ jsx20("span", { className: "oc-dropdown__value", children: selectedOpt.label })
6350
6362
  ] });
6351
6363
  }
6352
6364
  return /* @__PURE__ */ jsx20("div", { className: "oc-dropdown__trigger-content", children: /* @__PURE__ */ jsx20("span", { className: "oc-dropdown__placeholder", children: placeholder }) });
@@ -6482,7 +6494,7 @@ function DropdownInner({
6482
6494
  onMouseEnter: () => !opt.disabled && setFocusedIndex(index),
6483
6495
  "data-oc-dropdown-index": index,
6484
6496
  children: [
6485
- opt.icon && /* @__PURE__ */ jsx20("span", { className: "oc-dropdown__option-icon", children: renderIcon(opt.icon) }),
6497
+ opt.icon && /* @__PURE__ */ jsx20("span", { className: "oc-dropdown__option-icon", children: renderIcon(opt.icon, opt.iconSize ?? iconSize) }),
6486
6498
  /* @__PURE__ */ jsxs17("div", { className: "oc-dropdown__option-content", children: [
6487
6499
  /* @__PURE__ */ jsx20("span", { className: "oc-dropdown__option-label", children: opt.label }),
6488
6500
  opt.description && /* @__PURE__ */ jsx20("span", { className: "oc-dropdown__option-description", children: opt.description })
@@ -6568,12 +6580,24 @@ function DropdownInner({
6568
6580
  itemCounterRef.current = 0;
6569
6581
  }
6570
6582
  }, [isOpen, mode]);
6583
+ const handleFocusOut = useCallback7(
6584
+ (e) => {
6585
+ if (!onBlur) return;
6586
+ if (containerRef.current && e.relatedTarget instanceof Node && containerRef.current.contains(e.relatedTarget)) {
6587
+ return;
6588
+ }
6589
+ onBlur(e);
6590
+ },
6591
+ [onBlur]
6592
+ );
6571
6593
  const rootClasses = [
6572
6594
  "oc-dropdown",
6573
6595
  `oc-dropdown--${mode}`,
6596
+ size !== "md" && `oc-dropdown--${size}`,
6574
6597
  fluid && "oc-dropdown--fluid",
6575
6598
  isOpen && "oc-dropdown--open",
6576
6599
  disabled && "oc-dropdown--disabled",
6600
+ wrapDescriptions && "oc-dropdown--wrap-descriptions",
6577
6601
  className
6578
6602
  ].filter(Boolean).join(" ");
6579
6603
  return /* @__PURE__ */ jsxs17(
@@ -6590,6 +6614,7 @@ function DropdownInner({
6590
6614
  className: rootClasses,
6591
6615
  style,
6592
6616
  onKeyDown: mode === "menu" ? handleMenuKeyDown : handleKeyDown,
6617
+ onBlur: handleFocusOut,
6593
6618
  children: [
6594
6619
  renderTriggerElement(),
6595
6620
  renderMenu()
@@ -6618,6 +6643,34 @@ var dropdownStyles = `
6618
6643
  width: 100%;
6619
6644
  }
6620
6645
 
6646
+ /* \u2500\u2500\u2500 Size variants \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
6647
+
6648
+ .oc-dropdown--sm .oc-dropdown__trigger {
6649
+ min-height: 30px;
6650
+ padding: 4px 8px;
6651
+ font-size: var(--oc-font-size-xs);
6652
+ }
6653
+
6654
+ .oc-dropdown--lg .oc-dropdown__trigger {
6655
+ min-height: 44px;
6656
+ padding: 8px 16px;
6657
+ font-size: var(--oc-font-size-md);
6658
+ }
6659
+
6660
+ .oc-dropdown--sm .oc-dropdown__option,
6661
+ .oc-dropdown--sm .oc-dropdown__item {
6662
+ min-height: 30px;
6663
+ padding: 4px 8px;
6664
+ font-size: var(--oc-font-size-xs);
6665
+ }
6666
+
6667
+ .oc-dropdown--lg .oc-dropdown__option,
6668
+ .oc-dropdown--lg .oc-dropdown__item {
6669
+ min-height: 44px;
6670
+ padding: 10px 16px;
6671
+ font-size: var(--oc-font-size-md);
6672
+ }
6673
+
6621
6674
  /* \u2500\u2500\u2500 Trigger \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
6622
6675
 
6623
6676
  .oc-dropdown__trigger {
@@ -6625,7 +6678,7 @@ var dropdownStyles = `
6625
6678
  align-items: center;
6626
6679
  justify-content: space-between;
6627
6680
  gap: var(--oc-spacing-sm);
6628
- min-height: 38px;
6681
+ min-height: 44px;
6629
6682
  padding: 6px 12px;
6630
6683
  background: var(--oc-bg-surface);
6631
6684
  border: 1px solid var(--oc-border-default);
@@ -6701,8 +6754,15 @@ var dropdownStyles = `
6701
6754
  }
6702
6755
 
6703
6756
  .oc-dropdown__trigger-icon svg {
6704
- width: 16px;
6705
- height: 16px;
6757
+ width: var(--oc-dropdown-icon-size, 16px);
6758
+ height: var(--oc-dropdown-icon-size, 16px);
6759
+ }
6760
+
6761
+ .oc-dropdown__trigger-icon .oc-dropdown__option-icon-img {
6762
+ width: var(--oc-dropdown-icon-size, 16px);
6763
+ height: var(--oc-dropdown-icon-size, 16px);
6764
+ object-fit: contain;
6765
+ border-radius: 2px;
6706
6766
  }
6707
6767
 
6708
6768
  .oc-dropdown__value {
@@ -6713,6 +6773,22 @@ var dropdownStyles = `
6713
6773
  color: var(--oc-fg-primary);
6714
6774
  }
6715
6775
 
6776
+ .oc-dropdown__trigger-value-group {
6777
+ display: flex;
6778
+ flex-direction: column;
6779
+ flex: 1;
6780
+ min-width: 0;
6781
+ }
6782
+
6783
+ .oc-dropdown__trigger-description {
6784
+ font-size: var(--oc-font-size-xs);
6785
+ color: var(--oc-fg-secondary);
6786
+ line-height: var(--oc-line-height-normal);
6787
+ white-space: nowrap;
6788
+ overflow: hidden;
6789
+ text-overflow: ellipsis;
6790
+ }
6791
+
6716
6792
  .oc-dropdown__placeholder {
6717
6793
  flex: 1;
6718
6794
  white-space: nowrap;
@@ -6879,6 +6955,7 @@ var dropdownStyles = `
6879
6955
  display: flex;
6880
6956
  align-items: center;
6881
6957
  gap: var(--oc-spacing-sm);
6958
+ min-height: 44px;
6882
6959
  padding: 10px 14px;
6883
6960
  border-bottom: 1px solid var(--oc-border-default);
6884
6961
  }
@@ -6957,6 +7034,7 @@ var dropdownStyles = `
6957
7034
  display: flex;
6958
7035
  align-items: center;
6959
7036
  gap: var(--oc-spacing-sm);
7037
+ min-height: 44px;
6960
7038
  padding: 10px 14px;
6961
7039
  font-size: var(--oc-font-size-sm);
6962
7040
  color: var(--oc-fg-primary);
@@ -7000,13 +7078,13 @@ var dropdownStyles = `
7000
7078
  }
7001
7079
 
7002
7080
  .oc-dropdown__option-icon svg {
7003
- width: 16px;
7004
- height: 16px;
7081
+ width: var(--oc-dropdown-icon-size, 16px);
7082
+ height: var(--oc-dropdown-icon-size, 16px);
7005
7083
  }
7006
7084
 
7007
7085
  .oc-dropdown__option-icon-img {
7008
- width: 16px;
7009
- height: 16px;
7086
+ width: var(--oc-dropdown-icon-size, 16px);
7087
+ height: var(--oc-dropdown-icon-size, 16px);
7010
7088
  object-fit: contain;
7011
7089
  border-radius: 2px;
7012
7090
  }
@@ -7034,6 +7112,12 @@ var dropdownStyles = `
7034
7112
  text-overflow: ellipsis;
7035
7113
  }
7036
7114
 
7115
+ .oc-dropdown--wrap-descriptions .oc-dropdown__option-description {
7116
+ white-space: normal;
7117
+ overflow: visible;
7118
+ text-overflow: clip;
7119
+ }
7120
+
7037
7121
  .oc-dropdown__option--selected .oc-dropdown__option-description {
7038
7122
  color: var(--oc-accent);
7039
7123
  opacity: 0.7;
@@ -7053,6 +7137,7 @@ var dropdownStyles = `
7053
7137
  display: flex;
7054
7138
  align-items: center;
7055
7139
  gap: var(--oc-spacing-sm);
7140
+ min-height: 44px;
7056
7141
  padding: 10px 14px;
7057
7142
  font-size: var(--oc-font-size-sm);
7058
7143
  color: var(--oc-fg-primary);
@@ -7087,8 +7172,8 @@ var dropdownStyles = `
7087
7172
  }
7088
7173
 
7089
7174
  .oc-dropdown__item-icon svg {
7090
- width: 16px;
7091
- height: 16px;
7175
+ width: var(--oc-dropdown-icon-size, 16px);
7176
+ height: var(--oc-dropdown-icon-size, 16px);
7092
7177
  }
7093
7178
 
7094
7179
  .oc-dropdown__item-label {
@@ -7146,8 +7231,13 @@ var dropdownStyles = `
7146
7231
  /* \u2500\u2500\u2500 Responsive \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
7147
7232
 
7148
7233
  @media (max-width: 600px) {
7234
+ /* 16px minimum prevents iOS Safari auto-zoom on focus */
7149
7235
  .oc-dropdown__trigger {
7150
- min-height: 44px;
7236
+ font-size: 16px;
7237
+ }
7238
+
7239
+ .oc-dropdown__search-input {
7240
+ font-size: 16px;
7151
7241
  }
7152
7242
 
7153
7243
  .oc-dropdown--fluid .oc-dropdown__menu {
@@ -7155,6 +7245,18 @@ var dropdownStyles = `
7155
7245
  right: 0;
7156
7246
  }
7157
7247
  }
7248
+
7249
+ /* \u2500\u2500\u2500 Coarse pointer (touch) feedback \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
7250
+
7251
+ @media (pointer: coarse) {
7252
+ .oc-dropdown__option:active:not(.oc-dropdown__option--disabled) {
7253
+ background: rgba(15, 118, 110, 0.12);
7254
+ }
7255
+
7256
+ .oc-dropdown__item:active:not(.oc-dropdown__item--disabled) {
7257
+ background: rgba(15, 118, 110, 0.12);
7258
+ }
7259
+ }
7158
7260
  `;
7159
7261
 
7160
7262
  // src/Checkbox/Checkbox.tsx
@@ -18399,7 +18501,7 @@ var dataGridStyles = `
18399
18501
  // src/Node/Node.tsx
18400
18502
  import { forwardRef as forwardRef52 } from "react";
18401
18503
  import { jsx as jsx52, jsxs as jsxs48 } from "react/jsx-runtime";
18402
- var Node = forwardRef52(
18504
+ var Node2 = forwardRef52(
18403
18505
  ({
18404
18506
  size = "sm",
18405
18507
  variant = "default",
@@ -18424,7 +18526,7 @@ var Node = forwardRef52(
18424
18526
  ] });
18425
18527
  }
18426
18528
  );
18427
- Node.displayName = "Node";
18529
+ Node2.displayName = "Node";
18428
18530
 
18429
18531
  // src/Node/Node.styles.ts
18430
18532
  var nodeStyles = `
@@ -18786,7 +18888,7 @@ var RelationshipBadge = forwardRef54(
18786
18888
  ...props,
18787
18889
  children: [
18788
18890
  /* @__PURE__ */ jsx54(
18789
- Node,
18891
+ Node2,
18790
18892
  {
18791
18893
  size: size === "sm" ? "xs" : "sm",
18792
18894
  variant: active ? "active" : "muted",
@@ -18927,7 +19029,7 @@ var RelationshipPill = forwardRef55(
18927
19029
  ...props,
18928
19030
  children: [
18929
19031
  /* @__PURE__ */ jsx55(
18930
- Node,
19032
+ Node2,
18931
19033
  {
18932
19034
  size: "xs",
18933
19035
  variant: active ? "active" : "default"
@@ -20630,7 +20732,7 @@ export {
20630
20732
  ModalHeader,
20631
20733
  NavBar,
20632
20734
  NewDiscussionButton,
20633
- Node,
20735
+ Node2 as Node,
20634
20736
  PageHeader,
20635
20737
  Pane,
20636
20738
  PanelAction,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@os-legal/ui",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "React component library for OpenContracts design system",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",