@uniformdev/design-system 20.12.1-alpha.23 → 20.12.1-alpha.28

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/esm/index.js CHANGED
@@ -6906,6 +6906,7 @@ var counterContainer = (bgColor, hasIcon) => css47`
6906
6906
  var counterZeroValue = css47`
6907
6907
  background: var(--gray-800);
6908
6908
  border-radius: var(--rounded-full);
6909
+ display: block;
6909
6910
  width: 2px;
6910
6911
  height: 2px;
6911
6912
  `;
@@ -7926,7 +7927,7 @@ var DrawerInner = ({
7926
7927
  instanceKey,
7927
7928
  onRequestClose,
7928
7929
  leftAligned,
7929
- width,
7930
+ width = "medium",
7930
7931
  testId = "side-dialog"
7931
7932
  }) => {
7932
7933
  const { registerDrawer, unregisterDrawer, providerId } = useDrawer();
@@ -8074,9 +8075,13 @@ var DrawerRenderer = ({
8074
8075
  if (withoutFluidWidth) {
8075
8076
  return rendererWidth;
8076
8077
  }
8077
- const drawerWidths = [rendererWidth, ...drawersToRender.map(({ width: width2 }) => width2)].filter(
8078
- (v) => typeof v === "string"
8079
- );
8078
+ const drawerWidths = [
8079
+ rendererWidth,
8080
+ ...drawersToRender.map(({ width: width2 }) => {
8081
+ var _a2;
8082
+ return width2 ? (_a2 = drawerWidth[width2]) != null ? _a2 : width2 : null;
8083
+ })
8084
+ ].filter((v) => typeof v === "string");
8080
8085
  return `max(${drawerWidths.join()})`;
8081
8086
  }, [drawersToRender, width, withoutFluidWidth]);
8082
8087
  if (drawersToRender.length === 0) {
@@ -8137,6 +8142,7 @@ var DrawerWrapper = ({
8137
8142
  {
8138
8143
  css: [drawerWrapperStyles, leftAligned ? drawerWrapperLeftAlignedStyles : null],
8139
8144
  style: { width: calculatedWidth, minWidth, maxWidth },
8145
+ "data-testid": "drawer-wrapper",
8140
8146
  children
8141
8147
  }
8142
8148
  )
@@ -8315,7 +8321,7 @@ function Image({
8315
8321
  if (src === "") {
8316
8322
  setLoading(false);
8317
8323
  } else {
8318
- const url = String(src).startsWith("//") ? `${location.protocol}${src}` : String(src);
8324
+ const url = String(src).startsWith("//") ? `https://${src}` : String(src);
8319
8325
  if (!isValidUrl(url, { allowRelative: true, isSecure: true })) {
8320
8326
  throw Error(errorText);
8321
8327
  }
@@ -8909,6 +8915,10 @@ var Tile = css63`
8909
8915
  &[aria-disabled='true'],
8910
8916
  &:disabled {
8911
8917
  pointer-events: none;
8918
+
8919
+ > * {
8920
+ opacity: 0.5;
8921
+ }
8912
8922
  }
8913
8923
  `;
