@jbpark/ui-kit 8.0.0 → 9.0.0
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/Button.d.mts +48 -12
- package/dist/Button.d.mts.map +1 -1
- package/dist/Button.mjs +62 -11
- package/dist/Button.mjs.map +1 -1
- package/dist/Tag.d.mts +8 -11
- package/dist/Tag.d.mts.map +1 -1
- package/dist/Tag.mjs +8 -7
- package/dist/Tag.mjs.map +1 -1
- package/dist/components/atoms/date-picker.mjs +1 -1
- package/dist/components/atoms/float-button/float-button.d.mts.map +1 -1
- package/dist/components/atoms/float-button/float-button.mjs +2 -1
- package/dist/components/atoms/float-button/float-button.mjs.map +1 -1
- package/dist/components/atoms/input/search.mjs +1 -1
- package/dist/components/atoms/radio/group.mjs +1 -1
- package/dist/components/atoms/radio/radio.d.mts +1 -1
- package/dist/components/molecules/dropdown.d.mts.map +1 -1
- package/dist/components/molecules/dropdown.mjs +2 -1
- package/dist/components/molecules/dropdown.mjs.map +1 -1
- package/dist/components/molecules/marquees/item.d.mts +2 -1
- package/dist/components/molecules/marquees/item.d.mts.map +1 -1
- package/dist/components/molecules/marquees/item.mjs +20 -5
- package/dist/components/molecules/marquees/item.mjs.map +1 -1
- package/dist/components/molecules/marquees/marquees.d.mts +2 -1
- package/dist/components/molecules/marquees/marquees.d.mts.map +1 -1
- package/dist/components/molecules/marquees/marquees.mjs +3 -2
- package/dist/components/molecules/marquees/marquees.mjs.map +1 -1
- package/dist/components/organisms/drawer.mjs +8 -8
- package/dist/components/organisms/drawer.mjs.map +1 -1
- package/dist/components/organisms/modal.d.mts +4 -5
- package/dist/components/organisms/modal.d.mts.map +1 -1
- package/dist/components/organisms/modal.mjs +5 -6
- package/dist/components/organisms/modal.mjs.map +1 -1
- package/dist/components/organisms/toast.d.mts +2 -8
- package/dist/components/organisms/toast.d.mts.map +1 -1
- package/dist/components/organisms/toast.mjs +4 -5
- package/dist/components/organisms/toast.mjs.map +1 -1
- package/dist/components/templates/layout/header.d.mts.map +1 -1
- package/dist/components/templates/layout/header.mjs +2 -1
- package/dist/components/templates/layout/header.mjs.map +1 -1
- package/dist/components/templates/layout/sider.mjs.map +1 -1
- package/dist/components/templates/page-header.mjs +4 -4
- package/dist/components/templates/page-header.mjs.map +1 -1
- package/dist/core/badge.d.mts +25 -2
- package/dist/core/badge.d.mts.map +1 -0
- package/dist/core/badge.mjs +47 -0
- package/dist/core/badge.mjs.map +1 -0
- package/dist/core/button.d.mts +14 -2
- package/dist/core/button.d.mts.map +1 -0
- package/dist/core/dialog.mjs +5 -5
- package/dist/core/dialog.mjs.map +1 -1
- package/dist/core/drawer.mjs +3 -2
- package/dist/core/drawer.mjs.map +1 -1
- package/dist/core/field.d.mts +1 -1
- package/dist/core/popover.mjs +3 -2
- package/dist/core/popover.mjs.map +1 -1
- package/dist/core/select.d.mts.map +1 -1
- package/dist/core/select.mjs +3 -2
- package/dist/core/select.mjs.map +1 -1
- package/dist/lib/colors.d.mts +6 -31
- package/dist/lib/colors.d.mts.map +1 -1
- package/dist/lib/z-layers.mjs +33 -0
- package/dist/lib/z-layers.mjs.map +1 -0
- package/dist/style.css +32 -34
- package/dist/utils.d.mts +12 -0
- package/dist/utils.d.mts.map +1 -1
- package/dist/utils.mjs +12 -0
- package/dist/utils.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/lib/chassis.mjs +0 -23
- package/dist/lib/chassis.mjs.map +0 -1
package/dist/utils.mjs
CHANGED
|
@@ -5,6 +5,18 @@ import { twMerge } from "tailwind-merge";
|
|
|
5
5
|
const cn = (...inputs) => {
|
|
6
6
|
return twMerge(clsx(inputs));
|
|
7
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* Renders a slot value, applying `wrapper` only to values that aren't already
|
|
10
|
+
* a React element. Passing an element opts out of the wrapper entirely.
|
|
11
|
+
*
|
|
12
|
+
* **Only use this for content slots where that opt-out is the point** — a
|
|
13
|
+
* `title` the caller may want to supply as their own heading, so we don't end
|
|
14
|
+
* up nesting `<h6><h3>`. Do *not* use it for a wrapper that carries layout the
|
|
15
|
+
* component owns (padding, `shrink-0`, a footer bar): the common case is an
|
|
16
|
+
* element, so the wrapper would be skipped exactly when it's needed, and any
|
|
17
|
+
* `classNames.*` threaded through it would silently do nothing. Write those as
|
|
18
|
+
* a plain `{value != null && <Wrapper>{value}</Wrapper>}`.
|
|
19
|
+
*/
|
|
8
20
|
const renderConditional = (value, wrapper) => {
|
|
9
21
|
if (value === null || value === void 0) return null;
|
|
10
22
|
if (React$1.isValidElement(value)) return value;
|
package/dist/utils.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.mjs","names":["React"],"sources":["../src/lib/utils/index.ts"],"sourcesContent":["import * as React from 'react';\n\nimport { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport const cn = (...inputs: ClassValue[]) => {\n return twMerge(clsx(inputs));\n};\n\nexport const renderConditional = <T extends React.ReactNode>(\n value: T,\n wrapper?: (value: NonNullable<T>) => React.ReactNode,\n): React.ReactNode => {\n if (value === null || value === undefined) {\n return null;\n }\n\n if (React.isValidElement(value)) {\n return value;\n }\n\n return wrapper ? wrapper(value as NonNullable<T>) : value;\n};\n"],"mappings":";;;;AAKA,MAAa,MAAM,GAAG,WAAyB;CAC7C,OAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B
|
|
1
|
+
{"version":3,"file":"utils.mjs","names":["React"],"sources":["../src/lib/utils/index.ts"],"sourcesContent":["import * as React from 'react';\n\nimport { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport const cn = (...inputs: ClassValue[]) => {\n return twMerge(clsx(inputs));\n};\n\n/**\n * Renders a slot value, applying `wrapper` only to values that aren't already\n * a React element. Passing an element opts out of the wrapper entirely.\n *\n * **Only use this for content slots where that opt-out is the point** — a\n * `title` the caller may want to supply as their own heading, so we don't end\n * up nesting `<h6><h3>`. Do *not* use it for a wrapper that carries layout the\n * component owns (padding, `shrink-0`, a footer bar): the common case is an\n * element, so the wrapper would be skipped exactly when it's needed, and any\n * `classNames.*` threaded through it would silently do nothing. Write those as\n * a plain `{value != null && <Wrapper>{value}</Wrapper>}`.\n */\nexport const renderConditional = <T extends React.ReactNode>(\n value: T,\n wrapper?: (value: NonNullable<T>) => React.ReactNode,\n): React.ReactNode => {\n if (value === null || value === undefined) {\n return null;\n }\n\n if (React.isValidElement(value)) {\n return value;\n }\n\n return wrapper ? wrapper(value as NonNullable<T>) : value;\n};\n"],"mappings":";;;;AAKA,MAAa,MAAM,GAAG,WAAyB;CAC7C,OAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;;;;;;;;;;;AAcA,MAAa,qBACX,OACA,YACoB;CACpB,IAAI,UAAU,QAAQ,UAAU,KAAA,GAC9B,OAAO;CAGT,IAAIA,QAAM,eAAe,KAAK,GAC5B,OAAO;CAGT,OAAO,UAAU,QAAQ,KAAuB,IAAI;AACtD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbpark/ui-kit",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "Modern React UI component library built with TypeScript, Tailwind CSS, and Radix UI. Featuring atoms, molecules, organisms and layout templates for building beautiful interfaces.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
package/dist/lib/chassis.mjs
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { cn } from "../utils.mjs";
|
|
2
|
-
//#region src/lib/chassis.ts
|
|
3
|
-
/**
|
|
4
|
-
* Shared a11y/state chassis for interactive single-element atoms (Button, Tag).
|
|
5
|
-
*
|
|
6
|
-
* Extracted from `core/button` and `core/badge`'s cva base strings during the
|
|
7
|
-
* #278 step ③ absorb (see #294 Phase 4). When an atom stops wrapping its core
|
|
8
|
-
* primitive it must carry this chassis itself — the focus ring, the
|
|
9
|
-
* `aria-invalid` treatment and the flex centering are load-bearing and have no
|
|
10
|
-
* type- or lint-level signal, so dropping them regresses silently (the #177
|
|
11
|
-
* class of bug the regression net in #300/#301 guards).
|
|
12
|
-
*
|
|
13
|
-
* Common set only. A Tag is not disableable, does not size icons and (as a
|
|
14
|
-
* non-focusable `span`) carries no `outline-none`, so those live on the Button
|
|
15
|
-
* extension in `atoms/button`, NOT here — folding them into one shared constant
|
|
16
|
-
* would push `disabled:*` onto Tag, which is semantically wrong (#301's
|
|
17
|
-
* per-component chassis finding).
|
|
18
|
-
*/
|
|
19
|
-
const INTERACTIVE_CHASSIS = cn("inline-flex items-center justify-center shrink-0", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive");
|
|
20
|
-
//#endregion
|
|
21
|
-
export { INTERACTIVE_CHASSIS };
|
|
22
|
-
|
|
23
|
-
//# sourceMappingURL=chassis.mjs.map
|
package/dist/lib/chassis.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chassis.mjs","names":[],"sources":["../../src/lib/chassis.ts"],"sourcesContent":["import { cn } from '@repo/ui/utils';\n\n/**\n * Shared a11y/state chassis for interactive single-element atoms (Button, Tag).\n *\n * Extracted from `core/button` and `core/badge`'s cva base strings during the\n * #278 step ③ absorb (see #294 Phase 4). When an atom stops wrapping its core\n * primitive it must carry this chassis itself — the focus ring, the\n * `aria-invalid` treatment and the flex centering are load-bearing and have no\n * type- or lint-level signal, so dropping them regresses silently (the #177\n * class of bug the regression net in #300/#301 guards).\n *\n * Common set only. A Tag is not disableable, does not size icons and (as a\n * non-focusable `span`) carries no `outline-none`, so those live on the Button\n * extension in `atoms/button`, NOT here — folding them into one shared constant\n * would push `disabled:*` onto Tag, which is semantically wrong (#301's\n * per-component chassis finding).\n */\nexport const INTERACTIVE_CHASSIS = cn(\n 'inline-flex items-center justify-center shrink-0',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAa,sBAAsB,GACjC,oDACA,iFACA,wGACF"}
|