paris 0.17.10 → 0.18.0

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.
Files changed (80) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/package.json +139 -150
  3. package/src/helpers/renderEnhancer.tsx +4 -5
  4. package/src/helpers/useResizeObserver.ts +17 -23
  5. package/src/pages/_document.tsx +1 -3
  6. package/src/pages/index.tsx +8 -24
  7. package/src/stories/Pagination.mdx +1 -1
  8. package/src/stories/Tokens.mdx +1 -1
  9. package/src/stories/Welcome.mdx +1 -1
  10. package/src/stories/accordion/Accordion.stories.ts +1 -1
  11. package/src/stories/accordion/Accordion.tsx +14 -35
  12. package/src/stories/accordionselect/AccordionSelect.stories.ts +2 -5
  13. package/src/stories/accordionselect/AccordionSelect.tsx +26 -50
  14. package/src/stories/avatar/Avatar.stories.ts +1 -1
  15. package/src/stories/avatar/Avatar.tsx +14 -13
  16. package/src/stories/button/Button.stories.ts +18 -15
  17. package/src/stories/button/Button.tsx +44 -48
  18. package/src/stories/callout/Callout.stories.ts +3 -7
  19. package/src/stories/callout/Callout.tsx +4 -8
  20. package/src/stories/card/Card.stories.ts +1 -1
  21. package/src/stories/card/Card.tsx +4 -11
  22. package/src/stories/cardbutton/CardButton.stories.tsx +1 -1
  23. package/src/stories/cardbutton/CardButton.tsx +16 -18
  24. package/src/stories/checkbox/Checkbox.stories.ts +1 -1
  25. package/src/stories/checkbox/Checkbox.tsx +37 -49
  26. package/src/stories/combobox/Combobox.stories.ts +65 -71
  27. package/src/stories/combobox/Combobox.tsx +80 -89
  28. package/src/stories/dialog/Dialog.stories.tsx +2 -2
  29. package/src/stories/dialog/Dialog.tsx +45 -68
  30. package/src/stories/drawer/Drawer.stories.tsx +63 -105
  31. package/src/stories/drawer/Drawer.tsx +93 -90
  32. package/src/stories/field/Field.stories.ts +1 -1
  33. package/src/stories/field/Field.tsx +25 -30
  34. package/src/stories/icon/Ellipsis.tsx +4 -1
  35. package/src/stories/icon/Icon.stories.ts +2 -2
  36. package/src/stories/icon/Icon.tsx +16 -26
  37. package/src/stories/icon/Info.tsx +4 -1
  38. package/src/stories/icon/Spinner.tsx +4 -2
  39. package/src/stories/icon/index.ts +6 -6
  40. package/src/stories/informationaltooltip/InformationalTooltip.stories.tsx +12 -11
  41. package/src/stories/informationaltooltip/InformationalTooltip.tsx +23 -28
  42. package/src/stories/input/Input.stories.ts +14 -15
  43. package/src/stories/input/Input.tsx +119 -95
  44. package/src/stories/markdown/Markdown.module.scss +384 -0
  45. package/src/stories/markdown/Markdown.stories.ts +203 -0
  46. package/src/stories/markdown/Markdown.tsx +293 -0
  47. package/src/stories/markdown/index.ts +1 -0
  48. package/src/stories/menu/Menu.stories.tsx +4 -10
  49. package/src/stories/menu/Menu.tsx +22 -16
  50. package/src/stories/pagination/usePagination.ts +8 -8
  51. package/src/stories/popover/Popover.stories.ts +2 -2
  52. package/src/stories/popover/Popover.tsx +4 -10
  53. package/src/stories/select/Select.stories.ts +10 -10
  54. package/src/stories/select/Select.tsx +268 -240
  55. package/src/stories/styledlink/StyledLink.stories.ts +1 -1
  56. package/src/stories/styledlink/StyledLink.tsx +11 -17
  57. package/src/stories/table/Table.stories.ts +1 -1
  58. package/src/stories/table/Table.tsx +55 -65
  59. package/src/stories/tabs/Tabs.stories.tsx +2 -2
  60. package/src/stories/tabs/Tabs.tsx +15 -21
  61. package/src/stories/tag/Tag.stories.ts +1 -4
  62. package/src/stories/tag/Tag.tsx +9 -17
  63. package/src/stories/text/Text.stories.ts +1 -1
  64. package/src/stories/text/Text.tsx +49 -31
  65. package/src/stories/text/Typography.module.css +120 -120
  66. package/src/stories/textarea/TextArea.stories.ts +2 -5
  67. package/src/stories/textarea/TextArea.tsx +91 -84
  68. package/src/stories/theme/index.ts +1 -1
  69. package/src/stories/theme/themes.ts +423 -424
  70. package/src/stories/theme/tokens.ts +3 -3
  71. package/src/stories/theme/tw-preflight.css +4 -3
  72. package/src/stories/tilt/Tilt.stories.tsx +3 -6
  73. package/src/stories/tilt/Tilt.tsx +160 -126
  74. package/src/stories/toast/Toast.stories.tsx +2 -2
  75. package/src/stories/toast/Toast.tsx +3 -6
  76. package/src/stories/utility/RemoveFromDOM.tsx +9 -13
  77. package/src/stories/utility/TextWhenString.tsx +3 -16
  78. package/src/stories/utility/VisuallyHidden.tsx +10 -17
  79. package/src/styles/Home.module.css +185 -195
  80. package/src/styles/globals.css +0 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # paris
