Skip to content

Commit

Permalink
removed globals.d.ts as those types aren't exported
Browse files Browse the repository at this point in the history
  • Loading branch information
dfee committed Dec 21, 2018
1 parent 54febdc commit dd6f2da
Show file tree
Hide file tree
Showing 17 changed files with 21 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .storybook/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ configureViewport({
});

function loadStories() {
const req = require.context("../stories", true, /\.story\.tsx$/);
// const req = require.context("../stories", true, /\.story\.tsx$/);
const req = require.context("../stories/base", true, /\.story\.tsx$/);
req.keys().forEach(filename => req(filename));
}

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rbx",
"version": "1.0.0-beta.4",
"version": "1.0.0-beta.5",
"description": "The Comprehensive Bulma UI Framework for React",
"main": "dist/bundle.cjs.js",
"module": "dist/bundle.esm.js",
Expand All @@ -15,6 +15,7 @@
"lint": "tslint --project .",
"storybook:deploy": "storybook-to-ghpages",
"storybook": "start-storybook -p 9001 -c .storybook",
"storybook:build": "build-storybook -c .storybook -o .out/storybook",
"test:cov": "tslint --project . && jest --coverage",
"test": "jest",
"watch": "rollup -cw"
Expand Down
2 changes: 2 additions & 0 deletions src/base/exotic.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from "react";

import { Prefer } from "../types";

export interface ForwardRefAsExoticComponent<
TOwnProps,
TDefaultComponent extends React.ReactType<any>
Expand Down
1 change: 1 addition & 0 deletions src/base/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import classNames from "classnames";
import PropTypes from "prop-types";

import { Omit } from "../types";
import { tuple } from "../utils";

/**
Expand Down
1 change: 1 addition & 0 deletions src/components/breadcrumb/breadcrumb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
HelpersProps,
transformHelpers,
} from "../../base";
import { Prefer } from "../../types";
import { tuple } from "../../utils";
import { BreadcrumbItem } from "./breadcrumb-item";

Expand Down
1 change: 1 addition & 0 deletions src/components/modal/modal-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
HelpersProps,
transformHelpers,
} from "../../base";
import { Prefer } from "../../types";
import { ModalCardBody } from "./modal-card-body";
import { ModalCardFoot } from "./modal-card-foot";
import { ModalCardHead } from "./modal-card-head";
Expand Down
1 change: 1 addition & 0 deletions src/components/modal/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React from "react";
import ReactDOM from "react-dom";

import { forwardRefAs } from "../../base";
import { Omit } from "../../types";
import { canUseDOM } from "../../utils";
import { ModalBackground } from "./modal-background";
import { ModalCard } from "./modal-card";
Expand Down
1 change: 1 addition & 0 deletions src/components/navbar/navbar-brand.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
HelpersProps,
transformHelpers,
} from "../../base";
import { Prefer } from "../../types";

export type NavbarBrandProps = Prefer<
HelpersProps,
Expand Down
1 change: 1 addition & 0 deletions src/components/navbar/navbar-divider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
HelpersProps,
transformHelpers,
} from "../../base";
import { Prefer } from "../../types";

export type NavbarDividerProps = Prefer<
HelpersProps,
Expand Down
1 change: 1 addition & 0 deletions src/components/navbar/navbar-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
HelpersProps,
transformHelpers,
} from "../../base";
import { Prefer } from "../../types";
import { NavbarContext } from "./navbar-context";

export type NavbarMenuProps = Prefer<
Expand Down
1 change: 1 addition & 0 deletions src/elements/content/content-ordered-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
HelpersProps,
transformHelpers,
} from "../../base";
import { Omit, Prefer } from "../../types";
import { tuple } from "../../utils";
import { ContentOrderedListItem } from "./content-ordered-list-item";

Expand Down
1 change: 1 addition & 0 deletions src/elements/form/radio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
HelpersProps,
transformHelpers,
} from "../../base";
import { Prefer } from "../../types";

export type RadioProps = Prefer<
HelpersProps,
Expand Down
1 change: 1 addition & 0 deletions src/elements/form/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
HelpersProps,
transformHelpers,
} from "../../base";
import { Prefer } from "../../types";
import { SelectContainer } from "./select-container";
import { SelectOption } from "./select-option";

Expand Down
1 change: 1 addition & 0 deletions src/elements/icon/icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
transformHelpers,
} from "../../base";
import { Colors, COLORS } from "../../base/helpers";
import { Prefer } from "../../types";
import { tuple } from "../../utils";

export const ICON_ALIGNMENTS = tuple("left", "right");
Expand Down
3 changes: 0 additions & 3 deletions src/globals.d.ts

This file was deleted.

2 changes: 2 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
export type Prefer<P, T> = P & Omit<T, keyof P>;
2 changes: 2 additions & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ export const combineRefs = <T>(

export const noop = () => {}; // tslint:disable-line:no-empty

export type Lit = string | number | boolean | undefined | null | void | {};

export const tuple = <T extends Lit[]>(...args: T) => args;

0 comments on commit dd6f2da

Please sign in to comment.