@seed-design/react 0.2.5 → 1.0.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.
Files changed (75) hide show
  1. package/lib/components/{Celcius/Celcius.cjs → Celsius/Celsius.cjs} +2 -2
  2. package/lib/components/Celsius/Celsius.d.ts +6 -0
  3. package/lib/components/Celsius/Celsius.d.ts.map +1 -0
  4. package/lib/components/Celsius/Celsius.js +6 -0
  5. package/lib/components/{Celcius → Celsius}/index.cjs +2 -2
  6. package/lib/components/Celsius/index.d.ts +2 -0
  7. package/lib/components/Celsius/index.d.ts.map +1 -0
  8. package/lib/components/Celsius/index.js +1 -0
  9. package/lib/components/Checkbox/Checkbox.cjs +9 -8
  10. package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
  11. package/lib/components/Checkbox/Checkbox.js +9 -8
  12. package/lib/components/List/List.cjs +5 -3
  13. package/lib/components/List/List.d.ts.map +1 -1
  14. package/lib/components/List/List.js +5 -3
  15. package/lib/components/List/ListHeader.cjs +20 -0
  16. package/lib/components/List/ListHeader.d.ts +11 -0
  17. package/lib/components/List/ListHeader.d.ts.map +1 -0
  18. package/lib/components/List/ListHeader.js +16 -0
  19. package/lib/components/List/ListHeader.namespace.d.ts +2 -0
  20. package/lib/components/List/ListHeader.namespace.d.ts.map +1 -0
  21. package/lib/components/List/index.cjs +2 -0
  22. package/lib/components/List/index.d.ts +1 -0
  23. package/lib/components/List/index.d.ts.map +1 -1
  24. package/lib/components/List/index.js +1 -0
  25. package/lib/components/MannerTemp/MannerTempEmote.cjs +80 -612
  26. package/lib/components/MannerTemp/MannerTempEmote.d.ts +2 -2
  27. package/lib/components/MannerTemp/MannerTempEmote.d.ts.map +1 -1
  28. package/lib/components/MannerTemp/MannerTempEmote.js +81 -613
  29. package/lib/components/RadioGroup/RadioGroup.cjs +2 -3
  30. package/lib/components/RadioGroup/RadioGroup.d.ts.map +1 -1
  31. package/lib/components/RadioGroup/RadioGroup.js +2 -3
  32. package/lib/components/Snackbar/Snackbar.cjs +5 -0
  33. package/lib/components/Snackbar/Snackbar.d.ts +4 -1
  34. package/lib/components/Snackbar/Snackbar.d.ts.map +1 -1
  35. package/lib/components/Snackbar/Snackbar.js +5 -1
  36. package/lib/components/Snackbar/Snackbar.namespace.cjs +1 -0
  37. package/lib/components/Snackbar/Snackbar.namespace.d.ts +1 -1
  38. package/lib/components/Snackbar/Snackbar.namespace.d.ts.map +1 -1
  39. package/lib/components/Snackbar/Snackbar.namespace.js +1 -1
  40. package/lib/components/Switch/Switch.cjs +23 -11
  41. package/lib/components/Switch/Switch.d.ts +3 -2
  42. package/lib/components/Switch/Switch.d.ts.map +1 -1
  43. package/lib/components/Switch/Switch.js +23 -11
  44. package/lib/components/index.cjs +4 -2
  45. package/lib/components/index.d.ts +1 -1
  46. package/lib/components/index.js +2 -1
  47. package/lib/index.cjs +4 -2
  48. package/lib/index.js +2 -1
  49. package/lib/utils/splitMultipleVariantsProps.cjs +32 -0
  50. package/lib/utils/splitMultipleVariantsProps.d.ts +21 -0
  51. package/lib/utils/splitMultipleVariantsProps.js +28 -0
  52. package/package.json +19 -19
  53. package/src/components/Celsius/Celsius.tsx +9 -0
  54. package/src/components/Celsius/index.ts +4 -0
  55. package/src/components/Checkbox/Checkbox.tsx +15 -15
  56. package/src/components/List/List.tsx +5 -3
  57. package/src/components/List/ListHeader.namespace.ts +0 -0
  58. package/src/components/List/ListHeader.tsx +24 -0
  59. package/src/components/List/index.ts +2 -0
  60. package/src/components/MannerTemp/MannerTempEmote.tsx +104 -432
  61. package/src/components/RadioGroup/RadioGroup.tsx +3 -4
  62. package/src/components/Snackbar/Snackbar.namespace.ts +2 -0
  63. package/src/components/Snackbar/Snackbar.tsx +12 -1
  64. package/src/components/Switch/Switch.tsx +34 -26
  65. package/src/components/index.ts +1 -1
  66. package/src/utils/splitMultipleVariantsProps.d.ts +21 -0
  67. package/src/utils/splitMultipleVariantsProps.mjs +25 -0
  68. package/lib/components/Celcius/Celcius.d.ts +0 -6
  69. package/lib/components/Celcius/Celcius.d.ts.map +0 -1
  70. package/lib/components/Celcius/Celcius.js +0 -6
  71. package/lib/components/Celcius/index.d.ts +0 -2
  72. package/lib/components/Celcius/index.d.ts.map +0 -1
  73. package/lib/components/Celcius/index.js +0 -1
  74. package/src/components/Celcius/Celcius.tsx +0 -9
  75. package/src/components/Celcius/index.ts +0 -4
