@uniformdev/design-system 19.30.1-alpha.0 → 19.33.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/dist/esm/index.js +46 -4
- package/dist/index.d.ts +2 -1
- package/dist/index.js +46 -4
- package/package.json +4 -4
package/dist/esm/index.js
CHANGED
|
@@ -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
|
|
@@ -15306,6 +15311,13 @@ var linkParameterInput = (withExternalLinkIcon) => css68`
|
|
|
15306
15311
|
${withExternalLinkIcon ? "calc(var(--spacing-lg) * 2 + var(--spacing-xs))" : "var(--spacing-xl)"} +
|
|
15307
15312
|
var(--spacing-base)
|
|
15308
15313
|
);
|
|
15314
|
+
|
|
15315
|
+
&:focus,
|
|
15316
|
+
&:focus-within {
|
|
15317
|
+
&[readonly] {
|
|
15318
|
+
border-color: var(--white);
|
|
15319
|
+
}
|
|
15320
|
+
}
|
|
15309
15321
|
`;
|
|
15310
15322
|
var linkParameterIcon = css68`
|
|
15311
15323
|
align-items: center;
|
|
@@ -17694,7 +17706,7 @@ var segmentedControlItemStyles = css79`
|
|
|
17694
17706
|
var segmentedControlInputStyles = css79`
|
|
17695
17707
|
${accessibleHidden}
|
|
17696
17708
|
`;
|
|
17697
|
-
var segmentedControlLabelStyles = css79`
|
|
17709
|
+
var segmentedControlLabelStyles = (checked, disabled) => css79`
|
|
17698
17710
|
position: relative;
|
|
17699
17711
|
display: flex;
|
|
17700
17712
|
align-items: center;
|
|
@@ -17730,6 +17742,36 @@ var segmentedControlLabelStyles = css79`
|
|
|
17730
17742
|
color: var(--gray-50);
|
|
17731
17743
|
background-color: var(--gray-400);
|
|
17732
17744
|
}
|
|
17745
|
+
|
|
17746
|
+
// Firefox fallback using emotion variables
|
|
17747
|
+
// we can delete this whole block of code and variables in SegmentedControl.tsx
|
|
17748
|
+
// once Firefox supports :has selector
|
|
17749
|
+
@supports not selector(:has(*)) {
|
|
17750
|
+
// equivalent to &:has(:checked:not(:disabled))
|
|
17751
|
+
${checked && !disabled ? `
|
|
17752
|
+
background-color: var(--segmented-control-selected-color);
|
|
17753
|
+
outline: var(--segmented-control-border-width) solid var(--segmented-control-selected-color);
|
|
17754
|
+
box-shadow: 0 0.43em 1.7em 0 rgba(0, 0, 0, 0.15);
|
|
17755
|
+
color: white;
|
|
17756
|
+
-webkit-text-stroke-width: thin;
|
|
17757
|
+
z-index: 0;` : void 0}
|
|
17758
|
+
|
|
17759
|
+
// equivalent to &:hover:not(:has(:disabled, :checked))
|
|
17760
|
+
&:hover {
|
|
17761
|
+
${!checked && !disabled ? `background-color: var(--gray-100);` : void 0}
|
|
17762
|
+
}
|
|
17763
|
+
|
|
17764
|
+
// equivalent to &:has(:disabled)
|
|
17765
|
+
${disabled ? `
|
|
17766
|
+
color: var(--gray-400);
|
|
17767
|
+
cursor: default;` : void 0}
|
|
17768
|
+
|
|
17769
|
+
// equivalent to &:has(:checked:disabled)
|
|
17770
|
+
${checked && disabled && `
|
|
17771
|
+
color: var(--gray-50);
|
|
17772
|
+
background-color: var(--gray-400);
|
|
17773
|
+
`}
|
|
17774
|
+
}
|
|
17733
17775
|
`;
|
|
17734
17776
|
var segmentedControlLabelIconOnlyStyles = css79`
|
|
17735
17777
|
padding-inline: 0.5em;
|
|
@@ -17794,7 +17836,7 @@ var SegmentedControl = ({
|
|
|
17794
17836
|
"label",
|
|
17795
17837
|
{
|
|
17796
17838
|
css: [
|
|
17797
|
-
segmentedControlLabelStyles,
|
|
17839
|
+
segmentedControlLabelStyles(option.value === value, isDisabled),
|
|
17798
17840
|
sizeStyles,
|
|
17799
17841
|
isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
|
|
17800
17842
|
],
|
package/dist/index.d.ts
CHANGED
|
@@ -22022,8 +22022,9 @@ declare const ResolveIcon: ({ icon, name, styleType, ...props }: ResolveIconProp
|
|
|
22022
22022
|
|
|
22023
22023
|
type TileProps = {
|
|
22024
22024
|
children: ReactNode;
|
|
22025
|
+
disabled?: boolean;
|
|
22025
22026
|
} & HtmlHTMLAttributes<HTMLButtonElement>;
|
|
22026
|
-
declare const Tile: ({ children, ...props }: TileProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
22027
|
+
declare const Tile: ({ children, disabled, ...props }: TileProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
22027
22028
|
|
|
22028
22029
|
type TileContainerProps = React$1.HtmlHTMLAttributes<HTMLDivElement> & {
|
|
22029
22030
|
/** sets the background colour of the outter container
|
package/dist/index.js
CHANGED
|
@@ -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
|
|
@@ -15529,6 +15534,13 @@ var linkParameterInput = (withExternalLinkIcon) => import_react85.css`
|
|
|
15529
15534
|
${withExternalLinkIcon ? "calc(var(--spacing-lg) * 2 + var(--spacing-xs))" : "var(--spacing-xl)"} +
|
|
15530
15535
|
var(--spacing-base)
|
|
15531
15536
|
);
|
|
15537
|
+
|
|
15538
|
+
&:focus,
|
|
15539
|
+
&:focus-within {
|
|
15540
|
+
&[readonly] {
|
|
15541
|
+
border-color: var(--white);
|
|
15542
|
+
}
|
|
15543
|
+
}
|
|
15532
15544
|
`;
|
|
15533
15545
|
var linkParameterIcon = import_react85.css`
|
|
15534
15546
|
align-items: center;
|
|
@@ -17876,7 +17888,7 @@ var segmentedControlItemStyles = import_react110.css`
|
|
|
17876
17888
|
var segmentedControlInputStyles = import_react110.css`
|
|
17877
17889
|
${accessibleHidden}
|
|
17878
17890
|
`;
|
|
17879
|
-
var segmentedControlLabelStyles = import_react110.css`
|
|
17891
|
+
var segmentedControlLabelStyles = (checked, disabled) => import_react110.css`
|
|
17880
17892
|
position: relative;
|
|
17881
17893
|
display: flex;
|
|
17882
17894
|
align-items: center;
|
|
@@ -17912,6 +17924,36 @@ var segmentedControlLabelStyles = import_react110.css`
|
|
|
17912
17924
|
color: var(--gray-50);
|
|
17913
17925
|
background-color: var(--gray-400);
|
|
17914
17926
|
}
|
|
17927
|
+
|
|
17928
|
+
// Firefox fallback using emotion variables
|
|
17929
|
+
// we can delete this whole block of code and variables in SegmentedControl.tsx
|
|
17930
|
+
// once Firefox supports :has selector
|
|
17931
|
+
@supports not selector(:has(*)) {
|
|
17932
|
+
// equivalent to &:has(:checked:not(:disabled))
|
|
17933
|
+
${checked && !disabled ? `
|
|
17934
|
+
background-color: var(--segmented-control-selected-color);
|
|
17935
|
+
outline: var(--segmented-control-border-width) solid var(--segmented-control-selected-color);
|
|
17936
|
+
box-shadow: 0 0.43em 1.7em 0 rgba(0, 0, 0, 0.15);
|
|
17937
|
+
color: white;
|
|
17938
|
+
-webkit-text-stroke-width: thin;
|
|
17939
|
+
z-index: 0;` : void 0}
|
|
17940
|
+
|
|
17941
|
+
// equivalent to &:hover:not(:has(:disabled, :checked))
|
|
17942
|
+
&:hover {
|
|
17943
|
+
${!checked && !disabled ? `background-color: var(--gray-100);` : void 0}
|
|
17944
|
+
}
|
|
17945
|
+
|
|
17946
|
+
// equivalent to &:has(:disabled)
|
|
17947
|
+
${disabled ? `
|
|
17948
|
+
color: var(--gray-400);
|
|
17949
|
+
cursor: default;` : void 0}
|
|
17950
|
+
|
|
17951
|
+
// equivalent to &:has(:checked:disabled)
|
|
17952
|
+
${checked && disabled && `
|
|
17953
|
+
color: var(--gray-50);
|
|
17954
|
+
background-color: var(--gray-400);
|
|
17955
|
+
`}
|
|
17956
|
+
}
|
|
17915
17957
|
`;
|
|
17916
17958
|
var segmentedControlLabelIconOnlyStyles = import_react110.css`
|
|
17917
17959
|
padding-inline: 0.5em;
|
|
@@ -17976,7 +18018,7 @@ var SegmentedControl = ({
|
|
|
17976
18018
|
"label",
|
|
17977
18019
|
{
|
|
17978
18020
|
css: [
|
|
17979
|
-
segmentedControlLabelStyles,
|
|
18021
|
+
segmentedControlLabelStyles(option.value === value, isDisabled),
|
|
17980
18022
|
sizeStyles,
|
|
17981
18023
|
isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
|
|
17982
18024
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/design-system",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.33.0",
|
|
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.
|
|
28
|
-
"@uniformdev/richtext": "^19.
|
|
27
|
+
"@uniformdev/canvas": "^19.33.0",
|
|
28
|
+
"@uniformdev/richtext": "^19.33.0",
|
|
29
29
|
"autoprefixer": "10.4.14",
|
|
30
30
|
"hygen": "6.2.11",
|
|
31
31
|
"postcss": "8.4.24",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "a26cf289e832737b2cf4c9b6d767640b627a6368"
|
|
72
72
|
}
|