-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import of all inflight work in 'dev' branch.
- Loading branch information
Showing
52 changed files
with
2,845 additions
and
1,555 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,10 +21,6 @@ | |
"error", | ||
2 | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"quotes": [ | ||
"error", | ||
"single" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
apps/atomic-ui-js-site/src/app/custom-elements/x-input/alignment/page.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.fieldset { | ||
gap: 1rem; | ||
} |
36 changes: 36 additions & 0 deletions
36
apps/atomic-ui-js-site/src/app/custom-elements/x-input/alignment/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import {inputTypes} from '@/data/controls-metadata'; | ||
|
||
let _uuid = 0; | ||
|
||
export default function XInputAlignmentPage() { | ||
return <section> | ||
<header> | ||
<h2>Input Controls Alignment</h2> | ||
</header> | ||
<article> | ||
<form action="#"> | ||
<fieldset className={'x-flex x-flex-row-wrap gap-16px'}> | ||
<legend>Horizontal alignment</legend> | ||
|
||
{inputTypes.map((inputType) => { | ||
const id = `example-${_uuid++}-${inputType}`; | ||
const isButton = /reset|submit|button$/i.test(inputType); | ||
|
||
if (inputType === 'hidden') return; | ||
|
||
return <> | ||
{!isButton ? <label htmlFor={id}>{inputType}:</label> : null} | ||
<input | ||
type={inputType} | ||
className={`${inputType === 'button' ? 'x-btn x-primary x-filled' : ''}`} | ||
defaultValue={isButton ? inputType[0].toUpperCase() + inputType.slice(1) : ''} | ||
name={`example-${_uuid}-${inputType}`} | ||
id={id} | ||
/> | ||
</>; | ||
})} | ||
</fieldset> | ||
</form> | ||
</article> | ||
</section>; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
apps/atomic-ui-js-site/src/app/other/size-reference/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import {factorsOf, multiplesOf, commonFactorsOf, fib} from 'atomic-ui-js/utils/number.js'; | ||
|
||
export default function Page() { | ||
const factorsOf144 = factorsOf(144), | ||
multiplesOf4 = multiplesOf(4, Math.round(144 / 4)), | ||
multiplesOf6 = multiplesOf(6, Math.round(144 / 6)), | ||
multiplesOf8 = multiplesOf(8, Math.round(144 / 8)), | ||
fib144 = fib(144), | ||
commonNumbers = (() => { | ||
const counts = [] | ||
.concat(factorsOf144, multiplesOf4, multiplesOf6, multiplesOf8, fib144) | ||
.reduce((acc, curr) => { | ||
if (acc[curr]) acc[curr] += 1; | ||
else acc[curr] = 1; | ||
return acc; | ||
}, {} as Record<number, number>) | ||
; | ||
return Object.keys(counts).reduce((acc, curr) => { | ||
if (counts[curr] > 1) acc.push(parseInt(curr, 10)); | ||
return acc; | ||
}, [] as number[]) | ||
.sort((a, b) => a - b); | ||
})(), | ||
commonNumberFactors = commonFactorsOf(...new Set(commonNumbers)); | ||
|
||
return ( | ||
<section> | ||
<header> | ||
<h3> | ||
Size values in library | ||
</h3> | ||
</header> | ||
<article> | ||
<p>Note: The values here are all tentative (except the “common” set, below).</p> | ||
<dl> | ||
<dt>Factors of 144</dt> | ||
<dd>{factorsOf144.join(', ')}</dd> | ||
{([ | ||
[4, multiplesOf4], | ||
[6, multiplesOf6], | ||
[8, multiplesOf8] | ||
] as [number, number[]][] | ||
).flatMap(([x, set], i) => <> | ||
<dt key={`dt-${x}-${i}`}>Multiples of {x} (up to 144)</dt> | ||
<dd key={`dt-${x}-${i}-2`}> | ||
{set.join(', ')} | ||
</dd> | ||
</>) | ||
} | ||
<dt>Fibonacci (up to 144)</dt> | ||
<dd>{fib144.join(', ')}</dd> | ||
<dt>Common (from above)</dt> | ||
<dd> | ||
<span>{commonNumbers.join(', ')}</span> | ||
<p>Strive to use this set aside from other numbers as the values here | ||
will pair up well with each other due to them having the common factors {commonNumberFactors.join(', ')}.</p> | ||
</dd> | ||
</dl> | ||
</article> | ||
</section> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
export const | ||
|
||
/** | ||
* All HTMLInputElement type names. | ||
* | ||
* @type {string[]} | ||
*/ | ||
inputTypes = [ | ||
'button', | ||
'checkbox', | ||
'color', | ||
'date', | ||
'datetime-local', | ||
'email', | ||
'file', | ||
'hidden', | ||
'image', | ||
'month', | ||
'number', | ||
'password', | ||
'radio', | ||
'range', | ||
'reset', | ||
'search', | ||
'submit', | ||
'tel', | ||
'text', | ||
'time', | ||
'url', | ||
'week' | ||
]; |
Oops, something went wrong.