@manakind/ui-core 0.24.0 → 0.25.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/README.md +2 -0
- package/dist/alert/alert.js.map +1 -1
- package/dist/alert/index.js.map +1 -1
- package/dist/avatar/avatar.js.map +1 -1
- package/dist/avatar/index.js.map +1 -1
- package/dist/badge/badge.js.map +1 -1
- package/dist/badge/index.js.map +1 -1
- package/dist/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/breadcrumb/index.js.map +1 -1
- package/dist/button/button.js.map +1 -1
- package/dist/button/icon-button.js.map +1 -1
- package/dist/button/index.js.map +1 -1
- package/dist/calendar/calendar.js.map +1 -1
- package/dist/calendar/index.js.map +1 -1
- package/dist/card/card.js.map +1 -1
- package/dist/card/index.js.map +1 -1
- package/dist/centered-layout/centered-layout.js.map +1 -1
- package/dist/centered-layout/index.js.map +1 -1
- package/dist/checkbox/checkbox.js.map +1 -1
- package/dist/checkbox/index.js.map +1 -1
- package/dist/combobox/combobox.js.map +1 -1
- package/dist/combobox/index.js.map +1 -1
- package/dist/cx.js.map +1 -1
- package/dist/date-input/date-input.js.map +1 -1
- package/dist/date-input/index.js.map +1 -1
- package/dist/dialog/dialog-close.js.map +1 -1
- package/dist/dialog/dialog.js.map +1 -1
- package/dist/dialog/index.js.map +1 -1
- package/dist/divider/divider.js.map +1 -1
- package/dist/divider/index.js.map +1 -1
- package/dist/empty-state/empty-state.js.map +1 -1
- package/dist/empty-state/index.js.map +1 -1
- package/dist/fallback-glyphs.js.map +1 -1
- package/dist/field/field.js.map +1 -1
- package/dist/field/index.js.map +1 -1
- package/dist/field/input.js.map +1 -1
- package/dist/field/textarea.js.map +1 -1
- package/dist/field/use-field-control.js.map +1 -1
- package/dist/form-layout/form-layout.js.map +1 -1
- package/dist/form-layout/index.js.map +1 -1
- package/dist/group-items.js.map +1 -1
- package/dist/icon/icon.js.map +1 -1
- package/dist/icon/index.js.map +1 -1
- package/dist/illustration/illustration.js.map +1 -1
- package/dist/illustration/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/iso-date.js.map +1 -1
- package/dist/layout/index.js.map +1 -1
- package/dist/layout/layout.js.map +1 -1
- package/dist/link/index.js.map +1 -1
- package/dist/link/link.js.map +1 -1
- package/dist/link-component.js.map +1 -1
- package/dist/menu/action-menu.js.map +1 -1
- package/dist/menu/index.js.map +1 -1
- package/dist/menu/menu.js.map +1 -1
- package/dist/page-layout/index.js.map +1 -1
- package/dist/page-layout/page-layout.js.map +1 -1
- package/dist/popover/index.js.map +1 -1
- package/dist/popover/popover.js.map +1 -1
- package/dist/portal-container.js.map +1 -1
- package/dist/progress/index.js.map +1 -1
- package/dist/progress/progress.js.map +1 -1
- package/dist/reorder-control/index.js.map +1 -1
- package/dist/reorder-control/reorder-control.js.map +1 -1
- package/dist/scroll-area/index.js.map +1 -1
- package/dist/scroll-area/scroll-area.js.map +1 -1
- package/dist/section/index.js.map +1 -1
- package/dist/section/section.js.map +1 -1
- package/dist/segment-group/index.js.map +1 -1
- package/dist/segment-group/segment-group.js.map +1 -1
- package/dist/select/index.js.map +1 -1
- package/dist/select/select.js.map +1 -1
- package/dist/show/index.js.map +1 -1
- package/dist/show/show.js.map +1 -1
- package/dist/skeleton/index.js.map +1 -1
- package/dist/skeleton/skeleton.js.map +1 -1
- package/dist/slider/index.d.ts +3 -0
- package/dist/slider/index.d.ts.map +1 -0
- package/dist/slider/index.js +2 -0
- package/dist/slider/index.js.map +1 -0
- package/dist/slider/slider.css +63 -0
- package/dist/slider/slider.css.d.ts +2 -0
- package/dist/slider/slider.d.ts +34 -0
- package/dist/slider/slider.d.ts.map +1 -0
- package/dist/slider/slider.js +14 -0
- package/dist/slider/slider.js.map +1 -0
- package/dist/spinner/index.js.map +1 -1
- package/dist/spinner/spinner.js.map +1 -1
- package/dist/split-layout/index.js.map +1 -1
- package/dist/split-layout/split-layout.js.map +1 -1
- package/dist/sticky/index.js.map +1 -1
- package/dist/sticky/sticky.js.map +1 -1
- package/dist/switch/index.js.map +1 -1
- package/dist/switch/switch.js.map +1 -1
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/tabs.js.map +1 -1
- package/dist/text/index.js.map +1 -1
- package/dist/text/text.js.map +1 -1
- package/dist/visually-hidden/index.js.map +1 -1
- package/dist/visually-hidden/visually-hidden.js.map +1 -1
- package/dist/wizard-layout/index.js.map +1 -1
- package/dist/wizard-layout/wizard-layout.js.map +1 -1
- package/package.json +10 -2
package/README.md
CHANGED
|
@@ -92,6 +92,8 @@ separately, so an app can load only what it renders.
|
|
|
92
92
|
| `@manakind/ui-core/sticky` | `Sticky` |
|
|
93
93
|
| `@manakind/ui-core/empty-state` | `EmptyState` |
|
|
94
94
|
| `@manakind/ui-core/page-layout` | `PageLayout`, `PageHeader`, `PageTitle`, `PageDescription`, `PageActions` |
|
|
95
|
+
| `@manakind/ui-core/slider` | `Slider` |
|
|
96
|
+
| `@manakind/ui-core/css/slider` | Slider structural CSS |
|
|
95
97
|
| `@manakind/ui-core/section` | `Section` |
|
|
96
98
|
| `@manakind/ui-core/split-layout` | `SplitLayout`, `SplitMain`, `SplitAside` |
|
|
97
99
|
| `@manakind/ui-core/form-layout` | `FormLayout`, `FormActions` |
|
package/dist/alert/alert.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.js","sourceRoot":"","sources":["../../src/alert/alert.tsx"],"names":[],"mappings":";AACA,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,IAAI,EAAmB,MAAM,SAAS,CAAC;AAahD,MAAM,YAAY,GAAoC;IACpD,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,OAAO;CAChB,CAAC;AAwBF;;;;;;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UAAU,EAAE,aAAa,OAAO,EAAE,EAAE,SAAS,CAAC,KACxD,IAAI,aAEP,IAAI,IAAI,CACP,eAAM,SAAS,EAAC,gBAAgB,YAC9B,KAAC,IAAI,IAAC,MAAM,EAAE,IAAI,EAAE,UAAU,SAAG,GAC5B,CACR,EACD,eAAK,SAAS,EAAC,gBAAgB,aAC5B,KAAK,IAAI,IAAI,IAAI,YAAG,SAAS,EAAC,iBAAiB,YAAE,KAAK,GAAK,EAC3D,QAAQ,IAAI,IAAI,IAAI,cAAK,SAAS,EAAC,uBAAuB,YAAE,QAAQ,GAAO,IACxE,IACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\nimport './alert.css';\nimport { cx } from '../cx';\nimport { Icon, type IconSource } from '../icon';\n\nexport type AlertVariant = 'info' | 'success' | 'warning' | 'danger';\n\n/**\n * `alert` interrupts, and is announced when the element is inserted. `status`\n * waits until the reader is idle, and assistive tech announces only changes\n * inside a region it already knows about: a `status` alert mounted with its\n * content may go unannounced, so keep it mounted and change its text, or use\n * `alert`. Warnings and failures interrupt by default, the other two do not.\n */\nexport type AlertRole = 'status' | 'alert';\n\nconst DEFAULT_ROLE: Record<AlertVariant, AlertRole> = {\n info: 'status',\n success: 'status',\n warning: 'alert',\n danger: 'alert',\n};\n\nexport type AlertProps = Omit<ComponentProps<'div'>, 'role' | 'title'> & {\n /**\n * Tone and colour. `info` is the default; `warning` and `danger` also change\n * the live-region role (see {@link AlertRole}).\n */\n variant?: AlertVariant;\n /**\n * Live-region role. Leave it unset and the variant picks one.\n */\n role?: AlertRole;\n /** The one-line headline. Keep it to what happened. */\n title?: ReactNode;\n /**\n * Glyph before the text. Decorative: the variant's role and text say what\n * kind of message this is. `ui-core` ships no icons, so a product passes\n * one of its own.\n */\n icon?: IconSource;\n /** The message body: what to do about it. */\n children?: ReactNode;\n};\n\n/**\n * An inline message about the surrounding content: a failed save, a setting\n * that needs attention, a result worth confirming. It stays in the flow of the\n * page; a message about the whole app is a toast, and a question is a Dialog.\n *\n * Give it a `title`, `children`, or both. A title alone is a short notice; a\n * body alone is a sentence of explanation. The variant's text colour clears\n * 4.5:1 on its own fill in both themes, and the border is that same colour,\n * so the box is bounded on any surface.\n */\nexport function Alert({\n variant = 'info',\n role,\n title,\n icon,\n children,\n className,\n ...rest\n}: AlertProps) {\n return (\n <div\n role={role ?? DEFAULT_ROLE[variant]}\n className={cx('ds-alert', `ds-alert--${variant}`, className)}\n {...rest}\n >\n {icon && (\n <span className=\"ds-alert__icon\">\n <Icon source={icon} decorative />\n </span>\n )}\n <div className=\"ds-alert__body\">\n {title != null && <p className=\"ds-alert__title\">{title}</p>}\n {children != null && <div className=\"ds-alert__description\">{children}</div>}\n </div>\n </div>\n );\n}\n"]}
|
package/dist/alert/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/alert/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/alert/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC","sourcesContent":["export type { AlertProps, AlertRole, AlertVariant } from './alert';\nexport { Alert } from './alert';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.js","sourceRoot":"","sources":["../../src/avatar/avatar.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AACrD,OAAO,cAAc,CAAC;AAgCtB;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC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EACV,SAAS,EACT,GAAG,KAAK,EACI;IACZ,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,SAAG,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7E,MAAM,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;IAEzF,OAAO,CACL,eAAM,SAAS,EAAE,EAAE,CAAC,WAAW,EAAE,cAAc,IAAI,EAAE,EAAE,SAAS,CAAC,KAAM,IAAI,KAAM,KAAK,YACnF,QAAQ,IAAI,QAAQ,GAChB,CACR,CAAC;AACJ,CAAC","sourcesContent":["import type { ComponentProps } from 'react';\nimport { cx } from '../cx';\nimport { Icon, type IconSource } from '../icon/icon';\nimport './avatar.css';\n\nexport type AvatarSize = 'sm' | 'md' | 'lg';\n\n/**\n * An avatar beside the name it stands for is decorative; one standing alone,\n * such as the content of a menu trigger whose button has no name of its\n * own, needs a label. The pairing is a compile error rather than a\n * convention, mirroring `IconProps`.\n */\ntype AvatarA11y = { label: string; decorative?: never } | { decorative: true; label?: never };\n\nexport type AvatarProps = Omit<\n ComponentProps<'span'>,\n 'children' | 'aria-label' | 'aria-hidden' | 'role'\n> &\n AvatarA11y & {\n /**\n * The person's name. The avatar shows its initials: the first letter of\n * the first and last words, or the first two letters of a single word.\n */\n name: string;\n /**\n * Glyph shown when the name yields no initials, such as a person glyph for\n * an account without a name. Decorative; without it the avatar is a bare\n * disc.\n */\n icon?: IconSource;\n /** `sm` fits a toolbar, `md` a row, `lg` a profile heading. */\n size?: AvatarSize;\n };\n\n/**\n * The letters an `Avatar` shows for a name: the first letter of the first\n * and last words (\"Pål Taule Brentebråten\" → \"PB\"), the first two letters of\n * a single word (\"Manuia\" → \"MA\"), nothing for an empty name. Upper-cased\n * with the runtime's locale rules, so an initial that changes case by\n * length comes out right.\n */\nexport function initialsOf(name: string): string {\n const words = name.trim().split(/\\s+/).filter(Boolean);\n const first = words[0];\n if (first === undefined) return '';\n const last = words.length > 1 ? words[words.length - 1] : undefined;\n const letters =\n last === undefined\n ? Array.from(first).slice(0, 2)\n : [Array.from(first)[0], Array.from(last)[0]];\n return letters.join('').toLocaleUpperCase();\n}\n\n/**\n * A person, as initials in a disc.\n *\n * Renders a `span`. Labelled, it is `role=\"img\"` named by `label`; decorative,\n * it is hidden from assistive technology and the text beside it carries the\n * name. The look comes from the `--ds-avatar-*` keys.\n *\n * ```tsx\n * <Avatar name={user.name} icon={PersonGlyph} decorative />\n * <span>{user.name}</span>\n * ```\n */\nexport function Avatar({\n name,\n icon,\n size = 'md',\n label,\n decorative,\n className,\n ...props\n}: AvatarProps) {\n const initials = initialsOf(name);\n const fallback = icon ? <Icon source={icon} size={size} decorative /> : null;\n const a11y = decorative ? { 'aria-hidden': true } : { role: 'img', 'aria-label': label };\n\n return (\n <span className={cx('ds-avatar', `ds-avatar--${size}`, className)} {...a11y} {...props}>\n {initials || fallback}\n </span>\n );\n}\n"]}
|
package/dist/avatar/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/avatar/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/avatar/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC","sourcesContent":["export type { AvatarProps, AvatarSize } from './avatar';\nexport { Avatar, initialsOf } from './avatar';\n"]}
|
package/dist/badge/badge.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-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AC,UAAU,SAAG,EACnD,KAAK,IACG,CACZ,CAAC;AACJ,CAAC","sourcesContent":["import { ark } from '@ark-ui/react/factory';\nimport type { ComponentProps } from 'react';\nimport { Icon, type IconSource } from '../icon';\nimport './badge.css';\nimport { cx } from '../cx';\n\nexport type BadgeVariant =\n | 'solid'\n | 'muted'\n | 'outline'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger';\n\nexport type BadgeShape = 'pill' | 'circle';\n\n/**\n * `compact` hides the label, so it may only be used with a glyph to replace it\n * and a name to announce — otherwise the badge is a bare colour chip, and\n * colour alone is never a signal.\n *\n * Expressed as a discriminated union so the pairing is a compile error rather\n * than a convention, mirroring `IconProps`' label/decorative union.\n */\ntype BadgeCompact =\n | { compact: true; icon: IconSource; 'aria-label': string }\n | { compact?: false | undefined; icon?: IconSource };\n\n/**\n * `plain` drops the fill, so a variant's text must read on the surface behind\n * it. Every variant's does except `solid`, whose text colour is made for its\n * own dark fill and disappears without it, so that pairing is a compile error.\n */\ntype BadgeLook =\n | {\n /**\n * Visual treatment.\n *\n * `solid` is the emphatic one — use it sparingly, at most once in a view.\n * `muted` and `outline` are the neutral workhorses. `info`, `success`,\n * `warning`, and `danger` are tinted status treatments.\n */\n variant?: BadgeVariant;\n /**\n * `filled` (default) draws the variant's fill and border. `plain` drops\n * both and keeps the variant's colour on the glyph and label, for a\n * status that sits inside a busier composition and should not add a\n * chip of its own. Its text is then measured against the surface\n * behind it, not against a tint.\n */\n appearance?: 'filled';\n }\n | { variant?: Exclude<BadgeVariant, 'solid'>; appearance: 'plain' };\n\n/**\n * `labelClassName` lets a composition hide the label (a container query, say),\n * so the badge must then carry its own name: without `aria-label` a hidden\n * label leaves the badge unnamed, since the glyph is always decorative.\n * Required here the same way `compact` requires it.\n */\ntype BadgeLabelClass =\n | {\n /**\n * Your own class on the label wrapper, so a composition can style the\n * label — for instance hide it from a container query when space runs\n * out — without selecting `ui-core`'s classes. The wrapper exists only\n * when there is an `icon`, so a label can never be hidden without a glyph\n * left in its place: colour alone is never the signal.\n */\n labelClassName: string;\n 'aria-label': string;\n }\n | { labelClassName?: undefined };\n\nexport type BadgeProps = Omit<ComponentProps<typeof ark.span>, 'asChild'> &\n BadgeCompact &\n BadgeLook &\n BadgeLabelClass & {\n /**\n * `pill` is the default. `circle` is for counts: a true circle at one or two\n * digits, and a fixed-height lozenge beyond that.\n *\n * The height is pinned on purpose — see the note in `badge.css`. An earlier\n * `aspect-ratio` grew a three-digit count in both directions, which made the\n * badge taller than its row and broke the nested radius of any track it sat\n * in.\n *\n * Only use it for short numerics. Words in a circle wrap badly, and past two\n * digits the shape stops being a circle anyway.\n */\n shape?: BadgeShape;\n };\n\nexport type BadgeAppearance = NonNullable<BadgeProps['appearance']>;\n\n/*\n * `icon` and `compact` are declared on `BadgeCompact` above rather than here,\n * so their docs live with the union that constrains them:\n *\n * icon — glyph before the label, supplied by the product so this package\n * never imports an icon set. Always decorative; the label beside\n * it says the same thing, and when the label is collapsed the\n * badge's own `aria-label` carries the name. Announcing both would\n * read the status twice.\n *\n * compact — collapse to the glyph alone: square geometry, no visible label.\n * Requires `icon` and `aria-label`, enforced by the union.\n *\n * For a badge that should collapse only when space runs out, leave `compact`\n * off, pass a `labelClassName`, and hide that class from a container query —\n * GoalCard's status badge is the worked example.\n */\n\n/**\n * Small inline label for counts, states, and categories.\n *\n * Renders a `span`, so a badge is decorative text by default. If the badge\n * carries meaning that is not repeated in nearby text — a count, a status —\n * give it an `aria-label` so it is announced usefully rather than as a bare\n * number. Labelling it also switches it to `role=\"img\"`, because `aria-label`\n * on a role-less `span` is prohibited and would not be announced.\n *\n * A badge is not a button. If it needs to be clickable, put it inside one.\n *\n * Colour alone must never be the only signal a badge carries. Pair a status\n * variant with text (or an `aria-label`) that says the same thing.\n *\n * @example Status that survives a narrow card\n * ```tsx\n * <Badge variant=\"success\" icon={CheckIcon} aria-label=\"Completed\">\n * Completed\n * </Badge>\n * ```\n * Reads as \"Completed\" wide, collapses to the glyph when the container\n * shrinks, and announces the same name at every width.\n */\nexport function Badge({\n variant = 'muted',\n shape = 'pill',\n appearance = 'filled',\n labelClassName,\n icon,\n compact = false,\n className,\n children,\n ...props\n}: BadgeProps) {\n /*\n * ARIA prohibits `aria-label` on a role-less `span` (it resolves to\n * `role=\"generic\"`), so the label is not reliably announced — axe reports\n * `aria-prohibited-attr`. Since the whole point of the label is to replace\n * the bare text, `role=\"img\"` is the honest role: it makes the element a\n * single labelled node and the label becomes its accessible name.\n *\n * Only applied when a label is actually present. An unlabelled badge is\n * decorative text and should stay a plain `span`.\n */\n const labelled = props['aria-label'] !== undefined || props['aria-labelledby'] !== undefined;\n\n /*\n * Wrapped only when there is a glyph, because the wrapper exists to be\n * collapsed against one. A text-only badge keeps its bare-text DOM.\n */\n const label = icon ? (\n <span className={cx('ds-badge__label', labelClassName)}>{children}</span>\n ) : (\n children\n );\n\n return (\n <ark.span\n role={labelled ? 'img' : undefined}\n className={cx(\n 'ds-badge',\n `ds-badge--${variant}`,\n `ds-badge--${shape}`,\n appearance === 'plain' && 'ds-badge--plain',\n compact && 'ds-badge--compact',\n className,\n )}\n {...props}\n >\n {icon && <Icon source={icon} size=\"sm\" decorative />}\n {label}\n </ark.span>\n );\n}\n"]}
|
package/dist/badge/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/badge/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/badge/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC","sourcesContent":["export type { BadgeAppearance, BadgeProps, BadgeShape, BadgeVariant } from './badge';\nexport { Badge } from './badge';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb.js","sourceRoot":"","sources":["../../src/breadcrumb/breadcrumb.tsx"],"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adcrumb.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,IAAI,EAAmB,MAAM,SAAS,CAAC;AAEhD,OAAO,kBAAkB,CAAC;AAgC1B;;;;;;;;;GASG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,KAAK,EACL,KAAK,EACL,SAAS,EACT,aAAa,EAAE,IAAI,GAAG,GAAG,EACzB,SAAS,GACO;IAChB,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACpC,MAAM,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC,CAC1B,KAAC,IAAI,IAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAC,IAAI,EAAC,UAAU,QAAC,SAAS,EAAC,0BAA0B,GAAG,CACtF,CAAC,CAAC,CAAC,CACF,eAAM,SAAS,EAAC,0BAA0B,iBAAa,MAAM,kBAEtD,CACR,CAAC;IACF,OAAO,CACL,4BAAiB,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC,eAAe,EAAE,SAAS,CAAC,YAC/D,aAAI,SAAS,EAAC,qBAAqB,YAChC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC1B,cAAkB,SAAS,EAAC,qBAAqB,aAC9C,KAAK,GAAG,CAAC,IAAI,OAAO,EACpB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CACX,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,SAAS,EAAC,qBAAqB,YACnD,IAAI,CAAC,KAAK,GACN,CACR,CAAC,CAAC,CAAC,CACF,eAAM,SAAS,EAAC,qBAAqB,YAAE,IAAI,CAAC,KAAK,GAAQ,CAC1D,KARM,IAAI,CAAC,EAAE,CASX,CACN,CAAC,GACC,GACD,CACP,CAAC;AACJ,CAAC","sourcesContent":["import type { ElementType, ReactNode } from 'react';\nimport { cx } from '../cx';\nimport { Icon, type IconSource } from '../icon';\nimport type { LinkComponentProps } from '../link-component';\nimport './breadcrumb.css';\n\n/** One ancestor in the trail. */\nexport interface BreadcrumbItem {\n /** Stable key. */\n id: string;\n /** What the ancestor is called. A node, so a product can pass a richer label (a category's colour mark, say). */\n label: ReactNode;\n /** Makes the item a link to the ancestor. */\n href?: string;\n}\n\n/** What the link component receives; the props every `linkComponent` takes. */\nexport type BreadcrumbLinkProps = LinkComponentProps;\n\nexport interface BreadcrumbProps {\n /** The ancestors, outermost first. Renders nothing when empty. */\n items: BreadcrumbItem[];\n /**\n * The trail's accessible name: its navigation landmark's. Required, since a\n * list of rows each with a trail would otherwise repeat one landmark name;\n * name it after what it locates (\"Where Book the physio lives\").\n */\n label: string;\n /** Glyph between items, supplied by the product. Must point RIGHT in a left-to-right layout. Falls back to \"/\". */\n separator?: IconSource;\n /** Renders each link, so a product passes its router's link. Defaults to `<a>`. */\n linkComponent?: ElementType<BreadcrumbLinkProps>;\n /** Extra class names on the `<nav>`. */\n className?: string;\n}\n\n/**\n * Where something lives: its ancestors, outermost first, each a link when it\n * has a place of its own. Above a page title, or above a list row's title\n * when the row is filed in a hierarchy.\n *\n * @remarks\n * The trail lists ancestors only — the thing itself is the heading beside it —\n * so no item carries `aria-current`. The separators are decorative; a screen\n * reader hears a list of links in a navigation landmark.\n */\nexport function Breadcrumb({\n items,\n label,\n separator,\n linkComponent: Link = 'a',\n className,\n}: BreadcrumbProps) {\n if (items.length === 0) return null;\n const divider = separator ? (\n <Icon source={separator} size=\"sm\" decorative className=\"ds-breadcrumb__separator\" />\n ) : (\n <span className=\"ds-breadcrumb__separator\" aria-hidden=\"true\">\n /\n </span>\n );\n return (\n <nav aria-label={label} className={cx('ds-breadcrumb', className)}>\n <ol className=\"ds-breadcrumb__list\">\n {items.map((item, index) => (\n <li key={item.id} className=\"ds-breadcrumb__item\">\n {index > 0 && divider}\n {item.href ? (\n <Link href={item.href} className=\"ds-breadcrumb__link\">\n {item.label}\n </Link>\n ) : (\n <span className=\"ds-breadcrumb__text\">{item.label}</span>\n )}\n </li>\n ))}\n </ol>\n </nav>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/breadcrumb/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/breadcrumb/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC","sourcesContent":["export type { BreadcrumbItem, BreadcrumbLinkProps, BreadcrumbProps } from './breadcrumb';\nexport { Breadcrumb } from './breadcrumb';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/button/button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAEL,YAAY,EACZ,QAAQ,EACR,cAAc,GAGf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AACrD,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AA8E3B,SAAS,aAAa,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAsB;IACzF,OAAO,CACL,8BACG,OAAO,IAAI,eAAM,SAAS,EAAC,oBAAoB,iBAAa,MAAM,GAAG,EACrE,WAAW,IAAI,CACd,KAAC,IAAI,IACH,MAAM,EAAE,WAAW,EACnB,IAAI,EAAC,IAAI,EACT,UAAU,QACV,SAAS,EAAC,0CAA0C,GACpD,CACH,EACD,eAAM,SAAS,EAAC,kBAAkB,YAAE,QAAQ,GAAQ,EACnD,YAAY,IAAI,CACf,KAAC,IAAI,IACH,MAAM,EAAE,YAAY,EACpB,IAAI,EAAC,IAAI,EACT,UAAU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AI,EACJ,SAAS,EACT,KAAK,EACL,OAAO,GAAG,KAAK,EACf,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACY;IACpB,OAAO,CACL,KAAC,GAAG,CAAC,MAAM,IACT,QAAQ,EAAE,QAAQ,IAAI,OAAO,EAC7B,SAAS,EAAE,EAAE,CACX,UAAU,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,SAAS,CAAC,EAC1D,OAAO,IAAI,oBAAoB,CAChC,KACG,KAAK,YAET,KAAC,aAAa,IAAC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,YAClF,QAAQ,GACK,GACL,CACd,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,MAAM,CAAC,KAAkB;IACvC,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAC,aAAa,OAAK,KAAK,GAAI,CAAC,CAAC,CAAC,KAAC,cAAc,OAAK,KAAK,GAAI,CAAC;AACtF,CAAC","sourcesContent":["import { ark } from '@ark-ui/react/factory';\nimport {\n type ComponentProps,\n cloneElement,\n Fragment,\n isValidElement,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { Icon, type IconSource } from '../icon/icon';\nimport './button.css';\nimport { cx } from '../cx';\n\nexport type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'danger';\nexport type ButtonSize = 'sm' | 'md' | 'lg';\n\ninterface ButtonOwnProps {\n /** Visual style variant. */\n variant?: ButtonVariant;\n /** Size preset. */\n size?: ButtonSize;\n /**\n * Decorative icon rendered before the label.\n *\n * The icon sits beside text, so it is always the `sm` step of the icon\n * scale whatever the button size, and it inherits the button's text\n * color via `currentColor`. The icon is\n * always rendered as decorative — the accessible name comes from the\n * button's children.\n */\n leadingIcon?: IconSource;\n /**\n * Decorative icon rendered after the label. Same rendering contract as\n * {@link ButtonOwnProps.leadingIcon}.\n */\n trailingIcon?: IconSource;\n /** Whether the button takes the whole width of its row: a form's submit, a card's one action. */\n fullWidth?: boolean;\n /**\n * Where the label sits when the button is wider than its content: centred\n * by default, or at the start, with a trailing icon kept at the end, for a\n * trigger that reads as a field (a picker). Inline rather than a named\n * union: `check:variant-parity` would ask the native Button, which has no\n * label alignment, to export the same name.\n */\n align?: 'center' | 'start';\n}\n\ntype ArkButtonProps = Omit<ComponentProps<typeof ark.button>, 'asChild'>;\n\ninterface ButtonAsButtonProps extends ButtonOwnProps, ArkButtonProps {\n asChild?: false;\n /** Show loading spinner and disable interaction. */\n loading?: boolean;\n}\n\n/**\n * With `asChild` the child is the control, so everything that belongs to the\n * control goes on the child: `href`, handlers, `ref`, ARIA. Button adds its\n * look and nothing else, which is why no other prop is accepted here.\n *\n * A link has no disabled state: `disabled` is not an attribute of `<a>`, and\n * an anchor with an `href` stays reachable and clickable whatever it looks\n * like. So neither `disabled` nor `loading` exists. Render a `Button`, or no\n * control at all, when the destination is unavailable.\n */\ninterface ButtonAsChildProps extends ButtonOwnProps {\n /**\n * Render the single child element instead of a `<button>`, styled as this\n * button.\n */\n asChild: true;\n /**\n * The one element rendered as the control. Its own children become the\n * label. A component works if it passes `className` and `children` on to\n * the element it renders, as a router's link does.\n */\n children: ReactElement<{ className?: string; children?: ReactNode }>;\n /** Extra class names appended after the `ds-button` modifiers. */\n className?: string;\n}\n\nexport type ButtonProps = ButtonAsButtonProps | ButtonAsChildProps;\n\ninterface ButtonContentProps extends Pick<ButtonOwnProps, 'leadingIcon' | 'trailingIcon'> {\n loading: boolean;\n children: ReactNode;\n}\n\nfunction ButtonContent({ loading, leadingIcon, trailingIcon, children }: ButtonContentProps) {\n return (\n <>\n {loading && <span className=\"ds-button__spinner\" aria-hidden=\"true\" />}\n {leadingIcon && (\n <Icon\n source={leadingIcon}\n size=\"sm\"\n decorative\n className=\"ds-button__icon ds-button__icon--leading\"\n />\n )}\n <span className=\"ds-button__label\">{children}</span>\n {trailingIcon && (\n <Icon\n source={trailingIcon}\n size=\"sm\"\n decorative\n className=\"ds-button__icon ds-button__icon--trailing\"\n />\n )}\n </>\n );\n}\n\nfunction classesFor(\n { variant = 'primary', size = 'md', fullWidth = false, align = 'center' }: ButtonOwnProps,\n className?: string,\n) {\n return cx(\n 'ds-button',\n `ds-button--${variant}`,\n `ds-button--${size}`,\n fullWidth && 'ds-button--full-width',\n align !== 'center' && `ds-button--align-${align}`,\n className,\n );\n}\n\nfunction ButtonAsChild({\n variant,\n size,\n fullWidth,\n align,\n leadingIcon,\n trailingIcon,\n className,\n children,\n}: ButtonAsChildProps) {\n if (!isValidElement(children) || children.type === Fragment) {\n throw new Error(\n 'Button asChild needs exactly one element as its child, such as <a> or a router link.',\n );\n }\n\n const content = (\n <ButtonContent loading={false} leadingIcon={leadingIcon} trailingIcon={trailingIcon}>\n {children.props.children}\n </ButtonContent>\n );\n\n return cloneElement(\n children,\n {\n className: cx(\n classesFor({ variant, size, fullWidth, align }, className),\n children.props.className,\n ),\n },\n content,\n );\n}\n\nfunction ButtonAsButton({\n variant,\n size,\n fullWidth,\n align,\n loading = false,\n disabled,\n leadingIcon,\n trailingIcon,\n className,\n children,\n ...props\n}: ButtonAsButtonProps) {\n return (\n <ark.button\n disabled={disabled || loading}\n className={cx(\n classesFor({ variant, size, fullWidth, align }, className),\n loading && 'ds-button--loading',\n )}\n {...props}\n >\n <ButtonContent loading={loading} leadingIcon={leadingIcon} trailingIcon={trailingIcon}>\n {children}\n </ButtonContent>\n </ark.button>\n );\n}\n\n/**\n * Shared base button for the Manakind design system.\n *\n * Built on Ark UI for keyboard navigation, focus management, and disabled\n * state handling. Styled exclusively against the `--ds-button-*` token\n * contract; the consuming product is responsible for providing those values\n * via its tokens package (e.g. `@manakind/manuia-tokens/css/theme`).\n *\n * For an icon-only button (no visible label), use `IconButton` instead —\n * it enforces an `aria-label` at the type level.\n *\n * For an action that navigates, pass `asChild` and a link as the only child.\n * The link is what renders, so it keeps what a link does: open in a new tab,\n * copy its address, the router's prefetch. Its `href`, handlers and `ref`\n * stay on the link.\n *\n * ```tsx\n * <Button asChild leadingIcon={PlusCircle}>\n * <a href=\"/goals/new\">Add Goal</a>\n * </Button>\n * ```\n */\nexport function Button(props: ButtonProps) {\n return props.asChild ? <ButtonAsChild {...props} /> : <ButtonAsButton {...props} />;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.js","sourceRoot":"","sources":["../../src/button/icon-button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AAErD,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAwB3B;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,IAAI,EACJ,OAAO,GAAG,SAAS,EACnB,IAAI,GAAG,IAAI,EACX,OAAO,GAAG,KAAK,EACf,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACQ;IAChB,OAAO,CACL,MAAC,GAAG,CAAC,MAAM,IACT,QAAQ,EAAE,QAAQ,IAAI,OAAO,EAC7B,SAAS,EAAE,EAAE,CACX,WAAW,EACX,sBAAsB,EACtB,cAAc,OAAO,EAAE,EACvB,cAAc,IAAI,EAAE,EACpB,OAAO,IAAI,oBAAoB,EAC/B,SAAS,CACV,KACG,KAAK,aAER,OAAO,IAAI,eAAM,SAAS,EAAC,oBAAoB,iBAAa,MAAM,GAAG,EACtE,KAAC,IAAI,IAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,QAAC,SAAS,EAAC,iBAAiB,GAAG,IAC9D,CACd,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"icon-button.js","sourceRoot":"","sources":["../../src/button/icon-button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AAErD,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAwB3B;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,IAAI,EACJ,OAAO,GAAG,SAAS,EACnB,IAAI,GAAG,IAAI,EACX,OAAO,GAAG,KAAK,EACf,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACQ;IAChB,OAAO,CACL,MAAC,GAAG,CAAC,MAAM,IACT,QAAQ,EAAE,QAAQ,IAAI,OAAO,EAC7B,SAAS,EAAE,EAAE,CACX,WAAW,EACX,sBAAsB,EACtB,cAAc,OAAO,EAAE,EACvB,cAAc,IAAI,EAAE,EACpB,OAAO,IAAI,oBAAoB,EAC/B,SAAS,CACV,KACG,KAAK,aAER,OAAO,IAAI,eAAM,SAAS,EAAC,oBAAoB,iBAAa,MAAM,GAAG,EACtE,KAAC,IAAI,IAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,QAAC,SAAS,EAAC,iBAAiB,GAAG,IAC9D,CACd,CAAC;AACJ,CAAC","sourcesContent":["import { ark } from '@ark-ui/react/factory';\nimport type { ComponentProps } from 'react';\nimport { Icon, type IconSource } from '../icon/icon';\nimport type { ButtonSize, ButtonVariant } from './button';\nimport './button.css';\nimport { cx } from '../cx';\n\nexport interface IconButtonProps\n extends Omit<ComponentProps<typeof ark.button>, 'children' | 'aria-label' | 'asChild'> {\n /** Decorative icon rendered inside the button. */\n icon: IconSource;\n /**\n * Accessible label announced by assistive tech. Required because the\n * button has no visible text content to derive a name from.\n */\n 'aria-label': string;\n /** Visual style variant. Shared with {@link Button}. */\n variant?: ButtonVariant;\n /**\n * Size preset. The icon is the label, so it takes the icon scale's step of\n * the same name (16 / 24 / 32px) and the circle keeps the same inset around\n * it (32 / 40 / 48px). The circle is taller than a text `Button` of the\n * same size from `md` up.\n */\n size?: ButtonSize;\n /** Show loading spinner and disable interaction. */\n loading?: boolean;\n}\n\n/**\n * Square, icon-only button for the Manakind design system.\n *\n * Shares the full visual contract with `Button` (same variants, sizes,\n * focus ring, disabled + loading behavior) by reusing the `ds-button`\n * class plus a `ds-button--icon-only` modifier. The only API difference\n * is that `aria-label` is required at the type level — an icon-only\n * button has no visible text to derive an accessible name from.\n */\nexport function IconButton({\n icon,\n variant = 'primary',\n size = 'md',\n loading = false,\n disabled,\n className,\n ...props\n}: IconButtonProps) {\n return (\n <ark.button\n disabled={disabled || loading}\n className={cx(\n 'ds-button',\n 'ds-button--icon-only',\n `ds-button--${variant}`,\n `ds-button--${size}`,\n loading && 'ds-button--loading',\n className,\n )}\n {...props}\n >\n {loading && <span className=\"ds-button__spinner\" aria-hidden=\"true\" />}\n <Icon source={icon} size={size} decorative className=\"ds-button__icon\" />\n </ark.button>\n );\n}\n"]}
|
package/dist/button/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/button/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/button/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC","sourcesContent":["export type { ButtonProps, ButtonSize, ButtonVariant } from './button';\nexport { Button } from './button';\nexport type { IconButtonProps } from './icon-button';\nexport { IconButton } from './icon-button';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../src/calendar/calendar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,IAAI,aAAa,EA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AAS,EAAC,uBAAuB,YAAE,GAAG,CAAC,GAAG,GAAQ,GACzB,IAN5B,GAAG,CAAC,QAAQ,EAAE,CAOK,CAC3B,CAAC,IAXyB,IAAI,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAYvB,CAC1B,CAAC,GACsB,IACN,IACrB,CACJ,GACqB,GACL,GACC,GACL,CACtB,CAAC;AACJ,CAAC","sourcesContent":["import { DatePicker as ArkDatePicker, type DateValue } from '@ark-ui/react/date-picker';\nimport { getLocalTimeZone, today } from '@internationalized/date';\nimport { useEffect, useRef, useState } from 'react';\nimport './calendar.css';\nimport { IconButton } from '../button/icon-button';\nimport { cx } from '../cx';\nimport { ChevronLeft, ChevronRight } from '../fallback-glyphs';\nimport type { IconSource } from '../icon/icon';\nimport { parseIsoDate } from '../iso-date';\n\n/**\n * A stretch of days. Both ends are ISO calendar dates, `YYYY-MM-DD`; `end`\n * is `null` while only the first day is chosen.\n */\nexport interface CalendarRange {\n start: string;\n end: string | null;\n}\n\n/** A day of the week as `Date#getDay()` counts them: 0 is Sunday, 1 is Monday. */\nexport type CalendarWeekday = 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\ninterface CalendarCommonProps {\n /**\n * The calendar's name, saying which day is being chosen: \"Scheduled day\",\n * \"Target date\". A calendar has no label of its own, and the month heading\n * changes as the user pages.\n */\n 'aria-label': string;\n /**\n * BCP 47 tag that decides the month and weekday names and, unless\n * `startOfWeek` says otherwise, the first day of the week. Defaults to\n * `en-GB`: English names, Monday first. The products' own date format is\n * not involved; the grid shows day numbers only.\n */\n locale?: string;\n /** The first column, `0` for Sunday through `6` for Saturday. Defaults to the locale's. */\n startOfWeek?: CalendarWeekday;\n /**\n * The earliest day that can be chosen, `YYYY-MM-DD`. Earlier days are\n * shown but cannot be chosen; a value outside the window is still shown\n * as the value.\n */\n min?: string;\n /** The latest day that can be chosen, `YYYY-MM-DD`. */\n max?: string;\n /**\n * Any day of the month shown first when nothing is chosen yet,\n * `YYYY-MM-DD`. Defaults to the month of the chosen day, else this month.\n */\n defaultMonth?: string;\n /**\n * Moves focus to the chosen day (else the first day shown by\n * `defaultMonth`, else today) once the calendar is in the page. For a calendar opened in a popover, so\n * the arrow keys work at once and a screen reader lands on a day.\n */\n autoFocus?: boolean;\n /** Dims the calendar; nothing in it can be focused or chosen. */\n disabled?: boolean;\n /** Shows the days and the choice, pages freely, but lets nothing be chosen. */\n readOnly?: boolean;\n /**\n * Glyph for the \"previous month\" button. Defaults to a plain built-in\n * chevron so `@manakind/ui-core` renders on its own; products pass their\n * own icon set.\n */\n previousIcon?: IconSource;\n /** Glyph for the \"next month\" button. Same defaulting rule as {@link CalendarCommonProps.previousIcon}. */\n nextIcon?: IconSource;\n /** Extra class names appended after `ds-calendar`. */\n className?: string;\n}\n\ninterface CalendarSingleProps {\n /** One day at a time. The default. */\n selectionMode?: 'single';\n /** The chosen day, `YYYY-MM-DD`, or `null` for none. Leave undefined to let the calendar own it. */\n value?: string | null;\n /** The day chosen at first when uncontrolled, or `null` for none. */\n defaultValue?: string | null;\n /**\n * Fired with the ISO date of the day the user chose. Choosing the chosen\n * day again fires nothing, and the calendar never clears: a product that\n * lets the user unschedule does it with a control of its own.\n */\n onValueChange?: (value: string) => void;\n}\n\ninterface CalendarRangeProps {\n /**\n * A first and a last day. The first click chooses the first day and fires\n * with `end: null`; the second click chooses the last day, in either\n * order, and fires with both; a third click starts a new range.\n */\n selectionMode: 'range';\n /** The chosen range, or `null` for none. Leave undefined to let the calendar own it. */\n value?: CalendarRange | null;\n /** The range chosen at first when uncontrolled, or `null` for none. */\n defaultValue?: CalendarRange | null;\n /** Fired with the range so far: `end` is `null` after the first click of a new range. */\n onValueChange?: (value: CalendarRange) => void;\n}\n\ntype CalendarSelection = CalendarSingleProps | CalendarRangeProps;\n\nexport type CalendarProps = CalendarCommonProps & CalendarSelection;\n\nconst parseIso = (iso: string, prop: string): DateValue => parseIsoDate(iso, `Calendar: ${prop}`);\n\nconst parseOptional = (iso: string | undefined, prop: string): DateValue | undefined =>\n iso === undefined ? undefined : parseIso(iso, prop);\n\n/*\n * Zag keeps every selection as a list of dates: one for a day, up to two\n * for a range. The product's typed shape is folded into that list on the\n * way in and rebuilt on the way out.\n */\nfunction toDateValues(\n selection: CalendarSelection,\n prop: 'value' | 'defaultValue',\n): DateValue[] | undefined {\n const given = selection[prop];\n if (given === undefined) return undefined;\n if (given === null) return [];\n if (typeof given === 'string') return [parseIso(given, prop)];\n const dates = [parseIso(given.start, `${prop}.start`)];\n if (given.end !== null) dates.push(parseIso(given.end, `${prop}.end`));\n return dates;\n}\n\n/*\n * Zag's list can be sparse: a range cleared from outside between its two\n * clicks keeps Zag waiting for an end date, and the next click lands at\n * index 1 of an empty list. The dates that are there are the selection.\n */\nfunction report(selection: CalendarSelection, dates: DateValue[]): void {\n const [start, end] = dates.filter((date) => date !== undefined);\n if (!start) return;\n if (selection.selectionMode === 'range') {\n selection.onValueChange?.({ start: start.toString(), end: end?.toString() ?? null });\n return;\n }\n selection.onValueChange?.(start.toString());\n}\n\n/*\n * The day Zag's keyboard focus and the shown month follow. Zag moves it on\n * its own events only, so a value the parent changes to another month\n * would leave the grid on the old one: the calendar owns it, and moves it\n * to the chosen day whenever the parent chooses a new one.\n */\nfunction useFocusedDay(chosen: DateValue | undefined, fallback: DateValue | undefined) {\n const chosenKey = chosen?.toString();\n const [focused, setFocused] = useState(() => ({\n key: chosenKey,\n day: chosen ?? fallback ?? today(getLocalTimeZone()),\n }));\n if (chosenKey !== focused.key) {\n setFocused({ key: chosenKey, day: chosen ?? focused.day });\n }\n const setDay = (day: DateValue) => setFocused((state) => ({ ...state, day }));\n return [focused.day, setDay] as const;\n}\n\n/**\n * A month of days to choose from, built on Ark UI's DatePicker.\n *\n * The grid shows one month at a time with the weekdays across the top and\n * a button pair to turn the page; the days of the neighbouring months fill\n * the first and last rows, and every month has six rows, so the calendar\n * keeps its height as the user pages. One day is chosen at a time, or a\n * first and a last day with `selectionMode=\"range\"`. The value in and out is\n * an ISO calendar date, `YYYY-MM-DD`, as `DateInput` gives: a string a form\n * library and a database both keep as is, with no time zone to get wrong.\n *\n * It is the grid alone. A product puts it in a `Popover` behind a button\n * that shows the choice, or in the page, and gives it `aria-label`; the\n * labels the grid speaks (\"Choose Wednesday 12 June 2024\", \"Previous month\")\n * are English, as Ark's are.\n *\n * ```tsx\n * <Calendar aria-label=\"Scheduled day\" value={day} onValueChange={setDay} autoFocus />\n * ```\n */\nexport function Calendar({\n 'aria-label': ariaLabel,\n locale = 'en-GB',\n startOfWeek,\n min,\n max,\n defaultMonth,\n autoFocus = false,\n disabled,\n readOnly,\n previousIcon = ChevronLeft,\n nextIcon = ChevronRight,\n className,\n ...selection\n}: CalendarProps) {\n const rootRef = useRef<HTMLDivElement>(null);\n const controlledDates = toDateValues(selection, 'value');\n const initialDates = toDateValues(selection, 'defaultValue');\n const [focusedDay, setFocusedDay] = useFocusedDay(\n controlledDates?.[0] ?? initialDates?.[0],\n parseOptional(defaultMonth, 'defaultMonth'),\n );\n const minDate = parseOptional(min, 'min');\n const maxDate = parseOptional(max, 'max');\n\n /*\n * Passed as unavailable days rather than Zag's own `min`/`max`, which clamp\n * a value outside them to the nearest allowed day and show that day as\n * chosen while the parent holds another. Unavailable days are disabled and\n * cannot be chosen, and a value outside the window stays the value.\n */\n const isOutsideWindow = (date: DateValue) =>\n (minDate !== undefined && date.compare(minDate) < 0) ||\n (maxDate !== undefined && date.compare(maxDate) > 0);\n\n /*\n * Zag gives the focused day `tabindex=\"0\"` and every other day `-1`; the\n * one day in the tab order is the one to land on. An effect, because the\n * focus is the browser's.\n */\n useEffect(() => {\n if (!autoFocus) return;\n rootRef.current\n ?.querySelector<HTMLElement>('[data-part=\"table-cell-trigger\"][tabindex=\"0\"]')\n ?.focus({ preventScroll: true });\n }, [autoFocus]);\n\n return (\n <ArkDatePicker.Root\n ref={rootRef}\n className={cx('ds-calendar', className)}\n inline\n closeOnSelect={false}\n fixedWeeks\n outsideDaySelectable\n selectionMode={selection.selectionMode ?? 'single'}\n value={controlledDates}\n defaultValue={initialDates}\n onValueChange={(details) => report(selection, details.value)}\n focusedValue={focusedDay}\n onFocusChange={(details) => setFocusedDay(details.focusedValue)}\n isDateUnavailable={minDate || maxDate ? isOutsideWindow : undefined}\n locale={locale}\n timeZone={getLocalTimeZone()}\n startOfWeek={startOfWeek}\n disabled={disabled}\n readOnly={readOnly}\n >\n <ArkDatePicker.Content\n className=\"ds-calendar__content\"\n aria-label={ariaLabel}\n aria-disabled={disabled || undefined}\n >\n <ArkDatePicker.View view=\"day\">\n <ArkDatePicker.Context>\n {(api) => (\n <>\n <ArkDatePicker.ViewControl className=\"ds-calendar__header\">\n <ArkDatePicker.PrevTrigger asChild>\n <IconButton\n variant=\"tertiary\"\n size=\"sm\"\n icon={previousIcon}\n aria-label=\"Previous month\"\n />\n </ArkDatePicker.PrevTrigger>\n <ArkDatePicker.RangeText className=\"ds-calendar__heading\" aria-live=\"polite\" />\n <ArkDatePicker.NextTrigger asChild>\n <IconButton\n variant=\"tertiary\"\n size=\"sm\"\n icon={nextIcon}\n aria-label=\"Next month\"\n />\n </ArkDatePicker.NextTrigger>\n </ArkDatePicker.ViewControl>\n <ArkDatePicker.Table className=\"ds-calendar__table\">\n <ArkDatePicker.TableHead>\n <ArkDatePicker.TableRow>\n {api.weekDays.map((weekDay) => (\n <ArkDatePicker.TableHeader\n key={weekDay.value.toString()}\n className=\"ds-calendar__weekday\"\n >\n {weekDay.short}\n </ArkDatePicker.TableHeader>\n ))}\n </ArkDatePicker.TableRow>\n </ArkDatePicker.TableHead>\n <ArkDatePicker.TableBody>\n {api.weeks.map((week) => (\n <ArkDatePicker.TableRow key={week[0]?.toString()}>\n {week.map((day) => (\n <ArkDatePicker.TableCell\n key={day.toString()}\n value={day}\n className=\"ds-calendar__cell\"\n >\n <ArkDatePicker.TableCellTrigger className=\"ds-calendar__day\">\n <span className=\"ds-calendar__day-fill\">{day.day}</span>\n </ArkDatePicker.TableCellTrigger>\n </ArkDatePicker.TableCell>\n ))}\n </ArkDatePicker.TableRow>\n ))}\n </ArkDatePicker.TableBody>\n </ArkDatePicker.Table>\n </>\n )}\n </ArkDatePicker.Context>\n </ArkDatePicker.View>\n </ArkDatePicker.Content>\n </ArkDatePicker.Root>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/calendar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,GAIT,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/calendar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,GAIT,MAAM,YAAY,CAAC","sourcesContent":["export {\n Calendar,\n type CalendarProps,\n type CalendarRange,\n type CalendarWeekday,\n} from './calendar';\n"]}
|
package/dist/card/card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../src/card/card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,YAAY,CAAC;AACpB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAmB3B;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,IAAI,CAAC,EAAE,WAAW,GAAG,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAa;IACpF,OAAO,CACL,KAAC,GAAG,CAAC,GAAG,IACN,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,WAAW,IAAI,sBAAsB,EAAE,SAAS,CAAC,KACtE,KAAK,sBACS,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,YAE7C,QAAQ,GACD,CACX,CAAC;AACJ,CAAC;AAcD,qEAAqE;AACrE,MAAM,UAAU,UAAU,CAAC,EAAE,KAAK,GAAG,OAAO,EAAE,SAAS,EAAE,QAAQ,EA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AAmB;IAC3E,OAAO,CACL,KAAC,GAAG,CAAC,GAAG,IAAC,SAAS,EAAE,EAAE,CAAC,iBAAiB,EAAE,SAAS,CAAC,KAAM,KAAK,YAC5D,QAAQ,GACD,CACX,CAAC;AACJ,CAAC","sourcesContent":["import { ark } from '@ark-ui/react/factory';\nimport type { ComponentProps } from 'react';\nimport './card.css';\nimport { cx } from '../cx';\n\nexport interface CardProps extends ComponentProps<typeof ark.div> {\n /**\n * Opt into hover and focus affordances for cards that act as a single\n * click target (a link wrapping the whole card, for example).\n *\n * This only applies styling. The consumer is still responsible for making\n * the card actually operable — put a {@link CardLink} in its title, wrap it\n * in a link or button, or supply the appropriate role and key handling. A\n * card is not interactive by virtue of this prop.\n *\n * The component reflects this state as `[data-interactive]`, a stable hook\n * for compositions that need to extend the interactive treatment without\n * targeting ui-core's internal class names.\n */\n interactive?: boolean;\n}\n\n/**\n * Surface container for grouped content.\n *\n * A structural primitive, not an Ark UI behavioural component — cards have\n * no interaction model of their own. Styled exclusively against the\n * `--ds-card-*` token contract.\n *\n * Compose with {@link CardHeader}, {@link CardTitle}, {@link CardLink},\n * {@link CardDescription}, {@link CardContent}, and {@link CardFooter}. Each sub-part is optional and\n * carries only layout; none of them impose semantics beyond `CardTitle`,\n * which renders a real heading.\n *\n * The contract exposes no shadow token, so `Card` draws a border and no\n * elevation. Products that want raised surfaces add the shadow in their own\n * composition layer rather than through this component.\n */\nexport function Card({ interactive = false, className, children, ...props }: CardProps) {\n return (\n <ark.div\n className={cx('ds-card', interactive && 'ds-card--interactive', className)}\n {...props}\n data-interactive={interactive ? '' : undefined}\n >\n {children}\n </ark.div>\n );\n}\n\n/** Where a card header's parts sit: at the start, or centred. */\nexport type CardHeaderAlign = 'start' | 'center';\n\nexport interface CardHeaderProps extends ComponentProps<typeof ark.div> {\n /**\n * Where the title, description and anything else in the header sit:\n * at the start by default, or centred, for a card that is the page (a\n * sign-in card with its logo over the title).\n */\n align?: CardHeaderAlign;\n}\n\n/** Top region of a card. Stacks its children with the card's gap. */\nexport function CardHeader({ align = 'start', className, children, ...props }: CardHeaderProps) {\n return (\n <ark.div\n className={cx('ds-card__header', align === 'center' && 'ds-card__header--center', className)}\n {...props}\n >\n {children}\n </ark.div>\n );\n}\n\n/**\n * The heading levels {@link CardTitle} can render.\n *\n * Deliberately not `ElementType`: the implementation indexes the Ark factory,\n * whose proxy hands any key straight to `createElement` as a tag name. A\n * component reference is a valid `ElementType` but would be stringified into\n * its own source text and thrown as an invalid tag name at runtime, so the\n * type is narrowed to exactly what the implementation can render.\n */\nexport type CardHeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n\nexport interface CardTitleProps extends ComponentProps<typeof ark.h3> {\n /**\n * Heading level to render. Defaults to `h3`.\n *\n * Pick the level that fits the surrounding document outline — a card in a\n * page section usually wants `h3`, but a card that is the page's primary\n * content may want `h2`. Never skip levels to get a particular size; size\n * comes from the token, not the tag.\n */\n as?: CardHeadingTag;\n}\n\n/** Accessible heading for a card. Renders `h3` unless `as` overrides it. */\nexport function CardTitle({ as, className, children, ...props }: CardTitleProps) {\n const Component = as ? ark[as] : ark.h3;\n return (\n <Component className={cx('ds-card__title', className)} {...props}>\n {children}\n </Component>\n );\n}\n\nexport type CardLinkProps = ComponentProps<typeof ark.a>;\n\n/**\n * The card's one destination: a link whose hit area stretches over the whole\n * card, so a click anywhere on it opens the destination while other controls\n * inside the card stay separately operable.\n *\n * Wrapping a card in a link can't do that: any button or menu inside the\n * link is interactive content nested in interactive content, which is invalid\n * HTML, gives an unpredictable tab order, and swallows the inner control's\n * clicks. Here the link wraps only the title text, so it is named by the title\n * and sits in the tab order once. A transparent `::after` stretches it over\n * the card.\n *\n * ```tsx\n * <Card interactive>\n * <CardTitle>\n * <CardLink href=\"/goals/123\">Run a half marathon</CardLink>\n * </CardTitle>\n * <button type=\"button\" className=\"raised\">…</button>\n * </Card>\n * ```\n *\n * - Pass `interactive` to the card for its hover affordance. The focus ring is\n * drawn on the card whenever this link has keyboard focus.\n * - Every other control in the card has to paint above the stretched area:\n * give it `position: relative` and `z-index: 1` (the `raised` stacking\n * layer) on your own class, or the link takes its clicks.\n * - Text under the stretched area can't be selected with a pointer drag.\n * Keep the card to content that is read rather than copied.\n * - Use one per card. A second one would cover the first.\n *\n * For a router's link, pass `asChild` and the link as the only child; it\n * receives this part's class and keeps its own `href` and behaviour:\n * `<CardLink asChild><Link href=\"/goals/123\">Run a half marathon</Link></CardLink>`.\n */\nexport function CardLink({ className, children, ...props }: CardLinkProps) {\n return (\n <ark.a className={cx('ds-card__link', className)} {...props}>\n {children}\n </ark.a>\n );\n}\n\nexport type CardDescriptionProps = ComponentProps<typeof ark.p>;\n\n/** Muted supporting copy, typically directly under {@link CardTitle}. */\nexport function CardDescription({ className, children, ...props }: CardDescriptionProps) {\n return (\n <ark.p className={cx('ds-card__description', className)} {...props}>\n {children}\n </ark.p>\n );\n}\n\nexport type CardContentProps = ComponentProps<typeof ark.div>;\n\n/** Main body region of a card. */\nexport function CardContent({ className, children, ...props }: CardContentProps) {\n return (\n <ark.div className={cx('ds-card__content', className)} {...props}>\n {children}\n </ark.div>\n );\n}\n\nexport type CardFooterProps = ComponentProps<typeof ark.div>;\n\n/** Bottom region of a card. Lays its children out in a row. */\nexport function CardFooter({ className, children, ...props }: CardFooterProps) {\n return (\n <ark.div className={cx('ds-card__footer', className)} {...props}>\n {children}\n </ark.div>\n );\n}\n"]}
|
package/dist/card/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/card/index.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,IAAI,EACJ,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,QAAQ,EACR,SAAS,GACV,MAAM,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/card/index.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,IAAI,EACJ,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,QAAQ,EACR,SAAS,GACV,MAAM,QAAQ,CAAC","sourcesContent":["export type {\n CardContentProps,\n CardDescriptionProps,\n CardFooterProps,\n CardHeaderAlign,\n CardHeaderProps,\n CardHeadingTag,\n CardLinkProps,\n CardProps,\n CardTitleProps,\n} from './card';\nexport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardLink,\n CardTitle,\n} from './card';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"centered-layout.js","sourceRoot":"","sources":["../../src/centered-layout/centered-layout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,uBAAuB,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAQ3B;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,EAC7B,IAAI,GAAG,IAAI,EACX,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACY;IACpB,OAAO,CACL,KAAC,GAAG,CAAC,GAAG,IACN,SAAS,EAAE,EAAE,CAAC,oBAAoB,EAAE,uBAAuB,IAAI,EAAE,EAAE,SAAS,CAAC,KACzE,KAAK,YAER,QAAQ,GACD,CACX,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"centered-layout.js","sourceRoot":"","sources":["../../src/centered-layout/centered-layout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,uBAAuB,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAQ3B;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,EAC7B,IAAI,GAAG,IAAI,EACX,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACY;IACpB,OAAO,CACL,KAAC,GAAG,CAAC,GAAG,IACN,SAAS,EAAE,EAAE,CAAC,oBAAoB,EAAE,uBAAuB,IAAI,EAAE,EAAE,SAAS,CAAC,KACzE,KAAK,YAER,QAAQ,GACD,CACX,CAAC;AACJ,CAAC","sourcesContent":["import { ark } from '@ark-ui/react/factory';\nimport type { ComponentProps } from 'react';\nimport './centered-layout.css';\nimport { cx } from '../cx';\nimport type { ContentWidth } from '../layout/layout';\n\nexport interface CenteredLayoutProps extends ComponentProps<typeof ark.div> {\n /** Where the centred column stops growing. Defaults to `md`, a card's width. */\n size?: Exclude<ContentWidth, 'xl'>;\n}\n\n/**\n * One column centred on the canvas, for the pages that stand outside the\n * app's shell: sign-in, a consent prompt, an error, a loading screen.\n *\n * Fills the viewport's height, paints the canvas colour, and centres its\n * children both ways, each no wider than `size`. There is no inner wrapper,\n * so `asChild` can make the page's `main` the layout itself.\n */\nexport function CenteredLayout({\n size = 'md',\n className,\n children,\n ...props\n}: CenteredLayoutProps) {\n return (\n <ark.div\n className={cx('ds-centered-layout', `ds-centered-layout--${size}`, className)}\n {...props}\n >\n {children}\n </ark.div>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/centered-layout/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/centered-layout/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["export type { CenteredLayoutProps } from './centered-layout';\nexport { CenteredLayout } from './centered-layout';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../src/checkbox/checkbox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAkB,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtD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AAC,SAAS,CAAC,CAAC,CAAC,CACX,eAAM,SAAS,EAAC,oBAAoB,YAAE,KAAK,GAAQ,CACpD,CAAC,CAAC,CAAC,CACF,KAAC,WAAW,CAAC,KAAK,IAAC,SAAS,EAAC,oBAAoB,YAAE,KAAK,GAAqB,CAC9E,CAAC,EACJ,KAAC,WAAW,CAAC,WAAW,IACtB,GAAG,EAAE,QAAQ,gBACD,SAAS,sBACH,eAAe,mBAClB,QAAQ,IAAI,SAAS,GACpC,IACe,CACpB,CAAC;AACJ,CAAC","sourcesContent":["import { Checkbox as ArkCheckbox } from '@ark-ui/react/checkbox';\nimport { type ReactNode, useId, useRef } from 'react';\nimport './checkbox.css';\nimport { cx } from '../cx';\nimport { Check } from '../fallback-glyphs';\nimport { Icon, type IconSource } from '../icon/icon';\n\nexport type CheckboxSize = 'sm' | 'md' | 'lg';\n\n/**\n * A checkbox has to have a name. A visible `label` is the one to reach for:\n * the whole label is the click target. Expressed as a union so an unnamed\n * checkbox is a compile error rather than an axe finding, as `Switch` does.\n */\ntype CheckboxName =\n | {\n /** Visible label. The whole label is the click target. */\n label: ReactNode;\n /**\n * A different accessible name when the visible label alone would not\n * say what the control is. Keep the visible words in it, so a voice\n * user can still say what they see.\n */\n 'aria-label'?: string;\n }\n | {\n label?: undefined;\n /** Accessible name when no visible label fits, such as a row whose text already says what the checkbox is. */\n 'aria-label': string;\n };\n\nexport type CheckboxProps = CheckboxName & {\n /** Controlled checked state. Leave undefined to let the component own it. */\n checked?: boolean;\n /** Initial state when uncontrolled. */\n defaultChecked?: boolean;\n /** Fired with the new state whenever the user toggles the checkbox. */\n onCheckedChange?: (checked: boolean) => void;\n /** Control size and label type scale. */\n size?: CheckboxSize;\n /** Disable the control. It keeps its state and stops responding. */\n disabled?: boolean;\n /**\n * Marks the control invalid for assistive tech and styling (`data-invalid`).\n * Pair it with a message the control points at through `aria-describedby`;\n * a red border alone is not an accessible error.\n */\n invalid?: boolean;\n /** Id of the element that describes the control, such as an error message. */\n 'aria-describedby'?: string;\n /** Show the state without letting the user change it. */\n readOnly?: boolean;\n /** Marks the hidden input required for native form validation. */\n required?: boolean;\n /** Name for native form participation. */\n name?: string;\n /** Value submitted under `name` while checked. Defaults to `on`. */\n value?: string;\n /**\n * Glyph shown in the box while checked.\n *\n * Defaults to a plain built-in check so `@manakind/ui-core` installs and\n * renders on its own. Products override it with their own icon set, as\n * they do Select's `itemIndicator`.\n */\n indicator?: IconSource;\n /** Extra class names appended after the `ds-checkbox` modifiers. */\n className?: string;\n};\n\n/**\n * A choice that is saved with the form, built on Ark UI's Checkbox.\n *\n * Ark owns the behaviour: a hidden checkbox carries the state, the root is\n * the `<label>` that names it, and Space and pointer toggling come for free.\n * This wrapper contributes `ds-` classes, the `--ds-checkbox-*` bindings, a\n * flat prop API, and the check glyph.\n *\n * ```tsx\n * <Checkbox label=\"Health\" checked={chosen} onCheckedChange={setChosen} />\n * ```\n *\n * A checkbox is for a choice that is submitted later, alone or as one of\n * several that can all be on. A setting that takes effect at once is a\n * `Switch`; a choice between values of which exactly one applies is a\n * `Select`.\n */\nexport function Checkbox({\n label,\n checked,\n defaultChecked,\n onCheckedChange,\n size = 'md',\n disabled,\n invalid,\n readOnly,\n required,\n name,\n value,\n indicator = Check,\n className,\n 'aria-label': ariaLabel,\n 'aria-describedby': ariaDescribedBy,\n}: CheckboxProps) {\n const inputRef = useRef<HTMLInputElement>(null);\n\n /*\n * Zag always names the hidden input by its label part's id, which would\n * outrank an `aria-label`. With both given, the visible label is plain\n * text instead, so that id resolves to nothing and the `aria-label` wins;\n * the root is still the `<label>`, so the text stays the click target.\n */\n\n /*\n * Ark hands a checkbox inside a Field the field's control and label ids,\n * so two checkboxes in one field would share an id and both be named by\n * the field's label. A checkbox names itself, so it keeps its own ids and\n * takes only the states from a field around it.\n */\n const ownId = useId();\n const ids = { hiddenInput: `${ownId}:input`, label: `${ownId}:label` };\n\n /*\n * Ark renders the hidden input uncontrolled and syncs it only when its own\n * state changes, so a controlled parent that declines a toggle would leave\n * the native input flipped while the box shows the old state. Restoring\n * the parent's value after Ark has read the input keeps the two agreeing,\n * as Switch does.\n */\n const handleCheckedChange = (details: { checked: boolean | 'indeterminate' }) => {\n onCheckedChange?.(details.checked === true);\n if (checked !== undefined && inputRef.current) inputRef.current.checked = checked;\n };\n\n return (\n <ArkCheckbox.Root\n ids={ids}\n className={cx('ds-checkbox', `ds-checkbox--${size}`, className)}\n checked={checked}\n defaultChecked={defaultChecked}\n onCheckedChange={handleCheckedChange}\n disabled={disabled}\n invalid={invalid}\n readOnly={readOnly}\n required={required}\n name={name}\n value={value}\n >\n <ArkCheckbox.Control className=\"ds-checkbox__control\">\n <ArkCheckbox.Indicator className=\"ds-checkbox__indicator\">\n <Icon source={indicator} size=\"sm\" decorative />\n </ArkCheckbox.Indicator>\n </ArkCheckbox.Control>\n {label &&\n (ariaLabel ? (\n <span className=\"ds-checkbox__label\">{label}</span>\n ) : (\n <ArkCheckbox.Label className=\"ds-checkbox__label\">{label}</ArkCheckbox.Label>\n ))}\n <ArkCheckbox.HiddenInput\n ref={inputRef}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedBy}\n aria-readonly={readOnly || undefined}\n />\n </ArkCheckbox.Root>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/checkbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAyC,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/checkbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAyC,MAAM,YAAY,CAAC","sourcesContent":["export { Checkbox, type CheckboxProps, type CheckboxSize } from './checkbox';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.js","sourceRoot":"","sources":["../../src/combobox/combobox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,IAAI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KAAK,CAAC,IAAI,EACX,eAAM,SAAS,EAAC,0BAA0B,YAAE,KAAK,CAAC,KAAK,GAAQ,EAC9D,GAAG,CAAC,QAAQ,IAAI,CACf,iBACE,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,CAAC,EACZ,SAAS,EAAC,kBAAkB,gBAChB,aAAa,KAAK,CAAC,KAAK,EAAE,kBACxB,GAAG,CAAC,MAAM,cACf,EAAE,iBACE,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,YAE3C,KAAC,IAAI,IAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAC,IAAI,EAAC,UAAU,SAAG,GACvC,CACV,IACI,CACR,CAAC;AACJ,CAAC;AAQD,SAAS,UAAU,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAmB;IAClE,OAAO,CACL,gBAAM,SAAS,EAAC,mBAAmB,aAChC,KAAK,CAAC,IAAI,EACX,yBAAO,KAAK,CAAC,KAAK,GAAQ,EAC1B,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,0BAA0B,gBACxB,qBAAqB,KAAK,CAAC,KAAK,EAAE,EAC9C,OAAO,EAAE,QAAQ,YAEjB,KAAC,IAAI,IAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAC,IAAI,EAAC,UAAU,SAAG,GAC1C,IACJ,CACR,CAAC;AACJ,CAAC","sourcesContent":["import { Popover as ArkPopover } from '@ark-ui/react/popover';\nimport { Portal } from '@ark-ui/react/portal';\nimport { getTabbableEdges, getTabbables, isComposingEvent } from '@zag-js/dom-query';\nimport {\n type ChangeEvent,\n type KeyboardEvent,\n type MouseEvent,\n type PointerEvent,\n type ReactNode,\n type Ref,\n type TdHTMLAttributes,\n useCallback,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { flushSync } from 'react-dom';\nimport { cx } from '../cx';\nimport { Cross, Pin } from '../fallback-glyphs';\nimport { groupItems } from '../group-items';\nimport { Icon, type IconSource } from '../icon/icon';\nimport { PortalContainerContext } from '../portal-container';\nimport '../visually-hidden/visually-hidden.css';\nimport './combobox.css';\n\nexport type ComboboxSize = 'sm' | 'md' | 'lg';\n\n/** What an option belongs to, shown in a second column: its category, its project. */\nexport interface ComboboxFacet {\n /** Stable value reported when the facet is pinned. */\n value: string;\n /** Text in the facet column, and in the pinned chip. */\n label: string;\n /** Decorative mark before the label, such as the category's icon. */\n icon?: ReactNode;\n}\n\nexport interface ComboboxItem {\n /** Stable value reported by `onSelect`. */\n value: string;\n /** Option text, also what screen readers use. */\n label: string;\n /** Optional secondary line under the label, shown muted. */\n description?: string;\n /** Individually disable this option without removing it. */\n disabled?: boolean;\n /**\n * The group the option is listed under, by its heading. Options sharing a\n * group are listed together under it, groups in the order they first\n * appear; options without one (or with an empty name) are listed before\n * any group.\n */\n group?: string;\n /** What the option belongs to, shown in the facet column when `facets` is set. */\n facet?: ComboboxFacet;\n}\n\n/**\n * A second column naming what each option belongs to, with a pin that\n * narrows the list to it.\n */\nexport interface ComboboxFacets {\n /** Heading of the option column, for assistive tech: \"Action\". */\n itemLabel: string;\n /** Heading of the facet column, for assistive tech: \"Category\". */\n label: string;\n /** The facet the list is narrowed to, shown as a removable chip in the status line. */\n pinned?: ComboboxFacet | null;\n /**\n * Pins a row's facet, or unpins it with `null` (its pin pressed again, the\n * chip's remove button, or Backspace in the empty field). The caller does\n * the narrowing. Without it, the facet column shows no pins.\n */\n onPinnedChange?: (facet: ComboboxFacet | null) => void;\n}\n\nexport interface ComboboxProps {\n /**\n * Suggestions for the current text.\n *\n * The caller filters, sorts and groups them; the component does not. What\n * counts as a match (a prefix, a substring, a category's name, anything\n * not already chosen) is the product's call, and the list it passes is the\n * list that shows.\n */\n items: ComboboxItem[];\n /** Controlled text in the input. */\n inputValue: string;\n /** Fired with the new text on every keystroke, and with `''` after a choice. */\n onInputValueChange: (value: string) => void;\n /**\n * A suggestion was chosen. The input then clears (`onInputValueChange('')`)\n * and the field holds no value: this is the \"add to a list\" pattern. A\n * field that keeps its choice is a `Select`.\n */\n onSelect: (value: string) => void;\n /**\n * Visible label. Strongly preferred over `aria-label` — a visible label\n * helps everyone, not only screen reader users.\n */\n label?: ReactNode;\n /** Accessible name when no visible `label` is supplied. */\n 'aria-label'?: string;\n /** Text shown in the empty input. */\n placeholder?: string;\n /** Shown in the open list when `items` is empty. */\n emptyText?: ReactNode;\n /**\n * Controls at the top of the open list that change what it shows: a\n * `Switch`, a small `SegmentGroup`. One row of them, so the options stay\n * in view; Tab moves into them from the field.\n */\n toolbar?: ReactNode;\n /**\n * One line under the toolbar saying what the list shows, such as \"Showing\n * all actions in Health\". Announced politely as it changes.\n */\n status?: ReactNode;\n /** Adds the facet column, with its pins. The list becomes a grid. */\n facets?: ComboboxFacets;\n /** Glyph of a row's pin. Defaults to the inlined fallback pin. */\n pinIcon?: IconSource;\n /** Glyph of the pinned chip's remove button. Defaults to the inlined fallback cross. */\n removeIcon?: IconSource;\n /** Control height and type scale. */\n size?: ComboboxSize;\n /** Disable the whole control. */\n disabled?: boolean;\n /** Marks the field invalid for assistive tech and styling. */\n invalid?: boolean;\n /** Extra class names appended after `ds-combobox` modifiers. */\n className?: string;\n /** The text input, for moving focus back to the field, e.g. after removing an item it added. */\n inputRef?: Ref<HTMLInputElement>;\n}\n\ntype Cell = 'item' | 'facet';\n\ninterface Active {\n value: string;\n cell: Cell;\n}\n\n// The header's own controls, which a press may focus.\nconst HEADER_CONTROLS = 'button, input, label, a[href], [tabindex]:not([tabindex=\"-1\"])';\n\n/**\n * A text input that suggests options as you type, with optional controls at\n * the top of the open list.\n *\n * Choosing a suggestion reports it through `onSelect` and empties the input,\n * so the field is ready for the next one: the control for adding items to a\n * list one at a time. It never holds a selection itself; the caller keeps\n * the list. For a field that keeps one choice, use `Select`.\n *\n * The open list can carry what narrows it, so nothing sits outside the\n * field: a `toolbar` row of switches or a segment group, a `status` line\n * saying what is shown, and with `facets` a second column naming what each\n * option belongs to, whose pin narrows the list to it.\n *\n * ```tsx\n * <Combobox\n * label=\"Add actions\"\n * items={matches}\n * inputValue={query}\n * onInputValueChange={setQuery}\n * onSelect={(value) => setPicked((list) => [...list, value])}\n * toolbar={<Switch size=\"sm\" label=\"Include categories\" checked={…} onCheckedChange={…} />}\n * status={`Showing all actions that contain “${query}”`}\n * facets={{ itemLabel: 'Action', label: 'Category', pinned, onPinnedChange: setPinned }}\n * />\n * ```\n *\n * The field is the APG editable combobox. Focus stays in the input, and the\n * active option is `aria-activedescendant`. Typing highlights the first\n * option, so Enter takes it, and Up and Down walk the options in their drawn\n * order. With `facets` the popup is a grid instead of a listbox: Right, at\n * the end of the text, moves onto the row's pin and Enter then pins it, and\n * Left moves back. Tab moves from the field into the toolbar and the chip,\n * and on out to the next field.\n *\n * The popup is an Ark Popover anchored to the field, so it takes part in\n * the dismiss stack. Escape closes it before a `Dialog` around it, and a\n * click outside closes it. Its wrapper drops the Popover's dialog role, so\n * the listbox or grid inside is the popup assistive tech meets. It portals\n * like `Select`'s list: into `<body>`, or into the panel of the ui-core\n * `Dialog` it opens in, at `z-index: 60`.\n * The field reads the `--ds-input-*` keys and the list the `--ds-select-*`\n * keys, so it reads as one family with `Input` and `Select`.\n */\nexport function Combobox({\n items,\n inputValue,\n onInputValueChange,\n onSelect,\n label,\n 'aria-label': ariaLabel,\n placeholder,\n emptyText,\n toolbar,\n status,\n facets,\n pinIcon = Pin,\n removeIcon = Cross,\n size = 'md',\n disabled,\n invalid,\n className,\n inputRef,\n}: ComboboxProps) {\n const id = useId();\n const inputId = `${id}-input`;\n const labelId = `${id}-label`;\n const listId = `${id}-list`;\n const statusId = `${id}-status`;\n const rowId = (index: number) => `${id}-row-${index}`;\n const cellId = (index: number, cell: Cell) => `${id}-cell-${index}-${cell}`;\n\n const rootRef = useRef<HTMLDivElement>(null);\n const contentRef = useRef<HTMLDivElement>(null);\n const headerRef = useRef<HTMLDivElement>(null);\n const inputEl = useRef<HTMLInputElement | null>(null);\n const portalContainer = useContext(PortalContainerContext);\n\n const [open, setOpen] = useState(false);\n const [chosen, setChosen] = useState<Active | null>(null);\n const isOpen = open && !disabled;\n const isGrid = facets !== undefined;\n const pinned = facets?.pinned ?? null;\n const canPin = (item: ComboboxItem) => Boolean(facets?.onPinnedChange && item.facet);\n\n const groups = useMemo(() => groupItems(items), [items]);\n const ordered = useMemo(() => groups.flatMap((group) => group.items), [groups]);\n const navigable = useMemo(() => ordered.filter((item) => !item.disabled), [ordered]);\n\n const chosenItem = chosen && navigable.find((item) => item.value === chosen.value);\n const active: Active | null = chosenItem\n ? {\n value: chosenItem.value,\n cell: chosen?.cell === 'facet' && canPin(chosenItem) ? 'facet' : 'item',\n }\n : inputValue !== '' && navigable[0]\n ? { value: navigable[0].value, cell: 'item' }\n : null;\n const activeIndex = active ? ordered.findIndex((item) => item.value === active.value) : -1;\n const activeDescendant =\n isOpen && active && activeIndex >= 0\n ? isGrid\n ? cellId(activeIndex, active.cell)\n : rowId(activeIndex)\n : undefined;\n\n const setInputRef = useCallback(\n (element: HTMLInputElement | null) => {\n inputEl.current = element;\n if (typeof inputRef === 'function') inputRef(element);\n else if (inputRef) inputRef.current = element;\n },\n [inputRef],\n );\n\n /*\n * The popup portals out of the field, so the browser's Tab order would\n * skip it. While it is open, Tab from the field moves into its header's\n * controls, Tab from the last one moves on to whatever follows the field,\n * and Shift+Tab walks back the same way. Only the header counts, as the\n * pins are reached with the arrows; with no header control, Tab is the\n * browser's. A window listener, so it lives in an effect, and so it runs\n * ahead of a Dialog's focus trap: the popup is the end of the dialog's\n * panel, and the trap would wrap Tab from its last control to the\n * dialog's first.\n */\n useEffect(() => {\n if (!isOpen) return;\n const handleTab = (event: globalThis.KeyboardEvent) => {\n const header = headerRef.current;\n const content = contentRef.current;\n const field = inputEl.current;\n if (event.key !== 'Tab' || !header || !content || !field) return;\n const [first, last] = getTabbableEdges(header);\n if (!first || !last) return;\n const scope = field.closest<HTMLElement>('[aria-modal=\"true\"]') ?? field.ownerDocument.body;\n const tabbables = getTabbables(scope);\n const after = tabbables\n .slice(tabbables.indexOf(field) + 1)\n .find((element) => !content.contains(element));\n const current = field.ownerDocument.activeElement;\n let target: HTMLElement | undefined;\n if (event.shiftKey) target = current === first ? field : current === after ? last : undefined;\n else target = current === field ? first : current === last ? after : undefined;\n if (!target) return;\n event.preventDefault();\n if (target === after) event.stopPropagation();\n target.focus({ preventScroll: true });\n };\n window.addEventListener('keydown', handleTab, true);\n return () => window.removeEventListener('keydown', handleTab, true);\n }, [isOpen]);\n\n const activate = (next: Active | null) => {\n flushSync(() => setChosen(next));\n if (!next) return;\n const index = ordered.findIndex((item) => item.value === next.value);\n document.getElementById(rowId(index))?.scrollIntoView?.({ block: 'nearest' });\n };\n\n const move = (step: 1 | -1) => {\n if (navigable.length === 0) return;\n const from = active ? navigable.findIndex((item) => item.value === active.value) : -1;\n const to =\n from === -1\n ? step === 1\n ? 0\n : navigable.length - 1\n : (from + step + navigable.length) % navigable.length;\n const item = navigable[to];\n activate({\n value: item.value,\n cell: active?.cell === 'facet' && canPin(item) ? 'facet' : 'item',\n });\n };\n\n const focusFieldFromPopup = () => {\n if (contentRef.current?.contains(document.activeElement)) inputEl.current?.focus();\n };\n\n const handleOpenChange = (details: { open: boolean }) => {\n setOpen(details.open);\n if (!details.open) setChosen(null);\n };\n\n const choose = (item: ComboboxItem) => {\n if (item.disabled) return;\n focusFieldFromPopup();\n onSelect(item.value);\n onInputValueChange('');\n setChosen(null);\n setOpen(false);\n };\n\n const togglePin = (facet: ComboboxFacet) => {\n facets?.onPinnedChange?.(pinned?.value === facet.value ? null : facet);\n setChosen(null);\n };\n\n const unpin = () => {\n facets?.onPinnedChange?.(null);\n inputEl.current?.focus();\n };\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n setChosen(null);\n setOpen(true);\n onInputValueChange(event.target.value);\n };\n\n const handleKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n if (isComposingEvent(event) || event.ctrlKey || event.shiftKey) return;\n const input = event.currentTarget;\n const activeItem = activeIndex >= 0 ? ordered[activeIndex] : undefined;\n const caretAtEnd =\n input.selectionStart === input.value.length && input.selectionEnd === input.value.length;\n\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n event.preventDefault();\n if (!isOpen) setOpen(true);\n move(event.key === 'ArrowDown' ? 1 : -1);\n } else if (event.key === 'ArrowRight' && isOpen && activeItem && active?.cell === 'item') {\n if (isGrid && canPin(activeItem) && caretAtEnd) {\n event.preventDefault();\n activate({ value: activeItem.value, cell: 'facet' });\n }\n } else if (event.key === 'ArrowLeft' && isOpen && activeItem && active?.cell === 'facet') {\n event.preventDefault();\n activate({ value: activeItem.value, cell: 'item' });\n } else if (event.key === 'Enter' && isOpen && activeItem) {\n event.preventDefault();\n if (active?.cell === 'facet' && activeItem.facet) togglePin(activeItem.facet);\n else choose(activeItem);\n } else if (event.key === 'Backspace' && input.value === '' && pinned) {\n facets?.onPinnedChange?.(null);\n }\n };\n\n const rowIndexOf = (target: EventTarget) => {\n const row = (target as Element).closest<HTMLElement>('[data-index]');\n return row ? Number(row.dataset.index) : -1;\n };\n\n const handleListClick = (event: MouseEvent) => {\n const item = ordered[rowIndexOf(event.target)];\n if (!item) return;\n if ((event.target as Element).closest('[data-pin]') && item.facet) togglePin(item.facet);\n else choose(item);\n };\n\n const handleListPointerMove = (event: PointerEvent) => {\n const item = ordered[rowIndexOf(event.target)];\n if (item && !item.disabled && item.value !== active?.value) {\n setChosen({ value: item.value, cell: 'item' });\n }\n };\n\n const listName = label ? { 'aria-labelledby': labelId } : { 'aria-label': ariaLabel };\n const hasStatus = status !== undefined || pinned !== null;\n const hasHeader = toolbar !== undefined || hasStatus;\n const isEmpty = items.length === 0 && emptyText !== undefined;\n\n const rowOf = (item: ComboboxItem): RowModel => {\n const index = ordered.indexOf(item);\n const isActive = isOpen && index === activeIndex;\n return {\n item,\n index,\n rowId: rowId(index),\n itemCellId: cellId(index, 'item'),\n facetCellId: cellId(index, 'facet'),\n highlighted: isActive,\n pinnable: canPin(item),\n pinned: pinned !== null && pinned.value === item.facet?.value,\n pinActive: isActive && active?.cell === 'facet',\n };\n };\n const sections: Section[] = groups.map((group, groupIndex) => ({\n label: group.label,\n headingId: `${id}-group-${groupIndex}`,\n rows: group.items.map(rowOf),\n }));\n\n /*\n * Mouse input never takes focus from the field, so typing carries on: a\n * press on a row, a pin or the header's background is cancelled. Only the\n * header's own controls (a switch, a segment, the chip's remove button)\n * take focus, as they would anywhere.\n */\n const handleContentMouseDown = (event: MouseEvent) => {\n const target = event.target as Element;\n if (target.closest('.ds-combobox__list') || !target.closest(HEADER_CONTROLS)) {\n event.preventDefault();\n }\n };\n\n return (\n <ArkPopover.Root\n open={isOpen}\n onOpenChange={handleOpenChange}\n lazyMount\n unmountOnExit\n autoFocus={false}\n restoreFocus={false}\n portalled={false}\n persistentElements={[() => rootRef.current]}\n onEscapeKeyDown={focusFieldFromPopup}\n positioning={{ placement: 'bottom-start', sameWidth: true }}\n >\n <div ref={rootRef} className={cx('ds-combobox', `ds-combobox--${size}`, className)}>\n {label && (\n <label\n id={labelId}\n htmlFor={inputId}\n className=\"ds-combobox__label\"\n data-disabled={disabled ? '' : undefined}\n >\n {label}\n </label>\n )}\n <ArkPopover.Anchor className=\"ds-combobox__control\">\n <input\n ref={setInputRef}\n id={inputId}\n type=\"text\"\n role=\"combobox\"\n className=\"ds-combobox__input\"\n value={inputValue}\n placeholder={placeholder}\n aria-label={label ? undefined : ariaLabel}\n aria-autocomplete=\"list\"\n aria-haspopup={isGrid ? 'grid' : 'listbox'}\n aria-expanded={isOpen}\n aria-controls={isOpen ? listId : undefined}\n aria-activedescendant={activeDescendant}\n aria-describedby={isOpen && hasStatus ? statusId : undefined}\n aria-invalid={invalid || undefined}\n data-invalid={invalid ? '' : undefined}\n disabled={disabled}\n autoComplete=\"off\"\n autoCorrect=\"off\"\n autoCapitalize=\"none\"\n spellCheck={false}\n onChange={handleChange}\n onClick={() => setOpen(true)}\n onKeyDown={handleKeyDown}\n />\n </ArkPopover.Anchor>\n </div>\n\n <Portal container={portalContainer}>\n <ArkPopover.Positioner>\n <ArkPopover.Content\n ref={contentRef}\n role=\"presentation\"\n className=\"ds-combobox__content\"\n onMouseDown={handleContentMouseDown}\n onClick={handleListClick}\n onPointerMove={handleListPointerMove}\n >\n {hasHeader && (\n <div ref={headerRef} className=\"ds-combobox__header\">\n {toolbar && <div className=\"ds-combobox__toolbar\">{toolbar}</div>}\n {hasStatus && (\n <p id={statusId} role=\"status\" className=\"ds-combobox__status\">\n {status}\n {pinned && (\n <>\n {' '}\n <PinnedChip facet={pinned} removeIcon={removeIcon} onRemove={unpin} />\n </>\n )}\n </p>\n )}\n </div>\n )}\n {facets ? (\n <GridList\n id={listId}\n name={listName}\n facets={facets}\n sections={sections}\n emptyText={isEmpty ? emptyText : undefined}\n pinIcon={pinIcon}\n />\n ) : (\n <ListboxList\n id={listId}\n name={listName}\n sections={sections}\n emptyText={isEmpty ? emptyText : undefined}\n />\n )}\n </ArkPopover.Content>\n </ArkPopover.Positioner>\n </Portal>\n </ArkPopover.Root>\n );\n}\n\ninterface RowModel {\n item: ComboboxItem;\n index: number;\n rowId: string;\n itemCellId: string;\n facetCellId: string;\n highlighted: boolean;\n pinnable: boolean;\n pinned: boolean;\n pinActive: boolean;\n}\n\ninterface Section {\n label?: string;\n headingId: string;\n rows: RowModel[];\n}\n\ninterface ListProps {\n id: string;\n name: { 'aria-labelledby': string } | { 'aria-label': string | undefined };\n sections: Section[];\n emptyText: ReactNode;\n}\n\nconst rowState = (row: RowModel) => ({\n 'data-index': row.index,\n 'data-highlighted': row.highlighted ? '' : undefined,\n 'data-disabled': row.item.disabled ? '' : undefined,\n});\n\nfunction ItemText({ item }: { item: ComboboxItem }) {\n return (\n <>\n <span className=\"ds-combobox__item-label\">{item.label}</span>\n {item.description && (\n <>\n {' '}\n <span className=\"ds-combobox__item-description\">{item.description}</span>\n </>\n )}\n </>\n );\n}\n\n/*\n * The listbox's options and groups take their roles on plain elements: the\n * field keeps focus and points at an option with aria-activedescendant, so\n * none of them is focusable, and HTML has no element for an option outside\n * a native select. The lint rules asking for focusable or native elements\n * are therefore suppressed here, and only here.\n */\nfunction ListboxList({ id, name, sections, emptyText }: ListProps) {\n const option = (row: RowModel) => (\n // biome-ignore lint/a11y/useFocusableInteractive: reached through aria-activedescendant from the field, never by focus\n <div\n key={row.item.value}\n id={row.rowId}\n role=\"option\"\n aria-selected=\"false\"\n aria-disabled={row.item.disabled}\n className=\"ds-combobox__item\"\n {...rowState(row)}\n >\n <ItemText item={row.item} />\n </div>\n );\n return (\n <div id={id} role=\"listbox\" className=\"ds-combobox__list\" {...name}>\n {sections.map((section) =>\n section.label === undefined ? (\n section.rows.map(option)\n ) : (\n // biome-ignore lint/a11y/useSemanticElements: a fieldset is a form group, not a group of options\n <div\n key={section.label}\n role=\"group\"\n aria-labelledby={section.headingId}\n className=\"ds-combobox__group\"\n >\n <div id={section.headingId} className=\"ds-combobox__group-label\">\n {section.label}\n </div>\n {section.rows.map(option)}\n </div>\n ),\n )}\n {emptyText !== undefined && (\n // biome-ignore lint/a11y/useFocusableInteractive: a disabled option the keyboard never lands on\n <div\n role=\"option\"\n aria-disabled=\"true\"\n aria-selected=\"false\"\n className=\"ds-combobox__empty\"\n >\n {emptyText}\n </div>\n )}\n </div>\n );\n}\n\ninterface GridListProps extends ListProps {\n facets: ComboboxFacets;\n pinIcon: IconSource;\n}\n\n/*\n * A table in the grid role: its rows and cells line up in two columns by\n * themselves, and a group of rows is a `tbody` named by its heading row.\n * The keyboard skips heading rows, as it skips a listbox's group labels.\n */\nfunction GridList({ id, name, facets, sections, emptyText, pinIcon }: GridListProps) {\n const row = (model: RowModel) => <GridRow key={model.item.value} row={model} pinIcon={pinIcon} />;\n return (\n // biome-ignore lint/a11y/noNoninteractiveElementToInteractiveRole: a table in the grid role is the APG grid pattern; its cells line up by themselves\n <table id={id} role=\"grid\" className=\"ds-combobox__list ds-combobox__list--grid\" {...name}>\n <thead className=\"ds-visually-hidden\">\n <tr>\n <th scope=\"col\">{facets.itemLabel}</th>\n <th scope=\"col\">{facets.label}</th>\n </tr>\n </thead>\n {sections.map((section) =>\n section.label === undefined ? (\n <tbody key=\"ungrouped\">{section.rows.map(row)}</tbody>\n ) : (\n <tbody\n key={section.label}\n aria-labelledby={section.headingId}\n className=\"ds-combobox__group\"\n >\n <tr>\n <th\n id={section.headingId}\n colSpan={2}\n scope=\"colgroup\"\n className=\"ds-combobox__group-label\"\n >\n {section.label}\n </th>\n </tr>\n {section.rows.map(row)}\n </tbody>\n ),\n )}\n {emptyText !== undefined && (\n <tbody>\n <tr>\n <GridCell colSpan={2} aria-disabled=\"true\" className=\"ds-combobox__empty\">\n {emptyText}\n </GridCell>\n </tr>\n </tbody>\n )}\n </table>\n );\n}\n\n/*\n * A cell of the grid, named so explicitly: a `td` in a grid table is a\n * gridcell to browsers, but not to every tool, and the field keeps focus\n * and points at the cell with aria-activedescendant, so it is not focusable.\n */\nfunction GridCell(props: TdHTMLAttributes<HTMLTableCellElement>) {\n // biome-ignore lint/a11y/useFocusableInteractive: reached through aria-activedescendant from the field, never by focus\n // biome-ignore lint/a11y/noNoninteractiveElementToInteractiveRole: a td in a grid table is a gridcell; named so for every tool\n return <td role=\"gridcell\" {...props} />;\n}\n\nfunction GridRow({ row, pinIcon }: { row: RowModel; pinIcon: IconSource }) {\n const { item } = row;\n return (\n <tr id={row.rowId} className=\"ds-combobox__item\" {...rowState(row)}>\n <GridCell id={row.itemCellId} className=\"ds-combobox__cell\" aria-disabled={item.disabled}>\n <ItemText item={item} />\n </GridCell>\n <GridCell id={row.facetCellId} className=\"ds-combobox__facet\">\n {item.facet && <FacetCell facet={item.facet} row={row} pinIcon={pinIcon} />}\n </GridCell>\n </tr>\n );\n}\n\nfunction FacetCell({\n facet,\n row,\n pinIcon,\n}: {\n facet: ComboboxFacet;\n row: RowModel;\n pinIcon: IconSource;\n}) {\n return (\n <span className=\"ds-combobox__facet-content\">\n {facet.icon}\n <span className=\"ds-combobox__facet-label\">{facet.label}</span>\n {row.pinnable && (\n <button\n type=\"button\"\n tabIndex={-1}\n className=\"ds-combobox__pin\"\n aria-label={`Filter by ${facet.label}`}\n aria-pressed={row.pinned}\n data-pin=\"\"\n data-active={row.pinActive ? '' : undefined}\n >\n <Icon source={pinIcon} size=\"sm\" decorative />\n </button>\n )}\n </span>\n );\n}\n\ninterface PinnedChipProps {\n facet: ComboboxFacet;\n removeIcon: IconSource;\n onRemove: () => void;\n}\n\nfunction PinnedChip({ facet, removeIcon, onRemove }: PinnedChipProps) {\n return (\n <span className=\"ds-combobox__chip\">\n {facet.icon}\n <span>{facet.label}</span>\n <button\n type=\"button\"\n className=\"ds-combobox__chip-remove\"\n aria-label={`Stop filtering by ${facet.label}`}\n onClick={onRemove}\n >\n <Icon source={removeIcon} size=\"sm\" decorative />\n </button>\n </span>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/combobox/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/combobox/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC","sourcesContent":["export type {\n ComboboxFacet,\n ComboboxFacets,\n ComboboxItem,\n ComboboxProps,\n ComboboxSize,\n} from './combobox';\nexport { Combobox } from './combobox';\n"]}
|
package/dist/cx.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cx.js","sourceRoot":"","sources":["../src/cx.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAA4C,EAAU,EAAE,CAC5E,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"cx.js","sourceRoot":"","sources":["../src/cx.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAA4C,EAAU,EAAE,CAC5E,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC","sourcesContent":["/**\n * Join class names, dropping anything falsy.\n *\n * ```tsx\n * cx('ds-card', `ds-card--${variant}`, interactive && 'ds-card--interactive', className)\n * ```\n *\n * Deliberately smaller than `clsx`: no objects, no arrays, no nesting. Every\n * call site in this repo passes a flat list of strings and `cond && 'class'`\n * expressions, and keeping the signature at exactly that shape means the\n * design system carries no class-name DSL of its own for products to learn.\n *\n * Exported publicly because `{product}-ui` packages compose `ui-core` and need\n * the same helper; `ui-core` is the only runtime dependency they share.\n */\nexport const cx = (...parts: (string | false | undefined | null)[]): string =>\n parts.filter(Boolean).join(' ');\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-input.js","sourceRoot":"","sources":["../../src/date-input/date-input.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,SAAS,IAAI,YAAY,EAGzB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAmB,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAE3B,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,MAAM,kBAAkB,GAAkB,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAgEvF;;;GAGG;AACH,MAAM,KAAK,GAAG,CAAC,IAAe,E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,YAAY,EAC1B,aAAa,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,aAAa,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,EAC7E,OAAO,EAAE,KAAK,EAAE,OAAO,IAAI,OAAO,EAClC,QAAQ,EAAE,KAAK,EAAE,QAAQ,IAAI,QAAQ,EACrC,QAAQ,EAAE,KAAK,EAAE,QAAQ,IAAI,QAAQ,EACrC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,KAAK,aAEb,KAAC,YAAY,CAAC,OAAO,IACnB,SAAS,EAAC,wBAAwB,EAClC,QAAQ,EAAE,CAAC,CAAC,EACZ,OAAO,EAAE,iBAAiB,YAE1B,MAAC,YAAY,CAAC,YAAY,IACxB,SAAS,EAAC,yBAAyB,gBACvB,SAAS,sBACH,KAAK,EAAE,WAAW,aAEpC,KAAC,YAAY,CAAC,OAAO,cAClB,CAAC,GAAG,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE,SAAS,EAAE,UAAU,CAAC,GAC/B,EACtB,kBAAkB,IAAI,KAAC,iBAAiB,IAAC,kBAAkB,EAAE,kBAAkB,GAAI,IAC1D,GACP,EACvB,KAAC,YAAY,CAAC,WAAW,KAAG,IACV,CACrB,CAAC;AACJ,CAAC","sourcesContent":["import {\n DateInput as ArkDateInput,\n type DateInputDateValue as DateValue,\n type UseDateInputReturn,\n useDateInputContext,\n} from '@ark-ui/react/date-input';\nimport { type FocusEvent, useEffect, useMemo, useRef } from 'react';\nimport './date-input.css';\nimport { cx } from '../cx';\nimport type { InputSize } from '../field/input';\nimport { useFieldControl } from '../field/use-field-control';\nimport { parseIsoDate } from '../iso-date';\n\nexport type DatePartNames = { day: string; month: string; year: string };\n\nconst ENGLISH_PART_NAMES: DatePartNames = { day: 'Day', month: 'Month', year: 'Year' };\n\nexport type DateInputProps = {\n /**\n * The date as an ISO calendar date, `YYYY-MM-DD`, or `null` for none.\n * A calendar date has no time and no zone, so the same value means the\n * same day everywhere. Leave undefined to let the component own it.\n */\n value?: string | null;\n /** Initial date when uncontrolled, `YYYY-MM-DD`, or `null` for none. */\n defaultValue?: string | null;\n /**\n * Fired with the ISO date whenever all three parts hold a value, and with\n * `null` once every part is cleared. A half-typed or half-cleared date\n * fires nothing: the last whole date stands until there is a new one or\n * none.\n */\n onValueChange?: (value: string | null) => void;\n /**\n * BCP 47 tag that decides the order of the parts and the separators.\n * Defaults to `nb`: day, month, year with dots (31.12.2026), the format\n * the products write dates in; `en-GB` gives slashes, `en-US` leads with\n * the month.\n */\n locale?: string;\n /**\n * Fired when the date becomes half-typed, and back: some parts filled\n * while another is empty, or the parts showing something other than the\n * committed date (a pending digit, a year cut short). A form that must\n * refuse a half-typed date on submit listens here: `onValueChange` cannot\n * tell a cleared part from an untouched one.\n */\n onIncompleteChange?: (incomplete: boolean) => void;\n /**\n * What the parts are called for assistive technology, in the product's\n * language. The placeholders follow `locale`; these do not, because the\n * control cannot know which words the product uses. English by default.\n */\n partNames?: DatePartNames;\n /** Control height and type scale. Matches `Input` and `Select`. */\n size?: InputSize;\n /**\n * Marks the control invalid on its own, outside a `Field`. Inside one, the\n * field's `error` or `invalid` does this and the prop is not needed.\n */\n invalid?: boolean;\n /** Disables the parts and dims the control. */\n disabled?: boolean;\n /** Shows the date without letting the user change it. */\n readOnly?: boolean;\n /**\n * Tells assistive technology the date is required. The form validates it:\n * the value lives in a hidden input, which takes part in no native\n * validation.\n */\n required?: boolean;\n /** Name for native form participation; the hidden input submits the ISO date. */\n name?: string;\n /** Accessible name when the control is outside a `Field`. */\n 'aria-label'?: string;\n /** Extra class names appended after `ds-date-input`. */\n className?: string;\n};\n\n/*\n * The value a form submits and `onValueChange` reports. Zag formats it for\n * the locale by default, which is the display, not a date a database keeps.\n */\nconst toIso = (date: DateValue): string => date.toString();\n\nconst toDateValue = (iso: string | null | undefined, prop: string): DateValue[] | undefined => {\n if (iso === undefined) return undefined;\n if (iso === null || iso === '') return [];\n return [parseIsoDate(iso, `DateInput: ${prop}`)];\n};\n\n/*\n * A part's key is its type and its rank among parts of that type: the\n * literal separators repeat, and a key that changed with the text would\n * remount the part under the user's caret.\n */\nconst isDatePart = (type: string): type is keyof DatePartNames =>\n type === 'day' || type === 'month' || type === 'year';\n\nfunction renderSegments(api: UseDateInputReturn, names: DatePartNames, required?: boolean) {\n const seen = new Map<string, number>();\n return api.getSegments().map((segment) => {\n const rank = seen.get(segment.type) ?? 0;\n seen.set(segment.type, rank + 1);\n const part = isDatePart(segment.type) ? segment.type : undefined;\n return (\n <ArkDateInput.Segment\n key={`${segment.type}-${rank}`}\n segment={segment}\n className=\"ds-date-input__segment\"\n aria-label={part && names[part]}\n aria-required={part && required ? true : undefined}\n />\n );\n });\n}\n\n/*\n * Reports the half-typed state to the parent. Zag holds it in the display\n * value, not in the committed value, so it is read from the context and\n * sent out when it changes: an effect, because the parent is the external\n * system here.\n */\nfunction IncompleteWatcher({\n onIncompleteChange,\n}: {\n onIncompleteChange: (incomplete: boolean) => void;\n}) {\n const api = useDateInputContext();\n const segments = api.getSegments().filter((segment) => segment.isEditable);\n const touched = segments.filter((segment) => !segment.isPlaceholder).length;\n /*\n * What the parts show can run ahead of what Zag has committed: a first\n * digit typed into a day, or a year cut to \"202\", leaves the value at the\n * last whole date. Read against the committed date, so the form is told\n * the date is half-typed whenever what it would save differs from what the\n * user sees.\n */\n const committed = api.value[0];\n const shownDiffers = segments.some(\n (segment) =>\n !segment.isPlaceholder &&\n isDatePart(segment.type) &&\n segment.value !== committed?.[segment.type],\n );\n const incomplete = touched > 0 && (touched < segments.length || shownDiffers);\n const previous = useRef(incomplete);\n useEffect(() => {\n if (previous.current === incomplete) return;\n previous.current = incomplete;\n onIncompleteChange(incomplete);\n }, [incomplete, onIncompleteChange]);\n return null;\n}\n\n/**\n * A date typed as parts, built on Ark UI's DateInput.\n *\n * The control shows day, month and year as separate parts in the locale's\n * order, with the locale's separators between them. A part takes digits,\n * steps with the arrow keys, and hands focus to the next part when it is\n * full, so a date is typed as one run of digits. The value in and out is an\n * ISO calendar date: a string a form library and a database both keep as\n * is, with no time zone to get wrong.\n *\n * Inside a `Field` it takes the label, the hint, the error and the states\n * from the field, which also owns its `id`; clicking the label focuses the\n * first part. On its own it needs `aria-label`.\n *\n * ```tsx\n * <Field label=\"Target date\" error={errors.targetDate?.message}>\n * <DateInput value={targetDate} onValueChange={setTargetDate} />\n * </Field>\n * ```\n */\nexport function DateInput({\n value,\n defaultValue,\n onValueChange,\n locale = 'nb',\n onIncompleteChange,\n partNames = ENGLISH_PART_NAMES,\n size = 'md',\n invalid,\n disabled,\n readOnly,\n required,\n name,\n 'aria-label': ariaLabel,\n className,\n}: DateInputProps) {\n const field = useFieldControl();\n const controlledValue = useMemo(() => toDateValue(value, 'value'), [value]);\n const initialValue = useMemo(() => toDateValue(defaultValue, 'defaultValue'), [defaultValue]);\n const isRequired = field?.required || required;\n\n /*\n * A Field names its control through `<label for>` and focuses a control\n * that is not labelable by calling `focus()` on the element carrying the\n * field's id. That element is the control box here, which is not itself\n * a part, so a focus that lands on the box is handed to the first part.\n */\n const focusFirstSegment = (event: FocusEvent<HTMLDivElement>) => {\n if (event.target !== event.currentTarget) return;\n event.currentTarget.querySelector<HTMLElement>('[role=\"spinbutton\"]')?.focus();\n };\n\n return (\n <ArkDateInput.Root\n className={cx('ds-date-input', `ds-date-input--${size}`, className)}\n ids={field ? { control: field.id, label: () => field.labelId } : undefined}\n locale={locale}\n value={controlledValue}\n defaultValue={initialValue}\n onValueChange={(details) => onValueChange?.(details.valueAsString[0] ?? null)}\n invalid={field?.invalid || invalid}\n disabled={field?.disabled || disabled}\n readOnly={field?.readOnly || readOnly}\n name={name}\n format={toIso}\n >\n <ArkDateInput.Control\n className=\"ds-date-input__control\"\n tabIndex={-1}\n onFocus={focusFirstSegment}\n >\n <ArkDateInput.SegmentGroup\n className=\"ds-date-input__segments\"\n aria-label={ariaLabel}\n aria-describedby={field?.describedBy}\n >\n <ArkDateInput.Context>\n {(api) => renderSegments(api, partNames, isRequired)}\n </ArkDateInput.Context>\n {onIncompleteChange && <IncompleteWatcher onIncompleteChange={onIncompleteChange} />}\n </ArkDateInput.SegmentGroup>\n </ArkDateInput.Control>\n <ArkDateInput.HiddenInput />\n </ArkDateInput.Root>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/date-input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA2C,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/date-input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA2C,MAAM,cAAc,CAAC","sourcesContent":["export { DateInput, type DateInputProps, type DatePartNames } from './date-input';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-close.js","sourceRoot":"","sources":["../../src/dialog/dialog-close.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAqB,KAAK,EAAE,MAAM,OAAO,CAAC;AAUjD;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,WAAW,CAAC,EAAE,QAAQ,EAAoB;IACxD,yEAAyE;IACzE,4DAA4D;IAC5D,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;IACnB,OAAO,CACL,KAAC,SAAS,CAAC,YAAY,IAAC,OAAO,QAAC,EAAE,EAAE,EAAE,YACnC,QAAQ,GACc,CAC1B,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"dialog-close.js","sourceRoot":"","sources":["../../src/dialog/dialog-close.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAqB,KAAK,EAAE,MAAM,OAAO,CAAC;AAUjD;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,WAAW,CAAC,EAAE,QAAQ,EAAoB;IACxD,yEAAyE;IACzE,4DAA4D;IAC5D,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;IACnB,OAAO,CACL,KAAC,SAAS,CAAC,YAAY,IAAC,OAAO,QAAC,EAAE,EAAE,EAAE,YACnC,QAAQ,GACc,CAC1B,CAAC;AACJ,CAAC","sourcesContent":["import { Dialog as ArkDialog } from '@ark-ui/react/dialog';\nimport { type ReactElement, useId } from 'react';\n\nexport interface DialogCloseProps {\n /**\n * The one element that closes the dialog, usually a `Button`. It keeps its\n * own look, label and `ref`; DialogClose adds the closing click.\n */\n children: ReactElement;\n}\n\n/**\n * Makes its child close the enclosing `Dialog` when activated.\n *\n * ```tsx\n * <DialogClose>\n * <Button variant=\"secondary\">Cancel</Button>\n * </DialogClose>\n * ```\n *\n * Use it for the dismissive action, or for a committing one that should\n * close at once. Closing goes through the dialog's `onOpenChange`, so a\n * controlled dialog decides, as it does for Escape. Must be rendered inside\n * a `Dialog` — in its `actions` or its body.\n */\nexport function DialogClose({ children }: DialogCloseProps) {\n // Ark gives every close trigger in a dialog the same id; a dialog with a\n // close button and a Cancel would otherwise carry it twice.\n const id = useId();\n return (\n <ArkDialog.CloseTrigger asChild id={id}>\n {children}\n </ArkDialog.CloseTrigger>\n );\n}\n"]}
|