Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,41 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable no-undef */
import { createRequire } from "node:module";
import { dirname, join } from "node:path";
const require = createRequire(import.meta.url);
export default {
stories: ["../stories/**/*.mdx", "../stories/**/*.stories.@(js|jsx|ts|tsx)"],
addons: [getAbsolutePath("@storybook/addon-links"), getAbsolutePath("@storybook/addon-docs")],
framework: getAbsolutePath("@storybook/web-components-vite")
framework: getAbsolutePath("@storybook/web-components-vite"),
viteFinal: (config: any, env: any) => {
// Only apply source aliases in dev mode for hot reload support
if (env.configType === "DEVELOPMENT") {
config.resolve.alias = config.resolve.alias || {};
config.resolve.alias["@nonfx/flow-core"] =
`${dirname(__dirname)}/packages/flow-core/src/index.ts`;
config.resolve.alias["@nonfx/flow-core-config"] =
`${dirname(__dirname)}/packages/flow-core-config/src/index.ts`;
config.resolve.alias["@nonfx/flow-icons"] =
`${dirname(__dirname)}/packages/flow-icons/src/index.ts`;
config.resolve.alias["@nonfx/flow-log"] =
`${dirname(__dirname)}/packages/flow-log/src/index.ts`;
config.resolve.alias["@nonfx/flow-code-editor"] =
`${dirname(__dirname)}/packages/flow-code-editor/src/index.ts`;
config.resolve.alias["@nonfx/flow-table"] =
`${dirname(__dirname)}/packages/flow-table/src/index.ts`;
config.resolve.alias["@nonfx/flow-md-editor"] =
`${dirname(__dirname)}/packages/flow-md-editor/src/index.ts`;
config.resolve.alias["@nonfx/flow-text-editor"] =
`${dirname(__dirname)}/packages/flow-text-editor/src/index.ts`;
config.resolve.alias["@nonfx/flow-form-builder"] =
`${dirname(__dirname)}/packages/flow-form-builder/src/index.ts`;
config.resolve.alias["@nonfx/flow-lineage"] =
`${dirname(__dirname)}/packages/flow-lineage/src/index.ts`;
config.resolve.alias["@nonfx/flow-dashboard"] =
`${dirname(__dirname)}/packages/flow-dashboard/src/index.ts`;
}
return config;
}
};

function getAbsolutePath(value: string) {
Expand Down
4 changes: 2 additions & 2 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { html } from "lit-html";
import { register } from "@nonfx/flow-icons/src";
import { ConfigUtil } from "@nonfx/flow-core-config";
import { ConfigUtil } from "@nonfx/flow-core";
import { register } from "@nonfx/flow-icons";
import { changeRoute } from "./utils";
import "@nonfx/flow-core";
import "@nonfx/flow-log";
Expand Down
3 changes: 3 additions & 0 deletions .storybook/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@nonfx/tsconfig"
}
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ build-storybook: install
.PHONY: build
build: build-lib build-storybook

.PHONY: clean
clean:
@echo "🧹 Cleaning repo"
git clean -dfx
git gc --prune
@echo "✅ All clean!"

.PHONY: test
test: build-lib
bun run --bun --filter "*" test
29 changes: 16 additions & 13 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"@nonfx/flow-text-editor": "workspace:*",
"@nonfx/tsconfig": "workspace:*",
"d3": "^7.9.0",
"globals": "^16.5.0",
"lit": "^3.2.1",
"vite-bundle-analyzer": "^1.1.0"
},
Expand Down
9 changes: 9 additions & 0 deletions packages/flow-code-editor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<h4 className="margin-btm-8">Release Notes</h4>

## 1.3.2

### Patch Changes

- build cleanup
- Updated dependencies
- @nonfx/flow-core-config@1.3.3
- @nonfx/flow-core@6.0.2

