@pantoken/components 0.2.1 → 0.2.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/icons.css +1 -1
- package/dist/index.d.mts +56 -0
- package/dist/index.mjs +114 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -109,6 +109,7 @@ const iconMask = (name) => `var(--instui-icon-${name}) center / contain no-repea
|
|
|
109
109
|
const SELECT_CHEVRON = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236a7883' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E\")";
|
|
110
110
|
/** Lucide `chevron-up`/`chevron-down`, masked — the NumberInput spinner glyphs (painted in currentColor). */
|
|
111
111
|
const CHEVRON_UP_ICON = iconMask("chevron-up");
|
|
112
|
+
/** Lucide `chevron-down`, masked — the NumberInput down spinner glyph (painted in currentColor). */
|
|
112
113
|
const CHEVRON_DOWN_ICON = iconMask("chevron-down");
|
|
113
114
|
/**
|
|
114
115
|
* InstUI's `ai` glyph (Solid), inlined as a mask so it paints in the button's own colour — solid
|
|
@@ -172,8 +173,11 @@ function make(kind, input) {
|
|
|
172
173
|
}
|
|
173
174
|
};
|
|
174
175
|
}
|
|
176
|
+
/** Build a component record from its name and CSS builder. */
|
|
175
177
|
const defineComponent = (input) => make("component", input);
|
|
178
|
+
/** Build a utility record from its name and CSS builder. */
|
|
176
179
|
const defineUtility = (input) => make("utility", input);
|
|
180
|
+
/** Build a rule record from its name and CSS builder. */
|
|
177
181
|
const defineRule = (input) => make("rule", input);
|
|
178
182
|
//#endregion
|
|
179
183
|
//#region src/lib/sentinel.ts
|
|
@@ -441,65 +445,81 @@ const base$1 = {
|
|
|
441
445
|
}.rebrand;
|
|
442
446
|
//#endregion
|
|
443
447
|
//#region src/utilities/icon.ts
|
|
448
|
+
/** The icon utility — `.instui-icon` sizing plus the shared `-icon-<name>` painter that masks a glyph, with the prefix sentinel replaced. */
|
|
444
449
|
const icon = defineUtility({
|
|
445
450
|
name: "icon",
|
|
446
451
|
css: (p) => icon$1.replaceAll(SENTINEL, p)
|
|
447
452
|
});
|
|
453
|
+
/** The icon utility as a standalone, header-wrapped stylesheet. */
|
|
448
454
|
const iconCss = icon.css;
|
|
449
455
|
//#endregion
|
|
450
456
|
//#region src/utilities/mask.ts
|
|
457
|
+
/** The mask utility — an in-flow overlay that fills its positioned parent and centres its content, with the prefix sentinel replaced. */
|
|
451
458
|
const mask = defineUtility({
|
|
452
459
|
name: "mask",
|
|
453
460
|
css: (p) => mask$1.replaceAll(SENTINEL, p)
|
|
454
461
|
});
|
|
462
|
+
/** The mask utility as a standalone, header-wrapped stylesheet. */
|
|
455
463
|
const maskCss = mask.css;
|
|
456
464
|
//#endregion
|
|
457
465
|
//#region src/utilities/screen-reader-content.ts
|
|
466
|
+
/** The screen-reader-content utility — visually hides content while keeping it available to assistive tech, with the prefix sentinel replaced. */
|
|
458
467
|
const screenReaderContent = defineUtility({
|
|
459
468
|
name: "screen-reader-content",
|
|
460
469
|
css: (p) => screenReaderContent$1.replaceAll(SENTINEL, p)
|
|
461
470
|
});
|
|
471
|
+
/** The screen-reader-content utility as a standalone, header-wrapped stylesheet. */
|
|
462
472
|
const screenReaderContentCss = screenReaderContent.css;
|
|
463
473
|
//#endregion
|
|
464
474
|
//#region src/components/alert.ts
|
|
475
|
+
/** The `alert` component record: an inline message with a coloured status bar and a masked status glyph from the shared icon set. */
|
|
465
476
|
const alert = defineComponent({
|
|
466
477
|
name: "alert",
|
|
467
478
|
css: (p) => alert$1.replaceAll(SENTINEL, p)
|
|
468
479
|
});
|
|
480
|
+
/** Standalone `alert` stylesheet — the prefixed CSS for the status message, ready to ship as a `.css` file. */
|
|
469
481
|
const alertCss = alert.css;
|
|
470
482
|
//#endregion
|
|
471
483
|
//#region src/components/avatar.ts
|
|
484
|
+
/** The `avatar` component record: a user avatar showing initials or an image, circular by default. */
|
|
472
485
|
const avatar = defineComponent({
|
|
473
486
|
name: "avatar",
|
|
474
487
|
css: (p) => avatar$1.replaceAll(SENTINEL, p)
|
|
475
488
|
});
|
|
489
|
+
/** Standalone `avatar` stylesheet — the prefixed CSS for the avatar, ready to ship as a `.css` file. */
|
|
476
490
|
const avatarCss = avatar.css;
|
|
477
491
|
//#endregion
|
|
478
492
|
//#region src/components/badge.ts
|
|
493
|
+
/** The `badge` component record: a small count or status dot pinned to a target's corner. */
|
|
479
494
|
const badge = defineComponent({
|
|
480
495
|
name: "badge",
|
|
481
496
|
css: (p) => badge$1.replaceAll(SENTINEL, p)
|
|
482
497
|
});
|
|
498
|
+
/** Standalone `badge` stylesheet — the prefixed CSS for the count-and-status badge, ready to ship as a `.css` file. */
|
|
483
499
|
const badgeCss = badge.css;
|
|
484
500
|
//#endregion
|
|
485
501
|
//#region src/components/billboard.ts
|
|
502
|
+
/** The `billboard` component record: a large empty-state or call-to-action block with a hero graphic, a heading, and a message. */
|
|
486
503
|
const billboard = defineComponent({
|
|
487
504
|
name: "billboard",
|
|
488
505
|
css: (p, options) => (billboardByTheme[options?.theme ?? "rebrand"] ?? billboardByTheme.rebrand).replaceAll(SENTINEL, p)
|
|
489
506
|
});
|
|
507
|
+
/** Standalone `billboard` stylesheet — the prefixed CSS for the empty-state block, ready to ship as a `.css` file. */
|
|
490
508
|
const billboardCss = billboard.css;
|
|
491
509
|
//#endregion
|
|
492
510
|
//#region src/components/breadcrumb.ts
|
|
511
|
+
/** The `breadcrumb` component record: a navigation trail with `/` separators, ending on the current page. */
|
|
493
512
|
const breadcrumb = defineComponent({
|
|
494
513
|
name: "breadcrumb",
|
|
495
514
|
css: (p) => breadcrumb$1.replaceAll(SENTINEL, p)
|
|
496
515
|
});
|
|
516
|
+
/** Standalone `breadcrumb` stylesheet — the prefixed CSS for the breadcrumb trail, ready to ship as a `.css` file. */
|
|
497
517
|
const breadcrumbCss = breadcrumb.css;
|
|
498
518
|
//#endregion
|
|
499
519
|
//#region src/lib/css.ts
|
|
500
520
|
/**
|
|
501
521
|
* The `css` tagged-template — an identity tag that just returns the interpolated string. Authoring the
|
|
502
|
-
* record builders
|
|
522
|
+
* record builders with the `css` tag (rather than a bare template literal) follows the cssdoc convention:
|
|
503
523
|
* `@cssdoc/embedded`'s scanner recognizes a `css`-tagged template as an embedded stylesheet, so the
|
|
504
524
|
* editor / language server and any `.ts`-level lint read the CSS (selectors and all), not just the doc
|
|
505
525
|
* comment. It changes nothing at runtime — the emitted CSS is byte-for-byte what the plain template
|
|
@@ -511,6 +531,7 @@ const breadcrumbCss = breadcrumb.css;
|
|
|
511
531
|
const css = (strings, ...values) => strings.reduce((out, chunk, i) => out + (i ? String(values[i - 1]) : "") + chunk, "");
|
|
512
532
|
//#endregion
|
|
513
533
|
//#region src/components/button.ts
|
|
534
|
+
/** The `button` component record: an accessible action control styled from the token palette, primary by default. */
|
|
514
535
|
const button = defineComponent({
|
|
515
536
|
name: "button",
|
|
516
537
|
css: (p) => css`
|
|
@@ -789,69 +810,88 @@ const button = defineComponent({
|
|
|
789
810
|
/* InstUI's withBorder={false}: drop the border but keep the button's box (border-box sizing). */
|
|
790
811
|
.${p}button.-without-border { border-style: none; }`
|
|
791
812
|
});
|
|
813
|
+
/** Standalone `button` stylesheet — the prefixed CSS for the action button, ready to ship as a `.css` file. */
|
|
792
814
|
const buttonCss = button.css;
|
|
793
815
|
//#endregion
|
|
794
816
|
//#region src/components/byline.ts
|
|
817
|
+
/** The `byline` component record: a media object pairing a hero figure with a title and a description. */
|
|
795
818
|
const byline = defineComponent({
|
|
796
819
|
name: "byline",
|
|
797
820
|
css: (p) => byline$1.replaceAll(SENTINEL, p)
|
|
798
821
|
});
|
|
822
|
+
/** Standalone `byline` stylesheet — the prefixed CSS for the media object, ready to ship as a `.css` file. */
|
|
799
823
|
const bylineCss = byline.css;
|
|
800
824
|
//#endregion
|
|
801
825
|
//#region src/components/calendar.ts
|
|
826
|
+
/** The `calendar` component record: a static month grid with navigation, weekday headers, and day cells. */
|
|
802
827
|
const calendar = defineComponent({
|
|
803
828
|
name: "calendar",
|
|
804
829
|
css: (p) => calendar$1.replaceAll(SENTINEL, p)
|
|
805
830
|
});
|
|
831
|
+
/** Standalone `calendar` stylesheet — the prefixed CSS for the month grid, ready to ship as a `.css` file. */
|
|
806
832
|
const calendarCss = calendar.css;
|
|
807
833
|
//#endregion
|
|
808
834
|
//#region src/components/checkbox.ts
|
|
835
|
+
/** The `checkbox` component record: a native checkbox with its label, or a switch via `-variant-toggle`. */
|
|
809
836
|
const checkbox = defineComponent({
|
|
810
837
|
name: "checkbox",
|
|
811
838
|
css: (p) => checkbox$1.replaceAll(SENTINEL, p)
|
|
812
839
|
});
|
|
840
|
+
/** Standalone `checkbox` stylesheet — the prefixed CSS for the checkbox and switch, ready to ship as a `.css` file. */
|
|
813
841
|
const checkboxCss = checkbox.css;
|
|
814
842
|
//#endregion
|
|
815
843
|
//#region src/components/close-button.ts
|
|
844
|
+
/** The `closeButton` component record: a transparent icon button that draws its own × glyph, in three sizes plus an inverse variant. */
|
|
816
845
|
const closeButton = defineComponent({
|
|
817
846
|
name: "close-button",
|
|
818
847
|
css: (p) => closeButton$1.replaceAll(SENTINEL, p)
|
|
819
848
|
});
|
|
849
|
+
/** Standalone `closeButton` stylesheet — the prefixed CSS for the close button, ready to ship as a `.css` file. */
|
|
820
850
|
const closeButtonCss = closeButton.css;
|
|
821
851
|
//#endregion
|
|
822
852
|
//#region src/components/context-view.ts
|
|
853
|
+
/** The `contextView` component record: an elevated callout with a caret, positionable on any side and usable as a native `[popover]`. */
|
|
823
854
|
const contextView = defineComponent({
|
|
824
855
|
name: "context-view",
|
|
825
856
|
css: (p) => contextView$1.replaceAll(SENTINEL, p)
|
|
826
857
|
});
|
|
858
|
+
/** Standalone `contextView` stylesheet — the prefixed CSS for the caret callout, ready to ship as a `.css` file. */
|
|
827
859
|
const contextViewCss = contextView.css;
|
|
828
860
|
//#endregion
|
|
829
861
|
//#region src/components/file-drop.ts
|
|
862
|
+
/** The `fileDrop` component record: a file dropzone with hover, accepted, and rejected states. */
|
|
830
863
|
const fileDrop = defineComponent({
|
|
831
864
|
name: "file-drop",
|
|
832
865
|
css: (p) => fileDrop$1.replaceAll(SENTINEL, p)
|
|
833
866
|
});
|
|
867
|
+
/** Standalone `fileDrop` stylesheet — the prefixed CSS for the file dropzone, ready to ship as a `.css` file. */
|
|
834
868
|
const fileDropCss = fileDrop.css;
|
|
835
869
|
//#endregion
|
|
836
870
|
//#region src/components/form-field.ts
|
|
871
|
+
/** The `formField` component record: a wrapper pairing a label with its controls, in inline, required, or readonly layouts. */
|
|
837
872
|
const formField = defineComponent({
|
|
838
873
|
name: "form-field",
|
|
839
874
|
css: (p) => formField$1.replaceAll(SENTINEL, p)
|
|
840
875
|
});
|
|
876
|
+
/** Standalone `formField` stylesheet — the prefixed CSS for the form-field wrapper, ready to ship as a `.css` file. */
|
|
841
877
|
const formFieldCss = formField.css;
|
|
842
878
|
//#endregion
|
|
843
879
|
//#region src/components/form-field-group.ts
|
|
880
|
+
/** The `formFieldGroup` component record: a `<fieldset>` group with a legend, a column or inline layout, and configurable spacing. */
|
|
844
881
|
const formFieldGroup = defineComponent({
|
|
845
882
|
name: "form-field-group",
|
|
846
883
|
css: (p) => formFieldGroup$1.replaceAll(SENTINEL, p)
|
|
847
884
|
});
|
|
885
|
+
/** Standalone `formFieldGroup` stylesheet — the prefixed CSS for the fieldset group, ready to ship as a `.css` file. */
|
|
848
886
|
const formFieldGroupCss = formFieldGroup.css;
|
|
849
887
|
//#endregion
|
|
850
888
|
//#region src/components/form-field-messages.ts
|
|
889
|
+
/** The `formFieldMessages` component record: field help and validation messages — hint, error, success, and screen-reader-only — with a glyph on error and success. */
|
|
851
890
|
const formFieldMessages = defineComponent({
|
|
852
891
|
name: "form-field-messages",
|
|
853
892
|
css: (p) => formFieldMessages$1.replaceAll(SENTINEL, p)
|
|
854
893
|
});
|
|
894
|
+
/** Standalone `formFieldMessages` stylesheet — the prefixed CSS for the field messages, ready to ship as a `.css` file. */
|
|
855
895
|
const formFieldMessagesCss = formFieldMessages.css;
|
|
856
896
|
//#endregion
|
|
857
897
|
//#region src/lib/headings.ts
|
|
@@ -878,6 +918,7 @@ const HEADING_LEVELS = [
|
|
|
878
918
|
const headingLevelRules = (selector) => HEADING_LEVELS.map((l) => `${selector(l)} { font-size: var(--instui-component-heading-${l}-font-size); font-weight: var(--instui-component-heading-${l}-font-weight); }`).join("\n");
|
|
879
919
|
//#endregion
|
|
880
920
|
//#region src/components/heading.ts
|
|
921
|
+
/** The `heading` component record: heading typography from `-level-h1` through `-level-h6`. */
|
|
881
922
|
const heading = defineComponent({
|
|
882
923
|
name: "heading",
|
|
883
924
|
css: (p) => css`
|
|
@@ -940,20 +981,25 @@ ${headingLevelRules((l) => `.${p}heading.-level-${l}`)}
|
|
|
940
981
|
padding-top: var(--instui-component-heading-border-padding);
|
|
941
982
|
}`
|
|
942
983
|
});
|
|
984
|
+
/** Standalone `heading` stylesheet — the prefixed CSS for the heading type, ready to ship as a `.css` file. */
|
|
943
985
|
const headingCss = heading.css;
|
|
944
986
|
//#endregion
|
|
945
987
|
//#region src/components/img.ts
|
|
988
|
+
/** The `img` component record: a styled `<img>` with stackable display, crop, and effect modifiers. */
|
|
946
989
|
const img = defineComponent({
|
|
947
990
|
name: "img",
|
|
948
991
|
css: (p) => img$1.replaceAll(SENTINEL, p)
|
|
949
992
|
});
|
|
993
|
+
/** Standalone `img` stylesheet — the prefixed CSS for the styled image, ready to ship as a `.css` file. */
|
|
950
994
|
const imgCss = img.css;
|
|
951
995
|
//#endregion
|
|
952
996
|
//#region src/components/in-place-edit.ts
|
|
997
|
+
/** The `inPlaceEdit` component record: a `[contenteditable]` that reads as text until focused, then shows input chrome. */
|
|
953
998
|
const inPlaceEdit = defineComponent({
|
|
954
999
|
name: "in-place-edit",
|
|
955
1000
|
css: (p) => inPlaceEdit$1.replaceAll(SENTINEL, p)
|
|
956
1001
|
});
|
|
1002
|
+
/** Standalone `inPlaceEdit` stylesheet — the prefixed CSS for the in-place editor, ready to ship as a `.css` file. */
|
|
957
1003
|
const inPlaceEditCss = inPlaceEdit.css;
|
|
958
1004
|
//#endregion
|
|
959
1005
|
//#region src/lib/field-controls.ts
|
|
@@ -1082,6 +1128,7 @@ ${root}.-size-lg { block-size: ${t("height-lg")}; padding-inline: ${t("padding-h
|
|
|
1082
1128
|
}
|
|
1083
1129
|
//#endregion
|
|
1084
1130
|
//#region src/components/input-group.ts
|
|
1131
|
+
/** The `inputGroup` component record: a facade around a text input with leading and trailing icon slots. */
|
|
1085
1132
|
const inputGroup = defineComponent({
|
|
1086
1133
|
name: "input-group",
|
|
1087
1134
|
css: (p) => css`
|
|
@@ -1107,44 +1154,56 @@ const inputGroup = defineComponent({
|
|
|
1107
1154
|
${inputFacadeBase(p, "input-group")}
|
|
1108
1155
|
.${p}input-group.-should-not-wrap { flex-wrap: nowrap; }`
|
|
1109
1156
|
});
|
|
1157
|
+
/** Standalone `inputGroup` stylesheet — the prefixed CSS for the input group, ready to ship as a `.css` file. */
|
|
1110
1158
|
const inputGroupCss = inputGroup.css;
|
|
1111
1159
|
//#endregion
|
|
1112
1160
|
//#region src/components/link.ts
|
|
1161
|
+
/** The `link` component record: a styled hyperlink with sizes, an inverse variant for dark backgrounds, and inline or unstyled forms. */
|
|
1113
1162
|
const link = defineComponent({
|
|
1114
1163
|
name: "link",
|
|
1115
1164
|
css: (p) => link$1.replaceAll(SENTINEL, p)
|
|
1116
1165
|
});
|
|
1166
|
+
/** Standalone `link` stylesheet — the prefixed CSS for the hyperlink, ready to ship as a `.css` file. */
|
|
1117
1167
|
const linkCss = link.css;
|
|
1118
1168
|
//#endregion
|
|
1119
1169
|
//#region src/components/list.ts
|
|
1170
|
+
/** The `list` component record: a list with token-driven item spacing. */
|
|
1120
1171
|
const list = defineComponent({
|
|
1121
1172
|
name: "list",
|
|
1122
1173
|
css: (p) => list$1.replaceAll(SENTINEL, p)
|
|
1123
1174
|
});
|
|
1175
|
+
/** Standalone `list` stylesheet — the prefixed CSS for the spaced list, ready to ship as a `.css` file. */
|
|
1124
1176
|
const listCss = list.css;
|
|
1125
1177
|
//#endregion
|
|
1126
1178
|
//#region src/components/menu.ts
|
|
1179
|
+
/** The `menu` component record: a dropdown surface of items, groups, and separators. */
|
|
1127
1180
|
const menu = defineComponent({
|
|
1128
1181
|
name: "menu",
|
|
1129
1182
|
css: (p) => menu$1.replaceAll(SENTINEL, p)
|
|
1130
1183
|
});
|
|
1184
|
+
/** Standalone `menu` stylesheet — the prefixed CSS for the dropdown menu, ready to ship as a `.css` file. */
|
|
1131
1185
|
const menuCss = menu.css;
|
|
1132
1186
|
//#endregion
|
|
1133
1187
|
//#region src/components/metric.ts
|
|
1188
|
+
/** The `metric` component record: a labelled statistic — a large value above a caption. */
|
|
1134
1189
|
const metric = defineComponent({
|
|
1135
1190
|
name: "metric",
|
|
1136
1191
|
css: (p) => metric$1.replaceAll(SENTINEL, p)
|
|
1137
1192
|
});
|
|
1193
|
+
/** Standalone `metric` stylesheet — the prefixed CSS for the statistic, ready to ship as a `.css` file. */
|
|
1138
1194
|
const metricCss = metric.css;
|
|
1139
1195
|
//#endregion
|
|
1140
1196
|
//#region src/components/modal.ts
|
|
1197
|
+
/** The `modal` component record: a dialog surface with header, body, and footer parts, working on a native `<dialog>`. */
|
|
1141
1198
|
const modal = defineComponent({
|
|
1142
1199
|
name: "modal",
|
|
1143
1200
|
css: (p) => modal$1.replaceAll(SENTINEL, p)
|
|
1144
1201
|
});
|
|
1202
|
+
/** Standalone `modal` stylesheet — the prefixed CSS for the dialog surface, ready to ship as a `.css` file. */
|
|
1145
1203
|
const modalCss = modal.css;
|
|
1146
1204
|
//#endregion
|
|
1147
1205
|
//#region src/components/number-input.ts
|
|
1206
|
+
/** The `numberInput` component record: a number-input facade with a plus/minus spinner column. */
|
|
1148
1207
|
const numberInput = defineComponent({
|
|
1149
1208
|
name: "number-input",
|
|
1150
1209
|
css: (p) => {
|
|
@@ -1230,79 +1289,101 @@ ${root} .arrows button::before {
|
|
|
1230
1289
|
${root} .arrows button.down::before { -webkit-mask: ${CHEVRON_DOWN_ICON}; mask: ${CHEVRON_DOWN_ICON}; }`;
|
|
1231
1290
|
}
|
|
1232
1291
|
});
|
|
1292
|
+
/** Standalone `numberInput` stylesheet — the prefixed CSS for the number input, ready to ship as a `.css` file. */
|
|
1233
1293
|
const numberInputCss = numberInput.css;
|
|
1234
1294
|
//#endregion
|
|
1235
1295
|
//#region src/components/pagination.ts
|
|
1296
|
+
/** The `pagination` component record: page navigation with numbered pages, first, previous, next, and last arrows, and an ellipsis for gaps. */
|
|
1236
1297
|
const pagination = defineComponent({
|
|
1237
1298
|
name: "pagination",
|
|
1238
1299
|
css: (p) => pagination$1.replaceAll(SENTINEL, p)
|
|
1239
1300
|
});
|
|
1301
|
+
/** Standalone `pagination` stylesheet — the prefixed CSS for the page navigation, ready to ship as a `.css` file. */
|
|
1240
1302
|
const paginationCss = pagination.css;
|
|
1241
1303
|
//#endregion
|
|
1242
1304
|
//#region src/components/pill.ts
|
|
1305
|
+
/** The `pill` component record: a compact status label that takes a leading glyph via the `-icon-<name>` form. */
|
|
1243
1306
|
const pill = defineComponent({
|
|
1244
1307
|
name: "pill",
|
|
1245
1308
|
css: (p) => pill$1.replaceAll(SENTINEL, p)
|
|
1246
1309
|
});
|
|
1310
|
+
/** Standalone `pill` stylesheet — the prefixed CSS for the status pill, ready to ship as a `.css` file. */
|
|
1247
1311
|
const pillCss = pill.css;
|
|
1248
1312
|
//#endregion
|
|
1249
1313
|
//#region src/components/popover.ts
|
|
1314
|
+
/** The `popover` component record: an elevated surface for a native `[popover]`, placed with CSS anchor positioning. */
|
|
1250
1315
|
const popover = defineComponent({
|
|
1251
1316
|
name: "popover",
|
|
1252
1317
|
css: (p) => popover$1.replaceAll(SENTINEL, p)
|
|
1253
1318
|
});
|
|
1319
|
+
/** Standalone `popover` stylesheet — the prefixed CSS for the popover surface, ready to ship as a `.css` file. */
|
|
1254
1320
|
const popoverCss = popover.css;
|
|
1255
1321
|
//#endregion
|
|
1256
1322
|
//#region src/components/progress.ts
|
|
1323
|
+
/** The `progress` component record: a determinate progress bar with a coloured meter, sizes, and an optional value label. */
|
|
1257
1324
|
const progress = defineComponent({
|
|
1258
1325
|
name: "progress",
|
|
1259
1326
|
css: (p) => progress$1.replaceAll(SENTINEL, p)
|
|
1260
1327
|
});
|
|
1328
|
+
/** Standalone `progress` stylesheet — the prefixed CSS for the progress bar, ready to ship as a `.css` file. */
|
|
1261
1329
|
const progressCss = progress.css;
|
|
1262
1330
|
//#endregion
|
|
1263
1331
|
//#region src/components/progress-circle.ts
|
|
1332
|
+
/** The `progressCircle` component record: a circular progress ring driven by a `--value` (0–100) custom property. */
|
|
1264
1333
|
const progressCircle = defineComponent({
|
|
1265
1334
|
name: "progress-circle",
|
|
1266
1335
|
css: (p) => progressCircle$1.replaceAll(SENTINEL, p)
|
|
1267
1336
|
});
|
|
1337
|
+
/** Standalone `progressCircle` stylesheet — the prefixed CSS for the progress ring, ready to ship as a `.css` file. */
|
|
1268
1338
|
const progressCircleCss = progressCircle.css;
|
|
1269
1339
|
//#endregion
|
|
1270
1340
|
//#region src/components/radio.ts
|
|
1341
|
+
/** The `radio` component record: a native radio button with its label. */
|
|
1271
1342
|
const radio = defineComponent({
|
|
1272
1343
|
name: "radio",
|
|
1273
1344
|
css: (p) => radio$1.replaceAll(SENTINEL, p)
|
|
1274
1345
|
});
|
|
1346
|
+
/** Standalone `radio` stylesheet — the prefixed CSS for the radio button, ready to ship as a `.css` file. */
|
|
1275
1347
|
const radioCss = radio.css;
|
|
1276
1348
|
//#endregion
|
|
1277
1349
|
//#region src/components/radio-input-group.ts
|
|
1350
|
+
/** The `radioInputGroup` component record: a single-select radio `<fieldset>`, plain or as a connected segmented toggle. */
|
|
1278
1351
|
const radioInputGroup = defineComponent({
|
|
1279
1352
|
name: "radio-input-group",
|
|
1280
1353
|
css: (p) => radioInputGroup$1.replaceAll(SENTINEL, p)
|
|
1281
1354
|
});
|
|
1355
|
+
/** Standalone `radioInputGroup` stylesheet — the prefixed CSS for the radio group, ready to ship as a `.css` file. */
|
|
1282
1356
|
const radioInputGroupCss = radioInputGroup.css;
|
|
1283
1357
|
//#endregion
|
|
1284
1358
|
//#region src/components/range-input.ts
|
|
1359
|
+
/** The `rangeInput` component record: a styled range slider with an inverse value bubble. */
|
|
1285
1360
|
const rangeInput = defineComponent({
|
|
1286
1361
|
name: "range-input",
|
|
1287
1362
|
css: (p) => rangeInput$1.replaceAll(SENTINEL, p)
|
|
1288
1363
|
});
|
|
1364
|
+
/** Standalone `rangeInput` stylesheet — the prefixed CSS for the range slider, ready to ship as a `.css` file. */
|
|
1289
1365
|
const rangeInputCss = rangeInput.css;
|
|
1290
1366
|
//#endregion
|
|
1291
1367
|
//#region src/components/rating.ts
|
|
1368
|
+
/** The `rating` component record: a star rating with filled and empty glyphs and an optional numeric label. */
|
|
1292
1369
|
const rating = defineComponent({
|
|
1293
1370
|
name: "rating",
|
|
1294
1371
|
css: (p) => rating$1.replaceAll(SENTINEL, p)
|
|
1295
1372
|
});
|
|
1373
|
+
/** Standalone `rating` stylesheet — the prefixed CSS for the star rating, ready to ship as a `.css` file. */
|
|
1296
1374
|
const ratingCss = rating.css;
|
|
1297
1375
|
//#endregion
|
|
1298
1376
|
//#region src/components/side-nav-bar.ts
|
|
1377
|
+
/** The `sideNavBar` component record: a vertical navigation rail of icon-over-label items, with a minimized icons-only mode. */
|
|
1299
1378
|
const sideNavBar = defineComponent({
|
|
1300
1379
|
name: "side-nav-bar",
|
|
1301
1380
|
css: (p) => sideNavBar$1.replaceAll(SENTINEL, p)
|
|
1302
1381
|
});
|
|
1382
|
+
/** Standalone `sideNavBar` stylesheet — the prefixed CSS for the navigation rail, ready to ship as a `.css` file. */
|
|
1303
1383
|
const sideNavBarCss = sideNavBar.css;
|
|
1304
1384
|
//#endregion
|
|
1305
1385
|
//#region src/components/simple-select.ts
|
|
1386
|
+
/** The `simpleSelect` component record: a styled native `<select>` with a caret, matching the text-input states and sizes. */
|
|
1306
1387
|
const simpleSelect = defineComponent({
|
|
1307
1388
|
name: "simple-select",
|
|
1308
1389
|
css: (p) => {
|
|
@@ -1350,44 +1431,56 @@ ${fieldControlBase(p, "simple-select", "text-input")}
|
|
|
1350
1431
|
.${p}simple-select.-size-lg { block-size: ${t("height-lg")}; padding-inline: ${t("padding-horizontal-lg")}; padding-inline-end: calc(${t("padding-horizontal-lg")} + 1.5rem); font-size: ${t("font-size-lg")}; }`;
|
|
1351
1432
|
}
|
|
1352
1433
|
});
|
|
1434
|
+
/** Standalone `simpleSelect` stylesheet — the prefixed CSS for the native select, ready to ship as a `.css` file. */
|
|
1353
1435
|
const simpleSelectCss = simpleSelect.css;
|
|
1354
1436
|
//#endregion
|
|
1355
1437
|
//#region src/components/spinner.ts
|
|
1438
|
+
/** The `spinner` component record: an animated loading ring; pair it with `role="status"` and an aria-label. */
|
|
1356
1439
|
const spinner = defineComponent({
|
|
1357
1440
|
name: "spinner",
|
|
1358
1441
|
css: (p) => spinner$1.replaceAll(SENTINEL, p)
|
|
1359
1442
|
});
|
|
1443
|
+
/** Standalone `spinner` stylesheet — the prefixed CSS for the loading ring, ready to ship as a `.css` file. */
|
|
1360
1444
|
const spinnerCss = spinner.css;
|
|
1361
1445
|
//#endregion
|
|
1362
1446
|
//#region src/components/table.ts
|
|
1447
|
+
/** The `table` component record: a styled data table for `th` and `td` plus an optional caption, with hover, fixed, and stacked-card layouts. */
|
|
1363
1448
|
const table = defineComponent({
|
|
1364
1449
|
name: "table",
|
|
1365
1450
|
css: (p) => table$1.replaceAll(SENTINEL, p)
|
|
1366
1451
|
});
|
|
1452
|
+
/** Standalone `table` stylesheet — the prefixed CSS for the data table, ready to ship as a `.css` file. */
|
|
1367
1453
|
const tableCss = table.css;
|
|
1368
1454
|
//#endregion
|
|
1369
1455
|
//#region src/components/tabs.ts
|
|
1456
|
+
/** The `tabs` component record: a tabbed panel set with a tab list, selectable tabs, and their panels. */
|
|
1370
1457
|
const tabs = defineComponent({
|
|
1371
1458
|
name: "tabs",
|
|
1372
1459
|
css: (p) => tabs$1.replaceAll(SENTINEL, p)
|
|
1373
1460
|
});
|
|
1461
|
+
/** Standalone `tabs` stylesheet — the prefixed CSS for the tabbed panels, ready to ship as a `.css` file. */
|
|
1374
1462
|
const tabsCss = tabs.css;
|
|
1375
1463
|
//#endregion
|
|
1376
1464
|
//#region src/components/tag.ts
|
|
1465
|
+
/** The `tag` component record: an inline chip for a keyword or a filter. */
|
|
1377
1466
|
const tag = defineComponent({
|
|
1378
1467
|
name: "tag",
|
|
1379
1468
|
css: (p) => tag$1.replaceAll(SENTINEL, p)
|
|
1380
1469
|
});
|
|
1470
|
+
/** Standalone `tag` stylesheet — the prefixed CSS for the chip, ready to ship as a `.css` file. */
|
|
1381
1471
|
const tagCss = tag.css;
|
|
1382
1472
|
//#endregion
|
|
1383
1473
|
//#region src/components/text.ts
|
|
1474
|
+
/** The `text` component record: body-text typography with size, weight, colour, and style modifiers. */
|
|
1384
1475
|
const text = defineComponent({
|
|
1385
1476
|
name: "text",
|
|
1386
1477
|
css: (p) => text$1.replaceAll(SENTINEL, p)
|
|
1387
1478
|
});
|
|
1479
|
+
/** Standalone `text` stylesheet — the prefixed CSS for the body typography, ready to ship as a `.css` file. */
|
|
1388
1480
|
const textCss = text.css;
|
|
1389
1481
|
//#endregion
|
|
1390
1482
|
//#region src/components/text-area.ts
|
|
1483
|
+
/** The `textArea` component record: a styled, resizable native `<textarea>` sharing the text input's states and sizes. */
|
|
1391
1484
|
const textArea = defineComponent({
|
|
1392
1485
|
name: "text-area",
|
|
1393
1486
|
css: (p) => {
|
|
@@ -1420,9 +1513,11 @@ ${fieldControlBase(p, "text-area", "text-area")}
|
|
|
1420
1513
|
.${p}text-area.-size-lg { font-size: ${t("font-size-lg")}; }`;
|
|
1421
1514
|
}
|
|
1422
1515
|
});
|
|
1516
|
+
/** Standalone `textArea` stylesheet — the prefixed CSS for the textarea, ready to ship as a `.css` file. */
|
|
1423
1517
|
const textAreaCss = textArea.css;
|
|
1424
1518
|
//#endregion
|
|
1425
1519
|
//#region src/components/text-input.ts
|
|
1520
|
+
/** The `textInput` component record: a styled native `<input>` — including `date`, `time`, and `datetime-local`, where the browser supplies the picker — with validation states and sizes. */
|
|
1426
1521
|
const textInput = defineComponent({
|
|
1427
1522
|
name: "text-input",
|
|
1428
1523
|
css: (p) => {
|
|
@@ -1456,48 +1551,61 @@ ${fieldControlBase(p, "text-input", "text-input")}
|
|
|
1456
1551
|
.${p}text-input.-size-lg { block-size: ${t("height-lg")}; padding-inline: ${t("padding-horizontal-lg")}; font-size: ${t("font-size-lg")}; }`;
|
|
1457
1552
|
}
|
|
1458
1553
|
});
|
|
1554
|
+
/** Standalone `textInput` stylesheet — the prefixed CSS for the text input, ready to ship as a `.css` file. */
|
|
1459
1555
|
const textInputCss = textInput.css;
|
|
1460
1556
|
//#endregion
|
|
1461
1557
|
//#region src/components/toggle-details.ts
|
|
1558
|
+
/** The `toggleDetails` component record: a styled native `<details>` disclosure with a rotating chevron. */
|
|
1462
1559
|
const toggleDetails = defineComponent({
|
|
1463
1560
|
name: "toggle-details",
|
|
1464
1561
|
css: (p) => toggleDetails$1.replaceAll(SENTINEL, p)
|
|
1465
1562
|
});
|
|
1563
|
+
/** Standalone `toggleDetails` stylesheet — the prefixed CSS for the details disclosure, ready to ship as a `.css` file. */
|
|
1466
1564
|
const toggleDetailsCss = toggleDetails.css;
|
|
1467
1565
|
//#endregion
|
|
1468
1566
|
//#region src/components/toggle-group.ts
|
|
1567
|
+
/** The `toggleGroup` component record: a bordered disclosure built on `<details>`, with a chevron summary row and collapsible content. */
|
|
1469
1568
|
const toggleGroup = defineComponent({
|
|
1470
1569
|
name: "toggle-group",
|
|
1471
1570
|
css: (p) => toggleGroup$1.replaceAll(SENTINEL, p)
|
|
1472
1571
|
});
|
|
1572
|
+
/** Standalone `toggleGroup` stylesheet — the prefixed CSS for the bordered disclosure, ready to ship as a `.css` file. */
|
|
1473
1573
|
const toggleGroupCss = toggleGroup.css;
|
|
1474
1574
|
//#endregion
|
|
1475
1575
|
//#region src/components/tooltip.ts
|
|
1576
|
+
/** The `tooltip` component record: a CSS hover-and-focus tooltip bubble, positionable on any side. */
|
|
1476
1577
|
const tooltip = defineComponent({
|
|
1477
1578
|
name: "tooltip",
|
|
1478
1579
|
css: (p) => tooltip$1.replaceAll(SENTINEL, p)
|
|
1479
1580
|
});
|
|
1581
|
+
/** Standalone `tooltip` stylesheet — the prefixed CSS for the tooltip bubble, ready to ship as a `.css` file. */
|
|
1480
1582
|
const tooltipCss = tooltip.css;
|
|
1481
1583
|
//#endregion
|
|
1482
1584
|
//#region src/components/tray.ts
|
|
1585
|
+
/** The `tray` component record: an edge-pinned panel that slides in from any side, as a native `[popover]` or `<dialog>`. */
|
|
1483
1586
|
const tray = defineComponent({
|
|
1484
1587
|
name: "tray",
|
|
1485
1588
|
css: (p) => tray$1.replaceAll(SENTINEL, p)
|
|
1486
1589
|
});
|
|
1590
|
+
/** Standalone `tray` stylesheet — the prefixed CSS for the sliding tray, ready to ship as a `.css` file. */
|
|
1487
1591
|
const trayCss = tray.css;
|
|
1488
1592
|
//#endregion
|
|
1489
1593
|
//#region src/components/tree-browser.ts
|
|
1594
|
+
/** The `treeBrowser` component record: a disclosure tree of nested collections and leaf items, with rotating chevrons. */
|
|
1490
1595
|
const treeBrowser = defineComponent({
|
|
1491
1596
|
name: "tree-browser",
|
|
1492
1597
|
css: (p) => treeBrowser$1.replaceAll(SENTINEL, p)
|
|
1493
1598
|
});
|
|
1599
|
+
/** Standalone `treeBrowser` stylesheet — the prefixed CSS for the disclosure tree, ready to ship as a `.css` file. */
|
|
1494
1600
|
const treeBrowserCss = treeBrowser.css;
|
|
1495
1601
|
//#endregion
|
|
1496
1602
|
//#region src/components/truncate.ts
|
|
1603
|
+
/** The `truncate` component record: single-line ellipsis truncation, or a multi-line clamp via `--lines`. */
|
|
1497
1604
|
const truncate = defineComponent({
|
|
1498
1605
|
name: "truncate",
|
|
1499
1606
|
css: (p) => truncate$1.replaceAll(SENTINEL, p)
|
|
1500
1607
|
});
|
|
1608
|
+
/** Standalone `truncate` stylesheet — the prefixed CSS for the truncation utility, ready to ship as a `.css` file. */
|
|
1501
1609
|
const truncateCss = truncate.css;
|
|
1502
1610
|
//#endregion
|
|
1503
1611
|
//#region src/components/index.ts
|
|
@@ -1558,11 +1666,11 @@ const COMPONENTS = [
|
|
|
1558
1666
|
];
|
|
1559
1667
|
//#endregion
|
|
1560
1668
|
//#region src/rules/base.ts
|
|
1669
|
+
/** The base rule — the opt-in global reset (box-sizing, page surface, base text and font, color-scheme, link defaults), with the prefix sentinel replaced. */
|
|
1561
1670
|
const base = defineRule({
|
|
1562
1671
|
name: "base",
|
|
1563
1672
|
css: (p) => base$1.replaceAll(SENTINEL, p)
|
|
1564
1673
|
});
|
|
1565
|
-
base.css;
|
|
1566
1674
|
//#endregion
|
|
1567
1675
|
//#region src/declarations/focus.ts
|
|
1568
1676
|
/**
|
|
@@ -1852,6 +1960,7 @@ function selectCss(options = {}) {
|
|
|
1852
1960
|
const prefix = options.prefix || "";
|
|
1853
1961
|
return wrap("select", prefix, select.replaceAll(SENTINEL, ns(prefix)));
|
|
1854
1962
|
}
|
|
1963
|
+
/** The View utility as a standalone, header-wrapped stylesheet. */
|
|
1855
1964
|
const viewCss = defineUtility({
|
|
1856
1965
|
name: "view",
|
|
1857
1966
|
css: (p) => {
|
|
@@ -1994,6 +2103,7 @@ const viewCss = defineUtility({
|
|
|
1994
2103
|
${rules.join("\n")}`;
|
|
1995
2104
|
}
|
|
1996
2105
|
}).css;
|
|
2106
|
+
/** The spacing utilities as a standalone, header-wrapped stylesheet. */
|
|
1997
2107
|
const spacingUtilitiesCss = defineUtility({
|
|
1998
2108
|
name: "spacing",
|
|
1999
2109
|
css: (p) => {
|
|
@@ -2020,6 +2130,7 @@ const spacingUtilitiesCss = defineUtility({
|
|
|
2020
2130
|
${rules.join("\n")}`;
|
|
2021
2131
|
}
|
|
2022
2132
|
}).css;
|
|
2133
|
+
/** The layout utilities as a standalone, header-wrapped stylesheet. */
|
|
2023
2134
|
const layoutUtilitiesCss = defineUtility({
|
|
2024
2135
|
name: "layout",
|
|
2025
2136
|
css: (p) => css`/**
|
|
@@ -2046,6 +2157,7 @@ ${[...[
|
|
|
2046
2157
|
["justify", "justify"]
|
|
2047
2158
|
].map(([name, value]) => `.${p}text-align-${name} { text-align: ${value}; }`)].join("\n")}`
|
|
2048
2159
|
}).css;
|
|
2160
|
+
/** The responsive-visibility utilities as a standalone, header-wrapped stylesheet. */
|
|
2049
2161
|
const responsiveUtilitiesCss = defineUtility({
|
|
2050
2162
|
name: "responsive",
|
|
2051
2163
|
css: (p) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pantoken/components",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "An InstUI-look CSS component library from the pantoken tokens: prose/content styling plus class-based components (button, alert, badge).",
|
|
5
5
|
"homepage": "https://pantoken.iywahl.com",
|
|
6
6
|
"bugs": "https://github.com/thedannywahl/pantoken/issues",
|