From 9322bbc0b09e4f9d5268459528ecbee2c3324896 Mon Sep 17 00:00:00 2001 From: productdevbook Date: Sat, 22 Jul 2023 21:01:01 +0300 Subject: [PATCH 1/3] chore: add primitives --- packages/primitives/README.md | 11 +++++ packages/primitives/build.config.ts | 12 ++++++ packages/primitives/package.json | 54 +++++++++++++++++++++++++ packages/primitives/src/aspect-ratio.ts | 1 + packages/primitives/src/index.ts | 8 ++++ packages/primitives/tsconfig.json | 10 +++++ packages/primitives/tsup.config.ts | 22 ++++++++++ playground/nuxt3/package.json | 1 + pnpm-lock.yaml | 45 +++++++++++++++++++-- 9 files changed, 160 insertions(+), 4 deletions(-) create mode 100644 packages/primitives/README.md create mode 100644 packages/primitives/build.config.ts create mode 100644 packages/primitives/package.json create mode 100644 packages/primitives/src/aspect-ratio.ts create mode 100644 packages/primitives/src/index.ts create mode 100644 packages/primitives/tsconfig.json create mode 100644 packages/primitives/tsup.config.ts diff --git a/packages/primitives/README.md b/packages/primitives/README.md new file mode 100644 index 000000000..3c10e875e --- /dev/null +++ b/packages/primitives/README.md @@ -0,0 +1,11 @@ +# `label` + +## Installation + +```sh +$ pnpm add @oku-ui/label +``` + +## Usage + +soon docs \ No newline at end of file diff --git a/packages/primitives/build.config.ts b/packages/primitives/build.config.ts new file mode 100644 index 000000000..b972b9a78 --- /dev/null +++ b/packages/primitives/build.config.ts @@ -0,0 +1,12 @@ +import { defineBuildConfig } from 'unbuild' + +export default defineBuildConfig({ + entries: [ + { + builder: 'mkdist', + input: './src/', + pattern: ['**/!(*.test|*.stories).ts'], + }, + ], + declaration: true, +}) diff --git a/packages/primitives/package.json b/packages/primitives/package.json new file mode 100644 index 000000000..18cead942 --- /dev/null +++ b/packages/primitives/package.json @@ -0,0 +1,54 @@ +{ + "name": "@oku-ui/primitives", + "type": "module", + "version": "0.0.1", + "license": "MIT", + "source": "src/index.ts", + "funding": "https://github.com/sponsors/productdevbook", + "homepage": "https://oku-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/oku-ui/primitives.git", + "directory": "packages/primitives" + }, + "bugs": { + "url": "https://github.com/oku-ui/primitives/issues" + }, + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + } + }, + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "files": [ + "dist" + ], + "engines": { + "node": ">=18" + }, + "scripts": { + "build": "tsup", + "dev": "tsup --watch" + }, + "peerDependencies": { + "vue": "^3.3.0" + }, + "dependencies": { + "@oku-ui/aspect-ratio": "latest", + "@oku-ui/avatar": "latest", + "@oku-ui/checkbox": "latest", + "@oku-ui/collapsible": "latest", + "@oku-ui/label": "latest", + "@oku-ui/progress": "latest", + "@oku-ui/separator": "latest", + "@oku-ui/toggle": "latest" + }, + "devDependencies": { + "tsconfig": "workspace:^" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/packages/primitives/src/aspect-ratio.ts b/packages/primitives/src/aspect-ratio.ts new file mode 100644 index 000000000..5eac807d6 --- /dev/null +++ b/packages/primitives/src/aspect-ratio.ts @@ -0,0 +1 @@ +export * from '@oku-ui/aspect-ratio' diff --git a/packages/primitives/src/index.ts b/packages/primitives/src/index.ts new file mode 100644 index 000000000..299b8a1bc --- /dev/null +++ b/packages/primitives/src/index.ts @@ -0,0 +1,8 @@ +export * from '@oku-ui/aspect-ratio' +export * from '@oku-ui/avatar' +export * from '@oku-ui/checkbox' +export * from '@oku-ui/collapsible' +export * from '@oku-ui/label' +export * from '@oku-ui/progress' +export * from '@oku-ui/separator' +export * from '@oku-ui/toggle' diff --git a/packages/primitives/tsconfig.json b/packages/primitives/tsconfig.json new file mode 100644 index 000000000..b8dfa9041 --- /dev/null +++ b/packages/primitives/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "tsconfig/node16.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist" + }, + "include": [ + "src" + ] +} diff --git a/packages/primitives/tsup.config.ts b/packages/primitives/tsup.config.ts new file mode 100644 index 000000000..a2f7a0d8b --- /dev/null +++ b/packages/primitives/tsup.config.ts @@ -0,0 +1,22 @@ +import { defineConfig } from 'tsup' +import pkg from './package.json' + +const external = [ + ...Object.keys(pkg.dependencies || {}), + ...Object.keys(pkg.peerDependencies || {}), +] + +export default defineConfig((options) => { + return [ + { + ...options, + entryPoints: ['src/index.ts'], + external, + dts: true, + clean: true, + target: 'node16', + format: ['esm'], + outExtension: () => ({ js: '.mjs' }), + }, + ] +}) diff --git a/playground/nuxt3/package.json b/playground/nuxt3/package.json index a0000020c..53c3824ff 100644 --- a/playground/nuxt3/package.json +++ b/playground/nuxt3/package.json @@ -16,6 +16,7 @@ "@oku-ui/checkbox": "workspace:^", "@oku-ui/collapsible": "workspace:^", "@oku-ui/label": "workspace:^", + "@oku-ui/primitives": "workspace:^", "@oku-ui/progress": "workspace:^", "@oku-ui/separator": "workspace:^", "@oku-ui/switch": "workspace:^" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b126c98b4..e1368f810 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -168,7 +168,7 @@ importers: version: 1.2.1 vite: specifier: 4.3.5 - version: 4.3.5 + version: 4.3.5(@types/node@18.16.18) vite-plugin-dts: specifier: ^3.3.0 version: 3.3.0(rollup@3.21.0)(typescript@5.1.6)(vite@4.3.5) @@ -489,6 +489,40 @@ importers: specifier: workspace:^ version: link:../tsconfig + packages/primitives: + dependencies: + '@oku-ui/aspect-ratio': + specifier: latest + version: link:../components/aspect-ratio + '@oku-ui/avatar': + specifier: latest + version: link:../components/avatar + '@oku-ui/checkbox': + specifier: latest + version: link:../components/checkbox + '@oku-ui/collapsible': + specifier: latest + version: link:../components/collapsible + '@oku-ui/label': + specifier: latest + version: link:../components/label + '@oku-ui/progress': + specifier: latest + version: link:../components/progress + '@oku-ui/separator': + specifier: latest + version: link:../components/separator + '@oku-ui/toggle': + specifier: latest + version: link:../components/toggle + vue: + specifier: ^3.3.0 + version: 3.3.4 + devDependencies: + tsconfig: + specifier: workspace:^ + version: link:../tsconfig + packages/tsconfig: {} playground/nuxt3: @@ -508,6 +542,9 @@ importers: '@oku-ui/label': specifier: workspace:^ version: link:../../packages/components/label + '@oku-ui/primitives': + specifier: workspace:^ + version: link:../../packages/primitives '@oku-ui/progress': specifier: workspace:^ version: link:../../packages/components/progress @@ -572,7 +609,7 @@ importers: version: 0.25.1(rollup@3.21.0)(vue@3.3.4) vite: specifier: 4.3.5 - version: 4.3.5 + version: 4.3.5(@types/node@18.16.18) vue-tsc: specifier: ^1.8.5 version: 1.8.5(typescript@5.1.6) @@ -13931,7 +13968,7 @@ packages: dependencies: '@types/node': 18.16.18 esbuild: 0.17.19 - postcss: 8.4.26 + postcss: 8.4.25 rollup: 3.22.0 optionalDependencies: fsevents: 2.3.2 @@ -13964,7 +14001,7 @@ packages: dependencies: '@types/node': 18.16.19 esbuild: 0.17.19 - postcss: 8.4.26 + postcss: 8.4.25 rollup: 3.22.0 optionalDependencies: fsevents: 2.3.2 From 3acb246eb2074c7aa41b94a3d2c26841c405ad58 Mon Sep 17 00:00:00 2001 From: productdevbook Date: Wed, 23 Aug 2023 07:21:29 +0300 Subject: [PATCH 2/3] chore: update readme --- README.md | 2 +- packages/primitives/README.md | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 934e25aeb..383c0a948 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Enter the component you want most in the components, leave the emojis and follow | [Toggle Group](https://github.com/oku-ui/primitives/issues/26) | A group of toggle buttons | Not Started | - | | [Toolbar](https://github.com/oku-ui/primitives/issues/27) | A group of toolbar buttons | Not Started | - | | [Tooltip](https://github.com/oku-ui/primitives/issues/28) | A card that appears when a user hovers over an element | Not Started | - | - +[Primitives](https://oku-ui.com/primitives) | Version | Downloads | Website | ## Community diff --git a/packages/primitives/README.md b/packages/primitives/README.md index 3c10e875e..23bba64d9 100644 --- a/packages/primitives/README.md +++ b/packages/primitives/README.md @@ -1,11 +1,12 @@ -# `label` +# `@oku-ui/primitives` + +Version | Downloads | Website ## Installation ```sh -$ pnpm add @oku-ui/label +$ pnpm add @oku-ui/primitives ``` ## Usage - -soon docs \ No newline at end of file +... From 7cb0f7efa1febee7c8f62eaa7fbb0d6e1bd1bf8f Mon Sep 17 00:00:00 2001 From: productdevbook Date: Wed, 23 Aug 2023 07:21:54 +0300 Subject: [PATCH 3/3] chore: update readme --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 383c0a948..0a756ac5f 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Enter the component you want most in the components, leave the emojis and follow | Component | Description | Status | Docs | | --- | --- | --- | --- | -| [Accordion](https://github.com/oku-ui/primitives/issues/3) | A group of collapsible panels | Not Started | - | +| [Accordion](https://github.com/oku-ui/primitives/issues/3) | A group of collapsible panels | 🚧 In Progress | - | | [Alert Dialog](https://github.com/oku-ui/primitives/issues/4) | A modal dialog that interrupts the user's workflow to get a response | Not Started | - | | [Aspect Ratio](https://oku-ui.com/primitives/components/aspect-ratio) | Version | Downloads | Website | | [Avatar](https://oku-ui.com/primitives/components/avatar) | Version | Downloads | Website | @@ -42,17 +42,17 @@ Enter the component you want most in the components, leave the emojis and follow | [Navigation Menu](https://github.com/oku-ui/primitives/issues/14) | A menu that appears when a user interacts with an element's trigger | Not Started | - | | [Popover](https://github.com/oku-ui/primitives/issues/15) | A card that appears when a user hovers over an element | Not Started | - | | [Progress](https://oku-ui.com/primitives/components/progress) | Version | Downloads | Website | -| [Radio Group](https://github.com/oku-ui/primitives/issues/17) | A group of radio buttons | Not Started | - | +| [Radio Group](https://github.com/oku-ui/primitives/issues/17) | A group of radio buttons | 🚧 In Progress | - | | [Scroll Area](https://github.com/oku-ui/primitives/issues/18) | A scrollable area | Not Started | - | | [Select](https://github.com/oku-ui/primitives/issues/19) | A control that allows users to select one or more items from a list of options | 🚧 In Progress | - | | [Separator](https://oku-ui.com/primitives/components/separator) | Version | Downloads | Website | -| [Slider](https://github.com/oku-ui/primitives/issues/21) | A control that allows users to input numeric values in a given range | Not Started | - | +| [Slider](https://github.com/oku-ui/primitives/issues/21) | A control that allows users to input numeric values in a given range | 🚧 In Progress | - | | [Switch](https://github.com/oku-ui/primitives/issues/22) | A control that allows users to switch between two mutually exclusive options | 🚧 In Progress | - | | [Tabs](https://github.com/oku-ui/primitives/issues/23) | A group of tabs | 🚧 In Progress | - | | [Toast](https://github.com/oku-ui/primitives/issues/24) | A non-modal dialog that appears and disappears from the screen | | - | | [Toggle](https://oku-ui.com/primitives/components/toggle) | Version | Downloads | Website | -| [Toggle Group](https://github.com/oku-ui/primitives/issues/26) | A group of toggle buttons | Not Started | - | -| [Toolbar](https://github.com/oku-ui/primitives/issues/27) | A group of toolbar buttons | Not Started | - | +| [Toggle Group](https://github.com/oku-ui/primitives/issues/26) | A group of toggle buttons | 🚧 In Progress | - | +| [Toolbar](https://github.com/oku-ui/primitives/issues/27) | A group of toolbar buttons | 🚧 In Progress | - | | [Tooltip](https://github.com/oku-ui/primitives/issues/28) | A card that appears when a user hovers over an element | Not Started | - | [Primitives](https://oku-ui.com/primitives) | Version | Downloads | Website |