@obosbbl/grunnmuren-react 3.3.2 → 3.3.3

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/dist/index.d.mts CHANGED
@@ -27,7 +27,7 @@ type DisclosureProps = DisclosureProps$1 & RefAttributes<HTMLDivElement> & {
27
27
  className?: string;
28
28
  };
29
29
  declare const DisclosureStateContext: react.Context<DisclosureState | null>;
30
- declare const Disclosure: ({ ref: _ref, children, ..._props }: DisclosureProps) => react_jsx_runtime.JSX.Element;
30
+ declare const Disclosure: ({ ref: _ref, ..._props }: DisclosureProps) => react_jsx_runtime.JSX.Element;
31
31
  type DisclosurePanelProps = Omit<HTMLAttributes<HTMLDivElement>, 'role'> & {
32
32
  children: React.ReactNode;
33
33
  role?: 'group' | 'region' | 'none';
package/dist/index.mjs CHANGED
@@ -136,10 +136,10 @@ const DisclosureButton = ({ className, withChevron, isIconOnly, children, ref: _
136
136
  });
137
137
  };
138
138
  const DisclosureStateContext = /*#__PURE__*/ createContext(null);
139
- const Disclosure = ({ ref: _ref, children, ..._props })=>{
139
+ const Disclosure = ({ ref: _ref, ..._props })=>{
140
140
  const [props, ref] = useContextProps(_props, _ref, DisclosureContext);
141
141
  const groupState = useContext(DisclosureGroupStateContext);
142
- let { id, ...otherProps } = props;
142
+ let { id, children, ...otherProps } = props;
143
143
  const defaultId = useId();
144
144
  id ||= defaultId;
145
145
  const isExpanded = groupState ? groupState.expandedKeys.has(id) : props.isExpanded;
@@ -377,13 +377,15 @@ const iconMap = {
377
377
  };
378
378
  const alertVariants = cva({
379
379
  base: [
380
- 'grid grid-cols-[auto_1fr_auto] items-center gap-2 rounded-md border-2 px-3 py-2',
380
+ 'grid grid-cols-[auto_1fr_auto] gap-2 rounded-md border-2 px-3 py-2',
381
+ // Icon styles:
382
+ '[&:has([data-slot="heading"])>svg]:mt-0.5',
381
383
  // Heading styles:
382
- '[&_[data-slot="heading"]]:font-medium [&_[data-slot="heading"]]:text-base [&_[data-slot="heading"]]:leading-7',
384
+ '**:data-[slot="heading"]:font-medium **:data-[slot="heading"]:text-base **:data-[slot="heading"]:leading-7',
383
385
  // Content styles:
384
- '[&:has([data-slot="heading"])_[data-slot="content"]]:col-span-full [&_[data-slot="content"]]:text-sm [&_[data-slot="content"]]:leading-6',
386
+ '**:data-[slot="content"]:text-sm **:data-[slot="content"]:leading-6 [&:has([data-slot="heading"])_[data-slot="content"]]:col-span-full',
385
387
  // Footer styles:
386
- '[&_[data-slot="footer"]]:col-span-full [&_[data-slot="footer"]]:font-light [&_[data-slot="footer"]]:text-xs [&_[data-slot="footer"]]:leading-6'
388
+ '**:data-[slot="footer"]:col-span-full **:data-[slot="footer"]:font-light **:data-[slot="footer"]:text-xs **:data-[slot="footer"]:leading-6'
387
389
  ],
388
390
  variants: {
389
391
  /**
@@ -442,7 +444,7 @@ const Alertbox = ({ children, role, className, icon, variant = 'info', isDismiss
442
444
  }),
443
445
  isExpandable && /*#__PURE__*/ jsxs("button", {
444
446
  className: cx('-my-3 relative col-span-full row-start-2 inline-flex max-w-fit cursor-pointer items-center gap-1 py-3 text-sm leading-6', // Focus styles:
445
- 'outline-none after:absolute after:right-0 after:bottom-3 after:left-0 after:h-0', 'focus-visible:after:h-[2px] focus-visible:after:bg-black'),
447
+ 'outline-none after:absolute after:right-0 after:bottom-3 after:left-0 after:h-0', 'focus-visible:after:h-0.5 focus-visible:after:bg-black'),
446
448
  onClick: ()=>setIsExpanded((prevState)=>!prevState),
447
449
  "aria-expanded": isExpanded,
448
450
  "aria-controls": id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obosbbl/grunnmuren-react",
3
- "version": "3.3.2",
3
+ "version": "3.3.3",
4
4
  "description": "Grunnmuren components in React",
5
5
  "repository": {
6
6
  "url": "https://github.com/code-obos/grunnmuren"