@lilydesignsystem/svelte-headless 0.2.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 +19 -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/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/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 -9
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
The format is loosely based on [Keep a Changelog](https://keepachangelog.com/)
|
|
4
4
|
and the package follows [Semantic Versioning](https://semver.org/).
|
|
5
5
|
|
|
6
|
+
## 0.3.0 — 2026-10-05
|
|
7
|
+
|
|
8
|
+
**16 new components (catalog 539 → 555) and a breaking chart change.**
|
|
9
|
+
New: `one-time-password-input`, `multi-select`, `multi-select-with-extras`,
|
|
10
|
+
`empty-state`, `show-more`, `kbd-shortcut`, `calendar-year-table`,
|
|
11
|
+
`calendar-month-table`, `calendar-week-table`, `calendar-day-table`,
|
|
12
|
+
`thinking`, `gauge-chart`, `heatmap-chart`, `radar-chart`, `sankey-chart`,
|
|
13
|
+
`file-tree`.
|
|
14
|
+
|
|
15
|
+
**Breaking:** `area-chart`, `bar-chart`, `column-chart`, `line-chart` and
|
|
16
|
+
`scatter-chart` (and the four new charts) now render `<figure
|
|
17
|
+
class="{chart}">` holding a `<div class="{chart}-graphic" role="img"
|
|
18
|
+
aria-label>` plus an optional sibling `<div class="{chart}-data-table">`.
|
|
19
|
+
`role="img"` is no longer on the `<figure>`: a table inside a `role="img"`
|
|
20
|
+
element is presentational and was unreachable to assistive technology.
|
|
21
|
+
Consumer CSS or tests that targeted `figure[role=img]` must target
|
|
22
|
+
`.{chart}-graphic`. `aria-describedby` passed as a rest prop still lands on
|
|
23
|
+
the `<figure>`. See the monorepo CHANGELOG for the full record.
|
|
24
|
+
|
|
6
25
|
## 0.2.0 — 2026-09-21
|
|
7
26
|
|
|
8
27
|
**`Listbox` and `IconButton` extended, additively, to support the
|
package/dist/components/AotearoaNationalHealthIndexInput/AotearoaNationalHealthIndexInput.svelte
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// AotearoaNationalHealthIndexInput component
|
|
3
|
+
//
|
|
4
|
+
// A headless input for entering New Zealand's National Health Index (NHI) Number.
|
|
5
|
+
// Format: Seven-character identifier (three letters, four digits). The legacy AAANNNC format uses a Modulus-11 check digit over the six preceding characters; an expanded AAANNAX format (issued from July 2026) uses a Modulus-23 check digit instead, to extend the identifier space.
|
|
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
|
+
// <AotearoaNationalHealthIndexInput label="National Health Index (NHI) 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/NHI_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
|
+
<!-- AotearoaNationalHealthIndexInput.svelte -->
|
|
46
|
+
<input
|
|
47
|
+
class={`aotearoa-national-health-index-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 AotearoaNationalHealthIndexInput: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
9
|
+
type AotearoaNationalHealthIndexInput = ReturnType<typeof AotearoaNationalHealthIndexInput>;
|
|
10
|
+
export default AotearoaNationalHealthIndexInput;
|
package/dist/components/AotearoaNationalHealthIndexView/AotearoaNationalHealthIndexView.svelte
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// AotearoaNationalHealthIndexView component
|
|
3
|
+
//
|
|
4
|
+
// A headless display component for showing New Zealand's
|
|
5
|
+
// National Health Index (NHI) Number in a read-only format.
|
|
6
|
+
// Format: Seven-character identifier (three letters, four digits). The legacy AAANNNC format uses a Modulus-11 check digit over the six preceding characters; an expanded AAANNAX format (issued from July 2026) uses a Modulus-23 check digit instead, to extend the identifier space.
|
|
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
|
+
// <AotearoaNationalHealthIndexView label="National Health Index (NHI) 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/NHI_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
|
+
<!-- AotearoaNationalHealthIndexView.svelte -->
|
|
36
|
+
<span
|
|
37
|
+
class={`aotearoa-national-health-index-view ${className}`}
|
|
38
|
+
aria-label={label}
|
|
39
|
+
{...restProps}>{value}</span
|
|
40
|
+
>
|
package/dist/components/AotearoaNationalHealthIndexView/AotearoaNationalHealthIndexView.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 AotearoaNationalHealthIndexView: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type AotearoaNationalHealthIndexView = ReturnType<typeof AotearoaNationalHealthIndexView>;
|
|
8
|
+
export default AotearoaNationalHealthIndexView;
|
|
@@ -1,14 +1,48 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
// AreaChart component
|
|
3
|
+
//
|
|
4
|
+
// A headless chart container for an area chart visualization showing sized components in continuous data. 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="area-chart">
|
|
21
|
+
// <div class="area-chart-graphic" role="img" aria-label>…svg…</div>
|
|
22
|
+
// <div class="area-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
|
+
|
|
2
31
|
import type { Snippet } from "svelte";
|
|
3
32
|
|
|
4
33
|
let {
|
|
5
34
|
class: className = "",
|
|
6
35
|
label = undefined,
|
|
7
36
|
children,
|
|
37
|
+
dataTable,
|
|
8
38
|
...restProps
|
|
9
39
|
}: {
|
|
40
|
+
/** Accessible name for the chart. */
|
|
10
41
|
label?: string;
|
|
42
|
+
/** The consumer-supplied inline svg. */
|
|
11
43
|
children: Snippet;
|
|
44
|
+
/** Optional accessible data table alternative. */
|
|
45
|
+
dataTable?: Snippet;
|
|
12
46
|
[key: string]: unknown;
|
|
13
47
|
} = $props();
|
|
14
48
|
</script>
|
|
@@ -16,9 +50,14 @@
|
|
|
16
50
|
<!-- AreaChart.svelte -->
|
|
17
51
|
<figure
|
|
18
52
|
class={`area-chart ${className}`}
|
|
19
|
-
role="img"
|
|
20
|
-
aria-label={label}
|
|
21
53
|
{...restProps}
|
|
22
54
|
>
|
|
23
|
-
{
|
|
55
|
+
<div class="area-chart-graphic" role="img" aria-label={label}>
|
|
56
|
+
{@render children?.()}
|
|
57
|
+
</div>
|
|
58
|
+
{#if dataTable}
|
|
59
|
+
<div class="area-chart-data-table">
|
|
60
|
+
{@render dataTable()}
|
|
61
|
+
</div>
|
|
62
|
+
{/if}
|
|
24
63
|
</figure>
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { Snippet } from "svelte";
|
|
2
2
|
type $$ComponentProps = {
|
|
3
|
+
/** Accessible name for the chart. */
|
|
3
4
|
label?: string;
|
|
5
|
+
/** The consumer-supplied inline svg. */
|
|
4
6
|
children: Snippet;
|
|
7
|
+
/** Optional accessible data table alternative. */
|
|
8
|
+
dataTable?: Snippet;
|
|
5
9
|
[key: string]: unknown;
|
|
6
10
|
};
|
|
7
11
|
declare const AreaChart: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// ArgentinaCodigoUnicoDeIdentificacionLaboralInput component
|
|
3
|
+
//
|
|
4
|
+
// A headless input for entering Argentina's Código Único de Identificación Laboral (CUIL).
|
|
5
|
+
// Format: Displayed as XX-NNNNNNNN-X: a two-digit prefix denoting registration type/sex (historically 20 male, 27 female, though this classification was discontinued in 2012), the eight-digit DNI (national identity document) number, and a Modulus-11 check digit computed over the ten preceding 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
|
+
// <ArgentinaCodigoUnicoDeIdentificacionLaboralInput label="Código Único de Identificación Laboral (CUIL)" 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/C%C3%B3digo_%C3%9Anico_de_Identificaci%C3%B3n_Laboral
|
|
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
|
+
<!-- ArgentinaCodigoUnicoDeIdentificacionLaboralInput.svelte -->
|
|
46
|
+
<input
|
|
47
|
+
class={`argentina-codigo-unico-de-identificacion-laboral-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 ArgentinaCodigoUnicoDeIdentificacionLaboralInput: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
9
|
+
type ArgentinaCodigoUnicoDeIdentificacionLaboralInput = ReturnType<typeof ArgentinaCodigoUnicoDeIdentificacionLaboralInput>;
|
|
10
|
+
export default ArgentinaCodigoUnicoDeIdentificacionLaboralInput;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// ArgentinaCodigoUnicoDeIdentificacionLaboralView component
|
|
3
|
+
//
|
|
4
|
+
// A headless display component for showing Argentina's
|
|
5
|
+
// Código Único de Identificación Laboral (CUIL) in a read-only format.
|
|
6
|
+
// Format: Displayed as XX-NNNNNNNN-X: a two-digit prefix denoting registration type/sex (historically 20 male, 27 female, though this classification was discontinued in 2012), the eight-digit DNI (national identity document) number, and a Modulus-11 check digit computed over the ten preceding 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
|
+
// <ArgentinaCodigoUnicoDeIdentificacionLaboralView label="Código Único de Identificación Laboral (CUIL)" 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/C%C3%B3digo_%C3%9Anico_de_Identificaci%C3%B3n_Laboral
|
|
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
|
+
<!-- ArgentinaCodigoUnicoDeIdentificacionLaboralView.svelte -->
|
|
36
|
+
<span
|
|
37
|
+
class={`argentina-codigo-unico-de-identificacion-laboral-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 ArgentinaCodigoUnicoDeIdentificacionLaboralView: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type ArgentinaCodigoUnicoDeIdentificacionLaboralView = ReturnType<typeof ArgentinaCodigoUnicoDeIdentificacionLaboralView>;
|
|
8
|
+
export default ArgentinaCodigoUnicoDeIdentificacionLaboralView;
|
|
@@ -1,14 +1,48 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
// BarChart component
|
|
3
|
+
//
|
|
4
|
+
// A headless chart container for a horizontal bar chart visualization for displaying data. 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="bar-chart">
|
|
21
|
+
// <div class="bar-chart-graphic" role="img" aria-label>…svg…</div>
|
|
22
|
+
// <div class="bar-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
|
+
|
|
2
31
|
import type { Snippet } from "svelte";
|
|
3
32
|
|
|
4
33
|
let {
|
|
5
34
|
class: className = "",
|
|
6
35
|
label = undefined,
|
|
7
36
|
children,
|
|
37
|
+
dataTable,
|
|
8
38
|
...restProps
|
|
9
39
|
}: {
|
|
40
|
+
/** Accessible name for the chart. */
|
|
10
41
|
label?: string;
|
|
42
|
+
/** The consumer-supplied inline svg. */
|
|
11
43
|
children: Snippet;
|
|
44
|
+
/** Optional accessible data table alternative. */
|
|
45
|
+
dataTable?: Snippet;
|
|
12
46
|
[key: string]: unknown;
|
|
13
47
|
} = $props();
|
|
14
48
|
</script>
|
|
@@ -16,9 +50,14 @@
|
|
|
16
50
|
<!-- BarChart.svelte -->
|
|
17
51
|
<figure
|
|
18
52
|
class={`bar-chart ${className}`}
|
|
19
|
-
role="img"
|
|
20
|
-
aria-label={label}
|
|
21
53
|
{...restProps}
|
|
22
54
|
>
|
|
23
|
-
{
|
|
55
|
+
<div class="bar-chart-graphic" role="img" aria-label={label}>
|
|
56
|
+
{@render children?.()}
|
|
57
|
+
</div>
|
|
58
|
+
{#if dataTable}
|
|
59
|
+
<div class="bar-chart-data-table">
|
|
60
|
+
{@render dataTable()}
|
|
61
|
+
</div>
|
|
62
|
+
{/if}
|
|
24
63
|
</figure>
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { Snippet } from "svelte";
|
|
2
2
|
type $$ComponentProps = {
|
|
3
|
+
/** Accessible name for the chart. */
|
|
3
4
|
label?: string;
|
|
5
|
+
/** The consumer-supplied inline svg. */
|
|
4
6
|
children: Snippet;
|
|
7
|
+
/** Optional accessible data table alternative. */
|
|
8
|
+
dataTable?: Snippet;
|
|
5
9
|
[key: string]: unknown;
|
|
6
10
|
};
|
|
7
11
|
declare const BarChart: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// BharatAadhaarInput component
|
|
3
|
+
//
|
|
4
|
+
// A headless input for entering India's Aadhaar (आधार).
|
|
5
|
+
// Format: Twelve digits, the first of which is never 0 or 1. The twelfth digit is a check digit computed with the Verhoeff algorithm, a checksum that detects every single-digit error and every adjacent-digit transposition. Issued by the Unique Identification Authority of India (UIDAI).
|
|
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
|
+
// <BharatAadhaarInput label="Aadhaar (आधार)" 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/Aadhaar
|
|
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
|
+
<!-- BharatAadhaarInput.svelte -->
|
|
46
|
+
<input
|
|
47
|
+
class={`bharat-aadhaar-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 BharatAadhaarInput: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
9
|
+
type BharatAadhaarInput = ReturnType<typeof BharatAadhaarInput>;
|
|
10
|
+
export default BharatAadhaarInput;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// BharatAadhaarView component
|
|
3
|
+
//
|
|
4
|
+
// A headless display component for showing India's
|
|
5
|
+
// Aadhaar (आधार) in a read-only format.
|
|
6
|
+
// Format: Twelve digits, the first of which is never 0 or 1. The twelfth digit is a check digit computed with the Verhoeff algorithm, a checksum that detects every single-digit error and every adjacent-digit transposition. Issued by the Unique Identification Authority of India (UIDAI).
|
|
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
|
+
// <BharatAadhaarView label="Aadhaar (आधार)" 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/Aadhaar
|
|
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
|
+
<!-- BharatAadhaarView.svelte -->
|
|
36
|
+
<span
|
|
37
|
+
class={`bharat-aadhaar-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 BharatAadhaarView: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type BharatAadhaarView = ReturnType<typeof BharatAadhaarView>;
|
|
8
|
+
export default BharatAadhaarView;
|
package/dist/components/BrasilCartaoNacionalDeSaudeInput/BrasilCartaoNacionalDeSaudeInput.svelte
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// BrasilCartaoNacionalDeSaudeInput component
|
|
3
|
+
//
|
|
4
|
+
// A headless input for entering Brazil's Cartão Nacional de Saúde (CNS).
|
|
5
|
+
// Format: Fifteen-digit number issued by Brazil's Sistema Único de Saúde (SUS), grouped as NNN NNNN NNNN NNNN. Numbers starting 1 or 2 are definitive (linked to the national civil registry); numbers starting 7, 8, or 9 are provisional. Both forms are validated with a weighted-sum Modulus-11 check across all 15 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
|
+
// <BrasilCartaoNacionalDeSaudeInput label="Cartão Nacional de Saúde (CNS)" 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/CPF_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
|
+
<!-- BrasilCartaoNacionalDeSaudeInput.svelte -->
|
|
46
|
+
<input
|
|
47
|
+
class={`brasil-cartao-nacional-de-saude-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 BrasilCartaoNacionalDeSaudeInput: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
9
|
+
type BrasilCartaoNacionalDeSaudeInput = ReturnType<typeof BrasilCartaoNacionalDeSaudeInput>;
|
|
10
|
+
export default BrasilCartaoNacionalDeSaudeInput;
|
package/dist/components/BrasilCartaoNacionalDeSaudeView/BrasilCartaoNacionalDeSaudeView.svelte
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// BrasilCartaoNacionalDeSaudeView component
|
|
3
|
+
//
|
|
4
|
+
// A headless display component for showing Brazil's
|
|
5
|
+
// Cartão Nacional de Saúde (CNS) in a read-only format.
|
|
6
|
+
// Format: Fifteen-digit number issued by Brazil's Sistema Único de Saúde (SUS), grouped as NNN NNNN NNNN NNNN. Numbers starting 1 or 2 are definitive (linked to the national civil registry); numbers starting 7, 8, or 9 are provisional. Both forms are validated with a weighted-sum Modulus-11 check across all 15 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
|
+
// <BrasilCartaoNacionalDeSaudeView label="Cartão Nacional de Saúde (CNS)" 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/CPF_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
|
+
<!-- BrasilCartaoNacionalDeSaudeView.svelte -->
|
|
36
|
+
<span
|
|
37
|
+
class={`brasil-cartao-nacional-de-saude-view ${className}`}
|
|
38
|
+
aria-label={label}
|
|
39
|
+
{...restProps}>{value}</span
|
|
40
|
+
>
|
package/dist/components/BrasilCartaoNacionalDeSaudeView/BrasilCartaoNacionalDeSaudeView.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 BrasilCartaoNacionalDeSaudeView: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type BrasilCartaoNacionalDeSaudeView = ReturnType<typeof BrasilCartaoNacionalDeSaudeView>;
|
|
8
|
+
export default BrasilCartaoNacionalDeSaudeView;
|