@lilydesignsystem/svelte-headless 0.1.0 → 0.3.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 +47 -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/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/ColumnChart/ColumnChart.svelte +42 -3
- package/dist/components/ColumnChart/ColumnChart.svelte.d.ts +4 -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/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/IconButton/IconButton.svelte +17 -2
- package/dist/components/IconButton/IconButton.svelte.d.ts +5 -1
- 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/Listbox/Listbox.svelte +213 -34
- package/dist/components/Listbox/Listbox.svelte.d.ts +24 -1
- 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/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/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/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/Thinking/Thinking.svelte +58 -0
- package/dist/components/Thinking/Thinking.svelte.d.ts +15 -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 +64 -0
- package/dist/index.js +64 -0
- package/index.md +1 -1
- package/package.json +9 -8
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// SchweizAhvNummerInput component
|
|
3
|
+
//
|
|
4
|
+
// A headless input for entering Switzerland's AHV-Nummer / Numéro AVS.
|
|
5
|
+
// Format: Thirteen digits, displayed as 756.NNNN.NNNN.NN, always beginning with the country prefix 756. It is a valid EAN-13 barcode number: the final digit is an EAN-13 check digit computed over the twelve preceding digits (alternating-position weights of 1 and 3). Replaced the old 11-digit AHV card number on 1 July 2008.
|
|
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
|
+
// <SchweizAhvNummerInput label="AHV-Nummer / Numéro AVS" 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/Data_codes_for_Switzerland
|
|
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
|
+
<!-- SchweizAhvNummerInput.svelte -->
|
|
46
|
+
<input
|
|
47
|
+
class={`schweiz-ahv-nummer-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 SchweizAhvNummerInput: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
9
|
+
type SchweizAhvNummerInput = ReturnType<typeof SchweizAhvNummerInput>;
|
|
10
|
+
export default SchweizAhvNummerInput;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// SchweizAhvNummerView component
|
|
3
|
+
//
|
|
4
|
+
// A headless display component for showing Switzerland's
|
|
5
|
+
// AHV-Nummer / Numéro AVS in a read-only format.
|
|
6
|
+
// Format: Thirteen digits, displayed as 756.NNNN.NNNN.NN, always beginning with the country prefix 756. It is a valid EAN-13 barcode number: the final digit is an EAN-13 check digit computed over the twelve preceding digits (alternating-position weights of 1 and 3). Replaced the old 11-digit AHV card number on 1 July 2008.
|
|
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
|
+
// <SchweizAhvNummerView label="AHV-Nummer / Numéro AVS" 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/Data_codes_for_Switzerland
|
|
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
|
+
<!-- SchweizAhvNummerView.svelte -->
|
|
36
|
+
<span
|
|
37
|
+
class={`schweiz-ahv-nummer-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 SchweizAhvNummerView: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type SchweizAhvNummerView = ReturnType<typeof SchweizAhvNummerView>;
|
|
8
|
+
export default SchweizAhvNummerView;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// ShowMore component
|
|
3
|
+
//
|
|
4
|
+
// A headless "show more / show less" toggle for long content. The content
|
|
5
|
+
// stays in the accessibility tree at all times; collapsing is a visual clamp
|
|
6
|
+
// the consumer applies in CSS keyed on data-expanded. (Use Expander when the
|
|
7
|
+
// content should be removed from the DOM while collapsed.)
|
|
8
|
+
//
|
|
9
|
+
// Props:
|
|
10
|
+
// className — string, optional. CSS class name.
|
|
11
|
+
// moreLabel — string, required. Button text while collapsed. No default.
|
|
12
|
+
// lessLabel — string, required. Button text while expanded. No default.
|
|
13
|
+
// expanded — boolean, default false. Bindable.
|
|
14
|
+
// children — Snippet. The content.
|
|
15
|
+
// ...restProps — additional HTML attributes spread onto the root <div>.
|
|
16
|
+
//
|
|
17
|
+
// Keyboard:
|
|
18
|
+
// - Enter / Space on the native button toggles
|
|
19
|
+
//
|
|
20
|
+
// Accessibility:
|
|
21
|
+
// - button aria-expanded + aria-controls pointing at the content id
|
|
22
|
+
//
|
|
23
|
+
// Claude rules:
|
|
24
|
+
// - Headless: no inline style; the clamp is consumer CSS on [data-expanded="false"]
|
|
25
|
+
import type { Snippet } from "svelte";
|
|
26
|
+
|
|
27
|
+
let {
|
|
28
|
+
class: className = "",
|
|
29
|
+
moreLabel,
|
|
30
|
+
lessLabel,
|
|
31
|
+
expanded = $bindable(false),
|
|
32
|
+
children,
|
|
33
|
+
...restProps
|
|
34
|
+
}: {
|
|
35
|
+
/** Button text while collapsed. */
|
|
36
|
+
moreLabel: string;
|
|
37
|
+
/** Button text while expanded. */
|
|
38
|
+
lessLabel: string;
|
|
39
|
+
/** Whether the content is expanded. Bindable. */
|
|
40
|
+
expanded?: boolean;
|
|
41
|
+
/** The content. */
|
|
42
|
+
children?: Snippet;
|
|
43
|
+
[key: string]: unknown;
|
|
44
|
+
} = $props();
|
|
45
|
+
|
|
46
|
+
const uid = $props.id();
|
|
47
|
+
const contentId = `show-more-${uid}`;
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<!-- ShowMore.svelte -->
|
|
51
|
+
<div class={`show-more ${className}`} {...restProps}>
|
|
52
|
+
<div class="show-more-content" id={contentId} data-expanded={expanded}>
|
|
53
|
+
{@render children?.()}
|
|
54
|
+
</div>
|
|
55
|
+
<button
|
|
56
|
+
type="button"
|
|
57
|
+
class="show-more-button"
|
|
58
|
+
aria-expanded={expanded}
|
|
59
|
+
aria-controls={contentId}
|
|
60
|
+
onclick={() => (expanded = !expanded)}
|
|
61
|
+
>
|
|
62
|
+
{expanded ? lessLabel : moreLabel}
|
|
63
|
+
</button>
|
|
64
|
+
</div>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
/** Button text while collapsed. */
|
|
4
|
+
moreLabel: string;
|
|
5
|
+
/** Button text while expanded. */
|
|
6
|
+
lessLabel: string;
|
|
7
|
+
/** Whether the content is expanded. Bindable. */
|
|
8
|
+
expanded?: boolean;
|
|
9
|
+
/** The content. */
|
|
10
|
+
children?: Snippet;
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
};
|
|
13
|
+
declare const ShowMore: import("svelte").Component<$$ComponentProps, {}, "expanded">;
|
|
14
|
+
type ShowMore = ReturnType<typeof ShowMore>;
|
|
15
|
+
export default ShowMore;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// SingaporeNationalRegistrationIdentityCardInput component
|
|
3
|
+
//
|
|
4
|
+
// A headless input for entering Singapore's National Registration Identity Card Number / Foreign Identification Number (NRIC/FIN).
|
|
5
|
+
// Format: One letter (S or T for citizens/permanent residents; F or G for long-term foreign residents; M for newer FIN series), seven digits, and a trailing check letter. The check letter is computed by multiplying the seven digits by fixed weights (2,7,6,5,4,3,2), summing the products (adding 4 for a G/T prefix or 3 for an M prefix), taking the sum Modulus 11, and mapping (10 - remainder) through a lookup table to a letter.
|
|
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
|
+
// <SingaporeNationalRegistrationIdentityCardInput label="National Registration Identity Card Number / Foreign Identification Number (NRIC/FIN)" 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/National_Registration_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
|
+
<!-- SingaporeNationalRegistrationIdentityCardInput.svelte -->
|
|
46
|
+
<input
|
|
47
|
+
class={`singapore-national-registration-identity-card-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 SingaporeNationalRegistrationIdentityCardInput: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
9
|
+
type SingaporeNationalRegistrationIdentityCardInput = ReturnType<typeof SingaporeNationalRegistrationIdentityCardInput>;
|
|
10
|
+
export default SingaporeNationalRegistrationIdentityCardInput;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// SingaporeNationalRegistrationIdentityCardView component
|
|
3
|
+
//
|
|
4
|
+
// A headless display component for showing Singapore's
|
|
5
|
+
// National Registration Identity Card Number / Foreign Identification Number (NRIC/FIN) in a read-only format.
|
|
6
|
+
// Format: One letter (S or T for citizens/permanent residents; F or G for long-term foreign residents; M for newer FIN series), seven digits, and a trailing check letter. The check letter is computed by multiplying the seven digits by fixed weights (2,7,6,5,4,3,2), summing the products (adding 4 for a G/T prefix or 3 for an M prefix), taking the sum Modulus 11, and mapping (10 - remainder) through a lookup table to a letter.
|
|
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
|
+
// <SingaporeNationalRegistrationIdentityCardView label="National Registration Identity Card Number / Foreign Identification Number (NRIC/FIN)" 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/National_Registration_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
|
+
<!-- SingaporeNationalRegistrationIdentityCardView.svelte -->
|
|
36
|
+
<span
|
|
37
|
+
class={`singapore-national-registration-identity-card-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 SingaporeNationalRegistrationIdentityCardView: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type SingaporeNationalRegistrationIdentityCardView = ReturnType<typeof SingaporeNationalRegistrationIdentityCardView>;
|
|
8
|
+
export default SingaporeNationalRegistrationIdentityCardView;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// SouthAfricaIdentityNumberInput component
|
|
3
|
+
//
|
|
4
|
+
// A headless input for entering South Africa's South African Identity Number.
|
|
5
|
+
// Format: Thirteen digits in the form YYMMDDSSSSCAZ: the first six encode date of birth; the next four encode sex (0000-4999 female, 5000-9999 male); the eleventh digit encodes citizenship status (0 citizen, 1 permanent resident, 2 refugee); the twelfth is a legacy field fixed at 8 on modern cards; the thirteenth is a Luhn (Modulus-10) check digit over the preceding twelve.
|
|
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
|
+
// <SouthAfricaIdentityNumberInput label="South African Identity 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/South_African_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
|
+
<!-- SouthAfricaIdentityNumberInput.svelte -->
|
|
46
|
+
<input
|
|
47
|
+
class={`south-africa-identity-number-input ${className}`}
|
|
48
|
+
type="text"
|
|
49
|
+
aria-label={label}
|
|
50
|
+
autocomplete="off"
|
|
51
|
+
bind:value
|
|
52
|
+
{required}
|
|
53
|
+
{disabled}
|
|
54
|
+
{...restProps}
|
|
55
|
+
/>
|
package/dist/components/SouthAfricaIdentityNumberInput/SouthAfricaIdentityNumberInput.svelte.d.ts
ADDED
|
@@ -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 SouthAfricaIdentityNumberInput: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
9
|
+
type SouthAfricaIdentityNumberInput = ReturnType<typeof SouthAfricaIdentityNumberInput>;
|
|
10
|
+
export default SouthAfricaIdentityNumberInput;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// SouthAfricaIdentityNumberView component
|
|
3
|
+
//
|
|
4
|
+
// A headless display component for showing South Africa's
|
|
5
|
+
// South African Identity Number in a read-only format.
|
|
6
|
+
// Format: Thirteen digits in the form YYMMDDSSSSCAZ: the first six encode date of birth; the next four encode sex (0000-4999 female, 5000-9999 male); the eleventh digit encodes citizenship status (0 citizen, 1 permanent resident, 2 refugee); the twelfth is a legacy field fixed at 8 on modern cards; the thirteenth is a Luhn (Modulus-10) check digit over the preceding twelve.
|
|
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
|
+
// <SouthAfricaIdentityNumberView label="South African Identity 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/South_African_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
|
+
<!-- SouthAfricaIdentityNumberView.svelte -->
|
|
36
|
+
<span
|
|
37
|
+
class={`south-africa-identity-number-view ${className}`}
|
|
38
|
+
aria-label={label}
|
|
39
|
+
{...restProps}>{value}</span
|
|
40
|
+
>
|
package/dist/components/SouthAfricaIdentityNumberView/SouthAfricaIdentityNumberView.svelte.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type $$ComponentProps = {
|
|
2
|
+
label: string;
|
|
3
|
+
value?: string;
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
};
|
|
6
|
+
declare const SouthAfricaIdentityNumberView: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type SouthAfricaIdentityNumberView = ReturnType<typeof SouthAfricaIdentityNumberView>;
|
|
8
|
+
export default SouthAfricaIdentityNumberView;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// Thinking component
|
|
3
|
+
//
|
|
4
|
+
// A headless disclosure for an AI assistant's reasoning / "thinking" trace,
|
|
5
|
+
// built on the native <details>. Closed by default. While `streaming` the root
|
|
6
|
+
// carries data-streaming and aria-busy so consumer CSS/AT know it is still filling.
|
|
7
|
+
//
|
|
8
|
+
// Props:
|
|
9
|
+
// className — string, optional. CSS class name.
|
|
10
|
+
// label — string, required. The summary text. No default.
|
|
11
|
+
// open — boolean, default false. Bindable.
|
|
12
|
+
// streaming — boolean, default false. Adds data-streaming="true" + aria-busy="true" when true.
|
|
13
|
+
// children — Snippet. The reasoning content.
|
|
14
|
+
// ...restProps — additional HTML attributes spread onto the root <details>.
|
|
15
|
+
//
|
|
16
|
+
// Keyboard:
|
|
17
|
+
// - Enter / Space on the native <summary> toggles
|
|
18
|
+
//
|
|
19
|
+
// Accessibility:
|
|
20
|
+
// - Native details/summary semantics; aria-busy only while streaming
|
|
21
|
+
//
|
|
22
|
+
// Claude rules:
|
|
23
|
+
// - Headless: no CSS, no animation, no hardcoded strings
|
|
24
|
+
import type { Snippet } from "svelte";
|
|
25
|
+
|
|
26
|
+
let {
|
|
27
|
+
class: className = "",
|
|
28
|
+
label,
|
|
29
|
+
open = $bindable(false),
|
|
30
|
+
streaming = false,
|
|
31
|
+
children,
|
|
32
|
+
...restProps
|
|
33
|
+
}: {
|
|
34
|
+
/** Summary text. */
|
|
35
|
+
label: string;
|
|
36
|
+
/** Whether open. Bindable. */
|
|
37
|
+
open?: boolean;
|
|
38
|
+
/** Whether content is still being produced. */
|
|
39
|
+
streaming?: boolean;
|
|
40
|
+
/** Reasoning content. */
|
|
41
|
+
children?: Snippet;
|
|
42
|
+
[key: string]: unknown;
|
|
43
|
+
} = $props();
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<!-- Thinking.svelte -->
|
|
47
|
+
<details
|
|
48
|
+
class={`thinking ${className}`}
|
|
49
|
+
bind:open
|
|
50
|
+
data-streaming={streaming ? "true" : undefined}
|
|
51
|
+
aria-busy={streaming ? "true" : undefined}
|
|
52
|
+
{...restProps}
|
|
53
|
+
>
|
|
54
|
+
<summary class="thinking-summary">{label}</summary>
|
|
55
|
+
<div class="thinking-content">
|
|
56
|
+
{@render children?.()}
|
|
57
|
+
</div>
|
|
58
|
+
</details>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
/** Summary text. */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Whether open. Bindable. */
|
|
6
|
+
open?: boolean;
|
|
7
|
+
/** Whether content is still being produced. */
|
|
8
|
+
streaming?: boolean;
|
|
9
|
+
/** Reasoning content. */
|
|
10
|
+
children?: Snippet;
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
};
|
|
13
|
+
declare const Thinking: import("svelte").Component<$$ComponentProps, {}, "open">;
|
|
14
|
+
type Thinking = ReturnType<typeof Thinking>;
|
|
15
|
+
export default Thinking;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// TurkiyeTcKimlikNumarasiInput component
|
|
3
|
+
//
|
|
4
|
+
// A headless input for entering Turkey's T.C. Kimlik Numarası.
|
|
5
|
+
// Format: Eleven digits, the first never zero. The tenth digit is the units digit of ((sum of digits 1,3,5,7,9) × 7) plus ((sum of digits 2,4,6,8) × 9); the eleventh digit is the units digit of the sum of the first ten digits. The eleventh digit is always even.
|
|
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
|
+
// <TurkiyeTcKimlikNumarasiInput label="T.C. Kimlik Numarası" 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/Turkish_Identification_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
|
+
<!-- TurkiyeTcKimlikNumarasiInput.svelte -->
|
|
46
|
+
<input
|
|
47
|
+
class={`turkiye-tc-kimlik-numarasi-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 TurkiyeTcKimlikNumarasiInput: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
9
|
+
type TurkiyeTcKimlikNumarasiInput = ReturnType<typeof TurkiyeTcKimlikNumarasiInput>;
|
|
10
|
+
export default TurkiyeTcKimlikNumarasiInput;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// TurkiyeTcKimlikNumarasiView component
|
|
3
|
+
//
|
|
4
|
+
// A headless display component for showing Turkey's
|
|
5
|
+
// T.C. Kimlik Numarası in a read-only format.
|
|
6
|
+
// Format: Eleven digits, the first never zero. The tenth digit is the units digit of ((sum of digits 1,3,5,7,9) × 7) plus ((sum of digits 2,4,6,8) × 9); the eleventh digit is the units digit of the sum of the first ten digits. The eleventh digit is always even.
|
|
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
|
+
// <TurkiyeTcKimlikNumarasiView label="T.C. Kimlik Numarası" 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/Turkish_Identification_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
|
+
<!-- TurkiyeTcKimlikNumarasiView.svelte -->
|
|
36
|
+
<span
|
|
37
|
+
class={`turkiye-tc-kimlik-numarasi-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 TurkiyeTcKimlikNumarasiView: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type TurkiyeTcKimlikNumarasiView = ReturnType<typeof TurkiyeTcKimlikNumarasiView>;
|
|
8
|
+
export default TurkiyeTcKimlikNumarasiView;
|