@linktr.ee/create-link-app 0.3.0-next.18 → 0.3.0-next.2

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/README.md CHANGED
@@ -27,7 +27,6 @@ yarn create @linktr.ee/create-link-app my-link-app
27
27
  * [`create-link-app help [COMMANDS]`](#create-link-app-help-commands)
28
28
  * [`create-link-app login`](#create-link-app-login)
29
29
  * [`create-link-app logout`](#create-link-app-logout)
30
- * [`create-link-app storybook`](#create-link-app-storybook)
31
30
 
32
31
  ## `create-link-app build`
33
32
 
@@ -169,19 +168,4 @@ USAGE
169
168
  DESCRIPTION
170
169
  Logout and clear browser session
171
170
  ```
172
-
173
- ## `create-link-app storybook`
174
-
175
- Start the Stortybook development server
176
-
177
- ```
178
- USAGE
179
- $ create-link-app storybook [-p <value>]
180
-
181
- FLAGS
182
- -p, --port=<value> [default: 6006] Port to run the Storybook server on
183
-
184
- DESCRIPTION
185
- Start the Stortybook development server
186
- ```
187
171
  <!-- commandsstop -->
@@ -14,9 +14,6 @@ const createProject = async (template, targetDir) => {
14
14
  await fs_extra_1.default.copy(templateDir, targetDir);
15
15
  await fs_extra_1.default.copy(templateCommonDir, targetDir);
16
16
  await fs_extra_1.default.move(`${targetDir}/gitignore`, `${targetDir}/.gitignore`);
17
- if (await fs_extra_1.default.existsSync(`${targetDir}/src/types/global.d.ts`)) {
18
- await fs_extra_1.default.unlink(`${targetDir}/src/types/global.d.ts`);
19
- }
20
17
  // update `name` field in project manifest
21
18
  const manifest = await fs_extra_1.default.readJson(`${targetDir}/manifest.json`);
22
19
  manifest.name = (0, project_name_to_title_1.default)(path_1.default.basename(targetDir));
@@ -1,28 +1,5 @@
1
1
  "use strict";
2
2
  /* eslint-disable @typescript-eslint/no-non-null-assertion */
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
- var __importStar = (this && this.__importStar) || function (mod) {
20
- if (mod && mod.__esModule) return mod;
21
- var result = {};
22
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
- __setModuleDefault(result, mod);
24
- return result;
25
- };
26
3
  var __importDefault = (this && this.__importDefault) || function (mod) {
27
4
  return (mod && mod.__esModule) ? mod : { "default": mod };
28
5
  };
@@ -31,12 +8,10 @@ const fork_ts_checker_webpack_plugin_1 = __importDefault(require("fork-ts-checke
31
8
  const fs_1 = __importDefault(require("fs"));
32
9
  const html_webpack_plugin_1 = __importDefault(require("html-webpack-plugin"));
33
10
  const inject_body_webpack_plugin_1 = __importDefault(require("inject-body-webpack-plugin"));
34
- const mini_css_extract_plugin_1 = __importDefault(require("mini-css-extract-plugin"));
35
11
  const path_1 = __importDefault(require("path"));
36
12
  const webpack_1 = require("webpack");
37
13
  const camelcase_1 = __importDefault(require("camelcase"));
38
14
  const slugify_1 = __importDefault(require("slugify"));
39
- const postcssOptions = __importStar(require("../postcss/postcss.config"));
40
15
  const { ModuleFederationPlugin } = webpack_1.container;
41
16
  function default_1(env, options) {
42
17
  const appDir = process.cwd();
@@ -44,15 +19,14 @@ function default_1(env, options) {
44
19
  const htmlTemplateFile = path_1.default.resolve(__dirname, '..', '..', 'html-template', `${env}.html`);
45
20
  const manifestJson = JSON.parse(fs_1.default.readFileSync(path_1.default.resolve(appDir, 'manifest.json'), 'utf8'));
46
21
  const linkTypeName = manifestJson.name.replace(/[^A-Za-z0-9 ]/g, '');
47
- const linkTypeSlug = (0, slugify_1.default)(linkTypeName, { lower: true });
48
- const linkTypeId = (0, camelcase_1.default)(linkTypeSlug, { pascalCase: true });
22
+ const linkTypeId = (0, camelcase_1.default)((0, slugify_1.default)(linkTypeName, { lower: true }), { pascalCase: true });
49
23
  const hasTsconfig = fileExists(path_1.default.resolve(appDir, 'tsconfig.json'));
50
24
  const config = {
51
25
  target: 'web',
52
26
  mode: env,
53
27
  entry: entryFile,
54
28
  output: {
55
- publicPath: 'auto',
29
+ publicPath: '',
56
30
  path: path_1.default.resolve(appDir, 'dist'),
57
31
  assetModuleFilename: 'images/[hash][ext][query]',
58
32
  },
@@ -75,19 +49,6 @@ function default_1(env, options) {
75
49
  test: /\.(png|jpe?g|gif|svg)$/i,
76
50
  type: 'asset/inline',
77
51
  },
78
- {
79
- test: /\.css$/,
80
- use: [
81
- mini_css_extract_plugin_1.default.loader,
82
- 'css-loader',
83
- {
84
- loader: 'postcss-loader',
85
- options: {
86
- postcssOptions: { ...postcssOptions },
87
- },
88
- },
89
- ],
90
- },
91
52
  ],
92
53
  },
93
54
  resolve: {
@@ -116,16 +77,13 @@ function default_1(env, options) {
116
77
  ...config.resolve.alias,
117
78
  '@linktr.ee/extension-dev-data': path_1.default.resolve(appDir, 'fixtures', 'props-data.json'),
118
79
  };
119
- config.plugins.push(new mini_css_extract_plugin_1.default());
120
80
  }
121
81
  if (env === 'production') {
122
- // TODO: Figure out how to manage externals with Module Federation
123
- // Possibly make the index.html a host app, via separate webpack config
124
- // config.externals = {
125
- // react: 'React',
126
- // 'react-dom': 'ReactDOM',
127
- // 'styled-components': 'styled',
128
- // }
82
+ config.externals = {
83
+ react: 'React',
84
+ 'react-dom': 'ReactDOM',
85
+ 'styled-components': 'styled',
86
+ };
129
87
  config.performance = {
130
88
  maxEntrypointSize: 1048576,
131
89
  maxAssetSize: 350000,
@@ -154,14 +112,11 @@ function default_1(env, options) {
154
112
  singleton: true,
155
113
  requiredVersion: '17 || 18',
156
114
  },
157
- // 'styled-components': {
158
- // singleton: true,
159
- // requiredVersion: '5',
160
- // },
115
+ 'styled-components': {
116
+ singleton: true,
117
+ requiredVersion: '5',
118
+ },
161
119
  },
162
- }), new mini_css_extract_plugin_1.default({
163
- filename: '[name].[contenthash].css',
164
- chunkFilename: '[id].[contenthash].css',
165
120
  }));
166
121
  }
167
122
  return config;
@@ -13,4 +13,4 @@
13
13
  <div id="root"></div>
14
14
  </body>
15
15
 
16
- </html>
16
+ </html>
@@ -17,4 +17,4 @@
17
17
  <div id="root"></div>
18
18
  </body>
19
19
 
20
- </html>
20
+ </html>
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.3.0-next.18",
2
+ "version": "0.3.0-next.2",
3
3
  "commands": {
4
4
  "build": {
5
5
  "id": "build",
@@ -216,26 +216,6 @@
216
216
  }
217
217
  },
218
218
  "args": {}
219
- },
220
- "storybook": {
221
- "id": "storybook",
222
- "description": "Start the Stortybook development server",
223
- "strict": true,
224
- "pluginName": "@linktr.ee/create-link-app",
225
- "pluginAlias": "@linktr.ee/create-link-app",
226
- "pluginType": "core",
227
- "aliases": [],
228
- "flags": {
229
- "port": {
230
- "name": "port",
231
- "type": "option",
232
- "char": "p",
233
- "description": "Port to run the Storybook server on",
234
- "multiple": false,
235
- "default": 6006
236
- }
237
- },
238
- "args": {}
239
219
  }
240
220
  }
241
221
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linktr.ee/create-link-app",
3
- "version": "0.3.0-next.18",
3
+ "version": "0.3.0-next.2",
4
4
  "description": "Create a Link App on Linktr.ee.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Linktree",
@@ -19,14 +19,13 @@
19
19
  "/templates"
20
20
  ],
21
21
  "scripts": {
22
- "build": "shx rm -rf dist && tsc -b && yarn copy-storybook-global-css",
22
+ "build": "shx rm -rf dist && tsc -b",
23
23
  "postpack": "shx rm -f oclif.manifest.json",
24
24
  "prepack": "yarn build && oclif manifest && oclif readme",
25
25
  "test": "jest --watch",
26
26
  "test:ci": "jest",
27
27
  "test:cov": "jest --coverage",
28
- "version": "oclif readme && git add README.md",
29
- "copy-storybook-global-css": "cp ./src/storybook/global.css ./dist/storybook/global.css"
28
+ "version": "oclif readme && git add README.md"
30
29
  },
31
30
  "dependencies": {
32
31
  "@babel/core": "^7.18.2",
@@ -35,45 +34,24 @@
35
34
  "@babel/preset-react": "^7.17.12",
36
35
  "@babel/preset-typescript": "^7.17.12",
37
36
  "@babel/runtime": "^7.18.3",
38
- "@linktr.ee/component-library": "^7.0.17",
39
37
  "@oclif/core": "^1.9.0",
40
38
  "@oclif/plugin-help": "^5.1.12",
41
- "@storybook/addon-actions": "^6.5.9",
42
- "@storybook/addon-essentials": "^6.5.9",
43
- "@storybook/addon-interactions": "^6.5.9",
44
- "@storybook/addon-links": "^6.5.9",
45
- "@storybook/addon-postcss": "^2.0.0",
46
- "@storybook/builder-webpack5": "^6.5.9",
47
- "@storybook/manager-webpack5": "^6.5.9",
48
- "@storybook/react": "^6.5.9",
49
- "@testing-library/react": "^12.1.4",
50
- "@testing-library/user-event": "14",
51
39
  "archiver": "^5.3.1",
52
- "autoprefixer": "^10.4.14",
53
40
  "axios": "^0.27.2",
54
41
  "babel-loader": "^8.2.5",
55
42
  "camelcase": "^6.3.0",
56
- "css-loader": "^6.7.3",
57
43
  "fork-ts-checker-webpack-plugin": "^7.2.11",
58
44
  "form-data": "^4.0.0",
59
45
  "fs-extra": "^10.1.0",
60
46
  "html-webpack-plugin": "^5.5.0",
61
47
  "inject-body-webpack-plugin": "^1.3.0",
62
48
  "jsonwebtoken": "^8.5.1",
63
- "mini-css-extract-plugin": "^2.7.5",
64
49
  "netrc-parser": "^3.1.6",
65
50
  "openid-client": "^5.1.6",
66
- "postcss": "^8.4.21",
67
- "postcss-loader": "^4.3.0",
68
- "prop-types": "^15.8.1",
69
51
  "react": "^17.0.2",
70
52
  "react-dom": "^17.0.2",
71
53
  "slugify": "^1.6.6",
72
- "storybook-addon-designs": "^6.3.1",
73
- "storybook-addon-turbo-build": "^1.1.0",
74
- "style-loader": "^3.3.2",
75
54
  "styled-components": "^5.3.5",
76
- "tailwindcss": "^3.3.1",
77
55
  "typescript": "^4.7.3",
78
56
  "webpack": "^5.75.0",
79
57
  "webpack-dev-server": "^4.11.1"
@@ -1,3 +1,4 @@
1
1
  {
2
- "title": "Link App Title"
2
+ "toggle": true,
3
+ "your_name": "World"
3
4
  }
@@ -3,12 +3,10 @@
3
3
  "scripts": {
4
4
  "build": "create-link-app build",
5
5
  "deploy": "create-link-app deploy",
6
- "storybook": "create-link-app storybook",
7
6
  "dev": "create-link-app dev"
8
7
  },
9
8
  "devDependencies": {
10
- "@linktr.ee/component-library": "latest",
11
- "@linktr.ee/create-link-app": "next",
9
+ "@linktr.ee/create-link-app": "latest",
12
10
  "@linktr.ee/ui-link-kit": "latest"
13
11
  }
14
12
  }
@@ -1,9 +1,18 @@
1
- import P from '@linktr.ee/component-library/P'
1
+ import { Container, Description, Header } from '@linktr.ee/ui-link-kit'
2
2
 
3
- import './tailwind.css'
3
+ import logo from './images/logo.png'
4
4
 
5
- function App({ title }) {
6
- return <P>{title}</P>
5
+ function App({ toggle, your_name, __linkUrl }) {
6
+ return (
7
+ <Container
8
+ primaryCta={toggle ? { label: 'Visit our UI docs for more info', href: 'https://blstrco.github.io/ui-link-kit/' } : null}
9
+ secondaryCta={toggle ? { label: 'Original url for your Linktree link', href: __linkUrl } : null}
10
+ logo={logo}
11
+ >
12
+ <Header heading={`Hello ${your_name}!`} secondaryHeading="Congratulations, you now have a Linktree link!" layout="hero" />
13
+ <Description>{your_name}</Description>
14
+ </Container>
15
+ )
7
16
  }
8
17
 
9
18
  export default App
@@ -3,12 +3,10 @@
3
3
  "scripts": {
4
4
  "build": "create-link-app build",
5
5
  "deploy": "create-link-app deploy",
6
- "storybook": "create-link-app storybook",
7
6
  "dev": "create-link-app dev"
8
7
  },
9
8
  "devDependencies": {
10
- "@linktr.ee/component-library": "latest",
11
- "@linktr.ee/create-link-app": "next",
9
+ "@linktr.ee/create-link-app": "latest",
12
10
  "@linktr.ee/ui-link-kit": "latest",
13
11
  "@types/react": "^17.0.0",
14
12
  "@types/react-dom": "^17.0.0"
@@ -1,25 +1,19 @@
1
- import { Featured, Carousel, Grid, Stack, SheetBody } from './components/Layouts'
2
- import { SettingsData, Layout } from './types'
1
+ import { Container, Description, Header } from '@linktr.ee/ui-link-kit'
2
+ import { SettingsData } from './types'
3
3
 
4
- import './tailwind.css'
4
+ import logo from './images/logo.png'
5
5
 
6
- function App(props: SettingsData) {
7
- const { layout } = props
8
-
9
- switch (layout) {
10
- case Layout.stack:
11
- return <Stack {...props} />
12
- case Layout.grid:
13
- return <Grid {...props} />
14
- case Layout.carousel:
15
- return <Carousel {...props} />
16
- case Layout.featured:
17
- return <Featured {...props} />
18
- case Layout.sheetBody:
19
- return <SheetBody />
20
- default:
21
- return <div>Unknown layout: {props.layout}</div>
22
- }
6
+ function App({ toggle, your_name, __linkUrl }: SettingsData) {
7
+ return (
8
+ <Container
9
+ primaryCta={toggle ? { label: 'Visit our UI docs for more info', href: 'https://blstrco.github.io/ui-link-kit/' } : null}
10
+ secondaryCta={toggle ? { label: 'Original url for your Linktree link', href: __linkUrl } : null}
11
+ logo={logo}
12
+ >
13
+ <Header heading={`Hello ${your_name}!`} secondaryHeading="Congratulations, you now have a Linktree link!" layout="hero" />
14
+ <Description>{your_name}</Description>
15
+ </Container>
16
+ )
23
17
  }
24
18
 
25
19
  export default App
@@ -1,8 +1,5 @@
1
- // @HACK: These files are removed at build time, but we need it for type checking
2
- declare module '*manifest.json' {
3
- export const name: string
4
- }
5
-
6
- declare module '*props-data.json' {
7
- export const name: string
8
- }
1
+ declare module '*.jpg'
2
+ declare module '*.png'
3
+ declare module '*.jpeg'
4
+ declare module '*.gif'
5
+ declare module '*.svg'
@@ -1,23 +1,7 @@
1
1
  type LinktreeLinkContext = {
2
- layout: Layout;
3
- editing: boolean;
4
- borderRadius: BorderRadius;
5
- };
6
-
7
- export type SettingsData = {
8
- title: string;
9
- } & LinktreeLinkContext;
10
-
11
- export enum Layout {
12
- featured = "FEATURED",
13
- carousel = "CAROUSEL",
14
- grid = "GRID",
15
- stack = "STACK",
16
- sheetBody = "SHEET_BODY",
17
- }
18
-
19
- export enum BorderRadius {
20
- Full = "FULL",
21
- Medium = "MEDIUM",
22
- None = "NONE",
2
+ __linkUrl: string
23
3
  }
4
+ export type SettingsData = {
5
+ toggle: boolean
6
+ your_name: string
7
+ } & LinktreeLinkContext
@@ -1,28 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const core_1 = require("@oclif/core");
7
- const child_process_1 = require("child_process");
8
- const base_1 = __importDefault(require("../base"));
9
- const path_1 = __importDefault(require("path"));
10
- class Storybook extends base_1.default {
11
- async run() {
12
- const configPath = path_1.default.resolve(__dirname, '..', 'storybook');
13
- const { flags } = await this.parse(Storybook);
14
- const storybook = (0, child_process_1.spawn)(`start-storybook -p ${flags.port} -c ${configPath}`, { shell: true, stdio: 'inherit' });
15
- storybook.on('error', (err) => {
16
- throw err;
17
- });
18
- }
19
- }
20
- exports.default = Storybook;
21
- Storybook.description = 'Start the Stortybook development server';
22
- Storybook.flags = {
23
- port: core_1.Flags.integer({
24
- char: 'p',
25
- description: 'Port to run the Storybook server on',
26
- default: 6006,
27
- }),
28
- };
@@ -1,20 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const path_1 = __importDefault(require("path"));
7
- const tailwindcss_1 = __importDefault(require("tailwindcss"));
8
- const autoprefixer_1 = __importDefault(require("autoprefixer"));
9
- const componentLibraryContentPath = path_1.default.join(require.resolve('@linktr.ee/component-library/tailwind.config').split('/').slice(0, -1).join('/'), 'dist', '**', '*.js');
10
- const config = {
11
- plugins: [
12
- (0, tailwindcss_1.default)({
13
- content: [`${process.cwd()}/src/**/*.{js,jsx,ts,tsx}`, componentLibraryContentPath],
14
- presets: [require('@linktr.ee/component-library/tailwind.config')],
15
- plugins: [],
16
- }),
17
- (0, autoprefixer_1.default)(),
18
- ],
19
- };
20
- module.exports = config;
@@ -1,50 +0,0 @@
1
- :root {
2
- --lt-color-background: #3a463c;
3
- --lt-color-on-background: #f7fdf9;
4
- --lt-color-on-primary: #ffffff;
5
- --lt-color-on-secondary: #ffffffb3;
6
- --lt-color-primary: #849589;
7
- --lt-color-secondary: #67776b;
8
-
9
- --lt-color0: #ffffff;
10
- --lt-color1: #f7fdf9;
11
- --lt-color2: #eef6ed;
12
- --lt-color3: #e0ece2;
13
- --lt-color4: #c9d5cb;
14
- --lt-color5: #b6c5b7;
15
- --lt-color6: #849589;
16
- --lt-color7: #67776b;
17
- --lt-color8: #4d5e52;
18
- --lt-color9: #3a463c;
19
- --lt-color10: #29382d;
20
- --lt-color11: #151e16;
21
- --lt-color12: #0b140c;
22
- --lt-color13: #000501;
23
- --lt-color14: #000000;
24
- --lt-color15: #000000;
25
-
26
- --lt-treetop-radius-mobile: 2.5rem;
27
-
28
- --lt-cover-radius: 6rem;
29
- --lt-cover-radius-mobile: 4rem;
30
-
31
- --lt-feature-container-radius: 2rem;
32
- --lt-feature-thumbnail-radius: 1.5rem;
33
-
34
- --lt-carousel-container-radius: 1.5rem;
35
- --lt-carousel-thumbnail-radius: 1rem;
36
-
37
- --lt-grid-container-radius: 1.25rem;
38
- --lt-grid-thumbnail-radius: 0.75rem;
39
-
40
- --lt-stack-container-radius: 1rem;
41
- --lt-stack-thumbnail-radius: 0.65rem;
42
-
43
- --lt-font-family: INTER;
44
- --lt-text-2xl: 1.5rem;
45
- --lt-text-lg: 1.125rem;
46
- --lt-text-md: 1rem;
47
- --lt-text-sm: 0.875rem;
48
- --lt-text-xl: 1.25rem;
49
- --lt-text-xs: 0.75rem;
50
- }
@@ -1,62 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- const postcss_1 = __importDefault(require("postcss"));
30
- const postcssOptions = __importStar(require("../postcss/postcss.config"));
31
- const config = {
32
- stories: [`${process.cwd()}/src/**/*.stories.@(js|jsx|ts|tsx)`],
33
- addons: [
34
- '@storybook/addon-links',
35
- '@storybook/addon-essentials',
36
- {
37
- name: 'storybook-addon-turbo-build',
38
- options: {
39
- optimizationLevel: 2,
40
- },
41
- },
42
- {
43
- /**
44
- * Fix Storybook issue with PostCSS@8
45
- * @see https://github.com/storybookjs/storybook/issues/12668#issuecomment-773958085
46
- */
47
- name: '@storybook/addon-postcss',
48
- options: {
49
- cssLoaderOptions: { importLoaders: 1 },
50
- postcssLoaderOptions: {
51
- implementation: postcss_1.default,
52
- postcssOptions: { ...postcssOptions },
53
- },
54
- },
55
- },
56
- ],
57
- framework: '@storybook/react',
58
- core: {
59
- builder: 'webpack5',
60
- },
61
- };
62
- module.exports = config;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parameters = void 0;
4
- require("./global.css");
5
- exports.parameters = {
6
- actions: { argTypesRegex: '^on[A-Z].*' },
7
- controls: {
8
- matchers: {
9
- color: /(background|color)$/i,
10
- date: /Date$/,
11
- },
12
- },
13
- };
@@ -1,5 +0,0 @@
1
- /* tailwind.css */
2
-
3
- @tailwind base;
4
- @tailwind components;
5
- @tailwind utilities;
@@ -1,57 +0,0 @@
1
- import { SettingsData } from '../types'
2
-
3
- const baseStyle = {
4
- backgroundColor: 'var(--lt-color-primary)',
5
- color: 'var(--lt-color-on-primary)',
6
- } as React.CSSProperties
7
-
8
- const Featured = (props: SettingsData) => {
9
- return (
10
- <div
11
- className="px-6 pt-12 pb-11 h-full"
12
- style={{
13
- ...baseStyle,
14
- borderRadius: 'var(--lt-feature-container-radius)',
15
- }}
16
- >
17
- Featured
18
- </div>
19
- )
20
- }
21
-
22
- const Carousel = (props: SettingsData) => {
23
- return (
24
- <div
25
- className="px-4 pt-16 pb-10 h-full"
26
- style={{
27
- ...baseStyle,
28
- borderRadius: 'var(--lt-carousel-container-radius)',
29
- }}
30
- >
31
- Carousel
32
- </div>
33
- )
34
- }
35
-
36
- const Grid = (props: SettingsData) => {
37
- return (
38
- <div className="px-3 py-10 h-full" style={{ ...baseStyle, borderRadius: 'var(--lt-grid-container-radius)' }}>
39
- Grid
40
- </div>
41
- )
42
- }
43
-
44
- const Stack = (props: SettingsData) => {
45
- return (
46
- <div className="flex p-2 h-full gap-2 w-full" style={{ ...baseStyle, borderRadius: 'var(--lt-stack-container-radius)' }}>
47
- <div className="w-16 aspect-square"></div>
48
- <h2 className="mr-16">Stack</h2>
49
- </div>
50
- )
51
- }
52
-
53
- const SheetBody = () => {
54
- return <div>sheet body</div>
55
- }
56
-
57
- export { Featured, Carousel, Grid, Stack, SheetBody }
@@ -1,99 +0,0 @@
1
- import React from 'react'
2
- import { ComponentStory, ComponentMeta } from '@storybook/react'
3
- import manifest from '../../manifest.json'
4
- import fixture from '../../fixtures/props-data.json'
5
-
6
- import { Layout } from '../types'
7
-
8
- import LinkApp from '..'
9
-
10
- import './tailwind.sb.css'
11
-
12
- export default {
13
- title: `Link App/${manifest.name}`,
14
- component: LinkApp,
15
- tags: ['autodocs'],
16
- parameters: {
17
- layout: 'fullscreen',
18
- },
19
- args: {
20
- ...fixture,
21
- editing: false,
22
- },
23
- argTypes: {
24
- layout: {
25
- table: {
26
- disable: true,
27
- },
28
- },
29
- },
30
- } as ComponentMeta<typeof LinkApp>
31
-
32
- export const Stack: ComponentStory<typeof LinkApp> = (args) => (
33
- <div
34
- className="m-2"
35
- style={{
36
- width: 374,
37
- height: 80,
38
- }}
39
- >
40
- <LinkApp {...args} />
41
- </div>
42
- )
43
- Stack.args = {
44
- layout: Layout.stack,
45
- }
46
-
47
- export const Grid: ComponentStory<typeof LinkApp> = (args) => (
48
- <div
49
- className="m-2"
50
- style={{
51
- width: 183,
52
- height: 240,
53
- }}
54
- >
55
- <LinkApp {...args} />
56
- </div>
57
- )
58
- Grid.args = {
59
- layout: Layout.grid,
60
- }
61
-
62
- export const Carousel: ComponentStory<typeof LinkApp> = (args) => (
63
- <div
64
- className="m-2"
65
- style={{
66
- width: 224,
67
- height: 296,
68
- }}
69
- >
70
- <LinkApp {...args} />
71
- </div>
72
- )
73
- Carousel.args = {
74
- layout: Layout.carousel,
75
- }
76
-
77
- export const Featured: ComponentStory<typeof LinkApp> = (args) => (
78
- <div
79
- className="m-2"
80
- style={{
81
- width: 374,
82
- height: 374,
83
- }}
84
- >
85
- <LinkApp {...args} />
86
- </div>
87
- )
88
- Featured.args = {
89
- layout: Layout.featured,
90
- }
91
-
92
- export const SheetBody: ComponentStory<typeof LinkApp> = (args) => (
93
- <div className="m-2">
94
- <LinkApp {...args} />
95
- </div>
96
- )
97
- SheetBody.args = {
98
- layout: Layout.sheetBody,
99
- }
@@ -1,5 +0,0 @@
1
- /* tailwind.sb.css */
2
-
3
- @tailwind base;
4
- @tailwind components;
5
- @tailwind utilities;
@@ -1,4 +0,0 @@
1
- /* tailwind.css */
2
-
3
- @tailwind components;
4
- @tailwind utilities;