@box-kite/react 2.2.6 → 2.2.8
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/.claude/rules/box-kite-rules.md +2 -0
- package/.claude/skills/box-kite/SKILL.md +2 -0
- package/.claude/skills/box-kite/references/extending.md +10 -0
- package/.claude/skills/box-kite/references/styling.md +3 -2
- package/.cursor/rules/box-kite.mdc +2 -0
- package/AGENTS.md +2 -0
- package/BOX_AI_CONTEXT.md +128 -2
- package/BOX_KITE_AI_CONTEXT.md +128 -2
- package/analytics.cjs +1 -0
- package/analytics.d.ts +10 -0
- package/analytics.mjs +121 -0
- package/behavior.cjs +1 -1
- package/behavior.mjs +42 -38
- package/box.cjs +1 -1
- package/box.d.ts +14 -0
- package/box.mjs +17 -16
- package/catalog.cjs +1 -1
- package/catalog.mjs +8 -0
- package/client.cjs +1 -1
- package/client.mjs +144 -113
- package/components/accordion.cjs +1 -1
- package/components/accordion.mjs +19 -10
- package/components/agent.cjs +1 -1
- package/components/agent.mjs +21 -8
- package/components/calendar.cjs +1 -1
- package/components/calendar.d.ts +3 -1
- package/components/calendar.mjs +154 -142
- package/components/combobox.cjs +1 -1
- package/components/combobox.mjs +184 -174
- package/components/dashboard.cjs +1 -1
- package/components/dashboard.mjs +183 -170
- package/components/dataGrid/models/columnModel.d.ts +1 -0
- package/components/dataGrid/models/gridModel.d.ts +18 -0
- package/components/dataGrid/models/headerCellModel.d.ts +1 -0
- package/components/dataGrid/models/rangeModel.d.ts +3 -0
- package/components/dataGrid.cjs +3 -3
- package/components/dataGrid.mjs +1015 -923
- package/components/dateField.cjs +1 -1
- package/components/dateField.mjs +165 -159
- package/components/datePicker.cjs +1 -1
- package/components/datePicker.mjs +198 -183
- package/components/dialog.cjs +1 -1
- package/components/dialog.mjs +38 -33
- package/components/dropdown.cjs +1 -1
- package/components/dropdown.mjs +107 -93
- package/components/form.cjs +1 -1
- package/components/form.mjs +22 -18
- package/components/menu.cjs +1 -1
- package/components/menu.d.ts +2 -0
- package/components/menu.mjs +196 -175
- package/components/overlay.cjs +1 -1
- package/components/overlay.mjs +7 -7
- package/components/popover.cjs +1 -1
- package/components/popover.mjs +4 -0
- package/components/radioGroup.cjs +1 -1
- package/components/radioGroup.mjs +10 -5
- package/components/semantics.d.ts +29 -29
- package/components/slider.cjs +1 -1
- package/components/slider.mjs +84 -83
- package/components/sortableList.cjs +1 -1
- package/components/sortableList.mjs +158 -150
- package/components/swipeItem.cjs +1 -1
- package/components/swipeItem.mjs +92 -84
- package/components/tabs.cjs +1 -1
- package/components/tabs.mjs +10 -5
- package/components/timeZoneSelect.cjs +1 -1
- package/components/timeZoneSelect.mjs +40 -35
- package/components/toaster.cjs +1 -1
- package/components/toaster.mjs +151 -113
- package/create/src/index.d.ts +1 -0
- package/create/src/options.d.ts +27 -0
- package/create/src/options.test.d.ts +1 -0
- package/create/src/packageManager.d.ts +5 -0
- package/create/src/project.d.ts +25 -0
- package/create/src/project.test.d.ts +1 -0
- package/create/templates/ts/designs/azure.d.ts +5 -0
- package/create/templates/ts/designs/ember.d.ts +5 -0
- package/create/templates/ts/designs/mono.d.ts +5 -0
- package/create/templates/ts/src/App.d.ts +2 -0
- package/create/templates/ts/src/design.d.ts +5 -0
- package/create/templates/ts/src/main.d.ts +0 -0
- package/dataGridDateParts.cjs +1 -1
- package/dataGridDateParts.mjs +56 -55
- package/dataGridList.cjs +1 -1
- package/dataGridList.mjs +437 -436
- package/docs/props.md +19 -19
- package/effects.cjs +1 -1
- package/effects.mjs +1 -1
- package/interactionListening.cjs +1 -0
- package/interactionListening.mjs +117 -0
- package/interactions.cjs +1 -0
- package/interactions.mjs +25 -0
- package/layer.cjs +1 -1
- package/layer.mjs +68 -66
- package/package.json +139 -70
- package/placement.cjs +1 -1
- package/placement.mjs +10 -10
- package/platform.cjs +1 -1
- package/platform.mjs +44 -25
- package/react/interactions/interactions.d.ts +30 -0
- package/react/popover/usePopoverLayer.d.ts +3 -0
- package/react/theme/theme.d.ts +9 -0
- package/react/theme/themeContext.d.ts +2 -0
- package/react/useStyles.d.ts +8 -1
- package/react-shared.cjs +1 -1
- package/react-shared.mjs +49 -48
- package/reporting.cjs +1 -0
- package/reporting.mjs +51 -0
- package/rsc.cjs +1 -1
- package/rsc.d.ts +3 -0
- package/rsc.mjs +1 -1
- package/scrolling.cjs +1 -1
- package/scrolling.mjs +1 -1
- package/supabase/functions/collect/index.d.ts +30 -0
- package/supabase/functions/collect/index.test.d.ts +1 -0
- package/utils/analytics/analytics.d.ts +72 -0
- package/utils/analytics/analyticsIdentity.d.ts +13 -0
- package/utils/interactions/componentAttribute.d.ts +6 -0
- package/utils/interactions/interactionChannel.d.ts +35 -0
- package/utils/interactions/interactionJson.d.ts +6 -0
- package/utils/interactions/interactionListening.d.ts +6 -0
- package/utils/interactions/interactionTypes.d.ts +224 -0
package/docs/props.md
CHANGED
|
@@ -13,7 +13,7 @@ A prop that is not here does not exist: reach for `css={{ … }}` for a one-off,
|
|
|
13
13
|
The accent-color CSS property tints the parts of a native control the page does not draw: a checkbox's tick, a radio's dot, a range track, a progress bar. The one way to brand them without `appearance="none"` and a rebuild, and it inherits — set it once on a form.
|
|
14
14
|
|
|
15
15
|
- Writes: `accent-color`
|
|
16
|
-
- Values:
|
|
16
|
+
- Values: 326 named values, anything else the types allow
|
|
17
17
|
- Example: `accentColor="sky-500"` → `accent-color: var(--sky-500,oklch(68.5% .169 237.3))`
|
|
18
18
|
|
|
19
19
|
### `ai`
|
|
@@ -285,15 +285,15 @@ Which box the background is painted inside — and `text`, which clips it to the
|
|
|
285
285
|
The background-color CSS property sets the background color of an element.
|
|
286
286
|
|
|
287
287
|
- Writes: `background-color`
|
|
288
|
-
- Values:
|
|
288
|
+
- Values: 326 named values, anything else the types allow
|
|
289
289
|
- Example: `bgColor="sky-500"` → `background-color: var(--sky-500,oklch(68.5% .169 237.3))`
|
|
290
290
|
|
|
291
291
|
### `bgGradient`
|
|
292
292
|
|
|
293
|
-
A gradient written as a value: the key names the kind and carries its geometry (`linear` a direction or an angle, `radial` a shape, `conic` an angle to start from), `colors` are the stops in order — a palette token, one with an opacity modifier, or a `[colour, position]` pair. `interpolate="oklch"` is what keeps a two-stop gradient out of the grey middle sRGB runs it through. Writes `background-image`, so it and `bgImage` are the same property: use one.
|
|
293
|
+
A gradient written as a value: the key names the kind and carries its geometry (`linear` a direction or an angle, `radial` a shape, `conic` an angle to start from), `colors` are the stops in order — a palette token, one with an opacity modifier, or a `[colour, position]` pair. `interpolate="oklch"` is what keeps a two-stop gradient out of the grey middle sRGB runs it through. Writes `background-image`, so it and `bgImage` are the same property: use one. `'none'` clears it — the only way a variant or a design can take a gradient back off, since `bgGradient` is declared after `bgImage` and wins the property.
|
|
294
294
|
|
|
295
295
|
- Writes: `background-image`
|
|
296
|
-
- Values:
|
|
296
|
+
- Values: `none`, anything else the types allow
|
|
297
297
|
- Example: `bgGradient={{ linear: 'r', colors: ['blue-500', 'pink-500'] }}` → `background-image: linear-gradient(to right,var(--blue-500,oklch(62.3% .214 259.8)),var(--pink-500,oklch(65.6% .241 354.3)))`
|
|
298
298
|
|
|
299
299
|
### `bgImage`
|
|
@@ -333,7 +333,7 @@ Whether a table's cell borders are shared or every cell keeps its own. `collapse
|
|
|
333
333
|
The border-color shorthand CSS property sets the color of an element's border.
|
|
334
334
|
|
|
335
335
|
- Writes: `border-color`
|
|
336
|
-
- Values:
|
|
336
|
+
- Values: 326 named values, anything else the types allow
|
|
337
337
|
- Example: `borderColor="sky-500"` → `border-color: var(--sky-500,oklch(68.5% .169 237.3))`
|
|
338
338
|
|
|
339
339
|
### `borderRadius`
|
|
@@ -541,7 +541,7 @@ The border-width shorthand CSS property sets the width of an element's top and b
|
|
|
541
541
|
The caret-color CSS property sets the colour of the insertion caret in a text field or any editable element.
|
|
542
542
|
|
|
543
543
|
- Writes: `caret-color`
|
|
544
|
-
- Values:
|
|
544
|
+
- Values: 326 named values, anything else the types allow
|
|
545
545
|
- Example: `caretColor="sky-500"` → `caret-color: var(--sky-500,oklch(68.5% .169 237.3))`
|
|
546
546
|
|
|
547
547
|
### `clipPath`
|
|
@@ -557,7 +557,7 @@ The clip-path CSS property creates a clipping region that sets what part of an e
|
|
|
557
557
|
The color CSS property sets the foreground color value of an element's text and text decorations, and sets the currentcolor value.
|
|
558
558
|
|
|
559
559
|
- Writes: `color`
|
|
560
|
-
- Values:
|
|
560
|
+
- Values: 326 named values, anything else the types allow
|
|
561
561
|
- Example: `color="sky-500"` → `color: var(--sky-500,oklch(68.5% .169 237.3))`
|
|
562
562
|
|
|
563
563
|
### `colorScheme`
|
|
@@ -693,7 +693,7 @@ A shadow cast by the element's *shape* rather than its box — the one that foll
|
|
|
693
693
|
What colour `dropShadow` draws in. Shows nothing on its own.
|
|
694
694
|
|
|
695
695
|
- Writes: `--boxDropShadowColor`
|
|
696
|
-
- Values:
|
|
696
|
+
- Values: 326 named values, anything else the types allow
|
|
697
697
|
- Example: `dropShadowColor="sky-500"` → `--boxDropShadowColor: var(--sky-500,oklch(68.5% .169 237.3))`
|
|
698
698
|
|
|
699
699
|
### `fieldSizing`
|
|
@@ -709,7 +709,7 @@ The field-sizing CSS property lets a form control size itself to its content: `f
|
|
|
709
709
|
The fill CSS property defines how SVG text content and the interior canvas of SVG shapes are filled or painted. If present, it overrides the element's fill attribute. Takes a colour token, a paint server the document defines (`fill="url(#sky)"` — a `<LinearGradient>` or a pattern) or a variable somebody else declared (`fill="var(--chart-1)"`).
|
|
710
710
|
|
|
711
711
|
- Writes: `fill`
|
|
712
|
-
- Values:
|
|
712
|
+
- Values: 326 named values, anything else the types allow
|
|
713
713
|
- Example: `fill="sky-500"` → `fill: var(--sky-500,oklch(68.5% .169 237.3))`
|
|
714
714
|
|
|
715
715
|
### `fillOpacity`
|
|
@@ -925,7 +925,7 @@ The same ring, drawn inside the border box: an inner hairline that needs no seco
|
|
|
925
925
|
What colour `insetRing` draws in. `currentColor` otherwise.
|
|
926
926
|
|
|
927
927
|
- Writes: `--boxInsetRingColor`
|
|
928
|
-
- Values:
|
|
928
|
+
- Values: 326 named values, anything else the types allow
|
|
929
929
|
- Example: `insetRingColor="sky-500"` → `--boxInsetRingColor: var(--sky-500,oklch(68.5% .169 237.3))`
|
|
930
930
|
|
|
931
931
|
### `insetShadow`
|
|
@@ -941,7 +941,7 @@ A shadow drawn inside the border box: `xxs`, `xs` or `sm`. Its own layer, so it
|
|
|
941
941
|
What colour `insetShadow` draws in. Shows nothing on its own.
|
|
942
942
|
|
|
943
943
|
- Writes: `--boxInsetShadowColor`
|
|
944
|
-
- Values:
|
|
944
|
+
- Values: 326 named values, anything else the types allow
|
|
945
945
|
- Example: `insetShadowColor="sky-500"` → `--boxInsetShadowColor: var(--sky-500,oklch(68.5% .169 237.3))`
|
|
946
946
|
|
|
947
947
|
### `insetStart`
|
|
@@ -1018,10 +1018,10 @@ The left CSS property participates in specifying the horizontal position of a po
|
|
|
1018
1018
|
|
|
1019
1019
|
### `letterSpacing`
|
|
1020
1020
|
|
|
1021
|
-
The letter-spacing CSS property sets the horizontal spacing behavior between text characters. This value is added to the natural spacing between characters while rendering the text. Positive values of letter-spacing causes characters to spread farther apart, while negative values of letter-spacing bring characters closer together.
|
|
1021
|
+
The letter-spacing CSS property sets the horizontal spacing behavior between text characters. This value is added to the natural spacing between characters while rendering the text. Positive values of letter-spacing causes characters to spread farther apart, while negative values of letter-spacing bring characters closer together. A number is pixels; Tailwind's tracking names (`tighter` … `widest`) are in `em`, so they scale with the text — what a display heading wants.
|
|
1022
1022
|
|
|
1023
1023
|
- Writes: `letter-spacing`
|
|
1024
|
-
- Values: a number
|
|
1024
|
+
- Values: `tighter` · `tight` · `normal` · `wide` · `wider` · `widest`, a number
|
|
1025
1025
|
- Example: `letterSpacing={4}` → `letter-spacing: 4px`
|
|
1026
1026
|
|
|
1027
1027
|
### `lineHeight`
|
|
@@ -1189,7 +1189,7 @@ The CSS outline-width property sets the thickness of an element's outline. An ou
|
|
|
1189
1189
|
The outline-color CSS property sets the color of an element's outline.
|
|
1190
1190
|
|
|
1191
1191
|
- Writes: `outline-color`
|
|
1192
|
-
- Values:
|
|
1192
|
+
- Values: 326 named values, anything else the types allow
|
|
1193
1193
|
- Example: `outlineColor="sky-500"` → `outline-color: var(--sky-500,oklch(68.5% .169 237.3))`
|
|
1194
1194
|
|
|
1195
1195
|
### `outlineOffset`
|
|
@@ -1421,7 +1421,7 @@ A hard-edged shadow outside the border box, in px — `ring={2}`. Unlike `outlin
|
|
|
1421
1421
|
What colour `ring` draws in. `currentColor` otherwise.
|
|
1422
1422
|
|
|
1423
1423
|
- Writes: `--boxRingColor`
|
|
1424
|
-
- Values:
|
|
1424
|
+
- Values: 326 named values, anything else the types allow
|
|
1425
1425
|
- Example: `ringColor="sky-500"` → `--boxRingColor: var(--sky-500,oklch(68.5% .169 237.3))`
|
|
1426
1426
|
|
|
1427
1427
|
### `rotate`
|
|
@@ -1477,7 +1477,7 @@ The scale CSS property lets you specify scale transforms individually and indepe
|
|
|
1477
1477
|
The scrollbar-color CSS property sets the color of the scrollbar thumb and track. The value pair is [thumbColor, trackColor].
|
|
1478
1478
|
|
|
1479
1479
|
- Writes: `scrollbar-color`
|
|
1480
|
-
- Values: `currentColor,transparent,green,red,blue,gray,black,white,vi,slate-50,slate-100,slate-200,slate-300,slate-400,slate-500,slate-600,slate-700,slate-800,slate-900,slate-950,gray-50,gray-100,gray-200,gray-300,gray-400,gray-500,gray-600,gray-700,gray-800,gray-900,gray-950,zinc-50,zinc-100,zinc-200,zinc-300,zinc-400,zinc-500,zinc-600,zinc-700,zinc-800,zinc-900,zinc-950,neutral-50,neutral-100,neutral-200,neutral-300,neutral-400,neutral-500,neutral-600,neutral-700,neutral-800,neutral-900,neutral-950,stone-50,stone-100,stone-200,stone-300,stone-400,stone-500,stone-600,stone-700,stone-800,stone-900,stone-950,mauve-50,mauve-100,mauve-200,mauve-300,mauve-400,mauve-500,mauve-600,mauve-700,mauve-800,mauve-900,mauve-950,mist-50,mist-100,mist-200,mist-300,mist-400,mist-500,mist-600,mist-700,mist-800,mist-900,mist-950,olive-50,olive-100,olive-200,olive-300,olive-400,olive-500,olive-600,olive-700,olive-800,olive-900,olive-950,taupe-50,taupe-100,taupe-200,taupe-300,taupe-400,taupe-500,taupe-600,taupe-700,taupe-800,taupe-900,taupe-950,red-50,red-100,red-200,red-300,red-400,red-500,red-600,red-700,red-800,red-900,red-950,orange-50,orange-100,orange-200,orange-300,orange-400,orange-500,orange-600,orange-700,orange-800,orange-900,orange-950,amber-50,amber-100,amber-200,amber-300,amber-400,amber-500,amber-600,amber-700,amber-800,amber-900,amber-950,yellow-50,yellow-100,yellow-200,yellow-300,yellow-400,yellow-500,yellow-600,yellow-700,yellow-800,yellow-900,yellow-950,lime-50,lime-100,lime-200,lime-300,lime-400,lime-500,lime-600,lime-700,lime-800,lime-900,lime-950,green-50,green-100,green-200,green-300,green-400,green-500,green-600,green-700,green-800,green-900,green-950,emerald-50,emerald-100,emerald-200,emerald-300,emerald-400,emerald-500,emerald-600,emerald-700,emerald-800,emerald-900,emerald-950,teal-50,teal-100,teal-200,teal-300,teal-400,teal-500,teal-600,teal-700,teal-800,teal-900,teal-950,cyan-50,cyan-100,cyan-200,cyan-300,cyan-400,cyan-500,cyan-600,cyan-700,cyan-800,cyan-900,cyan-950,sky-50,sky-100,sky-200,sky-300,sky-400,sky-500,sky-600,sky-700,sky-800,sky-900,sky-950,blue-50,blue-100,blue-200,blue-300,blue-400,blue-500,blue-600,blue-700,blue-800,blue-900,blue-950,indigo-50,indigo-100,indigo-200,indigo-300,indigo-400,indigo-500,indigo-600,indigo-700,indigo-800,indigo-900,indigo-950,violet-50,violet-100,violet-200,violet-300,violet-400,violet-500,violet-600,violet-700,violet-800,violet-900,violet-950,purple-50,purple-100,purple-200,purple-300,purple-400,purple-500,purple-600,purple-700,purple-800,purple-900,purple-950,fuchsia-50,fuchsia-100,fuchsia-200,fuchsia-300,fuchsia-400,fuchsia-500,fuchsia-600,fuchsia-700,fuchsia-800,fuchsia-900,fuchsia-950,pink-50,pink-100,pink-200,pink-300,pink-400,pink-500,pink-600,pink-700,pink-800,pink-900,pink-950,rose-50,rose-100,rose-200,rose-300,rose-400,rose-500,rose-600,rose-700,rose-800,rose-900,rose-950,none`
|
|
1480
|
+
- Values: `currentColor,transparent,green,red,blue,gray,black,white,vi,slate-50,slate-100,slate-200,slate-300,slate-400,slate-500,slate-600,slate-700,slate-800,slate-900,slate-950,gray-50,gray-100,gray-200,gray-300,gray-400,gray-500,gray-600,gray-700,gray-800,gray-900,gray-950,zinc-50,zinc-100,zinc-200,zinc-300,zinc-400,zinc-500,zinc-600,zinc-700,zinc-800,zinc-900,zinc-950,neutral-50,neutral-100,neutral-200,neutral-300,neutral-400,neutral-500,neutral-600,neutral-700,neutral-800,neutral-900,neutral-950,stone-50,stone-100,stone-200,stone-300,stone-400,stone-500,stone-600,stone-700,stone-800,stone-900,stone-950,mauve-50,mauve-100,mauve-200,mauve-300,mauve-400,mauve-500,mauve-600,mauve-700,mauve-800,mauve-900,mauve-950,mist-50,mist-100,mist-200,mist-300,mist-400,mist-500,mist-600,mist-700,mist-800,mist-900,mist-950,olive-50,olive-100,olive-200,olive-300,olive-400,olive-500,olive-600,olive-700,olive-800,olive-900,olive-950,taupe-50,taupe-100,taupe-200,taupe-300,taupe-400,taupe-500,taupe-600,taupe-700,taupe-800,taupe-900,taupe-950,red-50,red-100,red-200,red-300,red-400,red-500,red-600,red-700,red-800,red-900,red-950,orange-50,orange-100,orange-200,orange-300,orange-400,orange-500,orange-600,orange-700,orange-800,orange-900,orange-950,amber-50,amber-100,amber-200,amber-300,amber-400,amber-500,amber-600,amber-700,amber-800,amber-900,amber-950,yellow-50,yellow-100,yellow-200,yellow-300,yellow-400,yellow-500,yellow-600,yellow-700,yellow-800,yellow-900,yellow-950,lime-50,lime-100,lime-200,lime-300,lime-400,lime-500,lime-600,lime-700,lime-800,lime-900,lime-950,green-50,green-100,green-200,green-300,green-400,green-500,green-600,green-700,green-800,green-900,green-950,emerald-50,emerald-100,emerald-200,emerald-300,emerald-400,emerald-500,emerald-600,emerald-700,emerald-800,emerald-900,emerald-950,teal-50,teal-100,teal-200,teal-300,teal-400,teal-500,teal-600,teal-700,teal-800,teal-900,teal-950,cyan-50,cyan-100,cyan-200,cyan-300,cyan-400,cyan-500,cyan-600,cyan-700,cyan-800,cyan-900,cyan-950,sky-50,sky-100,sky-200,sky-300,sky-400,sky-500,sky-600,sky-700,sky-800,sky-900,sky-950,blue-50,blue-100,blue-200,blue-300,blue-400,blue-500,blue-600,blue-700,blue-800,blue-900,blue-950,indigo-50,indigo-100,indigo-200,indigo-300,indigo-400,indigo-500,indigo-600,indigo-700,indigo-800,indigo-900,indigo-950,violet-50,violet-100,violet-200,violet-300,violet-400,violet-500,violet-600,violet-700,violet-800,violet-900,violet-950,purple-50,purple-100,purple-200,purple-300,purple-400,purple-500,purple-600,purple-700,purple-800,purple-900,purple-950,fuchsia-50,fuchsia-100,fuchsia-200,fuchsia-300,fuchsia-400,fuchsia-500,fuchsia-600,fuchsia-700,fuchsia-800,fuchsia-900,fuchsia-950,pink-50,pink-100,pink-200,pink-300,pink-400,pink-500,pink-600,pink-700,pink-800,pink-900,pink-950,rose-50,rose-100,rose-200,rose-300,rose-400,rose-500,rose-600,rose-700,rose-800,rose-900,rose-950,accent-50,accent-100,accent-200,accent-300,accent-400,accent-500,accent-600,accent-700,accent-800,accent-900,accent-950,base-50,base-100,base-200,base-300,base-400,base-500,base-600,base-700,base-800,base-900,base-950,none`
|
|
1481
1481
|
- Example: `scrollbarColor={['gray-400', 'gray-100']}` → `scrollbar-color: var(--gray-400,oklch(70.7% .022 261.3)) var(--gray-100,oklch(96.7% .003 264.5))`
|
|
1482
1482
|
|
|
1483
1483
|
### `scrollbarGutter`
|
|
@@ -1541,7 +1541,7 @@ The elevation of the box: `xxs` through `xxl` on the elevation scale, or one of
|
|
|
1541
1541
|
What colour `shadow` draws in — the scale's own translucent black otherwise. Shows nothing on its own.
|
|
1542
1542
|
|
|
1543
1543
|
- Writes: `--boxShadowColor`
|
|
1544
|
-
- Values:
|
|
1544
|
+
- Values: 326 named values, anything else the types allow
|
|
1545
1545
|
- Example: `shadowColor="sky-500"` → `--boxShadowColor: var(--sky-500,oklch(68.5% .169 237.3))`
|
|
1546
1546
|
|
|
1547
1547
|
### `shapeRendering`
|
|
@@ -1557,7 +1557,7 @@ The shape-rendering CSS property tells the renderer what to trade away when draw
|
|
|
1557
1557
|
The stroke CSS property defines the color or SVG paint server used to draw an element's stroke. Takes a colour token, `stroke="url(#sky)"` for a paint server the document defines, or `stroke="var(--chart-1)"` for a variable somebody else declared.
|
|
1558
1558
|
|
|
1559
1559
|
- Writes: `stroke`
|
|
1560
|
-
- Values:
|
|
1560
|
+
- Values: 326 named values, anything else the types allow
|
|
1561
1561
|
- Example: `stroke="sky-500"` → `stroke: var(--sky-500,oklch(68.5% .169 237.3))`
|
|
1562
1562
|
|
|
1563
1563
|
### `strokeDasharray`
|
|
@@ -1669,7 +1669,7 @@ A shadow behind the text rather than the box: `xxs` through `lg`, recoloured by
|
|
|
1669
1669
|
What colour `textShadow` draws in. Shows nothing on its own.
|
|
1670
1670
|
|
|
1671
1671
|
- Writes: `--boxTextShadowColor`
|
|
1672
|
-
- Values:
|
|
1672
|
+
- Values: 326 named values, anything else the types allow
|
|
1673
1673
|
- Example: `textShadowColor="sky-500"` → `--boxTextShadowColor: var(--sky-500,oklch(68.5% .169 237.3))`
|
|
1674
1674
|
|
|
1675
1675
|
### `textTransform`
|
package/effects.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./rolldown-runtime.cjs"),t=require("./platform.cjs");let n=require("react");n=e.t(n,1);var r=t.
|
|
1
|
+
const e=require("./rolldown-runtime.cjs"),t=require("./platform.cjs");let n=require("react");n=e.t(n,1);var r=t.i(),i=r?n.useLayoutEffect:n.useEffect,a=r?n.default.useInsertionEffect??n.useLayoutEffect:n.useEffect;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return a}});
|
package/effects.mjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./platform.cjs");function t(e){let t=new WeakSet,n=JSON.stringify(e,(e,n)=>{if(typeof n==`bigint`)return n.toString();if(typeof n!=`object`||!n)return n;if(n instanceof Set)return Array.from(n);if(n instanceof Map)return Object.fromEntries(n);if(t.has(n))return;let r=Object.getPrototypeOf(n);if(!(!Array.isArray(n)&&(r!==Object.prototype&&r!==null||`$$typeof`in n)))return t.add(n),n});return n===void 0?void 0:JSON.parse(n)}var n=[`click`,`dblclick`,`keydown`,`pointerdown`,`pointerup`,`change`,`submit`,`copy`,`paste`,`focusout`],r=[`imperative`,`programmatic`,`timeout`],i=`a[href],button,input,select,textarea,summary,label,[tabindex],[role=option],[role=button]`;function a(e){let t=globalThis.scheduler;t?.postTask?t.postTask(e,{priority:`background`}):setTimeout(e,0)}function o(e){typeof reportError==`function`?reportError(e):setTimeout(()=>{throw e})}var s=e=>typeof Element<`u`&&e instanceof Element?e:void 0,c=e=>e?.closest(i)??void 0;function l({kind:e,input:n,event:i,handler:a,timeStamp:o,time:l,url:u},d){let f=d?[]:n.content??[],p=t(n.details&&Object.fromEntries(Object.entries(n.details).filter(([e])=>!f.includes(e)))),m=n.source??(n.reason&&r.includes(n.reason)?`app`:`user`);return{kind:e,component:n.component,type:n.type,reason:n.reason,value:f.includes(`value`)?void 0:t(n.value),details:p&&Object.keys(p).length>0?p:void 0,source:m,event:i,target:s(a)??c(s(i?.target))??n.target??s(i?.target),timeStamp:o,time:l,url:d?u:u.split(/[?#]/)[0]}}function u(t){let r=!1,i=()=>{r=!1;let e=t.queue.splice(0);if(t.listeners.size!==0)for(let n of e){if(n.kind===`dom`&&e.some(e=>e.kind!==`dom`&&e.event===n.event))continue;let r,i;t.listeners.forEach((e,t)=>{let a=e.content?r??=l(n,!0):i??=l(n,!1);try{t(a)}catch(e){o(e)}})}},u=()=>{r||(r=!0,a(i))};if(t.flush=i,t.schedule=u,t.queue.length>0&&u(),typeof addEventListener!=`function`)return;let d=n=>{let r=s(n.target);if(!r||t.listeners.size===0)return;if(!e.m()){e.a()&&e._()&&!t.warned&&(t.warned=!0,console.warn(`[box-kite] Box.onInteraction hears no clicks without data-bk: write Box.configure({ componentAttribute: true }).`));return}let i=c(r),a=(i??r).closest(`[data-bk]`);if(!a)return;let o=r instanceof HTMLInputElement&&(r.type===`checkbox`||r.type===`radio`);t.queue.push({kind:`dom`,input:{component:a.getAttribute(`data-bk`)??``,type:n.type,value:n.type===`change`&&o?r.checked:void 0,details:{interactive:i!==void 0},target:i??a,source:n.isTrusted?`user`:`app`},event:n,timeStamp:performance.now(),time:Date.now(),url:location.href}),u()},f=!1,p=e=>{t.dispatching=e,f||(f=!0,setTimeout(()=>{f=!1,t.dispatching=void 0},0)),(e.type===`click`||e.type===`change`)&&d(e)};n.forEach(e=>{document.addEventListener(e,p,!0),addEventListener(e,e=>{t.dispatching===e&&(t.dispatching=void 0)})}),addEventListener(`pagehide`,i)}exports.default=u;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { _ as e, a as t, m as n } from "./platform.mjs";
|
|
2
|
+
//#region src/utils/interactions/interactionJson.ts
|
|
3
|
+
function r(e) {
|
|
4
|
+
let t = /* @__PURE__ */ new WeakSet(), n = JSON.stringify(e, (e, n) => {
|
|
5
|
+
if (typeof n == "bigint") return n.toString();
|
|
6
|
+
if (typeof n != "object" || !n) return n;
|
|
7
|
+
if (n instanceof Set) return Array.from(n);
|
|
8
|
+
if (n instanceof Map) return Object.fromEntries(n);
|
|
9
|
+
if (t.has(n)) return;
|
|
10
|
+
let r = Object.getPrototypeOf(n);
|
|
11
|
+
if (!(!Array.isArray(n) && (r !== Object.prototype && r !== null || "$$typeof" in n))) return t.add(n), n;
|
|
12
|
+
});
|
|
13
|
+
return n === void 0 ? void 0 : JSON.parse(n);
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/utils/interactions/interactionListening.ts
|
|
17
|
+
var i = [
|
|
18
|
+
"click",
|
|
19
|
+
"dblclick",
|
|
20
|
+
"keydown",
|
|
21
|
+
"pointerdown",
|
|
22
|
+
"pointerup",
|
|
23
|
+
"change",
|
|
24
|
+
"submit",
|
|
25
|
+
"copy",
|
|
26
|
+
"paste",
|
|
27
|
+
"focusout"
|
|
28
|
+
], a = [
|
|
29
|
+
"imperative",
|
|
30
|
+
"programmatic",
|
|
31
|
+
"timeout"
|
|
32
|
+
], o = "a[href],button,input,select,textarea,summary,label,[tabindex],[role=option],[role=button]";
|
|
33
|
+
function s(e) {
|
|
34
|
+
let t = globalThis.scheduler;
|
|
35
|
+
t?.postTask ? t.postTask(e, { priority: "background" }) : setTimeout(e, 0);
|
|
36
|
+
}
|
|
37
|
+
function c(e) {
|
|
38
|
+
typeof reportError == "function" ? reportError(e) : setTimeout(() => {
|
|
39
|
+
throw e;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
var l = (e) => typeof Element < "u" && e instanceof Element ? e : void 0, u = (e) => e?.closest(o) ?? void 0;
|
|
43
|
+
function d({ kind: e, input: t, event: n, handler: i, timeStamp: o, time: s, url: c }, d) {
|
|
44
|
+
let f = d ? [] : t.content ?? [], p = r(t.details && Object.fromEntries(Object.entries(t.details).filter(([e]) => !f.includes(e)))), m = t.source ?? (t.reason && a.includes(t.reason) ? "app" : "user");
|
|
45
|
+
return {
|
|
46
|
+
kind: e,
|
|
47
|
+
component: t.component,
|
|
48
|
+
type: t.type,
|
|
49
|
+
reason: t.reason,
|
|
50
|
+
value: f.includes("value") ? void 0 : r(t.value),
|
|
51
|
+
details: p && Object.keys(p).length > 0 ? p : void 0,
|
|
52
|
+
source: m,
|
|
53
|
+
event: n,
|
|
54
|
+
target: l(i) ?? u(l(n?.target)) ?? t.target ?? l(n?.target),
|
|
55
|
+
timeStamp: o,
|
|
56
|
+
time: s,
|
|
57
|
+
url: d ? c : c.split(/[?#]/)[0]
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function f(r) {
|
|
61
|
+
let a = !1, o = () => {
|
|
62
|
+
a = !1;
|
|
63
|
+
let e = r.queue.splice(0);
|
|
64
|
+
if (r.listeners.size !== 0) for (let t of e) {
|
|
65
|
+
if (t.kind === "dom" && e.some((e) => e.kind !== "dom" && e.event === t.event)) continue;
|
|
66
|
+
let n, i;
|
|
67
|
+
r.listeners.forEach((e, r) => {
|
|
68
|
+
let a = e.content ? n ??= d(t, !0) : i ??= d(t, !1);
|
|
69
|
+
try {
|
|
70
|
+
r(a);
|
|
71
|
+
} catch (e) {
|
|
72
|
+
c(e);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}, f = () => {
|
|
77
|
+
a || (a = !0, s(o));
|
|
78
|
+
};
|
|
79
|
+
if (r.flush = o, r.schedule = f, r.queue.length > 0 && f(), typeof addEventListener != "function") return;
|
|
80
|
+
let p = (i) => {
|
|
81
|
+
let a = l(i.target);
|
|
82
|
+
if (!a || r.listeners.size === 0) return;
|
|
83
|
+
if (!n()) {
|
|
84
|
+
t() && e() && !r.warned && (r.warned = !0, console.warn("[box-kite] Box.onInteraction hears no clicks without data-bk: write Box.configure({ componentAttribute: true })."));
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
let o = u(a), s = (o ?? a).closest("[data-bk]");
|
|
88
|
+
if (!s) return;
|
|
89
|
+
let c = a instanceof HTMLInputElement && (a.type === "checkbox" || a.type === "radio");
|
|
90
|
+
r.queue.push({
|
|
91
|
+
kind: "dom",
|
|
92
|
+
input: {
|
|
93
|
+
component: s.getAttribute("data-bk") ?? "",
|
|
94
|
+
type: i.type,
|
|
95
|
+
value: i.type === "change" && c ? a.checked : void 0,
|
|
96
|
+
details: { interactive: o !== void 0 },
|
|
97
|
+
target: o ?? s,
|
|
98
|
+
source: i.isTrusted ? "user" : "app"
|
|
99
|
+
},
|
|
100
|
+
event: i,
|
|
101
|
+
timeStamp: performance.now(),
|
|
102
|
+
time: Date.now(),
|
|
103
|
+
url: location.href
|
|
104
|
+
}), f();
|
|
105
|
+
}, m = !1, h = (e) => {
|
|
106
|
+
r.dispatching = e, m || (m = !0, setTimeout(() => {
|
|
107
|
+
m = !1, r.dispatching = void 0;
|
|
108
|
+
}, 0)), (e.type === "click" || e.type === "change") && p(e);
|
|
109
|
+
};
|
|
110
|
+
i.forEach((e) => {
|
|
111
|
+
document.addEventListener(e, h, !0), addEventListener(e, (e) => {
|
|
112
|
+
r.dispatching === e && (r.dispatching = void 0);
|
|
113
|
+
});
|
|
114
|
+
}), addEventListener("pagehide", o);
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
export { f as default };
|
package/interactions.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./platform.cjs");var t=globalThis[Symbol.for(`box-kite.interactions@2`)]??={listeners:new Map,queue:[]};function n(e,n){if(t.listeners.size===0)return;let r=n.event;t.queue.push({kind:e,input:n,event:r?.nativeEvent??r??t.dispatching,handler:r?.nativeEvent&&r.currentTarget,timeStamp:performance.now(),time:Date.now(),url:location.href}),t.schedule?.()}function r(n,r={}){return e.r()?(t.listeners.set(n,r),t.loading||(t.loading=!0,Promise.resolve().then(()=>require("./interactionListening.cjs")).then(({default:e})=>e(t))),()=>void t.listeners.delete(n)):()=>{}}var i=()=>t.flush?.(),a=e=>n(`change`,e),o=e=>n(`custom`,e);Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return a}});
|
package/interactions.mjs
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { r as e } from "./platform.mjs";
|
|
2
|
+
//#region src/utils/interactions/interactionChannel.ts
|
|
3
|
+
var t = globalThis[Symbol.for("box-kite.interactions@2")] ??= {
|
|
4
|
+
listeners: /* @__PURE__ */ new Map(),
|
|
5
|
+
queue: []
|
|
6
|
+
};
|
|
7
|
+
function n(e, n) {
|
|
8
|
+
if (t.listeners.size === 0) return;
|
|
9
|
+
let r = n.event;
|
|
10
|
+
t.queue.push({
|
|
11
|
+
kind: e,
|
|
12
|
+
input: n,
|
|
13
|
+
event: r?.nativeEvent ?? r ?? t.dispatching,
|
|
14
|
+
handler: r?.nativeEvent && r.currentTarget,
|
|
15
|
+
timeStamp: performance.now(),
|
|
16
|
+
time: Date.now(),
|
|
17
|
+
url: location.href
|
|
18
|
+
}), t.schedule?.();
|
|
19
|
+
}
|
|
20
|
+
function r(n, r = {}) {
|
|
21
|
+
return e() ? (t.listeners.set(n, r), t.loading || (t.loading = !0, import("./interactionListening.mjs").then(({ default: e }) => e(t))), () => void t.listeners.delete(n)) : () => {};
|
|
22
|
+
}
|
|
23
|
+
var i = () => t.flush?.(), a = (e) => n("change", e), o = (e) => n("custom", e);
|
|
24
|
+
//#endregion
|
|
25
|
+
export { r as i, i as n, o as r, a as t };
|
package/layer.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./platform.cjs"),t=require("./effects.cjs"),n=require("./behavior.cjs"),r=require("./identity.cjs");let
|
|
1
|
+
const e=require("./platform.cjs"),t=require("./effects.cjs"),n=require("./behavior.cjs"),r=require("./identity.cjs"),i=require("./reporting.cjs");let a=require("react");var o=()=>()=>{},s=()=>!0;function c(){return(0,a.useSyncExternalStore)(o,e.c,s)}function l(o){let{haspopup:s,id:l,idPrefix:u,open:d,defaultOpen:f=!1,onOpenChange:p,onOpened:m,onClosing:h,inside:g,interaction:_}=o,v=r.t(u),y=l??v,[b,x]=i.a({value:d,defaultValue:f,onChange:p,interaction:_}),[S,C]=(0,a.useState)(null),[w,T]=(0,a.useState)(null),E=c(),[D,O]=(0,a.useState)(!1),[k,A]=(0,a.useState)(),j=(0,a.useRef)(`imperative`),M=(0,a.useRef)(!1),N=n.a(m),P=n.a(h),F=n.a(e=>{let t=e.newState===`open`,n=e.currentTarget;if(t&&d===!1){e.preventDefault(),setTimeout(()=>x(!0,{reason:`trigger`,event:e}));return}t||(M.current=n.contains(document.activeElement),P(M.current,S)),O(t);let r=t?`trigger`:j.current;j.current=`imperative`,x(t,{reason:r,event:e})}),I=n.a(e=>{let t=e.currentTarget;e.newState===`open`&&N(t)});t.n(()=>{if(!E||!w)return;let e=new AbortController;return w.addEventListener(`beforetoggle`,F,{signal:e.signal}),w.addEventListener(`toggle`,I,{signal:e.signal}),()=>e.abort()},[E,w,F,I]),t.n(()=>{!E||!e.c()||!w||b===D||(b?w.showPopover():w.hidePopover())},[b,D,w,E]),t.n(()=>{if(!E||!b)return;let t=new AbortController,n=(e,n)=>document.addEventListener(e,n,{signal:t.signal,capture:!0});return n(`keydown`,e=>{e.key===`Escape`&&(j.current=`escape`)}),n(`pointerdown`,t=>{let n=!!S&&e.f(t,[S]);j.current=n?`trigger`:`outside-pointer`}),()=>t.abort()},[E,b,S]),t.n(()=>{S&&(S.id||S.setAttribute(`id`,`${y}-trigger`),A(S.id))},[S,y]),t.n(()=>{if(!(!E||!S))return S.setAttribute(`popovertarget`,y),()=>S.removeAttribute(`popovertarget`)},[E,S,y]),t.n(()=>{E||!b||!w||N(w)},[E,b,w,N]),n.r({enabled:!E&&b,inside:[w,S,...g??[]],onDismiss:(e,t)=>x(!1,{reason:e,event:t})}),n.n({enabled:!E&&b,returnTo:S});let L=n.a(e=>{x(e=>!e,{reason:`trigger`,event:e})});return{platform:E,isOpen:b,setOpen:x,id:y,trigger:(0,a.useMemo)(()=>({ref:C,props:{"aria-expanded":b,"aria-haspopup":s,"aria-controls":b?y:void 0,...E?{}:{onClick:L}}}),[L,s,b,y,E]),triggerElement:S,triggerId:k,setPanel:T,panelElement:w}}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return l}});
|
package/layer.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as e, f as t } from "./platform.mjs";
|
|
2
2
|
import { n } from "./effects.mjs";
|
|
3
|
-
import { a as r,
|
|
4
|
-
import { t as
|
|
3
|
+
import { a as r, n as i, r as a } from "./behavior.mjs";
|
|
4
|
+
import { t as o } from "./identity.mjs";
|
|
5
|
+
import { a as s } from "./reporting.mjs";
|
|
5
6
|
import { useMemo as c, useRef as l, useState as u, useSyncExternalStore as d } from "react";
|
|
6
7
|
//#region src/react/popover/useTopLayer.ts
|
|
7
8
|
var f = () => () => {}, p = () => !0;
|
|
@@ -11,121 +12,122 @@ function m() {
|
|
|
11
12
|
//#endregion
|
|
12
13
|
//#region src/react/popover/usePopoverLayer.ts
|
|
13
14
|
function h(d) {
|
|
14
|
-
let { haspopup: f, id: p, idPrefix: h, open: g, defaultOpen: _ = !1, onOpenChange: v, onOpened: y, onClosing: b, inside: x } = d,
|
|
15
|
+
let { haspopup: f, id: p, idPrefix: h, open: g, defaultOpen: _ = !1, onOpenChange: v, onOpened: y, onClosing: b, inside: x, interaction: S } = d, C = o(h), w = p ?? C, [T, E] = s({
|
|
15
16
|
value: g,
|
|
16
17
|
defaultValue: _,
|
|
17
|
-
onChange: v
|
|
18
|
-
|
|
18
|
+
onChange: v,
|
|
19
|
+
interaction: S
|
|
20
|
+
}), [D, O] = u(null), [k, A] = u(null), j = m(), [M, N] = u(!1), [P, F] = u(), I = l("imperative"), L = l(!1), R = r(y), z = r(b), B = r((e) => {
|
|
19
21
|
let t = e.newState === "open", n = e.currentTarget;
|
|
20
22
|
if (t && g === !1) {
|
|
21
|
-
e.preventDefault(), setTimeout(() =>
|
|
23
|
+
e.preventDefault(), setTimeout(() => E(!0, {
|
|
22
24
|
reason: "trigger",
|
|
23
25
|
event: e
|
|
24
26
|
}));
|
|
25
27
|
return;
|
|
26
28
|
}
|
|
27
|
-
t || (
|
|
28
|
-
let r = t ? "trigger" :
|
|
29
|
-
|
|
29
|
+
t || (L.current = n.contains(document.activeElement), z(L.current, D)), N(t);
|
|
30
|
+
let r = t ? "trigger" : I.current;
|
|
31
|
+
I.current = "imperative", E(t, {
|
|
30
32
|
reason: r,
|
|
31
33
|
event: e
|
|
32
34
|
});
|
|
33
|
-
}),
|
|
35
|
+
}), V = r((e) => {
|
|
34
36
|
let t = e.currentTarget;
|
|
35
|
-
e.newState === "open" &&
|
|
37
|
+
e.newState === "open" && R(t);
|
|
36
38
|
});
|
|
37
39
|
n(() => {
|
|
38
|
-
if (!
|
|
40
|
+
if (!j || !k) return;
|
|
39
41
|
let e = new AbortController();
|
|
40
|
-
return
|
|
42
|
+
return k.addEventListener("beforetoggle", B, { signal: e.signal }), k.addEventListener("toggle", V, { signal: e.signal }), () => e.abort();
|
|
41
43
|
}, [
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
j,
|
|
45
|
+
k,
|
|
46
|
+
B,
|
|
47
|
+
V
|
|
46
48
|
]), n(() => {
|
|
47
|
-
!
|
|
49
|
+
!j || !e() || !k || T === M || (T ? k.showPopover() : k.hidePopover());
|
|
48
50
|
}, [
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
T,
|
|
52
|
+
M,
|
|
53
|
+
k,
|
|
54
|
+
j
|
|
53
55
|
]), n(() => {
|
|
54
|
-
if (!
|
|
56
|
+
if (!j || !T) return;
|
|
55
57
|
let e = new AbortController(), n = (t, n) => document.addEventListener(t, n, {
|
|
56
58
|
signal: e.signal,
|
|
57
59
|
capture: !0
|
|
58
60
|
});
|
|
59
61
|
return n("keydown", (e) => {
|
|
60
|
-
e.key === "Escape" && (
|
|
62
|
+
e.key === "Escape" && (I.current = "escape");
|
|
61
63
|
}), n("pointerdown", (e) => {
|
|
62
|
-
let n = !!
|
|
63
|
-
|
|
64
|
+
let n = !!D && t(e, [D]);
|
|
65
|
+
I.current = n ? "trigger" : "outside-pointer";
|
|
64
66
|
}), () => e.abort();
|
|
65
67
|
}, [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
j,
|
|
69
|
+
T,
|
|
70
|
+
D
|
|
69
71
|
]), n(() => {
|
|
70
|
-
|
|
71
|
-
}, [
|
|
72
|
-
if (!(!
|
|
72
|
+
D && (D.id || D.setAttribute("id", `${w}-trigger`), F(D.id));
|
|
73
|
+
}, [D, w]), n(() => {
|
|
74
|
+
if (!(!j || !D)) return D.setAttribute("popovertarget", w), () => D.removeAttribute("popovertarget");
|
|
73
75
|
}, [
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
j,
|
|
77
|
+
D,
|
|
78
|
+
w
|
|
77
79
|
]), n(() => {
|
|
78
|
-
|
|
80
|
+
j || !T || !k || R(k);
|
|
79
81
|
}, [
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
]),
|
|
85
|
-
enabled: !
|
|
82
|
+
j,
|
|
83
|
+
T,
|
|
84
|
+
k,
|
|
85
|
+
R
|
|
86
|
+
]), a({
|
|
87
|
+
enabled: !j && T,
|
|
86
88
|
inside: [
|
|
87
|
-
|
|
88
|
-
|
|
89
|
+
k,
|
|
90
|
+
D,
|
|
89
91
|
...x ?? []
|
|
90
92
|
],
|
|
91
|
-
onDismiss: (e, t) =>
|
|
93
|
+
onDismiss: (e, t) => E(!1, {
|
|
92
94
|
reason: e,
|
|
93
95
|
event: t
|
|
94
96
|
})
|
|
95
|
-
}),
|
|
96
|
-
enabled: !
|
|
97
|
-
returnTo:
|
|
97
|
+
}), i({
|
|
98
|
+
enabled: !j && T,
|
|
99
|
+
returnTo: D
|
|
98
100
|
});
|
|
99
|
-
let
|
|
100
|
-
|
|
101
|
+
let H = r((e) => {
|
|
102
|
+
E((e) => !e, {
|
|
101
103
|
reason: "trigger",
|
|
102
104
|
event: e
|
|
103
105
|
});
|
|
104
106
|
});
|
|
105
107
|
return {
|
|
106
|
-
platform:
|
|
107
|
-
isOpen:
|
|
108
|
-
setOpen:
|
|
109
|
-
id:
|
|
108
|
+
platform: j,
|
|
109
|
+
isOpen: T,
|
|
110
|
+
setOpen: E,
|
|
111
|
+
id: w,
|
|
110
112
|
trigger: c(() => ({
|
|
111
|
-
ref:
|
|
113
|
+
ref: O,
|
|
112
114
|
props: {
|
|
113
|
-
"aria-expanded":
|
|
115
|
+
"aria-expanded": T,
|
|
114
116
|
"aria-haspopup": f,
|
|
115
|
-
"aria-controls":
|
|
116
|
-
...
|
|
117
|
+
"aria-controls": T ? w : void 0,
|
|
118
|
+
...j ? {} : { onClick: H }
|
|
117
119
|
}
|
|
118
120
|
}), [
|
|
119
|
-
|
|
121
|
+
H,
|
|
120
122
|
f,
|
|
123
|
+
T,
|
|
121
124
|
w,
|
|
122
|
-
|
|
123
|
-
A
|
|
125
|
+
j
|
|
124
126
|
]),
|
|
125
|
-
triggerElement:
|
|
126
|
-
triggerId:
|
|
127
|
-
setPanel:
|
|
128
|
-
panelElement:
|
|
127
|
+
triggerElement: D,
|
|
128
|
+
triggerId: P,
|
|
129
|
+
setPanel: A,
|
|
130
|
+
panelElement: k
|
|
129
131
|
};
|
|
130
132
|
}
|
|
131
133
|
//#endregion
|