@thasmo/ui 1.0.0

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 ADDED
@@ -0,0 +1,11 @@
1
+ # UI
2
+
3
+ > Personal UI.
4
+
5
+ ---
6
+
7
+ **install**
8
+
9
+ ```sh
10
+ pnpm add @thasmo/ui
11
+ ```
@@ -0,0 +1,6 @@
1
+ import { Preset } from 'unocss';
2
+
3
+ declare function preset(): Preset;
4
+ export default preset;
5
+
6
+ export { }
package/dist/preset.js ADDED
@@ -0,0 +1,71 @@
1
+ import { definePreset as l, transformerVariantGroup as x, presetWind4 as d, presetIcons as f } from "unocss";
2
+ const z = l(() => ({
3
+ name: "basic",
4
+ presets: [
5
+ d({
6
+ preflights: {
7
+ reset: !0
8
+ }
9
+ }),
10
+ f()
11
+ ],
12
+ transformers: [x()]
13
+ })), F = 320, S = 1, h = 1.125, y = 1920, g = 1.25, $ = 1.25;
14
+ function e(r, i = F, t = S, n = h, s = y, c = g, p = $) {
15
+ const o = t * n ** r, a = c * p ** r, m = (a - o) / ((s - i) / 16), u = -i / 16 * m + o;
16
+ return `clamp(${o.toFixed(3)}rem, ${u.toFixed(3)}rem + ${(m * 100).toFixed(3)}vw, ${a.toFixed(3)}rem)`;
17
+ }
18
+ function D() {
19
+ return {
20
+ name: "thasmo-ui",
21
+ presets: [
22
+ z()
23
+ ],
24
+ layers: {
25
+ theme: 1
26
+ },
27
+ outputToCssLayers: !0,
28
+ theme: {
29
+ fontFamily: {
30
+ sans: "Fira Sans",
31
+ serif: "Sentient"
32
+ },
33
+ breakpoint: {
34
+ lg: "1400px",
35
+ md: "1000px",
36
+ sm: "600px"
37
+ },
38
+ colors: {
39
+ primary: {
40
+ DEFAULT: "#27374D"
41
+ }
42
+ },
43
+ text: {
44
+ sizes: {
45
+ heading: {
46
+ 1: e(5),
47
+ 2: e(4),
48
+ 3: e(3),
49
+ 4: e(2),
50
+ 5: e(1),
51
+ 6: e(0)
52
+ },
53
+ text: {
54
+ regular: e(0),
55
+ small: e(-1)
56
+ }
57
+ }
58
+ }
59
+ },
60
+ rules: [
61
+ [/^fluid-([^-]+)-([^-]+)$/, (r, { theme: i }) => {
62
+ const [, t, n] = r, s = i.text?.sizes;
63
+ if (t && n && s && s[t] && s[t][n])
64
+ return { "font-size": s[t][n] };
65
+ }]
66
+ ]
67
+ };
68
+ }
69
+ export {
70
+ D as default
71
+ };
package/dist/ui.css ADDED
@@ -0,0 +1 @@
1
+ @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{--un-leading:initial;--un-text-opacity:100%;--un-bg-opacity:100%}}@property --un-text-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}@property --un-leading{syntax:"*";inherits:false;}@property --un-bg-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}:root,:host{--leading-snug: 1.375;--spacing: .25rem;--font-serif: ui-serif,Georgia,Cambria,"Times New Roman",Times,serif;--font-sans: ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--leading-tight: 1.25;--leading-none: 1;--colors-white: #fff;--colors-gray-900: oklch(21% .034 264.665);--colors-gray-800: oklch(27.8% .033 256.848);--colors-gray-600: oklch(44.6% .03 256.802);--colors-gray-300: oklch(87.2% .01 258.338);--colors-gray-200: oklch(92.8% .006 264.531);--colors-gray-700: oklch(37.3% .034 259.733);--colors-gray-100: oklch(96.7% .003 264.542);--font-mono: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family: var(--font-sans);--default-monoFont-family: var(--font-mono)}*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;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-featureSettings, normal);font-variation-settings:var(--default-font-variationSettings, 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-monoFont-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace );font-feature-settings:var(--default-monoFont-featureSettings, normal);font-variation-settings:var(--default-monoFont-variationSettings, normal);font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}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{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}: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: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,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-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]),::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden~=until-found])){display:none!important}.i-ri-arrow-right-up-long-line{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m5.636 19.778l-1.414-1.414L15.657 6.93h-5.586v-2h9v9h-2V8.343z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em}.i-ri-hashtag{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m7.784 14l.42-4H4V8h4.415l.525-5h2.011l-.525 5h3.989l.525-5h2.011l-.525 5H20v2h-3.784l-.42 4H20v2h-4.415l-.525 5h-2.011l.525-5H9.585l-.525 5H7.049l.525-5H4v-2zm2.011 0h3.99l.42-4h-3.99z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em}.fluid-heading-1{font-size:clamp(1.802rem,1.399rem + 2.013vw,3.815rem)}.fluid-heading-2{font-size:clamp(1.602rem,1.312rem + 1.45vw,3.052rem)}.fluid-heading-3{font-size:clamp(1.424rem,1.22rem + 1.018vw,2.441rem)}.fluid-heading-4{font-size:clamp(1.266rem,1.128rem + .688vw,1.953rem)}.fluid-heading-5{font-size:clamp(1.125rem,1.038rem + .438vw,1.563rem)}.fluid-heading-6,.fluid-text-regular{font-size:clamp(1rem,.95rem + .25vw,1.25rem)}.fluid-text-small{font-size:clamp(.889rem,.867rem + .111vw,1rem)}.text-1\.25rem{font-size:1.25rem}.text-1\.5rem{font-size:1.5rem}.text-1rem{font-size:1rem}.dark .dark\:text-gray-200{color:color-mix(in srgb,var(--colors-gray-200) var(--un-text-opacity),transparent)}.dark .dark\:text-gray-300{color:color-mix(in srgb,var(--colors-gray-300) var(--un-text-opacity),transparent)}.dark .dark\:text-gray-900{color:color-mix(in srgb,var(--colors-gray-900) var(--un-text-opacity),transparent)}.text-gray-600{color:color-mix(in srgb,var(--colors-gray-600) var(--un-text-opacity),transparent)}.text-gray-800{color:color-mix(in srgb,var(--colors-gray-800) var(--un-text-opacity),transparent)}.text-white{color:color-mix(in srgb,var(--colors-white) var(--un-text-opacity),transparent)}.leading-0{--un-leading:0;line-height:0}.leading-none{--un-leading:var(--leading-none);line-height:var(--leading-none)}.leading-snug{--un-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--un-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-500{--un-font-weight:500;font-weight:500}.font-sans{font-family:var(--font-sans)}.font-serif{font-family:var(--font-serif)}.p-0\.5rem{padding:.5rem}.p-y-0\.5em,.py-0\.5em{padding-block:.5em}.px-0\.5em{padding-inline:.5em}.px-1\.25em{padding-inline:1.25em}.px-2rem{padding-inline:2rem}.py-0\.125em{padding-block:.125em}.py-0\.75rem{padding-block:.75rem}.p-l-1rem{padding-left:1rem}.p-r-1rem{padding-right:1rem}.text-align-center{text-align:center}.align-middle{vertical-align:middle}.rounded-0\.25rem{border-radius:.25rem}.rounded-full{border-radius:calc(infinity * 1px)}.bg-current{background-color:currentColor}.bg-gray-300{background-color:color-mix(in srgb,var(--colors-gray-300) var(--un-bg-opacity),transparent)}.bg-gray-900{background-color:color-mix(in srgb,var(--colors-gray-900) var(--un-bg-opacity),transparent)}.dark .dark\:bg-gray-100{background-color:color-mix(in srgb,var(--colors-gray-100) var(--un-bg-opacity),transparent)}.dark .dark\:bg-gray-700{background-color:color-mix(in srgb,var(--colors-gray-700) var(--un-bg-opacity),transparent)}.dark .dark\:hover\:bg-gray-300:hover{background-color:color-mix(in srgb,var(--colors-gray-300) var(--un-bg-opacity),transparent)}.hover\:bg-gray-700:hover{background-color:color-mix(in srgb,var(--colors-gray-700) var(--un-bg-opacity),transparent)}.opacity-25{opacity:25%}.opacity-50{opacity:50%}.group\/link:hover .group-hover\/link\:opacity-100,.group\/link:focus .group-focus\/link\:opacity-100{opacity:100%}.group\/link:hover .group-hover\/link\:underline{text-decoration-line:underline}.decoration-2px{text-decoration-thickness:2px}.underline-offset-0\.25em{text-underline-offset:.25em}.flex{display:flex}.inline-flex{display:inline-flex}.shrink-0{flex-shrink:0}.grow-0{flex-grow:0}.grow-1{flex-grow:1}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.gap-0{gap:calc(var(--spacing) * 0)}.gap-0\.125em{gap:.125em}.gap-0\.25em{gap:.25em}.gap-0\.5em{gap:.5em}.gap-0\.5rem{gap:.5rem}.gap-1em{gap:1em}.gap-1rem{gap:1rem}.gap-2\.25rem{gap:2.25rem}.h-3px{height:3px}.min-w-fit{min-width:fit-content}.w-full{width:100%}.aspect-square{aspect-ratio:1/1}.inline-block{display:inline-block}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;user-select:none}.items-start{align-items:flex-start}.items-center{align-items:center}.bottom-0\.1em{bottom:.1em}.justify-center{justify-content:center}.pos-relative{position:relative}.mask-center{-webkit-mask-position:center;mask-position:center}.mask-no-repeat{-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.mask-contain{-webkit-mask-size:contain;mask-size:contain}@layer theme{.dark .dark\:layer-theme\:text-gray-100{color:color-mix(in srgb,var(--colors-gray-100) var(--un-text-opacity),transparent)}.dark .layer-theme\:dark\:text-gray-300{color:color-mix(in srgb,var(--colors-gray-300) var(--un-text-opacity),transparent)}.layer-theme\:text-gray-600{color:color-mix(in srgb,var(--colors-gray-600) var(--un-text-opacity),transparent)}.layer-theme\:text-gray-900{color:color-mix(in srgb,var(--colors-gray-900) var(--un-text-opacity),transparent)}.dark .dark\:layer-theme\:bg-gray-800,.dark .layer-theme\:dark\:bg-gray-800{background-color:color-mix(in srgb,var(--colors-gray-800) var(--un-bg-opacity),transparent)}.layer-theme\:bg-gray-200{background-color:color-mix(in srgb,var(--colors-gray-200) var(--un-bg-opacity),transparent)}.dark .dark\:layer-theme\:hover\:bg-gray-700:hover{background-color:color-mix(in srgb,var(--colors-gray-700) var(--un-bg-opacity),transparent)}.layer-theme\:hover\:bg-gray-300:hover{background-color:color-mix(in srgb,var(--colors-gray-300) var(--un-bg-opacity),transparent)}}@media print{.print\:gap-1\.25rem{gap:1.25rem}.print\:hidden{display:none}}@supports (color: color-mix(in lab,red,red)){.dark .dark\:text-gray-200{color:color-mix(in oklab,var(--colors-gray-200) var(--un-text-opacity),transparent)}.dark .dark\:text-gray-300{color:color-mix(in oklab,var(--colors-gray-300) var(--un-text-opacity),transparent)}.dark .dark\:text-gray-900{color:color-mix(in oklab,var(--colors-gray-900) var(--un-text-opacity),transparent)}.text-gray-600{color:color-mix(in oklab,var(--colors-gray-600) var(--un-text-opacity),transparent)}.text-gray-800{color:color-mix(in oklab,var(--colors-gray-800) var(--un-text-opacity),transparent)}.text-white{color:color-mix(in oklab,var(--colors-white) var(--un-text-opacity),transparent)}.bg-gray-300{background-color:color-mix(in oklab,var(--colors-gray-300) var(--un-bg-opacity),transparent)}.bg-gray-900{background-color:color-mix(in oklab,var(--colors-gray-900) var(--un-bg-opacity),transparent)}.dark .dark\:bg-gray-100{background-color:color-mix(in oklab,var(--colors-gray-100) var(--un-bg-opacity),transparent)}.dark .dark\:bg-gray-700{background-color:color-mix(in oklab,var(--colors-gray-700) var(--un-bg-opacity),transparent)}.dark .dark\:hover\:bg-gray-300:hover{background-color:color-mix(in oklab,var(--colors-gray-300) var(--un-bg-opacity),transparent)}.hover\:bg-gray-700:hover{background-color:color-mix(in oklab,var(--colors-gray-700) var(--un-bg-opacity),transparent)}}@supports (color: color-mix(in lab,red,red)){@layer theme{.dark .dark\:layer-theme\:text-gray-100{color:color-mix(in oklab,var(--colors-gray-100) var(--un-text-opacity),transparent)}.dark .layer-theme\:dark\:text-gray-300{color:color-mix(in oklab,var(--colors-gray-300) var(--un-text-opacity),transparent)}.layer-theme\:text-gray-600{color:color-mix(in oklab,var(--colors-gray-600) var(--un-text-opacity),transparent)}.layer-theme\:text-gray-900{color:color-mix(in oklab,var(--colors-gray-900) var(--un-text-opacity),transparent)}.dark .dark\:layer-theme\:bg-gray-800,.dark .layer-theme\:dark\:bg-gray-800{background-color:color-mix(in oklab,var(--colors-gray-800) var(--un-bg-opacity),transparent)}.layer-theme\:bg-gray-200{background-color:color-mix(in oklab,var(--colors-gray-200) var(--un-bg-opacity),transparent)}.dark .dark\:layer-theme\:hover\:bg-gray-700:hover{background-color:color-mix(in oklab,var(--colors-gray-700) var(--un-bg-opacity),transparent)}.layer-theme\:hover\:bg-gray-300:hover{background-color:color-mix(in oklab,var(--colors-gray-300) var(--un-bg-opacity),transparent)}}}
package/dist/ui.d.ts ADDED
@@ -0,0 +1,244 @@
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<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLAnchorElement>;
7
+
8
+ declare const __VLS_component_2: DefineComponent<__VLS_Props_3, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_3> & Readonly<{}>, {
9
+ level: 1 | 2 | 3 | 4 | 5 | 6;
10
+ separator: boolean;
11
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
12
+
13
+ declare const __VLS_component_3: DefineComponent<__VLS_Props_5, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_5> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
14
+
15
+ declare const __VLS_component_4: DefineComponent<__VLS_Props_6, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_6> & Readonly<{}>, {
16
+ external: boolean;
17
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLAnchorElement>;
18
+
19
+ declare const __VLS_component_5: DefineComponent<__VLS_Props_7, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_7> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
20
+
21
+ declare const __VLS_component_6: DefineComponent<__VLS_Props_9, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_9> & Readonly<{}>, {
22
+ level: 1 | 2 | 3 | 4 | 5 | 6;
23
+ separator: boolean;
24
+ tag: string;
25
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
26
+
27
+ declare const __VLS_component_7: DefineComponent<__VLS_Props_11, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_11> & Readonly<{}>, {
28
+ small: boolean;
29
+ tag: string;
30
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
31
+
32
+ declare type __VLS_Props = {
33
+ icon?: string;
34
+ href?: string;
35
+ target?: string;
36
+ rel?: string;
37
+ };
38
+
39
+ declare type __VLS_Props_10 = {
40
+ label: string;
41
+ icon?: string;
42
+ large?: boolean;
43
+ };
44
+
45
+ declare type __VLS_Props_11 = {
46
+ tag?: string;
47
+ small?: boolean;
48
+ };
49
+
50
+ declare type __VLS_Props_2 = {
51
+ value: string;
52
+ label: string;
53
+ };
54
+
55
+ declare type __VLS_Props_3 = {
56
+ level?: 1 | 2 | 3 | 4 | 5 | 6;
57
+ size?: 1 | 2 | 3 | 4 | 5 | 6;
58
+ separator?: boolean;
59
+ tag?: string;
60
+ };
61
+
62
+ declare type __VLS_Props_4 = {
63
+ name: string;
64
+ scale?: number;
65
+ };
66
+
67
+ declare type __VLS_Props_5 = {
68
+ text?: string;
69
+ icon?: string;
70
+ };
71
+
72
+ declare type __VLS_Props_6 = {
73
+ text?: string;
74
+ url: string;
75
+ external?: boolean;
76
+ };
77
+
78
+ declare type __VLS_Props_7 = {
79
+ shape?: 'circle' | 'squircle' | string;
80
+ };
81
+
82
+ declare type __VLS_Props_8 = {
83
+ text?: string;
84
+ icon?: string;
85
+ };
86
+
87
+ declare type __VLS_Props_9 = {
88
+ heading: string;
89
+ level?: 1 | 2 | 3 | 4 | 5 | 6;
90
+ size?: 1 | 2 | 3 | 4 | 5 | 6;
91
+ separator?: boolean;
92
+ anchor?: string;
93
+ tag?: string;
94
+ };
95
+
96
+ declare function __VLS_template(): {
97
+ attrs: Partial<{}>;
98
+ slots: {
99
+ default?(_: {}): any;
100
+ };
101
+ refs: {};
102
+ rootEl: HTMLAnchorElement;
103
+ };
104
+
105
+ declare function __VLS_template_2(): {
106
+ attrs: Partial<{}>;
107
+ slots: {
108
+ default?(_: {}): any;
109
+ suffix?(_: {}): any;
110
+ };
111
+ refs: {};
112
+ rootEl: any;
113
+ };
114
+
115
+ declare function __VLS_template_3(): {
116
+ attrs: Partial<{}>;
117
+ slots: {
118
+ default?(_: {}): any;
119
+ };
120
+ refs: {};
121
+ rootEl: HTMLDivElement;
122
+ };
123
+
124
+ declare function __VLS_template_4(): {
125
+ attrs: Partial<{}>;
126
+ slots: {
127
+ default?(_: {}): any;
128
+ };
129
+ refs: {};
130
+ rootEl: HTMLAnchorElement;
131
+ };
132
+
133
+ declare function __VLS_template_5(): {
134
+ attrs: Partial<{}>;
135
+ slots: {
136
+ default?(_: {}): any;
137
+ };
138
+ refs: {};
139
+ rootEl: HTMLDivElement;
140
+ };
141
+
142
+ declare function __VLS_template_6(): {
143
+ attrs: Partial<{}>;
144
+ slots: {
145
+ suffix?(_: {}): any;
146
+ default?(_: {}): any;
147
+ };
148
+ refs: {};
149
+ rootEl: any;
150
+ };
151
+
152
+ declare function __VLS_template_7(): {
153
+ attrs: Partial<{}>;
154
+ slots: {
155
+ default?(_: {}): any;
156
+ };
157
+ refs: {};
158
+ rootEl: any;
159
+ };
160
+
161
+ declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
162
+
163
+ declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
164
+
165
+ declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
166
+
167
+ declare type __VLS_TemplateResult_4 = ReturnType<typeof __VLS_template_4>;
168
+
169
+ declare type __VLS_TemplateResult_5 = ReturnType<typeof __VLS_template_5>;
170
+
171
+ declare type __VLS_TemplateResult_6 = ReturnType<typeof __VLS_template_6>;
172
+
173
+ declare type __VLS_TemplateResult_7 = ReturnType<typeof __VLS_template_7>;
174
+
175
+ declare type __VLS_WithTemplateSlots<T, S> = T & {
176
+ new (): {
177
+ $slots: S;
178
+ };
179
+ };
180
+
181
+ declare type __VLS_WithTemplateSlots_2<T, S> = T & {
182
+ new (): {
183
+ $slots: S;
184
+ };
185
+ };
186
+
187
+ declare type __VLS_WithTemplateSlots_3<T, S> = T & {
188
+ new (): {
189
+ $slots: S;
190
+ };
191
+ };
192
+
193
+ declare type __VLS_WithTemplateSlots_4<T, S> = T & {
194
+ new (): {
195
+ $slots: S;
196
+ };
197
+ };
198
+
199
+ declare type __VLS_WithTemplateSlots_5<T, S> = T & {
200
+ new (): {
201
+ $slots: S;
202
+ };
203
+ };
204
+
205
+ declare type __VLS_WithTemplateSlots_6<T, S> = T & {
206
+ new (): {
207
+ $slots: S;
208
+ };
209
+ };
210
+
211
+ declare type __VLS_WithTemplateSlots_7<T, S> = T & {
212
+ new (): {
213
+ $slots: S;
214
+ };
215
+ };
216
+
217
+ export declare const Button: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
218
+
219
+ export declare const Definition: DefineComponent<__VLS_Props_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_2> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
220
+
221
+ export declare const Heading: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
222
+
223
+ export declare const Icon: DefineComponent<__VLS_Props_4, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_4> & Readonly<{}>, {
224
+ scale: number;
225
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLSpanElement>;
226
+
227
+ export declare const Label: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
228
+
229
+ export declare const Link: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
230
+
231
+ export declare const Mask: __VLS_WithTemplateSlots_5<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
232
+
233
+ export declare const Pill: DefineComponent<__VLS_Props_8, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_8> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLSpanElement>;
234
+
235
+ export declare const Section: __VLS_WithTemplateSlots_6<typeof __VLS_component_6, __VLS_TemplateResult_6["slots"]>;
236
+
237
+ export declare const Tag: DefineComponent<__VLS_Props_10, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_10> & Readonly<{}>, {
238
+ large: boolean;
239
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLSpanElement>;
240
+
241
+ declare const Text_2: __VLS_WithTemplateSlots_7<typeof __VLS_component_7, __VLS_TemplateResult_7["slots"]>;
242
+ export { Text_2 as Text }
243
+
244
+ export { }
package/dist/ui.js ADDED
@@ -0,0 +1,305 @@
1
+ import { defineComponent as r, computed as d, openBlock as a, createElementBlock as l, createElementVNode as m, normalizeStyle as k, normalizeClass as g, renderSlot as u, createBlock as i, createCommentVNode as c, toDisplayString as f, resolveDynamicComponent as y, withCtx as h, Fragment as v, ref as $, createTextVNode as b } from "vue";
2
+ const w = {
3
+ class: "inline-block leading-0 print:hidden",
4
+ "aria-hidden": "true"
5
+ }, x = /* @__PURE__ */ r({
6
+ __name: "icon",
7
+ props: {
8
+ name: {},
9
+ scale: { default: 1 }
10
+ },
11
+ setup(e) {
12
+ const t = e, s = d(() => ({
13
+ "font-size": `${t.scale}em`
14
+ }));
15
+ return (n, o) => (a(), l("span", w, [
16
+ m("span", {
17
+ class: g([e.name, "inline-block"]),
18
+ style: k(s.value)
19
+ }, null, 6)
20
+ ]));
21
+ }
22
+ }), _ = ["href", "target", "rel"], z = { class: "min-w-fit" }, P = /* @__PURE__ */ r({
23
+ __name: "button",
24
+ props: {
25
+ icon: {},
26
+ href: {},
27
+ target: {},
28
+ rel: {}
29
+ },
30
+ setup(e) {
31
+ const t = [
32
+ "inline-flex",
33
+ "flex-row",
34
+ "items-center",
35
+ "gap-1rem",
36
+ "cursor-pointer",
37
+ "text-align-center",
38
+ "leading-snug",
39
+ "px-2rem",
40
+ "py-0.75rem",
41
+ "text-1.25rem",
42
+ "text-white",
43
+ "font-500",
44
+ "bg-gray-900",
45
+ "rounded-0.25rem",
46
+ "hover:bg-gray-700",
47
+ "dark:bg-gray-100 dark:text-gray-900 dark:hover:bg-gray-300"
48
+ ];
49
+ return (s, n) => (a(), l("a", {
50
+ href: e.href,
51
+ target: e.target,
52
+ rel: e.rel,
53
+ class: g(t)
54
+ }, [
55
+ m("span", z, [
56
+ u(s.$slots, "default")
57
+ ]),
58
+ e.icon ? (a(), i(x, {
59
+ key: 0,
60
+ name: e.icon
61
+ }, null, 8, ["name"])) : c("", !0)
62
+ ], 8, _));
63
+ }
64
+ }), B = { class: "flex flex-col gap-0" }, C = { class: "text-1.5rem text-gray-800 font-500 dark:text-gray-200" }, M = { class: "text-1.25rem text-gray-600 dark:text-gray-300" }, R = /* @__PURE__ */ r({
65
+ __name: "definition",
66
+ props: {
67
+ value: {},
68
+ label: {}
69
+ },
70
+ setup(e) {
71
+ return (t, s) => (a(), l("div", B, [
72
+ m("p", C, f(e.value), 1),
73
+ m("p", M, f(e.label), 1)
74
+ ]));
75
+ }
76
+ }), S = { class: "min-w-fit" }, D = {
77
+ key: 0,
78
+ class: "rounded-full bg-current grow-1 h-3px w-full print:hidden",
79
+ "aria-hidden": "true"
80
+ }, N = /* @__PURE__ */ r({
81
+ __name: "heading",
82
+ props: {
83
+ level: { default: 1 },
84
+ size: {},
85
+ separator: { type: Boolean, default: !1 },
86
+ tag: {}
87
+ },
88
+ setup(e) {
89
+ const t = e, s = d(() => t.tag || `h${t.level}`), n = d(() => t.size || t.level), o = d(() => ({
90
+ "fluid-heading-1": n.value === 1,
91
+ "fluid-heading-2": n.value === 2,
92
+ "fluid-heading-3": n.value === 3,
93
+ "fluid-heading-4": n.value === 4,
94
+ "fluid-heading-5": n.value === 5,
95
+ "fluid-heading-6": n.value === 6,
96
+ "font-serif": n.value < 4,
97
+ "font-sans": n.value >= 4
98
+ }));
99
+ return (p, F) => (a(), i(y(s.value), {
100
+ class: g([o.value, "flex flex-row gap-0.5em items-center leading-tight font-500"])
101
+ }, {
102
+ default: h(() => [
103
+ m("span", S, [
104
+ u(p.$slots, "default")
105
+ ]),
106
+ e.separator ? (a(), l("span", D)) : c("", !0),
107
+ u(p.$slots, "suffix")
108
+ ]),
109
+ _: 3
110
+ }, 8, ["class"]));
111
+ }
112
+ }), T = { class: "text-1rem text-gray-600 flex flex-row gap-0.5rem items-center dark:text-gray-300" }, V = { key: 1 }, j = { key: 2 }, U = /* @__PURE__ */ r({
113
+ __name: "label",
114
+ props: {
115
+ text: {},
116
+ icon: {}
117
+ },
118
+ setup(e) {
119
+ return (t, s) => (a(), l("div", T, [
120
+ e.icon ? (a(), i(x, {
121
+ key: 0,
122
+ name: e.icon
123
+ }, null, 8, ["name"])) : c("", !0),
124
+ t.$slots.default ? (a(), l("div", V, [
125
+ u(t.$slots, "default")
126
+ ])) : e.text ? (a(), l("p", j, f(e.text), 1)) : c("", !0)
127
+ ]));
128
+ }
129
+ }), q = ["href", "target"], E = { class: "decoration-2px underline-offset-0.25em group-hover/link:underline" }, Z = /* @__PURE__ */ r({
130
+ __name: "link",
131
+ props: {
132
+ text: {},
133
+ url: {},
134
+ external: { type: Boolean, default: !1 }
135
+ },
136
+ setup(e) {
137
+ return (t, s) => (a(), l("a", {
138
+ class: "group/link",
139
+ href: e.url,
140
+ target: e.external ? "_blank" : "_self",
141
+ rel: "noopener noreferrer"
142
+ }, [
143
+ t.$slots.default ? u(t.$slots, "default", { key: 0 }) : e.text ? (a(), l(v, { key: 1 }, [
144
+ m("span", E, f(e.text), 1),
145
+ e.external ? (a(), i(x, {
146
+ key: 0,
147
+ name: "i-ri-arrow-right-up-long-line",
148
+ class: "pos-relative bottom-0.1em align-middle opacity-25 group-hover/link:opacity-100 group-focus/link:opacity-100"
149
+ })) : c("", !0)
150
+ ], 64)) : c("", !0)
151
+ ], 8, q));
152
+ }
153
+ }), G = /* @__PURE__ */ r({
154
+ __name: "mask",
155
+ props: {
156
+ shape: {}
157
+ },
158
+ setup(e) {
159
+ const t = {
160
+ circle: '<circle cx=".5" cy=".5" r=".5" />',
161
+ squircle: '<path d="M .5,0 C .1,0 0,.1 0,.5 0,.9 .1,1 .5,1 .9,1 1,.9 1,.5 1,.1 .9,0 .5,0 Z" />'
162
+ }, s = d(() => {
163
+ if (!e.shape)
164
+ return;
165
+ const o = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1 1">${t[e.shape] || `<path d="${e.shape}" />`}</svg>`;
166
+ return `url("data:image/svg+xml,${encodeURIComponent(o)}")`;
167
+ });
168
+ return (n, o) => (a(), l("div", {
169
+ class: "aspect-square inline-flex select-none items-center justify-center align-middle mask-contain mask-center mask-no-repeat bg-gray-300 dark:bg-gray-700",
170
+ style: k({ "mask-image": s.value })
171
+ }, [
172
+ u(n.$slots, "default")
173
+ ], 4));
174
+ }
175
+ }), I = {
176
+ key: 1,
177
+ class: "font-500 font-serif leading-none shrink-0 grow-0 p-y-0.5em"
178
+ }, L = /* @__PURE__ */ r({
179
+ __name: "pill",
180
+ props: {
181
+ text: {},
182
+ icon: {}
183
+ },
184
+ setup(e) {
185
+ const t = e, s = d(() => ({
186
+ "p-r-1rem": t.text,
187
+ "p-l-1rem": t.text && !t.icon
188
+ }));
189
+ return (n, o) => (a(), l("span", {
190
+ class: g([[s.value], "flex flex-row gap-0.125em items-center rounded-full text-1.25rem layer-theme:text-gray-900 layer-theme:bg-gray-200 layer-theme:hover:bg-gray-300 dark:layer-theme:text-gray-100 dark:layer-theme:bg-gray-800 dark:layer-theme:hover:bg-gray-700"])
191
+ }, [
192
+ e.icon ? (a(), i(x, {
193
+ key: 0,
194
+ name: e.icon,
195
+ scale: 1.25,
196
+ class: g([{ "opacity-50": e.text }, "p-0.5rem shrink-0 grow-0"])
197
+ }, null, 8, ["name", "class"])) : c("", !0),
198
+ e.text ? (a(), l("span", I, f(e.text), 1)) : c("", !0)
199
+ ], 2));
200
+ }
201
+ }), A = ["href"], J = /* @__PURE__ */ r({
202
+ __name: "section",
203
+ props: {
204
+ heading: {},
205
+ level: { default: 2 },
206
+ size: {},
207
+ separator: { type: Boolean, default: !0 },
208
+ anchor: {},
209
+ tag: { default: "section" }
210
+ },
211
+ setup(e) {
212
+ const t = $(!1);
213
+ return (s, n) => (a(), i(y(e.tag), {
214
+ id: e.anchor,
215
+ class: "group/section flex flex-col gap-2.25rem print:gap-1.25rem"
216
+ }, {
217
+ default: h(() => [
218
+ e.heading ? (a(), i(N, {
219
+ key: 0,
220
+ level: e.level,
221
+ separator: e.separator,
222
+ size: e.size
223
+ }, {
224
+ suffix: h(() => [
225
+ t.value ? (a(), i(L, {
226
+ key: 0,
227
+ icon: "i-ri-hashtag"
228
+ })) : u(s.$slots, "suffix", { key: 1 })
229
+ ]),
230
+ default: h(() => [
231
+ e.anchor ? (a(), l("a", {
232
+ key: 0,
233
+ href: `#${e.anchor}`,
234
+ class: "flex items-center",
235
+ onMouseenter: n[0] || (n[0] = (o) => t.value = !0),
236
+ onMouseleave: n[1] || (n[1] = (o) => t.value = !1)
237
+ }, f(e.heading), 41, A)) : (a(), l(v, { key: 1 }, [
238
+ b(f(e.heading), 1)
239
+ ], 64))
240
+ ]),
241
+ _: 3
242
+ }, 8, ["level", "separator", "size"])) : c("", !0),
243
+ m("div", null, [
244
+ u(s.$slots, "default")
245
+ ])
246
+ ]),
247
+ _: 3
248
+ }, 8, ["id"]));
249
+ }
250
+ }), K = /* @__PURE__ */ r({
251
+ __name: "tag",
252
+ props: {
253
+ label: {},
254
+ icon: {},
255
+ large: { type: Boolean, default: !1 }
256
+ },
257
+ setup(e) {
258
+ const t = e, s = d(() => ({
259
+ "px-0.5em py-0.125em": !t.large,
260
+ "text-1.25rem px-1.25em py-0.5em": t.large
261
+ }));
262
+ return (n, o) => (a(), l("span", {
263
+ class: g([s.value, "flex flex-row gap-0.25em items-center justify-center rounded-0.25rem layer-theme:text-gray-600 layer-theme:bg-gray-200 layer-theme:dark:text-gray-300 layer-theme:dark:bg-gray-800"])
264
+ }, [
265
+ m("span", null, f(e.label), 1),
266
+ e.icon ? (a(), i(x, {
267
+ key: 0,
268
+ name: e.icon
269
+ }, null, 8, ["name"])) : c("", !0)
270
+ ], 2));
271
+ }
272
+ }), O = /* @__PURE__ */ r({
273
+ __name: "text",
274
+ props: {
275
+ tag: { default: "div" },
276
+ small: { type: Boolean, default: !1 }
277
+ },
278
+ setup(e) {
279
+ const t = e, s = d(() => ({
280
+ "fluid-text-regular": !t.small,
281
+ "fluid-text-small": t.small
282
+ }));
283
+ return (n, o) => (a(), i(y(e.tag), {
284
+ class: g([s.value, "flex flex-col items-start gap-1em leading-snug"])
285
+ }, {
286
+ default: h(() => [
287
+ u(n.$slots, "default")
288
+ ]),
289
+ _: 3
290
+ }, 8, ["class"]));
291
+ }
292
+ });
293
+ export {
294
+ P as Button,
295
+ R as Definition,
296
+ N as Heading,
297
+ x as Icon,
298
+ U as Label,
299
+ Z as Link,
300
+ G as Mask,
301
+ L as Pill,
302
+ J as Section,
303
+ K as Tag,
304
+ O as Text
305
+ };
package/package.json ADDED
@@ -0,0 +1,90 @@
1
+ {
2
+ "name": "@thasmo/ui",
3
+ "type": "module",
4
+ "version": "1.0.0",
5
+ "packageManager": "pnpm@10.28.1",
6
+ "description": "UI for personal web projects.",
7
+ "license": "MIT",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/thasmo/ui.git"
11
+ },
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/ui.d.ts",
15
+ "import": "./dist/ui.js"
16
+ },
17
+ "./preset": {
18
+ "types": "./dist/preset.d.ts",
19
+ "import": "./dist/preset.js"
20
+ },
21
+ "./styles": "./dist/ui.css"
22
+ },
23
+ "main": "./dist/ui.js",
24
+ "types": "./dist/ui.d.ts",
25
+ "files": [
26
+ "./dist/"
27
+ ],
28
+ "engines": {
29
+ "node": ">=24",
30
+ "pnpm": ">=10"
31
+ },
32
+ "scripts": {
33
+ "dev": "concurrently --group --prefix-colors 'auto' 'pnpm:dev:*'",
34
+ "dev:watch": "vite build --watch",
35
+ "dev:storybook": "storybook dev",
36
+ "build": "vite build",
37
+ "prepack": "vite build",
38
+ "prepare": "concurrently --group --prefix-colors 'auto' 'pnpm:prepare:*'",
39
+ "prepare:husky": "husky",
40
+ "lint": "concurrently --group --prefix-colors 'auto' 'pnpm:lint:*'",
41
+ "lint:types": "vue-tsc --build",
42
+ "lint:eslint": "eslint .",
43
+ "lint:cspell": "cspell --no-progress --no-summary --no-must-find-files .",
44
+ "lint:knip": "knip --no-progress",
45
+ "fix": "concurrently --group --prefix-colors 'auto' 'pnpm:fix:*'",
46
+ "fix:eslint": "eslint --fix .",
47
+ "fix:knip": "knip --fix --no-progress --workspace ."
48
+ },
49
+ "peerDependencies": {
50
+ "unocss": "^66.6.0",
51
+ "vue": "^3.5.26"
52
+ },
53
+ "devDependencies": {
54
+ "@commitlint/cli": "^20.0.0",
55
+ "@iconify-json/ri": "^1.2.8",
56
+ "@somehow-digital/commitlint-config": "^1.0.0",
57
+ "@somehow-digital/cspell-dictionary": "^2.0.0",
58
+ "@somehow-digital/eslint-config": "^4.0.0",
59
+ "@somehow-digital/semantic-release-config": "^2.0.0",
60
+ "@somehow-digital/unocss-preset": "^2.0.0",
61
+ "@storybook/addon-docs": "^10.2.0",
62
+ "@storybook/addon-themes": "^10.2.0",
63
+ "@storybook/vue3-vite": "^10.2.0",
64
+ "@tsconfig/node24": "^24.0.4",
65
+ "@types/node": "^24.10.9",
66
+ "@unocss/preset-web-fonts": "^66.6.0",
67
+ "@vitejs/plugin-vue": "^6.0.3",
68
+ "@vue/tsconfig": "^0.8.1",
69
+ "concurrently": "^9.1.0",
70
+ "cspell": "^9.0.0",
71
+ "eslint": "^9.17.0",
72
+ "husky": "^9.1.7",
73
+ "knip": "^5.40.0",
74
+ "lint-staged": "^16.0.0",
75
+ "semantic-release": "^25.0.2",
76
+ "storybook": "^10.2.0",
77
+ "typescript": "^5.9.3",
78
+ "unocss": "^66.0.0",
79
+ "vite": "^7.3.1",
80
+ "vite-plugin-dts": "^4.5.4",
81
+ "vite-plugin-vue-devtools": "^8.0.5",
82
+ "vue-tsc": "^3.2.2"
83
+ },
84
+ "pnpm": {
85
+ "onlyBuiltDependencies": [
86
+ "esbuild",
87
+ "vue-demi"
88
+ ]
89
+ }
90
+ }