@nonoun/native-ui 0.2.5 → 0.2.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ui-nav-group-header-element.d.ts","sourceRoot":"","sources":["../../../src/components/ui-nav/ui-nav-group-header-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAGrD,4DAA4D;AAC5D,qBAAa,gBAAiB,SAAQ,SAAS;;IAO7C,KAAK,IAAI,IAAI;CAQd"}
1
+ {"version":3,"file":"ui-nav-group-header-element.d.ts","sourceRoot":"","sources":["../../../src/components/ui-nav/ui-nav-group-header-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAGrD,4DAA4D;AAC5D,qBAAa,gBAAiB,SAAQ,SAAS;;IAO7C,KAAK,IAAI,IAAI;CAgBd"}
@@ -1687,7 +1687,7 @@
1687
1687
  line-height: 1;
1688
1688
  min-height: var(--ui-kbd-size-md);
1689
1689
  padding-inline: 0.4em;
1690
- border-radius: 0.25rem;
1690
+ border-radius: 0.5em;
1691
1691
  background: var(--_ground, var(--_body));
1692
1692
  border: 1px solid var(--_border-muted);
1693
1693
  color: var(--_ink-muted);
@@ -1998,6 +1998,18 @@
1998
1998
  user-select: none;
1999
1999
  }
2000
2000
 
2001
+ /* WHY: Fixed-size icon well — matches ui-layout-sidebar-item [slot="icon"].
2002
+ All sidebar icons align on the same 1.5rem column regardless of icon size.
2003
+ JS wraps the first <ui-icon> child in a .icon-well span during setup(). */
2004
+ :where(ui-nav-group-header) > :where(.icon-well) {
2005
+ display: inline-flex;
2006
+ align-items: center;
2007
+ justify-content: center;
2008
+ width: 1.5rem;
2009
+ height: 1.5rem;
2010
+ flex-shrink: 0;
2011
+ }
2012
+
2001
2013
  /* ── Chevron icon (right side of summary) ── */
2002
2014
 
