origam 2.6.2 → 2.7.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/dist/src/assets/css/tokens/dark.css +6 -0
- package/dist/src/assets/css/tokens/light.css +3 -0
- package/dist/src/assets/scss/tokens/_dark.scss +3 -0
- package/dist/src/assets/scss/tokens/_light.scss +3 -0
- package/dist/src/components/Alert/OrigamAlert.vue +5 -0
- package/dist/src/components/Btn/OrigamBtnGroup.vue +0 -11
- package/dist/src/components/Field/OrigamField.vue +2 -2
- package/dist/src/components/Pagination/OrigamPagination.vue +7 -1
- package/dist/src/components/ThemeProvider/OrigamThemeProvider.vue +11 -1
- package/dist/src/composables/Code/code.composable.cjs +22 -1
- package/dist/src/composables/Code/code.composable.js +25 -1
- package/dist/src/consts/Theme/theme.const.cjs +2 -1
- package/dist/src/consts/Theme/theme.const.d.ts +14 -1
- package/dist/src/consts/Theme/theme.const.js +1 -0
- package/dist/src/interfaces/Btn/btn.interface.d.ts +1 -2
- package/dist/src/interfaces/Checkbox/checkbox.interface.d.ts +1 -1
- package/dist/src/interfaces/DatePicker/date-picker-header.interface.d.ts +1 -3
- package/dist/src/origam.cjs +1 -0
- package/dist/src/origam.js +2 -0
- package/dist/src/types/tokens.type.d.ts +1 -1
- package/dist/src/utils/Commons/getCurrentInstance.util.cjs +1 -1
- package/dist/src/utils/Commons/getCurrentInstance.util.js +1 -1
- package/dist/src/utils/Theme/apply-theme.util.cjs +2 -1
- package/dist/src/utils/Theme/apply-theme.util.js +2 -1
- package/package.json +22 -16
- package/LICENSE +0 -21
|
@@ -21,7 +21,7 @@ function getCurrentInstance(name, message) {
|
|
|
21
21
|
}
|
|
22
22
|
function getCurrentInstanceName(name = "composable") {
|
|
23
23
|
const vm = getCurrentInstance(name).type;
|
|
24
|
-
return (0, _utils.toKebabCase)(vm?.aliasName
|
|
24
|
+
return (0, _utils.toKebabCase)(vm?.aliasName ?? vm?.name ?? vm?.__name);
|
|
25
25
|
}
|
|
26
26
|
let _uid = 0;
|
|
27
27
|
let _map = /* @__PURE__ */new WeakMap();
|
|
@@ -12,7 +12,7 @@ export function getCurrentInstance(name, message) {
|
|
|
12
12
|
}
|
|
13
13
|
export function getCurrentInstanceName(name = "composable") {
|
|
14
14
|
const vm = getCurrentInstance(name).type;
|
|
15
|
-
return toKebabCase(vm?.aliasName
|
|
15
|
+
return toKebabCase(vm?.aliasName ?? vm?.name ?? vm?.__name);
|
|
16
16
|
}
|
|
17
17
|
let _uid = 0;
|
|
18
18
|
let _map = /* @__PURE__ */ new WeakMap();
|
|
@@ -75,7 +75,8 @@ function themeSelector(theme) {
|
|
|
75
75
|
const hasMode = theme.mode === "light" || theme.mode === "dark";
|
|
76
76
|
if (!hasName && !hasMode) return ":root";
|
|
77
77
|
if (!hasName) return `[data-mode="${theme.mode}"]`;
|
|
78
|
-
const
|
|
78
|
+
const modeAttr = hasMode ? `[data-mode="${theme.mode}"]` : "";
|
|
79
|
+
const attrs = `[data-theme="${theme.name}"]${modeAttr}`;
|
|
79
80
|
return `:root:root${attrs}, ${attrs}`;
|
|
80
81
|
}
|
|
81
82
|
function themeToCss(theme) {
|
|
@@ -56,7 +56,8 @@ export function themeSelector(theme) {
|
|
|
56
56
|
const hasMode = theme.mode === "light" || theme.mode === "dark";
|
|
57
57
|
if (!hasName && !hasMode) return ":root";
|
|
58
58
|
if (!hasName) return `[data-mode="${theme.mode}"]`;
|
|
59
|
-
const
|
|
59
|
+
const modeAttr = hasMode ? `[data-mode="${theme.mode}"]` : "";
|
|
60
|
+
const attrs = `[data-theme="${theme.name}"]${modeAttr}`;
|
|
60
61
|
return `:root:root${attrs}, ${attrs}`;
|
|
61
62
|
}
|
|
62
63
|
export function themeToCss(theme) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "origam",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.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": [
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
"./components": "./dist/src/components/index.js",
|
|
77
77
|
"./components/*": "./dist/src/components/*/index.js",
|
|
78
78
|
"./composables": "./dist/src/composables/index.js",
|
|
79
|
+
"./themes": "./dist/src/themes/index.js",
|
|
79
80
|
"./directives": "./dist/src/directives/index.js",
|
|
80
81
|
"./enums": "./dist/src/enums/index.js",
|
|
81
82
|
"./consts": "./dist/src/consts/index.js",
|
|
@@ -92,17 +93,30 @@
|
|
|
92
93
|
"README.md",
|
|
93
94
|
"CHANGELOG.md"
|
|
94
95
|
],
|
|
96
|
+
"scripts": {
|
|
97
|
+
"build": "pnpm run tokens:build && unbuild",
|
|
98
|
+
"lib:build": "pnpm run build",
|
|
99
|
+
"type-check": "vue-tsc --noEmit -p tsconfig.json",
|
|
100
|
+
"type-check:canary": "node scripts/nounusedlocals-canary.mjs",
|
|
101
|
+
"tokens:build": "node scripts/build-tokens.mjs",
|
|
102
|
+
"tokens:watch": "node scripts/build-tokens.mjs --watch",
|
|
103
|
+
"tokens:lint": "node scripts/build-tokens.mjs --dry-run --strict",
|
|
104
|
+
"prepublishOnly": "pnpm run build"
|
|
105
|
+
},
|
|
95
106
|
"dependencies": {
|
|
96
107
|
"@mdi/font": "^7.4.47",
|
|
97
|
-
"qrcode-generator": "^2.0.4"
|
|
98
|
-
"shiki": "^4.3.0"
|
|
108
|
+
"qrcode-generator": "^2.0.4"
|
|
99
109
|
},
|
|
100
110
|
"peerDependencies": {
|
|
111
|
+
"shiki": "^4.3.1",
|
|
101
112
|
"vue": "^3.5.0",
|
|
102
113
|
"vue-i18n": "^11.0.0",
|
|
103
114
|
"vue-router": "^4.5.0"
|
|
104
115
|
},
|
|
105
116
|
"peerDependenciesMeta": {
|
|
117
|
+
"shiki": {
|
|
118
|
+
"optional": true
|
|
119
|
+
},
|
|
106
120
|
"vue-i18n": {
|
|
107
121
|
"optional": true
|
|
108
122
|
},
|
|
@@ -112,9 +126,9 @@
|
|
|
112
126
|
},
|
|
113
127
|
"devDependencies": {
|
|
114
128
|
"@nuxt/kit": "^4.4.5",
|
|
115
|
-
"@types/node": "^26.1.0",
|
|
116
129
|
"@tokens-studio/sd-transforms": "^2.0.3",
|
|
117
|
-
"@
|
|
130
|
+
"@types/node": "^26.1.0",
|
|
131
|
+
"@vitejs/plugin-vue": "^6.0.7",
|
|
118
132
|
"sass": "^1.89.2",
|
|
119
133
|
"style-dictionary": "^5.5.0",
|
|
120
134
|
"ts-transformer-keys": "^0.4.4",
|
|
@@ -124,16 +138,8 @@
|
|
|
124
138
|
"vite": "^7.0.5",
|
|
125
139
|
"vite-plugin-commonjs": "^0.10.4",
|
|
126
140
|
"vite-tsconfig-paths": "^5.1.4",
|
|
127
|
-
"vue": "
|
|
141
|
+
"vue": "3.5.39",
|
|
128
142
|
"vue-sfc-transformer": "^0.1.16",
|
|
129
|
-
"vue-tsc": "^3.
|
|
130
|
-
},
|
|
131
|
-
"scripts": {
|
|
132
|
-
"build": "pnpm run tokens:build && unbuild",
|
|
133
|
-
"lib:build": "pnpm run build",
|
|
134
|
-
"type-check": "vue-tsc --noEmit -p tsconfig.json",
|
|
135
|
-
"tokens:build": "node scripts/build-tokens.mjs",
|
|
136
|
-
"tokens:watch": "node scripts/build-tokens.mjs --watch",
|
|
137
|
-
"tokens:lint": "node scripts/build-tokens.mjs --dry-run --strict"
|
|
143
|
+
"vue-tsc": "^3.3.6"
|
|
138
144
|
}
|
|
139
|
-
}
|
|
145
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024 Prioul Arnaud
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|