2
2
 
3
+ ## 0.18.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 0c3b686: Add Markdown component that renders markdown strings using Paris design system components. Supports GFM (tables, task lists, strikethrough, footnotes), HTML passthrough (kbd, mark, details/summary, definition lists), and a configurable `size` prop for base text sizing.
8
+
9
+ ### Patch Changes
10
+
11
+ - 12fb9a7: Migrate tooling from pnpm/ESLint/Husky to Bun/Biome/Lefthook/Commitlint
12
+
3
13
  ## 0.17.10
4
14
 
5
15
  ### Patch Changes
package/package.json CHANGED
@@ -1,152 +1,141 @@
1
1
  {
2
- "name": "paris",
3
- "author": "Sanil Chawla <sanil@slingshot.fm> (https://sanil.co)",
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.17.10",
6
- "homepage": "https://paris.slingshot.fm",
7
- "license": "MIT",
8
- "repository": {
9
- "type": "git",
10
- "url": "https://github.com/slingshot/paris"
11
- },
12
- "files": [
13
- "src/stories",
14
- "src",
15
- "README.md",
16
- "CHANGELOG.md"
17
- ],
18
- "keywords": [
19
- "react",
20
- "design system",
21
- "rsc",
22
- "server components",
23
- "ui",
24
- "components",
25
- "typescript",
26
- "nextjs",
27
- "storybook"
28
- ],
29
- "packageManager": "pnpm@8.15.5",
30
- "engines": {
31
- "node": ">=22.0.0"
32
- },
33
- "exports": {
34
- "./*": "./src/stories/*",
35
- "./accordion": "./src/stories/accordion/index.ts",
36
- "./accordionselect": "./src/stories/accordionselect/index.ts",
37
- "./avatar": "./src/stories/avatar/index.ts",
38
- "./button": "./src/stories/button/index.ts",
39
- "./callout": "./src/stories/callout/index.ts",
40
- "./card": "./src/stories/card/index.ts",
41
- "./cardbutton": "./src/stories/cardbutton/index.ts",
42
- "./checkbox": "./src/stories/checkbox/index.ts",
43
- "./combobox": "./src/stories/combobox/index.ts",
44
- "./dialog": "./src/stories/dialog/index.ts",
45
- "./drawer": "./src/stories/drawer/index.ts",
46
- "./field": "./src/stories/field/index.ts",
47
- "./icon": "./src/stories/icon/index.ts",
48
- "./informationaltooltip": "./src/stories/informationaltooltip/index.ts",
49
- "./input": "./src/stories/input/index.ts",
50
- "./menu": "./src/stories/menu/index.ts",
51
- "./pagination": "./src/stories/pagination/index.ts",
52
- "./popover": "./src/stories/popover/index.ts",
53
- "./select": "./src/stories/select/index.ts",
54
- "./styledlink": "./src/stories/styledlink/index.ts",
55
- "./table": "./src/stories/table/index.ts",
56
- "./tabs": "./src/stories/tabs/index.ts",
57
- "./tag": "./src/stories/tag/index.ts",
58
- "./text": "./src/stories/text/index.ts",
59
- "./textarea": "./src/stories/textarea/index.ts",
60
- "./theme": "./src/stories/theme/index.ts",
61
- "./tilt": "./src/stories/tilt/index.ts",
62
- "./toast": "./src/stories/toast/index.ts",
63
- "./utility": "./src/stories/utility/index.ts"
64
- },
65
- "dependencies": {
66
- "@ariakit/react": "^0.4.20",
67
- "@emotion/is-prop-valid": "^1.4.0",
68
- "@fortawesome/fontawesome-svg-core": "^6.7.2",
69
- "@fortawesome/free-regular-svg-icons": "^6.7.2",
70
- "@fortawesome/free-solid-svg-icons": "^6.7.2",
71
- "@fortawesome/react-fontawesome": "^0.2.2",
72
- "@headlessui/react": "^2.2.4",
73
- "@radix-ui/react-checkbox": "^1.3.3",
74
- "@radix-ui/react-tooltip": "^1.2.8",
75
- "clsx": "^1.2.1",
76
- "font-color-contrast": "^11.1.0",
77
- "framer-motion": "^12.24.10",
78
- "pte": "^0.5.0",
79
- "react-hot-toast": "^2.4.1",
80
- "react-tiny-popover": "^8.1.6",
81
- "ts-deepmerge": "^6.0.3"
82
- },
83
- "peerDependencies": {
84
- "@types/react": "^19",
85
- "@types/react-dom": "^19",
86
- "react": "^19.x",
87
- "react-dom": "^19.x",
88
- "sass": "^1.x",
89
- "typescript": "^5.0"
90
- },
91
- "devDependencies": {
92
- "@changesets/cli": "^2.26.1",
93
- "@ssh/csstypes": "^1.1.0",
94
- "@ssh/eslint-config": "^2.0.3",
95
- "@storybook/addon-essentials": "8.6.14",
96
- "@storybook/addon-interactions": "8.6.14",
97
- "@storybook/addon-links": "8.6.14",
98
- "@storybook/addon-mdx-gfm": "8.6.14",
99
- "@storybook/blocks": "8.6.14",
100
- "@storybook/manager-api": "8.6.14",
101
- "@storybook/nextjs": "8.6.14",
102
- "@storybook/preview-api": "^8.6.14",
103
- "@storybook/react": "8.6.14",
104
- "@storybook/test": "8.6.14",
105
- "@storybook/theming": "8.6.14",
106
- "@stylistic/eslint-plugin": "^5.2.0",
107
- "@types/node": "^22.0.0",
108
- "@types/react": "^19",
109
- "@types/react-dom": "^19",
110
- "@typescript-eslint/eslint-plugin": "^8.46.1",
111
- "@typescript-eslint/parser": "^8.46.1",
112
- "autoprefixer": "^10.4.14",
113
- "change-case": "^4.1.2",
114
- "csstype": "^3.1.2",
115
- "esbuild-sass-plugin": "^2.16.0",
116
- "eslint": "^9.37.0",
117
- "eslint-plugin-css": "^0.8.0",
118
- "eslint-plugin-import": "^2.29.0",
119
- "eslint-plugin-jsx-a11y": "^6.10.0",
120
- "eslint-plugin-react": "^7.37.0",
121
- "eslint-plugin-react-hooks": "^7.0.0",
122
- "eslint-plugin-storybook": "^0.10.2",
123
- "globals": "^16.4.0",
124
- "husky": "^8.0.0",
125
- "jss": "^10.10.0",
126
- "jss-preset-default": "^10.10.0",
127
- "next": "^15.1.6",
128
- "react": "^19.0.0",
129
- "react-dom": "^19.0.0",
130
- "sass": "^1.62.1",
131
- "storybook": "8.6.14",
132
- "storybook-dark-mode": "^4.0.2",
133
- "title-case": "^3.0.3",
134
- "ts-node": "^10.9.1",
135
- "tsconfig-paths-webpack-plugin": "^4.0.1",
136
- "tsup": "^7.2.0",
137
- "type-fest": "^3.10.0",
138
- "typescript": "^5.2.2"
139
- },
140
- "scripts": {
141
- "build": "pnpm generate:exports && next build",
142
- "storybook": "storybook dev -p 6006",
143
- "build:storybook": "storybook build",
144
- "create:component": "node ./scripts/createComponent.js",
145
- "generate:exports": "node ./scripts/generateExports.js",
146
- "generate:theme": "pte export ./src/stories/theme/themes.ts LightTheme -o ./public/pte.css",
147
- "generate:text": "ts-node --esm ./scripts/text.ts",
148
- "release": "pnpm generate:exports && pnpm changeset publish",
149
- "typecheck": "tsc --noEmit",
150
- "lint": "eslint ."
151
- }
2
+ "name": "paris",
3
+ "author": "Sanil Chawla <sanil@slingshot.fm> (https://sanil.co)",
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.18.0",
6
+ "homepage": "https://paris.slingshot.fm",
7
+ "license": "MIT",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/slingshot/paris"
11
+ },
12
+ "files": [
13
+ "src/stories",
14
+ "src",
15
+ "README.md",
16
+ "CHANGELOG.md"
17
+ ],
18
+ "keywords": [
19
+ "react",
20
+ "design system",
21
+ "rsc",
22
+ "server components",
23
+ "ui",
24
+ "components",
25
+ "typescript",
26
+ "nextjs",
27
+ "storybook"
28
+ ],
29
+ "scripts": {
30
+ "build": "bun run generate:exports && next build",
31
+ "storybook": "storybook dev -p 6006",
32
+ "build:storybook": "storybook build",
33
+ "create:component": "node ./scripts/createComponent.js",
34
+ "generate:exports": "node ./scripts/generateExports.js",
35
+ "generate:theme": "pte export ./src/stories/theme/themes.ts LightTheme -o ./public/pte.css",
36
+ "generate:text": "ts-node --esm ./scripts/text.ts",
37
+ "release": "bun run generate:exports && bunx changeset publish",
38
+ "prepare": "test -n \"$CI\" || lefthook install",
39
+ "typecheck": "tsc --noEmit",
40
+ "lint": "biome check .",
41
+ "lint:fix": "biome check --write .",
42
+ "format": "biome format --write ."
43
+ },
44
+ "engines": {
45
+ "node": "22.x"
46
+ },
47
+ "exports": {
48
+ "./*": "./src/stories/*",
49
+ "./accordion": "./src/stories/accordion/index.ts",
50
+ "./accordionselect": "./src/stories/accordionselect/index.ts",
51
+ "./avatar": "./src/stories/avatar/index.ts",
52
+ "./button": "./src/stories/button/index.ts",
53
+ "./callout": "./src/stories/callout/index.ts",
54
+ "./card": "./src/stories/card/index.ts",
55
+ "./cardbutton": "./src/stories/cardbutton/index.ts",
56
+ "./checkbox": "./src/stories/checkbox/index.ts",
57
+ "./combobox": "./src/stories/combobox/index.ts",
58
+ "./dialog": "./src/stories/dialog/index.ts",
59
+ "./drawer": "./src/stories/drawer/index.ts",
60
+ "./field": "./src/stories/field/index.ts",
61
+ "./icon": "./src/stories/icon/index.ts",
62
+ "./informationaltooltip": "./src/stories/informationaltooltip/index.ts",
63
+ "./input": "./src/stories/input/index.ts",
64
+ "./markdown": "./src/stories/markdown/index.ts",
65
+ "./menu": "./src/stories/menu/index.ts",
66
+ "./pagination": "./src/stories/pagination/index.ts",
67
+ "./popover": "./src/stories/popover/index.ts",
68
+ "./select": "./src/stories/select/index.ts",
69
+ "./styledlink": "./src/stories/styledlink/index.ts",
70
+ "./table": "./src/stories/table/index.ts",
71
+ "./tabs": "./src/stories/tabs/index.ts",
72
+ "./tag": "./src/stories/tag/index.ts",
73
+ "./text": "./src/stories/text/index.ts",
74
+ "./textarea": "./src/stories/textarea/index.ts",
75
+ "./theme": "./src/stories/theme/index.ts",
76
+ "./tilt": "./src/stories/tilt/index.ts",
77
+ "./toast": "./src/stories/toast/index.ts",
78
+ "./utility": "./src/stories/utility/index.ts"
79
+ },
80
+ "dependencies": {
81
+ "@ariakit/react": "^0.4.20",
82
+ "@emotion/is-prop-valid": "^1.4.0",
83
+ "@fortawesome/fontawesome-svg-core": "^6.7.2",
84
+ "@fortawesome/free-regular-svg-icons": "^6.7.2",
85
+ "@fortawesome/free-solid-svg-icons": "^6.7.2",
86
+ "@fortawesome/react-fontawesome": "^0.2.2",
87
+ "@headlessui/react": "^2.2.4",
88
+ "@radix-ui/react-checkbox": "^1.3.3",
89
+ "@radix-ui/react-tooltip": "^1.2.8",
90
+ "clsx": "^1.2.1",
91
+ "font-color-contrast": "^11.1.0",
92
+ "framer-motion": "^12.24.10",
93
+ "pte": "^0.5.0",
94
+ "react-hot-toast": "^2.4.1",
95
+ "react-markdown": "^10.1.0",
96
+ "react-tiny-popover": "^8.1.6",
97
+ "rehype-raw": "^7.0.0",
98
+ "remark-gfm": "^4.0.1",
99
+ "ts-deepmerge": "^6.0.3"
100
+ },
101
+ "peerDependencies": {
102
+ "@types/react": "^19",
103
+ "@types/react-dom": "^19",
104
+ "react": "^19.x",
105
+ "react-dom": "^19.x",
106
+ "sass": "^1.x",
107
+ "typescript": "^5.0"
108
+ },
109
+ "devDependencies": {
110
+ "@biomejs/biome": "^2.0.6",
111
+ "@changesets/cli": "^2.26.1",
112
+ "@commitlint/cli": "^19.8.1",
113
+ "@commitlint/config-conventional": "^19.8.1",
114
+ "@ssh/csstypes": "^1.1.0",
115
+ "@storybook/addon-docs": "10.3.4",
116
+ "@storybook/addon-links": "10.3.4",
117
+ "@storybook/nextjs-vite": "10.3.4",
118
+ "@types/node": "^22.0.0",
119
+ "@types/react": "^19",
120
+ "@types/react-dom": "^19",
121
+ "autoprefixer": "^10.4.14",
122
+ "change-case": "^4.1.2",
123
+ "csstype": "^3.1.2",
124
+ "esbuild-sass-plugin": "^2.16.0",
125
+ "jss": "^10.10.0",
126
+ "jss-preset-default": "^10.10.0",
127
+ "lefthook": "^1.11.13",
128
+ "next": "^16.2.2",
129
+ "react": "^19.0.0",
130
+ "react-dom": "^19.0.0",
131
+ "sass": "^1.62.1",
132
+ "storybook": "10.3.4",
133
+ "storybook-dark-mode": "^5.0.0",
134
+ "title-case": "^3.0.3",
135
+ "ts-node": "^10.9.1",
136
+ "tsup": "^7.2.0",
137
+ "type-fest": "^3.10.0",
138
+ "typescript": "^5.2.2",
139
+ "vite": "^7.0.0"
140
+ }
152
141
  }
