@ogds/elements 1.0.0-alpha.6
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/.storybook/UswdsTheme.js +11 -0
- package/.storybook/blocks/SiteNote.jsx +5 -0
- package/.storybook/main.js +38 -0
- package/.storybook/manager.js +6 -0
- package/.storybook/preview.js +37 -0
- package/.storybook/test-runner.js +23 -0
- package/README.md +201 -0
- package/build/css/breakpoints.css +15 -0
- package/build/css/colors.css +490 -0
- package/build/css/spacing.css +16 -0
- package/build/scss/_breakpoints.scss +12 -0
- package/build/scss/_colors.scss +487 -0
- package/build/scss/_spacing.scss +13 -0
- package/dist/components/frameworks/react/OgdsAccordion.d.ts +69 -0
- package/dist/components/frameworks/react/OgdsAccordion.js +22 -0
- package/dist/components/frameworks/react/OgdsAccordionToggle.d.ts +60 -0
- package/dist/components/frameworks/react/OgdsAccordionToggle.js +23 -0
- package/dist/components/frameworks/react/UsaBanner.d.ts +82 -0
- package/dist/components/frameworks/react/UsaBanner.js +25 -0
- package/dist/components/frameworks/react/UsaLink.d.ts +60 -0
- package/dist/components/frameworks/react/UsaLink.js +21 -0
- package/dist/components/frameworks/react/index.d.ts +4 -0
- package/dist/components/frameworks/react/index.js +4 -0
- package/dist/components/frameworks/react/react-utils.js +34 -0
- package/dist/components/index.cjs +1 -0
- package/dist/components/index.cjs.map +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +6 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/usa-banner/index.d.ts +82 -0
- package/dist/components/usa-banner/usa-banner.spec.d.ts +0 -0
- package/dist/components/usa-banner/usa-banner.stories.d.ts +95 -0
- package/dist/components/usa-banner.cjs +95 -0
- package/dist/components/usa-banner.cjs.map +1 -0
- package/dist/components/usa-banner.js +189 -0
- package/dist/components/usa-banner.js.map +1 -0
- package/dist/components/usa-header/index.d.ts +6 -0
- package/dist/components/usa-link/index.d.ts +30 -0
- package/dist/components/usa-link/usa-link.spec.d.ts +0 -0
- package/dist/components/usa-link.cjs +5 -0
- package/dist/components/usa-link.cjs.map +1 -0
- package/dist/components/usa-link.js +32 -0
- package/dist/components/usa-link.js.map +1 -0
- package/dist/core/OgdsElement.d.ts +3 -0
- package/dist/index-7kIMQwBw.cjs +1 -0
- package/dist/index-7kIMQwBw.cjs.map +1 -0
- package/dist/index-BrHk1-6T.js +10 -0
- package/dist/index-BrHk1-6T.js.map +1 -0
- package/dist/types/custom-element-jsx.d.ts +175 -0
- package/dist/types/custom-element-solidjs.d.ts +185 -0
- package/dist/types/custom-element-svelte.d.ts +157 -0
- package/dist/types/custom-element-vuejs.d.ts +127 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.test.d.ts +1 -0
- package/package.json +119 -0
- package/src/components/index.ts +5 -0
- package/src/components/ogds-accordion/.claude/settings.local.json +7 -0
- package/src/components/ogds-accordion/docs.mdx +90 -0
- package/src/components/ogds-accordion/index.ts +132 -0
- package/src/components/ogds-accordion/ogds-accordion.css +99 -0
- package/src/components/ogds-accordion/ogds-accordion.spec.ts +175 -0
- package/src/components/ogds-accordion/ogds-accordion.stories.ts +77 -0
- package/src/components/ogds-accordion-toggle/index.ts +80 -0
- package/src/components/usa-banner/docs.mdx +108 -0
- package/src/components/usa-banner/index.ts +290 -0
- package/src/components/usa-banner/usa-banner.css +511 -0
- package/src/components/usa-banner/usa-banner.spec.ts +76 -0
- package/src/components/usa-banner/usa-banner.stories.ts +136 -0
- package/src/components/usa-header/index.ts +50 -0
- package/src/components/usa-header/usa-header.css +1 -0
- package/src/components/usa-link/index.ts +66 -0
- package/src/components/usa-link/usa-link.css +24 -0
- package/src/components/usa-link/usa-link.spec.ts +50 -0
- package/src/core/colors.css +8 -0
- package/src/core/fonts.css +213 -0
- package/src/core/index.css +2 -0
- package/src/core/token-styles.ts +26 -0
- package/src/declaration.d.ts +75 -0
- package/src/shared/icons/accessibility_new.svg +1 -0
- package/src/shared/icons/accessible_forward.svg +1 -0
- package/src/shared/icons/account_balance.svg +1 -0
- package/src/shared/icons/account_box.svg +1 -0
- package/src/shared/icons/account_circle.svg +1 -0
- package/src/shared/icons/add.svg +1 -0
- package/src/shared/icons/add_circle.svg +1 -0
- package/src/shared/icons/add_circle_outline.svg +1 -0
- package/src/shared/icons/alarm.svg +1 -0
- package/src/shared/icons/alternate_email.svg +1 -0
- package/src/shared/icons/announcement.svg +1 -0
- package/src/shared/icons/api.svg +1 -0
- package/src/shared/icons/arrow_back.svg +1 -0
- package/src/shared/icons/arrow_downward.svg +1 -0
- package/src/shared/icons/arrow_drop_down.svg +1 -0
- package/src/shared/icons/arrow_drop_up.svg +1 -0
- package/src/shared/icons/arrow_forward.svg +1 -0
- package/src/shared/icons/arrow_upward.svg +1 -0
- package/src/shared/icons/assessment.svg +1 -0
- package/src/shared/icons/attach_file.svg +1 -0
- package/src/shared/icons/attach_money.svg +1 -0
- package/src/shared/icons/autorenew.svg +1 -0
- package/src/shared/icons/backpack.svg +1 -0
- package/src/shared/icons/bathtub.svg +1 -0
- package/src/shared/icons/bedding.svg +1 -0
- package/src/shared/icons/bookmark.svg +1 -0
- package/src/shared/icons/bug_report.svg +1 -0
- package/src/shared/icons/build.svg +1 -0
- package/src/shared/icons/calendar_today.svg +1 -0
- package/src/shared/icons/campaign.svg +1 -0
- package/src/shared/icons/camping.svg +1 -0
- package/src/shared/icons/cancel.svg +1 -0
- package/src/shared/icons/chat.svg +1 -0
- package/src/shared/icons/check.svg +1 -0
- package/src/shared/icons/check_box_outline_blank.svg +1 -0
- package/src/shared/icons/check_circle.svg +1 -0
- package/src/shared/icons/check_circle_outline.svg +1 -0
- package/src/shared/icons/checkroom.svg +1 -0
- package/src/shared/icons/chevron_left.svg +1 -0
- package/src/shared/icons/chevron_right.svg +1 -0
- package/src/shared/icons/clean_hands.svg +1 -0
- package/src/shared/icons/close.svg +1 -0
- package/src/shared/icons/closed_caption.svg +1 -0
- package/src/shared/icons/clothes.svg +1 -0
- package/src/shared/icons/cloud.svg +1 -0
- package/src/shared/icons/code.svg +1 -0
- package/src/shared/icons/comment.svg +1 -0
- package/src/shared/icons/connect_without_contact.svg +1 -0
- package/src/shared/icons/construction.svg +1 -0
- package/src/shared/icons/construction_worker.svg +1 -0
- package/src/shared/icons/contact_page.svg +1 -0
- package/src/shared/icons/content_copy.svg +1 -0
- package/src/shared/icons/coronavirus.svg +1 -0
- package/src/shared/icons/credit_card.svg +1 -0
- package/src/shared/icons/deck.svg +1 -0
- package/src/shared/icons/delete.svg +1 -0
- package/src/shared/icons/device_thermostat.svg +1 -0
- package/src/shared/icons/directions.svg +1 -0
- package/src/shared/icons/directions_bike.svg +1 -0
- package/src/shared/icons/directions_bus.svg +1 -0
- package/src/shared/icons/directions_car.svg +1 -0
- package/src/shared/icons/directions_walk.svg +1 -0
- package/src/shared/icons/do_not_disturb.svg +1 -0
- package/src/shared/icons/do_not_touch.svg +1 -0
- package/src/shared/icons/drag_handle.svg +1 -0
- package/src/shared/icons/eco.svg +1 -0
- package/src/shared/icons/edit.svg +1 -0
- package/src/shared/icons/electrical_services.svg +1 -0
- package/src/shared/icons/emoji_events.svg +1 -0
- package/src/shared/icons/error.svg +1 -0
- package/src/shared/icons/error_outline.svg +1 -0
- package/src/shared/icons/event.svg +1 -0
- package/src/shared/icons/expand_less.svg +1 -0
- package/src/shared/icons/expand_more.svg +1 -0
- package/src/shared/icons/facebook.svg +1 -0
- package/src/shared/icons/fast_forward.svg +1 -0
- package/src/shared/icons/fast_rewind.svg +1 -0
- package/src/shared/icons/favorite.svg +1 -0
- package/src/shared/icons/favorite_border.svg +1 -0
- package/src/shared/icons/fax.svg +1 -0
- package/src/shared/icons/file_download.svg +1 -0
- package/src/shared/icons/file_present.svg +1 -0
- package/src/shared/icons/file_upload.svg +1 -0
- package/src/shared/icons/filter_alt.svg +1 -0
- package/src/shared/icons/filter_list.svg +1 -0
- package/src/shared/icons/fingerprint.svg +1 -0
- package/src/shared/icons/first_page.svg +1 -0
- package/src/shared/icons/flag.svg +1 -0
- package/src/shared/icons/flickr.svg +1 -0
- package/src/shared/icons/flight.svg +1 -0
- package/src/shared/icons/flooding.svg +1 -0
- package/src/shared/icons/folder.svg +1 -0
- package/src/shared/icons/folder_open.svg +1 -0
- package/src/shared/icons/format_quote.svg +1 -0
- package/src/shared/icons/format_size.svg +1 -0
- package/src/shared/icons/forum.svg +1 -0
- package/src/shared/icons/github.svg +1 -0
- package/src/shared/icons/grid_view.svg +1 -0
- package/src/shared/icons/group_add.svg +1 -0
- package/src/shared/icons/groups.svg +1 -0
- package/src/shared/icons/hearing.svg +1 -0
- package/src/shared/icons/help.svg +1 -0
- package/src/shared/icons/help_outline.svg +1 -0
- package/src/shared/icons/highlight_off.svg +1 -0
- package/src/shared/icons/history.svg +1 -0
- package/src/shared/icons/home.svg +1 -0
- package/src/shared/icons/hospital.svg +1 -0
- package/src/shared/icons/hotel.svg +1 -0
- package/src/shared/icons/hourglass_empty.svg +1 -0
- package/src/shared/icons/hurricane.svg +1 -0
- package/src/shared/icons/identification.svg +1 -0
- package/src/shared/icons/image.svg +1 -0
- package/src/shared/icons/info.svg +1 -0
- package/src/shared/icons/info_outline.svg +1 -0
- package/src/shared/icons/insights.svg +1 -0
- package/src/shared/icons/instagram.svg +1 -0
- package/src/shared/icons/keyboard.svg +1 -0
- package/src/shared/icons/label.svg +1 -0
- package/src/shared/icons/language.svg +1 -0
- package/src/shared/icons/last_page.svg +1 -0
- package/src/shared/icons/launch.svg +1 -0
- package/src/shared/icons/lightbulb.svg +1 -0
- package/src/shared/icons/lightbulb_outline.svg +1 -0
- package/src/shared/icons/link.svg +1 -0
- package/src/shared/icons/link_off.svg +1 -0
- package/src/shared/icons/linkedin.svg +1 -0
- package/src/shared/icons/list.svg +1 -0
- package/src/shared/icons/local_cafe.svg +1 -0
- package/src/shared/icons/local_fire_department.svg +1 -0
- package/src/shared/icons/local_gas_station.svg +1 -0
- package/src/shared/icons/local_grocery_store.svg +1 -0
- package/src/shared/icons/local_hospital.svg +1 -0
- package/src/shared/icons/local_laundry_service.svg +1 -0
- package/src/shared/icons/local_library.svg +1 -0
- package/src/shared/icons/local_offer.svg +1 -0
- package/src/shared/icons/local_parking.svg +1 -0
- package/src/shared/icons/local_pharmacy.svg +1 -0
- package/src/shared/icons/local_police.svg +1 -0
- package/src/shared/icons/local_taxi.svg +1 -0
- package/src/shared/icons/location_city.svg +1 -0
- package/src/shared/icons/location_on.svg +1 -0
- package/src/shared/icons/lock.svg +1 -0
- package/src/shared/icons/lock_open.svg +1 -0
- package/src/shared/icons/lock_outline.svg +1 -0
- package/src/shared/icons/login.svg +1 -0
- package/src/shared/icons/logout.svg +1 -0
- package/src/shared/icons/loop.svg +1 -0
- package/src/shared/icons/mail.svg +1 -0
- package/src/shared/icons/mail_outline.svg +1 -0
- package/src/shared/icons/map.svg +1 -0
- package/src/shared/icons/masks.svg +1 -0
- package/src/shared/icons/medical_services.svg +1 -0
- package/src/shared/icons/menu.svg +1 -0
- package/src/shared/icons/military_tech.svg +1 -0
- package/src/shared/icons/more_horiz.svg +1 -0
- package/src/shared/icons/more_vert.svg +1 -0
- package/src/shared/icons/my_location.svg +1 -0
- package/src/shared/icons/navigate_before.svg +1 -0
- package/src/shared/icons/navigate_far_before.svg +1 -0
- package/src/shared/icons/navigate_far_next.svg +1 -0
- package/src/shared/icons/navigate_next.svg +1 -0
- package/src/shared/icons/near_me.svg +1 -0
- package/src/shared/icons/notifications.svg +1 -0
- package/src/shared/icons/notifications_active.svg +1 -0
- package/src/shared/icons/notifications_none.svg +1 -0
- package/src/shared/icons/notifications_off.svg +1 -0
- package/src/shared/icons/park.svg +1 -0
- package/src/shared/icons/people.svg +1 -0
- package/src/shared/icons/person.svg +1 -0
- package/src/shared/icons/pets.svg +1 -0
- package/src/shared/icons/phone.svg +1 -0
- package/src/shared/icons/photo_camera.svg +1 -0
- package/src/shared/icons/print.svg +1 -0
- package/src/shared/icons/priority_high.svg +1 -0
- package/src/shared/icons/public.svg +1 -0
- package/src/shared/icons/push_pin.svg +1 -0
- package/src/shared/icons/radio_button_unchecked.svg +1 -0
- package/src/shared/icons/rain.svg +1 -0
- package/src/shared/icons/reduce_capacity.svg +1 -0
- package/src/shared/icons/remove.svg +1 -0
- package/src/shared/icons/remove_circle.svg +1 -0
- package/src/shared/icons/report.svg +1 -0
- package/src/shared/icons/restaurant.svg +1 -0
- package/src/shared/icons/rss_feed.svg +1 -0
- package/src/shared/icons/safety_divider.svg +1 -0
- package/src/shared/icons/sanitizer.svg +1 -0
- package/src/shared/icons/save_alt.svg +1 -0
- package/src/shared/icons/schedule.svg +1 -0
- package/src/shared/icons/school.svg +1 -0
- package/src/shared/icons/science.svg +1 -0
- package/src/shared/icons/search.svg +1 -0
- package/src/shared/icons/security.svg +1 -0
- package/src/shared/icons/send.svg +1 -0
- package/src/shared/icons/sentiment_dissatisfied.svg +1 -0
- package/src/shared/icons/sentiment_neutral.svg +1 -0
- package/src/shared/icons/sentiment_satisfied.svg +1 -0
- package/src/shared/icons/sentiment_satisfied_alt.svg +1 -0
- package/src/shared/icons/sentiment_very_dissatisfied.svg +1 -0
- package/src/shared/icons/settings.svg +1 -0
- package/src/shared/icons/severe_weather.svg +1 -0
- package/src/shared/icons/share.svg +1 -0
- package/src/shared/icons/shield.svg +1 -0
- package/src/shared/icons/shopping_basket.svg +1 -0
- package/src/shared/icons/snow.svg +1 -0
- package/src/shared/icons/soap.svg +1 -0
- package/src/shared/icons/social_distance.svg +1 -0
- package/src/shared/icons/sort_arrow.svg +1 -0
- package/src/shared/icons/spellcheck.svg +1 -0
- package/src/shared/icons/star.svg +1 -0
- package/src/shared/icons/star_half.svg +1 -0
- package/src/shared/icons/star_outline.svg +1 -0
- package/src/shared/icons/store.svg +1 -0
- package/src/shared/icons/support.svg +1 -0
- package/src/shared/icons/support_agent.svg +1 -0
- package/src/shared/icons/text_fields.svg +1 -0
- package/src/shared/icons/thumb_down_alt.svg +1 -0
- package/src/shared/icons/thumb_up_alt.svg +1 -0
- package/src/shared/icons/timer.svg +1 -0
- package/src/shared/icons/toggle_off.svg +1 -0
- package/src/shared/icons/toggle_on.svg +1 -0
- package/src/shared/icons/topic.svg +1 -0
- package/src/shared/icons/tornado.svg +1 -0
- package/src/shared/icons/translate.svg +1 -0
- package/src/shared/icons/trending_down.svg +1 -0
- package/src/shared/icons/trending_up.svg +1 -0
- package/src/shared/icons/twitter.svg +1 -0
- package/src/shared/icons/undo.svg +1 -0
- package/src/shared/icons/unfold_less.svg +1 -0
- package/src/shared/icons/unfold_more.svg +1 -0
- package/src/shared/icons/update.svg +1 -0
- package/src/shared/icons/upload_file.svg +1 -0
- package/src/shared/icons/verified.svg +1 -0
- package/src/shared/icons/verified_user.svg +1 -0
- package/src/shared/icons/visibility.svg +1 -0
- package/src/shared/icons/visibility_off.svg +1 -0
- package/src/shared/icons/volume_off.svg +1 -0
- package/src/shared/icons/warning.svg +1 -0
- package/src/shared/icons/wash.svg +1 -0
- package/src/shared/icons/wifi.svg +1 -0
- package/src/shared/icons/work.svg +1 -0
- package/src/shared/icons/x.svg +1 -0
- package/src/shared/icons/youtube.svg +1 -0
- package/src/shared/icons/zoom_in.svg +1 -0
- package/src/shared/icons/zoom_out.svg +1 -0
- package/src/shared/icons/zoom_out_map.svg +1 -0
- package/src/utils/index.test.ts +34 -0
- package/src/utils/index.ts +8 -0
- package/src/vite-env.d.ts +17 -0
- package/storybook/contributing.mdx +115 -0
- package/storybook/framework-guidance.mdx +96 -0
- package/storybook/index.css +70 -0
- package/storybook/readme.mdx +6 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import type { JSX } from "solid-js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This type can be used to create scoped tags for your components.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* import type { ScopedElements } from "my-app/solid";
|
|
10
|
+
*
|
|
11
|
+
* declare module "solid-js" {
|
|
12
|
+
* namespace JSX {
|
|
13
|
+
* interface IntrinsicElements
|
|
14
|
+
* extends ScopedElements<'prefix-', '-suffix'> {}
|
|
15
|
+
* }
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export type ScopedElements<Prefix extends string = "", Suffix extends string = ""> = {
|
|
21
|
+
[Key in keyof CustomElements as `${Prefix}${Key}${Suffix}`]: CustomElements[Key];
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
type BaseProps = {
|
|
25
|
+
/** Content added between the opening and closing tags of the element */
|
|
26
|
+
children?: JSX.Element;
|
|
27
|
+
/** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
|
|
28
|
+
class?: string;
|
|
29
|
+
/** Takes an object where the key is the class name(s) and the value is a boolean expression. When true, the class is applied, and when false, it is removed. */
|
|
30
|
+
classList?: Record<string, boolean | undefined>;
|
|
31
|
+
/** Specifies the text direction of the element. */
|
|
32
|
+
dir?: "ltr" | "rtl";
|
|
33
|
+
/** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
|
|
34
|
+
exportparts?: string;
|
|
35
|
+
/** Specifies whether the element should be hidden. */
|
|
36
|
+
hidden?: boolean | string;
|
|
37
|
+
/** A unique identifier for the element. */
|
|
38
|
+
id?: string;
|
|
39
|
+
/** Sets the HTML or XML markup contained within the element. */
|
|
40
|
+
innerHTML?: string;
|
|
41
|
+
/** Specifies the language of the element. */
|
|
42
|
+
lang?: string;
|
|
43
|
+
/** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
|
|
44
|
+
part?: string;
|
|
45
|
+
/** Use the ref attribute with a variable to assign a DOM element to the variable once the element is rendered. */
|
|
46
|
+
ref?: unknown | ((e: unknown) => void);
|
|
47
|
+
/** Adds a reference for a custom element slot */
|
|
48
|
+
slot?: string;
|
|
49
|
+
/** Prop for setting inline styles */
|
|
50
|
+
style?: JSX.CSSProperties;
|
|
51
|
+
/** Overrides the default Tab button behavior. Avoid using values other than -1 and 0. */
|
|
52
|
+
tabIndex?: number;
|
|
53
|
+
/** Sets the text content of the element */
|
|
54
|
+
textContent?: string;
|
|
55
|
+
/** Specifies the tooltip text for the element. */
|
|
56
|
+
title?: string;
|
|
57
|
+
/** Passing 'no' excludes the element content from being translated. */
|
|
58
|
+
translate?: "yes" | "no";
|
|
59
|
+
} & JSX.DirectiveAttributes &
|
|
60
|
+
JSX.PropAttributes &
|
|
61
|
+
JSX.AttrAttributes;
|
|
62
|
+
|
|
63
|
+
type BaseEvents = {};
|
|
64
|
+
|
|
65
|
+
type OgdsAccordionProps = {
|
|
66
|
+
/** Adds `role="list"` to the component and `role="listitem"` to each `<details>` child, conveying the accordion as a list to assistive technologies. Mutually exclusive with `heading-level`. */
|
|
67
|
+
"use-list-semantics"?: boolean;
|
|
68
|
+
/** Sets a heading level for each accordion panel by adding `role="heading"` and the corresponding `aria-level` to each `<summary>` element. Has no effect when set to `0` (the default). Mutually exclusive with `use-list-semantics`. */
|
|
69
|
+
"heading-level"?: number;
|
|
70
|
+
/** */
|
|
71
|
+
"prop:detailsChildren"?: HTMLCollectionOf<HTMLDetailsElement> | undefined;
|
|
72
|
+
/** */
|
|
73
|
+
"prop:childRoles"?: Map<HTMLDetailsElement, Set<string>>;
|
|
74
|
+
} & JSX.DirectiveFunctionAttributes<OgdsAccordion> &
|
|
75
|
+
JSX.OnAttributes<OgdsAccordion> &
|
|
76
|
+
JSX.OnCaptureAttributes<OgdsAccordion>;
|
|
77
|
+
|
|
78
|
+
type OgdsAccordionToggleProps = {
|
|
79
|
+
/** The `id` of the `<ogds-accordion>` to control. Required. */
|
|
80
|
+
controls?: string;
|
|
81
|
+
/** Button label when all panels are collapsed. Defaults to "Expand All". */
|
|
82
|
+
"expand-label"?: string;
|
|
83
|
+
/** Button label when one or more panels are open. Defaults to "Collapse All". */
|
|
84
|
+
"collapse-label"?: string;
|
|
85
|
+
} & JSX.DirectiveFunctionAttributes<OgdsAccordionToggle> &
|
|
86
|
+
JSX.OnAttributes<OgdsAccordionToggle> &
|
|
87
|
+
JSX.OnCaptureAttributes<OgdsAccordionToggle>;
|
|
88
|
+
|
|
89
|
+
type UsaBannerProps = {
|
|
90
|
+
/** The element's language. */
|
|
91
|
+
lang?: "en" | "es";
|
|
92
|
+
/** The custom aria label users can override. */
|
|
93
|
+
label?: string;
|
|
94
|
+
/** The top level domain for the site. */
|
|
95
|
+
tld?: "gov" | "mil";
|
|
96
|
+
/** */
|
|
97
|
+
flagSrc?: string;
|
|
98
|
+
/** */
|
|
99
|
+
isOpen?: boolean;
|
|
100
|
+
} & JSX.DirectiveFunctionAttributes<UsaBanner> &
|
|
101
|
+
JSX.OnAttributes<UsaBanner> &
|
|
102
|
+
JSX.OnCaptureAttributes<UsaBanner>;
|
|
103
|
+
|
|
104
|
+
type UsaLinkProps = {
|
|
105
|
+
/** The url for the link */
|
|
106
|
+
href?: string | undefined;
|
|
107
|
+
} & JSX.DirectiveFunctionAttributes<UsaLink> &
|
|
108
|
+
JSX.OnAttributes<UsaLink> &
|
|
109
|
+
JSX.OnCaptureAttributes<UsaLink>;
|
|
110
|
+
|
|
111
|
+
export type CustomElements = {
|
|
112
|
+
/**
|
|
113
|
+
* The ogds-accordion component.
|
|
114
|
+
*
|
|
115
|
+
* Apply these classes to `<ogds-accordion>` to enable variants:
|
|
116
|
+
* - `bordered` — adds a border to expanded content
|
|
117
|
+
* - `with-icon` — shows a chevron icon on each summary
|
|
118
|
+
* - `with-icon plus` — uses plus/minus icons instead of chevrons
|
|
119
|
+
* - `with-icon right` — aligns the icon to the right
|
|
120
|
+
* ---
|
|
121
|
+
*
|
|
122
|
+
*
|
|
123
|
+
* ### **Slots:**
|
|
124
|
+
* - _default_ - The default (only) slot for the <ogds-accordion> expects one or more plain HTML <details> elements.
|
|
125
|
+
*
|
|
126
|
+
* ### **CSS Properties:**
|
|
127
|
+
* - **--ogds-accordion-border** - Border used in the bordered variant. _(default: undefined)_
|
|
128
|
+
* - **--ogds-accordion-content-padding** - Padding for the expanded content area. _(default: undefined)_
|
|
129
|
+
* - **--ogds-accordion-icon-closed** - Icon shown when a panel is closed. Defaults to a chevron pointing down. CSS-only users must set this to a url() value pointing to their own icon asset. _(default: undefined)_
|
|
130
|
+
* - **--ogds-accordion-icon-open** - Icon shown when a panel is open. Defaults to a chevron pointing up. CSS-only users must set this to a url() value pointing to their own icon asset. _(default: undefined)_
|
|
131
|
+
*/
|
|
132
|
+
"ogds-accordion": Partial<OgdsAccordionProps & BaseProps & BaseEvents>;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* A button that expands or collapses all panels in an associated `<ogds-accordion>`.
|
|
136
|
+
* ---
|
|
137
|
+
*
|
|
138
|
+
*
|
|
139
|
+
* ### **CSS Parts:**
|
|
140
|
+
* - **button** - The toggle button.
|
|
141
|
+
*/
|
|
142
|
+
"ogds-accordion-toggle": Partial<OgdsAccordionToggleProps & BaseProps & BaseEvents>;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* The usa-banner component.
|
|
146
|
+
* ---
|
|
147
|
+
*
|
|
148
|
+
*
|
|
149
|
+
* ### **Slots:**
|
|
150
|
+
* - **banner-text** - The text for official government website text.
|
|
151
|
+
* - **banner-action** - Action text label "Here's how you know."
|
|
152
|
+
* - **domain-heading** - Heading text for the domain section.
|
|
153
|
+
* - **domain-text** - Body text for domain section.
|
|
154
|
+
* - **https-heading** - Heading for HTTPs section.
|
|
155
|
+
* - **https-text** - Body text for HTTPs section.
|
|
156
|
+
*
|
|
157
|
+
* ### **CSS Properties:**
|
|
158
|
+
* - **--ogds-banner-background-color** - Sets banner background color. _(default: undefined)_
|
|
159
|
+
* - **--ogds-banner-button-close-background-color** - Sets the background color for the close control on smaller viewports. _(default: undefined)_
|
|
160
|
+
* - **--ogds-banner-focus-outline-color** - Sets banner focus outline color. _(default: undefined)_
|
|
161
|
+
* - **--ogds-banner-font-family** - Sets banner font family. _(default: undefined)_
|
|
162
|
+
* - **--ogds-banner-icon-gov-color** - Sets the color for the official government domain icon in the expanded state of the banner. _(default: undefined)_
|
|
163
|
+
* - **--ogds-banner-icon-https-color** - Sets the color for the https icon in the expanded state of the banner. _(default: undefined)_
|
|
164
|
+
* - **--ogds-banner-link-color** - Sets the default link color. _(default: undefined)_
|
|
165
|
+
* - **--ogds-banner-link-hover-color** - Sets the default link color. _(default: undefined)_
|
|
166
|
+
* - **--ogds-banner-text-color** - Sets the default text color. _(default: undefined)_
|
|
167
|
+
*/
|
|
168
|
+
"usa-banner": Partial<UsaBannerProps & BaseProps & BaseEvents>;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* The usa-link component.
|
|
172
|
+
* ---
|
|
173
|
+
*
|
|
174
|
+
*
|
|
175
|
+
* ### **Slots:**
|
|
176
|
+
* - _default_ - This element has a slot
|
|
177
|
+
*
|
|
178
|
+
* ### **CSS Properties:**
|
|
179
|
+
* - **--theme-link-color** - Sets the link color _(default: undefined)_
|
|
180
|
+
* - **--theme-link-visited-color** - Sets the color for visited links _(default: undefined)_
|
|
181
|
+
* - **--theme-link-hover-color** - Sets the hover state link color _(default: undefined)_
|
|
182
|
+
* - **--theme-link-active-color** - Sets the active state link color _(default: undefined)_
|
|
183
|
+
*/
|
|
184
|
+
"usa-link": Partial<UsaLinkProps & BaseProps & BaseEvents>;
|
|
185
|
+
};
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
type BaseProps = {
|
|
2
|
+
/** Content added between the opening and closing tags of the element */
|
|
3
|
+
children?: JSX.Element;
|
|
4
|
+
/** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
|
|
5
|
+
class?: string;
|
|
6
|
+
/** Takes an object where the key is the class name(s) and the value is a boolean expression. When true, the class is applied, and when false, it is removed. */
|
|
7
|
+
classList?: Record<string, boolean | undefined>;
|
|
8
|
+
/** Specifies the text direction of the element. */
|
|
9
|
+
dir?: "ltr" | "rtl";
|
|
10
|
+
/** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
|
|
11
|
+
exportparts?: string;
|
|
12
|
+
/** Specifies whether the element should be hidden. */
|
|
13
|
+
hidden?: boolean | string;
|
|
14
|
+
/** A unique identifier for the element. */
|
|
15
|
+
id?: string;
|
|
16
|
+
/** Sets the HTML or XML markup contained within the element. */
|
|
17
|
+
innerHTML?: string;
|
|
18
|
+
/** Specifies the language of the element. */
|
|
19
|
+
lang?: string;
|
|
20
|
+
/** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
|
|
21
|
+
part?: string;
|
|
22
|
+
/** Use the ref attribute with a variable to assign a DOM element to the variable once the element is rendered. */
|
|
23
|
+
ref?: unknown | ((e: unknown) => void);
|
|
24
|
+
/** Adds a reference for a custom element slot */
|
|
25
|
+
slot?: string;
|
|
26
|
+
/** Prop for setting inline styles */
|
|
27
|
+
style?: JSX.CSSProperties;
|
|
28
|
+
/** Overrides the default Tab button behavior. Avoid using values other than -1 and 0. */
|
|
29
|
+
tabIndex?: number;
|
|
30
|
+
/** Sets the text content of the element */
|
|
31
|
+
textContent?: string;
|
|
32
|
+
/** Specifies the tooltip text for the element. */
|
|
33
|
+
title?: string;
|
|
34
|
+
/** Passing 'no' excludes the element content from being translated. */
|
|
35
|
+
translate?: "yes" | "no";
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
type BaseEvents = {};
|
|
39
|
+
|
|
40
|
+
type OgdsAccordionProps = {
|
|
41
|
+
/** Adds `role="list"` to the component and `role="listitem"` to each `<details>` child, conveying the accordion as a list to assistive technologies. Mutually exclusive with `heading-level`. */
|
|
42
|
+
"use-list-semantics"?: boolean;
|
|
43
|
+
/** Sets a heading level for each accordion panel by adding `role="heading"` and the corresponding `aria-level` to each `<summary>` element. Has no effect when set to `0` (the default). Mutually exclusive with `use-list-semantics`. */
|
|
44
|
+
"heading-level"?: number;
|
|
45
|
+
/** */
|
|
46
|
+
"bind:detailsChildren"?: HTMLCollectionOf<HTMLDetailsElement> | undefined;
|
|
47
|
+
/** */
|
|
48
|
+
"bind:childRoles"?: Map<HTMLDetailsElement, Set<string>>;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
type OgdsAccordionToggleProps = {
|
|
52
|
+
/** The `id` of the `<ogds-accordion>` to control. Required. */
|
|
53
|
+
controls?: string;
|
|
54
|
+
/** Button label when all panels are collapsed. Defaults to "Expand All". */
|
|
55
|
+
"expand-label"?: string;
|
|
56
|
+
/** Button label when one or more panels are open. Defaults to "Collapse All". */
|
|
57
|
+
"collapse-label"?: string;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
type UsaBannerProps = {
|
|
61
|
+
/** The element's language. */
|
|
62
|
+
lang?: "en" | "es";
|
|
63
|
+
/** The custom aria label users can override. */
|
|
64
|
+
label?: string;
|
|
65
|
+
/** The top level domain for the site. */
|
|
66
|
+
tld?: "gov" | "mil";
|
|
67
|
+
/** */
|
|
68
|
+
flagSrc?: string;
|
|
69
|
+
/** */
|
|
70
|
+
isOpen?: boolean;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
type UsaLinkProps = {
|
|
74
|
+
/** The url for the link */
|
|
75
|
+
href?: string | undefined;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export type CustomElements = {
|
|
79
|
+
/**
|
|
80
|
+
* The ogds-accordion component.
|
|
81
|
+
*
|
|
82
|
+
* Apply these classes to `<ogds-accordion>` to enable variants:
|
|
83
|
+
* - `bordered` — adds a border to expanded content
|
|
84
|
+
* - `with-icon` — shows a chevron icon on each summary
|
|
85
|
+
* - `with-icon plus` — uses plus/minus icons instead of chevrons
|
|
86
|
+
* - `with-icon right` — aligns the icon to the right
|
|
87
|
+
* ---
|
|
88
|
+
*
|
|
89
|
+
*
|
|
90
|
+
* ### **Slots:**
|
|
91
|
+
* - _default_ - The default (only) slot for the <ogds-accordion> expects one or more plain HTML <details> elements.
|
|
92
|
+
*
|
|
93
|
+
* ### **CSS Properties:**
|
|
94
|
+
* - **--ogds-accordion-border** - Border used in the bordered variant. _(default: undefined)_
|
|
95
|
+
* - **--ogds-accordion-content-padding** - Padding for the expanded content area. _(default: undefined)_
|
|
96
|
+
* - **--ogds-accordion-icon-closed** - Icon shown when a panel is closed. Defaults to a chevron pointing down. CSS-only users must set this to a url() value pointing to their own icon asset. _(default: undefined)_
|
|
97
|
+
* - **--ogds-accordion-icon-open** - Icon shown when a panel is open. Defaults to a chevron pointing up. CSS-only users must set this to a url() value pointing to their own icon asset. _(default: undefined)_
|
|
98
|
+
*/
|
|
99
|
+
"ogds-accordion": Partial<OgdsAccordionProps & BaseProps & BaseEvents>;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* A button that expands or collapses all panels in an associated `<ogds-accordion>`.
|
|
103
|
+
* ---
|
|
104
|
+
*
|
|
105
|
+
*
|
|
106
|
+
* ### **CSS Parts:**
|
|
107
|
+
* - **button** - The toggle button.
|
|
108
|
+
*/
|
|
109
|
+
"ogds-accordion-toggle": Partial<OgdsAccordionToggleProps & BaseProps & BaseEvents>;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The usa-banner component.
|
|
113
|
+
* ---
|
|
114
|
+
*
|
|
115
|
+
*
|
|
116
|
+
* ### **Slots:**
|
|
117
|
+
* - **banner-text** - The text for official government website text.
|
|
118
|
+
* - **banner-action** - Action text label "Here's how you know."
|
|
119
|
+
* - **domain-heading** - Heading text for the domain section.
|
|
120
|
+
* - **domain-text** - Body text for domain section.
|
|
121
|
+
* - **https-heading** - Heading for HTTPs section.
|
|
122
|
+
* - **https-text** - Body text for HTTPs section.
|
|
123
|
+
*
|
|
124
|
+
* ### **CSS Properties:**
|
|
125
|
+
* - **--ogds-banner-background-color** - Sets banner background color. _(default: undefined)_
|
|
126
|
+
* - **--ogds-banner-button-close-background-color** - Sets the background color for the close control on smaller viewports. _(default: undefined)_
|
|
127
|
+
* - **--ogds-banner-focus-outline-color** - Sets banner focus outline color. _(default: undefined)_
|
|
128
|
+
* - **--ogds-banner-font-family** - Sets banner font family. _(default: undefined)_
|
|
129
|
+
* - **--ogds-banner-icon-gov-color** - Sets the color for the official government domain icon in the expanded state of the banner. _(default: undefined)_
|
|
130
|
+
* - **--ogds-banner-icon-https-color** - Sets the color for the https icon in the expanded state of the banner. _(default: undefined)_
|
|
131
|
+
* - **--ogds-banner-link-color** - Sets the default link color. _(default: undefined)_
|
|
132
|
+
* - **--ogds-banner-link-hover-color** - Sets the default link color. _(default: undefined)_
|
|
133
|
+
* - **--ogds-banner-text-color** - Sets the default text color. _(default: undefined)_
|
|
134
|
+
*/
|
|
135
|
+
"usa-banner": Partial<UsaBannerProps & BaseProps & BaseEvents>;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* The usa-link component.
|
|
139
|
+
* ---
|
|
140
|
+
*
|
|
141
|
+
*
|
|
142
|
+
* ### **Slots:**
|
|
143
|
+
* - _default_ - This element has a slot
|
|
144
|
+
*
|
|
145
|
+
* ### **CSS Properties:**
|
|
146
|
+
* - **--theme-link-color** - Sets the link color _(default: undefined)_
|
|
147
|
+
* - **--theme-link-visited-color** - Sets the color for visited links _(default: undefined)_
|
|
148
|
+
* - **--theme-link-hover-color** - Sets the hover state link color _(default: undefined)_
|
|
149
|
+
* - **--theme-link-active-color** - Sets the active state link color _(default: undefined)_
|
|
150
|
+
*/
|
|
151
|
+
"usa-link": Partial<UsaLinkProps & BaseProps & BaseEvents>;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
declare namespace svelteHTML {
|
|
155
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
156
|
+
interface IntrinsicElements extends CustomElements {}
|
|
157
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import type { DefineComponent } from "vue";
|
|
2
|
+
|
|
3
|
+
type OgdsAccordionProps = {
|
|
4
|
+
/** Adds `role="list"` to the component and `role="listitem"` to each `<details>` child, conveying the accordion as a list to assistive technologies. Mutually exclusive with `heading-level`. */
|
|
5
|
+
"use-list-semantics"?: boolean;
|
|
6
|
+
/** Sets a heading level for each accordion panel by adding `role="heading"` and the corresponding `aria-level` to each `<summary>` element. Has no effect when set to `0` (the default). Mutually exclusive with `use-list-semantics`. */
|
|
7
|
+
"heading-level"?: number;
|
|
8
|
+
/** */
|
|
9
|
+
detailsChildren?: HTMLCollectionOf<HTMLDetailsElement> | undefined;
|
|
10
|
+
/** */
|
|
11
|
+
childRoles?: Map<HTMLDetailsElement, Set<string>>;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
type OgdsAccordionToggleProps = {
|
|
15
|
+
/** The `id` of the `<ogds-accordion>` to control. Required. */
|
|
16
|
+
controls?: string;
|
|
17
|
+
/** Button label when all panels are collapsed. Defaults to "Expand All". */
|
|
18
|
+
"expand-label"?: string;
|
|
19
|
+
/** Button label when one or more panels are open. Defaults to "Collapse All". */
|
|
20
|
+
"collapse-label"?: string;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
type UsaBannerProps = {
|
|
24
|
+
/** The element's language. */
|
|
25
|
+
lang?: "en" | "es";
|
|
26
|
+
/** The custom aria label users can override. */
|
|
27
|
+
label?: string;
|
|
28
|
+
/** The top level domain for the site. */
|
|
29
|
+
tld?: "gov" | "mil";
|
|
30
|
+
/** */
|
|
31
|
+
flagSrc?: string;
|
|
32
|
+
/** */
|
|
33
|
+
isOpen?: boolean;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
type UsaLinkProps = {
|
|
37
|
+
/** The url for the link */
|
|
38
|
+
href?: string | undefined;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export type CustomElements = {
|
|
42
|
+
/**
|
|
43
|
+
* The ogds-accordion component.
|
|
44
|
+
*
|
|
45
|
+
* Apply these classes to `<ogds-accordion>` to enable variants:
|
|
46
|
+
* - `bordered` — adds a border to expanded content
|
|
47
|
+
* - `with-icon` — shows a chevron icon on each summary
|
|
48
|
+
* - `with-icon plus` — uses plus/minus icons instead of chevrons
|
|
49
|
+
* - `with-icon right` — aligns the icon to the right
|
|
50
|
+
* ---
|
|
51
|
+
*
|
|
52
|
+
*
|
|
53
|
+
* ### **Slots:**
|
|
54
|
+
* - _default_ - The default (only) slot for the <ogds-accordion> expects one or more plain HTML <details> elements.
|
|
55
|
+
*
|
|
56
|
+
* ### **CSS Properties:**
|
|
57
|
+
* - **--ogds-accordion-border** - Border used in the bordered variant. _(default: undefined)_
|
|
58
|
+
* - **--ogds-accordion-content-padding** - Padding for the expanded content area. _(default: undefined)_
|
|
59
|
+
* - **--ogds-accordion-icon-closed** - Icon shown when a panel is closed. Defaults to a chevron pointing down. CSS-only users must set this to a url() value pointing to their own icon asset. _(default: undefined)_
|
|
60
|
+
* - **--ogds-accordion-icon-open** - Icon shown when a panel is open. Defaults to a chevron pointing up. CSS-only users must set this to a url() value pointing to their own icon asset. _(default: undefined)_
|
|
61
|
+
*/
|
|
62
|
+
"ogds-accordion": DefineComponent<OgdsAccordionProps>;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* A button that expands or collapses all panels in an associated `<ogds-accordion>`.
|
|
66
|
+
* ---
|
|
67
|
+
*
|
|
68
|
+
*
|
|
69
|
+
* ### **CSS Parts:**
|
|
70
|
+
* - **button** - The toggle button.
|
|
71
|
+
*/
|
|
72
|
+
"ogds-accordion-toggle": DefineComponent<OgdsAccordionToggleProps>;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The usa-banner component.
|
|
76
|
+
* ---
|
|
77
|
+
*
|
|
78
|
+
*
|
|
79
|
+
* ### **Slots:**
|
|
80
|
+
* - **banner-text** - The text for official government website text.
|
|
81
|
+
* - **banner-action** - Action text label "Here's how you know."
|
|
82
|
+
* - **domain-heading** - Heading text for the domain section.
|
|
83
|
+
* - **domain-text** - Body text for domain section.
|
|
84
|
+
* - **https-heading** - Heading for HTTPs section.
|
|
85
|
+
* - **https-text** - Body text for HTTPs section.
|
|
86
|
+
*
|
|
87
|
+
* ### **CSS Properties:**
|
|
88
|
+
* - **--ogds-banner-background-color** - Sets banner background color. _(default: undefined)_
|
|
89
|
+
* - **--ogds-banner-button-close-background-color** - Sets the background color for the close control on smaller viewports. _(default: undefined)_
|
|
90
|
+
* - **--ogds-banner-focus-outline-color** - Sets banner focus outline color. _(default: undefined)_
|
|
91
|
+
* - **--ogds-banner-font-family** - Sets banner font family. _(default: undefined)_
|
|
92
|
+
* - **--ogds-banner-icon-gov-color** - Sets the color for the official government domain icon in the expanded state of the banner. _(default: undefined)_
|
|
93
|
+
* - **--ogds-banner-icon-https-color** - Sets the color for the https icon in the expanded state of the banner. _(default: undefined)_
|
|
94
|
+
* - **--ogds-banner-link-color** - Sets the default link color. _(default: undefined)_
|
|
95
|
+
* - **--ogds-banner-link-hover-color** - Sets the default link color. _(default: undefined)_
|
|
96
|
+
* - **--ogds-banner-text-color** - Sets the default text color. _(default: undefined)_
|
|
97
|
+
*/
|
|
98
|
+
"usa-banner": DefineComponent<UsaBannerProps>;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* The usa-link component.
|
|
102
|
+
* ---
|
|
103
|
+
*
|
|
104
|
+
*
|
|
105
|
+
* ### **Slots:**
|
|
106
|
+
* - _default_ - This element has a slot
|
|
107
|
+
*
|
|
108
|
+
* ### **CSS Properties:**
|
|
109
|
+
* - **--theme-link-color** - Sets the link color _(default: undefined)_
|
|
110
|
+
* - **--theme-link-visited-color** - Sets the color for visited links _(default: undefined)_
|
|
111
|
+
* - **--theme-link-hover-color** - Sets the hover state link color _(default: undefined)_
|
|
112
|
+
* - **--theme-link-active-color** - Sets the active state link color _(default: undefined)_
|
|
113
|
+
*/
|
|
114
|
+
"usa-link": DefineComponent<UsaLinkProps>;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
declare module "vue" {
|
|
118
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
119
|
+
interface GlobalComponents extends CustomElements {}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
declare global {
|
|
123
|
+
namespace JSX {
|
|
124
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
125
|
+
interface IntrinsicElements extends CustomElements {}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const defineCustomElement: (tag: string, className: CustomElementConstructor) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ogds/elements",
|
|
3
|
+
"version": "1.0.0-alpha.6",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"customElements": "custom-elements.json",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/open-government-design-system/ogds-elements.git"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
".storybook",
|
|
13
|
+
"storybook",
|
|
14
|
+
"build",
|
|
15
|
+
"dist",
|
|
16
|
+
"src"
|
|
17
|
+
],
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"import": "./dist/components/index.js",
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"default": "./dist/components/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./components/*": "./dist/components/*.js",
|
|
28
|
+
"./components/frameworks/react/*": "./dist/components/frameworks/react/*.js",
|
|
29
|
+
"./src/components/*": "./src/components/*/index.js",
|
|
30
|
+
"./core/*": "./src/core/*",
|
|
31
|
+
"./styles/*": "./build/*",
|
|
32
|
+
"./components/ogds-accordion/styles": "./src/components/ogds-accordion/ogds-accordion.css"
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "tsc -p ./config/tsconfig.json && vite build --config ./config/vite.config.ts && npm run manifest:build",
|
|
36
|
+
"build:watch": "vite build --config ./config/vite.config.ts --watch",
|
|
37
|
+
"dev": "vite --config ./config/vite.config.ts",
|
|
38
|
+
"fix-permissions": "sudo chown -R $(id -u):$(id -g) .",
|
|
39
|
+
"pages": "npm run storybook:build && cp -r storybook-static _site",
|
|
40
|
+
"prepare": "husky",
|
|
41
|
+
"prettier:js": "npx prettier --check '**/*.{cjs,css,js,json,jsx,mjs,ts,tsx}' --config ./config/.prettierrc",
|
|
42
|
+
"prettier:js:fix": "npx prettier --write '**/*.{cjs,css,js,json,jsx,mjs,ts,tsx}' --config ./config/.prettierrc",
|
|
43
|
+
"prettier:md": "npx prettier --check '**/*.{md,mdx}' --config ./config/.prettierrc",
|
|
44
|
+
"prettier:md:fix": "npx prettier --write '**/*.{md,mdx}' --config ./config/.prettierrc",
|
|
45
|
+
"start": "npm run storybook & npm run manifest:watch",
|
|
46
|
+
"storybook:build": "storybook build",
|
|
47
|
+
"storybook": "storybook dev -p 8008",
|
|
48
|
+
"prestorybook:serve": "npm run storybook:build --quiet",
|
|
49
|
+
"storybook:serve": "node ./internals/scripts/serve-storybook.js",
|
|
50
|
+
"stylelint": "stylelint './src/components/**/*.{css,css.js,css.ts}' --config=./config/stylelint.config.mjs",
|
|
51
|
+
"stylelint:fix": "stylelint './src/components/**/*.{css,css.js,css.ts}' --fix --config=./config/stylelint.config.mjs",
|
|
52
|
+
"manifest:build": "npx cem analyze --config ./config/custom-elements-manifest.config.js",
|
|
53
|
+
"manifest:watch": "npx cem analyze --config ./config/custom-elements-manifest.config.js --watch --dev",
|
|
54
|
+
"release": "npm run build && changeset publish",
|
|
55
|
+
"test": "vitest --config ./config/vitest.config.js",
|
|
56
|
+
"test:ci": "vitest run --config ./config/vitest.config.js",
|
|
57
|
+
"test:storybook:ci": "concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"npm run storybook:serve\" \"wait-on tcp:127.0.0.1:3000 && npx test-storybook --url http://localhost:3000\"",
|
|
58
|
+
"vite:preview": "vite preview --config ./config/vite.config.ts"
|
|
59
|
+
},
|
|
60
|
+
"dependencies": {
|
|
61
|
+
"@ogds/tokens": "^1.0.0-alpha.2",
|
|
62
|
+
"@uswds/uswds": "^3.13.0",
|
|
63
|
+
"lit": "^3.3.2",
|
|
64
|
+
"sass": "^1.97.3"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@changesets/cli": "^2.29.8",
|
|
68
|
+
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
69
|
+
"@eslint/css": "^1.1.0",
|
|
70
|
+
"@eslint/js": "^10.0.1",
|
|
71
|
+
"@playwright/test": "^1.58.2",
|
|
72
|
+
"@storybook/addon-a11y": "^10.2.10",
|
|
73
|
+
"@storybook/addon-docs": "^10.2.10",
|
|
74
|
+
"@storybook/addon-links": "^10.2.10",
|
|
75
|
+
"@storybook/test-runner": "^0.24.2",
|
|
76
|
+
"@storybook/web-components-vite": "^10.2.10",
|
|
77
|
+
"@types/express": "^5.0.6",
|
|
78
|
+
"@types/node": "^25.3.3",
|
|
79
|
+
"@types/serve-static": "^2.2.0",
|
|
80
|
+
"@vitest/eslint-plugin": "^1.6.10",
|
|
81
|
+
"@vitest/ui": "^4.0.18",
|
|
82
|
+
"@wc-toolkit/storybook-helpers": "^10.2.0",
|
|
83
|
+
"axe-playwright": "^2.2.2",
|
|
84
|
+
"browserslist": "^4.28.1",
|
|
85
|
+
"concurrently": "^9.2.1",
|
|
86
|
+
"custom-element-jsx-integration": "^1.6.0",
|
|
87
|
+
"custom-element-react-wrappers": "^1.7.3",
|
|
88
|
+
"custom-element-solidjs-integration": "^1.9.0",
|
|
89
|
+
"custom-element-svelte-integration": "^1.2.0",
|
|
90
|
+
"custom-element-vuejs-integration": "^1.4.0",
|
|
91
|
+
"custom-elements-manifest": "^2.1.0",
|
|
92
|
+
"eslint": "^10.0.3",
|
|
93
|
+
"eslint-config-prettier": "^10.1.8",
|
|
94
|
+
"eslint-plugin-storybook": "10.2.10",
|
|
95
|
+
"express": "^5.2.1",
|
|
96
|
+
"husky": "^9.1.7",
|
|
97
|
+
"jsdom": "^28.1.0",
|
|
98
|
+
"lightningcss": "^1.31.1",
|
|
99
|
+
"prettier": "^3.8.1",
|
|
100
|
+
"serve-static": "^2.2.1",
|
|
101
|
+
"shadow-dom-testing-library": "^1.13.1",
|
|
102
|
+
"storybook": "^10.0.7",
|
|
103
|
+
"storybook-addon-tag-badges": "^3.0.6",
|
|
104
|
+
"stylelint": "^17.4.0",
|
|
105
|
+
"stylelint-config-standard": "^40.0.0",
|
|
106
|
+
"stylelint-order": "^8.0.0",
|
|
107
|
+
"typescript": "^5.9.3",
|
|
108
|
+
"vite": "^7.3.1",
|
|
109
|
+
"vite-plugin-bundlesize": "^0.3.0",
|
|
110
|
+
"vite-plugin-dts": "^4.5.4",
|
|
111
|
+
"vite-plugin-lit-css": "^2.2.2",
|
|
112
|
+
"vitest": "^4.0.8",
|
|
113
|
+
"wait-on": "^9.0.4",
|
|
114
|
+
"web-vitals": "^5.1.0"
|
|
115
|
+
},
|
|
116
|
+
"optionalDependencies": {
|
|
117
|
+
"@rollup/rollup-linux-x64-gnu": "^4.59.0"
|
|
118
|
+
}
|
|
119
|
+
}
|