paris 0.8.2 → 0.8.3

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,11 @@
1
1
  # paris
2
2
 
3
+ ## 0.8.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 536f830: TextArea: default `rows` prop to 3
8
+
3
9
  ## 0.8.2
4
10
 
5
11
  ### 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.2",
5
+ "version": "0.8.3",
6
6
  "homepage": "https://paris.slingshot.fm",
7
7
  "license": "MIT",
8
8
  "repository": {
@@ -126,10 +126,7 @@
126
126
  "typescript": "^5.2.2"
127
127
  },
128
128
  "scripts": {
129
- "dev": "next dev",
130
129
  "build": "pnpm generate:exports && next build",
131
- "start": "next start",
132
- "lint": "next lint",
133
130
  "storybook": "storybook dev -p 6006",
134
131
  "build:storybook": "storybook build",
135
132
  "create:component": "node ./scripts/createComponent.js",
@@ -1,8 +1,8 @@
1
1
  import type { FC, ReactNode } from 'react';
2
+ import { useState } from 'react';
2
3
  import { AnimatePresence, motion } from 'framer-motion';
3
4
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
4
5
  import { faPlus } from '@fortawesome/free-solid-svg-icons';
5
- import { useState } from 'react';
6
6
  import clsx from 'clsx';
7
7
  import styles from './Accordion.module.scss';
8
8
  import { TextWhenString } from '../utility';
@@ -1,8 +1,8 @@
1
1
  import type {
2
2
  ComponentPropsWithoutRef, CSSProperties, FC, ReactNode,
3
3
  } from 'react';
4
- import type { CSSLength } from '@ssh/csstypes';
5
4
  import { useMemo } from 'react';
5
+ import type { CSSLength } from '@ssh/csstypes';
6
6
  import clsx from 'clsx';
7
7
  import styles from './Avatar.module.scss';
8
8
  import { pvar } from '../theme';
@@ -1,8 +1,7 @@
1
1
  'use client';
2
2
 
3
3
  import type {
4
- CSSProperties,
5
- FC, HTMLAttributeAnchorTarget, MouseEventHandler, ReactNode,
4
+ CSSProperties, FC, HTMLAttributeAnchorTarget, MouseEventHandler, ReactNode,
6
5
  } from 'react';
7
6
  import type { ButtonProps as AriaButtonProps } from '@ariakit/react';
8
7
  import { Button as AriaButton } from '@ariakit/react';
@@ -1,7 +1,7 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { createElement } from 'react';
3
3
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
4
- import { faCheck, faCancel, faWarning } from '@fortawesome/free-solid-svg-icons';
4
+ import { faCancel, faCheck, faWarning } from '@fortawesome/free-solid-svg-icons';
5
5
  import { Callout } from './Callout';
6
6
 
7
7
  const meta: Meta<typeof Callout> = {
@@ -1,7 +1,6 @@
1
1
  import type { FC, HTMLAttributes, ReactNode } from 'react';
2
2
  import clsx from 'clsx';
3
3
  import styles from './Card.module.scss';
4
- import { Tilt } from '../tilt';
5
4
 
6
5
  export type CardProps = {
7
6
  /**
@@ -1,9 +1,9 @@
1
1
  'use client';
2
2
 
3
- import type { ReactNode, ComponentPropsWithoutRef } from 'react';
3
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
4
+ import { useId, useState } from 'react';
4
5
  import { Combobox as HCombobox, Transition } from '@headlessui/react';
5
6
  import clsx from 'clsx';
6
- import { useId, useState } from 'react';
7
7
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
8
8
  import { faClose } from '@fortawesome/free-solid-svg-icons';
9
9
  import inputStyles from '../input/Input.module.scss';
@@ -3,13 +3,12 @@
3
3
  import type {
4
4
  ComponentPropsWithoutRef, FC, MouseEventHandler, PropsWithChildren, ReactNode,
5
5
  } from 'react';
6
- import { Dialog as HDialog, Transition } from '@headlessui/react';
7
6
  import { Fragment, useEffect, useState } from 'react';
7
+ import { Dialog as HDialog, Transition } from '@headlessui/react';
8
8
  import clsx from 'clsx';
9
9
  import styles from './Dialog.module.scss';
10
10
  import { Text } from '../text';
11
11
  import { Button } from '../button';
12
- import { pvar } from '../theme';
13
12
  import { TextWhenString } from '../utility/TextWhenString';
14
13
  import { VisuallyHidden } from '../utility/VisuallyHidden';
15
14
  import { RemoveFromDOM } from '../utility/RemoveFromDOM';
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable react-hooks/rules-of-hooks */
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
- import { memo, useState } from 'react';
3
+ import { useState } from 'react';
4
4
  import { Drawer } from './Drawer';
5
5
  import { Button } from '../button';
6
6
  import { usePagination } from '../pagination';
@@ -1,27 +1,20 @@
1
1
  'use client';
2
2
 
3
- import {
4
- Fragment, useMemo, useState,
5
- } from 'react';
6
3
  import type { ReactNode } from 'react';
4
+ import { Fragment, useMemo, useState } from 'react';
7
5
  import { Dialog, Transition } from '@headlessui/react';
8
6
  import clsx from 'clsx';
9
7
  import type { CSSLength } from '@ssh/csstypes';
10
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
11
- import { faClose, faChevronLeft, faChevronRight } from '@fortawesome/free-solid-svg-icons';
12
- import { Simulate } from 'react-dom/test-utils';
13
8
  import styles from './Drawer.module.scss';
14
9
  import { Text } from '../text';
15
10
  import { VisuallyHidden } from '../utility/VisuallyHidden';
16
11
  import { TextWhenString } from '../utility/TextWhenString';
17
12
  import { Button } from '../button';
18
- import { pvar } from '../theme';
19
13
  import { RemoveFromDOM } from '../utility/RemoveFromDOM';
20
14
  import type { PaginationState } from '../pagination';
21
15
  import {
22
16
  ChevronLeft, ChevronRight, Close, Icon,
23
17
  } from '../icon';
24
- import { Ellipsis } from '../icon/Ellipsis';
25
18
 
26
19
  export const DrawerSizePresets = ['content', 'default', 'full'] as const;
27
20
 
@@ -1,8 +1,5 @@
1
- import {
2
- type FC, type PropsWithChildren, type ComponentPropsWithoutRef, cloneElement,
3
- } from 'react';
1
+ import React, { type ComponentPropsWithoutRef, type FC, type PropsWithChildren } from 'react';
4
2
  import clsx from 'clsx';
5
- import React from 'react';
6
3
  import styles from '../input/Input.module.scss';
7
4
  import type { TextProps } from '../text';
8
5
  import { Text } from '../text';
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
+ import type { ComponentPropsWithoutRef, FC, ForwardedRef } from 'react';
3
4
  import { forwardRef, useId } from 'react';
4
- import type { FC, ComponentPropsWithoutRef, ForwardedRef } from 'react';
5
5
  import clsx from 'clsx';
6
6
  import styles from './Input.module.scss';
7
7
  import type { TextProps } from '../text';
@@ -3,9 +3,9 @@
3
3
  import type {
4
4
  ComponentPropsWithoutRef, FC, ReactElement, ReactNode,
5
5
  } from 'react';
6
+ import { forwardRef, useState } from 'react';
6
7
  import type { PopoverProps as RTPopoverProps } from 'react-tiny-popover';
7
8
  import { Popover as RTPopover } from 'react-tiny-popover';
8
- import { forwardRef, useState } from 'react';
9
9
  import clsx from 'clsx';
10
10
  import styles from './Popover.module.scss';
11
11
  import typography from '../text/Typography.module.css';
@@ -2,16 +2,15 @@
2
2
 
3
3
  'use client';
4
4
 
5
- import type { ReactNode, ComponentPropsWithoutRef, ForwardedRef } from 'react';
5
+ import type { ComponentPropsWithoutRef, ForwardedRef, ReactNode } from 'react';
6
+ import { forwardRef, useId } from 'react';
6
7
  import { Listbox, RadioGroup, Transition } from '@headlessui/react';
7
8
  import clsx from 'clsx';
8
9
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
9
10
  import { faChevronDown } from '@fortawesome/free-solid-svg-icons';
10
- import { forwardRef, useId } from 'react';
11
11
  import inputStyles from '../input/Input.module.scss';
12
12
  import dropdownStyles from '../utility/Dropdown.module.scss';
13
13
  import styles from './Select.module.scss';
14
- import typography from '../text/Typography.module.css';
15
14
  import type { TextProps } from '../text';
16
15
  import { Text } from '../text';
17
16
  import type { InputProps } from '../input';
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import type { ComponentPropsWithoutRef, FC, ReactNode } from 'react';
3
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
4
4
  import { useId, useMemo } from 'react';
5
5
  import clsx from 'clsx';
6
6
  import styles from './Table.module.scss';
@@ -1,15 +1,14 @@
1
1
  'use client';
2
2
 
3
3
  import type { CSSProperties, FC, ReactNode } from 'react';
4
- import { Tab } from '@headlessui/react';
5
4
  import { useId, useState } from 'react';
5
+ import { Tab } from '@headlessui/react';
6
6
  import clsx from 'clsx';
7
7
  import type { CSSLength } from '@ssh/csstypes';
8
8
  import { motion } from 'framer-motion';
9
9
  import styles from './Tabs.module.scss';
10
10
  import typography from '../text/Typography.module.css';
11
11
  import { easeInOutExpo } from '../utility';
12
- import { theme } from '../theme';
13
12
 
14
13
  export type TabsProps = {
15
14
  /**
@@ -2,7 +2,6 @@ import type { FC, ReactNode } from 'react';
2
2
  import clsx from 'clsx';
3
3
  import styles from './Tag.module.scss';
4
4
  import typography from '../text/Typography.module.css';
5
- import { TextWhenString } from '../utility';
6
5
 
7
6
  export type TagProps = {
8
7
  /** The size of the Tag. */
@@ -3,7 +3,6 @@ import { useId } from 'react';
3
3
  import clsx from 'clsx';
4
4
  import type { InputProps } from '../input';
5
5
  import styles from '../input/Input.module.scss';
6
- import { Text } from '../text';
7
6
  import { MemoizedEnhancer } from '../../helpers/renderEnhancer';
8
7
  import { pget, theme } from '../theme';
9
8
  import { Field } from '../field';
@@ -31,6 +30,7 @@ export const TextArea: FC<InputProps & ComponentPropsWithoutRef<'textarea'>> = (
31
30
  endEnhancer,
32
31
  disabled,
33
32
  overrides,
33
+ rows = 3,
34
34
  ...props
35
35
  }) => {
36
36
  const textareaID = useId();
@@ -70,6 +70,7 @@ export const TextArea: FC<InputProps & ComponentPropsWithoutRef<'textarea'>> = (
70
70
  aria-describedby={`${textareaID}-description`}
71
71
  aria-disabled={disabled}
72
72
  readOnly={disabled}
73
+ rows={rows}
73
74
  className={clsx(
74
75
  props.className,
75
76
  styles.input,
@@ -3,8 +3,8 @@ import type { CSSColor, CSSLength } from '@ssh/csstypes';
3
3
  import type { Property } from 'csstype';
4
4
  import type { PartialDeep } from 'type-fest';
5
5
  import merge from 'ts-deepmerge';
6
- import { Tokens as T } from './tokens';
7
6
  import type { TokensT } from './tokens';
7
+ import { Tokens as T } from './tokens';
8
8
 
9
9
  export type FontDefinition = {
10
10
  fontSize: CSSLength,
@@ -1,5 +1,5 @@
1
- import { memo } from 'react';
2
1
  import type { PropsWithChildren } from 'react';
2
+ import { memo } from 'react';
3
3
  import { VisuallyHidden as AriaVisuallyHidden } from '@ariakit/react';
4
4
 
5
5
  /**