le-kit 0.2.0 → 0.2.2
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/cjs/le-kit.cjs.js +1 -1
- package/dist/cjs/le-navigation.cjs.entry.js +115 -37
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/le-navigation/le-navigation.css +4 -0
- package/dist/collection/components/le-navigation/le-navigation.js +179 -37
- package/dist/collection/components/le-navigation/le-navigation.js.map +1 -1
- package/dist/collection/dist/components/assets/custom-elements.json +534 -386
- package/dist/collection/dist/components/assets/icons/ellipsis-horizontal.json +14 -0
- package/dist/collection/dist/components/assets/icons/ellipsis-vertical.json +14 -0
- package/dist/collection/dist/components/assets/icons/hamburger.json +14 -0
- package/dist/collection/types/options.js.map +1 -1
- package/dist/components/assets/custom-elements.json +534 -386
- package/dist/components/assets/icons/ellipsis-horizontal.json +14 -0
- package/dist/components/assets/icons/ellipsis-vertical.json +14 -0
- package/dist/components/assets/icons/hamburger.json +14 -0
- package/dist/components/le-navigation.js +119 -37
- package/dist/components/le-navigation.js.map +1 -1
- package/dist/docs.json +126 -8
- package/dist/esm/le-kit.js +1 -1
- package/dist/esm/le-navigation.entry.js +115 -37
- package/dist/esm/le-navigation.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/le-kit/dist/components/assets/custom-elements.json +534 -386
- package/dist/le-kit/dist/components/assets/icons/ellipsis-horizontal.json +14 -0
- package/dist/le-kit/dist/components/assets/icons/ellipsis-vertical.json +14 -0
- package/dist/le-kit/dist/components/assets/icons/hamburger.json +14 -0
- package/dist/le-kit/le-kit.esm.js +1 -1
- package/dist/le-kit/p-c08fcb00.entry.js +2 -0
- package/dist/le-kit/p-c08fcb00.entry.js.map +1 -0
- package/dist/types/components/le-navigation/le-navigation.d.ts +21 -0
- package/dist/types/components.d.ts +32 -2
- package/dist/types/types/options.d.ts +5 -0
- package/package.json +1 -1
- package/dist/le-kit/p-8c5a8f1e.entry.js +0 -2
- package/dist/le-kit/p-8c5a8f1e.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/types/options.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Universal option interface used across Le-Kit components.\n *\n * Used by: le-select, le-combobox, le-multiselect, le-tabs,\n * le-block-menu, le-emoji-picker, and any menu/list components.\n *\n * @example Basic option\n * ```typescript\n * const option: LeOption = {\n * label: 'Option 1',\n * value: 'opt1'\n * };\n * ```\n *\n * @example With icons and description\n * ```typescript\n * const option: LeOption = {\n * label: 'Settings',\n * value: 'settings',\n * iconStart: '⚙️',\n * description: 'Configure application settings'\n * };\n * ```\n *\n * @example Grouped options\n * ```typescript\n * const options: LeOption[] = [\n * { label: 'Apple', value: 'apple', group: 'Fruits' },\n * { label: 'Banana', value: 'banana', group: 'Fruits' },\n * { label: 'Carrot', value: 'carrot', group: 'Vegetables' },\n * ];\n * ```\n *\n * @example Nested options (for submenus)\n * ```typescript\n * const option: LeOption = {\n * label: 'More actions',\n * iconEnd: '▶',\n * children: [\n * { label: 'Duplicate', value: 'duplicate' },\n * { label: 'Archive', value: 'archive' },\n * ]\n * };\n * ```\n */\nexport interface LeOption {\n /**\n * Unique identifier for the option.\n * Auto-generated if not provided.\n */\n id?: string;\n\n /**\n * Display text for the option (required).\n */\n label: string;\n\n /**\n * Selection value. Defaults to label if not provided.\n */\n value?: string | number;\n\n /**\n * Main icon, used in the tab bar or as a start icon in menus.\n * Can be a URL, icon name, or emoji character.\n */\n icon?: string;\n\n /**\n * Whether the option is disabled and cannot be selected.\n */\n disabled?: boolean;\n\n /**\n * Whether the option is currently selected.\n * Used for multiselect and menu components.\n */\n selected?: boolean;\n\n /**\n * Whether the option is checked.\n * Used for checkbox/radio menu items.\n */\n checked?: boolean;\n\n /**\n * Icon displayed at the start (left) of the option.\n * Can be a URL, icon name, or emoji character.\n */\n iconStart?: string;\n\n /**\n * Icon displayed at the end (right) of the option.\n * Can be a URL, icon name, or emoji character.\n */\n iconEnd?: string;\n\n /**\n * Secondary description text displayed below the label.\n */\n description?: string;\n\n /**\n * Nested child options for hierarchical menus or submenus.\n */\n children?: LeOption[];\n\n /**\n * Whether a hierarchical option is expanded (open).\n * Used by tree-like components (e.g., navigation).\n */\n open?: boolean;\n\n /**\n * Group label for categorizing options in flat lists.\n * Options with the same group value are visually grouped together.\n */\n group?: string;\n\n /**\n * Add a visual separator line before or after this option.\n */\n separator?: 'before' | 'after';\n\n /**\n * URL to navigate to when the option is selected.\n */\n href?: string;\n\n /**\n * Custom data passthrough for application-specific needs.\n * This data is included in selection events.\n */\n data?: Record<string, unknown>;\n}\n\n/**\n * Helper type for option value\n */\nexport type LeOptionValue = string | number;\n\n/**\n * Event detail for option selection events\n */\nexport interface LeOptionSelectDetail {\n value: LeOptionValue;\n option: LeOption;\n}\n\n/**\n * Event detail for multi-option selection events\n */\nexport interface LeMultiOptionSelectDetail {\n values: LeOptionValue[];\n options: LeOption[];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/types/options.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Universal option interface used across Le-Kit components.\n *\n * Used by: le-select, le-combobox, le-multiselect, le-tabs,\n * le-block-menu, le-emoji-picker, and any menu/list components.\n *\n * @example Basic option\n * ```typescript\n * const option: LeOption = {\n * label: 'Option 1',\n * value: 'opt1'\n * };\n * ```\n *\n * @example With icons and description\n * ```typescript\n * const option: LeOption = {\n * label: 'Settings',\n * value: 'settings',\n * iconStart: '⚙️',\n * description: 'Configure application settings'\n * };\n * ```\n *\n * @example Grouped options\n * ```typescript\n * const options: LeOption[] = [\n * { label: 'Apple', value: 'apple', group: 'Fruits' },\n * { label: 'Banana', value: 'banana', group: 'Fruits' },\n * { label: 'Carrot', value: 'carrot', group: 'Vegetables' },\n * ];\n * ```\n *\n * @example Nested options (for submenus)\n * ```typescript\n * const option: LeOption = {\n * label: 'More actions',\n * iconEnd: '▶',\n * children: [\n * { label: 'Duplicate', value: 'duplicate' },\n * { label: 'Archive', value: 'archive' },\n * ]\n * };\n * ```\n */\nexport interface LeOption {\n /**\n * Unique identifier for the option.\n * Auto-generated if not provided.\n */\n id?: string;\n\n /**\n * Display text for the option (required).\n */\n label: string;\n\n /**\n * Selection value. Defaults to label if not provided.\n */\n value?: string | number;\n\n /**\n * Main icon, used in the tab bar or as a start icon in menus.\n * Can be a URL, icon name, or emoji character.\n */\n icon?: string;\n\n /**\n * Whether the option is disabled and cannot be selected.\n */\n disabled?: boolean;\n\n /**\n * Whether the option is currently selected.\n * Used for multiselect and menu components.\n */\n selected?: boolean;\n\n /**\n * Whether the option is checked.\n * Used for checkbox/radio menu items.\n */\n checked?: boolean;\n\n /**\n * Icon displayed at the start (left) of the option.\n * Can be a URL, icon name, or emoji character.\n */\n iconStart?: string;\n\n /**\n * Icon displayed at the end (right) of the option.\n * Can be a URL, icon name, or emoji character.\n */\n iconEnd?: string;\n\n /**\n * Secondary description text displayed below the label.\n */\n description?: string;\n\n /**\n * Nested child options for hierarchical menus or submenus.\n */\n children?: LeOption[];\n\n /**\n * Whether a hierarchical option is expanded (open).\n * Used by tree-like components (e.g., navigation).\n */\n open?: boolean;\n\n /**\n * Optional part tokens for styling from outside shadow DOM.\n * Components may map this to `part` attributes (e.g. `item item-accent`).\n */\n part?: string;\n\n /**\n * Group label for categorizing options in flat lists.\n * Options with the same group value are visually grouped together.\n */\n group?: string;\n\n /**\n * Add a visual separator line before or after this option.\n */\n separator?: 'before' | 'after';\n\n /**\n * URL to navigate to when the option is selected.\n */\n href?: string;\n\n /**\n * Custom data passthrough for application-specific needs.\n * This data is included in selection events.\n */\n data?: Record<string, unknown>;\n}\n\n/**\n * Helper type for option value\n */\nexport type LeOptionValue = string | number;\n\n/**\n * Event detail for option selection events\n */\nexport interface LeOptionSelectDetail {\n value: LeOptionValue;\n option: LeOption;\n}\n\n/**\n * Event detail for multi-option selection events\n */\nexport interface LeMultiOptionSelectDetail {\n values: LeOptionValue[];\n options: LeOption[];\n}\n"]}
|