@basic-ui/material 1.0.0-alpha.55 → 1.0.0-alpha.56

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": "@basic-ui/material",
3
- "version": "1.0.0-alpha.55",
3
+ "version": "1.0.0-alpha.56",
4
4
  "description": "Accessible React Components used as building blocks for UI patterns",
5
5
  "author": "Lucas Terra <lucasterra7@gmail.com>",
6
6
  "license": "MIT",
@@ -8,12 +8,7 @@
8
8
  "module": "./build/esm/index.js",
9
9
  "jsnext:main": "./build/esm/index.js",
10
10
  "types": "./build/esm/index.d.ts",
11
- "files": [
12
- "/build",
13
- "/src",
14
- "/tailwind",
15
- "/theme-explorer"
16
- ],
11
+ "files": ["/build", "/src", "/tailwind", "/theme-explorer"],
17
12
  "sideEffects": false,
18
13
  "scripts": {
19
14
  "build": "run -T concurrently \"yarn:build:*\"",
@@ -30,8 +25,8 @@
30
25
  "test:watch": "yarn test --watch"
31
26
  },
32
27
  "dependencies": {
33
- "@basic-ui/core": "^0.0.56",
34
- "@basic-ui/dynamic-theme": "^0.0.16",
28
+ "@basic-ui/core": "^0.0.57",
29
+ "@basic-ui/dynamic-theme": "^0.0.17",
35
30
  "@styled-system/should-forward-prop": "5.1.5",
36
31
  "@types/styled-system": "^5.1.10",
37
32
  "@types/styled-system__css": "^5.0.14",
@@ -39,7 +34,7 @@
39
34
  "styled-system": "^5.1.5"
40
35
  },
41
36
  "devDependencies": {
42
- "@basic-ui/color-picker": "^0.0.14",
37
+ "@basic-ui/color-picker": "^0.0.15",
43
38
  "@emotion/react": "11.14.0",
44
39
  "@emotion/styled": "11.14.1",
45
40
  "@material/material-color-utilities": "0.1.1",
@@ -13,7 +13,7 @@ export type ButtonElevation =
13
13
  | 'elevated'
14
14
  | 'floating'
15
15
  | 'contained';
16
- export type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
16
+ export type ButtonSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
17
17
  export type ButtonShape = 'rounded' | 'square';
18
18
 
19
19
  export interface BaseButtonProps
@@ -26,6 +26,14 @@ export interface BaseButtonProps
26
26
  }
27
27
 
28
28
  const sizeStyles = {
29
+ xxs: {
30
+ height: rem(24),
31
+ iconSize: rem(18),
32
+ contentPaddingInline: rem(10),
33
+ standardInnerRadius: rem(8),
34
+ connectedInnerRadius: rem(2),
35
+ splitInnerRadius: rem(2),
36
+ },
29
37
  xs: {
30
38
  height: rem(32),
31
39
  iconSize: rem(20),
@@ -76,6 +84,7 @@ function getTypographyVariant(size: ButtonSize) {
76
84
  }
77
85
 
78
86
  function getSquareRadius(size: ButtonSize) {
87
+ if (size === 'xxs') return 'small';
79
88
  if (size === 'md') return 'large';
80
89
  if (size === 'lg' || size === 'xl') return 'extra-large';
81
90
  return 'medium';
@@ -18,7 +18,7 @@ const colors = [
18
18
 
19
19
  type Color = typeof colors[number];
20
20
  type ControlShape = 'default' | 'rounded' | 'square';
21
- type ControlSize = 'default' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
21
+ type ControlSize = 'default' | 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
22
22
 
23
23
  const AppsIcon = (props: any) => (
24
24
  <svg viewBox="0 0 24 24" {...props}>
@@ -179,11 +179,12 @@ Primary.argTypes = {
179
179
  shape: { control: 'inline-radio', options: ['default', 'rounded', 'square'] },
180
180
  size: {
181
181
  control: 'inline-radio',
182
- options: ['default', 'xs', 'sm', 'md', 'lg', 'xl'],
182
+ options: ['default', 'xxs', 'xs', 'sm', 'md', 'lg', 'xl'],
183
183
  },
184
184
  };
185
185
 
186
186
  const sizeToName = {
187
+ xxs: '2X Small',
187
188
  xs: 'Extra small',
188
189
  sm: 'Small',
189
190
  md: 'Medium',
@@ -202,7 +203,7 @@ export const Sizes = ({ shape = 'default' }: { shape?: ControlShape }) => {
202
203
  flexDirection="column"
203
204
  sx={{ gap: 2 }}
204
205
  >
205
- {(['xs', 'sm', 'md', 'lg', 'xl'] as const).map((size) => (
206
+ {(['xxs', 'xs', 'sm', 'md', 'lg', 'xl'] as const).map((size) => (
206
207
  <Box key={size} display="flex" alignItems="center" sx={{ gap: 2 }}>
207
208
  <Button
208
209
  variant="filled"
@@ -284,7 +285,7 @@ Sizes.argTypes = {
284
285
 
285
286
  export const FabExtended = () => (
286
287
  <Box bg="surface" p={3} display="flex" flexDirection="column" sx={{ gap: 2 }}>
287
- {(['xs', 'sm', 'md', 'lg', 'xl'] as const).map((size) => (
288
+ {(['xxs', 'xs', 'sm', 'md', 'lg', 'xl'] as const).map((size) => (
288
289
  <Box key={size} display="flex" alignItems="center" sx={{ gap: 2 }}>
289
290
  <Button variant="fab-extended" size={size} onClick={onClick}>
290
291
  <Box as="span" mr={2} lineHeight={0}>
@@ -19,7 +19,7 @@ const colors = [
19
19
 
20
20
  type Color = typeof colors[number];
21
21
  type ControlShape = 'default' | 'rounded' | 'square';
22
- type ControlSize = 'default' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
22
+ type ControlSize = 'default' | 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
23
23
 
24
24
  const PressableButton = ({
25
25
  children,
@@ -288,6 +288,6 @@ ButtonGroup.argTypes = {
288
288
  shape: { control: 'inline-radio', options: ['default', 'rounded', 'square'] },
289
289
  size: {
290
290
  control: 'inline-radio',
291
- options: ['default', 'xs', 'sm', 'md', 'lg', 'xl'],
291
+ options: ['default', 'xxs', 'xs', 'sm', 'md', 'lg', 'xl'],
292
292
  },
293
293
  };
@@ -21,7 +21,7 @@ const colors = [
21
21
 
22
22
  type Color = typeof colors[number];
23
23
  type ControlShape = 'default' | 'rounded' | 'square';
24
- type ControlSize = 'default' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
24
+ type ControlSize = 'default' | 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
25
25
 
26
26
  const ArrowDownIcon = (props: React.SVGProps<SVGSVGElement>) => (
27
27
  <svg
@@ -105,6 +105,6 @@ SplitButtonExample.argTypes = {
105
105
  shape: { control: 'inline-radio', options: ['default', 'rounded', 'square'] },
106
106
  size: {
107
107
  control: 'inline-radio',
108
- options: ['default', 'xs', 'sm', 'md', 'lg', 'xl'],
108
+ options: ['default', 'xxs', 'xs', 'sm', 'md', 'lg', 'xl'],
109
109
  },
110
110
  };