paris 0.2.1 → 0.3.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.
- package/CHANGELOG.md +23 -0
- package/README.md +61 -5
- package/package.json +28 -13
- package/src/helpers/renderEnhancer.tsx +21 -0
- package/src/stories/Tokens.mdx +0 -8
- package/src/stories/button/Button.module.scss +12 -6
- package/src/stories/button/Button.stories.ts +17 -0
- package/src/stories/button/Button.tsx +48 -11
- package/src/stories/dropdown/Dropdown.module.scss +23 -0
- package/src/stories/input/Input.module.scss +134 -0
- package/src/stories/input/Input.stories.ts +87 -0
- package/src/stories/input/Input.tsx +172 -0
- package/src/stories/input/index.ts +1 -0
- package/src/stories/select/Select.module.scss +70 -0
- package/src/stories/select/Select.stories.ts +71 -0
- package/src/stories/select/Select.tsx +103 -0
- package/src/stories/select/index.ts +1 -0
- package/src/stories/text/Text.module.scss +1 -1
- package/src/stories/text/Text.tsx +36 -14
- package/src/stories/textarea/TextArea.stories.ts +19 -0
- package/src/stories/textarea/TextArea.tsx +120 -0
- package/src/stories/textarea/index.ts +1 -0
- package/src/stories/theme/global.scss +2 -0
- package/src/stories/theme/index.ts +1 -0
- package/src/stories/theme/themes.ts +52 -6
- package/src/stories/theme/util.scss +8 -0
- package/src/types/Enhancer.ts +3 -0
- package/.changeset/README.md +0 -8
- package/.changeset/config.json +0 -11
- package/.eslintrc.json +0 -22
- package/.github/workflows/publish.yml +0 -54
- package/.husky/pre-commit +0 -2
- package/.idea/inspectionProfiles/Project_Default.xml +0 -7
- package/.idea/jsLibraryMappings.xml +0 -6
- package/.idea/jsLinters/eslint.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/paris.iml +0 -13
- package/.idea/vcs.xml +0 -6
- package/.idea/watcherTasks.xml +0 -4
- package/.storybook/main.ts +0 -43
- package/.storybook/manager-head.html +0 -16
- package/.storybook/manager.ts +0 -6
- package/.storybook/preview.ts +0 -74
- package/.storybook/themes.ts +0 -30
- package/cat +0 -2
- package/global.d.ts +0 -2
- package/next.config.js +0 -6
- package/public/favicon.ico +0 -0
- package/public/fira/fira_code.css +0 -48
- package/public/fira/woff/FiraCode-Bold.woff +0 -0
- package/public/fira/woff/FiraCode-Light.woff +0 -0
- package/public/fira/woff/FiraCode-Medium.woff +0 -0
- package/public/fira/woff/FiraCode-Regular.woff +0 -0
- package/public/fira/woff/FiraCode-SemiBold.woff +0 -0
- package/public/fira/woff/FiraCode-VF.woff +0 -0
- package/public/fira/woff2/FiraCode-Bold.woff2 +0 -0
- package/public/fira/woff2/FiraCode-Light.woff2 +0 -0
- package/public/fira/woff2/FiraCode-Medium.woff2 +0 -0
- package/public/fira/woff2/FiraCode-Regular.woff2 +0 -0
- package/public/fira/woff2/FiraCode-SemiBold.woff2 +0 -0
- package/public/fira/woff2/FiraCode-VF.woff2 +0 -0
- package/public/graphik/GraphikSS-Black.woff +0 -0
- package/public/graphik/GraphikSS-Black.woff2 +0 -0
- package/public/graphik/GraphikSS-BlackItalic.woff +0 -0
- package/public/graphik/GraphikSS-BlackItalic.woff2 +0 -0
- package/public/graphik/GraphikSS-Bold.woff +0 -0
- package/public/graphik/GraphikSS-Bold.woff2 +0 -0
- package/public/graphik/GraphikSS-BoldItalic.woff +0 -0
- package/public/graphik/GraphikSS-BoldItalic.woff2 +0 -0
- package/public/graphik/GraphikSS-Extralight.woff +0 -0
- package/public/graphik/GraphikSS-Extralight.woff2 +0 -0
- package/public/graphik/GraphikSS-ExtralightItalic.woff +0 -0
- package/public/graphik/GraphikSS-ExtralightItalic.woff2 +0 -0
- package/public/graphik/GraphikSS-Light.woff +0 -0
- package/public/graphik/GraphikSS-Light.woff2 +0 -0
- package/public/graphik/GraphikSS-LightItalic.woff +0 -0
- package/public/graphik/GraphikSS-LightItalic.woff2 +0 -0
- package/public/graphik/GraphikSS-Medium.woff +0 -0
- package/public/graphik/GraphikSS-Medium.woff2 +0 -0
- package/public/graphik/GraphikSS-MediumItalic.woff +0 -0
- package/public/graphik/GraphikSS-MediumItalic.woff2 +0 -0
- package/public/graphik/GraphikSS-Regular.woff +0 -0
- package/public/graphik/GraphikSS-Regular.woff2 +0 -0
- package/public/graphik/GraphikSS-RegularItalic.woff +0 -0
- package/public/graphik/GraphikSS-RegularItalic.woff2 +0 -0
- package/public/graphik/GraphikSS-Semibold.woff +0 -0
- package/public/graphik/GraphikSS-Semibold.woff2 +0 -0
- package/public/graphik/GraphikSS-SemiboldItalic.woff +0 -0
- package/public/graphik/GraphikSS-SemiboldItalic.woff2 +0 -0
- package/public/graphik/GraphikSS-Super.woff +0 -0
- package/public/graphik/GraphikSS-Super.woff2 +0 -0
- package/public/graphik/GraphikSS-SuperItalic.woff +0 -0
- package/public/graphik/GraphikSS-SuperItalic.woff2 +0 -0
- package/public/graphik/GraphikSS-Thin.woff +0 -0
- package/public/graphik/GraphikSS-Thin.woff2 +0 -0
- package/public/graphik/GraphikSS-ThinItalic.woff +0 -0
- package/public/graphik/GraphikSS-ThinItalic.woff2 +0 -0
- package/public/graphik/graphik.css +0 -174
- package/public/next.svg +0 -1
- package/public/pte.css +0 -219
- package/public/thirteen.svg +0 -1
- package/public/vercel.svg +0 -1
- package/scripts/createComponent.js +0 -100
- package/scripts/generateEntry.js +0 -35
- package/scripts/text.ts +0 -118
- package/src/styles/util.scss +0 -4
- package/tsconfig.json +0 -27
- /package/src/{styles → stories/theme}/tw-preflight.css +0 -0
|
@@ -2,6 +2,7 @@ import { createTheme } from 'pte';
|
|
|
2
2
|
import type { CSSColor, CSSLength } from '@ssh/csstypes';
|
|
3
3
|
import type { Property } from 'csstype';
|
|
4
4
|
import type { PartialDeep } from 'type-fest';
|
|
5
|
+
import merge from 'ts-deepmerge';
|
|
5
6
|
import { Tokens as T } from './tokens';
|
|
6
7
|
import type { TokensT } from './tokens';
|
|
7
8
|
|
|
@@ -16,6 +17,20 @@ export type FontDefinition = {
|
|
|
16
17
|
|
|
17
18
|
export type FontClassDefinition = Omit<FontDefinition, 'fontSize' | 'lineHeight'>;
|
|
18
19
|
|
|
20
|
+
export type ShadowDefinition = `${CSSLength} ${CSSLength} ${CSSLength} ${CSSColor}` | 'none';
|
|
21
|
+
|
|
22
|
+
const Shadows = {
|
|
23
|
+
shallowBelow: '0px 4px 20px rgba(0, 0, 0, 0.2)',
|
|
24
|
+
deepBelow: '0px 8px 20px rgba(0, 0, 0, 0.2)',
|
|
25
|
+
shallowAbove: '0px -4px 20px rgba(0, 0, 0, 0.2)',
|
|
26
|
+
deepAbove: '0px -8px 20px rgba(0, 0, 0, 0.2)',
|
|
27
|
+
shallowPopup: '0px 0px 30px rgba(0, 0, 0, 0.2)',
|
|
28
|
+
deepPopup: '0px 0px 40px rgba(0, 0, 0, 0.2)',
|
|
29
|
+
subtlePopup: '0px 0px 10px rgba(0, 0, 0, 0.1)',
|
|
30
|
+
shallowLeft: '-20px 0px 40px rgba(0, 0, 0, 0.1)',
|
|
31
|
+
shallowRight: '20px 0px 40px rgba(0, 0, 0, 0.1)',
|
|
32
|
+
} as const;
|
|
33
|
+
|
|
19
34
|
export type Theme = {
|
|
20
35
|
tokens: TokensT,
|
|
21
36
|
colors: {
|
|
@@ -91,6 +106,7 @@ export type Theme = {
|
|
|
91
106
|
fontFamily: string,
|
|
92
107
|
boldFontWeight: number,
|
|
93
108
|
italicLetterSpacing: CSSLength,
|
|
109
|
+
verticalMetricsAdjust: CSSLength;
|
|
94
110
|
|
|
95
111
|
styles: {
|
|
96
112
|
// Display
|
|
@@ -124,6 +140,17 @@ export type Theme = {
|
|
|
124
140
|
paragraphXXSmall: FontDefinition,
|
|
125
141
|
}
|
|
126
142
|
},
|
|
143
|
+
lighting: {
|
|
144
|
+
shallowBelow: ShadowDefinition,
|
|
145
|
+
deepBelow: ShadowDefinition,
|
|
146
|
+
shallowAbove: ShadowDefinition,
|
|
147
|
+
deepAbove: ShadowDefinition,
|
|
148
|
+
shallowPopup: ShadowDefinition,
|
|
149
|
+
deepPopup: ShadowDefinition,
|
|
150
|
+
subtlePopup: ShadowDefinition,
|
|
151
|
+
shallowLeft: ShadowDefinition,
|
|
152
|
+
shallowRight: ShadowDefinition,
|
|
153
|
+
},
|
|
127
154
|
borders: {
|
|
128
155
|
// Border Radius
|
|
129
156
|
radius: {
|
|
@@ -134,6 +161,13 @@ export type Theme = {
|
|
|
134
161
|
roundedSmall: CSSLength,
|
|
135
162
|
roundedLarge: CSSLength,
|
|
136
163
|
},
|
|
164
|
+
|
|
165
|
+
// Dropdowns (Select, Menu, Popovers, etc.)
|
|
166
|
+
|
|
167
|
+
dropdown: {
|
|
168
|
+
color: CSSColor,
|
|
169
|
+
shadow: ShadowDefinition,
|
|
170
|
+
}
|
|
137
171
|
},
|
|
138
172
|
animations: {
|
|
139
173
|
interaction: string,
|
|
@@ -245,6 +279,7 @@ export const LightTheme: Theme = {
|
|
|
245
279
|
fontFamily: '"Graphik Web", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif',
|
|
246
280
|
boldFontWeight: 500,
|
|
247
281
|
italicLetterSpacing: '-0.01em',
|
|
282
|
+
verticalMetricsAdjust: '1px',
|
|
248
283
|
|
|
249
284
|
styles: {
|
|
250
285
|
// Display
|
|
@@ -350,6 +385,9 @@ export const LightTheme: Theme = {
|
|
|
350
385
|
},
|
|
351
386
|
},
|
|
352
387
|
},
|
|
388
|
+
lighting: {
|
|
389
|
+
...Shadows,
|
|
390
|
+
},
|
|
353
391
|
borders: {
|
|
354
392
|
radius: {
|
|
355
393
|
pill: '1000px',
|
|
@@ -359,17 +397,19 @@ export const LightTheme: Theme = {
|
|
|
359
397
|
roundedSmall: '4px',
|
|
360
398
|
roundedLarge: '12px',
|
|
361
399
|
},
|
|
400
|
+
|
|
401
|
+
dropdown: {
|
|
402
|
+
shadow: Shadows.deepBelow,
|
|
403
|
+
color: 'transparent',
|
|
404
|
+
},
|
|
362
405
|
},
|
|
363
406
|
animations: {
|
|
364
|
-
interaction: '
|
|
407
|
+
interaction: '200ms cubic-bezier(0.5, 1, 0.89, 1)',
|
|
365
408
|
},
|
|
366
409
|
};
|
|
367
410
|
|
|
368
|
-
export const DarkTheme: Theme = {
|
|
369
|
-
...LightTheme,
|
|
411
|
+
export const DarkTheme: Theme = merge(LightTheme, {
|
|
370
412
|
colors: {
|
|
371
|
-
...LightTheme.colors,
|
|
372
|
-
|
|
373
413
|
// Reverse all inverse colors
|
|
374
414
|
|
|
375
415
|
contentPrimary: LightTheme.colors.contentInversePrimary,
|
|
@@ -397,7 +437,13 @@ export const DarkTheme: Theme = {
|
|
|
397
437
|
borderInverseOpaque: LightTheme.colors.borderOpaque,
|
|
398
438
|
borderInverseSelected: LightTheme.colors.borderSelected,
|
|
399
439
|
},
|
|
400
|
-
|
|
440
|
+
borders: {
|
|
441
|
+
dropdown: {
|
|
442
|
+
shadow: 'none',
|
|
443
|
+
color: T.colors.grey600,
|
|
444
|
+
},
|
|
445
|
+
},
|
|
446
|
+
} as PartialDeep<Theme>) as Theme;
|
|
401
447
|
|
|
402
448
|
export const {
|
|
403
449
|
theme,
|
package/.changeset/README.md
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# Changesets
|
|
2
|
-
|
|
3
|
-
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
|
|
4
|
-
with multi-package repos, or single-package repos to help you version and publish your code. You can
|
|
5
|
-
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
|
|
6
|
-
|
|
7
|
-
We have a quick list of common questions to get you started engaging with this project in
|
|
8
|
-
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
|
package/.changeset/config.json
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json",
|
|
3
|
-
"changelog": "@changesets/cli/changelog",
|
|
4
|
-
"commit": false,
|
|
5
|
-
"fixed": [],
|
|
6
|
-
"linked": [],
|
|
7
|
-
"access": "public",
|
|
8
|
-
"baseBranch": "main",
|
|
9
|
-
"updateInternalDependencies": "patch",
|
|
10
|
-
"ignore": []
|
|
11
|
-
}
|
package/.eslintrc.json
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"root": true,
|
|
3
|
-
"extends": [
|
|
4
|
-
"@ssh",
|
|
5
|
-
"plugin:storybook/recommended",
|
|
6
|
-
"plugin:css/recommended"
|
|
7
|
-
],
|
|
8
|
-
"plugins": [
|
|
9
|
-
"css"
|
|
10
|
-
],
|
|
11
|
-
"parserOptions": {
|
|
12
|
-
"project": "./tsconfig.json"
|
|
13
|
-
},
|
|
14
|
-
"ignorePatterns": [
|
|
15
|
-
"dist/",
|
|
16
|
-
"node_modules/"
|
|
17
|
-
],
|
|
18
|
-
"rules": {
|
|
19
|
-
"react/button-has-type": "off",
|
|
20
|
-
"react/jsx-props-no-spreading": "off"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
name: Publish
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches:
|
|
5
|
-
- "main"
|
|
6
|
-
|
|
7
|
-
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
release:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
steps:
|
|
13
|
-
- name: Checkout
|
|
14
|
-
uses: actions/checkout@v3
|
|
15
|
-
|
|
16
|
-
- name: Install Node.js
|
|
17
|
-
uses: actions/setup-node@v3
|
|
18
|
-
with:
|
|
19
|
-
node-version: 18.x
|
|
20
|
-
|
|
21
|
-
- uses: pnpm/action-setup@v2
|
|
22
|
-
name: Install pnpm
|
|
23
|
-
id: pnpm-install
|
|
24
|
-
with:
|
|
25
|
-
version: ^8.x
|
|
26
|
-
run_install: false
|
|
27
|
-
|
|
28
|
-
- name: Get pnpm store directory
|
|
29
|
-
id: pnpm-cache
|
|
30
|
-
shell: bash
|
|
31
|
-
run: |
|
|
32
|
-
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
|
33
|
-
|
|
34
|
-
- uses: actions/cache@v3
|
|
35
|
-
name: Setup pnpm cache
|
|
36
|
-
with:
|
|
37
|
-
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
|
38
|
-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
39
|
-
restore-keys: |
|
|
40
|
-
${{ runner.os }}-pnpm-store-
|
|
41
|
-
|
|
42
|
-
- name: Install dependencies
|
|
43
|
-
run: pnpm install
|
|
44
|
-
|
|
45
|
-
- name: Create Release Pull Request or Publish
|
|
46
|
-
id: changesets
|
|
47
|
-
uses: changesets/action@v1
|
|
48
|
-
with:
|
|
49
|
-
publish: pnpm release
|
|
50
|
-
title: "chore(release): publish"
|
|
51
|
-
commit: "chore(release): publish"
|
|
52
|
-
env:
|
|
53
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
54
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/.husky/pre-commit
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<component name="InspectionProjectProfileManager">
|
|
2
|
-
<profile version="1.0">
|
|
3
|
-
<option name="myName" value="Project Default" />
|
|
4
|
-
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
5
|
-
<inspection_tool class="JSLastCommaInObjectLiteral" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
6
|
-
</profile>
|
|
7
|
-
</component>
|
package/.idea/modules.xml
DELETED
package/.idea/paris.iml
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="WEB_MODULE" version="4">
|
|
3
|
-
<component name="NewModuleRootManager">
|
|
4
|
-
<content url="file://$MODULE_DIR$">
|
|
5
|
-
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
6
|
-
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
7
|
-
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
8
|
-
<excludeFolder url="file://$MODULE_DIR$/storybook-static" />
|
|
9
|
-
</content>
|
|
10
|
-
<orderEntry type="inheritedJdk" />
|
|
11
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
12
|
-
</component>
|
|
13
|
-
</module>
|
package/.idea/vcs.xml
DELETED
package/.idea/watcherTasks.xml
DELETED
package/.storybook/main.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { StorybookConfig } from "@storybook/nextjs";
|
|
2
|
-
import { TsconfigPathsPlugin } from 'tsconfig-paths-webpack-plugin';
|
|
3
|
-
|
|
4
|
-
const config: StorybookConfig = {
|
|
5
|
-
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
|
|
6
|
-
addons: [
|
|
7
|
-
"@storybook/addon-links",
|
|
8
|
-
"@storybook/addon-essentials",
|
|
9
|
-
"@storybook/addon-interactions",
|
|
10
|
-
"storybook-dark-mode",
|
|
11
|
-
],
|
|
12
|
-
framework: {
|
|
13
|
-
name: "@storybook/nextjs",
|
|
14
|
-
options: {},
|
|
15
|
-
},
|
|
16
|
-
docs: {
|
|
17
|
-
autodocs: "tag",
|
|
18
|
-
},
|
|
19
|
-
staticDirs: [
|
|
20
|
-
'../public'
|
|
21
|
-
],
|
|
22
|
-
previewHead: (head) => (
|
|
23
|
-
`${head}
|
|
24
|
-
<style>
|
|
25
|
-
body {
|
|
26
|
-
color: var(--pte-colors-contentPrimary);
|
|
27
|
-
background-color: var(--pte-colors-backgroundPrimary);
|
|
28
|
-
transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
h2#stories {
|
|
32
|
-
letter-spacing: var(--pte-typography-styles-labelMedium-letterSpacing);
|
|
33
|
-
}
|
|
34
|
-
</style>`
|
|
35
|
-
),
|
|
36
|
-
webpackFinal: async (config) => {
|
|
37
|
-
config.resolve.plugins = [
|
|
38
|
-
new TsconfigPathsPlugin()
|
|
39
|
-
];
|
|
40
|
-
return config;
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
export default config;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<link rel="stylesheet" href="/graphik/graphik.css" />
|
|
2
|
-
<link rel="stylesheet" href="/fira/fira_code.css" />
|
|
3
|
-
|
|
4
|
-
<style>
|
|
5
|
-
.sidebar-subheading button {
|
|
6
|
-
letter-spacing: 0.1rem !important;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
* {
|
|
10
|
-
transition: color 0.2s ease, background-color 0.2s ease;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
#storybook-explorer-searchfield {
|
|
14
|
-
border-radius: 0;
|
|
15
|
-
}
|
|
16
|
-
</style>
|
package/.storybook/manager.ts
DELETED
package/.storybook/preview.ts
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import type { Preview } from '@storybook/react';
|
|
2
|
-
import { Dark, Light } from './themes';
|
|
3
|
-
import { DocsContainer } from '@storybook/blocks';
|
|
4
|
-
import { useDarkMode } from 'storybook-dark-mode';
|
|
5
|
-
import { createElement, useEffect } from 'react';
|
|
6
|
-
import { injectTheme, LightTheme, DarkTheme } from '../src/stories/theme';
|
|
7
|
-
|
|
8
|
-
import '../public/graphik/graphik.css';
|
|
9
|
-
import '../public/fira/fira_code.css';
|
|
10
|
-
import '../src/styles/globals.css';
|
|
11
|
-
import '../src/styles/tw-preflight.css';
|
|
12
|
-
|
|
13
|
-
const Wrapper = (props: any) => {
|
|
14
|
-
const isDark = useDarkMode();
|
|
15
|
-
|
|
16
|
-
useEffect(() => {
|
|
17
|
-
injectTheme(!isDark ? LightTheme : DarkTheme);
|
|
18
|
-
}, [isDark]);
|
|
19
|
-
|
|
20
|
-
return props.children;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const decorators = [
|
|
24
|
-
(renderStory) => createElement(Wrapper, {}, renderStory()),
|
|
25
|
-
];
|
|
26
|
-
|
|
27
|
-
const preview: Preview = {
|
|
28
|
-
parameters: {
|
|
29
|
-
actions: { argTypesRegex: "^on[A-Z].*" },
|
|
30
|
-
backgrounds: { disable: true },
|
|
31
|
-
controls: {
|
|
32
|
-
matchers: {
|
|
33
|
-
color: /(background|color)$/i,
|
|
34
|
-
date: /Date$/,
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
docs: {
|
|
38
|
-
container: (context: any) => {
|
|
39
|
-
const isDark = useDarkMode();
|
|
40
|
-
|
|
41
|
-
const props = {
|
|
42
|
-
...context,
|
|
43
|
-
theme: isDark ? Dark : Light,
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
useEffect(() => {
|
|
47
|
-
injectTheme(!isDark ? LightTheme : DarkTheme);
|
|
48
|
-
}, [isDark]);
|
|
49
|
-
|
|
50
|
-
return createElement(DocsContainer, props);
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
options: {
|
|
54
|
-
storySort: {
|
|
55
|
-
order: [
|
|
56
|
-
'Welcome',
|
|
57
|
-
'Tokens',
|
|
58
|
-
'Inputs',
|
|
59
|
-
'Content',
|
|
60
|
-
'Uncategorized'
|
|
61
|
-
],
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
darkMode: {
|
|
65
|
-
stylePreview: true,
|
|
66
|
-
// Override the default dark theme
|
|
67
|
-
dark: Dark,
|
|
68
|
-
// Override the default light theme
|
|
69
|
-
light: Light
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
export default preview;
|
package/.storybook/themes.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { create, ThemeVars } from '@storybook/theming';
|
|
2
|
-
import { LightTheme, DarkTheme, pvar } from '../src/stories/theme';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Shared theme variables across light and dark themes.
|
|
6
|
-
*/
|
|
7
|
-
const sharedConfig: Partial<ThemeVars> = {
|
|
8
|
-
brandTitle: 'Paris',
|
|
9
|
-
brandUrl: 'https://slingshot.fm',
|
|
10
|
-
brandTarget: '_blank',
|
|
11
|
-
colorSecondary: '#FB46BE',
|
|
12
|
-
fontBase: '"Graphik Web", sans-serif',
|
|
13
|
-
fontCode: '"Fira Code VF", monospace',
|
|
14
|
-
inputBorderRadius: 0,
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export const Light = create({
|
|
18
|
-
...sharedConfig,
|
|
19
|
-
base: 'light',
|
|
20
|
-
brandImage: 'https://fast.slingshot.fm/sling/logo/paris-sb.png',
|
|
21
|
-
appBg: LightTheme.colors.backgroundPrimary,
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
export const Dark = create({
|
|
25
|
-
...sharedConfig,
|
|
26
|
-
base: 'dark',
|
|
27
|
-
brandImage: 'https://fast.slingshot.fm/sling/logo/paris-sb-white.png',
|
|
28
|
-
appBg: DarkTheme.colors.backgroundPrimary,
|
|
29
|
-
appContentBg: DarkTheme.colors.backgroundPrimary,
|
|
30
|
-
});
|
package/cat
DELETED
package/global.d.ts
DELETED
package/next.config.js
DELETED
package/public/favicon.ico
DELETED
|
Binary file
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
@font-face {
|
|
2
|
-
font-family: 'Fira Code';
|
|
3
|
-
src: url('woff2/FiraCode-Light.woff2') format('woff2'),
|
|
4
|
-
url("woff/FiraCode-Light.woff") format("woff");
|
|
5
|
-
font-weight: 300;
|
|
6
|
-
font-style: normal;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
@font-face {
|
|
10
|
-
font-family: 'Fira Code';
|
|
11
|
-
src: url('woff2/FiraCode-Regular.woff2') format('woff2'),
|
|
12
|
-
url("woff/FiraCode-Regular.woff") format("woff");
|
|
13
|
-
font-weight: 400;
|
|
14
|
-
font-style: normal;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
@font-face {
|
|
18
|
-
font-family: 'Fira Code';
|
|
19
|
-
src: url('woff2/FiraCode-Medium.woff2') format('woff2'),
|
|
20
|
-
url("woff/FiraCode-Medium.woff") format("woff");
|
|
21
|
-
font-weight: 500;
|
|
22
|
-
font-style: normal;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
@font-face {
|
|
26
|
-
font-family: 'Fira Code';
|
|
27
|
-
src: url('woff2/FiraCode-SemiBold.woff2') format('woff2'),
|
|
28
|
-
url("woff/FiraCode-SemiBold.woff") format("woff");
|
|
29
|
-
font-weight: 600;
|
|
30
|
-
font-style: normal;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@font-face {
|
|
34
|
-
font-family: 'Fira Code';
|
|
35
|
-
src: url('woff2/FiraCode-Bold.woff2') format('woff2'),
|
|
36
|
-
url("woff/FiraCode-Bold.woff") format("woff");
|
|
37
|
-
font-weight: 700;
|
|
38
|
-
font-style: normal;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@font-face {
|
|
42
|
-
font-family: 'Fira Code VF';
|
|
43
|
-
src: url('woff2/FiraCode-VF.woff2') format('woff2-variations'),
|
|
44
|
-
url('woff/FiraCode-VF.woff') format('woff-variations');
|
|
45
|
-
/* font-weight requires a range: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide#Using_a_variable_font_font-face_changes */
|
|
46
|
-
font-weight: 300 700;
|
|
47
|
-
font-style: normal;
|
|
48
|
-
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|