@uniformdev/design-system 19.30.1-alpha.0 → 19.32.1-alpha.4

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
@@ -12875,9 +12875,9 @@ var DrawerContentBtnGroup = css40`
12875
12875
 
12876
12876
  // src/components/Drawer/DrawerContent.tsx
12877
12877
  import { jsx as jsx41, jsxs as jsxs23 } from "@emotion/react/jsx-runtime";
12878
- var DrawerContent2 = ({ children, buttonGroup, ...props }) => {
12878
+ var DrawerContent2 = ({ children, buttonGroup, noPadding = false, ...props }) => {
12879
12879
  return /* @__PURE__ */ jsxs23("div", { css: DrawerContent, ...props, children: [
12880
- /* @__PURE__ */ jsx41("div", { css: DrawerContentInner, children }),
12880
+ /* @__PURE__ */ jsx41("div", { css: [DrawerContentInner, noPadding ? { padding: 0 } : null], children }),
12881
12881
  buttonGroup ? /* @__PURE__ */ jsx41("div", { css: DrawerContentBtnGroup, children: buttonGroup }) : null
12882
12882
  ] });
12883
12883
  };
@@ -14778,11 +14778,11 @@ var IntegrationTile = ({
14778
14778
 
14779
14779
  // src/components/Tiles/styles/Tile.styles.ts
14780
14780
  import { css as css62 } from "@emotion/react";
14781
+ var tileBorderSize = "1px";
14781
14782
  var Tile = css62`
14782
14783
  background: var(--white);
14783
- border: none;
14784
14784
  cursor: pointer;
14785
- outline: 1px solid var(--gray-300);
14785
+ border: ${tileBorderSize} solid var(--gray-300);
14786
14786
  display: grid;
14787
14787
  padding: var(--spacing-base);
14788
14788
  place-items: center;
@@ -14795,12 +14795,17 @@ var Tile = css62`
14795
14795
  &:focus {
14796
14796
  background: var(--gray-50);
14797
14797
  }
14798
+
14799
+ &[aria-disabled='true'],
14800
+ &:disabled {
14801
+ pointer-events: none;
14802
+ }
14798
14803
  `;
14799
14804
 
14800
14805
  // src/components/Tiles/Tile.tsx
14801
14806
  import { jsx as jsx75 } from "@emotion/react/jsx-runtime";
