orio-ui 1.28.0 โ†’ 1.28.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -23,7 +23,7 @@ orio-ui's shipped, version-pinned agent docs. Details in
23
23
  ๐Ÿš€ **Auto-imported** - Works seamlessly with Nuxt's auto-import system
24
24
  ๐Ÿ“ฆ **Tree-shakeable** - Only bundle what you use
25
25
  ๐ŸŽฏ **TypeScript** - Fully typed for great developer experience
26
- ๐Ÿงช **Tested** - 36 test suites for reliability
26
+ ๐Ÿงช **Tested** - 37 test suites for reliability
27
27
  ๐Ÿ“ฑ **Responsive** - Mobile-first design approach
28
28
  โ™ฟ **Accessible** - ARIA-compliant components
29
29
  ๐ŸŒ **i18n** - Built-in vue-i18n support with English defaults
@@ -116,7 +116,7 @@ installed version.
116
116
 
117
117
  ### Composables
118
118
  - `useApi` โ€” thin typed wrapper around ofetch's `$fetch` for GET/POST/PUT/DELETE/PATCH requests.
119
- - `useControlSize` โ€” provide/inject `ControlSize` (sm/md/lg/xl) and read a CSS-var token bag for the active size. **Read USAGE.md first.**
119
+ - `useControlSize` โ€” provide/inject `ControlSize` (xs/sm/md/lg/xl) and read a CSS-var token bag for the active size. **Read USAGE.md first.**
120
120
  - `useDecimalFormatter` โ€” parse numeric strings (US or EU separator) and format via Intl.NumberFormat with locale defaults. **Read USAGE.md first.**
121
121
  - `useFilter` โ€” named filter group with v-bind bags, $-helpers, $active chips, $clearAll, optional URL sync via lazy import. **Read USAGE.md first.**
122
122
  - `useFuzzySearch` โ€” typed Fuse.js wrapper that returns a computed list of matched items (strings or objects).
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.28.0",
7
+ "version": "1.28.1",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
@@ -27,6 +27,9 @@ often used standalone.
27
27
  - **Icon-only mode is auto-detected.** When an icon is present and the
28
28
  default slot is empty, `.icon-only` is applied โ†’ `aspect-ratio: 1`,
29
29
  `line-height: 0`. No need to pass a prop.
30
+ - **`pill` prop**: `false` by default. When `true`, swaps the button's
31
+ `border-radius` to `var(--border-radius-pill)` (fully rounded),
32
+ overriding the size-driven `--control-radius`. No effect when omitted.
30
33
  - **`disabled` blocks `click` and `mousedown` emits.** `mouseup` and
31
34
  `mouseleave` always fire (so press-and-hold callers can release
32
35
  state).
@@ -67,6 +70,8 @@ often used standalone.
67
70
  </orio-button>
68
71
 
69
72
  <orio-button variant="subdued" icon="close" aria-label="Close" />
73
+
74
+ <orio-button pill icon="plus" aria-label="Add" />
70
75
  </template>
