@tanrei/web 0.0.0-stage → 0.1.0-next.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/LICENSE +202 -0
- package/NOTICE +58 -0
- package/README.md +9743 -2
- package/custom-elements.json +86072 -0
- package/dist/THIRD_PARTY_LICENSES.md +136 -0
- package/dist/accordion.css +812 -0
- package/dist/app-shell.css +493 -0
- package/dist/avatar.css +80 -0
- package/dist/breadcrumbs.css +511 -0
- package/dist/callout.css +65 -0
- package/dist/code.css +595 -0
- package/dist/components/accordion/accordion.d.ts +197 -0
- package/dist/components/accordion/accordion.js +763 -0
- package/dist/components/accordion/accordion.js.map +1 -0
- package/dist/components/app-bar/app-bar.d.ts +107 -0
- package/dist/components/app-bar/app-bar.js +295 -0
- package/dist/components/app-bar/app-bar.js.map +1 -0
- package/dist/components/app-bar/app-bar.styles.d.ts +12 -0
- package/dist/components/app-bar/app-bar.styles.js +223 -0
- package/dist/components/app-bar/app-bar.styles.js.map +1 -0
- package/dist/components/app-shell/app-shell.d.ts +220 -0
- package/dist/components/app-shell/app-shell.js +677 -0
- package/dist/components/app-shell/app-shell.js.map +1 -0
- package/dist/components/avatar/avatar.d.ts +162 -0
- package/dist/components/avatar/avatar.js +390 -0
- package/dist/components/avatar/avatar.js.map +1 -0
- package/dist/components/avatar/avatar.styles.d.ts +9 -0
- package/dist/components/avatar/avatar.styles.js +258 -0
- package/dist/components/avatar/avatar.styles.js.map +1 -0
- package/dist/components/badge/badge.d.ts +59 -0
- package/dist/components/badge/badge.js +176 -0
- package/dist/components/badge/badge.js.map +1 -0
- package/dist/components/badge/badge.styles.d.ts +1 -0
- package/dist/components/badge/badge.styles.js +106 -0
- package/dist/components/badge/badge.styles.js.map +1 -0
- package/dist/components/bottom-sheet/bottom-sheet.d.ts +207 -0
- package/dist/components/bottom-sheet/bottom-sheet.js +724 -0
- package/dist/components/bottom-sheet/bottom-sheet.js.map +1 -0
- package/dist/components/bottom-sheet/bottom-sheet.styles.d.ts +1 -0
- package/dist/components/bottom-sheet/bottom-sheet.styles.js +393 -0
- package/dist/components/bottom-sheet/bottom-sheet.styles.js.map +1 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +176 -0
- package/dist/components/breadcrumbs/breadcrumbs.js +638 -0
- package/dist/components/breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/components/breadcrumbs/breadcrumbs.styles.d.ts +1 -0
- package/dist/components/breadcrumbs/breadcrumbs.styles.js +225 -0
- package/dist/components/breadcrumbs/breadcrumbs.styles.js.map +1 -0
- package/dist/components/button/button.d.ts +280 -0
- package/dist/components/button/button.js +530 -0
- package/dist/components/button/button.js.map +1 -0
- package/dist/components/button/button.styles.d.ts +20 -0
- package/dist/components/button/button.styles.js +328 -0
- package/dist/components/button/button.styles.js.map +1 -0
- package/dist/components/button-group/button-group.d.ts +124 -0
- package/dist/components/button-group/button-group.js +287 -0
- package/dist/components/button-group/button-group.js.map +1 -0
- package/dist/components/button-group/button-group.styles.d.ts +1 -0
- package/dist/components/button-group/button-group.styles.js +220 -0
- package/dist/components/button-group/button-group.styles.js.map +1 -0
- package/dist/components/button-with-menu/button-with-menu.d.ts +224 -0
- package/dist/components/button-with-menu/button-with-menu.js +635 -0
- package/dist/components/button-with-menu/button-with-menu.js.map +1 -0
- package/dist/components/button-with-menu/button-with-menu.styles.d.ts +15 -0
- package/dist/components/button-with-menu/button-with-menu.styles.js +418 -0
- package/dist/components/button-with-menu/button-with-menu.styles.js.map +1 -0
- package/dist/components/calendar/calendar.d.ts +380 -0
- package/dist/components/calendar/calendar.js +1619 -0
- package/dist/components/calendar/calendar.js.map +1 -0
- package/dist/components/calendar/calendar.styles.d.ts +11 -0
- package/dist/components/calendar/calendar.styles.js +412 -0
- package/dist/components/calendar/calendar.styles.js.map +1 -0
- package/dist/components/callout/callout.d.ts +157 -0
- package/dist/components/callout/callout.js +436 -0
- package/dist/components/callout/callout.js.map +1 -0
- package/dist/components/callout/callout.styles.d.ts +13 -0
- package/dist/components/callout/callout.styles.js +383 -0
- package/dist/components/callout/callout.styles.js.map +1 -0
- package/dist/components/card/card.d.ts +108 -0
- package/dist/components/card/card.js +235 -0
- package/dist/components/card/card.js.map +1 -0
- package/dist/components/card/card.styles.d.ts +9 -0
- package/dist/components/card/card.styles.js +170 -0
- package/dist/components/card/card.styles.js.map +1 -0
- package/dist/components/carousel/carousel-geometry.d.ts +178 -0
- package/dist/components/carousel/carousel-geometry.js +356 -0
- package/dist/components/carousel/carousel-geometry.js.map +1 -0
- package/dist/components/carousel/carousel.d.ts +401 -0
- package/dist/components/carousel/carousel.js +1352 -0
- package/dist/components/carousel/carousel.js.map +1 -0
- package/dist/components/carousel/carousel.styles.d.ts +4 -0
- package/dist/components/carousel/carousel.styles.js +475 -0
- package/dist/components/carousel/carousel.styles.js.map +1 -0
- package/dist/components/chat-composer/chat-composer.d.ts +482 -0
- package/dist/components/chat-composer/chat-composer.js +1374 -0
- package/dist/components/chat-composer/chat-composer.js.map +1 -0
- package/dist/components/chat-composer/chat-composer.styles.d.ts +9 -0
- package/dist/components/chat-composer/chat-composer.styles.js +308 -0
- package/dist/components/chat-composer/chat-composer.styles.js.map +1 -0
- package/dist/components/checkbox/checkbox.d.ts +135 -0
- package/dist/components/checkbox/checkbox.js +296 -0
- package/dist/components/checkbox/checkbox.js.map +1 -0
- package/dist/components/checkbox/checkbox.styles.d.ts +13 -0
- package/dist/components/checkbox/checkbox.styles.js +226 -0
- package/dist/components/checkbox/checkbox.styles.js.map +1 -0
- package/dist/components/checkbox-group/checkbox-group.d.ts +199 -0
- package/dist/components/checkbox-group/checkbox-group.js +500 -0
- package/dist/components/checkbox-group/checkbox-group.js.map +1 -0
- package/dist/components/chip/chip.d.ts +176 -0
- package/dist/components/chip/chip.js +376 -0
- package/dist/components/chip/chip.js.map +1 -0
- package/dist/components/chip/chip.styles.d.ts +10 -0
- package/dist/components/chip/chip.styles.js +465 -0
- package/dist/components/chip/chip.styles.js.map +1 -0
- package/dist/components/chip-field/chip-field.d.ts +315 -0
- package/dist/components/chip-field/chip-field.js +887 -0
- package/dist/components/chip-field/chip-field.js.map +1 -0
- package/dist/components/code-block/code-block.before.d.ts +2 -0
- package/dist/components/code-block/code-block.before.js +193 -0
- package/dist/components/code-block/code-block.before.js.map +1 -0
- package/dist/components/code-block/code-block.d.ts +268 -0
- package/dist/components/code-block/code-block.js +1009 -0
- package/dist/components/code-block/code-block.js.map +1 -0
- package/dist/components/code-block/code-block.light.d.ts +50 -0
- package/dist/components/code-block/code-block.light.js +287 -0
- package/dist/components/code-block/code-block.light.js.map +1 -0
- package/dist/components/code-block/code-block.lines.d.ts +49 -0
- package/dist/components/code-block/code-block.lines.js +75 -0
- package/dist/components/code-block/code-block.lines.js.map +1 -0
- package/dist/components/code-block/code-block.styles.d.ts +8 -0
- package/dist/components/code-block/code-block.styles.js +212 -0
- package/dist/components/code-block/code-block.styles.js.map +1 -0
- package/dist/components/color-field/color-field.d.ts +120 -0
- package/dist/components/color-field/color-field.js +182 -0
- package/dist/components/color-field/color-field.js.map +1 -0
- package/dist/components/color-input/color-input.d.ts +302 -0
- package/dist/components/color-input/color-input.js +748 -0
- package/dist/components/color-input/color-input.js.map +1 -0
- package/dist/components/color-input/color-input.styles.d.ts +22 -0
- package/dist/components/color-input/color-input.styles.js +373 -0
- package/dist/components/color-input/color-input.styles.js.map +1 -0
- package/dist/components/color-input/color-text.d.ts +48 -0
- package/dist/components/color-input/color-text.js +77 -0
- package/dist/components/color-input/color-text.js.map +1 -0
- package/dist/components/combobox/combobox.d.ts +387 -0
- package/dist/components/combobox/combobox.js +1108 -0
- package/dist/components/combobox/combobox.js.map +1 -0
- package/dist/components/combobox/combobox.styles.d.ts +26 -0
- package/dist/components/combobox/combobox.styles.js +497 -0
- package/dist/components/combobox/combobox.styles.js.map +1 -0
- package/dist/components/combobox-field/combobox-field.d.ts +159 -0
- package/dist/components/combobox-field/combobox-field.js +280 -0
- package/dist/components/combobox-field/combobox-field.js.map +1 -0
- package/dist/components/copy-button/copy-button.d.ts +112 -0
- package/dist/components/copy-button/copy-button.js +237 -0
- package/dist/components/copy-button/copy-button.js.map +1 -0
- package/dist/components/copy-button/copy-button.styles.d.ts +1 -0
- package/dist/components/copy-button/copy-button.styles.js +62 -0
- package/dist/components/copy-button/copy-button.styles.js.map +1 -0
- package/dist/components/date-time-picker/date-time-picker.d.ts +603 -0
- package/dist/components/date-time-picker/date-time-picker.js +2537 -0
- package/dist/components/date-time-picker/date-time-picker.js.map +1 -0
- package/dist/components/date-time-picker/date-time-picker.styles.d.ts +1 -0
- package/dist/components/date-time-picker/date-time-picker.styles.js +842 -0
- package/dist/components/date-time-picker/date-time-picker.styles.js.map +1 -0
- package/dist/components/description-list/description-list.d.ts +133 -0
- package/dist/components/description-list/description-list.js +395 -0
- package/dist/components/description-list/description-list.js.map +1 -0
- package/dist/components/dialog/dialog.d.ts +140 -0
- package/dist/components/dialog/dialog.js +440 -0
- package/dist/components/dialog/dialog.js.map +1 -0
- package/dist/components/dialog/dialog.styles.d.ts +1 -0
- package/dist/components/dialog/dialog.styles.js +306 -0
- package/dist/components/dialog/dialog.styles.js.map +1 -0
- package/dist/components/divider/divider.d.ts +112 -0
- package/dist/components/divider/divider.js +331 -0
- package/dist/components/divider/divider.js.map +1 -0
- package/dist/components/divider/divider.styles.d.ts +6 -0
- package/dist/components/divider/divider.styles.js +183 -0
- package/dist/components/divider/divider.styles.js.map +1 -0
- package/dist/components/embedded-text-input/embedded-text-input.d.ts +246 -0
- package/dist/components/embedded-text-input/embedded-text-input.js +673 -0
- package/dist/components/embedded-text-input/embedded-text-input.js.map +1 -0
- package/dist/components/embedded-text-input/embedded-text-input.styles.d.ts +1 -0
- package/dist/components/embedded-text-input/embedded-text-input.styles.js +204 -0
- package/dist/components/embedded-text-input/embedded-text-input.styles.js.map +1 -0
- package/dist/components/empty-state/empty-state.d.ts +132 -0
- package/dist/components/empty-state/empty-state.js +333 -0
- package/dist/components/empty-state/empty-state.js.map +1 -0
- package/dist/components/empty-state/empty-state.styles.d.ts +11 -0
- package/dist/components/empty-state/empty-state.styles.js +218 -0
- package/dist/components/empty-state/empty-state.styles.js.map +1 -0
- package/dist/components/fab-menu/fab-menu.d.ts +240 -0
- package/dist/components/fab-menu/fab-menu.js +605 -0
- package/dist/components/fab-menu/fab-menu.js.map +1 -0
- package/dist/components/fab-menu/fab-menu.styles.d.ts +21 -0
- package/dist/components/fab-menu/fab-menu.styles.js +427 -0
- package/dist/components/fab-menu/fab-menu.styles.js.map +1 -0
- package/dist/components/field/field.d.ts +165 -0
- package/dist/components/field/field.js +399 -0
- package/dist/components/field/field.js.map +1 -0
- package/dist/components/field/field.styles.d.ts +2 -0
- package/dist/components/field/field.styles.js +177 -0
- package/dist/components/field/field.styles.js.map +1 -0
- package/dist/components/field-group/field-group.d.ts +122 -0
- package/dist/components/field-group/field-group.js +246 -0
- package/dist/components/field-group/field-group.js.map +1 -0
- package/dist/components/field-group/field-group.styles.d.ts +7 -0
- package/dist/components/field-group/field-group.styles.js +28 -0
- package/dist/components/field-group/field-group.styles.js.map +1 -0
- package/dist/components/figure/figure.d.ts +152 -0
- package/dist/components/figure/figure.js +435 -0
- package/dist/components/figure/figure.js.map +1 -0
- package/dist/components/file-item/file-item.d.ts +232 -0
- package/dist/components/file-item/file-item.js +665 -0
- package/dist/components/file-item/file-item.js.map +1 -0
- package/dist/components/file-item/file-item.styles.d.ts +2 -0
- package/dist/components/file-item/file-item.styles.js +582 -0
- package/dist/components/file-item/file-item.styles.js.map +1 -0
- package/dist/components/file-picker/file-picker.d.ts +221 -0
- package/dist/components/file-picker/file-picker.js +588 -0
- package/dist/components/file-picker/file-picker.js.map +1 -0
- package/dist/components/file-picker/file-picker.styles.d.ts +2 -0
- package/dist/components/file-picker/file-picker.styles.js +303 -0
- package/dist/components/file-picker/file-picker.styles.js.map +1 -0
- package/dist/components/file-upload/file-upload.d.ts +353 -0
- package/dist/components/file-upload/file-upload.js +939 -0
- package/dist/components/file-upload/file-upload.js.map +1 -0
- package/dist/components/file-upload/file-upload.styles.d.ts +1 -0
- package/dist/components/file-upload/file-upload.styles.js +91 -0
- package/dist/components/file-upload/file-upload.styles.js.map +1 -0
- package/dist/components/image-preview/image-preview.d.ts +336 -0
- package/dist/components/image-preview/image-preview.js +1510 -0
- package/dist/components/image-preview/image-preview.js.map +1 -0
- package/dist/components/image-preview/image-preview.styles.d.ts +1 -0
- package/dist/components/image-preview/image-preview.styles.js +418 -0
- package/dist/components/image-preview/image-preview.styles.js.map +1 -0
- package/dist/components/keyboard-shortcut/keyboard-shortcut.d.ts +94 -0
- package/dist/components/keyboard-shortcut/keyboard-shortcut.js +285 -0
- package/dist/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -0
- package/dist/components/keyboard-shortcut/keyboard-shortcut.styles.d.ts +11 -0
- package/dist/components/keyboard-shortcut/keyboard-shortcut.styles.js +155 -0
- package/dist/components/keyboard-shortcut/keyboard-shortcut.styles.js.map +1 -0
- package/dist/components/link-card/link-card.d.ts +156 -0
- package/dist/components/link-card/link-card.js +713 -0
- package/dist/components/link-card/link-card.js.map +1 -0
- package/dist/components/list/list.d.ts +430 -0
- package/dist/components/list/list.js +1230 -0
- package/dist/components/list/list.js.map +1 -0
- package/dist/components/list/list.styles.d.ts +3 -0
- package/dist/components/list/list.styles.js +334 -0
- package/dist/components/list/list.styles.js.map +1 -0
- package/dist/components/loading-indicator/loading-indicator.d.ts +83 -0
- package/dist/components/loading-indicator/loading-indicator.js +195 -0
- package/dist/components/loading-indicator/loading-indicator.js.map +1 -0
- package/dist/components/loading-indicator/loading-indicator.styles.d.ts +6 -0
- package/dist/components/loading-indicator/loading-indicator.styles.js +124 -0
- package/dist/components/loading-indicator/loading-indicator.styles.js.map +1 -0
- package/dist/components/main-action-button/main-action-button.d.ts +95 -0
- package/dist/components/main-action-button/main-action-button.js +202 -0
- package/dist/components/main-action-button/main-action-button.js.map +1 -0
- package/dist/components/main-action-button/main-action-button.styles.d.ts +10 -0
- package/dist/components/main-action-button/main-action-button.styles.js +285 -0
- package/dist/components/main-action-button/main-action-button.styles.js.map +1 -0
- package/dist/components/menu/menu.d.ts +813 -0
- package/dist/components/menu/menu.js +2061 -0
- package/dist/components/menu/menu.js.map +1 -0
- package/dist/components/menu/menu.styles.d.ts +18 -0
- package/dist/components/menu/menu.styles.js +587 -0
- package/dist/components/menu/menu.styles.js.map +1 -0
- package/dist/components/menubar/menubar.d.ts +477 -0
- package/dist/components/menubar/menubar.js +1677 -0
- package/dist/components/menubar/menubar.js.map +1 -0
- package/dist/components/menubar/menubar.styles.d.ts +43 -0
- package/dist/components/menubar/menubar.styles.js +379 -0
- package/dist/components/menubar/menubar.styles.js.map +1 -0
- package/dist/components/navigation-bar/navigation-bar.d.ts +239 -0
- package/dist/components/navigation-bar/navigation-bar.js +544 -0
- package/dist/components/navigation-bar/navigation-bar.js.map +1 -0
- package/dist/components/navigation-bar/navigation-bar.styles.d.ts +21 -0
- package/dist/components/navigation-bar/navigation-bar.styles.js +320 -0
- package/dist/components/navigation-bar/navigation-bar.styles.js.map +1 -0
- package/dist/components/navigation-drawer/navigation-drawer.d.ts +627 -0
- package/dist/components/navigation-drawer/navigation-drawer.js +1917 -0
- package/dist/components/navigation-drawer/navigation-drawer.js.map +1 -0
- package/dist/components/navigation-drawer/navigation-drawer.styles.d.ts +40 -0
- package/dist/components/navigation-drawer/navigation-drawer.styles.js +934 -0
- package/dist/components/navigation-drawer/navigation-drawer.styles.js.map +1 -0
- package/dist/components/number-field/number-field.d.ts +147 -0
- package/dist/components/number-field/number-field.js +252 -0
- package/dist/components/number-field/number-field.js.map +1 -0
- package/dist/components/number-input/number-input.d.ts +347 -0
- package/dist/components/number-input/number-input.js +929 -0
- package/dist/components/number-input/number-input.js.map +1 -0
- package/dist/components/number-input/number-input.styles.d.ts +22 -0
- package/dist/components/number-input/number-input.styles.js +395 -0
- package/dist/components/number-input/number-input.styles.js.map +1 -0
- package/dist/components/number-input/number-text.d.ts +74 -0
- package/dist/components/number-input/number-text.js +230 -0
- package/dist/components/number-input/number-text.js.map +1 -0
- package/dist/components/one-time-code-field/one-time-code-field.d.ts +94 -0
- package/dist/components/one-time-code-field/one-time-code-field.js +135 -0
- package/dist/components/one-time-code-field/one-time-code-field.js.map +1 -0
- package/dist/components/one-time-code-input/code-text.d.ts +51 -0
- package/dist/components/one-time-code-input/code-text.js +145 -0
- package/dist/components/one-time-code-input/code-text.js.map +1 -0
- package/dist/components/one-time-code-input/one-time-code-input.d.ts +219 -0
- package/dist/components/one-time-code-input/one-time-code-input.js +710 -0
- package/dist/components/one-time-code-input/one-time-code-input.js.map +1 -0
- package/dist/components/one-time-code-input/one-time-code-input.styles.d.ts +8 -0
- package/dist/components/one-time-code-input/one-time-code-input.styles.js +323 -0
- package/dist/components/one-time-code-input/one-time-code-input.styles.js.map +1 -0
- package/dist/components/option/option.d.ts +51 -0
- package/dist/components/option/option.js +75 -0
- package/dist/components/option/option.js.map +1 -0
- package/dist/components/page-header/page-header.d.ts +97 -0
- package/dist/components/page-header/page-header.js +258 -0
- package/dist/components/page-header/page-header.js.map +1 -0
- package/dist/components/popover/popover.d.ts +217 -0
- package/dist/components/popover/popover.js +616 -0
- package/dist/components/popover/popover.js.map +1 -0
- package/dist/components/popover/popover.styles.d.ts +8 -0
- package/dist/components/popover/popover.styles.js +299 -0
- package/dist/components/popover/popover.styles.js.map +1 -0
- package/dist/components/progress-indicator/progress-indicator.d.ts +76 -0
- package/dist/components/progress-indicator/progress-indicator.js +165 -0
- package/dist/components/progress-indicator/progress-indicator.js.map +1 -0
- package/dist/components/progress-indicator/progress-indicator.styles.d.ts +7 -0
- package/dist/components/progress-indicator/progress-indicator.styles.js +271 -0
- package/dist/components/progress-indicator/progress-indicator.styles.js.map +1 -0
- package/dist/components/radio-button/radio-button.d.ts +149 -0
- package/dist/components/radio-button/radio-button.js +370 -0
- package/dist/components/radio-button/radio-button.js.map +1 -0
- package/dist/components/radio-button/radio-button.styles.d.ts +8 -0
- package/dist/components/radio-button/radio-button.styles.js +190 -0
- package/dist/components/radio-button/radio-button.styles.js.map +1 -0
- package/dist/components/radio-group/radio-group.d.ts +188 -0
- package/dist/components/radio-group/radio-group.js +380 -0
- package/dist/components/radio-group/radio-group.js.map +1 -0
- package/dist/components/search/search.d.ts +569 -0
- package/dist/components/search/search.js +1801 -0
- package/dist/components/search/search.js.map +1 -0
- package/dist/components/search/search.styles.d.ts +15 -0
- package/dist/components/search/search.styles.js +967 -0
- package/dist/components/search/search.styles.js.map +1 -0
- package/dist/components/segmented-button/segmented-button.d.ts +183 -0
- package/dist/components/segmented-button/segmented-button.js +483 -0
- package/dist/components/segmented-button/segmented-button.js.map +1 -0
- package/dist/components/segmented-button/segmented-button.styles.d.ts +19 -0
- package/dist/components/segmented-button/segmented-button.styles.js +400 -0
- package/dist/components/segmented-button/segmented-button.styles.js.map +1 -0
- package/dist/components/select/select.d.ts +259 -0
- package/dist/components/select/select.js +702 -0
- package/dist/components/select/select.js.map +1 -0
- package/dist/components/select/select.styles.d.ts +27 -0
- package/dist/components/select/select.styles.js +359 -0
- package/dist/components/select/select.styles.js.map +1 -0
- package/dist/components/select-field/select-field.d.ts +141 -0
- package/dist/components/select-field/select-field.js +234 -0
- package/dist/components/select-field/select-field.js.map +1 -0
- package/dist/components/side-sheet/side-sheet.d.ts +190 -0
- package/dist/components/side-sheet/side-sheet.js +592 -0
- package/dist/components/side-sheet/side-sheet.js.map +1 -0
- package/dist/components/side-sheet/side-sheet.styles.d.ts +9 -0
- package/dist/components/side-sheet/side-sheet.styles.js +352 -0
- package/dist/components/side-sheet/side-sheet.styles.js.map +1 -0
- package/dist/components/skeleton/skeleton.d.ts +157 -0
- package/dist/components/skeleton/skeleton.js +550 -0
- package/dist/components/skeleton/skeleton.js.map +1 -0
- package/dist/components/slider/slider.d.ts +235 -0
- package/dist/components/slider/slider.js +792 -0
- package/dist/components/slider/slider.js.map +1 -0
- package/dist/components/slider/slider.styles.d.ts +6 -0
- package/dist/components/slider/slider.styles.js +492 -0
- package/dist/components/slider/slider.styles.js.map +1 -0
- package/dist/components/slider-field/slider-field.d.ts +150 -0
- package/dist/components/slider-field/slider-field.js +269 -0
- package/dist/components/slider-field/slider-field.js.map +1 -0
- package/dist/components/snackbar/snackbar.d.ts +237 -0
- package/dist/components/snackbar/snackbar.js +607 -0
- package/dist/components/snackbar/snackbar.js.map +1 -0
- package/dist/components/snackbar/snackbar.styles.d.ts +10 -0
- package/dist/components/snackbar/snackbar.styles.js +510 -0
- package/dist/components/snackbar/snackbar.styles.js.map +1 -0
- package/dist/components/switch/switch.d.ts +161 -0
- package/dist/components/switch/switch.js +470 -0
- package/dist/components/switch/switch.js.map +1 -0
- package/dist/components/switch/switch.styles.d.ts +3 -0
- package/dist/components/switch/switch.styles.js +440 -0
- package/dist/components/switch/switch.styles.js.map +1 -0
- package/dist/components/tab-view/tab-view.d.ts +303 -0
- package/dist/components/tab-view/tab-view.js +917 -0
- package/dist/components/tab-view/tab-view.js.map +1 -0
- package/dist/components/tab-view/tab-view.styles.d.ts +19 -0
- package/dist/components/tab-view/tab-view.styles.js +85 -0
- package/dist/components/tab-view/tab-view.styles.js.map +1 -0
- package/dist/components/table/table.d.ts +386 -0
- package/dist/components/table/table.js +1320 -0
- package/dist/components/table/table.js.map +1 -0
- package/dist/components/table-of-contents/table-of-contents.d.ts +227 -0
- package/dist/components/table-of-contents/table-of-contents.js +963 -0
- package/dist/components/table-of-contents/table-of-contents.js.map +1 -0
- package/dist/components/table-of-contents/table-of-contents.styles.d.ts +1 -0
- package/dist/components/table-of-contents/table-of-contents.styles.js +243 -0
- package/dist/components/table-of-contents/table-of-contents.styles.js.map +1 -0
- package/dist/components/tabs/tabs.d.ts +800 -0
- package/dist/components/tabs/tabs.js +2183 -0
- package/dist/components/tabs/tabs.js.map +1 -0
- package/dist/components/tabs/tabs.styles.d.ts +47 -0
- package/dist/components/tabs/tabs.styles.js +595 -0
- package/dist/components/tabs/tabs.styles.js.map +1 -0
- package/dist/components/tag/tag.d.ts +77 -0
- package/dist/components/tag/tag.js +143 -0
- package/dist/components/tag/tag.js.map +1 -0
- package/dist/components/tag/tag.styles.d.ts +13 -0
- package/dist/components/tag/tag.styles.js +215 -0
- package/dist/components/tag/tag.styles.js.map +1 -0
- package/dist/components/tag-group/tag-group.d.ts +110 -0
- package/dist/components/tag-group/tag-group.js +298 -0
- package/dist/components/tag-group/tag-group.js.map +1 -0
- package/dist/components/tag-group/tag-group.styles.d.ts +8 -0
- package/dist/components/tag-group/tag-group.styles.js +66 -0
- package/dist/components/tag-group/tag-group.styles.js.map +1 -0
- package/dist/components/text-field/text-field.d.ts +159 -0
- package/dist/components/text-field/text-field.js +272 -0
- package/dist/components/text-field/text-field.js.map +1 -0
- package/dist/components/text-input/text-input-segments.d.ts +93 -0
- package/dist/components/text-input/text-input-segments.js +233 -0
- package/dist/components/text-input/text-input-segments.js.map +1 -0
- package/dist/components/text-input/text-input.d.ts +683 -0
- package/dist/components/text-input/text-input.js +2120 -0
- package/dist/components/text-input/text-input.js.map +1 -0
- package/dist/components/text-input/text-input.styles.d.ts +27 -0
- package/dist/components/text-input/text-input.styles.js +1071 -0
- package/dist/components/text-input/text-input.styles.js.map +1 -0
- package/dist/components/toolbar/toolbar.d.ts +123 -0
- package/dist/components/toolbar/toolbar.js +336 -0
- package/dist/components/toolbar/toolbar.js.map +1 -0
- package/dist/components/toolbar/toolbar.styles.d.ts +10 -0
- package/dist/components/toolbar/toolbar.styles.js +156 -0
- package/dist/components/toolbar/toolbar.styles.js.map +1 -0
- package/dist/components/tooltip/tooltip-placement.d.ts +22 -0
- package/dist/components/tooltip/tooltip-placement.js +15 -0
- package/dist/components/tooltip/tooltip-placement.js.map +1 -0
- package/dist/components/tooltip/tooltip.d.ts +267 -0
- package/dist/components/tooltip/tooltip.js +902 -0
- package/dist/components/tooltip/tooltip.js.map +1 -0
- package/dist/components/tooltip/tooltip.styles.d.ts +7 -0
- package/dist/components/tooltip/tooltip.styles.js +240 -0
- package/dist/components/tooltip/tooltip.styles.js.map +1 -0
- package/dist/components/tree-view/tree-view.d.ts +264 -0
- package/dist/components/tree-view/tree-view.js +1228 -0
- package/dist/components/tree-view/tree-view.js.map +1 -0
- package/dist/description-list.css +337 -0
- package/dist/empty-state.css +70 -0
- package/dist/figure.css +381 -0
- package/dist/generated/icon-sets.d.ts +9 -0
- package/dist/generated/icon-sets.js +18 -0
- package/dist/generated/icon-sets.js.map +1 -0
- package/dist/generated/words.d.ts +161 -0
- package/dist/generated/words.js +91 -0
- package/dist/generated/words.js.map +1 -0
- package/dist/highlight/grammars/css.d.ts +3 -0
- package/dist/highlight/grammars/css.js +56 -0
- package/dist/highlight/grammars/css.js.map +1 -0
- package/dist/highlight/grammars/dart.d.ts +3 -0
- package/dist/highlight/grammars/dart.js +53 -0
- package/dist/highlight/grammars/dart.js.map +1 -0
- package/dist/highlight/grammars/javascript.d.ts +4 -0
- package/dist/highlight/grammars/javascript.js +119 -0
- package/dist/highlight/grammars/javascript.js.map +1 -0
- package/dist/highlight/grammars/json.d.ts +3 -0
- package/dist/highlight/grammars/json.js +19 -0
- package/dist/highlight/grammars/json.js.map +1 -0
- package/dist/highlight/grammars/kotlin.d.ts +3 -0
- package/dist/highlight/grammars/kotlin.js +46 -0
- package/dist/highlight/grammars/kotlin.js.map +1 -0
- package/dist/highlight/grammars/markup.d.ts +3 -0
- package/dist/highlight/grammars/markup.js +45 -0
- package/dist/highlight/grammars/markup.js.map +1 -0
- package/dist/highlight/grammars/shared.d.ts +25 -0
- package/dist/highlight/grammars/shared.js +37 -0
- package/dist/highlight/grammars/shared.js.map +1 -0
- package/dist/highlight/grammars/shell.d.ts +3 -0
- package/dist/highlight/grammars/shell.js +48 -0
- package/dist/highlight/grammars/shell.js.map +1 -0
- package/dist/highlight/grammars/swift.d.ts +3 -0
- package/dist/highlight/grammars/swift.js +46 -0
- package/dist/highlight/grammars/swift.js.map +1 -0
- package/dist/highlight/grammars/typescript.d.ts +2 -0
- package/dist/highlight/grammars/typescript.js +5 -0
- package/dist/highlight/grammars/typescript.js.map +1 -0
- package/dist/highlight/index.d.ts +104 -0
- package/dist/highlight/index.js +331 -0
- package/dist/highlight/index.js.map +1 -0
- package/dist/icons.css +107 -0
- package/dist/icons.d.ts +2 -0
- package/dist/icons.js +10 -0
- package/dist/icons.js.map +1 -0
- package/dist/index.d.ts +85 -0
- package/dist/index.js +100 -0
- package/dist/index.js.map +1 -0
- package/dist/link-card.css +678 -0
- package/dist/link.css +728 -0
- package/dist/link.d.ts +21 -0
- package/dist/link.js +594 -0
- package/dist/link.js.map +1 -0
- package/dist/links/index.d.ts +136 -0
- package/dist/links/index.js +404 -0
- package/dist/links/index.js.map +1 -0
- package/dist/links/node/address.js +154 -0
- package/dist/links/node/cli.js +102 -0
- package/dist/links/node/fetcher.js +267 -0
- package/dist/links/node/head.js +278 -0
- package/dist/links/node/index.d.ts +164 -0
- package/dist/links/node/index.js +26 -0
- package/dist/links/node/links.js +275 -0
- package/dist/links/node/lock.js +86 -0
- package/dist/links/node/mark.js +71 -0
- package/dist/links/node/options.js +120 -0
- package/dist/links/node/pictures.js +265 -0
- package/dist/links/node/refresh.js +28 -0
- package/dist/menu.css +97 -0
- package/dist/menubar.css +69 -0
- package/dist/page-header.css +324 -0
- package/dist/pagination.css +410 -0
- package/dist/pagination.d.ts +6 -0
- package/dist/pagination.js +256 -0
- package/dist/pagination.js.map +1 -0
- package/dist/primitives/actions.d.ts +75 -0
- package/dist/primitives/actions.js +142 -0
- package/dist/primitives/actions.js.map +1 -0
- package/dist/primitives/after-click.d.ts +8 -0
- package/dist/primitives/after-click.js +21 -0
- package/dist/primitives/after-click.js.map +1 -0
- package/dist/primitives/anchored.d.ts +134 -0
- package/dist/primitives/anchored.js +425 -0
- package/dist/primitives/anchored.js.map +1 -0
- package/dist/primitives/arc.d.ts +13 -0
- package/dist/primitives/arc.js +49 -0
- package/dist/primitives/arc.js.map +1 -0
- package/dist/primitives/arrow.d.ts +47 -0
- package/dist/primitives/arrow.js +159 -0
- package/dist/primitives/arrow.js.map +1 -0
- package/dist/primitives/auto-height.d.ts +56 -0
- package/dist/primitives/auto-height.js +150 -0
- package/dist/primitives/auto-height.js.map +1 -0
- package/dist/primitives/autofocus.d.ts +11 -0
- package/dist/primitives/autofocus.js +26 -0
- package/dist/primitives/autofocus.js.map +1 -0
- package/dist/primitives/availability.d.ts +32 -0
- package/dist/primitives/availability.js +122 -0
- package/dist/primitives/availability.js.map +1 -0
- package/dist/primitives/axes.d.ts +45 -0
- package/dist/primitives/axes.js +72 -0
- package/dist/primitives/axes.js.map +1 -0
- package/dist/primitives/behavior.d.ts +14 -0
- package/dist/primitives/behavior.js +19 -0
- package/dist/primitives/behavior.js.map +1 -0
- package/dist/primitives/calendar-date.d.ts +79 -0
- package/dist/primitives/calendar-date.js +135 -0
- package/dist/primitives/calendar-date.js.map +1 -0
- package/dist/primitives/composed.d.ts +144 -0
- package/dist/primitives/composed.js +303 -0
- package/dist/primitives/composed.js.map +1 -0
- package/dist/primitives/default-button.d.ts +49 -0
- package/dist/primitives/default-button.js +270 -0
- package/dist/primitives/default-button.js.map +1 -0
- package/dist/primitives/description.d.ts +18 -0
- package/dist/primitives/description.js +18 -0
- package/dist/primitives/description.js.map +1 -0
- package/dist/primitives/destination.d.ts +259 -0
- package/dist/primitives/destination.js +651 -0
- package/dist/primitives/destination.js.map +1 -0
- package/dist/primitives/direction.d.ts +23 -0
- package/dist/primitives/direction.js +90 -0
- package/dist/primitives/direction.js.map +1 -0
- package/dist/primitives/disabled-while-focused.d.ts +46 -0
- package/dist/primitives/disabled-while-focused.js +126 -0
- package/dist/primitives/disabled-while-focused.js.map +1 -0
- package/dist/primitives/disclosure.d.ts +9 -0
- package/dist/primitives/disclosure.js +15 -0
- package/dist/primitives/disclosure.js.map +1 -0
- package/dist/primitives/dismiss.d.ts +88 -0
- package/dist/primitives/dismiss.js +232 -0
- package/dist/primitives/dismiss.js.map +1 -0
- package/dist/primitives/field-frame.d.ts +166 -0
- package/dist/primitives/field-frame.js +358 -0
- package/dist/primitives/field-frame.js.map +1 -0
- package/dist/primitives/field-group-frame.d.ts +59 -0
- package/dist/primitives/field-group-frame.js +174 -0
- package/dist/primitives/field-group-frame.js.map +1 -0
- package/dist/primitives/field-trigger.d.ts +117 -0
- package/dist/primitives/field-trigger.js +387 -0
- package/dist/primitives/field-trigger.js.map +1 -0
- package/dist/primitives/field.d.ts +186 -0
- package/dist/primitives/field.js +349 -0
- package/dist/primitives/field.js.map +1 -0
- package/dist/primitives/file-format.d.ts +23 -0
- package/dist/primitives/file-format.js +185 -0
- package/dist/primitives/file-format.js.map +1 -0
- package/dist/primitives/file-item-holder.d.ts +45 -0
- package/dist/primitives/file-item-holder.js +39 -0
- package/dist/primitives/file-item-holder.js.map +1 -0
- package/dist/primitives/focus-order.d.ts +11 -0
- package/dist/primitives/focus-order.js +11 -0
- package/dist/primitives/focus-order.js.map +1 -0
- package/dist/primitives/focus-ring.d.ts +76 -0
- package/dist/primitives/focus-ring.js +230 -0
- package/dist/primitives/focus-ring.js.map +1 -0
- package/dist/primitives/follow.d.ts +65 -0
- package/dist/primitives/follow.js +283 -0
- package/dist/primitives/follow.js.map +1 -0
- package/dist/primitives/form-disabled.d.ts +20 -0
- package/dist/primitives/form-disabled.js +46 -0
- package/dist/primitives/form-disabled.js.map +1 -0
- package/dist/primitives/form-says.d.ts +33 -0
- package/dist/primitives/form-says.js +45 -0
- package/dist/primitives/form-says.js.map +1 -0
- package/dist/primitives/forward.d.ts +13 -0
- package/dist/primitives/forward.js +28 -0
- package/dist/primitives/forward.js.map +1 -0
- package/dist/primitives/glyph-mirror.d.ts +77 -0
- package/dist/primitives/glyph-mirror.js +211 -0
- package/dist/primitives/glyph-mirror.js.map +1 -0
- package/dist/primitives/glyph-pending.d.ts +17 -0
- package/dist/primitives/glyph-pending.js +91 -0
- package/dist/primitives/glyph-pending.js.map +1 -0
- package/dist/primitives/glyph.d.ts +53 -0
- package/dist/primitives/glyph.js +161 -0
- package/dist/primitives/glyph.js.map +1 -0
- package/dist/primitives/group-item.d.ts +128 -0
- package/dist/primitives/group-item.js +334 -0
- package/dist/primitives/group-item.js.map +1 -0
- package/dist/primitives/hidden.d.ts +2 -0
- package/dist/primitives/hidden.js +23 -0
- package/dist/primitives/hidden.js.map +1 -0
- package/dist/primitives/host-aria.d.ts +8 -0
- package/dist/primitives/host-aria.js +18 -0
- package/dist/primitives/host-aria.js.map +1 -0
- package/dist/primitives/index.d.ts +59 -0
- package/dist/primitives/index.js +189 -0
- package/dist/primitives/index.js.map +1 -0
- package/dist/primitives/indicator-drag.d.ts +90 -0
- package/dist/primitives/indicator-drag.js +207 -0
- package/dist/primitives/indicator-drag.js.map +1 -0
- package/dist/primitives/interactive.d.ts +13 -0
- package/dist/primitives/interactive.js +67 -0
- package/dist/primitives/interactive.js.map +1 -0
- package/dist/primitives/item-row.d.ts +34 -0
- package/dist/primitives/item-row.js +76 -0
- package/dist/primitives/item-row.js.map +1 -0
- package/dist/primitives/item-update.d.ts +2 -0
- package/dist/primitives/item-update.js +12 -0
- package/dist/primitives/item-update.js.map +1 -0
- package/dist/primitives/kept-length.d.ts +34 -0
- package/dist/primitives/kept-length.js +154 -0
- package/dist/primitives/kept-length.js.map +1 -0
- package/dist/primitives/keyboard-convention.d.ts +30 -0
- package/dist/primitives/keyboard-convention.js +88 -0
- package/dist/primitives/keyboard-convention.js.map +1 -0
- package/dist/primitives/label-lines.d.ts +12 -0
- package/dist/primitives/label-lines.js +34 -0
- package/dist/primitives/label-lines.js.map +1 -0
- package/dist/primitives/layout-scale.d.ts +18 -0
- package/dist/primitives/layout-scale.js +35 -0
- package/dist/primitives/layout-scale.js.map +1 -0
- package/dist/primitives/link.d.ts +147 -0
- package/dist/primitives/link.js +204 -0
- package/dist/primitives/link.js.map +1 -0
- package/dist/primitives/locale-date.d.ts +132 -0
- package/dist/primitives/locale-date.js +508 -0
- package/dist/primitives/locale-date.js.map +1 -0
- package/dist/primitives/missing-value.d.ts +16 -0
- package/dist/primitives/missing-value.js +31 -0
- package/dist/primitives/missing-value.js.map +1 -0
- package/dist/primitives/modal.d.ts +38 -0
- package/dist/primitives/modal.js +175 -0
- package/dist/primitives/modal.js.map +1 -0
- package/dist/primitives/native-text.d.ts +51 -0
- package/dist/primitives/native-text.js +77 -0
- package/dist/primitives/native-text.js.map +1 -0
- package/dist/primitives/natural-height.d.ts +21 -0
- package/dist/primitives/natural-height.js +36 -0
- package/dist/primitives/natural-height.js.map +1 -0
- package/dist/primitives/option-list.d.ts +314 -0
- package/dist/primitives/option-list.js +1098 -0
- package/dist/primitives/option-list.js.map +1 -0
- package/dist/primitives/overlay-focus.d.ts +48 -0
- package/dist/primitives/overlay-focus.js +152 -0
- package/dist/primitives/overlay-focus.js.map +1 -0
- package/dist/primitives/placement.d.ts +131 -0
- package/dist/primitives/placement.js +144 -0
- package/dist/primitives/placement.js.map +1 -0
- package/dist/primitives/places.d.ts +44 -0
- package/dist/primitives/places.js +98 -0
- package/dist/primitives/places.js.map +1 -0
- package/dist/primitives/press.d.ts +90 -0
- package/dist/primitives/press.js +153 -0
- package/dist/primitives/press.js.map +1 -0
- package/dist/primitives/report.d.ts +17 -0
- package/dist/primitives/report.js +34 -0
- package/dist/primitives/report.js.map +1 -0
- package/dist/primitives/ripple.d.ts +40 -0
- package/dist/primitives/ripple.js +70 -0
- package/dist/primitives/ripple.js.map +1 -0
- package/dist/primitives/roving.d.ts +41 -0
- package/dist/primitives/roving.js +71 -0
- package/dist/primitives/roving.js.map +1 -0
- package/dist/primitives/selection.d.ts +134 -0
- package/dist/primitives/selection.js +287 -0
- package/dist/primitives/selection.js.map +1 -0
- package/dist/primitives/separation.d.ts +28 -0
- package/dist/primitives/separation.js +96 -0
- package/dist/primitives/separation.js.map +1 -0
- package/dist/primitives/shared-choice.d.ts +33 -0
- package/dist/primitives/shared-choice.js +110 -0
- package/dist/primitives/shared-choice.js.map +1 -0
- package/dist/primitives/sheet.d.ts +63 -0
- package/dist/primitives/sheet.js +139 -0
- package/dist/primitives/sheet.js.map +1 -0
- package/dist/primitives/sheets.d.ts +8 -0
- package/dist/primitives/sheets.js +96 -0
- package/dist/primitives/sheets.js.map +1 -0
- package/dist/primitives/states.d.ts +33 -0
- package/dist/primitives/states.js +30 -0
- package/dist/primitives/states.js.map +1 -0
- package/dist/primitives/system-watch.d.ts +9 -0
- package/dist/primitives/system-watch.js +29 -0
- package/dist/primitives/system-watch.js.map +1 -0
- package/dist/primitives/target.d.ts +21 -0
- package/dist/primitives/target.js +79 -0
- package/dist/primitives/target.js.map +1 -0
- package/dist/primitives/values.d.ts +6 -0
- package/dist/primitives/values.js +22 -0
- package/dist/primitives/values.js.map +1 -0
- package/dist/primitives/visibility.d.ts +12 -0
- package/dist/primitives/visibility.js +50 -0
- package/dist/primitives/visibility.js.map +1 -0
- package/dist/primitives/words.d.ts +81 -0
- package/dist/primitives/words.js +236 -0
- package/dist/primitives/words.js.map +1 -0
- package/dist/prose.css +1917 -0
- package/dist/registry.d.ts +182 -0
- package/dist/registry.js +2 -0
- package/dist/registry.js.map +1 -0
- package/dist/shape.css +21 -0
- package/dist/skeleton.css +428 -0
- package/dist/steps.css +231 -0
- package/dist/steps.d.ts +6 -0
- package/dist/steps.js +156 -0
- package/dist/steps.js.map +1 -0
- package/dist/styles/icons.d.ts +62 -0
- package/dist/styles/icons.js +237 -0
- package/dist/styles/icons.js.map +1 -0
- package/dist/styles/product-text.d.ts +66 -0
- package/dist/styles/product-text.js +114 -0
- package/dist/styles/product-text.js.map +1 -0
- package/dist/styles/registered-properties.d.ts +6 -0
- package/dist/styles/registered-properties.js +68 -0
- package/dist/styles/registered-properties.js.map +1 -0
- package/dist/styles/shape.d.ts +59 -0
- package/dist/styles/shape.js +95 -0
- package/dist/styles/shape.js.map +1 -0
- package/dist/systems/cupertino.css +8793 -0
- package/dist/systems/m3-expressive-like.css +8786 -0
- package/dist/systems/m3-like.css +8748 -0
- package/dist/table-of-contents.css +482 -0
- package/dist/table.css +902 -0
- package/dist/tanrei.bundle.js +26644 -0
- package/dist/tanrei.bundle.js.map +7 -0
- package/dist/text.css +104 -0
- package/dist/timeline.css +410 -0
- package/dist/timeline.d.ts +6 -0
- package/dist/timeline.js +176 -0
- package/dist/timeline.js.map +1 -0
- package/dist/tokens.css +8801 -0
- package/dist/tree-view.css +797 -0
- package/dist/words.d.ts +2 -0
- package/dist/words.js +6 -0
- package/dist/words.js.map +1 -0
- package/package.json +132 -3
package/dist/code.css
ADDED
|
@@ -0,0 +1,595 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code — the optional stylesheet `@tanrei/web/code.css`.
|
|
3
|
+
*
|
|
4
|
+
* INLINE CODE (specs/inline-code.spec.json, ICD-1 to ICD-16): a run of code inside a sentence — a command, a name, a
|
|
5
|
+
* value — in the code face at the size of the text around it, on a faint fill or plain. A class on the product's own
|
|
6
|
+
* element, not an element: the text is in the document, for search, find-in-page and copy, before any script runs.
|
|
7
|
+
*
|
|
8
|
+
* Run <code class="tanrei-code">npm install</code> first. tonal: the code face on a faint fill
|
|
9
|
+
* <code class="tanrei-code" data-variant="plain">comp.button</code> plain: the face alone, in the text's color
|
|
10
|
+
* <table data-tanrei-code="plain">…<code class="tanrei-code">size</code>… the nearest ancestor chooses (auto)
|
|
11
|
+
*
|
|
12
|
+
* The spec's `text` is the element's own content (its `textContent`), and `variant` is `data-variant`: `tonal` or `plain`; anything else — and no attribute — is `auto`, which takes what the nearest
|
|
13
|
+
* ancestor with `data-tanrei-code="plain | tonal"` chooses, and tonal where none does (ICD-5, ICD-16). Write
|
|
14
|
+
* `translate="no"` and `spellcheck="false"` on the element yourself, or have your renderer write them (ICD-7): a
|
|
15
|
+
* stylesheet cannot.
|
|
16
|
+
*
|
|
17
|
+
* Every value is a `--tanrei-comp-inline-code-*` token. It is text: no state, no focus, no event (ICD-11), one color
|
|
18
|
+
* (ICD-13).
|
|
19
|
+
*
|
|
20
|
+
* THE CODE BLOCK (specs/code-block.spec.json): the build (scripts/build.js) writes the code block's rules after these
|
|
21
|
+
* — a `tanrei-code-block` that is not upgraded yet, drawn where the element will draw it so that nothing moves when
|
|
22
|
+
* it is defined (src/components/code-block/code-block.before.ts), then the lines and the runs' colors
|
|
23
|
+
* (code-block.light.ts, which the element adopts too).
|
|
24
|
+
*
|
|
25
|
+
* HOW IT IS WRITTEN
|
|
26
|
+
*
|
|
27
|
+
* - Every rule of inline code is nested under ONE parent selector, `:where(.tanrei-code)`. The build writes the rules
|
|
28
|
+
* between the two `code:rules` marks a second time into dist/prose.css, under every `code` that is prose's own and
|
|
29
|
+
* not in a `pre` (PRS-16, PRS-17), so rendered Markdown needs no class; the rules between the `code:context` marks
|
|
30
|
+
* go with them; and it writes the corner-smoothing rule (src/styles/shape.ts) in place of the `code:shape`
|
|
31
|
+
* mark, so the curve has one source.
|
|
32
|
+
* - Every selector has no specificity (`:where()`), so one class of the product's wins, and so the ORDER of the rules
|
|
33
|
+
* is what decides between two of them.
|
|
34
|
+
* - The form is ONE inherited switch, `--_code-plain`: not set (the guaranteed-invalid value) the run is tonal, and
|
|
35
|
+
* every declaration below takes its tonal value from the fallback of `var(--_code-plain, …)`; set to an empty value
|
|
36
|
+
* the declaration is empty, which is invalid where it is computed, and the property is then what it would be
|
|
37
|
+
* without the rule — no fill, no padding, no edge, and the color of the text around it (ICD-4). An ancestor sets
|
|
38
|
+
* the switch for the runs inside it and the nearest one wins, as inheritance does; the run's own `data-variant`
|
|
39
|
+
* sets it last. No style query and no script.
|
|
40
|
+
* - Names that begin `--_code-` are private.
|
|
41
|
+
*/
|
|
42
|
+
@layer tanrei.components {
|
|
43
|
+
/* code:context */
|
|
44
|
+
/* ICD-5: what an ancestor chooses for the inline code inside it. */
|
|
45
|
+
:where([data-tanrei-code='plain']) {
|
|
46
|
+
--_code-plain: ;
|
|
47
|
+
}
|
|
48
|
+
:where([data-tanrei-code='tonal']) {
|
|
49
|
+
--_code-plain: initial;
|
|
50
|
+
}
|
|
51
|
+
/* code:context:end */
|
|
52
|
+
|
|
53
|
+
:where(.tanrei-code) {
|
|
54
|
+
/* code:rules */
|
|
55
|
+
/* ICD-1: the family, the weight and the letter spacing of the code role; the size of the text it sits in times
|
|
56
|
+
label.scale — a paragraph's, a heading's of any level, a caption's — never the code role's own size. */
|
|
57
|
+
font-family: var(--tanrei-comp-inline-code-label-typescale-font-family);
|
|
58
|
+
font-size: calc(1em * var(--tanrei-comp-inline-code-label-scale));
|
|
59
|
+
font-weight: var(--tanrei-comp-inline-code-label-typescale-font-weight);
|
|
60
|
+
letter-spacing: var(--tanrei-comp-inline-code-label-typescale-letter-spacing);
|
|
61
|
+
/* ICD-10: never slanted, whatever it sits in. */
|
|
62
|
+
font-style: normal;
|
|
63
|
+
/* ICD-2: on the baseline of its line, never making the line taller (PRS-17); the fill is the face's own text box,
|
|
64
|
+
with no padding above or below. */
|
|
65
|
+
line-height: 0;
|
|
66
|
+
vertical-align: baseline;
|
|
67
|
+
/* ICD-3: the tonal form — the fill, room at each end of every piece of the run (ICD-6), the text color, and an
|
|
68
|
+
edge inside the fill where outline.width is above 0. ICD-4: the plain form has none of them (see above). */
|
|
69
|
+
padding-inline: var(--_code-plain, var(--tanrei-comp-inline-code-container-padding-inline));
|
|
70
|
+
background-color: var(--_code-plain, var(--tanrei-comp-inline-code-container-color));
|
|
71
|
+
box-shadow: var(--_code-plain, inset 0 0 0 var(--tanrei-comp-inline-code-outline-width) var(--tanrei-comp-inline-code-outline-color));
|
|
72
|
+
color: var(--_code-plain, var(--tanrei-comp-inline-code-label-color));
|
|
73
|
+
-webkit-box-decoration-break: clone;
|
|
74
|
+
box-decoration-break: clone;
|
|
75
|
+
/* ICD-6: it wraps with its line — at its spaces first, and anywhere where a part with no space is longer than the
|
|
76
|
+
line; no hyphen is drawn. ICD-7: every space is kept and nothing is transformed; a line break is one space where
|
|
77
|
+
the browser knows `preserve-spaces`. */
|
|
78
|
+
white-space: pre-wrap;
|
|
79
|
+
white-space-collapse: preserve-spaces;
|
|
80
|
+
overflow-wrap: anywhere;
|
|
81
|
+
hyphens: none;
|
|
82
|
+
text-transform: none;
|
|
83
|
+
/* ICD-8: a left-to-right run of its own, isolated from the text around it, in every layout direction. */
|
|
84
|
+
direction: ltr;
|
|
85
|
+
unicode-bidi: isolate;
|
|
86
|
+
|
|
87
|
+
/* ICD-5: the run's own form, over an ancestor's. Any other value is auto (ICD-16). */
|
|
88
|
+
&:where([data-variant='plain']) {
|
|
89
|
+
--_code-plain: ;
|
|
90
|
+
}
|
|
91
|
+
&:where([data-variant='tonal']) {
|
|
92
|
+
--_code-plain: initial;
|
|
93
|
+
}
|
|
94
|
+
/* ICD-10: inside a link it takes the link's color in every form (the underline runs under it by itself); inside
|
|
95
|
+
strong text it gains sys.typescale.emphasis.body of weight, as strong text does (PRS-2). */
|
|
96
|
+
:where(a, .tanrei-link) & {
|
|
97
|
+
color: inherit;
|
|
98
|
+
}
|
|
99
|
+
:where(strong, b) & {
|
|
100
|
+
font-weight: calc(var(--tanrei-comp-inline-code-label-typescale-font-weight) + var(--tanrei-sys-typescale-emphasis-body));
|
|
101
|
+
}
|
|
102
|
+
/* ICD-16: with no text it draws nothing and takes no space. */
|
|
103
|
+
&:where(:empty) {
|
|
104
|
+
display: none;
|
|
105
|
+
}
|
|
106
|
+
/* ICD-3: the corners, eased by sys.shape.corner-smoothing. */
|
|
107
|
+
& {
|
|
108
|
+
--tanrei-corner-pill: 0;
|
|
109
|
+
}
|
|
110
|
+
& {
|
|
111
|
+
--_corner-scale: 1;
|
|
112
|
+
border-radius: calc(var(--tanrei-corner-radius) * var(--_corner-scale));
|
|
113
|
+
}
|
|
114
|
+
@supports (corner-shape: superellipse(log(2, 2))) {
|
|
115
|
+
& {
|
|
116
|
+
--_corner-smoothing: calc(var(--tanrei-sys-shape-corner-smoothing, 0) * (1 - var(--tanrei-corner-pill, 0)));
|
|
117
|
+
--_corner-scale: calc(1 + 0.4 * var(--_corner-smoothing));
|
|
118
|
+
corner-shape: superellipse(log(calc(2 + var(--_corner-smoothing)), 2));
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
&::before,
|
|
122
|
+
&::after {
|
|
123
|
+
corner-shape: inherit;
|
|
124
|
+
}
|
|
125
|
+
& {
|
|
126
|
+
--tanrei-corner-radius: var(--tanrei-comp-inline-code-container-shape);
|
|
127
|
+
--tanrei-corner-pill: var(--tanrei-comp-inline-code-container-shape-pill, 0);
|
|
128
|
+
}
|
|
129
|
+
/* ICD-14: forced colors remove the fill and the shadow; the face tells code from words. An edge is drawn only
|
|
130
|
+
where outline.width is above 0, in the text color (the link color inside a link), inside the run's box. */
|
|
131
|
+
@media (forced-colors: active) {
|
|
132
|
+
& {
|
|
133
|
+
outline: var(--_code-plain, var(--tanrei-comp-inline-code-outline-width) solid currentColor);
|
|
134
|
+
outline-offset: calc(var(--tanrei-comp-inline-code-outline-width) * -1);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
/* code:rules:end */
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* The code block: a block that is not upgraded, drawn where the element will draw it; then the lines and the runs (src/components/code-block/code-block.before.ts, code-block.light.ts). */
|
|
142
|
+
@layer tanrei.components {
|
|
143
|
+
/* ── A block that is not upgraded (no script yet, or none at all) is drawn where the element will draw it, so that
|
|
144
|
+
NOTHING MOVES WHEN THE ELEMENT IS DEFINED: the fill, the corners, the paddings and the face (COD-1 to COD-4); the
|
|
145
|
+
header's row, with the title and the language label drawn from their attributes (COD-8); the room of the copy
|
|
146
|
+
button, at the end of the header or beside the lines, on the side the layout direction puts it (COD-9, COD-10,
|
|
147
|
+
COD-20); and the lines. The copy button itself, and the focus stop of a body that scrolls, need the element.
|
|
148
|
+
|
|
149
|
+
What stands beside a line — its number, its sign, its prompt, its mark — is drawn by the rules of "Lines" below,
|
|
150
|
+
which do not ask whether the element is defined: lines written where the page was made (highlightToHtml or
|
|
151
|
+
highlightToNodes with the block's props as `lines`) are whole before any script runs. Code that is text, or lines
|
|
152
|
+
without a box for their code, cannot be given them by a stylesheet (a line's generated content cannot read the
|
|
153
|
+
block's attribute, and a number's column is as wide as the last number): there the room is kept as nearly as an
|
|
154
|
+
attribute can say — a prompt of one character, numbers of one digit, a sign — and the marks arrive with the
|
|
155
|
+
element. ─────────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
156
|
+
tanrei-code-block:not(:defined) {
|
|
157
|
+
--_code-block-font: var(--tanrei-comp-code-block-code-typescale-medium-font);
|
|
158
|
+
--_code-block-tracking: var(--tanrei-comp-code-block-code-typescale-medium-letter-spacing);
|
|
159
|
+
--_code-block-weight: var(--tanrei-comp-code-block-code-typescale-medium-font-weight);
|
|
160
|
+
--_code-block-pad-block: var(--tanrei-comp-code-block-container-padding-block-medium);
|
|
161
|
+
--_code-block-pad-inline: var(--tanrei-comp-code-block-container-padding-inline-medium);
|
|
162
|
+
}
|
|
163
|
+
tanrei-code-block:not(:defined)[size='small'] {
|
|
164
|
+
--_code-block-font: var(--tanrei-comp-code-block-code-typescale-small-font);
|
|
165
|
+
--_code-block-tracking: var(--tanrei-comp-code-block-code-typescale-small-letter-spacing);
|
|
166
|
+
--_code-block-weight: var(--tanrei-comp-code-block-code-typescale-small-font-weight);
|
|
167
|
+
--_code-block-pad-block: var(--tanrei-comp-code-block-container-padding-block-small);
|
|
168
|
+
--_code-block-pad-inline: var(--tanrei-comp-code-block-container-padding-inline-small);
|
|
169
|
+
}
|
|
170
|
+
tanrei-code-block:not(:defined) {
|
|
171
|
+
--_code-block-container: var(--tanrei-comp-code-block-filled-container-color);
|
|
172
|
+
--_code-block-ground: var(--_code-block-container);
|
|
173
|
+
}
|
|
174
|
+
tanrei-code-block:not(:defined)[variant='outlined'] {
|
|
175
|
+
--_code-block-container: var(--tanrei-comp-code-block-outlined-container-color);
|
|
176
|
+
--_code-block-ground: var(--tanrei-code-block-ground, var(--tanrei-sys-color-surface));
|
|
177
|
+
}
|
|
178
|
+
tanrei-code-block:not(:defined) {
|
|
179
|
+
--_code-block-pad-top: var(--_code-block-pad-block);
|
|
180
|
+
--_code-block-pad-start: var(--_code-block-pad-inline);
|
|
181
|
+
--_code-block-pad-end: var(--_code-block-pad-inline);
|
|
182
|
+
}
|
|
183
|
+
tanrei-code-block:not(:defined) {
|
|
184
|
+
display: block;
|
|
185
|
+
min-inline-size: 0;
|
|
186
|
+
max-inline-size: 100%;
|
|
187
|
+
border-radius: var(--tanrei-comp-code-block-container-shape);
|
|
188
|
+
background: var(--_code-block-container);
|
|
189
|
+
}
|
|
190
|
+
tanrei-code-block:not(:defined)[hidden] {
|
|
191
|
+
display: none;
|
|
192
|
+
}
|
|
193
|
+
tanrei-code-block:not(:defined)[variant='outlined'] {
|
|
194
|
+
box-shadow: inset 0 0 0 var(--tanrei-comp-code-block-outline-width) var(--tanrei-comp-code-block-outline-color);
|
|
195
|
+
}
|
|
196
|
+
/* COD-9: at least as tall as the copy button and its inset above and below. */
|
|
197
|
+
tanrei-code-block:not(:defined)[copy] {
|
|
198
|
+
min-block-size: calc(var(--tanrei-comp-button-container-height-small) + var(--tanrei-comp-code-block-copy-button-inset) * 2);
|
|
199
|
+
}
|
|
200
|
+
/* COD-10: without a header the padding at the copy button's side is widened by the button and its inset. COD-20: in a
|
|
201
|
+
right-to-left layout that side is the left, where the lines begin. */
|
|
202
|
+
tanrei-code-block:not(:defined)[copy]:not(:is([title]:not([title='']), [language-label]:not([language-label='']))) {
|
|
203
|
+
--_code-block-pad-end: calc(var(--_code-block-pad-inline) + var(--tanrei-comp-button-container-height-small) + var(--tanrei-comp-code-block-copy-button-inset));
|
|
204
|
+
}
|
|
205
|
+
tanrei-code-block:not(:defined)[copy]:not(:is([title]:not([title='']), [language-label]:not([language-label='']))):dir(rtl) {
|
|
206
|
+
--_code-block-pad-start: calc(var(--_code-block-pad-inline) + var(--tanrei-comp-button-container-height-small) + var(--tanrei-comp-code-block-copy-button-inset));
|
|
207
|
+
--_code-block-pad-end: var(--_code-block-pad-inline);
|
|
208
|
+
}
|
|
209
|
+
/* COD-8: the header's row, kept and drawn — the title at the start, cut with an ellipsis in its own direction, and
|
|
210
|
+
the language label at the end, each in its text style and centred in a row that begins copy-button.inset from the
|
|
211
|
+
top and is as tall as the tallest of them and of the copy button; the code begins header.padding-block-end below
|
|
212
|
+
it. Two columns: the title's, which takes what is left, and the end's — the gap after the title's space, the
|
|
213
|
+
label, and the room of the copy button copy-button.inset from the end edge. */
|
|
214
|
+
tanrei-code-block:not(:defined):is([title]:not([title='']), [language-label]:not([language-label=''])) {
|
|
215
|
+
--_code-block-pad-top: var(--tanrei-comp-code-block-header-padding-block-end);
|
|
216
|
+
display: grid;
|
|
217
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
218
|
+
align-content: start;
|
|
219
|
+
align-items: center;
|
|
220
|
+
column-gap: var(--tanrei-comp-code-block-header-gap);
|
|
221
|
+
}
|
|
222
|
+
tanrei-code-block:not(:defined):is([title]:not([title='']), [language-label]:not([language-label=''])) > pre {
|
|
223
|
+
grid-area: 2 / 1 / auto / -1;
|
|
224
|
+
min-inline-size: 0;
|
|
225
|
+
}
|
|
226
|
+
tanrei-code-block:not(:defined)[title]:not([title=''])::before {
|
|
227
|
+
content: attr(title);
|
|
228
|
+
grid-area: 1 / 1;
|
|
229
|
+
justify-self: start;
|
|
230
|
+
overflow: hidden;
|
|
231
|
+
box-sizing: border-box;
|
|
232
|
+
max-inline-size: 100%;
|
|
233
|
+
margin-block-start: var(--tanrei-comp-code-block-copy-button-inset);
|
|
234
|
+
padding-inline-start: var(--_code-block-pad-inline);
|
|
235
|
+
font: var(--tanrei-comp-code-block-title-typescale-font);
|
|
236
|
+
letter-spacing: var(--tanrei-comp-code-block-title-typescale-letter-spacing);
|
|
237
|
+
color: var(--tanrei-comp-code-block-title-color);
|
|
238
|
+
text-overflow: ellipsis;
|
|
239
|
+
white-space: nowrap;
|
|
240
|
+
unicode-bidi: plaintext;
|
|
241
|
+
}
|
|
242
|
+
tanrei-code-block:not(:defined):is([title]:not([title='']), [language-label]:not([language-label='']))::after {
|
|
243
|
+
content: attr(language-label);
|
|
244
|
+
grid-area: 1 / 2;
|
|
245
|
+
display: flex;
|
|
246
|
+
align-items: center;
|
|
247
|
+
margin-block-start: var(--tanrei-comp-code-block-copy-button-inset);
|
|
248
|
+
margin-inline-end: var(--_code-block-pad-inline);
|
|
249
|
+
font: var(--tanrei-comp-code-block-language-typescale-font);
|
|
250
|
+
letter-spacing: var(--tanrei-comp-code-block-language-typescale-letter-spacing);
|
|
251
|
+
color: var(--tanrei-comp-code-block-language-color);
|
|
252
|
+
white-space: nowrap;
|
|
253
|
+
}
|
|
254
|
+
tanrei-code-block:not(:defined):is([title]:not([title='']), [language-label]:not([language-label=''])):is([copy], [language-label]:not([language-label='']))::after {
|
|
255
|
+
padding-inline-start: var(--tanrei-comp-code-block-header-gap);
|
|
256
|
+
}
|
|
257
|
+
tanrei-code-block:not(:defined):is([title]:not([title='']), [language-label]:not([language-label='']))[copy]::after {
|
|
258
|
+
min-block-size: var(--tanrei-comp-button-container-height-small);
|
|
259
|
+
margin-inline-end: var(--tanrei-comp-code-block-copy-button-inset);
|
|
260
|
+
padding-inline-end: var(--tanrei-comp-button-container-height-small);
|
|
261
|
+
}
|
|
262
|
+
tanrei-code-block:not(:defined)[language-label]:not([language-label=''])[copy]::after {
|
|
263
|
+
padding-inline-end: calc(var(--tanrei-comp-code-block-header-gap) + var(--tanrei-comp-button-container-height-small));
|
|
264
|
+
}
|
|
265
|
+
/* COD-4: a line that does not fit scrolls inside the block; what scrolls is as wide as its longest line, so a line's
|
|
266
|
+
band reaches the end of it. COD-5: wrapped, as wide as the block. */
|
|
267
|
+
tanrei-code-block:not(:defined) > pre {
|
|
268
|
+
overflow-x: auto;
|
|
269
|
+
}
|
|
270
|
+
tanrei-code-block:not(:defined):not([wrap]) > pre > code {
|
|
271
|
+
inline-size: max-content;
|
|
272
|
+
min-inline-size: 100%;
|
|
273
|
+
}
|
|
274
|
+
tanrei-code-block:not(:defined)[wrap] > pre {
|
|
275
|
+
white-space: pre-wrap;
|
|
276
|
+
overflow-wrap: anywhere;
|
|
277
|
+
}
|
|
278
|
+
/* Code that is not in the element's lines: the paddings are the pre's, and a line a highlighter wrote without a box
|
|
279
|
+
for its code is its text and nothing else. Before the first character of each line, the room of what the element
|
|
280
|
+
will draw there, as nearly as the attributes say it: a prompt of one character and its space (COD-17); a gutter of
|
|
281
|
+
one-digit numbers, of signs, or of both, and the gap after it (COD-13, COD-16). */
|
|
282
|
+
tanrei-code-block:not(:defined) {
|
|
283
|
+
--_code-block-room-prompt: 0px;
|
|
284
|
+
--_code-block-room-gutter: 0px;
|
|
285
|
+
}
|
|
286
|
+
tanrei-code-block:not(:defined)[prompt]:not([prompt='']) {
|
|
287
|
+
--_code-block-room-prompt: 2ch;
|
|
288
|
+
}
|
|
289
|
+
tanrei-code-block:not(:defined):is([line-numbers], [added-lines]:not([added-lines='']), [removed-lines]:not([removed-lines=''])) {
|
|
290
|
+
--_code-block-room-gutter: calc(1ch + var(--tanrei-comp-code-block-line-number-gap));
|
|
291
|
+
}
|
|
292
|
+
tanrei-code-block:not(:defined)[line-numbers]:is([added-lines]:not([added-lines='']), [removed-lines]:not([removed-lines=''])) {
|
|
293
|
+
--_code-block-room-gutter: calc(3ch + var(--tanrei-comp-code-block-line-number-gap));
|
|
294
|
+
}
|
|
295
|
+
tanrei-code-block:not(:defined) > pre:not(:has([data-line-code])) {
|
|
296
|
+
padding-inline: calc(var(--_code-block-pad-start) + var(--_code-block-room-gutter) + var(--_code-block-room-prompt)) var(--_code-block-pad-end);
|
|
297
|
+
}
|
|
298
|
+
tanrei-code-block:not(:defined) [data-line]:not(:has([data-line-code])) {
|
|
299
|
+
position: static;
|
|
300
|
+
display: inline;
|
|
301
|
+
padding: 0;
|
|
302
|
+
background: none;
|
|
303
|
+
}
|
|
304
|
+
/* COD-6: no more than max-lines lines of the code's text style and the paddings; more scroll up and down inside the
|
|
305
|
+
block. The number is the attribute's, read as a number where the browser can (any number, rounded down) and
|
|
306
|
+
counted otherwise (1 to 50); a value neither gives, or one below 1, shows every line, as the element does for a
|
|
307
|
+
value it cannot use. */
|
|
308
|
+
tanrei-code-block:not(:defined)[max-lines] > pre {
|
|
309
|
+
max-block-size: calc(var(--_code-block-max-lines) * 1lh + var(--_code-block-pad-top) + var(--_code-block-pad-block));
|
|
310
|
+
}
|
|
311
|
+
tanrei-code-block:not(:defined)[max-lines='1'] { --_code-block-max-lines: 1; }
|
|
312
|
+
tanrei-code-block:not(:defined)[max-lines='2'] { --_code-block-max-lines: 2; }
|
|
313
|
+
tanrei-code-block:not(:defined)[max-lines='3'] { --_code-block-max-lines: 3; }
|
|
314
|
+
tanrei-code-block:not(:defined)[max-lines='4'] { --_code-block-max-lines: 4; }
|
|
315
|
+
tanrei-code-block:not(:defined)[max-lines='5'] { --_code-block-max-lines: 5; }
|
|
316
|
+
tanrei-code-block:not(:defined)[max-lines='6'] { --_code-block-max-lines: 6; }
|
|
317
|
+
tanrei-code-block:not(:defined)[max-lines='7'] { --_code-block-max-lines: 7; }
|
|
318
|
+
tanrei-code-block:not(:defined)[max-lines='8'] { --_code-block-max-lines: 8; }
|
|
319
|
+
tanrei-code-block:not(:defined)[max-lines='9'] { --_code-block-max-lines: 9; }
|
|
320
|
+
tanrei-code-block:not(:defined)[max-lines='10'] { --_code-block-max-lines: 10; }
|
|
321
|
+
tanrei-code-block:not(:defined)[max-lines='11'] { --_code-block-max-lines: 11; }
|
|
322
|
+
tanrei-code-block:not(:defined)[max-lines='12'] { --_code-block-max-lines: 12; }
|
|
323
|
+
tanrei-code-block:not(:defined)[max-lines='13'] { --_code-block-max-lines: 13; }
|
|
324
|
+
tanrei-code-block:not(:defined)[max-lines='14'] { --_code-block-max-lines: 14; }
|
|
325
|
+
tanrei-code-block:not(:defined)[max-lines='15'] { --_code-block-max-lines: 15; }
|
|
326
|
+
tanrei-code-block:not(:defined)[max-lines='16'] { --_code-block-max-lines: 16; }
|
|
327
|
+
tanrei-code-block:not(:defined)[max-lines='17'] { --_code-block-max-lines: 17; }
|
|
328
|
+
tanrei-code-block:not(:defined)[max-lines='18'] { --_code-block-max-lines: 18; }
|
|
329
|
+
tanrei-code-block:not(:defined)[max-lines='19'] { --_code-block-max-lines: 19; }
|
|
330
|
+
tanrei-code-block:not(:defined)[max-lines='20'] { --_code-block-max-lines: 20; }
|
|
331
|
+
tanrei-code-block:not(:defined)[max-lines='21'] { --_code-block-max-lines: 21; }
|
|
332
|
+
tanrei-code-block:not(:defined)[max-lines='22'] { --_code-block-max-lines: 22; }
|
|
333
|
+
tanrei-code-block:not(:defined)[max-lines='23'] { --_code-block-max-lines: 23; }
|
|
334
|
+
tanrei-code-block:not(:defined)[max-lines='24'] { --_code-block-max-lines: 24; }
|
|
335
|
+
tanrei-code-block:not(:defined)[max-lines='25'] { --_code-block-max-lines: 25; }
|
|
336
|
+
tanrei-code-block:not(:defined)[max-lines='26'] { --_code-block-max-lines: 26; }
|
|
337
|
+
tanrei-code-block:not(:defined)[max-lines='27'] { --_code-block-max-lines: 27; }
|
|
338
|
+
tanrei-code-block:not(:defined)[max-lines='28'] { --_code-block-max-lines: 28; }
|
|
339
|
+
tanrei-code-block:not(:defined)[max-lines='29'] { --_code-block-max-lines: 29; }
|
|
340
|
+
tanrei-code-block:not(:defined)[max-lines='30'] { --_code-block-max-lines: 30; }
|
|
341
|
+
tanrei-code-block:not(:defined)[max-lines='31'] { --_code-block-max-lines: 31; }
|
|
342
|
+
tanrei-code-block:not(:defined)[max-lines='32'] { --_code-block-max-lines: 32; }
|
|
343
|
+
tanrei-code-block:not(:defined)[max-lines='33'] { --_code-block-max-lines: 33; }
|
|
344
|
+
tanrei-code-block:not(:defined)[max-lines='34'] { --_code-block-max-lines: 34; }
|
|
345
|
+
tanrei-code-block:not(:defined)[max-lines='35'] { --_code-block-max-lines: 35; }
|
|
346
|
+
tanrei-code-block:not(:defined)[max-lines='36'] { --_code-block-max-lines: 36; }
|
|
347
|
+
tanrei-code-block:not(:defined)[max-lines='37'] { --_code-block-max-lines: 37; }
|
|
348
|
+
tanrei-code-block:not(:defined)[max-lines='38'] { --_code-block-max-lines: 38; }
|
|
349
|
+
tanrei-code-block:not(:defined)[max-lines='39'] { --_code-block-max-lines: 39; }
|
|
350
|
+
tanrei-code-block:not(:defined)[max-lines='40'] { --_code-block-max-lines: 40; }
|
|
351
|
+
tanrei-code-block:not(:defined)[max-lines='41'] { --_code-block-max-lines: 41; }
|
|
352
|
+
tanrei-code-block:not(:defined)[max-lines='42'] { --_code-block-max-lines: 42; }
|
|
353
|
+
tanrei-code-block:not(:defined)[max-lines='43'] { --_code-block-max-lines: 43; }
|
|
354
|
+
tanrei-code-block:not(:defined)[max-lines='44'] { --_code-block-max-lines: 44; }
|
|
355
|
+
tanrei-code-block:not(:defined)[max-lines='45'] { --_code-block-max-lines: 45; }
|
|
356
|
+
tanrei-code-block:not(:defined)[max-lines='46'] { --_code-block-max-lines: 46; }
|
|
357
|
+
tanrei-code-block:not(:defined)[max-lines='47'] { --_code-block-max-lines: 47; }
|
|
358
|
+
tanrei-code-block:not(:defined)[max-lines='48'] { --_code-block-max-lines: 48; }
|
|
359
|
+
tanrei-code-block:not(:defined)[max-lines='49'] { --_code-block-max-lines: 49; }
|
|
360
|
+
tanrei-code-block:not(:defined)[max-lines='50'] { --_code-block-max-lines: 50; }
|
|
361
|
+
@supports (x: attr(x type(*))) {
|
|
362
|
+
tanrei-code-block:not(:defined)[max-lines] {
|
|
363
|
+
--_code-block-max-lines: round(down, attr(max-lines type(<number>)), 1);
|
|
364
|
+
}
|
|
365
|
+
tanrei-code-block:not(:defined):is([max-lines='0'], [max-lines^='0.'], [max-lines^='-'], [max-lines='']) {
|
|
366
|
+
--_code-block-max-lines: initial;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
/* COD-23: forced colors remove every fill, so every look gains the edge, in the platform's text color — inside the
|
|
370
|
+
block's size, so that nothing moves for it. */
|
|
371
|
+
@media (forced-colors: active) {
|
|
372
|
+
tanrei-code-block:not(:defined) {
|
|
373
|
+
outline: var(--tanrei-comp-code-block-outline-width) solid CanvasText;
|
|
374
|
+
outline-offset: calc(var(--tanrei-comp-code-block-outline-width) * -1);
|
|
375
|
+
box-shadow: none;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
@layer tanrei.components {
|
|
380
|
+
/* The mark of these rules on the block itself: the element asks for it before it adds them to a root a second time. */
|
|
381
|
+
tanrei-code-block {
|
|
382
|
+
--_code-block-light: yes;
|
|
383
|
+
}
|
|
384
|
+
/* ── The code (COD-2, COD-3, COD-20): the product's pre and code, whatever the page says of those two elements. ───── */
|
|
385
|
+
tanrei-code-block > pre {
|
|
386
|
+
box-sizing: border-box;
|
|
387
|
+
margin: 0;
|
|
388
|
+
border: 0;
|
|
389
|
+
border-radius: 0;
|
|
390
|
+
padding-block: var(--_code-block-pad-top) var(--_code-block-pad-block);
|
|
391
|
+
background: none;
|
|
392
|
+
font: var(--_code-block-font);
|
|
393
|
+
letter-spacing: var(--_code-block-tracking);
|
|
394
|
+
color: var(--tanrei-comp-code-block-code-color);
|
|
395
|
+
tab-size: var(--tanrei-comp-code-block-code-tab-size);
|
|
396
|
+
white-space: pre;
|
|
397
|
+
hyphens: none;
|
|
398
|
+
text-transform: none;
|
|
399
|
+
text-align: left;
|
|
400
|
+
direction: ltr;
|
|
401
|
+
unicode-bidi: isolate;
|
|
402
|
+
}
|
|
403
|
+
/* COD-4: as wide as its longest line and never narrower than the body, so a line's band and the padding after the
|
|
404
|
+
longest line reach the end of what scrolls. COD-5: wrapped, it is as wide as the body. */
|
|
405
|
+
tanrei-code-block:defined:not([wrap]) > pre {
|
|
406
|
+
inline-size: max-content;
|
|
407
|
+
min-inline-size: 100%;
|
|
408
|
+
}
|
|
409
|
+
tanrei-code-block > pre > code {
|
|
410
|
+
display: block;
|
|
411
|
+
margin: 0;
|
|
412
|
+
border: 0;
|
|
413
|
+
border-radius: 0;
|
|
414
|
+
padding: 0;
|
|
415
|
+
background: none;
|
|
416
|
+
box-shadow: none;
|
|
417
|
+
font: inherit;
|
|
418
|
+
letter-spacing: inherit;
|
|
419
|
+
color: inherit;
|
|
420
|
+
white-space: inherit;
|
|
421
|
+
overflow-wrap: inherit;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/* ── Lines. Every line is a box (data-line) that holds what is drawn beside the code — the gutter, the prompt, a
|
|
425
|
+
mark's label — and the code itself (data-line-code), without adding a character to the code. The element makes
|
|
426
|
+
them; a page made with highlightToHtml or highlightToNodes has them already, and these rules draw them the same
|
|
427
|
+
whether the element is defined or not. ─────────────────────────────────────────────────────────────────────────── */
|
|
428
|
+
tanrei-code-block [data-line] {
|
|
429
|
+
position: relative;
|
|
430
|
+
display: flex;
|
|
431
|
+
padding-inline: var(--_code-block-pad-start) var(--_code-block-pad-end);
|
|
432
|
+
}
|
|
433
|
+
/* COD-3: where there is a gutter the padding is before it, and the gutter holds it. */
|
|
434
|
+
tanrei-code-block [data-line]:has(> [data-line-gutter]) {
|
|
435
|
+
padding-inline-start: 0;
|
|
436
|
+
}
|
|
437
|
+
/* An empty line is one line high. COD-4: a line is never broken, and is as long as its code. */
|
|
438
|
+
tanrei-code-block [data-line-code] {
|
|
439
|
+
flex: 1 0 auto;
|
|
440
|
+
min-block-size: 1lh;
|
|
441
|
+
}
|
|
442
|
+
/* COD-5: a line that does not fit continues on following rows, broken at its spaces first and anywhere where a part
|
|
443
|
+
has none; the rows begin where the line's code begins, because the gutter and the prompt stand beside the code. */
|
|
444
|
+
tanrei-code-block[wrap] [data-line-code] {
|
|
445
|
+
flex: 1 1 0;
|
|
446
|
+
min-inline-size: 0;
|
|
447
|
+
white-space: pre-wrap;
|
|
448
|
+
overflow-wrap: anywhere;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/* COD-13: the gutter — from the left: the bar's column, the numbers, the signs. It stays in view, on the block's
|
|
452
|
+
ground, while the code scrolls sideways under it; it is as tall as its line, and its number and sign are on the
|
|
453
|
+
line's first row. Drawn, not text: generated content with an empty alternative text, never selected. */
|
|
454
|
+
tanrei-code-block [data-line-gutter] {
|
|
455
|
+
position: sticky;
|
|
456
|
+
left: 0;
|
|
457
|
+
flex: none;
|
|
458
|
+
box-sizing: border-box;
|
|
459
|
+
min-inline-size: var(--_code-block-pad-start);
|
|
460
|
+
padding-inline-start: var(--_code-block-pad-start);
|
|
461
|
+
background: var(--_code-block-band, var(--_code-block-ground));
|
|
462
|
+
color: var(--tanrei-comp-code-block-line-number-color);
|
|
463
|
+
font-variant-numeric: tabular-nums;
|
|
464
|
+
white-space: pre;
|
|
465
|
+
user-select: none;
|
|
466
|
+
-webkit-user-select: none;
|
|
467
|
+
}
|
|
468
|
+
tanrei-code-block [data-line-gutter]:is([data-number], [data-sign]) {
|
|
469
|
+
padding-inline-end: var(--tanrei-comp-code-block-line-number-gap);
|
|
470
|
+
}
|
|
471
|
+
tanrei-code-block [data-line-gutter][data-number]::before {
|
|
472
|
+
content: attr(data-number);
|
|
473
|
+
content: attr(data-number) / '';
|
|
474
|
+
}
|
|
475
|
+
/* COD-16: the sign, after the numbers, in the mark's color — in a column one character wide, whatever the sign's own
|
|
476
|
+
glyph is: a face that has no minus takes it from another face, whose minus is as wide as that face made it, and a
|
|
477
|
+
removed line's code would begin beside the other lines' (and move when the element is defined: the room a block
|
|
478
|
+
that is not upgraded keeps is this character). */
|
|
479
|
+
tanrei-code-block [data-line-gutter][data-sign]::after {
|
|
480
|
+
content: attr(data-sign);
|
|
481
|
+
content: attr(data-sign) / '';
|
|
482
|
+
display: inline-block;
|
|
483
|
+
inline-size: 1ch;
|
|
484
|
+
text-align: center;
|
|
485
|
+
color: var(--_code-block-mark, inherit);
|
|
486
|
+
}
|
|
487
|
+
tanrei-code-block [data-line-gutter][data-number][data-sign]::after {
|
|
488
|
+
margin-inline-start: 1ch;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/* COD-15, COD-16: a marked line — a bar at the block's left edge as tall as the line, in the mark's color; a
|
|
492
|
+
highlighted line has a band behind all of its rows as well. The code keeps its colors. */
|
|
493
|
+
tanrei-code-block [data-line][data-highlighted] {
|
|
494
|
+
--_code-block-mark: var(--tanrei-comp-code-block-line-highlighted-mark-color);
|
|
495
|
+
--_code-block-band: var(--tanrei-comp-code-block-line-highlighted-container-color);
|
|
496
|
+
background: var(--_code-block-band);
|
|
497
|
+
}
|
|
498
|
+
tanrei-code-block [data-line][data-added] {
|
|
499
|
+
--_code-block-mark: var(--tanrei-comp-code-block-line-added-mark-color);
|
|
500
|
+
}
|
|
501
|
+
tanrei-code-block [data-line][data-removed] {
|
|
502
|
+
--_code-block-mark: var(--tanrei-comp-code-block-line-removed-mark-color);
|
|
503
|
+
}
|
|
504
|
+
tanrei-code-block [data-line]:is([data-highlighted], [data-added], [data-removed]) > [data-line-gutter] {
|
|
505
|
+
background:
|
|
506
|
+
linear-gradient(var(--_code-block-mark), var(--_code-block-mark)) left top / var(--tanrei-comp-code-block-line-mark-width) 100% no-repeat,
|
|
507
|
+
var(--_code-block-band, var(--_code-block-ground));
|
|
508
|
+
}
|
|
509
|
+
/* The label of a mark, in words, read before the line's code and never drawn or selected. */
|
|
510
|
+
tanrei-code-block [data-line-label] {
|
|
511
|
+
position: absolute;
|
|
512
|
+
overflow: hidden;
|
|
513
|
+
inline-size: 1px;
|
|
514
|
+
block-size: 1px;
|
|
515
|
+
clip-path: inset(50%);
|
|
516
|
+
white-space: nowrap;
|
|
517
|
+
user-select: none;
|
|
518
|
+
-webkit-user-select: none;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
/* COD-17: the prompt and one space, before the first row of a line that is not empty; drawn, not text. */
|
|
522
|
+
tanrei-code-block [data-line-prompt] {
|
|
523
|
+
flex: none;
|
|
524
|
+
color: var(--tanrei-comp-code-block-prompt-color);
|
|
525
|
+
white-space: pre;
|
|
526
|
+
user-select: none;
|
|
527
|
+
-webkit-user-select: none;
|
|
528
|
+
}
|
|
529
|
+
tanrei-code-block [data-line-prompt]::before {
|
|
530
|
+
content: attr(data-prompt) ' ';
|
|
531
|
+
content: attr(data-prompt) ' ' / '';
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
/* ── Runs (COD-18): a syntax role changes a run's color and its weight, and nothing else — so highlighted code and the
|
|
535
|
+
same code drawn plain have the same lines and columns, and colors that arrive move nothing (COD-28). One rule per
|
|
536
|
+
value of the syntax axis; an unknown role is plain (COD-19). ──────────────────────────────────────────────────── */
|
|
537
|
+
tanrei-code-block [data-syntax='comment'] {
|
|
538
|
+
color: var(--tanrei-comp-code-block-syntax-color-comment);
|
|
539
|
+
font-weight: calc(var(--_code-block-weight) + var(--tanrei-comp-code-block-syntax-emphasis-comment, 0));
|
|
540
|
+
}
|
|
541
|
+
tanrei-code-block [data-syntax='keyword'] {
|
|
542
|
+
color: var(--tanrei-comp-code-block-syntax-color-keyword);
|
|
543
|
+
font-weight: calc(var(--_code-block-weight) + var(--tanrei-comp-code-block-syntax-emphasis-keyword, 0));
|
|
544
|
+
}
|
|
545
|
+
tanrei-code-block [data-syntax='string'] {
|
|
546
|
+
color: var(--tanrei-comp-code-block-syntax-color-string);
|
|
547
|
+
font-weight: calc(var(--_code-block-weight) + var(--tanrei-comp-code-block-syntax-emphasis-string, 0));
|
|
548
|
+
}
|
|
549
|
+
tanrei-code-block [data-syntax='constant'] {
|
|
550
|
+
color: var(--tanrei-comp-code-block-syntax-color-constant);
|
|
551
|
+
font-weight: calc(var(--_code-block-weight) + var(--tanrei-comp-code-block-syntax-emphasis-constant, 0));
|
|
552
|
+
}
|
|
553
|
+
tanrei-code-block [data-syntax='function'] {
|
|
554
|
+
color: var(--tanrei-comp-code-block-syntax-color-function);
|
|
555
|
+
font-weight: calc(var(--_code-block-weight) + var(--tanrei-comp-code-block-syntax-emphasis-function, 0));
|
|
556
|
+
}
|
|
557
|
+
tanrei-code-block [data-syntax='type'] {
|
|
558
|
+
color: var(--tanrei-comp-code-block-syntax-color-type);
|
|
559
|
+
font-weight: calc(var(--_code-block-weight) + var(--tanrei-comp-code-block-syntax-emphasis-type, 0));
|
|
560
|
+
}
|
|
561
|
+
tanrei-code-block [data-syntax='tag'] {
|
|
562
|
+
color: var(--tanrei-comp-code-block-syntax-color-tag);
|
|
563
|
+
font-weight: calc(var(--_code-block-weight) + var(--tanrei-comp-code-block-syntax-emphasis-tag, 0));
|
|
564
|
+
}
|
|
565
|
+
tanrei-code-block [data-syntax='property'] {
|
|
566
|
+
color: var(--tanrei-comp-code-block-syntax-color-property);
|
|
567
|
+
font-weight: calc(var(--_code-block-weight) + var(--tanrei-comp-code-block-syntax-emphasis-property, 0));
|
|
568
|
+
}
|
|
569
|
+
tanrei-code-block [data-syntax='punctuation'] {
|
|
570
|
+
color: var(--tanrei-comp-code-block-syntax-color-punctuation);
|
|
571
|
+
font-weight: calc(var(--_code-block-weight) + var(--tanrei-comp-code-block-syntax-emphasis-punctuation, 0));
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/* ── Forced colors (COD-23): the code is the platform's text color whatever its role (the mode's own doing; every run
|
|
575
|
+
keeps the weight of its role); no band; the bar, the numbers and the signs in the text color. The gutter's bar is a gradient,
|
|
576
|
+
which the mode would remove, so the gutter is drawn in system colors by name. ───────────────────────────────────── */
|
|
577
|
+
@media (forced-colors: active) {
|
|
578
|
+
tanrei-code-block [data-line][data-highlighted] {
|
|
579
|
+
background: none;
|
|
580
|
+
}
|
|
581
|
+
tanrei-code-block [data-line-gutter] {
|
|
582
|
+
forced-color-adjust: none;
|
|
583
|
+
background: Canvas;
|
|
584
|
+
color: CanvasText;
|
|
585
|
+
}
|
|
586
|
+
tanrei-code-block [data-line-gutter][data-sign]::after {
|
|
587
|
+
color: CanvasText;
|
|
588
|
+
}
|
|
589
|
+
tanrei-code-block [data-line]:is([data-highlighted], [data-added], [data-removed]) > [data-line-gutter] {
|
|
590
|
+
background:
|
|
591
|
+
linear-gradient(CanvasText, CanvasText) left top / var(--tanrei-comp-code-block-line-mark-width) 100% no-repeat,
|
|
592
|
+
Canvas;
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
}
|