@medway-ui/core 1.34.0 → 1.35.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.
- package/COMPONENTS.md +16 -10
- package/COMPONENTS_SUMMARY.md +8 -3
- package/dist/COMPONENTS.md +16 -10
- package/dist/COMPONENTS_SUMMARY.md +8 -3
- package/dist/components/Chip.d.mts +4 -2
- package/dist/components/Chip.d.mts.map +1 -1
- package/dist/components/Chip.d.ts +4 -2
- package/dist/components/Chip.d.ts.map +1 -1
- package/dist/components/Chip.js +1 -1
- package/dist/components/Chip.mjs +1 -1
- package/package.json +3 -2
- package/tokens.css +2 -0
package/COMPONENTS.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @medway-ui/core — Component Reference
|
|
2
2
|
|
|
3
3
|
> **Auto-generated — do not edit manually.**
|
|
4
|
-
> Package `@medway-ui/core` · v1.
|
|
4
|
+
> Package `@medway-ui/core` · v1.35.1 · Generated 2026-10-23
|
|
5
5
|
|
|
6
6
|
All components require React 18+ and are client components (`"use client"`).
|
|
7
7
|
|
|
@@ -940,16 +940,18 @@ type CarouselAutoplayToggleProps = Omit<
|
|
|
940
940
|
|------|------|:--------:|
|
|
941
941
|
| `criteria` | `ReactNode` | |
|
|
942
942
|
|
|
943
|
-
### `
|
|
943
|
+
### `ChipChoiceProps`
|
|
944
944
|
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
945
|
+
*Extends: ChipSelectableProps*
|
|
946
|
+
|
|
947
|
+
| Prop | Type | Required |
|
|
948
|
+
|------|------|:--------:|
|
|
949
|
+
| `dismissible` | `boolean` | |
|
|
948
950
|
|
|
949
|
-
### `
|
|
951
|
+
### `ChipSize` *(type)*
|
|
950
952
|
|
|
951
953
|
```typescript
|
|
952
|
-
type
|
|
954
|
+
type ChipSize = keyof typeof chipSizes
|
|
953
955
|
```
|
|
954
956
|
|
|
955
957
|
### `ChipClearProps` *(type)*
|
|
@@ -2329,14 +2331,18 @@ Exported from `Carousel`. See component docs above for context.
|
|
|
2329
2331
|
|
|
2330
2332
|
## Design Tokens
|
|
2331
2333
|
|
|
2332
|
-
```
|
|
2333
|
-
|
|
2334
|
-
import "@medway-ui/core/tokens.css";
|
|
2334
|
+
```css
|
|
2335
|
+
/* 1. First line of the global CSS, before @tailwind (needs postcss-import) */
|
|
2336
|
+
@import "@medway-ui/core/tokens.css";
|
|
2337
|
+
```
|
|
2335
2338
|
|
|
2339
|
+
```tsx
|
|
2336
2340
|
// 2. Import JS token map for tailwind.config.ts
|
|
2337
2341
|
import { colors, content } from "@medway-ui/core/tokens";
|
|
2338
2342
|
```
|
|
2339
2343
|
|
|
2344
|
+
Full setup: https://ui.medway.com.br/docs/introduction/getting-started
|
|
2345
|
+
|
|
2340
2346
|
### CSS Custom Properties
|
|
2341
2347
|
|
|
2342
2348
|
<details>
|
package/COMPONENTS_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @medway-ui/core — Component Summary
|
|
2
2
|
|
|
3
|
-
> v1.
|
|
3
|
+
> v1.35.1 · For the full prop/variant reference see `COMPONENTS.md`.
|
|
4
4
|
|
|
5
5
|
## Components
|
|
6
6
|
|
|
@@ -64,7 +64,12 @@
|
|
|
64
64
|
|
|
65
65
|
## Tokens
|
|
66
66
|
|
|
67
|
+
```css
|
|
68
|
+
@import "@medway-ui/core/tokens.css"; /* global CSS, before @tailwind */
|
|
69
|
+
```
|
|
70
|
+
|
|
67
71
|
```tsx
|
|
68
|
-
import "@medway-ui/core/tokens.css"; // CSS custom properties
|
|
69
72
|
import { colors } from "@medway-ui/core/tokens"; // Tailwind config
|
|
70
|
-
```
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Full setup: https://ui.medway.com.br/docs/introduction/getting-started
|
package/dist/COMPONENTS.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @medway-ui/core — Component Reference
|
|
2
2
|
|
|
3
3
|
> **Auto-generated — do not edit manually.**
|
|
4
|
-
> Package `@medway-ui/core` · v1.
|
|
4
|
+
> Package `@medway-ui/core` · v1.35.1 · Generated 2026-10-23
|
|
5
5
|
|
|
6
6
|
All components require React 18+ and are client components (`"use client"`).
|
|
7
7
|
|
|
@@ -940,16 +940,18 @@ type CarouselAutoplayToggleProps = Omit<
|
|
|
940
940
|
|------|------|:--------:|
|
|
941
941
|
| `criteria` | `ReactNode` | |
|
|
942
942
|
|
|
943
|
-
### `
|
|
943
|
+
### `ChipChoiceProps`
|
|
944
944
|
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
945
|
+
*Extends: ChipSelectableProps*
|
|
946
|
+
|
|
947
|
+
| Prop | Type | Required |
|
|
948
|
+
|------|------|:--------:|
|
|
949
|
+
| `dismissible` | `boolean` | |
|
|
948
950
|
|
|
949
|
-
### `
|
|
951
|
+
### `ChipSize` *(type)*
|
|
950
952
|
|
|
951
953
|
```typescript
|
|
952
|
-
type
|
|
954
|
+
type ChipSize = keyof typeof chipSizes
|
|
953
955
|
```
|
|
954
956
|
|
|
955
957
|
### `ChipClearProps` *(type)*
|
|
@@ -2329,14 +2331,18 @@ Exported from `Carousel`. See component docs above for context.
|
|
|
2329
2331
|
|
|
2330
2332
|
## Design Tokens
|
|
2331
2333
|
|
|
2332
|
-
```
|
|
2333
|
-
|
|
2334
|
-
import "@medway-ui/core/tokens.css";
|
|
2334
|
+
```css
|
|
2335
|
+
/* 1. First line of the global CSS, before @tailwind (needs postcss-import) */
|
|
2336
|
+
@import "@medway-ui/core/tokens.css";
|
|
2337
|
+
```
|
|
2335
2338
|
|
|
2339
|
+
```tsx
|
|
2336
2340
|
// 2. Import JS token map for tailwind.config.ts
|
|
2337
2341
|
import { colors, content } from "@medway-ui/core/tokens";
|
|
2338
2342
|
```
|
|
2339
2343
|
|
|
2344
|
+
Full setup: https://ui.medway.com.br/docs/introduction/getting-started
|
|
2345
|
+
|
|
2340
2346
|
### CSS Custom Properties
|
|
2341
2347
|
|
|
2342
2348
|
<details>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @medway-ui/core — Component Summary
|
|
2
2
|
|
|
3
|
-
> v1.
|
|
3
|
+
> v1.35.1 · For the full prop/variant reference see `COMPONENTS.md`.
|
|
4
4
|
|
|
5
5
|
## Components
|
|
6
6
|
|
|
@@ -64,7 +64,12 @@
|
|
|
64
64
|
|
|
65
65
|
## Tokens
|
|
66
66
|
|
|
67
|
+
```css
|
|
68
|
+
@import "@medway-ui/core/tokens.css"; /* global CSS, before @tailwind */
|
|
69
|
+
```
|
|
70
|
+
|
|
67
71
|
```tsx
|
|
68
|
-
import "@medway-ui/core/tokens.css"; // CSS custom properties
|
|
69
72
|
import { colors } from "@medway-ui/core/tokens"; // Tailwind config
|
|
70
|
-
```
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Full setup: https://ui.medway.com.br/docs/introduction/getting-started
|
|
@@ -11,7 +11,9 @@ interface ChipSelectableProps extends Omit<ComponentProps<"button">, "type">, Va
|
|
|
11
11
|
interface ChipFilterProps extends ChipSelectableProps {
|
|
12
12
|
criteria?: ReactNode;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
interface ChipChoiceProps extends ChipSelectableProps {
|
|
15
|
+
dismissible?: boolean;
|
|
16
|
+
}
|
|
15
17
|
type ChipClearProps = Omit<ComponentProps<"button">, "type"> & VariantProps<typeof chipClearVariants>;
|
|
16
18
|
declare const chipSizes: {
|
|
17
19
|
sm: string;
|
|
@@ -29,7 +31,7 @@ declare const chipClearVariants: (props?: ({
|
|
|
29
31
|
} & ({ class: import("clsx").ClassValue; className?: never } | { class?: never; className: import("clsx").ClassValue } | { class?: never; className?: never })) | undefined) => string;
|
|
30
32
|
declare function Chip({ className, size, dismissLabel, children, ...props }: ChipProps): import("react/jsx-runtime").JSX.Element;
|
|
31
33
|
declare const ChipFilter: import("react").ForwardRefExoticComponent<Omit<ChipFilterProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
32
|
-
declare function ChipChoice({ className, size, icon, checked, children, ...props }: ChipChoiceProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
declare function ChipChoice({ className, size, icon, checked, dismissible, children, ...props }: ChipChoiceProps): import("react/jsx-runtime").JSX.Element;
|
|
33
35
|
declare function ChipClear({ className, size, children, ...props }: ChipClearProps): import("react/jsx-runtime").JSX.Element;
|
|
34
36
|
export { Chip, ChipChoice, ChipClear, ChipFilter, chipClearVariants, chipSelectableVariants, chipVariants, };
|
|
35
37
|
export type { ChipChoiceProps, ChipClearProps, ChipFilterProps, ChipProps, ChipSize, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../src/components/Chip.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,KAAK,QAAQ,GAAG,MAAM,OAAO,SAAS,CAAC;AAEvC,UAAU,SACR,SAAQ,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,EAC5C,YAAY,CAAC,OAAO,YAAY,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,mBACR,SAAQ,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,EAC5C,YAAY,CAAC,OAAO,sBAAsB,CAAC;IAC7C,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,eAAgB,SAAQ,mBAAmB;IACnD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,
|
|
1
|
+
{"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../src/components/Chip.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAA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,SAAS,CAAC,EACjB,SAAS,EACT,IAAI,EACJ,QAAmB,EACnB,GAAG,KAAK,EACT,EAAE,cAAc,2CAYhB;AAED,OAAO,EACL,IAAI,EACJ,UAAU,EACV,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,sBAAsB,EACtB,YAAY,GACb,CAAC;AACF,YAAY,EACV,eAAe,EACf,cAAc,EACd,eAAe,EACf,SAAS,EACT,QAAQ,GACT,CAAC"}
|
|
@@ -11,7 +11,9 @@ interface ChipSelectableProps extends Omit<ComponentProps<"button">, "type">, Va
|
|
|
11
11
|
interface ChipFilterProps extends ChipSelectableProps {
|
|
12
12
|
criteria?: ReactNode;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
interface ChipChoiceProps extends ChipSelectableProps {
|
|
15
|
+
dismissible?: boolean;
|
|
16
|
+
}
|
|
15
17
|
type ChipClearProps = Omit<ComponentProps<"button">, "type"> & VariantProps<typeof chipClearVariants>;
|
|
16
18
|
declare const chipSizes: {
|
|
17
19
|
sm: string;
|
|
@@ -29,7 +31,7 @@ declare const chipClearVariants: (props?: ({
|
|
|
29
31
|
} & ({ class: import("clsx").ClassValue; className?: never } | { class?: never; className: import("clsx").ClassValue } | { class?: never; className?: never })) | undefined) => string;
|
|
30
32
|
declare function Chip({ className, size, dismissLabel, children, ...props }: ChipProps): import("react/jsx-runtime").JSX.Element;
|
|
31
33
|
declare const ChipFilter: import("react").ForwardRefExoticComponent<Omit<ChipFilterProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
32
|
-
declare function ChipChoice({ className, size, icon, checked, children, ...props }: ChipChoiceProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
declare function ChipChoice({ className, size, icon, checked, dismissible, children, ...props }: ChipChoiceProps): import("react/jsx-runtime").JSX.Element;
|
|
33
35
|
declare function ChipClear({ className, size, children, ...props }: ChipClearProps): import("react/jsx-runtime").JSX.Element;
|
|
34
36
|
export { Chip, ChipChoice, ChipClear, ChipFilter, chipClearVariants, chipSelectableVariants, chipVariants, };
|
|
35
37
|
export type { ChipChoiceProps, ChipClearProps, ChipFilterProps, ChipProps, ChipSize, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../src/components/Chip.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,KAAK,QAAQ,GAAG,MAAM,OAAO,SAAS,CAAC;AAEvC,UAAU,SACR,SAAQ,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,EAC5C,YAAY,CAAC,OAAO,YAAY,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,mBACR,SAAQ,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,EAC5C,YAAY,CAAC,OAAO,sBAAsB,CAAC;IAC7C,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,eAAgB,SAAQ,mBAAmB;IACnD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,
|
|
1
|
+
{"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../src/components/Chip.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,KAAK,QAAQ,GAAG,MAAM,OAAO,SAAS,CAAC;AAEvC,UAAU,SACR,SAAQ,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,EAC5C,YAAY,CAAC,OAAO,YAAY,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC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package/dist/components/Chip.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
-
"use strict";var s=require("react/jsx-runtime"),O=require("react"),
|
|
3
|
+
"use strict";var s=require("react/jsx-runtime"),O=require("react"),g=require("class-variance-authority"),o=require("@medway-ui/icons"),c=require("../lib/utils.js"),P=Object.defineProperty,V=Object.defineProperties,q=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,k=(r,e,a)=>e in r?P(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,u=(r,e)=>{for(var a in e||(e={}))y.call(e,a)&&k(r,a,e[a]);if(l)for(var a of l(e))j.call(e,a)&&k(r,a,e[a]);return r},h=(r,e)=>V(r,q(e)),m=(r,e)=>{var a={};for(var t in r)y.call(r,t)&&e.indexOf(t)<0&&(a[t]=r[t]);if(r!=null&&l)for(var t of l(r))e.indexOf(t)<0&&j.call(r,t)&&(a[t]=r[t]);return a};const _={sm:"gap-2 px-3 py-2 text-xs leading-xs [&_svg:not([class*=size-])]:size-4",md:"gap-2.5 px-3.5 py-2.5 text-sm leading-sm [&_svg:not([class*=size-])]:size-5",lg:"gap-3 px-4 py-3 text-md leading-md [&_svg:not([class*=size-])]:size-6"},p={variants:{size:_},defaultVariants:{size:"md"}},v="relative isolate inline-flex w-fit min-w-0 max-w-full shrink-0 items-center justify-center whitespace-nowrap transition-colors hover:cursor-pointer disabled:pointer-events-none [&_svg]:shrink-0",N=g.cva([v,"group/chip rounded-sm bg-surface-elevated font-semibold text-primary-foreground shadow-level-1-subtle disabled:bg-gray-background-soft-muted disabled:font-medium disabled:text-gray-foreground-muted disabled:shadow-none"],p),x=g.cva([v,"group/chip rounded-md bg-gray-background-soft font-medium text-gray-foreground [@media(hover:hover)]:data-[checked=false]:hover:bg-gray-background-soft-emphasis [@media(hover:hover)]:data-[checked=false]:hover:text-gray-foreground-emphasis enabled:data-[checked=true]:font-semibold enabled:data-[checked=true]:text-primary-foreground enabled:data-[checked=true]:before:absolute enabled:data-[checked=true]:before:inset-0.5 enabled:data-[checked=true]:before:-z-10 enabled:data-[checked=true]:before:rounded-[calc(var(--radius-md)-2px)] enabled:data-[checked=true]:before:bg-surface-card enabled:data-[checked=true]:before:shadow-level-1-subtle disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted"],p),z=g.cva([v,"rounded-md bg-transparent font-semibold text-primary-foreground [@media(hover:hover)]:hover:bg-gray-background-soft-emphasis disabled:text-gray-foreground-muted"],p),F={sm:"w-[5px]",md:"w-[6px]",lg:"w-[7px]"};function M(r){var e=r,{className:a,size:t,dismissLabel:i="Remover",children:n}=e,d=m(e,["className","size","dismissLabel","children"]);return s.jsxs("button",h(u({"data-slot":"chip",className:c.cn(N({size:t}),a)},d),{type:"button",children:[s.jsx("span",{className:"truncate",children:n}),s.jsx("span",{className:"sr-only",children:i}),s.jsx(o.CloseMd,{"aria-hidden":"true","data-slot":"chip-dismiss",className:"text-gray-foreground-muted [@media(hover:hover)]:group-hover/chip:text-primary-foreground"})]}))}const R=O.forwardRef(function(r,e){var a=r,{className:t,size:i,icon:n,criteria:d,checked:b=!1,children:f}=a,w=m(a,["className","size","icon","criteria","checked","children"]);const C=d!=null&&typeof d!="boolean"&&d!=="";return s.jsxs("button",h(u({ref:e,"data-slot":"chip-filter","data-checked":b,className:c.cn(x({size:i}),t)},w),{type:"button",children:[n,s.jsxs("span",{className:"inline-flex min-w-0",children:[s.jsx("span",{className:"truncate",children:f}),C&&s.jsxs(s.Fragment,{children:[s.jsx("span",{"aria-hidden":"true",className:c.cn("inline-flex shrink-0 justify-center",F[i!=null?i:p.defaultVariants.size]),children:":"}),s.jsx("span",{className:"truncate",children:d})]})]}),s.jsx(o.ChevronDown,{"aria-hidden":"true"})]}))});function D(r){var e=r,{className:a,size:t,icon:i,checked:n=!1,dismissible:d=!0,children:b}=e,f=m(e,["className","size","icon","checked","dismissible","children"]);return s.jsxs("button",h(u({"data-slot":"chip-choice","data-checked":n,"aria-pressed":n,className:c.cn(x({size:t}),a)},f),{type:"button",children:[i,s.jsx("span",{className:"truncate",children:b}),n&&s.jsxs(s.Fragment,{children:[s.jsx(o.CheckMedium,{"aria-hidden":"true",className:c.cn("text-secondary-foreground group-disabled/chip:text-gray-foreground-muted",d&&"[@media(hover:hover)]:group-hover/chip:hidden")}),d&&s.jsx(o.CloseMd,{"aria-hidden":"true",className:"hidden text-primary-foreground [@media(hover:hover)]:group-hover/chip:block"})]})]}))}function L(r){var e=r,{className:a,size:t,children:i="Limpar"}=e,n=m(e,["className","size","children"]);return s.jsxs("button",h(u({"data-slot":"chip-clear",className:c.cn(z({size:t}),a)},n),{type:"button",children:[s.jsx("span",{className:"truncate",children:i}),s.jsx(o.CloseMd,{"aria-hidden":"true"})]}))}exports.Chip=M,exports.ChipChoice=D,exports.ChipClear=L,exports.ChipFilter=R,exports.chipClearVariants=z,exports.chipSelectableVariants=x,exports.chipVariants=N;
|
|
4
4
|
//# sourceMappingURL=Chip.js.map
|
package/dist/components/Chip.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
-
import{jsxs as o,jsx as
|
|
3
|
+
import{jsxs as o,jsx as t,Fragment as k}from"react/jsx-runtime";import{forwardRef as V}from"react";import{cva as g}from"class-variance-authority";import{ChevronDown as _,CloseMd as v,CheckMedium as D}from"@medway-ui/icons";import{cn as c}from"../lib/utils.mjs";var F=Object.defineProperty,L=Object.defineProperties,R=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,w=(r,e,a)=>e in r?F(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,h=(r,e)=>{for(var a in e||(e={}))N.call(e,a)&&w(r,a,e[a]);if(l)for(var a of l(e))z.call(e,a)&&w(r,a,e[a]);return r},u=(r,e)=>L(r,R(e)),m=(r,e)=>{var a={};for(var s in r)N.call(r,s)&&e.indexOf(s)<0&&(a[s]=r[s]);if(r!=null&&l)for(var s of l(r))e.indexOf(s)<0&&z.call(r,s)&&(a[s]=r[s]);return a};const S={sm:"gap-2 px-3 py-2 text-xs leading-xs [&_svg:not([class*=size-])]:size-4",md:"gap-2.5 px-3.5 py-2.5 text-sm leading-sm [&_svg:not([class*=size-])]:size-5",lg:"gap-3 px-4 py-3 text-md leading-md [&_svg:not([class*=size-])]:size-6"},p={variants:{size:S},defaultVariants:{size:"md"}},y="relative isolate inline-flex w-fit min-w-0 max-w-full shrink-0 items-center justify-center whitespace-nowrap transition-colors hover:cursor-pointer disabled:pointer-events-none [&_svg]:shrink-0",j=g([y,"group/chip rounded-sm bg-surface-elevated font-semibold text-primary-foreground shadow-level-1-subtle disabled:bg-gray-background-soft-muted disabled:font-medium disabled:text-gray-foreground-muted disabled:shadow-none"],p),x=g([y,"group/chip rounded-md bg-gray-background-soft font-medium text-gray-foreground [@media(hover:hover)]:data-[checked=false]:hover:bg-gray-background-soft-emphasis [@media(hover:hover)]:data-[checked=false]:hover:text-gray-foreground-emphasis enabled:data-[checked=true]:font-semibold enabled:data-[checked=true]:text-primary-foreground enabled:data-[checked=true]:before:absolute enabled:data-[checked=true]:before:inset-0.5 enabled:data-[checked=true]:before:-z-10 enabled:data-[checked=true]:before:rounded-[calc(var(--radius-md)-2px)] enabled:data-[checked=true]:before:bg-surface-card enabled:data-[checked=true]:before:shadow-level-1-subtle disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted"],p),C=g([y,"rounded-md bg-transparent font-semibold text-primary-foreground [@media(hover:hover)]:hover:bg-gray-background-soft-emphasis disabled:text-gray-foreground-muted"],p),E={sm:"w-[5px]",md:"w-[6px]",lg:"w-[7px]"};function M(r){var e=r,{className:a,size:s,dismissLabel:i="Remover",children:d}=e,n=m(e,["className","size","dismissLabel","children"]);return o("button",u(h({"data-slot":"chip",className:c(j({size:s}),a)},n),{type:"button",children:[t("span",{className:"truncate",children:d}),t("span",{className:"sr-only",children:i}),t(v,{"aria-hidden":"true","data-slot":"chip-dismiss",className:"text-gray-foreground-muted [@media(hover:hover)]:group-hover/chip:text-primary-foreground"})]}))}const B=V(function(r,e){var a=r,{className:s,size:i,icon:d,criteria:n,checked:f=!1,children:b}=a,O=m(a,["className","size","icon","criteria","checked","children"]);const P=n!=null&&typeof n!="boolean"&&n!=="";return o("button",u(h({ref:e,"data-slot":"chip-filter","data-checked":f,className:c(x({size:i}),s)},O),{type:"button",children:[d,o("span",{className:"inline-flex min-w-0",children:[t("span",{className:"truncate",children:b}),P&&o(k,{children:[t("span",{"aria-hidden":"true",className:c("inline-flex shrink-0 justify-center",E[i!=null?i:p.defaultVariants.size]),children:":"}),t("span",{className:"truncate",children:n})]})]}),t(_,{"aria-hidden":"true"})]}))});function H(r){var e=r,{className:a,size:s,icon:i,checked:d=!1,dismissible:n=!0,children:f}=e,b=m(e,["className","size","icon","checked","dismissible","children"]);return o("button",u(h({"data-slot":"chip-choice","data-checked":d,"aria-pressed":d,className:c(x({size:s}),a)},b),{type:"button",children:[i,t("span",{className:"truncate",children:f}),d&&o(k,{children:[t(D,{"aria-hidden":"true",className:c("text-secondary-foreground group-disabled/chip:text-gray-foreground-muted",n&&"[@media(hover:hover)]:group-hover/chip:hidden")}),n&&t(v,{"aria-hidden":"true",className:"hidden text-primary-foreground [@media(hover:hover)]:group-hover/chip:block"})]})]}))}function I(r){var e=r,{className:a,size:s,children:i="Limpar"}=e,d=m(e,["className","size","children"]);return o("button",u(h({"data-slot":"chip-clear",className:c(C({size:s}),a)},d),{type:"button",children:[t("span",{className:"truncate",children:i}),t(v,{"aria-hidden":"true"})]}))}export{M as Chip,H as ChipChoice,I as ChipClear,B as ChipFilter,C as chipClearVariants,x as chipSelectableVariants,j as chipVariants};
|
|
4
4
|
//# sourceMappingURL=Chip.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medway-ui/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.35.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Biblioteca de componentes e assets para o sistema Medway",
|
|
6
6
|
"author": "Alekcarvalho",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"types": "dist/index.d.ts",
|
|
11
11
|
"files": [
|
|
12
12
|
"dist",
|
|
13
|
+
"tokens.css",
|
|
13
14
|
"README.md",
|
|
14
15
|
"COMPONENTS.md",
|
|
15
16
|
"COMPONENTS_SUMMARY.md"
|
|
@@ -84,7 +85,7 @@
|
|
|
84
85
|
"@commitlint/cli": "^19.8.1",
|
|
85
86
|
"@commitlint/config-conventional": "^19.8.1",
|
|
86
87
|
"@eslint/eslintrc": "^3",
|
|
87
|
-
"@medway-ui/icons": "^1.
|
|
88
|
+
"@medway-ui/icons": "^1.15.0",
|
|
88
89
|
"@medway-ui/notes-core": "link:notes-core",
|
|
89
90
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
90
91
|
"@tiptap/core": "^3.31.3",
|
package/tokens.css
ADDED