@phillips/seldon 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +16 -0
- package/.github/CODEOWNERS +37 -0
- package/.github/CODE_OF_CONDUCT.md +91 -0
- package/.github/ISSUE_TEMPLATE/bug-report.md +41 -0
- package/.github/PULL_REQUEST_TEMPLATE.MD +28 -0
- package/.github/workflows/build.yml +26 -0
- package/.github/workflows/publish.yml +45 -0
- package/.storybook/assets/LogoBlack.svg +16 -0
- package/.storybook/main.ts +19 -0
- package/.storybook/manager-head.html +58 -0
- package/.storybook/manager.ts +6 -0
- package/.storybook/preview.ts +23 -0
- package/.storybook/seldonTheme.ts +43 -0
- package/custom.d.ts +12 -0
- package/index.html +13 -0
- package/package.json +1 -7
- package/public/vite.svg +1 -0
- package/src/App.css +42 -0
- package/src/App.tsx +35 -0
- package/src/README.md +43 -0
- package/src/assets/react.svg +1 -0
- package/src/components/Button/Button.stories.tsx +28 -0
- package/src/components/Button/Button.tsx +57 -0
- package/src/components/Button/_button.scss +39 -0
- package/src/components/Header/Header.stories.ts +26 -0
- package/src/components/Header/Header.tsx +56 -0
- package/src/components/Header/_header.scss +32 -0
- package/src/design/Welcome.mdx +68 -0
- package/src/design/assets/code-brackets.svg +1 -0
- package/src/design/assets/colors.svg +1 -0
- package/src/design/assets/comments.svg +1 -0
- package/src/design/assets/direction.svg +1 -0
- package/src/design/assets/flow.svg +1 -0
- package/src/design/assets/plugin.svg +1 -0
- package/src/design/assets/repo.svg +1 -0
- package/src/design/assets/stackalt.svg +1 -0
- package/src/design/colors-tokens/ColorCard.tsx +84 -0
- package/src/design/colors-tokens/_color-card.scss +84 -0
- package/src/design/colors-tokens/color-tokens.mdx +231 -0
- package/src/index.css +69 -0
- package/src/index.ts +3 -0
- package/src/main.tsx +10 -0
- package/src/pages/Page.stories.ts +29 -0
- package/src/pages/Page.tsx +74 -0
- package/src/pages/_page.scss +69 -0
- package/src/story-styles.scss +1 -0
- package/src/styles.scss +5 -0
- package/src/utils/_reset.scss +29 -0
- package/src/utils/_typography.scss +22 -0
- package/src/utils/_vars.scss +35 -0
- package/src/utils/index.ts +1 -0
- package/src/vite-env.d.ts +1 -0
- package/tsconfig.json +27 -0
- package/tsconfig.node.json +11 -0
- package/vite.config.ts +58 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { Meta } from '@storybook/blocks';
|
|
2
|
+
import Code from '../assets/code-brackets.svg';
|
|
3
|
+
import Colors from '../assets/colors.svg';
|
|
4
|
+
import Comments from '../assets/comments.svg';
|
|
5
|
+
import Direction from '../assets/direction.svg';
|
|
6
|
+
import Flow from '../assets/flow.svg';
|
|
7
|
+
import Plugin from '../assets/plugin.svg';
|
|
8
|
+
import Repo from '../assets/repo.svg';
|
|
9
|
+
import StackAlt from '../assets/stackalt.svg';
|
|
10
|
+
import ColorCard from './ColorCard';
|
|
11
|
+
|
|
12
|
+
<Meta title="Design/Color Tokens" />
|
|
13
|
+
|
|
14
|
+
<style>
|
|
15
|
+
{`
|
|
16
|
+
#colors-gradients-and-transparencies- {
|
|
17
|
+
display: flex;
|
|
18
|
+
margin-bottom: 2.5rem;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
#colors-gradients-and-transparencies- img {
|
|
22
|
+
margin-left: 1rem;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
h2 {
|
|
26
|
+
margin: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.color__h2 {
|
|
30
|
+
font-size: 1rem;
|
|
31
|
+
color: #4a90e2;
|
|
32
|
+
display: inline-block;
|
|
33
|
+
letter-spacing: 0.275rem;
|
|
34
|
+
line-height: 1.5;
|
|
35
|
+
text-transform: uppercase;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.color__h3 {
|
|
39
|
+
font-size: 1rem;
|
|
40
|
+
line-height: 1.5;
|
|
41
|
+
margin: 0;
|
|
42
|
+
margin-bottom: 0.5rem;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.color__p p{
|
|
46
|
+
margin-bottom: 2rem;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.color__list {
|
|
50
|
+
display: grid;
|
|
51
|
+
grid-template-columns: repeat(4, 1fr);
|
|
52
|
+
grid-template-rows: 1fr;
|
|
53
|
+
grid-column-gap: 0.75rem;
|
|
54
|
+
grid-row-gap: 0.75rem;
|
|
55
|
+
margin-bottom: 4rem;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.phillips-color-card {
|
|
59
|
+
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.tip {
|
|
63
|
+
display: inline-block;
|
|
64
|
+
border-radius: 1em;
|
|
65
|
+
font-size: 11px;
|
|
66
|
+
line-height: 12px;
|
|
67
|
+
font-weight: 700;
|
|
68
|
+
background: #E7FDD8;
|
|
69
|
+
color: #66BF3C;
|
|
70
|
+
padding: 4px 12px;
|
|
71
|
+
margin-right: 10px;
|
|
72
|
+
vertical-align: top;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.tip-wrapper {
|
|
76
|
+
font-size: 13px;
|
|
77
|
+
line-height: 20px;
|
|
78
|
+
margin-top: 40px;
|
|
79
|
+
margin-bottom: 40px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.tip-wrapper code {
|
|
83
|
+
font-size: 12px;
|
|
84
|
+
display: inline-block;
|
|
85
|
+
}
|
|
86
|
+
`}
|
|
87
|
+
</style>
|
|
88
|
+
|
|
89
|
+
<main className="sb-unstyled">
|
|
90
|
+
# Colors, Gradients, and Transparencies <img src={Colors} alt="colors" />
|
|
91
|
+
|
|
92
|
+
## <span className="color__h2">Primary Color Palette</span>
|
|
93
|
+
|
|
94
|
+
<h3 className="color__h3">Black ﹡ White</h3>
|
|
95
|
+
<span className="color__p">
|
|
96
|
+
We utilize black and white as our primary palette as the PHILLIPS brand relies
|
|
97
|
+
heavily on the gallery presentation - i.e. allowing the Art to stand out. It
|
|
98
|
+
tends to skew to 75% white, 25% black. Pure black is used on Fills, logo, and
|
|
99
|
+
wordmarks for a more luxurious depth; our Primary Black value is used on
|
|
100
|
+
Titles/Headers and Button elements. White is predominantly use to offer
|
|
101
|
+
breathable and clean-presenting negative spacing.
|
|
102
|
+
</span>
|
|
103
|
+
|
|
104
|
+
<div className="color__list">
|
|
105
|
+
<ColorCard
|
|
106
|
+
label="Pure Black"
|
|
107
|
+
hex="#000000"
|
|
108
|
+
usage="BG Fills, Logo, Wordmarks"
|
|
109
|
+
/>
|
|
110
|
+
<ColorCard
|
|
111
|
+
label="Primary Black"
|
|
112
|
+
hex="#323232"
|
|
113
|
+
usage="Headers, Buttons' Fill & Stroke"
|
|
114
|
+
/>
|
|
115
|
+
<ColorCard
|
|
116
|
+
label="Pure White"
|
|
117
|
+
hex="#ffffff"
|
|
118
|
+
usage="Negative Space, Text on Dark BG"
|
|
119
|
+
/>
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
## <span className="color__h2">Secondary Color Palette</span>
|
|
123
|
+
|
|
124
|
+
<h3 className="color__h3">Dark Grays</h3>
|
|
125
|
+
<span className="color__p">
|
|
126
|
+
In order to create depth and add levels of heirarchy, we utilize Soft Black
|
|
127
|
+
and Dark Gray for body blocks or varying importances.
|
|
128
|
+
</span>
|
|
129
|
+
|
|
130
|
+
<div className="color__list">
|
|
131
|
+
<ColorCard label="Soft Black" hex="#545454" usage="body/Text Blocks" />
|
|
132
|
+
<ColorCard label="Dark Gray" hex="#75716f" usage="Labels & Badges" />
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
## <span className="color__h2">Utilitarian Color Palette</span>
|
|
136
|
+
|
|
137
|
+
<h3 className="color__h3">Keylines ﹡ Med & Lite Grays</h3>
|
|
138
|
+
<span className="color__p">
|
|
139
|
+
These are used for utilitarian purposes - keylines, disabled states, inactive
|
|
140
|
+
states, BG fills for Banners, Sections, and Cards
|
|
141
|
+
</span>
|
|
142
|
+
|
|
143
|
+
<div className="color__list">
|
|
144
|
+
<ColorCard
|
|
145
|
+
label="Keyline Gray"
|
|
146
|
+
hex="#949494"
|
|
147
|
+
usage="All keylines, strokes, and HRs"
|
|
148
|
+
/>
|
|
149
|
+
<ColorCard
|
|
150
|
+
label="Medium Gray"
|
|
151
|
+
hex="#c3bebb"
|
|
152
|
+
usage="Disabled/Inactive Buttons"
|
|
153
|
+
/>
|
|
154
|
+
<ColorCard label="Light Gray" hex="#eceae7" usage="BG fills" />
|
|
155
|
+
<ColorCard label="Off White" hex="#f4f2f1" usage="BG fills" />
|
|
156
|
+
</div>
|
|
157
|
+
|
|
158
|
+
## <span className="color__h2">Notification Color Palette</span>
|
|
159
|
+
|
|
160
|
+
<h3 className="color__h3">Cyan ﹡ Reds ﹡ Magenta ﹡ Green</h3>
|
|
161
|
+
<span className="color__p">
|
|
162
|
+
We utiilize black and white as our primary palette as the PHILLIPS brand
|
|
163
|
+
relies heavily on the gallery presentation - i.e. allowing the Art to stand
|
|
164
|
+
out. It tends to skew to 75% white, 25% black. Pure black is used on Fills,
|
|
165
|
+
logo, and wordmarks for a more luxurious depth; our Primary Black value is
|
|
166
|
+
used on Titles/Headers and Button elements. White is predominantly use to
|
|
167
|
+
offer breathable and clean-presenting negative spacing.
|
|
168
|
+
</span>
|
|
169
|
+
|
|
170
|
+
<div className="color__list">
|
|
171
|
+
|
|
172
|
+
<ColorCard
|
|
173
|
+
label="Error Red"
|
|
174
|
+
hex="#ff0000"
|
|
175
|
+
usage="Error Messaging"
|
|
176
|
+
/>
|
|
177
|
+
<ColorCard
|
|
178
|
+
label="Post-Sale Magenta"
|
|
179
|
+
hex="#ff0086"
|
|
180
|
+
usage="Sold Price, Concluded Labels"
|
|
181
|
+
/>
|
|
182
|
+
<ColorCard
|
|
183
|
+
label="Color Widget Blue"
|
|
184
|
+
hex="#4a90e2"
|
|
185
|
+
usage="'Bid is with you'"
|
|
186
|
+
/>
|
|
187
|
+
<ColorCard
|
|
188
|
+
label="Clock Widget Green"
|
|
189
|
+
hex="#6a9c53"
|
|
190
|
+
usage="'Live'"
|
|
191
|
+
/>
|
|
192
|
+
<ColorCard
|
|
193
|
+
label="Clock Widget Maroon"
|
|
194
|
+
hex="#6b0000"
|
|
195
|
+
usage="'Countdown"
|
|
196
|
+
/>
|
|
197
|
+
<ColorCard
|
|
198
|
+
label="Clock Widget Red"
|
|
199
|
+
hex="#b00000"
|
|
200
|
+
usage="'Closing' 'You've Been Outbid'"
|
|
201
|
+
/>
|
|
202
|
+
</div>
|
|
203
|
+
|
|
204
|
+
## <span className="color__h2">CTA and Hover</span>
|
|
205
|
+
|
|
206
|
+
<h3 className="color__h3">Cyan ﹡ Gradients</h3>
|
|
207
|
+
<span className="color__p">
|
|
208
|
+
The Cyan value is used not only for our CTA interactions, but also in select
|
|
209
|
+
cases of hover, such as our Tab Buttons. All CTA's, Links, and tertiary style
|
|
210
|
+
buttons employ the cyan for hover state. The hover gradient is used on all
|
|
211
|
+
enclosed buttons. i.e. Primary & Secondary, Standard, Micro & Simple Icons.
|
|
212
|
+
</span>
|
|
213
|
+
|
|
214
|
+
<div className="color__list">
|
|
215
|
+
|
|
216
|
+
<ColorCard
|
|
217
|
+
label="CTA Blue"
|
|
218
|
+
hex="#4a90e2"
|
|
219
|
+
usage="CTAs, Hyperlinks, Tabs Hover-State"
|
|
220
|
+
/>
|
|
221
|
+
<ColorCard
|
|
222
|
+
label="Hover Gradient Fill"
|
|
223
|
+
hex="linear-gradient(#000000, #8f8989)"
|
|
224
|
+
usage="Sold Price, Concluded Labels"
|
|
225
|
+
/>
|
|
226
|
+
</div>
|
|
227
|
+
|
|
228
|
+
<div className="tip-wrapper">
|
|
229
|
+
<span className="tip">Tip</span>Click on the pallet tiles to copy the token
|
|
230
|
+
</div>
|
|
231
|
+
</main>
|
package/src/index.css
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
+
line-height: 1.5;
|
|
4
|
+
font-weight: 400;
|
|
5
|
+
|
|
6
|
+
color-scheme: light dark;
|
|
7
|
+
color: rgba(255, 255, 255, 0.87);
|
|
8
|
+
background-color: #242424;
|
|
9
|
+
|
|
10
|
+
font-synthesis: none;
|
|
11
|
+
text-rendering: optimizeLegibility;
|
|
12
|
+
-webkit-font-smoothing: antialiased;
|
|
13
|
+
-moz-osx-font-smoothing: grayscale;
|
|
14
|
+
-webkit-text-size-adjust: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
a {
|
|
18
|
+
font-weight: 500;
|
|
19
|
+
color: #646cff;
|
|
20
|
+
text-decoration: inherit;
|
|
21
|
+
}
|
|
22
|
+
a:hover {
|
|
23
|
+
color: #535bf2;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
body {
|
|
27
|
+
margin: 0;
|
|
28
|
+
display: flex;
|
|
29
|
+
place-items: center;
|
|
30
|
+
min-width: 320px;
|
|
31
|
+
min-height: 100vh;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
h1 {
|
|
35
|
+
font-size: 3.2em;
|
|
36
|
+
line-height: 1.1;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
button {
|
|
40
|
+
border-radius: 8px;
|
|
41
|
+
border: 1px solid transparent;
|
|
42
|
+
padding: 0.6em 1.2em;
|
|
43
|
+
font-size: 1em;
|
|
44
|
+
font-weight: 500;
|
|
45
|
+
font-family: inherit;
|
|
46
|
+
background-color: #1a1a1a;
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
transition: border-color 0.25s;
|
|
49
|
+
}
|
|
50
|
+
button:hover {
|
|
51
|
+
border-color: #646cff;
|
|
52
|
+
}
|
|
53
|
+
button:focus,
|
|
54
|
+
button:focus-visible {
|
|
55
|
+
outline: 4px auto -webkit-focus-ring-color;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@media (prefers-color-scheme: light) {
|
|
59
|
+
:root {
|
|
60
|
+
color: #213547;
|
|
61
|
+
background-color: #ffffff;
|
|
62
|
+
}
|
|
63
|
+
a:hover {
|
|
64
|
+
color: #747bff;
|
|
65
|
+
}
|
|
66
|
+
button {
|
|
67
|
+
background-color: #f9f9f9;
|
|
68
|
+
}
|
|
69
|
+
}
|
package/src/index.ts
ADDED
package/src/main.tsx
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { within, userEvent } from '@storybook/testing-library';
|
|
3
|
+
|
|
4
|
+
import Page from './Page';
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
title: 'Pages/Page',
|
|
8
|
+
component: Page,
|
|
9
|
+
parameters: {
|
|
10
|
+
// More on how to position stories at: https://storybook.js.org/docs/react/configure/story-layout
|
|
11
|
+
layout: 'fullscreen',
|
|
12
|
+
},
|
|
13
|
+
} satisfies Meta<typeof Page>;
|
|
14
|
+
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
|
+
|
|
18
|
+
export const LoggedOut: Story = {};
|
|
19
|
+
|
|
20
|
+
// More on interaction testing: https://storybook.js.org/docs/react/writing-tests/interaction-testing
|
|
21
|
+
export const LoggedIn: Story = {
|
|
22
|
+
play: async ({ canvasElement }) => {
|
|
23
|
+
const canvas = within(canvasElement);
|
|
24
|
+
const loginButton = await canvas.getByRole('button', {
|
|
25
|
+
name: /Log in/i,
|
|
26
|
+
});
|
|
27
|
+
await userEvent.click(loginButton);
|
|
28
|
+
},
|
|
29
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import Header from '../components/Header/Header';
|
|
4
|
+
|
|
5
|
+
type User = {
|
|
6
|
+
name: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const Page: React.FC = () => {
|
|
10
|
+
const [user, setUser] = React.useState<User>();
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<article>
|
|
14
|
+
<Header
|
|
15
|
+
user={user}
|
|
16
|
+
onLogin={() => setUser({ name: 'Jane Doe' })}
|
|
17
|
+
onLogout={() => setUser(undefined)}
|
|
18
|
+
onCreateAccount={() => setUser({ name: 'Jane Doe' })}
|
|
19
|
+
/>
|
|
20
|
+
|
|
21
|
+
<section className="storybook-page">
|
|
22
|
+
<h2>Pages in Storybook</h2>
|
|
23
|
+
<p>
|
|
24
|
+
We recommend building UIs with a{' '}
|
|
25
|
+
<a href="https://componentdriven.org" target="_blank" rel="noopener noreferrer">
|
|
26
|
+
<strong>component-driven</strong>
|
|
27
|
+
</a>{' '}
|
|
28
|
+
process starting with atomic components and ending with pages.
|
|
29
|
+
</p>
|
|
30
|
+
<p>
|
|
31
|
+
Render pages with mock data. This makes it easy to build and review page states without
|
|
32
|
+
needing to navigate to them in your app. Here are some handy patterns for managing page
|
|
33
|
+
data in Storybook:
|
|
34
|
+
</p>
|
|
35
|
+
<ul>
|
|
36
|
+
<li>
|
|
37
|
+
Use a higher-level connected component. Storybook helps you compose such data from the
|
|
38
|
+
"args" of child component stories
|
|
39
|
+
</li>
|
|
40
|
+
<li>
|
|
41
|
+
Assemble data in the page component from your services. You can mock these services out
|
|
42
|
+
using Storybook.
|
|
43
|
+
</li>
|
|
44
|
+
</ul>
|
|
45
|
+
<p>
|
|
46
|
+
Get a guided tutorial on component-driven development at{' '}
|
|
47
|
+
<a href="https://storybook.js.org/tutorials/" target="_blank" rel="noopener noreferrer">
|
|
48
|
+
Storybook tutorials
|
|
49
|
+
</a>
|
|
50
|
+
. Read more in the{' '}
|
|
51
|
+
<a href="https://storybook.js.org/docs" target="_blank" rel="noopener noreferrer">
|
|
52
|
+
docs
|
|
53
|
+
</a>
|
|
54
|
+
.
|
|
55
|
+
</p>
|
|
56
|
+
<div className="tip-wrapper">
|
|
57
|
+
<span className="tip">Tip</span> Adjust the width of the canvas with the{' '}
|
|
58
|
+
<svg width="10" height="10" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
|
|
59
|
+
<g fill="none" fillRule="evenodd">
|
|
60
|
+
<path
|
|
61
|
+
d="M1.5 5.2h4.8c.3 0 .5.2.5.4v5.1c-.1.2-.3.3-.4.3H1.4a.5.5 0 01-.5-.4V5.7c0-.3.2-.5.5-.5zm0-2.1h6.9c.3 0 .5.2.5.4v7a.5.5 0 01-1 0V4H1.5a.5.5 0 010-1zm0-2.1h9c.3 0 .5.2.5.4v9.1a.5.5 0 01-1 0V2H1.5a.5.5 0 010-1zm4.3 5.2H2V10h3.8V6.2z"
|
|
62
|
+
id="a"
|
|
63
|
+
fill="#999"
|
|
64
|
+
/>
|
|
65
|
+
</g>
|
|
66
|
+
</svg>
|
|
67
|
+
Viewports addon in the toolbar
|
|
68
|
+
</div>
|
|
69
|
+
</section>
|
|
70
|
+
</article>
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export default Page;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
.storybook-page {
|
|
2
|
+
font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
3
|
+
font-size: 14px;
|
|
4
|
+
line-height: 24px;
|
|
5
|
+
padding: 48px 20px;
|
|
6
|
+
margin: 0 auto;
|
|
7
|
+
max-width: 600px;
|
|
8
|
+
color: #333;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.storybook-page h2 {
|
|
12
|
+
font-weight: 700;
|
|
13
|
+
font-size: 32px;
|
|
14
|
+
line-height: 1;
|
|
15
|
+
margin: 0 0 4px;
|
|
16
|
+
display: inline-block;
|
|
17
|
+
vertical-align: top;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.storybook-page p {
|
|
21
|
+
margin: 1em 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.storybook-page a {
|
|
25
|
+
text-decoration: none;
|
|
26
|
+
color: #1ea7fd;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.storybook-page ul {
|
|
30
|
+
padding-left: 30px;
|
|
31
|
+
margin: 1em 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.storybook-page li {
|
|
35
|
+
margin-bottom: 8px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.storybook-page .tip {
|
|
39
|
+
display: inline-block;
|
|
40
|
+
border-radius: 1em;
|
|
41
|
+
font-size: 11px;
|
|
42
|
+
line-height: 12px;
|
|
43
|
+
font-weight: 700;
|
|
44
|
+
background: #e7fdd8;
|
|
45
|
+
color: #66bf3c;
|
|
46
|
+
padding: 4px 12px;
|
|
47
|
+
margin-right: 10px;
|
|
48
|
+
vertical-align: top;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.storybook-page .tip-wrapper {
|
|
52
|
+
font-size: 13px;
|
|
53
|
+
line-height: 20px;
|
|
54
|
+
margin-top: 40px;
|
|
55
|
+
margin-bottom: 40px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.storybook-page .tip-wrapper svg {
|
|
59
|
+
display: inline-block;
|
|
60
|
+
height: 12px;
|
|
61
|
+
width: 12px;
|
|
62
|
+
margin-right: 4px;
|
|
63
|
+
vertical-align: top;
|
|
64
|
+
margin-top: 3px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.storybook-page .tip-wrapper svg path {
|
|
68
|
+
fill: #1ea7fd;
|
|
69
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@use 'design/colors-tokens/color-card';
|
package/src/styles.scss
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
*, *::before, *::after {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
* {
|
|
6
|
+
margin: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
body {
|
|
10
|
+
line-height: 1.5;
|
|
11
|
+
-webkit-font-smoothing: antialiased;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
img, picture, video, canvas, svg {
|
|
15
|
+
display: block;
|
|
16
|
+
max-width: 100%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
input, button, textarea, select {
|
|
20
|
+
font: inherit;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
p, h1, h2, h3, h4, h5, h6 {
|
|
24
|
+
overflow-wrap: break-word;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
#root {
|
|
28
|
+
isolation: isolate;
|
|
29
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@use './vars' as *;
|
|
2
|
+
|
|
3
|
+
body {
|
|
4
|
+
font-family: "Nunito Sans",-apple-system,".SFNSText-Regular","San Francisco",BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Helvetica,Arial,sans-serif;
|
|
5
|
+
font-size: 16px;
|
|
6
|
+
margin: 0;
|
|
7
|
+
-webkit-font-smoothing: antialiased;
|
|
8
|
+
-moz-osx-font-smoothing: grayscale;
|
|
9
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
10
|
+
-webkit-overflow-scrolling: touch;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
h1,
|
|
14
|
+
h2,
|
|
15
|
+
h3,
|
|
16
|
+
h4 {
|
|
17
|
+
color: $primary-black;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
p {
|
|
21
|
+
color: $soft-black;
|
|
22
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
// prefix
|
|
3
|
+
$px: phillips;
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
// Primary color palette
|
|
7
|
+
$pure-black: #000000;
|
|
8
|
+
$primary-black: #323232;
|
|
9
|
+
$pure-white: #ffffff;
|
|
10
|
+
|
|
11
|
+
// Secondary color palette
|
|
12
|
+
$soft-black: #545454;
|
|
13
|
+
$dark-gray: #75715f;
|
|
14
|
+
|
|
15
|
+
// Utilititarian color palette
|
|
16
|
+
$keyline-gray: #949494;
|
|
17
|
+
$medium-gray: #c3bebb;
|
|
18
|
+
$light-gray: #eceae7;
|
|
19
|
+
$off-white: #f4f2f1;
|
|
20
|
+
|
|
21
|
+
// Notification color palette
|
|
22
|
+
$error-red: #ff0000;
|
|
23
|
+
$post-sale-magenta: #ff0085;
|
|
24
|
+
$clock-widget-blue: #4a90e2;
|
|
25
|
+
$clock-widget-green: #6a9c53;
|
|
26
|
+
$clock-widget-maroon: #6b0000;
|
|
27
|
+
$clock-widget-red: #b00000;
|
|
28
|
+
|
|
29
|
+
// Articker color palette
|
|
30
|
+
$articker-red: #fc1e2b;
|
|
31
|
+
$articker-orange: #ff8201;
|
|
32
|
+
$articker-red-orange-gradient: linear-gradient(90deg, #fc1e2b, #ff8201);
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
$text-color: $pure-black;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const px = 'phillips';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
|
|
9
|
+
/* Bundler mode */
|
|
10
|
+
"moduleResolution": "Node",
|
|
11
|
+
"allowImportingTsExtensions": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
"jsx": "react-jsx",
|
|
16
|
+
"allowSyntheticDefaultImports": true,
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
/* Linting */
|
|
20
|
+
"strict": true,
|
|
21
|
+
"noUnusedLocals": true,
|
|
22
|
+
"noUnusedParameters": true,
|
|
23
|
+
"noFallthroughCasesInSwitch": true
|
|
24
|
+
},
|
|
25
|
+
"include": ["src", "custom.d.ts"],
|
|
26
|
+
"references": [{ "path": "./tsconfig.node.json" }]
|
|
27
|
+
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
import dts from 'vite-plugin-dts'
|
|
3
|
+
import react from '@vitejs/plugin-react'
|
|
4
|
+
import copy from 'rollup-plugin-copy';
|
|
5
|
+
import peerDepsExternal from "rollup-plugin-peer-deps-external";
|
|
6
|
+
import * as packageJson from './package.json'
|
|
7
|
+
|
|
8
|
+
const plugins = [
|
|
9
|
+
react(),
|
|
10
|
+
dts(),
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
// https://vitejs.dev/config/
|
|
14
|
+
export default defineConfig({
|
|
15
|
+
plugins: plugins,
|
|
16
|
+
build: {
|
|
17
|
+
minify: true,
|
|
18
|
+
reportCompressedSize: true,
|
|
19
|
+
lib: {
|
|
20
|
+
// Could also be a dictionary or array of multiple entry points
|
|
21
|
+
entry: ['src/index.ts'],
|
|
22
|
+
name: 'seldon',
|
|
23
|
+
formats: ['es'],
|
|
24
|
+
},
|
|
25
|
+
outDir: 'dist',
|
|
26
|
+
rollupOptions: {
|
|
27
|
+
input: 'src/index.ts',
|
|
28
|
+
output: [
|
|
29
|
+
{
|
|
30
|
+
dir: 'dist',
|
|
31
|
+
preserveModulesRoot: 'src',
|
|
32
|
+
chunkFileNames: '[name].js',
|
|
33
|
+
entryFileNames: '[name].js'
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
preserveModules: true,
|
|
37
|
+
// make sure to externalize deps that shouldn't be bundled
|
|
38
|
+
// into your library
|
|
39
|
+
external: [...Object.keys(packageJson.peerDependencies)],
|
|
40
|
+
plugins: [
|
|
41
|
+
copy({
|
|
42
|
+
flatten: false,
|
|
43
|
+
targets: [
|
|
44
|
+
// Sass entrypoint
|
|
45
|
+
{ src: 'src/styles.scss', dest: ['dist/scss', 'public/scss'] },
|
|
46
|
+
|
|
47
|
+
// Sass components
|
|
48
|
+
{
|
|
49
|
+
src: ['src/components/**/*.scss', 'src/pages/**/*.scss'],
|
|
50
|
+
dest: ['dist/scss', 'public/scss'],
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
}),
|
|
54
|
+
peerDepsExternal()
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
})
|