14802
- var Tile2 = ({ children, ...props }) => {
14803
- return /* @__PURE__ */ jsx75("button", { type: "button", css: Tile, ...props, children });
14807
+ var Tile2 = ({ children, disabled, ...props }) => {
14808
+ return /* @__PURE__ */ jsx75("button", { type: "button", css: Tile, disabled, ...props, children });
14804
14809
  };
14805
14810
 
14806
14811
  // src/components/Tiles/styles/TileContainer.styles.ts
@@ -14813,6 +14818,13 @@ var TileContainerInner = (gap, templateColumns) => css63`
14813
14818
  display: grid;
14814
14819
  grid-template-columns: ${templateColumns};
14815
14820
  gap: var(--spacing-${gap});
14821
+ margin-top: ${tileBorderSize};
14822
+ margin-left: ${tileBorderSize};
14823
+
14824
+ > * {
14825
+ margin-top: -${tileBorderSize};
14826
+ margin-left: -${tileBorderSize};
14827
+ }
14816
14828
  `;
14817
14829
 
14818
14830
  // src/components/Tiles/TileContainer.tsx
@@ -15306,6 +15318,13 @@ var linkParameterInput = (withExternalLinkIcon) => css68`
15306
15318
  ${withExternalLinkIcon ? "calc(var(--spacing-lg) * 2 + var(--spacing-xs))" : "var(--spacing-xl)"} +
15307
15319
  var(--spacing-base)
15308
15320
  );
15321
+
15322
+ &:focus,
15323
+ &:focus-within {
15324
+ &[readonly] {
15325
+ border-color: var(--white);
15326
+ }
15327
+ }
15309
15328
  `;
15310
15329
  var linkParameterIcon = css68`
15311
15330
  align-items: center;
@@ -17694,7 +17713,7 @@ var segmentedControlItemStyles = css79`
17694
17713
  var segmentedControlInputStyles = css79`
17695
17714
  ${accessibleHidden}
17696
17715
  `;
17697
- var segmentedControlLabelStyles = css79`
17716
+ var segmentedControlLabelStyles = (checked, disabled) => css79`
17698
17717
  position: relative;
17699
17718
  display: flex;
17700
17719
  align-items: center;
@@ -17730,6 +17749,36 @@ var segmentedControlLabelStyles = css79`
17730
17749
  color: var(--gray-50);
17731
17750
  background-color: var(--gray-400);
17732
17751
  }
17752
+
17753
+ // Firefox fallback using emotion variables
17754
+ // we can delete this whole block of code and variables in SegmentedControl.tsx
17755
+ // once Firefox supports :has selector
17756
+ @supports not selector(:has(*)) {
17757
+ // equivalent to &:has(:checked:not(:disabled))
17758
+ ${checked && !disabled ? `
17759
+ background-color: var(--segmented-control-selected-color);
17760
+ outline: var(--segmented-control-border-width) solid var(--segmented-control-selected-color);
17761
+ box-shadow: 0 0.43em 1.7em 0 rgba(0, 0, 0, 0.15);
17762
+ color: white;
17763
+ -webkit-text-stroke-width: thin;
17764
+ z-index: 0;` : void 0}
17765
+
17766
+ // equivalent to &:hover:not(:has(:disabled, :checked))
17767
+ &:hover {
17768
+ ${!checked && !disabled ? `background-color: var(--gray-100);` : void 0}
17769
+ }
17770
+
17771
+ // equivalent to &:has(:disabled)
17772
+ ${disabled ? `
17773
+ color: var(--gray-400);
17774
+ cursor: default;` : void 0}
17775
+
17776
+ // equivalent to &:has(:checked:disabled)
17777
+ ${checked && disabled && `
17778
+ color: var(--gray-50);
17779
+ background-color: var(--gray-400);
17780
+ `}
17781
+ }
17733
17782
  `;
17734
17783
  var segmentedControlLabelIconOnlyStyles = css79`
17735
17784
  padding-inline: 0.5em;
@@ -17794,7 +17843,7 @@ var SegmentedControl = ({
17794
17843
  "label",
17795
17844
  {
17796
17845
  css: [
17797
- segmentedControlLabelStyles,
17846
+ segmentedControlLabelStyles(option.value === value, isDisabled),
17798
17847
  sizeStyles,
17799
17848
  isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
17800
17849
  ],
package/dist/index.d.ts CHANGED
@@ -20525,8 +20525,9 @@ declare const Drawer: React__default.ForwardRefExoticComponent<DrawerProps & Omi
20525
20525
  type DrawerContentProps = {
20526
20526
  children: ReactNode;
20527
20527
  buttonGroup?: ReactNode;
20528
+ noPadding?: boolean;
20528
20529
  } & HTMLAttributes<HTMLDivElement>;
20529
- declare const DrawerContent: ({ children, buttonGroup, ...props }: DrawerContentProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
20530
+ declare const DrawerContent: ({ children, buttonGroup, noPadding, ...props }: DrawerContentProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
20530
20531
 
20531
20532
  interface DrawerRendererProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, 'children'> {
20532
20533
  /** The ID of the stack to render. Some drawers need to use the same stack ID to be rendered here */
@@ -22022,8 +22023,9 @@ declare const ResolveIcon: ({ icon, name, styleType, ...props }: ResolveIconProp
22022
22023
 
22023
22024
  type TileProps = {
22024
22025
  children: ReactNode;
22026
+ disabled?: boolean;
22025
22027
  } & HtmlHTMLAttributes<HTMLButtonElement>;
22026
- declare const Tile: ({ children, ...props }: TileProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
22028
+ declare const Tile: ({ children, disabled, ...props }: TileProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
22027
22029
 
22028
22030
  type TileContainerProps = React$1.HtmlHTMLAttributes<HTMLDivElement> & {
22029
22031
  /** sets the background colour of the outter container
package/dist/index.js CHANGED
@@ -13103,9 +13103,9 @@ var DrawerContentBtnGroup = import_react50.css`
13103
13103
 
13104
13104
  // src/components/Drawer/DrawerContent.tsx
13105
13105
  var import_jsx_runtime40 = require("@emotion/react/jsx-runtime");
13106
- var DrawerContent2 = ({ children, buttonGroup, ...props }) => {
13106
+ var DrawerContent2 = ({ children, buttonGroup, noPadding = false, ...props }) => {
13107
13107
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { css: DrawerContent, ...props, children: [
13108
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { css: DrawerContentInner, children }),
13108
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { css: [DrawerContentInner, noPadding ? { padding: 0 } : null], children }),
13109
13109
  buttonGroup ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { css: DrawerContentBtnGroup, children: buttonGroup }) : null
13110
13110
  ] });
