@nldd/design-system 0.8.40 → 0.8.41
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/components/actions/button/button.styles.d.ts.map +1 -1
- package/dist/components/actions/button/button.styles.js +32 -20
- package/dist/components/actions/button/button.styles.js.map +1 -1
- package/dist/components/actions/button-bar/button-bar.styles.d.ts.map +1 -1
- package/dist/components/actions/button-bar/button-bar.styles.js +22 -0
- package/dist/components/actions/button-bar/button-bar.styles.js.map +1 -1
- package/dist/components/actions/button-group/button-group.styles.d.ts.map +1 -1
- package/dist/components/actions/button-group/button-group.styles.js +0 -1
- package/dist/components/actions/button-group/button-group.styles.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.d.ts +6 -0
- package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.js +9 -0
- package/dist/components/actions/icon-button/icon-button.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.styles.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.styles.js +33 -21
- package/dist/components/actions/icon-button/icon-button.styles.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.template.js +1 -1
- package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
- package/dist/components/actions/link/link.styles.d.ts.map +1 -1
- package/dist/components/actions/link/link.styles.js +4 -2
- package/dist/components/actions/link/link.styles.js.map +1 -1
- package/dist/components/actions/split-button/split-button.styles.d.ts.map +1 -1
- package/dist/components/actions/split-button/split-button.styles.js +14 -1
- package/dist/components/actions/split-button/split-button.styles.js.map +1 -1
- package/dist/components/actions/split-button/split-button.template.d.ts.map +1 -1
- package/dist/components/actions/split-button/split-button.template.js +1 -0
- package/dist/components/actions/split-button/split-button.template.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.styles.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.styles.js +3 -2
- package/dist/components/actions/toolbar/toolbar.styles.js.map +1 -1
- package/dist/components/components.js +83 -24795
- package/dist/components/content/blockquote/blockquote.styles.d.ts.map +1 -1
- package/dist/components/content/blockquote/blockquote.styles.js +1 -0
- package/dist/components/content/blockquote/blockquote.styles.js.map +1 -1
- package/dist/components/content/code/code.d.ts +58 -0
- package/dist/components/content/code/code.d.ts.map +1 -0
- package/dist/components/content/code/code.js +155 -0
- package/dist/components/content/code/code.js.map +1 -0
- package/dist/components/content/code/code.styles.d.ts +2 -0
- package/dist/components/content/code/code.styles.d.ts.map +1 -0
- package/dist/components/content/code/code.styles.js +105 -0
- package/dist/components/content/code/code.styles.js.map +1 -0
- package/dist/components/content/code/code.template.d.ts +4 -0
- package/dist/components/content/code/code.template.d.ts.map +1 -0
- package/dist/components/content/code/code.template.js +18 -0
- package/dist/components/content/code/code.template.js.map +1 -0
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.d.ts.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.js +1 -0
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.js.map +1 -1
- package/dist/components/content/tag/tag.styles.d.ts.map +1 -1
- package/dist/components/content/tag/tag.styles.js +1 -0
- package/dist/components/content/tag/tag.styles.js.map +1 -1
- package/dist/components/content/tooltip/tooltip.styles.d.ts.map +1 -1
- package/dist/components/content/tooltip/tooltip.styles.js +2 -1
- package/dist/components/content/tooltip/tooltip.styles.js.map +1 -1
- package/dist/components/forms/form-field/form-field.styles.d.ts.map +1 -1
- package/dist/components/forms/form-field/form-field.styles.js +8 -4
- package/dist/components/forms/form-field/form-field.styles.js.map +1 -1
- package/dist/components/index-DMYkp2tq.js +26919 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/inputs/checkbox/checkbox.styles.d.ts.map +1 -1
- package/dist/components/inputs/checkbox/checkbox.styles.js +11 -9
- package/dist/components/inputs/checkbox/checkbox.styles.js.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.d.ts +77 -0
- package/dist/components/inputs/code-editor/code-editor.d.ts.map +1 -0
- package/dist/components/inputs/code-editor/code-editor.js +163 -0
- package/dist/components/inputs/code-editor/code-editor.js.map +1 -0
- package/dist/components/inputs/code-editor/code-editor.styles.d.ts +2 -0
- package/dist/components/inputs/code-editor/code-editor.styles.d.ts.map +1 -0
- package/dist/components/inputs/code-editor/code-editor.styles.js +110 -0
- package/dist/components/inputs/code-editor/code-editor.styles.js.map +1 -0
- package/dist/components/inputs/code-editor/code-editor.template.d.ts +4 -0
- package/dist/components/inputs/code-editor/code-editor.template.d.ts.map +1 -0
- package/dist/components/inputs/code-editor/code-editor.template.js +24 -0
- package/dist/components/inputs/code-editor/code-editor.template.js.map +1 -0
- package/dist/components/inputs/combo-box/combo-box.styles.d.ts.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.styles.js +2 -1
- package/dist/components/inputs/combo-box/combo-box.styles.js.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.template.d.ts.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.template.js +2 -0
- package/dist/components/inputs/combo-box/combo-box.template.js.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.styles.d.ts.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.styles.js +2 -1
- package/dist/components/inputs/dropdown/dropdown.styles.js.map +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.js +2 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.js.map +1 -1
- package/dist/components/inputs/number-field/number-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/number-field/number-field.styles.js +2 -1
- package/dist/components/inputs/number-field/number-field.styles.js.map +1 -1
- package/dist/components/inputs/number-field/number-field.template.d.ts.map +1 -1
- package/dist/components/inputs/number-field/number-field.template.js +2 -0
- package/dist/components/inputs/number-field/number-field.template.js.map +1 -1
- package/dist/components/inputs/password-field/password-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/password-field/password-field.styles.js +2 -1
- package/dist/components/inputs/password-field/password-field.styles.js.map +1 -1
- package/dist/components/inputs/radio-button/radio-button.styles.d.ts.map +1 -1
- package/dist/components/inputs/radio-button/radio-button.styles.js +13 -11
- package/dist/components/inputs/radio-button/radio-button.styles.js.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.styles.d.ts.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.styles.js +8 -5
- package/dist/components/inputs/segmented-control/segmented-control.styles.js.map +1 -1
- package/dist/components/inputs/stepper/stepper.template.d.ts.map +1 -1
- package/dist/components/inputs/stepper/stepper.template.js +2 -0
- package/dist/components/inputs/stepper/stepper.template.js.map +1 -1
- package/dist/components/inputs/switch/switch.styles.d.ts.map +1 -1
- package/dist/components/inputs/switch/switch.styles.js +4 -3
- package/dist/components/inputs/switch/switch.styles.js.map +1 -1
- package/dist/components/inputs/text-field/text-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/text-field/text-field.styles.js +2 -1
- package/dist/components/inputs/text-field/text-field.styles.js.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.styles.d.ts.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.styles.js +12 -8
- package/dist/components/inputs/toggle-button/toggle-button.styles.js.map +1 -1
- package/dist/components/inputs/token/token.styles.d.ts.map +1 -1
- package/dist/components/inputs/token/token.styles.js +10 -6
- package/dist/components/inputs/token/token.styles.js.map +1 -1
- package/dist/components/inputs/token/token.template.d.ts.map +1 -1
- package/dist/components/inputs/token/token.template.js +1 -0
- package/dist/components/inputs/token/token.template.js.map +1 -1
- package/dist/components/layout/app-view/app-view.d.ts +7 -0
- package/dist/components/layout/app-view/app-view.d.ts.map +1 -1
- package/dist/components/layout/app-view/app-view.js +13 -1
- package/dist/components/layout/app-view/app-view.js.map +1 -1
- package/dist/components/layout/page/page.styles.d.ts.map +1 -1
- package/dist/components/layout/page/page.styles.js +2 -0
- package/dist/components/layout/page/page.styles.js.map +1 -1
- package/dist/components/layout/sheet/sheet.d.ts +4 -0
- package/dist/components/layout/sheet/sheet.d.ts.map +1 -1
- package/dist/components/layout/sheet/sheet.js +7 -0
- package/dist/components/layout/sheet/sheet.js.map +1 -1
- package/dist/components/layout/sheet/sheet.styles.d.ts.map +1 -1
- package/dist/components/layout/sheet/sheet.styles.js +20 -1
- package/dist/components/layout/sheet/sheet.styles.js.map +1 -1
- package/dist/components/lists-and-menus/cells/cell/cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/cells/cell/cell.styles.js +10 -5
- package/dist/components/lists-and-menus/cells/cell/cell.styles.js.map +1 -1
- package/dist/components/lists-and-menus/cells/description-cell/description-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/cells/description-cell/description-cell.styles.js +9 -4
- package/dist/components/lists-and-menus/cells/description-cell/description-cell.styles.js.map +1 -1
- package/dist/components/lists-and-menus/cells/text-cell/text-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/cells/text-cell/text-cell.styles.js +9 -4
- package/dist/components/lists-and-menus/cells/text-cell/text-cell.styles.js.map +1 -1
- package/dist/components/lists-and-menus/cells/title-cell/title-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/cells/title-cell/title-cell.styles.js +9 -4
- package/dist/components/lists-and-menus/cells/title-cell/title-cell.styles.js.map +1 -1
- package/dist/components/lists-and-menus/list/list.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/list/list.styles.js +4 -3
- package/dist/components/lists-and-menus/list/list.styles.js.map +1 -1
- package/dist/components/lists-and-menus/list-item/list-item.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/list-item/list-item.styles.js +23 -18
- package/dist/components/lists-and-menus/list-item/list-item.styles.js.map +1 -1
- package/dist/components/lists-and-menus/menu/menu.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/menu/menu.styles.js +9 -7
- package/dist/components/lists-and-menus/menu/menu.styles.js.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js +20 -11
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.styles.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.styles.js +9 -4
- package/dist/components/navigation/menu-bar-item/menu-bar-item.styles.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.styles.d.ts.map +1 -1
- package/dist/components/navigation/pagination/pagination.styles.js +10 -3
- package/dist/components/navigation/pagination/pagination.styles.js.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.styles.d.ts.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.styles.js +1 -0
- package/dist/components/navigation/skip-link/skip-link.styles.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.styles.js +9 -3
- package/dist/components/navigation/tab-bar/tab-bar.styles.js.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.d.ts +5 -0
- package/dist/components/navigation/top-title-bar/top-title-bar.d.ts.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.js +19 -7
- package/dist/components/navigation/top-title-bar/top-title-bar.js.map +1 -1
- package/dist/components/prism-bash-vbqaw3JR.js +226 -0
- package/dist/components/prism-css-B93tXdOU.js +59 -0
- package/dist/components/prism-javascript-DeC_17Pw.js +140 -0
- package/dist/components/prism-json-DIMpow89.js +25 -0
- package/dist/components/prism-markdown-D-uFBkiz.js +339 -0
- package/dist/components/prism-markup-DfJYPYHA.js +177 -0
- package/dist/components/prism-typescript-9LDqHHRS.js +87 -0
- package/dist/components/prism-yaml-DO0f9pf6.js +71 -0
- package/dist/components/status-and-feedback/badge/badge.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/badge/badge.styles.js +1 -0
- package/dist/components/status-and-feedback/badge/badge.styles.js.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.js +6 -5
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.js.map +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.js +2 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.js.map +1 -1
- package/dist/css/settings.css +70 -1
- package/package.json +12 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockquote.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/blockquote/blockquote.styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"blockquote.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/blockquote/blockquote.styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB,yBA4E5B,CAAC"}
|
|
@@ -10,6 +10,7 @@ export const blockquoteStyles = css `
|
|
|
10
10
|
--_spacing: var(--semantics-blockquotes-md-spacing);
|
|
11
11
|
--_quote-font: var(--semantics-blockquotes-md-quote-font);
|
|
12
12
|
--_attribution-font: var(--semantics-blockquotes-md-attribution-font);
|
|
13
|
+
|
|
13
14
|
display: block;
|
|
14
15
|
max-width: var(--semantics-blockquotes-max-width);
|
|
15
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockquote.styles.js","sourceRoot":"","sources":["../../../../src/components/content/blockquote/blockquote.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAEpE,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3C,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"blockquote.styles.js","sourceRoot":"","sources":["../../../../src/components/content/blockquote/blockquote.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAEpE,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3C,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;sBAcb,KAAK;;;;;;;;sCAQW,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsD1C,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nederlandse Digitale Dienst Code Component (Lit + TypeScript)
|
|
3
|
+
*
|
|
4
|
+
* A block of monospaced text for code, traces, output dumps, etc.
|
|
5
|
+
* Renders a styled `<pre>` with the design-system's monospace family,
|
|
6
|
+
* tinted background and standard content color.
|
|
7
|
+
*
|
|
8
|
+
* Whitespace is preserved (`white-space: pre`); long lines scroll
|
|
9
|
+
* horizontally by default. Set `wrap` to break long lines onto the
|
|
10
|
+
* next visual line — useful for prose-like content (YAML strings,
|
|
11
|
+
* formatted output) where horizontal scrolling is more disruptive
|
|
12
|
+
* than wrapping.
|
|
13
|
+
*
|
|
14
|
+
* ## Syntax highlighting
|
|
15
|
+
* Set `language` to one of the supported grammars (yaml, json, javascript,
|
|
16
|
+
* typescript, css, html, bash, markdown) to highlight the slot content
|
|
17
|
+
* with Prism. Without `language` the slot content is rendered raw, no
|
|
18
|
+
* highlighting applied. Grammars are loaded lazily on first use, so a
|
|
19
|
+
* page that never sets `language` ships zero grammar code.
|
|
20
|
+
*
|
|
21
|
+
* ### Theming
|
|
22
|
+
* Token colors are exposed as `--components-code-token-*` custom
|
|
23
|
+
* properties on the host. Override them per-instance to swap the theme:
|
|
24
|
+
*
|
|
25
|
+
* ```css
|
|
26
|
+
* nldd-code {
|
|
27
|
+
* --components-code-token-keyword-color: var(--my-purple);
|
|
28
|
+
* --components-code-token-string-color: var(--my-green);
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @element nldd-code
|
|
33
|
+
*
|
|
34
|
+
* @attr {string} language - Grammar to highlight with (yaml, json, javascript, typescript, css, html, bash, markdown). Empty disables highlighting.
|
|
35
|
+
* @attr {boolean} wrap - Wrap long lines instead of horizontal scroll
|
|
36
|
+
*
|
|
37
|
+
* @slot - Default slot for the code/text content
|
|
38
|
+
*/
|
|
39
|
+
import { LitElement } from 'lit';
|
|
40
|
+
export declare class NLDDCode extends LitElement {
|
|
41
|
+
static styles: import("lit").CSSResult;
|
|
42
|
+
language: string;
|
|
43
|
+
wrap: boolean;
|
|
44
|
+
_highlightedHtml: string;
|
|
45
|
+
private _highlightPending;
|
|
46
|
+
render(): import("lit-html").TemplateResult;
|
|
47
|
+
_onSlotChange(e: Event): void;
|
|
48
|
+
updated(changed: Map<string, unknown>): void;
|
|
49
|
+
getUpdateComplete(): Promise<boolean>;
|
|
50
|
+
private _refreshHighlight;
|
|
51
|
+
private _runHighlight;
|
|
52
|
+
}
|
|
53
|
+
declare global {
|
|
54
|
+
interface HTMLElementTagNameMap {
|
|
55
|
+
'nldd-code': NLDDCode;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=code.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../../../src/components/content/code/code.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAuCjC,qBACa,QAAS,SAAQ,UAAU;IACvC,OAAgB,MAAM,0BAAc;IAGpC,QAAQ,SAAM;IAGd,IAAI,UAAS;IAGb,gBAAgB,SAAM;IAEtB,OAAO,CAAC,iBAAiB,CAAoC;IAEpD,MAAM;IAIf,aAAa,CAAC,CAAC,EAAE,KAAK;IAIb,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAO/B,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC;IAMpD,OAAO,CAAC,iBAAiB;YAIX,aAAa;CA4B3B;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,WAAW,EAAE,QAAQ,CAAC;KACtB;CACD"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Nederlandse Digitale Dienst Code Component (Lit + TypeScript)
|
|
9
|
+
*
|
|
10
|
+
* A block of monospaced text for code, traces, output dumps, etc.
|
|
11
|
+
* Renders a styled `<pre>` with the design-system's monospace family,
|
|
12
|
+
* tinted background and standard content color.
|
|
13
|
+
*
|
|
14
|
+
* Whitespace is preserved (`white-space: pre`); long lines scroll
|
|
15
|
+
* horizontally by default. Set `wrap` to break long lines onto the
|
|
16
|
+
* next visual line — useful for prose-like content (YAML strings,
|
|
17
|
+
* formatted output) where horizontal scrolling is more disruptive
|
|
18
|
+
* than wrapping.
|
|
19
|
+
*
|
|
20
|
+
* ## Syntax highlighting
|
|
21
|
+
* Set `language` to one of the supported grammars (yaml, json, javascript,
|
|
22
|
+
* typescript, css, html, bash, markdown) to highlight the slot content
|
|
23
|
+
* with Prism. Without `language` the slot content is rendered raw, no
|
|
24
|
+
* highlighting applied. Grammars are loaded lazily on first use, so a
|
|
25
|
+
* page that never sets `language` ships zero grammar code.
|
|
26
|
+
*
|
|
27
|
+
* ### Theming
|
|
28
|
+
* Token colors are exposed as `--components-code-token-*` custom
|
|
29
|
+
* properties on the host. Override them per-instance to swap the theme:
|
|
30
|
+
*
|
|
31
|
+
* ```css
|
|
32
|
+
* nldd-code {
|
|
33
|
+
* --components-code-token-keyword-color: var(--my-purple);
|
|
34
|
+
* --components-code-token-string-color: var(--my-green);
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @element nldd-code
|
|
39
|
+
*
|
|
40
|
+
* @attr {string} language - Grammar to highlight with (yaml, json, javascript, typescript, css, html, bash, markdown). Empty disables highlighting.
|
|
41
|
+
* @attr {boolean} wrap - Wrap long lines instead of horizontal scroll
|
|
42
|
+
*
|
|
43
|
+
* @slot - Default slot for the code/text content
|
|
44
|
+
*/
|
|
45
|
+
import { LitElement } from 'lit';
|
|
46
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
47
|
+
import Prism from 'prismjs';
|
|
48
|
+
import { codeStyles } from './code.styles.js';
|
|
49
|
+
import { codeTemplate } from './code.template.js';
|
|
50
|
+
/* Map our public language names to Prism grammar loaders. `html` shares
|
|
51
|
+
* the markup grammar (covers html/xml/svg). Static `import()` calls let
|
|
52
|
+
* the bundler emit one chunk per file, so consumers only download
|
|
53
|
+
* grammars they actually render. */
|
|
54
|
+
const GRAMMAR_LOADERS = {
|
|
55
|
+
yaml: () => import('prismjs/components/prism-yaml.js'),
|
|
56
|
+
json: () => import('prismjs/components/prism-json.js'),
|
|
57
|
+
javascript: () => import('prismjs/components/prism-javascript.js'),
|
|
58
|
+
typescript: () => import('prismjs/components/prism-typescript.js'),
|
|
59
|
+
css: () => import('prismjs/components/prism-css.js'),
|
|
60
|
+
html: () => import('prismjs/components/prism-markup.js'),
|
|
61
|
+
bash: () => import('prismjs/components/prism-bash.js'),
|
|
62
|
+
markdown: () => import('prismjs/components/prism-markdown.js'),
|
|
63
|
+
};
|
|
64
|
+
const grammarLoads = new Map();
|
|
65
|
+
function loadGrammar(language) {
|
|
66
|
+
const loader = GRAMMAR_LOADERS[language];
|
|
67
|
+
if (!loader)
|
|
68
|
+
return undefined;
|
|
69
|
+
let pending = grammarLoads.get(language);
|
|
70
|
+
if (!pending) {
|
|
71
|
+
// Drop the cache entry on failure so a subsequent attempt can retry
|
|
72
|
+
// the import (e.g. transient chunk-load failure on a flaky network).
|
|
73
|
+
pending = loader().catch((err) => {
|
|
74
|
+
grammarLoads.delete(language);
|
|
75
|
+
throw err;
|
|
76
|
+
});
|
|
77
|
+
grammarLoads.set(language, pending);
|
|
78
|
+
}
|
|
79
|
+
return pending;
|
|
80
|
+
}
|
|
81
|
+
let NLDDCode = class NLDDCode extends LitElement {
|
|
82
|
+
constructor() {
|
|
83
|
+
super(...arguments);
|
|
84
|
+
this.language = '';
|
|
85
|
+
this.wrap = false;
|
|
86
|
+
this._highlightedHtml = '';
|
|
87
|
+
this._highlightPending = Promise.resolve();
|
|
88
|
+
}
|
|
89
|
+
render() {
|
|
90
|
+
return codeTemplate(this);
|
|
91
|
+
}
|
|
92
|
+
_onSlotChange(e) {
|
|
93
|
+
this._refreshHighlight(e.target);
|
|
94
|
+
}
|
|
95
|
+
updated(changed) {
|
|
96
|
+
if (changed.has('language'))
|
|
97
|
+
this._refreshHighlight();
|
|
98
|
+
}
|
|
99
|
+
/* Lazy grammar loading is async; surface the in-flight highlight
|
|
100
|
+
* through updateComplete so consumers (and tests) can `await
|
|
101
|
+
* el.updateComplete` and see the final highlighted output. */
|
|
102
|
+
async getUpdateComplete() {
|
|
103
|
+
const result = await super.getUpdateComplete();
|
|
104
|
+
await this._highlightPending;
|
|
105
|
+
return result;
|
|
106
|
+
}
|
|
107
|
+
_refreshHighlight(slot) {
|
|
108
|
+
this._highlightPending = this._runHighlight(slot);
|
|
109
|
+
}
|
|
110
|
+
async _runHighlight(slot) {
|
|
111
|
+
if (!this.language) {
|
|
112
|
+
this._highlightedHtml = '';
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
const language = this.language;
|
|
116
|
+
if (!Prism.languages[language]) {
|
|
117
|
+
const pending = loadGrammar(language);
|
|
118
|
+
if (!pending) {
|
|
119
|
+
this._highlightedHtml = '';
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
await pending;
|
|
123
|
+
if (this.language !== language)
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
const grammar = Prism.languages[language];
|
|
127
|
+
if (!grammar) {
|
|
128
|
+
this._highlightedHtml = '';
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
const target = slot ?? this.shadowRoot?.querySelector('slot');
|
|
132
|
+
if (!target)
|
|
133
|
+
return;
|
|
134
|
+
const text = target
|
|
135
|
+
.assignedNodes({ flatten: true })
|
|
136
|
+
.map((n) => n.textContent ?? '')
|
|
137
|
+
.join('');
|
|
138
|
+
this._highlightedHtml = Prism.highlight(text, grammar, language);
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
NLDDCode.styles = codeStyles;
|
|
142
|
+
__decorate([
|
|
143
|
+
property({ type: String, reflect: true })
|
|
144
|
+
], NLDDCode.prototype, "language", void 0);
|
|
145
|
+
__decorate([
|
|
146
|
+
property({ type: Boolean, reflect: true })
|
|
147
|
+
], NLDDCode.prototype, "wrap", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
state()
|
|
150
|
+
], NLDDCode.prototype, "_highlightedHtml", void 0);
|
|
151
|
+
NLDDCode = __decorate([
|
|
152
|
+
customElement('nldd-code')
|
|
153
|
+
], NLDDCode);
|
|
154
|
+
export { NLDDCode };
|
|
155
|
+
//# sourceMappingURL=code.js.map
|
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AE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sCAC9B;AAGb;IADC,KAAK,EAAE;kDACc;AAVV,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CAmEpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/code/code.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,yBAsGtB,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const codeStyles = css `
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
/* # Host */
|
|
6
|
+
|
|
7
|
+
:host {
|
|
8
|
+
--_background-color: var(--semantics-surfaces-tinted-background-color);
|
|
9
|
+
--_content-color: var(--semantics-content-color);
|
|
10
|
+
--_inline-padding: var(--primitives-space-16);
|
|
11
|
+
--_block-padding: var(--primitives-space-16);
|
|
12
|
+
--_corner-radius: var(--primitives-corner-radius-lg);
|
|
13
|
+
--_font: var(--primitives-font-monospace-sm-regular-snug);
|
|
14
|
+
|
|
15
|
+
display: block;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:host([hidden]) {
|
|
19
|
+
display: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
/* # Block */
|
|
24
|
+
|
|
25
|
+
.code {
|
|
26
|
+
margin: 0;
|
|
27
|
+
padding: var(--_block-padding) var(--_inline-padding);
|
|
28
|
+
background-color: var(--_background-color);
|
|
29
|
+
color: var(--_content-color);
|
|
30
|
+
border-radius: var(--_corner-radius);
|
|
31
|
+
font: var(--_font);
|
|
32
|
+
overflow-x: auto;
|
|
33
|
+
white-space: pre;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host([wrap]) .code {
|
|
37
|
+
overflow-x: visible;
|
|
38
|
+
white-space: pre-wrap;
|
|
39
|
+
word-break: break-word;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* When highlighting is active, hide the raw slot output and show the
|
|
43
|
+
tokenised <code> instead. The slot stays in the tree as the source
|
|
44
|
+
of truth — slotchange listens there and feeds the highlighter.
|
|
45
|
+
Lit reflects empty-string properties as language="" attributes,
|
|
46
|
+
so we explicitly exclude that case. */
|
|
47
|
+
:host([language]:not([language=""])) slot {
|
|
48
|
+
display: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.code__highlighted {
|
|
52
|
+
font: inherit;
|
|
53
|
+
color: inherit;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
/* # Tokens (Prism)
|
|
58
|
+
*
|
|
59
|
+
* Token theme — Solarized-inspired, mapped to descriptive DS palettes.
|
|
60
|
+
* Defaults defined in settings.css under --components-code-token-*;
|
|
61
|
+
* consumers can override per-instance to swap colors. Documented in
|
|
62
|
+
* the JSDoc of nldd-code (see code.ts). */
|
|
63
|
+
|
|
64
|
+
.token.comment,
|
|
65
|
+
.token.prolog,
|
|
66
|
+
.token.doctype,
|
|
67
|
+
.token.cdata { color: var(--components-code-token-comment-color); font-style: italic; }
|
|
68
|
+
|
|
69
|
+
.token.punctuation { color: var(--components-code-token-punctuation-color); }
|
|
70
|
+
|
|
71
|
+
.token.namespace { opacity: 0.7; }
|
|
72
|
+
|
|
73
|
+
.token.keyword { color: var(--components-code-token-keyword-color); }
|
|
74
|
+
.token.string,
|
|
75
|
+
.token.char { color: var(--components-code-token-string-color); }
|
|
76
|
+
.token.number { color: var(--components-code-token-number-color); }
|
|
77
|
+
.token.boolean { color: var(--components-code-token-boolean-color); }
|
|
78
|
+
.token.null { color: var(--components-code-token-null-color); }
|
|
79
|
+
.token.function { color: var(--components-code-token-function-color); }
|
|
80
|
+
.token.class-name { color: var(--components-code-token-class-color); }
|
|
81
|
+
.token.builtin { color: var(--components-code-token-builtin-color); }
|
|
82
|
+
.token.tag { color: var(--components-code-token-tag-color); }
|
|
83
|
+
.token.attr-name { color: var(--components-code-token-attr-name-color); }
|
|
84
|
+
.token.attr-value { color: var(--components-code-token-attr-value-color); }
|
|
85
|
+
.token.property { color: var(--components-code-token-property-color); }
|
|
86
|
+
.token.selector { color: var(--components-code-token-selector-color); }
|
|
87
|
+
.token.atrule { color: var(--components-code-token-atrule-color); }
|
|
88
|
+
.token.regex { color: var(--components-code-token-regex-color); }
|
|
89
|
+
.token.url { color: var(--components-code-token-url-color); }
|
|
90
|
+
.token.operator { color: var(--components-code-token-operator-color); }
|
|
91
|
+
.token.constant { color: var(--components-code-token-constant-color); }
|
|
92
|
+
.token.deleted { color: var(--components-code-token-deleted-color); }
|
|
93
|
+
.token.inserted { color: var(--components-code-token-inserted-color); }
|
|
94
|
+
.token.important { color: var(--components-code-token-important-color); font-weight: bold; }
|
|
95
|
+
.token.symbol { color: var(--components-code-token-symbol-color); }
|
|
96
|
+
.token.entity { color: var(--components-code-token-entity-color); }
|
|
97
|
+
.token.variable { color: var(--components-code-token-variable-color); }
|
|
98
|
+
|
|
99
|
+
/* YAML key uses the property/keyword slot so YAML reads naturally */
|
|
100
|
+
.token.key { color: var(--components-code-token-property-color); }
|
|
101
|
+
|
|
102
|
+
.token.bold { font-weight: bold; }
|
|
103
|
+
.token.italic { font-style: italic; }
|
|
104
|
+
`;
|
|
105
|
+
//# sourceMappingURL=code.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code.styles.js","sourceRoot":"","sources":["../../../../src/components/content/code/code.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsG5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code.template.d.ts","sourceRoot":"","sources":["../../../../src/components/content/code/code.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,KAAK,CAAC;AAE3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,wBAAgB,YAAY,CAAC,SAAS,EAAE,QAAQ,GAAG,cAAc,CAgBhE"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
3
|
+
export function codeTemplate(component) {
|
|
4
|
+
// `language` is interpolated into a class name. Lit's tagged template
|
|
5
|
+
// literal escapes attribute values, so a malicious string can't break
|
|
6
|
+
// out of the attribute — but it can still produce a wonky class name.
|
|
7
|
+
// We accept that since `language` is a developer-set identifier, not
|
|
8
|
+
// user-supplied content.
|
|
9
|
+
//
|
|
10
|
+
// `unsafeHTML(_highlightedHtml)` injects the Prism output verbatim.
|
|
11
|
+
// Prism escapes HTML entities in its input (`<` → `<`) before
|
|
12
|
+
// wrapping tokens in spans, so the only HTML in the output is the
|
|
13
|
+
// span scaffolding Prism itself emits. Safe by construction.
|
|
14
|
+
return html `<pre class="code"><slot @slotchange=${component._onSlotChange}></slot>${component.language && component._highlightedHtml
|
|
15
|
+
? html `<code class="code__highlighted language-${component.language}">${unsafeHTML(component._highlightedHtml)}</code>`
|
|
16
|
+
: ''}</pre>`;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=code.template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code.template.js","sourceRoot":"","sources":["../../../../src/components/content/code/code.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAG3D,MAAM,UAAU,YAAY,CAAC,SAAmB;IAC/C,sEAAsE;IACtE,sEAAsE;IACtE,sEAAsE;IACtE,qEAAqE;IACrE,yBAAyB;IACzB,EAAE;IACF,oEAAoE;IACpE,iEAAiE;IACjE,kEAAkE;IAClE,6DAA6D;IAC7D,OAAO,IAAI,CAAA,uCAAuC,SAAS,CAAC,aAAa,WACxE,SAAS,CAAC,QAAQ,IAAI,SAAS,CAAC,gBAAgB;QAC/C,CAAC,CAAC,IAAI,CAAA,2CAA2C,SAAS,CAAC,QAAQ,KAAK,UAAU,CAAC,SAAS,CAAC,gBAAgB,CAAC,SAAS;QACvH,CAAC,CAAC,EACJ,QAAQ,CAAC;AACV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard-shortcut.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/keyboard-shortcut/keyboard-shortcut.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"keyboard-shortcut.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/keyboard-shortcut/keyboard-shortcut.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,yBA4ElC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard-shortcut.styles.js","sourceRoot":"","sources":["../../../../src/components/content/keyboard-shortcut/keyboard-shortcut.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"keyboard-shortcut.styles.js","sourceRoot":"","sources":["../../../../src/components/content/keyboard-shortcut/keyboard-shortcut.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4ExC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/tag/tag.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"tag.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/tag/tag.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,yBAsGrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag.styles.js","sourceRoot":"","sources":["../../../../src/components/content/tag/tag.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"tag.styles.js","sourceRoot":"","sources":["../../../../src/components/content/tag/tag.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsG3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/tooltip/tooltip.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"tooltip.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/tooltip/tooltip.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,yBAoFzB,CAAC"}
|
|
@@ -5,7 +5,6 @@ export const tooltipStyles = css `
|
|
|
5
5
|
/* # Host */
|
|
6
6
|
|
|
7
7
|
:host {
|
|
8
|
-
display: contents;
|
|
9
8
|
--_z-index: 10000;
|
|
10
9
|
--_show-delay: 700ms;
|
|
11
10
|
--_show-duration: var(--primitives-transition-duration-fast);
|
|
@@ -14,6 +13,8 @@ export const tooltipStyles = css `
|
|
|
14
13
|
--_offset: 4; /* px, unitless — read by JS */
|
|
15
14
|
--_shift-padding: 8; /* px, unitless — read by JS */
|
|
16
15
|
--_max-width: var(--primitives-area-280);
|
|
16
|
+
|
|
17
|
+
display: contents;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
:host([hidden]) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.styles.js","sourceRoot":"","sources":["../../../../src/components/content/tooltip/tooltip.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"tooltip.styles.js","sourceRoot":"","sources":["../../../../src/components/content/tooltip/tooltip.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoF/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-field.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/form-field/form-field.styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe,yBAoK3B,CAAC;AAMF,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"form-field.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/form-field/form-field.styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe,yBAoK3B,CAAC;AAMF,eAAO,MAAM,uBAAuB,yBA+CnC,CAAC;AAMF,eAAO,MAAM,wBAAwB,yBAmDpC,CAAC"}
|
|
@@ -198,8 +198,10 @@ export const formFieldHelpTextStyles = css `
|
|
|
198
198
|
border-radius: var(--primitives-corner-radius-xxs);
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
|
|
202
|
-
|
|
201
|
+
@media (hover: hover) {
|
|
202
|
+
::slotted(a:hover) {
|
|
203
|
+
color: var(--semantics-links-is-hovered-color);
|
|
204
|
+
}
|
|
203
205
|
}
|
|
204
206
|
|
|
205
207
|
::slotted(a:active) {
|
|
@@ -251,8 +253,10 @@ export const formFieldErrorTextStyles = css `
|
|
|
251
253
|
border-radius: var(--primitives-corner-radius-xxs);
|
|
252
254
|
}
|
|
253
255
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
+
@media (hover: hover) {
|
|
257
|
+
::slotted(a:hover) {
|
|
258
|
+
color: var(--semantics-links-is-hovered-color);
|
|
259
|
+
}
|
|
256
260
|
}
|
|
257
261
|
|
|
258
262
|
::slotted(a:active) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-field.styles.js","sourceRoot":"","sources":["../../../../src/components/forms/form-field/form-field.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;kEAEkE;AAElE,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoKjC,CAAC;AAEF;;kEAEkE;AAElE,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"form-field.styles.js","sourceRoot":"","sources":["../../../../src/components/forms/form-field/form-field.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;kEAEkE;AAElE,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoKjC,CAAC;AAEF;;kEAEkE;AAElE,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CzC,CAAC;AAEF;;kEAEkE;AAElE,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmD1C,CAAC"}
|