@@ -3,8 +3,8 @@
3
3
 
4
4
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
5
 
6
- const Celcius = (props) => {
6
+ const Celsius = (props) => {
7
7
  return `${props.value}°C`;
8
8
  };
9
9
 
10
- exports.Celcius = Celcius;
10
+ exports.Celsius = Celsius;
@@ -0,0 +1,6 @@
1
+ import type * as React from "react";
2
+ export interface CelsiusProps {
3
+ value: number;
4
+ }
5
+ export declare const Celsius: React.FC<CelsiusProps>;
6
+ //# sourceMappingURL=Celsius.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Celsius.d.ts","sourceRoot":"","sources":["../../../src/components/Celsius/Celsius.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAE1C,CAAC"}
@@ -0,0 +1,6 @@
1
+ 'use client';
2
+ const Celsius = (props) => {
3
+ return `${props.value}°C`;
4
+ };
5
+
6
+ export { Celsius };
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const Celcius = require('./Celcius.cjs');
5
+ const Celsius = require('./Celsius.cjs');
6
6
 
7
7
 
8
8
 
9
- exports.Celcius = Celcius.Celcius;
9
+ exports.Celsius = Celsius.Celsius;
@@ -0,0 +1,2 @@
1
+ export { Celsius, type CelsiusProps, } from './Celsius';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Celsius/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,KAAK,YAAY,GAClB,MAAM,WAAW,CAAC"}
@@ -0,0 +1 @@
1
+ export { Celsius } from './Celsius.js';
@@ -6,6 +6,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
6
6
  const jsxRuntime = require('react/jsx-runtime');
7
7
  const checkbox = require('@seed-design/css/recipes/checkbox');
8
8
  const checkmark = require('@seed-design/css/recipes/checkmark');
9
+ const splitMultipleVariantsProps = require('../../utils/splitMultipleVariantsProps.cjs');
9
10
  const domUtils = require('@seed-design/dom-utils');
10
11
  const reactCheckbox = require('@seed-design/react-checkbox');
11
12
  const reactPrimitive = require('@seed-design/react-primitive');
@@ -24,14 +25,14 @@ const {
24
25
  const withStateProps = createWithStateProps.createWithStateProps([reactCheckbox.useCheckboxContext]);
25
26
  const CheckboxRoot = Object.assign(
26
27
  React.forwardRef(({ className, ...props }, ref) => {
27
- const normalizedProps = {
28
- ...props,
29
- // TODO: replace this mapping completely
30
- weight: props.weight === "stronger" ? "bold" : props.weight === "default" ? "regular" : props.weight
31
- };
32
- const [checkboxVariantProps, __otherProps] = checkbox.checkbox.splitVariantProps(normalizedProps);
33
- const [checkmarkVariantProps] = checkmark.checkmark.splitVariantProps(normalizedProps);
34
- const [, otherProps] = checkmark.checkmark.splitVariantProps(__otherProps);
28
+ const [{ checkbox: checkboxVariantProps, checkmark: checkmarkVariantProps }, otherProps] = splitMultipleVariantsProps.splitMultipleVariantsProps(
29
+ {
30
+ ...props,
31
+ // TODO: replace this mapping completely
32
+ weight: props.weight === "stronger" ? "bold" : props.weight === "default" ? "regular" : props.weight
33
+ },
34
+ { checkbox: checkbox.checkbox, checkmark: checkmark.checkmark }
35
+ );
35
36
  const classNames = checkbox.checkbox(checkboxVariantProps);
36
37
  return /* @__PURE__ */ jsxRuntime.jsx(CheckmarkPropsProvider, { value: checkmarkVariantProps, children: /* @__PURE__ */ jsxRuntime.jsx(ClassNamesProvider, { value: classNames, children: /* @__PURE__ */ jsxRuntime.jsx(
37
38
  reactCheckbox.Checkbox.Root,
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAY,KAAK,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACxF,OAAO,EAAa,KAAK,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAE3F,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAsB,MAAM,6BAA6B,CAAC;AAChG,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAiB9E;;GAEG;AACH,KAAK,oCAAoC,GAAG,SAAS,GAAG,UAAU,CAAC;AAEnE,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,oBAAoB,EAAE,QAAQ,CAAC,EAC1C,qBAAqB,EACrB,iBAAiB,CAAC,SAAS;IAC7B,MAAM,CAAC,EAAE,oBAAoB,CAAC,QAAQ,CAAC,GAAG,oCAAoC,CAAC;CAChF;AAED,eAAO,MAAM,YAAY;;CAmCxB,CAAC;AAIF;;;GAGG;AAEH,MAAM,WAAW,oBACf,SAAQ,qBAAqB,EAC3B,iBAAiB,CAAC,YAAY;CAAG;AAErC,eAAO,MAAM,eAAe,iHAG3B,CAAC;AAIF,MAAM,WAAW,sBAAuB,SAAQ,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC;IAChF;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE5B;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACjC;AAED,eAAO,MAAM,iBAAiB,kHA8B7B,CAAC;AAKF,MAA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AAED,eAAO,MAAM,iBAAiB,kHA8B7B,CAAC;AAKF,MAAM,WAAW,kBAAmB,SAAQ,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;CAAG;AAEpG,eAAO,MAAM,aAAa,+GAGzB,CAAC;AAIF,MAAM,WAAW,wBAAyB,SAAQ,iBAAiB,CAAC,gBAAgB;CAAG;AAEvF,eAAO,MAAM,mBAAmB,iIAAgC,CAAC"}
@@ -2,6 +2,7 @@
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
  import { checkbox } from '@seed-design/css/recipes/checkbox';
4
4
  import { checkmark } from '@seed-design/css/recipes/checkmark';
5
+ import { splitMultipleVariantsProps } from '../../utils/splitMultipleVariantsProps.js';
5
6
  import { mergeProps } from '@seed-design/dom-utils';
6
7
  import { Checkbox, useCheckboxContext } from '@seed-design/react-checkbox';
7
8
  import { Primitive } from '@seed-design/react-primitive';
@@ -20,14 +21,14 @@ const {
20
21
  const withStateProps = createWithStateProps([useCheckboxContext]);
21
22
  const CheckboxRoot = Object.assign(
22
23
  forwardRef(({ className, ...props }, ref) => {
23
- const normalizedProps = {
24
- ...props,
25
- // TODO: replace this mapping completely
26
- weight: props.weight === "stronger" ? "bold" : props.weight === "default" ? "regular" : props.weight
27
- };
28
- const [checkboxVariantProps, __otherProps] = checkbox.splitVariantProps(normalizedProps);
29
- const [checkmarkVariantProps] = checkmark.splitVariantProps(normalizedProps);
30
- const [, otherProps] = checkmark.splitVariantProps(__otherProps);
24
+ const [{ checkbox: checkboxVariantProps, checkmark: checkmarkVariantProps }, otherProps] = splitMultipleVariantsProps(
25
+ {
26
+ ...props,
27
+ // TODO: replace this mapping completely
28
+ weight: props.weight === "stronger" ? "bold" : props.weight === "default" ? "regular" : props.weight
29
+ },
30
+ { checkbox, checkmark }
31
+ );
31
32
  const classNames = checkbox(checkboxVariantProps);
32
33
  return /* @__PURE__ */ jsx(CheckmarkPropsProvider, { value: checkmarkVariantProps, children: /* @__PURE__ */ jsx(ClassNamesProvider, { value: classNames, children: /* @__PURE__ */ jsx(
33
34
  Checkbox.Root,
@@ -13,11 +13,13 @@ const Stack = require('../Stack/Stack.cjs');
13
13
  const reactCheckbox = require('@seed-design/react-checkbox');
14
14
  const createWithStateProps = require('../../utils/createWithStateProps.cjs');
15
15
  const reactRadioGroup = require('@seed-design/react-radio-group');
16
+ const reactSwitch = require('@seed-design/react-switch');
16
17
 
17
18
  const { withContext, withProvider } = createSlotRecipeContext.createSlotRecipeContext(listItem.listItem);
18
- const withStateProps = createWithStateProps.createWithStateProps([reactCheckbox.useCheckboxContext, reactRadioGroup.useRadioGroupItemContext], {
19
- strict: false
20
- });
19
+ const withStateProps = createWithStateProps.createWithStateProps(
20
+ [reactCheckbox.useCheckboxContext, reactRadioGroup.useRadioGroupItemContext, reactSwitch.useSwitchContext],
21
+ { strict: false }
22
+ );
21
23
  const ListRoot = React.forwardRef(
22
24
  ({ as = "ul", ...props }, ref) => {
23
25
  return /* @__PURE__ */ jsxRuntime.jsx(Stack.VStack, { as, ref, ...props });
@@ -1 +1 @@
1
- {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../src/components/List/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAY,KAAK,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AACzF,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAG9E,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAUpD,MAAM,WAAW,aAAc,SAAQ,WAAW;CAAG;AAErD,eAAO,MAAM,QAAQ,wFAIpB,CAAC;AAEF,MAAM,WAAW,aACf,SAAQ,cAAc,EACpB,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,EAC9B,KAAK,CAAC,cAAc,CAAC,aAAa,CAAC,EACnC,oBAAoB;C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WAAW;CAAG;AAErD,eAAO,MAAM,QAAQ,wFAIpB,CAAC;AAEF,MAAM,WAAW,aACf,SAAQ,cAAc,EACpB,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,EAC9B,KAAK,CAAC,cAAc,CAAC,aAAa,CAAC,EACnC,oBAAoB;CAAG;AAE3B,eAAO,MAAM,QAAQ,qFAGpB,CAAC;AAEF,MAAM,WAAW,gBACf,SAAQ,cAAc,EACpB,IAAI,CAAC,UAAU,EAAE,KAAK,GAAG,IAAI,GAAG,cAAc,CAAC,EAC/C,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAE3C,eAAO,MAAM,WAAW,yFAGvB,CAAC;AAEF,MAAM,WAAW,eACf,SAAQ,cAAc,EACpB,IAAI,CAAC,UAAU,EAAE,IAAI,GAAG,cAAc,CAAC,EACvC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAE3C,eAAO,MAAM,UAAU,wFAGtB,CAAC;AAEF,MAAM,WAAW,eACf,SAAQ,cAAc,EACpB,IAAI,CAAC,UAAU,EAAE,KAAK,GAAG,UAAU,CAAC,EACpC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAE3C,eAAO,MAAM,UAAU,wFAGtB,CAAC;AAEF,MAAM,WAAW,cAAe,SAAQ,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAE/F,eAAO,MAAM,SAAS,uFAGrB,CAAC;AAEF,MAAM,WAAW,eAAgB,SAAQ,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAEhG,eAAO,MAAM,UAAU,wFAGtB,CAAC"}
@@ -9,11 +9,13 @@ import { VStack } from '../Stack/Stack.js';
9
9
  import { useCheckboxContext } from '@seed-design/react-checkbox';
10
10
  import { createWithStateProps } from '../../utils/createWithStateProps.js';
11
11
  import { useRadioGroupItemContext } from '@seed-design/react-radio-group';
12
+ import { useSwitchContext } from '@seed-design/react-switch';
12
13
 
13
14
  const { withContext, withProvider } = createSlotRecipeContext(listItem);
14
- const withStateProps = createWithStateProps([useCheckboxContext, useRadioGroupItemContext], {
15
- strict: false
16
- });
15
+ const withStateProps = createWithStateProps(
16
+ [useCheckboxContext, useRadioGroupItemContext, useSwitchContext],
17
+ { strict: false }
18
+ );
17
19
  const ListRoot = forwardRef(
18
20
  ({ as = "ul", ...props }, ref) => {
19
21
  return /* @__PURE__ */ jsx(VStack, { as, ref, ...props });
@@ -0,0 +1,20 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
+
6
+ const jsxRuntime = require('react/jsx-runtime');
7
+ const listHeader = require('@seed-design/css/recipes/list-header');
8
+ const React = require('react');
9
+ const clsx = require('clsx');
10
+
11
+ const ListHeader = React.forwardRef(
12
+ ({ as: Comp = "div", ...props }, ref) => {
13
+ const [variantProps, otherProps] = listHeader.listHeader.splitVariantProps(props);
14
+ const className = listHeader.listHeader(variantProps);
15
+ return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ref, ...otherProps, className: clsx(className, props.className) });
16
+ }
17
+ );
18
+ ListHeader.displayName = "ListHeader";
19
+
20
+ exports.ListHeader = ListHeader;
@@ -0,0 +1,11 @@
1
+ import { ListHeaderVariantProps } from '@seed-design/css/recipes/list-header';
2
+ import { PrimitiveProps } from '@seed-design/react-primitive';
3
+ import { ForwardRefExoticComponent, RefAttributes } from 'react';
4
+ export interface ListHeaderProps extends PrimitiveProps, React.HTMLAttributes<HTMLDivElement>, ListHeaderVariantProps {
5
+ /**
6
+ * @default "div"
7
+ */
8
+ as?: "div" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
9
+ }
10
+ export declare const ListHeader: ForwardRefExoticComponent<ListHeaderProps & RefAttributes<HTMLDivElement>>;
11
+ //# sourceMappingURL=ListHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListHeader.d.ts","sourceRoot":"","sources":["../../../src/components/List/ListHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAc,KAAK,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAG/F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE,MAAM,WAAW,eACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EACpC,sBAAsB;IACxB;;OAEG;IACH,EAAE,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CACtD;AAED,eAAO,MAAM,UAAU,4GAOtB,CAAC"}
@@ -0,0 +1,16 @@
1
+ 'use client';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { listHeader } from '@seed-design/css/recipes/list-header';
4
+ import { forwardRef } from 'react';
5
+ import clsx from 'clsx';
6
+
7
+ const ListHeader = forwardRef(
8
+ ({ as: Comp = "div", ...props }, ref) => {
9
+ const [variantProps, otherProps] = listHeader.splitVariantProps(props);
10
+ const className = listHeader(variantProps);
11
+ return /* @__PURE__ */ jsx(Comp, { ref, ...otherProps, className: clsx(className, props.className) });
12
+ }
13
+ );
14
+ ListHeader.displayName = "ListHeader";
15
+
16
+ export { ListHeader };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ListHeader.namespace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListHeader.namespace.d.ts","sourceRoot":"","sources":["../../../src/components/List/ListHeader.namespace.ts"],"names":[],"mappings":""}
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
5
  const List = require('./List.cjs');
6
+ const ListHeader = require('./ListHeader.cjs');
6
7
  const List_namespace = require('./List.namespace.cjs');
7
8
 
8
9
 
@@ -14,4 +15,5 @@ exports.ListPrefix = List.ListPrefix;
14
15
  exports.ListRoot = List.ListRoot;
15
16
  exports.ListSuffix = List.ListSuffix;
16
17
  exports.ListTitle = List.ListTitle;
18
+ exports.ListHeader = ListHeader.ListHeader;
17
19
  exports.List = List_namespace;
@@ -1,3 +1,4 @@
1
1
  export { ListContent, ListDetail, ListItem, ListPrefix, ListRoot, ListSuffix, ListTitle, type ListContentProps, type ListDetailProps, type ListItemProps, type ListPrefixProps, type ListRootProps, type ListSuffixProps, type ListTitleProps, } from './List';
2
+ export { ListHeader, type ListHeaderProps } from './ListHeader';
2
3
  export * as List from './List.namespace';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/List/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,UAAU,EACV,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,UAAU,EACV,SAAS,EACT,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,MAAM,QAAQ,CAAC;AAEhB,OAAO,KAAK,IAAI,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/List/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,UAAU,EACV,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,UAAU,EACV,SAAS,EACT,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,MAAM,QAAQ,CAAC;AAEhB,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAEhE,OAAO,KAAK,IAAI,MAAM,kBAAkB,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export { ListContent, ListDetail, ListItem, ListPrefix, ListRoot, ListSuffix, ListTitle } from './List.js';
2
+ export { ListHeader } from './ListHeader.js';
2
3
  import * as List_namespace from './List.namespace.js';
3
4
  export { List_namespace as List };