dirdoc-ui 1.0.2 → 1.0.3

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.
@@ -0,0 +1,202 @@
1
+ /*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
2
+ @layer properties;
3
+ .flex {
4
+ display: flex;
5
+ }
6
+ .w-full {
7
+ width: 100%;
8
+ }
9
+ .cursor-pointer {
10
+ cursor: pointer;
11
+ }
12
+ .items-center {
13
+ align-items: center;
14
+ }
15
+ .justify-center {
16
+ justify-content: center;
17
+ }
18
+ .rounded-full {
19
+ border-radius: calc(infinity * 1px);
20
+ }
21
+ .border {
22
+ border-style: var(--tw-border-style);
23
+ border-width: 1px;
24
+ }
25
+ .border-1 {
26
+ border-style: var(--tw-border-style);
27
+ border-width: 1px;
28
+ }
29
+ .border-solid {
30
+ --tw-border-style: solid;
31
+ border-style: solid;
32
+ }
33
+ .bg-\[var\(--color-surface-container\)\] {
34
+ background-color: var(--color-surface-container);
35
+ }
36
+ .bg-transparent {
37
+ background-color: transparent;
38
+ }
39
+ .text-\[var\(--color-inverse-surface\)\] {
40
+ color: var(--color-inverse-surface);
41
+ }
42
+ .hover\:brightness-98 {
43
+ &:hover {
44
+ @media (hover: hover) {
45
+ --tw-brightness: brightness(98%);
46
+ filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
47
+ }
48
+ }
49
+ }
50
+ .focus\:outline-none {
51
+ &:focus {
52
+ --tw-outline-style: none;
53
+ outline-style: none;
54
+ }
55
+ }
56
+ @layer base {
57
+ :root {
58
+ --color-primary: #294675;
59
+ --color-primary-dark: #223c6a;
60
+ --color-primary-darker: #00296b;
61
+ --color-yellow: #e69b0a;
62
+ --color-accent: #fdc500;
63
+ --color-accent-light: #ffd500;
64
+ --default-transition-duration: 50ms;
65
+ --color-surface: #ffffff;
66
+ --color-gray-light: #f1f1f1;
67
+ --color-gray-darker: #5c5c5c;
68
+ --color-surface-container-lowest: #ffffff;
69
+ --color-surface-container-low: #dbe1e7;
70
+ --color-surface-container: #e9eef6;
71
+ --color-surface-container-high: #e7e9e9;
72
+ --color-surface-container-highest: #e1e3da;
73
+ --color-gray: #9e9e9e;
74
+ --color-on-primary: rgb(255, 255, 255);
75
+ --color-primary-container: #d0e4ff;
76
+ --color-on-primary-container: #001c3a;
77
+ --color-secondary: #bcc8dc;
78
+ --color-on-secondary: #273141;
79
+ --color-secondary-container: #3d4858;
80
+ --color-on-secondary-container: #d8e4f8;
81
+ --color-tertiary: #d8bce0;
82
+ --color-on-tertiary: #9f9f50;
83
+ --color-tertiary-container: #53405e;
84
+ --color-on-tertiary-container: #f6dafe;
85
+ --color-tertiary: rgb(62, 101, 102);
86
+ --color-on-tertiary: rgb(255, 255, 255);
87
+ --color-tertiary-container: rgb(192, 234, 236);
88
+ --color-on-tertiary-container: rgb(4, 32, 32);
89
+ --color-error: rgb(178, 39, 34);
90
+ --color-on-error: rgb(255, 255, 255);
91
+ --color-error-container: rgb(252, 219, 215);
92
+ --color-on-error-container: rgb(62, 3, 4);
93
+ --color-shadow: rgb(0, 0, 0);
94
+ --color-scrim: rgb(0, 0, 0);
95
+ --color-primary-fixed: rgb(188, 242, 153);
96
+ --color-on-primary-fixed: rgb(9, 33, 1);
97
+ --color-primary-fixed-dim: rgb(160, 213, 127);
98
+ --color-on-primary-fixed-variant: rgb(37, 81, 11);
99
+ --color-secondary-fixed: rgb(218, 231, 204);
100
+ --color-on-secondary-fixed: rgb(20, 31, 13);
101
+ --color-secondary-fixed-dim: rgb(190, 203, 177);
102
+ --color-on-secondary-fixed-variant: rgb(63, 74, 53);
103
+ --color-tertiary-fixed: rgb(192, 234, 236);
104
+ --color-on-tertiary-fixed: rgb(4, 32, 32);
105
+ --color-tertiary-fixed-dim: rgb(165, 206, 207);
106
+ --color-on-tertiary-fixed-variant: rgb(37, 77, 78);
107
+ --color-surface-dim: rgb(217, 219, 209);
108
+ --color-surface-bright: rgb(248, 250, 240);
109
+ --color-background: #fbfcfe;
110
+ --color-on-background: #1a1c1e;
111
+ --color-surface: #fbfcfe;
112
+ --color-on-surface: #1a1c1e;
113
+ --color-surface-variant: #dee3eb;
114
+ --color-on-surface-variant: #42474e;
115
+ --color-outline: #72777f;
116
+ --color-outline-variant: #c1c6ce;
117
+ --color-inverse-primary: #9cbcff;
118
+ --color-inverse-surface: #454f5e;
119
+ --color-inverse-on-surface: #ffffff;
120
+ --color-scrim: #000000;
121
+ --color-surface-container-lowest-variant: #f8fafd;
122
+ --color-surface-container-low-variant: #e69b0a;
123
+ }
124
+ }
125
+ @property --tw-border-style {
126
+ syntax: "*";
127
+ inherits: false;
128
+ initial-value: solid;
129
+ }
130
+ @property --tw-blur {
131
+ syntax: "*";
132
+ inherits: false;
133
+ }
134
+ @property --tw-brightness {
135
+ syntax: "*";
136
+ inherits: false;
137
+ }
138
+ @property --tw-contrast {
139
+ syntax: "*";
140
+ inherits: false;
141
+ }
142
+ @property --tw-grayscale {
143
+ syntax: "*";
144
+ inherits: false;
145
+ }
146
+ @property --tw-hue-rotate {
147
+ syntax: "*";
148
+ inherits: false;
149
+ }
150
+ @property --tw-invert {
151
+ syntax: "*";
152
+ inherits: false;
153
+ }
154
+ @property --tw-opacity {
155
+ syntax: "*";
156
+ inherits: false;
157
+ }
158
+ @property --tw-saturate {
159
+ syntax: "*";
160
+ inherits: false;
161
+ }
162
+ @property --tw-sepia {
163
+ syntax: "*";
164
+ inherits: false;
165
+ }
166
+ @property --tw-drop-shadow {
167
+ syntax: "*";
168
+ inherits: false;
169
+ }
170
+ @property --tw-drop-shadow-color {
171
+ syntax: "*";
172
+ inherits: false;
173
+ }
174
+ @property --tw-drop-shadow-alpha {
175
+ syntax: "<percentage>";
176
+ inherits: false;
177
+ initial-value: 100%;
178
+ }
179
+ @property --tw-drop-shadow-size {
180
+ syntax: "*";
181
+ inherits: false;
182
+ }
183
+ @layer properties {
184
+ @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
185
+ *, ::before, ::after, ::backdrop {
186
+ --tw-border-style: solid;
187
+ --tw-blur: initial;
188
+ --tw-brightness: initial;
189
+ --tw-contrast: initial;
190
+ --tw-grayscale: initial;
191
+ --tw-hue-rotate: initial;
192
+ --tw-invert: initial;
193
+ --tw-opacity: initial;
194
+ --tw-saturate: initial;
195
+ --tw-sepia: initial;
196
+ --tw-drop-shadow: initial;
197
+ --tw-drop-shadow-color: initial;
198
+ --tw-drop-shadow-alpha: 100%;
199
+ --tw-drop-shadow-size: initial;
200
+ }
201
+ }
202
+ }
package/dist/index.cjs.js CHANGED
@@ -10,7 +10,7 @@ var DButton = vue.defineComponent({
10
10
  required: false,
11
11
  default: ''
12
12
  },
13
- url: {
13
+ uri: {
14
14
  type: String,
15
15
  required: false,
16
16
  default: ''
@@ -21,7 +21,7 @@ var DButton = vue.defineComponent({
21
21
  },
22
22
  variant: {
23
23
  type: String,
24
- default: 'primary'
24
+ default: 'default'
25
25
  },
26
26
  disabled: {
27
27
  type: Boolean,
@@ -31,41 +31,64 @@ var DButton = vue.defineComponent({
31
31
  type: [String, Object, Function],
32
32
  default: null
33
33
  },
34
+ prepend: {
35
+ type: [String, Object, Function],
36
+ default: null
37
+ },
38
+ append: {
39
+ type: [String, Object, Function],
40
+ default: null,
41
+ },
34
42
  },
35
43
  emits: ['click'],
36
44
  setup(props, ctx) {
37
45
  const { slots, emit } = ctx;
38
- const base = 'flex items-center justify-center py-2 px-3 rounded-xl focus:outline-none';
39
- const icon = 'flex items-center justify-center w-10 h-10 rounded-full ';
46
+ const base = 'justify-center py-2 px-4 rounded-full cursor-pointer focus:outline-none';
47
+ const icon = 'flex items-center justify-center w-10 h-10 cursor-pointer rounded-full ';
40
48
  const variants = {
41
- primary: 'bg-blue-900 hover:bg-blue-950',
42
- secondary: 'bg-gray-200 hover:bg-gray-300',
49
+ default: 'bg-[var(--color-surface-container)] text-[var(--color-inverse-surface)] hover:brightness-98',
50
+ outlined: 'bg-transparent border border-1 border-solid border-black',
43
51
  };
44
52
  function onClick(e) {
45
53
  if (props.disabled)
46
54
  return;
47
55
  emit('click', e);
48
56
  }
57
+ function renderIcon(iconProp, type) {
58
+ const marginClass = type === 'prepend' ? 'mr-2' : type === 'append' ? 'ml-2' : '';
59
+ if (!iconProp)
60
+ return null;
61
+ return typeof iconProp === 'string' ? vue.h('i', { class: `${iconProp} mdi ${marginClass}` }) : vue.h(iconProp, { class: marginClass });
62
+ }
49
63
  return () => {
50
64
  const children = slots.default ? slots.default() : props.label;
65
+ const prependIcon = renderIcon(props.prepend, 'prepend');
66
+ const appendIcon = renderIcon(props.append, 'append');
51
67
  if (props.icon) {
52
- return vue.h(props.url ? 'a' : 'button', {
68
+ return vue.h(props.uri ? 'a' : 'button', {
53
69
  type: props.type,
54
70
  class: `${icon} ${variants[props.variant]} ${props.disabled ? '' : ''} focus:outline-none`,
55
71
  disabled: props.disabled,
56
- href: props.url,
72
+ href: props.uri,
57
73
  onClick,
58
74
  }, [
75
+ prependIcon,
59
76
  typeof props.icon === 'string' ? vue.h('i', { class: props.icon + ' mdi' }) : vue.h(props.icon),
77
+ appendIcon,
60
78
  children
61
- ]);
79
+ ].filter(Boolean));
62
80
  }
63
- return vue.h(props.url ? 'a' : 'button', {
81
+ return vue.h(props.uri ? 'button' : 'button', {
64
82
  type: props.type,
65
- class: `${base} ${variants[props.variant]} ${props.disabled ? 'opacity-50' : ''}`,
83
+ class: `${base} ${variants[props.variant]} ${props.disabled ? '' : ''}`,
66
84
  disabled: props.disabled,
85
+ href: props.uri,
67
86
  onClick
68
- }, children);
87
+ }, [
88
+ prependIcon,
89
+ children,
90
+ appendIcon
91
+ ].filter(Boolean));
69
92
  };
70
93
  }
71
94
  });
@@ -84,7 +107,7 @@ var DSkeletonLoader = vue.defineComponent({
84
107
  },
85
108
  setup(props, ctx) {
86
109
  const { slots } = ctx;
87
- const base = 'bg-gray-100 dark:bg-gray-200';
110
+ const base = 'bg-gray-50 dark:bg-gray-100';
88
111
  const animations = {
89
112
  pulse: 'animate-pulse',
90
113
  wave: 'animate-wave'
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../src/components/DButton/DButton.tsx","../src/components/DSkeleton/DSkeletonLoader.tsx","../src/index.ts"],"sourcesContent":["import { defineComponent, h, PropType, SetupContext, VNode } from 'vue'\n\nexport interface UseLink {\n navigate: () => void | null\n}\nexport default defineComponent({\n name: 'DButton',\n props: {\n label: {\n type: String as PropType<string>,\n required: false,\n default: ''\n },\n url: {\n type: String as PropType<string>,\n required: false,\n default: ''\n },\n type: {\n type: String as PropType<'button' | 'submit' | 'reset'>,\n default: 'button'\n },\n variant: {\n type: String as PropType<'primary' | 'secondary'>,\n default: 'primary'\n },\n disabled: {\n type: Boolean as PropType<boolean>,\n default: false\n },\n icon: {\n type: [String, Object, Function] as PropType<string | object | (() => VNode) | VNode | null>,\n default: null\n },\n },\n emits: ['click'],\n setup(props: Record<string, any>, ctx: SetupContext) {\n const { slots, emit } = ctx\n const base = 'flex items-center justify-center py-2 px-3 rounded-xl focus:outline-none'\n const icon = 'flex items-center justify-center w-10 h-10 rounded-full '\n const variants: Record<string, string> = {\n primary: 'bg-blue-900 hover:bg-blue-950',\n secondary: 'bg-gray-200 hover:bg-gray-300',\n }\n\n function onClick(e: MouseEvent) {\n if (props.disabled) return\n emit('click', e)\n }\n\n return (): VNode => {\n const children = slots.default ? slots.default() : props.label\n if (props.icon) {\n return h(\n props.url ? 'a' : 'button',\n {\n type: props.type,\n class: `${icon} ${variants[props.variant]} ${props.disabled ? '' : ''} focus:outline-none`,\n disabled: props.disabled,\n href: props.url,\n onClick,\n },\n [\n typeof props.icon === 'string' ? h('i', { class: props.icon + ' mdi' }, ) : h(props.icon),\n children\n ]\n )\n }\n \n return h(\n props.url ? 'a' : 'button',\n {\n type: props.type,\n class: `${base} ${variants[props.variant]} ${props.disabled ? 'opacity-50' : ''}`,\n disabled: props.disabled,\n onClick\n },\n children\n )\n }\n }\n})\n","import { defineComponent, PropType, h, SetupContext, VNode } from 'vue'\nexport default defineComponent({\n name: 'DSkeletonLoader',\n props: {\n animation: {\n type: String as PropType<'pulse' | 'wave'>, \n default: 'pulse'\n },\n type: {\n type: String as PropType<'text' | 'circle' | 'avatar'>,\n default: 'text'\n }\n },\n \n\n setup(props: Record<string, any>, ctx: SetupContext) {\n const { slots } = ctx\n\n const base = 'bg-gray-100 dark:bg-gray-200'\n const animations: Record<string, string> = {\n pulse: 'animate-pulse',\n wave: 'animate-wave'\n }\n const types: Record<string, string> = {\n text: 'rounded-full w-full p-2',\n circle: 'rounded-full',\n avatar: 'rounded-full w-10 h-10 ',\n }\n const children = slots.default ? slots.default() : props.label\n\n return (): VNode => {\n return h(\n children ? 'div' :\n 'div',\n {\n class: `${animations[props.animation]} `,\n },\n [\n h('div', { class: ` ${base} ${types[props.type]}` }),\n ],\n \n \n )\n }\n}\n\n})\n","export * from './components/DButton'\nexport * from './components/DSkeleton'\nexport interface UIOptions {\n components?: Record<string, any>\n}\n\nexport function createDirdocUI( options: UIOptions = {}) {\n const { components = {} } = options\n\n return {\n install(app: any) {\n for (const key in components) {\n app.component(key, components[key])\n }\n }\n }\n}"],"names":["defineComponent","h"],"mappings":";;;;AAKA,cAAeA,mBAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,SAAS;AACf,IAAA,KAAK,EAAE;AACL,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,MAA0B;AAChC,YAAA,QAAQ,EAAE,KAAK;AACf,YAAA,OAAO,EAAE;AACV,SAAA;AACD,QAAA,GAAG,EAAE;AACH,YAAA,IAAI,EAAE,MAA0B;AAChC,YAAA,QAAQ,EAAE,KAAK;AACf,YAAA,OAAO,EAAE;AACV,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,IAAI,EAAE,MAAiD;AACvD,YAAA,OA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AAE,yBAAyB;AAC/B,YAAA,MAAM,EAAE,cAAc;AACtB,YAAA,MAAM,EAAE,0BAA0B;SACnC;AACD,QAAA,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,KAAK;AAE9D,QAAA,OAAO,MAAY;YACjB,OAAOC,KAAC,CACN,QAAQ,GAAG,KAAK;AAChB,gBAAA,KAAK,EACL;gBACE,KAAK,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA,CAAA,CAAG;aACzC,EACD;AACE,gBAAAA,KAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAA,CAAA,EAAI,IAAI,CAAA,CAAA,EAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA,CAAE,EAAE,CAAC;AACrD,aAAA,CAGF;AACH,QAAA,CAAC;IACL;AAEC,CAAA,CAAC;;ACxCI,SAAU,cAAc,CAAE,OAAA,GAAqB,EAAE,EAAA;AACnD,IAAA,MAAM,EAAE,UAAU,GAAG,EAAE,EAAE,GAAG,OAAO;IAEnC,OAAO;AACH,QAAA,OAAO,CAAC,GAAQ,EAAA;AACZ,YAAA,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE;gBAC1B,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;YACvC;QACJ;KACH;AACL;;;;;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../src/components/DButton/DButton.tsx","../src/components/DSkeleton/DSkeletonLoader.tsx","../src/index.ts"],"sourcesContent":["import { defineComponent, h, PropType, SetupContext, VNode } from 'vue'\nimport '../styles/style.css'\nexport interface UseLink {\n navigate: () => void | null\n}\nexport default defineComponent({\n name: 'DButton',\n props: {\n label: {\n type: String as PropType<string>,\n required: false,\n default: ''\n },\n uri: {\n type: String as PropType<string>,\n required: false,\n default: ''\n },\n type: {\n type: String as PropType<'button' | 'submit' | 'reset'>,\n default: 'button'\n },\n variant: {\n type: String as PropType<'default' | 'outlined'>,\n default: 'default'\n },\n disabled: {\n type: Boolean as PropType<boolean>,\n default: false\n },\n icon: {\n type: [String, Object, Function] as PropType<string | object | (() => VNode) | VNode | null>,\n default: null\n },\n prepend: {\n type: [String, Object, Function] as PropType<string | object | (() => VNode) | VNode | null>,\n default: null\n },\n append:{\n type: [String, Object, Function] as PropType<string | object | (() => VNode) | VNode | null>,\n default: null,\n },\n },\n emits: ['click'],\n setup(props: Record<string, any>, ctx: SetupContext) {\n const { slots, emit } = ctx\n const base = 'justify-center py-2 px-4 rounded-full cursor-pointer focus:outline-none'\n const icon = 'flex items-center justify-center w-10 h-10 cursor-pointer rounded-full '\n const variants: Record<string, string> = {\n default: 'bg-[var(--color-surface-container)] text-[var(--color-inverse-surface)] hover:brightness-98',\n outlined: 'bg-transparent border border-1 border-solid border-black',\n }\n\n function onClick(e: MouseEvent) {\n if (props.disabled) return\n emit('click', e)\n }\n function renderIcon(iconProp: any, type?: 'prepend' | 'append'): VNode | null {\n const marginClass = type === 'prepend' ? 'mr-2' : type === 'append' ? 'ml-2' : ''\n if (!iconProp) return null\n return typeof iconProp === 'string' ? h('i', { class: `${iconProp} mdi ${marginClass}`}) : h(iconProp, { class: marginClass })\n }\n\n return (): VNode => {\n const children = slots.default ? slots.default() : props.label\n const prependIcon = renderIcon(props.prepend, 'prepend')\n const appendIcon = renderIcon(props.append, 'append')\n if (props.icon) {\n return h(\n props.uri ? 'a' : 'button',\n {\n type: props.type,\n class: `${icon} ${variants[props.variant]} ${props.disabled ? '' : ''} focus:outline-none`,\n disabled: props.disabled,\n href: props.uri,\n onClick,\n },\n [\n prependIcon,\n typeof props.icon === 'string' ? h('i', { class: props.icon + ' mdi' }, ) : h(props.icon),\n appendIcon,\n children\n ].filter(Boolean)\n )\n }\n \n return h(\n props.uri ? 'button' : 'button',\n {\n type: props.type,\n class: `${base} ${variants[props.variant]} ${props.disabled ? '' : ''}`,\n disabled: props.disabled,\n href: props.uri,\n onClick\n },\n [\n prependIcon,\n children,\n appendIcon\n ].filter(Boolean)\n )\n }\n }\n})\n","import { defineComponent, PropType, h, SetupContext, VNode } from 'vue'\nexport default defineComponent({\n name: 'DSkeletonLoader',\n props: {\n animation: {\n type: String as PropType<'pulse' | 'wave'>, \n default: 'pulse'\n },\n type: {\n type: String as PropType<'text' | 'circle' | 'avatar'>,\n default: 'text'\n }\n },\n \n\n setup(props: Record<string, any>, ctx: SetupContext) {\n const { slots } = ctx\n\n const base = 'bg-gray-50 dark:bg-gray-100'\n const animations: Record<string, string> = {\n pulse: 'animate-pulse',\n wave: 'animate-wave'\n }\n const types: Record<string, string> = {\n text: 'rounded-full w-full p-2',\n circle: 'rounded-full',\n avatar: 'rounded-full w-10 h-10 ',\n }\n const children = slots.default ? slots.default() : props.label\n\n return (): VNode => {\n return h(\n children ? 'div' :\n 'div',\n {\n class: `${animations[props.animation]} `,\n },\n [\n h('div', { class: ` ${base} ${types[props.type]}` }),\n ],\n \n \n )\n }\n}\n\n})\n","export * from './components/DButton'\nexport * from './components/DSkeleton'\nexport interface UIOptions {\n components?: Record<string, any>\n}\n\nexport function createDirdocUI( options: UIOptions = {}) {\n const { components = {} } = options\n\n return {\n install(app: any) {\n for (const key in components) {\n app.component(key, components[key])\n }\n }\n }\n}\n\nimport './components/styles/style.css'"],"names":["defineComponent","h"],"mappings":";;;;AAKA,cAAeA,mBAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,SAAS;AACf,IAAA,KAAK,EAAE;AACL,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,MAA0B;AAChC,YAAA,QAAQ,EAAE,KAAK;AACf,YAAA,OAAO,EAAE;AACV,SAAA;AACD,QAAA,GAAG,EAAE;AACH,YAAA,IAAI,EAAE,MAA0B;AAChC,YAAA,QAAQ,EAAE,KAAK;AACf,YAAA,OAAO,EAAE;AACV,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,IAAI,EAAE,MAAiD;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AAY;YACjB,OAAOC,KAAC,CACN,QAAQ,GAAG,KAAK;AAChB,gBAAA,KAAK,EACL;gBACE,KAAK,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA,CAAA,CAAG;aACzC,EACD;AACE,gBAAAA,KAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAA,CAAA,EAAI,IAAI,CAAA,CAAA,EAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA,CAAE,EAAE,CAAC;AACrD,aAAA,CAGF;AACH,QAAA,CAAC;IACL;AAEC,CAAA,CAAC;;ACxCI,SAAU,cAAc,CAAE,OAAA,GAAqB,EAAE,EAAA;AACnD,IAAA,MAAM,EAAE,UAAU,GAAG,EAAE,EAAE,GAAG,OAAO;IAEnC,OAAO;AACH,QAAA,OAAO,CAAC,GAAQ,EAAA;AACZ,YAAA,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE;gBAC1B,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;YACvC;QACJ;KACH;AACL;;;;;;"}
package/dist/index.d.ts CHANGED
@@ -7,13 +7,19 @@ declare const _default$1: vue.DefineComponent<{
7
7
  [x: string]: /*elided*/ any;
