@lilydesignsystem/svelte-headless 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/dist/components/AotearoaNationalHealthIndexInput/AotearoaNationalHealthIndexInput.svelte +55 -0
- package/dist/components/AotearoaNationalHealthIndexInput/AotearoaNationalHealthIndexInput.svelte.d.ts +10 -0
- package/dist/components/AotearoaNationalHealthIndexView/AotearoaNationalHealthIndexView.svelte +40 -0
- package/dist/components/AotearoaNationalHealthIndexView/AotearoaNationalHealthIndexView.svelte.d.ts +8 -0
- package/dist/components/AreaChart/AreaChart.svelte +42 -3
- package/dist/components/AreaChart/AreaChart.svelte.d.ts +4 -0
- package/dist/components/ArgentinaCodigoUnicoDeIdentificacionLaboralInput/ArgentinaCodigoUnicoDeIdentificacionLaboralInput.svelte +55 -0
- package/dist/components/ArgentinaCodigoUnicoDeIdentificacionLaboralInput/ArgentinaCodigoUnicoDeIdentificacionLaboralInput.svelte.d.ts +10 -0
- package/dist/components/ArgentinaCodigoUnicoDeIdentificacionLaboralView/ArgentinaCodigoUnicoDeIdentificacionLaboralView.svelte +40 -0
- package/dist/components/ArgentinaCodigoUnicoDeIdentificacionLaboralView/ArgentinaCodigoUnicoDeIdentificacionLaboralView.svelte.d.ts +8 -0
- package/dist/components/BarChart/BarChart.svelte +42 -3
- package/dist/components/BarChart/BarChart.svelte.d.ts +4 -0
- package/dist/components/BharatAadhaarInput/BharatAadhaarInput.svelte +55 -0
- package/dist/components/BharatAadhaarInput/BharatAadhaarInput.svelte.d.ts +10 -0
- package/dist/components/BharatAadhaarView/BharatAadhaarView.svelte +40 -0
- package/dist/components/BharatAadhaarView/BharatAadhaarView.svelte.d.ts +8 -0
- package/dist/components/BrasilCartaoNacionalDeSaudeInput/BrasilCartaoNacionalDeSaudeInput.svelte +55 -0
- package/dist/components/BrasilCartaoNacionalDeSaudeInput/BrasilCartaoNacionalDeSaudeInput.svelte.d.ts +10 -0
- package/dist/components/BrasilCartaoNacionalDeSaudeView/BrasilCartaoNacionalDeSaudeView.svelte +40 -0
- package/dist/components/BrasilCartaoNacionalDeSaudeView/BrasilCartaoNacionalDeSaudeView.svelte.d.ts +8 -0
- package/dist/components/CalendarDayTable/CalendarDayTable.svelte +71 -0
- package/dist/components/CalendarDayTable/CalendarDayTable.svelte.d.ts +13 -0
- package/dist/components/CalendarMonthTable/CalendarMonthTable.svelte +71 -0
- package/dist/components/CalendarMonthTable/CalendarMonthTable.svelte.d.ts +13 -0
- package/dist/components/CalendarWeekTable/CalendarWeekTable.svelte +71 -0
- package/dist/components/CalendarWeekTable/CalendarWeekTable.svelte.d.ts +13 -0
- package/dist/components/CalendarYearTable/CalendarYearTable.svelte +71 -0
- package/dist/components/CalendarYearTable/CalendarYearTable.svelte.d.ts +13 -0
- package/dist/components/CanadaSocialInsuranceNumberInput/CanadaSocialInsuranceNumberInput.svelte +55 -0
- package/dist/components/CanadaSocialInsuranceNumberInput/CanadaSocialInsuranceNumberInput.svelte.d.ts +10 -0
- package/dist/components/CanadaSocialInsuranceNumberView/CanadaSocialInsuranceNumberView.svelte +40 -0
- package/dist/components/CanadaSocialInsuranceNumberView/CanadaSocialInsuranceNumberView.svelte.d.ts +8 -0
- package/dist/components/CandlestickChart/CandlestickChart.svelte +63 -0
- package/dist/components/CandlestickChart/CandlestickChart.svelte.d.ts +13 -0
- package/dist/components/ChatComposer/ChatComposer.svelte +110 -0
- package/dist/components/ChatComposer/ChatComposer.svelte.d.ts +25 -0
- package/dist/components/ChileRolUnicoNacionalInput/ChileRolUnicoNacionalInput.svelte +55 -0
- package/dist/components/ChileRolUnicoNacionalInput/ChileRolUnicoNacionalInput.svelte.d.ts +10 -0
- package/dist/components/ChileRolUnicoNacionalView/ChileRolUnicoNacionalView.svelte +40 -0
- package/dist/components/ChileRolUnicoNacionalView/ChileRolUnicoNacionalView.svelte.d.ts +8 -0
- package/dist/components/ChoroplethChart/ChoroplethChart.svelte +63 -0
- package/dist/components/ChoroplethChart/ChoroplethChart.svelte.d.ts +13 -0
- package/dist/components/ColumnChart/ColumnChart.svelte +42 -3
- package/dist/components/ColumnChart/ColumnChart.svelte.d.ts +4 -0
- package/dist/components/ComposedChart/ComposedChart.svelte +63 -0
- package/dist/components/ComposedChart/ComposedChart.svelte.d.ts +13 -0
- package/dist/components/EmptyState/EmptyState.svelte +47 -0
- package/dist/components/EmptyState/EmptyState.svelte.d.ts +11 -0
- package/dist/components/FileTree/FileTree.svelte +210 -0
- package/dist/components/FileTree/FileTree.svelte.d.ts +11 -0
- package/dist/components/FunnelChart/FunnelChart.svelte +63 -0
- package/dist/components/FunnelChart/FunnelChart.svelte.d.ts +13 -0
- package/dist/components/GanttTable/GanttTable.svelte +5 -5
- package/dist/components/GanttTableTD/GanttTableTD.svelte +2 -2
- package/dist/components/GanttTableTH/GanttTableTH.svelte +3 -3
- package/dist/components/GanttTableTbody/GanttTableTbody.svelte +5 -5
- package/dist/components/GanttTableTbody/GanttTableTbody.svelte.d.ts +1 -1
- package/dist/components/GanttTableTfoot/GanttTableTfoot.svelte +5 -5
- package/dist/components/GanttTableTfoot/GanttTableTfoot.svelte.d.ts +1 -1
- package/dist/components/GanttTableThead/GanttTableThead.svelte +4 -4
- package/dist/components/GanttTableThead/GanttTableThead.svelte.d.ts +1 -1
- package/dist/components/GanttTableTr/GanttTableTr.svelte +8 -8
- package/dist/components/GaugeChart/GaugeChart.svelte +63 -0
- package/dist/components/GaugeChart/GaugeChart.svelte.d.ts +13 -0
- package/dist/components/HangukJuminDeungnokBeonhoInput/HangukJuminDeungnokBeonhoInput.svelte +55 -0
- package/dist/components/HangukJuminDeungnokBeonhoInput/HangukJuminDeungnokBeonhoInput.svelte.d.ts +10 -0
- package/dist/components/HangukJuminDeungnokBeonhoView/HangukJuminDeungnokBeonhoView.svelte +40 -0
- package/dist/components/HangukJuminDeungnokBeonhoView/HangukJuminDeungnokBeonhoView.svelte.d.ts +8 -0
- package/dist/components/HeatmapChart/HeatmapChart.svelte +63 -0
- package/dist/components/HeatmapChart/HeatmapChart.svelte.d.ts +13 -0
- package/dist/components/IndonesiaNomorIndukKependudukanInput/IndonesiaNomorIndukKependudukanInput.svelte +55 -0
- package/dist/components/IndonesiaNomorIndukKependudukanInput/IndonesiaNomorIndukKependudukanInput.svelte.d.ts +10 -0
- package/dist/components/IndonesiaNomorIndukKependudukanView/IndonesiaNomorIndukKependudukanView.svelte +40 -0
- package/dist/components/IndonesiaNomorIndukKependudukanView/IndonesiaNomorIndukKependudukanView.svelte.d.ts +8 -0
- package/dist/components/KbdShortcut/KbdShortcut.svelte +49 -0
- package/dist/components/KbdShortcut/KbdShortcut.svelte.d.ts +12 -0
- package/dist/components/LineChart/LineChart.svelte +42 -3
- package/dist/components/LineChart/LineChart.svelte.d.ts +4 -0
- package/dist/components/LuxembourgMatriculeInput/LuxembourgMatriculeInput.svelte +55 -0
- package/dist/components/LuxembourgMatriculeInput/LuxembourgMatriculeInput.svelte.d.ts +10 -0
- package/dist/components/LuxembourgMatriculeView/LuxembourgMatriculeView.svelte +40 -0
- package/dist/components/LuxembourgMatriculeView/LuxembourgMatriculeView.svelte.d.ts +8 -0
- package/dist/components/MagyarorszagTajSzamInput/MagyarorszagTajSzamInput.svelte +55 -0
- package/dist/components/MagyarorszagTajSzamInput/MagyarorszagTajSzamInput.svelte.d.ts +10 -0
- package/dist/components/MagyarorszagTajSzamView/MagyarorszagTajSzamView.svelte +40 -0
- package/dist/components/MagyarorszagTajSzamView/MagyarorszagTajSzamView.svelte.d.ts +8 -0
- package/dist/components/Mark/Mark.svelte +27 -0
- package/dist/components/Mark/Mark.svelte.d.ts +9 -0
- package/dist/components/MexicoClaveUnicaDeRegistroDePoblacionInput/MexicoClaveUnicaDeRegistroDePoblacionInput.svelte +55 -0
- package/dist/components/MexicoClaveUnicaDeRegistroDePoblacionInput/MexicoClaveUnicaDeRegistroDePoblacionInput.svelte.d.ts +10 -0
- package/dist/components/MexicoClaveUnicaDeRegistroDePoblacionView/MexicoClaveUnicaDeRegistroDePoblacionView.svelte +40 -0
- package/dist/components/MexicoClaveUnicaDeRegistroDePoblacionView/MexicoClaveUnicaDeRegistroDePoblacionView.svelte.d.ts +8 -0
- package/dist/components/MisrAlRaqmAlQawmiInput/MisrAlRaqmAlQawmiInput.svelte +55 -0
- package/dist/components/MisrAlRaqmAlQawmiInput/MisrAlRaqmAlQawmiInput.svelte.d.ts +10 -0
- package/dist/components/MisrAlRaqmAlQawmiView/MisrAlRaqmAlQawmiView.svelte +40 -0
- package/dist/components/MisrAlRaqmAlQawmiView/MisrAlRaqmAlQawmiView.svelte.d.ts +8 -0
- package/dist/components/MultiSelect/MultiSelect.svelte +70 -0
- package/dist/components/MultiSelect/MultiSelect.svelte.d.ts +19 -0
- package/dist/components/MultiSelectWithExtras/MultiSelectWithExtras.svelte +80 -0
- package/dist/components/MultiSelectWithExtras/MultiSelectWithExtras.svelte.d.ts +23 -0
- package/dist/components/NihonKojinBangoInput/NihonKojinBangoInput.svelte +55 -0
- package/dist/components/NihonKojinBangoInput/NihonKojinBangoInput.svelte.d.ts +10 -0
- package/dist/components/NihonKojinBangoView/NihonKojinBangoView.svelte +40 -0
- package/dist/components/NihonKojinBangoView/NihonKojinBangoView.svelte.d.ts +8 -0
- package/dist/components/OneTimePasswordInput/OneTimePasswordInput.svelte +85 -0
- package/dist/components/OneTimePasswordInput/OneTimePasswordInput.svelte.d.ts +22 -0
- package/dist/components/OsterreichSozialversicherungsnummerInput/OsterreichSozialversicherungsnummerInput.svelte +55 -0
- package/dist/components/OsterreichSozialversicherungsnummerInput/OsterreichSozialversicherungsnummerInput.svelte.d.ts +10 -0
- package/dist/components/OsterreichSozialversicherungsnummerView/OsterreichSozialversicherungsnummerView.svelte +40 -0
- package/dist/components/OsterreichSozialversicherungsnummerView/OsterreichSozialversicherungsnummerView.svelte.d.ts +8 -0
- package/dist/components/PieChart/PieChart.svelte +63 -0
- package/dist/components/PieChart/PieChart.svelte.d.ts +13 -0
- package/dist/components/PilipinasPhilhealthIdentificationNumberInput/PilipinasPhilhealthIdentificationNumberInput.svelte +55 -0
- package/dist/components/PilipinasPhilhealthIdentificationNumberInput/PilipinasPhilhealthIdentificationNumberInput.svelte.d.ts +10 -0
- package/dist/components/PilipinasPhilhealthIdentificationNumberView/PilipinasPhilhealthIdentificationNumberView.svelte +40 -0
- package/dist/components/PilipinasPhilhealthIdentificationNumberView/PilipinasPhilhealthIdentificationNumberView.svelte.d.ts +8 -0
- package/dist/components/PrathetThaiLekPrajamTuaPrachachonInput/PrathetThaiLekPrajamTuaPrachachonInput.svelte +55 -0
- package/dist/components/PrathetThaiLekPrajamTuaPrachachonInput/PrathetThaiLekPrajamTuaPrachachonInput.svelte.d.ts +10 -0
- package/dist/components/PrathetThaiLekPrajamTuaPrachachonView/PrathetThaiLekPrajamTuaPrachachonView.svelte +40 -0
- package/dist/components/PrathetThaiLekPrajamTuaPrachachonView/PrathetThaiLekPrajamTuaPrachachonView.svelte.d.ts +8 -0
- package/dist/components/RadarChart/RadarChart.svelte +63 -0
- package/dist/components/RadarChart/RadarChart.svelte.d.ts +13 -0
- package/dist/components/RingChart/RingChart.svelte +63 -0
- package/dist/components/RingChart/RingChart.svelte.d.ts +13 -0
- package/dist/components/RossiyaSnilsInput/RossiyaSnilsInput.svelte +55 -0
- package/dist/components/RossiyaSnilsInput/RossiyaSnilsInput.svelte.d.ts +10 -0
- package/dist/components/RossiyaSnilsView/RossiyaSnilsView.svelte +40 -0
- package/dist/components/RossiyaSnilsView/RossiyaSnilsView.svelte.d.ts +8 -0
- package/dist/components/SankeyChart/SankeyChart.svelte +63 -0
- package/dist/components/SankeyChart/SankeyChart.svelte.d.ts +13 -0
- package/dist/components/ScatterChart/ScatterChart.svelte +42 -3
- package/dist/components/ScatterChart/ScatterChart.svelte.d.ts +4 -0
- package/dist/components/SchweizAhvNummerInput/SchweizAhvNummerInput.svelte +55 -0
- package/dist/components/SchweizAhvNummerInput/SchweizAhvNummerInput.svelte.d.ts +10 -0
- package/dist/components/SchweizAhvNummerView/SchweizAhvNummerView.svelte +40 -0
- package/dist/components/SchweizAhvNummerView/SchweizAhvNummerView.svelte.d.ts +8 -0
- package/dist/components/ShowMore/ShowMore.svelte +64 -0
- package/dist/components/ShowMore/ShowMore.svelte.d.ts +15 -0
- package/dist/components/SingaporeNationalRegistrationIdentityCardInput/SingaporeNationalRegistrationIdentityCardInput.svelte +55 -0
- package/dist/components/SingaporeNationalRegistrationIdentityCardInput/SingaporeNationalRegistrationIdentityCardInput.svelte.d.ts +10 -0
- package/dist/components/SingaporeNationalRegistrationIdentityCardView/SingaporeNationalRegistrationIdentityCardView.svelte +40 -0
- package/dist/components/SingaporeNationalRegistrationIdentityCardView/SingaporeNationalRegistrationIdentityCardView.svelte.d.ts +8 -0
- package/dist/components/SouthAfricaIdentityNumberInput/SouthAfricaIdentityNumberInput.svelte +55 -0
- package/dist/components/SouthAfricaIdentityNumberInput/SouthAfricaIdentityNumberInput.svelte.d.ts +10 -0
- package/dist/components/SouthAfricaIdentityNumberView/SouthAfricaIdentityNumberView.svelte +40 -0
- package/dist/components/SouthAfricaIdentityNumberView/SouthAfricaIdentityNumberView.svelte.d.ts +8 -0
- package/dist/components/StreamingText/StreamingText.svelte +48 -0
- package/dist/components/StreamingText/StreamingText.svelte.d.ts +13 -0
- package/dist/components/SunburstChart/SunburstChart.svelte +63 -0
- package/dist/components/SunburstChart/SunburstChart.svelte.d.ts +13 -0
- package/dist/components/Thinking/Thinking.svelte +58 -0
- package/dist/components/Thinking/Thinking.svelte.d.ts +15 -0
- package/dist/components/ToolCall/ToolCall.svelte +54 -0
- package/dist/components/ToolCall/ToolCall.svelte.d.ts +15 -0
- package/dist/components/ToolCallError/ToolCallError.svelte +27 -0
- package/dist/components/ToolCallError/ToolCallError.svelte.d.ts +9 -0
- package/dist/components/ToolCallInput/ToolCallInput.svelte +30 -0
- package/dist/components/ToolCallInput/ToolCallInput.svelte.d.ts +11 -0
- package/dist/components/ToolCallName/ToolCallName.svelte +27 -0
- package/dist/components/ToolCallName/ToolCallName.svelte.d.ts +9 -0
- package/dist/components/ToolCallOutput/ToolCallOutput.svelte +30 -0
- package/dist/components/ToolCallOutput/ToolCallOutput.svelte.d.ts +11 -0
- package/dist/components/ToolCallStatus/ToolCallStatus.svelte +29 -0
- package/dist/components/ToolCallStatus/ToolCallStatus.svelte.d.ts +11 -0
- package/dist/components/TurkiyeTcKimlikNumarasiInput/TurkiyeTcKimlikNumarasiInput.svelte +55 -0
- package/dist/components/TurkiyeTcKimlikNumarasiInput/TurkiyeTcKimlikNumarasiInput.svelte.d.ts +10 -0
- package/dist/components/TurkiyeTcKimlikNumarasiView/TurkiyeTcKimlikNumarasiView.svelte +40 -0
- package/dist/components/TurkiyeTcKimlikNumarasiView/TurkiyeTcKimlikNumarasiView.svelte.d.ts +8 -0
- package/dist/components/UkrayinaReyestratsiyniyNomerOblikovoyiKartkyPlatnykaPodatkivInput/UkrayinaReyestratsiyniyNomerOblikovoyiKartkyPlatnykaPodatkivInput.svelte +55 -0
- package/dist/components/UkrayinaReyestratsiyniyNomerOblikovoyiKartkyPlatnykaPodatkivInput/UkrayinaReyestratsiyniyNomerOblikovoyiKartkyPlatnykaPodatkivInput.svelte.d.ts +10 -0
- package/dist/components/UkrayinaReyestratsiyniyNomerOblikovoyiKartkyPlatnykaPodatkivView/UkrayinaReyestratsiyniyNomerOblikovoyiKartkyPlatnykaPodatkivView.svelte +40 -0
- package/dist/components/UkrayinaReyestratsiyniyNomerOblikovoyiKartkyPlatnykaPodatkivView/UkrayinaReyestratsiyniyNomerOblikovoyiKartkyPlatnykaPodatkivView.svelte.d.ts +8 -0
- package/dist/components/YisraelTeudatZehutInput/YisraelTeudatZehutInput.svelte +55 -0
- package/dist/components/YisraelTeudatZehutInput/YisraelTeudatZehutInput.svelte.d.ts +10 -0
- package/dist/components/YisraelTeudatZehutView/YisraelTeudatZehutView.svelte +40 -0
- package/dist/components/YisraelTeudatZehutView/YisraelTeudatZehutView.svelte.d.ts +8 -0
- package/dist/components/ZhongguoJuminShenfenzhengHaomaInput/ZhongguoJuminShenfenzhengHaomaInput.svelte +55 -0
- package/dist/components/ZhongguoJuminShenfenzhengHaomaInput/ZhongguoJuminShenfenzhengHaomaInput.svelte.d.ts +10 -0
- package/dist/components/ZhongguoJuminShenfenzhengHaomaView/ZhongguoJuminShenfenzhengHaomaView.svelte +40 -0
- package/dist/components/ZhongguoJuminShenfenzhengHaomaView/ZhongguoJuminShenfenzhengHaomaView.svelte.d.ts +8 -0
- package/dist/index.d.ts +80 -0
- package/dist/index.js +80 -0
- package/index.md +1 -1
- package/package.json +9 -9
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// OneTimePasswordInput component
|
|
3
|
+
//
|
|
4
|
+
// A headless one-time-password (OTP / verification code) field. It is ONE real
|
|
5
|
+
// native <input>, not a row of segmented boxes (see PinInputDiv for that), so
|
|
6
|
+
// SMS / password-manager autofill (autocomplete="one-time-code") and paste work.
|
|
7
|
+
//
|
|
8
|
+
// Props:
|
|
9
|
+
// className — string, optional. CSS class name.
|
|
10
|
+
// label — string, required. Accessible name via aria-label.
|
|
11
|
+
// length — number, required. Number of characters in the code (maxlength). No default.
|
|
12
|
+
// value — string, default "". Bindable.
|
|
13
|
+
// inputMode — string, default "numeric". Use "text" for alphanumeric codes.
|
|
14
|
+
// pattern — string, default "[0-9]*". Use e.g. "[A-Za-z0-9]*" for alphanumeric codes.
|
|
15
|
+
// name — string, optional. Form field name.
|
|
16
|
+
// required, disabled — boolean, default false.
|
|
17
|
+
// ...restProps — additional HTML attributes spread onto the <input>.
|
|
18
|
+
//
|
|
19
|
+
// Syntax:
|
|
20
|
+
// <OneTimePasswordInput label="Verification code" length={6} bind:value />
|
|
21
|
+
//
|
|
22
|
+
// Keyboard:
|
|
23
|
+
// - None beyond native input behavior
|
|
24
|
+
//
|
|
25
|
+
// Accessibility:
|
|
26
|
+
// - aria-label={label} provides the accessible name
|
|
27
|
+
// - autocomplete="one-time-code" lets the platform offer the received code
|
|
28
|
+
//
|
|
29
|
+
// Internationalization:
|
|
30
|
+
// - The label prop accepts any translated string; no hardcoded strings
|
|
31
|
+
//
|
|
32
|
+
// Claude rules:
|
|
33
|
+
// - Headless: no CSS, no styles
|
|
34
|
+
// - Never validates or submits; the consumer owns verification
|
|
35
|
+
|
|
36
|
+
let {
|
|
37
|
+
class: className = "",
|
|
38
|
+
label,
|
|
39
|
+
length,
|
|
40
|
+
value = $bindable(""),
|
|
41
|
+
inputMode = "numeric",
|
|
42
|
+
pattern = "[0-9]*",
|
|
43
|
+
name = undefined,
|
|
44
|
+
required = false,
|
|
45
|
+
disabled = false,
|
|
46
|
+
...restProps
|
|
47
|
+
}: {
|
|
48
|
+
/** Accessible label. */
|
|
49
|
+
label: string;
|
|
50
|
+
/** Number of characters in the code. */
|
|
51
|
+
length: number;
|
|
52
|
+
/** Current value. Bindable. */
|
|
53
|
+
value?: string;
|
|
54
|
+
/** Virtual keyboard hint. */
|
|
55
|
+
inputMode?: string;
|
|
56
|
+
/** Allowed characters pattern. */
|
|
57
|
+
pattern?: string;
|
|
58
|
+
/** Form field name. */
|
|
59
|
+
name?: string;
|
|
60
|
+
/** Whether required. */
|
|
61
|
+
required?: boolean;
|
|
62
|
+
/** Whether disabled. */
|
|
63
|
+
disabled?: boolean;
|
|
64
|
+
[key: string]: unknown;
|
|
65
|
+
} = $props();
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<!-- OneTimePasswordInput.svelte -->
|
|
69
|
+
<input
|
|
70
|
+
class={`one-time-password-input ${className}`}
|
|
71
|
+
type="text"
|
|
72
|
+
inputmode={inputMode as any}
|
|
73
|
+
autocomplete="one-time-code"
|
|
74
|
+
maxlength={length}
|
|
75
|
+
{pattern}
|
|
76
|
+
spellcheck={false}
|
|
77
|
+
autocapitalize="off"
|
|
78
|
+
aria-label={label}
|
|
79
|
+
data-length={length}
|
|
80
|
+
{name}
|
|
81
|
+
bind:value
|
|
82
|
+
{required}
|
|
83
|
+
{disabled}
|
|
84
|
+
{...restProps}
|
|
85
|
+
/>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type $$ComponentProps = {
|
|
2
|
+
/** Accessible label. */
|
|
3
|
+
label: string;
|
|
4
|
+
/** Number of characters in the code. */
|
|
5
|
+
length: number;
|
|
6
|
+
/** Current value. Bindable. */
|
|
7
|
+
value?: string;
|
|
8
|
+
/** Virtual keyboard hint. */
|
|
9
|
+
inputMode?: string;
|
|
10
|
+
/** Allowed characters pattern. */
|
|
11
|
+
pattern?: string;
|
|
12
|
+
/** Form field name. */
|
|
13
|
+
name?: string;
|
|
14
|
+
/** Whether required. */
|
|
15
|
+
required?: boolean;
|
|
16
|
+
/** Whether disabled. */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
};
|
|
20
|
+
declare const OneTimePasswordInput: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
21
|
+
type OneTimePasswordInput = ReturnType<typeof OneTimePasswordInput>;
|
|
22
|
+
export default OneTimePasswordInput;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// OsterreichSozialversicherungsnummerInput component
|
|
3
|
+
//
|
|
4
|
+
// A headless input for entering Austria's Sozialversicherungsnummer (SVNR).
|
|
5
|
+
// Format: Ten digits, displayed as NNNN DDMMYY. The first three digits are a serial number (the first not zero) followed by a Modulus-11 check digit as the fourth digit; the remaining six digits encode date of birth (DDMMYY). If the Modulus-11 remainder is 10, the serial number is incremented by one and the check digit recalculated.
|
|
6
|
+
//
|
|
7
|
+
// Props:
|
|
8
|
+
// className — string, optional. CSS class name.
|
|
9
|
+
// label — string, required. Accessible label for screen readers via aria-label.
|
|
10
|
+
// value — string, default "". Bindable input value; supports bind:value.
|
|
11
|
+
// required — boolean, default false. Whether the input is required for form submission.
|
|
12
|
+
// disabled — boolean, default false. Whether the input is disabled.
|
|
13
|
+
// ...restProps — additional HTML attributes spread onto the <input>.
|
|
14
|
+
//
|
|
15
|
+
// Syntax:
|
|
16
|
+
// <OsterreichSozialversicherungsnummerInput label="Sozialversicherungsnummer (SVNR)" bind:value />
|
|
17
|
+
//
|
|
18
|
+
// Accessibility:
|
|
19
|
+
// - aria-label provides the accessible name for screen readers
|
|
20
|
+
// - autocomplete="off" protects sensitive identifiers
|
|
21
|
+
// - required and disabled states are conveyed to assistive technology
|
|
22
|
+
//
|
|
23
|
+
// Internationalization:
|
|
24
|
+
// - The label prop externalizes user-facing text for translation
|
|
25
|
+
//
|
|
26
|
+
// References:
|
|
27
|
+
// - https://de.wikipedia.org/wiki/Sozialversicherungsnummer
|
|
28
|
+
|
|
29
|
+
let {
|
|
30
|
+
class: className = "",
|
|
31
|
+
label,
|
|
32
|
+
value = $bindable(""),
|
|
33
|
+
required = false,
|
|
34
|
+
disabled = false,
|
|
35
|
+
...restProps
|
|
36
|
+
}: {
|
|
37
|
+
label: string;
|
|
38
|
+
value?: string;
|
|
39
|
+
required?: boolean;
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
[key: string]: unknown;
|
|
42
|
+
} = $props();
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<!-- OsterreichSozialversicherungsnummerInput.svelte -->
|
|
46
|
+
<input
|
|
47
|
+
class={`osterreich-sozialversicherungsnummer-input ${className}`}
|
|
48
|
+
type="text"
|
|
49
|
+
aria-label={label}
|
|
50
|
+
autocomplete="off"
|
|
51
|
+
bind:value
|
|
52
|
+
{required}
|
|
53
|
+
{disabled}
|
|
54
|
+
{...restProps}
|
|
55
|
+
/>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type $$ComponentProps = {
|
|
2
|
+
label: string;
|
|
3
|
+
value?: string;
|
|
4
|
+
required?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
declare const OsterreichSozialversicherungsnummerInput: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
9
|
+
type OsterreichSozialversicherungsnummerInput = ReturnType<typeof OsterreichSozialversicherungsnummerInput>;
|
|
10
|
+
export default OsterreichSozialversicherungsnummerInput;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// OsterreichSozialversicherungsnummerView component
|
|
3
|
+
//
|
|
4
|
+
// A headless display component for showing Austria's
|
|
5
|
+
// Sozialversicherungsnummer (SVNR) in a read-only format.
|
|
6
|
+
// Format: Ten digits, displayed as NNNN DDMMYY. The first three digits are a serial number (the first not zero) followed by a Modulus-11 check digit as the fourth digit; the remaining six digits encode date of birth (DDMMYY). If the Modulus-11 remainder is 10, the serial number is incremented by one and the check digit recalculated.
|
|
7
|
+
//
|
|
8
|
+
// Props:
|
|
9
|
+
// className — string, optional. CSS class name.
|
|
10
|
+
// label — string, required. Accessible label for screen readers via aria-label.
|
|
11
|
+
// value — string, default "". The identifier string to display.
|
|
12
|
+
// ...restProps — additional HTML attributes spread onto the <span>.
|
|
13
|
+
//
|
|
14
|
+
// Syntax:
|
|
15
|
+
// <OsterreichSozialversicherungsnummerView label="Sozialversicherungsnummer (SVNR)" value={value} />
|
|
16
|
+
//
|
|
17
|
+
// Accessibility:
|
|
18
|
+
// - aria-label provides the accessible name so screen readers announce the purpose
|
|
19
|
+
//
|
|
20
|
+
// References:
|
|
21
|
+
// - https://de.wikipedia.org/wiki/Sozialversicherungsnummer
|
|
22
|
+
|
|
23
|
+
let {
|
|
24
|
+
class: className = "",
|
|
25
|
+
label,
|
|
26
|
+
value = "",
|
|
27
|
+
...restProps
|
|
28
|
+
}: {
|
|
29
|
+
label: string;
|
|
30
|
+
value?: string;
|
|
31
|
+
[key: string]: unknown;
|
|
32
|
+
} = $props();
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<!-- OsterreichSozialversicherungsnummerView.svelte -->
|
|
36
|
+
<span
|
|
37
|
+
class={`osterreich-sozialversicherungsnummer-view ${className}`}
|
|
38
|
+
aria-label={label}
|
|
39
|
+
{...restProps}>{value}</span
|
|
40
|
+
>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type $$ComponentProps = {
|
|
2
|
+
label: string;
|
|
3
|
+
value?: string;
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
};
|
|
6
|
+
declare const OsterreichSozialversicherungsnummerView: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type OsterreichSozialversicherungsnummerView = ReturnType<typeof OsterreichSozialversicherungsnummerView>;
|
|
8
|
+
export default OsterreichSozialversicherungsnummerView;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// PieChart component
|
|
3
|
+
//
|
|
4
|
+
// A headless chart container for a circular chart divided into slices that show each part of a whole. The consumer supplies the inline
|
|
5
|
+
// svg as `children`; the component draws nothing. The graphic is a
|
|
6
|
+
// role="img" wrapper named by `label`. The optional `dataTable` snippet
|
|
7
|
+
// renders the accessible table alternative as a SIBLING of that image
|
|
8
|
+
// wrapper, never inside it: a role="img" element makes its descendants
|
|
9
|
+
// presentational, so a table placed inside would be invisible to
|
|
10
|
+
// assistive technology.
|
|
11
|
+
//
|
|
12
|
+
// Props:
|
|
13
|
+
// class — string, optional. Consumer class appended after the base class.
|
|
14
|
+
// label — string, optional. Accessible name of the chart image.
|
|
15
|
+
// children — Snippet. The consumer-supplied inline svg.
|
|
16
|
+
// dataTable — Snippet, optional. The accessible table alternative.
|
|
17
|
+
// ...restProps — spread onto the root <figure>.
|
|
18
|
+
//
|
|
19
|
+
// Markup:
|
|
20
|
+
// <figure class="pie-chart">
|
|
21
|
+
// <div class="pie-chart-graphic" role="img" aria-label>…svg…</div>
|
|
22
|
+
// <div class="pie-chart-data-table">…table…</div> (only when provided)
|
|
23
|
+
// </figure>
|
|
24
|
+
//
|
|
25
|
+
// Keyboard: none on the graphic; the data table follows native table behaviour.
|
|
26
|
+
//
|
|
27
|
+
// Claude rules:
|
|
28
|
+
// - Headless: no CSS, no inline styles; no drawing.
|
|
29
|
+
// - No hardcoded user-facing strings.
|
|
30
|
+
|
|
31
|
+
import type { Snippet } from "svelte";
|
|
32
|
+
|
|
33
|
+
let {
|
|
34
|
+
class: className = "",
|
|
35
|
+
label = undefined,
|
|
36
|
+
children,
|
|
37
|
+
dataTable,
|
|
38
|
+
...restProps
|
|
39
|
+
}: {
|
|
40
|
+
/** Accessible name for the chart. */
|
|
41
|
+
label?: string;
|
|
42
|
+
/** The consumer-supplied inline svg. */
|
|
43
|
+
children: Snippet;
|
|
44
|
+
/** Optional accessible data table alternative. */
|
|
45
|
+
dataTable?: Snippet;
|
|
46
|
+
[key: string]: unknown;
|
|
47
|
+
} = $props();
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<!-- PieChart.svelte -->
|
|
51
|
+
<figure
|
|
52
|
+
class={`pie-chart ${className}`}
|
|
53
|
+
{...restProps}
|
|
54
|
+
>
|
|
55
|
+
<div class="pie-chart-graphic" role="img" aria-label={label}>
|
|
56
|
+
{@render children?.()}
|
|
57
|
+
</div>
|
|
58
|
+
{#if dataTable}
|
|
59
|
+
<div class="pie-chart-data-table">
|
|
60
|
+
{@render dataTable()}
|
|
61
|
+
</div>
|
|
62
|
+
{/if}
|
|
63
|
+
</figure>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
/** Accessible name for the chart. */
|
|
4
|
+
label?: string;
|
|
5
|
+
/** The consumer-supplied inline svg. */
|
|
6
|
+
children: Snippet;
|
|
7
|
+
/** Optional accessible data table alternative. */
|
|
8
|
+
dataTable?: Snippet;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
declare const PieChart: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
12
|
+
type PieChart = ReturnType<typeof PieChart>;
|
|
13
|
+
export default PieChart;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// PilipinasPhilhealthIdentificationNumberInput component
|
|
3
|
+
//
|
|
4
|
+
// A headless input for entering the Philippines's PhilHealth Identification Number (PIN).
|
|
5
|
+
// Format: Twelve-digit number assigned by the Philippine Health Insurance Corporation (PhilHealth) to every enrolled member, commonly displayed grouped as NN-NNNNNNNNN-N. No published check-digit algorithm; correctness is confirmed against PhilHealth's own membership records.
|
|
6
|
+
//
|
|
7
|
+
// Props:
|
|
8
|
+
// className — string, optional. CSS class name.
|
|
9
|
+
// label — string, required. Accessible label for screen readers via aria-label.
|
|
10
|
+
// value — string, default "". Bindable input value; supports bind:value.
|
|
11
|
+
// required — boolean, default false. Whether the input is required for form submission.
|
|
12
|
+
// disabled — boolean, default false. Whether the input is disabled.
|
|
13
|
+
// ...restProps — additional HTML attributes spread onto the <input>.
|
|
14
|
+
//
|
|
15
|
+
// Syntax:
|
|
16
|
+
// <PilipinasPhilhealthIdentificationNumberInput label="PhilHealth Identification Number (PIN)" bind:value />
|
|
17
|
+
//
|
|
18
|
+
// Accessibility:
|
|
19
|
+
// - aria-label provides the accessible name for screen readers
|
|
20
|
+
// - autocomplete="off" protects sensitive identifiers
|
|
21
|
+
// - required and disabled states are conveyed to assistive technology
|
|
22
|
+
//
|
|
23
|
+
// Internationalization:
|
|
24
|
+
// - The label prop externalizes user-facing text for translation
|
|
25
|
+
//
|
|
26
|
+
// References:
|
|
27
|
+
// - https://en.wikipedia.org/wiki/PhilHealth
|
|
28
|
+
|
|
29
|
+
let {
|
|
30
|
+
class: className = "",
|
|
31
|
+
label,
|
|
32
|
+
value = $bindable(""),
|
|
33
|
+
required = false,
|
|
34
|
+
disabled = false,
|
|
35
|
+
...restProps
|
|
36
|
+
}: {
|
|
37
|
+
label: string;
|
|
38
|
+
value?: string;
|
|
39
|
+
required?: boolean;
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
[key: string]: unknown;
|
|
42
|
+
} = $props();
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<!-- PilipinasPhilhealthIdentificationNumberInput.svelte -->
|
|
46
|
+
<input
|
|
47
|
+
class={`pilipinas-philhealth-identification-number-input ${className}`}
|
|
48
|
+
type="text"
|
|
49
|
+
aria-label={label}
|
|
50
|
+
autocomplete="off"
|
|
51
|
+
bind:value
|
|
52
|
+
{required}
|
|
53
|
+
{disabled}
|
|
54
|
+
{...restProps}
|
|
55
|
+
/>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type $$ComponentProps = {
|
|
2
|
+
label: string;
|
|
3
|
+
value?: string;
|
|
4
|
+
required?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
declare const PilipinasPhilhealthIdentificationNumberInput: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
9
|
+
type PilipinasPhilhealthIdentificationNumberInput = ReturnType<typeof PilipinasPhilhealthIdentificationNumberInput>;
|
|
10
|
+
export default PilipinasPhilhealthIdentificationNumberInput;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// PilipinasPhilhealthIdentificationNumberView component
|
|
3
|
+
//
|
|
4
|
+
// A headless display component for showing the Philippines's
|
|
5
|
+
// PhilHealth Identification Number (PIN) in a read-only format.
|
|
6
|
+
// Format: Twelve-digit number assigned by the Philippine Health Insurance Corporation (PhilHealth) to every enrolled member, commonly displayed grouped as NN-NNNNNNNNN-N. No published check-digit algorithm; correctness is confirmed against PhilHealth's own membership records.
|
|
7
|
+
//
|
|
8
|
+
// Props:
|
|
9
|
+
// className — string, optional. CSS class name.
|
|
10
|
+
// label — string, required. Accessible label for screen readers via aria-label.
|
|
11
|
+
// value — string, default "". The identifier string to display.
|
|
12
|
+
// ...restProps — additional HTML attributes spread onto the <span>.
|
|
13
|
+
//
|
|
14
|
+
// Syntax:
|
|
15
|
+
// <PilipinasPhilhealthIdentificationNumberView label="PhilHealth Identification Number (PIN)" value={value} />
|
|
16
|
+
//
|
|
17
|
+
// Accessibility:
|
|
18
|
+
// - aria-label provides the accessible name so screen readers announce the purpose
|
|
19
|
+
//
|
|
20
|
+
// References:
|
|
21
|
+
// - https://en.wikipedia.org/wiki/PhilHealth
|
|
22
|
+
|
|
23
|
+
let {
|
|
24
|
+
class: className = "",
|
|
25
|
+
label,
|
|
26
|
+
value = "",
|
|
27
|
+
...restProps
|
|
28
|
+
}: {
|
|
29
|
+
label: string;
|
|
30
|
+
value?: string;
|
|
31
|
+
[key: string]: unknown;
|
|
32
|
+
} = $props();
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<!-- PilipinasPhilhealthIdentificationNumberView.svelte -->
|
|
36
|
+
<span
|
|
37
|
+
class={`pilipinas-philhealth-identification-number-view ${className}`}
|
|
38
|
+
aria-label={label}
|
|
39
|
+
{...restProps}>{value}</span
|
|
40
|
+
>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type $$ComponentProps = {
|
|
2
|
+
label: string;
|
|
3
|
+
value?: string;
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
};
|
|
6
|
+
declare const PilipinasPhilhealthIdentificationNumberView: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type PilipinasPhilhealthIdentificationNumberView = ReturnType<typeof PilipinasPhilhealthIdentificationNumberView>;
|
|
8
|
+
export default PilipinasPhilhealthIdentificationNumberView;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// PrathetThaiLekPrajamTuaPrachachonInput component
|
|
3
|
+
//
|
|
4
|
+
// A headless input for entering Thailand's เลขประจำตัวประชาชน (Lek Prajam Tua Prachachon).
|
|
5
|
+
// Format: Thirteen digits. Digit 1 denotes registration category; digits 2-5 denote the district/province office of registration; digits 6-10 form a serial number; digit 11 is a Modulus-11 check digit computed over the first ten digits; digits 12-13 are further disambiguating digits.
|
|
6
|
+
//
|
|
7
|
+
// Props:
|
|
8
|
+
// className — string, optional. CSS class name.
|
|
9
|
+
// label — string, required. Accessible label for screen readers via aria-label.
|
|
10
|
+
// value — string, default "". Bindable input value; supports bind:value.
|
|
11
|
+
// required — boolean, default false. Whether the input is required for form submission.
|
|
12
|
+
// disabled — boolean, default false. Whether the input is disabled.
|
|
13
|
+
// ...restProps — additional HTML attributes spread onto the <input>.
|
|
14
|
+
//
|
|
15
|
+
// Syntax:
|
|
16
|
+
// <PrathetThaiLekPrajamTuaPrachachonInput label="เลขประจำตัวประชาชน (Lek Prajam Tua Prachachon)" bind:value />
|
|
17
|
+
//
|
|
18
|
+
// Accessibility:
|
|
19
|
+
// - aria-label provides the accessible name for screen readers
|
|
20
|
+
// - autocomplete="off" protects sensitive identifiers
|
|
21
|
+
// - required and disabled states are conveyed to assistive technology
|
|
22
|
+
//
|
|
23
|
+
// Internationalization:
|
|
24
|
+
// - The label prop externalizes user-facing text for translation
|
|
25
|
+
//
|
|
26
|
+
// References:
|
|
27
|
+
// - https://en.wikipedia.org/wiki/Thai_identity_card
|
|
28
|
+
|
|
29
|
+
let {
|
|
30
|
+
class: className = "",
|
|
31
|
+
label,
|
|
32
|
+
value = $bindable(""),
|
|
33
|
+
required = false,
|
|
34
|
+
disabled = false,
|
|
35
|
+
...restProps
|
|
36
|
+
}: {
|
|
37
|
+
label: string;
|
|
38
|
+
value?: string;
|
|
39
|
+
required?: boolean;
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
[key: string]: unknown;
|
|
42
|
+
} = $props();
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<!-- PrathetThaiLekPrajamTuaPrachachonInput.svelte -->
|
|
46
|
+
<input
|
|
47
|
+
class={`prathet-thai-lek-prajam-tua-prachachon-input ${className}`}
|
|
48
|
+
type="text"
|
|
49
|
+
aria-label={label}
|
|
50
|
+
autocomplete="off"
|
|
51
|
+
bind:value
|
|
52
|
+
{required}
|
|
53
|
+
{disabled}
|
|
54
|
+
{...restProps}
|
|
55
|
+
/>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type $$ComponentProps = {
|
|
2
|
+
label: string;
|
|
3
|
+
value?: string;
|
|
4
|
+
required?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
declare const PrathetThaiLekPrajamTuaPrachachonInput: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
9
|
+
type PrathetThaiLekPrajamTuaPrachachonInput = ReturnType<typeof PrathetThaiLekPrajamTuaPrachachonInput>;
|
|
10
|
+
export default PrathetThaiLekPrajamTuaPrachachonInput;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// PrathetThaiLekPrajamTuaPrachachonView component
|
|
3
|
+
//
|
|
4
|
+
// A headless display component for showing Thailand's
|
|
5
|
+
// เลขประจำตัวประชาชน (Lek Prajam Tua Prachachon) in a read-only format.
|
|
6
|
+
// Format: Thirteen digits. Digit 1 denotes registration category; digits 2-5 denote the district/province office of registration; digits 6-10 form a serial number; digit 11 is a Modulus-11 check digit computed over the first ten digits; digits 12-13 are further disambiguating digits.
|
|
7
|
+
//
|
|
8
|
+
// Props:
|
|
9
|
+
// className — string, optional. CSS class name.
|
|
10
|
+
// label — string, required. Accessible label for screen readers via aria-label.
|
|
11
|
+
// value — string, default "". The identifier string to display.
|
|
12
|
+
// ...restProps — additional HTML attributes spread onto the <span>.
|
|
13
|
+
//
|
|
14
|
+
// Syntax:
|
|
15
|
+
// <PrathetThaiLekPrajamTuaPrachachonView label="เลขประจำตัวประชาชน (Lek Prajam Tua Prachachon)" value={value} />
|
|
16
|
+
//
|
|
17
|
+
// Accessibility:
|
|
18
|
+
// - aria-label provides the accessible name so screen readers announce the purpose
|
|
19
|
+
//
|
|
20
|
+
// References:
|
|
21
|
+
// - https://en.wikipedia.org/wiki/Thai_identity_card
|
|
22
|
+
|
|
23
|
+
let {
|
|
24
|
+
class: className = "",
|
|
25
|
+
label,
|
|
26
|
+
value = "",
|
|
27
|
+
...restProps
|
|
28
|
+
}: {
|
|
29
|
+
label: string;
|
|
30
|
+
value?: string;
|
|
31
|
+
[key: string]: unknown;
|
|
32
|
+
} = $props();
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<!-- PrathetThaiLekPrajamTuaPrachachonView.svelte -->
|
|
36
|
+
<span
|
|
37
|
+
class={`prathet-thai-lek-prajam-tua-prachachon-view ${className}`}
|
|
38
|
+
aria-label={label}
|
|
39
|
+
{...restProps}>{value}</span
|
|
40
|
+
>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type $$ComponentProps = {
|
|
2
|
+
label: string;
|
|
3
|
+
value?: string;
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
};
|
|
6
|
+
declare const PrathetThaiLekPrajamTuaPrachachonView: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type PrathetThaiLekPrajamTuaPrachachonView = ReturnType<typeof PrathetThaiLekPrajamTuaPrachachonView>;
|
|
8
|
+
export default PrathetThaiLekPrajamTuaPrachachonView;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// RadarChart component
|
|
3
|
+
//
|
|
4
|
+
// A headless chart container. The consumer supplies the inline svg as
|
|
5
|
+
// `children`; the component draws nothing. The graphic is a
|
|
6
|
+
// role="img" wrapper named by `label`. The optional `dataTable` snippet
|
|
7
|
+
// renders the accessible table alternative as a SIBLING of that image
|
|
8
|
+
// wrapper, never inside it: a role="img" element makes its descendants
|
|
9
|
+
// presentational, so a table placed inside would be invisible to
|
|
10
|
+
// assistive technology.
|
|
11
|
+
//
|
|
12
|
+
// Props:
|
|
13
|
+
// class — string, optional. Consumer class appended after the base class.
|
|
14
|
+
// label — string, required. Accessible name of the chart image.
|
|
15
|
+
// children — Snippet. The consumer-supplied inline svg.
|
|
16
|
+
// dataTable — Snippet, optional. The accessible table alternative.
|
|
17
|
+
// ...restProps — spread onto the root <figure>.
|
|
18
|
+
//
|
|
19
|
+
// Markup:
|
|
20
|
+
// <figure class="radar-chart">
|
|
21
|
+
// <div class="radar-chart-graphic" role="img" aria-label>…svg…</div>
|
|
22
|
+
// <div class="radar-chart-data-table">…table…</div> (only when provided)
|
|
23
|
+
// </figure>
|
|
24
|
+
//
|
|
25
|
+
// Keyboard: none on the graphic; the data table follows native table behaviour.
|
|
26
|
+
//
|
|
27
|
+
// Claude rules:
|
|
28
|
+
// - Headless: no CSS, no inline styles; no drawing.
|
|
29
|
+
// - No hardcoded user-facing strings.
|
|
30
|
+
|
|
31
|
+
import type { Snippet } from "svelte";
|
|
32
|
+
|
|
33
|
+
let {
|
|
34
|
+
class: className = "",
|
|
35
|
+
label,
|
|
36
|
+
children,
|
|
37
|
+
dataTable,
|
|
38
|
+
...restProps
|
|
39
|
+
}: {
|
|
40
|
+
/** Accessible name for the chart. */
|
|
41
|
+
label: string;
|
|
42
|
+
/** The consumer-supplied inline svg. */
|
|
43
|
+
children: Snippet;
|
|
44
|
+
/** Optional accessible data table alternative. */
|
|
45
|
+
dataTable?: Snippet;
|
|
46
|
+
[key: string]: unknown;
|
|
47
|
+
} = $props();
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<!-- RadarChart.svelte -->
|
|
51
|
+
<figure
|
|
52
|
+
class={`radar-chart ${className}`}
|
|
53
|
+
{...restProps}
|
|
54
|
+
>
|
|
55
|
+
<div class="radar-chart-graphic" role="img" aria-label={label}>
|
|
56
|
+
{@render children?.()}
|
|
57
|
+
</div>
|
|
58
|
+
{#if dataTable}
|
|
59
|
+
<div class="radar-chart-data-table">
|
|
60
|
+
{@render dataTable()}
|
|
61
|
+
</div>
|
|
62
|
+
{/if}
|
|
63
|
+
</figure>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
/** Accessible name for the chart. */
|
|
4
|
+
label: string;
|
|
5
|
+
/** The consumer-supplied inline svg. */
|
|
6
|
+
children: Snippet;
|
|
7
|
+
/** Optional accessible data table alternative. */
|
|
8
|
+
dataTable?: Snippet;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
declare const RadarChart: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
12
|
+
type RadarChart = ReturnType<typeof RadarChart>;
|
|
13
|
+
export default RadarChart;
|