@birdycom/omniaui-vue 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/manifest.json CHANGED
@@ -156,6 +156,12 @@
156
156
  "file": "src/components/OcButtonGroupText.vue",
157
157
  "snippet": null
158
158
  },
159
+ {
160
+ "name": "OcCallout",
161
+ "kind": "component",
162
+ "file": "src/components/OcCallout.vue",
163
+ "snippet": "@birdycom/omniaui/snippets/callout.html"
164
+ },
159
165
  {
160
166
  "name": "OcCard",
161
167
  "kind": "component",
@@ -390,6 +396,12 @@
390
396
  "file": "src/components/OcGreeting.vue",
391
397
  "snippet": "@birdycom/omniaui/snippets/greeting.html"
392
398
  },
399
+ {
400
+ "name": "OcGroup",
401
+ "kind": "component",
402
+ "file": "src/components/OcGroup.vue",
403
+ "snippet": "@birdycom/omniaui/snippets/group.html"
404
+ },
393
405
  {
394
406
  "name": "OcHeading",
395
407
  "kind": "component",
@@ -534,6 +546,12 @@
534
546
  "file": "src/components/OcMediaThumb.vue",
535
547
  "snippet": "@birdycom/omniaui/snippets/media-thumb.html"
536
548
  },
549
+ {
550
+ "name": "OcMenuStatic",
551
+ "kind": "component",
552
+ "file": "src/components/OcMenuStatic.vue",
553
+ "snippet": "@birdycom/omniaui/snippets/menu-static.html"
554
+ },
537
555
  {
538
556
  "name": "OcMessage",
539
557
  "kind": "component",
@@ -618,6 +636,12 @@
618
636
  "file": "src/components/OcPanel.vue",
619
637
  "snippet": "@birdycom/omniaui/snippets/panel.html"
620
638
  },
639
+ {
640
+ "name": "OcParticleField",
641
+ "kind": "component",
642
+ "file": "src/components/OcParticleField.vue",
643
+ "snippet": "@birdycom/omniaui/snippets/particle-field.html"
644
+ },
621
645
  {
622
646
  "name": "OcPasswordInput",
623
647
  "kind": "component",
@@ -708,6 +732,12 @@
708
732
  "file": "src/components/OcRatingInput.vue",
709
733
  "snippet": "@birdycom/omniaui/snippets/rating.html"
710
734
  },
