@phila/phila-ui-callout 0.0.16 → 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,16 +1,99 @@
1
- # Callout component
1
+ # Phila Callout Component
2
2
 
3
- ## Create a new local build
3
+ A Vue component for displaying important messages and warnings.
4
4
 
5
- In src/components/COMPONENT_NAME:
5
+ ## Features
6
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
7
20
  ```
8
- npm run build
9
- npm pack
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
+
28
+ ## Usage
29
+
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
43
+
44
+ There are two main layouts for the Phila UI callout:
45
+
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.
48
+
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>
10
56
  ```
11
57
 
12
- copy .tgz file to project and run:
58
+ ## Development
13
59
 
60
+ ### Install Dependencies
61
+
62
+ ```bash
63
+ pnpm install
64
+ ```
65
+
66
+ ### Run Storybook demo
67
+
68
+ ```bash
69
+ npm run storybook
70
+ ```
71
+
72
+ ### Run lint
73
+
74
+ ```bash
75
+ npm run lint
76
+ ```
77
+
78
+ ### Create Production Build
79
+
80
+ ```bash
81
+ npm run build
14
82
  ```
15
- npm install COMPONENT_NAME*.tgz
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
16
91
  ```
92
+
93
+ ## Publishing to NPM
94
+
95
+ Follow the [release instructions](../../RELEASE.md) using changesets.
96
+
97
+ ## License
98
+
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"}