paris 0.8.12 → 0.8.14

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,17 @@
1
1
  # paris
2
2
 
3
+ ## 0.8.14
4
+
5
+ ### Patch Changes
6
+
7
+ - effd11c: Adjust height of drawer header to design
8
+
9
+ ## 0.8.13
10
+
11
+ ### Patch Changes
12
+
13
+ - 74d5542: A bunch of minor changes and UI adjustments
14
+
3
15
  ## 0.8.12
4
16
 
5
17
  ### 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.12",
5
+ "version": "0.8.14",
6
6
  "homepage": "https://paris.slingshot.fm",
7
7
  "license": "MIT",
8
8
  "repository": {
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import type { ComponentPropsWithoutRef, ReactNode } from 'react';
3
+ import type { ComponentPropsWithoutRef, CSSProperties, ReactNode } from 'react';
4
4
  import { useId, useState } from 'react';
5
5
  import { Combobox as HCombobox, Transition } from '@headlessui/react';
6
6
  import clsx from 'clsx';
@@ -67,6 +67,10 @@ export type ComboboxProps<T extends Record<string, any>> = {
67
67
  * @default Create "%v"...
68
68
  */
69
69
  customValueString?: string;
70
+ /**
71
+ * The size of the options dropdown, in pixels. Only applicable to kind="listbox".
72
+ */
73
+ maxHeight?: number;
70
74
  /**
71
75
  * Prop overrides for other rendered elements. Overrides for the input itself should be passed directly to the component.
72
76
  */
@@ -110,6 +114,7 @@ export function Combobox<T extends Record<string, any> = Record<string, any>>({
110
114
  onInputChange,
111
115
  allowCustomValue,
112
116
  customValueString = 'Create "%v"',
117
+ maxHeight = 320,
113
118
  overrides,
114
119
  }: ComboboxProps<T>) {
115
120
  const inputID = useId();
@@ -224,6 +229,9 @@ export function Combobox<T extends Record<string, any> = Record<string, any>>({
224
229
  overrides?.optionsContainer,
225
230
  styles.options,
226
231
  )}
232
+ style={{
233
+ '--options-maxHeight': `${maxHeight}px`,
234
+ } as CSSProperties}
227
235
  >
228
236
  {(allowCustomValue && query.length > 0) && (
229
237
  <HCombobox.Option
@@ -4,8 +4,7 @@ $translateOutX: 20%;
4
4
  $translateOutY: 60%;
5
5
 
6
6
  $panelMinMargin: 16px;
7
- $defaultSize: 360px;
8
-
7
+ $defaultSize: 360px + $panelMinMargin;
9
8
  $panelPaddingX: 20px;
10
9
  $panelPaddingY: 20px;
11
10
 
@@ -207,7 +206,6 @@ $panelAnimationDelay: var(--pte-animations-duration-fast);
207
206
  //padding: $panelPaddingY $panelPaddingX;
208
207
  background-color: var(--pte-colors-backgroundPrimary);
209
208
  overflow: auto;
210
- border: 1px solid transparent;
211
209
 
212
210
  display: flex;
213
211
  flex-direction: column;
@@ -257,7 +255,7 @@ $panelAnimationDelay: var(--pte-animations-duration-fast);
257
255
  align-items: center;
258
256
 
259
257
  border-bottom: 1px solid var(--pte-colors-borderOpaque);
260
- padding: 20px;
258
+ padding: 14px 16px;
261
259
  }
262
260
 
263
261
  .titleBarButtons {
@@ -276,7 +274,7 @@ $panelAnimationDelay: var(--pte-animations-duration-fast);
276
274
  }
277
275
 
278
276
  .content {
279
- padding: 20px 20px 0;
277
+ padding: 20px;
280
278
  overflow-y: scroll;
281
279
  height: 100%;
282
280
  }
@@ -327,7 +327,6 @@ export const Drawer = <T extends string[] | readonly string[] = string[]>({
327
327
  <Button
328
328
  kind="tertiary"
329
329
  shape="circle"
330
- size="small"
331
330
  onClick={() => onClose(false)}
332
331
  startEnhancer={(
333
332
  <Icon icon={Close} size={20} />
@@ -98,6 +98,30 @@
98
98
  &[type="file"]::-webkit-file-upload-button {
99
99
  display: none;
100
100
  }
101
+
102
+ &[data-status="disabled"] {
103
+ color: var(--pte-colors-contentDisabled);
104
+
105
+ &::placeholder {
106
+ color: var(--pte-colors-contentDisabled);
107
+ }
108
+ }
109
+
110
+ &[data-status="error"] {
111
+ color: var(--pte-colors-contentNegative);
112
+
113
+ &::placeholder {
114
+ color: var(--pte-colors-contentNegative);
115
+ }
116
+ }
117
+
118
+ &[data-status="success"] {
119
+ color: var(--pte-colors-contentPositive);
120
+
121
+ &::placeholder {
122
+ color: var(--pte-colors-contentPositive);
123
+ }
124
+ }
101
125
  }
102
126
  }
103
127
 
@@ -121,6 +121,7 @@ export const Input: FC<InputProps & ComponentPropsWithoutRef<'input'>> = forward
121
121
  aria-label={typeof label === 'string' ? label : props['aria-label']}
122
122
  aria-describedby={`${inputID}-description`}
123
123
  aria-disabled={disabled}
124
+ data-status={status}
124
125
  readOnly={disabled}
125
126
  className={clsx(
126
127
  props.className,
@@ -22,6 +22,7 @@
22
22
  .options {
23
23
  max-height: var(--options-maxHeight, auto);
24
24
  overflow-y: auto;
25
+ overflow-x: hidden;
25
26
 
26
27
  position: absolute;
27
28
  top: 100%;
@@ -71,6 +71,7 @@ export const TextArea: FC<InputProps & ComponentPropsWithoutRef<'textarea'>> = (
71
71
  aria-disabled={disabled}
72
72
  readOnly={disabled}
73
73
  rows={rows}
74
+ data-status={status}
74
75
  className={clsx(
75
76
  props.className,
76
77
  styles.input,