735
+ {
736
+ "name": "OcReading",
737
+ "kind": "component",
738
+ "file": "src/components/OcReading.vue",
739
+ "snippet": "@birdycom/omniaui/snippets/reading.html"
740
+ },
711
741
  {
712
742
  "name": "OcRecoveryCodes",
713
743
  "kind": "component",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@birdycom/omniaui-vue",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "OmniaUI for Vue 3: one single-file component per OmniaUI component and block, rendering the exact markup of the CSS packages.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,14 +1,14 @@
1
1
  <script setup lang="ts">
2
2
  /**
3
3
  * Button. Renders <a> when `href` is set, otherwise <button>.
4
- * Classes: .oc-btn + --secondary/--outline/--ghost/--link/--destructive/--success/--gradient/--glass,
4
+ * Classes: .oc-btn + --secondary/--outline/--ghost/--link/--destructive/--success/--gradient/--glass/--neon,
5
5
  * --soft-primary/-success/-warning/-destructive/-info (row actions), --plain (icon only, no surface),
6
6
  * --xs/--sm/--lg, --icon, --pill, --inline (link button inside running text). `loading` sets aria-busy (spinner).
7
7
  */
8
8
  withDefaults(
9
9
  defineProps<{
10
10
  variant?:
11
- | 'default' | 'secondary' | 'outline' | 'ghost' | 'link' | 'destructive' | 'success' | 'gradient' | 'glass'
11
+ | 'default' | 'secondary' | 'outline' | 'ghost' | 'link' | 'destructive' | 'success' | 'gradient' | 'glass' | 'neon'
12
12
  | 'soft-primary' | 'soft-success' | 'soft-warning' | 'soft-destructive' | 'soft-info' | 'plain'
13
13
  size?: 'xs' | 'sm' | 'md' | 'lg'
14
14
  icon?: boolean
@@ -0,0 +1,11 @@
1
+ <!-- File: packages/vue/src/components/OcCallout.vue | Map: card row -> text (default slot) -> action (slot) -->
2
+ <script setup lang="ts">
3
+ /** Small card with a text on the left (default slot) and an action on the right (slot `action`). */
4
+ </script>
5
+
6
+ <template>
7
+ <div class="oc-callout">
8
+ <div class="oc-callout__text"><slot /></div>
9
+ <div v-if="$slots.action" class="oc-callout__action"><slot name="action" /></div>
10
+ </div>
11
+ </template>
@@ -1,9 +1,19 @@
1
1
  <script setup lang="ts">
2
- /** Menu item: <a> with `href`, otherwise <button>. */
3
- defineProps<{ href?: string }>()
2
+ /** Menu item: <a> with `href`, otherwise <button>. checked (true/false) adds a check column, hint a muted text on the right. */
3
+ withDefaults(defineProps<{ href?: string; checked?: boolean; hint?: string }>(), { checked: undefined })
4
4
  </script>
5
5
 
6
6
  <template>
7
- <a v-if="href" class="oc-dropdown-item" :href="href"><slot /></a>
8
- <button v-else class="oc-dropdown-item" type="button"><slot /></button>
7
+ <component
8
+ :is="href ? 'a' : 'button'"
9
+ class="oc-dropdown-item"
10
+ :href="href"
11
+ :type="href ? undefined : 'button'"
12
+ :role="checked !== undefined ? 'menuitemcheckbox' : undefined"
13
+ :aria-checked="checked !== undefined ? String(checked) : undefined"
14
+ >
15
+ <span v-if="checked !== undefined" class="oc-dropdown-check" aria-hidden="true"></span>
16
+ <slot />
17
+ <span v-if="hint" class="oc-dropdown-hint">{{ hint }}</span>
18
+ </component>
9
19
  </template>
@@ -0,0 +1,16 @@
1
+ <!-- File: packages/vue/src/components/OcGroup.vue | Map: section -> head (title + aside) -> meta -> content (slot) -->
2
+ <script setup lang="ts">
3
+ /** One section in a panel: title, a status on the right (aside, asideTone), a muted line (meta) and the content. */
4
+ withDefaults(defineProps<{ title: string; aside?: string; asideTone?: 'busy' | 'ok' | 'warn' | 'error'; meta?: string; headingLevel?: 2 | 3 | 4 }>(), { headingLevel: 2 })
5
+ </script>
6
+
7
+ <template>
8
+ <section class="oc-group">
9
+ <header class="oc-group__head">
10
+ <component :is="`h${headingLevel}`" class="oc-group__title">{{ title }}</component>
11
+ <span v-if="aside || $slots.aside" class="oc-group__aside" :data-tone="asideTone"><slot name="aside">{{ aside }}</slot></span>
12
+ </header>
13
+ <p v-if="meta" class="oc-group__meta">{{ meta }}</p>
14
+ <slot />
15
+ </section>
16
+ </template>
@@ -18,6 +18,8 @@ defineProps<{
18
18
  label?: string
19
19
  currency?: boolean
20
20
  ghost?: boolean
21
+ /** Closed it shows only the code ("NL"), the value in upper case */
22
+ code?: boolean
21
23
  /** Text icon, e.g. "€" (default: globe, or € with `currency`) */
22
24
  icon?: string
23
25
  }>()
@@ -26,7 +28,7 @@ const { root, control } = useAttrsSplit()
26
28
  </script>
27
29
 
28
30
  <template>
29
- <label v-bind="root" :class="['oc-language-select', ghost && 'oc-language-select--ghost', currency && 'oc-language-select--currency']">
31
+ <label v-bind="root" :class="['oc-language-select', ghost && 'oc-language-select--ghost', currency && 'oc-language-select--currency', code && 'oc-language-select--code']" :data-code="code ? String(model ?? options[0]?.value ?? '').toUpperCase() : undefined">
30
32
  <span class="oc-language-select-icon" aria-hidden="true">
31
33
  <slot name="icon">
32
34
  <template v-if="icon || currency">{{ icon ?? '€' }}</template>
@@ -0,0 +1,9 @@
1
+ <!-- File: packages/vue/src/components/OcMenuStatic.vue | Map: div.oc-dropdown-menu--static -> items (slot) -->
2
+ <script setup lang="ts">
3
+ /** The dropdown menu as a surface of its own (a tray menu). Items: OcDropdownItem (checked, hint), OcDropdownLabel. */
4
+ defineProps<{ flat?: boolean }>()
5
+ </script>
6
+
7
+ <template>
8
+ <div role="menu" :class="['oc-dropdown-menu', 'oc-dropdown-menu--static', flat && 'oc-dropdown-menu--flat']"><slot /></div>
9
+ </template>
@@ -1,9 +1,9 @@
1
1
  <!-- File: packages/vue/src/components/OcMeterRow.vue | Map: props -> level from the percentage -> row markup -->
2
2
  <script setup lang="ts">
3
- /** Usage line: label, percentage and amount, a colored bar (warn from 75, critical from 90) and the reset line. */
3
+ /** Usage line: label, percentage and amount, a colored bar (warn from 75, critical from 90), a sub-line (sub, subPercent) and the reset line. */
4
4
  import { computed } from 'vue'
5
5
 
6
- const props = defineProps<{ label: string; percent: number; value?: string; reset?: string; level?: 'ok' | 'warn' | 'critical' }>()
6
+ const props = defineProps<{ label: string; percent: number; value?: string; reset?: string; level?: 'ok' | 'warn' | 'critical'; sub?: string; subPercent?: number; subLevel?: 'warn' | 'critical' }>()
7
7
  const pct = computed(() => Math.max(0, Math.min(100, Math.round(props.percent))))
8
8
  const tone = computed(() => props.level ?? (pct.value >= 90 ? 'critical' : pct.value >= 75 ? 'warn' : 'ok'))
9
9
  </script>
@@ -13,6 +13,7 @@ const tone = computed(() => props.level ?? (pct.value >= 90 ? 'critical' : pct.v
13
13
  <span class="oc-meter-row__label">{{ label }}</span>
14
14
  <span class="oc-meter-row__value"><strong>{{ pct }}%</strong><template v-if="value"> · {{ value }}</template></span>
15
15
  <span class="oc-meter-row__bar" role="meter" aria-valuemin="0" aria-valuemax="100" :aria-valuenow="pct" :aria-label="label"></span>
16
+ <span v-if="sub" class="oc-meter-row__sub">{{ sub }}<span v-if="subPercent != null" class="oc-meter-row__subbar" :data-level="subLevel" :style="{ '--oc-meter': `${Math.max(0, Math.min(100, subPercent))}%` }"></span></span>
16
17
  <span v-if="reset" class="oc-meter-row__reset">{{ reset }}</span>
17
18
  </div>
18
19
  </template>
@@ -0,0 +1,23 @@
1
+ <!-- File: packages/vue/src/components/OcParticleField.vue | Map: canvas.oc-particles -> start on mount (particles.js) -> stop on unmount -->
2
+ <script setup lang="ts">
3
+ /** Background canvas with drifting points and lines; one still frame with reduced motion. local = fill the positioned parent. */
4
+ import { onBeforeUnmount, onMounted, ref, watch } from 'vue'
5
+ import { initParticles } from '../../../ui/src/particles.js'
6
+
7
+ const props = defineProps<{ count?: number; speed?: number; link?: number; local?: boolean }>()
8
+ const canvas = ref<HTMLCanvasElement | null>(null)
9
+ let stop = () => {}
10
+ const start = () => {
11
+ stop()
12
+ if (!canvas.value) return
13
+ const options = Object.fromEntries(Object.entries({ count: props.count, speed: props.speed, link: props.link }).filter(([, v]) => v != null))
14
+ stop = initParticles(canvas.value, options)
15
+ }
16
+ onMounted(start)
17
+ watch(() => [props.count, props.speed, props.link], start)
18
+ onBeforeUnmount(() => stop())
19
+ </script>
20
+
21
+ <template>
22
+ <canvas ref="canvas" aria-hidden="true" :class="['oc-particles', local && 'oc-particles--local']"></canvas>
23
+ </template>
@@ -0,0 +1,9 @@
1
+ <!-- File: packages/vue/src/components/OcReading.vue | Map: span.oc-reading (+ level) -> value (slot) -->
2
+ <script setup lang="ts">
3
+ /** A small measured value ("57 °C") in tabular numbers. level: cool (default), warm, hot. */
4
+ defineProps<{ level?: 'cool' | 'warm' | 'hot' }>()
5
+ </script>
6
+
7
+ <template>
8
+ <span :class="['oc-reading', level && level !== 'cool' && `oc-reading--${level}`]"><slot /></span>
9
+ </template>
package/src/index.ts CHANGED
@@ -27,6 +27,7 @@ import OcBusyOverlay from './components/OcBusyOverlay.vue'
27
27
  import OcButton from './components/OcButton.vue'
28
28
  import OcButtonGroup from './components/OcButtonGroup.vue'
29
29
  import OcButtonGroupText from './components/OcButtonGroupText.vue'
30
+ import OcCallout from './components/OcCallout.vue'
30
31
  import OcCard from './components/OcCard.vue'
31
32
  import OcChartLine from './components/OcChartLine.vue'
32
33
  import OcChatComposer from './components/OcChatComposer.vue'
@@ -66,6 +67,7 @@ import OcGlass from './components/OcGlass.vue'
66
67
  import OcGlassBar from './components/OcGlassBar.vue'
67
68
  import OcGlassPanel from './components/OcGlassPanel.vue'
68
69
  import OcGreeting from './components/OcGreeting.vue'
70
+ import OcGroup from './components/OcGroup.vue'
69
71
  import OcHeading from './components/OcHeading.vue'
70
72
  import OcHoverCard from './components/OcHoverCard.vue'
71
73
  import OcImageZoom from './components/OcImageZoom.vue'
@@ -90,6 +92,7 @@ import OcMarquee from './components/OcMarquee.vue'
90
92
  import OcMediaCard from './components/OcMediaCard.vue'
91
93
  import OcMediaRow from './components/OcMediaRow.vue'
92
94
  import OcMediaThumb from './components/OcMediaThumb.vue'
95
+ import OcMenuStatic from './components/OcMenuStatic.vue'
93
96
  import OcMessage from './components/OcMessage.vue'
94
97
  import OcMessageList from './components/OcMessageList.vue'
95
98
  import OcMessageThread from './components/OcMessageThread.vue'
@@ -104,6 +107,7 @@ import OcOtpInput from './components/OcOtpInput.vue'
104
107
  import OcPageHeader from './components/OcPageHeader.vue'
105
108
  import OcPagination from './components/OcPagination.vue'
106
109
  import OcPanel from './components/OcPanel.vue'
110
+ import OcParticleField from './components/OcParticleField.vue'
107
111
  import OcPasswordInput from './components/OcPasswordInput.vue'
108
112
  import OcPasswordRequirements from './components/OcPasswordRequirements.vue'
109
113
  import OcPhoneInput from './components/OcPhoneInput.vue'
@@ -119,6 +123,7 @@ import OcRadio from './components/OcRadio.vue'
119
123
  import OcRadioGroup from './components/OcRadioGroup.vue'
120
124
  import OcRating from './components/OcRating.vue'
121
125
  import OcRatingInput from './components/OcRatingInput.vue'
126
+ import OcReading from './components/OcReading.vue'
122
127
  import OcRecoveryCodes from './components/OcRecoveryCodes.vue'
123
128
  import OcResult from './components/OcResult.vue'
124
129
  import OcRibbon from './components/OcRibbon.vue'
@@ -234,6 +239,7 @@ export {
234
239
  OcButton,
235
240
  OcButtonGroup,
236
241
  OcButtonGroupText,
242
+ OcCallout,
237
243
  OcCard,
238
244
  OcChartLine,
239
245
  OcChatComposer,
@@ -273,6 +279,7 @@ export {
273
279
  OcGlassBar,
274
280
  OcGlassPanel,
275
281
  OcGreeting,
282
+ OcGroup,
276
283
  OcHeading,
277
284
  OcHoverCard,
278
285
  OcImageZoom,
@@ -297,6 +304,7 @@ export {
297
304
  OcMediaCard,
298
305
  OcMediaRow,
299
306
  OcMediaThumb,
307
+ OcMenuStatic,
300
308
  OcMessage,
301
309
  OcMessageList,
302
310
  OcMessageThread,
@@ -311,6 +319,7 @@ export {
311
319
  OcPageHeader,
312
320
  OcPagination,
313
321
  OcPanel,
322
+ OcParticleField,
314
323
  OcPasswordInput,
315
324
  OcPasswordRequirements,
316
325
  OcPhoneInput,
@@ -326,6 +335,7 @@ export {
326
335
  OcRadioGroup,
327
336
  OcRating,
328
337
  OcRatingInput,
338
+ OcReading,
329
339
  OcRecoveryCodes,
330
340
  OcResult,
331
341
  OcRibbon,
@@ -501,6 +511,7 @@ export const components: Record<string, Component> = {
501
511
  OcButton,
502
512
  OcButtonGroup,
503
513
  OcButtonGroupText,
514
+ OcCallout,
504
515
  OcCard,
505
516
  OcChartLine,
506
517
  OcChatComposer,
@@ -540,6 +551,7 @@ export const components: Record<string, Component> = {
540
551
  OcGlassBar,
541
552
  OcGlassPanel,
542
553
  OcGreeting,
554
+ OcGroup,
543
555
  OcHeading,
544
556
  OcHoverCard,
545
557
  OcImageZoom,
@@ -564,6 +576,7 @@ export const components: Record<string, Component> = {
564
576
  OcMediaCard,
565
577
  OcMediaRow,
566
578
  OcMediaThumb,
579
+ OcMenuStatic,
567
580
  OcMessage,
568
581
  OcMessageList,
569
582
  OcMessageThread,
@@ -578,6 +591,7 @@ export const components: Record<string, Component> = {
578
591
  OcPageHeader,
579
592
  OcPagination,
580
593
  OcPanel,
594
+ OcParticleField,
581
595
  OcPasswordInput,
582
596
  OcPasswordRequirements,
583
597
  OcPhoneInput,
@@ -593,6 +607,7 @@ export const components: Record<string, Component> = {
593
607
  OcRadioGroup,
594
608
  OcRating,
595
609
  OcRatingInput,
610
+ OcReading,
596
611
  OcRecoveryCodes,
597
612
  OcResult,
598
613
  OcRibbon,