@ucalgary-design-system/core 1.0.5 → 1.0.7

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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # @ucalgary-design-system/core
2
2
 
3
+ ## 1.0.7
4
+
5
+ ### Patch Changes
6
+
7
+ - 148b308: Added base styles to Core package.
8
+
9
+ ## 1.0.6
10
+
11
+ ### Patch Changes
12
+
13
+ - 66ac9d0: Added the missing serif font file
14
+ - 51904ca: Search input component added
15
+ - All components updated to include Search input component (minor).
16
+ - Core updated with new visually-hidden mixin (patch).
17
+ - Search input component added (patch).
18
+
3
19
  ## 1.0.5
4
20
 
5
21
  ### Patch Changes
package/README.md CHANGED
@@ -1,33 +1,55 @@
1
1
  # Core
2
2
 
3
- This package provides general assets and styles for UCDS web components. It also includes the **BaseElement** web component that all UCDS web components extend.
3
+ The Core package provides the foundation for all UCDS web components.
4
+ It includes:
4
5
 
5
- ## Installation
6
+ * **BaseElement** — the base class extended by all UCDS components.
7
+ * **Base styles** — global UCalgary Design System styles for standard HTML elements.
8
+ * **Token injector** — a utility that ensures design tokens are available wherever UCDS components are used.
6
9
 
7
- Install the component using npm:
10
+ ## Installation
8
11
 
9
12
  ```sh
10
- npm install @ucalgary-design-system/button
13
+ npm install @ucalgary-design-system/core
11
14
  ```
12
15
 
13
16
  ## Usage
14
17
 
15
- Import the component into your application:
18
+ ### Extending BaseElement
19
+
20
+ When creating a new component, always extend `BaseElement`:
16
21
 
17
22
  ```ts
18
- import '@ucalgary-design-system/core';
23
+ import { BaseElement } from '@ucalgary-design-system/core';
24
+ import { customElement } from 'lit/decorators.js';
25
+
26
+ @customElement('ucds-my-component')
27
+ export class MyComponent extends BaseElement {}
19
28
  ```
20
29
 
21
- When creating a new component, ensure that it extends the BaseElement.
22
- For example:
30
+ This ensures consistent lifecycle behavior and integration with UCDS utilities.
31
+
32
+ ### Token injector
33
+
34
+ All generated UCDS components automatically include the token injector in their entry file.
35
+ This means **you do not need to call it manually** when consuming components from the library.
36
+
37
+ You might only need to call it directly if:
38
+
39
+ * You are building a custom component outside of the generator.
40
+ * You want global tokens available in a project without using UCDS components.
41
+
23
42
  ```ts
24
- @customElement('ucds-my-component')
25
- export class MyComponent extends BaseElement { }
43
+ import { injectGlobalTokens } from '@ucalgary-design-system/core';
44
+
45
+ injectGlobalTokens();
26
46
  ```
27
47
 
48
+ > 💡 In most cases, you can ignore this. The injector runs automatically when you use UCDS components.
49
+
28
50
  ## Development
29
51
 
30
- Build the component:
52
+ Build the package locally:
31
53
 
32
54
  ```sh
33
55
  npm run build