@molecule/app-job-listing-row-svelte 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -6
- package/dist/JobListingRow.svelte +43 -19
- package/dist/JobListingRow.svelte.d.ts.map +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -4
- package/dist/types.d.ts +8 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
|
|
|
3
3
|
Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
|
|
4
4
|
Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
|
|
5
5
|
To change this document, edit the module-level JSDoc in src/index.ts.
|
|
6
|
-
Generated: 2026-11-
|
|
6
|
+
Generated: 2026-11-16T23:56:17.256Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-job-listing-row-svelte
|
|
@@ -81,7 +81,14 @@ interface JobListingRowProps {
|
|
|
81
81
|
actions?: Snippet | string
|
|
82
82
|
/** Tags / chips (Remote, React, Hybrid); arrive as a snippet. */
|
|
83
83
|
tags?: Snippet | string
|
|
84
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* Activates the row: while it is set, an empty, transparent native button
|
|
86
|
+
* covers the whole row and calls this on click — the whole row is the click
|
|
87
|
+
* target, and Enter / Space activate the button natively. The row is named
|
|
88
|
+
* by the title (the `<h3>` itself takes the id the button points at with
|
|
89
|
+
* `aria-labelledby`); the `actions` and `tags` slots sit above the button
|
|
90
|
+
* and keep their own clicks.
|
|
91
|
+
*/
|
|
85
92
|
onClick?: () => void
|
|
86
93
|
/** Extra classes. */
|
|
87
94
|
className?: string
|
|
@@ -120,10 +127,11 @@ The location value is prefixed with a hardcoded 📍 glyph and the meta
|
|
|
120
127
|
fields are joined with literal middle-dot separators; there is no prop to
|
|
121
128
|
change or localise those separators.
|
|
122
129
|
|
|
123
|
-
`onClick` makes the whole row clickable
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
130
|
+
`onClick` makes the whole row clickable through a transparent native button
|
|
131
|
+
over it — the row is named by the title (the `<h3>` itself takes the id the
|
|
132
|
+
button points at with `aria-labelledby`), and the inner controls sit above
|
|
133
|
+
it and keep their own clicks. Put a real link or button in `actions` for the
|
|
134
|
+
other row actions.
|
|
127
135
|
|
|
128
136
|
Node-valued props (`title`, `company`, `location`, `type`, `salary`,
|
|
129
137
|
`postedAt`, `leading`, `actions`, `tags`) arrive as snippets; strings
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
logo, tag chips, and right-side actions. Same props, same DOM for the same
|
|
6
6
|
input. The location value is prefixed with the same hardcoded 📍 glyph
|
|
7
7
|
React renders, and the meta fields carry the same literal middle-dot
|
|
8
|
-
separators (there is no prop to change or localise them).
|
|
8
|
+
separators (there is no prop to change or localise them). `onClick` covers
|
|
9
|
+
the whole row with an empty, transparent native button that activates it.
|
|
9
10
|
-->
|
|
10
11
|
<script lang="ts">
|
|
11
12
|
import { getClassMap } from '@molecule/app-ui'
|
|
@@ -27,66 +28,89 @@
|
|
|
27
28
|
}: JobListingRowProps = $props()
|
|
28
29
|
|
|
29
30
|
const cm = $derived(getClassMap())
|
|
31
|
+
|
|
32
|
+
// The row's accessible name lives on the title: the open button points at
|
|
33
|
+
// the `<h3>` with aria-labelledby.
|
|
34
|
+
const nameId = $props.id()
|
|
30
35
|
</script>
|
|
31
36
|
|
|
32
|
-
<!-- React's JobListingRow attaches onClick to the root <div> by design (its
|
|
33
|
-
JSDoc: no button semantics — supply your own focus/keyboard affordance),
|
|
34
|
-
so the same two a11y warnings React's DOM carries are intentional here. -->
|
|
35
|
-
<!-- svelte-ignore a11y_click_events_have_key_events, a11y_no_static_element_interactions -->
|
|
36
37
|
<div
|
|
37
|
-
onclick={onClick}
|
|
38
38
|
class={cm.cn(
|
|
39
39
|
cm.flex({ align: 'start', gap: 'md' }),
|
|
40
40
|
cm.sp('p', 3),
|
|
41
|
-
onClick ? cm.
|
|
41
|
+
onClick ? cm.position('relative') : undefined,
|
|
42
42
|
className,
|
|
43
43
|
)}
|
|
44
44
|
>
|
|
45
|
+
{#if onClick}
|
|
46
|
+
<!-- mol-bespoke-button: the whole row is the hit area, not a CTA — an
|
|
47
|
+
empty, transparent button over the row; the inline background/border/
|
|
48
|
+
padding are native resets. -->
|
|
49
|
+
<!-- The style values carry the form React's attribute shows after CSSOM
|
|
50
|
+
(Svelte writes the attribute raw): the border is its initial `none`
|
|
51
|
+
style at `medium` width, padding the pixel form of 0 — visually
|
|
52
|
+
identical, textually equal to React. -->
|
|
53
|
+
<button
|
|
54
|
+
type="button"
|
|
55
|
+
aria-labelledby={nameId}
|
|
56
|
+
data-mol-id="job-listing-row-open"
|
|
57
|
+
onclick={() => onClick?.()}
|
|
58
|
+
class={cm.cn(cm.position('absolute'), cm.inset0, cm.cursorPointer)}
|
|
59
|
+
style="background: transparent; border: medium; padding: 0px;"
|
|
60
|
+
></button>
|
|
61
|
+
{/if}
|
|
45
62
|
{#if leading}
|
|
46
63
|
<div class={cm.shrink0}>
|
|
47
|
-
{#if typeof leading === 'function'}{@render leading()}{:else}{leading}{/if}
|
|
64
|
+
{#if typeof leading === 'function'}{@render leading?.()}{:else}{leading}{/if}
|
|
48
65
|
</div>
|
|
49
66
|
{/if}
|
|
50
67
|
<div class={cm.cn(cm.flex1, cm.stack(1))}>
|
|
51
|
-
<h3 class={cm.cn(cm.textSize('base'), cm.fontWeight('semibold'))}>
|
|
52
|
-
{#if typeof title === 'function'}{@render title()}{:else}{title}{/if}
|
|
68
|
+
<h3 id={nameId} class={cm.cn(cm.textSize('base'), cm.fontWeight('semibold'))}>
|
|
69
|
+
{#if typeof title === 'function'}{@render title?.()}{:else}{title}{/if}
|
|
53
70
|
</h3>
|
|
54
71
|
{#if company}
|
|
55
72
|
<span class={cm.textSize('sm')}>
|
|
56
|
-
{#if typeof company === 'function'}{@render company()}{:else}{company}{/if}
|
|
73
|
+
{#if typeof company === 'function'}{@render company?.()}{:else}{company}{/if}
|
|
57
74
|
</span>
|
|
58
75
|
{/if}
|
|
59
76
|
<div class={cm.flex({ align: 'center', gap: 'sm', wrap: 'wrap' })}>
|
|
60
77
|
{#if location}
|
|
61
78
|
<span class={cm.textSize('xs')}>
|
|
62
|
-
📍 {#if typeof location === 'function'}{@render location()}{:else}{location}{/if}
|
|
79
|
+
📍 {#if typeof location === 'function'}{@render location?.()}{:else}{location}{/if}
|
|
63
80
|
</span>
|
|
64
81
|
{/if}
|
|
65
82
|
{#if type}
|
|
66
83
|
<span class={cm.textSize('xs')}>
|
|
67
|
-
· {#if typeof type === 'function'}{@render type()}{:else}{type}{/if}
|
|
84
|
+
· {#if typeof type === 'function'}{@render type?.()}{:else}{type}{/if}
|
|
68
85
|
</span>
|
|
69
86
|
{/if}
|
|
70
87
|
{#if salary}
|
|
71
88
|
<span class={cm.cn(cm.textSize('xs'), cm.fontWeight('semibold'))}>
|
|
72
|
-
· {#if typeof salary === 'function'}{@render salary()}{:else}{salary}{/if}
|
|
89
|
+
· {#if typeof salary === 'function'}{@render salary?.()}{:else}{salary}{/if}
|
|
73
90
|
</span>
|
|
74
91
|
{/if}
|
|
75
92
|
{#if postedAt}
|
|
76
93
|
<span class={cm.textSize('xs')}>
|
|
77
|
-
· {#if typeof postedAt === 'function'}{@render postedAt()}{:else}{postedAt}{/if}
|
|
94
|
+
· {#if typeof postedAt === 'function'}{@render postedAt?.()}{:else}{postedAt}{/if}
|
|
78
95
|
</span>
|
|
79
96
|
{/if}
|
|
80
97
|
</div>
|
|
81
98
|
{#if tags}
|
|
82
|
-
<div
|
|
83
|
-
{
|
|
99
|
+
<div
|
|
100
|
+
class={cm.cn(
|
|
101
|
+
cm.flex({ align: 'center', gap: 'xs', wrap: 'wrap' }),
|
|
102
|
+
cm.position('relative'),
|
|
103
|
+
)}
|
|
104
|
+
>
|
|
105
|
+
{#if typeof tags === 'function'}{@render tags?.()}{:else}{tags}{/if}
|
|
84
106
|
</div>
|
|
85
107
|
{/if}
|
|
86
108
|
</div>
|
|
87
109
|
{#if actions}
|
|
88
|
-
<div
|
|
89
|
-
{
|
|
110
|
+
<div
|
|
111
|
+
class={cm.cn(cm.flex({ align: 'center', gap: 'sm' }), cm.shrink0, cm.position('relative'))}
|
|
112
|
+
>
|
|
113
|
+
{#if typeof actions === 'function'}{@render actions?.()}{:else}{actions}{/if}
|
|
90
114
|
</div>
|
|
91
115
|
{/if}
|
|
92
116
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JobListingRow.svelte.d.ts","sourceRoot":"","sources":["../src/JobListingRow.svelte"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"JobListingRow.svelte.d.ts","sourceRoot":"","sources":["../src/JobListingRow.svelte"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AA8FrD,QAAA,MAAM,aAAa,wDAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -33,10 +33,11 @@
|
|
|
33
33
|
* fields are joined with literal middle-dot separators; there is no prop to
|
|
34
34
|
* change or localise those separators.
|
|
35
35
|
*
|
|
36
|
-
* `onClick` makes the whole row clickable
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
36
|
+
* `onClick` makes the whole row clickable through a transparent native button
|
|
37
|
+
* over it — the row is named by the title (the `<h3>` itself takes the id the
|
|
38
|
+
* button points at with `aria-labelledby`), and the inner controls sit above
|
|
39
|
+
* it and keep their own clicks. Put a real link or button in `actions` for the
|
|
40
|
+
* other row actions.
|
|
40
41
|
*
|
|
41
42
|
* Node-valued props (`title`, `company`, `location`, `type`, `salary`,
|
|
42
43
|
* `postedAt`, `leading`, `actions`, `tags`) arrive as snippets; strings
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -33,10 +33,11 @@
|
|
|
33
33
|
* fields are joined with literal middle-dot separators; there is no prop to
|
|
34
34
|
* change or localise those separators.
|
|
35
35
|
*
|
|
36
|
-
* `onClick` makes the whole row clickable
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
36
|
+
* `onClick` makes the whole row clickable through a transparent native button
|
|
37
|
+
* over it — the row is named by the title (the `<h3>` itself takes the id the
|
|
38
|
+
* button points at with `aria-labelledby`), and the inner controls sit above
|
|
39
|
+
* it and keep their own clicks. Put a real link or button in `actions` for the
|
|
40
|
+
* other row actions.
|
|
40
41
|
*
|
|
41
42
|
* Node-valued props (`title`, `company`, `location`, `type`, `salary`,
|
|
42
43
|
* `postedAt`, `leading`, `actions`, `tags`) arrive as snippets; strings
|
package/dist/types.d.ts
CHANGED
|
@@ -27,7 +27,14 @@ export interface JobListingRowProps {
|
|
|
27
27
|
actions?: Snippet | string;
|
|
28
28
|
/** Tags / chips (Remote, React, Hybrid); arrive as a snippet. */
|
|
29
29
|
tags?: Snippet | string;
|
|
30
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Activates the row: while it is set, an empty, transparent native button
|
|
32
|
+
* covers the whole row and calls this on click — the whole row is the click
|
|
33
|
+
* target, and Enter / Space activate the button natively. The row is named
|
|
34
|
+
* by the title (the `<h3>` itself takes the id the button points at with
|
|
35
|
+
* `aria-labelledby`); the `actions` and `tags` slots sit above the button
|
|
36
|
+
* and keep their own clicks.
|
|
37
|
+
*/
|
|
31
38
|
onClick?: () => void;
|
|
32
39
|
/** Extra classes. */
|
|
33
40
|
className?: string;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAErC,uCAAuC;AACvC,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,KAAK,EAAE,OAAO,GAAG,MAAM,CAAA;IACvB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC1B,mFAAmF;IACnF,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC3B,4FAA4F;IAC5F,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACvB,wEAAwE;IACxE,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACzB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC3B,0DAA0D;IAC1D,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC1B,sEAAsE;IACtE,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC1B,iEAAiE;IACjE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACvB
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAErC,uCAAuC;AACvC,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,KAAK,EAAE,OAAO,GAAG,MAAM,CAAA;IACvB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC1B,mFAAmF;IACnF,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC3B,4FAA4F;IAC5F,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACvB,wEAAwE;IACxE,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACzB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC3B,0DAA0D;IAC1D,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC1B,sEAAsE;IACtE,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC1B,iEAAiE;IACjE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACvB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-job-listing-row-svelte",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Job-board row with title, company, location, type, salary range, posted date",
|
|
5
5
|
"homepage": "https://www.molecule.dev/packages/app-job-listing-row-svelte",
|
|
6
6
|
"type": "module",
|
|
@@ -57,13 +57,13 @@
|
|
|
57
57
|
"@molecule/app-framework-conformance": "0.0.0",
|
|
58
58
|
"@molecule/app-i18n": "1.2.2",
|
|
59
59
|
"@molecule/app-icons": "1.0.4",
|
|
60
|
-
"@molecule/app-svelte": "3.
|
|
61
|
-
"@molecule/app-ui": "1.
|
|
62
|
-
"@molecule/app-ui-svelte": "1.1
|
|
60
|
+
"@molecule/app-svelte": "3.13.0",
|
|
61
|
+
"@molecule/app-ui": "1.5.0",
|
|
62
|
+
"@molecule/app-ui-svelte": "1.4.1",
|
|
63
63
|
"@sveltejs/package": "3.0.2",
|
|
64
64
|
"@sveltejs/vite-plugin-svelte": "7.1.2",
|
|
65
65
|
"@types/node": "26.6.5",
|
|
66
|
-
"jsdom": "
|
|
66
|
+
"jsdom": "31.0.1",
|
|
67
67
|
"svelte": "5.57.2",
|
|
68
68
|
"svelte-check": "4.7.7",
|
|
69
69
|
"typescript": "6.0.3",
|