@phila/phila-ui-callout 0.0.17 → 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,30 +1,99 @@
1
+ # Phila Callout Component
2
+
3
+ A Vue component for displaying important messages and warnings.
4
+
5
+ ## Features
6
+
7
+ - 💡 Highlight important information or warnings
8
+ - 🎨 Multiple variants: info, warning, error, success
9
+ - 📏 Multiple layouts: with/without icon, dismissible
10
+ - ♿ Accessibility features: focus states, ARIA roles
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ npm install @phila/core
16
+ npm install @phila/phila-ui-callout
17
+ # or
18
+ pnpm add @phila/core
19
+ pnpm add @phila/phila-ui-callout
20
+ ```
21
+
22
+ Import core styles and other components in your main entry file (e.g., `main.js|ts`):
23
+
24
+ ```typescript
25
+ import "@phila/core/styles/template-light.css";
26
+ ```
27
+
1
28
  ## Usage
2
29
 
3
- #### Import single component...
30
+ Use the callout element with the appropriate classes. You can also apply those classes to other elements to style them as callouts.
31
+
32
+ ```vue
33
+ <template>
34
+ <callout type="info" :dismissible="true" @close="handleClose"> Informational message </callout>
35
+ </template>
36
+ ```
37
+
38
+ ### Variants
39
+
40
+ ### States
41
+
42
+ ## Callout layouts
4
43
 
5
- ```js
6
- import { Callout } from '@phila/phila-ui';
44
+ There are two main layouts for the Phila UI callout:
7
45
 
8
- //register it locally...
9
- components: {
10
- Callout,
11
- }
46
+ 1. **Default**: Displays an icon and message.
47
+ 2. **Dismissible**: Displays an icon, message, and a close button. Emits a "close" event when the close button is clicked.
12
48
 
13
- //... or register it globally
14
- Vue.component('callout', Callout);
49
+ ### Default
50
+
51
+ ```vue
52
+ <div class="phila-callout phila-callout--info">
53
+ <span class="icon"><i class="fas fa-info-circle"></i></span>
54
+ <span>Informational message</span>
55
+ </div>
56
+ ```
57
+
58
+ ## Development
59
+
60
+ ### Install Dependencies
61
+
62
+ ```bash
63
+ pnpm install
15
64
  ```
16
65
 
17
- #### or import the whole library,
66
+ ### Run Storybook demo
67
+
68
+ ```bash
69
+ npm run storybook
70
+ ```
18
71
 
19
- ```js
20
- import * as PhilaUI from "@phila/phila-ui";
72
+ ### Run lint
21
73
 
22
- //register it globally
23
- Vue.use(PhilaUI);
74
+ ```bash
75
+ npm run lint
24
76
  ```
25
77
 
26
- #### then use it in the vue template
78
+ ### Create Production Build
79
+
80
+ ```bash
81
+ npm run build
82
+ ```
83
+
84
+ ## Test locally in your development environment
85
+
86
+ ```bash
87
+ npm pack
88
+ cp ./dist/*.tgz ~/path/to/your/local/npm/repo
89
+ cd ~/path/to/your/local/npm/repo
90
+ npm install *.tgz
91
+ ```
92
+
93
+ ## Publishing to NPM
94
+
95
+ Follow the [release instructions](../../RELEASE.md) using changesets.
96
+
97
+ ## License
27
98
 
28
- ```html
29
- <callout></callout>
30
- ```
99
+ MIT
@@ -1,37 +1,27 @@
1
- import { CalloutProps } from './types';
2
-
3
- declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CalloutProps>, {
4
- messageType: string;
5
- message: string;
6
- }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CalloutProps>, {
7
- messageType: string;
8
- message: string;
9
- }>>> & Readonly<{}>, {
10
- message: string;
11
- messageType: string;
12
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, {
13
- default?(_: {}): any;
14
- }>;
15
- export default _default;
16
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
17
- type __VLS_TypePropsToRuntimeProps<T> = {
18
- [K in keyof T]-?: {} extends Pick<T, K> ? {
19
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
20
- } : {
21
- type: import('vue').PropType<T[K]>;
22
- required: true;
1
+ import { CalloutProps } from './index';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ default?(_: {}): any;
23
6
  };
7
+ refs: {};
8
+ rootEl: HTMLDivElement;
24
9
  };
25
- type __VLS_WithDefaults<P, D> = {
26
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
27
- default: D[K];
28
- }> : P[K];
29
- };
30
- type __VLS_Prettify<T> = {
31
- [K in keyof T]: T[K];
32
- } & {};
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: import('vue').DefineComponent<CalloutProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
12
+ dismiss: () => any;
13
+ }, string, import('vue').PublicProps, Readonly<CalloutProps> & Readonly<{
14
+ onDismiss?: (() => any) | undefined;
15
+ }>, {
16
+ message: string;
17
+ type: "info" | "warning" | "error";
18
+ dismissible: boolean;
19
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
20
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
21
+ export default _default;
33
22
  type __VLS_WithTemplateSlots<T, S> = T & {
34
23
  new (): {
35
24
  $slots: S;
36
25
  };
37
26
  };
27
+ //# sourceMappingURL=Callout.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Callout.vue.d.ts","sourceRoot":"","sources":["../src/Callout.vue"],"names":[],"mappings":"AAgDA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AA2B5C,iBAAS,cAAc;WAqDT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;wFASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
package/dist/index.css ADDED
File without changes
@@ -0,0 +1,9 @@
1
+ import { BaseProps } from '@phila/phila-ui-core';
2
+ export { default as Callout } from './Callout.vue';
3
+ export interface CalloutProps extends BaseProps {
4
+ message?: string;
5
+ type?: "info" | "warning" | "error";
6
+ icon?: string;
7
+ dismissible?: boolean;
8
+ }
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAC;AAInD,MAAM,WAAW,YAAa,SAAQ,SAAS;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB"}