@molecule/app-status-badge-vue 0.0.0-stage → 0.0.1-stage

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,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,260 @@
1
- # Temporary Holding Version
1
+ <!--
2
+ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
+ Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
+ Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
+ To change this document, edit the module-level JSDoc in src/index.ts.
6
+ Generated: 2026-11-15T10:25:47.537Z
7
+ -->
2
8
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
9
+ # @molecule/app-status-badge-vue
10
+
11
+ Vue status-badge and status-pill components.
12
+
13
+ Both components map a small `StatusKind` union (`success`/`warning`/
14
+ `error`/`info`/`neutral`) to ClassMap-driven styling so apps can
15
+ restyle by swapping the ClassMap bond rather than rewriting
16
+ components.
17
+
18
+ `<StatusBadge kind children icon? appearance? className?>` — the
19
+ contract is `kind` + `children` (there are NO `label`/`color` props).
20
+ `appearance='ui'` (default) wraps the framework `<Badge>` from
21
+ `@molecule/app-ui-vue` and works with any ClassMap bond.
22
+ `<StatusPill kind children dot? className?>` adds a small colored
23
+ status dot before the label.
24
+
25
+ This is the Vue counterpart of `@molecule/app-status-badge-react`: the same
26
+ props (React names), the same ClassMap tokens, and the same DOM for the same
27
+ input. Node-valued props (`children`, `icon`) are slots, or props of the same
28
+ names.
29
+
30
+ > **Auto-generated, AI-first package reference** for the [molecule.dev](https://molecule.dev) ecosystem.
31
+ > It is written to be read by coding agents as much as by people, and is generated from this
32
+ > package's source — edit `src/index.ts` JSDoc, not this file.
33
+
34
+ ## Quick Start
35
+
36
+ ```ts
37
+ import { defineComponent, h } from 'vue'
38
+ import { StatusBadge, StatusPill } from '@molecule/app-status-badge-vue'
39
+
40
+ const Row = defineComponent({
41
+ setup() {
42
+ return () =>
43
+ h('div', [
44
+ h(StatusBadge, { kind: 'success' }, () => ['Open']),
45
+ h(
46
+ StatusBadge,
47
+ { kind: 'warning' },
48
+ {
49
+ default: () => ['Pending'],
50
+ icon: () => [h('span', { 'aria-hidden': 'true' }, '!')],
51
+ },
52
+ ),
53
+ h(StatusPill, { kind: 'error' }, () => ['Overdue']),
54
+ ])
55
+ },
56
+ })
57
+ ```
58
+
59
+ ## Type
60
+
61
+ `feature`
62
+
63
+ ## Installation
64
+
65
+ ```bash
66
+ npm install @molecule/app-status-badge-vue @molecule/app-ui @molecule/app-ui-vue @molecule/app-vue vue
67
+ ```
68
+
69
+ ## API
70
+
71
+ ### Interfaces
72
+
73
+ #### `StatusBadgeProps`
74
+
75
+ Props for the {@link StatusBadge} component.
76
+
77
+ ```typescript
78
+ interface StatusBadgeProps {
79
+ /** Semantic kind — maps to ClassMap badge color variants. */
80
+ kind?: StatusKind
81
+ /** Badge label (usually `t('...')`) — the default slot, or a prop. */
82
+ children?: VNodeChild
83
+ /** Optional leading icon — the `icon` slot, or a prop. */
84
+ icon?: VNodeChild
85
+ /**
86
+ * Visual appearance variant.
87
+ * - `'ui'` (default) — wraps the framework `<Badge>` with ClassMap-driven
88
+ * coloring. Honors the active ClassMap bond's badge styling and works
89
+ * with any theme.
90
+ * - `'uppercase-pill'` — a compact uppercase pill that colors itself with
91
+ * the SAME ClassMap `badge` tokens as the `'ui'` variant, then layers
92
+ * `cm.uppercase` + `cm.trackingWide` for the uppercase treatment.
93
+ */
94
+ appearance?: 'ui' | 'uppercase-pill'
95
+ /** Extra classes passed through to the rendered element. */
96
+ className?: string
97
+ }
98
+ ```
99
+
100
+ #### `StatusPillProps`
101
+
102
+ Props for the {@link StatusPill} component.
103
+
104
+ ```typescript
105
+ interface StatusPillProps {
106
+ /** Semantic kind. */
107
+ kind?: StatusKind
108
+ /** Pill label — the default slot, or a prop. */
109
+ children?: VNodeChild
110
+ /** Render a leading dot indicator. Defaults to true. */
111
+ dot?: boolean
112
+ /** Extra classes. */
113
+ className?: string
114
+ }
115
+ ```
116
+
117
+ ### Types
118
+
119
+ #### `StatusKind`
120
+
121
+ Semantic status kind used to select badge color variants.
122
+
123
+ ```typescript
124
+ type StatusKind = 'success' | 'warning' | 'error' | 'info' | 'neutral'
125
+ ```
126
+
127
+ ### Constants
128
+
129
+ #### `StatusBadge`
130
+
131
+ Semantic status badge — maps status kinds to ClassMap color variants.
132
+
133
+ Both appearances resolve their color through the ClassMap `badge` tokens,
134
+ so they stay theme-correct: `appearance="ui"` (default) renders the
135
+ framework `<Badge>`, and `'uppercase-pill'` renders a compact uppercase pill
136
+ with the same per-kind `bg-*` / `text-*` colors.
137
+
138
+ ```typescript
139
+ const StatusBadge: DefineComponent<
140
+ ExtractPropTypes<{
141
+ kind: { type: PropType<StatusKind>; default: string }
142
+ children: null
143
+ icon: null
144
+ appearance: { type: PropType<'ui' | 'uppercase-pill'>; default: string }
145
+ className: StringConstructor
146
+ }>,
147
+ () => VNode,
148
+ {},
149
+ {},
150
+ {},
151
+ ComponentOptionsMixin,
152
+ ComponentOptionsMixin,
153
+ {},
154
+ string,
155
+ PublicProps,
156
+ Readonly<
157
+ ExtractPropTypes<{
158
+ kind: { type: PropType<StatusKind>; default: string }
159
+ children: null
160
+ icon: null
161
+ appearance: { type: PropType<'ui' | 'uppercase-pill'>; default: string }
162
+ className: StringConstructor
163
+ }>
164
+ > &
165
+ Readonly<{}>,
166
+ { kind: StatusKind; appearance: 'ui' | 'uppercase-pill' },
167
+ {},
168
+ {},
169
+ {},
170
+ string,
171
+ ComponentProvideOptions,
172
+ true,
173
+ {},
174
+ any
175
+ >
176
+ ```
177
+
178
+ - `props` — Component props (see `StatusBadgeProps`).
179
+
180
+ **Returns:** The status badge component.
181
+
182
+ #### `StatusPill`
183
+
184
+ Rounded status pill with an optional leading colored dot. The pill has NO
185
+ background surface of its own — only the dot carries color — so add a
186
+ surface via `className` if you need a filled pill.
187
+
188
+ ```typescript
189
+ const StatusPill: DefineComponent<
190
+ ExtractPropTypes<{
191
+ kind: { type: PropType<StatusKind>; default: string }
192
+ children: null
193
+ dot: { type: BooleanConstructor; default: boolean }
194
+ className: StringConstructor
195
+ }>,
196
+ () => VNode,
197
+ {},
198
+ {},
199
+ {},
200
+ ComponentOptionsMixin,
201
+ ComponentOptionsMixin,
202
+ {},
203
+ string,
204
+ PublicProps,
205
+ Readonly<
206
+ ExtractPropTypes<{
207
+ kind: { type: PropType<StatusKind>; default: string }
208
+ children: null
209
+ dot: { type: BooleanConstructor; default: boolean }
210
+ className: StringConstructor
211
+ }>
212
+ > &
213
+ Readonly<{}>,
214
+ { kind: StatusKind; dot: boolean },
215
+ {},
216
+ {},
217
+ {},
218
+ string,
219
+ ComponentProvideOptions,
220
+ true,
221
+ {},
222
+ any
223
+ >
224
+ ```
225
+
226
+ - `props` — Component props (see `StatusPillProps`).
227
+
228
+ **Returns:** The status pill component.
229
+
230
+ ## Injection Notes
231
+
232
+ ### Requirements
233
+
234
+ Peer dependencies:
235
+
236
+ - `@molecule/app-ui` ^1.0.1
237
+ - `@molecule/app-ui-vue` ^1.1.0
238
+ - `@molecule/app-vue` ^3.5.0
239
+ - `vue` ^3.4.0
240
+
241
+ ### Runtime Dependencies
242
+
243
+ - `@molecule/app-ui`
244
+ - `@molecule/app-ui-vue`
245
+ - `@molecule/app-vue`
246
+ - `vue`
247
+
248
+ - Requires a wired ClassMap bond (e.g. `@molecule/app-ui-tailwind`) —
249
+ `getClassMap()` throws before bonding.
250
+ - Both `appearance` variants color through the ClassMap `badge` tokens
251
+ (`cm.badge({ variant })` → real `bg-*` / `text-*` theme utilities), so
252
+ the `'uppercase-pill'` variant is visibly colored per kind in every
253
+ theme — it just adds `cm.uppercase` + `cm.trackingWide` on top of the
254
+ same colors the `'ui'` variant uses.
255
+ - `<StatusPill>` has no background surface of its own — only the dot
256
+ is colored; add a surface via `className` if you need a filled pill.
257
+ Its `neutral` dot uses `bg-outline`, which also needs a theme
258
+ `outline` color token to be visible.
259
+ - Labels are `children` — pass already-translated strings
260
+ (`t('...')`); the components render no text of their own.
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Vue semantic status badge: maps status kinds to ClassMap color variants,
3
+ * with a framework `<Badge>` (`appearance='ui'`, default) or a compact
4
+ * uppercase pill appearance.
5
+ *
6
+ * @module
7
+ */
8
+ import { type PropType, type VNode } from 'vue';
9
+ import type { StatusKind } from './types.js';
10
+ /**
11
+ * Semantic status badge — maps status kinds to ClassMap color variants.
12
+ *
13
+ * Both appearances resolve their color through the ClassMap `badge` tokens,
14
+ * so they stay theme-correct: `appearance="ui"` (default) renders the
15
+ * framework `<Badge>`, and `'uppercase-pill'` renders a compact uppercase pill
16
+ * with the same per-kind `bg-*` / `text-*` colors.
17
+ *
18
+ * @param props - Component props (see `StatusBadgeProps`).
19
+ * @returns The status badge component.
20
+ */
21
+ export declare const StatusBadge: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
22
+ kind: {
23
+ type: PropType<StatusKind>;
24
+ default: string;
25
+ };
26
+ children: null;
27
+ icon: null;
28
+ appearance: {
29
+ type: PropType<"ui" | "uppercase-pill">;
30
+ default: string;
31
+ };
32
+ className: StringConstructor;
33
+ }>, () => VNode, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
34
+ kind: {
35
+ type: PropType<StatusKind>;
36
+ default: string;
37
+ };
38
+ children: null;
39
+ icon: null;
40
+ appearance: {
41
+ type: PropType<"ui" | "uppercase-pill">;
42
+ default: string;
43
+ };
44
+ className: StringConstructor;
45
+ }>> & Readonly<{}>, {
46
+ kind: StatusKind;
47
+ appearance: "ui" | "uppercase-pill";
48
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
49
+ //# sourceMappingURL=StatusBadge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatusBadge.d.ts","sourceRoot":"","sources":["../src/StatusBadge.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAsB,KAAK,QAAQ,EAAE,KAAK,KAAK,EAAmB,MAAM,KAAK,CAAA;AAKpF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AA0B5C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW;;cAIF,QAAQ,CAAC,UAAU,CAAC;;;;;;cAMpB,QAAQ,CAAC,IAAI,GAAG,gBAAgB,CAAC;;;;UAQxC,KAAK;;cAdE,QAAQ,CAAC,UAAU,CAAC;;;;;;cAMpB,QAAQ,CAAC,IAAI,GAAG,gBAAgB,CAAC;;;;;;;4EAiCrD,CAAA"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Vue semantic status badge: maps status kinds to ClassMap color variants,
3
+ * with a framework `<Badge>` (`appearance='ui'`, default) or a compact
4
+ * uppercase pill appearance.
5
+ *
6
+ * @module
7
+ */
8
+ import { defineComponent, h } from 'vue';
9
+ import { getClassMap } from '@molecule/app-ui';
10
+ import { Badge } from '@molecule/app-ui-vue';
11
+ const KIND_TO_COLOR = {
12
+ success: 'success',
13
+ warning: 'warning',
14
+ error: 'error',
15
+ info: 'info',
16
+ neutral: 'secondary',
17
+ };
18
+ /**
19
+ * Resolves a node-valued prop that may arrive as a prop or a same-named slot:
20
+ * the slot wins, and an absent pair contributes nothing.
21
+ *
22
+ * @param slot - The slot render function, when the caller passed the slot.
23
+ * @param prop - The prop value, when the caller passed the prop.
24
+ * @returns The children to render.
25
+ */
26
+ const nodeOf = (slot, prop) => {
27
+ if (slot)
28
+ return slot();
29
+ return prop != null ? [prop] : [];
30
+ };
31
+ /**
32
+ * Semantic status badge — maps status kinds to ClassMap color variants.
33
+ *
34
+ * Both appearances resolve their color through the ClassMap `badge` tokens,
35
+ * so they stay theme-correct: `appearance="ui"` (default) renders the
36
+ * framework `<Badge>`, and `'uppercase-pill'` renders a compact uppercase pill
37
+ * with the same per-kind `bg-*` / `text-*` colors.
38
+ *
39
+ * @param props - Component props (see `StatusBadgeProps`).
40
+ * @returns The status badge component.
41
+ */
42
+ export const StatusBadge = defineComponent({
43
+ name: 'StatusBadge',
44
+ props: {
45
+ kind: {
46
+ type: String,
47
+ default: 'neutral',
48
+ },
49
+ children: null,
50
+ icon: null,
51
+ appearance: {
52
+ type: String,
53
+ default: 'ui',
54
+ },
55
+ className: String,
56
+ },
57
+ setup(props, { slots }) {
58
+ const cm = getClassMap();
59
+ return () => {
60
+ const children = nodeOf(slots.default, props.children);
61
+ const icon = nodeOf(slots.icon, props.icon);
62
+ const content = [
63
+ ...(icon.length > 0 ? [h('span', { class: cm.sp('mr', 1) }, icon)] : []),
64
+ ...children,
65
+ ];
66
+ const color = KIND_TO_COLOR[props.kind];
67
+ if (props.appearance === 'uppercase-pill') {
68
+ return h('span', {
69
+ class: cm.cn(cm.badge({ variant: color }), cm.uppercase, cm.trackingWide, props.className),
70
+ }, content);
71
+ }
72
+ return h(Badge, { color, className: props.className }, () => content);
73
+ };
74
+ },
75
+ });
76
+ //# sourceMappingURL=StatusBadge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatusBadge.js","sourceRoot":"","sources":["../src/StatusBadge.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,eAAe,EAAE,CAAC,EAA8C,MAAM,KAAK,CAAA;AAEpF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAI5C,MAAM,aAAa,GAA+E;IAChG,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,WAAW;CACrB,CAAA;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,GAAG,CACb,IAAsC,EACtC,IAAmC,EACrB,EAAE;IAChB,IAAI,IAAI;QAAE,OAAO,IAAI,EAAE,CAAA;IACvB,OAAO,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;AACnC,CAAC,CAAA;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC;IACzC,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE;QACL,IAAI,EAAE;YACJ,IAAI,EAAE,MAA8B;YACpC,OAAO,EAAE,SAAS;SACnB;QACD,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,IAAI;QACV,UAAU,EAAE;YACV,IAAI,EAAE,MAA2C;YACjD,OAAO,EAAE,IAAI;SACd;QACD,SAAS,EAAE,MAAM;KAClB;IACD,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE;QACpB,MAAM,EAAE,GAAG,WAAW,EAAE,CAAA;QAExB,OAAO,GAAU,EAAE;YACjB,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,QAAyC,CAAC,CAAA;YACvF,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAqC,CAAC,CAAA;YAC5E,MAAM,OAAO,GAAiB;gBAC5B,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBACxE,GAAG,QAAQ;aACZ,CAAA;YACD,MAAM,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;YACvC,IAAI,KAAK,CAAC,UAAU,KAAK,gBAAgB,EAAE,CAAC;gBAC1C,OAAO,CAAC,CACN,MAAM,EACN;oBACE,KAAK,EAAE,EAAE,CAAC,EAAE,CACV,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAC5B,EAAE,CAAC,SAAS,EACZ,EAAE,CAAC,YAAY,EACf,KAAK,CAAC,SAAS,CAChB;iBACF,EACD,OAAO,CACR,CAAA;YACH,CAAC;YACD,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,CAAA;QACvE,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Vue status pill: a rounded pill with an optional leading colored dot.
3
+ *
4
+ * @module
5
+ */
6
+ import { type PropType, type VNode } from 'vue';
7
+ import type { StatusKind } from './types.js';
8
+ /**
9
+ * Rounded status pill with an optional leading colored dot. The pill has NO
10
+ * background surface of its own — only the dot carries color — so add a
11
+ * surface via `className` if you need a filled pill.
12
+ *
13
+ * @param props - Component props (see `StatusPillProps`).
14
+ * @returns The status pill component.
15
+ */
16
+ export declare const StatusPill: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
17
+ kind: {
18
+ type: PropType<StatusKind>;
19
+ default: string;
20
+ };
21
+ children: null;
22
+ dot: {
23
+ type: BooleanConstructor;
24
+ default: boolean;
25
+ };
26
+ className: StringConstructor;
27
+ }>, () => VNode, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
28
+ kind: {
29
+ type: PropType<StatusKind>;
30
+ default: string;
31
+ };
32
+ children: null;
33
+ dot: {
34
+ type: BooleanConstructor;
35
+ default: boolean;
36
+ };
37
+ className: StringConstructor;
38
+ }>> & Readonly<{}>, {
39
+ kind: StatusKind;
40
+ dot: boolean;
41
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
42
+ //# sourceMappingURL=StatusPill.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatusPill.d.ts","sourceRoot":"","sources":["../src/StatusPill.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAsB,KAAK,QAAQ,EAAE,KAAK,KAAK,EAAmB,MAAM,KAAK,CAAA;AAIpF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAU5C;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU;;cAID,QAAQ,CAAC,UAAU,CAAC;;;;;;;;;UAa3B,KAAK;;cAbE,QAAQ,CAAC,UAAU,CAAC;;;;;;;;;;;;4EA4CxC,CAAA"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Vue status pill: a rounded pill with an optional leading colored dot.
3
+ *
4
+ * @module
5
+ */
6
+ import { defineComponent, h } from 'vue';
7
+ import { getClassMap } from '@molecule/app-ui';
8
+ const DOT_COLOR = {
9
+ success: 'bg-success',
10
+ warning: 'bg-warning',
11
+ error: 'bg-error',
12
+ info: 'bg-info',
13
+ neutral: 'bg-outline',
14
+ };
15
+ /**
16
+ * Rounded status pill with an optional leading colored dot. The pill has NO
17
+ * background surface of its own — only the dot carries color — so add a
18
+ * surface via `className` if you need a filled pill.
19
+ *
20
+ * @param props - Component props (see `StatusPillProps`).
21
+ * @returns The status pill component.
22
+ */
23
+ export const StatusPill = defineComponent({
24
+ name: 'StatusPill',
25
+ props: {
26
+ kind: {
27
+ type: String,
28
+ default: 'neutral',
29
+ },
30
+ children: null,
31
+ dot: {
32
+ type: Boolean,
33
+ default: true,
34
+ },
35
+ className: String,
36
+ },
37
+ setup(props, { slots }) {
38
+ const cm = getClassMap();
39
+ return () => h('span', {
40
+ class: cm.cn(cm.flex({ align: 'center', gap: 'xs' }), cm.sp('px', 3), cm.sp('py', 1), cm.roundedFull, cm.textSize('xs'), cm.fontWeight('medium'), props.className),
41
+ }, [
42
+ ...(props.dot
43
+ ? [
44
+ h('span', {
45
+ class: cm.cn(cm.w(2), cm.h(2), cm.roundedFull, DOT_COLOR[props.kind]),
46
+ 'aria-hidden': 'true',
47
+ }),
48
+ ]
49
+ : []),
50
+ ...(slots.default
51
+ ? slots.default()
52
+ : props.children != null
53
+ ? [props.children]
54
+ : []),
55
+ ]);
56
+ },
57
+ });
58
+ //# sourceMappingURL=StatusPill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatusPill.js","sourceRoot":"","sources":["../src/StatusPill.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,eAAe,EAAE,CAAC,EAA8C,MAAM,KAAK,CAAA;AAEpF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAI9C,MAAM,SAAS,GAA+B;IAC5C,OAAO,EAAE,YAAY;IACrB,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,UAAU;IACjB,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,YAAY;CACtB,CAAA;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC;IACxC,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE;QACL,IAAI,EAAE;YACJ,IAAI,EAAE,MAA8B;YACpC,OAAO,EAAE,SAAS;SACnB;QACD,QAAQ,EAAE,IAAI;QACd,GAAG,EAAE;YACH,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,IAAI;SACd;QACD,SAAS,EAAE,MAAM;KAClB;IACD,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE;QACpB,MAAM,EAAE,GAAG,WAAW,EAAE,CAAA;QAExB,OAAO,GAAU,EAAE,CACjB,CAAC,CACC,MAAM,EACN;YACE,KAAK,EAAE,EAAE,CAAC,EAAE,CACV,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,EACvC,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,EACd,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,EACd,EAAE,CAAC,WAAW,EACd,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EACjB,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EACvB,KAAK,CAAC,SAAS,CAChB;SACF,EACD;YACE,GAAG,CAAC,KAAK,CAAC,GAAG;gBACX,CAAC,CAAC;oBACE,CAAC,CAAC,MAAM,EAAE;wBACR,KAAK,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;wBACrE,aAAa,EAAE,MAAM;qBACtB,CAAC;iBACH;gBACH,CAAC,CAAC,EAAE,CAAC;YACP,GAAG,CAAC,KAAK,CAAC,OAAO;gBACf,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE;gBACjB,CAAC,CAAC,KAAK,CAAC,QAAQ,IAAI,IAAI;oBACtB,CAAC,CAAC,CAAC,KAAK,CAAC,QAAsB,CAAC;oBAChC,CAAC,CAAC,EAAE,CAAC;SACV,CACF,CAAA;IACL,CAAC;CACF,CAAC,CAAA"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Vue status-badge and status-pill components.
3
+ *
4
+ * Both components map a small `StatusKind` union (`success`/`warning`/
5
+ * `error`/`info`/`neutral`) to ClassMap-driven styling so apps can
6
+ * restyle by swapping the ClassMap bond rather than rewriting
7
+ * components.
8
+ *
9
+ * `<StatusBadge kind children icon? appearance? className?>` — the
10
+ * contract is `kind` + `children` (there are NO `label`/`color` props).
11
+ * `appearance='ui'` (default) wraps the framework `<Badge>` from
12
+ * `@molecule/app-ui-vue` and works with any ClassMap bond.
13
+ * `<StatusPill kind children dot? className?>` adds a small colored
14
+ * status dot before the label.
15
+ *
16
+ * This is the Vue counterpart of `@molecule/app-status-badge-react`: the same
17
+ * props (React names), the same ClassMap tokens, and the same DOM for the same
18
+ * input. Node-valued props (`children`, `icon`) are slots, or props of the same
19
+ * names.
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * import { defineComponent, h } from 'vue'
24
+ * import { StatusBadge, StatusPill } from '@molecule/app-status-badge-vue'
25
+ *
26
+ * const Row = defineComponent({
27
+ * setup() {
28
+ * return () =>
29
+ * h('div', [
30
+ * h(StatusBadge, { kind: 'success' }, () => ['Open']),
31
+ * h(StatusBadge, { kind: 'warning' }, {
32
+ * default: () => ['Pending'],
33
+ * icon: () => [h('span', { 'aria-hidden': 'true' }, '!')],
34
+ * }),
35
+ * h(StatusPill, { kind: 'error' }, () => ['Overdue']),
36
+ * ])
37
+ * },
38
+ * })
39
+ * ```
40
+ *
41
+ * @remarks
42
+ * - Requires a wired ClassMap bond (e.g. `@molecule/app-ui-tailwind`) —
43
+ * `getClassMap()` throws before bonding.
44
+ * - Both `appearance` variants color through the ClassMap `badge` tokens
45
+ * (`cm.badge({ variant })` → real `bg-*` / `text-*` theme utilities), so
46
+ * the `'uppercase-pill'` variant is visibly colored per kind in every
47
+ * theme — it just adds `cm.uppercase` + `cm.trackingWide` on top of the
48
+ * same colors the `'ui'` variant uses.
49
+ * - `<StatusPill>` has no background surface of its own — only the dot
50
+ * is colored; add a surface via `className` if you need a filled pill.
51
+ * Its `neutral` dot uses `bg-outline`, which also needs a theme
52
+ * `outline` color token to be visible.
53
+ * - Labels are `children` — pass already-translated strings
54
+ * (`t('...')`); the components render no text of their own.
55
+ *
56
+ * @module
57
+ */
58
+ export * from './StatusBadge.js';
59
+ export * from './StatusPill.js';
60
+ export * from './types.js';
61
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AAEH,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Vue status-badge and status-pill components.
3
+ *
4
+ * Both components map a small `StatusKind` union (`success`/`warning`/
5
+ * `error`/`info`/`neutral`) to ClassMap-driven styling so apps can
6
+ * restyle by swapping the ClassMap bond rather than rewriting
7
+ * components.
8
+ *
9
+ * `<StatusBadge kind children icon? appearance? className?>` — the
10
+ * contract is `kind` + `children` (there are NO `label`/`color` props).
11
+ * `appearance='ui'` (default) wraps the framework `<Badge>` from
12
+ * `@molecule/app-ui-vue` and works with any ClassMap bond.
13
+ * `<StatusPill kind children dot? className?>` adds a small colored
14
+ * status dot before the label.
15
+ *
16
+ * This is the Vue counterpart of `@molecule/app-status-badge-react`: the same
17
+ * props (React names), the same ClassMap tokens, and the same DOM for the same
18
+ * input. Node-valued props (`children`, `icon`) are slots, or props of the same
19
+ * names.
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * import { defineComponent, h } from 'vue'
24
+ * import { StatusBadge, StatusPill } from '@molecule/app-status-badge-vue'
25
+ *
26
+ * const Row = defineComponent({
27
+ * setup() {
28
+ * return () =>
29
+ * h('div', [
30
+ * h(StatusBadge, { kind: 'success' }, () => ['Open']),
31
+ * h(StatusBadge, { kind: 'warning' }, {
32
+ * default: () => ['Pending'],
33
+ * icon: () => [h('span', { 'aria-hidden': 'true' }, '!')],
34
+ * }),
35
+ * h(StatusPill, { kind: 'error' }, () => ['Overdue']),
36
+ * ])
37
+ * },
38
+ * })
39
+ * ```
40
+ *
41
+ * @remarks
42
+ * - Requires a wired ClassMap bond (e.g. `@molecule/app-ui-tailwind`) —
43
+ * `getClassMap()` throws before bonding.
44
+ * - Both `appearance` variants color through the ClassMap `badge` tokens
45
+ * (`cm.badge({ variant })` → real `bg-*` / `text-*` theme utilities), so
46
+ * the `'uppercase-pill'` variant is visibly colored per kind in every
47
+ * theme — it just adds `cm.uppercase` + `cm.trackingWide` on top of the
48
+ * same colors the `'ui'` variant uses.
49
+ * - `<StatusPill>` has no background surface of its own — only the dot
50
+ * is colored; add a surface via `className` if you need a filled pill.
51
+ * Its `neutral` dot uses `bg-outline`, which also needs a theme
52
+ * `outline` color token to be visible.
53
+ * - Labels are `children` — pass already-translated strings
54
+ * (`t('...')`); the components render no text of their own.
55
+ *
56
+ * @module
57
+ */
58
+ export * from './StatusBadge.js';
59
+ export * from './StatusPill.js';
60
+ export * from './types.js';
61
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AAEH,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Types of `@molecule/app-status-badge-vue` — the Vue counterparts of
3
+ * `@molecule/app-status-badge-react`'s two components: the same props (React
4
+ * names) and the same DOM for the same input.
5
+ *
6
+ * Node-valued props (`children`, `icon`) arrive as the DEFAULT slot and a
7
+ * same-named `icon` slot, or as props of the same names.
8
+ *
9
+ * @module
10
+ */
11
+ import type { VNodeChild } from 'vue';
12
+ /** Semantic status kind used to select badge color variants. */
13
+ export type StatusKind = 'success' | 'warning' | 'error' | 'info' | 'neutral';
14
+ /** Props for the {@link StatusBadge} component. */
15
+ export interface StatusBadgeProps {
16
+ /** Semantic kind — maps to ClassMap badge color variants. */
17
+ kind?: StatusKind;
18
+ /** Badge label (usually `t('...')`) — the default slot, or a prop. */
19
+ children?: VNodeChild;
20
+ /** Optional leading icon — the `icon` slot, or a prop. */
21
+ icon?: VNodeChild;
22
+ /**
23
+ * Visual appearance variant.
24
+ * - `'ui'` (default) — wraps the framework `<Badge>` with ClassMap-driven
25
+ * coloring. Honors the active ClassMap bond's badge styling and works
26
+ * with any theme.
27
+ * - `'uppercase-pill'` — a compact uppercase pill that colors itself with
28
+ * the SAME ClassMap `badge` tokens as the `'ui'` variant, then layers
29
+ * `cm.uppercase` + `cm.trackingWide` for the uppercase treatment.
30
+ */
31
+ appearance?: 'ui' | 'uppercase-pill';
32
+ /** Extra classes passed through to the rendered element. */
33
+ className?: string;
34
+ }
35
+ /** Props for the {@link StatusPill} component. */
36
+ export interface StatusPillProps {
37
+ /** Semantic kind. */
38
+ kind?: StatusKind;
39
+ /** Pill label — the default slot, or a prop. */
40
+ children?: VNodeChild;
41
+ /** Render a leading dot indicator. Defaults to true. */
42
+ dot?: boolean;
43
+ /** Extra classes. */
44
+ className?: string;
45
+ }
46
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAErC,gEAAgE;AAChE,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAA;AAE7E,mDAAmD;AACnD,MAAM,WAAW,gBAAgB;IAC/B,6DAA6D;IAC7D,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,sEAAsE;IACtE,QAAQ,CAAC,EAAE,UAAU,CAAA;IACrB,0DAA0D;IAC1D,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,IAAI,GAAG,gBAAgB,CAAA;IACpC,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,kDAAkD;AAClD,MAAM,WAAW,eAAe;IAC9B,qBAAqB;IACrB,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,UAAU,CAAA;IACrB,wDAAwD;IACxD,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
package/dist/types.js ADDED
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Types of `@molecule/app-status-badge-vue` — the Vue counterparts of
3
+ * `@molecule/app-status-badge-react`'s two components: the same props (React
4
+ * names) and the same DOM for the same input.
5
+ *
6
+ * Node-valued props (`children`, `icon`) arrive as the DEFAULT slot and a
7
+ * same-named `icon` slot, or as props of the same names.
8
+ *
9
+ * @module
10
+ */
11
+ export {};
12
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
package/package.json CHANGED
@@ -1,6 +1,65 @@
1
1
  {
2
2
  "name": "@molecule/app-status-badge-vue",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.0.1-stage",
4
+ "description": "Vue status badge / pill with semantic kinds",
5
+ "homepage": "https://www.molecule.dev/packages/app-status-badge-vue",
6
+ "type": "module",
7
+ "main": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "README.md"
18
+ ],
19
+ "scripts": {
20
+ "build": "tsc",
21
+ "dev": "vue-tsc --watch",
22
+ "test": "vitest run",
23
+ "test:watch": "vitest"
24
+ },
25
+ "keywords": [
26
+ "molecule",
27
+ "status-badge",
28
+ "vue"
29
+ ],
30
+ "author": "Molecule Dev, Inc. (https://molecule.dev)",
31
+ "license": "Apache-2.0",
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "https://github.com/molecule-dev/molecule.git",
35
+ "directory": "packages/app/features/status-badge-vue"
36
+ },
37
+ "engines": {
38
+ "node": ">=20"
39
+ },
40
+ "bugs": "https://github.com/molecule-dev/molecule/issues",
41
+ "publishConfig": {
42
+ "access": "public"
43
+ },
44
+ "peerDependencies": {
45
+ "@molecule/app-ui": "^1.0.1",
46
+ "@molecule/app-ui-vue": "^1.1.0",
47
+ "@molecule/app-vue": "^3.5.0",
48
+ "vue": "^3.4.0"
49
+ },
50
+ "devDependencies": {
51
+ "@molecule/app-framework-conformance": "0.0.0",
52
+ "@molecule/app-i18n": "1.2.1",
53
+ "@molecule/app-icons": "1.0.4",
54
+ "@molecule/app-ui": "1.3.11",
55
+ "@molecule/app-ui-vue": "1.1.2",
56
+ "@molecule/app-vue": "3.6.0",
57
+ "@types/node": "26.6.5",
58
+ "jsdom": "30.1.3",
59
+ "typescript": "6.0.3",
60
+ "vite": "8.3.5",
61
+ "vitest": "4.1.12",
62
+ "vue": "3.5.44",
63
+ "vue-tsc": "3.3.13"
64
+ }
65
+ }