paris 0.8.20 → 0.8.22
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# paris
|
|
2
2
|
|
|
3
|
+
## 0.8.22
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 0243ccb: fix(Field): Remove stopPropagation on Field component
|
|
8
|
+
|
|
9
|
+
## 0.8.21
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 5d2f644: Checkbox: fix label onClick
|
|
14
|
+
- 1476e89: Checkbox: default to `ParagraphXSmall` text styling for label when string is passed
|
|
15
|
+
- ed42d02: Button: honor passed `style` prop
|
|
16
|
+
|
|
3
17
|
## 0.8.20
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "paris",
|
|
3
3
|
"author": "Sanil Chawla <sanil@slingshot.fm> (https://sanil.co)",
|
|
4
4
|
"description": "Paris is Slingshot's React design system. It's a collection of reusable components, design tokens, and guidelines that help us build consistent, accessible, and performant user interfaces.",
|
|
5
|
-
"version": "0.8.
|
|
5
|
+
"version": "0.8.22",
|
|
6
6
|
"homepage": "https://paris.slingshot.fm",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|
|
@@ -137,6 +137,7 @@ export const Button: FC<ButtonProps> = ({
|
|
|
137
137
|
loading,
|
|
138
138
|
href,
|
|
139
139
|
displayNotificationDot = false,
|
|
140
|
+
style,
|
|
140
141
|
...props
|
|
141
142
|
}) => (
|
|
142
143
|
<AriaButton
|
|
@@ -147,9 +148,9 @@ export const Button: FC<ButtonProps> = ({
|
|
|
147
148
|
'--pte-colors-backgroundInverseTertiary': theme ? ButtonThemes[theme].secondary : colors?.secondary,
|
|
148
149
|
'--pte-colors-contentPrimary': theme ? ButtonThemes[theme].primary : colors?.primary,
|
|
149
150
|
'--pte-colors-backgroundTertiary': theme ? ButtonThemes[theme].secondary : colors?.secondary,
|
|
150
|
-
|
|
151
|
+
...style,
|
|
152
|
+
} as CSSProperties : style}
|
|
151
153
|
className={clsx(
|
|
152
|
-
'relative',
|
|
153
154
|
styles.button,
|
|
154
155
|
styles[kind],
|
|
155
156
|
styles[shape],
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { FC, ReactNode } from 'react';
|
|
2
|
-
import { useId } from 'react';
|
|
2
|
+
import { useRef, useId } from 'react';
|
|
3
3
|
import * as RadixCheckbox from '@radix-ui/react-checkbox';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import styles from './Checkbox.module.scss';
|
|
6
6
|
import { pvar } from '../theme';
|
|
7
|
+
import { TextWhenString } from '../utility';
|
|
7
8
|
|
|
8
9
|
export type CheckboxProps = {
|
|
9
10
|
checked?: boolean;
|
|
@@ -35,10 +36,8 @@ export const Checkbox: FC<CheckboxProps> = ({
|
|
|
35
36
|
}) => {
|
|
36
37
|
const inputID = useId();
|
|
37
38
|
return (
|
|
38
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-noninteractive-element-interactions
|
|
39
39
|
<label
|
|
40
40
|
htmlFor={inputID}
|
|
41
|
-
onClick={() => onChange?.(!checked)}
|
|
42
41
|
className={clsx(styles.container, disabled && styles.disabled, className)}
|
|
43
42
|
{...props}
|
|
44
43
|
>
|
|
@@ -58,7 +57,9 @@ export const Checkbox: FC<CheckboxProps> = ({
|
|
|
58
57
|
</svg>
|
|
59
58
|
</RadixCheckbox.Indicator>
|
|
60
59
|
</RadixCheckbox.Root>
|
|
61
|
-
|
|
60
|
+
<TextWhenString kind="paragraphXSmall">
|
|
61
|
+
{children}
|
|
62
|
+
</TextWhenString>
|
|
62
63
|
</label>
|
|
63
64
|
);
|
|
64
65
|
};
|