origam 2.13.0 → 2.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/CHANGELOG.md +1975 -0
- package/dist/src/components/Avatar/OrigamAvatar.vue +14 -0
- package/dist/src/components/Messages/OrigamMessages.vue +1 -0
- package/dist/src/components/TextField/OrigamTextField.vue +1 -1
- package/dist/src/consts/Commons/rounded.const.d.ts +1 -1
- package/dist/src/enums/Commons/rounded.enum.cjs +12 -2
- package/dist/src/enums/Commons/rounded.enum.d.ts +25 -0
- package/dist/src/enums/Commons/rounded.enum.js +10 -0
- package/dist/src/themes/origam.theme.cjs +2 -2
- package/dist/src/themes/origam.theme.js +2 -2
- package/dist/src/types/Commons/rounded.type.d.ts +14 -2
- package/package.json +3 -2
|
@@ -189,6 +189,20 @@ defineExpose({
|
|
|
189
189
|
.origam-avatar {
|
|
190
190
|
$this: &;
|
|
191
191
|
|
|
192
|
+
// Declared on the ROOT, not only on `__wrapper`. Without it the root
|
|
193
|
+
// inherits the browser default — `inline` for `tag="span"` — and an
|
|
194
|
+
// inline box ignores `width`/`height`, so `size` silently did nothing:
|
|
195
|
+
// the avatar collapsed to its text. It only appeared to work when the
|
|
196
|
+
// parent was a flex container, which blockifies its children (measured:
|
|
197
|
+
// same component, 32x32 under `inline-flex`, 30x30 under `position:
|
|
198
|
+
// relative`, for a requested size of 72).
|
|
199
|
+
//
|
|
200
|
+
// `inline-flex` and not `block`: `tag="span"` exists so an avatar can sit
|
|
201
|
+
// in phrasing content — inside a `<button>`, whose content model rejects
|
|
202
|
+
// block-level elements.
|
|
203
|
+
display: var(--origam-avatar---display, inline-flex);
|
|
204
|
+
vertical-align: var(--origam-avatar---vertical-align, middle);
|
|
205
|
+
|
|
192
206
|
line-height: var(--origam-avatar---line-height);
|
|
193
207
|
text-align: var(--origam-avatar---text-align);
|
|
194
208
|
font-size: var(--origam-avatar---font-size);
|
|
@@ -483,7 +483,7 @@ const enrichedRules = computed(() => {
|
|
|
483
483
|
});
|
|
484
484
|
const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);
|
|
485
485
|
const inputProps = computed(() => {
|
|
486
|
-
return origamInputRef.value?.filterProps(props, ["modelValue", "class", "style", "
|
|
486
|
+
return origamInputRef.value?.filterProps(props, ["modelValue", "class", "style", "focused"]);
|
|
487
487
|
});
|
|
488
488
|
const fieldProps = computed(() => {
|
|
489
489
|
return origamFieldRef.value?.filterProps(props, ["class", "id", "active", "dirty", "disabled", "focused", "error", "style"]);
|
|
@@ -35,4 +35,4 @@ export declare const PREDEFINED_ROUNDED: Array<TRounded>;
|
|
|
35
35
|
* backward compatibility and slated for removal in a future major. Use
|
|
36
36
|
* `PREDEFINED_ROUNDED`.
|
|
37
37
|
*/
|
|
38
|
-
export declare const PREDIFINED_ROUNDED:
|
|
38
|
+
export declare const PREDIFINED_ROUNDED: TRounded[];
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.ROUNDED = void 0;
|
|
6
|
+
exports.ROUNDED_TOKEN = exports.ROUNDED = void 0;
|
|
7
7
|
var ROUNDED = exports.ROUNDED = /* @__PURE__ */(ROUNDED2 => {
|
|
8
8
|
ROUNDED2["X_SMALL"] = "x-small";
|
|
9
9
|
ROUNDED2["SMALL"] = "small";
|
|
@@ -14,4 +14,14 @@ var ROUNDED = exports.ROUNDED = /* @__PURE__ */(ROUNDED2 => {
|
|
|
14
14
|
ROUNDED2["SHAPED"] = "shaped";
|
|
15
15
|
ROUNDED2["SHAPED_INVERT"] = "shaped-invert";
|
|
16
16
|
return ROUNDED2;
|
|
17
|
-
})(ROUNDED || {});
|
|
17
|
+
})(ROUNDED || {});
|
|
18
|
+
var ROUNDED_TOKEN = exports.ROUNDED_TOKEN = /* @__PURE__ */(ROUNDED_TOKEN2 => {
|
|
19
|
+
ROUNDED_TOKEN2["NONE"] = "none";
|
|
20
|
+
ROUNDED_TOKEN2["XS"] = "xs";
|
|
21
|
+
ROUNDED_TOKEN2["SM"] = "sm";
|
|
22
|
+
ROUNDED_TOKEN2["MD"] = "md";
|
|
23
|
+
ROUNDED_TOKEN2["LG"] = "lg";
|
|
24
|
+
ROUNDED_TOKEN2["XL"] = "xl";
|
|
25
|
+
ROUNDED_TOKEN2["FULL"] = "full";
|
|
26
|
+
return ROUNDED_TOKEN2;
|
|
27
|
+
})(ROUNDED_TOKEN || {});
|
|
@@ -15,3 +15,28 @@ export declare enum ROUNDED {
|
|
|
15
15
|
SHAPED = "shaped",
|
|
16
16
|
SHAPED_INVERT = "shaped-invert"
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* The token-scale rungs, resolved by `useRounded` to the generated utility
|
|
20
|
+
* classes (`.origam--rounded-full` → `var(--origam-radius---full)`).
|
|
21
|
+
*
|
|
22
|
+
* They were always accepted at runtime — the brand themes have shipped
|
|
23
|
+
* `rounded: 'md'` / `'lg'` / `'none'` for a while — but `TRounded` only
|
|
24
|
+
* described the component scale above, so TypeScript rejected them and they
|
|
25
|
+
* were invisible to autocompletion. `FULL` in particular is the only way to
|
|
26
|
+
* obtain a circle, which made a round avatar undiscoverable: none of the
|
|
27
|
+
* component-scale names produces one.
|
|
28
|
+
*
|
|
29
|
+
* Declared as a separate enum rather than merged into `ROUNDED` because the
|
|
30
|
+
* two scales are different things — `ROUNDED` names an intent (`shaped`),
|
|
31
|
+
* this one names a radius rung — and merging them would suggest
|
|
32
|
+
* `x-small` and `xs` are interchangeable. They are not.
|
|
33
|
+
*/
|
|
34
|
+
export declare enum ROUNDED_TOKEN {
|
|
35
|
+
NONE = "none",
|
|
36
|
+
XS = "xs",
|
|
37
|
+
SM = "sm",
|
|
38
|
+
MD = "md",
|
|
39
|
+
LG = "lg",
|
|
40
|
+
XL = "xl",
|
|
41
|
+
FULL = "full"
|
|
42
|
+
}
|
|
@@ -9,3 +9,13 @@ export var ROUNDED = /* @__PURE__ */ ((ROUNDED2) => {
|
|
|
9
9
|
ROUNDED2["SHAPED_INVERT"] = "shaped-invert";
|
|
10
10
|
return ROUNDED2;
|
|
11
11
|
})(ROUNDED || {});
|
|
12
|
+
export var ROUNDED_TOKEN = /* @__PURE__ */ ((ROUNDED_TOKEN2) => {
|
|
13
|
+
ROUNDED_TOKEN2["NONE"] = "none";
|
|
14
|
+
ROUNDED_TOKEN2["XS"] = "xs";
|
|
15
|
+
ROUNDED_TOKEN2["SM"] = "sm";
|
|
16
|
+
ROUNDED_TOKEN2["MD"] = "md";
|
|
17
|
+
ROUNDED_TOKEN2["LG"] = "lg";
|
|
18
|
+
ROUNDED_TOKEN2["XL"] = "xl";
|
|
19
|
+
ROUNDED_TOKEN2["FULL"] = "full";
|
|
20
|
+
return ROUNDED_TOKEN2;
|
|
21
|
+
})(ROUNDED_TOKEN || {});
|
|
@@ -210,7 +210,7 @@ const origamLightTheme = exports.origamLightTheme = {
|
|
|
210
210
|
"origam-avatar": {
|
|
211
211
|
tag: "div",
|
|
212
212
|
size: "default",
|
|
213
|
-
rounded: "
|
|
213
|
+
rounded: "full",
|
|
214
214
|
color: "primary"
|
|
215
215
|
},
|
|
216
216
|
"origam-badge": {
|
|
@@ -609,7 +609,7 @@ const origamDarkTheme = exports.origamDarkTheme = {
|
|
|
609
609
|
"origam-avatar": {
|
|
610
610
|
tag: "div",
|
|
611
611
|
size: "default",
|
|
612
|
-
rounded: "
|
|
612
|
+
rounded: "full",
|
|
613
613
|
color: "primary"
|
|
614
614
|
},
|
|
615
615
|
"origam-badge": {
|
|
@@ -149,7 +149,7 @@ export const origamLightTheme = {
|
|
|
149
149
|
components: {
|
|
150
150
|
"origam-alert": { tag: "div", density: "default" },
|
|
151
151
|
"origam-audio": { tag: "article", variant: "expanded", position: "relative" },
|
|
152
|
-
"origam-avatar": { tag: "div", size: "default", rounded: "
|
|
152
|
+
"origam-avatar": { tag: "div", size: "default", rounded: "full", color: "primary" },
|
|
153
153
|
"origam-badge": { tag: "div", location: "top right" },
|
|
154
154
|
"origam-blockquote": { tag: "blockquote", variant: "default" },
|
|
155
155
|
"origam-bottom-nav": { tag: "nav", position: "start" },
|
|
@@ -299,7 +299,7 @@ export const origamDarkTheme = {
|
|
|
299
299
|
components: {
|
|
300
300
|
"origam-alert": { tag: "div", density: "default" },
|
|
301
301
|
"origam-audio": { tag: "article", variant: "expanded", position: "relative" },
|
|
302
|
-
"origam-avatar": { tag: "div", size: "default", rounded: "
|
|
302
|
+
"origam-avatar": { tag: "div", size: "default", rounded: "full", color: "primary" },
|
|
303
303
|
"origam-badge": { tag: "div", location: "top right" },
|
|
304
304
|
"origam-blockquote": { tag: "blockquote", variant: "default" },
|
|
305
305
|
"origam-bottom-nav": { tag: "nav", position: "start" },
|
|
@@ -1,2 +1,14 @@
|
|
|
1
|
-
import { ROUNDED } from '../../enums';
|
|
2
|
-
|
|
1
|
+
import { ROUNDED, ROUNDED_TOKEN } from '../../enums';
|
|
2
|
+
/**
|
|
3
|
+
* Every value the `rounded` prop accepts.
|
|
4
|
+
*
|
|
5
|
+
* Two scales, deliberately kept distinct (see `rounded.enum.ts`):
|
|
6
|
+
* - `ROUNDED` — the component scale, naming an intent (`shaped`, `large`);
|
|
7
|
+
* - `ROUNDED_TOKEN` — the radius rungs (`md`, `full`), resolved to the
|
|
8
|
+
* generated utility classes.
|
|
9
|
+
*
|
|
10
|
+
* The token scale was already honoured at runtime but was missing from this
|
|
11
|
+
* type, so `rounded="full"` — the only way to get a circle — failed to
|
|
12
|
+
* type-check and never surfaced in autocompletion.
|
|
13
|
+
*/
|
|
14
|
+
export type TRounded = `${ROUNDED}` | `${ROUNDED_TOKEN}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "origam",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "origam — a Vue 3 design system with multi-theme design tokens, CSS-first components and TypeScript types.",
|
|
6
6
|
"keywords": [
|
|
@@ -106,7 +106,8 @@
|
|
|
106
106
|
"styles:build": "sass src/assets/scss/main.scss src/assets/css/main.css --no-source-map --style=compressed",
|
|
107
107
|
"tokens:watch": "node scripts/build-tokens.mjs --watch",
|
|
108
108
|
"tokens:lint": "node scripts/build-tokens.mjs --dry-run --strict",
|
|
109
|
-
"prepublishOnly": "pnpm run build"
|
|
109
|
+
"prepublishOnly": "pnpm run build",
|
|
110
|
+
"prepack": "node -e \"require('fs').copyFileSync('../../CHANGELOG.md','CHANGELOG.md')\""
|
|
110
111
|
},
|
|
111
112
|
"dependencies": {
|
|
112
113
|
"@mdi/font": "^7.4.47",
|