dap-design-system 0.10.0 → 0.10.1

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/README.md CHANGED
@@ -1 +1,59 @@
1
- # DAP Design System
1
+ # Welcome to the DÁP design system component library
2
+
3
+ This web component library is designed to be used with any frontend framework and is based on custom webcomponents with [litJS](https://lit.dev/).
4
+
5
+ [Documentation](https://services.gov.hu/design-system-dev/)
6
+
7
+ ## Quick start
8
+
9
+ To get started with the DÁP Design System, follow these steps:
10
+
11
+ Install the library using your preferred package manager or load it directly from a CDN:
12
+
13
+ Package manager [(npm)](https://www.npmjs.com/package/dap-design-system)
14
+
15
+ ```bash
16
+ npm install dap-design-system
17
+
18
+ yarn add dap-design-system
19
+
20
+ pnpm add dap-design-system
21
+ ```
22
+
23
+ CDN
24
+
25
+ ```html
26
+ <script type="module" src="https://cdn.jsdelivr.net/npm/dap-design-system" />
27
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dap-design-system/dist/light.theme.css" />
28
+ ```
29
+
30
+ Start using the components in your application:
31
+
32
+ ```jsx
33
+ <dap-ds-button>My first button!</dap-ds-button>
34
+ ```
35
+
36
+ That's it! You're now ready to start building beautiful web applications with the DÁP Design System Component Library.
37
+
38
+ ## Benefits of web components
39
+
40
+ Web components are a set of web platform APIs that allow you to create new custom, reusable, encapsulated HTML tags to use in web pages and web apps. Custom components and widgets build on the Web Component standards, will work across modern browsers, and can be used with any JavaScript library or framework that works with HTML.
41
+
42
+ [Custom elements](https://html.spec.whatwg.org/multipage/custom-elements.html) in HTML are a way to define your own elements along with their behavior. You can use custom elements to create reusable components that can be used in web pages and web apps.
43
+ Read more about web components [here](https://developer.mozilla.org/en-US/docs/Web/Web_Components).
44
+
45
+ Web components are supported by all modern browsers, including Chrome, Firefox, Safari, and Edge. For more information on browser support, see [Can I Use](https://caniuse.com/custom-elementsv1).
46
+
47
+ ## Architecture
48
+
49
+ The DÁP Design System Component Library is built using the following technologies and libraries:
50
+
51
+ - Components are built with [litJS](https://lit.dev/)
52
+ - Component metadata is generated by the [Custom Elements Manifest Analyzer](https://github.com/open-wc/custom-elements-manifest)
53
+ - Icons are from the [Remix icons](https://remixicon.com/) library
54
+ - Positioning of dropdowns, tooltips is handled by [Floating UI](https://floating-ui.com/)
55
+ - CDN hosting is provided by [jsDelivr](https://www.jsdelivr.com/)
56
+ - Development and production tooling is provided by [Vite](https://vitejs.dev/)
57
+ - [Storybook](https://storybook.js.org/) is used for component development and documentation
58
+ - [Sass](https://sass-lang.com/) CSS preprocessor is used for styling
59
+ - No styling framework is used, all styles are custom
package/dist/dds.d.ts CHANGED
@@ -877,6 +877,7 @@ export declare class DapDSCalendar extends DdsElement {
877
877
  isDateInAllowedRange(date: Dayjs): boolean;
878
878
  isMonthInAllowedRange(year: number, month: number): boolean;
879
879
  isDateInAllowedRangeByDate(year: number, month: number, date: number): boolean;
880
+ getAllowedMonths(currentDate: Dayjs): string[];
880
881
  setMonth(month: number): void;
881
882
  setDay(day: number): void;
882
883
  setYear(year: number): void;
@@ -1921,6 +1922,7 @@ export declare class DapDSOptionList extends DapDSOptionList_base {
1921
1922
  options?: any[];
1922
1923
  queryTimeout: number | undefined;
1923
1924
  queryString: string;
1925
+ firstLoad: boolean;
1924
1926
  private currentOption;
1925
1927
  selectedIndex: number;
1926
1928
  private optionEls;
@@ -2185,6 +2187,7 @@ export declare class DapDSRadioGroup extends GenericFormElement {
2185
2187
  * @attribute {string} description - The description of the search.
2186
2188
  * @attribute {string} tooltip - The tooltip of the search.
2187
2189
  * @attribute {'sm' | 'lg'} size - The size of the search. Default is 'md'.
2190
+ * @attribute {'none' | 'typehead' | 'autocomplete' | 'manual'} searchMode - The search mode of the select.
2188
2191
  * @attribute {boolean} disabled - Whether the search is disabled.
2189
2192
  * @attribute {boolean} required - Whether the search is required.
2190
2193
  * @attribute {boolean} readonly - Whether the search is readonly.
@@ -2196,7 +2199,6 @@ export declare class DapDSRadioGroup extends GenericFormElement {
2196
2199
  * @attribute {boolean} allowManualInput - Whether the search allows manual input, or free text.
2197
2200
  * @attribute {boolean} searchForText - Whether the search should search for the selected item text.
2198
2201
  * @attribute {boolean} noTextComplete - Whether the search should not complete the text.
2199
- * @attribute {'none' | 'typehead' | 'autocomplete' | 'manual'} searchMode - The search mode of the select.
2200
2202
  * @attribute {string} searchButtonAriaLabel - The aria label of the search button.
2201
2203
  * @attribute {boolean} openOnEmpty - Whether the search should open on empty results.
2202
2204
  *
@@ -2422,7 +2424,7 @@ export declare class DapDSSwitch extends LabelPositionedFormElement {
2422
2424
  * @attribute {boolean} disabled - The disabled state of the tab.
2423
2425
  *
2424
2426
  * @slot - The tab title template.
2425
- * @slot content - The tab content. When KeepContent attribute is not set on dap-ds-tab-group component, then the content must be put inside the html template element with slot="content".
2427
+ * @slot content - The tab content.
2426
2428
  *
2427
2429
  * @csspart base - The main tab content container.
2428
2430
  */
@@ -2431,11 +2433,7 @@ export declare class DapDSTab extends DdsElement {
2431
2433
  tabId: string;
2432
2434
  disabled: boolean;
2433
2435
  private _selected;
2434
- private _contentTemplate;
2435
- connectedCallback(): void;
2436
- handleContentSlotChange(_event: Event): void;
2437
- removeContent(): void;
2438
- appendContent(): void;
2436
+ firstUpdated(): void;
2439
2437
  render(): TemplateResult_2<1>;
2440
2438
  }
2441
2439
 
@@ -2459,18 +2457,19 @@ export declare class DapDSTab extends DdsElement {
2459
2457
  * @csspart tab-content - The tab content container.
2460
2458
  */
2461
2459
  export declare class DapDSTabGroup extends DdsElement {
2460
+ defaultSlot: HTMLSlotElement;
2462
2461
  static styles: CSSResult;
2463
2462
  selectedTabId: string;
2464
2463
  size: CommonSize;
2465
- keepContent: boolean;
2466
2464
  mobile: boolean;
2467
2465
  tabNavElements: HTMLElement[];
2466
+ private _tabElements;
2468
2467
  private _tabNavItems;
2469
2468
  private _activeTabIds;
2470
2469
  private _initialEmit;
2471
2470
  emitTabSelect(tabId: string): void;
2472
2471
  attributeChangedCallback(name: string, oldValue: string | null, value: string | null): void;
2473
- handleSlotChange(event: Event): void;
2472
+ protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
2474
2473
  handleClick(tabId: string | null): void;
2475
2474
  handleKeyDown(event: KeyboardEvent): void;
2476
2475
  render(): TemplateResult_2<1>;