@bccampus/ui-components 0.5.0 → 0.5.2

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.
Files changed (31) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/.yarn/releases/yarn-4.10.3.cjs +942 -0
  3. package/.yarnrc.yml +3 -0
  4. package/dist/_chunks/createLucideIcon.js +0 -24
  5. package/dist/_chunks/index.js +16 -38
  6. package/dist/_chunks/index3.js +26 -520
  7. package/dist/_chunks/index4.js +615 -0
  8. package/dist/_chunks/utils.js +199 -143
  9. package/dist/components/index.js +2 -2
  10. package/dist/components/ui/banner.js +0 -6
  11. package/dist/components/ui/composite/CompositeData.js +1 -1
  12. package/dist/components/ui/composite/CompositeDataItem.js +109 -3
  13. package/dist/components/ui/composite/FocusProvider/AbstractFocusProvider.js +2 -1
  14. package/dist/components/ui/composite/SelectionProvider/AbstractSelectionProvider.js +2 -1
  15. package/dist/components/ui/composite/SelectionProvider/MultipleSelectionProvider.js +1 -1
  16. package/dist/components/ui/composite/SelectionProvider/SingleSelectionProvider.js +1 -1
  17. package/dist/components/ui/composite/composite-component-item.js +2 -24
  18. package/dist/components/ui/composite/index.d.ts +1 -0
  19. package/dist/components/ui/composite/index.js +2 -2
  20. package/dist/components/ui/composite/listbox.js +1 -0
  21. package/dist/components/ui/horizontal-list.js +0 -12
  22. package/dist/components/ui/navigation-menu.js +86 -10
  23. package/dist/components/ui/popover.js +85 -3
  24. package/dist/components/ui/search-input.js +0 -6
  25. package/package.json +75 -67
  26. package/src/App.tsx +44 -14
  27. package/src/components/ui/composite/index.ts +2 -1
  28. package/src/components/ui/page-header.tsx +6 -9
  29. package/src/main.tsx +12 -12
  30. package/vite.config.ts +6 -2
  31. package/dist/_chunks/CompositeDataItem.js +0 -204
@@ -1,4 +1,4 @@
1
- import { C as CompositeDataItem } from "../../../../_chunks/CompositeDataItem.js";
1
+ import { CompositeDataItem } from "../CompositeDataItem.js";
2
2
  import { AbstractSelectionProvider } from "./AbstractSelectionProvider.js";
3
3
  import { union, difference } from "../../../../lib/set-operations.js";
