portal-design-system 0.0.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,125 @@
1
+ # Portal Design System
2
+
3
+ A type-safe Vue 3 UI component library built with Tailwind CSS, featuring isolated styles and custom fonts.
4
+
5
+ ## Features
6
+
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
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ npm install portal-design-system
19
+ # or
20
+ yarn add portal-design-system
21
+ # or
22
+ pnpm add portal-design-system
23
+ # or
24
+ bun add portal-design-system
25
+ ```
26
+
27
+ ## Usage
28
+
29
+ ### Import Styles
30
+
31
+ Import the CSS file in your main entry file (e.g., `main.ts`):
32
+
33
+ ```typescript
34
+ import 'portal-design-system/styles'
35
+ ```
36
+
37
+ ### Using Components
38
+
39
+ Wrap your components with the `portal-design-system` class to ensure style isolation:
40
+
41
+ ```vue
42
+ <script setup lang="ts">
43
+ import { Button } from 'portal-design-system'
44
+ </script>
45
+
46
+ <template>
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>
51
+ </div>
52
+ </template>
53
+ ```
54
+
55
+ ### TypeScript Support
56
+
57
+ The library is fully typed. You'll get autocomplete and type checking for all props:
58
+
59
+ ```vue
60
+ <script setup lang="ts">
61
+ import { Button, type ButtonProps } from 'portal-design-system'
62
+
63
+ const props: ButtonProps = {
64
+ variant: 'primary',
65
+ size: 'lg',
66
+ disabled: false
67
+ }
68
+ </script>
69
+ ```
70
+
71
+ ## Components
72
+
73
+ ### Button
74
+
75
+ A versatile button component with multiple variants and sizes.
76
+
77
+ **Props:**
78
+
79
+ - `variant` - `'primary' | 'secondary' | 'danger'` (default: `'primary'`)
80
+ - `size` - `'sm' | 'md' | 'lg'` (default: `'md'`)
81
+ - `disabled` - `boolean` (default: `false`)
82
+
83
+ **Example:**
84
+
85
+ ```vue
86
+ <Button variant="primary" size="lg">Large Primary Button</Button>
87
+ <Button variant="secondary" size="sm">Small Secondary</Button>
88
+ <Button variant="danger" :disabled="true">Disabled Danger</Button>
89
+ ```
90
+
91
+ ## Style Isolation
92
+
93
+ This library uses several techniques to prevent style conflicts:
94
+
95
+ 1. **CSS Prefix**: All Tailwind utilities are prefixed with `pds-`
96
+ 2. **Scoped Wrapper**: The `.portal-design-system` class provides style isolation
97
+ 3. **Custom Fonts**: Inter and JetBrains Mono are loaded independently
98
+
99
+ ## Development
100
+
101
+ ```bash
102
+ # Install dependencies
103
+ bun install
104
+
105
+ # Type check
106
+ bun run type-check
107
+
108
+ # Build library
109
+ bun run build
110
+
111
+ # Preview build
112
+ bun run preview
113
+ ```
114
+
115
+ ## Building
116
+
117
+ The library is built using Vite and outputs:
118
+ - ES modules (`dist/index.js`)
119
+ - CommonJS (`dist/index.cjs`)
120
+ - TypeScript declarations (`dist/index.d.ts`)
121
+ - Compiled CSS (`dist/styles.css`)
122
+
123
+ ## License
124
+
125
+ MIT
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=["disabled"],i=e.defineComponent({__name:"Button",props:{variant:{default:"primary"},size:{default:"md"},disabled:{type:Boolean,default:!1}},setup(t){const s=t,r=e.computed(()=>({primary:"bg-primary-600 text-white hover:bg-primary-700",secondary:"bg-gray-200 text-gray-800 hover:bg-gray-300",danger:"bg-red-600 text-white hover:bg-red-700"})[s.variant]),o=e.computed(()=>({sm:"text-sm px-3 py-1",md:"text-base px-4 py-2",lg:"text-lg px-6 py-3"})[s.size]);return(a,d)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["px-4 py-2 rounded font-medium transition-colors",r.value,o.value,{"opacity-50 cursor-not-allowed":t.disabled}]),disabled:t.disabled},[e.renderSlot(a.$slots,"default")],10,n))}});exports.Button=i;
@@ -0,0 +1,37 @@
1
+ import { ComponentOptionsMixin } from 'vue';
2
+ import { ComponentProvideOptions } from 'vue';
3
+ import { DefineComponent } from 'vue';
4
+ import { PublicProps } from 'vue';
5
+
6
+ declare const __VLS_component: DefineComponent<ButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ButtonProps> & Readonly<{}>, {
7
+ variant: "primary" | "secondary" | "danger";
8
+ size: "sm" | "md" | "lg";
9
+ disabled: boolean;
10
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
11
+
12
+ declare function __VLS_template(): {
13
+ attrs: Partial<{}>;
14
+ slots: {
15
+ default?(_: {}): any;
16
+ };
17
+ refs: {};
18
+ rootEl: HTMLButtonElement;
19
+ };
20
+
21
+ declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
22
+
23
+ declare type __VLS_WithTemplateSlots<T, S> = T & {
24
+ new (): {
25
+ $slots: S;
26
+ };
27
+ };
28
+
29
+ export declare const Button: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
30
+
31
+ export declare interface ButtonProps {
32
+ variant?: 'primary' | 'secondary' | 'danger';
33
+ size?: 'sm' | 'md' | 'lg';
34
+ disabled?: boolean;
35
+ }
36
+
37
+ export { }
package/dist/index.js ADDED
@@ -0,0 +1,34 @@
1
+ import { defineComponent as n, computed as s, createElementBlock as i, openBlock as d, normalizeClass as l, renderSlot as p } from "vue";
2
+ const c = ["disabled"], y = /* @__PURE__ */ n({
3
+ __name: "Button",
4
+ props: {
5
+ variant: { default: "primary" },
6
+ size: { default: "md" },
7
+ disabled: { type: Boolean, default: !1 }
8
+ },
9
+ setup(e) {
10
+ const a = e, r = s(() => ({
11
+ primary: "bg-primary-600 text-white hover:bg-primary-700",
12
+ secondary: "bg-gray-200 text-gray-800 hover:bg-gray-300",
13
+ danger: "bg-red-600 text-white hover:bg-red-700"
14
+ })[a.variant]), o = s(() => ({
15
+ sm: "text-sm px-3 py-1",
16
+ md: "text-base px-4 py-2",
17
+ lg: "text-lg px-6 py-3"
18
+ })[a.size]);
19
+ return (t, m) => (d(), i("button", {
20
+ class: l([
21
+ "px-4 py-2 rounded font-medium transition-colors",
22
+ r.value,
23
+ o.value,
24
+ { "opacity-50 cursor-not-allowed": e.disabled }
25
+ ]),
26
+ disabled: e.disabled
27
+ }, [
28
+ p(t.$slots, "default")
29
+ ], 10, c));
30
+ }
31
+ });
32
+ export {
33
+ y as Button
34
+ };
@@ -0,0 +1 @@
1
+ @import"https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap";/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:"Poppins",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;--font-mono:"JetBrains Mono",ui-monospace,monospace;--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-white:#fff;--spacing:.25rem;--container-4xl:56rem;--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-primary-600:oklch(46% .19 264);--color-primary-700:oklch(39% .16 264)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.fixed{position:fixed}.mx-auto{margin-inline:auto}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.contents{display:contents}.flex{display:flex}.min-h-screen{min-height:100vh}.max-w-4xl{max-width:var(--container-4xl)}.cursor-not-allowed{cursor:not-allowed}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}.rounded{border-radius:.25rem}.rounded-lg{border-radius:var(--radius-lg)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-primary-600{background-color:var(--color-primary-600)}.bg-red-600{background-color:var(--color-red-600)}.bg-white{background-color:var(--color-white)}.p-2{padding:calc(var(--spacing)*2)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-gray-600{color:var(--color-gray-600)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-white{color:var(--color-white)}.opacity-50{opacity:.5}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media(hover:hover){.hover\:bg-gray-300:hover{background-color:var(--color-gray-300)}.hover\:bg-primary-700:hover{background-color:var(--color-primary-700)}.hover\:bg-red-700:hover{background-color:var(--color-red-700)}}}.portal-design-system{font-family:var(--font-sans);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.portal-design-system *{box-sizing:border-box}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "portal-design-system",
3
+ "version": "0.0.1",
4
+ "description": "A type-safe Vue 3 UI library with Tailwind CSS and isolated styles",
5
+ "type": "module",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.cjs"
14
+ },
15
+ "./styles": "./dist/styles.css",
16
+ "./dist/styles.css": "./dist/styles.css"
17
+ },
18
+ "files": [
19
+ "dist",
20
+ "README.md",
21
+ "LICENSE"
22
+ ],
23
+ "scripts": {
24
+ "dev": "vite",
25
+ "build": "vite build",
26
+ "type-check": "vue-tsc --noEmit",
27
+ "preview": "vite preview",
28
+ "prepublishOnly": "npm run type-check && npm run build"
29
+ },
30
+ "keywords": [
31
+ "vue",
32
+ "vue3",
33
+ "ui",
34
+ "design-system",
35
+ "tailwind",
36
+ "tailwindcss",
37
+ "components",
38
+ "typescript"
39
+ ],
40
+ "author": "",
41
+ "license": "MIT",
42
+ "devDependencies": {
43
+ "@types/node": "^22.10.5",
44
+ "@vitejs/plugin-vue": "^5.2.1",
45
+ "tailwindcss": "^4.1.18",
46
+ "typescript": "^5.7.3",
47
+ "vite": "^6.0.7",
48
+ "vite-plugin-dts": "^4.3.0",
49
+ "vue": "^3.5.26",
50
+ "vue-tsc": "^2.2.0"
51
+ },
52
+ "peerDependencies": {
53
+ "vue": "^3.0.0"
54
+ },
55
+ "dependencies": {
56
+ "@tailwindcss/vite": "^4.1.18"
57
+ }
58
+ }