@invisibleloop/pulse 0.1.23 → 0.1.29
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/.claude/settings.local.json +12 -1
- package/.github/workflows/publish.yml +11 -19
- package/docs/public/.pulse-ui-version +1 -1
- package/docs/public/docs.css +19 -1
- package/docs/public/pulse-ui.css +1 -0
- package/docs/server.js +5 -2
- package/docs/src/lib/highlight.js +57 -13
- package/docs/src/lib/layout.js +5 -2
- package/docs/src/pages/faq.js +5 -2
- package/docs/src/pages/home.js +9 -5
- package/docs/src/pages/meta.js +21 -0
- package/docs/src/pages/routing.js +12 -1
- package/package.json +6 -2
- package/src/agent/guide-routing.md +20 -0
- package/src/agent/guide-spec.md +9 -1
- package/src/cli/scaffold.js +63 -2
- package/src/server/index.js +21 -6
- package/src/server/server.test.js +47 -0
- package/docs/public/dist/accessibility.boot-5DVTARJU.js +0 -115
- package/docs/public/dist/actions.boot-P66HKQEM.js +0 -164
- package/docs/public/dist/auth.boot-IMAJAUPH.js +0 -140
- package/docs/public/dist/caching.boot-DVR6KDE7.js +0 -53
- package/docs/public/dist/components--accordion.boot-3HVKMNWC.js +0 -11
- package/docs/public/dist/components--alert.boot-GCEXOZAC.js +0 -6
- package/docs/public/dist/components--app-badge.boot-DVT3GCHJ.js +0 -6
- package/docs/public/dist/components--avatar.boot-PSW24EVA.js +0 -5
- package/docs/public/dist/components--badge.boot-TYDY2RMK.js +0 -7
- package/docs/public/dist/components--banner.boot-EI5PZSZK.js +0 -7
- package/docs/public/dist/components--breadcrumbs.boot-SMA2E2GO.js +0 -34
- package/docs/public/dist/components--button.boot-J54BQM2E.js +0 -23
- package/docs/public/dist/components--card.boot-PZGNDIB6.js +0 -138
- package/docs/public/dist/components--carousel.boot-TP6LPFZZ.js +0 -12
- package/docs/public/dist/components--charts.boot-2EOYQWKL.js +0 -108
- package/docs/public/dist/components--checkbox.boot-DS5BSL6T.js +0 -54
- package/docs/public/dist/components--cluster.boot-HHVIBBJG.js +0 -9
- package/docs/public/dist/components--code-window.boot-2GR2DV33.js +0 -20
- package/docs/public/dist/components--container.boot-7LOOGK2K.js +0 -5
- package/docs/public/dist/components--cta.boot-FSNZ5YRT.js +0 -11
- package/docs/public/dist/components--divider.boot-3NI2C3QG.js +0 -6
- package/docs/public/dist/components--empty.boot-YX2UR3PV.js +0 -7
- package/docs/public/dist/components--feature.boot-MUD7NSUO.js +0 -13
- package/docs/public/dist/components--fieldset.boot-J7BYHMKF.js +0 -19
- package/docs/public/dist/components--fileupload.boot-NIKVTTPD.js +0 -52
- package/docs/public/dist/components--footer.boot-EYUK5FRG.js +0 -14
- package/docs/public/dist/components--grid.boot-URDQVDDR.js +0 -59
- package/docs/public/dist/components--heading.boot-BPQKU43E.js +0 -44
- package/docs/public/dist/components--hero.boot-4RAPRGAB.js +0 -17
- package/docs/public/dist/components--icons.boot-ZITNU5JP.js +0 -68
- package/docs/public/dist/components--image.boot-XEEGHQZF.js +0 -19
- package/docs/public/dist/components--input.boot-SGASZG5K.js +0 -7
- package/docs/public/dist/components--list.boot-W3XC5MHD.js +0 -55
- package/docs/public/dist/components--media.boot-5VFIETZO.js +0 -13
- package/docs/public/dist/components--modal.boot-RZUYXBN2.js +0 -47
- package/docs/public/dist/components--nav.boot-ODBOHU7O.js +0 -33
- package/docs/public/dist/components--pricing.boot-4AQ4ZVBY.js +0 -21
- package/docs/public/dist/components--progress.boot-GHAGYZOK.js +0 -30
- package/docs/public/dist/components--prose.boot-QANJL6JI.js +0 -67
- package/docs/public/dist/components--pullquote.boot-Q2WMNAZU.js +0 -22
- package/docs/public/dist/components--radio.boot-TJRDQ2OL.js +0 -75
- package/docs/public/dist/components--rating.boot-QBAN6DEL.js +0 -38
- package/docs/public/dist/components--search.boot-PXH5O5AG.js +0 -17
- package/docs/public/dist/components--section.boot-AQGIYHWW.js +0 -12
- package/docs/public/dist/components--segmented.boot-BEVTKEJO.js +0 -33
- package/docs/public/dist/components--select.boot-47X5RHOC.js +0 -10
- package/docs/public/dist/components--slider.boot-PSRRX7XL.js +0 -47
- package/docs/public/dist/components--spinner.boot-MZ5MO2OH.js +0 -22
- package/docs/public/dist/components--stack.boot-DI4NJXBF.js +0 -9
- package/docs/public/dist/components--stat.boot-QMFUWBQT.js +0 -9
- package/docs/public/dist/components--stepper.boot-34PP2NEV.js +0 -22
- package/docs/public/dist/components--table.boot-FCQGSFIQ.js +0 -11
- package/docs/public/dist/components--testimonial.boot-DWQPDKYG.js +0 -11
- package/docs/public/dist/components--textarea.boot-QVXLBOJ5.js +0 -4
- package/docs/public/dist/components--timeline.boot-26LN52P2.js +0 -95
- package/docs/public/dist/components--toggle.boot-IQQEI76S.js +0 -29
- package/docs/public/dist/components--tooltip.boot-LGHCO6NN.js +0 -9
- package/docs/public/dist/components.boot-SE6PQ4P7.js +0 -103
- package/docs/public/dist/config.boot-DTRRWUE6.js +0 -126
- package/docs/public/dist/constraints.boot-DUHDZBMC.js +0 -71
- package/docs/public/dist/deploy.boot-SLAD3NI2.js +0 -163
- package/docs/public/dist/docs-8e3d4b5c.css +0 -1
- package/docs/public/dist/extending.boot-UA3CN243.js +0 -159
- package/docs/public/dist/faq.boot-6EQAWLQR.js +0 -43
- package/docs/public/dist/getting-started.boot-TDKIFL5U.js +0 -86
- package/docs/public/dist/guard.boot-AUHAWTG4.js +0 -80
- package/docs/public/dist/home.boot-BVQXRH32.js +0 -383
- package/docs/public/dist/how-it-works.boot-LTWAKWKW.js +0 -104
- package/docs/public/dist/hydration.boot-JRM6IPJL.js +0 -78
- package/docs/public/dist/images.boot-M6ZVKTZS.js +0 -80
- package/docs/public/dist/manifest.json +0 -94
- package/docs/public/dist/meta.boot-7NXGPHR4.js +0 -79
- package/docs/public/dist/mutations.boot-F6F43UDX.js +0 -79
- package/docs/public/dist/navigation.boot-AOXWS3ZF.js +0 -57
- package/docs/public/dist/performance.boot-C3UPCOBK.js +0 -98
- package/docs/public/dist/persist.boot-WT32PQOQ.js +0 -61
- package/docs/public/dist/project-structure.boot-FB3LRVJ4.js +0 -63
- package/docs/public/dist/prompt-examples.boot-YKR4VDK4.js +0 -31
- package/docs/public/dist/pulse-ui-81a85c03.css +0 -1
- package/docs/public/dist/raw-responses.boot-M4KA5YXL.js +0 -104
- package/docs/public/dist/routing.boot-FNX5FDGH.js +0 -70
- package/docs/public/dist/runtime-B73WLANC.js +0 -1
- package/docs/public/dist/runtime-KO4BHUQ3.js +0 -49
- package/docs/public/dist/runtime-L2HNXIHW.js +0 -59
- package/docs/public/dist/runtime-QFURDKA2.js +0 -5
- package/docs/public/dist/runtime-UVPXO4IR.js +0 -375
- package/docs/public/dist/runtime-VMJA3Z4N.js +0 -10
- package/docs/public/dist/runtime-ZJ4FXT5O.js +0 -11
- package/docs/public/dist/server-api.boot-K7X3LCFB.js +0 -219
- package/docs/public/dist/server-data.boot-Y7HQYC4R.js +0 -157
- package/docs/public/dist/slash-commands.boot-V2UV7OW2.js +0 -26
- package/docs/public/dist/spec.boot-2WU7ZHCV.js +0 -159
- package/docs/public/dist/state.boot-B24GUE3R.js +0 -73
- package/docs/public/dist/store.boot-TLIB4XHH.js +0 -150
- package/docs/public/dist/streaming.boot-W2DZSMW4.js +0 -80
- package/docs/public/dist/stripe.boot-QN3C2GEL.js +0 -164
- package/docs/public/dist/supabase.boot-BG4XXLZE.js +0 -303
- package/docs/public/dist/testing.boot-6U4WKMTE.js +0 -130
- package/docs/public/dist/validation.boot-PQHYGW5B.js +0 -100
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{a as t,b as d}from"./runtime-ZJ4FXT5O.js";import{sb as o}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as n,h as l}from"./runtime-L2HNXIHW.js";import{a as i,b as c}from"./runtime-B73WLANC.js";var{prev:u,next:r}=n("/components/pullquote"),s={route:"/components/pullquote",meta:{title:"Pullquote \u2014 Pulse Docs",description:"Styled blockquote component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>d({currentHref:"/components/pullquote",prev:u,next:r,name:"pullquote",description:"Styled blockquote with an accent left border and optional attribution. Use it to highlight key quotes or testimonials within body content.",content:`
|
|
2
|
-
|
|
3
|
-
<h2 class="doc-h2" id="basic">Basic</h2>
|
|
4
|
-
${t(o({quote:"Design is not just what it looks like and feels like. Design is how it works.",cite:"Steve Jobs, co-founder of Apple"}),`pullquote({
|
|
5
|
-
quote: 'Design is not just what it looks like and feels like. Design is how it works.',
|
|
6
|
-
cite: 'Steve Jobs, co-founder of Apple',
|
|
7
|
-
})`)}
|
|
8
|
-
|
|
9
|
-
<h2 class="doc-h2" id="large">Large</h2>
|
|
10
|
-
${t(o({quote:"Simplicity is the ultimate sophistication.",cite:"Leonardo da Vinci",size:"lg"}),`pullquote({
|
|
11
|
-
quote: 'Simplicity is the ultimate sophistication.',
|
|
12
|
-
cite: 'Leonardo da Vinci',
|
|
13
|
-
size: 'lg',
|
|
14
|
-
})`)}
|
|
15
|
-
|
|
16
|
-
<h2 class="doc-h2" id="no-cite">Without attribution</h2>
|
|
17
|
-
${t(o({quote:"Good design makes a product understandable."}),`pullquote({
|
|
18
|
-
quote: 'Good design makes a product understandable.',
|
|
19
|
-
})`)}
|
|
20
|
-
|
|
21
|
-
${l(["Prop","Type","Default",""],[["<code>quote</code>","string","\u2014","The quote text \u2014 escaped automatically"],["<code>cite</code>","string","\u2014","Attribution text \u2014 rendered in a <code><figcaption></code>"],["<code>size</code>","<code>md | lg</code>","<code>md</code>","Controls the font size of the quote text"],["<code>class</code>","string","\u2014",""]])}
|
|
22
|
-
`})};var e=document.getElementById("pulse-root");e&&!e.dataset.pulseMounted&&(e.dataset.pulseMounted="1",i(s,e,window.__PULSE_SERVER__||{},{ssr:!0}),c(e,i));var k=s;export{k as default};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import{a as e,b as s}from"./runtime-ZJ4FXT5O.js";import{db as t,eb as o,ya as p}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as i,h as l,i as n}from"./runtime-L2HNXIHW.js";import{a as d,b as c}from"./runtime-B73WLANC.js";var{prev:u,next:m}=i("/components/radio"),r={route:"/components/radio",meta:{title:"Radio \u2014 Pulse Docs",description:"Radio button and radio group components for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>s({currentHref:"/components/radio",prev:u,next:m,name:"radio",description:"Custom-styled radio buttons with full keyboard and screen-reader support. Use <code>radio()</code> for a single option or <code>radioGroup()</code> for a semantic group inside a form.",content:`
|
|
2
|
-
|
|
3
|
-
<h2 class="doc-h2" id="group">Radio group</h2>
|
|
4
|
-
<p>The standard usage. <code>radioGroup()</code> renders a <code><fieldset></code> with a <code><legend></code> and marks the currently selected option via the <code>value</code> prop.</p>
|
|
5
|
-
${e(o({name:"plan",legend:"Plan",value:"pro",options:[{value:"starter",label:"Starter"},{value:"pro",label:"Pro"},{value:"team",label:"Team"}]}),`radioGroup({
|
|
6
|
-
name: 'plan',
|
|
7
|
-
legend: 'Plan',
|
|
8
|
-
value: state.plan, // marks the selected option
|
|
9
|
-
options: [
|
|
10
|
-
{ value: 'starter', label: 'Starter' },
|
|
11
|
-
{ value: 'pro', label: 'Pro' },
|
|
12
|
-
{ value: 'team', label: 'Team' },
|
|
13
|
-
],
|
|
14
|
-
})`,{col:!0})}
|
|
15
|
-
|
|
16
|
-
<h2 class="doc-h2" id="hints">Per-option hints</h2>
|
|
17
|
-
<p>Each option accepts a <code>hint</code> string for supporting copy below the label.</p>
|
|
18
|
-
${e(o({name:"billing",legend:"Billing cycle",value:"annual",options:[{value:"monthly",label:"Monthly",hint:"Billed every month. Cancel any time."},{value:"annual",label:"Annual",hint:"Billed once a year. Save 20%."}]}),`radioGroup({
|
|
19
|
-
name: 'billing',
|
|
20
|
-
legend: 'Billing cycle',
|
|
21
|
-
value: state.billing,
|
|
22
|
-
options: [
|
|
23
|
-
{ value: 'monthly', label: 'Monthly', hint: 'Billed every month. Cancel any time.' },
|
|
24
|
-
{ value: 'annual', label: 'Annual', hint: 'Billed once a year. Save 20%.' },
|
|
25
|
-
],
|
|
26
|
-
})`,{col:!0})}
|
|
27
|
-
|
|
28
|
-
<h2 class="doc-h2" id="error">Error state</h2>
|
|
29
|
-
<p>Pass <code>error</code> to show a validation message below the group. The message is linked via <code>aria-describedby</code>.</p>
|
|
30
|
-
${e(o({name:"size",legend:"Size",error:"Please select a size.",options:[{value:"sm",label:"Small"},{value:"md",label:"Medium"},{value:"lg",label:"Large"}]}),`radioGroup({
|
|
31
|
-
name: 'size',
|
|
32
|
-
legend: 'Size',
|
|
33
|
-
error: server.errors.size,
|
|
34
|
-
options: [
|
|
35
|
-
{ value: 'sm', label: 'Small' },
|
|
36
|
-
{ value: 'md', label: 'Medium' },
|
|
37
|
-
{ value: 'lg', label: 'Large' },
|
|
38
|
-
],
|
|
39
|
-
})`,{col:!0})}
|
|
40
|
-
|
|
41
|
-
<h2 class="doc-h2" id="disabled">Disabled options</h2>
|
|
42
|
-
<p>Set <code>disabled: true</code> on individual options, or pass <code>disabled</code> at the group level to disable all.</p>
|
|
43
|
-
${e(o({name:"tier",legend:"Tier",value:"basic",options:[{value:"basic",label:"Basic"},{value:"pro",label:"Pro"},{value:"enterprise",label:"Enterprise",disabled:!0}]}),`radioGroup({
|
|
44
|
-
name: 'tier',
|
|
45
|
-
legend: 'Tier',
|
|
46
|
-
value: state.tier,
|
|
47
|
-
options: [
|
|
48
|
-
{ value: 'basic', label: 'Basic' },
|
|
49
|
-
{ value: 'pro', label: 'Pro' },
|
|
50
|
-
{ value: 'enterprise', label: 'Enterprise', disabled: true },
|
|
51
|
-
],
|
|
52
|
-
})`,{col:!0})}
|
|
53
|
-
|
|
54
|
-
<h2 class="doc-h2" id="gap">Gap</h2>
|
|
55
|
-
<p>Control spacing between options with <code>gap</code>: <code>'sm'</code> \xB7 <code>'md'</code> (default) \xB7 <code>'lg'</code>.</p>
|
|
56
|
-
${e(o({name:"color",legend:"Colour",gap:"lg",value:"blue",options:[{value:"red",label:"Red"},{value:"blue",label:"Blue"},{value:"green",label:"Green"}]}),"radioGroup({ ..., gap: 'lg' })")}
|
|
57
|
-
|
|
58
|
-
<h2 class="doc-h2" id="single">Single radio</h2>
|
|
59
|
-
<p>Use <code>radio()</code> directly when you need to compose your own group layout \u2014 for example inside a <a href="/components/fieldset">fieldset</a> alongside other controls.</p>
|
|
60
|
-
${e(p({legend:"Preferred contact",content:t({name:"contact",value:"email",label:"Email",checked:!0})+t({name:"contact",value:"phone",label:"Phone"})}),`fieldset({
|
|
61
|
-
legend: 'Preferred contact',
|
|
62
|
-
content:
|
|
63
|
-
radio({ name: 'contact', value: 'email', label: 'Email', checked: true }) +
|
|
64
|
-
radio({ name: 'contact', value: 'phone', label: 'Phone' }),
|
|
65
|
-
})`,{col:!0})}
|
|
66
|
-
|
|
67
|
-
<h2 class="doc-h2" id="in-forms">In forms</h2>
|
|
68
|
-
${n("note","Radio groups submit the selected <code>value</code> string under <code>name</code> in FormData. If nothing is selected, the field is absent from FormData. Read it in <code>action.onStart</code> or <code>action.run</code> via <code>formData.get('plan')</code>.")}
|
|
69
|
-
|
|
70
|
-
<h2 class="doc-h2" id="props-group">radioGroup() props</h2>
|
|
71
|
-
${l(["Prop","Type","Default",""],[["<code>name</code>","string","\u2014","Shared <code>name</code> attribute for all inputs in the group"],["<code>legend</code>","string","\u2014","Group label \u2014 renders as a <code><legend></code>"],["<code>options</code>","array","<code>[]</code>","Array of <code>{ value, label, hint?, disabled? }</code>"],["<code>value</code>","string","\u2014","The currently selected value \u2014 marks the matching option as <code>checked</code>"],["<code>hint</code>","string","\u2014","Helper text below the group"],["<code>error</code>","string","\u2014","Validation error \u2014 linked via <code>aria-describedby</code>"],["<code>gap</code>","<code>sm | md | lg</code>","<code>md</code>","Spacing between options"],["<code>class</code>","string","\u2014",""]])}
|
|
72
|
-
|
|
73
|
-
<h2 class="doc-h2" id="props-radio">radio() props</h2>
|
|
74
|
-
${l(["Prop","Type","Default",""],[["<code>name</code>","string","\u2014","Field name"],["<code>value</code>","string","\u2014","Submitted value when this option is selected"],["<code>label</code>","string","\u2014","Visible label"],["<code>checked</code>","boolean","false",""],["<code>disabled</code>","boolean","false",""],["<code>id</code>","string","\u2014","Override the generated <code>id</code>"],["<code>class</code>","string","\u2014",""]])}
|
|
75
|
-
`})};var a=document.getElementById("pulse-root");a&&!a.dataset.pulseMounted&&(a.dataset.pulseMounted="1",d(r,a,window.__PULSE_SERVER__||{},{ssr:!0}),c(a,d));var w=r;export{w as default};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import{a,b as l}from"./runtime-ZJ4FXT5O.js";import{c,fb as e}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as s,h as r,i as n}from"./runtime-L2HNXIHW.js";import{a as i,b as d}from"./runtime-B73WLANC.js";var{prev:m,next:u}=s("/components/rating"),o={route:"/components/rating",meta:{title:"Rating \u2014 Pulse Docs",description:"Star rating display and interactive input component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>l({currentHref:"/components/rating",prev:m,next:u,name:"rating",description:"Star rating component with two modes. Without <code>name</code>: a read-only display that supports half-star values. With <code>name</code>: an interactive radio group that submits the selected value in FormData \u2014 no JavaScript required.",content:`
|
|
2
|
-
|
|
3
|
-
<h2 class="doc-h2" id="display">Display (read-only)</h2>
|
|
4
|
-
<p>Omit <code>name</code> to render a read-only display. Pass <code>value</code> as a number \u2014 halves are supported.</p>
|
|
5
|
-
${a('<div style="display:flex;flex-direction:column;gap:1rem;align-items:flex-start">'+e({value:5})+e({value:3.5})+e({value:2})+e({value:0})+"</div>",`rating({ value: 5 }) // 5 stars
|
|
6
|
-
rating({ value: 3.5 }) // 3\xBD stars
|
|
7
|
-
rating({ value: 2 }) // 2 stars
|
|
8
|
-
rating({ value: 0 }) // empty`)}
|
|
9
|
-
|
|
10
|
-
<h2 class="doc-h2" id="sizes">Sizes</h2>
|
|
11
|
-
<p><code>'sm'</code> \xB7 <code>'md'</code> (default) \xB7 <code>'lg'</code></p>
|
|
12
|
-
${a('<div style="display:flex;flex-direction:column;gap:1rem;align-items:flex-start">'+e({value:4,size:"sm"})+e({value:4,size:"md"})+e({value:4,size:"lg"})+"</div>",`rating({ value: 4, size: 'sm' })
|
|
13
|
-
rating({ value: 4, size: 'md' })
|
|
14
|
-
rating({ value: 4, size: 'lg' })`)}
|
|
15
|
-
|
|
16
|
-
<h2 class="doc-h2" id="interactive">Interactive</h2>
|
|
17
|
-
<p>Add <code>name</code> to render radio inputs. Hovering a star previews the selection; clicking locks it. The selected value is submitted in FormData.</p>
|
|
18
|
-
${a(e({name:"score",label:"Your rating",value:3,size:"lg"}),"rating({ name: 'score', label: 'Your rating', value: state.score, size: 'lg' })")}
|
|
19
|
-
|
|
20
|
-
<h2 class="doc-h2" id="in-card">In a card</h2>
|
|
21
|
-
${a('<div style="max-width:320px">'+c({title:"Noise-Cancelling Headphones",content:'<div style="display:flex;align-items:center;gap:.75rem;margin-bottom:.75rem">'+e({value:4.5})+'<span style="color:var(--ui-muted);font-size:.85rem">4.5 \xB7 1,284 reviews</span></div><p style="color:var(--ui-muted);margin:0;font-size:.9rem">Crystal-clear audio with 40-hour battery life and adaptive noise cancellation.</p>'})+"</div>",`card({
|
|
22
|
-
title: 'Noise-Cancelling Headphones',
|
|
23
|
-
content:
|
|
24
|
-
'<div style="display:flex;align-items:center;gap:.75rem">' +
|
|
25
|
-
rating({ value: 4.5 }) +
|
|
26
|
-
'<span>4.5 \xB7 1,284 reviews</span>' +
|
|
27
|
-
'</div>' +
|
|
28
|
-
'<p>Crystal-clear audio...</p>',
|
|
29
|
-
})`)}
|
|
30
|
-
|
|
31
|
-
<h2 class="doc-h2" id="disabled">Disabled</h2>
|
|
32
|
-
${a(e({name:"locked",value:4,disabled:!0}),"rating({ name: 'locked', value: 4, disabled: true })")}
|
|
33
|
-
|
|
34
|
-
<h2 class="doc-h2" id="in-forms">In forms</h2>
|
|
35
|
-
${n("note","The interactive rating submits the selected star count as a number string under <code>name</code> in FormData. Read it with <code>Number(formData.get('score'))</code>. If nothing is selected, the field is absent from FormData.")}
|
|
36
|
-
|
|
37
|
-
${r(["Prop","Type","Default",""],[["<code>value</code>","number","0","Current rating. Supports 0.5 steps in display mode."],["<code>max</code>","number","5","Total number of stars"],["<code>name</code>","string","\u2014","Field name \u2014 enables interactive radio mode"],["<code>label</code>","string","\u2014","Accessible group label (interactive mode only)"],["<code>size</code>","<code>sm | md | lg</code>","<code>md</code>","1rem / 1.5rem / 2rem"],["<code>disabled</code>","boolean","false","Interactive mode only"],["<code>class</code>","string","\u2014",""]])}
|
|
38
|
-
`})};var t=document.getElementById("pulse-root");t&&!t.dataset.pulseMounted&&(t.dataset.pulseMounted="1",i(o,t,window.__PULSE_SERVER__||{},{ssr:!0}),d(t,i));var z=o;export{z as default};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import{a as d,b as l}from"./runtime-ZJ4FXT5O.js";import{xa as o}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as c,h as n}from"./runtime-L2HNXIHW.js";import{a as t,b as r}from"./runtime-B73WLANC.js";var{prev:s,next:i}=c("/components/search"),a={route:"/components/search",meta:{title:"Search \u2014 Pulse Docs",description:"Search input component with icon, debounce binding, and clear button.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>l({currentHref:"/components/search",prev:s,next:i,name:"search",description:"A search input with a built-in icon and optional clear button. Handles the native browser cancel button, <code>data-event</code> binding, and debounce in one component. Use this instead of <code>input({ type: 'search' })</code>.",content:`
|
|
2
|
-
${d(o({name:"q",label:"Search",placeholder:"Search products\u2026"})+o({name:"q2",label:"Search",placeholder:"Search\u2026",value:"lamp",clearEvent:"clearSearch",labelHidden:!0}),`search({ name: 'q', label: 'Search', placeholder: 'Search products\u2026' })
|
|
3
|
-
|
|
4
|
-
// With value, clear button, and hidden label:
|
|
5
|
-
search({
|
|
6
|
-
name: 'q',
|
|
7
|
-
label: 'Search',
|
|
8
|
-
labelHidden: true,
|
|
9
|
-
placeholder: 'Search\u2026',
|
|
10
|
-
value: state.search,
|
|
11
|
-
event: 'input:setSearch',
|
|
12
|
-
debounce: 200,
|
|
13
|
-
clearEvent: 'clearSearch',
|
|
14
|
-
})`,{col:!0})}
|
|
15
|
-
|
|
16
|
-
${n(["Prop","Type","Default",""],[["<code>name</code>","string","\u2014","Field name and id base"],["<code>label</code>","string","\u2014","Label text \u2014 always provide for accessibility"],["<code>labelHidden</code>","boolean","false","Hides label visually; still read by screen readers"],["<code>placeholder</code>","string","\u2014",""],["<code>value</code>","string","\u2014","Current value \u2014 controls clear button visibility"],["<code>event</code>","string","\u2014","<code>data-event</code> binding, e.g. <code>'input:setSearch'</code>"],["<code>debounce</code>","number","200","Debounce delay in ms \u2014 only applied when <code>event</code> is set"],["<code>clearEvent</code>","string","\u2014","Click event for the \xD7 button \u2014 only shown when <code>value</code> is non-empty"],["<code>disabled</code>","boolean","false",""],["<code>id</code>","string","\u2014","Override generated id"],["<code>class</code>","string","\u2014","Extra classes on the wrapper"],["<code>attrs</code>","object","{}","Extra attributes on the <code><input></code>"]])}
|
|
17
|
-
`})};var e=document.getElementById("pulse-root");e&&!e.dataset.pulseMounted&&(e.dataset.pulseMounted="1",t(a,e,window.__PULSE_SERVER__||{},{ssr:!0}),r(e,t));var S=a;export{S as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{a as s,b as d}from"./runtime-ZJ4FXT5O.js";import{Na as o,Oa as n}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as r,h as c}from"./runtime-L2HNXIHW.js";import{a as t,b as a}from"./runtime-B73WLANC.js";var{prev:l,next:p}=r("/components/section"),i={route:"/components/section",meta:{title:"Section \u2014 Pulse Docs",description:"Vertical padding wrapper with optional background. Compose with container() for full-width background with constrained content.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>d({currentHref:"/components/section",prev:l,next:p,name:"section",description:"Vertical padding wrapper with optional background. Compose with <code>container()</code> for full-width background with constrained content.",content:`
|
|
2
|
-
${s(n({eyebrow:"Why Pulse",title:"Built for speed.",subtitle:"Every page scores 100 on Lighthouse by design, not by optimisation.",align:"center",variant:"alt",content:o({size:"md",content:'<p style="text-align:center;color:var(--ui-muted)">Content goes here</p>'})})+n({variant:"dark",content:o({size:"md",content:'<p style="text-align:center;color:var(--ui-muted)">Dark background \xB7 no header</p>'})}),`section({
|
|
3
|
-
eyebrow: 'Why Pulse',
|
|
4
|
-
title: 'Built for speed.',
|
|
5
|
-
subtitle: 'Every page scores 100 on Lighthouse by design.',
|
|
6
|
-
align: 'center',
|
|
7
|
-
variant: 'alt',
|
|
8
|
-
content: container({ size: 'lg', content: featureGrid }),
|
|
9
|
-
})`)}
|
|
10
|
-
|
|
11
|
-
${c(["Prop","Type","Default",""],[["<code>content</code>","string (HTML)","\u2014","Raw HTML slot"],["<code>variant</code>","string","'default'","'default' \xB7 'alt' \xB7 'dark'"],["<code>padding</code>","string","'md'","'sm' \xB7 'md' \xB7 'lg'"],["<code>id</code>","string","\u2014","Anchor id for nav links"],["<code>eyebrow</code>","string","\u2014","Small label above the title"],["<code>title</code>","string","\u2014","Section heading"],["<code>level</code>","number","2","Heading tag for the title (1\u20136). Visual style is unchanged."],["<code>subtitle</code>","string","\u2014","Supporting text beneath the heading"],["<code>align</code>","string","'left'","'left' \xB7 'center'"]])}
|
|
12
|
-
`})};var e=document.getElementById("pulse-root");e&&!e.dataset.pulseMounted&&(e.dataset.pulseMounted="1",t(i,e,window.__PULSE_SERVER__||{},{ssr:!0}),a(e,t));var v=i;export{v as default};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import{a as t,b as m}from"./runtime-ZJ4FXT5O.js";import{Qa as c,nb as e}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as s,h as i,i as n}from"./runtime-L2HNXIHW.js";import{a,b as d}from"./runtime-B73WLANC.js";var{prev:r,next:u}=s("/components/segmented"),l={route:"/components/segmented",meta:{title:"Segmented \u2014 Pulse Docs",description:"iOS-style segmented control component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>m({currentHref:"/components/segmented",prev:r,next:u,name:"segmented",description:"iOS-style segmented control built from hidden radio inputs. The selected segment is highlighted via CSS \u2014 no JavaScript required.",content:`
|
|
2
|
-
|
|
3
|
-
<h2 class="doc-h2" id="basic">Basic</h2>
|
|
4
|
-
${t(e({name:"period",value:"week",options:[{value:"day",label:"Day"},{value:"week",label:"Week"},{value:"month",label:"Month"}]}),`segmented({
|
|
5
|
-
name: 'period',
|
|
6
|
-
value: state.period,
|
|
7
|
-
options: [
|
|
8
|
-
{ value: 'day', label: 'Day' },
|
|
9
|
-
{ value: 'week', label: 'Week' },
|
|
10
|
-
{ value: 'month', label: 'Month' },
|
|
11
|
-
],
|
|
12
|
-
})`)}
|
|
13
|
-
|
|
14
|
-
<h2 class="doc-h2" id="sizes">Sizes</h2>
|
|
15
|
-
${t(c({gap:"md",content:e({name:"size-sm",value:"b",size:"sm",options:[{value:"a",label:"Small"},{value:"b",label:"Sizes"},{value:"c",label:"Here"}]})+e({name:"size-md",value:"b",size:"md",options:[{value:"a",label:"Medium"},{value:"b",label:"Default"},{value:"c",label:"Size"}]})+e({name:"size-lg",value:"b",size:"lg",options:[{value:"a",label:"Large"},{value:"b",label:"Size"},{value:"c",label:"Here"}]})}),`segmented({ name: 'view', value: 'b', size: 'sm', options: [...] })
|
|
16
|
-
segmented({ name: 'view', value: 'b', size: 'md', options: [...] })
|
|
17
|
-
segmented({ name: 'view', value: 'b', size: 'lg', options: [...] })`)}
|
|
18
|
-
|
|
19
|
-
<h2 class="doc-h2" id="ui-context">View toggle</h2>
|
|
20
|
-
<p>A common use case \u2014 toggling between Grid and List views.</p>
|
|
21
|
-
${t(e({name:"layout",value:"grid",options:[{value:"grid",label:"Grid"},{value:"list",label:"List"}]}),`segmented({
|
|
22
|
-
name: 'layout',
|
|
23
|
-
value: state.layout,
|
|
24
|
-
options: [
|
|
25
|
-
{ value: 'grid', label: 'Grid' },
|
|
26
|
-
{ value: 'list', label: 'List' },
|
|
27
|
-
],
|
|
28
|
-
})`)}
|
|
29
|
-
|
|
30
|
-
${n("note","The segmented control submits the selected <code>value</code> string under <code>name</code> in FormData. Read it via <code>formData.get('period')</code> in <code>action.onStart</code> or <code>action.run</code>.")}
|
|
31
|
-
|
|
32
|
-
${i(["Prop","Type","Default",""],[["<code>name</code>","string","\u2014","Field name \u2014 submitted in FormData"],["<code>options</code>","array","[]","Array of <code>{ value, label }</code>"],["<code>value</code>","string","\u2014","The currently selected value"],["<code>size</code>","<code>sm | md | lg</code>","<code>md</code>",""],["<code>disabled</code>","boolean","false","Disables all options"],["<code>class</code>","string","\u2014",""]])}
|
|
33
|
-
`})};var o=document.getElementById("pulse-root");o&&!o.dataset.pulseMounted&&(o.dataset.pulseMounted="1",a(l,o,window.__PULSE_SERVER__||{},{ssr:!0}),d(o,a));var w=l;export{w as default};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import{a as n,b as a}from"./runtime-ZJ4FXT5O.js";import{za as o}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as l}from"./runtime-L2HNXIHW.js";import{a as t,b as r}from"./runtime-B73WLANC.js";var{prev:i,next:c}=l("/components/select"),s={route:"/components/select",meta:{title:"Select \u2014 Pulse Docs",description:"Select component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>a({currentHref:"/components/select",prev:i,next:c,name:"select",description:"Options can be plain strings or <code>{ value, label }</code> objects. Pass <code>value</code> to mark the current selection.",content:`
|
|
2
|
-
${n(o({name:"role",label:"Role",options:["Admin","Editor","Viewer"],value:"Editor"})+o({name:"status",label:"Status",options:[{value:"active",label:"Active"},{value:"paused",label:"Paused"}],error:"Please select a status"}),`select({ name: 'role', label: 'Role', options: ['Admin', 'Editor', 'Viewer'], value: state.role })
|
|
3
|
-
select({
|
|
4
|
-
name: 'country',
|
|
5
|
-
label: 'Country',
|
|
6
|
-
options: [{ value: 'gb', label: 'United Kingdom' }, { value: 'us', label: 'United States' }],
|
|
7
|
-
value: state.country,
|
|
8
|
-
required: true,
|
|
9
|
-
})`,{col:!0})}
|
|
10
|
-
`})};var e=document.getElementById("pulse-root");e&&!e.dataset.pulseMounted&&(e.dataset.pulseMounted="1",t(s,e,window.__PULSE_SERVER__||{},{ssr:!0}),r(e,t));var E=s;export{E as default};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import{a as e,b as u}from"./runtime-ZJ4FXT5O.js";import{mb as t}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as r,h as l,i as s}from"./runtime-L2HNXIHW.js";import{a as i,b as d}from"./runtime-B73WLANC.js";var{prev:m,next:h}=r("/components/slider"),n={route:"/components/slider",meta:{title:"Slider \u2014 Pulse Docs",description:"Styled range input slider component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{brightness:100},mutations:{setBrightness:(o,c)=>({brightness:Number(c.target.value)})},view:o=>u({currentHref:"/components/slider",prev:m,next:h,name:"slider",description:"Styled range input with label, hint, and a CSS-driven fill gradient that tracks the thumb live as you drag.",content:`
|
|
2
|
-
|
|
3
|
-
<h2 class="doc-h2" id="basic">Basic</h2>
|
|
4
|
-
${e(t({name:"volume",label:"Volume",showValue:!0}),"slider({ name: 'volume', label: 'Volume', showValue: true })",{col:!0})}
|
|
5
|
-
|
|
6
|
-
<h2 class="doc-h2" id="min-max-step">Min, max, step, and hint</h2>
|
|
7
|
-
${e(t({name:"brightness",label:"Brightness",min:0,max:200,step:10,value:100,showValue:!0,hint:"Adjust display brightness (0\u2013200)"}),`slider({
|
|
8
|
-
name: 'brightness',
|
|
9
|
-
label: 'Brightness',
|
|
10
|
-
min: 0,
|
|
11
|
-
max: 200,
|
|
12
|
-
step: 10,
|
|
13
|
-
value: 100,
|
|
14
|
-
showValue: true,
|
|
15
|
-
hint: 'Adjust display brightness (0\u2013200)',
|
|
16
|
-
})`,{col:!0})}
|
|
17
|
-
|
|
18
|
-
<h2 class="doc-h2" id="live-value">Live value in state</h2>
|
|
19
|
-
<p class="u-mb-4 u-text-sm u-color-muted">Use <code>data-event="change:mutationName"</code> to capture the value when the user releases the handle. The fill gradient always updates live \u2014 no mutation needed for that.</p>
|
|
20
|
-
${e(`<div>
|
|
21
|
-
${t({name:"brightness",label:"Brightness",value:o.brightness,min:0,max:200,step:10,showValue:!0,event:"change:setBrightness"})}
|
|
22
|
-
</div>`,`// state
|
|
23
|
-
{ brightness: 100 }
|
|
24
|
-
|
|
25
|
-
// mutation
|
|
26
|
-
setBrightness: (state, e) => ({ brightness: Number(e.target.value) })
|
|
27
|
-
|
|
28
|
-
// view
|
|
29
|
-
slider({
|
|
30
|
-
name: 'brightness',
|
|
31
|
-
label: 'Brightness',
|
|
32
|
-
min: 0,
|
|
33
|
-
max: 200,
|
|
34
|
-
step: 10,
|
|
35
|
-
value: state.brightness,
|
|
36
|
-
showValue: true,
|
|
37
|
-
event: 'change:setBrightness',
|
|
38
|
-
})`,{col:!0})}
|
|
39
|
-
|
|
40
|
-
<h2 class="doc-h2" id="disabled">Disabled</h2>
|
|
41
|
-
${e(t({name:"opacity",label:"Opacity",value:30,disabled:!0}),"slider({ name: 'opacity', label: 'Opacity', value: 30, disabled: true })",{col:!0})}
|
|
42
|
-
|
|
43
|
-
${s("note",'The fill gradient updates live during drag automatically. To read the final value, either use <code>data-event="change:mutationName"</code> on the slider or submit it as part of a form \u2014 the value is available in FormData as a number string under <code>name</code>.')}
|
|
44
|
-
${s("warning",'Do not use <code>data-event="input:mutationName"</code> on a slider. Pulse replaces <code>innerHTML</code> on every mutation, which interrupts the drag mid-gesture. Use <code>change</code> instead \u2014 it fires once when the user releases the handle.')}
|
|
45
|
-
|
|
46
|
-
${l(["Prop","Type","Default",""],[["<code>name</code>","string","\u2014","Field name \u2014 submitted in FormData"],["<code>label</code>","string","\u2014","Visible label text"],["<code>min</code>","number","0","Minimum value"],["<code>max</code>","number","100","Maximum value"],["<code>step</code>","number","1","Step increment"],["<code>value</code>","number","50","Current value"],["<code>showValue</code>","boolean","false","Show current value live beside the label as you drag"],["<code>disabled</code>","boolean","false",""],["<code>hint</code>","string","\u2014","Helper text below the slider"],["<code>event</code>","string","\u2014","<code>data-event</code> binding, e.g. <code>change:mutationName</code>"],["<code>id</code>","string","\u2014","Override the generated <code>id</code>"],["<code>class</code>","string","\u2014",""]])}
|
|
47
|
-
`})};var a=document.getElementById("pulse-root");a&&!a.dataset.pulseMounted&&(a.dataset.pulseMounted="1",i(n,a,window.__PULSE_SERVER__||{},{ssr:!0}),d(a,i));var V=n;export{V as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{a as n,b as l}from"./runtime-ZJ4FXT5O.js";import{Ra as i,a as s,gb as e}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as c,h as d}from"./runtime-L2HNXIHW.js";import{a as t,b as a}from"./runtime-B73WLANC.js";var{prev:p,next:m}=c("/components/spinner"),r={route:"/components/spinner",meta:{title:"Spinner \u2014 Pulse Docs",description:"Loading spinner component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>l({currentHref:"/components/spinner",prev:p,next:m,name:"spinner",description:"CSS-animated loading ring. No JavaScript required. Use to indicate background activity \u2014 inside buttons, next to labels, or as a full-area overlay.",content:`
|
|
2
|
-
|
|
3
|
-
<h2 class="doc-h2" id="sizes">Sizes</h2>
|
|
4
|
-
${n(i({gap:"lg",align:"center",content:e({size:"sm"})+e({size:"md"})+e({size:"lg"})}),`spinner({ size: 'sm' })
|
|
5
|
-
spinner({ size: 'md' })
|
|
6
|
-
spinner({ size: 'lg' })`)}
|
|
7
|
-
|
|
8
|
-
<h2 class="doc-h2" id="colors">Colours</h2>
|
|
9
|
-
${n(i({gap:"lg",align:"center",content:e({color:"accent"})+e({color:"muted"})+'<span style="background:var(--ui-accent);padding:.75rem;border-radius:var(--ui-radius);display:inline-flex">'+e({color:"white"})+"</span>"}),`spinner({ color: 'accent' })
|
|
10
|
-
spinner({ color: 'muted' })
|
|
11
|
-
spinner({ color: 'white' })`)}
|
|
12
|
-
|
|
13
|
-
<h2 class="doc-h2" id="in-button">Inside a button</h2>
|
|
14
|
-
<p>Pair with a <code>button()</code> to show loading state. Pass the spinner as the button's <code>icon</code> prop.</p>
|
|
15
|
-
${n(s({label:"Saving",icon:e({size:"sm",color:"white"}),disabled:!0})+" "+s({label:"Loading",icon:e({size:"sm"}),variant:"secondary",disabled:!0}),`button({
|
|
16
|
-
label: 'Saving',
|
|
17
|
-
icon: spinner({ size: 'sm', color: 'white' }),
|
|
18
|
-
disabled: state.loading,
|
|
19
|
-
})`)}
|
|
20
|
-
|
|
21
|
-
${d(["Prop","Type","Default",""],[["<code>size</code>","<code>sm | md | lg</code>","<code>md</code>","1rem / 1.5rem / 2.5rem"],["<code>color</code>","<code>accent | muted | white</code>","<code>accent</code>",""],["<code>label</code>","string","<code>Loading\u2026</code>",'Sets <code>aria-label</code> on the <code>role="status"</code> element'],["<code>class</code>","string","\u2014",""]])}
|
|
22
|
-
`})};var o=document.getElementById("pulse-root");o&&!o.dataset.pulseMounted&&(o.dataset.pulseMounted="1",t(r,o,window.__PULSE_SERVER__||{},{ssr:!0}),a(o,t));var S=r;export{S as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{a as c,b as i}from"./runtime-ZJ4FXT5O.js";import{Qa as m,a as e}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a,h as r}from"./runtime-L2HNXIHW.js";import{a as o,b as s}from"./runtime-B73WLANC.js";var{prev:l,next:d}=a("/components/stack"),n={route:"/components/stack",meta:{title:"Stack \u2014 Pulse Docs",description:"Stack component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>i({currentHref:"/components/stack",prev:l,next:d,name:"stack",description:"Flex column with consistent vertical gap. Replaces the common pattern of adding <code>margin-bottom</code> to every child element.",content:`
|
|
2
|
-
${c(m({gap:"sm",content:e({label:"Primary action"})+e({label:"Secondary action",variant:"secondary"})+e({label:"Ghost action",variant:"ghost"})}),`stack({ gap: 'sm', align: 'start', content:
|
|
3
|
-
button({ label: 'Primary action' }) +
|
|
4
|
-
button({ label: 'Secondary action', variant: 'secondary' }) +
|
|
5
|
-
button({ label: 'Ghost', variant: 'ghost' })
|
|
6
|
-
})`)}
|
|
7
|
-
|
|
8
|
-
${r(["Prop","Type","Default",""],[["<code>content</code>","string (HTML)","\u2014","Raw HTML slot"],["<code>gap</code>","string","'md'","'xs' \xB7 'sm' \xB7 'md' \xB7 'lg' \xB7 'xl'"],["<code>align</code>","string","'stretch'","'stretch' \xB7 'start' \xB7 'center' \xB7 'end'"]])}
|
|
9
|
-
`})};var t=document.getElementById("pulse-root");t&&!t.dataset.pulseMounted&&(t.dataset.pulseMounted="1",o(n,t,window.__PULSE_SERVER__||{},{ssr:!0}),s(t,o));var k=n;export{k as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{a as o,b as d}from"./runtime-ZJ4FXT5O.js";import{Ca as e}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as n,h as l}from"./runtime-L2HNXIHW.js";import{a,b as s}from"./runtime-B73WLANC.js";var{prev:c,next:u}=n("/components/stat"),r={route:"/components/stat",meta:{title:"Stat \u2014 Pulse Docs",description:"Stat component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>d({currentHref:"/components/stat",prev:c,next:u,name:"stat",description:"Numeric metric display with optional trend indicator. Use inside a <code>card()</code> or a flex/grid container for dashboard layouts.",content:`
|
|
2
|
-
${o('<div style="display:flex;gap:2rem;flex-wrap:wrap">'+e({label:"Total users",value:"12,483",change:"+8.2%",trend:"up"})+e({label:"Bounce rate",value:"24%",change:"\u22123.1%",trend:"down"})+e({label:"Avg. session",value:"4m 12s"})+"</div>",`stat({ label: 'Total users', value: '12,483', change: '+8.2%', trend: 'up' })
|
|
3
|
-
stat({ label: 'Bounce rate', value: '24%', change: '\u22123.1%', trend: 'down' })
|
|
4
|
-
stat({ label: 'Avg. session', value: '4m 12s' })`)}
|
|
5
|
-
<p>The <code>center</code> prop centre-aligns the value, label, and change \u2014 useful in grids or dashboard cards.</p>
|
|
6
|
-
${o('<div style="display:flex;gap:2rem;flex-wrap:wrap">'+e({label:"Total users",value:"12,483",change:"+8.2%",trend:"up",center:!0})+e({label:"Bounce rate",value:"24%",change:"\u22123.1%",trend:"down",center:!0})+e({label:"Avg. session",value:"4m 12s",center:!0})+"</div>","stat({ label: 'Total users', value: '12,483', change: '+8.2%', trend: 'up', center: true })")}
|
|
7
|
-
|
|
8
|
-
${l(["Prop","Type","Default",""],[["<code>label</code>","string","\u2014",""],["<code>value</code>","string","\u2014",'Formatted value string \u2014 e.g. "2.4k", "98%"'],["<code>change</code>","string","\u2014",'Change label \u2014 e.g. "+12%", "\u22123"'],["<code>trend</code>","string","neutral","up \xB7 down \xB7 neutral"],["<code>center</code>","boolean","false","Centre-aligns value, label, and change"]])}
|
|
9
|
-
`})};var t=document.getElementById("pulse-root");t&&!t.dataset.pulseMounted&&(t.dataset.pulseMounted="1",a(r,t,window.__PULSE_SERVER__||{},{ssr:!0}),s(t,a));var w=r;export{w as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{a as t,b as i}from"./runtime-ZJ4FXT5O.js";import{qb as s}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as c,h as n}from"./runtime-L2HNXIHW.js";import{a as r,b as a}from"./runtime-B73WLANC.js";var{prev:l,next:m}=c("/components/stepper"),o=["Account","Details","Payment","Review"],p={route:"/components/stepper",meta:{title:"Stepper \u2014 Pulse Docs",description:"Horizontal step progress indicator component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>i({currentHref:"/components/stepper",prev:l,next:m,name:"stepper",description:"Horizontal step progress indicator. Completed steps show a check icon; the active step has an accent border; upcoming steps are muted. A connector line between steps fills with accent colour as progress advances.",content:`
|
|
2
|
-
|
|
3
|
-
<h2 class="doc-h2" id="step1">Step 1 active</h2>
|
|
4
|
-
${t(s({steps:o,current:0}),`stepper({
|
|
5
|
-
steps: ['Account', 'Details', 'Payment', 'Review'],
|
|
6
|
-
current: 0,
|
|
7
|
-
})`,{col:!0})}
|
|
8
|
-
|
|
9
|
-
<h2 class="doc-h2" id="step2">Step 2 active</h2>
|
|
10
|
-
${t(s({steps:o,current:1}),`stepper({
|
|
11
|
-
steps: ['Account', 'Details', 'Payment', 'Review'],
|
|
12
|
-
current: 1,
|
|
13
|
-
})`,{col:!0})}
|
|
14
|
-
|
|
15
|
-
<h2 class="doc-h2" id="complete">All complete</h2>
|
|
16
|
-
${t(s({steps:o,current:o.length}),`stepper({
|
|
17
|
-
steps: ['Account', 'Details', 'Payment', 'Review'],
|
|
18
|
-
current: steps.length, // past the last index = all complete
|
|
19
|
-
})`,{col:!0})}
|
|
20
|
-
|
|
21
|
-
${n(["Prop","Type","Default",""],[["<code>steps</code>","string[]","[]","Array of step label strings"],["<code>current</code>","number","0","0-based index of the active step. Pass <code>steps.length</code> to mark all steps complete."],["<code>class</code>","string","\u2014",""]])}
|
|
22
|
-
`})};var e=document.getElementById("pulse-root");e&&!e.dataset.pulseMounted&&(e.dataset.pulseMounted="1",r(p,e,window.__PULSE_SERVER__||{},{ssr:!0}),a(e,r));var y=p;export{y as default};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{a as n,b as i}from"./runtime-ZJ4FXT5O.js";import{Fa as c,b as e}from"./runtime-UVPXO4IR.js";import{a}from"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as s}from"./runtime-L2HNXIHW.js";import{a as o,b as l}from"./runtime-B73WLANC.js";var{prev:m,next:u}=s("/components/table"),r={route:"/components/table",meta:{title:"Table \u2014 Pulse Docs",description:"Table component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>i({currentHref:"/components/table",prev:m,next:u,name:"table",description:'The scroll wrapper has <code>role="region"</code> and <code>tabindex="0"</code> so keyboard users can scroll horizontally on narrow screens. Row cells are raw HTML slots \u2014 wrap user-supplied values in <code>escHtml()</code> when building them.',content:`
|
|
2
|
-
${n(c({caption:"Team members",headers:["Name","Role","Status"],rows:[[a("Alice Smith"),e({label:"Admin",variant:"info"}),e({label:"Active",variant:"success"})],[a("Bob Jones"),e({label:"Editor",variant:"default"}),e({label:"Active",variant:"success"})],[a("Carol White"),e({label:"Viewer",variant:"default"}),e({label:"Inactive",variant:"default"})]]}),`table({
|
|
3
|
-
caption: 'Team members',
|
|
4
|
-
headers: ['Name', 'Role', 'Status'],
|
|
5
|
-
rows: server.users.map(u => [
|
|
6
|
-
escHtml(u.name),
|
|
7
|
-
badge({ label: u.role, variant: u.role === 'admin' ? 'info' : 'default' }),
|
|
8
|
-
badge({ label: u.status, variant: u.active ? 'success' : 'default' }),
|
|
9
|
-
]),
|
|
10
|
-
})`)}
|
|
11
|
-
`})};var t=document.getElementById("pulse-root");t&&!t.dataset.pulseMounted&&(t.dataset.pulseMounted="1",o(r,t,window.__PULSE_SERVER__||{},{ssr:!0}),l(t,o));var T=r;export{T as default};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{a as n,b as d}from"./runtime-ZJ4FXT5O.js";import{Ha as o}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as r,h as a}from"./runtime-L2HNXIHW.js";import{a as t,b as s}from"./runtime-B73WLANC.js";var{prev:m,next:c}=r("/components/testimonial"),i={route:"/components/testimonial",meta:{title:"Testimonial \u2014 Pulse Docs",description:"Testimonial component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>d({currentHref:"/components/testimonial",prev:m,next:c,name:"testimonial",description:"Customer quote card with star rating, avatar, and attribution. When <code>src</code> is omitted the avatar shows initials derived from <code>name</code>.",content:`
|
|
2
|
-
${n('<div style="display:grid;grid-template-columns:1fr 1fr;gap:1.5rem">'+o({quote:"This is the fastest app I have ever used. It replaced three tools I was paying for.",name:"Alice Marsh",role:"Head of Product, Stride",rating:5})+o({quote:"Switched from the competition six months ago and have not looked back once.",name:"Ben Carter",role:"Founder, Loopback",rating:5})+"</div>",`testimonial({
|
|
3
|
-
quote: 'This is the fastest app I have ever used.',
|
|
4
|
-
name: 'Alice Marsh',
|
|
5
|
-
role: 'Head of Product, Stride',
|
|
6
|
-
rating: 5,
|
|
7
|
-
src: user.avatarUrl, // optional \u2014 falls back to initials
|
|
8
|
-
})`)}
|
|
9
|
-
|
|
10
|
-
${a(["Prop","Type","Default",""],[["<code>quote</code>","string","\u2014",""],["<code>name</code>","string","\u2014","Author name \u2014 also used for avatar initials"],["<code>role</code>","string","\u2014",""],["<code>src</code>","string","\u2014","Avatar image URL; omit to show initials"],["<code>rating</code>","number","0","1\u20135 stars; omit or set 0 to hide"]])}
|
|
11
|
-
`})};var e=document.getElementById("pulse-root");e&&!e.dataset.pulseMounted&&(e.dataset.pulseMounted="1",t(i,e,window.__PULSE_SERVER__||{},{ssr:!0}),s(e,t));var P=i;export{P as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{a as l,b as s}from"./runtime-ZJ4FXT5O.js";import{Aa as o}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a}from"./runtime-L2HNXIHW.js";import{a as t,b as n}from"./runtime-B73WLANC.js";var{prev:i,next:d}=a("/components/textarea"),r={route:"/components/textarea",meta:{title:"Textarea \u2014 Pulse Docs",description:"Textarea component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>s({currentHref:"/components/textarea",prev:i,next:d,name:"textarea",description:"Multi-line text input with label, hint, and error support. Wired up identically to <code>input</code> \u2014 <code>for</code>/<code>id</code> and <code>aria-describedby</code> are derived from <code>name</code>.",content:`
|
|
2
|
-
${l(o({name:"bio",label:"Bio",placeholder:"Tell us about yourself\u2026",hint:"Max 500 characters",rows:3})+o({name:"note",label:"Note",value:"hello world",error:"Note is too long",rows:3}),`textarea({ name: 'bio', label: 'Bio', placeholder: 'Tell us about yourself\u2026', hint: 'Max 500 characters' })
|
|
3
|
-
textarea({ name: 'note', label: 'Note', value: state.note, error: server.errors.note, rows: 6 })`,{col:!0})}
|
|
4
|
-
`})};var e=document.getElementById("pulse-root");e&&!e.dataset.pulseMounted&&(e.dataset.pulseMounted="1",t(r,e,window.__PULSE_SERVER__||{},{ssr:!0}),n(e,t));var h=r;export{h as default};
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import{a as e,b as m}from"./runtime-ZJ4FXT5O.js";import{$a as o,Ca as r,a as u,ab as t,b as a,c as l}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as d,h as i}from"./runtime-L2HNXIHW.js";import{a as s,b as p}from"./runtime-B73WLANC.js";var{prev:g,next:v}=d("/components/timeline"),b='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>',h='<svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>',y='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/></svg>',c={route:"/components/timeline",meta:{title:"Timeline \u2014 Pulse Docs",description:"Timeline component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>m({currentHref:"/components/timeline",prev:g,next:v,name:"timeline",description:"Ordered sequence of events or steps connected by a line. Supports vertical (default) and horizontal orientations. Each item accepts a raw HTML content slot \u2014 pass any text, component, or markup.",content:`
|
|
2
|
-
|
|
3
|
-
<h2 class="doc-h2" id="vertical">Vertical (default)</h2>
|
|
4
|
-
<p>Steps flow downward. The connector line links each dot to the next.</p>
|
|
5
|
-
${e(t({items:[{label:"Jan 2023",content:'<strong style="color:var(--ui-text)">Project kicked off</strong><p style="color:var(--ui-muted);margin:.25rem 0 0">Initial scope agreed with stakeholders. Repository created.</p>'},{label:"Mar 2023",content:'<strong style="color:var(--ui-text)">Alpha release</strong><p style="color:var(--ui-muted);margin:.25rem 0 0">Internal testing with 12 pilot users. Core features stable.</p>'},{label:"Jun 2023",content:'<strong style="color:var(--ui-text)">Public beta</strong><p style="color:var(--ui-muted);margin:.25rem 0 0">Open sign-up enabled. 400 users in first week.</p>'},{label:"Sep 2023",content:'<strong style="color:var(--ui-text)">v1.0 launched</strong><p style="color:var(--ui-muted);margin:.25rem 0 0">Billing live, docs published, ProductHunt launch.</p>'}]}),`timeline({
|
|
6
|
-
items: [
|
|
7
|
-
{ label: 'Jan 2023', content: '<strong>Project kicked off</strong><p>Initial scope agreed.</p>' },
|
|
8
|
-
{ label: 'Mar 2023', content: '<strong>Alpha release</strong><p>Internal testing with 12 pilot users.</p>' },
|
|
9
|
-
{ label: 'Jun 2023', content: '<strong>Public beta</strong><p>Open sign-up enabled. 400 users in first week.</p>' },
|
|
10
|
-
{ label: 'Sep 2023', content: '<strong>v1.0 launched</strong><p>Billing live, docs published.</p>' },
|
|
11
|
-
],
|
|
12
|
-
})`)}
|
|
13
|
-
|
|
14
|
-
<h2 class="doc-h2" id="horizontal">Horizontal</h2>
|
|
15
|
-
<p>Steps flow left to right \u2014 good for process flows or numbered stages.</p>
|
|
16
|
-
${e(t({direction:"horizontal",items:[{label:"Step 1",content:'<p style="color:var(--ui-muted);margin:0;font-size:.85rem">Sign up</p>'},{label:"Step 2",content:'<p style="color:var(--ui-muted);margin:0;font-size:.85rem">Connect data</p>'},{label:"Step 3",content:'<p style="color:var(--ui-muted);margin:0;font-size:.85rem">Invite team</p>'},{label:"Step 4",content:'<p style="color:var(--ui-muted);margin:0;font-size:.85rem">Go live</p>'}]}),`timeline({
|
|
17
|
-
direction: 'horizontal',
|
|
18
|
-
items: [
|
|
19
|
-
{ label: 'Step 1', content: '<p>Sign up</p>' },
|
|
20
|
-
{ label: 'Step 2', content: '<p>Connect data</p>' },
|
|
21
|
-
{ label: 'Step 3', content: '<p>Invite team</p>' },
|
|
22
|
-
{ label: 'Step 4', content: '<p>Go live</p>' },
|
|
23
|
-
],
|
|
24
|
-
})`)}
|
|
25
|
-
|
|
26
|
-
<h2 class="doc-h2" id="dot-colors">Dot colours</h2>
|
|
27
|
-
<p>Use <code>dotColor</code> to convey status: <code>'accent'</code> \xB7 <code>'success'</code> \xB7 <code>'warning'</code> \xB7 <code>'error'</code> \xB7 <code>'muted'</code>.</p>
|
|
28
|
-
${e(t({items:[{dotColor:"success",label:"Deployed",content:'<p style="color:var(--ui-muted);margin:0">Production deploy completed successfully.</p>'},{dotColor:"success",label:"Tested",content:'<p style="color:var(--ui-muted);margin:0">All 92 tests passed. Coverage 98%.</p>'},{dotColor:"warning",label:"Review",content:'<p style="color:var(--ui-muted);margin:0">Awaiting sign-off from design lead.</p>'},{dotColor:"error",label:"Blocked",content:'<p style="color:var(--ui-muted);margin:0">Dependency on payment API not yet ready.</p>'},{dotColor:"muted",label:"Planned",content:'<p style="color:var(--ui-muted);margin:0">Mobile app release \u2014 Q1 2025.</p>'}]}),`timeline({
|
|
29
|
-
items: [
|
|
30
|
-
{ dotColor: 'success', label: 'Deployed', content: '...' },
|
|
31
|
-
{ dotColor: 'success', label: 'Tested', content: '...' },
|
|
32
|
-
{ dotColor: 'warning', label: 'Review', content: '...' },
|
|
33
|
-
{ dotColor: 'error', label: 'Blocked', content: '...' },
|
|
34
|
-
{ dotColor: 'muted', label: 'Planned', content: '...' },
|
|
35
|
-
],
|
|
36
|
-
})`)}
|
|
37
|
-
|
|
38
|
-
<h2 class="doc-h2" id="icon-dots">Icon dots</h2>
|
|
39
|
-
<p>Pass any SVG or emoji as <code>dot</code>. The dot grows to accommodate the content and uses a tinted background matching its colour variant.</p>
|
|
40
|
-
${e(t({items:[{dot:b,dotColor:"success",label:"Completed",content:'<strong style="color:var(--ui-text)">Onboarding</strong><p style="color:var(--ui-muted);margin:.2rem 0 0">Profile set up, preferences saved.</p>'},{dot:h,dotColor:"accent",label:"Milestone",content:'<strong style="color:var(--ui-text)">First 1,000 users</strong><p style="color:var(--ui-muted);margin:.2rem 0 0">Reached organically in 18 days.</p>'},{dot:y,dotColor:"warning",label:"Incident",content:'<strong style="color:var(--ui-text)">Partial outage</strong><p style="color:var(--ui-muted);margin:.2rem 0 0">CDN edge node failed \u2014 resolved in 4 minutes.</p>'}]}),`timeline({
|
|
41
|
-
items: [
|
|
42
|
-
{
|
|
43
|
-
dot: checkSvg,
|
|
44
|
-
dotColor: 'success',
|
|
45
|
-
label: 'Completed',
|
|
46
|
-
content: '<strong>Onboarding</strong><p>Profile set up, preferences saved.</p>',
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
dot: starSvg,
|
|
50
|
-
dotColor: 'accent',
|
|
51
|
-
label: 'Milestone',
|
|
52
|
-
content: '<strong>First 1,000 users</strong>',
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
})`)}
|
|
56
|
-
|
|
57
|
-
<h2 class="doc-h2" id="rich-content">Rich content slot</h2>
|
|
58
|
-
<p>The <code>content</code> slot accepts any HTML \u2014 including other Pulse components like <code>card()</code>, <code>badge()</code>, or <code>stat()</code>.</p>
|
|
59
|
-
${e(t({items:[{dotColor:"success",label:"Q1 2024",content:l({title:"Series A closed",content:'<div style="display:flex;gap:1.5rem;flex-wrap:wrap">'+r({label:"Raised",value:"$4.2M"})+r({label:"Valuation",value:"$18M"})+r({label:"Investors",value:"6"})+"</div>"})},{dotColor:"accent",label:"Q3 2024",content:l({title:"Product launch",content:'<p style="color:var(--ui-muted);margin:0 0 .75rem">Shipped v1.0 to general availability. Three tiers, 14-day trial.</p><div style="display:flex;gap:.5rem;flex-wrap:wrap">'+a({label:"Launch",variant:"info"})+a({label:"Billing live",variant:"success"})+"</div>"})},{dotColor:"muted",label:"Q1 2025 (planned)",content:l({title:"Mobile apps",content:'<p style="color:var(--ui-muted);margin:0 0 .75rem">iOS and Android apps in development. Public beta planned.</p>'+u({label:"Join waitlist",size:"sm",variant:"secondary"})})}]}),`timeline({
|
|
60
|
-
items: [
|
|
61
|
-
{
|
|
62
|
-
dotColor: 'success',
|
|
63
|
-
label: 'Q1 2024',
|
|
64
|
-
content: card({
|
|
65
|
-
title: 'Series A closed',
|
|
66
|
-
content: stat({ label: 'Raised', value: '$4.2M' }) + ...,
|
|
67
|
-
}),
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
dotColor: 'accent',
|
|
71
|
-
label: 'Q3 2024',
|
|
72
|
-
content: card({
|
|
73
|
-
title: 'Product launch',
|
|
74
|
-
content: '<p>Shipped v1.0 to general availability.</p>' +
|
|
75
|
-
badge({ label: 'Billing live', variant: 'success' }),
|
|
76
|
-
}),
|
|
77
|
-
},
|
|
78
|
-
],
|
|
79
|
-
})`)}
|
|
80
|
-
|
|
81
|
-
<h2 class="doc-h2" id="item-fn">Using timelineItem()</h2>
|
|
82
|
-
<p>Build items individually with <code>timelineItem()</code> and pass the joined HTML as <code>content</code>. Useful for dynamic or conditional lists.</p>
|
|
83
|
-
${e(t({content:o({dotColor:"success",label:"Done",content:'<p style="color:var(--ui-muted);margin:0">Design system tokens agreed</p>'})+o({dotColor:"success",label:"Done",content:'<p style="color:var(--ui-muted);margin:0">Component library built</p>'})+o({dotColor:"accent",label:"Current",content:'<p style="color:var(--ui-muted);margin:0">Documentation in progress</p>'})+o({dotColor:"muted",label:"Next",content:'<p style="color:var(--ui-muted);margin:0">Public launch</p>'})}),`timeline({
|
|
84
|
-
content:
|
|
85
|
-
timelineItem({ dotColor: 'success', label: 'Done', content: '...' }) +
|
|
86
|
-
timelineItem({ dotColor: 'success', label: 'Done', content: '...' }) +
|
|
87
|
-
timelineItem({ dotColor: 'accent', label: 'Current', content: '...' }) +
|
|
88
|
-
timelineItem({ dotColor: 'muted', label: 'Next', content: '...' }),
|
|
89
|
-
})`)}
|
|
90
|
-
|
|
91
|
-
${i(["Prop","Type","Default",""],[["<code>direction</code>","string","'vertical'","'vertical' \xB7 'horizontal'"],["<code>items</code>","array","[]","Array of <code>timelineItem</code> option objects"],["<code>content</code>","string (HTML)","\u2014","Raw HTML alternative to <code>items</code> \u2014 use with <code>timelineItem()</code>"]])}
|
|
92
|
-
|
|
93
|
-
<h3 class="doc-h3" style="margin-top:2rem">timelineItem() props</h3>
|
|
94
|
-
${i(["Prop","Type","Default",""],[["<code>content</code>","string (HTML)","\u2014","Raw HTML body \u2014 accepts any component output"],["<code>label</code>","string","\u2014","Timestamp or step label (escaped)"],["<code>dot</code>","string (HTML)","\u2014","Raw HTML inside the dot \u2014 SVG or emoji; grows the dot to 2rem"],["<code>dotColor</code>","string","'accent'","'accent' \xB7 'success' \xB7 'warning' \xB7 'error' \xB7 'muted'"]])}
|
|
95
|
-
`})};var n=document.getElementById("pulse-root");n&&!n.dataset.pulseMounted&&(n.dataset.pulseMounted="1",s(c,n,window.__PULSE_SERVER__||{},{ssr:!0}),p(n,s));var M=c;export{M as default};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import{a as o,b as r}from"./runtime-ZJ4FXT5O.js";import{Qa as a,bb as e}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as n,h as s,i as c}from"./runtime-L2HNXIHW.js";import{a as i,b as l}from"./runtime-B73WLANC.js";var{prev:m,next:u}=n("/components/toggle"),d={route:"/components/toggle",meta:{title:"Toggle \u2014 Pulse Docs",description:"iOS-style switch toggle component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>r({currentHref:"/components/toggle",prev:m,next:u,name:"toggle",description:'iOS-style switch that renders a visually hidden <code><input type="checkbox"></code> with a custom track and thumb. No JavaScript required \u2014 state is read from FormData on submission.',content:`
|
|
2
|
-
|
|
3
|
-
<h2 class="doc-h2" id="default">Default</h2>
|
|
4
|
-
${o(a({gap:"md",content:e({name:"notifications",label:"Email notifications"})+e({name:"updates",label:"Product updates",checked:!0})}),`toggle({ name: 'notifications', label: 'Email notifications' })
|
|
5
|
-
toggle({ name: 'updates', label: 'Product updates', checked: true })`,{col:!0})}
|
|
6
|
-
|
|
7
|
-
<h2 class="doc-h2" id="hint">With hint</h2>
|
|
8
|
-
<p>Use <code>hint</code> to add supporting text below the switch.</p>
|
|
9
|
-
${o(a({gap:"lg",content:e({name:"marketing",label:"Marketing emails",hint:"Receive tips, product news, and special offers."})+e({name:"digest",label:"Weekly digest",hint:"A summary of activity sent every Monday morning.",checked:!0})}),`toggle({
|
|
10
|
-
name: 'marketing',
|
|
11
|
-
label: 'Marketing emails',
|
|
12
|
-
hint: 'Receive tips, product news, and special offers.',
|
|
13
|
-
})
|
|
14
|
-
toggle({
|
|
15
|
-
name: 'digest',
|
|
16
|
-
label: 'Weekly digest',
|
|
17
|
-
hint: 'A summary of activity sent every Monday morning.',
|
|
18
|
-
checked: true,
|
|
19
|
-
})`,{col:!0})}
|
|
20
|
-
|
|
21
|
-
<h2 class="doc-h2" id="disabled">Disabled</h2>
|
|
22
|
-
${o(a({gap:"md",content:e({name:"a",label:"Off and disabled",disabled:!0})+e({name:"b",label:"On and disabled",disabled:!0,checked:!0})}),`toggle({ name: 'a', label: 'Off and disabled', disabled: true })
|
|
23
|
-
toggle({ name: 'b', label: 'On and disabled', disabled: true, checked: true })`,{col:!0})}
|
|
24
|
-
|
|
25
|
-
<h2 class="doc-h2" id="in-forms">In forms</h2>
|
|
26
|
-
${c("note","The switch submits as <code>'on'</code> under its <code>name</code> when checked. When unchecked, the field is absent from FormData entirely \u2014 the same behaviour as a native checkbox. Read it with <code>formData.get('name') === 'on'</code>.")}
|
|
27
|
-
|
|
28
|
-
${s(["Prop","Type","Default",""],[["<code>name</code>","string","\u2014","Field name \u2014 submitted in FormData"],["<code>label</code>","string","\u2014","Visible label text"],["<code>checked</code>","boolean","false","Initial on/off state"],["<code>disabled</code>","boolean","false",""],["<code>hint</code>","string","\u2014","Helper text below the switch"],["<code>id</code>","string","\u2014","Override the generated <code>id</code>"],["<code>class</code>","string","\u2014",""]])}
|
|
29
|
-
`})};var t=document.getElementById("pulse-root");t&&!t.dataset.pulseMounted&&(t.dataset.pulseMounted="1",i(d,t,window.__PULSE_SERVER__||{},{ssr:!0}),l(t,i));var w=d;export{w as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{a,b as l}from"./runtime-ZJ4FXT5O.js";import{Ra as c,Va as o,a as t}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as i,h as p}from"./runtime-L2HNXIHW.js";import{a as r,b as s}from"./runtime-B73WLANC.js";var{prev:d,next:m}=i("/components/tooltip"),n={route:"/components/tooltip",meta:{title:"Tooltip \u2014 Pulse Docs",description:"Tooltip component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>l({currentHref:"/components/tooltip",prev:d,next:m,name:"tooltip",description:"CSS-powered tooltip that wraps any element. No JavaScript required \u2014 the bubble appears on hover and <code>:focus-within</code>. Supports four placements.",content:`
|
|
2
|
-
${a(c({gap:"lg",justify:"center",content:o({content:"This appears on top",position:"top",trigger:t({label:"Top",variant:"secondary"})})+o({content:"This appears below",position:"bottom",trigger:t({label:"Bottom",variant:"secondary"})})+o({content:"This appears to the left",position:"left",trigger:t({label:"Left",variant:"secondary"})})+o({content:"This appears to the right",position:"right",trigger:t({label:"Right",variant:"secondary"})})}),`tooltip({
|
|
3
|
-
content: 'This appears on top',
|
|
4
|
-
position: 'top', // top | bottom | left | right
|
|
5
|
-
trigger: button({ label: 'Hover me', variant: 'secondary' }),
|
|
6
|
-
})`)}
|
|
7
|
-
|
|
8
|
-
${p(["Prop","Type","Default",""],[["<code>content</code>","string","\u2014","Tooltip text (plain text only)"],["<code>trigger</code>","string (HTML)","\u2014","Raw HTML slot \u2014 the element the tooltip wraps"],["<code>position</code>","<code>top | bottom | left | right</code>","<code>top</code>",""],["<code>class</code>","string","\u2014",""]])}
|
|
9
|
-
`})};var e=document.getElementById("pulse-root");e&&!e.dataset.pulseMounted&&(e.dataset.pulseMounted="1",r(n,e,window.__PULSE_SERVER__||{},{ssr:!0}),s(e,r));var w=n;export{w as default};
|