@filipgutica/ui 1.11.2 → 1.13.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/README.md CHANGED
@@ -32,8 +32,16 @@ Import the styles from your application stylesheet:
32
32
  @import "@filipgutica/ui/components.css";
33
33
  ```
34
34
 
35
- The third import adds Graphite Indigo, the palette of the project sites. Leave
36
- it out to keep the base theme from `theme.css`, with blue actions.
35
+ The third import adds Graphite Indigo's site typography and layout roles. Both
36
+ the base theme and Graphite Indigo use neutral surfaces, ink primary buttons,
37
+ and the ui project hue for checked and selected states.
38
+
39
+ `theme.css` loads the package's own IBM Plex Sans and IBM Plex Mono latin woff2
40
+ files (400, 500, 600), with `font-display: swap` and system fallbacks. It makes
41
+ no remote font requests. The files come from Fontsource 5.3.0 and ship under
42
+ their included [Sans OFL](src/fonts/OFL-IBM-Plex-Sans.txt) and
43
+ [Mono OFL](src/fonts/OFL-IBM-Plex-Mono.txt) licences. `fonts.css` and `fonts/*`
44
+ are also exported for applications that import assets separately.
37
45
 
38
46
  ## Use
39
47
 
@@ -176,15 +184,44 @@ import read from './captures/read.html?raw'
176
184
 
177
185
  `UiSiteNav` renders a labelled list of route rows in optional `groups`. Links to
178
186
  `#id` sections track the reader's position with `useActiveSection` and get
179
- `aria-current="location"`, a text-only marker. An item with `current: true` gets
187
+ `aria-current="location"`, an accent bar without a fill. An item with
188
+ `current: true` gets
180
189
  `aria-current="page"`, the selected fill and accent bar; `code: true` shows the
181
190
  label in the monospace font. The page grid places the rail, which stays in view
182
191
  on desktop. At 800px and below it is a native disclosure until the page is
183
192
  interactive, then a drawer. The disclosure, the drawer button, and the drawer
184
- title all show `label`. The drawer closes on navigation and focuses the
185
- destination section, and focus follows the visible control across the
193
+ title all show `label`. When an item has `current: true`, the phone control
194
+ also shows that page's name. Otherwise it shows the current section's name.
195
+ The control's accessible name is its visible text, so it changes with the
196
+ current page or section. The drawer closes on
197
+ navigation and focuses the destination section, and focus follows the visible control across the
186
198
  breakpoint.
187
199
 
200
+ Project sites set `--color-project` on `:root` and `:root.dark` for their hue.
201
+ Set `--color-project-dark` to the dark variant in both appearances, so prompts
202
+ and capture tab underlines stay readable on terminal plates. The default hue
203
+ belongs to ui. Primary buttons stay ink on paper in both appearances.
204
+
205
+ Compact shell or plain-text `UiCodeBlock` rows and untitled shell blocks are
206
+ terminal commands. Their CSS prompt stays out of copied and accessible text.
207
+ Typed source samples, including compact samples, use theme-matched syntax wells.
208
+ Default blocks with a title are source samples, including shell scripts.
209
+
210
+ Use `.fg-site-hero` on a tool-home intro section. Its direct `h1` uses the
211
+ 56px display size (34px on phones). Wrap the lede paragraphs in
212
+ `.fg-site-hero__lede`. Wrap the install block, metadata, and facts in
213
+ `.fg-site-hero__aside`; use `.fg-site-meta` for the install label above the code.
214
+
215
+ At 1024px and above, the hero uses `minmax(0, 1.1fr) minmax(0, 1fr)` columns,
216
+ `var(--space-8)` between columns, and top alignment. The `h1` spans both columns
217
+ in row 1. The lede and aside occupy columns 1 and 2 in row 2. All other children,
218
+ including captures and legends, span both columns afterward in source order.
219
+ Below 1024px all children stack in source order. Explicit grid lines and
220
+ `grid-auto-columns: minmax(0, 1fr)` preserve the split if an unlayered site rule
221
+ overrides the column template. Remove that override to retain the 1.1:1 ratio.
222
+ This is the wide exception to the phone/tablet breakpoints; the separate
223
+ design-language update records it in `DESIGN.md`.
224
+
188
225
  `UiCapture` shows one panel: tabs in the header, the capture scaled to the panel
189
226
  width, and the `command` and `caption` slot below. `html` is trusted, checked-in
190
227
  terminal markup with a single root element. The Full size button at the end of
@@ -208,7 +245,8 @@ the clipboard is unavailable. At 640px and below each command stacks above its
208
245
  description and wraps.
209
246
 
210
247
  `site.css` also includes page helpers: `.fg-site-steps` for an ordered list with
211
- numbered circles, `.fg-site-facts` for an inline `dl` of short label and value
248
+ numbered markers (each `li` holds an `h3` title and short paragraphs; mark the last
249
+ step's outcome with `.fg-site-steps__result`), `.fg-site-facts` for an inline `dl` of short label and value
212
250
  pairs whose links get a `--control-lg` hit area at 640px and below,
213
251
  `.fg-site-definitions` for a two-column `dl` of `dt` and `dd` that stacks on
214
252
  phones and keeps `code` such as `--all` on one line, `.fg-site-sr-only` for
@@ -0,0 +1,25 @@
1
+ import type { UiControlSize } from '../control.js';
2
+ export interface UiSwitchProps {
3
+ description?: string;
4
+ disabled?: boolean;
5
+ id?: string;
6
+ label?: string;
7
+ modelValue?: boolean;
8
+ size?: UiControlSize;
9
+ }
10
+ type __VLS_Slots = {
11
+ default?(): unknown;
12
+ };
13
+ declare const __VLS_base: import("vue").DefineComponent<UiSwitchProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
14
+ "update:modelValue": (value: boolean) => any;
15
+ }, string, import("vue").PublicProps, Readonly<UiSwitchProps> & Readonly<{
16
+ "onUpdate:modelValue"?: (value: boolean) => any;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
21
+ type __VLS_WithSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
package/dist/index.d.ts CHANGED
@@ -34,6 +34,8 @@ export { default as UiSlider } from './components/UiSlider.vue';
34
34
  export type { UiSliderProps } from './components/UiSlider.vue';
35
35
  export { default as UiTabs } from './components/UiTabs.vue';
36
36
  export type { UiTabItem, UiTabsProps } from './components/UiTabs.vue';
37
+ export { default as UiSwitch } from './components/UiSwitch.vue';
38
+ export type { UiSwitchProps } from './components/UiSwitch.vue';
37
39
  export { default as UiToggleButton } from './components/UiToggleButton.vue';
38
40
  export type { UiToggleButtonProps } from './components/UiToggleButton.vue';
39
41
  /** @deprecated Use UiCard for structured content. */