paris 0.0.1 → 0.2.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 (103) hide show
  1. package/.changeset/README.md +8 -0
  2. package/.changeset/config.json +11 -0
  3. package/.eslintrc.json +22 -0
  4. package/.github/workflows/publish.yml +54 -0
  5. package/.husky/pre-commit +2 -0
  6. package/.idea/inspectionProfiles/Project_Default.xml +7 -0
  7. package/.idea/jsLibraryMappings.xml +6 -0
  8. package/.idea/jsLinters/eslint.xml +6 -0
  9. package/.idea/modules.xml +8 -0
  10. package/.idea/paris.iml +13 -0
  11. package/.idea/vcs.xml +6 -0
  12. package/.idea/watcherTasks.xml +4 -0
  13. package/.storybook/main.ts +43 -0
  14. package/.storybook/manager-head.html +16 -0
  15. package/.storybook/manager.ts +6 -0
  16. package/.storybook/preview.ts +74 -0
  17. package/.storybook/themes.ts +30 -0
  18. package/CHANGELOG.md +17 -0
  19. package/README.md +42 -2
  20. package/cat +2 -0
  21. package/global.d.ts +2 -0
  22. package/next.config.js +6 -0
  23. package/package.json +71 -9
  24. package/public/favicon.ico +0 -0
  25. package/public/fira/fira_code.css +48 -0
  26. package/public/fira/woff/FiraCode-Bold.woff +0 -0
  27. package/public/fira/woff/FiraCode-Light.woff +0 -0
  28. package/public/fira/woff/FiraCode-Medium.woff +0 -0
  29. package/public/fira/woff/FiraCode-Regular.woff +0 -0
  30. package/public/fira/woff/FiraCode-SemiBold.woff +0 -0
  31. package/public/fira/woff/FiraCode-VF.woff +0 -0
  32. package/public/fira/woff2/FiraCode-Bold.woff2 +0 -0
  33. package/public/fira/woff2/FiraCode-Light.woff2 +0 -0
  34. package/public/fira/woff2/FiraCode-Medium.woff2 +0 -0
  35. package/public/fira/woff2/FiraCode-Regular.woff2 +0 -0
  36. package/public/fira/woff2/FiraCode-SemiBold.woff2 +0 -0
  37. package/public/fira/woff2/FiraCode-VF.woff2 +0 -0
  38. package/public/graphik/GraphikSS-Black.woff +0 -0
  39. package/public/graphik/GraphikSS-Black.woff2 +0 -0
  40. package/public/graphik/GraphikSS-BlackItalic.woff +0 -0
  41. package/public/graphik/GraphikSS-BlackItalic.woff2 +0 -0
  42. package/public/graphik/GraphikSS-Bold.woff +0 -0
  43. package/public/graphik/GraphikSS-Bold.woff2 +0 -0
  44. package/public/graphik/GraphikSS-BoldItalic.woff +0 -0
  45. package/public/graphik/GraphikSS-BoldItalic.woff2 +0 -0
  46. package/public/graphik/GraphikSS-Extralight.woff +0 -0
  47. package/public/graphik/GraphikSS-Extralight.woff2 +0 -0
  48. package/public/graphik/GraphikSS-ExtralightItalic.woff +0 -0
  49. package/public/graphik/GraphikSS-ExtralightItalic.woff2 +0 -0
  50. package/public/graphik/GraphikSS-Light.woff +0 -0
  51. package/public/graphik/GraphikSS-Light.woff2 +0 -0
  52. package/public/graphik/GraphikSS-LightItalic.woff +0 -0
  53. package/public/graphik/GraphikSS-LightItalic.woff2 +0 -0
  54. package/public/graphik/GraphikSS-Medium.woff +0 -0
  55. package/public/graphik/GraphikSS-Medium.woff2 +0 -0
  56. package/public/graphik/GraphikSS-MediumItalic.woff +0 -0
  57. package/public/graphik/GraphikSS-MediumItalic.woff2 +0 -0
  58. package/public/graphik/GraphikSS-Regular.woff +0 -0
  59. package/public/graphik/GraphikSS-Regular.woff2 +0 -0
  60. package/public/graphik/GraphikSS-RegularItalic.woff +0 -0
  61. package/public/graphik/GraphikSS-RegularItalic.woff2 +0 -0
  62. package/public/graphik/GraphikSS-Semibold.woff +0 -0
  63. package/public/graphik/GraphikSS-Semibold.woff2 +0 -0
  64. package/public/graphik/GraphikSS-SemiboldItalic.woff +0 -0
  65. package/public/graphik/GraphikSS-SemiboldItalic.woff2 +0 -0
  66. package/public/graphik/GraphikSS-Super.woff +0 -0
  67. package/public/graphik/GraphikSS-Super.woff2 +0 -0
  68. package/public/graphik/GraphikSS-SuperItalic.woff +0 -0
  69. package/public/graphik/GraphikSS-SuperItalic.woff2 +0 -0
  70. package/public/graphik/GraphikSS-Thin.woff +0 -0
  71. package/public/graphik/GraphikSS-Thin.woff2 +0 -0
  72. package/public/graphik/GraphikSS-ThinItalic.woff +0 -0
  73. package/public/graphik/GraphikSS-ThinItalic.woff2 +0 -0
  74. package/public/graphik/graphik.css +174 -0
  75. package/public/next.svg +1 -0
  76. package/public/pte.css +219 -0
  77. package/public/thirteen.svg +1 -0
  78. package/public/vercel.svg +1 -0
  79. package/scripts/createComponent.js +100 -0
  80. package/scripts/generateEntry.js +35 -0
  81. package/scripts/text.ts +118 -0
  82. package/src/pages/_app.tsx +7 -0
  83. package/src/pages/_document.tsx +15 -0
  84. package/src/pages/index.tsx +132 -0
  85. package/src/stories/Tokens.mdx +54 -0
  86. package/src/stories/Welcome.mdx +8 -0
  87. package/src/stories/button/Button.module.scss +128 -0
  88. package/src/stories/button/Button.stories.ts +42 -0
  89. package/src/stories/button/Button.tsx +81 -0
  90. package/src/stories/button/index.ts +1 -0
  91. package/src/stories/text/Text.module.scss +3 -0
  92. package/src/stories/text/Text.stories.ts +155 -0
  93. package/src/stories/text/Text.tsx +40 -0
  94. package/src/stories/text/Typography.module.css +164 -0
  95. package/src/stories/text/index.ts +1 -0
  96. package/src/stories/theme/index.ts +2 -0
  97. package/src/stories/theme/themes.ts +409 -0
  98. package/src/stories/theme/tokens.ts +68 -0
  99. package/src/styles/Home.module.css +278 -0
  100. package/src/styles/globals.css +5 -0
  101. package/src/styles/tw-preflight.css +369 -0
  102. package/src/styles/util.scss +4 -0
  103. package/tsconfig.json +27 -0