71
76
  ```
72
77
 
@@ -3,6 +3,7 @@ interface Props extends ControlProps {
3
3
  variant?: "primary" | "secondary" | "subdued";
4
4
  icon?: string;
5
5
  loading?: boolean;
6
+ pill?: boolean;
6
7
  }
7
8
  declare var __VLS_13: {}, __VLS_20: {}, __VLS_22: {};
8
9
  type __VLS_Slots = {} & {
@@ -4,6 +4,7 @@ const props = defineProps({
4
4
  variant: { type: String, required: false, default: "primary" },
5
5
  icon: { type: String, required: false },
6
6
  loading: { type: Boolean, required: false },
7
+ pill: { type: Boolean, required: false },
7
8
  appearance: { type: String, required: false },
8
9
  error: { type: [String, null], required: false },
9
10
  group: { type: Boolean, required: false },
@@ -47,7 +48,7 @@ function onMouseleave(event) {
47
48
  <orio-control-element v-slot="{ control }" v-bind="props">
48
49
  <button
49
50
  v-bind="{ ...$attrs, ...control }"
50
- :class="[variant, 'gradient-hover', { 'icon-only': isIconOnly }]"
51
+ :class="[variant, 'gradient-hover', { 'icon-only': isIconOnly, pill }]"
51
52
  @click="click"
52
53
  @mousedown="onMousedown"
53
54
  @mouseup="onMouseup"
@@ -85,6 +86,9 @@ button.icon-only {
85
86
  line-height: 0;
86
87
  aspect-ratio: 1;
87
88
  }
89
+ button.pill {
90
+ border-radius: var(--border-radius-pill);
91
+ }
88
92
  button:disabled, button:disabled:hover {
89
93
  background-color: var(--color-accent-soft-base);
90
94
  color: var(--color-muted);
@@ -3,6 +3,7 @@ interface Props extends ControlProps {
3
3
  variant?: "primary" | "secondary" | "subdued";
4
4
  icon?: string;
5
5
  loading?: boolean;
6
+ pill?: boolean;
6
7
  }
7
8
  declare var __VLS_13: {}, __VLS_20: {}, __VLS_22: {};
8
9
  type __VLS_Slots = {} & {
@@ -1,5 +1,5 @@
1
1
  export type ControlLayout = "vertical" | "horizontal";
2
- export type ControlSize = "sm" | "md" | "lg" | "xl";
2
+ export type ControlSize = "xs" | "sm" | "md" | "lg" | "xl";
3
3
  /**
4
4
  * A11y + form attrs that flow from the caller through ControlElement to the
5
5
  * actual interactive element via the `control` slot prop. Never rendered on
@@ -1,5 +1,5 @@
1
1
  export type ControlLayout = "vertical" | "horizontal";
2
- export type ControlSize = "sm" | "md" | "lg" | "xl";
2
+ export type ControlSize = "xs" | "sm" | "md" | "lg" | "xl";
3
3
  /**
4
4
  * A11y + form attrs that flow from the caller through ControlElement to the
5
5
  * actual interactive element via the `control` slot prop. Never rendered on
@@ -31,6 +31,7 @@ const { pressAndHold, stop } = usePressAndHold();
31
31
  appearance="minimal"
32
32
  icon="minus"
33
33
  variant="subdued"
34
+ size="sm"
34
35
  :disabled="isAtMin || disabled"
35
36
  @mousedown="pressAndHold(decrease)"
36
37
  @mouseup="stop"
@@ -40,6 +41,7 @@ const { pressAndHold, stop } = usePressAndHold();
40
41
  appearance="minimal"
41
42
  icon="plus"
42
43
  variant="subdued"
44
+ size="sm"
43
45
  :disabled="isAtMax || disabled"
44
46
  @mousedown="pressAndHold(increase)"
45
47
  @mouseup="stop"
@@ -65,4 +67,7 @@ const { pressAndHold, stop } = usePressAndHold();
65
67
  right: 0;
66
68
  text-align: center;
67
69
  }
70
+ .horizontal :deep(.control-group) {
71
+ z-index: 2;
72
+ }
68
73
  </style>
@@ -31,6 +31,8 @@ const { pressAndHold, stop } = usePressAndHold();
31
31
  appearance="minimal"
32
32
  icon="chevron-up"
33
33
  variant="subdued"
34
+ size="xs"
35
+ pill
34
36
  :disabled="isAtMax || disabled"
35
37
  @mousedown="pressAndHold(increase)"
36
38
  @mouseup="stop"
@@ -40,6 +42,8 @@ const { pressAndHold, stop } = usePressAndHold();
40
42
  appearance="minimal"
41
43
  icon="chevron-down"
42
44
  variant="subdued"
45
+ size="xs"
46
+ pill
43
47
  :disabled="isAtMin || disabled"
44
48
  @mousedown="pressAndHold(decrease)"
45
49
  @mouseup="stop"
@@ -52,10 +56,14 @@ const { pressAndHold, stop } = usePressAndHold();
52
56
  <style scoped>
53
57
  .vertical :deep(.controls) {
54
58
  flex-direction: column;
55
- justify-content: space-around;
59
+ justify-content: center;
60
+ gap: 0;
56
61
  right: 3px;
57
62
  left: auto;
58
63
  }
64
+ .vertical :deep(.controls button) {
65
+ padding-block: 0;
66
+ }
59
67
  .vertical :deep(.slot-wrapper) {
60
68
  line-height: 0;
61
69
  }
@@ -2,14 +2,14 @@
2
2
  kind: composable
3
3
  category: Composables
4
4
  purpose: control size tokens, sizing tokens for form controls, control variant sizing
5
- short: provide/inject `ControlSize` (sm/md/lg/xl) and read a CSS-var token bag for the active size
5
+ short: provide/inject `ControlSize` (xs/sm/md/lg/xl) and read a CSS-var token bag for the active size
6
6
  invariants: true
7
7
  ---
8
8
 
9
9
  # useControlSize โ€” agent-only invariants
10
10
 
11
11
  This composable owns the **CSS variable bag** that maps a `ControlSize`
12
- (`sm` / `md` / `lg` / `xl`) to concrete padding, font, gap, radius, and
12
+ (`xs` / `sm` / `md` / `lg` / `xl`) to concrete padding, font, gap, radius, and
13
13
  icon-size tokens. Used internally by ControlElement and friends.
14
14
 
15
15
  ## Invariants
@@ -6,6 +6,18 @@ import {
6
6
  } from "vue";
7
7
  const CONTROL_SIZE_KEY = Symbol("control-size");
8
8
  const sizeTokens = {
9
+ xs: {
10
+ "--control-font-size": "var(--font-sm)",
11
+ "--control-label-font-size": "var(--font-xs)",
12
+ "--control-py": "0.125rem",
13
+ "--control-px": "0.25rem",
14
+ "--control-gap": "0.125rem",
15
+ "--control-radius": "var(--border-radius-sm)",
16
+ "--control-icon-size": "0.625rem",
17
+ "--control-inner-block-start": "0.85rem",
18
+ "--control-inner-block-end": "0.1rem",
19
+ "--control-label-block-start": "0.15rem"
20
+ },
9
21
  sm: {
10
22
  "--control-font-size": "var(--font-sm)",
11
23
  "--control-label-font-size": "var(--font-xs)",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orio-ui",
3
- "version": "1.28.0",
3
+ "version": "1.28.1",
4
4
  "description": "Modern Nuxt component library with theme support",
5
5
  "type": "module",
6
6
  "main": "./dist/module.mjs",