-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(umd): Issue 1646 - change process.env.NODE_ENV to string (#1649)
* fix(umd): simplify exports * chore(app): bump lerna, angular, sass, @types/react * chore(sass): limit version for core due to issue in @carbon/styles * chore(repo): node bug fix, bump deploy action version * chore(release): make version less specific * chore(release): add icons * fix(core/umd): replace process.env.NODE_ENV in bundle * chore(app): bump storybook, eslint, svelte, svelte-check * chore(app): bump storybook, eslint * feat(modal): reduce dependency on deprecated carbon-components for testing * chore(app): bump vite-plugin-dts * chore(modal): improve typing * chore(vite): only need plugin-replace
- Loading branch information
1 parent
8ad1a69
commit 8e11271
Showing
15 changed files
with
1,461 additions
and
1,543 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
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
66 changes: 57 additions & 9 deletions
66
packages/core/src/components/essentials/carbon-components.d.ts
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 |
---|---|---|
@@ -1,14 +1,62 @@ | ||
declare module 'carbon-components' { | ||
export class Modal { | ||
static create(node: any): any | ||
export interface ModalOptions { | ||
selectorInit: string | ||
selectorModalClose: string | ||
selectorPrimaryFocus: string | ||
selectorsFloatingMenus: string[] | ||
selectorModalContainer: string | ||
classVisible: string | ||
classBody: string | ||
attribInitTarget: string | ||
initEventNames: string[] | ||
eventBeforeShown: string | ||
eventAfterShown: string | ||
eventBeforeHidden: string | ||
eventAfterHidden: string | ||
} | ||
} | ||
|
||
declare module 'carbon-components/es/globals/js/settings' { | ||
export default { | ||
disableAutoInit: boolean, | ||
prefix: string, | ||
selectorTabbable: string, | ||
selectorFocusable: string | ||
interface Handle { | ||
release: () => null | ||
} | ||
|
||
type Component = any | ||
|
||
export class Modal { | ||
// carbon-components Modal class | ||
constructor(element: HTMLDivElement, options?: Partial<ModalOptions>) | ||
element: HTMLDivElement // implied | ||
previouslyFocusedNode: Element // implied | ||
_handleFocusinListener?: Handle | ||
_handleKeydownListener: Handle | ||
createdByLauncher(evt: Event): void | ||
shouldStateBeChanged(state: string): boolean | ||
_changeState(state: string, detail: object, callback: () => void): void // overrides mixin EventedState | ||
_hookCloseActions(): void | ||
_handleFocusin: (evt: FocusEvent) => void | ||
static components: WeakMap<HTMLDivElement, Modal> | ||
static get options(): ModalOptions | ||
|
||
// mixin CreateComponent | ||
children: Component[] | ||
static create(node: HTMLDivElement): Modal | ||
release(): null | ||
|
||
// mixin InitComponentByLauncher | ||
static forLazyInit: boolean | ||
init(target: Document, options: ModalOptions): void | ||
|
||
// mixin EventedShowHideState | ||
show(evtOrElem?, callback?): void | ||
hide(evtOrElem?, callback?): void | ||
|
||
// mixin EventedState | ||
_changeState(): void // overload | ||
changeState(...args): void | ||
|
||
// mixin Handles | ||
handles: Set<Handle> // mixin Handles | ||
manage(handle: Handle): Handle | ||
unmanage(handle: Handle): Handle | ||
// release - handles vs. release in CreateComponent mixin which is for children | ||
} | ||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export { data, options, TestEnvironment } from './test-environment' | ||
export const prefix = 'bx' |
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
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
Oops, something went wrong.