ranui 0.2.0-alpha.2 → 0.2.0-alpha.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/builder.js +1 -1
- package/dist/{button-BstLjXNe.js → button-CJFSrjq_.js} +10 -10
- package/dist/button.js +1 -1
- package/dist/card-F-3fRynz.js +67 -0
- package/dist/card.js +1 -1
- package/dist/{checkbox-iHZQb-yQ.js → checkbox-BS5kNY6n.js} +9 -9
- package/dist/checkbox.js +1 -1
- package/dist/{colorpicker-CGh8pRqo.js → colorpicker-CdzUAVC5.js} +11 -11
- package/dist/colorpicker.js +1 -1
- package/dist/components/button/index.d.ts +1 -1
- package/dist/components/card/index.d.ts +3 -0
- package/dist/components/theme-switch/index.d.ts +36 -0
- package/dist/{dropdown-RqHMRhFE.js → dropdown-BYS1Trdu.js} +9 -9
- package/dist/dropdown.js +1 -1
- package/dist/fonts/Geist-Variable.woff2 +0 -0
- package/dist/fonts/GeistMono-Variable.woff2 +0 -0
- package/dist/fonts/OFL-LICENSE.txt +92 -0
- package/dist/fonts/fonts.css +26 -0
- package/dist/{form-05Lxxl3D.js → form-BsB5JhS4.js} +9 -9
- package/dist/form.js +1 -1
- package/dist/{icon-Blm7AbyY.js → icon-pfolda2m.js} +3 -3
- package/dist/icon.js +1 -1
- package/dist/iife/button.iife.js +1 -1
- package/dist/iife/card.iife.js +1 -1
- package/dist/iife/checkbox.iife.js +1 -1
- package/dist/iife/colorpicker.iife.js +2 -2
- package/dist/iife/dropdown.iife.js +1 -1
- package/dist/iife/form.iife.js +1 -1
- package/dist/iife/icon.iife.js +1 -1
- package/dist/iife/image.iife.js +1 -1
- package/dist/iife/input.iife.js +1 -1
- package/dist/iife/link.iife.js +1 -1
- package/dist/iife/loading.iife.js +1 -1
- package/dist/iife/math.iife.js +14 -14
- package/dist/iife/message.iife.js +1 -1
- package/dist/iife/modal.iife.js +1 -1
- package/dist/iife/player.iife.js +9 -9
- package/dist/iife/popover.iife.js +1 -1
- package/dist/iife/progress.iife.js +1 -1
- package/dist/iife/radar.iife.js +1 -1
- package/dist/iife/route.iife.js +1 -1
- package/dist/iife/router.iife.js +1 -1
- package/dist/iife/scratch.iife.js +1 -1
- package/dist/iife/section.iife.js +1 -1
- package/dist/iife/select.iife.js +2 -2
- package/dist/iife/skeleton.iife.js +1 -1
- package/dist/iife/tab.iife.js +1 -1
- package/dist/iife/tabpane.iife.js +1 -1
- package/dist/iife/theme-switch.iife.js +1 -0
- package/dist/{image-DKm6z7YQ.js → image-BXpKQ9sU.js} +9 -9
- package/dist/image.js +1 -1
- package/dist/index.cjs +23 -23
- package/dist/index.d.ts +4 -0
- package/dist/index.iife.js +67 -78
- package/dist/index.js +73 -72
- package/dist/{input-Dskw1bAl.js → input-BM6e_LQr.js} +13 -13
- package/dist/input.js +1 -1
- package/dist/{link-BW-gvrpN.js → link-DURZzd7u.js} +7 -7
- package/dist/link.js +1 -1
- package/dist/{loading-C4QUpm70.js → loading-Bd-gF1AH.js} +24 -24
- package/dist/loading.js +1 -1
- package/dist/{math-Dv4nXSoI.js → math-IjzOAwnA.js} +7 -7
- package/dist/math.js +1 -1
- package/dist/{message-De5e1txT.js → message-CLpuP8HY.js} +8 -8
- package/dist/message.js +1 -1
- package/dist/{modal-DruDj3AB.js → modal-DOTpABRe.js} +7 -7
- package/dist/modal.js +1 -1
- package/dist/{player-CqTAmg_E.js → player-C2pB5L2N.js} +7 -7
- package/dist/player.js +1 -1
- package/dist/{popover-BY32HNMl.js → popover-DRUQjdPs.js} +10 -10
- package/dist/popover.js +1 -1
- package/dist/{progress-gZo0knzu.js → progress-BIEXYYd2.js} +6 -6
- package/dist/progress.js +1 -1
- package/dist/{radar-19P5Mtld.js → radar-DAF95_Mj.js} +9 -9
- package/dist/radar.js +1 -1
- package/dist/ranui.css +1 -1
- package/dist/{route-BY_E6-2C.js → route-MQZpn2BP.js} +14 -14
- package/dist/route.js +1 -1
- package/dist/{router-BDcv4F-2.js → router-B9rCrWXm.js} +5 -5
- package/dist/router.js +1 -1
- package/dist/{scratch-Dbd9G6Q6.js → scratch-QlPyy1f4.js} +1 -1
- package/dist/scratch.js +1 -1
- package/dist/{section-CNTvgdQ-.js → section-D0qMm9KM.js} +8 -8
- package/dist/section.js +1 -1
- package/dist/{select-BVdUtQX5.js → select-BSeCT9tF.js} +13 -13
- package/dist/select.js +1 -1
- package/dist/{signal-XHfNsQNW.js → signal-CSSZxlK5.js} +1 -1
- package/dist/{skeleton-BAdJ6vyA.js → skeleton-CFqQmKyt.js} +8 -8
- package/dist/skeleton.js +1 -1
- package/dist/{tab-DH2owP2V.js → tab-CqFrgo2v.js} +5 -5
- package/dist/tab.js +1 -1
- package/dist/{tabpane-B_M-Jokw.js → tabpane-B-m3xwqu.js} +7 -7
- package/dist/tabpane.js +1 -1
- package/dist/test/unit/theme-switch.contract.test.d.ts +1 -0
- package/dist/theme-switch-B8K9y2RL.js +170 -0
- package/dist/theme-switch.js +5 -0
- package/dist/{utils-D4pPF77E.js → utils-DBfrRFoE.js} +116 -198
- package/docs/COMPONENTS.md +21 -5
- package/docs/DESIGN.md +24 -19
- package/docs/style-tokens-public.md +55 -8
- package/package.json +16 -10
- package/dist/card-DQUJoDUQ.js +0 -60
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
This file is auto-generated by `bin/generate-style-docs.ts`.
|
|
4
4
|
It is a filtered, public-facing style API view (structural/internal tokens excluded).
|
|
5
5
|
|
|
6
|
-
Generated at: 2026-
|
|
6
|
+
Generated at: 2026-07-11T05:42:37.197Z
|
|
7
7
|
|
|
8
8
|
## Components
|
|
9
9
|
|
|
10
10
|
### `button`
|
|
11
11
|
|
|
12
|
-
- Tokens:
|
|
12
|
+
- Tokens: 54
|
|
13
13
|
- Parts: 2
|
|
14
14
|
|
|
15
15
|
#### Tokens
|
|
16
16
|
|
|
17
|
-
<!-- layers: semantic:
|
|
17
|
+
<!-- layers: semantic: 15 · skin: 2 · component: 36 · internal: 1 -->
|
|
18
18
|
|
|
19
19
|
- `--ran-btn-after-background-image`
|
|
20
20
|
- `--ran-btn-after-opacity`
|
|
@@ -54,11 +54,18 @@ Generated at: 2026-06-28T10:37:36.381Z
|
|
|
54
54
|
- `--ran-btn-user-select`
|
|
55
55
|
- `--ran-color-bg-elevated`
|
|
56
56
|
- `--ran-color-border`
|
|
57
|
+
- `--ran-color-border-hover`
|
|
58
|
+
- `--ran-color-contrast-`
|
|
59
|
+
- `--ran-color-contrast-bg`
|
|
60
|
+
- `--ran-color-contrast-bg-active`
|
|
61
|
+
- `--ran-color-contrast-bg-hover`
|
|
62
|
+
- `--ran-color-contrast-text`
|
|
57
63
|
- `--ran-color-danger`
|
|
58
64
|
- `--ran-color-primary`
|
|
59
65
|
- `--ran-color-primary-active`
|
|
60
66
|
- `--ran-color-primary-hover`
|
|
61
67
|
- `--ran-color-text`
|
|
68
|
+
- `--ran-gray-alpha-400`
|
|
62
69
|
- `--ran-motion-duration-base`
|
|
63
70
|
- `--ran-radius-sm`
|
|
64
71
|
- `--ran-skin-font-family`
|
|
@@ -71,27 +78,33 @@ Generated at: 2026-06-28T10:37:36.381Z
|
|
|
71
78
|
|
|
72
79
|
### `card`
|
|
73
80
|
|
|
74
|
-
- Tokens:
|
|
81
|
+
- Tokens: 21
|
|
75
82
|
- Parts: 7
|
|
76
83
|
|
|
77
84
|
#### Tokens
|
|
78
85
|
|
|
79
|
-
<!-- layers: semantic:
|
|
86
|
+
<!-- layers: semantic: 8 · skin: 1 · internal: 12 -->
|
|
80
87
|
|
|
81
88
|
- `--ran-card-background`
|
|
89
|
+
- `--ran-card-border-color`
|
|
82
90
|
- `--ran-card-description-color`
|
|
83
91
|
- `--ran-card-description-font-size`
|
|
84
92
|
- `--ran-card-gap`
|
|
93
|
+
- `--ran-card-hover-border-color`
|
|
94
|
+
- `--ran-card-hover-shadow`
|
|
85
95
|
- `--ran-card-radius`
|
|
86
96
|
- `--ran-card-shadow`
|
|
87
97
|
- `--ran-card-title-color`
|
|
88
98
|
- `--ran-card-title-font-size`
|
|
89
99
|
- `--ran-card-title-font-weight`
|
|
90
|
-
- `--ran-color-bg
|
|
100
|
+
- `--ran-color-bg`
|
|
91
101
|
- `--ran-color-border`
|
|
102
|
+
- `--ran-color-border-hover`
|
|
92
103
|
- `--ran-color-text`
|
|
93
104
|
- `--ran-color-text-secondary`
|
|
105
|
+
- `--ran-motion-duration-base`
|
|
94
106
|
- `--ran-radius-md`
|
|
107
|
+
- `--ran-shadow-elevated`
|
|
95
108
|
- `--ran-skin-border-style`
|
|
96
109
|
|
|
97
110
|
#### Parts
|
|
@@ -161,12 +174,12 @@ Generated at: 2026-06-28T10:37:36.381Z
|
|
|
161
174
|
|
|
162
175
|
### `colorpicker`
|
|
163
176
|
|
|
164
|
-
- Tokens:
|
|
177
|
+
- Tokens: 15
|
|
165
178
|
- Parts: 2
|
|
166
179
|
|
|
167
180
|
#### Tokens
|
|
168
181
|
|
|
169
|
-
<!-- layers: semantic: 5 · component:
|
|
182
|
+
<!-- layers: semantic: 5 · component: 7 · internal: 3 -->
|
|
170
183
|
|
|
171
184
|
- `--ran-color-bg-elevated`
|
|
172
185
|
- `--ran-color-border`
|
|
@@ -176,6 +189,7 @@ Generated at: 2026-06-28T10:37:36.381Z
|
|
|
176
189
|
- `--ran-colorpicker-border`
|
|
177
190
|
- `--ran-colorpicker-border-hover`
|
|
178
191
|
- `--ran-colorpicker-border-radius`
|
|
192
|
+
- `--ran-colorpicker-disabled-opacity`
|
|
179
193
|
- `--ran-colorpicker-transition`
|
|
180
194
|
- `--ran-gray-500`
|
|
181
195
|
- `--ran-gray-alpha-100`
|
|
@@ -878,3 +892,36 @@ Generated at: 2026-06-28T10:37:36.381Z
|
|
|
878
892
|
#### Parts
|
|
879
893
|
|
|
880
894
|
- `content`
|
|
895
|
+
|
|
896
|
+
### `theme-switch`
|
|
897
|
+
|
|
898
|
+
- Tokens: 19
|
|
899
|
+
- Parts: 0
|
|
900
|
+
|
|
901
|
+
#### Tokens
|
|
902
|
+
|
|
903
|
+
<!-- layers: semantic: 7 · skin: 1 · internal: 11 -->
|
|
904
|
+
|
|
905
|
+
- `--ran-color-bg-hover`
|
|
906
|
+
- `--ran-color-border`
|
|
907
|
+
- `--ran-color-primary`
|
|
908
|
+
- `--ran-color-text`
|
|
909
|
+
- `--ran-color-text-secondary`
|
|
910
|
+
- `--ran-motion-duration-fast`
|
|
911
|
+
- `--ran-radius-full`
|
|
912
|
+
- `--ran-skin-border-style`
|
|
913
|
+
- `--ran-theme-switch-`
|
|
914
|
+
- `--ran-theme-switch-active-background`
|
|
915
|
+
- `--ran-theme-switch-active-color`
|
|
916
|
+
- `--ran-theme-switch-background`
|
|
917
|
+
- `--ran-theme-switch-border-color`
|
|
918
|
+
- `--ran-theme-switch-button-size`
|
|
919
|
+
- `--ran-theme-switch-color`
|
|
920
|
+
- `--ran-theme-switch-gap`
|
|
921
|
+
- `--ran-theme-switch-hover-color`
|
|
922
|
+
- `--ran-theme-switch-icon-size`
|
|
923
|
+
- `--ran-theme-switch-radius`
|
|
924
|
+
|
|
925
|
+
#### Parts
|
|
926
|
+
|
|
927
|
+
- (none)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ranui",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.3",
|
|
4
4
|
"description": "UI Component library based on `Web Component`",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
"require": "./dist/index.cjs"
|
|
66
66
|
},
|
|
67
67
|
"./style": "./dist/ranui.css",
|
|
68
|
+
"./fonts": "./dist/fonts/fonts.css",
|
|
68
69
|
"./builder": {
|
|
69
70
|
"types": "./dist/builder.d.ts",
|
|
70
71
|
"import": "./dist/builder.js",
|
|
@@ -200,6 +201,11 @@
|
|
|
200
201
|
"import": "./dist/link.js",
|
|
201
202
|
"require": "./dist/index.cjs"
|
|
202
203
|
},
|
|
204
|
+
"./theme-switch": {
|
|
205
|
+
"types": "./dist/index.d.ts",
|
|
206
|
+
"import": "./dist/theme-switch.js",
|
|
207
|
+
"require": "./dist/index.cjs"
|
|
208
|
+
},
|
|
203
209
|
"./type": {
|
|
204
210
|
"types": "./dist/index.d.ts",
|
|
205
211
|
"import": "./dist/index.js",
|
|
@@ -217,18 +223,18 @@
|
|
|
217
223
|
}
|
|
218
224
|
},
|
|
219
225
|
"devDependencies": {
|
|
220
|
-
"@argos-ci/playwright": "^7.
|
|
226
|
+
"@argos-ci/playwright": "^7.3.0",
|
|
221
227
|
"@playwright/test": "^1.61.1",
|
|
222
|
-
"@types/node": "^26.
|
|
223
|
-
"@vitest/coverage-v8": "^4.1.
|
|
228
|
+
"@types/node": "^26.1.1",
|
|
229
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
224
230
|
"jsdom": "^29.1.1",
|
|
225
231
|
"less": "^4.6.7",
|
|
226
232
|
"rollup-plugin-visualizer": "^7.0.1",
|
|
227
233
|
"svgo": "^4.0.1",
|
|
228
|
-
"tsx": "^4.
|
|
234
|
+
"tsx": "^4.23.0",
|
|
229
235
|
"typescript": "^6.0.3",
|
|
230
|
-
"vite": "^8.1.
|
|
231
|
-
"vitest": "^4.1.
|
|
236
|
+
"vite": "^8.1.4",
|
|
237
|
+
"vitest": "^4.1.10"
|
|
232
238
|
},
|
|
233
239
|
"dependencies": {
|
|
234
240
|
"ranuts": "^0.2.0-alpha.0"
|
|
@@ -243,9 +249,9 @@
|
|
|
243
249
|
"build:iife": "tsx ./bin/build-iife.ts",
|
|
244
250
|
"prepublish": "npm run build",
|
|
245
251
|
"test": "sh ./bin/test.sh",
|
|
246
|
-
"test:unit": "
|
|
247
|
-
"test:unit:watch": "
|
|
248
|
-
"test:unit:coverage": "
|
|
252
|
+
"test:unit": "vitest run",
|
|
253
|
+
"test:unit:watch": "vitest",
|
|
254
|
+
"test:unit:coverage": "vitest run --coverage",
|
|
249
255
|
"test:ssr": "vitest run --config vitest.config.ssr.ts",
|
|
250
256
|
"test:ssr:watch": "vitest --config vitest.config.ssr.ts",
|
|
251
257
|
"test:all": "pnpm -F ranuts build && npm run tsc && npm run test:unit && npm run test:ssr",
|
package/dist/card-DQUJoDUQ.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { c as d, d as o, l as a, s as c, u as i } from "./utils-D4pPF77E.js";
|
|
2
|
-
import { i as r, p as s } from "./factory-BdsO0dEW.js";
|
|
3
|
-
import { a as l, n as h } from "./ssr-DSGwPtEd.js";
|
|
4
|
-
var p = ".remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transparent}.remove-wap-active-focus:active,.remove-wap-active-focus:focus{outline:0;-webkit-tap-highlight-color:transparent}:host{display:var(--ran-card-display, block);box-sizing:border-box;min-height:var(--ran-card-min-height, 0)}.ran-card{display:grid;align-content:start;gap:var(--ran-card-gap, 14px);height:100%;min-width:0;padding:var(--ran-card-padding, 16px);border-width:var(--ran-skin-border-width, 1px);border-style:var(--ran-skin-border-style, solid);border-color:var(--ran-color-border, #d9d9d9);border-radius:var(--ran-card-radius, var(--ran-radius-md));background:var(--ran-card-background, var(--ran-color-bg-muted));box-shadow:var(--ran-card-shadow, none);box-sizing:border-box}.ran-card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.ran-card-title-area{flex:1;min-width:0}.ran-card-title{margin:0;color:var(--ran-card-title-color, var(--ran-color-text));font-size:var(--ran-card-title-font-size, 16px);font-weight:var(--ran-card-title-font-weight, 600);line-height:1.3}.ran-card-title:empty{display:none}.ran-card-description{margin:4px 0 0;color:var(--ran-card-description-color, var(--ran-color-text-secondary));font-size:var(--ran-card-description-font-size, 14px);line-height:1.5}.ran-card-description:empty{display:none}.ran-card-body,.ran-card-footer{min-width:0}:host(:not([title]):not([description])) .ran-card-header{display:none}", g = class extends h {
|
|
5
|
-
_shadowDom;
|
|
6
|
-
_titleEl;
|
|
7
|
-
_descriptionEl;
|
|
8
|
-
_headerEl;
|
|
9
|
-
_footerEl;
|
|
10
|
-
static get observedAttributes() {
|
|
11
|
-
return [
|
|
12
|
-
"title",
|
|
13
|
-
"description",
|
|
14
|
-
"sheet"
|
|
15
|
-
];
|
|
16
|
-
}
|
|
17
|
-
constructor() {
|
|
18
|
-
super(), this._shadowDom = d(this, p);
|
|
19
|
-
const t = c(this._shadowDom, ".ran-card", () => r().class("ran-card").attr("part", "card").children(r().class("ran-card-header").attr("part", "header").children(r().class("ran-card-title-area").children(r().class("ran-card-title").attr("part", "title"), r().class("ran-card-description").attr("part", "description")), s().attr("name", "extra").attr("part", "extra")), r().class("ran-card-body").attr("part", "body").children(s()), r().class("ran-card-footer").attr("part", "footer").children(s().attr("name", "footer"))).build());
|
|
20
|
-
this._headerEl = t.querySelector(".ran-card-header"), this._titleEl = t.querySelector(".ran-card-title"), this._descriptionEl = t.querySelector(".ran-card-description"), this._footerEl = t.querySelector(".ran-card-footer"), this._footerEl.style.display = "none";
|
|
21
|
-
const e = this._footerEl.querySelector('slot[name="footer"]');
|
|
22
|
-
e.addEventListener("slotchange", () => {
|
|
23
|
-
this._footerEl.style.display = e.assignedElements().length > 0 ? "" : "none";
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
get title() {
|
|
27
|
-
return a(this, "title");
|
|
28
|
-
}
|
|
29
|
-
set title(t) {
|
|
30
|
-
i(this, "title", t);
|
|
31
|
-
}
|
|
32
|
-
get description() {
|
|
33
|
-
return a(this, "description");
|
|
34
|
-
}
|
|
35
|
-
set description(t) {
|
|
36
|
-
i(this, "description", t);
|
|
37
|
-
}
|
|
38
|
-
get sheet() {
|
|
39
|
-
return a(this, "sheet");
|
|
40
|
-
}
|
|
41
|
-
set sheet(t) {
|
|
42
|
-
i(this, "sheet", t);
|
|
43
|
-
}
|
|
44
|
-
_syncTitle() {
|
|
45
|
-
this._titleEl.textContent = this.getAttribute("title") ?? "";
|
|
46
|
-
}
|
|
47
|
-
_syncDescription() {
|
|
48
|
-
this._descriptionEl.textContent = this.getAttribute("description") ?? "";
|
|
49
|
-
}
|
|
50
|
-
connectedCallback() {
|
|
51
|
-
this._syncTitle(), this._syncDescription(), o(this, this._shadowDom, "sheet", null, this.sheet);
|
|
52
|
-
}
|
|
53
|
-
attributeChangedCallback(t, e, n) {
|
|
54
|
-
e !== n && (t === "title" && this._syncTitle(), t === "description" && this._syncDescription(), t === "sheet" && o(this, this._shadowDom, t, e, n));
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
l("r-card", g);
|
|
58
|
-
export {
|
|
59
|
-
g as t
|
|
60
|
-
};
|