8914
8924
  var LinkTile = css63`
@@ -11084,18 +11094,26 @@ var ObjectListItem2 = ({ minContainerQueryWidth = "34rem", ...props }) => {
11084
11094
  ],
11085
11095
  children: [
11086
11096
  cover ? /* @__PURE__ */ jsx106(HorizontalRhythm, { gap: "sm", align: "center", children: cover }) : null,
11087
- /* @__PURE__ */ jsxs71(VerticalRhythm, { gap: "0", justify: renderAs === "multi" ? "flex-start" : "center", children: [
11088
- /* @__PURE__ */ jsx106(
11089
- HorizontalRhythm,
11090
- {
11091
- gap: "xs",
11092
- align: renderAs === "multi" ? "flex-start" : "center",
11093
- "data-testid": "title",
11094
- children: header2
11095
- }
11096
- ),
11097
- renderAs === "multi" ? props.children : null
11098
- ] }),
11097
+ /* @__PURE__ */ jsxs71(
11098
+ VerticalRhythm,
11099
+ {
11100
+ gap: "0",
11101
+ justify: renderAs === "multi" ? "flex-start" : "center",
11102
+ "data-testid": "title-container",
11103
+ children: [
11104
+ /* @__PURE__ */ jsx106(
11105
+ HorizontalRhythm,
11106
+ {
11107
+ gap: "xs",
11108
+ align: renderAs === "multi" ? "flex-start" : "center",
11109
+ "data-testid": "title",
11110
+ children: header2
11111
+ }
11112
+ ),
11113
+ renderAs === "multi" ? props.children : null
11114
+ ]
11115
+ }
11116
+ ),
11099
11117
  /* @__PURE__ */ jsx106(HorizontalRhythm, { gap: "xs", align: renderAs === "multi" ? "flex-start" : "center", children: rightSlot })
11100
11118
  ]
11101
11119
  }
@@ -11169,7 +11187,7 @@ var ObjectListItemHeading2 = ({
11169
11187
  return /* @__PURE__ */ jsxs72("div", { css: ObjectListItemHeading, ...props, children: [
11170
11188
  beforeHeadingSlot ? /* @__PURE__ */ jsx109(HorizontalRhythm, { gap: "xs", align: "center", children: beforeHeadingSlot }) : null,
11171
11189
  /* @__PURE__ */ jsxs72(HorizontalRhythm, { css: ObjectListItemHeadingAfterWrapper, gap: "xs", align: "flex-start", children: [
11172
- /* @__PURE__ */ jsx109("div", { role: "heading", children: heading }),
11190
+ /* @__PURE__ */ jsx109("div", { role: "heading", "data-testid": "reference-item-name", children: heading }),
11173
11191
  afterHeadingSlot
11174
11192
  ] })
11175
11193
  ] });
@@ -15627,8 +15645,8 @@ var SegmentedControl = ({
15627
15645
  segmentedControlStyles,
15628
15646
  orientation === "vertical" ? segmentedControlVerticalStyles : void 0
15629
15647
  ],
15630
- ...props,
15631
15648
  "data-testid": "segmented-control",
15649
+ ...props,
15632
15650
  children: options.map((option, index) => {
15633
15651
  var _a;
15634
15652
  if (!option) {
package/dist/index.js CHANGED
@@ -8688,6 +8688,7 @@ var counterContainer = (bgColor, hasIcon) => import_react69.css`
8688
8688
  var counterZeroValue = import_react69.css`
8689
8689
  background: var(--gray-800);
8690
8690
  border-radius: var(--rounded-full);
8691
+ display: block;
8691
8692
  width: 2px;
8692
8693
  height: 2px;
8693
8694
  `;