13111
13111
  };
@@ -15006,11 +15006,11 @@ var IntegrationTile = ({
15006
15006
 
15007
15007
  // src/components/Tiles/styles/Tile.styles.ts
15008
15008
  var import_react77 = require("@emotion/react");
15009
+ var tileBorderSize = "1px";
15009
15010
  var Tile = import_react77.css`
15010
15011
  background: var(--white);
15011
- border: none;
15012
15012
  cursor: pointer;
15013
- outline: 1px solid var(--gray-300);
15013
+ border: ${tileBorderSize} solid var(--gray-300);
15014
15014
  display: grid;
15015
15015
  padding: var(--spacing-base);
15016
15016
  place-items: center;
@@ -15023,12 +15023,17 @@ var Tile = import_react77.css`
15023
15023
  &:focus {
15024
15024
  background: var(--gray-50);
15025
15025
  }
15026
+
15027
+ &[aria-disabled='true'],
15028
+ &:disabled {
15029
+ pointer-events: none;
15030
+ }
15026
15031
  `;
15027
15032
 
15028
15033
  // src/components/Tiles/Tile.tsx
15029
15034
  var import_jsx_runtime74 = require("@emotion/react/jsx-runtime");
15030
- var Tile2 = ({ children, ...props }) => {
15031
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("button", { type: "button", css: Tile, ...props, children });
15035
+ var Tile2 = ({ children, disabled, ...props }) => {
15036
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("button", { type: "button", css: Tile, disabled, ...props, children });
15032
15037
  };
15033
15038
 
15034
15039
  // src/components/Tiles/styles/TileContainer.styles.ts
@@ -15041,6 +15046,13 @@ var TileContainerInner = (gap, templateColumns) => import_react78.css`
15041
15046
  display: grid;
15042
15047
  grid-template-columns: ${templateColumns};
15043
15048
  gap: var(--spacing-${gap});
15049
+ margin-top: ${tileBorderSize};
15050
+ margin-left: ${tileBorderSize};
15051
+
15052
+ > * {
15053
+ margin-top: -${tileBorderSize};
15054
+ margin-left: -${tileBorderSize};
15055
+ }
15044
15056
  `;
15045
15057
 
15046
15058
  // src/components/Tiles/TileContainer.tsx
@@ -15529,6 +15541,13 @@ var linkParameterInput = (withExternalLinkIcon) => import_react85.css`
15529
15541
  ${withExternalLinkIcon ? "calc(var(--spacing-lg) * 2 + var(--spacing-xs))" : "var(--spacing-xl)"} +
15530
15542
  var(--spacing-base)
15531
15543
  );
15544
+
15545
+ &:focus,
15546
+ &:focus-within {
15547
+ &[readonly] {
15548
+ border-color: var(--white);
15549
+ }
15550
+ }
15532
15551
  `;
15533
15552
  var linkParameterIcon = import_react85.css`
15534
15553
  align-items: center;
@@ -17876,7 +17895,7 @@ var segmentedControlItemStyles = import_react110.css`
17876
17895
  var segmentedControlInputStyles = import_react110.css`
17877
17896
  ${accessibleHidden}
17878
17897
  `;
17879
- var segmentedControlLabelStyles = import_react110.css`
17898
+ var segmentedControlLabelStyles = (checked, disabled) => import_react110.css`
17880
17899
  position: relative;
17881
17900
  display: flex;
17882
17901
  align-items: center;
@@ -17912,6 +17931,36 @@ var segmentedControlLabelStyles = import_react110.css`
17912
17931
  color: var(--gray-50);
17913
17932
  background-color: var(--gray-400);
17914
17933
  }