@@ -0,0 +1,155 @@
1
+ // noinspection JSUnusedGlobalSymbols
2
+
3
+ import type { Meta, StoryObj } from '@storybook/react';
4
+ import { Text } from './Text';
5
+
6
+ const meta: Meta<typeof Text> = {
7
+ title: 'Content/Text',
8
+ component: Text,
9
+ tags: ['autodocs'],
10
+ };
11
+
12
+ export default meta;
13
+ type Story = StoryObj<typeof Text>;
14
+
15
+ /**
16
+ * By default, the Text component renders a `<span>` element with Paragraph Medium styling.
17
+ */
18
+ export const Default: Story = {
19
+ args: {
20
+ children: 'In an alleyway, drinking champagne',
21
+ },
22
+ };
23
+
24
+ // The following stories are auto-generated with `pnpm generate:text`.
25
+ // Do not edit them manually; instead, edit the `generateTextStories` function in `scripts/text.ts` and run `pnpm generate:text -s`.
26
+
27
+ // @auto-generated-start
28
+
29
+ export const DisplayLarge: Story = {
30
+ args: {
31
+ children: 'In an alleyway, drinking champagne',
32
+ kind: 'displayLarge',
33
+ },
34
+ };
35
+
36
+ export const DisplayMedium: Story = {
37
+ args: {
38
+ children: 'In an alleyway, drinking champagne',
39
+ kind: 'displayMedium',
40
+ },
41
+ };
42
+
43
+ export const DisplaySmall: Story = {
44
+ args: {
45
+ children: 'In an alleyway, drinking champagne',
46
+ kind: 'displaySmall',
47
+ },
48
+ };
49
+
50
+ export const HeadingLarge: Story = {
51
+ args: {
52
+ children: 'In an alleyway, drinking champagne',
53
+ kind: 'headingLarge',
54
+ },
55
+ };
56
+
57
+ export const HeadingMedium: Story = {
58
+ args: {
59
+ children: 'In an alleyway, drinking champagne',
60
+ kind: 'headingMedium',
61
+ },
62
+ };
63
+
64
+ export const HeadingSmall: Story = {
65
+ args: {
66
+ children: 'In an alleyway, drinking champagne',
67
+ kind: 'headingSmall',
68
+ },
69
+ };
70
+
71
+ export const HeadingXSmall: Story = {
72
+ args: {
73
+ children: 'In an alleyway, drinking champagne',
74
+ kind: 'headingXSmall',
75
+ },
76
+ };
77
+
78
+ export const HeadingXXSmall: Story = {
79
+ args: {
80
+ children: 'In an alleyway, drinking champagne',
81
+ kind: 'headingXXSmall',
82
+ },
83
+ };
84
+
85
+ export const LabelXLarge: Story = {
86
+ args: {
87
+ children: 'In an alleyway, drinking champagne',
88
+ kind: 'labelXLarge',
89
+ },
90
+ };
91
+
92
+ export const LabelLarge: Story = {
93
+ args: {
94
+ children: 'In an alleyway, drinking champagne',
95
+ kind: 'labelLarge',
96
+ },
97
+ };
98
+
99
+ export const LabelMedium: Story = {
100
+ args: {
101
+ children: 'In an alleyway, drinking champagne',
102
+ kind: 'labelMedium',
103
+ },
104
+ };
105
+
106
+ export const LabelSmall: Story = {
107
+ args: {
108
+ children: 'In an alleyway, drinking champagne',
109
+ kind: 'labelSmall',
110
+ },
111
+ };
112
+
113
+ export const LabelXSmall: Story = {
114
+ args: {
115
+ children: 'In an alleyway, drinking champagne',
116
+ kind: 'labelXSmall',
117
+ },
118
+ };
119
+
120
+ export const ParagraphLarge: Story = {
121
+ args: {
122
+ children: 'In an alleyway, drinking champagne',
123
+ kind: 'paragraphLarge',
124
+ },
125
+ };
126
+
127
+ export const ParagraphMedium: Story = {
128
+ args: {
129
+ children: 'In an alleyway, drinking champagne',
130
+ kind: 'paragraphMedium',
131
+ },
132
+ };
133
+
134
+ export const ParagraphSmall: Story = {
135
+ args: {
136
+ children: 'In an alleyway, drinking champagne',
137
+ kind: 'paragraphSmall',
138
+ },
139
+ };
140
+
141
+ export const ParagraphXSmall: Story = {
142
+ args: {
143
+ children: 'In an alleyway, drinking champagne',
144
+ kind: 'paragraphXSmall',
145
+ },
146
+ };
147
+
148
+ export const ParagraphXXSmall: Story = {
149
+ args: {
150
+ children: 'In an alleyway, drinking champagne',
151
+ kind: 'paragraphXXSmall',
152
+ },
153
+ };
154
+
155
+ // @auto-generated-end
@@ -0,0 +1,40 @@
1
+ import type { FC, HTMLProps, ReactNode } from 'react';
2
+ import { createElement } from 'react';
3
+ import typography from './Typography.module.css';
4
+ import type { LightTheme } from '../theme';
5
+
6
+ export type TextProps = {
7
+ /**
8
+ * The font class to use.
9
+ * @default paragraphMedium
10
+ */
11
+ kind: keyof typeof LightTheme.typography.styles;
12
+ /**
13
+ * The HTML text tag to use.
14
+ * @default span
15
+ */
16
+ as?: 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label' | 'legend' | 'caption' | 'small';
17
+ /** The contents of the Text element. */
18
+ children: ReactNode;
19
+ };
20
+
21
+ /**
22
+ * A `Text` component is used to render text with one of our theme formats.
23
+ * @example ```tsx
24
+ * <Text as="h1" format="headingLarge">Hello World!</Text>
25
+ * ```
26
+ * @constructor
27
+ */
28
+ export const Text: FC<TextProps & HTMLProps<HTMLParagraphElement>> = ({
29
+ kind,
30
+ as,
31
+ children,
32
+ ...props
33
+ }) => createElement(
34
+ as || 'span',
35
+ {
36
+ ...props,
37
+ className: `${props.className || ''} ${typography[kind]}`,
38
+ },
39
+ children,
40
+ );
@@ -0,0 +1,164 @@
1
+ /* Auto-generated with `pnpm generate:text` on Sat May 20 2023 19:55:10 GMT-0700 (Pacific Daylight Time) */
2
+ /* Do not edit manually; instead, edit the `generateTextClasses` function in `scripts/text.ts` and run `pnpm generate:text -c`. */
3
+
4
+ .displayLarge {
5
+ font-size: var(--pte-typography-styles-displayLarge-fontSize);
6
+ font-style: var(--pte-typography-styles-displayLarge-fontStyle);
7
+ font-weight: var(--pte-typography-styles-displayLarge-fontWeight);
8
+ line-height: var(--pte-typography-styles-displayLarge-lineHeight);
9
+ letter-spacing: var(--pte-typography-styles-displayLarge-letterSpacing);
10
+ text-transform: var(--pte-typography-styles-displayLarge-textTransform);
11
+ }
12
+
13
+ .displayMedium {
14
+ font-size: var(--pte-typography-styles-displayMedium-fontSize);
15
+ font-style: var(--pte-typography-styles-displayMedium-fontStyle);
16
+ font-weight: var(--pte-typography-styles-displayMedium-fontWeight);
17
+ line-height: var(--pte-typography-styles-displayMedium-lineHeight);
18
+ letter-spacing: var(--pte-typography-styles-displayMedium-letterSpacing);
19
+ text-transform: var(--pte-typography-styles-displayMedium-textTransform);
20
+ }
21
+
22
+ .displaySmall {
23
+ font-size: var(--pte-typography-styles-displaySmall-fontSize);
24
+ font-style: var(--pte-typography-styles-displaySmall-fontStyle);
25
+ font-weight: var(--pte-typography-styles-displaySmall-fontWeight);
26
+ line-height: var(--pte-typography-styles-displaySmall-lineHeight);
27
+ letter-spacing: var(--pte-typography-styles-displaySmall-letterSpacing);
28
+ text-transform: var(--pte-typography-styles-displaySmall-textTransform);
29
+ }
30
+
31
+ .headingLarge {
32
+ font-size: var(--pte-typography-styles-headingLarge-fontSize);
33
+ font-style: var(--pte-typography-styles-headingLarge-fontStyle);
34
+ font-weight: var(--pte-typography-styles-headingLarge-fontWeight);
35
+ line-height: var(--pte-typography-styles-headingLarge-lineHeight);
36
+ letter-spacing: var(--pte-typography-styles-headingLarge-letterSpacing);
37
+ text-transform: var(--pte-typography-styles-headingLarge-textTransform);
38
+ }
39
+
40
+ .headingMedium {
41
+ font-size: var(--pte-typography-styles-headingMedium-fontSize);
42
+ font-style: var(--pte-typography-styles-headingMedium-fontStyle);
43
+ font-weight: var(--pte-typography-styles-headingMedium-fontWeight);
44
+ line-height: var(--pte-typography-styles-headingMedium-lineHeight);
45
+ letter-spacing: var(--pte-typography-styles-headingMedium-letterSpacing);
46
+ text-transform: var(--pte-typography-styles-headingMedium-textTransform);
47
+ }
48
+
49
+ .headingSmall {
50
+ font-size: var(--pte-typography-styles-headingSmall-fontSize);
51
+ font-style: var(--pte-typography-styles-headingSmall-fontStyle);
52
+ font-weight: var(--pte-typography-styles-headingSmall-fontWeight);
53
+ line-height: var(--pte-typography-styles-headingSmall-lineHeight);
54
+ letter-spacing: var(--pte-typography-styles-headingSmall-letterSpacing);
55
+ text-transform: var(--pte-typography-styles-headingSmall-textTransform);
56
+ }
57
+
58
+ .headingXSmall {
59
+ font-size: var(--pte-typography-styles-headingXSmall-fontSize);
60
+ font-style: var(--pte-typography-styles-headingXSmall-fontStyle);
61
+ font-weight: var(--pte-typography-styles-headingXSmall-fontWeight);
62
+ line-height: var(--pte-typography-styles-headingXSmall-lineHeight);
63
+ letter-spacing: var(--pte-typography-styles-headingXSmall-letterSpacing);
64
+ text-transform: var(--pte-typography-styles-headingXSmall-textTransform);
65
+ }
66
+
67
+ .headingXXSmall {
68
+ font-size: var(--pte-typography-styles-headingXXSmall-fontSize);
69
+ font-style: var(--pte-typography-styles-headingXXSmall-fontStyle);
70
+ font-weight: var(--pte-typography-styles-headingXXSmall-fontWeight);
71
+ line-height: var(--pte-typography-styles-headingXXSmall-lineHeight);
72
+ letter-spacing: var(--pte-typography-styles-headingXXSmall-letterSpacing);
73
+ text-transform: var(--pte-typography-styles-headingXXSmall-textTransform);
74
+ }
75
+
76
+ .labelXLarge {
77
+ font-size: var(--pte-typography-styles-labelXLarge-fontSize);
78
+ font-style: var(--pte-typography-styles-labelXLarge-fontStyle);
79
+ font-weight: var(--pte-typography-styles-labelXLarge-fontWeight);
80
+ line-height: var(--pte-typography-styles-labelXLarge-lineHeight);
81
+ letter-spacing: var(--pte-typography-styles-labelXLarge-letterSpacing);
82
+ text-transform: var(--pte-typography-styles-labelXLarge-textTransform);
83
+ }
84
+
85
+ .labelLarge {
86
+ font-size: var(--pte-typography-styles-labelLarge-fontSize);
87
+ font-style: var(--pte-typography-styles-labelLarge-fontStyle);
88
+ font-weight: var(--pte-typography-styles-labelLarge-fontWeight);
89
+ line-height: var(--pte-typography-styles-labelLarge-lineHeight);
90
+ letter-spacing: var(--pte-typography-styles-labelLarge-letterSpacing);
91
+ text-transform: var(--pte-typography-styles-labelLarge-textTransform);
92
+ }
93
+
94
+ .labelMedium {
95
+ font-size: var(--pte-typography-styles-labelMedium-fontSize);
96
+ font-style: var(--pte-typography-styles-labelMedium-fontStyle);
97
+ font-weight: var(--pte-typography-styles-labelMedium-fontWeight);
98
+ line-height: var(--pte-typography-styles-labelMedium-lineHeight);
99
+ letter-spacing: var(--pte-typography-styles-labelMedium-letterSpacing);
100
+ text-transform: var(--pte-typography-styles-labelMedium-textTransform);
101
+ }
102
+
103
+ .labelSmall {
104
+ font-size: var(--pte-typography-styles-labelSmall-fontSize);
105
+ font-style: var(--pte-typography-styles-labelSmall-fontStyle);
106
+ font-weight: var(--pte-typography-styles-labelSmall-fontWeight);
107
+ line-height: var(--pte-typography-styles-labelSmall-lineHeight);
108
+ letter-spacing: var(--pte-typography-styles-labelSmall-letterSpacing);
109
+ text-transform: var(--pte-typography-styles-labelSmall-textTransform);
110
+ }
111
+
112
+ .labelXSmall {
113
+ font-size: var(--pte-typography-styles-labelXSmall-fontSize);
114
+ font-style: var(--pte-typography-styles-labelXSmall-fontStyle);
115
+ font-weight: var(--pte-typography-styles-labelXSmall-fontWeight);
116
+ line-height: var(--pte-typography-styles-labelXSmall-lineHeight);
117
+ letter-spacing: var(--pte-typography-styles-labelXSmall-letterSpacing);
118
+ text-transform: var(--pte-typography-styles-labelXSmall-textTransform);
119
+ }
120
+
121
+ .paragraphLarge {
122
+ font-size: var(--pte-typography-styles-paragraphLarge-fontSize);
123
+ font-style: var(--pte-typography-styles-paragraphLarge-fontStyle);
124
+ font-weight: var(--pte-typography-styles-paragraphLarge-fontWeight);
125
+ line-height: var(--pte-typography-styles-paragraphLarge-lineHeight);
126
+ letter-spacing: var(--pte-typography-styles-paragraphLarge-letterSpacing);
127
+ text-transform: var(--pte-typography-styles-paragraphLarge-textTransform);
128
+ }
129
+
130
+ .paragraphMedium {
131
+ font-size: var(--pte-typography-styles-paragraphMedium-fontSize);
132
+ font-style: var(--pte-typography-styles-paragraphMedium-fontStyle);
133
+ font-weight: var(--pte-typography-styles-paragraphMedium-fontWeight);
134
+ line-height: var(--pte-typography-styles-paragraphMedium-lineHeight);
135
+ letter-spacing: var(--pte-typography-styles-paragraphMedium-letterSpacing);
136
+ text-transform: var(--pte-typography-styles-paragraphMedium-textTransform);
137
+ }
138
+
139
+ .paragraphSmall {
140
+ font-size: var(--pte-typography-styles-paragraphSmall-fontSize);
141
+ font-style: var(--pte-typography-styles-paragraphSmall-fontStyle);
142
+ font-weight: var(--pte-typography-styles-paragraphSmall-fontWeight);
143
+ line-height: var(--pte-typography-styles-paragraphSmall-lineHeight);
144
+ letter-spacing: var(--pte-typography-styles-paragraphSmall-letterSpacing);
145
+ text-transform: var(--pte-typography-styles-paragraphSmall-textTransform);
146
+ }
147
+
148
+ .paragraphXSmall {
149
+ font-size: var(--pte-typography-styles-paragraphXSmall-fontSize);
150
+ font-style: var(--pte-typography-styles-paragraphXSmall-fontStyle);
151
+ font-weight: var(--pte-typography-styles-paragraphXSmall-fontWeight);
152
+ line-height: var(--pte-typography-styles-paragraphXSmall-lineHeight);
153
+ letter-spacing: var(--pte-typography-styles-paragraphXSmall-letterSpacing);
154
+ text-transform: var(--pte-typography-styles-paragraphXSmall-textTransform);
155
+ }
156
+
157
+ .paragraphXXSmall {
158
+ font-size: var(--pte-typography-styles-paragraphXXSmall-fontSize);
159
+ font-style: var(--pte-typography-styles-paragraphXXSmall-fontStyle);
160
+ font-weight: var(--pte-typography-styles-paragraphXXSmall-fontWeight);
161
+ line-height: var(--pte-typography-styles-paragraphXXSmall-lineHeight);
162
+ letter-spacing: var(--pte-typography-styles-paragraphXXSmall-letterSpacing);
163
+ text-transform: var(--pte-typography-styles-paragraphXXSmall-textTransform);
164
+ }
@@ -0,0 +1 @@
1
+ export * from './Text';
@@ -0,0 +1,2 @@
1
+ export * from './themes';
2
+ export * from './tokens';