orio-ui 1.16.0 → 1.16.2

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/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0 || ^4.0.0"
6
6
  },
7
- "version": "1.16.0",
7
+ "version": "1.16.2",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
@@ -1,8 +1,7 @@
1
1
  export type BadgeVariant = "danger" | "alert" | "primary" | "grey";
2
- export type BadgeType = "default" | "pill";
3
2
  interface Props {
4
3
  variant?: BadgeVariant;
5
- type?: BadgeType;
4
+ pill?: boolean;
6
5
  }
7
6
  declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
8
7
  type __VLS_Slots = {} & {
@@ -13,8 +12,8 @@ type __VLS_Slots = {} & {
13
12
  default?: (props: typeof __VLS_5) => any;
14
13
  };
15
14
  declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
16
- type: BadgeType;
17
15
  variant: BadgeVariant;
16
+ pill: boolean;
18
17
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
18
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
19
  declare const _default: typeof __VLS_export;
@@ -2,7 +2,7 @@
2
2
  import { useSlots, computed } from "vue";
3
3
  const props = defineProps({
4
4
  variant: { type: String, required: false, default: "primary" },
5
- type: { type: String, required: false, default: "default" }
5
+ pill: { type: Boolean, required: false, default: false }
6
6
  });
7
7
  const slots = useSlots();
8
8
  const hasWrapping = computed(() => !!slots.wrapping);
@@ -13,15 +13,15 @@ const isDot = computed(() => !hasDefaultContent.value);
13
13
  <template>
14
14
  <div v-if="hasWrapping" class="badge-wrapper">
15
15
  <slot name="wrapping" />
16
- <span class="badge positioned" :class="[variant, type, { dot: isDot }]">
16
+ <span class="badge positioned" :class="[variant, { pill, dot: isDot }]">
17
17
  <slot />
18
18
  </span>
19
19
  </div>
20
- <span v-else class="badge" :class="[variant, type, { dot: isDot }]">
20
+ <span v-else class="badge" :class="[variant, { pill, dot: isDot }]">
21
21
  <slot />
22
22
  </span>
23
23
  </template>
24
24
 
25
25
  <style scoped>
26
- .badge-wrapper{display:inline-flex;position:relative}.badge{align-items:center;border:1px solid transparent;border-radius:var(--border-radius-sm);display:inline-flex;font-size:var(--font-sm);font-weight:600;justify-content:center;padding:.125rem .5rem;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.badge.positioned{position:absolute;right:.5rem;top:.5rem;transform:translate(50%,-50%)}.badge.pill{border-radius:var(--border-radius-pill)}.badge.dot{border-radius:50%;height:.5rem;min-height:.5rem;min-width:.5rem;padding:0;width:.5rem}.badge.primary{background-color:var(--color-accent);border-color:var(--color-accent);color:var(--color-accent-ink)}.badge.danger{background-color:var(--color-danger);border-color:var(--color-danger);color:var(--color-danger-ink)}.badge.alert{background-color:var(--color-alert);border-color:var(--color-alert);color:var(--color-alert-ink)}.badge.grey{background-color:var(--color-surface);border-color:var(--color-border);color:var(--color-muted)}
26
+ .badge-wrapper{display:inline-flex;position:relative}.badge{align-items:center;border:1px solid transparent;border-radius:var(--border-radius-sm);display:inline-flex;font-size:var(--font-sm);font-weight:600;justify-content:center;padding:.125rem .35rem;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.badge.positioned{position:absolute;right:.5rem;top:.5rem;transform:translate(50%,-50%)}.badge.pill{border-radius:var(--border-radius-pill)}.badge.dot{border-radius:50%;height:.5rem;min-height:.5rem;min-width:.5rem;padding:0;width:.5rem}.badge.primary{background-color:var(--color-accent);border-color:var(--color-accent);color:var(--color-accent-ink)}.badge.danger{background-color:var(--color-danger);border-color:var(--color-danger);color:var(--color-danger-ink)}.badge.alert{background-color:var(--color-alert);border-color:var(--color-alert);color:var(--color-alert-ink)}.badge.grey{background-color:var(--color-surface);border-color:var(--color-border);color:var(--color-muted)}
27
27
  </style>
@@ -1,8 +1,7 @@
1
1
  export type BadgeVariant = "danger" | "alert" | "primary" | "grey";
2
- export type BadgeType = "default" | "pill";
3
2
  interface Props {
4
3
  variant?: BadgeVariant;
5
- type?: BadgeType;
4
+ pill?: boolean;
6
5
  }
7
6
  declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
8
7
  type __VLS_Slots = {} & {
@@ -13,8 +12,8 @@ type __VLS_Slots = {} & {
13
12
  default?: (props: typeof __VLS_5) => any;
14
13
  };
15
14
  declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
16
- type: BadgeType;
17
15
  variant: BadgeVariant;
16
+ pill: boolean;
18
17
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
18
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
19
  declare const _default: typeof __VLS_export;
@@ -1,7 +1,9 @@
1
+ export type CarouselAppearance = "default" | "minimal";
1
2
  interface CarouselProps {
2
3
  images?: string[];
3
4
  size?: string;
4
5
  fit?: "fill" | "cover" | "contain" | "scale-down";
6
+ appearance?: CarouselAppearance;
5
7
  }
6
8
  type __VLS_Props = CarouselProps;
7
9
  type __VLS_ModelProps = {
@@ -23,6 +25,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
23
25
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
24
26
  "onUpdate:activeImage"?: ((value: string | undefined) => any) | undefined;
25
27
  }>, {
28
+ appearance: CarouselAppearance;
26
29
  size: string;
27
30
  images: string[];
28
31
  fit: "fill" | "cover" | "contain" | "scale-down";
@@ -4,9 +4,10 @@ import { useElementSize } from "@vueuse/core";
4
4
  const props = defineProps({
5
5
  images: { type: Array, required: false, default: () => [] },
6
6
  size: { type: String, required: false, default: "400:550" },
7
- fit: { type: String, required: false, default: "contain" }
7
+ fit: { type: String, required: false, default: "contain" },
8
+ appearance: { type: String, required: false, default: "default" }
8
9
  });
9
- const { images, size, fit } = toRefs(props);
10
+ const { images, size, fit, appearance } = toRefs(props);
10
11
  const rawSizes = computed(() => {
11
12
  const parts = size.value.split(":");
12
13
  return {
@@ -113,7 +114,7 @@ onMounted(() => {
113
114
  <img :src="activeImage" :alt="activeImage" />
114
115
  </slot>
115
116
  </div>
116
- <div ref="carousel" class="carousel">
117
+ <div ref="carousel" class="carousel" :class="`carousel--${appearance}`">
117
118
  <div
118
119
  class="carousel-track"
119
120
  @pointerdown="onPointerDown"
@@ -156,5 +157,5 @@ onMounted(() => {
156
157
  </template>
157
158
 
158
159
  <style scoped>
159
- .carousel-wrapper{display:block;position:relative}.carousel-measure{height:-moz-max-content;height:max-content;pointer-events:none;position:absolute;visibility:hidden;width:-moz-max-content;width:max-content}.carousel-measure img{display:block}.carousel{border:1px solid var(--color-border);border-radius:var(--border-radius-lg);height:v-bind("calculatedSize.height");max-height:v-bind(maxHeight);max-width:100%;overflow:hidden;transition:width .3s ease,height .3s ease;width:v-bind("calculatedSize.width")}.carousel-track{align-items:center;cursor:grab;display:flex;gap:.75rem;height:100%;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.carousel-track:active{cursor:grabbing}.carousel-item{background:var(--color-surface);border-radius:var(--border-radius-sm);color:var(--color-text);height:100%;inset:0;opacity:0;padding:.5rem .75rem;pointer-events:none;position:absolute;transition:opacity .5s ease-in-out,transform .5s ease-in-out;white-space:nowrap;width:100%}.carousel-item.previous-image{transform:translateX(-100%)}.carousel-item.next-image{transform:translateX(100%)}.carousel-item.active-image{opacity:1;pointer-events:auto;transform:translateX(0)}.carousel-item img{height:100%;-o-object-fit:v-bind(fit);object-fit:v-bind(fit);width:100%}.carousel-empty{color:var(--color-muted)}.switch-button{position:absolute}.switch-button :deep(button){background:transparent!important;border:none!important;color:transparent!important}.switch-button :deep(button:hover){color:transparent!important}.switch-button :deep(.orio-icon){color:#fff!important;fill:#fff!important;filter:drop-shadow(0 0 2px rgba(0,0,0,.8)) drop-shadow(0 0 4px rgba(0,0,0,.6))}@supports (mix-blend-mode:difference) and (not (-webkit-hyphens:none)){.switch-button :deep(.orio-icon){color:#000!important;fill:#000!important;filter:grayscale(1) contrast(9) invert(1) drop-shadow(0 0 1px black) drop-shadow(0 0 2px black);mix-blend-mode:difference}}.switch-button.previous-button{left:0}.switch-button.next-button{right:0}
160
+ .carousel-wrapper{display:block;position:relative}.carousel-measure{height:-moz-max-content;height:max-content;pointer-events:none;position:absolute;visibility:hidden;width:-moz-max-content;width:max-content}.carousel-measure img{display:block}.carousel{border:1px solid var(--color-border);border-radius:var(--border-radius-lg);height:v-bind("calculatedSize.height");max-height:v-bind(maxHeight);max-width:100%;overflow:hidden;transition:width .3s ease,height .3s ease;width:v-bind("calculatedSize.width")}.carousel-track{align-items:center;cursor:grab;display:flex;gap:.75rem;height:100%;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.carousel-track:active{cursor:grabbing}.carousel-item{background:var(--color-surface);border-radius:var(--border-radius-sm);color:var(--color-text);height:100%;inset:0;opacity:0;overflow:hidden;padding:.5rem .75rem;pointer-events:none;position:absolute;transition:opacity .5s ease-in-out,transform .5s ease-in-out;white-space:nowrap;width:100%}.carousel-item.previous-image{transform:translateX(-100%)}.carousel-item.next-image{transform:translateX(100%)}.carousel-item.active-image{opacity:1;pointer-events:auto;transform:translateX(0)}.carousel-item img{height:100%;-o-object-fit:v-bind(fit);object-fit:v-bind(fit);width:100%}.carousel-empty{color:var(--color-muted)}.switch-button{position:absolute}.switch-button :deep(button){background:transparent!important;border:none!important;color:transparent!important}.switch-button :deep(button:hover){color:transparent!important}.switch-button :deep(.orio-icon){color:#fff!important;fill:#fff!important;filter:drop-shadow(0 0 2px rgba(0,0,0,.8)) drop-shadow(0 0 4px rgba(0,0,0,.6))}@supports (mix-blend-mode:difference) and (not (-webkit-hyphens:none)){.switch-button :deep(.orio-icon){color:#000!important;fill:#000!important;filter:grayscale(1) contrast(9) invert(1) drop-shadow(0 0 1px black) drop-shadow(0 0 2px black);mix-blend-mode:difference}}.switch-button.previous-button{left:0}.switch-button.next-button{right:0}.carousel--minimal{background:none;border:none}.carousel--minimal .carousel-item{background:none}.carousel--minimal .switch-button{opacity:0;transition:opacity .2s ease}.carousel--minimal:hover .switch-button{opacity:1}
160
161
  </style>
@@ -1,7 +1,9 @@
1
+ export type CarouselAppearance = "default" | "minimal";
1
2
  interface CarouselProps {
2
3
  images?: string[];
3
4
  size?: string;
4
5
  fit?: "fill" | "cover" | "contain" | "scale-down";
6
+ appearance?: CarouselAppearance;
5
7
  }
6
8
  type __VLS_Props = CarouselProps;
7
9
  type __VLS_ModelProps = {
@@ -23,6 +25,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
23
25
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
24
26
  "onUpdate:activeImage"?: ((value: string | undefined) => any) | undefined;
25
27
  }>, {
28
+ appearance: CarouselAppearance;
26
29
  size: string;
27
30
  images: string[];
28
31
  fit: "fill" | "cover" | "contain" | "scale-down";
@@ -5,6 +5,7 @@ import {
5
5
  topLevelKeys
6
6
  } from "../utils/urlParams.js";
7
7
  import { computed, watch } from "vue";
8
+ import { useRoute } from "#imports";
8
9
  export function useUrlSync(state, keys) {
9
10
  const routeQuery = useRoute().query;
10
11
  const initKeys = keys ?? topLevelKeys(routeQuery);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orio-ui",
3
- "version": "1.16.0",
3
+ "version": "1.16.2",
4
4
  "description": "Modern Nuxt component library with theme support",
5
5
  "type": "module",
6
6
  "main": "./dist/module.mjs",