@@ -14,8 +14,7 @@ export const renderEnhancer = (enhancer: Enhancer, size: number): ReactNode => {
14
14
  return enhancer;
15
15
  };
16
16
 
17
- export const MemoizedEnhancer = memo<{ enhancer: Enhancer, size: number }>(({ enhancer, size }) => (
18
- <>
19
- { renderEnhancer(enhancer, size)}
20
- </>
21
- ), (prev, next) => prev.enhancer === next.enhancer && prev.size === next.size);
17
+ export const MemoizedEnhancer = memo<{ enhancer: Enhancer; size: number }>(
18
+ ({ enhancer, size }) => <>{renderEnhancer(enhancer, size)}</>,
19
+ (prev, next) => prev.enhancer === next.enhancer && prev.size === next.size,
20
+ );
@@ -1,15 +1,11 @@
1
1
  // Copied from https://usehooks-ts.com/react-hook/use-resize-observer
2
2
 
3
- import { useEffect, useRef, useState } from 'react';
4
-
5
3
  import type { RefObject } from 'react';
4
+ import { useEffect, useRef, useState } from 'react';
6
5
 
7
6
  import { useIsMounted } from './useIsMounted';
8
7
 
9
- type BoxSizesKey = keyof Pick<
10
- ResizeObserverEntry,
11
- 'borderBoxSize' | 'contentBoxSize' | 'devicePixelContentBoxSize'
12
- >;
8
+ type BoxSizesKey = keyof Pick<ResizeObserverEntry, 'borderBoxSize' | 'contentBoxSize' | 'devicePixelContentBoxSize'>;
13
9
 
