portal-design-system 0.0.89 → 0.0.90

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,42 +1,42 @@
1
+
1
2
  # Portal Design System
2
3
 
3
- A type-safe Vue 3 UI component library built with Tailwind CSS, featuring isolated styles and custom fonts.
4
+ A type-safe Vue 3 UI component library built with Tailwind CSS and isolated styles for easy integration into projects.
4
5
 
5
- ## Features
6
+ ## Quick Overview
6
7
 
7
- - **Vue 3** - Built with the Composition API
8
- - 🎨 **Tailwind CSS** - Utility-first styling with custom configuration
9
- - 🔒 **Style Isolation** - Prefixed classes (`pds-`) prevent global style conflicts
10
- - 🎯 **TypeScript** - Fully type-safe with comprehensive type definitions
11
- - 🖋️ **Custom Fonts** - Inter and JetBrains Mono fonts included
12
- - 📦 **Tree-shakeable** - Only import what you need
13
- - 🚀 **Zero Config** - Works out of the box
8
+ - Framework: Vue 3 (Composition API)
9
+ - Styling: Tailwind CSS (prefixed utilities for isolation)
10
+ - Language: TypeScript
11
+ - Distribution: ESM / CJS + CSS + types
14
12
 
15
13
  ## Installation
16
14
 
15
+ Install the package from npm (or use your preferred package manager):
16
+
17
17
  ```bash
18
18
  npm install portal-design-system
19
19
  # or
20
20
  yarn add portal-design-system
21
21
  # or
22
22
  pnpm add portal-design-system
23
- # or
24
- bun add portal-design-system
25
23
  ```
26
24
 
27
- ## Usage
25
+ If you use Bun:
26
+
27
+ ```bash
28
+ bun add portal-design-system
29
+ ```
28
30
 
29
- ### Import Styles
31
+ ## Quick Start
30
32
 
31
- Import the CSS file in your main entry file (e.g., `main.ts`):
33
+ 1. Import the compiled CSS (one-time in your app entry, e.g. `main.ts`):
32
34
 
33
- ```typescript
35
+ ```ts
34
36
  import 'portal-design-system/styles'
35
37
  ```
36
38
 
37
- ### Using Components
38
-
39
- Wrap your components with the `portal-design-system` class to ensure style isolation when used as Vue components:
39
+ 2. Use components in your Vue app:
40
40
 
41
41
  ```vue
42
42
  <script setup lang="ts">
@@ -45,100 +45,80 @@ import { Button } from 'portal-design-system'
45
45
 
46
46
  <template>
47
47
  <div class="portal-design-system">
48
- <Button variant="primary" size="md">Click me</Button>
49
- <Button variant="secondary">Secondary Button</Button>
50
- <Button variant="danger" :disabled="true">Disabled</Button>
48
+ <Button variant="primary">Primary</Button>
51
49
  </div>
52
50
  </template>
53
51
  ```
54
52
 
55
- ### Using as a Web Component (Shadow DOM)
53
+ ### Web Components (optional)
56
54
 
57
- You can also register web components that mount each Vue component into its own ShadowRoot, which fully isolates styles without requiring globally-prefixed utilities.
55
+ The library can expose Web Components (Shadow DOM) for full style encapsulation. Register them when needed:
58
56
 
59
57
  ```html
60
58
  <script type="module">
61
59
  import { defineCustomElements } from 'portal-design-system'
62
- // Register all provided web components (e.g., <pds-button>)
63
60
  defineCustomElements()
64
61
  </script>
65
62
 
66
63
  <pds-button variant="primary">Shadow Button</pds-button>
67
64
  ```
68
65
 
69
- Notes:
70
- - Web components inject the library's compiled CSS directly into each ShadowRoot, so you don't need to import `portal-design-system/styles` globally for Shadow DOM usage.
71
- - Attributes on the custom element are parsed as props (boolean and numbers are coerced when reasonable).
72
- - The web component tag for Button is `<pds-button>`.
73
-
74
- ### TypeScript Support
75
-
76
- The library is fully typed. You'll get autocomplete and type checking for all props:
66
+ ## Development
77
67
 
78
- ```vue
79
- <script setup lang="ts">
80
- import { Button, type ButtonProps } from 'portal-design-system'
68
+ Common development tasks (scripts available in `package.json`):
81
69
 
82
- const props: ButtonProps = {
83
- variant: 'primary',
84
- size: 'lg',
85
- disabled: false
86
- }
87
- </script>
88
- ```
70
+ ```bash
71
+ # Start dev server
72
+ npm run dev
89
73
 
90
- ## Components
74
+ # Build library
75
+ npm run build
91
76
 
92
- ### Button
77
+ # Type check
78
+ npm run type-check
93
79
 
