@pantoken/components 0.1.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 +114 -0
- package/assets/fonts/AtkinsonHyperlegibleNext/AtkinsonHyperlegibleNext-Bold.woff2 +0 -0
- package/assets/fonts/AtkinsonHyperlegibleNext/AtkinsonHyperlegibleNext-BoldItalic.woff2 +0 -0
- package/assets/fonts/AtkinsonHyperlegibleNext/AtkinsonHyperlegibleNext-ExtraBold.woff2 +0 -0
- package/assets/fonts/AtkinsonHyperlegibleNext/AtkinsonHyperlegibleNext-ExtraBoldItalic.woff2 +0 -0
- package/assets/fonts/AtkinsonHyperlegibleNext/AtkinsonHyperlegibleNext-ExtraLight.woff2 +0 -0
- package/assets/fonts/AtkinsonHyperlegibleNext/AtkinsonHyperlegibleNext-ExtraLightItalic.woff2 +0 -0
- package/assets/fonts/AtkinsonHyperlegibleNext/AtkinsonHyperlegibleNext-Light.woff2 +0 -0
- package/assets/fonts/AtkinsonHyperlegibleNext/AtkinsonHyperlegibleNext-LightItalic.woff2 +0 -0
- package/assets/fonts/AtkinsonHyperlegibleNext/AtkinsonHyperlegibleNext-Medium.woff2 +0 -0
- package/assets/fonts/AtkinsonHyperlegibleNext/AtkinsonHyperlegibleNext-MediumItalic.woff2 +0 -0
- package/assets/fonts/AtkinsonHyperlegibleNext/AtkinsonHyperlegibleNext-Regular.woff2 +0 -0
- package/assets/fonts/AtkinsonHyperlegibleNext/AtkinsonHyperlegibleNext-RegularItalic.woff2 +0 -0
- package/assets/fonts/AtkinsonHyperlegibleNext/AtkinsonHyperlegibleNext-SemiBold.woff2 +0 -0
- package/assets/fonts/AtkinsonHyperlegibleNext/AtkinsonHyperlegibleNext-SemiBoldItalic.woff2 +0 -0
- package/dist/alert.css +1 -0
- package/dist/avatar.css +1 -0
- package/dist/badge.css +1 -0
- package/dist/base.css +1 -0
- package/dist/billboard.css +1 -0
- package/dist/breadcrumb.css +1 -0
- package/dist/button.css +1 -0
- package/dist/byline.css +1 -0
- package/dist/calendar.css +1 -0
- package/dist/checkbox.css +1 -0
- package/dist/close-button.css +1 -0
- package/dist/components.css +1 -0
- package/dist/context-view.css +1 -0
- package/dist/file-drop.css +1 -0
- package/dist/fonts.css +1 -0
- package/dist/form-field-group.css +1 -0
- package/dist/form-field-messages.css +1 -0
- package/dist/form-field.css +1 -0
- package/dist/heading.css +1 -0
- package/dist/icons.css +1 -0
- package/dist/img.css +1 -0
- package/dist/in-place-edit.css +1 -0
- package/dist/index.d.mts +363 -0
- package/dist/index.mjs +2098 -0
- package/dist/input-group.css +1 -0
- package/dist/link.css +1 -0
- package/dist/list.css +1 -0
- package/dist/menu.css +1 -0
- package/dist/metric.css +1 -0
- package/dist/modal.css +1 -0
- package/dist/number-input.css +1 -0
- package/dist/pagination.css +1 -0
- package/dist/pill.css +1 -0
- package/dist/popover.css +1 -0
- package/dist/progress-circle.css +1 -0
- package/dist/progress.css +1 -0
- package/dist/prose.css +1 -0
- package/dist/radio-input-group.css +1 -0
- package/dist/radio.css +1 -0
- package/dist/range-input.css +1 -0
- package/dist/rating.css +1 -0
- package/dist/select.css +1 -0
- package/dist/side-nav-bar.css +1 -0
- package/dist/simple-select.css +1 -0
- package/dist/spinner.css +1 -0
- package/dist/table.css +1 -0
- package/dist/tabs.css +1 -0
- package/dist/tag.css +1 -0
- package/dist/text-area.css +1 -0
- package/dist/text-input.css +1 -0
- package/dist/text.css +1 -0
- package/dist/toggle-details.css +1 -0
- package/dist/toggle-group.css +1 -0
- package/dist/tooltip.css +1 -0
- package/dist/tray.css +1 -0
- package/dist/tree-browser.css +1 -0
- package/dist/truncate.css +1 -0
- package/dist/utilities.css +1 -0
- package/package.json +51 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
//#region src/lib/helpers.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Shared primitives for the component builders: the class-prefix namespace helper, the standalone-sheet
|
|
4
|
+
* `wrap` header, the masked-glyph constants, and the spacing scales. These carry no per-record content —
|
|
5
|
+
* every `src/{components,utilities,rules,declarations}` module imports what it needs from here.
|
|
6
|
+
*
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
/** The default class prefix (`instui` → `.instui-button`). */
|
|
10
|
+
declare const DEFAULT_PREFIX = "instui";
|
|
11
|
+
/** Options common to every builder. */
|
|
12
|
+
interface ComponentOptions {
|
|
13
|
+
/**
|
|
14
|
+
* The class prefix. A truthy string namespaces every class (`"instui"` → `.instui-button`); any
|
|
15
|
+
* falsy value (`null`, `undefined`, `""`, or omitting the option) drops the prefix entirely
|
|
16
|
+
* (`.button`), so you can author `class="heading -h1"`. The stylesheets shipped by this package are
|
|
17
|
+
* built with `"instui"`.
|
|
18
|
+
*/
|
|
19
|
+
prefix?: string | null;
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/rules/prose.d.ts
|
|
23
|
+
/** Options for {@link proseCss}. */
|
|
24
|
+
interface ProseOptions {
|
|
25
|
+
/** The content-root selector the rules attach to (default `".pantoken-prose"`). */
|
|
26
|
+
scope?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Build the InstUI-look prose stylesheet, scoped to `options.scope` (default `.pantoken-prose`).
|
|
30
|
+
*
|
|
31
|
+
* @param options - {@link ProseOptions}.
|
|
32
|
+
* @returns The CSS string.
|
|
33
|
+
*
|
|
34
|
+
* @demo self:prose
|
|
35
|
+
*/
|
|
36
|
+
declare function proseCss(options?: ProseOptions): string;
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/declarations/elevation.d.ts
|
|
39
|
+
/**
|
|
40
|
+
* The `--instui-elevation-*` shadow scale. Helpers only — NOT a documented record and not in any
|
|
41
|
+
* registry: `componentsCss()` leads its sheet with `elevationCss()` so the shadows components
|
|
42
|
+
* reference (modal, alert, menu) resolve from `components.css` alone.
|
|
43
|
+
*
|
|
44
|
+
* @module
|
|
45
|
+
*/
|
|
46
|
+
/**
|
|
47
|
+
* Every elevation level and alias emitted as `--instui-elevation-<name>` (`resting`, `above`,
|
|
48
|
+
* `topmost`, `depth1`–`depth3`, `card`, `cardHover`). Derived from the geometry + alias maps.
|
|
49
|
+
*/
|
|
50
|
+
declare const ELEVATION_NAMES: readonly string[];
|
|
51
|
+
/**
|
|
52
|
+
* The `--instui-elevation-*` name/value pairs (each a multi-layer `box-shadow`). Values reference the
|
|
53
|
+
* themed drop-shadow colour tokens, so they adapt per theme wherever a token sheet is loaded.
|
|
54
|
+
*
|
|
55
|
+
* @returns One `[customProperty, value]` pair per level and alias.
|
|
56
|
+
*/
|
|
57
|
+
declare function elevationDeclarations(): [name: string, value: string][];
|
|
58
|
+
/**
|
|
59
|
+
* Build the elevation token block: `<selector> { --instui-elevation-*: … }`. Shipped inside
|
|
60
|
+
* `components.css` (so shadows are intrinsic — no plugin, no extra import), and reusable by other
|
|
61
|
+
* layered outputs (e.g. the Pendo renderer) via the `selector` option.
|
|
62
|
+
*
|
|
63
|
+
* @param options - `selector` — the rule selector (default `:root`).
|
|
64
|
+
* @returns The CSS string.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* import { elevationCss } from "@pantoken/components";
|
|
69
|
+
*
|
|
70
|
+
* elevationCss(); // ":root { --instui-elevation-resting: …; --instui-elevation-above: …; … }"
|
|
71
|
+
* ```
|
|
72
|
+
*
|
|
73
|
+
* @demo self:elevation
|
|
74
|
+
*/
|
|
75
|
+
declare function elevationCss(options?: {
|
|
76
|
+
selector?: string;
|
|
77
|
+
}): string;
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/declarations/focus.d.ts
|
|
80
|
+
/** The elements the ring applies to by default (the common interactive/focusable elements). */
|
|
81
|
+
declare const FOCUSABLE_SELECTOR = "a, button, input, select, textarea, summary, [tabindex]";
|
|
82
|
+
/**
|
|
83
|
+
* The `--instui-focus-outline-*` name/value pairs the ring rules read. Colour/width/offset reference
|
|
84
|
+
* the themed shared focus tokens; the transition, line style, and inset are constants.
|
|
85
|
+
*
|
|
86
|
+
* @returns One `[customProperty, value]` pair per focus-ring variable.
|
|
87
|
+
*/
|
|
88
|
+
declare function focusOutlineDeclarations(): [name: string, value: string][];
|
|
89
|
+
/**
|
|
90
|
+
* The focus-ring rules for a given focusable selector: a transparent resting ring that transitions in
|
|
91
|
+
* on `:focus-visible`, plus the `-focus-color-*` / `-focus-position-inset` / `-focus-within` /
|
|
92
|
+
* `-without-focus-animation` modifiers. All `:where()`-wrapped, so zero-specificity.
|
|
93
|
+
*
|
|
94
|
+
* @param selector - The focusable selector the base ring applies to (default {@link FOCUSABLE_SELECTOR}).
|
|
95
|
+
* @returns The CSS rules string.
|
|
96
|
+
*/
|
|
97
|
+
declare function focusOutlineRules(selector?: string): string;
|
|
98
|
+
/**
|
|
99
|
+
* Build the focus-outline block: the `--instui-focus-outline-*` token defs plus the ring rules.
|
|
100
|
+
* Baked into `base.css` (so focusables get the ring out of the box), and reusable by other layered
|
|
101
|
+
* outputs (e.g. the Pendo renderer) via the `selector`/`tokenSelector` options.
|
|
102
|
+
*
|
|
103
|
+
* @param options - `selector` — the focusable selector; `tokenSelector` — where the token defs land
|
|
104
|
+
* (default `:where(:root)`).
|
|
105
|
+
* @returns The CSS string.
|
|
106
|
+
*
|
|
107
|
+
* @demo self:focus-outline
|
|
108
|
+
*/
|
|
109
|
+
declare function focusOutlineCss(options?: {
|
|
110
|
+
selector?: string;
|
|
111
|
+
tokenSelector?: string;
|
|
112
|
+
}): string;
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region src/components/button.d.ts
|
|
115
|
+
declare const buttonCss: (this: void, options?: ComponentOptions) => string;
|
|
116
|
+
//#endregion
|
|
117
|
+
//#region src/components/alert.d.ts
|
|
118
|
+
declare const alertCss: (this: void, options?: ComponentOptions) => string;
|
|
119
|
+
//#endregion
|
|
120
|
+
//#region src/components/badge.d.ts
|
|
121
|
+
declare const badgeCss: (this: void, options?: ComponentOptions) => string;
|
|
122
|
+
//#endregion
|
|
123
|
+
//#region src/components/pill.d.ts
|
|
124
|
+
declare const pillCss: (this: void, options?: ComponentOptions) => string;
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region src/components/tag.d.ts
|
|
127
|
+
declare const tagCss: (this: void, options?: ComponentOptions) => string;
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region src/components/avatar.d.ts
|
|
130
|
+
declare const avatarCss: (this: void, options?: ComponentOptions) => string;
|
|
131
|
+
//#endregion
|
|
132
|
+
//#region src/components/tabs.d.ts
|
|
133
|
+
declare const tabsCss: (this: void, options?: ComponentOptions) => string;
|
|
134
|
+
//#endregion
|
|
135
|
+
//#region src/components/metric.d.ts
|
|
136
|
+
declare const metricCss: (this: void, options?: ComponentOptions) => string;
|
|
137
|
+
//#endregion
|
|
138
|
+
//#region src/components/img.d.ts
|
|
139
|
+
declare const imgCss: (this: void, options?: ComponentOptions) => string;
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region src/components/byline.d.ts
|
|
142
|
+
declare const bylineCss: (this: void, options?: ComponentOptions) => string;
|
|
143
|
+
//#endregion
|
|
144
|
+
//#region src/components/table.d.ts
|
|
145
|
+
declare const tableCss: (this: void, options?: ComponentOptions) => string;
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region src/components/link.d.ts
|
|
148
|
+
declare const linkCss: (this: void, options?: ComponentOptions) => string;
|
|
149
|
+
//#endregion
|
|
150
|
+
//#region src/components/list.d.ts
|
|
151
|
+
declare const listCss: (this: void, options?: ComponentOptions) => string;
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region src/components/checkbox.d.ts
|
|
154
|
+
declare const checkboxCss: (this: void, options?: ComponentOptions) => string;
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region src/components/radio.d.ts
|
|
157
|
+
declare const radioCss: (this: void, options?: ComponentOptions) => string;
|
|
158
|
+
//#endregion
|
|
159
|
+
//#region src/components/spinner.d.ts
|
|
160
|
+
declare const spinnerCss: (this: void, options?: ComponentOptions) => string;
|
|
161
|
+
//#endregion
|
|
162
|
+
//#region src/components/progress.d.ts
|
|
163
|
+
declare const progressCss: (this: void, options?: ComponentOptions) => string;
|
|
164
|
+
//#endregion
|
|
165
|
+
//#region src/components/menu.d.ts
|
|
166
|
+
declare const menuCss: (this: void, options?: ComponentOptions) => string;
|
|
167
|
+
//#endregion
|
|
168
|
+
//#region src/components/modal.d.ts
|
|
169
|
+
declare const modalCss: (this: void, options?: ComponentOptions) => string;
|
|
170
|
+
//#endregion
|
|
171
|
+
//#region src/components/breadcrumb.d.ts
|
|
172
|
+
declare const breadcrumbCss: (this: void, options?: ComponentOptions) => string;
|
|
173
|
+
//#endregion
|
|
174
|
+
//#region src/components/billboard.d.ts
|
|
175
|
+
declare const billboardCss: (this: void, options?: ComponentOptions) => string;
|
|
176
|
+
//#endregion
|
|
177
|
+
//#region src/components/rating.d.ts
|
|
178
|
+
declare const ratingCss: (this: void, options?: ComponentOptions) => string;
|
|
179
|
+
//#endregion
|
|
180
|
+
//#region src/components/toggle-group.d.ts
|
|
181
|
+
declare const toggleGroupCss: (this: void, options?: ComponentOptions) => string;
|
|
182
|
+
//#endregion
|
|
183
|
+
//#region src/components/context-view.d.ts
|
|
184
|
+
declare const contextViewCss: (this: void, options?: ComponentOptions) => string;
|
|
185
|
+
//#endregion
|
|
186
|
+
//#region src/components/progress-circle.d.ts
|
|
187
|
+
declare const progressCircleCss: (this: void, options?: ComponentOptions) => string;
|
|
188
|
+
//#endregion
|
|
189
|
+
//#region src/components/pagination.d.ts
|
|
190
|
+
declare const paginationCss: (this: void, options?: ComponentOptions) => string;
|
|
191
|
+
//#endregion
|
|
192
|
+
//#region src/components/truncate.d.ts
|
|
193
|
+
declare const truncateCss: (this: void, options?: ComponentOptions) => string;
|
|
194
|
+
//#endregion
|
|
195
|
+
//#region src/components/toggle-details.d.ts
|
|
196
|
+
declare const toggleDetailsCss: (this: void, options?: ComponentOptions) => string;
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region src/components/file-drop.d.ts
|
|
199
|
+
declare const fileDropCss: (this: void, options?: ComponentOptions) => string;
|
|
200
|
+
//#endregion
|
|
201
|
+
//#region src/components/side-nav-bar.d.ts
|
|
202
|
+
declare const sideNavBarCss: (this: void, options?: ComponentOptions) => string;
|
|
203
|
+
//#endregion
|
|
204
|
+
//#region src/components/tree-browser.d.ts
|
|
205
|
+
declare const treeBrowserCss: (this: void, options?: ComponentOptions) => string;
|
|
206
|
+
//#endregion
|
|
207
|
+
//#region src/components/calendar.d.ts
|
|
208
|
+
declare const calendarCss: (this: void, options?: ComponentOptions) => string;
|
|
209
|
+
//#endregion
|
|
210
|
+
//#region src/components/popover.d.ts
|
|
211
|
+
declare const popoverCss: (this: void, options?: ComponentOptions) => string;
|
|
212
|
+
//#endregion
|
|
213
|
+
//#region src/components/tray.d.ts
|
|
214
|
+
declare const trayCss: (this: void, options?: ComponentOptions) => string;
|
|
215
|
+
//#endregion
|
|
216
|
+
//#region src/components/tooltip.d.ts
|
|
217
|
+
declare const tooltipCss: (this: void, options?: ComponentOptions) => string;
|
|
218
|
+
//#endregion
|
|
219
|
+
//#region src/components/range-input.d.ts
|
|
220
|
+
declare const rangeInputCss: (this: void, options?: ComponentOptions) => string;
|
|
221
|
+
//#endregion
|
|
222
|
+
//#region src/components/heading.d.ts
|
|
223
|
+
declare const headingCss: (this: void, options?: ComponentOptions) => string;
|
|
224
|
+
//#endregion
|
|
225
|
+
//#region src/components/text.d.ts
|
|
226
|
+
declare const textCss: (this: void, options?: ComponentOptions) => string;
|
|
227
|
+
//#endregion
|
|
228
|
+
//#region src/components/close-button.d.ts
|
|
229
|
+
declare const closeButtonCss: (this: void, options?: ComponentOptions) => string;
|
|
230
|
+
//#endregion
|
|
231
|
+
//#region src/components/text-input.d.ts
|
|
232
|
+
declare const textInputCss: (this: void, options?: ComponentOptions) => string;
|
|
233
|
+
//#endregion
|
|
234
|
+
//#region src/components/text-area.d.ts
|
|
235
|
+
declare const textAreaCss: (this: void, options?: ComponentOptions) => string;
|
|
236
|
+
//#endregion
|
|
237
|
+
//#region src/components/simple-select.d.ts
|
|
238
|
+
declare const simpleSelectCss: (this: void, options?: ComponentOptions) => string;
|
|
239
|
+
//#endregion
|
|
240
|
+
//#region src/components/input-group.d.ts
|
|
241
|
+
declare const inputGroupCss: (this: void, options?: ComponentOptions) => string;
|
|
242
|
+
//#endregion
|
|
243
|
+
//#region src/components/number-input.d.ts
|
|
244
|
+
declare const numberInputCss: (this: void, options?: ComponentOptions) => string;
|
|
245
|
+
//#endregion
|
|
246
|
+
//#region src/components/in-place-edit.d.ts
|
|
247
|
+
declare const inPlaceEditCss: (this: void, options?: ComponentOptions) => string;
|
|
248
|
+
//#endregion
|
|
249
|
+
//#region src/components/form-field-messages.d.ts
|
|
250
|
+
declare const formFieldMessagesCss: (this: void, options?: ComponentOptions) => string;
|
|
251
|
+
//#endregion
|
|
252
|
+
//#region src/components/form-field.d.ts
|
|
253
|
+
declare const formFieldCss: (this: void, options?: ComponentOptions) => string;
|
|
254
|
+
//#endregion
|
|
255
|
+
//#region src/components/form-field-group.d.ts
|
|
256
|
+
declare const formFieldGroupCss: (this: void, options?: ComponentOptions) => string;
|
|
257
|
+
//#endregion
|
|
258
|
+
//#region src/components/radio-input-group.d.ts
|
|
259
|
+
declare const radioInputGroupCss: (this: void, options?: ComponentOptions) => string;
|
|
260
|
+
//#endregion
|
|
261
|
+
//#region src/components/select.d.ts
|
|
262
|
+
/**
|
|
263
|
+
* The **experimental** customizable-select enhancement for `.<prefix>-simple-select`. Everything is
|
|
264
|
+
* gated behind `@supports (appearance: base-select)` (the CSS Customizable Select model — Chrome 135+,
|
|
265
|
+
* NOT yet Baseline), so it's pure progressive enhancement: browsers without support keep the plain
|
|
266
|
+
* `simpleSelectCss` control; supporting browsers get a styled `::picker(select)` panel and styled
|
|
267
|
+
* `option`s (hover/selected) from the `--instui-component-options-item-*` tokens. Shipped as its own
|
|
268
|
+
* opt-in `select.css` (like `fonts.css`) rather than folded into `components.css`, precisely because the
|
|
269
|
+
* feature is experimental — you opt in deliberately.
|
|
270
|
+
*
|
|
271
|
+
* @param options - {@link ComponentOptions}.
|
|
272
|
+
* @returns The CSS string.
|
|
273
|
+
*
|
|
274
|
+
* @example
|
|
275
|
+
* ```ts
|
|
276
|
+
* import { selectCss } from "@pantoken/components";
|
|
277
|
+
*
|
|
278
|
+
* // Load AFTER components.css; enhances the same <select class="instui-simple-select"> element.
|
|
279
|
+
* const css = selectCss();
|
|
280
|
+
* ```
|
|
281
|
+
*
|
|
282
|
+
* @demo self:simple-select
|
|
283
|
+
*/
|
|
284
|
+
declare function selectCss(options?: ComponentOptions): string;
|
|
285
|
+
//#endregion
|
|
286
|
+
//#region src/utilities/view.d.ts
|
|
287
|
+
declare const viewCss: (this: void, options?: ComponentOptions) => string;
|
|
288
|
+
//#endregion
|
|
289
|
+
//#region src/utilities/spacing.d.ts
|
|
290
|
+
declare const spacingUtilitiesCss: (this: void, options?: ComponentOptions) => string;
|
|
291
|
+
//#endregion
|
|
292
|
+
//#region src/utilities/layout.d.ts
|
|
293
|
+
declare const layoutUtilitiesCss: (this: void, options?: ComponentOptions) => string;
|
|
294
|
+
//#endregion
|
|
295
|
+
//#region src/utilities/responsive.d.ts
|
|
296
|
+
declare const responsiveUtilitiesCss: (this: void, options?: ComponentOptions) => string;
|
|
297
|
+
//#endregion
|
|
298
|
+
//#region src/utilities/icon.d.ts
|
|
299
|
+
declare const iconCss: (this: void, options?: ComponentOptions) => string;
|
|
300
|
+
//#endregion
|
|
301
|
+
//#region src/utilities/mask.d.ts
|
|
302
|
+
declare const maskCss: (this: void, options?: ComponentOptions) => string;
|
|
303
|
+
//#endregion
|
|
304
|
+
//#region src/utilities/screen-reader-content.d.ts
|
|
305
|
+
declare const screenReaderContentCss: (this: void, options?: ComponentOptions) => string;
|
|
306
|
+
//#endregion
|
|
307
|
+
//#region src/utilities/icon-glyphs.d.ts
|
|
308
|
+
/** Options for {@link iconGlyphsCss}. */
|
|
309
|
+
interface IconGlyphsOptions extends ComponentOptions {
|
|
310
|
+
/**
|
|
311
|
+
* Also emit the deprecated InstUI-prop glyph aliases (`-render-icon-<name>`, `-render-custom-icon-<name>`)
|
|
312
|
+
* as functional aliases of `-icon-<name>`. Off by default — turning it on roughly doubles the sheet, so
|
|
313
|
+
* enable it only when you need markup written against the old `renderIcon`/`renderCustomIcon` prop names
|
|
314
|
+
* to keep rendering. The shipped `icons.css` is built with this on.
|
|
315
|
+
*/
|
|
316
|
+
deprecatedAliases?: boolean;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Build the icon-glyph stylesheet: one `.<prefix>-icon-<name>` class per icon that points
|
|
320
|
+
* `--pantoken-glyph` at the matching `--instui-icon-<name>` token. Kept out of the component bundle
|
|
321
|
+
* (it's large); ships as its own `icons.css`. Pass the icon names (e.g. from `@pantoken/icons`).
|
|
322
|
+
*
|
|
323
|
+
* @param names - Icon names without the `--instui-icon-` prefix (e.g. `["megaphone", "check"]`).
|
|
324
|
+
* @param options - {@link IconGlyphsOptions} (adds `deprecatedAliases` to {@link ComponentOptions}).
|
|
325
|
+
* @returns The CSS string.
|
|
326
|
+
*
|
|
327
|
+
* @example
|
|
328
|
+
* ```ts
|
|
329
|
+
* import { iconGlyphsCss } from "@pantoken/components";
|
|
330
|
+
* import { icons } from "@pantoken/icons";
|
|
331
|
+
*
|
|
332
|
+
* const css = iconGlyphsCss(icons.map((i) => i.name)); // .-icon-megaphone { --pantoken-glyph: … }
|
|
333
|
+
* ```
|
|
334
|
+
*
|
|
335
|
+
* This is the glyph-token half of the icon system (the `.-icon-<name>` modifiers, shipped as
|
|
336
|
+
* `icons.css`); the `icon` utility is the painter half (the shared `::before`). They share the `icon`
|
|
337
|
+
* demo.
|
|
338
|
+
*/
|
|
339
|
+
declare function iconGlyphsCss(names: readonly string[], options?: IconGlyphsOptions): string;
|
|
340
|
+
//#endregion
|
|
341
|
+
//#region src/index.d.ts
|
|
342
|
+
/**
|
|
343
|
+
* Build the opt-in base/reset stylesheet: global document defaults from the tokens (box-sizing, body
|
|
344
|
+
* reset, page surface, base text colour/font, `color-scheme`, base link), followed by the focus ring
|
|
345
|
+
* (a document-level default that targets bare focusables). Load it once, ahead of the component and
|
|
346
|
+
* prose sheets, when pantoken owns the page.
|
|
347
|
+
*
|
|
348
|
+
* @returns The CSS string.
|
|
349
|
+
*/
|
|
350
|
+
declare function baseCss(): string;
|
|
351
|
+
/**
|
|
352
|
+
* Build the aggregated component stylesheet: the `--instui-elevation-*` scale (so shadows are intrinsic)
|
|
353
|
+
* followed by every component's rules in the `COMPONENTS` concat order. The size-alias and
|
|
354
|
+
* deprecated-alias twins are appended PER COMPONENT (within its own chunk) so each alias documents on
|
|
355
|
+
* its own page — the deprecated aliases are discovered from each record's `@deprecated {@link -x}`
|
|
356
|
+
* metadata (see `withAliases`), not a central hand-kept list.
|
|
357
|
+
*
|
|
358
|
+
* @param options - {@link ComponentOptions}.
|
|
359
|
+
* @returns The CSS string.
|
|
360
|
+
*/
|
|
361
|
+
declare function componentsCss(options?: ComponentOptions): string;
|
|
362
|
+
//#endregion
|
|
363
|
+
export { type ComponentOptions, DEFAULT_PREFIX, ELEVATION_NAMES, FOCUSABLE_SELECTOR, type IconGlyphsOptions, type ProseOptions, alertCss, avatarCss, badgeCss, baseCss, billboardCss, breadcrumbCss, buttonCss, bylineCss, calendarCss, checkboxCss, closeButtonCss, componentsCss, contextViewCss, elevationCss, elevationDeclarations, fileDropCss, focusOutlineCss, focusOutlineDeclarations, focusOutlineRules, formFieldCss, formFieldGroupCss, formFieldMessagesCss, headingCss, iconCss, iconGlyphsCss, imgCss, inPlaceEditCss, inputGroupCss, layoutUtilitiesCss, linkCss, listCss, maskCss, menuCss, metricCss, modalCss, numberInputCss, paginationCss, pillCss, popoverCss, progressCircleCss, progressCss, proseCss, radioCss, radioInputGroupCss, rangeInputCss, ratingCss, responsiveUtilitiesCss, screenReaderContentCss, selectCss, sideNavBarCss, simpleSelectCss, spacingUtilitiesCss, spinnerCss, tableCss, tabsCss, tagCss, textAreaCss, textCss, textInputCss, toggleDetailsCss, toggleGroupCss, tooltipCss, trayCss, treeBrowserCss, truncateCss, viewCss };
|