Bladeren bron

Update font for inputs

Use the font on the current page for input elements.
master
TheoryOfNekomata 11 maanden geleden
bovenliggende
commit
cfe7a13cc4
24 gewijzigde bestanden met toevoegingen van 63 en 38 verwijderingen
  1. +1
    -1
      categories/choice/react/src/components/ComboBox/index.tsx
  2. +1
    -1
      categories/choice/react/src/components/DropdownSelect/index.tsx
  3. +1
    -1
      categories/choice/react/src/components/MenuSelect/index.tsx
  4. +1
    -1
      categories/choice/react/src/components/RadioTickBox/index.tsx
  5. +1
    -1
      categories/formatted/react/src/components/EmailInput/index.tsx
  6. +9
    -9
      categories/formatted/react/src/components/PhoneNumberInput/index.tsx
  7. +1
    -1
      categories/formatted/react/src/components/UrlInput/index.tsx
  8. +1
    -1
      categories/freeform/react/src/components/MaskedTextInput/index.tsx
  9. +1
    -1
      categories/freeform/react/src/components/MultilineTextInput/index.tsx
  10. +1
    -1
      categories/freeform/react/src/components/TextInput/index.tsx
  11. +1
    -1
      categories/multichoice/react/src/components/MenuMultiSelect/index.tsx
  12. +3
    -3
      categories/multichoice/react/src/components/TagInput/index.tsx
  13. +1
    -1
      categories/multichoice/react/src/components/ToggleSwitch/index.tsx
  14. +1
    -1
      categories/multichoice/react/src/components/ToggleTickBox/index.tsx
  15. +2
    -2
      categories/navigation/react/src/components/LinkButton/index.tsx
  16. +1
    -1
      categories/number/react/package.json
  17. +1
    -1
      categories/number/react/src/components/Spinner/index.tsx
  18. +1
    -1
      categories/temporal/react/src/components/DateDropdown/index.tsx
  19. +1
    -1
      packages/react-refractor/package.json
  20. +7
    -1
      packages/react-refractor/scripts/build.ts
  21. +0
    -5
      showcases/web-kitchensink-reactnext/react-refractor.d.ts
  22. +25
    -0
      showcases/web-kitchensink-reactnext/src/styles/globals.css
  23. +1
    -0
      showcases/web-kitchensink-reactnext/tailwind.config.js
  24. +0
    -2
      showcases/web-kitchensink-reactnext/tsconfig.json

+ 1
- 1
categories/choice/react/src/components/ComboBox/index.tsx Bestand weergeven