14
10
  function extractSize(
15
11
  entry: ResizeObserverEntry,
@@ -25,19 +21,19 @@ function extractSize(
25
21
 
26
22
  return Array.isArray(entry[box])
27
23
  ? entry[box][0][sizeType]
28
- // @ts-ignore Support Firefox's non-standard behavior
29
- : (entry[box][sizeType] as number);
24
+ : // @ts-expect-error Support Firefox's non-standard behavior
25
+ (entry[box][sizeType] as number);
30
26
  }
31
27
 
32
28
  type Size = {
33
- width: number | undefined
34
- height: number | undefined
29
+ width: number | undefined;
30
+ height: number | undefined;
35
31
  };
36
32
 
37
33
  type UseResizeObserverOptions<T extends HTMLElement = HTMLElement> = {
38
- ref: RefObject<T>
39
- onResize?: (size: Size) => void
40
- box?: 'border-box' | 'content-box' | 'device-pixel-content-box'
34
+ ref: RefObject<T>;
35
+ onResize?: (size: Size) => void;
36
+ box?: 'border-box' | 'content-box' | 'device-pixel-content-box';
41
37
  };
42
38
 
43
39
  const initialSize: Size = {
@@ -45,9 +41,7 @@ const initialSize: Size = {
45
41
  height: undefined,
46
42
  };
47
43
 
48
- export function useResizeObserver<T extends HTMLElement = HTMLElement>(
49
- options: UseResizeObserverOptions<T>,
50
- ): Size {
44
+ export function useResizeObserver<T extends HTMLElement = HTMLElement>(options: UseResizeObserverOptions<T>): Size {
51
45
  const { ref, box = 'content-box' } = options;
52
46
  const [{ width, height }, setSize] = useState<Size>(initialSize);
53
47
  const isMounted = useIsMounted();
@@ -64,17 +58,17 @@ export function useResizeObserver<T extends HTMLElement = HTMLElement>(
64
58
  if (typeof window === 'undefined' || !('ResizeObserver' in window)) return undefined;
65
59
 
66
60
  const observer = new ResizeObserver(([entry]) => {
67
- const boxProp = box === 'border-box'
68
- ? 'borderBoxSize'
69
- : box === 'device-pixel-content-box'
70
- ? 'devicePixelContentBoxSize'
71
- : 'contentBoxSize';
61
+ const boxProp =
62
+ box === 'border-box'
63
+ ? 'borderBoxSize'
64
+ : box === 'device-pixel-content-box'
65
+ ? 'devicePixelContentBoxSize'
66
+ : 'contentBoxSize';
72
67
 
73
68
  const newWidth = extractSize(entry, boxProp, 'inlineSize');
74
69
  const newHeight = extractSize(entry, boxProp, 'blockSize');
75
70
 
76
- const hasChanged = previousSize.current.width !== newWidth
77
- || previousSize.current.height !== newHeight;
71
+ const hasChanged = previousSize.current.width !== newWidth || previousSize.current.height !== newHeight;
78
72
 
79
73
  if (hasChanged) {
80
74
  const newSize: Size = { width: newWidth, height: newHeight };
@@ -1,6 +1,4 @@
1
- import {
2
- Html, Head, Main, NextScript,
3
- } from 'next/document';
1
+ import { Head, Html, Main, NextScript } from 'next/document';
4
2
 
5
3
  export default function Document() {
6
4
  return (
@@ -1,6 +1,6 @@
1
+ import { Inter } from 'next/font/google';
1
2
  import Head from 'next/head';
2
3
  import Image from 'next/image';
3
- import { Inter } from 'next/font/google';
4
4
  import styles from 'src/styles/Home.module.css';
5
5
 
6
6
  const inter = Inter({ subsets: ['latin'] });
@@ -26,8 +26,7 @@ export default function Home() {
26
26
  target="_blank"
27
27
  rel="noopener noreferrer"
28
28
  >
29
- By
30
- {' '}
29
+ By{' '}
31
30
  <Image
32
31
  src="/vercel.svg"
33
32
  alt="Vercel Logo"
@@ -50,13 +49,7 @@ export default function Home() {
50
49
  priority
51
50
  />
52
51
  <div className={styles.thirteen}>
53
- <Image
54
- src="/thirteen.svg"
55
- alt="13"
56
- width={40}
57
- height={31}
58
- priority
59
- />
52
+ <Image src="/thirteen.svg" alt="13" width={40} height={31} priority />
60
53
  </div>
61
54
  </div>
62
55
 
@@ -68,9 +61,7 @@ export default function Home() {
68
61
  rel="noopener noreferrer"
69
62
  >
70
63
  <h2 className={inter.className}>
71
- Docs
72
- {' '}
73
- <span>-&gt;</span>
64
+ Docs <span>-&gt;</span>
74
65
  </h2>
75
66
  <p className={inter.className}>
76
67
  Find in-depth information about Next.js features and&nbsp;API.
@@ -84,9 +75,7 @@ export default function Home() {
84
75
  rel="noopener noreferrer"
85
76
  >
86
77
  <h2 className={inter.className}>
87
- Learn
88
- {' '}
89
- <span>-&gt;</span>
78
+ Learn <span>-&gt;</span>
90
79
  </h2>
91
80
  <p className={inter.className}>
92
81
  Learn about Next.js in an interactive course with&nbsp;quizzes!
@@ -100,9 +89,7 @@ export default function Home() {
100
89
  rel="noopener noreferrer"
101
90
  >
102
91
  <h2 className={inter.className}>
103
- Templates
104
- {' '}
105
- <span>-&gt;</span>
92
+ Templates <span>-&gt;</span>
106
93
  </h2>
107
94
  <p className={inter.className}>
108
95
  Discover and deploy boilerplate example Next.js&nbsp;projects.
@@ -116,13 +103,10 @@ export default function Home() {
116
103
  rel="noopener noreferrer"
117
104
  >
118
105
  <h2 className={inter.className}>
119
- Deploy
120
- {' '}
121
- <span>-&gt;</span>
106
+ Deploy <span>-&gt;</span>
122
107
  </h2>
123
108
  <p className={inter.className}>
124
- Instantly deploy your Next.js site to a shareable URL
125
- with&nbsp;Vercel.
109
+ Instantly deploy your Next.js site to a shareable URL with&nbsp;Vercel.
126
110
  </p>
127
111
  </a>
128
112
  </div>
@@ -1,4 +1,4 @@
1
- import { Meta } from '@storybook/blocks';
1
+ import { Meta } from '@storybook/addon-docs/blocks';
2
2
 
3
3
  <Meta title="Surfaces/Pagination" />
4
4
 
@@ -1,4 +1,4 @@
1
- import { Meta } from '@storybook/blocks';
1
+ import { Meta } from '@storybook/addon-docs/blocks';
2
2
  import { LightTheme, pget, pvar } from './theme';
3
3
 
4
4
  <Meta title="Tokens" />
@@ -1,4 +1,4 @@
1
- import { Markdown, Meta } from '@storybook/blocks';
1
+ import { Markdown, Meta } from '@storybook/addon-docs/blocks';
2
2
  import Readme from '../../README.md?raw';
3
3
 
4
4
  <Meta title="Welcome" />
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/nextjs-vite';
2
2
  import { Accordion } from './Accordion';
3
3
 
4
4
  const meta: Meta<typeof Accordion> = {
@@ -1,13 +1,13 @@
1
- import type { ComponentPropsWithoutRef, FC, ReactNode } from 'react';
2
- import { useState } from 'react';
3
- import type { MotionProps } from 'framer-motion';
4
- import { AnimatePresence, motion } from 'framer-motion';
5
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
6
1
  import { faPlus } from '@fortawesome/free-solid-svg-icons';
2
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
7
3
  import { clsx } from 'clsx';
8
- import styles from './Accordion.module.scss';
9
- import { TextWhenString } from '../utility';
4
+ import type { MotionProps } from 'framer-motion';
5
+ import { AnimatePresence, motion } from 'framer-motion';
6
+ import type { ComponentPropsWithoutRef, FC, ReactNode } from 'react';
7
+ import { useState } from 'react';
10
8
  import { ChevronRight, Icon } from '../icon';
9
+ import { TextWhenString } from '../utility';
10
+ import styles from './Accordion.module.scss';
11
11
 
12
12
  export type AccordionProps = {
13
13
  /** The title of the Accordion. */
@@ -33,7 +33,7 @@ export type AccordionProps = {
33
33
  titleContainer?: ComponentPropsWithoutRef<'div'>;
34
34
  dropdownContainer?: ComponentPropsWithoutRef<'div'> & MotionProps;
35
35
  dropdownContent?: ComponentPropsWithoutRef<'div'>;
36
- }
36
+ };
37
37
  };
38
38
 
39
39
  /**
@@ -79,11 +79,7 @@ export const Accordion: FC<AccordionProps> = ({
79
79
  return (
80
80
  <div
81
81
  {...overrides?.container}
82
- className={clsx(
83
- styles[kind],
84
- open && styles.open,
85
- overrides?.container?.className,
86
- )}
82
+ className={clsx(styles[kind], open && styles.open, overrides?.container?.className)}
87
83
  >
88
84
  <div
89
85
  onClick={handleToggle}
@@ -97,30 +93,18 @@ export const Accordion: FC<AccordionProps> = ({
97
93
  tabIndex={0}
98
94
  {...overrides?.titleContainer}
99
95
  data-state={open ? 'open' : 'closed'}
100
- className={clsx(
101
- overrides?.titleContainer?.className,
102
- styles.title,
103
- styles[size],
104
- open && styles.open,
105
- )}
96
+ className={clsx(overrides?.titleContainer?.className, styles.title, styles[size], open && styles.open)}
106
97
  >
107
98
  <TextWhenString kind="paragraphSmall" weight="medium">
108
99
  {title}
109
100
  </TextWhenString>
110
101
  {kind === 'default' && (
111
102
  <div className={styles.plusIcon}>
112
- <FontAwesomeIcon
113
- icon={faPlus}
114
- className={clsx(open && styles.open)}
115
- />
103
+ <FontAwesomeIcon icon={faPlus} className={clsx(open && styles.open)} />
116
104
  </div>
117
105
  )}
118
106
  {kind === 'card' && (
119
- <Icon
120
- icon={ChevronRight}
121
- size={16}
122
- className={clsx(styles.chevron, open && styles.open)}
123
- />
107
+ <Icon icon={ChevronRight} size={16} className={clsx(styles.chevron, open && styles.open)} />
124
108
  )}
125
109
  </div>
126
110
  <AnimatePresence>
@@ -139,10 +123,7 @@ export const Accordion: FC<AccordionProps> = ({
139
123
  ease: [0.87, 0, 0.13, 1],
140
124
  }}
141
125
  {...overrides?.dropdownContainer}
142
- className={clsx(
143
- styles.dropdown,
144
- overrides?.dropdownContainer?.className,
145
- )}
126
+ className={clsx(styles.dropdown, overrides?.dropdownContainer?.className)}
146
127
  >
147
128
  <div
148
129
  {...overrides?.dropdownContent}
@@ -152,9 +133,7 @@ export const Accordion: FC<AccordionProps> = ({
152
133
  overrides?.dropdownContent?.className,
153
134
  )}
154
135
  >
155
- <TextWhenString kind="paragraphXSmall">
156
- {children}
157
- </TextWhenString>
136
+ <TextWhenString kind="paragraphXSmall">{children}</TextWhenString>
158
137
  </div>
159
138
  </motion.div>
160
139
  )}