@apify/ui-library 1.93.2 → 1.93.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apify/ui-library",
3
- "version": "1.93.2",
3
+ "version": "1.93.4",
4
4
  "description": "React UI library used by apify.com",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -26,7 +26,7 @@
26
26
  "It's not nice, but helps us to get around the problem of multiple react instances."
27
27
  ],
28
28
  "dependencies": {
29
- "@apify/ui-icons": "^1.17.0",
29
+ "@apify/ui-icons": "^1.17.1",
30
30
  "@floating-ui/react": "^0.26.2",
31
31
  "@react-hook/resize-observer": "^2.0.2",
32
32
  "clsx": "^2.0.0",
@@ -66,5 +66,5 @@
66
66
  "src",
67
67
  "style"
68
68
  ],
69
- "gitHead": "a106d70b85cbfe603b87aa3d3e94ae3c0db6665c"
69
+ "gitHead": "e724c8f2160e51f05b1ab175697941d328c56068"
70
70
  }
@@ -217,7 +217,7 @@ export const getButtonSizeStyles = (size: ButtonSize = 'medium') => {
217
217
  `;
218
218
  };
219
219
 
220
- const StyledButton = styled(Box)<WithTransientProps<TransientButtonProps>>`
220
+ const StyledButton = styled(Box)<WithTransientProps<Required<TransientButtonProps>>>`
221
221
  /* Basic positioning */
222
222
  display: inline-flex;
223
223
  align-items: center;
@@ -250,8 +250,8 @@ export const Button = forwardRef<HTMLElement, ButtonProps | AnchorButtonProps>((
250
250
  as,
251
251
  children,
252
252
  size = 'medium',
253
- color,
254
- variant,
253
+ color = 'default',
254
+ variant = 'primary',
255
255
  LeftIcon,
256
256
  RightIcon,
257
257
  onClick,
@@ -0,0 +1,31 @@
1
+ import { Meta, ColorPalette, ColorItem } from '@storybook/addon-docs/blocks';
2
+ import { lightTheme } from './generated/colors_theme.light.ts';
3
+ import { darkTheme } from './generated/colors_theme.dark.ts';
4
+
5
+ <Meta title="Design Tokens/Colors" />
6
+
7
+ # Colors
8
+
9
+ <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '2rem' }}>
10
+ <div>
11
+ <h2>Light Theme</h2>
12
+ <ColorPalette>
13
+ {Object.entries(lightTheme)
14
+ .sort(([nameA], [nameB]) => nameA.localeCompare(nameB))
15
+ .map(([name, value]) => (
16
+ <ColorItem key={name} title={name} subtitle={value} colors={{ color: value }} />
17
+ ))}
18
+ </ColorPalette>
19
+ </div>
20
+ <div>
21
+ <h2>Dark Theme</h2>
22
+ <ColorPalette>
23
+ {Object.entries(darkTheme)
24
+ .sort(([nameA], [nameB]) => nameA.localeCompare(nameB))
25
+ .map(([name, value]) => (
26
+ <ColorItem key={name} title={name} subtitle={value} colors={{ color: value }} />
27
+ ))}
28
+ </ColorPalette>
29
+ </div>
30
+ </div>
31
+
@@ -1,6 +0,0 @@
1
- declare const _default: {
2
- title: string;
3
- };
4
- export default _default;
5
- export declare const Default: () => import("react/jsx-runtime").JSX.Element;
6
- //# sourceMappingURL=colors.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"colors.stories.d.ts","sourceRoot":"","sources":["../../../../src/design_system/colors/colors.stories.tsx"],"names":[],"mappings":";;;AAEA,wBAEE;AAUF,eAAO,MAAM,OAAO,+CAMnB,CAAC"}
@@ -1,16 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import styled from 'styled-components';
3
- export default {
4
- title: 'Design Tokens/Colors',
5
- };
6
- const Grid = styled.div `
7
- padding: 32px;
8
- width: 100%;
9
- display: grid;
10
- grid-template-columns: repeat( auto-fit, minmax(100px, 1fr) );
11
- gap: 32px 16px;
12
- `;
13
- export const Default = () => {
14
- return (_jsx(Grid, { children: "TODO COLORS PALETTE" }));
15
- };
16
- //# sourceMappingURL=colors.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"colors.stories.js","sourceRoot":"","sources":["../../../../src/design_system/colors/colors.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,eAAe;IACX,KAAK,EAAE,sBAAsB;CAChC,CAAC;AAEF,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;CAMtB,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,EAAE;IACxB,OAAO,CACH,KAAC,IAAI,sCAEE,CACV,CAAC;AACN,CAAC,CAAC"}
@@ -1,21 +0,0 @@
1
- import styled from 'styled-components';
2
-
3
- export default {
4
- title: 'Design Tokens/Colors',
5
- };
6
-
7
- const Grid = styled.div`
8
- padding: 32px;
9
- width: 100%;
10
- display: grid;
11
- grid-template-columns: repeat( auto-fit, minmax(100px, 1fr) );
12
- gap: 32px 16px;
13
- `;
14
-
15
- export const Default = () => {
16
- return (
17
- <Grid>
18
- TODO COLORS PALETTE
19
- </Grid>
20
- );
21
- };