@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,40 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// MagyarorszagTajSzamView component
|
|
3
|
+
//
|
|
4
|
+
// A headless display component for showing Hungary's
|
|
5
|
+
// Társadalombiztosítási Azonosító Jel (TAJ) in a read-only format.
|
|
6
|
+
// Format: Nine digits, displayed as SSS SSS SSK. The first eight digits are a simple issued-in-order serial number; the ninth is a check digit computed by multiplying the first eight digits by alternating weights 3 and 7, summing the products, and taking the result Modulus 10 — an algorithm unique to Hungary, distinct from Luhn.
|
|
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
|
+
// <MagyarorszagTajSzamView label="Társadalombiztosítási Azonosító Jel (TAJ)" value={value} />
|
|
16
|
+
//
|
|
17
|
+
// Accessibility:
|
|
18
|
+
// - aria-label provides the accessible name so screen readers announce the purpose
|
|
19
|
+
//
|
|
20
|
+
// References:
|
|
21
|
+
// - https://hu.wikipedia.org/wiki/T%C3%A1rsadalombiztos%C3%ADt%C3%A1si_azonos%C3%ADt%C3%B3_jel
|
|
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
|
+
<!-- MagyarorszagTajSzamView.svelte -->
|
|
36
|
+
<span
|
|
37
|
+
class={`magyarorszag-taj-szam-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 MagyarorszagTajSzamView: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type MagyarorszagTajSzamView = ReturnType<typeof MagyarorszagTajSzamView>;
|
|
8
|
+
export default MagyarorszagTajSzamView;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// Mark component
|
|
3
|
+
//
|
|
4
|
+
// A headless inline wrapper: an inline highlight marking text as relevant or referenced, such as a search match, using the native mark element. Contract: a plain wrapper with the base class and children.
|
|
5
|
+
// Draws nothing and carries no strings of its own; the consumer supplies the text.
|
|
6
|
+
import type { Snippet } from "svelte";
|
|
7
|
+
|
|
8
|
+
let {
|
|
9
|
+
class: className = "",
|
|
10
|
+
children,
|
|
11
|
+
...restProps
|
|
12
|
+
}: {
|
|
13
|
+
|
|
14
|
+
/** The content. */
|
|
15
|
+
children?: Snippet;
|
|
16
|
+
[key: string]: unknown;
|
|
17
|
+
} = $props();
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<!-- Mark.svelte -->
|
|
21
|
+
<mark
|
|
22
|
+
class={`mark ${className}`}
|
|
23
|
+
|
|
24
|
+
{...restProps}
|
|
25
|
+
>
|
|
26
|
+
{@render children?.()}
|
|
27
|
+
</mark>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
/** The content. */
|
|
4
|
+
children?: Snippet;
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
};
|
|
7
|
+
declare const Mark: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
8
|
+
type Mark = ReturnType<typeof Mark>;
|
|
9
|
+
export default Mark;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// MexicoClaveUnicaDeRegistroDePoblacionInput component
|
|
3
|
+
//
|
|
4
|
+
// A headless input for entering Mexico's Clave Única de Registro de Población (CURP).
|
|
5
|
+
// Format: Eighteen-character alphanumeric code built from name, date of birth, sex, and state of birth: first letter of the first surname plus its first internal vowel; first letter of the second surname (or X if none); first letter of the given name; six-digit date of birth (YYMMDD); H or M for sex (X for non-binary); a two-letter state code (NE for those born abroad); a consonant from each surname and the given name; then two further disambiguating characters. No trailing check digit.
|
|
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
|
+
// <MexicoClaveUnicaDeRegistroDePoblacionInput label="Clave Única de Registro de Población (CURP)" 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/Unique_Population_Registry_Code
|
|
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
|
+
<!-- MexicoClaveUnicaDeRegistroDePoblacionInput.svelte -->
|
|
46
|
+
<input
|
|
47
|
+
class={`mexico-clave-unica-de-registro-de-poblacion-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 MexicoClaveUnicaDeRegistroDePoblacionInput: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
9
|
+
type MexicoClaveUnicaDeRegistroDePoblacionInput = ReturnType<typeof MexicoClaveUnicaDeRegistroDePoblacionInput>;
|
|
10
|
+
export default MexicoClaveUnicaDeRegistroDePoblacionInput;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// MexicoClaveUnicaDeRegistroDePoblacionView component
|
|
3
|
+
//
|
|
4
|
+
// A headless display component for showing Mexico's
|
|
5
|
+
// Clave Única de Registro de Población (CURP) in a read-only format.
|
|
6
|
+
// Format: Eighteen-character alphanumeric code built from name, date of birth, sex, and state of birth: first letter of the first surname plus its first internal vowel; first letter of the second surname (or X if none); first letter of the given name; six-digit date of birth (YYMMDD); H or M for sex (X for non-binary); a two-letter state code (NE for those born abroad); a consonant from each surname and the given name; then two further disambiguating characters. No trailing check digit.
|
|
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
|
+
// <MexicoClaveUnicaDeRegistroDePoblacionView label="Clave Única de Registro de Población (CURP)" 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/Unique_Population_Registry_Code
|
|
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
|
+
<!-- MexicoClaveUnicaDeRegistroDePoblacionView.svelte -->
|
|
36
|
+
<span
|
|
37
|
+
class={`mexico-clave-unica-de-registro-de-poblacion-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 MexicoClaveUnicaDeRegistroDePoblacionView: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type MexicoClaveUnicaDeRegistroDePoblacionView = ReturnType<typeof MexicoClaveUnicaDeRegistroDePoblacionView>;
|
|
8
|
+
export default MexicoClaveUnicaDeRegistroDePoblacionView;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// MisrAlRaqmAlQawmiInput component
|
|
3
|
+
//
|
|
4
|
+
// A headless input for entering Egypt's الرقم القومي (Al-Raqm Al-Qawmi).
|
|
5
|
+
// Format: Fourteen digits. The first digit encodes century of birth (2 for 1900-1999, 3 for 2000-2099); the next six encode date of birth (YYMMDD); the next two encode governorate of birth/registration; the next four are a serial number whose own parity encodes sex (odd male, even female); the fourteenth digit is a check digit.
|
|
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
|
+
// <MisrAlRaqmAlQawmiInput label="الرقم القومي (Al-Raqm Al-Qawmi)" 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/Egyptian_National_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
|
+
<!-- MisrAlRaqmAlQawmiInput.svelte -->
|
|
46
|
+
<input
|
|
47
|
+
class={`misr-al-raqm-al-qawmi-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 MisrAlRaqmAlQawmiInput: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
9
|
+
type MisrAlRaqmAlQawmiInput = ReturnType<typeof MisrAlRaqmAlQawmiInput>;
|
|
10
|
+
export default MisrAlRaqmAlQawmiInput;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// MisrAlRaqmAlQawmiView component
|
|
3
|
+
//
|
|
4
|
+
// A headless display component for showing Egypt's
|
|
5
|
+
// الرقم القومي (Al-Raqm Al-Qawmi) in a read-only format.
|
|
6
|
+
// Format: Fourteen digits. The first digit encodes century of birth (2 for 1900-1999, 3 for 2000-2099); the next six encode date of birth (YYMMDD); the next two encode governorate of birth/registration; the next four are a serial number whose own parity encodes sex (odd male, even female); the fourteenth digit is a check digit.
|
|
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
|
+
// <MisrAlRaqmAlQawmiView label="الرقم القومي (Al-Raqm Al-Qawmi)" 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/Egyptian_National_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
|
+
<!-- MisrAlRaqmAlQawmiView.svelte -->
|
|
36
|
+
<span
|
|
37
|
+
class={`misr-al-raqm-al-qawmi-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 MisrAlRaqmAlQawmiView: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type MisrAlRaqmAlQawmiView = ReturnType<typeof MisrAlRaqmAlQawmiView>;
|
|
8
|
+
export default MisrAlRaqmAlQawmiView;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// MultiSelect component
|
|
3
|
+
//
|
|
4
|
+
// A headless multiple-choice select wrapping the native <select multiple>.
|
|
5
|
+
// The value is an array of the selected option values.
|
|
6
|
+
//
|
|
7
|
+
// Props:
|
|
8
|
+
// className — string, optional. CSS class name.
|
|
9
|
+
// label — string, required. Accessible name via aria-label.
|
|
10
|
+
// value — string[], default []. Bindable selected option values.
|
|
11
|
+
// size — number, optional. Number of visible rows.
|
|
12
|
+
// required, disabled — boolean, default false.
|
|
13
|
+
// children — Snippet. Option elements.
|
|
14
|
+
// ...restProps — additional HTML attributes spread onto the <select>.
|
|
15
|
+
//
|
|
16
|
+
// Syntax:
|
|
17
|
+
// <MultiSelect label="Toppings" bind:value><Option value="a">A</Option></MultiSelect>
|
|
18
|
+
//
|
|
19
|
+
// Keyboard:
|
|
20
|
+
// - Native only: arrows move, Shift/Ctrl+arrows and Space extend/toggle selection
|
|
21
|
+
//
|
|
22
|
+
// Accessibility:
|
|
23
|
+
// - aria-label={label} provides the accessible name
|
|
24
|
+
//
|
|
25
|
+
// Internationalization:
|
|
26
|
+
// - The label prop accepts any translated string
|
|
27
|
+
//
|
|
28
|
+
// Claude rules:
|
|
29
|
+
// - Headless: no CSS; native keyboard only; uses $bindable() on value
|
|
30
|
+
import type { Snippet } from "svelte";
|
|
31
|
+
|
|
32
|
+
let {
|
|
33
|
+
class: className = "",
|
|
34
|
+
label,
|
|
35
|
+
value = $bindable([]),
|
|
36
|
+
size = undefined,
|
|
37
|
+
required = false,
|
|
38
|
+
disabled = false,
|
|
39
|
+
children,
|
|
40
|
+
...restProps
|
|
41
|
+
}: {
|
|
42
|
+
/** Accessible label. */
|
|
43
|
+
label: string;
|
|
44
|
+
/** Selected option values. Bindable. */
|
|
45
|
+
value?: string[];
|
|
46
|
+
/** Number of visible rows. */
|
|
47
|
+
size?: number;
|
|
48
|
+
/** Whether required. */
|
|
49
|
+
required?: boolean;
|
|
50
|
+
/** Whether disabled. */
|
|
51
|
+
disabled?: boolean;
|
|
52
|
+
/** Option elements to render inside. */
|
|
53
|
+
children: Snippet;
|
|
54
|
+
[key: string]: unknown;
|
|
55
|
+
} = $props();
|
|
56
|
+
</script>
|
|
57
|
+
|
|
58
|
+
<!-- MultiSelect.svelte -->
|
|
59
|
+
<select
|
|
60
|
+
class={`multi-select ${className}`}
|
|
61
|
+
multiple
|
|
62
|
+
aria-label={label}
|
|
63
|
+
{size}
|
|
64
|
+
bind:value
|
|
65
|
+
{required}
|
|
66
|
+
{disabled}
|
|
67
|
+
{...restProps}
|
|
68
|
+
>
|
|
69
|
+
{@render children?.()}
|
|
70
|
+
</select>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
/** Accessible label. */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Selected option values. Bindable. */
|
|
6
|
+
value?: string[];
|
|
7
|
+
/** Number of visible rows. */
|
|
8
|
+
size?: number;
|
|
9
|
+
/** Whether required. */
|
|
10
|
+
required?: boolean;
|
|
11
|
+
/** Whether disabled. */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** Option elements to render inside. */
|
|
14
|
+
children: Snippet;
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
};
|
|
17
|
+
declare const MultiSelect: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
18
|
+
type MultiSelect = ReturnType<typeof MultiSelect>;
|
|
19
|
+
export default MultiSelect;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// MultiSelectWithExtras component
|
|
3
|
+
//
|
|
4
|
+
// A headless multiple-choice select with optional content before and after the
|
|
5
|
+
// native <select multiple>, inside a wrapper <div>. Same shape as SelectWithExtras.
|
|
6
|
+
//
|
|
7
|
+
// Props:
|
|
8
|
+
// className — string, optional. CSS class on the wrapper.
|
|
9
|
+
// label — string, required. Accessible name via aria-label on the <select>.
|
|
10
|
+
// value — string[], default []. Bindable selected option values.
|
|
11
|
+
// size — number, optional. Number of visible rows.
|
|
12
|
+
// required, disabled — boolean, default false.
|
|
13
|
+
// children — Snippet. Option elements.
|
|
14
|
+
// before, after — Snippet, optional. Content around the select.
|
|
15
|
+
// ...restProps — additional HTML attributes spread onto the wrapper <div>.
|
|
16
|
+
//
|
|
17
|
+
// Keyboard:
|
|
18
|
+
// - Native only
|
|
19
|
+
//
|
|
20
|
+
// Accessibility:
|
|
21
|
+
// - aria-label={label} on the <select> provides the accessible name
|
|
22
|
+
//
|
|
23
|
+
// Claude rules:
|
|
24
|
+
// - Headless: no CSS; uses $bindable() on value
|
|
25
|
+
import type { Snippet } from "svelte";
|
|
26
|
+
|
|
27
|
+
let {
|
|
28
|
+
class: className = "",
|
|
29
|
+
label,
|
|
30
|
+
value = $bindable([]),
|
|
31
|
+
size = undefined,
|
|
32
|
+
required = false,
|
|
33
|
+
disabled = false,
|
|
34
|
+
children,
|
|
35
|
+
before,
|
|
36
|
+
after,
|
|
37
|
+
...restProps
|
|
38
|
+
}: {
|
|
39
|
+
/** Accessible label. */
|
|
40
|
+
label: string;
|
|
41
|
+
/** Selected option values. Bindable. */
|
|
42
|
+
value?: string[];
|
|
43
|
+
/** Number of visible rows. */
|
|
44
|
+
size?: number;
|
|
45
|
+
/** Whether required. */
|
|
46
|
+
required?: boolean;
|
|
47
|
+
/** Whether disabled. */
|
|
48
|
+
disabled?: boolean;
|
|
49
|
+
/** Option elements. */
|
|
50
|
+
children: Snippet;
|
|
51
|
+
/** Content before the select. */
|
|
52
|
+
before?: Snippet;
|
|
53
|
+
/** Content after the select. */
|
|
54
|
+
after?: Snippet;
|
|
55
|
+
[key: string]: unknown;
|
|
56
|
+
} = $props();
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<!-- MultiSelectWithExtras.svelte -->
|
|
60
|
+
<div
|
|
61
|
+
class={`multi-select-with-extras ${className}`}
|
|
62
|
+
{...restProps}
|
|
63
|
+
>
|
|
64
|
+
{#if before}
|
|
65
|
+
{@render before()}
|
|
66
|
+
{/if}
|
|
67
|
+
<select
|
|
68
|
+
multiple
|
|
69
|
+
aria-label={label}
|
|
70
|
+
{size}
|
|
71
|
+
bind:value
|
|
72
|
+
{required}
|
|
73
|
+
{disabled}
|
|
74
|
+
>
|
|
75
|
+
{@render children?.()}
|
|
76
|
+
</select>
|
|
77
|
+
{#if after}
|
|
78
|
+
{@render after()}
|
|
79
|
+
{/if}
|
|
80
|
+
</div>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
/** Accessible label. */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Selected option values. Bindable. */
|
|
6
|
+
value?: string[];
|
|
7
|
+
/** Number of visible rows. */
|
|
8
|
+
size?: number;
|
|
9
|
+
/** Whether required. */
|
|
10
|
+
required?: boolean;
|
|
11
|
+
/** Whether disabled. */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** Option elements. */
|
|
14
|
+
children: Snippet;
|
|
15
|
+
/** Content before the select. */
|
|
16
|
+
before?: Snippet;
|
|
17
|
+
/** Content after the select. */
|
|
18
|
+
after?: Snippet;
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
declare const MultiSelectWithExtras: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
22
|
+
type MultiSelectWithExtras = ReturnType<typeof MultiSelectWithExtras>;
|
|
23
|
+
export default MultiSelectWithExtras;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// NihonKojinBangoInput component
|
|
3
|
+
//
|
|
4
|
+
// A headless input for entering Japan's Individual Number / My Number (マイナンバー).
|
|
5
|
+
// Format: Twelve digits, issued to every resident of Japan since 2016. The twelfth digit is a check digit: the first eleven digits are each multiplied by a position-dependent weight (6,5,4,3,2 for positions 1-5; 7,6,5,4,3,2 for positions 6-11), summed, taken Modulus-11, and the remainder subtracted from 11 (remainders of 0 or 1 both yield a check digit of 0).
|
|
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
|
+
// <NihonKojinBangoInput label="Individual Number / My Number (マイナンバー)" 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/Individual_Number
|
|
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
|
+
<!-- NihonKojinBangoInput.svelte -->
|
|
46
|
+
<input
|
|
47
|
+
class={`nihon-kojin-bango-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 NihonKojinBangoInput: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
9
|
+
type NihonKojinBangoInput = ReturnType<typeof NihonKojinBangoInput>;
|
|
10
|
+
export default NihonKojinBangoInput;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// NihonKojinBangoView component
|
|
3
|
+
//
|
|
4
|
+
// A headless display component for showing Japan's
|
|
5
|
+
// Individual Number / My Number (マイナンバー) in a read-only format.
|
|
6
|
+
// Format: Twelve digits, issued to every resident of Japan since 2016. The twelfth digit is a check digit: the first eleven digits are each multiplied by a position-dependent weight (6,5,4,3,2 for positions 1-5; 7,6,5,4,3,2 for positions 6-11), summed, taken Modulus-11, and the remainder subtracted from 11 (remainders of 0 or 1 both yield a check digit of 0).
|
|
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
|
+
// <NihonKojinBangoView label="Individual Number / My Number (マイナンバー)" 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/Individual_Number
|
|
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
|
+
<!-- NihonKojinBangoView.svelte -->
|
|
36
|
+
<span
|
|
37
|
+
class={`nihon-kojin-bango-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 NihonKojinBangoView: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type NihonKojinBangoView = ReturnType<typeof NihonKojinBangoView>;
|
|
8
|
+
export default NihonKojinBangoView;
|