## 1.3.1

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/flow-code-editor/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@nonfx/flow-code-editor",
"version": "1.3.1",
"version": "1.3.2",
"description": "Code editor component for flow library",
"type": "module",
"module": "dist/flow-code-editor.es.js",
"types": "dist/src/index.d.ts",
"types": "dist/index.d.ts",
"scripts": {
"build": "bash ./compile.sh",
"build:watch": "concurrently --kill-others \"vite build --emptyOutDir --watch\" \"tsc --watch\"",
Expand Down
4 changes: 2 additions & 2 deletions packages/flow-code-editor/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": "@nonfx/tsconfig",
"compilerOptions": {
"rootDir": ".",
"outDir": "./dist"
"rootDir": "src",
"declarationDir": "./dist"
},
"include": ["src/**/*"],
"exclude": ["**/*.test.ts", "**/dist", "dist"]
Expand Down
6 changes: 6 additions & 0 deletions packages/flow-core-config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<h4 class="margin-btm-8">Release Notes</h4>

## 1.3.3

### Patch Changes

- build cleanup

## 1.3.2

### Patch Changes
Expand Down
8 changes: 4 additions & 4 deletions packages/flow-core-config/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@nonfx/flow-core-config",
"version": "1.3.2",
"version": "1.3.3",
"description": "Shared configuration for the Flow UI library",
"type": "module",
"module": "dist/index.es.js",
"types": "dist/src/index.d.ts",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "vite build --emptyOutDir"
"build": "tsc --outDir dist --declaration true --emitDeclarationOnly false"
},
"dependencies": {},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/flow-core-config/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": "@nonfx/tsconfig",
"compilerOptions": {
"rootDir": ".",
"outDir": "./dist"
"rootDir": "src",
"declarationDir": "./dist"
},
"include": ["src/**/*"],
"exclude": ["**/*.test.ts", "**/dist", "dist"]
Expand Down
14 changes: 14 additions & 0 deletions packages/flow-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
<h4 className="margin-btm-8">Release Notes</h4>

## 6.0.2

### Patch Changes

- build cleanup
- Updated dependencies
- @nonfx/flow-core-config@1.3.3

## 6.0.1

### Patch Changes

- fixes

## 6.0.0

### Major Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/flow-core/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@nonfx/flow-core",
"version": "6.0.0",
"version": "6.0.2",
"description": "Core package of flow design system",
"type": "module",
"module": "dist/flow-core.es.js",
"types": "dist/src/index.d.ts",
"types": "dist/index.d.ts",
"scripts": {
"build": "bash ./compile.sh",
"build:watch": "concurrently --kill-others \"vite build --emptyOutDir --watch\" \"tsc --watch\"",
Expand Down Expand Up @@ -56,7 +56,7 @@
"web-component-analyzer": "^2.0.0"
},
"peerDependencies": {
"@nonfx/flow-core-config": "^1.3.2"
"@nonfx/flow-core-config": "^1.3.3"
},
"repository": {
"type": "git",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,12 @@ export class FColorPicker extends FRoot {
<f-div slot="icon-tooltip"><slot name="icon-tooltip"></slot></f-div>
<f-div slot="help"><slot name="help"></slot></f-div>
</f-form-field>

<f-popover
id="f-color-picker-popover"
@overlay-click=${this.handleOverlayClick}
@keydown=${this.handleKeydown}
.overlay=${false}
.overlay=${true}
.open=${this.isOpen}
size="small"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,32 +366,12 @@ export class FEmojiPicker extends FRoot {
}

/**
*
* @param e mMouseEvent
* @param element emoji-picker component
* Handle overlay click from popover
*/
closeEmojiPicker(e: MouseEvent, element: FEmojiPicker) {
if (!element.contains(e.target as HTMLInputElement) && element.emojiPickerPopover.open) {
element.emojiPickerPopover.open = false;
}
}

outsideClick = (e: MouseEvent) => {
this.closeEmojiPicker(e, this);
handleOverlayClick = () => {
this.toggleEmojiPicker(false);
};

connectedCallback(): void {
super.connectedCallback();
/**
* click outside the f-select wrapper area
*/
window.addEventListener("mouseup", this.outsideClick);
}
disconnectedCallback(): void {
super.disconnectedCallback();

window.removeEventListener("mouseup", this.outsideClick);
}
protected willUpdate(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {
super.willUpdate(changedProperties);
this.role = "textbox";
Expand Down Expand Up @@ -508,12 +488,15 @@ export class FEmojiPicker extends FRoot {
</div>
<f-div direction="column" id="f-emoji-picker-error"><slot name="help"></slot> </f-div>
</f-div>

<f-popover
data-qa-emoji-popover=${this.getAttribute("data-qa-element-id")}
class="f-emoji-picker-popover"
.overlay=${false}
><f-div>${this.picker}</f-div></f-popover
.overlay=${true}
@overlay-click=${this.handleOverlayClick}
>
<f-div>${this.picker}</f-div>
</f-popover>
`;
}

Expand Down
Loading
Loading