@kanso-labs/kanso-ui 0.19.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/calendar/index.js +80 -0
- package/dist/calendar/index.js.map +1 -0
- package/dist/calendar/months.js +14 -0
- package/dist/calendar/months.js.map +1 -0
- package/dist/calendar/styles.js +150 -0
- package/dist/calendar/styles.js.map +1 -0
- package/dist/chip/styles.js +86 -0
- package/dist/chip/styles.js.map +1 -0
- package/dist/components/autocomplete/index.d.ts +45 -0
- package/dist/components/autocomplete/index.js +77 -0
- package/dist/components/autocomplete/index.js.map +1 -0
- package/dist/components/breadcrumbs/index.d.ts +57 -0
- package/dist/components/breadcrumbs/index.js +133 -0
- package/dist/components/breadcrumbs/index.js.map +1 -0
- package/dist/components/button/index.d.ts +9 -3
- package/dist/components/button/index.js +15 -2
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/calendar/index.d.ts +32 -0
- package/dist/components/calendar/index.js +97 -0
- package/dist/components/calendar/index.js.map +1 -0
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/chip/index.js +3 -4
- package/dist/components/chip/index.js.map +1 -1
- package/dist/components/chip-group/index.d.ts +50 -0
- package/dist/components/chip-group/index.js +117 -0
- package/dist/components/chip-group/index.js.map +1 -0
- package/dist/components/color-slider/index.d.ts +41 -0
- package/dist/components/color-slider/index.js +81 -0
- package/dist/components/color-slider/index.js.map +1 -0
- package/dist/components/color-swatch/index.d.ts +37 -0
- package/dist/components/color-swatch/index.js +88 -0
- package/dist/components/color-swatch/index.js.map +1 -0
- package/dist/components/color-swatch-picker/index.d.ts +49 -0
- package/dist/components/color-swatch-picker/index.js +99 -0
- package/dist/components/color-swatch-picker/index.js.map +1 -0
- package/dist/components/combo-box/index.d.ts +89 -0
- package/dist/components/combo-box/index.js +141 -0
- package/dist/components/combo-box/index.js.map +1 -0
- package/dist/components/date-field/index.d.ts +54 -0
- package/dist/components/date-field/index.js +58 -0
- package/dist/components/date-field/index.js.map +1 -0
- package/dist/components/date-picker/index.d.ts +57 -0
- package/dist/components/date-picker/index.js +75 -0
- package/dist/components/date-picker/index.js.map +1 -0
- package/dist/components/date-range-picker/index.d.ts +69 -0
- package/dist/components/date-range-picker/index.js +95 -0
- package/dist/components/date-range-picker/index.js.map +1 -0
- package/dist/components/disclosure/index.d.ts +68 -0
- package/dist/components/disclosure/index.js +169 -0
- package/dist/components/disclosure/index.js.map +1 -0
- package/dist/components/disclosure-group/index.d.ts +37 -0
- package/dist/components/disclosure-group/index.js +52 -0
- package/dist/components/disclosure-group/index.js.map +1 -0
- package/dist/components/drop-zone/index.d.ts +60 -0
- package/dist/components/drop-zone/index.js +118 -0
- package/dist/components/drop-zone/index.js.map +1 -0
- package/dist/components/drop-zone/styles.js +61 -0
- package/dist/components/drop-zone/styles.js.map +1 -0
- package/dist/components/icon-button/index.d.ts +50 -11
- package/dist/components/icon-button/index.js +129 -4
- package/dist/components/icon-button/index.js.map +1 -1
- package/dist/components/index.d.ts +25 -1
- package/dist/components/list/index.d.ts +97 -0
- package/dist/components/list/index.js +195 -0
- package/dist/components/list/index.js.map +1 -0
- package/dist/components/list-box/index.d.ts +1 -1
- package/dist/components/list-box/index.js +44 -30
- package/dist/components/list-box/index.js.map +1 -1
- package/dist/components/list-item/index.d.ts +14 -5
- package/dist/components/list-item/index.js +12 -7
- package/dist/components/list-item/index.js.map +1 -1
- package/dist/components/menu/index.d.ts +14 -4
- package/dist/components/menu/index.js +53 -35
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/navigation-tree/index.d.ts +94 -0
- package/dist/components/navigation-tree/index.js +266 -0
- package/dist/components/navigation-tree/index.js.map +1 -0
- package/dist/components/number-field/index.js +1 -1
- package/dist/components/range-calendar/index.d.ts +39 -0
- package/dist/components/range-calendar/index.js +105 -0
- package/dist/components/range-calendar/index.js.map +1 -0
- package/dist/components/search-field/index.js +1 -1
- package/dist/components/segmented-button/index.d.ts +69 -0
- package/dist/components/segmented-button/index.js +149 -0
- package/dist/components/segmented-button/index.js.map +1 -0
- package/dist/components/select/index.d.ts +82 -0
- package/dist/components/select/index.js +125 -0
- package/dist/components/select/index.js.map +1 -0
- package/dist/components/separator/index.d.ts +20 -6
- package/dist/components/separator/index.js +40 -6
- package/dist/components/separator/index.js.map +1 -1
- package/dist/components/snackbar/index.js +1 -1
- package/dist/components/switch/index.js +3 -3
- package/dist/components/switch/index.js.map +1 -1
- package/dist/components/table/index.d.ts +197 -0
- package/dist/components/table/index.js +327 -0
- package/dist/components/table/index.js.map +1 -0
- package/dist/components/time-field/index.d.ts +53 -0
- package/dist/components/time-field/index.js +57 -0
- package/dist/components/time-field/index.js.map +1 -0
- package/dist/components/token-field/index.d.ts +81 -0
- package/dist/components/token-field/index.js +78 -0
- package/dist/components/token-field/index.js.map +1 -0
- package/dist/components/toolbar/index.d.ts +51 -0
- package/dist/components/toolbar/index.js +85 -0
- package/dist/components/toolbar/index.js.map +1 -0
- package/dist/components/tree/index.d.ts +116 -0
- package/dist/components/tree/index.js +245 -0
- package/dist/components/tree/index.js.map +1 -0
- package/dist/date.d.ts +1 -0
- package/dist/date.js +1 -0
- package/dist/drag/hooks.d.ts +25 -0
- package/dist/drag/hooks.js +55 -0
- package/dist/drag/hooks.js.map +1 -0
- package/dist/drag/index.js +28 -0
- package/dist/drag/index.js.map +1 -0
- package/dist/drag/styles.js +46 -0
- package/dist/drag/styles.js.map +1 -0
- package/dist/field/index.d.ts +2 -2
- package/dist/field/index.js +95 -18
- package/dist/field/index.js.map +1 -1
- package/dist/glyphs/index.js +64 -1
- package/dist/glyphs/index.js.map +1 -1
- package/dist/index.d.ts +28 -2
- package/dist/index.js +31 -5
- package/dist/layout.d.ts +44 -0
- package/dist/layout.js +45 -0
- package/dist/layout.js.map +1 -0
- package/dist/react-aria.d.ts +3 -2
- package/dist/react-aria.js +3 -2
- package/dist/render/aria.js +15 -1
- package/dist/render/aria.js.map +1 -1
- package/dist/row/index.js +25 -13
- package/dist/row/index.js.map +1 -1
- package/dist/row/styles.js +30 -0
- package/dist/row/styles.js.map +1 -1
- package/dist/segments/index.js +22 -0
- package/dist/segments/index.js.map +1 -0
- package/dist/segments/styles.js +42 -0
- package/dist/segments/styles.js.map +1 -0
- package/dist/styles/chequer.js +14 -0
- package/dist/styles/chequer.js.map +1 -0
- package/dist/styles/picker.js +61 -0
- package/dist/styles/picker.js.map +1 -0
- package/dist/styles.css +429 -27
- package/dist/tokens/design.tokens.stylex.js +61 -1
- package/dist/tokens/design.tokens.stylex.js.map +1 -1
- package/package.json +8 -3
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { props } from "../node_modules/@stylexjs/stylex/lib/es/stylex.js";
|
|
2
|
+
import { ChevronEndGlyph } from "../glyphs/index.js";
|
|
3
|
+
import { calendarStyles } from "./styles.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
6
|
+
import { Button, CalendarGridHeader, CalendarHeaderCell, Heading } from "react-aria-components";
|
|
7
|
+
//#region src/calendar/index.tsx
|
|
8
|
+
function CalendarGridHeader$1() {
|
|
9
|
+
const $ = c(1);
|
|
10
|
+
let t0;
|
|
11
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
12
|
+
t0 = /* @__PURE__ */ jsx(CalendarGridHeader, { children: calendarHeaderCell });
|
|
13
|
+
$[0] = t0;
|
|
14
|
+
} else t0 = $[0];
|
|
15
|
+
return t0;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The two chevrons with the month between them. React Aria wires
|
|
19
|
+
* `slot="previous"` and `slot="next"` on its own `Button`, and `IconButton`
|
|
20
|
+
* renders React Aria's `Button` too — so nesting one inside a slot would put
|
|
21
|
+
* two buttons where the date pickers page draws one. The chevrons take the
|
|
22
|
+
* icon buttons page's 40dp square and its state layer instead.
|
|
23
|
+
*
|
|
24
|
+
* A plain element rather than a `<header>`: a header is a banner landmark,
|
|
25
|
+
* landmarks may not nest, and React Aria puts a calendar in
|
|
26
|
+
* `role="application"` — axe fails the page on it.
|
|
27
|
+
*/
|
|
28
|
+
function CalendarHeader() {
|
|
29
|
+
const $ = c(4);
|
|
30
|
+
let t0;
|
|
31
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
32
|
+
t0 = props(calendarStyles.header);
|
|
33
|
+
$[0] = t0;
|
|
34
|
+
} else t0 = $[0];
|
|
35
|
+
let t1;
|
|
36
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
37
|
+
t1 = /* @__PURE__ */ jsx(Button, {
|
|
38
|
+
className: chevronClassName,
|
|
39
|
+
slot: "previous",
|
|
40
|
+
children: /* @__PURE__ */ jsx(ChevronEndGlyph, { ...props(calendarStyles.chevronGlyph, calendarStyles.chevronGlyphPrevious) })
|
|
41
|
+
});
|
|
42
|
+
$[1] = t1;
|
|
43
|
+
} else t1 = $[1];
|
|
44
|
+
let t2;
|
|
45
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
46
|
+
t2 = /* @__PURE__ */ jsx(Heading, { ...props(calendarStyles.heading) });
|
|
47
|
+
$[2] = t2;
|
|
48
|
+
} else t2 = $[2];
|
|
49
|
+
let t3;
|
|
50
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
51
|
+
t3 = /* @__PURE__ */ jsxs("div", {
|
|
52
|
+
...t0,
|
|
53
|
+
children: [
|
|
54
|
+
t1,
|
|
55
|
+
t2,
|
|
56
|
+
/* @__PURE__ */ jsx(Button, {
|
|
57
|
+
className: chevronClassName,
|
|
58
|
+
slot: "next",
|
|
59
|
+
children: /* @__PURE__ */ jsx(ChevronEndGlyph, { ...props(calendarStyles.chevronGlyph) })
|
|
60
|
+
})
|
|
61
|
+
]
|
|
62
|
+
});
|
|
63
|
+
$[3] = t3;
|
|
64
|
+
} else t3 = $[3];
|
|
65
|
+
return t3;
|
|
66
|
+
}
|
|
67
|
+
/** The weekday row, in the type the page gives both it and the dates. */
|
|
68
|
+
function calendarHeaderCell(day) {
|
|
69
|
+
return /* @__PURE__ */ jsx(CalendarHeaderCell, {
|
|
70
|
+
...props(calendarStyles.headerCell),
|
|
71
|
+
children: day
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
function chevronClassName() {
|
|
75
|
+
return props(calendarStyles.chevron).className ?? "";
|
|
76
|
+
}
|
|
77
|
+
//#endregion
|
|
78
|
+
export { CalendarGridHeader$1 as CalendarGridHeader, CalendarHeader };
|
|
79
|
+
|
|
80
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["calendarHeaderCell","chevronClassName"],"sources":["../../src/calendar/index.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport * as stylex from '@stylexjs/stylex';\nimport { Button as RACButton, CalendarGridHeader as RACCalendarGridHeader, CalendarHeaderCell as RACCalendarHeaderCell, Heading as RACHeading } from 'react-aria-components';\nimport { ChevronEndGlyph } from '../glyphs';\nimport { calendarStyles } from './styles';\n\n// The parts Calendar and RangeCalendar both render: the row that moves the\n// month, the weekday header, and the offsets that put more than one month\n// side by side. Apart from either component so the two cannot drift, and\n// outside `src/components` for the reason ./styles.ts gives.\n\nfunction CalendarGridHeader(): ReactElement {\n return <RACCalendarGridHeader>{calendarHeaderCell}</RACCalendarGridHeader>;\n}\n\n/**\n * The two chevrons with the month between them. React Aria wires\n * `slot=\"previous\"` and `slot=\"next\"` on its own `Button`, and `IconButton`\n * renders React Aria's `Button` too — so nesting one inside a slot would put\n * two buttons where the date pickers page draws one. The chevrons take the\n * icon buttons page's 40dp square and its state layer instead.\n *\n * A plain element rather than a `<header>`: a header is a banner landmark,\n * landmarks may not nest, and React Aria puts a calendar in\n * `role=\"application\"` — axe fails the page on it.\n */\nfunction CalendarHeader(): ReactElement {\n return <div {...stylex.props(calendarStyles.header)}>\n <RACButton className={chevronClassName} slot=\"previous\">\n <ChevronEndGlyph {...stylex.props(calendarStyles.chevronGlyph, calendarStyles.chevronGlyphPrevious)} />\n </RACButton>\n <RACHeading {...stylex.props(calendarStyles.heading)} />\n <RACButton className={chevronClassName} slot=\"next\">\n <ChevronEndGlyph {...stylex.props(calendarStyles.chevronGlyph)} />\n </RACButton>\n </div>;\n}\n\n/** The weekday row, in the type the page gives both it and the dates. */\nfunction calendarHeaderCell(day: string): ReactElement {\n return <RACCalendarHeaderCell {...stylex.props(calendarStyles.headerCell)}>\n {day}\n </RACCalendarHeaderCell>;\n}\nfunction chevronClassName() {\n return stylex.props(calendarStyles.chevron).className ?? '';\n}\nexport { CalendarGridHeader, CalendarHeader };"],"mappings":";;;;;;;AAWA,SAAA,uBAAA;CAAA,MAAA,IAAA,EAAA,CAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,OAAA,IAAA,2BAAA,GAAA;EACS,KAAA,oBAAC,oBAAD,EAAA,UAAwB,mBAAF,CAAA;EAA6C,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,OAAnE;AAAmE;;;;;;;;;;;;AAc5E,SAAA,iBAAA;CAAA,MAAA,IAAA,EAAA,CAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,OAAA,IAAA,2BAAA,GAAA;EACkB,KAAA,MAAa,eAAc,MAAO;EAAC,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,OAAA,IAAA,2BAAA,GAAA;EAC/C,KAAA,oBAAC,QAAD;GAAsBC,WAAA;GAAuB,MAAA;GAC3C,UAAA,oBAAC,iBAAD,EAAgB,GAAK,MAAa,eAAc,cAAe,eAAc,oBAAqB,EAAC,CAAA;EAD3F,CAAA;EAEE,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,OAAA,IAAA,2BAAA,GAAA;EACZ,KAAA,oBAAC,SAAD,EAAW,GAAK,MAAa,eAAc,OAAQ,EAAC,CAAA;EAAI,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,OAAA,IAAA,2BAAA,GAAA;EAJrD,KAAA,qBAAA,OAAA;GAQC,GARQ;GAAT,UAAA;IACH;IAGA;IACA,oBAAC,QAAD;KAAsBA,WAAA;KAAuB,MAAA;KAC3C,UAAA,oBAAC,iBAAD,EAAgB,GAAK,MAAa,eAAc,YAAa,EAAC,CAAA;IADtD,CAAA;GAGN;;EAAA,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,OARD;AAQC;;AAIV,SAAS,mBAAmB,KAA2B;CACrD,OAAO,oBAAC,oBAAD;EAAuB,GAAI,MAAa,eAAe,UAAU;EACnE,UAAA;CACoB,CAAA;AAC3B;AACA,SAAS,mBAAmB;CAC1B,OAAO,MAAa,eAAe,OAAO,CAAC,CAAC,aAAa;AAC3D"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/calendar/months.ts
|
|
2
|
+
/**
|
|
3
|
+
* One offset per visible month, so `visibleDuration` of more than one draws
|
|
4
|
+
* the months side by side rather than one grid that scrolls between them.
|
|
5
|
+
* React Aria positions each grid from its own offset; the heading names the
|
|
6
|
+
* whole range, which is what its own `Heading` renders.
|
|
7
|
+
*/
|
|
8
|
+
function monthOffsets(months) {
|
|
9
|
+
return Array.from({ length: Math.max(1, months) }, (_unused, index) => ({ months: index }));
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { monthOffsets };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=months.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"months.js","names":[],"sources":["../../src/calendar/months.ts"],"sourcesContent":["// Apart from ./index.tsx so that file exports components alone, which is what\n// keeps fast refresh working for it — the same arrangement `src/row` uses.\n\n/**\n * One offset per visible month, so `visibleDuration` of more than one draws\n * the months side by side rather than one grid that scrolls between them.\n * React Aria positions each grid from its own offset; the heading names the\n * whole range, which is what its own `Heading` renders.\n */\nfunction monthOffsets(months: number) {\n return Array.from({ length: Math.max(1, months) }, (_unused, index) => ({\n months: index,\n }))\n}\n\nexport { monthOffsets }\n"],"mappings":";;;;;;;AASA,SAAS,aAAa,QAAgB;CACpC,OAAO,MAAM,KAAK,EAAE,QAAQ,KAAK,IAAI,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EACtE,QAAQ,MACV,EAAE;AACJ"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
//#region src/calendar/styles.ts
|
|
2
|
+
const calendarStyles = {
|
|
3
|
+
cell: {
|
|
4
|
+
kGNEyG: "x6s0dn4",
|
|
5
|
+
kWkggS: "x83qkoq x1p2om7n xjbqb8w",
|
|
6
|
+
kZKoxP: "x1vqgdyp",
|
|
7
|
+
kaIpWk: "x3y1ksm",
|
|
8
|
+
kB7OPa: "x9f619",
|
|
9
|
+
kMwMTN: "x139gbkf",
|
|
10
|
+
kkrTdU: "x1ypdohk",
|
|
11
|
+
k1xSpc: "x78zum5",
|
|
12
|
+
kMv6JI: "x16svsjw",
|
|
13
|
+
kGuDYH: "x1848etk",
|
|
14
|
+
k63SB2: "x1c52epr",
|
|
15
|
+
kzqmXN: "x100vrsf",
|
|
16
|
+
kjj79g: "xl56j7k",
|
|
17
|
+
kb6lSQ: "x1qn8t5l",
|
|
18
|
+
kLWn49: "xh7dzej",
|
|
19
|
+
kUOVxO: "x34s64n",
|
|
20
|
+
kjBf7l: "xrgy624",
|
|
21
|
+
kInvED: "x1hl8ikr",
|
|
22
|
+
k3XXqK: "x9v5kkp x1t137rt",
|
|
23
|
+
kMeerF: "x1de99jn",
|
|
24
|
+
$$css: true
|
|
25
|
+
},
|
|
26
|
+
cellDisabled: {
|
|
27
|
+
kWkggS: "xjbqb8w",
|
|
28
|
+
kMwMTN: "x9w6zvh",
|
|
29
|
+
kkrTdU: "x1h6gzvc",
|
|
30
|
+
$$css: true
|
|
31
|
+
},
|
|
32
|
+
cellInRange: {
|
|
33
|
+
kWkggS: "x1mpme18 x1q7sp4o x15dekr4",
|
|
34
|
+
kaIpWk: "x2u8bby",
|
|
35
|
+
kMwMTN: "x1sawysd",
|
|
36
|
+
kzqmXN: "xh8yej3",
|
|
37
|
+
kUOVxO: "xrxpjvj",
|
|
38
|
+
$$css: true
|
|
39
|
+
},
|
|
40
|
+
cellRangeEnd: {
|
|
41
|
+
kT0f0o: "x1mh50ju",
|
|
42
|
+
kfmiAY: "x13dhofw",
|
|
43
|
+
$$css: true
|
|
44
|
+
},
|
|
45
|
+
cellRangeStart: {
|
|
46
|
+
kVL7Gh: "xqmr837",
|
|
47
|
+
krdFHd: "xz4iguh",
|
|
48
|
+
$$css: true
|
|
49
|
+
},
|
|
50
|
+
cellSelected: {
|
|
51
|
+
kWkggS: "x1nik15g x1q2w5h1 xnety89",
|
|
52
|
+
kMwMTN: "xwjo7ld",
|
|
53
|
+
$$css: true
|
|
54
|
+
},
|
|
55
|
+
cellToday: {
|
|
56
|
+
kVAM5u: "x1uajy3w",
|
|
57
|
+
ksu8eU: "x1y0btm7",
|
|
58
|
+
kMzoRj: "xmkeg23",
|
|
59
|
+
kMwMTN: "x1mxwv8y",
|
|
60
|
+
$$css: true
|
|
61
|
+
},
|
|
62
|
+
chevron: {
|
|
63
|
+
kGNEyG: "x6s0dn4",
|
|
64
|
+
kWkggS: "x1dg9itu x1728qcm xjbqb8w",
|
|
65
|
+
kZKoxP: "x1vqgdyp",
|
|
66
|
+
kaIpWk: "x3y1ksm",
|
|
67
|
+
kMzoRj: "xc342km",
|
|
68
|
+
kB7OPa: "x9f619",
|
|
69
|
+
kMwMTN: "x1w5n3ug",
|
|
70
|
+
kkrTdU: "x1ypdohk",
|
|
71
|
+
k1xSpc: "x78zum5",
|
|
72
|
+
kmuXW: "x2lah0s",
|
|
73
|
+
kzqmXN: "x100vrsf",
|
|
74
|
+
kjj79g: "xl56j7k",
|
|
75
|
+
kUOVxO: "x34s64n",
|
|
76
|
+
kjBf7l: "xrgy624",
|
|
77
|
+
kInvED: "x1hl8ikr",
|
|
78
|
+
k3XXqK: "x9v5kkp x1t137rt",
|
|
79
|
+
kMeerF: "x1de99jn",
|
|
80
|
+
kmVPX3: "x1717udv",
|
|
81
|
+
$$css: true
|
|
82
|
+
},
|
|
83
|
+
chevronGlyph: {
|
|
84
|
+
kZKoxP: "xxk0z11",
|
|
85
|
+
kzqmXN: "xvy4d1p",
|
|
86
|
+
k3aq6I: "x19axjrm x1c071of",
|
|
87
|
+
$$css: true
|
|
88
|
+
},
|
|
89
|
+
chevronGlyphPrevious: {
|
|
90
|
+
k3aq6I: "xdg80k9 xpk2tj9",
|
|
91
|
+
$$css: true
|
|
92
|
+
},
|
|
93
|
+
grid: {
|
|
94
|
+
kLvRdT: "x1vathgz",
|
|
95
|
+
kheTzg: "x1gukg7c",
|
|
96
|
+
kzqmXN: "xh8yej3",
|
|
97
|
+
$$css: true
|
|
98
|
+
},
|
|
99
|
+
header: {
|
|
100
|
+
kGNEyG: "x6s0dn4",
|
|
101
|
+
k1xSpc: "x78zum5",
|
|
102
|
+
kOIVth: "x126z3so",
|
|
103
|
+
kjj79g: "x1qughib",
|
|
104
|
+
kAzted: "x1ba4aug",
|
|
105
|
+
$$css: true
|
|
106
|
+
},
|
|
107
|
+
headerCell: {
|
|
108
|
+
kZKoxP: "x1vqgdyp",
|
|
109
|
+
kMwMTN: "x139gbkf",
|
|
110
|
+
kMv6JI: "x16svsjw",
|
|
111
|
+
kGuDYH: "x1848etk",
|
|
112
|
+
k63SB2: "x1c52epr",
|
|
113
|
+
kb6lSQ: "x1qn8t5l",
|
|
114
|
+
kLWn49: "xh7dzej",
|
|
115
|
+
$$css: true
|
|
116
|
+
},
|
|
117
|
+
heading: {
|
|
118
|
+
kMwMTN: "x1w5n3ug",
|
|
119
|
+
kMv6JI: "xkknnkr",
|
|
120
|
+
kGuDYH: "x14zspaw",
|
|
121
|
+
k63SB2: "x1v9cpvo",
|
|
122
|
+
kb6lSQ: "x155f00i",
|
|
123
|
+
kLWn49: "x1lz68p4",
|
|
124
|
+
kogj98: "x1ghz6dp",
|
|
125
|
+
k9WMMc: "x2b8uid",
|
|
126
|
+
$$css: true
|
|
127
|
+
},
|
|
128
|
+
months: {
|
|
129
|
+
k1xSpc: "x78zum5",
|
|
130
|
+
kOIVth: "xj2l1yv",
|
|
131
|
+
$$css: true
|
|
132
|
+
},
|
|
133
|
+
root: {
|
|
134
|
+
kWkggS: "xvkjz1l",
|
|
135
|
+
kaIpWk: "xhpdng0",
|
|
136
|
+
kB7OPa: "x9f619",
|
|
137
|
+
kMwMTN: "x139gbkf",
|
|
138
|
+
k1xSpc: "x78zum5",
|
|
139
|
+
kXwgrk: "xdt5ytf",
|
|
140
|
+
kOIVth: "x1gka490",
|
|
141
|
+
kzqmXN: "xeq5yr9",
|
|
142
|
+
k7Eaqz: "x1gvwcb",
|
|
143
|
+
kmVPX3: "xa36j16",
|
|
144
|
+
$$css: true
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
//#endregion
|
|
148
|
+
export { calendarStyles };
|
|
149
|
+
|
|
150
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","names":[],"sources":["../../src/calendar/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, radii, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// The styles Calendar and RangeCalendar both draw. Apart from either\n// component so the two cannot drift, and outside `src/components` because a\n// directory there is a public component with stories, a barrel entry and a\n// `styling.test.tsx` case — which shared styles are none of.\n//\n// The values are the date pickers page's docked calendar, named in\n// `src/components/calendar/index.tsx` along with the departures from it. What\n// is only a range's — the band between the two ends — is marked as the\n// library's own where it is defined, since the page tokenises no such thing.\n\nconst calendarStyles = {\n cell: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"x83qkoq x1p2om7n xjbqb8w\",\n kZKoxP: \"x1vqgdyp\",\n kaIpWk: \"x3y1ksm\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kzqmXN: \"x100vrsf\",\n kjj79g: \"xl56j7k\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n kUOVxO: \"x34s64n\",\n kjBf7l: \"xrgy624\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n cellDisabled: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"x9w6zvh\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n cellInRange: {\n kWkggS: \"x1mpme18 x1q7sp4o x15dekr4\",\n kaIpWk: \"x2u8bby\",\n kMwMTN: \"x1sawysd\",\n kzqmXN: \"xh8yej3\",\n kUOVxO: \"xrxpjvj\",\n $$css: true\n },\n cellRangeEnd: {\n kT0f0o: \"x1mh50ju\",\n kfmiAY: \"x13dhofw\",\n $$css: true\n },\n cellRangeStart: {\n kVL7Gh: \"xqmr837\",\n krdFHd: \"xz4iguh\",\n $$css: true\n },\n cellSelected: {\n kWkggS: \"x1nik15g x1q2w5h1 xnety89\",\n kMwMTN: \"xwjo7ld\",\n $$css: true\n },\n cellToday: {\n kVAM5u: \"x1uajy3w\",\n ksu8eU: \"x1y0btm7\",\n kMzoRj: \"xmkeg23\",\n kMwMTN: \"x1mxwv8y\",\n $$css: true\n },\n chevron: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"x1dg9itu x1728qcm xjbqb8w\",\n kZKoxP: \"x1vqgdyp\",\n kaIpWk: \"x3y1ksm\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x100vrsf\",\n kjj79g: \"xl56j7k\",\n kUOVxO: \"x34s64n\",\n kjBf7l: \"xrgy624\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n kmVPX3: \"x1717udv\",\n $$css: true\n },\n chevronGlyph: {\n kZKoxP: \"xxk0z11\",\n kzqmXN: \"xvy4d1p\",\n k3aq6I: \"x19axjrm x1c071of\",\n $$css: true\n },\n chevronGlyphPrevious: {\n k3aq6I: \"xdg80k9 xpk2tj9\",\n $$css: true\n },\n grid: {\n kLvRdT: \"x1vathgz\",\n kheTzg: \"x1gukg7c\",\n kzqmXN: \"xh8yej3\",\n $$css: true\n },\n header: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"x126z3so\",\n kjj79g: \"x1qughib\",\n kAzted: \"x1ba4aug\",\n $$css: true\n },\n headerCell: {\n kZKoxP: \"x1vqgdyp\",\n kMwMTN: \"x139gbkf\",\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n $$css: true\n },\n heading: {\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n kogj98: \"x1ghz6dp\",\n k9WMMc: \"x2b8uid\",\n $$css: true\n },\n months: {\n k1xSpc: \"x78zum5\",\n kOIVth: \"xj2l1yv\",\n $$css: true\n },\n root: {\n kWkggS: \"xvkjz1l\",\n kaIpWk: \"xhpdng0\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"x1gka490\",\n kzqmXN: \"xeq5yr9\",\n k7Eaqz: \"x1gvwcb\",\n kmVPX3: \"xa36j16\",\n $$css: true\n }\n};\nexport { calendarStyles };"],"mappings":";AAcA,MAAM,iBAAiB;CACrB,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,cAAc;EACZ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,aAAa;EACX,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,cAAc;EACZ,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,gBAAgB;EACd,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,cAAc;EACZ,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,WAAW;EACT,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,cAAc;EACZ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,sBAAsB;EACpB,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,QAAQ;EACN,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,YAAY;EACV,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,QAAQ;EACN,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;AACF"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
//#region src/chip/styles.ts
|
|
2
|
+
const chipStyles = {
|
|
3
|
+
base: {
|
|
4
|
+
kGNEyG: "x6s0dn4",
|
|
5
|
+
kZKoxP: "x10w6t97",
|
|
6
|
+
kaIpWk: "x1xdvaa9",
|
|
7
|
+
ksu8eU: "x1y0btm7",
|
|
8
|
+
kMzoRj: "xmkeg23",
|
|
9
|
+
kB7OPa: "x9f619",
|
|
10
|
+
kkrTdU: "x1ypdohk",
|
|
11
|
+
k1xSpc: "x3nfvp2",
|
|
12
|
+
kmuXW: "x2lah0s",
|
|
13
|
+
kMv6JI: "xkknnkr",
|
|
14
|
+
kGuDYH: "x14zspaw",
|
|
15
|
+
k63SB2: "x1v9cpvo",
|
|
16
|
+
kOIVth: "x126z3so",
|
|
17
|
+
kb6lSQ: "x155f00i",
|
|
18
|
+
kLWn49: "x1lz68p4",
|
|
19
|
+
kjBf7l: "xrgy624",
|
|
20
|
+
kInvED: "x1hl8ikr",
|
|
21
|
+
k3XXqK: "x9v5kkp x1t137rt",
|
|
22
|
+
kMeerF: "x1de99jn",
|
|
23
|
+
k8WAf4: "xt970qd",
|
|
24
|
+
kg3NbH: "x790zyz",
|
|
25
|
+
kIyJzY: "x1qno0dh",
|
|
26
|
+
k1ekBW: "x1eaenvl",
|
|
27
|
+
kAMwcw: "xpc4ca7",
|
|
28
|
+
$$css: true
|
|
29
|
+
},
|
|
30
|
+
disabled: {
|
|
31
|
+
kMwMTN: "x1xj74d8",
|
|
32
|
+
kkrTdU: "x1h6gzvc",
|
|
33
|
+
$$css: true
|
|
34
|
+
},
|
|
35
|
+
disabledSelected: {
|
|
36
|
+
kWkggS: "xepofeg",
|
|
37
|
+
$$css: true
|
|
38
|
+
},
|
|
39
|
+
disabledUnselected: {
|
|
40
|
+
kWkggS: "xjbqb8w",
|
|
41
|
+
kVAM5u: "xrh88j3",
|
|
42
|
+
$$css: true
|
|
43
|
+
},
|
|
44
|
+
remove: {
|
|
45
|
+
kGNEyG: "x6s0dn4",
|
|
46
|
+
kWkggS: "xy3r1oc x15a1ka xjbqb8w",
|
|
47
|
+
kZKoxP: "xmix8c7",
|
|
48
|
+
kaIpWk: "x3y1ksm",
|
|
49
|
+
kMzoRj: "xc342km",
|
|
50
|
+
kB7OPa: "x9f619",
|
|
51
|
+
kMwMTN: "x1heor9g",
|
|
52
|
+
kkrTdU: "x1ypdohk",
|
|
53
|
+
k1xSpc: "x3nfvp2",
|
|
54
|
+
kmuXW: "x2lah0s",
|
|
55
|
+
kzqmXN: "x1xp8n7a",
|
|
56
|
+
kjj79g: "xl56j7k",
|
|
57
|
+
k71WvV: "x1kfc2zf",
|
|
58
|
+
kjBf7l: "x14ytart",
|
|
59
|
+
kInvED: "x1y3gkto",
|
|
60
|
+
k3XXqK: "x9v5kkp x1t137rt",
|
|
61
|
+
kMeerF: "x1de99jn",
|
|
62
|
+
kmVPX3: "x1717udv",
|
|
63
|
+
$$css: true
|
|
64
|
+
},
|
|
65
|
+
removeGlyph: {
|
|
66
|
+
kZKoxP: "xmix8c7",
|
|
67
|
+
kzqmXN: "x1xp8n7a",
|
|
68
|
+
$$css: true
|
|
69
|
+
},
|
|
70
|
+
selected: {
|
|
71
|
+
kWkggS: "xnqsvhv xlizrex x15dekr4",
|
|
72
|
+
kVAM5u: "x9r1u3d",
|
|
73
|
+
kMwMTN: "x1sawysd",
|
|
74
|
+
$$css: true
|
|
75
|
+
},
|
|
76
|
+
unselected: {
|
|
77
|
+
kWkggS: "x83qkoq x1p2om7n xjbqb8w",
|
|
78
|
+
kVAM5u: "x133yhug",
|
|
79
|
+
kMwMTN: "x1w5n3ug",
|
|
80
|
+
$$css: true
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
//#endregion
|
|
84
|
+
export { chipStyles };
|
|
85
|
+
|
|
86
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","names":[],"sources":["../../src/chip/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// The pill the chips page draws, shared by the two components that draw one:\n// Chip, which is a toggle on its own, and ChipGroup's chip, which is one of a\n// set that can also be removed. The measurements and roles are the page's\n// filter chip — a 32dp container with an 8dp corner and 16dp of inline\n// padding, an outline variant border while unselected, the secondary\n// container pair once selected.\n//\n// Each state composites an on-colour over its own container at the\n// interaction state's opacity rather than swapping in a separate hover\n// colour. `calc(<opacity> * 100%)` turns the token's unitless 0-1 ratio into\n// the percentage `color-mix()` takes, and it is inlined at each property\n// because @stylexjs/babel-plugin only statically recognises expressions\n// written directly as property values.\n//\n// The selected chip drops its border rather than recolouring it: it has a\n// container of its own to define its edge, and a border on top of that reads\n// as a second, competing outline.\n//\n// Disabled is applied from render state rather than from `:disabled`. Chip is\n// a button and would match the pseudo-class; a chip in a group is React\n// Aria's `Tag`, which is a div and never will. One mechanism serves both, and\n// StyleX replaces a property whole, so the disabled styles take the hover and\n// pressed branches of whichever state they are applied over.\n//\n// Apart from any component so a chip in a group and a chip on its own cannot\n// drift; see `src/row` for the same arrangement around a list's row.\n\nconst chipStyles = {\n base: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"x10w6t97\",\n kaIpWk: \"x1xdvaa9\",\n ksu8eU: \"x1y0btm7\",\n kMzoRj: \"xmkeg23\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x3nfvp2\",\n kmuXW: \"x2lah0s\",\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kOIVth: \"x126z3so\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n kjBf7l: \"xrgy624\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n k8WAf4: \"xt970qd\",\n kg3NbH: \"x790zyz\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"x1eaenvl\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n disabled: {\n kMwMTN: \"x1xj74d8\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n disabledSelected: {\n kWkggS: \"xepofeg\",\n $$css: true\n },\n disabledUnselected: {\n kWkggS: \"xjbqb8w\",\n kVAM5u: \"xrh88j3\",\n $$css: true\n },\n remove: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xy3r1oc x15a1ka xjbqb8w\",\n kZKoxP: \"xmix8c7\",\n kaIpWk: \"x3y1ksm\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1heor9g\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x3nfvp2\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x1xp8n7a\",\n kjj79g: \"xl56j7k\",\n k71WvV: \"x1kfc2zf\",\n kjBf7l: \"x14ytart\",\n kInvED: \"x1y3gkto\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n kmVPX3: \"x1717udv\",\n $$css: true\n },\n removeGlyph: {\n kZKoxP: \"xmix8c7\",\n kzqmXN: \"x1xp8n7a\",\n $$css: true\n },\n selected: {\n kWkggS: \"xnqsvhv xlizrex x15dekr4\",\n kVAM5u: \"x9r1u3d\",\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n unselected: {\n kWkggS: \"x83qkoq x1p2om7n xjbqb8w\",\n kVAM5u: \"x133yhug\",\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n }\n};\nexport { chipStyles };"],"mappings":";AA+BA,MAAM,aAAa;CACjB,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,UAAU;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,kBAAkB;EAChB,QAAQ;EACR,OAAO;CACT;CACA,oBAAoB;EAClB,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,QAAQ;EACN,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,aAAa;EACX,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,UAAU;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,YAAY;EACV,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;AACF"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { AutocompleteProps } from "react-aria-components";
|
|
3
|
+
//#region src/components/autocomplete/index.d.ts
|
|
4
|
+
type AutocompleteFilter<T extends object = object> = NonNullable<AutocompleteProps<T>['filter']>;
|
|
5
|
+
type AutocompleteProps$1<T extends object = object> = {
|
|
6
|
+
/**
|
|
7
|
+
* The search input and the collection it filters, in whatever the page
|
|
8
|
+
* puts around them. React Aria needs both somewhere inside.
|
|
9
|
+
*/
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Which options a search keeps. Defaults to a locale-aware contains match
|
|
13
|
+
* on each option's text — React Aria's own default is to filter nothing,
|
|
14
|
+
* which is right for a collection that arrives filtered and wrong for one
|
|
15
|
+
* written out in the page.
|
|
16
|
+
*/
|
|
17
|
+
filter?: AutocompleteFilter<T>;
|
|
18
|
+
} & Omit<AutocompleteProps<T>, 'children' | 'filter'>;
|
|
19
|
+
/**
|
|
20
|
+
* A search input that filters the collection under it. Its value is React
|
|
21
|
+
* Aria's: pass `inputValue` with `onInputChange` to control what has been
|
|
22
|
+
* typed, or `defaultInputValue` to let it keep its own.
|
|
23
|
+
*
|
|
24
|
+
* ```tsx
|
|
25
|
+
* <Autocomplete>
|
|
26
|
+
* <SearchField label="Search" placeholder="Search" />
|
|
27
|
+
* <ListBox aria-label="Results">
|
|
28
|
+
* <ListBox.Item id="first">First item</ListBox.Item>
|
|
29
|
+
* </ListBox>
|
|
30
|
+
* </Autocomplete>
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* It renders no element of its own, so the input and the collection sit
|
|
34
|
+
* wherever the page puts them — side by side in a panel, in a `Menu.Content`,
|
|
35
|
+
* or in a `Dialog` as a command palette. That is also why it takes no
|
|
36
|
+
* `className` or `style`: there is nothing for them to land on.
|
|
37
|
+
*
|
|
38
|
+
* Keyboard focus stays in the input while the arrow keys move through the
|
|
39
|
+
* collection, which is React Aria's virtual focus. `disableVirtualFocus`
|
|
40
|
+
* turns that off and makes the collection tabbable instead.
|
|
41
|
+
*/
|
|
42
|
+
declare function Autocomplete$1<T extends object = object>({ children, filter, ...props }: AutocompleteProps$1<T>): import("react").JSX.Element;
|
|
43
|
+
//#endregion
|
|
44
|
+
export { type AutocompleteFilter, type AutocompleteProps$1 as AutocompleteProps, Autocomplete$1 as default };
|
|
45
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { Autocomplete, useFilter } from "react-aria-components";
|
|
4
|
+
//#region src/components/autocomplete/index.tsx
|
|
5
|
+
/**
|
|
6
|
+
* A search input that filters the collection under it. Its value is React
|
|
7
|
+
* Aria's: pass `inputValue` with `onInputChange` to control what has been
|
|
8
|
+
* typed, or `defaultInputValue` to let it keep its own.
|
|
9
|
+
*
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <Autocomplete>
|
|
12
|
+
* <SearchField label="Search" placeholder="Search" />
|
|
13
|
+
* <ListBox aria-label="Results">
|
|
14
|
+
* <ListBox.Item id="first">First item</ListBox.Item>
|
|
15
|
+
* </ListBox>
|
|
16
|
+
* </Autocomplete>
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* It renders no element of its own, so the input and the collection sit
|
|
20
|
+
* wherever the page puts them — side by side in a panel, in a `Menu.Content`,
|
|
21
|
+
* or in a `Dialog` as a command palette. That is also why it takes no
|
|
22
|
+
* `className` or `style`: there is nothing for them to land on.
|
|
23
|
+
*
|
|
24
|
+
* Keyboard focus stays in the input while the arrow keys move through the
|
|
25
|
+
* collection, which is React Aria's virtual focus. `disableVirtualFocus`
|
|
26
|
+
* turns that off and makes the collection tabbable instead.
|
|
27
|
+
*/
|
|
28
|
+
function Autocomplete$1(t0) {
|
|
29
|
+
const $ = c(12);
|
|
30
|
+
let children;
|
|
31
|
+
let filter;
|
|
32
|
+
let props;
|
|
33
|
+
if ($[0] !== t0) {
|
|
34
|
+
({children, filter, ...props} = t0);
|
|
35
|
+
$[0] = t0;
|
|
36
|
+
$[1] = children;
|
|
37
|
+
$[2] = filter;
|
|
38
|
+
$[3] = props;
|
|
39
|
+
} else {
|
|
40
|
+
children = $[1];
|
|
41
|
+
filter = $[2];
|
|
42
|
+
props = $[3];
|
|
43
|
+
}
|
|
44
|
+
let t1;
|
|
45
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
46
|
+
t1 = { sensitivity: "base" };
|
|
47
|
+
$[4] = t1;
|
|
48
|
+
} else t1 = $[4];
|
|
49
|
+
const { contains } = useFilter(t1);
|
|
50
|
+
let t2;
|
|
51
|
+
if ($[5] !== contains || $[6] !== filter) {
|
|
52
|
+
t2 = filter ?? containsFilter(contains);
|
|
53
|
+
$[5] = contains;
|
|
54
|
+
$[6] = filter;
|
|
55
|
+
$[7] = t2;
|
|
56
|
+
} else t2 = $[7];
|
|
57
|
+
let t3;
|
|
58
|
+
if ($[8] !== children || $[9] !== props || $[10] !== t2) {
|
|
59
|
+
t3 = /* @__PURE__ */ jsx(Autocomplete, {
|
|
60
|
+
filter: t2,
|
|
61
|
+
...props,
|
|
62
|
+
children
|
|
63
|
+
});
|
|
64
|
+
$[8] = children;
|
|
65
|
+
$[9] = props;
|
|
66
|
+
$[10] = t2;
|
|
67
|
+
$[11] = t3;
|
|
68
|
+
} else t3 = $[11];
|
|
69
|
+
return t3;
|
|
70
|
+
}
|
|
71
|
+
function containsFilter(contains) {
|
|
72
|
+
return (textValue, inputValue) => contains(textValue, inputValue);
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
export { Autocomplete$1 as default };
|
|
76
|
+
|
|
77
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["children"],"sources":["../../../src/components/autocomplete/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { AutocompleteProps as RACAutocompleteProps } from 'react-aria-components'\n\nimport {\n Autocomplete as RACAutocomplete,\n useFilter,\n} from 'react-aria-components'\n\n// The search page's search with suggestions, as the wrapper React Aria makes\n// it: a search input over a collection, where typing narrows what the\n// collection shows. It draws nothing of its own — the input is SearchField,\n// the collection is ListBox or Menu, and where the two sit is the page's\n// business, which is what lets the same wrapper be a searchable list, a\n// filtered menu and a command palette inside a Dialog.\n//\n// Every other component here is a shape; this one is a behaviour, so it\n// renders no element and takes no `className` or `style`. There is nothing\n// for them to land on, and a wrapper element added to give them somewhere\n// would be a layout decision this component has no business making — the\n// three shapes above want three different ones.\n//\n// One thing is added to React Aria's. **Filtering is on by default.** Their\n// wrapper filters nothing unless it is handed a predicate, on the grounds\n// that a collection fed from a server may already be filtered. A collection\n// written out in the page is the common case here, and a search box that\n// does not search is a puzzle rather than a default, so `filter` falls back\n// to the same locale-aware contains match ComboBox uses. A collection that\n// filters itself passes a predicate that always returns true.\n\n// React Aria's own filter signature. Taken from the prop rather than written\n// out, since its third parameter is a collection node whose type this package\n// does not depend on directly.\ntype AutocompleteFilter<T extends object = object> = NonNullable<\n RACAutocompleteProps<T>['filter']\n>\n\ntype AutocompleteProps<T extends object = object> = {\n /**\n * The search input and the collection it filters, in whatever the page\n * puts around them. React Aria needs both somewhere inside.\n */\n children?: ReactNode\n /**\n * Which options a search keeps. Defaults to a locale-aware contains match\n * on each option's text — React Aria's own default is to filter nothing,\n * which is right for a collection that arrives filtered and wrong for one\n * written out in the page.\n */\n filter?: AutocompleteFilter<T>\n} & Omit<RACAutocompleteProps<T>, 'children' | 'filter'>\n\n/**\n * A search input that filters the collection under it. Its value is React\n * Aria's: pass `inputValue` with `onInputChange` to control what has been\n * typed, or `defaultInputValue` to let it keep its own.\n *\n * ```tsx\n * <Autocomplete>\n * <SearchField label=\"Search\" placeholder=\"Search\" />\n * <ListBox aria-label=\"Results\">\n * <ListBox.Item id=\"first\">First item</ListBox.Item>\n * </ListBox>\n * </Autocomplete>\n * ```\n *\n * It renders no element of its own, so the input and the collection sit\n * wherever the page puts them — side by side in a panel, in a `Menu.Content`,\n * or in a `Dialog` as a command palette. That is also why it takes no\n * `className` or `style`: there is nothing for them to land on.\n *\n * Keyboard focus stays in the input while the arrow keys move through the\n * collection, which is React Aria's virtual focus. `disableVirtualFocus`\n * turns that off and makes the collection tabbable instead.\n */\nfunction Autocomplete<T extends object = object>({\n children,\n filter,\n ...props\n}: AutocompleteProps<T>) {\n const { contains } = useFilter({ sensitivity: 'base' })\n\n return (\n <RACAutocomplete<T> filter={filter ?? containsFilter(contains)} {...props}>\n {children}\n </RACAutocomplete>\n )\n}\n\n// React Aria's filter is handed the node as well as the two strings, which a\n// contains match has no use for. Built by a call rather than written inline\n// at the prop, which is what react-perf's no-new-function-as-prop is after;\n// the React Compiler memoises the result on its input.\nfunction containsFilter(\n contains: (textValue: string, inputValue: string) => boolean,\n) {\n return (textValue: string, inputValue: string) =>\n contains(textValue, inputValue)\n}\n\nexport type { AutocompleteFilter, AutocompleteProps }\n\nexport default Autocomplete\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA0EA,SAAA,eAAA,IAAA;CAAA,MAAA,IAAA,EAAA,EAAA;CAAA,IAAA;CAAA,IAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,IAAA;EAAiD,CAAA,CAAA,UAAA,QAAA,GAAA,SAAA;EAI1B,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA;EAAA,WAAA,EAAA;EAAA,SAAA,EAAA;EAAA,QAAA,EAAA;CAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,OAAA,IAAA,2BAAA,GAAA;EACU,KAAA,EAAA,aAAe,OAAO;EAAC,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAtD,MAAA,EAAA,aAAqB,UAAU,EAAuB;CAAC,IAAA;CAAA,IAAA,EAAA,OAAA,YAAA,EAAA,OAAA,QAAA;EAGzB,KAAA,UAAU,eAAe,QAAQ;EAAC,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,YAAA,EAAA,OAAA,SAAA,EAAA,QAAA,IAAA;EAA9D,KAAA,oBAAC,cAAD;GAA4B,QAAA;GAAkC,GAAM;GACjE;EADa,CAAA;EAEE,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,MAAA;EAAA,EAAA,MAAA;CAAA,OAAA,KAAA,EAAA;CAAA,OAFlB;AAEkB;AAQtB,SAAS,eACP,UACA;CACA,QAAQ,WAAmB,eACzB,SAAS,WAAW,UAAU;AAClC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { BreadcrumbProps, BreadcrumbsProps } from "react-aria-components";
|
|
3
|
+
//#region src/components/breadcrumbs/index.d.ts
|
|
4
|
+
type BreadcrumbsItemProps = Omit<BreadcrumbProps, 'children' | 'className' | 'style'> & {
|
|
5
|
+
/** The item's label. */
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
/** A function may compute the class from the item's render state. */
|
|
8
|
+
className?: BreadcrumbProps['className'];
|
|
9
|
+
/**
|
|
10
|
+
* Where the item leads. Leave it out on an item the page handles through
|
|
11
|
+
* the trail's `onAction`, and on the current one, which is never a link.
|
|
12
|
+
*/
|
|
13
|
+
href?: string;
|
|
14
|
+
/** The link's `rel`. */
|
|
15
|
+
rel?: string;
|
|
16
|
+
/** A function may compute the style from the item's render state. */
|
|
17
|
+
style?: BreadcrumbProps['style'];
|
|
18
|
+
/** The link's `target`. */
|
|
19
|
+
target?: string;
|
|
20
|
+
};
|
|
21
|
+
type BreadcrumbsProps$1<T extends object = object> = Omit<BreadcrumbsProps<T>, 'children'> & {
|
|
22
|
+
/** The trail, as `Breadcrumbs.Item` entries. */
|
|
23
|
+
children?: ReactNode;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* A trail of links back up a hierarchy, ending at the page you are on.
|
|
27
|
+
* React Aria makes the last item the current one and marks it
|
|
28
|
+
* `aria-current="page"`; everything before it is a link.
|
|
29
|
+
*
|
|
30
|
+
* ```tsx
|
|
31
|
+
* <Breadcrumbs aria-label="Label">
|
|
32
|
+
* <Breadcrumbs.Item href="#first">First item</Breadcrumbs.Item>
|
|
33
|
+
* <Breadcrumbs.Item href="#second">Second item</Breadcrumbs.Item>
|
|
34
|
+
* <Breadcrumbs.Item>Third item</Breadcrumbs.Item>
|
|
35
|
+
* </Breadcrumbs>
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* Name it with `aria-label` or `aria-labelledby`. A page that navigates
|
|
39
|
+
* without an `href` gives each item an `id` and the trail an `onAction`,
|
|
40
|
+
* which is React Aria's and reports the key that was pressed.
|
|
41
|
+
*
|
|
42
|
+
* The call site's `className` and `style` land on the list, which is the
|
|
43
|
+
* element a layout positions.
|
|
44
|
+
*/
|
|
45
|
+
declare function Breadcrumbs$1<T extends object = object>(props: BreadcrumbsProps$1<T>): import("react").JSX.Element;
|
|
46
|
+
declare namespace Breadcrumbs$1 {
|
|
47
|
+
var Item: typeof BreadcrumbsItem;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* One entry in the trail. Give it an `href` to navigate, or an `id` and let
|
|
51
|
+
* the trail's `onAction` handle it. The last entry is the current page and
|
|
52
|
+
* is drawn as text rather than a link, whatever it is given.
|
|
53
|
+
*/
|
|
54
|
+
declare function BreadcrumbsItem({ children, href, rel, target, ...props }: BreadcrumbsItemProps): import("react").JSX.Element;
|
|
55
|
+
//#endregion
|
|
56
|
+
export { type BreadcrumbsItemProps, type BreadcrumbsProps$1 as BreadcrumbsProps, Breadcrumbs$1 as default };
|
|
57
|
+
//# sourceMappingURL=index.d.ts.map
|