@stacksjs/components 0.2.571 → 0.2.573
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/components/CodeBlock.d.ts +35 -0
- package/dist/components/Footer.d.ts +12 -0
- package/dist/components/Hero.d.ts +7 -0
- package/dist/components/Installation.d.ts +9 -0
- package/dist/components/index.d.ts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/ui/accordion/Accordion.d.ts +22 -0
- package/dist/ui/accordion/AccordionItem.d.ts +11 -0
- package/dist/ui/accordion/index.d.ts +2 -2
- package/dist/ui/audio/Audio.d.ts +4 -0
- package/dist/ui/audio/index.d.ts +1 -1
- package/dist/ui/auth/Login.d.ts +30 -0
- package/dist/ui/auth/Signup.d.ts +18 -0
- package/dist/ui/auth/TwoFactorChallenge.d.ts +24 -0
- package/dist/ui/auth/index.d.ts +3 -3
- package/dist/ui/avatar/Avatar.d.ts +17 -0
- package/dist/ui/avatar/index.d.ts +1 -1
- package/dist/ui/badge/Badge.d.ts +42 -0
- package/dist/ui/badge/index.d.ts +1 -1
- package/dist/ui/breadcrumb/Breadcrumb.d.ts +13 -0
- package/dist/ui/breadcrumb/index.d.ts +1 -1
- package/dist/ui/button/Button.d.ts +103 -0
- package/dist/ui/button/index.d.ts +1 -1
- package/dist/ui/calendar/Calendar.d.ts +67 -0
- package/dist/ui/calendar/index.d.ts +1 -1
- package/dist/ui/card/Card.d.ts +14 -0
- package/dist/ui/card/index.d.ts +1 -1
- package/dist/ui/chat/ChatInbox.d.ts +15 -0
- package/dist/ui/chat/ChatLauncher.d.ts +8 -0
- package/dist/ui/chat/ChatMessage.d.ts +9 -0
- package/dist/ui/chat/ChatUnreadBadge.d.ts +5 -0
- package/dist/ui/chat/index.d.ts +4 -4
- package/dist/ui/checkbox/Checkbox.d.ts +53 -0
- package/dist/ui/checkbox/index.d.ts +1 -1
- package/dist/ui/combobox/Combobox.d.ts +40 -0
- package/dist/ui/combobox/ComboboxButton.d.ts +13 -0
- package/dist/ui/combobox/ComboboxInput.d.ts +9 -0
- package/dist/ui/combobox/ComboboxOption.d.ts +10 -0
- package/dist/ui/combobox/ComboboxOptions.d.ts +7 -0
- package/dist/ui/combobox/index.d.ts +5 -5
- package/dist/ui/command-palette/CommandPalette.d.ts +13 -0
- package/dist/ui/command-palette/CommandPaletteItem.d.ts +8 -0
- package/dist/ui/command-palette/index.d.ts +2 -2
- package/dist/ui/date-range-picker/DateRangePicker.d.ts +59 -0
- package/dist/ui/date-range-picker/index.d.ts +1 -1
- package/dist/ui/dialog/Dialog.d.ts +31 -0
- package/dist/ui/dialog/DialogBackdrop.d.ts +6 -0
- package/dist/ui/dialog/DialogDescription.d.ts +6 -0
- package/dist/ui/dialog/DialogPanel.d.ts +6 -0
- package/dist/ui/dialog/DialogTitle.d.ts +6 -0
- package/dist/ui/dialog/index.d.ts +5 -5
- package/dist/ui/drawer/Drawer.d.ts +90 -0
- package/dist/ui/drawer/index.d.ts +1 -1
- package/dist/ui/dropdown/Dropdown.d.ts +12 -0
- package/dist/ui/dropdown/DropdownButton.d.ts +8 -0
- package/dist/ui/dropdown/DropdownItem.d.ts +10 -0
- package/dist/ui/dropdown/DropdownItems.d.ts +7 -0
- package/dist/ui/dropdown/index.d.ts +4 -4
- package/dist/ui/empty-state/EmptyState.d.ts +33 -0
- package/dist/ui/empty-state/index.d.ts +1 -1
- package/dist/ui/form/Form.d.ts +31 -0
- package/dist/ui/form/index.d.ts +1 -1
- package/dist/ui/image/Image.d.ts +104 -0
- package/dist/ui/image/index.d.ts +1 -1
- package/dist/ui/input/EmailInput.d.ts +28 -0
- package/dist/ui/input/NumberInput.d.ts +83 -0
- package/dist/ui/input/PasswordInput.d.ts +84 -0
- package/dist/ui/input/SearchInput.d.ts +29 -0
- package/dist/ui/input/TextInput.d.ts +145 -0
- package/dist/ui/input/index.d.ts +17 -5
- package/dist/ui/listbox/Listbox.d.ts +30 -0
- package/dist/ui/listbox/ListboxButton.d.ts +8 -0
- package/dist/ui/listbox/ListboxLabel.d.ts +6 -0
- package/dist/ui/listbox/ListboxOption.d.ts +10 -0
- package/dist/ui/listbox/ListboxOptions.d.ts +7 -0
- package/dist/ui/listbox/index.d.ts +5 -5
- package/dist/ui/mobile/FilterChip.d.ts +35 -0
- package/dist/ui/mobile/FilterChips.d.ts +26 -0
- package/dist/ui/mobile/ListRow.d.ts +35 -0
- package/dist/ui/mobile/NavBar.d.ts +47 -0
- package/dist/ui/mobile/SectionCard.d.ts +38 -0
- package/dist/ui/mobile/TabBar.d.ts +31 -0
- package/dist/ui/mobile/TabBarItem.d.ts +41 -0
- package/dist/ui/mobile/index.d.ts +7 -7
- package/dist/ui/navigator/Navigator.d.ts +14 -0
- package/dist/ui/navigator/index.d.ts +1 -1
- package/dist/ui/notification/Notification.d.ts +22 -0
- package/dist/ui/notification/index.d.ts +1 -1
- package/dist/ui/pager/Pager.d.ts +48 -0
- package/dist/ui/pager/PagerDots.d.ts +22 -0
- package/dist/ui/pager/index.d.ts +2 -2
- package/dist/ui/pagination/Pagination.d.ts +19 -0
- package/dist/ui/pagination/index.d.ts +1 -1
- package/dist/ui/payment/Checkout.d.ts +13 -0
- package/dist/ui/payment/DefaultPaymentMethod.d.ts +8 -0
- package/dist/ui/payment/PaymentMethods.d.ts +23 -0
- package/dist/ui/payment/SubscriptionCheckout.d.ts +28 -0
- package/dist/ui/payment/index.d.ts +4 -4
- package/dist/ui/popover/Popover.d.ts +12 -0
- package/dist/ui/popover/PopoverButton.d.ts +8 -0
- package/dist/ui/popover/PopoverPanel.d.ts +8 -0
- package/dist/ui/popover/index.d.ts +3 -3
- package/dist/ui/portal/Portal.d.ts +7 -0
- package/dist/ui/portal/index.d.ts +1 -1
- package/dist/ui/progress/Progress.d.ts +32 -0
- package/dist/ui/progress/index.d.ts +1 -1
- package/dist/ui/radio/Radio.d.ts +51 -0
- package/dist/ui/radio/index.d.ts +1 -1
- package/dist/ui/radio-group/RadioGroup.d.ts +47 -0
- package/dist/ui/radio-group/RadioGroupDescription.d.ts +6 -0
- package/dist/ui/radio-group/RadioGroupLabel.d.ts +6 -0
- package/dist/ui/radio-group/RadioGroupOption.d.ts +10 -0
- package/dist/ui/radio-group/index.d.ts +4 -4
- package/dist/ui/select/Select.d.ts +93 -0
- package/dist/ui/select/index.d.ts +1 -1
- package/dist/ui/sidebar/Sidebar.d.ts +70 -0
- package/dist/ui/sidebar/SidebarFooter.d.ts +21 -0
- package/dist/ui/sidebar/SidebarHeader.d.ts +114 -0
- package/dist/ui/sidebar/SidebarItem.d.ts +37 -0
- package/dist/ui/sidebar/SidebarPinned.d.ts +27 -0
- package/dist/ui/sidebar/SidebarSection.d.ts +35 -0
- package/dist/ui/sidebar/SidebarSpace.d.ts +44 -0
- package/dist/ui/sidebar/SidebarSpaceSwitcher.d.ts +30 -0
- package/dist/ui/sidebar/SidebarSpaces.d.ts +38 -0
- package/dist/ui/sidebar/index.d.ts +9 -9
- package/dist/ui/sidebar/themes.d.ts +39 -5
- package/dist/ui/skeleton/Skeleton.d.ts +13 -0
- package/dist/ui/skeleton/index.d.ts +1 -1
- package/dist/ui/spinner/Spinner.d.ts +13 -0
- package/dist/ui/spinner/index.d.ts +1 -1
- package/dist/ui/stepper/Stepper.d.ts +8 -0
- package/dist/ui/stepper/StepperStep.d.ts +17 -0
- package/dist/ui/stepper/index.d.ts +2 -2
- package/dist/ui/switch/Switch.d.ts +75 -0
- package/dist/ui/switch/index.d.ts +1 -1
- package/dist/ui/table/Table.d.ts +20 -0
- package/dist/ui/table/TableBody.d.ts +5 -0
- package/dist/ui/table/TableCell.d.ts +5 -0
- package/dist/ui/table/TableHead.d.ts +5 -0
- package/dist/ui/table/TableHeader.d.ts +45 -0
- package/dist/ui/table/TableRow.d.ts +6 -0
- package/dist/ui/table/index.d.ts +6 -6
- package/dist/ui/tabs/Tab.d.ts +19 -0
- package/dist/ui/tabs/TabList.d.ts +34 -0
- package/dist/ui/tabs/TabPanel.d.ts +13 -0
- package/dist/ui/tabs/Tabs.d.ts +30 -0
- package/dist/ui/tabs/index.d.ts +4 -4
- package/dist/ui/teleport/Teleport.d.ts +8 -0
- package/dist/ui/teleport/index.d.ts +1 -1
- package/dist/ui/textarea/Textarea.d.ts +75 -0
- package/dist/ui/textarea/index.d.ts +1 -1
- package/dist/ui/theme-toggle/ThemeToggle.d.ts +53 -0
- package/dist/ui/theme-toggle/index.d.ts +1 -1
- package/dist/ui/tooltip/Tooltip.d.ts +39 -0
- package/dist/ui/tooltip/index.d.ts +1 -1
- package/dist/ui/transition/Transition.d.ts +191 -0
- package/dist/ui/transition/index.d.ts +1 -1
- package/dist/ui/video/Video.d.ts +61 -0
- package/dist/ui/video/index.d.ts +1 -1
- package/dist/ui/virtual-list/VirtualList.d.ts +12 -0
- package/dist/ui/virtual-list/index.d.ts +1 -1
- package/dist/ui/virtual-table/VirtualTable.d.ts +21 -0
- package/dist/ui/virtual-table/index.d.ts +1 -1
- package/dist/utils/accessibility.d.ts +15 -0
- package/dist/utils/error-handling.d.ts +15 -2
- package/dist/utils/i18n.d.ts +48 -65
- package/dist/utils/keep-alive.d.ts +27 -3
- package/dist/utils/lazy-loading.d.ts +5 -1
- package/dist/utils/prop-validation.d.ts +3 -3
- package/dist/utils/tooltip-position.d.ts +7 -1
- package/package.json +4 -7
- package/src/utils/animation/helpers.ts +5 -5
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const checked: ReturnType<typeof $bool>;
|
|
4
|
+
export declare const disabled: ReturnType<typeof $bool>;
|
|
5
|
+
export declare const indeterminate: ReturnType<typeof $bool>;
|
|
6
|
+
export declare const size: unknown;
|
|
7
|
+
export declare const label: unknown;
|
|
8
|
+
export declare const description: unknown;
|
|
9
|
+
export declare const error: ReturnType<typeof $bool>;
|
|
10
|
+
export declare const required: ReturnType<typeof $bool>;
|
|
11
|
+
export declare const value: unknown;
|
|
12
|
+
export declare const name: unknown;
|
|
13
|
+
export declare const className: unknown;
|
|
14
|
+
/*
|
|
15
|
+
* The two halves of the validity state, exported so the CLIENT can swap them
|
|
16
|
+
* (stacksjs/stx#2047). Toggled per class rather than as a whole string,
|
|
17
|
+
* because a reactive class string MERGES with the static one and the element
|
|
18
|
+
* would carry both rings at once.
|
|
19
|
+
*/
|
|
20
|
+
export declare const stateInvalidClasses: 'border-danger-line text-danger focus:ring-danger-focus';
|
|
21
|
+
export declare const checkboxClasses: unknown;
|
|
22
|
+
export declare const labelClasses: unknown;
|
|
23
|
+
export declare const descriptionClasses: unknown;
|
|
24
|
+
/*
|
|
25
|
+
* Ids unique to this instance.
|
|
26
|
+
*
|
|
27
|
+
* These were derived from the LABEL or hardcoded outright, so two of these on
|
|
28
|
+
* one page -- an ordinary form -- emitted the same id twice. `<label for>`
|
|
29
|
+
* then activated the FIRST field from every label, and `aria-describedby`
|
|
30
|
+
* pointed every field's description at the first one's helper text. A label
|
|
31
|
+
* containing a space also produced an invalid id, `input-First name`, which
|
|
32
|
+
* getElementById and querySelector cannot address at all.
|
|
33
|
+
*
|
|
34
|
+
* `$uid` is unique per instance and stable across renders, which is what an id
|
|
35
|
+
* has to be (utils.ts explains why a render that changes its own bytes is
|
|
36
|
+
* uncacheable). The `id` prop overrides it, for a caller that needs to point
|
|
37
|
+
* its own `for` or `aria-describedby` at this control.
|
|
38
|
+
*/
|
|
39
|
+
export declare const inputId: unknown;
|
|
40
|
+
export declare const descriptionId: string;
|
|
41
|
+
/*
|
|
42
|
+
* `autocomplete` and `form`, alongside the `name` this already had
|
|
43
|
+
* (stacksjs/stx#2043). `autocomplete` is how the browser and a password
|
|
44
|
+
* manager identify a field; `form` lets a control live outside the <form>
|
|
45
|
+
* element it belongs to. Emitted only when given.
|
|
46
|
+
*/
|
|
47
|
+
export declare const autocomplete: unknown;
|
|
48
|
+
export declare const form: unknown;
|
|
49
|
+
// Reactive prop binding so the parent can drive `checked` via signals.
|
|
50
|
+
// See stacksjs/stx#1704.
|
|
51
|
+
declare const isChecked: unknown;
|
|
52
|
+
declare type __DtsxStxComponentType = DefineComponent<{ checked?: unknown, disabled?: unknown, indeterminate?: unknown, size?: string, label?: string, description?: string, error?: unknown, required?: unknown, value?: string, name?: string, className?: string, id?: string, autocomplete?: unknown, autoComplete?: string, form?: string }> & { readonly __stxExposed?: { isChecked: typeof isChecked } }
|
|
53
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare function selectValue(v: unknown): void;
|
|
3
|
+
declare function open(): void;
|
|
4
|
+
declare function close(): void;
|
|
5
|
+
declare function toggle(): void;
|
|
6
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
7
|
+
export declare const value: unknown;
|
|
8
|
+
export declare const valueJson: unknown;
|
|
9
|
+
export declare const className: unknown;
|
|
10
|
+
export declare const as: unknown;
|
|
11
|
+
export declare const comboboxClasses: unknown;
|
|
12
|
+
export declare const comboboxInstanceId: unknown;
|
|
13
|
+
/*
|
|
14
|
+
* JSON built on the server and emitted raw, rather than a 'null' sentinel
|
|
15
|
+
* through an ordinary interpolation.
|
|
16
|
+
*
|
|
17
|
+
* A `value === undefined ? 'null' : value` ternary was meant to put the bare
|
|
18
|
+
* token null into the script. An interpolation QUOTES a string, so what it
|
|
19
|
+
* emitted was the four-character string "null" -- truthy, in the one place a
|
|
20
|
+
* value is meant to be absent. JSON.stringify produces the correct literal for
|
|
21
|
+
* every type, null included, and raw interpolation passes it through unquoted.
|
|
22
|
+
* Calendar and DateRangePicker already avoid this sentinel and say why
|
|
23
|
+
* (stacksjs/stx#1981).
|
|
24
|
+
*/
|
|
25
|
+
declare const initialValue: {};
|
|
26
|
+
declare const isOpen: ReturnType<typeof state>;
|
|
27
|
+
declare const selected: ReturnType<typeof state>;
|
|
28
|
+
declare const query: unknown;
|
|
29
|
+
/*
|
|
30
|
+
* The ACTIVE option, which is not the focused one.
|
|
31
|
+
*
|
|
32
|
+
* A combobox keeps focus in its input so the user can keep typing, so there is
|
|
33
|
+
* no focused option to move -- the active one is named by
|
|
34
|
+
* `aria-activedescendant` on the input instead. That is why <Listbox> and
|
|
35
|
+
* <Dropdown> move real focus with a roving tabindex and this does not, and why
|
|
36
|
+
* aria-activedescendant was absent until there was something to point it at.
|
|
37
|
+
*/
|
|
38
|
+
declare const activeIndex: unknown;
|
|
39
|
+
declare type __DtsxStxComponentType = DefineComponent<{ value?: unknown, className?: string, as?: string }> & { readonly __stxExposed?: { isOpen: typeof isOpen, selected: typeof selected, query: typeof query, activeIndex: typeof activeIndex, toggle: typeof toggle, open: typeof open, close: typeof close, selectValue: typeof selectValue } }
|
|
40
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const className: unknown;
|
|
4
|
+
export declare const as: unknown;
|
|
5
|
+
/*
|
|
6
|
+
* An icon-only control needs a name. It is not in the tab order (APG puts the
|
|
7
|
+
* combobox itself there and gives this button tabindex="-1"), but a screen
|
|
8
|
+
* reader still reaches it in browse mode, where it announced "button".
|
|
9
|
+
*/
|
|
10
|
+
export declare const label: unknown;
|
|
11
|
+
export declare const buttonClasses: unknown;
|
|
12
|
+
declare type __DtsxStxComponentType = DefineComponent<{ className?: string, as?: string, label?: string }>;
|
|
13
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const displayValue: unknown;
|
|
4
|
+
export declare const className: unknown;
|
|
5
|
+
export declare const placeholder: unknown;
|
|
6
|
+
export declare const disabled: ReturnType<typeof $bool>;
|
|
7
|
+
export declare const inputClasses: unknown;
|
|
8
|
+
declare type __DtsxStxComponentType = DefineComponent<{ displayValue?: unknown, className?: string, placeholder?: string, disabled?: unknown }>;
|
|
9
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const value: unknown;
|
|
4
|
+
export declare const disabled: ReturnType<typeof $bool>;
|
|
5
|
+
export declare const className: unknown;
|
|
6
|
+
export declare const as: unknown;
|
|
7
|
+
export declare const optionClasses: unknown;
|
|
8
|
+
export declare const valueJson: unknown;
|
|
9
|
+
declare type __DtsxStxComponentType = DefineComponent<{ value?: unknown, disabled?: unknown, className?: string, as?: string }>;
|
|
10
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const className: unknown;
|
|
4
|
+
export declare const as: unknown;
|
|
5
|
+
export declare const optionsClasses: unknown;
|
|
6
|
+
declare type __DtsxStxComponentType = DefineComponent<{ className?: string, as?: string }>;
|
|
7
|
+
export default __dtsx_component__;
|
|
@@ -28,8 +28,8 @@ export declare interface ComboboxOptionProps {
|
|
|
28
28
|
currentValue?: any
|
|
29
29
|
onChange?: (value: any) => void
|
|
30
30
|
}
|
|
31
|
-
export { default as Combobox } from './Combobox
|
|
32
|
-
export { default as ComboboxButton } from './ComboboxButton
|
|
33
|
-
export { default as ComboboxInput } from './ComboboxInput
|
|
34
|
-
export { default as ComboboxOption } from './ComboboxOption
|
|
35
|
-
export { default as ComboboxOptions } from './ComboboxOptions
|
|
31
|
+
export { default as Combobox } from './Combobox';
|
|
32
|
+
export { default as ComboboxButton } from './ComboboxButton';
|
|
33
|
+
export { default as ComboboxInput } from './ComboboxInput';
|
|
34
|
+
export { default as ComboboxOption } from './ComboboxOption';
|
|
35
|
+
export { default as ComboboxOptions } from './ComboboxOptions';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare function close(): undefined;
|
|
3
|
+
declare function show(): undefined;
|
|
4
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
5
|
+
export declare const open: ReturnType<typeof $bool>;
|
|
6
|
+
export declare const initialQuery: unknown;
|
|
7
|
+
export declare const className: unknown;
|
|
8
|
+
export declare const paletteClasses: unknown;
|
|
9
|
+
export declare const paletteInstanceId: unknown;
|
|
10
|
+
declare const isOpen: unknown;
|
|
11
|
+
declare const query: unknown;
|
|
12
|
+
declare type __DtsxStxComponentType = DefineComponent<{ open?: unknown, query?: string, className?: string }> & { readonly __stxExposed?: { isOpen: typeof isOpen, query: typeof query, show: typeof show, close: typeof close } }
|
|
13
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const className: unknown;
|
|
4
|
+
export declare const value: unknown;
|
|
5
|
+
export declare const valueJson: unknown;
|
|
6
|
+
export declare const itemClasses: unknown;
|
|
7
|
+
declare type __DtsxStxComponentType = DefineComponent<{ className?: string, value?: unknown }>;
|
|
8
|
+
export default __dtsx_component__;
|
|
@@ -9,5 +9,5 @@ export declare interface CommandPaletteItemProps {
|
|
|
9
9
|
className?: string
|
|
10
10
|
onClick?: () => void
|
|
11
11
|
}
|
|
12
|
-
export { default as CommandPalette } from './CommandPalette
|
|
13
|
-
export { default as CommandPaletteItem } from './CommandPaletteItem
|
|
12
|
+
export { default as CommandPalette } from './CommandPalette';
|
|
13
|
+
export { default as CommandPaletteItem } from './CommandPaletteItem';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare function formatOne(d: unknown): unknown;
|
|
3
|
+
/*
|
|
4
|
+
* A preset is "the last N days, ending today", counted inclusively - so 7 days
|
|
5
|
+
* is today and the six before it, which is what every dashboard means by it.
|
|
6
|
+
*/
|
|
7
|
+
declare function applyPreset(days: unknown): void;
|
|
8
|
+
/*
|
|
9
|
+
* The calendar's own `change` event, forwarded with `@change` on its tag.
|
|
10
|
+
*
|
|
11
|
+
* A forwarded listener receives the emitted payload; the CustomEvent fallback
|
|
12
|
+
* keeps this working if it is ever caught as it bubbles instead. (This was once
|
|
13
|
+
* listened for on a wrapper element, on the belief that `@change` on the tag
|
|
14
|
+
* broke Calendar's own bindings. That was the test DOM failing to parse the
|
|
15
|
+
* attribute, never the runtime: stacksjs/stx#2018.)
|
|
16
|
+
*/
|
|
17
|
+
declare function onCalendarChange(event: unknown): undefined;
|
|
18
|
+
declare function clear(): void;
|
|
19
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
20
|
+
/*
|
|
21
|
+
* The picker four apps were each maintaining their own copy of
|
|
22
|
+
* (stacksjs/stx#1981).
|
|
23
|
+
*
|
|
24
|
+
* `<Calendar>` was single-date only, so "last 7 days / last 30 days / custom
|
|
25
|
+
* range" had to be built per app: four near-identical files, hand-ported
|
|
26
|
+
* between repos, four copies of every bug. Range selection now lives on
|
|
27
|
+
* `<Calendar mode="range">` - that is the half an app cannot reasonably
|
|
28
|
+
* compose - and this is the trigger, the panel and the preset row around it.
|
|
29
|
+
*/
|
|
30
|
+
export declare const start: unknown;
|
|
31
|
+
export declare const end: unknown;
|
|
32
|
+
/** Preset spans in days. `[7, 30, 90]` gives "Last 7 days" and so on. */
|
|
33
|
+
export declare const presets: unknown;
|
|
34
|
+
export declare const placeholder: unknown;
|
|
35
|
+
export declare const locale: unknown;
|
|
36
|
+
export declare const minDate: unknown;
|
|
37
|
+
export declare const maxDate: unknown;
|
|
38
|
+
export declare const align: boolean;
|
|
39
|
+
export declare const className: unknown;
|
|
40
|
+
export declare const disabled: ReturnType<typeof $bool>;
|
|
41
|
+
export declare const startIso: unknown;
|
|
42
|
+
export declare const endIso: unknown;
|
|
43
|
+
export declare const minIso: unknown;
|
|
44
|
+
export declare const maxIso: unknown;
|
|
45
|
+
export declare const rootClasses: unknown;
|
|
46
|
+
export declare const triggerClasses: 'inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-fg bg-field rounded-control ring-1 ring-inset ring-line-strong hover:bg-field-hover focus:outline-none focus:ring-2 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed transition-colors';
|
|
47
|
+
export declare const panelClasses: string;
|
|
48
|
+
export declare const presetListClasses: 'flex flex-col gap-1 min-w-36';
|
|
49
|
+
export declare const presetClasses: 'px-3 py-1.5 text-left text-sm text-fg-strong rounded-control hover:bg-surface-hover focus:outline-none focus:ring-2 focus:ring-accent transition-colors';
|
|
50
|
+
export declare const presetActiveClasses: 'px-3 py-1.5 text-left text-sm font-medium text-accent-soft-ink bg-accent-soft rounded-control focus:outline-none focus:ring-2 focus:ring-accent transition-colors';
|
|
51
|
+
export declare const instanceId: unknown;
|
|
52
|
+
declare const isOpen: ReturnType<typeof state>;
|
|
53
|
+
declare const rangeStart: unknown;
|
|
54
|
+
declare const rangeEnd: unknown;
|
|
55
|
+
declare const activePreset: ReturnType<typeof state>;
|
|
56
|
+
/** What the trigger says: a range, a half-made range, or the placeholder. */
|
|
57
|
+
declare const label: ReturnType<typeof derived>;
|
|
58
|
+
declare type __DtsxStxComponentType = DefineComponent<{ start?: unknown, end?: unknown, presets?: unknown, placeholder?: string, locale?: string, minDate?: unknown, maxDate?: unknown, align?: unknown, className?: string, disabled?: unknown }> & { readonly __stxExposed?: { isOpen: typeof isOpen, rangeStart: typeof rangeStart, rangeEnd: typeof rangeEnd, activePreset: typeof activePreset, applyPreset: typeof applyPreset, onCalendarChange: typeof onCalendarChange, clear: typeof clear, label: typeof label } }
|
|
59
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const open: ReturnType<typeof $bool>;
|
|
4
|
+
export declare const className: unknown;
|
|
5
|
+
/*
|
|
6
|
+
* The dialog's accessible name.
|
|
7
|
+
*
|
|
8
|
+
* `role="dialog"` with no name is announced as just "dialog", which tells a
|
|
9
|
+
* screen reader user nothing about what has taken over the page -- WCAG 4.1.2.
|
|
10
|
+
* The slot idiom puts the name in a <DialogTitle>, which the client script
|
|
11
|
+
* below associates on mount; this prop is the server-rendered half, so a
|
|
12
|
+
* dialog is named before hydration and without JavaScript at all. Emitted only
|
|
13
|
+
* when set: an empty aria-label is worse than none, because it suppresses the
|
|
14
|
+
* name the title would otherwise supply. Same idiom as Drawer.
|
|
15
|
+
*/
|
|
16
|
+
export declare const title: unknown;
|
|
17
|
+
/** Set `closeOnEscape="false"` for a dialog that must be answered, not dismissed. */
|
|
18
|
+
export declare const closeOnEscape: unknown;
|
|
19
|
+
/** The same, for a click on the backdrop. */
|
|
20
|
+
export declare const closeOnBackdrop: unknown;
|
|
21
|
+
export declare const dialogClasses: unknown;
|
|
22
|
+
/*
|
|
23
|
+
* This dialog's own id.
|
|
24
|
+
*
|
|
25
|
+
* Every lookup below is scoped to it, so two dialogs on one page - a list and
|
|
26
|
+
* the confirmation for deleting from it - do not take each other's panel or
|
|
27
|
+
* each other's Escape. Same idiom as Drawer, Dropdown and Popover.
|
|
28
|
+
*/
|
|
29
|
+
export declare const dialogInstanceId: unknown;
|
|
30
|
+
declare type __DtsxStxComponentType = DefineComponent<{ open?: unknown, className?: string, title?: string, closeOnEscape?: unknown, closeOnBackdrop?: unknown }>;
|
|
31
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const className: unknown;
|
|
4
|
+
export declare const as: unknown;
|
|
5
|
+
declare type __DtsxStxComponentType = DefineComponent<{ className?: string, as?: string }>;
|
|
6
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const className: unknown;
|
|
4
|
+
export declare const as: unknown;
|
|
5
|
+
declare type __DtsxStxComponentType = DefineComponent<{ className?: string, as?: string }>;
|
|
6
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const className: unknown;
|
|
4
|
+
export declare const as: unknown;
|
|
5
|
+
declare type __DtsxStxComponentType = DefineComponent<{ className?: string, as?: string }>;
|
|
6
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const className: unknown;
|
|
4
|
+
export declare const as: unknown;
|
|
5
|
+
declare type __DtsxStxComponentType = DefineComponent<{ className?: string, as?: string }>;
|
|
6
|
+
export default __dtsx_component__;
|
|
@@ -20,8 +20,8 @@ export declare interface DialogDescriptionProps {
|
|
|
20
20
|
className?: string
|
|
21
21
|
as?: string
|
|
22
22
|
}
|
|
23
|
-
export { default as Dialog } from './Dialog
|
|
24
|
-
export { default as DialogBackdrop } from './DialogBackdrop
|
|
25
|
-
export { default as DialogDescription } from './DialogDescription
|
|
26
|
-
export { default as DialogPanel } from './DialogPanel
|
|
27
|
-
export { default as DialogTitle } from './DialogTitle
|
|
23
|
+
export { default as Dialog } from './Dialog';
|
|
24
|
+
export { default as DialogBackdrop } from './DialogBackdrop';
|
|
25
|
+
export { default as DialogDescription } from './DialogDescription';
|
|
26
|
+
export { default as DialogPanel } from './DialogPanel';
|
|
27
|
+
export { default as DialogTitle } from './DialogTitle';
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const open: ReturnType<typeof $bool>;
|
|
4
|
+
export declare const position: unknown;
|
|
5
|
+
export declare const title: unknown;
|
|
6
|
+
/** Set `closeOnEscape="false"` for a drawer that must be answered, not dismissed. */
|
|
7
|
+
export declare const closeOnEscape: unknown;
|
|
8
|
+
/** The same, for a click on the backdrop. */
|
|
9
|
+
export declare const closeOnBackdrop: unknown;
|
|
10
|
+
export declare const className: unknown;
|
|
11
|
+
/*
|
|
12
|
+
* The surface, left to the app.
|
|
13
|
+
*
|
|
14
|
+
* The panel painted itself `bg-panel` and offered no way
|
|
15
|
+
* to say otherwise, so a drawer in an app with its own palette arrived as a
|
|
16
|
+
* white rectangle with the app's colours inside it - the one element on the
|
|
17
|
+
* screen that belongs to no theme. `className` did not help: it lands on the
|
|
18
|
+
* positioned wrapper, which is transparent, while the colour is on the
|
|
19
|
+
* scrolling container within.
|
|
20
|
+
*
|
|
21
|
+
* `panelStyle` rather than only a class because an app whose palette lives in
|
|
22
|
+
* CSS variables has nothing to name in a utility class.
|
|
23
|
+
*/
|
|
24
|
+
export declare const panelClass: unknown;
|
|
25
|
+
export declare const panelStyle: unknown;
|
|
26
|
+
export declare const backdropClass: unknown;
|
|
27
|
+
/*
|
|
28
|
+
* `size` widens a side drawer without the app having to know that the width
|
|
29
|
+
* lives on the wrapper rather than the panel. Ignored for top/bottom, which
|
|
30
|
+
* are constrained by height instead.
|
|
31
|
+
*
|
|
32
|
+
* Spelled out as a map because the class name has to exist as a literal in
|
|
33
|
+
* this file. It was built by interpolation - `max-w-${size}` - which means the
|
|
34
|
+
* string `max-w-xl` appeared nowhere in the source tree, so a content-scanning
|
|
35
|
+
* CSS engine never saw it and emitted no rule for it. The panel then fell back
|
|
36
|
+
* to `w-screen`: full width, the one thing `size` is there to prevent. The
|
|
37
|
+
* default worked, because `'max-w-md'` was a literal in that same expression,
|
|
38
|
+
* so the prop was broken only once you passed it (stacksjs/stx#2002).
|
|
39
|
+
*/
|
|
40
|
+
export declare const size: unknown;
|
|
41
|
+
export declare const containerClasses: unknown;
|
|
42
|
+
export declare const panelClasses: unknown;
|
|
43
|
+
export declare const closeButtonClasses: unknown;
|
|
44
|
+
/*
|
|
45
|
+
* Which slide-in to run, decided here rather than in the stylesheet.
|
|
46
|
+
*
|
|
47
|
+
* There was one `@keyframes slideIn` whose `from` transform was a mustache
|
|
48
|
+
* over `position`. A component style block is lifted out of the source before
|
|
49
|
+
* expressions run, so that mustache shipped verbatim, the declaration was
|
|
50
|
+
* invalid, and the browser dropped it - leaving an empty 0% frame. The panel
|
|
51
|
+
* did not slide in from its edge, it appeared in place, and nothing reported
|
|
52
|
+
* it (stacksjs/stx#1982). `fadeIn` in the same block was fine, because it had
|
|
53
|
+
* nothing to interpolate.
|
|
54
|
+
*
|
|
55
|
+
* So the four offsets are four static keyframes and the choice is an animation
|
|
56
|
+
* NAME in a style attribute, which is an ordinary attribute and does
|
|
57
|
+
* interpolate.
|
|
58
|
+
* @defaultValue
|
|
59
|
+
* ```ts
|
|
60
|
+
* {
|
|
61
|
+
* right: 'slideInRight',
|
|
62
|
+
* left: 'slideInLeft',
|
|
63
|
+
* top: 'slideInTop',
|
|
64
|
+
* bottom: 'slideInBottom'
|
|
65
|
+
* }
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
declare const slideAnimations: {
|
|
69
|
+
/** @defaultValue 'slideInRight' */
|
|
70
|
+
right: string;
|
|
71
|
+
/** @defaultValue 'slideInLeft' */
|
|
72
|
+
left: string;
|
|
73
|
+
/** @defaultValue 'slideInTop' */
|
|
74
|
+
top: string;
|
|
75
|
+
/** @defaultValue 'slideInBottom' */
|
|
76
|
+
bottom: string
|
|
77
|
+
};
|
|
78
|
+
export declare const slideAnimation: unknown;
|
|
79
|
+
/*
|
|
80
|
+
* This drawer's own id.
|
|
81
|
+
*
|
|
82
|
+
* The focus move looked the panel up with a document-wide query, which finds
|
|
83
|
+
* the first drawer on the page rather than the one that just opened. With two
|
|
84
|
+
* on a page - a cart and the item being added to it - opening the second
|
|
85
|
+
* focused the first, which is hidden, so focus went nowhere and the retry
|
|
86
|
+
* spent its ten frames failing. Same idiom as Dropdown and Popover.
|
|
87
|
+
*/
|
|
88
|
+
export declare const drawerInstanceId: unknown;
|
|
89
|
+
declare type __DtsxStxComponentType = DefineComponent<{ open?: unknown, position?: string, title?: string, closeOnEscape?: unknown, closeOnBackdrop?: unknown, className?: string, panelClass?: string, panelStyle?: string, backdropClass?: string, size?: string }>;
|
|
90
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare function toggle(): void;
|
|
3
|
+
declare function open(): undefined;
|
|
4
|
+
declare function close(): undefined;
|
|
5
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
6
|
+
export declare const className: unknown;
|
|
7
|
+
export declare const as: unknown;
|
|
8
|
+
export declare const dropdownClasses: unknown;
|
|
9
|
+
export declare const dropdownInstanceId: unknown;
|
|
10
|
+
declare const isOpen: ReturnType<typeof state>;
|
|
11
|
+
declare type __DtsxStxComponentType = DefineComponent<{ className?: string, as?: string }> & { readonly __stxExposed?: { isOpen: typeof isOpen, toggle: typeof toggle, open: typeof open, close: typeof close } }
|
|
12
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const className: unknown;
|
|
4
|
+
export declare const as: unknown;
|
|
5
|
+
export declare const disabled: ReturnType<typeof $bool>;
|
|
6
|
+
export declare const buttonClasses: unknown;
|
|
7
|
+
declare type __DtsxStxComponentType = DefineComponent<{ className?: string, as?: string, disabled?: unknown }>;
|
|
8
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const className: unknown;
|
|
4
|
+
export declare const as: unknown;
|
|
5
|
+
export declare const disabled: ReturnType<typeof $bool>;
|
|
6
|
+
export declare const value: unknown;
|
|
7
|
+
export declare const valueJson: unknown;
|
|
8
|
+
export declare const itemClasses: unknown;
|
|
9
|
+
declare type __DtsxStxComponentType = DefineComponent<{ className?: string, as?: string, disabled?: unknown, value?: unknown }>;
|
|
10
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const className: unknown;
|
|
4
|
+
export declare const as: unknown;
|
|
5
|
+
export declare const itemsClasses: unknown;
|
|
6
|
+
declare type __DtsxStxComponentType = DefineComponent<{ className?: string, as?: string }>;
|
|
7
|
+
export default __dtsx_component__;
|
|
@@ -19,7 +19,7 @@ export declare interface DropdownItemProps {
|
|
|
19
19
|
disabled?: boolean
|
|
20
20
|
onClick?: (e: Event) => void
|
|
21
21
|
}
|
|
22
|
-
export { default as Dropdown } from './Dropdown
|
|
23
|
-
export { default as DropdownButton } from './DropdownButton
|
|
24
|
-
export { default as DropdownItem } from './DropdownItem
|
|
25
|
-
export { default as DropdownItems } from './DropdownItems
|
|
22
|
+
export { default as Dropdown } from './Dropdown';
|
|
23
|
+
export { default as DropdownButton } from './DropdownButton';
|
|
24
|
+
export { default as DropdownItem } from './DropdownItem';
|
|
25
|
+
export { default as DropdownItems } from './DropdownItems';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
/*
|
|
4
|
+
* 29 hand-built empty states across six apps (stacksjs/stx#1981): icon,
|
|
5
|
+
* heading, one line of explanation, optional action. `Card` and `Button` both
|
|
6
|
+
* exist; the composition did not.
|
|
7
|
+
*
|
|
8
|
+
* Low complexity, high repetition - which is exactly why it ends up subtly
|
|
9
|
+
* inconsistent across a suite: everyone writes their own, and the padding, the
|
|
10
|
+
* heading level and the gap all drift.
|
|
11
|
+
*/
|
|
12
|
+
export declare const title: unknown;
|
|
13
|
+
export declare const description: unknown;
|
|
14
|
+
/*
|
|
15
|
+
* Raw SVG markup, not an icon name. Naming would mean this component owning a
|
|
16
|
+
* registry, and the library's icons are 200k Iconify entries across generated
|
|
17
|
+
* packages - so `<EmptyState>` takes the markup or the `icon` slot and stays
|
|
18
|
+
* out of that decision.
|
|
19
|
+
*/
|
|
20
|
+
export declare const icon: unknown;
|
|
21
|
+
export declare const as: unknown;
|
|
22
|
+
/** `panel` draws the bordered card; `bare` is for something already in one. */
|
|
23
|
+
export declare const variant: boolean;
|
|
24
|
+
export declare const align: boolean;
|
|
25
|
+
export declare const className: unknown;
|
|
26
|
+
export declare const rootClasses: unknown;
|
|
27
|
+
export declare const iconWrapClasses: 'flex items-center justify-center h-12 w-12 rounded-full bg-surface-sunken text-fg-soft';
|
|
28
|
+
export declare const titleClasses: 'text-base font-semibold text-fg';
|
|
29
|
+
export declare const descriptionClasses: 'max-w-sm text-sm text-fg-muted';
|
|
30
|
+
export declare const actionClasses: 'mt-2 flex flex-wrap items-center gap-2';
|
|
31
|
+
export declare const hasIcon: boolean;
|
|
32
|
+
declare type __DtsxStxComponentType = DefineComponent<{ title?: string, description?: string, icon?: string, as?: string, variant?: unknown, align?: unknown, className?: string }>;
|
|
33
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare function validateField(name: unknown, value: unknown, allValues: unknown): unknown;
|
|
3
|
+
declare function validateForm(values: unknown): unknown;
|
|
4
|
+
declare function setErrors(next: unknown): void;
|
|
5
|
+
declare function setValues(next: unknown): void;
|
|
6
|
+
declare function reset(form: unknown): void;
|
|
7
|
+
// FormHelpers named setValues/resetForm; the component exposed setErrors/reset
|
|
8
|
+
// and no setValues at all, so the documented shape could not be destructured.
|
|
9
|
+
// Both spellings are exposed: resetForm/setValues to satisfy the type, reset to
|
|
10
|
+
// keep the existing call sites working.
|
|
11
|
+
declare function resetForm(form: unknown): void;
|
|
12
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
13
|
+
export declare const action: unknown;
|
|
14
|
+
export declare const method: unknown;
|
|
15
|
+
export declare const validationSchema: unknown;
|
|
16
|
+
export declare const className: unknown;
|
|
17
|
+
// These three were declared in FormProps and read by nothing, so passing them
|
|
18
|
+
// did exactly nothing. See #1874.
|
|
19
|
+
export declare const initialValues: unknown;
|
|
20
|
+
export declare const validateOnChange: ReturnType<typeof $bool>;
|
|
21
|
+
export declare const validateOnBlur: ReturnType<typeof $bool>;
|
|
22
|
+
export declare const formClasses: unknown;
|
|
23
|
+
export declare const errorClasses: unknown;
|
|
24
|
+
declare const errors: unknown;
|
|
25
|
+
declare const isSubmitting: ReturnType<typeof state>;
|
|
26
|
+
declare const submitCount: unknown;
|
|
27
|
+
// Seeded from initialValues so the prop has an effect before the first submit,
|
|
28
|
+
// and so resetForm() has something to restore to.
|
|
29
|
+
declare const values: unknown;
|
|
30
|
+
declare type __DtsxStxComponentType = DefineComponent<{ action?: string, method?: string, validationSchema?: Record<string, unknown>, className?: string, initialValues?: Record<string, unknown>, validateOnChange?: unknown, validateOnBlur?: unknown }> & { readonly __stxExposed?: { errors: typeof errors, values: typeof values, isSubmitting: typeof isSubmitting, submitCount: typeof submitCount, setErrors: typeof setErrors, setValues: typeof setValues, reset: typeof reset, resetForm: typeof resetForm, validateForm: typeof validateForm, validateField: typeof validateField } }
|
|
31
|
+
export default __dtsx_component__;
|
package/dist/ui/form/index.d.ts
CHANGED