Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
7deb4a3
Move legacy Vue code
stormwarning Mar 18, 2023
ab1c855
Add initial Remix migration
stormwarning Mar 18, 2023
97b8847
Ignore built styles
stormwarning Mar 19, 2023
4ba6f8d
Update formatting
stormwarning Mar 19, 2023
bf0dc82
Use angle in CSS string
stormwarning Mar 19, 2023
0af517d
Add head meta
stormwarning Mar 20, 2023
afcf3d1
Fix import sorting
stormwarning Mar 20, 2023
e6415d2
Update option layout
stormwarning Mar 20, 2023
d656df6
Use colorjs for interpolation
stormwarning Mar 24, 2023
98b7344
Clean up configs
stormwarning Mar 24, 2023
f82255e
Add custom Select component
stormwarning Mar 24, 2023
2c33b98
Update Option padding
stormwarning Mar 24, 2023
81af58b
Add custom Slider
stormwarning Mar 24, 2023
0e3f20b
Update footer link weight
stormwarning Mar 24, 2023
1de4e28
Add change stop action
stormwarning Mar 28, 2023
d12a2e6
Add option for slider track background
stormwarning Mar 28, 2023
fc59ec2
Fix select focus outline
stormwarning Mar 28, 2023
b98ee64
Add WIP color picker fields
stormwarning Mar 28, 2023
218d440
Update link to Bugsnag blog post
stormwarning Apr 13, 2023
b424242
Consolidate gradient-options
stormwarning May 14, 2023
c7aacfb
Migrate to built-in Vanilla Extract support
stormwarning May 14, 2023
1c3440f
Add Capsize-style leading trim styles
stormwarning Jun 18, 2023
5314772
Use Text component in other components
stormwarning Jun 18, 2023
f73167b
Fix font preload URL
stormwarning Jun 18, 2023
d1d2bf2
Add Copy and Link icons
stormwarning Jun 18, 2023
290a057
Add Divider and End Colour option
stormwarning Jun 19, 2023
cd68517
Adjust spacing throughout
stormwarning Jun 19, 2023
4c6bdc9
Add icon images
stormwarning Jun 19, 2023
decdbca
Display slider value
stormwarning Jun 19, 2023
a10fa2d
Use HD colour mode output
stormwarning Jun 20, 2023
e040c82
Add inset shadow to colour swatch
stormwarning Jun 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ root = true
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true

Expand All @@ -14,3 +14,4 @@ trim_trailing_whitespace = false

[*.{json,yml}]
indent_size = 2
indent_style = space
70 changes: 70 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/** @type {import('eslint').Linter.Config} */
const config = {
extends: [
'@zazen',
'@remix-run/eslint-config',
'@remix-run/eslint-config/node',
'prettier',
],
rules: {
'capitalized-comments': 'off',

'@typescript-eslint/no-unused-vars': 'off',

'import/extensions': 'off',
'import/no-extraneous-dependencies': 'off',
'import/order': [
'error',
{
alphabetize: {
caseInsensitive: true,
order: 'asc',
},
groups: [
'builtin',
'external',
'internal',
'parent',
['sibling', 'index'],
],
'newlines-between': 'always',
pathGroups: [
{
pattern: '{@remix-run/**,react?(-dom|-router-dom)}',
group: 'builtin',
position: 'after',
},
{
pattern: '~/**',
group: 'internal',
position: 'after',
},
{
pattern: '*.+(css)',
group: 'index',
position: 'after',
patternOptions: {
matchBase: true,
},
},
],
pathGroupsExcludedImportTypes: ['builtin'],
},
],

'unicorn/prevent-abbreviations': [
'error',
{
replacements: {
env: false,
props: false,
ref: false,
vars: false,
},
},
],
'unicorn/switch-case-braces': ['error', 'avoid'],
},
}

module.exports = config
7 changes: 0 additions & 7 deletions .eslintrc.js

This file was deleted.

26 changes: 14 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# dependencies
## DEPENDENCIES ######################################################
node_modules

# logs
npm-debug.log
## LOGS ##############################################################
*.log

# Nuxt build
.nuxt
## GENERATED #########################################################
.cache
.ouput
/build/
/public/build
/api/index.js
/api/index.js.map