@@ -9717,7 +9718,7 @@ var DrawerInner = ({
9717
9718
  instanceKey,
9718
9719
  onRequestClose,
9719
9720
  leftAligned,
9720
- width,
9721
+ width = "medium",
9721
9722
  testId = "side-dialog"
9722
9723
  }) => {
9723
9724
  const { registerDrawer, unregisterDrawer, providerId } = useDrawer();
@@ -9870,9 +9871,13 @@ var DrawerRenderer = ({
9870
9871
  if (withoutFluidWidth) {
9871
9872
  return rendererWidth;
9872
9873
  }
9873
- const drawerWidths = [rendererWidth, ...drawersToRender.map(({ width: width2 }) => width2)].filter(
9874
- (v) => typeof v === "string"
9875
- );
9874
+ const drawerWidths = [
9875
+ rendererWidth,
9876
+ ...drawersToRender.map(({ width: width2 }) => {
9877
+ var _a2;
9878
+ return width2 ? (_a2 = drawerWidth[width2]) != null ? _a2 : width2 : null;
9879
+ })
9880
+ ].filter((v) => typeof v === "string");
9876
9881
  return `max(${drawerWidths.join()})`;
9877
9882
  }, [drawersToRender, width, withoutFluidWidth]);
9878
9883
  if (drawersToRender.length === 0) {
@@ -9933,6 +9938,7 @@ var DrawerWrapper = ({
9933
9938
  {
9934
9939
  css: [drawerWrapperStyles, leftAligned ? drawerWrapperLeftAlignedStyles : null],
9935
9940
  style: { width: calculatedWidth, minWidth, maxWidth },
9941
+ "data-testid": "drawer-wrapper",
9936
9942
  children
9937
9943
  }
9938
9944
  )
@@ -10123,7 +10129,7 @@ function Image({
10123
10129
  if (src === "") {
10124
10130
  setLoading(false);
10125
10131
  } else {
10126
- const url = String(src).startsWith("//") ? `${location.protocol}${src}` : String(src);
10132
+ const url = String(src).startsWith("//") ? `https://${src}` : String(src);
10127
10133
  if (!isValidUrl(url, { allowRelative: true, isSecure: true })) {
10128
10134
  throw Error(errorText);
10129
10135
  }
@@ -10739,6 +10745,10 @@ var Tile = import_react96.css`
10739
10745
  &[aria-disabled='true'],
10740
10746
  &:disabled {
10741
10747
  pointer-events: none;
10748
+
10749
+ > * {
10750
+ opacity: 0.5;
10751
+ }
10742
10752
  }
10743
10753
  `;
10744
10754
  var LinkTile = import_react96.css`
@@ -12961,18 +12971,26 @@ var ObjectListItem2 = ({ minContainerQueryWidth = "34rem", ...props }) => {
12961
12971
  ],
12962
12972
  children: [
12963
12973
  cover ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(HorizontalRhythm, { gap: "sm", align: "center", children: cover }) : null,
12964
- /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(VerticalRhythm, { gap: "0", justify: renderAs === "multi" ? "flex-start" : "center", children: [
12965
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
12966
- HorizontalRhythm,
12967
- {
12968
- gap: "xs",
12969
- align: renderAs === "multi" ? "flex-start" : "center",
12970
- "data-testid": "title",
12971
- children: header2
12972
- }
12973
- ),
12974
- renderAs === "multi" ? props.children : null
12975
- ] }),
12974
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
12975
+ VerticalRhythm,
12976
+ {
12977
+ gap: "0",
12978
+ justify: renderAs === "multi" ? "flex-start" : "center",
12979
+ "data-testid": "title-container",
12980
+ children: [
12981
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
12982
+ HorizontalRhythm,
12983
+ {
12984
+ gap: "xs",
12985
+ align: renderAs === "multi" ? "flex-start" : "center",
12986
+ "data-testid": "title",
12987
+ children: header2
12988
+ }
12989
+ ),
12990
+ renderAs === "multi" ? props.children : null
12991
+ ]
12992
+ }
12993
+ ),
12976
12994
  /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(HorizontalRhythm, { gap: "xs", align: renderAs === "multi" ? "flex-start" : "center", children: rightSlot })
12977
12995
  ]
12978
12996
  }
@@ -13052,7 +13070,7 @@ var ObjectListItemHeading2 = ({
13052
13070
  return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { css: ObjectListItemHeading, ...props, children: [
13053
13071
  beforeHeadingSlot ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(HorizontalRhythm, { gap: "xs", align: "center", children: beforeHeadingSlot }) : null,
13054
13072
  /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(HorizontalRhythm, { css: ObjectListItemHeadingAfterWrapper, gap: "xs", align: "flex-start", children: [
13055
- /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { role: "heading", children: heading }),
13073
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { role: "heading", "data-testid": "reference-item-name", children: heading }),
13056
13074
  afterHeadingSlot
13057
13075
  ] })
13058
13076
  ] });
@@ -17474,8 +17492,8 @@ var SegmentedControl = ({
17474
17492
  segmentedControlStyles,
17475
17493
  orientation === "vertical" ? segmentedControlVerticalStyles : void 0
17476
17494
  ],
17477
- ...props,
17478
17495
  "data-testid": "segmented-control",
17496
+ ...props,
17479
17497
  children: options.map((option, index) => {
17480
17498
  var _a;
17481
17499
  if (!option) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/design-system",
3
- "version": "20.12.1-alpha.23+36df23cbe9",
3
+ "version": "20.12.1-alpha.28+28cc2dd35d",
4
4
  "description": "Uniform design system components",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "exports": {
@@ -23,8 +23,8 @@
23
23
  "build": "tsup",
24
24
  "dev": "tsup --watch",
25
25
  "clean": "rimraf dist",
26
- "test": "jest",
27
- "test:coverage": "jest --coverage",
26
+ "test": "vitest",
27
+ "test:coverage": "vitest run --coverage",
28
28
  "lint": "eslint \"src/**/*.{js,ts,tsx}\"",
29
29
  "format": "prettier --write \"src/**/*.{js,ts,tsx}\"",
30
30
  "create:component": "hygen component with-prompt",
@@ -38,15 +38,17 @@
38
38
  "@storybook/theming": "^8.3.3",
39
39
  "@types/react": "18.3.11",
40
40
  "@types/react-dom": "18.3.1",
41
- "@uniformdev/canvas": "^20.12.1-alpha.23+36df23cbe9",
42
- "@uniformdev/richtext": "^20.12.1-alpha.23+36df23cbe9",
41
+ "@uniformdev/canvas": "^20.12.1-alpha.28+28cc2dd35d",
42
+ "@uniformdev/richtext": "^20.12.1-alpha.28+28cc2dd35d",
43
+ "@vitest/coverage-v8": "^3.1.2",
43
44
  "autoprefixer": "10.4.21",
44
45
  "hygen": "6.2.11",
45
46
  "postcss": "8.5.3",
46
47
  "react": "18.3.1",
47
48
  "react-dom": "18.3.1",
48
49
  "react-select-event": "^5.5.1",
49
- "tsup": "8.3.0"
50
+ "tsup": "8.3.0",
51
+ "vitest": "^3.1.2"
50
52
  },
51
53
  "dependencies": {
52
54
  "@ariakit/react": "^0.4.15",
@@ -89,5 +91,5 @@
89
91
  "publishConfig": {
90
92
  "access": "public"
91
93
  },
92
- "gitHead": "36df23cbe9ca246137efcf2f4a57e04d029406cc"
94
+ "gitHead": "28cc2dd35d9b1ec7c31e72bd0c562341765cef9d"
93
95
  }