@birdycom/omniaui-vue 0.12.1 → 0.12.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.
- package/dist/components/OcAlert.vue.d.ts +2 -1
- package/dist/components/OcButton.vue.d.ts +2 -1
- package/dist/components/OcGlass.vue.d.ts +21 -0
- package/dist/components/OcGlassPanel.vue.d.ts +16 -0
- package/dist/components/OcLinkRow.vue.d.ts +25 -0
- package/dist/components/OcLiveFrame.vue.d.ts +30 -0
- package/dist/components/OcProgress.vue.d.ts +6 -0
- package/dist/components/OcProse.vue.d.ts +4 -4
- package/dist/components/OcStatus.vue.d.ts +20 -0
- package/dist/components/OcStatusDot.vue.d.ts +12 -0
- package/dist/components/OcTitlebar.vue.d.ts +29 -0
- package/dist/components/OcTitlebarBody.vue.d.ts +12 -0
- package/dist/components/OcTitlebarButton.vue.d.ts +18 -0
- package/dist/components/OcTitlebarWindow.vue.d.ts +12 -0
- package/dist/components/OcWatermark.vue.d.ts +31 -0
- package/dist/index.d.ts +12 -1
- package/dist/omniaui-vue.js +3047 -2792
- package/dist/omniaui-vue.js.map +1 -1
- package/manifest.json +66 -0
- package/package.json +1 -1
- package/src/components/OcAlert.vue +3 -2
- package/src/components/OcButton.vue +4 -1
- package/src/components/OcGlass.vue +10 -0
- package/src/components/OcGlassPanel.vue +9 -0
- package/src/components/OcLinkRow.vue +19 -0
- package/src/components/OcLiveFrame.vue +21 -0
- package/src/components/OcProgress.vue +25 -5
- package/src/components/OcProse.vue +3 -3
- package/src/components/OcStatus.vue +16 -0
- package/src/components/OcStatusDot.vue +18 -0
- package/src/components/OcTitlebar.vue +18 -0
- package/src/components/OcTitlebarBody.vue +8 -0
- package/src/components/OcTitlebarButton.vue +10 -0
- package/src/components/OcTitlebarWindow.vue +8 -0
- package/src/components/OcWatermark.vue +29 -0
- package/src/index.ts +33 -0
package/manifest.json
CHANGED
|
@@ -324,6 +324,18 @@
|
|
|
324
324
|
"file": "src/components/OcFormField.vue",
|
|
325
325
|
"snippet": "@birdycom/omniaui/snippets/form-field.html"
|
|
326
326
|
},
|
|
327
|
+
{
|
|
328
|
+
"name": "OcGlass",
|
|
329
|
+
"kind": "component",
|
|
330
|
+
"file": "src/components/OcGlass.vue",
|
|
331
|
+
"snippet": "@birdycom/omniaui/snippets/glass.html"
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"name": "OcGlassPanel",
|
|
335
|
+
"kind": "component",
|
|
336
|
+
"file": "src/components/OcGlassPanel.vue",
|
|
337
|
+
"snippet": "@birdycom/omniaui/snippets/glass.html"
|
|
338
|
+
},
|
|
327
339
|
{
|
|
328
340
|
"name": "OcGreeting",
|
|
329
341
|
"kind": "component",
|
|
@@ -420,12 +432,24 @@
|
|
|
420
432
|
"file": "src/components/OcLinkArrow.vue",
|
|
421
433
|
"snippet": "@birdycom/omniaui/snippets/link-arrow.html"
|
|
422
434
|
},
|
|
435
|
+
{
|
|
436
|
+
"name": "OcLinkRow",
|
|
437
|
+
"kind": "component",
|
|
438
|
+
"file": "src/components/OcLinkRow.vue",
|
|
439
|
+
"snippet": "@birdycom/omniaui/snippets/link-row.html"
|
|
440
|
+
},
|
|
423
441
|
{
|
|
424
442
|
"name": "OcListToolbar",
|
|
425
443
|
"kind": "component",
|
|
426
444
|
"file": "src/components/OcListToolbar.vue",
|
|
427
445
|
"snippet": "@birdycom/omniaui/snippets/list-toolbar.html"
|
|
428
446
|
},
|
|
447
|
+
{
|
|
448
|
+
"name": "OcLiveFrame",
|
|
449
|
+
"kind": "component",
|
|
450
|
+
"file": "src/components/OcLiveFrame.vue",
|
|
451
|
+
"snippet": "@birdycom/omniaui/snippets/live-frame.html"
|
|
452
|
+
},
|
|
429
453
|
{
|
|
430
454
|
"name": "OcMarquee",
|
|
431
455
|
"kind": "component",
|
|
@@ -702,6 +726,18 @@
|
|
|
702
726
|
"file": "src/components/OcStatCard.vue",
|
|
703
727
|
"snippet": "@birdycom/omniaui/snippets/stat-card.html"
|
|
704
728
|
},
|
|
729
|
+
{
|
|
730
|
+
"name": "OcStatus",
|
|
731
|
+
"kind": "component",
|
|
732
|
+
"file": "src/components/OcStatus.vue",
|
|
733
|
+
"snippet": "@birdycom/omniaui/snippets/status-dot.html"
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
"name": "OcStatusDot",
|
|
737
|
+
"kind": "component",
|
|
738
|
+
"file": "src/components/OcStatusDot.vue",
|
|
739
|
+
"snippet": "@birdycom/omniaui/snippets/status-dot.html"
|
|
740
|
+
},
|
|
705
741
|
{
|
|
706
742
|
"name": "OcStepper",
|
|
707
743
|
"kind": "component",
|
|
@@ -774,6 +810,30 @@
|
|
|
774
810
|
"file": "src/components/OcTimeline.vue",
|
|
775
811
|
"snippet": "@birdycom/omniaui/snippets/timeline.html"
|
|
776
812
|
},
|
|
813
|
+
{
|
|
814
|
+
"name": "OcTitlebar",
|
|
815
|
+
"kind": "component",
|
|
816
|
+
"file": "src/components/OcTitlebar.vue",
|
|
817
|
+
"snippet": "@birdycom/omniaui/snippets/titlebar.html"
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
"name": "OcTitlebarBody",
|
|
821
|
+
"kind": "component",
|
|
822
|
+
"file": "src/components/OcTitlebarBody.vue",
|
|
823
|
+
"snippet": "@birdycom/omniaui/snippets/titlebar.html"
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
"name": "OcTitlebarButton",
|
|
827
|
+
"kind": "component",
|
|
828
|
+
"file": "src/components/OcTitlebarButton.vue",
|
|
829
|
+
"snippet": "@birdycom/omniaui/snippets/titlebar.html"
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
"name": "OcTitlebarWindow",
|
|
833
|
+
"kind": "component",
|
|
834
|
+
"file": "src/components/OcTitlebarWindow.vue",
|
|
835
|
+
"snippet": "@birdycom/omniaui/snippets/titlebar.html"
|
|
836
|
+
},
|
|
777
837
|
{
|
|
778
838
|
"name": "OcToast",
|
|
779
839
|
"kind": "component",
|
|
@@ -840,6 +900,12 @@
|
|
|
840
900
|
"file": "src/components/OcVersionBanner.vue",
|
|
841
901
|
"snippet": "@birdycom/omniaui/snippets/version-banner.html"
|
|
842
902
|
},
|
|
903
|
+
{
|
|
904
|
+
"name": "OcWatermark",
|
|
905
|
+
"kind": "component",
|
|
906
|
+
"file": "src/components/OcWatermark.vue",
|
|
907
|
+
"snippet": "@birdycom/omniaui/snippets/watermark.html"
|
|
908
|
+
},
|
|
843
909
|
{
|
|
844
910
|
"name": "OcBlockAboutTimeline",
|
|
845
911
|
"kind": "block",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@birdycom/omniaui-vue",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.3",
|
|
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,16 +1,17 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
/** Alert. Classes: .oc-alert--info/success/warning/danger. Default slot = description. */
|
|
2
|
+
/** Alert. Classes: .oc-alert--info/success/warning/danger, --inline (compact, under a field). Default slot = description. */
|
|
3
3
|
withDefaults(
|
|
4
4
|
defineProps<{
|
|
5
5
|
variant?: 'info' | 'success' | 'warning' | 'danger'
|
|
6
6
|
title?: string
|
|
7
|
+
inline?: boolean
|
|
7
8
|
}>(),
|
|
8
9
|
{ variant: 'info' },
|
|
9
10
|
)
|
|
10
11
|
</script>
|
|
11
12
|
|
|
12
13
|
<template>
|
|
13
|
-
<div :class="['oc-alert', `oc-alert--${variant}
|
|
14
|
+
<div :class="['oc-alert', `oc-alert--${variant}`, inline && 'oc-alert--inline']" :role="variant === 'danger' && inline ? 'alert' : 'status'">
|
|
14
15
|
<h4 v-if="title || $slots.title" class="oc-alert-title"><slot name="title">{{ title }}</slot></h4>
|
|
15
16
|
<p v-if="$slots.default" class="oc-alert-description"><slot /></p>
|
|
16
17
|
</div>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Button. Renders <a> when `href` is set, otherwise <button>.
|
|
4
4
|
* Classes: .oc-btn + --secondary/--outline/--ghost/--link/--destructive/--success/--gradient/--glass,
|
|
5
|
-
* --xs/--sm/--lg, --icon, --pill
|
|
5
|
+
* --xs/--sm/--lg, --icon, --pill, --inline (link button inside running text)
|
|
6
6
|
*/
|
|
7
7
|
withDefaults(
|
|
8
8
|
defineProps<{
|
|
@@ -10,6 +10,7 @@ withDefaults(
|
|
|
10
10
|
size?: 'xs' | 'sm' | 'md' | 'lg'
|
|
11
11
|
icon?: boolean
|
|
12
12
|
pill?: boolean
|
|
13
|
+
inline?: boolean
|
|
13
14
|
href?: string
|
|
14
15
|
type?: 'button' | 'submit' | 'reset'
|
|
15
16
|
}>(),
|
|
@@ -27,6 +28,7 @@ withDefaults(
|
|
|
27
28
|
size !== 'md' && `oc-btn--${size}`,
|
|
28
29
|
icon && 'oc-btn--icon',
|
|
29
30
|
pill && 'oc-btn--pill',
|
|
31
|
+
inline && 'oc-btn--inline',
|
|
30
32
|
]"
|
|
31
33
|
>
|
|
32
34
|
<slot />
|
|
@@ -40,6 +42,7 @@ withDefaults(
|
|
|
40
42
|
size !== 'md' && `oc-btn--${size}`,
|
|
41
43
|
icon && 'oc-btn--icon',
|
|
42
44
|
pill && 'oc-btn--pill',
|
|
45
|
+
inline && 'oc-btn--inline',
|
|
43
46
|
]"
|
|
44
47
|
>
|
|
45
48
|
<slot />
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<!-- File: packages/vue/src/components/OcGlass.vue | Map: props (strong, flat, as) -> .oc-glass sheet -> default slot -->
|
|
2
|
+
<script setup lang="ts">
|
|
3
|
+
/** See-through glass sheet with a light top edge; .oc-card inside becomes a glass panel.
|
|
4
|
+
* Classes: .oc-glass + --strong, --flat (desktop window where the OS draws the blur) */
|
|
5
|
+
withDefaults(defineProps<{ strong?: boolean; flat?: boolean; as?: 'div' | 'section' | 'aside' | 'article' | 'main' }>(), { as: 'div' })
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<component :is="as" :class="['oc-glass', strong && 'oc-glass--strong', flat && 'oc-glass--flat']"><slot /></component>
|
|
10
|
+
</template>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<!-- File: packages/vue/src/components/OcGlassPanel.vue | Map: props (strong) -> div.oc-glass-panel -> default slot -->
|
|
2
|
+
<script setup lang="ts">
|
|
3
|
+
/** A lighter layer inside a glass sheet. Classes: .oc-glass-panel(--strong) */
|
|
4
|
+
defineProps<{ strong?: boolean }>()
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<div :class="['oc-glass-panel', strong && 'oc-glass-panel--strong']"><slot /></div>
|
|
9
|
+
</template>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!-- File: packages/vue/src/components/OcLinkRow.vue | Map: props (links, tone, size) -> ul.oc-link-row -> li > a per link, or the slot -->
|
|
2
|
+
<script setup lang="ts">
|
|
3
|
+
/** A row of links under a card; external links get an arrow, github.com links the GitHub mark (CSS, by the href).
|
|
4
|
+
* Classes: .oc-link-row + --accent/--muted, --sm/--lg */
|
|
5
|
+
withDefaults(
|
|
6
|
+
defineProps<{ links?: { href: string; label: string }[]; tone?: 'default' | 'accent' | 'muted'; size?: 'sm' | 'default' | 'lg' }>(),
|
|
7
|
+
{ tone: 'default', size: 'default' },
|
|
8
|
+
)
|
|
9
|
+
const external = (href: string) => /^https?:\/\//.test(href)
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<ul :class="['oc-link-row', tone !== 'default' && `oc-link-row--${tone}`, size !== 'default' && `oc-link-row--${size}`]">
|
|
14
|
+
<template v-if="links">
|
|
15
|
+
<li v-for="(l, i) in links" :key="i"><a :href="l.href" :rel="external(l.href) ? 'noopener' : undefined">{{ l.label }}</a></li>
|
|
16
|
+
</template>
|
|
17
|
+
<slot v-else />
|
|
18
|
+
</ul>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!-- File: packages/vue/src/components/OcLiveFrame.vue | Map: props (src, title, width, height, static) -> div.oc-live-frame -> iframe or slot -->
|
|
2
|
+
<script setup lang="ts">
|
|
3
|
+
/**
|
|
4
|
+
* A live page at a virtual size (default 1280x720), scaled down to the frame width in pure CSS. Without src the slot
|
|
5
|
+
* goes in (an <img>, <video> or .oc-live-frame__content). Classes: .oc-live-frame, --static, .oc-browser-frame__view
|
|
6
|
+
*/
|
|
7
|
+
withDefaults(
|
|
8
|
+
defineProps<{ src?: string; title?: string; width?: number; height?: number; static?: boolean; inBrowserFrame?: boolean }>(),
|
|
9
|
+
{ title: '', width: 1280, height: 720, static: false, inBrowserFrame: false },
|
|
10
|
+
)
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<div
|
|
15
|
+
:class="[inBrowserFrame && 'oc-browser-frame__view', 'oc-live-frame', static && 'oc-live-frame--static']"
|
|
16
|
+
:style="{ '--oc-live-w': width, '--oc-live-h': height }"
|
|
17
|
+
>
|
|
18
|
+
<iframe v-if="src" :src="src" :title="title" loading="lazy" scrolling="no" :tabindex="static ? -1 : undefined" />
|
|
19
|
+
<slot v-else />
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
/** Progress bar. `value` of `max` (default 100). Classes: .oc-progress-bar--success/warning/danger
|
|
2
|
+
/** Progress bar. `value` of `max` (default 100). Classes: .oc-progress(--sm/--xs/--glow), .oc-progress-bar--success/warning/danger,
|
|
3
|
+
* .oc-progress-marker. `levels`: warning from 70 %, danger from 90 % (or [warning, danger]); an explicit variant wins.
|
|
4
|
+
* `marker`: a target point in the unit of `value`. */
|
|
3
5
|
import { computed } from 'vue'
|
|
4
6
|
|
|
5
7
|
const props = withDefaults(
|
|
@@ -7,15 +9,33 @@ const props = withDefaults(
|
|
|
7
9
|
value: number
|
|
8
10
|
max?: number
|
|
9
11
|
variant?: 'default' | 'success' | 'warning' | 'danger'
|
|
12
|
+
size?: 'xs' | 'sm' | 'md'
|
|
13
|
+
glow?: boolean
|
|
14
|
+
levels?: boolean | [number, number]
|
|
15
|
+
marker?: number
|
|
10
16
|
label?: string
|
|
11
17
|
}>(),
|
|
12
|
-
{ max: 100, variant: 'default' },
|
|
18
|
+
{ max: 100, variant: 'default', size: 'md', levels: false },
|
|
13
19
|
)
|
|
14
|
-
const
|
|
20
|
+
const pct = (v: number) => (props.max > 0 ? Math.min(100, Math.max(0, (v / props.max) * 100)) : 0)
|
|
21
|
+
const percent = computed(() => Math.round(pct(props.value)))
|
|
22
|
+
const tone = computed(() => {
|
|
23
|
+
if (props.variant !== 'default' || !props.levels) return props.variant
|
|
24
|
+
const [warn, danger] = props.levels === true ? [70, 90] : props.levels
|
|
25
|
+
return percent.value >= danger ? 'danger' : percent.value >= warn ? 'warning' : 'default'
|
|
26
|
+
})
|
|
15
27
|
</script>
|
|
16
28
|
|
|
17
29
|
<template>
|
|
18
|
-
<div
|
|
19
|
-
|
|
30
|
+
<div
|
|
31
|
+
:class="['oc-progress', size !== 'md' && `oc-progress--${size}`, glow && 'oc-progress--glow']"
|
|
32
|
+
role="progressbar"
|
|
33
|
+
:aria-valuenow="value"
|
|
34
|
+
aria-valuemin="0"
|
|
35
|
+
:aria-valuemax="max"
|
|
36
|
+
:aria-label="label"
|
|
37
|
+
>
|
|
38
|
+
<div :class="['oc-progress-bar', tone !== 'default' && `oc-progress-bar--${tone}`]" :style="{ width: `${percent}%` }"></div>
|
|
39
|
+
<span v-if="marker != null" class="oc-progress-marker" :style="{ left: `${pct(marker)}%` }"></span>
|
|
20
40
|
</div>
|
|
21
41
|
</template>
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
<script setup lang="ts">
|
|
3
3
|
/**
|
|
4
4
|
* Typography for long-form text written without classes (same markup as snippets/prose.html). Slot default = the text
|
|
5
|
-
* (put .oc-prose-lead on the intro paragraph); the snippet's demo article when empty. size: sm | md | lg, full = no max width.
|
|
6
|
-
* Classes: .oc-prose(--sm/--lg/--full), .oc-prose-lead
|
|
5
|
+
* (put .oc-prose-lead on the intro paragraph); the snippet's demo article when empty. size: compact (widgets, 13 px) | sm | md | lg, full = no max width.
|
|
6
|
+
* Classes: .oc-prose(--compact/--sm/--lg/--full), .oc-prose-lead
|
|
7
7
|
*/
|
|
8
|
-
withDefaults(defineProps<{ size?: 'sm' | 'md' | 'lg'; full?: boolean; as?: 'article' | 'div' | 'section' }>(), { size: 'md', as: 'article' })
|
|
8
|
+
withDefaults(defineProps<{ size?: 'compact' | 'sm' | 'md' | 'lg'; full?: boolean; as?: 'article' | 'div' | 'section' }>(), { size: 'md', as: 'article' })
|
|
9
9
|
</script>
|
|
10
10
|
|
|
11
11
|
<template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!-- File: packages/vue/src/components/OcStatus.vue | Map: props (tone, meta) -> p.oc-status -> OcStatusDot + __text (slot) + __meta -->
|
|
2
|
+
<script setup lang="ts">
|
|
3
|
+
/** Status row: dot + one line of state text (slot, cuts off with …) + optional meta on the right.
|
|
4
|
+
* Classes: .oc-status, .oc-status__text, .oc-status__meta */
|
|
5
|
+
import OcStatusDot from './OcStatusDot.vue'
|
|
6
|
+
|
|
7
|
+
withDefaults(defineProps<{ tone?: 'default' | 'working' | 'waiting' | 'done' | 'error' | 'idle'; meta?: string }>(), { tone: 'default' })
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<p class="oc-status">
|
|
12
|
+
<OcStatusDot :tone="tone" />
|
|
13
|
+
<span class="oc-status__text"><slot /></span>
|
|
14
|
+
<span v-if="meta || $slots.meta" class="oc-status__meta"><slot name="meta">{{ meta }}</slot></span>
|
|
15
|
+
</p>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- File: packages/vue/src/components/OcStatusDot.vue | Map: props (tone, size, label) -> span.oc-status-dot (role="img" with a label, else aria-hidden) -->
|
|
2
|
+
<script setup lang="ts">
|
|
3
|
+
/** A live state light; --working pulses. With `label` the dot stands alone (role="img"), without it is decoration.
|
|
4
|
+
* Classes: .oc-status-dot + --working/--waiting/--done/--error/--idle, --sm/--lg */
|
|
5
|
+
withDefaults(
|
|
6
|
+
defineProps<{ tone?: 'default' | 'working' | 'waiting' | 'done' | 'error' | 'idle'; size?: 'sm' | 'md' | 'lg'; label?: string }>(),
|
|
7
|
+
{ tone: 'default', size: 'md' },
|
|
8
|
+
)
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<span
|
|
13
|
+
:class="['oc-status-dot', tone !== 'default' && `oc-status-dot--${tone}`, size !== 'md' && `oc-status-dot--${size}`]"
|
|
14
|
+
:role="label ? 'img' : undefined"
|
|
15
|
+
:aria-label="label"
|
|
16
|
+
:aria-hidden="label ? undefined : 'true'"
|
|
17
|
+
></span>
|
|
18
|
+
</template>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- File: packages/vue/src/components/OcTitlebar.vue | Map: props (title, subtitle, bordered, size) -> header.oc-titlebar -> __main (icon slot, title, subtitle) -> __actions (default slot) -->
|
|
2
|
+
<script setup lang="ts">
|
|
3
|
+
/** Drag area of a frameless desktop window (app-region: drag); buttons in it stay clickable.
|
|
4
|
+
* Slots: icon, title, subtitle, default (the OcTitlebarButton actions).
|
|
5
|
+
* Classes: .oc-titlebar(--bordered/--sm), __main, __icon, __title, __subtitle, __actions */
|
|
6
|
+
withDefaults(defineProps<{ title?: string; subtitle?: string; bordered?: boolean; size?: 'sm' | 'md' }>(), { size: 'md' })
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<header :class="['oc-titlebar', bordered && 'oc-titlebar--bordered', size === 'sm' && 'oc-titlebar--sm']">
|
|
11
|
+
<div class="oc-titlebar__main">
|
|
12
|
+
<span v-if="$slots.icon" class="oc-titlebar__icon" aria-hidden="true"><slot name="icon" /></span>
|
|
13
|
+
<span v-if="title || $slots.title" class="oc-titlebar__title"><slot name="title">{{ title }}</slot></span>
|
|
14
|
+
<span v-if="subtitle || $slots.subtitle" class="oc-titlebar__subtitle"><slot name="subtitle">{{ subtitle }}</slot></span>
|
|
15
|
+
</div>
|
|
16
|
+
<div v-if="$slots.default" class="oc-titlebar__actions"><slot /></div>
|
|
17
|
+
</header>
|
|
18
|
+
</template>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<!-- File: packages/vue/src/components/OcTitlebarBody.vue | Map: div.oc-titlebar-body -> slot -->
|
|
2
|
+
<script setup lang="ts">
|
|
3
|
+
/** The part of the window that scrolls; the title bar gets its hairline once it does. Class: .oc-titlebar-body */
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<template>
|
|
7
|
+
<div class="oc-titlebar-body"><slot /></div>
|
|
8
|
+
</template>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<!-- File: packages/vue/src/components/OcTitlebarButton.vue | Map: props (label, close) -> button.oc-titlebar__btn -> slot (icon) -->
|
|
2
|
+
<script setup lang="ts">
|
|
3
|
+
/** Compact icon button in the title bar; `label` names it for screen readers, `close` turns it red on hover.
|
|
4
|
+
* Classes: .oc-titlebar__btn(--close) */
|
|
5
|
+
defineProps<{ label: string; close?: boolean }>()
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<button type="button" :class="['oc-titlebar__btn', close && 'oc-titlebar__btn--close']" :aria-label="label" :title="label"><slot /></button>
|
|
10
|
+
</template>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<!-- File: packages/vue/src/components/OcTitlebarWindow.vue | Map: div.oc-titlebar-window -> slot (OcTitlebar + OcTitlebarBody) -->
|
|
2
|
+
<script setup lang="ts">
|
|
3
|
+
/** Column around the title bar and the body, so the bar sees the body scroll. Class: .oc-titlebar-window */
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<template>
|
|
7
|
+
<div class="oc-titlebar-window"><slot /></div>
|
|
8
|
+
</template>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<!-- File: packages/vue/src/components/OcWatermark.vue | Map: props (text, variant, tone, repeat) -> span.oc-watermark (text once or tiled) -->
|
|
2
|
+
<script setup lang="ts">
|
|
3
|
+
/**
|
|
4
|
+
* Light text over its positioned parent (put it last inside an element with class="relative"). Click-through and
|
|
5
|
+
* aria-hidden. A logo or icon goes in the "mark" slot (<img> or <svg>) instead of text. Classes: .oc-watermark + --straight/--tile/--corner/--corner-top, --light/--primary/--destructive
|
|
6
|
+
*/
|
|
7
|
+
withDefaults(
|
|
8
|
+
defineProps<{
|
|
9
|
+
text?: string
|
|
10
|
+
variant?: 'diagonal' | 'straight' | 'tile' | 'corner' | 'corner-top'
|
|
11
|
+
tone?: 'default' | 'light' | 'primary' | 'destructive'
|
|
12
|
+
repeat?: number
|
|
13
|
+
mono?: boolean
|
|
14
|
+
}>(),
|
|
15
|
+
{ text: 'Concept', variant: 'diagonal', tone: 'default', repeat: 12, mono: false },
|
|
16
|
+
)
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<span
|
|
21
|
+
:class="['oc-watermark', variant !== 'diagonal' && `oc-watermark--${variant}`, tone !== 'default' && `oc-watermark--${tone}`, mono && 'oc-watermark--mono']"
|
|
22
|
+
aria-hidden="true"
|
|
23
|
+
>
|
|
24
|
+
<template v-for="i in (variant === 'tile' ? Math.max(1, repeat) : 1)" :key="i">
|
|
25
|
+
<slot v-if="$slots.mark" name="mark" />
|
|
26
|
+
<span v-else><slot>{{ text }}</slot></span>
|
|
27
|
+
</template>
|
|
28
|
+
</span>
|
|
29
|
+
</template>
|
package/src/index.ts
CHANGED
|
@@ -55,6 +55,8 @@ import OcFactList from './components/OcFactList.vue'
|
|
|
55
55
|
import OcFilterCounts from './components/OcFilterCounts.vue'
|
|
56
56
|
import OcFlipCard from './components/OcFlipCard.vue'
|
|
57
57
|
import OcFormField from './components/OcFormField.vue'
|
|
58
|
+
import OcGlass from './components/OcGlass.vue'
|
|
59
|
+
import OcGlassPanel from './components/OcGlassPanel.vue'
|
|
58
60
|
import OcGreeting from './components/OcGreeting.vue'
|
|
59
61
|
import OcHeading from './components/OcHeading.vue'
|
|
60
62
|
import OcHoverCard from './components/OcHoverCard.vue'
|
|
@@ -71,7 +73,9 @@ import OcLanguageSelect from './components/OcLanguageSelect.vue'
|
|
|
71
73
|
import OcLauncherCard from './components/OcLauncherCard.vue'
|
|
72
74
|
import OcLightbox from './components/OcLightbox.vue'
|
|
73
75
|
import OcLinkArrow from './components/OcLinkArrow.vue'
|
|
76
|
+
import OcLinkRow from './components/OcLinkRow.vue'
|
|
74
77
|
import OcListToolbar from './components/OcListToolbar.vue'
|
|
78
|
+
import OcLiveFrame from './components/OcLiveFrame.vue'
|
|
75
79
|
import OcMarquee from './components/OcMarquee.vue'
|
|
76
80
|
import OcMediaCard from './components/OcMediaCard.vue'
|
|
77
81
|
import OcMediaRow from './components/OcMediaRow.vue'
|
|
@@ -118,6 +122,8 @@ import OcSpinner from './components/OcSpinner.vue'
|
|
|
118
122
|
import OcStackCard from './components/OcStackCard.vue'
|
|
119
123
|
import OcStackList from './components/OcStackList.vue'
|
|
120
124
|
import OcStatCard from './components/OcStatCard.vue'
|
|
125
|
+
import OcStatus from './components/OcStatus.vue'
|
|
126
|
+
import OcStatusDot from './components/OcStatusDot.vue'
|
|
121
127
|
import OcStepper from './components/OcStepper.vue'
|
|
122
128
|
import OcSwitch from './components/OcSwitch.vue'
|
|
123
129
|
import OcTable from './components/OcTable.vue'
|
|
@@ -130,6 +136,10 @@ import OcTextarea from './components/OcTextarea.vue'
|
|
|
130
136
|
import OcThemeSwitch from './components/OcThemeSwitch.vue'
|
|
131
137
|
import OcTimeInput from './components/OcTimeInput.vue'
|
|
132
138
|
import OcTimeline from './components/OcTimeline.vue'
|
|
139
|
+
import OcTitlebar from './components/OcTitlebar.vue'
|
|
140
|
+
import OcTitlebarBody from './components/OcTitlebarBody.vue'
|
|
141
|
+
import OcTitlebarButton from './components/OcTitlebarButton.vue'
|
|
142
|
+
import OcTitlebarWindow from './components/OcTitlebarWindow.vue'
|
|
133
143
|
import OcToast from './components/OcToast.vue'
|
|
134
144
|
import OcToastContainer from './components/OcToastContainer.vue'
|
|
135
145
|
import OcToggle from './components/OcToggle.vue'
|
|
@@ -141,6 +151,7 @@ import OcTree from './components/OcTree.vue'
|
|
|
141
151
|
import OcUpgradeBanner from './components/OcUpgradeBanner.vue'
|
|
142
152
|
import OcUser from './components/OcUser.vue'
|
|
143
153
|
import OcVersionBanner from './components/OcVersionBanner.vue'
|
|
154
|
+
import OcWatermark from './components/OcWatermark.vue'
|
|
144
155
|
import OcBlockAboutTimeline from './blocks/OcBlockAboutTimeline.vue'
|
|
145
156
|
import OcBlockAppHeader from './blocks/OcBlockAppHeader.vue'
|
|
146
157
|
import OcBlockAppShell from './blocks/OcBlockAppShell.vue'
|
|
@@ -229,6 +240,8 @@ export {
|
|
|
229
240
|
OcFilterCounts,
|
|
230
241
|
OcFlipCard,
|
|
231
242
|
OcFormField,
|
|
243
|
+
OcGlass,
|
|
244
|
+
OcGlassPanel,
|
|
232
245
|
OcGreeting,
|
|
233
246
|
OcHeading,
|
|
234
247
|
OcHoverCard,
|
|
@@ -245,7 +258,9 @@ export {
|
|
|
245
258
|
OcLauncherCard,
|
|
246
259
|
OcLightbox,
|
|
247
260
|
OcLinkArrow,
|
|
261
|
+
OcLinkRow,
|
|
248
262
|
OcListToolbar,
|
|
263
|
+
OcLiveFrame,
|
|
249
264
|
OcMarquee,
|
|
250
265
|
OcMediaCard,
|
|
251
266
|
OcMediaRow,
|
|
@@ -292,6 +307,8 @@ export {
|
|
|
292
307
|
OcStackCard,
|
|
293
308
|
OcStackList,
|
|
294
309
|
OcStatCard,
|
|
310
|
+
OcStatus,
|
|
311
|
+
OcStatusDot,
|
|
295
312
|
OcStepper,
|
|
296
313
|
OcSwitch,
|
|
297
314
|
OcTable,
|
|
@@ -304,6 +321,10 @@ export {
|
|
|
304
321
|
OcThemeSwitch,
|
|
305
322
|
OcTimeInput,
|
|
306
323
|
OcTimeline,
|
|
324
|
+
OcTitlebar,
|
|
325
|
+
OcTitlebarBody,
|
|
326
|
+
OcTitlebarButton,
|
|
327
|
+
OcTitlebarWindow,
|
|
307
328
|
OcToast,
|
|
308
329
|
OcToastContainer,
|
|
309
330
|
OcToggle,
|
|
@@ -315,6 +336,7 @@ export {
|
|
|
315
336
|
OcUpgradeBanner,
|
|
316
337
|
OcUser,
|
|
317
338
|
OcVersionBanner,
|
|
339
|
+
OcWatermark,
|
|
318
340
|
OcBlockAboutTimeline,
|
|
319
341
|
OcBlockAppHeader,
|
|
320
342
|
OcBlockAppShell,
|
|
@@ -459,6 +481,8 @@ export const components: Record<string, Component> = {
|
|
|
459
481
|
OcFilterCounts,
|
|
460
482
|
OcFlipCard,
|
|
461
483
|
OcFormField,
|
|
484
|
+
OcGlass,
|
|
485
|
+
OcGlassPanel,
|
|
462
486
|
OcGreeting,
|
|
463
487
|
OcHeading,
|
|
464
488
|
OcHoverCard,
|
|
@@ -475,7 +499,9 @@ export const components: Record<string, Component> = {
|
|
|
475
499
|
OcLauncherCard,
|
|
476
500
|
OcLightbox,
|
|
477
501
|
OcLinkArrow,
|
|
502
|
+
OcLinkRow,
|
|
478
503
|
OcListToolbar,
|
|
504
|
+
OcLiveFrame,
|
|
479
505
|
OcMarquee,
|
|
480
506
|
OcMediaCard,
|
|
481
507
|
OcMediaRow,
|
|
@@ -522,6 +548,8 @@ export const components: Record<string, Component> = {
|
|
|
522
548
|
OcStackCard,
|
|
523
549
|
OcStackList,
|
|
524
550
|
OcStatCard,
|
|
551
|
+
OcStatus,
|
|
552
|
+
OcStatusDot,
|
|
525
553
|
OcStepper,
|
|
526
554
|
OcSwitch,
|
|
527
555
|
OcTable,
|
|
@@ -534,6 +562,10 @@ export const components: Record<string, Component> = {
|
|
|
534
562
|
OcThemeSwitch,
|
|
535
563
|
OcTimeInput,
|
|
536
564
|
OcTimeline,
|
|
565
|
+
OcTitlebar,
|
|
566
|
+
OcTitlebarBody,
|
|
567
|
+
OcTitlebarButton,
|
|
568
|
+
OcTitlebarWindow,
|
|
537
569
|
OcToast,
|
|
538
570
|
OcToastContainer,
|
|
539
571
|
OcToggle,
|
|
@@ -545,6 +577,7 @@ export const components: Record<string, Component> = {
|
|
|
545
577
|
OcUpgradeBanner,
|
|
546
578
|
OcUser,
|
|
547
579
|
OcVersionBanner,
|
|
580
|
+
OcWatermark,
|
|
548
581
|
OcBlockAboutTimeline,
|
|
549
582
|
OcBlockAppHeader,
|
|
550
583
|
OcBlockAppShell,
|