2003
2015
  :where(ui-nav-group) > :where(details) > :where(summary)::after {
@@ -2051,13 +2063,14 @@
2051
2063
 
2052
2064
  /* WHY: Insets account for the summary's padding-inline so the connector
2053
2065
  line passes through the icon center and child text aligns with header text. */
2054
- :where(ui-nav-group):has(:where(ui-nav-group-header) :where(ui-icon)) {
2066
+ :where(ui-nav-group):has(:where(ui-nav-group-header) :where(.icon-well)) {
2055
2067
  --_group-pad: calc(var(--_space-k) * var(--_space));
2056
- --_group-line-inset: calc(var(--_group-pad) + var(--_icon-size) / 2);
2057
- --_group-child-inset: calc(var(--_icon-size) + var(--_space) * 2);
2068
+ --_group-icon-well: 1.5rem;
2069
+ --_group-line-inset: calc(var(--_group-pad) + var(--_group-icon-well) / 2);
2070
+ --_group-child-inset: calc(var(--_group-icon-well) + var(--_space) * 2);
2058
2071
  }
2059
2072
 
2060
- :where(ui-nav-group):has(:where(ui-nav-group-header) :where(ui-icon)):has(:where(details[open]))::after {
2073
+ :where(ui-nav-group):has(:where(ui-nav-group-header) :where(.icon-well)):has(:where(details[open]))::after {
2061
2074
  content: '';
2062
2075
  position: absolute;
2063
2076
  inset-inline-start: var(--_group-line-inset);
@@ -2072,7 +2085,7 @@
2072
2085
  /* WHY: A ::before pseudo on the group slides along the connector line.
2073
2086
  JS sets --_indicator-index; :state(has-selection) gates visibility. */
2074
2087
 
2075
- :where(ui-nav-group):has(:where(ui-nav-group-header) :where(ui-icon)):has(:where(details[open])):state(has-selection)::before {
2088
+ :where(ui-nav-group):has(:where(ui-nav-group-header) :where(.icon-well)):has(:where(details[open])):state(has-selection)::before {
2076
2089
  content: '';
2077
2090
  position: absolute;
2078
2091
  z-index: 1;
@@ -2156,7 +2169,7 @@
2156
2169
  gap: 0;
2157
2170
  }
2158
2171
 
2159
- :where(ui-nav-group-header) :where(ui-icon) {
2172
+ :where(ui-nav-group-header) :where(.icon-well) :where(ui-icon) {
2160
2173
  font-size: var(--_font-size, 1rem);
2161
2174
  }
2162
2175
 
@@ -4807,6 +4820,20 @@
4807
4820
  outline-offset: -2px;
4808
4821
  }
4809
4822
 
4823
+ /* WHY: Fixed-size icon well so all sidebar icons (header logo, nav group icons,
4824
+ standalone icons) center-align on the same column width regardless of intrinsic
4825
+ icon size. 1.5rem matches the sidebar's visual rhythm at default density.
4826
+ Consumer wraps the icon: <span slot="icon"><ui-icon name="..."></ui-icon></span>
4827
+ The wrapper is the well; the icon keeps its own --ui-icon-size dimensions. */
4828
+ :where(ui-layout-sidebar-item) > :where([slot="icon"]) {
4829
+ display: inline-flex;
4830
+ align-items: center;
4831
+ justify-content: center;
4832
+ width: 1.5rem;
4833
+ height: 1.5rem;
4834
+ flex-shrink: 0;
4835
+ }
4836
+
4810
4837
  /* WHY: Trailing caret pushes to end — same pattern as button justify="spread". */
4811
4838
  :where(ui-layout-sidebar-item) > :where([slot="trailing"]) {
4812
4839
  margin-inline-start: auto;
@@ -4884,7 +4911,7 @@
4884
4911
  }
4885
4912
 
4886
4913
  :where(ui-layout-sidebar-item) > :where([slot="icon"]) {
4887
- display: block;
4914
+ display: inline-flex;
4888
4915
  }
4889
4916
 
4890
4917
  :where(ui-layout-sidebar-item) > :where(:not([slot="icon"]):not(ui-listbox[popover]):not(.nav-group-flyout)) {
@@ -1709,7 +1709,7 @@
1709
1709
  line-height: 1;
1710
1710
  min-height: var(--ui-kbd-size-md);
1711
1711
  padding-inline: 0.4em;
1712
- border-radius: 0.25rem;
1712
+ border-radius: 0.5em;
1713
1713
  background: var(--_ground, var(--_body));
1714
1714
  border: 1px solid var(--_border-muted);
1715
1715
  color: var(--_ink-muted);
@@ -2026,6 +2026,18 @@
2026
2026
  user-select: none;
2027
2027
  }
2028
2028
 
2029
+ /* WHY: Fixed-size icon well — matches ui-layout-sidebar-item [slot="icon"].
2030
+ All sidebar icons align on the same 1.5rem column regardless of icon size.
2031
+ JS wraps the first <ui-icon> child in a .icon-well span during setup(). */
2032
+ :where(ui-nav-group-header) > :where(.icon-well) {
2033
+ display: inline-flex;
2034
+ align-items: center;
2035
+ justify-content: center;
2036
+ width: 1.5rem;
2037
+ height: 1.5rem;
2038
+ flex-shrink: 0;
2039
+ }
2040
+
2029
2041
  /* ── Chevron icon (right side of summary) ── */
2030
2042
 
2031
2043
  :where(ui-nav-group) > :where(details) > :where(summary)::after {
@@ -2081,13 +2093,14 @@
2081
2093
 
2082
2094
  /* WHY: Insets account for the summary's padding-inline so the connector
2083
2095
  line passes through the icon center and child text aligns with header text. */
2084
- :where(ui-nav-group):has(:where(ui-nav-group-header) :where(ui-icon)) {
2096
+ :where(ui-nav-group):has(:where(ui-nav-group-header) :where(.icon-well)) {
2085
2097
  --_group-pad: calc(var(--_space-k) * var(--_space));
2086
- --_group-line-inset: calc(var(--_group-pad) + var(--_icon-size) / 2);
2087
- --_group-child-inset: calc(var(--_icon-size) + var(--_space) * 2);
2098
+ --_group-icon-well: 1.5rem;
2099
+ --_group-line-inset: calc(var(--_group-pad) + var(--_group-icon-well) / 2);
2100
+ --_group-child-inset: calc(var(--_group-icon-well) + var(--_space) * 2);
2088
2101
  }
2089
2102
 
2090
- :where(ui-nav-group):has(:where(ui-nav-group-header) :where(ui-icon)):has(:where(details[open]))::after {
2103
+ :where(ui-nav-group):has(:where(ui-nav-group-header) :where(.icon-well)):has(:where(details[open]))::after {
2091
2104
  content: '';
2092
2105
  position: absolute;
2093
2106
  inset-inline-start: var(--_group-line-inset);
@@ -2102,7 +2115,7 @@
2102
2115
  /* WHY: A ::before pseudo on the group slides along the connector line.
2103
2116
  JS sets --_indicator-index; :state(has-selection) gates visibility. */
2104
2117
 
2105
- :where(ui-nav-group):has(:where(ui-nav-group-header) :where(ui-icon)):has(:where(details[open])):state(has-selection)::before {
2118
+ :where(ui-nav-group):has(:where(ui-nav-group-header) :where(.icon-well)):has(:where(details[open])):state(has-selection)::before {
2106
2119
  content: '';
2107
2120
  position: absolute;
2108
2121
  z-index: 1;
@@ -2186,7 +2199,7 @@
2186
2199
  gap: 0;
2187
2200
  }
2188
2201
 
2189
- :where(ui-nav-group-header) :where(ui-icon) {
2202
+ :where(ui-nav-group-header) :where(.icon-well) :where(ui-icon) {
2190
2203
  font-size: var(--_font-size, 1rem);
2191
2204
  }
2192
2205
 
@@ -4878,6 +4891,20 @@
4878
4891
  outline-offset: -2px;
4879
4892
  }
4880
4893
 
4894
+ /* WHY: Fixed-size icon well so all sidebar icons (header logo, nav group icons,
4895
+ standalone icons) center-align on the same column width regardless of intrinsic
4896
+ icon size. 1.5rem matches the sidebar's visual rhythm at default density.
4897
+ Consumer wraps the icon: <span slot="icon"><ui-icon name="..."></ui-icon></span>
4898
+ The wrapper is the well; the icon keeps its own --ui-icon-size dimensions. */
4899
+ :where(ui-layout-sidebar-item) > :where([slot="icon"]) {
4900
+ display: inline-flex;
4901
+ align-items: center;
4902
+ justify-content: center;
4903
+ width: 1.5rem;
4904
+ height: 1.5rem;
4905
+ flex-shrink: 0;
4906
+ }
4907
+
4881
4908
  /* WHY: Trailing caret pushes to end — same pattern as button justify="spread". */
4882
4909
  :where(ui-layout-sidebar-item) > :where([slot="trailing"]) {
4883
4910
  margin-inline-start: auto;
@@ -4955,7 +4982,7 @@
4955
4982
  }
4956
4983
 
4957
4984
  :where(ui-layout-sidebar-item) > :where([slot="icon"]) {
4958
- display: block;
4985
+ display: inline-flex;
4959
4986
  }
4960
4987
 
4961
4988
  :where(ui-layout-sidebar-item) > :where(:not([slot="icon"]):not(ui-listbox[popover]):not(.nav-group-flyout)) {