94
- A versatile button component with multiple variants and sizes.
80
+ # Preview production build
81
+ npm run preview
82
+ ```
95
83
 
96
- **Props:**
84
+ If you prefer Bun, you can run `bun` equivalents where appropriate.
97
85
 
98
- - `variant` - `'primary' | 'secondary' | 'danger'` (default: `'primary'`)
99
- - `size` - `'sm' | 'md' | 'lg'` (default: `'md'`)
100
- - `disabled` - `boolean` (default: `false`)
86
+ ## Package Exports
101
87
 
102
- **Example:**
88
+ The package exposes the components and styles. Import styles directly with:
103
89
 
104
- ```vue
105
- <Button variant="primary" size="lg">Large Primary Button</Button>
106
- <Button variant="secondary" size="sm">Small Secondary</Button>
107
- <Button variant="danger" :disabled="true">Disabled Danger</Button>
90
+ ```ts
91
+ import 'portal-design-system/styles'
108
92
  ```
109
93
 
110
- ## Style Isolation
94
+ Import components by name from the package root.
111
95
 
112
- This library uses several techniques to prevent style conflicts:
96
+ ## Included Components (high level)
113
97
 
114
- 1. **CSS Prefix**: All Tailwind utilities are prefixed with `pds-`
115
- 2. **Scoped Wrapper**: The `.portal-design-system` class provides style isolation
116
- 3. **Custom Fonts**: Inter and JetBrains Mono are loaded independently
98
+ - `Button`
99
+ - `Input`, `Select`, `CountryCode` (inputs)
100
+ - `Tabs`, `Badge`, `Dialog`, `Dropdown`, `DataGrid`, `DurationTimeline`, `Text`, `Iconsax`
117
101
 
118
- ## Development
102
+ See the `src/components` folder for the full list and examples.
119
103
 
120
- ```bash
121
- # Install dependencies
122
- bun install
104
+ ## Contributing
123
105
 
124
- # Type check
125
- bun run type-check
126
-
127
- # Build library
128
- bun run build
106
+ Contributions are welcome. Typical workflow:
129
107
 
130
- # Preview build
131
- bun run preview
132
- ```
108
+ 1. Fork the repo and create a branch for your change.
109
+ 2. Install dependencies and run the dev server.
110
+ 3. Add tests or examples for new components.
111
+ 4. Open a PR with a clear description of your change.
133
112
 
134
- ## Building
113
+ Please run the type checker before opening a PR:
135
114
 
136
- The library is built using Vite and outputs:
137
- - ES modules (`dist/index.js`)
138
- - CommonJS (`dist/index.cjs`)
139
- - TypeScript declarations (`dist/index.d.ts`)
140
- - Compiled CSS (`dist/styles.css`)
115
+ ```bash
116
+ npm run type-check
117
+ ```
141
118
 
142
119
  ## License
143
120
 
144
121
  MIT
122
+
123
+ ---
124
+ If you'd like any extra sections (changelog, CI badges, examples), tell me which details to include.
@@ -24,8 +24,15 @@ type __VLS_Props = {
24
24
  declare function __VLS_template(): {
25
25
  attrs: Partial<{}>;
26
26
  slots: Partial<Record<string, (_: any) => any>> & {
27
+ customRefreshButton?(_: {
28
+ refresh: () => Promise<void> | undefined;
29
+ }): any;
30
+ exportButton?(_: {}): any;
27
31
  createButton?(_: {}): any;
28
32
  toolbarLeft?(_: {}): any;
33
+ customColumnChooser?(_: {
34
+ onClick: () => void;
35
+ }): any;
29
36
  toolbarRight?(_: {}): any;
30
37
  };
31
38
  refs: {
@@ -1,5 +1,6 @@
1
1
  import { SelectOptionType, SvgBasedIconName } from '../types';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ import { DefineProps, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ import { LooseRequired } from '@vue/shared';
3
4
  type __VLS_Props = {
4
5
  id: string;
5
6
  label?: string;
@@ -16,9 +17,28 @@ type __VLS_Props = {
16
17
  type __VLS_PublicProps = {
17
18
  modelValue?: any;
18
19
  } & __VLS_Props;
19
- declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
20
- "update:modelValue": (...args: any[]) => void;
20
+ declare function __VLS_template(): {
21
+ attrs: Partial<{}>;
22
+ slots: {
23
+ select?(_: {
24
+ selected: any;
25
+ props: DefineProps<LooseRequired<__VLS_Props>, "disabled">;
26
+ onUpdate: (value: any) => void;
27
+ }): any;
28
+ };
29
+ refs: {};
30
+ rootEl: HTMLDivElement;
31
+ };
32
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
33
+ declare const __VLS_component: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
34
+ "update:modelValue": (value: any) => any;
21
35
  }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
22
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
36
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
23
37
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
38
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
24
39
  export default _default;
40
+ type __VLS_WithTemplateSlots<T, S> = T & {
41
+ new (): {
42
+ $slots: S;
43
+ };
44
+ };