Skip to content

Commit

Permalink
v0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
CarcajadaArtificial committed Oct 2, 2023
1 parent 92bd91a commit aa1074a
Show file tree
Hide file tree
Showing 30 changed files with 39 additions and 47 deletions.
18 changes: 2 additions & 16 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
# Changelog

## v0.3
## v0.3.1

- Added the `<Menu/>` component.
- Fixed dependency importing

## Changes so far

- Added the `<Fieldset/>` component.
- Added the `<Stylesheet/>` component.
- Added the `<Kbd/>` component.
- Added the `<Time/>` component with ptera formating implemented out of the box.
- Added the `<Dialog/>` component.
- Added the `<Loader/>` component.
- Added the `<Menu/>` component.
- Added Global styles and fonts
- Moved enums, types, utils and handlers out of `mod.ts`.
- Moved the stylesheets to css-in-js.
- Fixed shorthand import paths issue.
- Fixed `SignalLike` type on component setup script.
- Fixed the missing `Partial<>` in subcomponent types.

## Roadmap

### v0.3
Expand Down
2 changes: 1 addition & 1 deletion components/Button/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { applyDefaults, cn, opt, partializeClasses } from '../../src/utils.ts';
import { BUTTON_TYPES } from '../../src/enums.ts';
import { iComponent } from '../../src/types.ts';
import { transition } from '../../src/styles.ts';
import { css } from 'resin';
import { css } from '../../deps.ts';