# Nuxt generate
dist

# Service worker
sw.*

.vercel
## SECRETS ###########################################################
.env
.env.*
.vercel
16 changes: 8 additions & 8 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module.exports = {
extends: ['@zazen/stylelint-config'],
rules: {
'at-rule-no-unknown': [
true,
{ ignoreAtRules: ['include', 'mixin', 'screen', 'apply'] },
],
'value-list-comma-newline-after': null,
},
extends: ['@zazen/stylelint-config'],
rules: {
'at-rule-no-unknown': [
true,
{ ignoreAtRules: ['include', 'mixin', 'screen', 'apply'] },
],
'value-list-comma-newline-after': null,
},
}
62 changes: 62 additions & 0 deletions app/components/box/box.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/**
* This file is used to convert our custom `sprinkles` function
* into a primitive `Box` component so that we don't need to
* manually manage the `className` prop when using our own
* utility classes, e.g. `<Box padding="small">` rather than
* `<Box className={sprinkles({ padding: 'small' })}>`.
*/
import {
createElement,
forwardRef,
type AllHTMLAttributes,
type ElementType,
} from 'react'

import clsx, { type ClassValue } from 'clsx'

import { sprinkles, type Sprinkles } from '~/styles/sprinkles.css'

interface ExtendedBoxProps extends Sprinkles {
as?: ElementType
className?: ClassValue
}

export type BoxProps = Omit<
AllHTMLAttributes<HTMLElement>,
keyof ExtendedBoxProps
> &
ExtendedBoxProps

export const Box = forwardRef<HTMLElement, BoxProps>(
({ as = 'div', className, ...props }, reference) => {
let atomProps: Record<string, unknown> = {}
let nativeProps: Record<string, unknown> = {}

for (let key in props) {
// Sprinkles allows us to detect whether a given property
// is available as part of our suite of utility classes,
// e.g. `sprinkles.properties.has('padding')` is true
// while `sprinkles.properties.has('onClick')` is false.
// We use this to determine whether to pass the property
// to Sprinkles or to the native HTML element.
if (sprinkles.properties.has(key as keyof Sprinkles)) {
atomProps[key] = props[key as keyof typeof props]
} else {
nativeProps[key] = props[key as keyof typeof props]
}
}

let atomicClasses = sprinkles(atomProps)
let customClasses = clsx(className)

return createElement(as, {
className: `${atomicClasses}${
customClasses ? ` ${customClasses}` : ''
}`,
...nativeProps,
reference,
})
}
)

Box.displayName = 'Box'
19 changes: 19 additions & 0 deletions app/components/button/button.css.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { style } from '@vanilla-extract/css'

import { vars } from '~/styles/theme.css'

export const button = style({
fontFamily: 'inherit',
color: vars.color['grey-900'],
textTransform: 'uppercase',
background: vars.color['grey-100'],
border: 0,
borderRadius: vars.radius.sm,
cursor: 'pointer',
boxShadow:
'0 2px 10px rgba(0, 0, 0, 0.12), 0 20px 50px 0 rgba(0, 0, 0, 0.14)',

':hover': {
background: vars.color.white,
},
})
30 changes: 30 additions & 0 deletions app/components/button/button.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import type { ReactNode, ComponentPropsWithoutRef, ReactElement } from 'react'

import { Box } from '../box/box'

import * as styles from './button.css'
import { Text } from '../text/text'

interface Props extends Omit<ComponentPropsWithoutRef<'button'>, 'color'> {
children: ReactNode
icon?: ReactElement
}

export function Button({ children, icon, ...props }: Props) {
return (
<Box
as="button"
className={styles.button}
display="flex"
alignItems="center"
gap={[4, 4, 8]}
padding={[8, 8, 16]}
{...props}
>
{icon}
<Text size="xs" weight="medium" leading="none" tracking="widest">
{children}
</Text>
</Box>
)
}
13 changes: 13 additions & 0 deletions app/components/color-picker/color-picker.css.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { style } from '@vanilla-extract/css'

import { vars } from '~/styles/theme.css'

export const root = style({})

export const label = style({
color: vars.color['grey-600'],
})

export const value = style({
fontVariantNumeric: 'tabular-nums',
})
Loading