@@ -117,7 +117,7 @@ export const ComboBox = React.forwardRef<ComboBoxDerivedElement, ComboBoxProps>(
list={datalistId}
data-testid="input"
className={clsx(
'bg-negative rounded-inherit w-full peer block',
'bg-negative rounded-inherit w-full peer block font-inherit',
'focus:outline-0',
'disabled:opacity-50 disabled:cursor-not-allowed',
{


+ 1
- 1
categories/choice/react/src/components/DropdownSelect/index.tsx Bestand weergeven

@@ -88,7 +88,7 @@ export const DropdownSelect = React.forwardRef<DropdownSelectDerivedElement, Dro
aria-labelledby={labelId}
data-testid="input"
className={clsx(
'tesseract-design-dropdown-select bg-negative rounded-inherit w-full peer block appearance-none cursor-pointer select-none',
'tesseract-design-dropdown-select bg-negative rounded-inherit w-full peer block appearance-none cursor-pointer select-none font-inherit',
'focus:outline-0',
'disabled:opacity-50 disabled:cursor-not-allowed',
{


+ 1
- 1
categories/choice/react/src/components/MenuSelect/index.tsx Bestand weergeven

@@ -96,7 +96,7 @@ export const MenuSelect = React.forwardRef<MenuSelectDerivedElement, MenuSelectP
height: startingHeight,
}}
className={clsx(
'tesseract-design-menu-select bg-negative rounded-inherit w-full peer block overflow-auto cursor-pointer',
'tesseract-design-menu-select bg-negative rounded-inherit w-full peer block overflow-auto cursor-pointer font-inherit',
'focus:outline-0',
'disabled:opacity-50 disabled:cursor-not-allowed',
{


+ 1
- 1
categories/choice/react/src/components/RadioTickBox/index.tsx Bestand weergeven

@@ -91,7 +91,7 @@ export const RadioTickBox = React.forwardRef<RadioTickBoxDerivedElement, RadioTi
</label>
{subtext && (
<div
className="block w-full font-semi-expanded text-xs pl-10 order-3"
className="block w-full text-xs pl-10 order-3"
data-testid="subtext"
>
{subtext}


+ 1
- 1
categories/formatted/react/src/components/EmailInput/index.tsx Bestand weergeven

@@ -85,7 +85,7 @@ export const EmailInput = React.forwardRef<EmailInputDerivedElement, EmailInputP
type="email"
data-testid="input"
className={clsx(
'bg-negative rounded-inherit w-full peer block',
'bg-negative rounded-inherit w-full peer block font-inherit',
'focus:outline-0',
'disabled:opacity-50 disabled:cursor-not-allowed',
{


+ 9
- 9
categories/formatted/react/src/components/PhoneNumberInput/index.tsx Bestand weergeven

@@ -1,7 +1,7 @@
import * as React from 'react';
import { TextControl } from '@tesseract-design/web-base';
import { delegateTriggerEvent, useClientSide } from '@modal-sh/react-utils';
import PhoneInput, {Country, Value} from 'react-phone-number-input/input';
import PhoneInput, { Country, Value } from 'react-phone-number-input/input';
import clsx from 'clsx';

export type PhoneNumberInputDerivedElement = HTMLInputElement;
@@ -96,7 +96,7 @@ export const PhoneNumberInput = React.forwardRef<
};

const commonInputStyles = clsx(
'bg-negative rounded-inherit w-full peer block',
'bg-negative rounded-inherit w-full peer block font-inherit',
'focus:outline-0',
'disabled:opacity-50 disabled:cursor-not-allowed',
{
@@ -253,11 +253,11 @@ PhoneNumberInput.defaultProps = {
label: undefined,
hint: undefined,
indicator: undefined,
size: 'medium',
border: false,
block: false,
variant: 'default',
hiddenLabel: false,
enhanced: false,
defaultCountry: 'PH',
size: 'medium' as const,
border: false as const,
block: false as const,
variant: 'default' as const,
hiddenLabel: false as const,
enhanced: false as const,
defaultCountry: 'PH' as const,
};

+ 1
- 1
categories/formatted/react/src/components/UrlInput/index.tsx Bestand weergeven

@@ -84,7 +84,7 @@ export const UrlInput = React.forwardRef<UrlInputDerivedElement, UrlInputProps>(
type="url"
data-testid="input"
className={clsx(
'bg-negative rounded-inherit w-full peer block',
'bg-negative rounded-inherit w-full peer block font-inherit',
'focus:outline-0',
'disabled:opacity-50 disabled:cursor-not-allowed',
{


+ 1
- 1
categories/freeform/react/src/components/MaskedTextInput/index.tsx Bestand weergeven

@@ -87,7 +87,7 @@ export const MaskedTextInput = React.forwardRef<
type="password"
data-testid="input"
className={clsx(
'bg-negative rounded-inherit w-full peer block',
'bg-negative rounded-inherit w-full peer block font-inherit',
'focus:outline-0',
'disabled:opacity-50 disabled:cursor-not-allowed',
{


+ 1
- 1
categories/freeform/react/src/components/MultilineTextInput/index.tsx Bestand weergeven

@@ -91,7 +91,7 @@ export const MultilineTextInput = React.forwardRef<
height: 0,
}}
className={clsx(
'bg-negative rounded-inherit w-full peer block',
'bg-negative rounded-inherit w-full peer block font-inherit',
'focus:outline-0',
'disabled:opacity-50 disabled:cursor-not-allowed',
{


+ 1
- 1
categories/freeform/react/src/components/TextInput/index.tsx Bestand weergeven

@@ -104,7 +104,7 @@ export const TextInput = React.forwardRef<TextInputDerivedElement, TextInputProp
inputMode={resultInputMode}
data-testid="input"
className={clsx(
'bg-negative rounded-inherit w-full peer block',
'bg-negative rounded-inherit w-full peer block font-inherit',
'focus:outline-0',
'disabled:opacity-50 disabled:cursor-not-allowed',
{


+ 1
- 1
categories/multichoice/react/src/components/MenuMultiSelect/index.tsx Bestand weergeven

@@ -96,7 +96,7 @@ export const MenuMultiSelect = React.forwardRef<
height: startingHeight,
}}
className={clsx(
'bg-negative rounded-inherit w-full peer block overflow-auto',
'bg-negative rounded-inherit w-full peer block overflow-auto font-inherit',
'focus:outline-0',
'disabled:opacity-50 disabled:cursor-not-allowed',
{


+ 3
- 3
categories/multichoice/react/src/components/TagInput/index.tsx Bestand weergeven

@@ -239,7 +239,7 @@ export const TagInput = React.forwardRef<TagInputDerivedElement, TagInputProps>(
}}
tabIndex={clientSide ? -1 : undefined}
className={clsx(
'bg-negative rounded-inherit peer block',
'bg-negative rounded-inherit peer block font-inherit',
'focus:outline-0',
'disabled:opacity-50 disabled:cursor-not-allowed',
{
@@ -287,8 +287,8 @@ export const TagInput = React.forwardRef<TagInputDerivedElement, TagInputProps>(
<TagsInput
value={tags}
classNames={{
input: 'peer bg-transparent',
tag: 'text-xs p-2 select-none',
input: 'peer bg-transparent font-inherit',
tag: 'text-xs p-2 select-none font-inherit',
}}
isEditOnRemove={editOnRemove}
placeHolder={placeholder}


+ 1
- 1
categories/multichoice/react/src/components/ToggleSwitch/index.tsx Bestand weergeven

@@ -103,7 +103,7 @@ export const ToggleSwitch = React.forwardRef<ToggleSwitchDerivedElement, ToggleS
{subtext && (
<div
className={clsx(
'block w-full font-semi-expanded text-xs order-4',
'block w-full text-xs order-4',
!uncheckedLabel && 'pl-16',
uncheckedLabel && 'pt-2',
)}


+ 1
- 1
categories/multichoice/react/src/components/ToggleTickBox/index.tsx Bestand weergeven

@@ -107,7 +107,7 @@ export const ToggleTickBox = React.forwardRef<ToggleTickBoxDerivedElement, Toggl
</label>
{subtext && (
<div
className="block w-full font-semi-expanded text-xs pl-10 order-3"
className="block w-full text-xs pl-10 order-3"
data-testid="subtext"
>
{subtext}


+ 2
- 2
categories/navigation/react/src/components/LinkButton/index.tsx Bestand weergeven

@@ -35,7 +35,7 @@ export const LinkButton = React.forwardRef<LinkButtonDerivedElement, LinkButtonP
{...etcProps}
ref={forwardedRef}
className={clsx(
'items-center justify-center rounded overflow-hidden ring-secondary/50 leading-none select-none',
'items-center justify-center rounded overflow-hidden ring-secondary/50 leading-none select-none no-underline',
'focus:outline-0 focus:ring-4',
'active:ring-tertiary/50',
{
@@ -51,7 +51,7 @@ export const LinkButton = React.forwardRef<LinkButtonDerivedElement, LinkButtonP
{
'border-2 border-primary focus:border-secondary active:border-tertiary': variant !== 'bare',
'bg-negative text-primary focus:text-secondary active:text-tertiary': variant !== 'filled',
'bg-primary text-negative focus:bg-secondary active:bg-tertiary': variant === 'filled',
'bg-primary text-negative focus:bg-secondary active:bg-tertiary focus:text-negative active:text-negative': variant === 'filled',
},
{
'h-10': size === 'small',


+ 1
- 1
categories/number/react/package.json Bestand weergeven

@@ -81,4 +81,4 @@
"typesVersions": {
"*": {}
}
}
}

+ 1
- 1
categories/number/react/src/components/Spinner/index.tsx Bestand weergeven

@@ -82,7 +82,7 @@ export const Spinner = React.forwardRef<SpinnerDerivedElement, SpinnerProps>((
type="number"
data-testid="input"
className={clsx(
'bg-negative rounded-inherit w-full peer block tabular-nums',
'bg-negative rounded-inherit w-full peer block tabular-nums font-inherit',
'focus:outline-0',
'disabled:opacity-50 disabled:cursor-not-allowed',
'tesseract-design-spinner',


+ 1
- 1
categories/temporal/react/src/components/DateDropdown/index.tsx Bestand weergeven

@@ -101,7 +101,7 @@ export const DateDropdown = React.forwardRef<
onFocus={handleFocus}
onClick={handleClick}
className={clsx(
'bg-negative rounded-inherit w-full peer block',
'bg-negative rounded-inherit w-full peer block font-inherit',
'focus:outline-0',
'disabled:opacity-50 disabled:cursor-not-allowed',
{


+ 1
- 1
packages/react-refractor/package.json Bestand weergeven

@@ -82,4 +82,4 @@
"typesVersions": {
"*": {}
}
}
}

+ 7
- 1
packages/react-refractor/scripts/build.ts Bestand weergeven

@@ -1,4 +1,4 @@
import { copyFileSync } from 'fs';
import {copyFileSync, readFileSync, writeFileSync} from 'fs';
import { resolve } from 'path';

const doCopy = (src: string, dest: string) => {
@@ -7,6 +7,12 @@ const doCopy = (src: string, dest: string) => {
console.log('Copying...');
console.log(`${trueSrc} -> ${trueDest}`);
copyFileSync(trueSrc, trueDest);
const packageJsonContents = readFileSync('./package.json', 'utf-8');
const packageJson = JSON.parse(packageJsonContents);
packageJson.exports[dest] = dest;
const newPackageJsonContents = JSON.stringify(packageJson, null, 2);
console.log('Updating package.json...');
writeFileSync('./package.json', newPackageJsonContents);
console.log('Done');
}



+ 0
- 5
showcases/web-kitchensink-reactnext/react-refractor.d.ts Bestand weergeven

@@ -1,5 +0,0 @@
declare module 'react-refractor/all' {
import { Props } from 'react-refractor';

export default function Refractor(props: Props): JSX.Element;
}

+ 25
- 0
showcases/web-kitchensink-reactnext/src/styles/globals.css Bestand weergeven

@@ -38,10 +38,31 @@
font-size: 0.75em;
}

a {
@apply ring-secondary/50 rounded text-primary p-1 -m-1 underline;
}

a.no-underline {
text-decoration: none;
}

a:focus {
@apply ring-4 text-secondary;
outline: 0;
}

a:active {
@apply ring-tertiary/50 text-tertiary;
}

a.focus\:text-negative:focus {
color: rgb(var(--color-negative));
}

a.active\:text-negative:active {
color: rgb(var(--color-negative));
}

/*pre {*/
/* overflow: auto;*/
/* margin: 0 -1rem;*/
@@ -87,6 +108,10 @@
font-stretch: semi-expanded;
}

.font-inherit {
font-stretch: inherit;
}

.linejoin-round {
stroke-linejoin: round;
}


+ 1
- 0
showcases/web-kitchensink-reactnext/tailwind.config.js Bestand weergeven

@@ -13,6 +13,7 @@ module.exports = {
sans: ['var(--font-sans)', ...defaultTheme.fontFamily.sans],
headings: ['var(--font-headings)', ...defaultTheme.fontFamily.sans],
mono: ['var(--font-mono)', ...defaultTheme.fontFamily.mono],
inherit: ['inherit'],
},
colors: {
'shade': 'rgb(var(--color-shade))',


+ 0
- 2
showcases/web-kitchensink-reactnext/tsconfig.json Bestand weergeven

@@ -17,8 +17,6 @@
"paths": {
"@/*": ["./src/*"],
"tailwind.config": ["./tailwind.config.js"],
"@tesseract-design/web-blob-react": ["./src/categories/blob/react"],
"@modal-sh/*": ["./src/packages/*"],
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],


Laden…
Annuleren
Opslaan