@nonoun/native-ui 0.2.7 → 0.2.8
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/components/ui-accordion/ui-accordion-element.d.ts.map +1 -1
- package/dist/components/ui-avatar/ui-avatar-element.d.ts +2 -0
- package/dist/components/ui-avatar/ui-avatar-element.d.ts.map +1 -1
- package/dist/components/ui-calendar/calendar-store.d.ts.map +1 -1
- package/dist/components/ui-calendar/ui-calendar-element.d.ts +1 -0
- package/dist/components/ui-calendar/ui-calendar-element.d.ts.map +1 -1
- package/dist/components/ui-chat/ui-chat-input-element.d.ts.map +1 -1
- package/dist/components/ui-checkbox/ui-checkbox-element.d.ts +1 -0
- package/dist/components/ui-checkbox/ui-checkbox-element.d.ts.map +1 -1
- package/dist/components/ui-combobox/ui-combobox-element.d.ts +1 -0
- package/dist/components/ui-combobox/ui-combobox-element.d.ts.map +1 -1
- package/dist/components/ui-command/ui-command-element.d.ts.map +1 -1
- package/dist/components/ui-command/ui-command-group-element.d.ts +1 -0
- package/dist/components/ui-command/ui-command-group-element.d.ts.map +1 -1
- package/dist/components/ui-controller/ui-controller-element.d.ts +1 -0
- package/dist/components/ui-controller/ui-controller-element.d.ts.map +1 -1
- package/dist/components/ui-dialog/ui-dialog-element.d.ts +0 -1
- package/dist/components/ui-dialog/ui-dialog-element.d.ts.map +1 -1
- package/dist/components/ui-drawer/ui-drawer-element.d.ts +0 -1
- package/dist/components/ui-drawer/ui-drawer-element.d.ts.map +1 -1
- package/dist/components/ui-field/ui-field-element.d.ts.map +1 -1
- package/dist/components/ui-input/ui-input-element.d.ts +1 -0
- package/dist/components/ui-input/ui-input-element.d.ts.map +1 -1
- package/dist/components/ui-input-otp/ui-input-otp-element.d.ts +1 -0
- package/dist/components/ui-input-otp/ui-input-otp-element.d.ts.map +1 -1
- package/dist/components/ui-listbox/ui-listbox-element.d.ts.map +1 -1
- package/dist/components/ui-nav/ui-nav-group-element.d.ts +1 -1
- package/dist/components/ui-pagination/ui-pagination-element.d.ts.map +1 -1
- package/dist/components/ui-radio/ui-radio-element.d.ts.map +1 -1
- package/dist/components/ui-radio/ui-radio-group-element.d.ts +1 -0
- package/dist/components/ui-radio/ui-radio-group-element.d.ts.map +1 -1
- package/dist/components/ui-range/ui-range-element.d.ts +4 -0
- package/dist/components/ui-range/ui-range-element.d.ts.map +1 -1
- package/dist/components/ui-segmented-control/ui-segment-element.d.ts.map +1 -1
- package/dist/components/ui-segmented-control/ui-segmented-control-element.d.ts +1 -0
- package/dist/components/ui-segmented-control/ui-segmented-control-element.d.ts.map +1 -1
- package/dist/components/ui-select/ui-select-element.d.ts +1 -0
- package/dist/components/ui-select/ui-select-element.d.ts.map +1 -1
- package/dist/components/ui-slideshow/ui-slideshow-element.d.ts.map +1 -1
- package/dist/components/ui-switch/ui-switch-element.d.ts +4 -0
- package/dist/components/ui-switch/ui-switch-element.d.ts.map +1 -1
- package/dist/components/ui-table/index.d.ts +1 -1
- package/dist/components/ui-table/index.d.ts.map +1 -1
- package/dist/components/ui-table/table-store.d.ts +0 -1
- package/dist/components/ui-table/table-store.d.ts.map +1 -1
- package/dist/components/ui-table/ui-table-element.d.ts +1 -0
- package/dist/components/ui-table/ui-table-element.d.ts.map +1 -1
- package/dist/components/ui-table/ui-table-header-element.d.ts +1 -0
- package/dist/components/ui-table/ui-table-header-element.d.ts.map +1 -1
- package/dist/components/ui-tabs/ui-tab-element.d.ts.map +1 -1
- package/dist/components/ui-tabs/ui-tabs-element.d.ts.map +1 -1
- package/dist/components/ui-textarea/ui-textarea-element.d.ts +1 -0
- package/dist/components/ui-textarea/ui-textarea-element.d.ts.map +1 -1
- package/dist/components/ui-tree/ui-tree-item-element.d.ts +4 -0
- package/dist/components/ui-tree/ui-tree-item-element.d.ts.map +1 -1
- package/dist/components-lean.css +91 -80
- package/dist/components.css +99 -80
- package/dist/core/form-associable.d.ts +2 -2
- package/dist/core/ui-element.d.ts +2 -0
- package/dist/core/ui-element.d.ts.map +1 -1
- package/dist/custom-elements.json +4429 -2287
- package/dist/dialog-controller.js +56 -39
- package/dist/icons/ui-icon-element.d.ts +1 -0
- package/dist/icons/ui-icon-element.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/kernel/index.d.ts +1 -0
- package/dist/kernel/index.d.ts.map +1 -1
- package/dist/kernel/overlay-manager.d.ts +5 -1
- package/dist/kernel/overlay-manager.d.ts.map +1 -1
- package/dist/kernel.js +32 -13
- package/dist/native-ui-lean.css +91 -80
- package/dist/native-ui.css +99 -80
- package/dist/native-ui.js +5 -5
- package/dist/register-all2.js +147 -76
- package/dist/traits/adapters/collapsible-adapter.d.ts.map +1 -1
- package/dist/traits/adapters/copyable-adapter.d.ts.map +1 -1
- package/dist/traits/adapters/hoverable-adapter.d.ts.map +1 -1
- package/dist/traits/adapters/intersectable-adapter.d.ts.map +1 -1
- package/dist/traits/adapters/resizable-adapter.d.ts.map +1 -1
- package/dist/traits/adapters/searchable-adapter.d.ts.map +1 -1
- package/dist/traits/adapters/sortable-adapter.d.ts.map +1 -1
- package/dist/traits/adapters/swipeable-adapter.d.ts.map +1 -1
- package/dist/traits/adapters/virtualizable-adapter.d.ts.map +1 -1
- package/dist/traits/collapsible-controller.d.ts.map +1 -1
- package/dist/traits/dialog-controller.d.ts.map +1 -1
- package/dist/traits/drag-controller.d.ts.map +1 -1
- package/dist/traits/drop-zone-controller.d.ts +1 -1
- package/dist/traits/drop-zone-controller.d.ts.map +1 -1
- package/dist/traits/focus-trap-controller.d.ts.map +1 -1
- package/dist/traits/hover-controller.d.ts +1 -1
- package/dist/traits/hover-controller.d.ts.map +1 -1
- package/dist/traits/intersect-controller.d.ts.map +1 -1
- package/dist/traits/popover-controller.d.ts.map +1 -1
- package/dist/traits/press-controller.d.ts.map +1 -1
- package/dist/traits/resize-controller.d.ts.map +1 -1
- package/dist/traits/selection-controller.d.ts.map +1 -1
- package/dist/traits/sort-controller.d.ts.map +1 -1
- package/dist/traits/swipe-controller.d.ts.map +1 -1
- package/dist/traits/validate-controller.d.ts +2 -0
- package/dist/traits/validate-controller.d.ts.map +1 -1
- package/dist/traits.js +4 -4
- package/dist/ui-element.js +13 -8
- package/dist/ui-icon-element.js +687 -467
- package/package.json +1 -1
package/dist/components-lean.css
CHANGED
|
@@ -1,3 +1,54 @@
|
|
|
1
|
+
@layer ui {
|
|
2
|
+
|
|
3
|
+
/* ── Icon Base ── */
|
|
4
|
+
|
|
5
|
+
:where(ui-icon) {
|
|
6
|
+
--ui-icon-size: var(--_icon-size);
|
|
7
|
+
--ui-icon-color: currentColor;
|
|
8
|
+
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
width: var(--ui-icon-size);
|
|
14
|
+
height: var(--ui-icon-size);
|
|
15
|
+
color: var(--ui-icon-color);
|
|
16
|
+
flex-shrink: 0;
|
|
17
|
+
vertical-align: middle;
|
|
18
|
+
line-height: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:where(ui-icon) > :where(svg) {
|
|
22
|
+
width: 100%;
|
|
23
|
+
height: 100%;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* WHY: Unregistered icons (no SVG content) should collapse to zero size
|
|
27
|
+
so surrounding buttons/slots don't render with phantom dimensions */
|
|
28
|
+
:where(ui-icon:empty) {
|
|
29
|
+
width: 0;
|
|
30
|
+
height: 0;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* ── Icon Size Variants ── */
|
|
35
|
+
|
|
36
|
+
:where(ui-icon[size="xs"]) { --ui-icon-size: var(--ui-icon-xs); }
|
|
37
|
+
:where(ui-icon[size="sm"]) { --ui-icon-size: var(--ui-icon-sm); }
|
|
38
|
+
:where(ui-icon[size="md"]) { --ui-icon-size: var(--ui-icon-md); }
|
|
39
|
+
:where(ui-icon[size="lg"]) { --ui-icon-size: var(--ui-icon-lg); }
|
|
40
|
+
:where(ui-icon[size="xl"]) { --ui-icon-size: var(--ui-icon-xl); }
|
|
41
|
+
|
|
42
|
+
/* ── Forced Colors ── */
|
|
43
|
+
|
|
44
|
+
@media (forced-colors: active) {
|
|
45
|
+
:where(ui-icon) {
|
|
46
|
+
--ui-icon-color: ButtonText;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
}
|
|
51
|
+
|
|
1
52
|
@layer ui {
|
|
2
53
|
|
|
3
54
|
/* ── Accordion Container ── */
|
|
@@ -467,7 +518,8 @@
|
|
|
467
518
|
display: inline-flex;
|
|
468
519
|
flex-direction: column;
|
|
469
520
|
gap: calc(var(--_space));
|
|
470
|
-
padding: calc(var(--_space) * 2);
|
|
521
|
+
padding-block: calc(var(--_space) * 2);
|
|
522
|
+
padding-inline: calc(var(--_space) * 2);
|
|
471
523
|
border: 1px solid var(--_border-color);
|
|
472
524
|
border-radius: var(--_radius);
|
|
473
525
|
background: var(--_background);
|
|
@@ -674,11 +726,17 @@
|
|
|
674
726
|
}
|
|
675
727
|
|
|
676
728
|
:where(ui-calendar) :where([data-range-start]) {
|
|
677
|
-
border-radius: calc(var(--_radius) - var(--_space))
|
|
729
|
+
border-start-start-radius: calc(var(--_radius) - var(--_space));
|
|
730
|
+
border-end-start-radius: calc(var(--_radius) - var(--_space));
|
|
731
|
+
border-start-end-radius: 0;
|
|
732
|
+
border-end-end-radius: 0;
|
|
678
733
|
}
|
|
679
734
|
|
|
680
735
|
:where(ui-calendar) :where([data-range-end]) {
|
|
681
|
-
border-radius: 0
|
|
736
|
+
border-start-start-radius: 0;
|
|
737
|
+
border-end-start-radius: 0;
|
|
738
|
+
border-start-end-radius: calc(var(--_radius) - var(--_space));
|
|
739
|
+
border-end-end-radius: calc(var(--_radius) - var(--_space));
|
|
682
740
|
}
|
|
683
741
|
|
|
684
742
|
:where(ui-calendar) :where([data-range-start][data-range-end]) {
|
|
@@ -1015,13 +1073,14 @@
|
|
|
1015
1073
|
|
|
1016
1074
|
/* ── Active (pressed) ── */
|
|
1017
1075
|
|
|
1018
|
-
:where(ui-checkbox)[pressed]::before
|
|
1076
|
+
:where(ui-checkbox)[pressed]::before{
|
|
1019
1077
|
background: var(--_background-active, var(--_widget-active));
|
|
1020
1078
|
border-color: var(--_border-color-active, var(--_border-active));
|
|
1021
1079
|
}
|
|
1022
1080
|
|
|
1023
1081
|
:where(ui-checkbox)[aria-checked="true"][pressed]::before,
|
|
1024
|
-
:where(ui-checkbox)[aria-checked="mixed"][pressed]::before
|
|
1082
|
+
:where(ui-checkbox)[aria-checked="mixed"][pressed]::before
|
|
1083
|
+
:where(ui-checkbox)[aria-checked="mixed"][force-active]::before {
|
|
1025
1084
|
background: var(--_surface-active);
|
|
1026
1085
|
border-color: var(--_surface-active);
|
|
1027
1086
|
}
|
|
@@ -1129,7 +1188,8 @@
|
|
|
1129
1188
|
:where(ui-command-list) {
|
|
1130
1189
|
overflow-y: auto;
|
|
1131
1190
|
max-height: var(--ui-popover-max-height);
|
|
1132
|
-
padding: var(--_space);
|
|
1191
|
+
padding-block: var(--_space);
|
|
1192
|
+
padding-inline: var(--_space);
|
|
1133
1193
|
}
|
|
1134
1194
|
|
|
1135
1195
|
/* ── Command Group ── */
|
|
@@ -1221,7 +1281,8 @@
|
|
|
1221
1281
|
}
|
|
1222
1282
|
|
|
1223
1283
|
:where(ui-dialog) > :where(dialog)::backdrop {
|
|
1224
|
-
background: var(--ui-backdrop-color)
|
|
1284
|
+
background: var(--ui-backdrop-color);
|
|
1285
|
+
opacity: var(--ui-backdrop-opacity);
|
|
1225
1286
|
}
|
|
1226
1287
|
|
|
1227
1288
|
}
|
|
@@ -1261,7 +1322,8 @@
|
|
|
1261
1322
|
/* WHY: Animate backdrop opacity on open for a smooth reveal. */
|
|
1262
1323
|
|
|
1263
1324
|
:where(ui-drawer) > :where(dialog)::backdrop {
|
|
1264
|
-
background: var(--ui-backdrop-color)
|
|
1325
|
+
background: var(--ui-backdrop-color);
|
|
1326
|
+
opacity: var(--ui-backdrop-opacity);
|
|
1265
1327
|
animation: drawer-backdrop-in var(--_duration) ease-out;
|
|
1266
1328
|
}
|
|
1267
1329
|
|
|
@@ -1717,7 +1779,8 @@
|
|
|
1717
1779
|
min-width: 0;
|
|
1718
1780
|
flex-direction: column;
|
|
1719
1781
|
gap: 0;
|
|
1720
|
-
padding: var(--_space);
|
|
1782
|
+
padding-block: var(--_space);
|
|
1783
|
+
padding-inline: var(--_space);
|
|
1721
1784
|
border-radius: var(--_radius);
|
|
1722
1785
|
border: 1px solid var(--_border-color, var(--_border-rest));
|
|
1723
1786
|
background: var(--_background, var(--_control));
|
|
@@ -1893,10 +1956,6 @@
|
|
|
1893
1956
|
color: var(--_ink-hover);
|
|
1894
1957
|
}
|
|
1895
1958
|
|
|
1896
|
-
:where(ui-nav-item)[active] {
|
|
1897
|
-
color: var(--_ink-hover);
|
|
1898
|
-
}
|
|
1899
|
-
|
|
1900
1959
|
:where(ui-nav-item):active{
|
|
1901
1960
|
color: var(--_ink-active);
|
|
1902
1961
|
}
|
|
@@ -2120,7 +2179,8 @@
|
|
|
2120
2179
|
position: fixed;
|
|
2121
2180
|
position-area: inline-end span-block-end;
|
|
2122
2181
|
position-try-fallbacks: --nav-flyout-flip-up;
|
|
2123
|
-
margin: 0
|
|
2182
|
+
margin: 0;
|
|
2183
|
+
margin-inline-start: var(--ui-popover-gap);
|
|
2124
2184
|
min-width: 200px;
|
|
2125
2185
|
max-height: var(--ui-popover-max-height);
|
|
2126
2186
|
overflow-y: auto;
|
|
@@ -2348,12 +2408,12 @@
|
|
|
2348
2408
|
|
|
2349
2409
|
/* ── Active (pressed) ── */
|
|
2350
2410
|
|
|
2351
|
-
:where(ui-radio)[pressed]::before
|
|
2411
|
+
:where(ui-radio)[pressed]::before{
|
|
2352
2412
|
background: var(--_background-active, var(--_widget-active));
|
|
2353
2413
|
border-color: var(--_border-color-active, var(--_border-active));
|
|
2354
2414
|
}
|
|
2355
2415
|
|
|
2356
|
-
:where(ui-radio)[aria-checked="true"][pressed]::before
|
|
2416
|
+
:where(ui-radio)[aria-checked="true"][pressed]::before{
|
|
2357
2417
|
background: var(--_surface-active);
|
|
2358
2418
|
border-color: var(--_surface-active);
|
|
2359
2419
|
}
|
|
@@ -2499,11 +2559,11 @@
|
|
|
2499
2559
|
|
|
2500
2560
|
/* ── Active (dragging) ── */
|
|
2501
2561
|
|
|
2502
|
-
:where(ui-range)[pressed]::after
|
|
2562
|
+
:where(ui-range)[pressed]::after{
|
|
2503
2563
|
background: var(--_surface-active);
|
|
2504
2564
|
}
|
|
2505
2565
|
|
|
2506
|
-
:where(ui-range)[pressed] > :where(.ui-range-thumb)
|
|
2566
|
+
:where(ui-range)[pressed] > :where(.ui-range-thumb){
|
|
2507
2567
|
border-color: var(--_surface-active);
|
|
2508
2568
|
box-shadow: var(--ui-shadow-sm), 0 0 0 6px var(--_surface);
|
|
2509
2569
|
}
|
|
@@ -3078,12 +3138,12 @@
|
|
|
3078
3138
|
|
|
3079
3139
|
/* ── Active (pressed) ── */
|
|
3080
3140
|
|
|
3081
|
-
:where(ui-switch)[pressed]::before
|
|
3141
|
+
:where(ui-switch)[pressed]::before{
|
|
3082
3142
|
background: var(--_track-bg-active);
|
|
3083
3143
|
border-color: var(--_track-border-active);
|
|
3084
3144
|
}
|
|
3085
3145
|
|
|
3086
|
-
:where(ui-switch)[aria-checked="true"][pressed]::before
|
|
3146
|
+
:where(ui-switch)[aria-checked="true"][pressed]::before{
|
|
3087
3147
|
background: var(--_surface-active);
|
|
3088
3148
|
border-color: var(--_surface-active);
|
|
3089
3149
|
}
|
|
@@ -3863,22 +3923,22 @@
|
|
|
3863
3923
|
|
|
3864
3924
|
:where(ui-tooltip[placement="top"]) {
|
|
3865
3925
|
position-area: block-start;
|
|
3866
|
-
margin-
|
|
3926
|
+
margin-block-end: calc(var(--_space) * 2);
|
|
3867
3927
|
}
|
|
3868
3928
|
|
|
3869
3929
|
:where(ui-tooltip[placement="bottom"]) {
|
|
3870
3930
|
position-area: block-end;
|
|
3871
|
-
margin-
|
|
3931
|
+
margin-block-start: calc(var(--_space) * 2);
|
|
3872
3932
|
}
|
|
3873
3933
|
|
|
3874
3934
|
:where(ui-tooltip[placement="left"]) {
|
|
3875
3935
|
position-area: inline-start;
|
|
3876
|
-
margin-
|
|
3936
|
+
margin-inline-end: calc(var(--_space) * 2);
|
|
3877
3937
|
}
|
|
3878
3938
|
|
|
3879
3939
|
:where(ui-tooltip[placement="right"]) {
|
|
3880
3940
|
position-area: inline-end;
|
|
3881
|
-
margin-
|
|
3941
|
+
margin-inline-start: calc(var(--_space) * 2);
|
|
3882
3942
|
}
|
|
3883
3943
|
|
|
3884
3944
|
/* ── Hidden (not :popover-open) ── */
|
|
@@ -3902,7 +3962,8 @@
|
|
|
3902
3962
|
flex: 1 1 0%;
|
|
3903
3963
|
min-width: 0;
|
|
3904
3964
|
flex-direction: column;
|
|
3905
|
-
padding: var(--_space);
|
|
3965
|
+
padding-block: var(--_space);
|
|
3966
|
+
padding-inline: var(--_space);
|
|
3906
3967
|
font-size: var(--_font-size);
|
|
3907
3968
|
line-height: var(--_line-height);
|
|
3908
3969
|
}
|
|
@@ -3985,7 +4046,7 @@
|
|
|
3985
4046
|
|
|
3986
4047
|
/* ── Disabled ── */
|
|
3987
4048
|
|
|
3988
|
-
:where(ui-tree-item[disabled]) > :where([slot="label"]) {
|
|
4049
|
+
:where(ui-tree-item[aria-disabled="true"]) > :where([slot="label"]) {
|
|
3989
4050
|
color: var(--_ink-disabled);
|
|
3990
4051
|
cursor: not-allowed;
|
|
3991
4052
|
pointer-events: none;
|
|
@@ -4693,11 +4754,11 @@
|
|
|
4693
4754
|
/* WHY: When collapsed to icon rail, the sidebar edge meets content — drop left padding. */
|
|
4694
4755
|
|
|
4695
4756
|
:where(ui-layout-sidebar)[collapsed] :where(ui-layout-canvas) {
|
|
4696
|
-
padding-
|
|
4757
|
+
padding-inline-start: 0;
|
|
4697
4758
|
}
|
|
4698
4759
|
|
|
4699
4760
|
:where(ui-layout-sidebar)[collapsed] :where(ui-layout-breadcrumb) {
|
|
4700
|
-
padding-
|
|
4761
|
+
padding-inline-start: 0;
|
|
4701
4762
|
}
|
|
4702
4763
|
|
|
4703
4764
|
/* ── Sidebar Header ── */
|
|
@@ -4867,7 +4928,8 @@
|
|
|
4867
4928
|
position: fixed;
|
|
4868
4929
|
position-area: inline-end span-block-end;
|
|
4869
4930
|
position-try-fallbacks: --sidebar-item-flip-up;
|
|
4870
|
-
margin: 0
|
|
4931
|
+
margin: 0;
|
|
4932
|
+
margin-inline-start: var(--ui-popover-gap);
|
|
4871
4933
|
min-width: 200px;
|
|
4872
4934
|
max-height: var(--ui-popover-max-height);
|
|
4873
4935
|
overflow-y: auto;
|
|
@@ -5125,57 +5187,6 @@
|
|
|
5125
5187
|
|
|
5126
5188
|
}
|
|
5127
5189
|
|
|
5128
|
-
@layer ui {
|
|
5129
|
-
|
|
5130
|
-
/* ── Icon Base ── */
|
|
5131
|
-
|
|
5132
|
-
:where(ui-icon) {
|
|
5133
|
-
--ui-icon-size: var(--_icon-size);
|
|
5134
|
-
--ui-icon-color: currentColor;
|
|
5135
|
-
|
|
5136
|
-
box-sizing: border-box;
|
|
5137
|
-
display: inline-flex;
|
|
5138
|
-
align-items: center;
|
|
5139
|
-
justify-content: center;
|
|
5140
|
-
width: var(--ui-icon-size);
|
|
5141
|
-
height: var(--ui-icon-size);
|
|
5142
|
-
color: var(--ui-icon-color);
|
|
5143
|
-
flex-shrink: 0;
|
|
5144
|
-
vertical-align: middle;
|
|
5145
|
-
line-height: 0;
|
|
5146
|
-
}
|
|
5147
|
-
|
|
5148
|
-
:where(ui-icon) > :where(svg) {
|
|
5149
|
-
width: 100%;
|
|
5150
|
-
height: 100%;
|
|
5151
|
-
}
|
|
5152
|
-
|
|
5153
|
-
/* WHY: Unregistered icons (no SVG content) should collapse to zero size
|
|
5154
|
-
so surrounding buttons/slots don't render with phantom dimensions */
|
|
5155
|
-
:where(ui-icon:empty) {
|
|
5156
|
-
width: 0;
|
|
5157
|
-
height: 0;
|
|
5158
|
-
overflow: hidden;
|
|
5159
|
-
}
|
|
5160
|
-
|
|
5161
|
-
/* ── Icon Size Variants ── */
|
|
5162
|
-
|
|
5163
|
-
:where(ui-icon[size="xs"]) { --ui-icon-size: var(--ui-icon-xs); }
|
|
5164
|
-
:where(ui-icon[size="sm"]) { --ui-icon-size: var(--ui-icon-sm); }
|
|
5165
|
-
:where(ui-icon[size="md"]) { --ui-icon-size: var(--ui-icon-md); }
|
|
5166
|
-
:where(ui-icon[size="lg"]) { --ui-icon-size: var(--ui-icon-lg); }
|
|
5167
|
-
:where(ui-icon[size="xl"]) { --ui-icon-size: var(--ui-icon-xl); }
|
|
5168
|
-
|
|
5169
|
-
/* ── Forced Colors ── */
|
|
5170
|
-
|
|
5171
|
-
@media (forced-colors: active) {
|
|
5172
|
-
:where(ui-icon) {
|
|
5173
|
-
--ui-icon-color: ButtonText;
|
|
5174
|
-
}
|
|
5175
|
-
}
|
|
5176
|
-
|
|
5177
|
-
}
|
|
5178
|
-
|
|
5179
5190
|
@layer ui {
|
|
5180
5191
|
|
|
5181
5192
|
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
package/dist/components.css
CHANGED
|
@@ -1,3 +1,54 @@
|
|
|
1
|
+
@layer ui {
|
|
2
|
+
|
|
3
|
+
/* ── Icon Base ── */
|
|
4
|
+
|
|
5
|
+
:where(ui-icon) {
|
|
6
|
+
--ui-icon-size: var(--_icon-size);
|
|
7
|
+
--ui-icon-color: currentColor;
|
|
8
|
+
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
width: var(--ui-icon-size);
|
|
14
|
+
height: var(--ui-icon-size);
|
|
15
|
+
color: var(--ui-icon-color);
|
|
16
|
+
flex-shrink: 0;
|
|
17
|
+
vertical-align: middle;
|
|
18
|
+
line-height: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:where(ui-icon) > :where(svg) {
|
|
22
|
+
width: 100%;
|
|
23
|
+
height: 100%;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* WHY: Unregistered icons (no SVG content) should collapse to zero size
|
|
27
|
+
so surrounding buttons/slots don't render with phantom dimensions */
|
|
28
|
+
:where(ui-icon:empty) {
|
|
29
|
+
width: 0;
|
|
30
|
+
height: 0;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* ── Icon Size Variants ── */
|
|
35
|
+
|
|
36
|
+
:where(ui-icon[size="xs"]) { --ui-icon-size: var(--ui-icon-xs); }
|
|
37
|
+
:where(ui-icon[size="sm"]) { --ui-icon-size: var(--ui-icon-sm); }
|
|
38
|
+
:where(ui-icon[size="md"]) { --ui-icon-size: var(--ui-icon-md); }
|
|
39
|
+
:where(ui-icon[size="lg"]) { --ui-icon-size: var(--ui-icon-lg); }
|
|
40
|
+
:where(ui-icon[size="xl"]) { --ui-icon-size: var(--ui-icon-xl); }
|
|
41
|
+
|
|
42
|
+
/* ── Forced Colors ── */
|
|
43
|
+
|
|
44
|
+
@media (forced-colors: active) {
|
|
45
|
+
:where(ui-icon) {
|
|
46
|
+
--ui-icon-color: ButtonText;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
}
|
|
51
|
+
|
|
1
52
|
@layer ui {
|
|
2
53
|
|
|
3
54
|
/* ── Accordion Container ── */
|
|
@@ -474,7 +525,8 @@
|
|
|
474
525
|
display: inline-flex;
|
|
475
526
|
flex-direction: column;
|
|
476
527
|
gap: calc(var(--_space));
|
|
477
|
-
padding: calc(var(--_space) * 2);
|
|
528
|
+
padding-block: calc(var(--_space) * 2);
|
|
529
|
+
padding-inline: calc(var(--_space) * 2);
|
|
478
530
|
border: 1px solid var(--_border-color);
|
|
479
531
|
border-radius: var(--_radius);
|
|
480
532
|
background: var(--_background);
|
|
@@ -686,11 +738,17 @@
|
|
|
686
738
|
}
|
|
687
739
|
|
|
688
740
|
:where(ui-calendar) :where([data-range-start]) {
|
|
689
|
-
border-radius: calc(var(--_radius) - var(--_space))
|
|
741
|
+
border-start-start-radius: calc(var(--_radius) - var(--_space));
|
|
742
|
+
border-end-start-radius: calc(var(--_radius) - var(--_space));
|
|
743
|
+
border-start-end-radius: 0;
|
|
744
|
+
border-end-end-radius: 0;
|
|
690
745
|
}
|
|
691
746
|
|
|
692
747
|
:where(ui-calendar) :where([data-range-end]) {
|
|
693
|
-
border-radius: 0
|
|
748
|
+
border-start-start-radius: 0;
|
|
749
|
+
border-end-start-radius: 0;
|
|
750
|
+
border-start-end-radius: calc(var(--_radius) - var(--_space));
|
|
751
|
+
border-end-end-radius: calc(var(--_radius) - var(--_space));
|
|
694
752
|
}
|
|
695
753
|
|
|
696
754
|
:where(ui-calendar) :where([data-range-start][data-range-end]) {
|
|
@@ -1030,13 +1088,16 @@
|
|
|
1030
1088
|
|
|
1031
1089
|
/* ── Active (pressed) ── */
|
|
1032
1090
|
|
|
1033
|
-
:where(ui-checkbox)[pressed]::before
|
|
1091
|
+
:where(ui-checkbox)[pressed]::before,
|
|
1092
|
+
:where(ui-checkbox)[force-active]::before {
|
|
1034
1093
|
background: var(--_background-active, var(--_widget-active));
|
|
1035
1094
|
border-color: var(--_border-color-active, var(--_border-active));
|
|
1036
1095
|
}
|
|
1037
1096
|
|
|
1038
1097
|
:where(ui-checkbox)[aria-checked="true"][pressed]::before,
|
|
1039
|
-
:where(ui-checkbox)[aria-checked="mixed"][pressed]::before
|
|
1098
|
+
:where(ui-checkbox)[aria-checked="mixed"][pressed]::before,
|
|
1099
|
+
:where(ui-checkbox)[aria-checked="true"][force-active]::before,
|
|
1100
|
+
:where(ui-checkbox)[aria-checked="mixed"][force-active]::before {
|
|
1040
1101
|
background: var(--_surface-active);
|
|
1041
1102
|
border-color: var(--_surface-active);
|
|
1042
1103
|
}
|
|
@@ -1145,7 +1206,8 @@
|
|
|
1145
1206
|
:where(ui-command-list) {
|
|
1146
1207
|
overflow-y: auto;
|
|
1147
1208
|
max-height: var(--ui-popover-max-height);
|
|
1148
|
-
padding: var(--_space);
|
|
1209
|
+
padding-block: var(--_space);
|
|
1210
|
+
padding-inline: var(--_space);
|
|
1149
1211
|
}
|
|
1150
1212
|
|
|
1151
1213
|
/* ── Command Group ── */
|
|
@@ -1237,7 +1299,8 @@
|
|
|
1237
1299
|
}
|
|
1238
1300
|
|
|
1239
1301
|
:where(ui-dialog) > :where(dialog)::backdrop {
|
|
1240
|
-
background: var(--ui-backdrop-color)
|
|
1302
|
+
background: var(--ui-backdrop-color);
|
|
1303
|
+
opacity: var(--ui-backdrop-opacity);
|
|
1241
1304
|
}
|
|
1242
1305
|
|
|
1243
1306
|
}
|
|
@@ -1277,7 +1340,8 @@
|
|
|
1277
1340
|
/* WHY: Animate backdrop opacity on open for a smooth reveal. */
|
|
1278
1341
|
|
|
1279
1342
|
:where(ui-drawer) > :where(dialog)::backdrop {
|
|
1280
|
-
background: var(--ui-backdrop-color)
|
|
1343
|
+
background: var(--ui-backdrop-color);
|
|
1344
|
+
opacity: var(--ui-backdrop-opacity);
|
|
1281
1345
|
animation: drawer-backdrop-in var(--_duration) ease-out;
|
|
1282
1346
|
}
|
|
1283
1347
|
|
|
@@ -1739,7 +1803,8 @@
|
|
|
1739
1803
|
min-width: 0;
|
|
1740
1804
|
flex-direction: column;
|
|
1741
1805
|
gap: 0;
|
|
1742
|
-
padding: var(--_space);
|
|
1806
|
+
padding-block: var(--_space);
|
|
1807
|
+
padding-inline: var(--_space);
|
|
1743
1808
|
border-radius: var(--_radius);
|
|
1744
1809
|
border: 1px solid var(--_border-color, var(--_border-rest));
|
|
1745
1810
|
background: var(--_background, var(--_control));
|
|
@@ -1919,10 +1984,6 @@
|
|
|
1919
1984
|
color: var(--_ink-hover);
|
|
1920
1985
|
}
|
|
1921
1986
|
|
|
1922
|
-
:where(ui-nav-item)[active] {
|
|
1923
|
-
color: var(--_ink-hover);
|
|
1924
|
-
}
|
|
1925
|
-
|
|
1926
1987
|
:where(ui-nav-item):active,
|
|
1927
1988
|
:where(ui-nav-item)[force-active] {
|
|
1928
1989
|
color: var(--_ink-active);
|
|
@@ -2150,7 +2211,8 @@
|
|
|
2150
2211
|
position: fixed;
|
|
2151
2212
|
position-area: inline-end span-block-end;
|
|
2152
2213
|
position-try-fallbacks: --nav-flyout-flip-up;
|
|
2153
|
-
margin: 0
|
|
2214
|
+
margin: 0;
|
|
2215
|
+
margin-inline-start: var(--ui-popover-gap);
|
|
2154
2216
|
min-width: 200px;
|
|
2155
2217
|
max-height: var(--ui-popover-max-height);
|
|
2156
2218
|
overflow-y: auto;
|
|
@@ -2381,12 +2443,14 @@
|
|
|
2381
2443
|
|
|
2382
2444
|
/* ── Active (pressed) ── */
|
|
2383
2445
|
|
|
2384
|
-
:where(ui-radio)[pressed]::before
|
|
2446
|
+
:where(ui-radio)[pressed]::before,
|
|
2447
|
+
:where(ui-radio)[force-active]::before {
|
|
2385
2448
|
background: var(--_background-active, var(--_widget-active));
|
|
2386
2449
|
border-color: var(--_border-color-active, var(--_border-active));
|
|
2387
2450
|
}
|
|
2388
2451
|
|
|
2389
|
-
:where(ui-radio)[aria-checked="true"][pressed]::before
|
|
2452
|
+
:where(ui-radio)[aria-checked="true"][pressed]::before,
|
|
2453
|
+
:where(ui-radio)[aria-checked="true"][force-active]::before {
|
|
2390
2454
|
background: var(--_surface-active);
|
|
2391
2455
|
border-color: var(--_surface-active);
|
|
2392
2456
|
}
|
|
@@ -2536,11 +2600,13 @@
|
|
|
2536
2600
|
|
|
2537
2601
|
/* ── Active (dragging) ── */
|
|
2538
2602
|
|
|
2539
|
-
:where(ui-range)[pressed]::after
|
|
2603
|
+
:where(ui-range)[pressed]::after,
|
|
2604
|
+
:where(ui-range)[force-active]::after {
|
|
2540
2605
|
background: var(--_surface-active);
|
|
2541
2606
|
}
|
|
2542
2607
|
|
|
2543
|
-
:where(ui-range)[pressed] > :where(.ui-range-thumb)
|
|
2608
|
+
:where(ui-range)[pressed] > :where(.ui-range-thumb),
|
|
2609
|
+
:where(ui-range)[force-active] > :where(.ui-range-thumb) {
|
|
2544
2610
|
border-color: var(--_surface-active);
|
|
2545
2611
|
box-shadow: var(--ui-shadow-sm), 0 0 0 6px var(--_surface);
|
|
2546
2612
|
}
|
|
@@ -3126,12 +3192,14 @@
|
|
|
3126
3192
|
|
|
3127
3193
|
/* ── Active (pressed) ── */
|
|
3128
3194
|
|
|
3129
|
-
:where(ui-switch)[pressed]::before
|
|
3195
|
+
:where(ui-switch)[pressed]::before,
|
|
3196
|
+
:where(ui-switch)[force-active]::before {
|
|
3130
3197
|
background: var(--_track-bg-active);
|
|
3131
3198
|
border-color: var(--_track-border-active);
|
|
3132
3199
|
}
|
|
3133
3200
|
|
|
3134
|
-
:where(ui-switch)[aria-checked="true"][pressed]::before
|
|
3201
|
+
:where(ui-switch)[aria-checked="true"][pressed]::before,
|
|
3202
|
+
:where(ui-switch)[aria-checked="true"][force-active]::before {
|
|
3135
3203
|
background: var(--_surface-active);
|
|
3136
3204
|
border-color: var(--_surface-active);
|
|
3137
3205
|
}
|
|
@@ -3928,22 +3996,22 @@
|
|
|
3928
3996
|
|
|
3929
3997
|
:where(ui-tooltip[placement="top"]) {
|
|
3930
3998
|
position-area: block-start;
|
|
3931
|
-
margin-
|
|
3999
|
+
margin-block-end: calc(var(--_space) * 2);
|
|
3932
4000
|
}
|
|
3933
4001
|
|
|
3934
4002
|
:where(ui-tooltip[placement="bottom"]) {
|
|
3935
4003
|
position-area: block-end;
|
|
3936
|
-
margin-
|
|
4004
|
+
margin-block-start: calc(var(--_space) * 2);
|
|
3937
4005
|
}
|
|
3938
4006
|
|
|
3939
4007
|
:where(ui-tooltip[placement="left"]) {
|
|
3940
4008
|
position-area: inline-start;
|
|
3941
|
-
margin-
|
|
4009
|
+
margin-inline-end: calc(var(--_space) * 2);
|
|
3942
4010
|
}
|
|
3943
4011
|
|
|
3944
4012
|
:where(ui-tooltip[placement="right"]) {
|
|
3945
4013
|
position-area: inline-end;
|
|
3946
|
-
margin-
|
|
4014
|
+
margin-inline-start: calc(var(--_space) * 2);
|
|
3947
4015
|
}
|
|
3948
4016
|
|
|
3949
4017
|
/* ── Hidden (not :popover-open) ── */
|
|
@@ -3967,7 +4035,8 @@
|
|
|
3967
4035
|
flex: 1 1 0%;
|
|
3968
4036
|
min-width: 0;
|
|
3969
4037
|
flex-direction: column;
|
|
3970
|
-
padding: var(--_space);
|
|
4038
|
+
padding-block: var(--_space);
|
|
4039
|
+
padding-inline: var(--_space);
|
|
3971
4040
|
font-size: var(--_font-size);
|
|
3972
4041
|
line-height: var(--_line-height);
|
|
3973
4042
|
}
|
|
@@ -4052,7 +4121,7 @@
|
|
|
4052
4121
|
|
|
4053
4122
|
/* ── Disabled ── */
|
|
4054
4123
|
|
|
4055
|
-
:where(ui-tree-item[disabled]) > :where([slot="label"]) {
|
|
4124
|
+
:where(ui-tree-item[aria-disabled="true"]) > :where([slot="label"]) {
|
|
4056
4125
|
color: var(--_ink-disabled);
|
|
4057
4126
|
cursor: not-allowed;
|
|
4058
4127
|
pointer-events: none;
|
|
@@ -4762,11 +4831,11 @@
|
|
|
4762
4831
|
/* WHY: When collapsed to icon rail, the sidebar edge meets content — drop left padding. */
|
|
4763
4832
|
|
|
4764
4833
|
:where(ui-layout-sidebar)[collapsed] :where(ui-layout-canvas) {
|
|
4765
|
-
padding-
|
|
4834
|
+
padding-inline-start: 0;
|
|
4766
4835
|
}
|
|
4767
4836
|
|
|
4768
4837
|
:where(ui-layout-sidebar)[collapsed] :where(ui-layout-breadcrumb) {
|
|
4769
|
-
padding-
|
|
4838
|
+
padding-inline-start: 0;
|
|
4770
4839
|
}
|
|
4771
4840
|
|
|
4772
4841
|
/* ── Sidebar Header ── */
|
|
@@ -4938,7 +5007,8 @@
|
|
|
4938
5007
|
position: fixed;
|
|
4939
5008
|
position-area: inline-end span-block-end;
|
|
4940
5009
|
position-try-fallbacks: --sidebar-item-flip-up;
|
|
4941
|
-
margin: 0
|
|
5010
|
+
margin: 0;
|
|
5011
|
+
margin-inline-start: var(--ui-popover-gap);
|
|
4942
5012
|
min-width: 200px;
|
|
4943
5013
|
max-height: var(--ui-popover-max-height);
|
|
4944
5014
|
overflow-y: auto;
|
|
@@ -5196,57 +5266,6 @@
|
|
|
5196
5266
|
|
|
5197
5267
|
}
|
|
5198
5268
|
|
|
5199
|
-
@layer ui {
|
|
5200
|
-
|
|
5201
|
-
/* ── Icon Base ── */
|
|
5202
|
-
|
|
5203
|
-
:where(ui-icon) {
|
|
5204
|
-
--ui-icon-size: var(--_icon-size);
|
|
5205
|
-
--ui-icon-color: currentColor;
|
|
5206
|
-
|
|
5207
|
-
box-sizing: border-box;
|
|
5208
|
-
display: inline-flex;
|
|
5209
|
-
align-items: center;
|
|
5210
|
-
justify-content: center;
|
|
5211
|
-
width: var(--ui-icon-size);
|
|
5212
|
-
height: var(--ui-icon-size);
|
|
5213
|
-
color: var(--ui-icon-color);
|
|
5214
|
-
flex-shrink: 0;
|
|
5215
|
-
vertical-align: middle;
|
|
5216
|
-
line-height: 0;
|
|
5217
|
-
}
|
|
5218
|
-
|
|
5219
|
-
:where(ui-icon) > :where(svg) {
|
|
5220
|
-
width: 100%;
|
|
5221
|
-
height: 100%;
|
|
5222
|
-
}
|
|
5223
|
-
|
|
5224
|
-
/* WHY: Unregistered icons (no SVG content) should collapse to zero size
|
|
5225
|
-
so surrounding buttons/slots don't render with phantom dimensions */
|
|
5226
|
-
:where(ui-icon:empty) {
|
|
5227
|
-
width: 0;
|
|
5228
|
-
height: 0;
|
|
5229
|
-
overflow: hidden;
|
|
5230
|
-
}
|
|
5231
|
-
|
|
5232
|
-
/* ── Icon Size Variants ── */
|
|
5233
|
-
|
|
5234
|
-
:where(ui-icon[size="xs"]) { --ui-icon-size: var(--ui-icon-xs); }
|
|
5235
|
-
:where(ui-icon[size="sm"]) { --ui-icon-size: var(--ui-icon-sm); }
|
|
5236
|
-
:where(ui-icon[size="md"]) { --ui-icon-size: var(--ui-icon-md); }
|
|
5237
|
-
:where(ui-icon[size="lg"]) { --ui-icon-size: var(--ui-icon-lg); }
|
|
5238
|
-
:where(ui-icon[size="xl"]) { --ui-icon-size: var(--ui-icon-xl); }
|
|
5239
|
-
|
|
5240
|
-
/* ── Forced Colors ── */
|
|
5241
|
-
|
|
5242
|
-
@media (forced-colors: active) {
|
|
5243
|
-
:where(ui-icon) {
|
|
5244
|
-
--ui-icon-color: ButtonText;
|
|
5245
|
-
}
|
|
5246
|
-
}
|
|
5247
|
-
|
|
5248
|
-
}
|
|
5249
|
-
|
|
5250
5269
|
@layer ui {
|
|
5251
5270
|
|
|
5252
5271
|
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
@@ -5,14 +5,14 @@ import type { Constructor } from './types.ts';
|
|
|
5
5
|
* - `static formAssociated = true`
|
|
6
6
|
* - `formDisabledCallback` → calls `onFormDisabled(disabled)`
|
|
7
7
|
* - `formResetCallback` → calls `onFormReset()`
|
|
8
|
-
*
|
|
9
|
-
* Subclasses override `onFormDisabled` and `onFormReset` with their own logic.
|
|
8
|
+
* - `formStateRestoreCallback` → calls `onFormStateRestore(state)`
|
|
10
9
|
*
|
|
11
10
|
* Must remain a mixin (not a controller) because the Web Components spec
|
|
12
11
|
* requires `static formAssociated = true` on the class constructor.
|
|
13
12
|
*
|
|
14
13
|
* ```ts
|
|
15
14
|
* class UIInput extends FormAssociable(UIElement) {
|
|
15
|
+
* #internals = this.attachInternals();
|
|
16
16
|
* onFormDisabled(disabled: boolean) { this.#disabled.value = disabled; }
|
|
17
17
|
* onFormReset() { this.textContent = ''; }
|
|
18
18
|
* }
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/** Base custom element class with reactive effect lifecycle, child deferral, and trait protocol. */
|
|
2
2
|
export declare class UIElement extends HTMLElement {
|
|
3
3
|
#private;
|
|
4
|
+
/** Resolves after setup() and any deferChildren microtask have completed. */
|
|
5
|
+
readonly ready: Promise<void>;
|
|
4
6
|
addEffect(fn: () => void): void;
|
|
5
7
|
connectedCallback(): void;
|
|
6
8
|
disconnectedCallback(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-element.d.ts","sourceRoot":"","sources":["../../src/core/ui-element.ts"],"names":[],"mappings":"AAKA,oGAAoG;AACpG,qBAAa,SAAU,SAAQ,WAAW;;
|
|
1
|
+
{"version":3,"file":"ui-element.d.ts","sourceRoot":"","sources":["../../src/core/ui-element.ts"],"names":[],"mappings":"AAKA,oGAAoG;AACpG,qBAAa,SAAU,SAAQ,WAAW;;IASxC,6EAA6E;IAC7E,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAE1B;IAEH,SAAS,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI;IAI/B,iBAAiB,IAAI,IAAI;IAgBzB,oBAAoB,IAAI,IAAI;IAa5B,KAAK,IAAI,IAAI;IACb,QAAQ,IAAI,IAAI;IAEhB,SAAS,CAAC,aAAa,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI;IAU7C,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAEvF;;;OAGG;IACH,kBAAkB,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI;CAsG9C"}
|