4
4
  class MultipleSelectionProvider extends AbstractSelectionProvider {
@@ -1,4 +1,4 @@
1
- import { C as CompositeDataItem } from "../../../../_chunks/CompositeDataItem.js";
1
+ import { CompositeDataItem } from "../CompositeDataItem.js";
2
2
  import { AbstractSelectionProvider } from "./AbstractSelectionProvider.js";
3
3
  import { difference } from "../../../../lib/set-operations.js";
4
4
  class SingleSelectionProvider extends AbstractSelectionProvider {
@@ -1,28 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { useRef, useCallback, useSyncExternalStore, useMemo } from "react";
3
- function listenKeys($store, keys, listener) {
4
- let keysSet = new Set(keys).add(void 0);
5
- return $store.listen((value, oldValue, changed) => {
6
- if (keysSet.has(changed)) {
7
- listener(value, oldValue, changed);
8
- }
9
- });
10
- }
11
- let emit = (snapshotRef, onChange) => (value) => {
12
- if (snapshotRef.current === value) return;
13
- snapshotRef.current = value;
14
- onChange();
15
- };
16
- function useStore(store, { keys, deps = [store, keys] } = {}) {
17
- let snapshotRef = useRef();
18
- snapshotRef.current = store.get();
19
- let subscribe = useCallback((onChange) => {
20
- emit(snapshotRef, onChange)(store.value);
21
- return keys?.length > 0 ? listenKeys(store, keys, emit(snapshotRef, onChange)) : store.listen(emit(snapshotRef, onChange));
22
- }, deps);
23
- let get = () => snapshotRef.current;
24
- return useSyncExternalStore(subscribe, get, get);
25
- }
2
+ import { useMemo } from "react";
3
+ import { useStore } from "@nanostores/react";
26
4
  function CompositeComponentItem({
27
5
  id,
28
6
  className,
@@ -5,3 +5,4 @@ export * from './SelectionProvider';
5
5
  export * from './composite-component.tsx';
6
6
  export * from './composite-component-item.tsx';
7
7
  export * from './listbox.tsx';
8
+ export type * from './types';
@@ -1,5 +1,5 @@
1
1
  import { CompositeData } from "./CompositeData.js";
2
- import { C } from "../../../_chunks/CompositeDataItem.js";
2
+ import { CompositeDataItem } from "./CompositeDataItem.js";
3
3
  import { AbstractFocusProvider } from "./FocusProvider/AbstractFocusProvider.js";
4
4
  import { ListboxFocusProvider } from "./FocusProvider/ListboxFocusProvider.js";
5
5
  import { AbstractSelectionProvider } from "./SelectionProvider/AbstractSelectionProvider.js";
@@ -14,7 +14,7 @@ export {
14
14
  CompositeComponent,
15
15
  CompositeComponentItem,
16
16
  CompositeData,
17
- C as CompositeDataItem,
17
+ CompositeDataItem,
18
18
  Listbox,
19
19
  ListboxFocusProvider,
20
20
  MultipleSelectionProvider,
@@ -1,6 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { CompositeComponent } from "./composite-component.js";
3
3
  import { useRef, useCallback } from "react";
4
+ import "nanostores";
4
5
  import { useKeyboardEvent } from "../../../hooks/use-keyboard-event.js";
5
6
  function Listbox({ data, ...props }) {
6
7
  const compositeRef = useRef(null);
@@ -4,20 +4,8 @@ import { Button } from "./button.js";
4
4
  import { useRef, useCallback } from "react";
5
5
  import { c as cva } from "../../_chunks/index2.js";
6
6
  import { c as createLucideIcon } from "../../_chunks/createLucideIcon.js";
7
- /**
8
- * @license lucide-react v0.544.0 - ISC
9
- *
10
- * This source code is licensed under the ISC license.
11
- * See the LICENSE file in the root directory of this source tree.
12
- */
13
7
  const __iconNode$1 = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
14
8
  const ChevronLeft = createLucideIcon("chevron-left", __iconNode$1);
15
- /**
16
- * @license lucide-react v0.544.0 - ISC
17
- *
18
- * This source code is licensed under the ISC license.
19
- * See the LICENSE file in the root directory of this source tree.
20
- */
21
9
  const __iconNode = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
22
10
  const ChevronRight = createLucideIcon("chevron-right", __iconNode);
23
11
  const horizontalListVariants = cva(
@@ -2,17 +2,11 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import React__default from "react";
4
4
  import ReactDOM__default from "react-dom";
5
- import { c as createContextScope, P as Primitive, u as useControllableState, a as useId, b as Presence, d as composeEventHandlers, e as useCallbackRef, D as DismissableLayer, f as useLayoutEffect2, g as dispatchDiscreteCustomEvent } from "../../_chunks/index3.js";
6
- import { u as useComposedRefs, c as createSlot, a as composeRefs } from "../../_chunks/index.js";
5
+ import { c as createContextScope, P as Primitive, u as useControllableState, a as useId, b as Presence, d as composeEventHandlers, e as useCallbackRef, D as DismissableLayer, f as useLayoutEffect2, g as dispatchDiscreteCustomEvent } from "../../_chunks/index4.js";
6
+ import { c as composeRefs, u as useComposedRefs } from "../../_chunks/index3.js";
7
7
  import { c as cn } from "../../_chunks/utils.js";
8
8
  import { buttonVariants } from "./button.js";
9
9
  import { c as createLucideIcon } from "../../_chunks/createLucideIcon.js";
10
- /**
11
- * @license lucide-react v0.544.0 - ISC
12
- *
13
- * This source code is licensed under the ISC license.
14
- * See the LICENSE file in the root directory of this source tree.
15
- */
16
10
  const __iconNode = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
17
11
  const ChevronDown = createLucideIcon("chevron-down", __iconNode);
18
12
  var DirectionContext = React.createContext(void 0);
@@ -20,6 +14,88 @@ function useDirection(localDir) {
20
14
  const globalDir = React.useContext(DirectionContext);
21
15
  return localDir || globalDir || "ltr";
22
16
  }
17
+ // @__NO_SIDE_EFFECTS__
18
+ function createSlot(ownerName) {
19
+ const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
20
+ const Slot2 = React.forwardRef((props, forwardedRef) => {
21
+ const { children, ...slotProps } = props;
22
+ const childrenArray = React.Children.toArray(children);
23
+ const slottable = childrenArray.find(isSlottable);
24
+ if (slottable) {
25
+ const newElement = slottable.props.children;
26
+ const newChildren = childrenArray.map((child) => {
27
+ if (child === slottable) {
28
+ if (React.Children.count(newElement) > 1) return React.Children.only(null);
29
+ return React.isValidElement(newElement) ? newElement.props.children : null;
30
+ } else {
31
+ return child;
32
+ }
33
+ });
34
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
35
+ }
36
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
37
+ });
38
+ Slot2.displayName = `${ownerName}.Slot`;
39
+ return Slot2;
40
+ }
41
+ // @__NO_SIDE_EFFECTS__
42
+ function createSlotClone(ownerName) {
43
+ const SlotClone = React.forwardRef((props, forwardedRef) => {
44
+ const { children, ...slotProps } = props;
45
+ if (React.isValidElement(children)) {
46
+ const childrenRef = getElementRef(children);
47
+ const props2 = mergeProps(slotProps, children.props);
48
+ if (children.type !== React.Fragment) {
49
+ props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
50
+ }
51
+ return React.cloneElement(children, props2);
52
+ }
53
+ return React.Children.count(children) > 1 ? React.Children.only(null) : null;
54
+ });
55
+ SlotClone.displayName = `${ownerName}.SlotClone`;
56
+ return SlotClone;
57
+ }
58
+ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
59
+ function isSlottable(child) {
60
+ return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
61
+ }
62
+ function mergeProps(slotProps, childProps) {
63
+ const overrideProps = { ...childProps };
64
+ for (const propName in childProps) {
65
+ const slotPropValue = slotProps[propName];
66
+ const childPropValue = childProps[propName];
67
+ const isHandler = /^on[A-Z]/.test(propName);
68
+ if (isHandler) {
69
+ if (slotPropValue && childPropValue) {
70
+ overrideProps[propName] = (...args) => {
71
+ const result = childPropValue(...args);
72
+ slotPropValue(...args);
73
+ return result;
74
+ };
75
+ } else if (slotPropValue) {
76
+ overrideProps[propName] = slotPropValue;
77
+ }
78
+ } else if (propName === "style") {
79
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
80
+ } else if (propName === "className") {
81
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
82
+ }
83
+ }
84
+ return { ...slotProps, ...overrideProps };
85
+ }
86
+ function getElementRef(element) {
87
+ let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
88
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
89
+ if (mayWarn) {
90
+ return element.ref;
91
+ }
92
+ getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
93
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
94
+ if (mayWarn) {
95
+ return element.props.ref;
96
+ }
97
+ return element.props.ref || element.ref;
98
+ }
23
99
  function createCollection(name) {
24
100
  const PROVIDER_NAME = name + "CollectionProvider";
25
101
  const [createCollectionContext, createCollectionScope2] = createContextScope(PROVIDER_NAME);
@@ -35,7 +111,7 @@ function createCollection(name) {
35
111
  };
36
112
  CollectionProvider.displayName = PROVIDER_NAME;
37
113
  const COLLECTION_SLOT_NAME = name + "CollectionSlot";
38
- const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
114
+ const CollectionSlotImpl = /* @__PURE__ */ createSlot(COLLECTION_SLOT_NAME);
39
115
  const CollectionSlot = React__default.forwardRef(
40
116
  (props, forwardedRef) => {
41
117
  const { scope, children } = props;
@@ -47,7 +123,7 @@ function createCollection(name) {
47
123
  CollectionSlot.displayName = COLLECTION_SLOT_NAME;
48
124
  const ITEM_SLOT_NAME = name + "CollectionItemSlot";
49
125
  const ITEM_DATA_ATTR = "data-radix-collection-item";
50
- const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);
126
+ const CollectionItemSlotImpl = /* @__PURE__ */ createSlot(ITEM_SLOT_NAME);
51
127
  const CollectionItemSlot = React__default.forwardRef(
52
128
  (props, forwardedRef) => {
53
129
  const { scope, children, ...itemData } = props;
@@ -1,8 +1,8 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import { useLayoutEffect, useState } from "react";
4
- import { e as useCallbackRef$1, P as Primitive, f as useLayoutEffect2, c as createContextScope, u as useControllableState, a as useId, d as composeEventHandlers, b as Presence, D as DismissableLayer } from "../../_chunks/index3.js";
5
- import { u as useComposedRefs, c as createSlot } from "../../_chunks/index.js";
4
+ import { e as useCallbackRef$1, P as Primitive, f as useLayoutEffect2, c as createContextScope, u as useControllableState, a as useId, d as composeEventHandlers, b as Presence, D as DismissableLayer } from "../../_chunks/index4.js";
5
+ import { u as useComposedRefs, c as composeRefs } from "../../_chunks/index3.js";
6
6
  import * as ReactDOM from "react-dom";
7
7
  import ReactDOM__default from "react-dom";
8
8
  import { c as cn } from "../../_chunks/utils.js";
@@ -2437,6 +2437,88 @@ var Portal$1 = React.forwardRef((props, forwardedRef) => {
2437
2437
  return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
2438
2438
  });
2439
2439
  Portal$1.displayName = PORTAL_NAME$1;
2440
+ // @__NO_SIDE_EFFECTS__
2441
+ function createSlot(ownerName) {
2442
+ const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
2443
+ const Slot2 = React.forwardRef((props, forwardedRef) => {
2444
+ const { children, ...slotProps } = props;
2445
+ const childrenArray = React.Children.toArray(children);
2446
+ const slottable = childrenArray.find(isSlottable);
2447
+ if (slottable) {
2448
+ const newElement = slottable.props.children;
2449
+ const newChildren = childrenArray.map((child) => {
2450
+ if (child === slottable) {
2451
+ if (React.Children.count(newElement) > 1) return React.Children.only(null);
2452
+ return React.isValidElement(newElement) ? newElement.props.children : null;
2453
+ } else {
2454
+ return child;
2455
+ }
2456
+ });
2457
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
2458
+ }
2459
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
2460
+ });
2461
+ Slot2.displayName = `${ownerName}.Slot`;
2462
+ return Slot2;
2463
+ }
2464
+ // @__NO_SIDE_EFFECTS__
2465
+ function createSlotClone(ownerName) {
2466
+ const SlotClone = React.forwardRef((props, forwardedRef) => {
2467
+ const { children, ...slotProps } = props;
2468
+ if (React.isValidElement(children)) {
2469
+ const childrenRef = getElementRef(children);
2470
+ const props2 = mergeProps(slotProps, children.props);
2471
+ if (children.type !== React.Fragment) {
2472
+ props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
2473
+ }
2474
+ return React.cloneElement(children, props2);
2475
+ }
2476
+ return React.Children.count(children) > 1 ? React.Children.only(null) : null;
2477
+ });
2478
+ SlotClone.displayName = `${ownerName}.SlotClone`;
2479
+ return SlotClone;
2480
+ }
2481
+ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
2482
+ function isSlottable(child) {
2483
+ return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
2484
+ }
2485
+ function mergeProps(slotProps, childProps) {
2486
+ const overrideProps = { ...childProps };
2487
+ for (const propName in childProps) {
2488
+ const slotPropValue = slotProps[propName];
2489
+ const childPropValue = childProps[propName];
2490
+ const isHandler = /^on[A-Z]/.test(propName);
2491
+ if (isHandler) {
2492
+ if (slotPropValue && childPropValue) {
2493
+ overrideProps[propName] = (...args) => {
2494
+ const result = childPropValue(...args);
2495
+ slotPropValue(...args);
2496
+ return result;
2497
+ };
2498
+ } else if (slotPropValue) {
2499
+ overrideProps[propName] = slotPropValue;
2500
+ }
2501
+ } else if (propName === "style") {
2502
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
2503
+ } else if (propName === "className") {
2504
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
2505
+ }
2506
+ }
2507
+ return { ...slotProps, ...overrideProps };
2508
+ }
2509
+ function getElementRef(element) {
2510
+ let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
2511
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
2512
+ if (mayWarn) {
2513
+ return element.ref;
2514
+ }
2515
+ getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
2516
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
2517
+ if (mayWarn) {
2518
+ return element.props.ref;
2519
+ }
2520
+ return element.props.ref || element.ref;
2521
+ }
2440
2522
  var getDefaultParent = function(originalTarget) {
2441
2523
  if (typeof document === "undefined") {
2442
2524
  return null;
@@ -3311,7 +3393,7 @@ var PopoverContent$1 = React.forwardRef(
3311
3393
  }
3312
3394
  );
3313
3395
  PopoverContent$1.displayName = CONTENT_NAME;
3314
- var Slot = createSlot("PopoverContent.RemoveScroll");
3396
+ var Slot = /* @__PURE__ */ createSlot("PopoverContent.RemoveScroll");
3315
3397
  var PopoverContentModal = React.forwardRef(
3316
3398
  (props, forwardedRef) => {
3317
3399
  const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);
@@ -2,12 +2,6 @@ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { c as cn } from "../../_chunks/utils.js";
3
3
  import { Input } from "./input.js";
4
4
  import { c as createLucideIcon } from "../../_chunks/createLucideIcon.js";
5
- /**
6
- * @license lucide-react v0.544.0 - ISC
7
- *
8
- * This source code is licensed under the ISC license.
9
- * See the LICENSE file in the root directory of this source tree.
10
- */
11
5
  const __iconNode = [
12
6
  ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
13
7
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
package/package.json CHANGED
@@ -1,67 +1,75 @@
1
- {
2
- "name": "@bccampus/ui-components",
3
- "version": "0.5.0",
4
- "type": "module",
5
- "packageManager": "yarn@4.10.3",
6
- "exports": {
7
- ".": {
8
- "types": "./dist/components/index.d.ts",
9
- "import": "./dist/components/index.js"
10
- },
11
- "./hooks": {
12
- "types": "./dist/hooks/index.d.ts",
13
- "import": "./dist/hooks/index.js"
14
- },
15
- "./utils": {
16
- "types": "./dist/lib/index.d.ts",
17
- "import": "./dist/lib/index.js"
18
- },
19
- "./all.css": "./src/styles/all.css",
20
- "./colors.css": "./src/styles/colors.css",
21
- "./fonts.css": "./src/styles/fonts.css",
22
- "./theme.css": "./src/styles/theme.css",
23
- "./typography.css": "./src/styles/typography.css"
24
- },
25
- "scripts": {
26
- "dev": "vite",
27
- "build": "tsc -b && vite build",
28
- "lint": "eslint .",
29
- "preview": "vite preview"
30
- },
31
- "dependencies": {
32
- "@bccampus/media-kit": "^0.1.1",
33
- "@bcgov/bc-sans": "^2.1.0",
34
- "@fontsource-variable/inter-tight": "^5.2.7",
35
- "@ladle/react": "^5.0.3",
36
- "@nanostores/react": "^1.0.0",
37
- "@radix-ui/react-navigation-menu": "^1.2.14",
38
- "@radix-ui/react-popover": "^1.1.15",
39
- "@radix-ui/react-slot": "^1.2.3",
40
- "class-variance-authority": "^0.7.1",
41
- "clsx": "^2.1.1",
42
- "lucide-react": "^0.544.0",
43
- "nanostores": "^1.0.1",
44
- "react": "^19.1.1",
45
- "react-dom": "^19.1.1",
46
- "tailwind-merge": "^3.3.1",
47
- "tailwindcss": "^4.1.13",
48
- "tw-animate-css": "^1.3.8"
49
- },
50
- "devDependencies": {
51
- "@eslint/js": "^9.35.0",
52
- "@tailwindcss/vite": "^4.1.13",
53
- "@types/node": "^24.5.2",
54
- "@types/react": "^19.1.13",
55
- "@types/react-dom": "^19.1.9",
56
- "@vitejs/plugin-react-swc": "^4.0.1",
57
- "eslint": "^9.35.0",
58
- "eslint-plugin-react-hooks": "^5.2.0",
59
- "eslint-plugin-react-refresh": "^0.4.20",
60
- "glob": "^13.0.0",
61
- "globals": "^16.4.0",
62
- "typescript": "~5.8.3",
63
- "typescript-eslint": "^8.43.0",
64
- "vite": "^7.1.6",
65
- "vite-plugin-dts": "^4.5.4"
66
- }
67
- }
1
+ {
2
+ "name": "@bccampus/ui-components",
3
+ "version": "0.5.2",
4
+ "type": "module",
5
+ "packageManager": "yarn@4.10.3",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./dist/components/index.d.ts",
9
+ "import": "./dist/components/index.js"
10
+ },
11
+ "./hooks": {
12
+ "types": "./dist/hooks/index.d.ts",
13
+ "import": "./dist/hooks/index.js"
14
+ },
15
+ "./utils": {
16
+ "types": "./dist/lib/index.d.ts",
17
+ "import": "./dist/lib/index.js"
18
+ },
19
+ "./all.css": "./src/styles/all.css",
20
+ "./colors.css": "./src/styles/colors.css",
21
+ "./fonts.css": "./src/styles/fonts.css",
22
+ "./theme.css": "./src/styles/theme.css",
23
+ "./typography.css": "./src/styles/typography.css"
24
+ },
25
+ "scripts": {
26
+ "dev": "vite",
27
+ "build": "tsc -b && vite build",
28
+ "lint": "eslint .",
29
+ "preview": "vite preview"
30
+ },
31
+ "dependencies": {
32
+ "@bccampus/media-kit": "^0.1.1",
33
+ "@bcgov/bc-sans": "^2.1.0",
34
+ "@fontsource-variable/inter-tight": "^5.2.7",
35
+ "@nanostores/react": "^1.0.0",
36
+ "@radix-ui/react-navigation-menu": "^1.2.14",
37
+ "@radix-ui/react-popover": "^1.1.15",
38
+ "@radix-ui/react-slot": "^1.2.4",
39
+ "class-variance-authority": "^0.7.1",
40
+ "clsx": "^2.1.1",
41
+ "lucide-react": "^0.560.0",
42
+ "nanostores": "^1.1.0",
43
+ "react": "^19.2.1",
44
+ "react-dom": "^19.2.1",
45
+ "tailwind-merge": "^3.4.0",
46
+ "tailwindcss": "^4.1.18",
47
+ "tw-animate-css": "^1.4.0"
48
+ },
49
+ "peerDependencies": {
50
+ "@nanostores/react": "^1.0.0",
51
+ "nanostores": "^1.1.0",
52
+ "react": "^19.2.1",
53
+ "react-dom": "^19.2.1",
54
+ "tailwindcss": "^4.1.18",
55
+ "tw-animate-css": "^1.4.0"
56
+ },
57
+ "devDependencies": {
58
+ "@eslint/js": "^9.39.1",
59
+ "@ladle/react": "^5.1.1",
60
+ "@tailwindcss/vite": "^4.1.18",
61
+ "@types/node": "^24.10.3",
62
+ "@types/react": "^19.2.7",
63
+ "@types/react-dom": "^19.2.3",
64
+ "@vitejs/plugin-react-swc": "^4.2.2",
65
+ "eslint": "^9.39.1",
66
+ "eslint-plugin-react-hooks": "^5.2.0",
67
+ "eslint-plugin-react-refresh": "^0.4.24",
68
+ "glob": "^13.0.0",
69
+ "globals": "^16.5.0",
70
+ "typescript": "~5.8.3",
71
+ "typescript-eslint": "^8.49.0",
72
+ "vite": "^7.2.7",
73
+ "vite-plugin-dts": "^4.5.4"
74
+ }
75
+ }
package/src/App.tsx CHANGED
@@ -1,14 +1,44 @@
1
- import { Button } from "@/components/ui/button";
2
-
3
- function App() {
4
- return (
5
- <div className="flex min-h-svh flex-col items-center justify-center">
6
- <h1 className="font-inter-tight scroll-m-20 text-center text-4xl font-extrabold tracking-tight text-balance">
7
- Taxing Laughter: The Joke Tax Chronicles
8
- </h1>
9
- <Button>Click Here</Button>
10
- </div>
11
- );
12
- }
13
-
14
- export default App;
1
+ import { Button } from "@/components/ui/button";
2
+ import {
3
+ Card,
4
+ CardArea,
5
+ CardCaption,
6
+ CardContent,
7
+ CardItemGroup,
8
+ CardMeta,
9
+ CardSubcaption,
10
+ CardSubtitle,
11
+ CardTitle,
12
+ CardToolbar,
13
+ } from "@/components/ui/card";
14
+
15
+ function App() {
16
+ return (
17
+ <div className="bcc-typography flex min-h-svh flex-col items-center justify-center">
18
+ <Card className="w-md areas-['a''b']" bordered rounded>
19
+ <CardArea name="a">
20
+ <CardItemGroup>
21
+ <CardCaption>Caption Example</CardCaption>
22
+ <CardSubcaption>Subcaption Example</CardSubcaption>
23
+ </CardItemGroup>
24
+ <CardItemGroup>
25
+ <CardTitle>Title Example Lorem</CardTitle>
26
+ <CardSubtitle>Subtitle Example Lorem</CardSubtitle>
27
+ </CardItemGroup>
28
+ <CardContent>
29
+ Content Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur venenatis posuere orci.
30
+ </CardContent>
31
+ <CardMeta>Meta Example Date: November 8th 2025</CardMeta>
32
+ </CardArea>
33
+ <CardArea name="b">
34
+ <CardToolbar>
35
+ <Button>Action A</Button>
36
+ <Button variant="secondary">Action B</Button>
37
+ </CardToolbar>
38
+ </CardArea>
39
+ </Card>
40
+ </div>
41
+ );
42
+ }
43
+
44
+ export default App;
@@ -4,4 +4,5 @@ export * from './FocusProvider'
4
4
  export * from './SelectionProvider'
5
5
  export * from './composite-component.tsx'
6
6
  export * from './composite-component-item.tsx'
7
- export * from './listbox.tsx'
7
+ export * from './listbox.tsx'
8
+ export type * from './types'
@@ -1,21 +1,18 @@
1
- import { Slot } from "@radix-ui/react-slot";
1
+ import { Root, Slottable } from "@radix-ui/react-slot";
2
2
  import { PageSection } from "./page-section";
3
- import { LogoBCcampusWithTagline } from "@bccampus/media-kit";
4
3
 
5
4
  export type PageHeaderProps = React.ComponentProps<"div"> & {
6
5
  asChild?: boolean;
6
+ logo?: React.ReactNode;
7
7
  };
8
8
 
9
- function PageHeader({ children, asChild, ...props }: PageHeaderProps) {
10
- const Comp = asChild ? Slot : "div";
9
+ function PageHeader({ children, asChild, logo, ...props }: PageHeaderProps) {
10
+ const Comp = asChild ? Root : "div";
11
11
  return (
12
12
  <PageSection py="none" className="sticky top-0 right-0 left-0 z-50 bg-background" {...props}>
13
13
  <Comp className="h-page-nav overflow-hidden flex flex-row flex-nowrap border-b-1 border-b-complement-1-50 gap-2 sm:gap-12 justify-between items-center sm:justify-start">
14
- <div className="py-4 h-full">
15
- <LogoBCcampusWithTagline height="100%" variant="color" />
16
- </div>
17
-
18
- {children}
14
+ {logo}
15
+ <Slottable>{children}</Slottable>
19
16
  </Comp>
20
17
  </PageSection>
21
18
  );
package/src/main.tsx CHANGED
@@ -1,12 +1,12 @@
1
- import { StrictMode } from "react";
2
- import { createRoot } from "react-dom/client";
3
-
4
- import App from "./App.tsx";
5
-
6
- import "./index.css";
7
-
8
- createRoot(document.getElementById("root")!).render(
9
- <StrictMode>
10
- <App />
11
- </StrictMode>
12
- );
1
+ import { StrictMode } from "react";
2
+ import { createRoot } from "react-dom/client";
3
+
4
+ import App from "./App.tsx";
5
+
6
+ import "./styles/index.css";
7
+
8
+ createRoot(document.getElementById("root")!).render(
9
+ <StrictMode>
10
+ <App />
11
+ </StrictMode>
12
+ );
package/vite.config.ts CHANGED
@@ -42,10 +42,14 @@ export default defineConfig({
42
42
  rollupOptions: {
43
43
  external: [
44
44
  'react',
45
- 'react-dom',
46
45
  'react/jsx-runtime',
46
+ 'react/jsx-dev-runtime',
47
+ 'react-dom',
48
+ 'react-dom/client',
47
49
  'tailwindcss',
48
- 'tw-animate-css'
50
+ 'tw-animate-css',
51
+ 'nanostores',
52
+ '@nanostores/react'
49
53
  ],
50
54
  output: {
51
55
  assetFileNames: '[name][extname]',