diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 2c31b7fccd..629ef6a35f 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -6,7 +6,7 @@ */ export * from "./accessibility"; -export * from "./common" +export * from "./common"; export * from "./components"; export { IconClasses } from "./generated/iconClasses"; export { IconContents } from "./generated/iconStrings"; diff --git a/packages/labs/examples/tagInputExample.tsx b/packages/labs/examples/tagInputExample.tsx index f5b90b0a16..19e77826f4 100644 --- a/packages/labs/examples/tagInputExample.tsx +++ b/packages/labs/examples/tagInputExample.tsx @@ -10,7 +10,7 @@ import * as React from "react"; import { Classes, Intent, ITagProps, Switch } from "@blueprintjs/core"; import { BaseExample, handleBooleanChange } from "@blueprintjs/docs"; -import { TagInput } from "../src/tag-input/tagInput"; +import { TagInput } from "../src"; const INTENTS = [Intent.NONE, Intent.PRIMARY, Intent.SUCCESS, Intent.DANGER, Intent.WARNING]; diff --git a/packages/labs/src/blueprint-labs.scss b/packages/labs/src/blueprint-labs.scss index a314627d83..8179dac7e5 100644 --- a/packages/labs/src/blueprint-labs.scss +++ b/packages/labs/src/blueprint-labs.scss @@ -5,5 +5,4 @@ * and https://github.com/palantir/blueprint/blob/master/PATENTS */ -@import "./select/select"; -@import "./tag-input/tag-input"; +@import "./components/index"; diff --git a/packages/labs/src/common/classes.ts b/packages/labs/src/common/classes.ts new file mode 100644 index 0000000000..a147d76ff7 --- /dev/null +++ b/packages/labs/src/common/classes.ts @@ -0,0 +1,10 @@ +/* + * Copyright 2017 Palantir Technologies, Inc. All rights reserved. + * Licensed under the BSD-3 License as modified (the “License”); you may obtain a copy + * of the license at https://github.com/palantir/blueprint/blob/master/LICENSE + * and https://github.com/palantir/blueprint/blob/master/PATENTS + */ + +export const SELECT = "pt-select"; +export const TAG_INPUT = "pt-tag-input"; +export const INPUT_GHOST = "pt-input-ghost"; diff --git a/packages/labs/src/common/index.ts b/packages/labs/src/common/index.ts new file mode 100644 index 0000000000..5d77aba194 --- /dev/null +++ b/packages/labs/src/common/index.ts @@ -0,0 +1,10 @@ +/* + * Copyright 2017 Palantir Technologies, Inc. All rights reserved. + * Licensed under the BSD-3 License as modified (the “License”); you may obtain a copy + * of the license at https://github.com/palantir/blueprint/blob/master/LICENSE + * and https://github.com/palantir/blueprint/blob/master/PATENTS + */ + + import * as classes from "../common/classes"; + + export const Classes = classes; diff --git a/packages/labs/src/components/_index.scss b/packages/labs/src/components/_index.scss new file mode 100644 index 0000000000..6e9c13a139 --- /dev/null +++ b/packages/labs/src/components/_index.scss @@ -0,0 +1,9 @@ +/* + * Copyright 2017 Palantir Technologies, Inc. All rights reserved. + * Licensed under the BSD-3 License as modified (the “License”); you may obtain a copy + * of the license at https://github.com/palantir/blueprint/blob/master/LICENSE + * and https://github.com/palantir/blueprint/blob/master/PATENTS + */ + +@import "select/select"; +@import "tag-input/tag-input"; diff --git a/packages/labs/src/components/index.ts b/packages/labs/src/components/index.ts new file mode 100644 index 0000000000..18f8721063 --- /dev/null +++ b/packages/labs/src/components/index.ts @@ -0,0 +1,10 @@ +/* + * Copyright 2017 Palantir Technologies, Inc. All rights reserved. + * Licensed under the BSD-3 License as modified (the “License”); you may obtain a copy + * of the license at https://github.com/palantir/blueprint/blob/master/LICENSE + * and https://github.com/palantir/blueprint/blob/master/PATENTS + */ + + export * from "./query-list/queryList"; + export * from "./select/select"; + export * from "./tag-input/tagInput"; diff --git a/packages/labs/src/query-list/queryList.tsx b/packages/labs/src/components/query-list/queryList.tsx similarity index 100% rename from packages/labs/src/query-list/queryList.tsx rename to packages/labs/src/components/query-list/queryList.tsx diff --git a/packages/labs/src/select/_select.scss b/packages/labs/src/components/select/_select.scss similarity index 100% rename from packages/labs/src/select/_select.scss rename to packages/labs/src/components/select/_select.scss diff --git a/packages/labs/src/select/select.tsx b/packages/labs/src/components/select/select.tsx similarity index 98% rename from packages/labs/src/select/select.tsx rename to packages/labs/src/components/select/select.tsx index 305b88f34a..afb9680ad3 100644 --- a/packages/labs/src/select/select.tsx +++ b/packages/labs/src/components/select/select.tsx @@ -151,7 +151,7 @@ export class Select extends AbstractComponent, ISelectState` element */ @@ -80,8 +90,8 @@ export class TagInput extends AbstractComponent public render() { const { className, inputProps, values } = this.props; - const classes = classNames(Classes.INPUT, "pt-tag-input", { - [Classes.ACTIVE]: this.state.isInputFocused, + const classes = classNames(CoreClasses.INPUT, Classes.TAG_INPUT, { + [CoreClasses.ACTIVE]: this.state.isInputFocused, }, className); return ( @@ -98,7 +108,7 @@ export class TagInput extends AbstractComponent onChange={this.handleInputChange} onKeyDown={this.handleInputKeyDown} ref={this.refHandlers.input} - className={classNames("pt-input-ghost", inputProps.className)} + className={classNames(Classes.INPUT_GHOST, inputProps.className)} /> ); diff --git a/packages/labs/src/index.ts b/packages/labs/src/index.ts index 61e871a50d..29466bf8c1 100644 --- a/packages/labs/src/index.ts +++ b/packages/labs/src/index.ts @@ -5,6 +5,5 @@ * and https://github.com/palantir/blueprint/blob/master/PATENTS */ -export * from "./query-list/queryList"; -export * from "./select/select"; -export * from "./tag-input/tagInput"; +export * from "./common"; +export * from "./components";