17934
+
17935
+ // Firefox fallback using emotion variables
17936
+ // we can delete this whole block of code and variables in SegmentedControl.tsx
17937
+ // once Firefox supports :has selector
17938
+ @supports not selector(:has(*)) {
17939
+ // equivalent to &:has(:checked:not(:disabled))
17940
+ ${checked && !disabled ? `
17941
+ background-color: var(--segmented-control-selected-color);
17942
+ outline: var(--segmented-control-border-width) solid var(--segmented-control-selected-color);
17943
+ box-shadow: 0 0.43em 1.7em 0 rgba(0, 0, 0, 0.15);
17944
+ color: white;
17945
+ -webkit-text-stroke-width: thin;
17946
+ z-index: 0;` : void 0}
17947
+
17948
+ // equivalent to &:hover:not(:has(:disabled, :checked))
17949
+ &:hover {
17950
+ ${!checked && !disabled ? `background-color: var(--gray-100);` : void 0}
17951
+ }
17952
+
17953
+ // equivalent to &:has(:disabled)
17954
+ ${disabled ? `
17955
+ color: var(--gray-400);
17956
+ cursor: default;` : void 0}
17957
+
17958
+ // equivalent to &:has(:checked:disabled)
17959
+ ${checked && disabled && `
17960
+ color: var(--gray-50);
17961
+ background-color: var(--gray-400);
17962
+ `}
17963
+ }
17915
17964
  `;
17916
17965
  var segmentedControlLabelIconOnlyStyles = import_react110.css`
17917
17966
  padding-inline: 0.5em;
@@ -17976,7 +18025,7 @@ var SegmentedControl = ({
17976
18025
  "label",
17977
18026
  {
17978
18027
  css: [
17979
- segmentedControlLabelStyles,
18028
+ segmentedControlLabelStyles(option.value === value, isDisabled),
17980
18029
  sizeStyles,
17981
18030
  isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
17982
18031
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/design-system",
3
- "version": "19.30.1-alpha.0+fa7b5018a",
3
+ "version": "19.32.1-alpha.4+e139d9ab3",
4
4
  "description": "Uniform design system components",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -24,8 +24,8 @@
24
24
  "@storybook/react": "6.5.16",
25
25
  "@types/react": "18.2.7",
26
26
  "@types/react-dom": "18.2.4",
27
- "@uniformdev/canvas": "^19.30.1-alpha.0+fa7b5018a",
28
- "@uniformdev/richtext": "^19.30.1-alpha.0+fa7b5018a",
27
+ "@uniformdev/canvas": "^19.32.1-alpha.4+e139d9ab3",
28
+ "@uniformdev/richtext": "^19.32.1-alpha.4+e139d9ab3",
29
29
  "autoprefixer": "10.4.14",
30
30
  "hygen": "6.2.11",
31
31
  "postcss": "8.4.24",
@@ -56,7 +56,7 @@
56
56
  "react-select": "5.7.3",
57
57
  "react-use": "17.4.0",
58
58
  "reakit": "1.3.11",
59
- "zod-to-json-schema": "3.21.1"
59
+ "zod-to-json-schema": "3.21.3"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "react": ">=17 || 17 || 18",
@@ -68,5 +68,5 @@
68
68
  "publishConfig": {
69
69
  "access": "public"
70
70
  },
71
- "gitHead": "fa7b5018a6723a15f1932d306a1e674e4a8baf5d"
71
+ "gitHead": "e139d9ab324b00fff68e36751585b829c3bb1fb5"
72
72
  }