8
8
  }> & Readonly<{}>, {
9
9
  label: string;
10
- url: string;
10
+ uri: string;
11
11
  type: "button" | "submit" | "reset";
12
- variant: "primary" | "secondary";
12
+ variant: "default" | "outlined";
13
13
  disabled: boolean;
14
14
  icon: string | object | (() => VNode) | VNode<vue.RendererNode, vue.RendererElement, {
15
15
  [key: string]: any;
16
16
  }> | null;
17
+ prepend: string | object | VNode<vue.RendererNode, vue.RendererElement, {
18
+ [key: string]: any;
19
+ }> | (() => VNode) | null;
20
+ append: string | object | VNode<vue.RendererNode, vue.RendererElement, {
21
+ [key: string]: any;
22
+ }> | (() => VNode) | null;
17
23
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
18
24
 
19
25
  declare const _default: vue.DefineComponent<{
@@ -0,0 +1,202 @@
1
+ /*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
2
+ @layer properties;
3
+ .flex {
4
+ display: flex;
5
+ }
6
+ .w-full {
7
+ width: 100%;
8
+ }
9
+ .cursor-pointer {
10
+ cursor: pointer;
11
+ }
12
+ .items-center {
13
+ align-items: center;
14
+ }
15
+ .justify-center {
16
+ justify-content: center;
17
+ }
18
+ .rounded-full {
19
+ border-radius: calc(infinity * 1px);
20
+ }
21
+ .border {
22
+ border-style: var(--tw-border-style);
23
+ border-width: 1px;
24
+ }
25
+ .border-1 {
26
+ border-style: var(--tw-border-style);
27
+ border-width: 1px;
28
+ }
29
+ .border-solid {
30
+ --tw-border-style: solid;
31
+ border-style: solid;
32
+ }
33
+ .bg-\[var\(--color-surface-container\)\] {
34
+ background-color: var(--color-surface-container);
35
+ }
36
+ .bg-transparent {
37
+ background-color: transparent;
38
+ }
39
+ .text-\[var\(--color-inverse-surface\)\] {
40
+ color: var(--color-inverse-surface);
41
+ }
42
+ .hover\:brightness-98 {
43
+ &:hover {
44
+ @media (hover: hover) {
45
+ --tw-brightness: brightness(98%);
46
+ filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
47
+ }
48
+ }
49
+ }
50
+ .focus\:outline-none {
51
+ &:focus {
52
+ --tw-outline-style: none;
53
+ outline-style: none;
54
+ }
55
+ }
56
+ @layer base {
57
+ :root {
58
+ --color-primary: #294675;
59
+ --color-primary-dark: #223c6a;
60
+ --color-primary-darker: #00296b;
61
+ --color-yellow: #e69b0a;
62
+ --color-accent: #fdc500;
63
+ --color-accent-light: #ffd500;
64
+ --default-transition-duration: 50ms;
65
+ --color-surface: #ffffff;
66
+ --color-gray-light: #f1f1f1;
67
+ --color-gray-darker: #5c5c5c;
68
+ --color-surface-container-lowest: #ffffff;
69
+ --color-surface-container-low: #dbe1e7;
70
+ --color-surface-container: #e9eef6;
71
+ --color-surface-container-high: #e7e9e9;
72
+ --color-surface-container-highest: #e1e3da;
73
+ --color-gray: #9e9e9e;
74
+ --color-on-primary: rgb(255, 255, 255);
75
+ --color-primary-container: #d0e4ff;
76
+ --color-on-primary-container: #001c3a;
77
+ --color-secondary: #bcc8dc;
78
+ --color-on-secondary: #273141;
79
+ --color-secondary-container: #3d4858;
80
+ --color-on-secondary-container: #d8e4f8;
81
+ --color-tertiary: #d8bce0;
82
+ --color-on-tertiary: #9f9f50;
83
+ --color-tertiary-container: #53405e;
84
+ --color-on-tertiary-container: #f6dafe;
85
+ --color-tertiary: rgb(62, 101, 102);
86
+ --color-on-tertiary: rgb(255, 255, 255);
87
+ --color-tertiary-container: rgb(192, 234, 236);
88
+ --color-on-tertiary-container: rgb(4, 32, 32);
89
+ --color-error: rgb(178, 39, 34);
90
+ --color-on-error: rgb(255, 255, 255);
91
+ --color-error-container: rgb(252, 219, 215);
92
+ --color-on-error-container: rgb(62, 3, 4);
93
+ --color-shadow: rgb(0, 0, 0);
94
+ --color-scrim: rgb(0, 0, 0);
95
+ --color-primary-fixed: rgb(188, 242, 153);
96
+ --color-on-primary-fixed: rgb(9, 33, 1);
97
+ --color-primary-fixed-dim: rgb(160, 213, 127);
98
+ --color-on-primary-fixed-variant: rgb(37, 81, 11);
99
+ --color-secondary-fixed: rgb(218, 231, 204);
100
+ --color-on-secondary-fixed: rgb(20, 31, 13);
101
+ --color-secondary-fixed-dim: rgb(190, 203, 177);
102
+ --color-on-secondary-fixed-variant: rgb(63, 74, 53);
103
+ --color-tertiary-fixed: rgb(192, 234, 236);
104
+ --color-on-tertiary-fixed: rgb(4, 32, 32);
105
+ --color-tertiary-fixed-dim: rgb(165, 206, 207);
106
+ --color-on-tertiary-fixed-variant: rgb(37, 77, 78);
107
+ --color-surface-dim: rgb(217, 219, 209);
108
+ --color-surface-bright: rgb(248, 250, 240);
109
+ --color-background: #fbfcfe;
110
+ --color-on-background: #1a1c1e;
111
+ --color-surface: #fbfcfe;
112
+ --color-on-surface: #1a1c1e;
113
+ --color-surface-variant: #dee3eb;
114
+ --color-on-surface-variant: #42474e;
115
+ --color-outline: #72777f;
116
+ --color-outline-variant: #c1c6ce;
117
+ --color-inverse-primary: #9cbcff;
118
+ --color-inverse-surface: #454f5e;
119
+ --color-inverse-on-surface: #ffffff;
120
+ --color-scrim: #000000;
121
+ --color-surface-container-lowest-variant: #f8fafd;
122
+ --color-surface-container-low-variant: #e69b0a;
123
+ }
124
+ }
125
+ @property --tw-border-style {
126
+ syntax: "*";
127
+ inherits: false;
128
+ initial-value: solid;
129
+ }
130
+ @property --tw-blur {
131
+ syntax: "*";
132
+ inherits: false;
133
+ }
134
+ @property --tw-brightness {
135
+ syntax: "*";
136
+ inherits: false;
137
+ }
138
+ @property --tw-contrast {
139
+ syntax: "*";
140
+ inherits: false;
141
+ }
142
+ @property --tw-grayscale {
143
+ syntax: "*";
144
+ inherits: false;
145
+ }
146
+ @property --tw-hue-rotate {
147
+ syntax: "*";
148
+ inherits: false;
149
+ }
150
+ @property --tw-invert {
151
+ syntax: "*";
152
+ inherits: false;
153
+ }
154
+ @property --tw-opacity {
155
+ syntax: "*";
156
+ inherits: false;
157
+ }
158
+ @property --tw-saturate {
159
+ syntax: "*";
160
+ inherits: false;
161
+ }
162
+ @property --tw-sepia {
163
+ syntax: "*";
164
+ inherits: false;
165
+ }
166
+ @property --tw-drop-shadow {
167
+ syntax: "*";
168
+ inherits: false;
169
+ }
170
+ @property --tw-drop-shadow-color {
171
+ syntax: "*";
172
+ inherits: false;
173
+ }
174
+ @property --tw-drop-shadow-alpha {
175
+ syntax: "<percentage>";
176
+ inherits: false;
177
+ initial-value: 100%;
178
+ }
179
+ @property --tw-drop-shadow-size {
180
+ syntax: "*";
181
+ inherits: false;
182
+ }
183
+ @layer properties {
184
+ @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
185
+ *, ::before, ::after, ::backdrop {
186
+ --tw-border-style: solid;
187
+ --tw-blur: initial;
188
+ --tw-brightness: initial;
189
+ --tw-contrast: initial;
190
+ --tw-grayscale: initial;
191
+ --tw-hue-rotate: initial;
192
+ --tw-invert: initial;
193
+ --tw-opacity: initial;
194
+ --tw-saturate: initial;
195
+ --tw-sepia: initial;
196
+ --tw-drop-shadow: initial;
197
+ --tw-drop-shadow-color: initial;
198
+ --tw-drop-shadow-alpha: 100%;
199
+ --tw-drop-shadow-size: initial;
200
+ }
201
+ }
202
+ }
package/dist/index.esm.js CHANGED
@@ -8,7 +8,7 @@ var DButton = defineComponent({
8
8
  required: false,
9
9
  default: ''
10
10
  },
11
- url: {
11
+ uri: {
12
12
  type: String,
13
13
  required: false,
14
14
  default: ''
@@ -19,7 +19,7 @@ var DButton = defineComponent({
19
19
  },
20
20
  variant: {
21
21
  type: String,
22
- default: 'primary'
22
+ default: 'default'
23
23
  },
24
24
  disabled: {
25
25
  type: Boolean,
@@ -29,41 +29,64 @@ var DButton = defineComponent({
29
29
  type: [String, Object, Function],
30
30
  default: null
31
31
  },
32
+ prepend: {
33
+ type: [String, Object, Function],
34
+ default: null
35
+ },
36
+ append: {
37
+ type: [String, Object, Function],
38
+ default: null,
39
+ },
32
40
  },
33
41
  emits: ['click'],
34
42
  setup(props, ctx) {
35
43
  const { slots, emit } = ctx;
36
- const base = 'flex items-center justify-center py-2 px-3 rounded-xl focus:outline-none';
37
- const icon = 'flex items-center justify-center w-10 h-10 rounded-full ';
44
+ const base = 'justify-center py-2 px-4 rounded-full cursor-pointer focus:outline-none';
45
+ const icon = 'flex items-center justify-center w-10 h-10 cursor-pointer rounded-full ';
38
46
  const variants = {
39
- primary: 'bg-blue-900 hover:bg-blue-950',
40
- secondary: 'bg-gray-200 hover:bg-gray-300',
47
+ default: 'bg-[var(--color-surface-container)] text-[var(--color-inverse-surface)] hover:brightness-98',
48
+ outlined: 'bg-transparent border border-1 border-solid border-black',
41
49
  };
42
50
  function onClick(e) {
43
51
  if (props.disabled)
44
52
  return;
45
53
  emit('click', e);
46
54
  }
55
+ function renderIcon(iconProp, type) {
56
+ const marginClass = type === 'prepend' ? 'mr-2' : type === 'append' ? 'ml-2' : '';
57
+ if (!iconProp)
58
+ return null;
59
+ return typeof iconProp === 'string' ? h('i', { class: `${iconProp} mdi ${marginClass}` }) : h(iconProp, { class: marginClass });
60
+ }
47
61
  return () => {
48
62
  const children = slots.default ? slots.default() : props.label;
63
+ const prependIcon = renderIcon(props.prepend, 'prepend');
64
+ const appendIcon = renderIcon(props.append, 'append');
49
65
  if (props.icon) {
50
- return h(props.url ? 'a' : 'button', {
66
+ return h(props.uri ? 'a' : 'button', {
51
67
  type: props.type,
52
68
  class: `${icon} ${variants[props.variant]} ${props.disabled ? '' : ''} focus:outline-none`,
53
69
  disabled: props.disabled,
54
- href: props.url,
70
+ href: props.uri,
55
71
  onClick,
56
72
  }, [
73
+ prependIcon,
57
74
  typeof props.icon === 'string' ? h('i', { class: props.icon + ' mdi' }) : h(props.icon),
75
+ appendIcon,
58
76
  children
59
- ]);
77
+ ].filter(Boolean));
60
78
  }
61
- return h(props.url ? 'a' : 'button', {
79
+ return h(props.uri ? 'button' : 'button', {
62
80
  type: props.type,
63
- class: `${base} ${variants[props.variant]} ${props.disabled ? 'opacity-50' : ''}`,
81
+ class: `${base} ${variants[props.variant]} ${props.disabled ? '' : ''}`,
64
82
  disabled: props.disabled,
83
+ href: props.uri,
65
84
  onClick
66
- }, children);
85
+ }, [
86
+ prependIcon,
87
+ children,
88
+ appendIcon
89
+ ].filter(Boolean));
67
90
  };
68
91
  }
69
92
  });
@@ -82,7 +105,7 @@ var DSkeletonLoader = defineComponent({
82
105
  },
83
106
  setup(props, ctx) {
84
107
  const { slots } = ctx;
85
- const base = 'bg-gray-100 dark:bg-gray-200';
108
+ const base = 'bg-gray-50 dark:bg-gray-100';
86
109
  const animations = {
87
110
  pulse: 'animate-pulse',
88
111
  wave: 'animate-wave'
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../src/components/DButton/DButton.tsx","../src/components/DSkeleton/DSkeletonLoader.tsx","../src/index.ts"],"sourcesContent":["import { defineComponent, h, PropType, SetupContext, VNode } from 'vue'\n\nexport interface UseLink {\n navigate: () => void | null\n}\nexport default defineComponent({\n name: 'DButton',\n props: {\n label: {\n type: String as PropType<string>,\n required: false,\n default: ''\n },\n url: {\n type: String as PropType<string>,\n required: false,\n default: ''\n },\n type: {\n type: String as PropType<'button' | 'submit' | 'reset'>,\n default: 'button'\n },\n variant: {\n type: String as PropType<'primary' | 'secondary'>,\n default: 'primary'\n },\n disabled: {\n type: Boolean as PropType<boolean>,\n default: false\n },\n icon: {\n type: [String, Object, Function] as PropType<string | object | (() => VNode) | VNode | null>,\n default: null\n },\n },\n emits: ['click'],\n setup(props: Record<string, any>, ctx: SetupContext) {\n const { slots, emit } = ctx\n const base = 'flex items-center justify-center py-2 px-3 rounded-xl focus:outline-none'\n const icon = 'flex items-center justify-center w-10 h-10 rounded-full '\n const variants: Record<string, string> = {\n primary: 'bg-blue-900 hover:bg-blue-950',\n secondary: 'bg-gray-200 hover:bg-gray-300',\n }\n\n function onClick(e: MouseEvent) {\n if (props.disabled) return\n emit('click', e)\n }\n\n return (): VNode => {\n const children = slots.default ? slots.default() : props.label\n if (props.icon) {\n return h(\n props.url ? 'a' : 'button',\n {\n type: props.type,\n class: `${icon} ${variants[props.variant]} ${props.disabled ? '' : ''} focus:outline-none`,\n disabled: props.disabled,\n href: props.url,\n onClick,\n },\n [\n typeof props.icon === 'string' ? h('i', { class: props.icon + ' mdi' }, ) : h(props.icon),\n children\n ]\n )\n }\n \n return h(\n props.url ? 'a' : 'button',\n {\n type: props.type,\n class: `${base} ${variants[props.variant]} ${props.disabled ? 'opacity-50' : ''}`,\n disabled: props.disabled,\n onClick\n },\n children\n )\n }\n }\n})\n","import { defineComponent, PropType, h, SetupContext, VNode } from 'vue'\nexport default defineComponent({\n name: 'DSkeletonLoader',\n props: {\n animation: {\n type: String as PropType<'pulse' | 'wave'>, \n default: 'pulse'\n },\n type: {\n type: String as PropType<'text' | 'circle' | 'avatar'>,\n default: 'text'\n }\n },\n \n\n setup(props: Record<string, any>, ctx: SetupContext) {\n const { slots } = ctx\n\n const base = 'bg-gray-100 dark:bg-gray-200'\n const animations: Record<string, string> = {\n pulse: 'animate-pulse',\n wave: 'animate-wave'\n }\n const types: Record<string, string> = {\n text: 'rounded-full w-full p-2',\n circle: 'rounded-full',\n avatar: 'rounded-full w-10 h-10 ',\n }\n const children = slots.default ? slots.default() : props.label\n\n return (): VNode => {\n return h(\n children ? 'div' :\n 'div',\n {\n class: `${animations[props.animation]} `,\n },\n [\n h('div', { class: ` ${base} ${types[props.type]}` }),\n ],\n \n \n )\n }\n}\n\n})\n","export * from './components/DButton'\nexport * from './components/DSkeleton'\nexport interface UIOptions {\n components?: Record<string, any>\n}\n\nexport function createDirdocUI( options: UIOptions = {}) {\n const { components = {} } = options\n\n return {\n install(app: any) {\n for (const key in components) {\n app.component(key, components[key])\n }\n }\n }\n}"],"names":[],"mappings":";;AAKA,cAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,SAAS;AACf,IAAA,KAAK,EAAE;AACL,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,MAA0B;AAChC,YAAA,QAAQ,EAAE,KAAK;AACf,YAAA,OAAO,EAAE;AACV,SAAA;AACD,QAAA,GAAG,EAAE;AACH,YAAA,IAAI,EAAE,MAA0B;AAChC,YAAA,QAAQ,EAAE,KAAK;AACf,YAAA,OAAO,EAAE;AACV,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,IAAI,EAAE,MAAiD;AACvD,YAAA,OAAO,EAAE;AACV,SAAA;AACD,QAAA,OAAO,EAAE;AACP,YAAA,IAAI,EAAE,MAA2C;AACjD,YAAA,OAAO,EAAE;AACV,SAAA;AACD,QAAA,QAAQ,EAAE;AACR,YAAA,IAAI,EAAE,O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AG,KAAK,CAAC,KAAK;AAE9D,QAAA,OAAO,MAAY;YACjB,OAAO,CAAC,CACN,QAAQ,GAAG,KAAK;AAChB,gBAAA,KAAK,EACL;gBACE,KAAK,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA,CAAA,CAAG;aACzC,EACD;AACE,gBAAA,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAA,CAAA,EAAI,IAAI,CAAA,CAAA,EAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA,CAAE,EAAE,CAAC;AACrD,aAAA,CAGF;AACH,QAAA,CAAC;IACL;AAEC,CAAA,CAAC;;ACxCI,SAAU,cAAc,CAAE,OAAA,GAAqB,EAAE,EAAA;AACnD,IAAA,MAAM,EAAE,UAAU,GAAG,EAAE,EAAE,GAAG,OAAO;IAEnC,OAAO;AACH,QAAA,OAAO,CAAC,GAAQ,EAAA;AACZ,YAAA,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE;gBAC1B,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;YACvC;QACJ;KACH;AACL;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../src/components/DButton/DButton.tsx","../src/components/DSkeleton/DSkeletonLoader.tsx","../src/index.ts"],"sourcesContent":["import { defineComponent, h, PropType, SetupContext, VNode } from 'vue'\nimport '../styles/style.css'\nexport interface UseLink {\n navigate: () => void | null\n}\nexport default defineComponent({\n name: 'DButton',\n props: {\n label: {\n type: String as PropType<string>,\n required: false,\n default: ''\n },\n uri: {\n type: String as PropType<string>,\n required: false,\n default: ''\n },\n type: {\n type: String as PropType<'button' | 'submit' | 'reset'>,\n default: 'button'\n },\n variant: {\n type: String as PropType<'default' | 'outlined'>,\n default: 'default'\n },\n disabled: {\n type: Boolean as PropType<boolean>,\n default: false\n },\n icon: {\n type: [String, Object, Function] as PropType<string | object | (() => VNode) | VNode | null>,\n default: null\n },\n prepend: {\n type: [String, Object, Function] as PropType<string | object | (() => VNode) | VNode | null>,\n default: null\n },\n append:{\n type: [String, Object, Function] as PropType<string | object | (() => VNode) | VNode | null>,\n default: null,\n },\n },\n emits: ['click'],\n setup(props: Record<string, any>, ctx: SetupContext) {\n const { slots, emit } = ctx\n const base = 'justify-center py-2 px-4 rounded-full cursor-pointer focus:outline-none'\n const icon = 'flex items-center justify-center w-10 h-10 cursor-pointer rounded-full '\n const variants: Record<string, string> = {\n default: 'bg-[var(--color-surface-container)] text-[var(--color-inverse-surface)] hover:brightness-98',\n outlined: 'bg-transparent border border-1 border-solid border-black',\n }\n\n function onClick(e: MouseEvent) {\n if (props.disabled) return\n emit('click', e)\n }\n function renderIcon(iconProp: any, type?: 'prepend' | 'append'): VNode | null {\n const marginClass = type === 'prepend' ? 'mr-2' : type === 'append' ? 'ml-2' : ''\n if (!iconProp) return null\n return typeof iconProp === 'string' ? h('i', { class: `${iconProp} mdi ${marginClass}`}) : h(iconProp, { class: marginClass })\n }\n\n return (): VNode => {\n const children = slots.default ? slots.default() : props.label\n const prependIcon = renderIcon(props.prepend, 'prepend')\n const appendIcon = renderIcon(props.append, 'append')\n if (props.icon) {\n return h(\n props.uri ? 'a' : 'button',\n {\n type: props.type,\n class: `${icon} ${variants[props.variant]} ${props.disabled ? '' : ''} focus:outline-none`,\n disabled: props.disabled,\n href: props.uri,\n onClick,\n },\n [\n prependIcon,\n typeof props.icon === 'string' ? h('i', { class: props.icon + ' mdi' }, ) : h(props.icon),\n appendIcon,\n children\n ].filter(Boolean)\n )\n }\n \n return h(\n props.uri ? 'button' : 'button',\n {\n type: props.type,\n class: `${base} ${variants[props.variant]} ${props.disabled ? '' : ''}`,\n disabled: props.disabled,\n href: props.uri,\n onClick\n },\n [\n prependIcon,\n children,\n appendIcon\n ].filter(Boolean)\n )\n }\n }\n})\n","import { defineComponent, PropType, h, SetupContext, VNode } from 'vue'\nexport default defineComponent({\n name: 'DSkeletonLoader',\n props: {\n animation: {\n type: String as PropType<'pulse' | 'wave'>, \n default: 'pulse'\n },\n type: {\n type: String as PropType<'text' | 'circle' | 'avatar'>,\n default: 'text'\n }\n },\n \n\n setup(props: Record<string, any>, ctx: SetupContext) {\n const { slots } = ctx\n\n const base = 'bg-gray-50 dark:bg-gray-100'\n const animations: Record<string, string> = {\n pulse: 'animate-pulse',\n wave: 'animate-wave'\n }\n const types: Record<string, string> = {\n text: 'rounded-full w-full p-2',\n circle: 'rounded-full',\n avatar: 'rounded-full w-10 h-10 ',\n }\n const children = slots.default ? slots.default() : props.label\n\n return (): VNode => {\n return h(\n children ? 'div' :\n 'div',\n {\n class: `${animations[props.animation]} `,\n },\n [\n h('div', { class: ` ${base} ${types[props.type]}` }),\n ],\n \n \n )\n }\n}\n\n})\n","export * from './components/DButton'\nexport * from './components/DSkeleton'\nexport interface UIOptions {\n components?: Record<string, any>\n}\n\nexport function createDirdocUI( options: UIOptions = {}) {\n const { components = {} } = options\n\n return {\n install(app: any) {\n for (const key in components) {\n app.component(key, components[key])\n }\n }\n }\n}\n\nimport './components/styles/style.css'"],"names":[],"mappings":";;AAKA,cAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,SAAS;AACf,IAAA,KAAK,EAAE;AACL,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,MAA0B;AAChC,YAAA,QAAQ,EAAE,KAAK;AACf,YAAA,OAAO,EAAE;AACV,SAAA;AACD,QAAA,GAAG,EAAE;AACH,YAAA,IAAI,EAAE,MAA0B;AAChC,YAAA,QAAQ,EAAE,KAAK;AACf,YAAA,OAAO,EAAE;AACV,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,IAAI,EAAE,MAAiD;AACvD,YAAA,OAAO,EAAE;AACV,SAAA;AACD,QAAA,OAAO,EAAE;AACP,YAAA,IAAI,EAAE,MAA0C;AAChD,YAAA,OAAO,EAAE;AACV,SAAA;AACD,QAAA,QAAQ,EAAE;AACR,YAAA,IAAI,EAAE,OAA4B;AAClC,Y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E,EAAE,KAAK,EAAE,CAAA,CAAA,EAAI,IAAI,CAAA,CAAA,EAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA,CAAE,EAAE,CAAC;AACrD,aAAA,CAGF;AACH,QAAA,CAAC;IACL;AAEC,CAAA,CAAC;;ACxCI,SAAU,cAAc,CAAE,OAAA,GAAqB,EAAE,EAAA;AACnD,IAAA,MAAM,EAAE,UAAU,GAAG,EAAE,EAAE,GAAG,OAAO;IAEnC,OAAO;AACH,QAAA,OAAO,CAAC,GAAQ,EAAA;AACZ,YAAA,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE;gBAC1B,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;YACvC;QACJ;KACH;AACL;;;;"}
@@ -1,4 +1,5 @@
1
1
  import { VNode } from 'vue';
2
+ import '../styles/style.css';
2
3
  export interface UseLink {
3
4
  navigate: () => void | null;
4
5
  }
@@ -8,12 +9,18 @@ declare const _default: import("vue").DefineComponent<{
8
9
  [x: string]: /*elided*/ any;
9
10
  }> & Readonly<{}>, {
10
11
  label: string;
11
- url: string;
12
+ uri: string;
12
13
  type: "button" | "submit" | "reset";
13
- variant: "primary" | "secondary";
14
+ variant: "default" | "outlined";
14
15
  disabled: boolean;
15
16
  icon: string | object | (() => VNode) | VNode<import("vue").RendererNode, import("vue").RendererElement, {
16
17
  [key: string]: any;
17
18
  }> | null;
19
+ prepend: string | object | VNode<import("vue").RendererNode, import("vue").RendererElement, {
20
+ [key: string]: any;
21
+ }> | (() => VNode) | null;
22
+ append: string | object | VNode<import("vue").RendererNode, import("vue").RendererElement, {
23
+ [key: string]: any;
24
+ }> | (() => VNode) | null;
18
25
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
19
26
  export default _default;
@@ -6,3 +6,4 @@ export interface UIOptions {
6
6
  export declare function createDirdocUI(options?: UIOptions): {
7
7
  install(app: any): void;
8
8
  };
9
+ import './components/styles/style.css';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dirdoc-ui",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",
@@ -40,7 +40,8 @@
40
40
  "require": "./dist/index.cjs.js",
41
41
  "types": "./dist/index.d.ts"
42
42
  },
43
- "./*": "./dist/*"
43
+ "./*": "./dist/*",
44
+ "./styles.css": "./dist/styles.css"
44
45
  },
45
46
  "peerDependencies": {
46
47
  "typescript": "^4.9 || ^5",