export type iButton = iComponent<HTMLButtonElement> & {
type: BUTTON_TYPES;
Expand Down
2 changes: 1 addition & 1 deletion components/Card/setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { applyDefaults, cn, opt, partializeClasses } from '../../src/utils.ts';
import { iComponent, iFwd } from '../../src/types.ts';
import { css } from 'resin';
import { css } from '../../deps.ts';

export type iCard = iComponent<HTMLDivElement> & {
imageUrl: string;
Expand Down
2 changes: 1 addition & 1 deletion components/Chip/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import IconX from 'icons/x.tsx';
import { IconX } from '../../deps.ts';
import Text from '../Text/index.tsx';
import setup, { iChip } from './setup.ts';

Expand Down
2 changes: 1 addition & 1 deletion components/Chip/setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { applyDefaults, cn, opt, partializeClasses } from '../../src/utils.ts';
import { iComponent, iFwd } from '../../src/types.ts';
import { css } from 'resin';
import { css } from '../../deps.ts';

export type iChip = iComponent<HTMLLIElement> & {
onRemove?: (ev: Event) => void;
Expand Down
2 changes: 1 addition & 1 deletion components/Chiplist/setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { applyDefaults, cn, opt, partializeClasses } from '../../src/utils.ts';
import { iComponent, iFwd } from '../../src/types.ts';
import { css } from 'resin';
import { css } from '../../deps.ts';

export type iChiplist = iComponent<HTMLUListElement> & {
onRemove?: (ev: Event) => void;
Expand Down
2 changes: 1 addition & 1 deletion components/Code/setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { applyDefaults, cn, opt, partializeClasses } from '../../src/utils.ts';
import { iComponent, iFwd } from '../../src/types.ts';
import { css } from 'resin';
import { css } from '../../deps.ts';

export type iCode = iComponent & {
fwd: Partial<{
Expand Down
2 changes: 1 addition & 1 deletion components/Dialog/setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { applyDefaults, cn, opt, partializeClasses } from '../../src/utils.ts';
import { iComponent } from '../../src/types.ts';
import { css } from 'resin';
import { css } from '../../deps.ts';
import { iPanel } from '../Panel/setup.ts';
import { iLayout } from '../Layout/setup.ts';

Expand Down
2 changes: 1 addition & 1 deletion components/Fieldset/setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { applyDefaults, cn, opt, partializeClasses } from '../../src/utils.ts';
import { iComponent, iFwd } from '../../src/types.ts';
import { css } from 'resin';
import { css } from '../../deps.ts';
import type { iInput } from '../Input/setup.ts';

export type iFieldset = iComponent<HTMLFieldSetElement> & {
Expand Down
2 changes: 1 addition & 1 deletion components/Footer/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { iPanel } from '../Panel/setup.ts';
import { iLayout } from '../Layout/setup.ts';
import { iLink } from '../Link/setup.ts';
import { iGradient } from '../Gradient/setup.ts';
import { css } from 'resin';
import { css } from '../../deps.ts';

export type iFooter = iComponent & {
madeWithFresh: boolean;
Expand Down
2 changes: 1 addition & 1 deletion components/Header/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { GRADIENT_PATTERNS, LAYOUT_TYPES } from '../../src/enums.ts';
import { iLayout } from '../Layout/setup.ts';
import { iPanel } from '../Panel/setup.ts';
import { iGradient } from '../Gradient/setup.ts';
import { css } from 'resin';
import { css } from '../../deps.ts';

export type iHeader = iComponent & {
layout_type: LAYOUT_TYPES | null;
Expand Down
2 changes: 1 addition & 1 deletion components/Kbd/setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { cn, opt, partializeClasses } from '../../src/utils.ts';
import { iComponent } from '../../src/types.ts';
import { css } from 'resin';
import { css } from '../../deps.ts';

export type iKbd = iComponent;

Expand Down
2 changes: 1 addition & 1 deletion components/Layout/setup.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { applyDefaults, cn, opt, partializeClasses } from '../../src/utils.ts';
import { iComponent, iFwd } from '../../src/types.ts';
import { LAYOUT_TYPES } from '../../src/enums.ts';
import { css } from 'resin';
import { css } from '../../deps.ts';

export type iLayout = iComponent<HTMLDivElement> & {
type: LAYOUT_TYPES;
Expand Down
2 changes: 1 addition & 1 deletion components/Link/setup.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { cn, opt, partializeClasses } from '../../src/utils.ts';
import { iComponent } from '../../src/types.ts';
import { transition } from '../../src/styles.ts';
import { css } from 'resin';
import { css } from '../../deps.ts';

export type iLink = iComponent<HTMLAnchorElement>;

Expand Down
2 changes: 1 addition & 1 deletion components/Linkmap/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { applyDefaults, cn, opt, partializeClasses } from '../../src/utils.ts';
import { iComponent, iFwd } from '../../src/types.ts';
import { iLink } from '../Link/setup.ts';
import { iText } from '../Text/setup.ts';
import { css } from 'resin';
import { css } from '../../deps.ts';

export type iLinkmapitem = {
name: string;
Expand Down
2 changes: 1 addition & 1 deletion components/Loader/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import setup, { iLoader } from './setup.ts';
import Panel from '../Panel/index.tsx';
import Text from '../Text/index.tsx';
import IconLoader2 from 'icons/loader-2.tsx';
import { IconLoader2 } from '../../deps.ts';

export default function (props: Partial<iLoader>) {
const { c, nostyle, nostyleAll, fref, fwd, children, ...p } = setup(props);
Expand Down
2 changes: 1 addition & 1 deletion components/Loader/setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { applyDefaults, cn, opt, partializeClasses } from '../../src/utils.ts';
import { iComponent, iFwd } from '../../src/types.ts';
import { css } from 'resin';
import { css } from '../../deps.ts';
import { iText } from '../Text/setup.ts';
import { animation } from '../../src/styles.ts';

Expand Down
2 changes: 1 addition & 1 deletion components/Main/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { applyDefaults, cn, opt, partializeClasses } from '../../src/utils.ts';
import { iComponent } from '../../src/types.ts';
import { LAYOUT_TYPES } from '../../src/enums.ts';
import { iLayout } from '../Layout/setup.ts';
import { css } from 'resin';
import { css } from '../../deps.ts';

export type iMain = iComponent & {
layout_type: LAYOUT_TYPES | null;
Expand Down
2 changes: 1 addition & 1 deletion components/Markdown/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { applyDefaults, cn, opt, partializeClasses } from '../../src/utils.ts';
import { iComponent } from '../../src/types.ts';
import { RenderOptions } from '../../src/markdown.ts';
import { render } from '../../src/markdown.ts';
import { css } from 'resin';
import { css } from '../../deps.ts';

export type iMarkdown = iComponent<HTMLDivElement> & {
markdown_content: string;
Expand Down
2 changes: 1 addition & 1 deletion components/Menu/setup.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { applyDefaults, cn, opt, partializeClasses } from '../../src/utils.ts';
import { iComponent, iFwd } from '../../src/types.ts';
import { MENU_POSITIONS } from '../../src/enums.ts';
import { css } from 'resin';
import { css } from '../../deps.ts';
import { iButton } from '../Button/setup.ts';

export type iMenu = iComponent<HTMLDivElement> & {
Expand Down
2 changes: 1 addition & 1 deletion components/Panel/setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { cn, opt, partializeClasses } from '../../src/utils.ts';
import { iComponent } from '../../src/types.ts';
import { css } from 'resin';
import { css } from '../../deps.ts';

export type iPanel = iComponent<HTMLDivElement>;

Expand Down
2 changes: 1 addition & 1 deletion components/Separator/setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { cn, opt, partializeClasses } from '../../src/utils.ts';
import { iComponent } from '../../src/types.ts';
import { css } from 'resin';
import { css } from '../../deps.ts';

export type iSeparator = iComponent<HTMLHRElement>;

Expand Down
2 changes: 1 addition & 1 deletion components/Stylesheet/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { css, ResinCssEmitter, ResinCssGlobalStyle } from 'resin';
import { css, ResinCssEmitter, ResinCssGlobalStyle } from '../../deps.ts';
import { globalStyles, themeStyles } from '../../src/styles.ts';

export default function () {
Expand Down
2 changes: 1 addition & 1 deletion components/Text/setup.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { applyDefaults, cn, opt, partializeClasses } from '../../src/utils.ts';
import { TEXT_TYPES } from '../../src/enums.ts';
import { iComponent } from '../../src/types.ts';
import { css } from 'resin';
import { css } from '../../deps.ts';

export type iText = iComponent<HTMLSpanElement> & {
type: TEXT_TYPES;
Expand Down
3 changes: 1 addition & 2 deletions components/Time/setup.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { applyDefaults, cn, opt, partializeClasses } from '../../src/utils.ts';
import { iComponent, iFwd } from '../../src/types.ts';
import { css } from 'resin';
import { DateTime, datetime } from 'ptera';
import { css, DateTime, datetime } from '../../deps.ts';

export type iTime = iComponent<HTMLTimeElement> & {
dateObject: DateTime;
Expand Down
9 changes: 9 additions & 0 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export {
css,
ResinCssEmitter,
ResinCssGlobalStyle,
} from 'https://deno.land/x/[email protected]/mod.ts';
export { default as IconLoader2 } from 'https://deno.land/x/[email protected]/tsx/loader-2.tsx';
export { default as IconX } from 'https://deno.land/x/[email protected]/tsx/x.tsx';
export { DateTime, datetime } from 'https://deno.land/x/[email protected]/mod.ts';
export * as classNames from 'https://deno.land/x/[email protected]/index.ts';
2 changes: 0 additions & 2 deletions routes/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { AppProps } from '$fresh/server.ts';
import { Head } from '$fresh/runtime.ts';
import { css, ResinCssEmitter, ResinCssGlobalStyle } from 'resin';
import { globalStyles, themeStyles } from '../src/styles.ts';
import { Stylesheet } from '../mod.ts';

export default function App({ Component }: AppProps) {
Expand Down
4 changes: 2 additions & 2 deletions routes/test/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
Separator,
Text,
} from '../../mod.ts';
import IconEdit from 'icons/edit.tsx';
import { IconX } from '../../deps.ts';

export default function TestButton() {
return (
Expand Down Expand Up @@ -49,7 +49,7 @@ export default function TestButton() {
Continue and run <Code>npm init</Code>
</Button>
<Button>
Edit <IconEdit />
Edit <IconX />
</Button>
<Button>
<Text noMargins type='small'>small</Text>
Expand Down
2 changes: 1 addition & 1 deletion src/styles.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { css } from 'resin';
import { css } from '../deps.ts';

export const transition = {
interaction: {
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @module
*/

import * as classNames from 'https://deno.land/x/[email protected]/index.ts';
import { classNames } from '../deps.ts';
import { EmptyObject } from './types.ts';
import { JSX } from 'preact';

Expand Down

0 comments on commit aa1074a

Please sign in to comment.