From 84d393bf36220c77b58ec3d12a1a46e9b9ada4b9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=99=BD=E9=9B=BE=E4=B8=89=E8=AF=AD?=
<32354856+baiwusanyu-c@users.noreply.github.com>
Date: Mon, 8 Jan 2024 20:39:40 +0800
Subject: [PATCH] feat: added segmented component (#396)
* feat: added segmented component
* chore: complete function
* chore: temp commit
* chore: KSegmented component basic function complete
* docs: added KSegmented component document
* test: added KSegmented component unit test
* test: added unit test snap
---
.../__snapshots__/segmented.spec.ts.snap | 21 ++
.../Segmented/__test__/fixture/block.svelte | 15 +
.../Segmented/__test__/fixture/click.svelte | 18 ++
.../Segmented/__test__/fixture/custom.svelte | 33 ++
.../__test__/fixture/disabled.svelte | 18 ++
.../Segmented/__test__/fixture/icon.svelte | 18 ++
.../Segmented/__test__/fixture/label.svelte | 18 ++
.../Segmented/__test__/fixture/only.svelte | 18 ++
.../Segmented/__test__/fixture/size.svelte | 20 ++
.../Segmented/__test__/fixture/value.svelte | 18 ++
.../Segmented/__test__/segmented.spec.ts | 186 +++++++++++
components/Segmented/package.json | 48 +++
components/Segmented/src/index.svelte | 63 ++++
components/Segmented/src/index.ts | 6 +
components/Segmented/src/item.svelte | 76 +++++
components/Segmented/src/types.d.ts | 34 ++
components/Segmented/tsconfig.json | 11 +
components/index.ts | 1 +
docs/.vitepress/config.ts | 4 +
docs/components/KFlex.md | 22 +-
docs/components/KSegmented.md | 114 +++++++
docs/example/segmented/basic.svelte | 17 +
docs/example/segmented/block.svelte | 17 +
docs/example/segmented/custom.svelte | 33 ++
docs/example/segmented/disabled.svelte | 25 ++
docs/example/segmented/icon.svelte | 32 ++
docs/example/segmented/only.svelte | 41 +++
docs/example/segmented/size.svelte | 31 ++
package.json | 5 +-
pnpm-lock.yaml | 294 +++++++++++++-----
preset/src/shortcuts/index.ts | 6 +
preset/src/shortcuts/src/common.ts | 1 +
preset/src/shortcuts/src/segmented.ts | 18 ++
preset/src/theme/index.ts | 3 +
utils/src/index.ts | 3 +-
utils/src/symbol-key.ts | 1 +
36 files changed, 1197 insertions(+), 92 deletions(-)
create mode 100644 components/Segmented/__test__/__snapshots__/segmented.spec.ts.snap
create mode 100644 components/Segmented/__test__/fixture/block.svelte
create mode 100644 components/Segmented/__test__/fixture/click.svelte
create mode 100644 components/Segmented/__test__/fixture/custom.svelte
create mode 100644 components/Segmented/__test__/fixture/disabled.svelte
create mode 100644 components/Segmented/__test__/fixture/icon.svelte
create mode 100644 components/Segmented/__test__/fixture/label.svelte
create mode 100644 components/Segmented/__test__/fixture/only.svelte
create mode 100644 components/Segmented/__test__/fixture/size.svelte
create mode 100644 components/Segmented/__test__/fixture/value.svelte
create mode 100644 components/Segmented/__test__/segmented.spec.ts
create mode 100644 components/Segmented/package.json
create mode 100644 components/Segmented/src/index.svelte
create mode 100644 components/Segmented/src/index.ts
create mode 100644 components/Segmented/src/item.svelte
create mode 100644 components/Segmented/src/types.d.ts
create mode 100644 components/Segmented/tsconfig.json
create mode 100644 docs/components/KSegmented.md
create mode 100644 docs/example/segmented/basic.svelte
create mode 100644 docs/example/segmented/block.svelte
create mode 100644 docs/example/segmented/custom.svelte
create mode 100644 docs/example/segmented/disabled.svelte
create mode 100644 docs/example/segmented/icon.svelte
create mode 100644 docs/example/segmented/only.svelte
create mode 100644 docs/example/segmented/size.svelte
create mode 100644 preset/src/shortcuts/src/segmented.ts
diff --git a/components/Segmented/__test__/__snapshots__/segmented.spec.ts.snap b/components/Segmented/__test__/__snapshots__/segmented.spec.ts.snap
new file mode 100644
index 00000000..577d25d8
--- /dev/null
+++ b/components/Segmented/__test__/__snapshots__/segmented.spec.ts.snap
@@ -0,0 +1,21 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`Test: KSegmented > props: block 1`] = `"
"`;
+
+exports[`Test: KSegmented > props: cls 1`] = `""`;
+
+exports[`Test: KSegmented > props: size 1`] = `" "`;
+
+exports[`Test: KSegmented > props: size 2`] = `" "`;
+
+exports[`Test: KSegmented > props: size 3`] = `" "`;
+
+exports[`Test: KSegmentedItem > props: block 1`] = `" Daily-value
"`;
+
+exports[`Test: KSegmentedItem > props: disabled 1`] = `" Daily-value
"`;
+
+exports[`Test: KSegmentedItem > props: icon 1`] = `" Daily-value
"`;
+
+exports[`Test: KSegmentedItem > props: onlyIcon 1`] = `" Daily-value
"`;
+
+exports[`Test: KSegmentedItem > slots: default 1`] = `" Weekly 🎤
Monthly 💃
Quarterly ✌️
Yearly 🏀
"`;
diff --git a/components/Segmented/__test__/fixture/block.svelte b/components/Segmented/__test__/fixture/block.svelte
new file mode 100644
index 00000000..b99d0c7d
--- /dev/null
+++ b/components/Segmented/__test__/fixture/block.svelte
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/components/Segmented/__test__/fixture/click.svelte b/components/Segmented/__test__/fixture/click.svelte
new file mode 100644
index 00000000..d642bff4
--- /dev/null
+++ b/components/Segmented/__test__/fixture/click.svelte
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+{value}
diff --git a/components/Segmented/__test__/fixture/custom.svelte b/components/Segmented/__test__/fixture/custom.svelte
new file mode 100644
index 00000000..ab4b5397
--- /dev/null
+++ b/components/Segmented/__test__/fixture/custom.svelte
@@ -0,0 +1,33 @@
+
+
+
+
+ Daily 🐔
+
+
+ Weekly 🎤
+
+
+ Monthly 💃
+
+
+ Quarterly ✌️
+
+
+ Yearly 🏀
+
+
+
+
diff --git a/components/Segmented/__test__/fixture/disabled.svelte b/components/Segmented/__test__/fixture/disabled.svelte
new file mode 100644
index 00000000..9999cd0b
--- /dev/null
+++ b/components/Segmented/__test__/fixture/disabled.svelte
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+{value}
diff --git a/components/Segmented/__test__/fixture/icon.svelte b/components/Segmented/__test__/fixture/icon.svelte
new file mode 100644
index 00000000..e5a04304
--- /dev/null
+++ b/components/Segmented/__test__/fixture/icon.svelte
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+{value}
diff --git a/components/Segmented/__test__/fixture/label.svelte b/components/Segmented/__test__/fixture/label.svelte
new file mode 100644
index 00000000..82ebd54f
--- /dev/null
+++ b/components/Segmented/__test__/fixture/label.svelte
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+{value}
diff --git a/components/Segmented/__test__/fixture/only.svelte b/components/Segmented/__test__/fixture/only.svelte
new file mode 100644
index 00000000..2ce6de77
--- /dev/null
+++ b/components/Segmented/__test__/fixture/only.svelte
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+{value}
diff --git a/components/Segmented/__test__/fixture/size.svelte b/components/Segmented/__test__/fixture/size.svelte
new file mode 100644
index 00000000..d4095bc3
--- /dev/null
+++ b/components/Segmented/__test__/fixture/size.svelte
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/Segmented/__test__/fixture/value.svelte b/components/Segmented/__test__/fixture/value.svelte
new file mode 100644
index 00000000..82ebd54f
--- /dev/null
+++ b/components/Segmented/__test__/fixture/value.svelte
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+{value}
diff --git a/components/Segmented/__test__/segmented.spec.ts b/components/Segmented/__test__/segmented.spec.ts
new file mode 100644
index 00000000..11c38718
--- /dev/null
+++ b/components/Segmented/__test__/segmented.spec.ts
@@ -0,0 +1,186 @@
+import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';
+import KSegmented from '../src';
+import KSegmentedValue from './fixture/value.svelte';
+import KSegmentedBlock from './fixture/block.svelte';
+import KSegmentedSize from './fixture/size.svelte';
+import KSegmentedLabel from './fixture/label.svelte';
+import KSegmentedIcon from './fixture/icon.svelte';
+import KSegmentedOnly from './fixture/only.svelte';
+import KSegmentedClick from './fixture/click.svelte';
+import KSegmentedDisabled from './fixture/disabled.svelte';
+import KSegmentedCustom from './fixture/custom.svelte';
+import { tick } from 'svelte';
+let host;
+
+const initHost = () => {
+ host = globalThis.document.createElement('div');
+ host.setAttribute('id', 'host');
+ globalThis.document.body.appendChild(host);
+};
+beforeEach(() => {
+ initHost();
+ vi.useFakeTimers();
+});
+afterEach(() => {
+ host.remove();
+ vi.useRealTimers();
+});
+
+describe('Test: KSegmented', () => {
+ test('props: cls', async () => {
+ //@ts-ignore
+ const instance = new KSegmented({
+ target: host,
+ props: {
+ cls: 'k-segmented--test'
+ }
+ });
+ expect(instance).toBeTruthy();
+ expect(host!.innerHTML.includes('k-segmented--test')).toBeTruthy();
+ expect(host.innerHTML).matchSnapshot();
+ });
+
+ test('props: value', async () => {
+ //@ts-ignore
+ const instance = new KSegmentedValue({
+ target: host
+ });
+ expect(instance).toBeTruthy();
+ const valElm = host.querySelector('#test_value');
+ expect(valElm.innerHTML.includes('Daily-value')).toBeTruthy();
+
+ const items = host.querySelectorAll('.k-segmented-item');
+ items[2].click();
+ await tick();
+ expect(valElm.innerHTML.includes('Monthly-value')).toBeTruthy();
+ });
+
+ test('props: block', async () => {
+ //@ts-ignore
+ const instance = new KSegmentedBlock({
+ target: host
+ });
+ expect(instance).toBeTruthy();
+ expect(host.innerHTML).matchSnapshot();
+ });
+
+ test('props: size', async () => {
+ //@ts-ignore
+ const instance = new KSegmentedSize({
+ target: host
+ });
+ expect(instance).toBeTruthy();
+ const lgBtn = host.querySelector('#test_lg');
+ lgBtn.click();
+ await tick();
+ expect(host.innerHTML).matchSnapshot();
+
+ const mdBtn = host.querySelector('#test_md');
+ mdBtn.click();
+ await tick();
+ expect(host.innerHTML).matchSnapshot();
+
+ const smBtn = host.querySelector('#test_sm');
+ smBtn.click();
+ await tick();
+ expect(host.innerHTML).matchSnapshot();
+ });
+
+ test('events: change', async () => {
+ //@ts-ignore
+ const instance = new KSegmentedValue({
+ target: host
+ });
+ expect(instance).toBeTruthy();
+ const valElm = host.querySelector('#test_value');
+ expect(valElm.innerHTML.includes('Daily-value')).toBeTruthy();
+
+ const items = host.querySelectorAll('.k-segmented-item');
+ items[2].click();
+ await tick();
+ expect(valElm.innerHTML.includes('Monthly-value')).toBeTruthy();
+ });
+});
+
+describe('Test: KSegmentedItem', () => {
+ test('props: value', async () => {
+ //@ts-ignore
+ const instance = new KSegmentedValue({
+ target: host
+ });
+ expect(instance).toBeTruthy();
+ const items = host.querySelectorAll('.k-segmented-item');
+ expect(items[0].innerHTML.includes('k-segmented-item--active')).toBeTruthy();
+
+ items[2].click();
+ await tick();
+ expect(items[2].innerHTML.includes('k-segmented-item--active')).toBeTruthy();
+ });
+
+ test('props: block', async () => {
+ //@ts-ignore
+ const instance = new KSegmentedLabel({
+ target: host
+ });
+ expect(instance).toBeTruthy();
+ expect(host.innerHTML).matchSnapshot();
+ });
+
+ test('props: icon', async () => {
+ //@ts-ignore
+ const instance = new KSegmentedIcon({
+ target: host
+ });
+ expect(instance).toBeTruthy();
+ expect(host.innerHTML).matchSnapshot();
+ });
+
+ test('props: onlyIcon', async () => {
+ //@ts-ignore
+ const instance = new KSegmentedOnly({
+ target: host
+ });
+ expect(instance).toBeTruthy();
+ expect(host.innerHTML).matchSnapshot();
+ });
+
+ test('props: disabled', async () => {
+ //@ts-ignore
+ const instance = new KSegmentedDisabled({
+ target: host
+ });
+ expect(instance).toBeTruthy();
+ const valElm = host.querySelector('#test_value');
+ expect(valElm.innerHTML.includes('Daily-value')).toBeTruthy();
+ expect(host.innerHTML).matchSnapshot();
+
+ const items = host.querySelectorAll('.k-segmented-item');
+ items[2].click();
+ await tick();
+ expect(valElm.innerHTML.includes('Daily-value')).toBeTruthy();
+ });
+
+ test('slots: default', async () => {
+ //@ts-ignore
+ const instance = new KSegmentedCustom({
+ target: host
+ });
+ expect(instance).toBeTruthy();
+ expect(host.innerHTML).matchSnapshot();
+ });
+
+ test('events: click', async () => {
+ //@ts-ignore
+ const instance = new KSegmentedClick({
+ target: host
+ });
+ expect(instance).toBeTruthy();
+ const valElm = host.querySelector('#test_value');
+ expect(valElm.innerHTML.includes('Daily-value')).toBeTruthy();
+
+ const items = host.querySelectorAll('.k-segmented-item');
+ items[2].click();
+ await tick();
+ expect(valElm.innerHTML.includes('Monthly-value')).toBeTruthy();
+ });
+});
diff --git a/components/Segmented/package.json b/components/Segmented/package.json
new file mode 100644
index 00000000..f9140fb8
--- /dev/null
+++ b/components/Segmented/package.json
@@ -0,0 +1,48 @@
+{
+ "name": "@ikun-ui/segmented",
+ "version": "0.1.5",
+ "type": "module",
+ "main": "src/index.ts",
+ "types": "src/index.d.ts",
+ "svelte": "src/index.ts",
+ "keywords": [
+ "svelte",
+ "svelte3",
+ "web component",
+ "component",
+ "react",
+ "vue",
+ "svelte-kit",
+ "dx"
+ ],
+ "files": [
+ "dist",
+ "package.json"
+ ],
+ "scripts": {
+ "build": "npm run build:js && npm run build:svelte",
+ "build:js": "tsc -p . --outDir dist/ --rootDir src/",
+ "build:svelte": "svelte-strip strip src/ dist",
+ "publish:pre": "node ../../scripts/pre-publish.js",
+ "publish:npm": "pnpm run publish:pre && pnpm publish --no-git-checks --access public"
+ },
+ "publishConfig": {
+ "access": "public",
+ "main": "dist/index.js",
+ "module": "dist/index.js",
+ "svelte": "dist/index.js",
+ "types": "dist/index.d.ts"
+ },
+ "dependencies": {
+ "@ikun-ui/icon": "workspace:*",
+ "@ikun-ui/utils": "workspace:*",
+ "baiwusanyu-utils": "^1.0.18",
+ "clsx": "^2.0.0"
+ },
+ "devDependencies": {
+ "@tsconfig/svelte": "^5.0.2",
+ "svelte-strip": "^2.0.0",
+ "tslib": "^2.6.2",
+ "typescript": "^5.3.3"
+ }
+}
diff --git a/components/Segmented/src/index.svelte b/components/Segmented/src/index.svelte
new file mode 100644
index 00000000..bc0a33dc
--- /dev/null
+++ b/components/Segmented/src/index.svelte
@@ -0,0 +1,63 @@
+
+
+
diff --git a/components/Segmented/src/index.ts b/components/Segmented/src/index.ts
new file mode 100644
index 00000000..66eeab9f
--- /dev/null
+++ b/components/Segmented/src/index.ts
@@ -0,0 +1,6 @@
+///
+import Segmented from './index.svelte';
+import SegmentedItem from './item.svelte';
+export { Segmented as KSegmented };
+export { SegmentedItem as KSegmentedItem };
+export default Segmented;
diff --git a/components/Segmented/src/item.svelte b/components/Segmented/src/item.svelte
new file mode 100644
index 00000000..aa6dded4
--- /dev/null
+++ b/components/Segmented/src/item.svelte
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+ {#if icon}
+
+ {/if}
+ {#if !onlyIcon || (onlyIcon && !icon)}
+ {label}
+ {/if}
+
+
+
+ {#if isActive}
+
+ {/if}
+
diff --git a/components/Segmented/src/types.d.ts b/components/Segmented/src/types.d.ts
new file mode 100644
index 00000000..e90073cc
--- /dev/null
+++ b/components/Segmented/src/types.d.ts
@@ -0,0 +1,34 @@
+///
+import type { ClassValue } from 'clsx';
+import type { IKunSize } from '@ikun-ui/utils';
+
+export type KSegmentedProps = {
+ value: string | number;
+ size: IKunSize;
+ block: boolean;
+ cls: ClassValue;
+ attrs: Record;
+};
+
+export type KSegmentedItemProps = {
+ value: string | number;
+ label: string;
+ disabled: boolean;
+ icon: string;
+ onlyIcon: boolean;
+ cls: ClassValue;
+ attrs: Record;
+};
+
+export type SizeChangeFns = Array<(size: KSegmentedProps['size']) => void>;
+export type ValueChangeFns = Array<(value: KSegmentedProps['value']) => void>;
+export interface KSegmentedContext {
+ block: boolean;
+ segmentedValue: KSegmentedProps['value'];
+ segmentedSize: KSegmentedProps['size'];
+ onChange: (value: KSegmentedProps['value']) => void;
+ sizeChangeFns: SizeChangeFns;
+ valueChangeFns: ValueChangeFns;
+}
+
+// TODO: Segmented item slots : default slot 🤡
diff --git a/components/Segmented/tsconfig.json b/components/Segmented/tsconfig.json
new file mode 100644
index 00000000..fe0d7c4f
--- /dev/null
+++ b/components/Segmented/tsconfig.json
@@ -0,0 +1,11 @@
+{
+ "extends": "@tsconfig/svelte/tsconfig.json",
+
+ "compilerOptions": {
+ "noImplicitAny": true,
+ "strict": true,
+ "declaration": true
+ },
+ "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.svelte"],
+ "exclude": ["node_modules/*", "**/*.spec.ts"]
+}
diff --git a/components/index.ts b/components/index.ts
index f322a343..aa919b41 100644
--- a/components/index.ts
+++ b/components/index.ts
@@ -59,3 +59,4 @@ export * from '@ikun-ui/scrollbar';
export * from '@ikun-ui/image';
export * from '@ikun-ui/image-view';
export * from '@ikun-ui/flex';
+export * from '@ikun-ui/segmented';
diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts
index 1452fc3f..85ef350e 100644
--- a/docs/.vitepress/config.ts
+++ b/docs/.vitepress/config.ts
@@ -196,6 +196,10 @@ const components = [
text: 'Dropdown',
link: '/components/KDropdown'
},
+ {
+ text: 'Segmented',
+ link: '/components/KSegmented'
+ },
{
text: 'PageHeader',
link: '/components/KPageHeader'
diff --git a/docs/components/KFlex.md b/docs/components/KFlex.md
index db0e7ae2..34a67283 100644
--- a/docs/components/KFlex.md
+++ b/docs/components/KFlex.md
@@ -53,17 +53,17 @@ Auto wrap line.
## Flex Props
-| Name | Type | Default | Description |
-| -------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | --------------------------------------------------------------------------- |
-| vertical | `boolean` | `false` | Is direction of the flex vertical. |
-| wrap | `'wrap' \| 'nowrap' \| 'wrap-reverse'` | `'normal'` | Set whether the element is displayed in a single line or in multiple lines. |
-| justify | `'normal' \| 'start'\| 'end'\| 'center'\| 'between'\| 'around' \| 'evenly' \| 'stretch'` | `'normal'` | Sets the alignment of elements in the direction of the main axis. |
-| align | `'center' \| 'start' \| 'end' \| 'baseline' \| 'normal' \| 'stretch'` | `'normal'` | Sets the alignment of elements in the direction of the cross axis. |
-| flex | `string` | `-` | Flex CSS shorthand properties. |
-| gap | `'sm' \| 'md' \| 'lg' \| number` | `-` | Sets the gap between grids. |
-| elm | `string` | `div` | Custom element type. |
-| cls | `string` | `''` | Additional class for component |
-| attrs | `any` | `{}` | Additional attributes |
+| Name | Type | Default | Description |
+| -------- | ---------------------------------------------------------------------------------------- | ---------- | --------------------------------------------------------------------------- |
+| vertical | `boolean` | `false` | Is direction of the flex vertical. |
+| wrap | `'wrap' \| 'nowrap' \| 'wrap-reverse'` | `'normal'` | Set whether the element is displayed in a single line or in multiple lines. |
+| justify | `'normal' \| 'start'\| 'end'\| 'center'\| 'between'\| 'around' \| 'evenly' \| 'stretch'` | `'normal'` | Sets the alignment of elements in the direction of the main axis. |
+| align | `'center' \| 'start' \| 'end' \| 'baseline' \| 'normal' \| 'stretch'` | `'normal'` | Sets the alignment of elements in the direction of the cross axis. |
+| flex | `string` | `-` | Flex CSS shorthand properties. |
+| gap | `'sm' \| 'md' \| 'lg' \| number` | `-` | Sets the gap between grids. |
+| elm | `string` | `div` | Custom element type. |
+| cls | `string` | `''` | Additional class for component |
+| attrs | `any` | `{}` | Additional attributes |
## Flex Slots
diff --git a/docs/components/KSegmented.md b/docs/components/KSegmented.md
new file mode 100644
index 00000000..9a83d867
--- /dev/null
+++ b/docs/components/KSegmented.md
@@ -0,0 +1,114 @@
+---
+title: KSegmented
+lang: en-US
+---
+
+# KSegmented
+
+When displaying multiple options and user can select a single option.
+
+## Install
+
+::: code-group
+
+```bash [pnpm]
+pnpm add @ikun-ui/segmented
+```
+
+```bash [yarn]
+yarn add @ikun-ui/segmented
+```
+
+```bash [npm]
+npm install @ikun-ui/segmented
+```
+
+:::
+
+## Basic usage
+
+The most basic usage.
+
+
+
+## Block segmented
+
+`block` property will make the Segmented fit to its parent width.
+
+
+
+## Disabled
+
+Disabled Segmented.
+
+
+
+## Custom render
+
+Custom each Segmented Item by slot.
+
+
+
+## Size
+
+There are three sizes of an Segmented
+
+
+
+## Icon
+
+Set `icon` for Segmented Item.
+
+
+
+## Just Only icon
+
+Set `icon` without `label` for Segmented Item.
+
+
+
+## Segmented Props
+
+| Name | Type | Default | Description |
+| ----- | ------------------------ | ------- | ------------------------------------------ |
+| value | `string \| number` | `''` | Selected value. |
+| size | `sm \| md \| lg` | `md` | Size of segmented |
+| block | `boolean` | `false` | Option to fit width to its parent's width. |
+| cls | `string` | `''` | Additional class for component |
+| attrs | `Record` | `{}` | Additional attributes |
+
+## Segmented Events
+
+| Name | Description | Type |
+| ------ | --------------------------------------------------------------- | ---------------------------------- |
+| change | The callback function that is triggered when the state changes. | `(value: string \| number)=> void` |
+
+## Segmented Slots
+
+| Name | Description |
+| ------- | ------------------------------ |
+| default | content of segmented component |
+
+## SegmentedItem Props
+
+| Name | Type | Default | Description |
+| -------- | ------------------------ | ------- | --------------------------------------------------------------------------------------------------------------- |
+| value | `string \| number` | `-` | The callback value of `SegmentedItem`. Clicking on `SegmentedItem` will be passed to the event as a parameter.. |
+| disabled | `boolean` | `false` | Whether the `SegmentedItem` is disabled. |
+| label | `string` | `-` | Display value of `SegmentedItem`. |
+| icon | `string` | `-` | The front icon of `SegmentedItem`, which should comply with unocss standard. |
+| onlyIcon | `boolean` | `false` | Show only icons. |
+| cls | `string` | `''` | Additional class for component |
+| attrs | `Record` | `{}` | Additional attributes |
+
+## SegmentedItem Events
+
+| Name | Description | Type |
+| ----- | ----------------------------------------------------------------- | ---------------------------------- |
+| click | The callback function that is triggered when click segmentedItem. | `(value: string \| number)=> void` |
+
+## SegmentedItem Slots
+
+| Name | Description |
+| ------- | ---------------------------------- |
+| default | content of segmentedItem component |
diff --git a/docs/example/segmented/basic.svelte b/docs/example/segmented/basic.svelte
new file mode 100644
index 00000000..45545b8b
--- /dev/null
+++ b/docs/example/segmented/basic.svelte
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
diff --git a/docs/example/segmented/block.svelte b/docs/example/segmented/block.svelte
new file mode 100644
index 00000000..a5aa9ffd
--- /dev/null
+++ b/docs/example/segmented/block.svelte
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
diff --git a/docs/example/segmented/custom.svelte b/docs/example/segmented/custom.svelte
new file mode 100644
index 00000000..2ab1f1ef
--- /dev/null
+++ b/docs/example/segmented/custom.svelte
@@ -0,0 +1,33 @@
+
+
+
+
+ Daily 🐔
+
+
+ Weekly 🎤
+
+
+ Monthly 💃
+
+
+ Quarterly ✌️
+
+
+ Yearly 🏀
+
+
+
+
diff --git a/docs/example/segmented/disabled.svelte b/docs/example/segmented/disabled.svelte
new file mode 100644
index 00000000..34d8a5bd
--- /dev/null
+++ b/docs/example/segmented/disabled.svelte
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/example/segmented/icon.svelte b/docs/example/segmented/icon.svelte
new file mode 100644
index 00000000..6ddc7c86
--- /dev/null
+++ b/docs/example/segmented/icon.svelte
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
diff --git a/docs/example/segmented/only.svelte b/docs/example/segmented/only.svelte
new file mode 100644
index 00000000..c2826570
--- /dev/null
+++ b/docs/example/segmented/only.svelte
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
diff --git a/docs/example/segmented/size.svelte b/docs/example/segmented/size.svelte
new file mode 100644
index 00000000..077fee2a
--- /dev/null
+++ b/docs/example/segmented/size.svelte
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/package.json b/package.json
index 48e7abe3..aa0b1a55 100644
--- a/package.json
+++ b/package.json
@@ -68,7 +68,7 @@
"clean:deps": "node scripts/clean-deps.js && node scripts/clean-root-deps.js",
"prepare": "npx simple-git-hooks",
"update:deps": "npx taze -w -r major && pnpm run init",
- "create:new:comp": "node scripts/new-component.js flex"
+ "create:new:comp": "node scripts/new-component.js segmented"
},
"peerDependencies": {
"baiwusanyu-utils": "^1.0.18",
@@ -141,7 +141,8 @@
"@ikun-ui/watermark": "workspace:*",
"baiwusanyu-utils": "^1.0.18",
"clsx": "^2.1.0",
- "dayjs": "^1.11.10"
+ "dayjs": "^1.11.10",
+ "@ikun-ui/segmented": "workspace:*"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.1.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 2c0f4778..faa27592 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -164,6 +164,9 @@ importers:
'@ikun-ui/scrollbar':
specifier: workspace:*
version: link:components/Scrollbar
+ '@ikun-ui/segmented':
+ specifier: workspace:*
+ version: link:components/Segmented
'@ikun-ui/select':
specifier: workspace:*
version: link:components/Select
@@ -1816,6 +1819,34 @@ importers:
specifier: ^5.3.3
version: 5.3.3
+ components/Segmented:
+ dependencies:
+ '@ikun-ui/icon':
+ specifier: workspace:*
+ version: link:../Icon
+ '@ikun-ui/utils':
+ specifier: workspace:*
+ version: link:../../utils
+ baiwusanyu-utils:
+ specifier: ^1.0.18
+ version: 1.0.18(ansi-colors@4.1.3)(moment@2.29.4)
+ clsx:
+ specifier: ^2.0.0
+ version: 2.1.0
+ devDependencies:
+ '@tsconfig/svelte':
+ specifier: ^5.0.2
+ version: 5.0.2
+ svelte-strip:
+ specifier: ^2.0.0
+ version: 2.0.0(@babel/core@7.23.7)(postcss@8.4.32)(svelte@3.59.2)
+ tslib:
+ specifier: ^2.6.2
+ version: 2.6.2
+ typescript:
+ specifier: ^5.3.3
+ version: 5.3.3
+
components/Select:
dependencies:
'@ikun-ui/form':
@@ -2946,7 +2977,7 @@ packages:
dev: true
/@esbuild/android-arm64@0.19.8:
- resolution: {integrity: sha512-B8JbS61bEunhfx8kasogFENgQfr/dIp+ggYXwTqdbMAgGDhRa3AaPpQMuQU0rNxDLECj6FhDzk1cF9WHMVwrtA==}
+ resolution: {integrity: sha512-B8JbS61bEunhfx8kasogFENgQfr/dIp+ggYXwTqdbMAgGDhRa3AaPpQMuQU0rNxDLECj6FhDzk1cF9WHMVwrtA==, tarball: https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.8.tgz}
engines: {node: '>=12'}
cpu: [arm64]
os: [android]
@@ -2955,7 +2986,7 @@ packages:
optional: true
/@esbuild/android-arm@0.19.8:
- resolution: {integrity: sha512-31E2lxlGM1KEfivQl8Yf5aYU/mflz9g06H6S15ITUFQueMFtFjESRMoDSkvMo8thYvLBax+VKTPlpnx+sPicOA==}
+ resolution: {integrity: sha512-31E2lxlGM1KEfivQl8Yf5aYU/mflz9g06H6S15ITUFQueMFtFjESRMoDSkvMo8thYvLBax+VKTPlpnx+sPicOA==, tarball: https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.8.tgz}
engines: {node: '>=12'}
cpu: [arm]
os: [android]
@@ -2964,7 +2995,7 @@ packages:
optional: true
/@esbuild/android-x64@0.19.8:
- resolution: {integrity: sha512-rdqqYfRIn4jWOp+lzQttYMa2Xar3OK9Yt2fhOhzFXqg0rVWEfSclJvZq5fZslnz6ypHvVf3CT7qyf0A5pM682A==}
+ resolution: {integrity: sha512-rdqqYfRIn4jWOp+lzQttYMa2Xar3OK9Yt2fhOhzFXqg0rVWEfSclJvZq5fZslnz6ypHvVf3CT7qyf0A5pM682A==, tarball: https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.8.tgz}
engines: {node: '>=12'}
cpu: [x64]
os: [android]
@@ -2973,7 +3004,7 @@ packages:
optional: true
/@esbuild/darwin-arm64@0.19.8:
- resolution: {integrity: sha512-RQw9DemMbIq35Bprbboyf8SmOr4UXsRVxJ97LgB55VKKeJOOdvsIPy0nFyF2l8U+h4PtBx/1kRf0BelOYCiQcw==}
+ resolution: {integrity: sha512-RQw9DemMbIq35Bprbboyf8SmOr4UXsRVxJ97LgB55VKKeJOOdvsIPy0nFyF2l8U+h4PtBx/1kRf0BelOYCiQcw==, tarball: https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.8.tgz}
engines: {node: '>=12'}
cpu: [arm64]
os: [darwin]
@@ -2982,7 +3013,7 @@ packages:
optional: true
/@esbuild/darwin-x64@0.19.8:
- resolution: {integrity: sha512-3sur80OT9YdeZwIVgERAysAbwncom7b4bCI2XKLjMfPymTud7e/oY4y+ci1XVp5TfQp/bppn7xLw1n/oSQY3/Q==}
+ resolution: {integrity: sha512-3sur80OT9YdeZwIVgERAysAbwncom7b4bCI2XKLjMfPymTud7e/oY4y+ci1XVp5TfQp/bppn7xLw1n/oSQY3/Q==, tarball: https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.8.tgz}
engines: {node: '>=12'}
cpu: [x64]
os: [darwin]
@@ -2991,7 +3022,7 @@ packages:
optional: true
/@esbuild/freebsd-arm64@0.19.8:
- resolution: {integrity: sha512-WAnPJSDattvS/XtPCTj1tPoTxERjcTpH6HsMr6ujTT+X6rylVe8ggxk8pVxzf5U1wh5sPODpawNicF5ta/9Tmw==}
+ resolution: {integrity: sha512-WAnPJSDattvS/XtPCTj1tPoTxERjcTpH6HsMr6ujTT+X6rylVe8ggxk8pVxzf5U1wh5sPODpawNicF5ta/9Tmw==, tarball: https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.8.tgz}
engines: {node: '>=12'}
cpu: [arm64]
os: [freebsd]
@@ -3000,7 +3031,7 @@ packages:
optional: true
/@esbuild/freebsd-x64@0.19.8:
- resolution: {integrity: sha512-ICvZyOplIjmmhjd6mxi+zxSdpPTKFfyPPQMQTK/w+8eNK6WV01AjIztJALDtwNNfFhfZLux0tZLC+U9nSyA5Zg==}
+ resolution: {integrity: sha512-ICvZyOplIjmmhjd6mxi+zxSdpPTKFfyPPQMQTK/w+8eNK6WV01AjIztJALDtwNNfFhfZLux0tZLC+U9nSyA5Zg==, tarball: https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.8.tgz}
engines: {node: '>=12'}
cpu: [x64]
os: [freebsd]
@@ -3009,7 +3040,7 @@ packages:
optional: true
/@esbuild/linux-arm64@0.19.8:
- resolution: {integrity: sha512-z1zMZivxDLHWnyGOctT9JP70h0beY54xDDDJt4VpTX+iwA77IFsE1vCXWmprajJGa+ZYSqkSbRQ4eyLCpCmiCQ==}
+ resolution: {integrity: sha512-z1zMZivxDLHWnyGOctT9JP70h0beY54xDDDJt4VpTX+iwA77IFsE1vCXWmprajJGa+ZYSqkSbRQ4eyLCpCmiCQ==, tarball: https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.8.tgz}
engines: {node: '>=12'}
cpu: [arm64]
os: [linux]
@@ -3018,7 +3049,7 @@ packages:
optional: true
/@esbuild/linux-arm@0.19.8:
- resolution: {integrity: sha512-H4vmI5PYqSvosPaTJuEppU9oz1dq2A7Mr2vyg5TF9Ga+3+MGgBdGzcyBP7qK9MrwFQZlvNyJrvz6GuCaj3OukQ==}
+ resolution: {integrity: sha512-H4vmI5PYqSvosPaTJuEppU9oz1dq2A7Mr2vyg5TF9Ga+3+MGgBdGzcyBP7qK9MrwFQZlvNyJrvz6GuCaj3OukQ==, tarball: https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.8.tgz}
engines: {node: '>=12'}
cpu: [arm]
os: [linux]
@@ -3027,7 +3058,7 @@ packages:
optional: true
/@esbuild/linux-ia32@0.19.8:
- resolution: {integrity: sha512-1a8suQiFJmZz1khm/rDglOc8lavtzEMRo0v6WhPgxkrjcU0LkHj+TwBrALwoz/OtMExvsqbbMI0ChyelKabSvQ==}
+ resolution: {integrity: sha512-1a8suQiFJmZz1khm/rDglOc8lavtzEMRo0v6WhPgxkrjcU0LkHj+TwBrALwoz/OtMExvsqbbMI0ChyelKabSvQ==, tarball: https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.8.tgz}
engines: {node: '>=12'}
cpu: [ia32]
os: [linux]
@@ -3036,7 +3067,7 @@ packages:
optional: true
/@esbuild/linux-loong64@0.19.8:
- resolution: {integrity: sha512-fHZWS2JJxnXt1uYJsDv9+b60WCc2RlvVAy1F76qOLtXRO+H4mjt3Tr6MJ5l7Q78X8KgCFudnTuiQRBhULUyBKQ==}
+ resolution: {integrity: sha512-fHZWS2JJxnXt1uYJsDv9+b60WCc2RlvVAy1F76qOLtXRO+H4mjt3Tr6MJ5l7Q78X8KgCFudnTuiQRBhULUyBKQ==, tarball: https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.8.tgz}
engines: {node: '>=12'}
cpu: [loong64]
os: [linux]
@@ -3045,7 +3076,7 @@ packages:
optional: true
/@esbuild/linux-mips64el@0.19.8:
- resolution: {integrity: sha512-Wy/z0EL5qZYLX66dVnEg9riiwls5IYnziwuju2oUiuxVc+/edvqXa04qNtbrs0Ukatg5HEzqT94Zs7J207dN5Q==}
+ resolution: {integrity: sha512-Wy/z0EL5qZYLX66dVnEg9riiwls5IYnziwuju2oUiuxVc+/edvqXa04qNtbrs0Ukatg5HEzqT94Zs7J207dN5Q==, tarball: https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.8.tgz}
engines: {node: '>=12'}
cpu: [mips64el]
os: [linux]
@@ -3054,7 +3085,7 @@ packages:
optional: true
/@esbuild/linux-ppc64@0.19.8:
- resolution: {integrity: sha512-ETaW6245wK23YIEufhMQ3HSeHO7NgsLx8gygBVldRHKhOlD1oNeNy/P67mIh1zPn2Hr2HLieQrt6tWrVwuqrxg==}
+ resolution: {integrity: sha512-ETaW6245wK23YIEufhMQ3HSeHO7NgsLx8gygBVldRHKhOlD1oNeNy/P67mIh1zPn2Hr2HLieQrt6tWrVwuqrxg==, tarball: https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.8.tgz}
engines: {node: '>=12'}
cpu: [ppc64]
os: [linux]
@@ -3063,7 +3094,7 @@ packages:
optional: true
/@esbuild/linux-riscv64@0.19.8:
- resolution: {integrity: sha512-T2DRQk55SgoleTP+DtPlMrxi/5r9AeFgkhkZ/B0ap99zmxtxdOixOMI570VjdRCs9pE4Wdkz7JYrsPvsl7eESg==}
+ resolution: {integrity: sha512-T2DRQk55SgoleTP+DtPlMrxi/5r9AeFgkhkZ/B0ap99zmxtxdOixOMI570VjdRCs9pE4Wdkz7JYrsPvsl7eESg==, tarball: https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.8.tgz}
engines: {node: '>=12'}
cpu: [riscv64]
os: [linux]
@@ -3072,7 +3103,7 @@ packages:
optional: true
/@esbuild/linux-s390x@0.19.8:
- resolution: {integrity: sha512-NPxbdmmo3Bk7mbNeHmcCd7R7fptJaczPYBaELk6NcXxy7HLNyWwCyDJ/Xx+/YcNH7Im5dHdx9gZ5xIwyliQCbg==}
+ resolution: {integrity: sha512-NPxbdmmo3Bk7mbNeHmcCd7R7fptJaczPYBaELk6NcXxy7HLNyWwCyDJ/Xx+/YcNH7Im5dHdx9gZ5xIwyliQCbg==, tarball: https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.8.tgz}
engines: {node: '>=12'}
cpu: [s390x]
os: [linux]
@@ -3081,7 +3112,7 @@ packages:
optional: true
/@esbuild/linux-x64@0.19.8:
- resolution: {integrity: sha512-lytMAVOM3b1gPypL2TRmZ5rnXl7+6IIk8uB3eLsV1JwcizuolblXRrc5ShPrO9ls/b+RTp+E6gbsuLWHWi2zGg==}
+ resolution: {integrity: sha512-lytMAVOM3b1gPypL2TRmZ5rnXl7+6IIk8uB3eLsV1JwcizuolblXRrc5ShPrO9ls/b+RTp+E6gbsuLWHWi2zGg==, tarball: https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.8.tgz}
engines: {node: '>=12'}
cpu: [x64]
os: [linux]
@@ -3090,7 +3121,7 @@ packages:
optional: true
/@esbuild/netbsd-x64@0.19.8:
- resolution: {integrity: sha512-hvWVo2VsXz/8NVt1UhLzxwAfo5sioj92uo0bCfLibB0xlOmimU/DeAEsQILlBQvkhrGjamP0/el5HU76HAitGw==}
+ resolution: {integrity: sha512-hvWVo2VsXz/8NVt1UhLzxwAfo5sioj92uo0bCfLibB0xlOmimU/DeAEsQILlBQvkhrGjamP0/el5HU76HAitGw==, tarball: https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.8.tgz}
engines: {node: '>=12'}
cpu: [x64]
os: [netbsd]
@@ -3099,7 +3130,7 @@ packages:
optional: true
/@esbuild/openbsd-x64@0.19.8:
- resolution: {integrity: sha512-/7Y7u77rdvmGTxR83PgaSvSBJCC2L3Kb1M/+dmSIvRvQPXXCuC97QAwMugBNG0yGcbEGfFBH7ojPzAOxfGNkwQ==}
+ resolution: {integrity: sha512-/7Y7u77rdvmGTxR83PgaSvSBJCC2L3Kb1M/+dmSIvRvQPXXCuC97QAwMugBNG0yGcbEGfFBH7ojPzAOxfGNkwQ==, tarball: https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.8.tgz}
engines: {node: '>=12'}
cpu: [x64]
os: [openbsd]
@@ -3108,7 +3139,7 @@ packages:
optional: true
/@esbuild/sunos-x64@0.19.8:
- resolution: {integrity: sha512-9Lc4s7Oi98GqFA4HzA/W2JHIYfnXbUYgekUP/Sm4BG9sfLjyv6GKKHKKVs83SMicBF2JwAX6A1PuOLMqpD001w==}
+ resolution: {integrity: sha512-9Lc4s7Oi98GqFA4HzA/W2JHIYfnXbUYgekUP/Sm4BG9sfLjyv6GKKHKKVs83SMicBF2JwAX6A1PuOLMqpD001w==, tarball: https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.8.tgz}
engines: {node: '>=12'}
cpu: [x64]
os: [sunos]
@@ -3117,7 +3148,7 @@ packages:
optional: true
/@esbuild/win32-arm64@0.19.8:
- resolution: {integrity: sha512-rq6WzBGjSzihI9deW3fC2Gqiak68+b7qo5/3kmB6Gvbh/NYPA0sJhrnp7wgV4bNwjqM+R2AApXGxMO7ZoGhIJg==}
+ resolution: {integrity: sha512-rq6WzBGjSzihI9deW3fC2Gqiak68+b7qo5/3kmB6Gvbh/NYPA0sJhrnp7wgV4bNwjqM+R2AApXGxMO7ZoGhIJg==, tarball: https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.8.tgz}
engines: {node: '>=12'}
cpu: [arm64]
os: [win32]
@@ -3126,7 +3157,7 @@ packages:
optional: true
/@esbuild/win32-ia32@0.19.8:
- resolution: {integrity: sha512-AIAbverbg5jMvJznYiGhrd3sumfwWs8572mIJL5NQjJa06P8KfCPWZQ0NwZbPQnbQi9OWSZhFVSUWjjIrn4hSw==}
+ resolution: {integrity: sha512-AIAbverbg5jMvJznYiGhrd3sumfwWs8572mIJL5NQjJa06P8KfCPWZQ0NwZbPQnbQi9OWSZhFVSUWjjIrn4hSw==, tarball: https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.8.tgz}
engines: {node: '>=12'}
cpu: [ia32]
os: [win32]
@@ -3135,7 +3166,7 @@ packages:
optional: true
/@esbuild/win32-x64@0.19.8:
- resolution: {integrity: sha512-bfZ0cQ1uZs2PqpulNL5j/3w+GDhP36k1K5c38QdQg+Swy51jFZWWeIkteNsufkQxp986wnqRRsb/bHbY1WQ7TA==}
+ resolution: {integrity: sha512-bfZ0cQ1uZs2PqpulNL5j/3w+GDhP36k1K5c38QdQg+Swy51jFZWWeIkteNsufkQxp986wnqRRsb/bHbY1WQ7TA==, tarball: https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.8.tgz}
engines: {node: '>=12'}
cpu: [x64]
os: [win32]
@@ -3299,7 +3330,7 @@ packages:
dev: true
/@pkgjs/parseargs@0.11.0:
- resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}
+ resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==, tarball: https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz}
engines: {node: '>=14'}
requiresBuild: true
dev: true
@@ -3314,7 +3345,7 @@ packages:
dev: true
/@popperjs/core@2.11.8:
- resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==}
+ resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==, tarball: https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz}
/@rollup/pluginutils@5.0.5:
resolution: {integrity: sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==}
@@ -3345,7 +3376,7 @@ packages:
dev: true
/@rollup/rollup-android-arm-eabi@4.6.0:
- resolution: {integrity: sha512-keHkkWAe7OtdALGoutLY3utvthkGF+Y17ws9LYT8pxMBYXaCoH/8dXS2uzo6e8+sEhY7y/zi5RFo22Dy2lFpDw==}
+ resolution: {integrity: sha512-keHkkWAe7OtdALGoutLY3utvthkGF+Y17ws9LYT8pxMBYXaCoH/8dXS2uzo6e8+sEhY7y/zi5RFo22Dy2lFpDw==, tarball: https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.6.0.tgz}
cpu: [arm]
os: [android]
requiresBuild: true
@@ -3353,7 +3384,7 @@ packages:
optional: true
/@rollup/rollup-android-arm64@4.6.0:
- resolution: {integrity: sha512-y3Kt+34smKQNWilicPbBz/MXEY7QwDzMFNgwEWeYiOhUt9MTWKjHqe3EVkXwT2fR7izOvHpDWZ0o2IyD9SWX7A==}
+ resolution: {integrity: sha512-y3Kt+34smKQNWilicPbBz/MXEY7QwDzMFNgwEWeYiOhUt9MTWKjHqe3EVkXwT2fR7izOvHpDWZ0o2IyD9SWX7A==, tarball: https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.6.0.tgz}
cpu: [arm64]
os: [android]
requiresBuild: true
@@ -3361,7 +3392,7 @@ packages:
optional: true
/@rollup/rollup-darwin-arm64@4.6.0:
- resolution: {integrity: sha512-oLzzxcUIHltHxOCmaXl+pkIlU+uhSxef5HfntW7RsLh1eHm+vJzjD9Oo4oUKso4YuP4PpbFJNlZjJuOrxo8dPg==}
+ resolution: {integrity: sha512-oLzzxcUIHltHxOCmaXl+pkIlU+uhSxef5HfntW7RsLh1eHm+vJzjD9Oo4oUKso4YuP4PpbFJNlZjJuOrxo8dPg==, tarball: https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.6.0.tgz}
cpu: [arm64]
os: [darwin]
requiresBuild: true
@@ -3369,7 +3400,7 @@ packages:
optional: true
/@rollup/rollup-darwin-x64@4.6.0:
- resolution: {integrity: sha512-+ANnmjkcOBaV25n0+M0Bere3roeVAnwlKW65qagtuAfIxXF9YxUneRyAn/RDcIdRa7QrjRNJL3jR7T43ObGe8Q==}
+ resolution: {integrity: sha512-+ANnmjkcOBaV25n0+M0Bere3roeVAnwlKW65qagtuAfIxXF9YxUneRyAn/RDcIdRa7QrjRNJL3jR7T43ObGe8Q==, tarball: https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.6.0.tgz}
cpu: [x64]
os: [darwin]
requiresBuild: true
@@ -3377,7 +3408,7 @@ packages:
optional: true
/@rollup/rollup-linux-arm-gnueabihf@4.6.0:
- resolution: {integrity: sha512-tBTSIkjSVUyrekddpkAqKOosnj1Fc0ZY0rJL2bIEWPKqlEQk0paORL9pUIlt7lcGJi3LzMIlUGXvtNi1Z6MOCQ==}
+ resolution: {integrity: sha512-tBTSIkjSVUyrekddpkAqKOosnj1Fc0ZY0rJL2bIEWPKqlEQk0paORL9pUIlt7lcGJi3LzMIlUGXvtNi1Z6MOCQ==, tarball: https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.6.0.tgz}
cpu: [arm]
os: [linux]
requiresBuild: true
@@ -3385,7 +3416,7 @@ packages:
optional: true
/@rollup/rollup-linux-arm64-gnu@4.6.0:
- resolution: {integrity: sha512-Ed8uJI3kM11de9S0j67wAV07JUNhbAqIrDYhQBrQW42jGopgheyk/cdcshgGO4fW5Wjq97COCY/BHogdGvKVNQ==}
+ resolution: {integrity: sha512-Ed8uJI3kM11de9S0j67wAV07JUNhbAqIrDYhQBrQW42jGopgheyk/cdcshgGO4fW5Wjq97COCY/BHogdGvKVNQ==, tarball: https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.6.0.tgz}
cpu: [arm64]
os: [linux]
requiresBuild: true
@@ -3393,7 +3424,7 @@ packages:
optional: true
/@rollup/rollup-linux-arm64-musl@4.6.0:
- resolution: {integrity: sha512-mZoNQ/qK4D7SSY8v6kEsAAyDgznzLLuSFCA3aBHZTmf3HP/dW4tNLTtWh9+LfyO0Z1aUn+ecpT7IQ3WtIg3ViQ==}
+ resolution: {integrity: sha512-mZoNQ/qK4D7SSY8v6kEsAAyDgznzLLuSFCA3aBHZTmf3HP/dW4tNLTtWh9+LfyO0Z1aUn+ecpT7IQ3WtIg3ViQ==, tarball: https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.6.0.tgz}
cpu: [arm64]
os: [linux]
requiresBuild: true
@@ -3401,7 +3432,7 @@ packages:
optional: true
/@rollup/rollup-linux-x64-gnu@4.6.0:
- resolution: {integrity: sha512-rouezFHpwCqdEXsqAfNsTgSWO0FoZ5hKv5p+TGO5KFhyN/dvYXNMqMolOb8BkyKcPqjYRBeT+Z6V3aM26rPaYg==}
+ resolution: {integrity: sha512-rouezFHpwCqdEXsqAfNsTgSWO0FoZ5hKv5p+TGO5KFhyN/dvYXNMqMolOb8BkyKcPqjYRBeT+Z6V3aM26rPaYg==, tarball: https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.6.0.tgz}
cpu: [x64]
os: [linux]
requiresBuild: true
@@ -3409,7 +3440,7 @@ packages:
optional: true
/@rollup/rollup-linux-x64-musl@4.6.0:
- resolution: {integrity: sha512-Bbm+fyn3S6u51urfj3YnqBXg5vI2jQPncRRELaucmhBVyZkbWClQ1fEsRmdnCPpQOQfkpg9gZArvtMVkOMsh1w==}
+ resolution: {integrity: sha512-Bbm+fyn3S6u51urfj3YnqBXg5vI2jQPncRRELaucmhBVyZkbWClQ1fEsRmdnCPpQOQfkpg9gZArvtMVkOMsh1w==, tarball: https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.6.0.tgz}
cpu: [x64]
os: [linux]
requiresBuild: true
@@ -3417,7 +3448,7 @@ packages:
optional: true
/@rollup/rollup-win32-arm64-msvc@4.6.0:
- resolution: {integrity: sha512-+MRMcyx9L2kTrTUzYmR61+XVsliMG4odFb5UmqtiT8xOfEicfYAGEuF/D1Pww1+uZkYhBqAHpvju7VN+GnC3ng==}
+ resolution: {integrity: sha512-+MRMcyx9L2kTrTUzYmR61+XVsliMG4odFb5UmqtiT8xOfEicfYAGEuF/D1Pww1+uZkYhBqAHpvju7VN+GnC3ng==, tarball: https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.6.0.tgz}
cpu: [arm64]
os: [win32]
requiresBuild: true
@@ -3425,7 +3456,7 @@ packages:
optional: true
/@rollup/rollup-win32-ia32-msvc@4.6.0:
- resolution: {integrity: sha512-rxfeE6K6s/Xl2HGeK6cO8SiQq3k/3BYpw7cfhW5Bk2euXNEpuzi2cc7llxx1si1QgwfjNtdRNTGqdBzGlFZGFw==}
+ resolution: {integrity: sha512-rxfeE6K6s/Xl2HGeK6cO8SiQq3k/3BYpw7cfhW5Bk2euXNEpuzi2cc7llxx1si1QgwfjNtdRNTGqdBzGlFZGFw==, tarball: https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.6.0.tgz}
cpu: [ia32]
os: [win32]
requiresBuild: true
@@ -3433,7 +3464,7 @@ packages:
optional: true
/@rollup/rollup-win32-x64-msvc@4.6.0:
- resolution: {integrity: sha512-QqmCsydHS172Y0Kc13bkMXvipbJSvzeglBncJG3LsYJSiPlxYACz7MmJBs4A8l1oU+jfhYEIC/+AUSlvjmiX/g==}
+ resolution: {integrity: sha512-QqmCsydHS172Y0Kc13bkMXvipbJSvzeglBncJG3LsYJSiPlxYACz7MmJBs4A8l1oU+jfhYEIC/+AUSlvjmiX/g==, tarball: https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.6.0.tgz}
cpu: [x64]
os: [win32]
requiresBuild: true
@@ -3449,7 +3480,7 @@ packages:
peerDependencies:
'@sveltejs/kit': ^2.0.0
dependencies:
- '@sveltejs/kit': 2.0.6(@sveltejs/vite-plugin-svelte@3.0.1)(svelte@4.2.8)(vite@5.0.10)
+ '@sveltejs/kit': 2.0.6(@sveltejs/vite-plugin-svelte@2.5.3)(svelte@4.2.8)(vite@5.0.10)
import-meta-resolve: 4.0.0
dev: true
@@ -3539,7 +3570,7 @@ packages:
dev: true
/@sveltejs/vite-plugin-svelte-inspector@2.0.0(@sveltejs/vite-plugin-svelte@3.0.1)(svelte@4.2.8)(vite@5.0.10):
- resolution: {integrity: sha512-gjr9ZFg1BSlIpfZ4PRewigrvYmHWbDrq2uvvPB1AmTWKuM+dI1JXQSUu2pIrYLb/QncyiIGkFDFKTwJ0XqQZZg==}
+ resolution: {integrity: sha512-gjr9ZFg1BSlIpfZ4PRewigrvYmHWbDrq2uvvPB1AmTWKuM+dI1JXQSUu2pIrYLb/QncyiIGkFDFKTwJ0XqQZZg==, tarball: https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-2.0.0.tgz}
engines: {node: ^18.0.0 || >=20}
peerDependencies:
'@sveltejs/vite-plugin-svelte': ^3.0.0
@@ -3575,7 +3606,7 @@ packages:
dev: true
/@sveltejs/vite-plugin-svelte@3.0.1(svelte@4.2.8)(vite@5.0.10):
- resolution: {integrity: sha512-CGURX6Ps+TkOovK6xV+Y2rn8JKa8ZPUHPZ/NKgCxAmgBrXReavzFl8aOSCj3kQ1xqT7yGJj53hjcV/gqwDAaWA==}
+ resolution: {integrity: sha512-CGURX6Ps+TkOovK6xV+Y2rn8JKa8ZPUHPZ/NKgCxAmgBrXReavzFl8aOSCj3kQ1xqT7yGJj53hjcV/gqwDAaWA==, tarball: https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-3.0.1.tgz}
engines: {node: ^18.0.0 || >=20}
peerDependencies:
svelte: ^4.0.0 || ^5.0.0-next.0
@@ -3671,7 +3702,7 @@ packages:
dev: true
/@types/pug@2.0.8:
- resolution: {integrity: sha512-QzhsZ1dMGyJbn/D9V80zp4GIA4J4rfAjCCxc3MP+new0E8dyVdSkR735Lx+n3LIaHNFcjHL5+TbziccuT+fdoQ==}
+ resolution: {integrity: sha512-QzhsZ1dMGyJbn/D9V80zp4GIA4J4rfAjCCxc3MP+new0E8dyVdSkR735Lx+n3LIaHNFcjHL5+TbziccuT+fdoQ==, tarball: https://registry.npmjs.org/@types/pug/-/pug-2.0.8.tgz}
dev: true
/@types/semver@7.5.4:
@@ -4328,7 +4359,7 @@ packages:
dev: true
/ansi-colors@4.1.3:
- resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==}
+ resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==, tarball: https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz}
engines: {node: '>=6'}
/ansi-escapes@6.2.0:
@@ -4458,7 +4489,7 @@ packages:
- moment
/balanced-match@1.0.2:
- resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
+ resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==, tarball: https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz}
dev: true
/big-integer@1.6.51:
@@ -4479,14 +4510,14 @@ packages:
dev: true
/brace-expansion@1.1.11:
- resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==}
+ resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==, tarball: https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz}
dependencies:
balanced-match: 1.0.2
concat-map: 0.0.1
dev: true
/brace-expansion@2.0.1:
- resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==}
+ resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==, tarball: https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz}
dependencies:
balanced-match: 1.0.2
dev: true
@@ -4510,7 +4541,7 @@ packages:
dev: true
/buffer-crc32@0.2.13:
- resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==}
+ resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==, tarball: https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz}
dev: true
/bumpp@9.2.1:
@@ -4690,7 +4721,7 @@ packages:
dev: true
/cliui@8.0.1:
- resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==}
+ resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==, tarball: https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz}
engines: {node: '>=12'}
dependencies:
string-width: 4.2.3
@@ -4962,7 +4993,7 @@ packages:
dev: true
/detect-indent@6.1.0:
- resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==}
+ resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==, tarball: https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz}
engines: {node: '>=8'}
dev: true
@@ -5021,11 +5052,11 @@ packages:
dev: true
/emoji-regex@8.0.0:
- resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
+ resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==, tarball: https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz}
dev: true
/emoji-regex@9.2.2:
- resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==}
+ resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==, tarball: https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz}
dev: true
/entities@4.5.0:
@@ -5154,7 +5185,7 @@ packages:
dev: true
/escalade@3.1.1:
- resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==}
+ resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==, tarball: https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz}
engines: {node: '>=6'}
dev: true
@@ -5501,11 +5532,11 @@ packages:
dev: true
/fs.realpath@1.0.0:
- resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==}
+ resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==, tarball: https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz}
dev: true
/fsevents@2.3.3:
- resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
+ resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==, tarball: https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz}
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
os: [darwin]
requiresBuild: true
@@ -5536,7 +5567,7 @@ packages:
dev: true
/get-caller-file@2.0.5:
- resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==}
+ resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==, tarball: https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz}
engines: {node: 6.* || 8.* || >= 10.*}
dev: true
@@ -5618,7 +5649,7 @@ packages:
dev: true
/glob@7.1.6:
- resolution: {integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==}
+ resolution: {integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==, tarball: https://registry.npmjs.org/glob/-/glob-7.1.6.tgz}
dependencies:
fs.realpath: 1.0.0
inflight: 1.0.6
@@ -5640,7 +5671,7 @@ packages:
dev: true
/glob@8.1.0:
- resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==}
+ resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==, tarball: https://registry.npmjs.org/glob/-/glob-8.1.0.tgz}
engines: {node: '>=12'}
dependencies:
fs.realpath: 1.0.0
@@ -5650,6 +5681,16 @@ packages:
once: 1.4.0
dev: true
+ /glob@9.3.5:
+ resolution: {integrity: sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==, tarball: https://registry.npmjs.org/glob/-/glob-9.3.5.tgz}
+ engines: {node: '>=16 || 14 >=14.17'}
+ dependencies:
+ fs.realpath: 1.0.0
+ minimatch: 8.0.4
+ minipass: 4.2.8
+ path-scurry: 1.10.1
+ dev: true
+
/globals@11.12.0:
resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==}
engines: {node: '>=4'}
@@ -6048,17 +6089,17 @@ packages:
dev: true
/is-fullwidth-code-point@3.0.0:
- resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}
+ resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==, tarball: https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz}
engines: {node: '>=8'}
dev: true
/is-fullwidth-code-point@4.0.0:
- resolution: {integrity: sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==}
+ resolution: {integrity: sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==, tarball: https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz}
engines: {node: '>=12'}
dev: true
/is-fullwidth-code-point@5.0.0:
- resolution: {integrity: sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==}
+ resolution: {integrity: sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==, tarball: https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz}
engines: {node: '>=18'}
dependencies:
get-east-asian-width: 1.2.0
@@ -6481,12 +6522,12 @@ packages:
dev: true
/lru-cache@10.0.1:
- resolution: {integrity: sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==}
+ resolution: {integrity: sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==, tarball: https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz}
engines: {node: 14 || >=16.14}
dev: true
/lru-cache@5.1.1:
- resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
+ resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==, tarball: https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz}
dependencies:
yallist: 3.1.1
dev: true
@@ -6619,14 +6660,28 @@ packages:
dev: true
/minimatch@5.1.6:
- resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==}
+ resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==, tarball: https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz}
+ engines: {node: '>=10'}
+ dependencies:
+ brace-expansion: 2.0.1
+ dev: true
+
+ /minimatch@7.4.6:
+ resolution: {integrity: sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==, tarball: https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz}
engines: {node: '>=10'}
dependencies:
brace-expansion: 2.0.1
dev: true
+ /minimatch@8.0.4:
+ resolution: {integrity: sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==, tarball: https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz}
+ engines: {node: '>=16 || 14 >=14.17'}
+ dependencies:
+ brace-expansion: 2.0.1
+ dev: true
+
/minimatch@9.0.3:
- resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==}
+ resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==, tarball: https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz}
engines: {node: '>=16 || 14 >=14.17'}
dependencies:
brace-expansion: 2.0.1
@@ -6637,19 +6692,24 @@ packages:
dev: true
/minipass@3.3.6:
- resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==}
+ resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==, tarball: https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz}
engines: {node: '>=8'}
dependencies:
yallist: 4.0.0
dev: true
+ /minipass@4.2.8:
+ resolution: {integrity: sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==, tarball: https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz}
+ engines: {node: '>=8'}
+ dev: true
+
/minipass@5.0.0:
- resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==}
+ resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==, tarball: https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz}
engines: {node: '>=8'}
dev: true
/minipass@7.0.4:
- resolution: {integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==}
+ resolution: {integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==, tarball: https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz}
engines: {node: '>=16 || 14 >=14.17'}
dev: true
@@ -6688,7 +6748,7 @@ packages:
dev: true
/moment@2.29.4:
- resolution: {integrity: sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==}
+ resolution: {integrity: sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==, tarball: https://registry.npmjs.org/moment/-/moment-2.29.4.tgz}
/mri@1.2.0:
resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==}
@@ -7009,7 +7069,7 @@ packages:
dev: true
/path-scurry@1.10.1:
- resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==}
+ resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==, tarball: https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz}
engines: {node: '>=16 || 14 >=14.17'}
dependencies:
lru-cache: 10.0.1
@@ -7317,7 +7377,7 @@ packages:
dev: true
/require-directory@2.1.1:
- resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==}
+ resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==, tarball: https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz}
engines: {node: '>=0.10.0'}
dev: true
@@ -7466,7 +7526,7 @@ packages:
dev: true
/search-insights@2.9.0:
- resolution: {integrity: sha512-bkWW9nIHOFkLwjQ1xqVaMbjjO5vhP26ERsH9Y3pKr8imthofEFIxlnOabkmGcw6ksRj9jWidcI65vvjJH/nTGg==}
+ resolution: {integrity: sha512-bkWW9nIHOFkLwjQ1xqVaMbjjO5vhP26ERsH9Y3pKr8imthofEFIxlnOabkmGcw6ksRj9jWidcI65vvjJH/nTGg==, tarball: https://registry.npmjs.org/search-insights/-/search-insights-2.9.0.tgz}
dev: true
/semver@5.7.2:
@@ -7712,7 +7772,7 @@ packages:
dev: true
/string-width@4.2.3:
- resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}
+ resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==, tarball: https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz}
engines: {node: '>=8'}
dependencies:
emoji-regex: 8.0.0
@@ -7721,7 +7781,7 @@ packages:
dev: true
/string-width@5.1.2:
- resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==}
+ resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==, tarball: https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz}
engines: {node: '>=12'}
dependencies:
eastasianwidth: 0.2.0
@@ -7809,7 +7869,7 @@ packages:
dev: true
/strip-indent@3.0.0:
- resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==}
+ resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==, tarball: https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz}
engines: {node: '>=8'}
dependencies:
min-indent: 1.0.1
@@ -8098,8 +8158,57 @@ packages:
typescript: 5.3.3
dev: true
+ /svelte-preprocess@5.1.3(@babel/core@7.23.7)(postcss@8.4.32)(svelte@3.59.2)(typescript@5.3.3):
+ resolution: {integrity: sha512-xxAkmxGHT+J/GourS5mVJeOXZzne1FR5ljeOUAMXUkfEhkLEllRreXpbl3dIYJlcJRfL1LO1uIAPpBpBfiqGPw==, tarball: https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-5.1.3.tgz}
+ engines: {node: '>= 16.0.0', pnpm: ^8.0.0}
+ requiresBuild: true
+ peerDependencies:
+ '@babel/core': ^7.10.2
+ coffeescript: ^2.5.1
+ less: ^3.11.3 || ^4.0.0
+ postcss: ^7 || ^8
+ postcss-load-config: ^2.1.0 || ^3.0.0 || ^4.0.0 || ^5.0.0
+ pug: ^3.0.0
+ sass: ^1.26.8
+ stylus: ^0.55.0
+ sugarss: ^2.0.0 || ^3.0.0 || ^4.0.0
+ svelte: ^3.23.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0
+ typescript: '>=3.9.5 || ^4.0.0 || ^5.0.0'
+ peerDependenciesMeta:
+ '@babel/core':
+ optional: true
+ coffeescript:
+ optional: true
+ less:
+ optional: true
+ postcss:
+ optional: true
+ postcss-load-config:
+ optional: true
+ pug:
+ optional: true
+ sass:
+ optional: true
+ stylus:
+ optional: true
+ sugarss:
+ optional: true
+ typescript:
+ optional: true
+ dependencies:
+ '@babel/core': 7.23.7
+ '@types/pug': 2.0.8
+ detect-indent: 6.1.0
+ magic-string: 0.30.5
+ postcss: 8.4.32
+ sorcery: 0.11.0
+ strip-indent: 3.0.0
+ svelte: 3.59.2
+ typescript: 5.3.3
+ dev: true
+
/svelte-preprocess@5.1.3(@babel/core@7.23.7)(postcss@8.4.32)(svelte@4.2.8)(typescript@5.3.3):
- resolution: {integrity: sha512-xxAkmxGHT+J/GourS5mVJeOXZzne1FR5ljeOUAMXUkfEhkLEllRreXpbl3dIYJlcJRfL1LO1uIAPpBpBfiqGPw==}
+ resolution: {integrity: sha512-xxAkmxGHT+J/GourS5mVJeOXZzne1FR5ljeOUAMXUkfEhkLEllRreXpbl3dIYJlcJRfL1LO1uIAPpBpBfiqGPw==, tarball: https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-5.1.3.tgz}
engines: {node: '>= 16.0.0', pnpm: ^8.0.0}
requiresBuild: true
peerDependencies:
@@ -8147,6 +8256,30 @@ packages:
typescript: 5.3.3
dev: true
+ /svelte-strip@2.0.0(@babel/core@7.23.7)(postcss@8.4.32)(svelte@3.59.2):
+ resolution: {integrity: sha512-RZ8swt0ddE22ebZvFpMhW/x9rLIAwCZtWWnb5oohQEYcyuxzvzXwxImjFQ8DINXXMbvw6PB/NfnzDmHqMVrdbw==, tarball: https://registry.npmjs.org/svelte-strip/-/svelte-strip-2.0.0.tgz}
+ hasBin: true
+ peerDependencies:
+ svelte: ^3.0.0
+ dependencies:
+ glob: 9.3.5
+ minimatch: 7.4.6
+ svelte: 3.59.2
+ svelte-preprocess: 5.1.3(@babel/core@7.23.7)(postcss@8.4.32)(svelte@3.59.2)(typescript@5.3.3)
+ typescript: 5.3.3
+ yargs: 17.7.2
+ transitivePeerDependencies:
+ - '@babel/core'
+ - coffeescript
+ - less
+ - postcss
+ - postcss-load-config
+ - pug
+ - sass
+ - stylus
+ - sugarss
+ dev: true
+
/svelte-strip@3.1.1(@babel/core@7.23.7)(postcss@8.4.32)(svelte@4.2.8):
resolution: {integrity: sha512-u0KIKGtYCBD3DrsQbTvjEokHfB13Ey2PycEQoncl0pTWU8XXNbJ8QLCrXvVmtxr6J/zG0T0uoEy99tHLRypcbw==}
hasBin: true
@@ -8183,6 +8316,11 @@ packages:
typescript: 5.3.3
dev: true
+ /svelte@3.59.2:
+ resolution: {integrity: sha512-vzSyuGr3eEoAtT/A6bmajosJZIUWySzY2CzB3w2pgPvnkUjGqlDnsNnA0PMO+mMAhuyMul6C2uuZzY6ELSkzyA==, tarball: https://registry.npmjs.org/svelte/-/svelte-3.59.2.tgz}
+ engines: {node: '>= 8'}
+ dev: true
+
/svelte@4.2.8:
resolution: {integrity: sha512-hU6dh1MPl8gh6klQZwK/n73GiAHiR95IkFsesLPbMeEZi36ydaXL/ZAb4g9sayT0MXzpxyZjR28yderJHxcmYA==}
engines: {node: '>=16'}
@@ -8943,7 +9081,7 @@ packages:
dev: true
/wrap-ansi@7.0.0:
- resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}
+ resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==, tarball: https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz}
engines: {node: '>=10'}
dependencies:
ansi-styles: 4.3.0
@@ -8952,7 +9090,7 @@ packages:
dev: true
/wrap-ansi@8.1.0:
- resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==}
+ resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==, tarball: https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz}
engines: {node: '>=12'}
dependencies:
ansi-styles: 6.2.1
@@ -8996,7 +9134,7 @@ packages:
dev: true
/y18n@5.0.8:
- resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==}
+ resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==, tarball: https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz}
engines: {node: '>=10'}
dev: true
@@ -9024,12 +9162,12 @@ packages:
dev: true
/yargs-parser@21.1.1:
- resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==}
+ resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==, tarball: https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz}
engines: {node: '>=12'}
dev: true
/yargs@17.7.2:
- resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==}
+ resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==, tarball: https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz}
engines: {node: '>=12'}
dependencies:
cliui: 8.0.1
diff --git a/preset/src/shortcuts/index.ts b/preset/src/shortcuts/index.ts
index 837b87ef..d4d75341 100644
--- a/preset/src/shortcuts/index.ts
+++ b/preset/src/shortcuts/index.ts
@@ -1,3 +1,4 @@
+import { segmentedShortcuts } from './src/segmented';
import { flexShortcuts } from './src/flex';
import type { Theme } from '@unocss/preset-uno';
import type { UserShortcuts } from 'unocss';
@@ -62,6 +63,8 @@ export const defaultShortcuts = [
commonShortcuts,
// don't remove
// anchor defaultShortcuts
+ // segmented
+ segmentedShortcuts,
// flex
flexShortcuts,
// icon
@@ -169,6 +172,7 @@ export const defaultShortcuts = [
export function getSafeList() {
// don't remove
// anchor shortcuts
+ const segmentedList = Object.keys(segmentedShortcuts);
const flexList = Object.keys(flexShortcuts);
const comList = Object.keys(baseShortcuts);
const baseList = Object.keys(commonShortcuts);
@@ -225,6 +229,7 @@ export function getSafeList() {
let res = iconList
// don't remove
// anchor list
+ .concat(segmentedList)
.concat(flexList)
.concat(IKUN_SAFE_LIST)
.concat(comList)
@@ -346,3 +351,4 @@ export { scrollbarShortcuts } from './src/scrollbar';
export { imageShortcuts } from './src/image';
export { imageViewShortcuts } from './src/image-view';
export { flexShortcuts } from './src/flex';
+export { segmentedShortcuts } from './src/segmented';
diff --git a/preset/src/shortcuts/src/common.ts b/preset/src/shortcuts/src/common.ts
index 94208774..2be94cf3 100644
--- a/preset/src/shortcuts/src/common.ts
+++ b/preset/src/shortcuts/src/common.ts
@@ -14,6 +14,7 @@ export const commonShortcuts: UserShortcuts = {
fs: 'flex justify-start',
fsc: 'flex justify-start items-center',
fse: 'flex justify-start items-end',
+ fssc: 'flex justify-start items-stretch',
fe: 'flex justify-end',
fec: 'flex justify-end items-center',
fb: 'flex justify-between',
diff --git a/preset/src/shortcuts/src/segmented.ts b/preset/src/shortcuts/src/segmented.ts
new file mode 100644
index 00000000..92d7ad8c
--- /dev/null
+++ b/preset/src/shortcuts/src/segmented.ts
@@ -0,0 +1,18 @@
+export const segmentedShortcuts: Record = {
+ 'k-segmented':
+ 'cursor-pointer p-2px box-border m-0 inline-block rounded text-14px text-ikun-tx-base bg-ikun-bg-grs3', // hover:bg-ikun-bg-grs2
+ 'k-segmented-group': 'pr fssc w-full',
+ 'k-segmented-block': 'flex',
+
+ 'k-segmented-item': 'fcc text-center pr rounded hover:bg-ikun-bg-grs2 active:bg-ikun-bg-grs1',
+ 'k-segmented-item--disabled': 'fcc text-center pr rounded k-cur-disabled opacity-50',
+ 'k-segmented-item--active':
+ 'rounded bg-white shadow hover:bg-white active:bg-white h-full w-full pa',
+ 'k-segmented-item--label': 'px-11px pr z-1 truncate w-full',
+ 'k-segmented-item--icon': 'align-middle !inline-flex',
+ 'k-segmented-item--block': 'flex-1 min-w-0',
+
+ 'k-segmented-item--sm': 'h-24px',
+ 'k-segmented-item--md': 'h-32px',
+ 'k-segmented-item--lg': 'h-40px'
+};
diff --git a/preset/src/theme/index.ts b/preset/src/theme/index.ts
index 6aa47282..596dd44a 100644
--- a/preset/src/theme/index.ts
+++ b/preset/src/theme/index.ts
@@ -58,6 +58,9 @@ export const defaultTheme = {
'ikun-bd-base': 'var(--ikun-zinc-300)',
'ikun-bg-gr': 'var(--ikun-slate-100)',
'ikun-bg-grs': 'var(--ikun-slate-300)',
+ 'ikun-bg-grs2': 'var(--ikun-neutral-200)',
+ 'ikun-bg-grs3': 'var(--ikun-neutral-100)',
+ 'ikun-bg-grs1': 'var(--ikun-neutral-300)',
'ikun-bg-tab': 'var(--ikun-slate-50)',
'ikun-icon-white': 'var(--ikun-neutral-300)'
},
diff --git a/utils/src/index.ts b/utils/src/index.ts
index fd9079f3..0b708508 100644
--- a/utils/src/index.ts
+++ b/utils/src/index.ts
@@ -14,6 +14,7 @@ export {
formItemKey,
tabsKey,
dropDownKey,
- descriptionsKey
+ descriptionsKey,
+ segmentedKey
} from './symbol-key';
export * from './dom';
diff --git a/utils/src/symbol-key.ts b/utils/src/symbol-key.ts
index bc0d6c6c..8cdc87bf 100644
--- a/utils/src/symbol-key.ts
+++ b/utils/src/symbol-key.ts
@@ -19,3 +19,4 @@ export const formItemKey = KSymbolKey('formItem');
export const dropDownKey = KSymbolKey('dropDown');
export const tabsKey = KSymbolKey('tabs');
export const descriptionsKey = KSymbolKey('descriptions');
+export const segmentedKey = KSymbolKey('segmented');