@varlet/ui 2.9.0-alpha.1678417783003 → 2.9.0-alpha.1678431541952

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.
@@ -7,7 +7,7 @@ export function useBreadcrumb() {
7
7
  index
8
8
  } = useParent(BREADCRUMBS_BIND_BREADCRUMB_ITEM_KEY);
9
9
 
10
- if (!parentProvider || !bindParent || !index) {
10
+ if (!bindParent) {
11
11
  throw Error('<var-breadcrumb/> must in <var-breadcrumbs/>');
12
12
  }
13
13
 
@@ -1,13 +1,11 @@
1
- import { useAtParentIndex, useParent } from '../utils/components.mjs';
2
- import { BUTTON_GROUP_BIND_BUTTON_KEY, BUTTON_GROUP_COUNT_BUTTON_KEY } from '../button-group/provide.mjs';
1
+ import { useParent } from '@varlet/use';
2
+ import { BUTTON_GROUP_BIND_BUTTON_KEY } from '../button-group/provide.mjs';
3
3
  export function useButtonGroup() {
4
4
  var {
5
5
  bindParent,
6
- parentProvider
7
- } = useParent(BUTTON_GROUP_BIND_BUTTON_KEY);
8
- var {
6
+ parentProvider,
9
7
  index
10
- } = useAtParentIndex(BUTTON_GROUP_COUNT_BUTTON_KEY);
8
+ } = useParent(BUTTON_GROUP_BIND_BUTTON_KEY);
11
9
  return {
12
10
  index,
13
11
  buttonGroup: parentProvider,
@@ -1,14 +1,11 @@
1
- import { useAtChildrenCounter, useChildren } from '../utils/components.mjs';
1
+ import { useChildren } from '@varlet/use';
2
2
  export var BUTTON_GROUP_BIND_BUTTON_KEY = Symbol('BUTTON_GROUP_BIND_BUTTON_KEY');
3
- export var BUTTON_GROUP_COUNT_BUTTON_KEY = Symbol('BUTTON_GROUP_COUNT_BUTTON_KEY');
4
3
  export function useButtons() {
5
4
  var {
6
5
  bindChildren,
7
- childProviders
8
- } = useChildren(BUTTON_GROUP_BIND_BUTTON_KEY);
9
- var {
6
+ childProviders,
10
7
  length
11
- } = useAtChildrenCounter(BUTTON_GROUP_COUNT_BUTTON_KEY);
8
+ } = useChildren(BUTTON_GROUP_BIND_BUTTON_KEY);
12
9
  return {
13
10
  length,
14
11
  buttons: childProviders,
@@ -1,13 +1,11 @@
1
- import { useAtParentIndex, useParent } from '../utils/components.mjs';
2
- import { CHECKBOX_GROUP_BIND_CHECKBOX_KEY, CHECKBOX_GROUP_COUNT_CHECKBOX_KEY } from '../checkbox-group/provide.mjs';
1
+ import { useParent } from '@varlet/use';
2
+ import { CHECKBOX_GROUP_BIND_CHECKBOX_KEY } from '../checkbox-group/provide.mjs';
3
3
  export function useCheckboxGroup() {
4
4
  var {
5
5
  bindParent,
6
- parentProvider
7
- } = useParent(CHECKBOX_GROUP_BIND_CHECKBOX_KEY);
8
- var {
6
+ parentProvider,
9
7
  index
10
- } = useAtParentIndex(CHECKBOX_GROUP_COUNT_CHECKBOX_KEY);
8
+ } = useParent(CHECKBOX_GROUP_BIND_CHECKBOX_KEY);
11
9
  return {
12
10
  index,
13
11
  checkboxGroup: parentProvider,
@@ -1,14 +1,11 @@
1
- import { useAtChildrenCounter, useChildren } from '../utils/components.mjs';
1
+ import { useChildren } from '@varlet/use';
2
2
  export var CHECKBOX_GROUP_BIND_CHECKBOX_KEY = Symbol('CHECKBOX_GROUP_BIND_CHECKBOX_KEY');
3
- export var CHECKBOX_GROUP_COUNT_CHECKBOX_KEY = Symbol('CHECKBOX_GROUP_COUNT_CHECKBOX_KEY');
4
3
  export function useCheckboxes() {
5
4
  var {
6
5
  bindChildren,
7
- childProviders
8
- } = useChildren(CHECKBOX_GROUP_BIND_CHECKBOX_KEY);
9
- var {
6
+ childProviders,
10
7
  length
11
- } = useAtChildrenCounter(CHECKBOX_GROUP_COUNT_CHECKBOX_KEY);
8
+ } = useChildren(CHECKBOX_GROUP_BIND_CHECKBOX_KEY);
12
9
  return {
13
10
  length,
14
11
  checkboxes: childProviders,
@@ -1,18 +1,11 @@
1
- import { useAtParentIndex, useParent } from '../utils/components.mjs';
2
- import { ROW_BIND_COL_KEY, ROW_COUNT_COL_KEY } from '../row/provide.mjs';
1
+ import { useParent } from '@varlet/use';
2
+ import { ROW_BIND_COL_KEY } from '../row/provide.mjs';
3
3
  export function useRow() {
4
4
  var {
5
5
  parentProvider,
6
+ index,
6
7
  bindParent
7
8
  } = useParent(ROW_BIND_COL_KEY);
8
- var {
9
- index
10
- } = useAtParentIndex(ROW_COUNT_COL_KEY);
11
-
12
- if (!parentProvider || !bindParent || !index) {
13
- console.warn('col must in row');
14
- }
15
-
16
9
  return {
17
10
  index,
18
11
  row: parentProvider,
@@ -1,14 +1,11 @@
1
- import { useAtChildrenCounter, useChildren } from '../utils/components.mjs';
1
+ import { useChildren } from '@varlet/use';
2
2
  export var COLLAPSE_BIND_COLLAPSE_ITEM_KEY = Symbol('COLLAPSE_BIND_COLLAPSE_ITEM_KEY');
3
- export var COLLAPSE_COUNT_COLLAPSE_ITEM_KEY = Symbol('COLLAPSE_COUNT_COLLAPSE_ITEM_KEY');
4
3
  export function useCollapseItem() {
5
4
  var {
6
- bindChildren,
7
- childProviders
5
+ childProviders,
6
+ length,
7
+ bindChildren
8
8
  } = useChildren(COLLAPSE_BIND_COLLAPSE_ITEM_KEY);
9
- var {
10
- length
11
- } = useAtChildrenCounter(COLLAPSE_COUNT_COLLAPSE_ITEM_KEY);
12
9
  return {
13
10
  length,
14
11
  collapseItem: childProviders,
@@ -1,15 +1,13 @@
1
- import { useAtParentIndex, useParent } from '../utils/components.mjs';
2
- import { COLLAPSE_BIND_COLLAPSE_ITEM_KEY, COLLAPSE_COUNT_COLLAPSE_ITEM_KEY } from '../collapse/provide.mjs';
1
+ import { useParent } from '@varlet/use';
2
+ import { COLLAPSE_BIND_COLLAPSE_ITEM_KEY } from '../collapse/provide.mjs';
3
3
  export function useCollapse() {
4
4
  var {
5
5
  parentProvider,
6
+ index,
6
7
  bindParent
7
8
  } = useParent(COLLAPSE_BIND_COLLAPSE_ITEM_KEY);
8
- var {
9
- index
10
- } = useAtParentIndex(COLLAPSE_COUNT_COLLAPSE_ITEM_KEY);
11
9
 
12
- if (!parentProvider || !bindParent || !index) {
10
+ if (!bindParent) {
13
11
  throw Error('[Varlet] Collapse: <var-collapse-item/> must in <var-collapse>');
14
12
  }
15
13
 
@@ -238,7 +238,7 @@ import './time-picker/style/index.mjs'
238
238
  import './tooltip/style/index.mjs'
239
239
  import './uploader/style/index.mjs'
240
240
 
241
- const version = '2.9.0-alpha.1678417783003'
241
+ const version = '2.9.0-alpha.1678431541952'
242
242
 
243
243
  function install(app) {
244
244
  ActionSheet.install && app.use(ActionSheet)
package/es/index.mjs CHANGED
@@ -158,7 +158,7 @@ export * from './time-picker/index.mjs'
158
158
  export * from './tooltip/index.mjs'
159
159
  export * from './uploader/index.mjs'
160
160
 
161
- const version = '2.9.0-alpha.1678417783003'
161
+ const version = '2.9.0-alpha.1678431541952'
162
162
 
163
163
  function install(app) {
164
164
  ActionSheet.install && app.use(ActionSheet)
@@ -1 +1 @@
1
- :root { --loading-opacity: 0.38; --loading-desc-margin: 8px 0 0;}.var-loading { --loading-normal-width: 50px; --loading-normal-height: calc(var(--font-size-md) + 2px); --loading-large-width: 64px; --loading-large-height: calc(var(--font-size-lg) + 2px); --loading-small-width: 36px; --loading-small-height: calc(var(--font-size-sm) + 2px); --loading-mini-width: 22px; --loading-mini-height: calc(var(--font-size-xs) + 2px); position: relative;}.var-loading__content { position: relative; transition: opacity 0.3s; opacity: 1;}.var-loading__content--active { opacity: var(--loading-opacity);}.var-loading__content-mask { position: absolute; left: 0; right: 0; top: 0; bottom: 0;}.var-loading__body { display: flex; justify-content: center; align-items: center; height: 100%; flex-direction: column;}.var-loading__inside { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1;}.var-loading__description { color: var(--color-primary); margin: var(--loading-desc-margin);}.var-loading__description--large { font-size: var(--font-size-lg);}.var-loading__description--normal { font-size: var(--font-size-md);}.var-loading__description--small { font-size: var(--font-size-sm);}.var-loading__description--mini { font-size: var(--font-size-xs);}.var-loading__circle { display: flex;}.var-loading__circle-block { display: inline-block; color: var(--color-primary); animation: circle 1.8s linear infinite;}.var-loading__circle-block--large { width: 36px; height: 36px;}.var-loading__circle-block--normal { width: 30px; height: 30px;}.var-loading__circle-block--small { width: 24px; height: 24px;}.var-loading__circle-block--mini { width: 18px; height: 18px;}.var-loading__circle-block svg { display: block; width: 100%; height: 100%;}.var-loading__circle-block svg circle { animation: circular 1.5s ease-in-out infinite; stroke: currentColor; stroke-width: 3; stroke-linecap: round;}@keyframes circle { from { transform: rotate(0deg); } to { transform: rotate(360deg); }}@keyframes circular { 0% { stroke-dasharray: 1, 200; stroke-dashoffset: 0; } 50% { stroke-dasharray: 90, 150; stroke-dashoffset: -40; } 100% { stroke-dasharray: 90, 150; stroke-dashoffset: -120; }}.var-loading__wave { --loading-wave-size-item-width: 5px; --loading-wave-size-item-margin: 5px; display: flex; align-items: center; justify-content: center;}.var-loading__wave--large { width: var(--loading-large-width); height: var(--loading-large-height);}.var-loading__wave--normal { width: var(--loading-normal-width); height: var(--loading-normal-height);}.var-loading__wave--small { width: var(--loading-small-width); height: var(--loading-small-height);}.var-loading__wave--mini { width: var(--loading-mini-width); height: var(--loading-mini-height);}.var-loading__wave-item { height: 100%; display: inline-block; animation: 1.2s ease-in-out infinite wave; background-color: var(--color-primary);}.var-loading__wave-item:nth-child(1) { animation-delay: -1.2s; margin-left: 0;}.var-loading__wave-item:nth-child(2) { animation-delay: -1.1s;}.var-loading__wave-item:nth-child(3) { animation-delay: -1s;}.var-loading__wave-item:nth-child(4) { animation-delay: -0.9s;}.var-loading__wave-item:nth-child(5) { animation-delay: -0.8s;}.var-loading__wave-item--large { width: var(--loading-wave-size-item-width); margin-left: var(--loading-wave-size-item-margin);}.var-loading__wave-item--normal { width: calc(var(--loading-wave-size-item-width) - 1px); margin-left: calc(var(--loading-wave-size-item-margin) - 1px);}.var-loading__wave-item--small { width: calc(var(--loading-wave-size-item-width) - 2px); margin-left: calc(var(--loading-wave-size-item-margin) - 2px);}.var-loading__wave-item--mini { width: calc(var(--loading-wave-size-item-width) - 3px); margin-left: calc(var(--loading-wave-size-item-margin) - 3px);}@keyframes wave { 0%, 40%, 100% { transform: scaleY(0.4); } 20% { transform: scaleY(1); }}.var-loading__cube { --loading-cube-size-item-width: 10px; --loading-cube-size-item-height: 10px; --loading-cube-size-item-margin: 5px; display: flex; align-items: center;}.var-loading__cube--large { width: var(--loading-large-width); height: var(--loading-large-height);}.var-loading__cube--normal { width: var(--loading-normal-width); height: var(--loading-normal-height);}.var-loading__cube--small { width: var(--loading-small-width); height: var(--loading-small-height);}.var-loading__cube--mini { width: var(--loading-mini-width); height: var(--loading-mini-height);}.var-loading__cube-item { display: inline-block; transform-origin: right bottom; animation: 1.5s ease infinite cube; background-color: var(--color-primary);}.var-loading__cube-item:nth-child(1) { animation-delay: 0.2s; margin-left: 0;}.var-loading__cube-item:nth-child(2) { animation-delay: 0.4s;}.var-loading__cube-item:nth-child(3) { animation-delay: 0.6s;}.var-loading__cube-item:nth-child(4) { animation-delay: 0.8s;}.var-loading__cube-item--large { height: var(--loading-cube-size-item-height); width: var(--loading-cube-size-item-width); margin-left: var(--loading-cube-size-item-margin);}.var-loading__cube-item--normal { height: calc(var(--loading-cube-size-item-height) - 2px); width: calc(var(--loading-cube-size-item-width) - 2px); margin-left: calc(var(--loading-cube-size-item-margin) - 1px);}.var-loading__cube-item--small { height: calc(var(--loading-cube-size-item-height) - 4px); width: calc(var(--loading-cube-size-item-width) - 4px); margin-left: calc(var(--loading-cube-size-item-margin) - 2px);}.var-loading__cube-item--mini { height: calc(var(--loading-cube-size-item-height) - 6px); width: calc(var(--loading-cube-size-item-width) - 6px); margin-left: calc(var(--loading-cube-size-item-margin) - 3px);}@keyframes cube { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: rotate(90deg) scale(0.3); }}.var-loading__rect { --loading-rect-size-item-width: 8px; --loading-rect-size-item-height: 100%; display: flex; flex-wrap: nowrap; justify-content: center; align-items: center;}.var-loading__rect--large { width: var(--loading-large-width); height: var(--loading-large-height);}.var-loading__rect--normal { width: var(--loading-normal-width); height: var(--loading-normal-height);}.var-loading__rect--small { width: var(--loading-small-width); height: var(--loading-small-height);}.var-loading__rect--mini { width: var(--loading-mini-width); height: var(--loading-mini-height);}.var-loading__rect-item { animation: 2s ease-in-out infinite rect; background-color: var(--color-primary);}.var-loading__rect-item:nth-child(1) { animation-delay: 1.75s;}.var-loading__rect-item:nth-child(2) { animation-delay: 1.5s;}.var-loading__rect-item:nth-child(3) { animation-delay: 1.25s;}.var-loading__rect-item:nth-child(4) { animation-delay: 1s;}.var-loading__rect-item:nth-child(5) { animation-delay: 0.75s;}.var-loading__rect-item:nth-child(6) { animation-delay: 0.5s;}.var-loading__rect-item:nth-child(7) { animation-delay: 0.25s;}.var-loading__rect-item:nth-child(8) { animation-delay: 0s;}.var-loading__rect-item--large { height: var(--loading-rect-size-item-height); width: var(--loading-rect-size-item-width);}.var-loading__rect-item--normal { height: calc(var(--loading-rect-size-item-height) * 0.9); width: calc(var(--loading-rect-size-item-width) * 0.8);}.var-loading__rect-item--small { height: calc(var(--loading-rect-size-item-height) * 0.8); width: calc(var(--loading-rect-size-item-width) * 0.6);}.var-loading__rect-item--mini { height: calc(var(--loading-rect-size-item-height) * 0.7); width: calc(var(--loading-rect-size-item-width) * 0.4);}@keyframes rect { 0% { opacity: 0.3; } 25% { opacity: 1; } 50% { opacity: 0.3; } 65% { opacity: 1; } 100% { opacity: 0.3; }}.var-loading__disappear { --loading-disappear-size-item-width: 15px; --loading-disappear-size-item-height: 15px; display: flex; justify-content: space-around; align-items: center; flex-flow: nowrap;}.var-loading__disappear--large { width: var(--loading-large-width); height: var(--loading-large-height);}.var-loading__disappear--normal { width: var(--loading-normal-width); height: var(--loading-normal-height);}.var-loading__disappear--small { width: var(--loading-small-width); height: var(--loading-small-height);}.var-loading__disappear--mini { width: var(--loading-mini-width); height: var(--loading-mini-height);}.var-loading__disappear-item { border-radius: 50%; animation: 0.5s ease-in-out infinite alternate disappear; background-color: var(--color-primary);}.var-loading__disappear-item:nth-child(1) { animation-delay: -0.4s;}.var-loading__disappear-item:nth-child(2) { animation-delay: -0.2s;}.var-loading__disappear-item:nth-child(3) { animation-delay: 0s;}.var-loading__disappear-item--large { height: var(--loading-disappear-size-item-height); width: var(--loading-disappear-size-item-width);}.var-loading__disappear-item--normal { height: calc(var(--loading-disappear-size-item-height) * 0.8); width: calc(var(--loading-disappear-size-item-width) * 0.8);}.var-loading__disappear-item--small { height: calc(var(--loading-disappear-size-item-height) * 0.6); width: calc(var(--loading-disappear-size-item-width) * 0.6);}.var-loading__disappear-item--mini { height: calc(var(--loading-disappear-size-item-height) * 0.4); width: calc(var(--loading-disappear-size-item-width) * 0.4);}@keyframes disappear { 0% { opacity: 1; } 100% { opacity: 0; }}
1
+ :root { --loading-opacity: 0.38; --loading-desc-margin: 8px 0 0;}.var-loading { --loading-normal-width: 50px; --loading-normal-height: calc(var(--font-size-md) + 2px); --loading-large-width: 64px; --loading-large-height: calc(var(--font-size-lg) + 2px); --loading-small-width: 36px; --loading-small-height: calc(var(--font-size-sm) + 2px); --loading-mini-width: 22px; --loading-mini-height: calc(var(--font-size-xs) + 2px); position: relative;}.var-loading__content { position: relative; transition: opacity 0.3s; opacity: 1;}.var-loading__content--active { opacity: var(--loading-opacity);}.var-loading__content-mask { position: absolute; left: 0; right: 0; top: 0; bottom: 0;}.var-loading__body { display: flex; justify-content: center; align-items: center; height: 100%; flex-direction: column;}.var-loading__inside { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1;}.var-loading__description { color: var(--color-primary); margin: var(--loading-desc-margin);}.var-loading__description--large { font-size: var(--font-size-lg);}.var-loading__description--normal { font-size: var(--font-size-md);}.var-loading__description--small { font-size: var(--font-size-sm);}.var-loading__description--mini { font-size: var(--font-size-xs);}.var-loading__circle { display: flex;}.var-loading__circle-block { display: inline-block; color: var(--color-primary); animation: circle 1.8s linear infinite;}.var-loading__circle-block--large { width: 36px; height: 36px;}.var-loading__circle-block--normal { width: 30px; height: 30px;}.var-loading__circle-block--small { width: 24px; height: 24px;}.var-loading__circle-block--mini { width: 18px; height: 18px;}.var-loading__circle-block svg { display: block; width: 100%; height: 100%;}.var-loading__circle-block svg circle { animation: circular 1.5s ease-in-out infinite; stroke: currentColor; stroke-width: 3; stroke-linecap: round;}@keyframes circle { from { transform: rotate(0deg); } to { transform: rotate(360deg); }}@keyframes circular { 0% { stroke-dasharray: 1, 200; stroke-dashoffset: 0; } 50% { stroke-dasharray: 90, 150; stroke-dashoffset: -40; } 100% { stroke-dasharray: 90, 150; stroke-dashoffset: -120; }}.var-loading__wave { --loading-wave-size-item-width: 5px; --loading-wave-size-item-margin: 5px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;}.var-loading__wave--large { width: var(--loading-large-width); height: var(--loading-large-height);}.var-loading__wave--normal { width: var(--loading-normal-width); height: var(--loading-normal-height);}.var-loading__wave--small { width: var(--loading-small-width); height: var(--loading-small-height);}.var-loading__wave--mini { width: var(--loading-mini-width); height: var(--loading-mini-height);}.var-loading__wave-item { height: 100%; display: inline-block; animation: 1.2s ease-in-out infinite wave; background-color: var(--color-primary);}.var-loading__wave-item:nth-child(1) { animation-delay: -1.2s; margin-left: 0;}.var-loading__wave-item:nth-child(2) { animation-delay: -1.1s;}.var-loading__wave-item:nth-child(3) { animation-delay: -1s;}.var-loading__wave-item:nth-child(4) { animation-delay: -0.9s;}.var-loading__wave-item:nth-child(5) { animation-delay: -0.8s;}.var-loading__wave-item--large { width: var(--loading-wave-size-item-width); margin-left: var(--loading-wave-size-item-margin);}.var-loading__wave-item--normal { width: calc(var(--loading-wave-size-item-width) - 1px); margin-left: calc(var(--loading-wave-size-item-margin) - 1px);}.var-loading__wave-item--small { width: calc(var(--loading-wave-size-item-width) - 2px); margin-left: calc(var(--loading-wave-size-item-margin) - 2px);}.var-loading__wave-item--mini { width: calc(var(--loading-wave-size-item-width) - 3px); margin-left: calc(var(--loading-wave-size-item-margin) - 3px);}@keyframes wave { 0%, 40%, 100% { transform: scaleY(0.4); } 20% { transform: scaleY(1); }}.var-loading__cube { --loading-cube-size-item-width: 10px; --loading-cube-size-item-height: 10px; --loading-cube-size-item-margin: 5px; display: flex; align-items: center; flex-shrink: 0;}.var-loading__cube--large { width: var(--loading-large-width); height: var(--loading-large-height);}.var-loading__cube--normal { width: var(--loading-normal-width); height: var(--loading-normal-height);}.var-loading__cube--small { width: var(--loading-small-width); height: var(--loading-small-height);}.var-loading__cube--mini { width: var(--loading-mini-width); height: var(--loading-mini-height);}.var-loading__cube-item { display: inline-block; transform-origin: right bottom; animation: 1.5s ease infinite cube; background-color: var(--color-primary);}.var-loading__cube-item:nth-child(1) { animation-delay: 0.2s; margin-left: 0;}.var-loading__cube-item:nth-child(2) { animation-delay: 0.4s;}.var-loading__cube-item:nth-child(3) { animation-delay: 0.6s;}.var-loading__cube-item:nth-child(4) { animation-delay: 0.8s;}.var-loading__cube-item--large { height: var(--loading-cube-size-item-height); width: var(--loading-cube-size-item-width); margin-left: var(--loading-cube-size-item-margin);}.var-loading__cube-item--normal { height: calc(var(--loading-cube-size-item-height) - 2px); width: calc(var(--loading-cube-size-item-width) - 2px); margin-left: calc(var(--loading-cube-size-item-margin) - 1px);}.var-loading__cube-item--small { height: calc(var(--loading-cube-size-item-height) - 4px); width: calc(var(--loading-cube-size-item-width) - 4px); margin-left: calc(var(--loading-cube-size-item-margin) - 2px);}.var-loading__cube-item--mini { height: calc(var(--loading-cube-size-item-height) - 6px); width: calc(var(--loading-cube-size-item-width) - 6px); margin-left: calc(var(--loading-cube-size-item-margin) - 3px);}@keyframes cube { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: rotate(90deg) scale(0.3); }}.var-loading__rect { --loading-rect-size-item-width: 8px; --loading-rect-size-item-height: 100%; display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; flex-shrink: 0;}.var-loading__rect--large { width: var(--loading-large-width); height: var(--loading-large-height);}.var-loading__rect--normal { width: var(--loading-normal-width); height: var(--loading-normal-height);}.var-loading__rect--small { width: var(--loading-small-width); height: var(--loading-small-height);}.var-loading__rect--mini { width: var(--loading-mini-width); height: var(--loading-mini-height);}.var-loading__rect-item { animation: 2s ease-in-out infinite rect; background-color: var(--color-primary);}.var-loading__rect-item:nth-child(1) { animation-delay: 1.75s;}.var-loading__rect-item:nth-child(2) { animation-delay: 1.5s;}.var-loading__rect-item:nth-child(3) { animation-delay: 1.25s;}.var-loading__rect-item:nth-child(4) { animation-delay: 1s;}.var-loading__rect-item:nth-child(5) { animation-delay: 0.75s;}.var-loading__rect-item:nth-child(6) { animation-delay: 0.5s;}.var-loading__rect-item:nth-child(7) { animation-delay: 0.25s;}.var-loading__rect-item:nth-child(8) { animation-delay: 0s;}.var-loading__rect-item--large { height: var(--loading-rect-size-item-height); width: var(--loading-rect-size-item-width);}.var-loading__rect-item--normal { height: calc(var(--loading-rect-size-item-height) * 0.9); width: calc(var(--loading-rect-size-item-width) * 0.8);}.var-loading__rect-item--small { height: calc(var(--loading-rect-size-item-height) * 0.8); width: calc(var(--loading-rect-size-item-width) * 0.6);}.var-loading__rect-item--mini { height: calc(var(--loading-rect-size-item-height) * 0.7); width: calc(var(--loading-rect-size-item-width) * 0.4);}@keyframes rect { 0% { opacity: 0.3; } 25% { opacity: 1; } 50% { opacity: 0.3; } 65% { opacity: 1; } 100% { opacity: 0.3; }}.var-loading__disappear { --loading-disappear-size-item-width: 15px; --loading-disappear-size-item-height: 15px; display: flex; justify-content: space-around; align-items: center; flex-flow: nowrap; flex-shrink: 0;}.var-loading__disappear--large { width: var(--loading-large-width); height: var(--loading-large-height);}.var-loading__disappear--normal { width: var(--loading-normal-width); height: var(--loading-normal-height);}.var-loading__disappear--small { width: var(--loading-small-width); height: var(--loading-small-height);}.var-loading__disappear--mini { width: var(--loading-mini-width); height: var(--loading-mini-height);}.var-loading__disappear-item { border-radius: 50%; animation: 0.5s ease-in-out infinite alternate disappear; background-color: var(--color-primary);}.var-loading__disappear-item:nth-child(1) { animation-delay: -0.4s;}.var-loading__disappear-item:nth-child(2) { animation-delay: -0.2s;}.var-loading__disappear-item:nth-child(3) { animation-delay: 0s;}.var-loading__disappear-item--large { height: var(--loading-disappear-size-item-height); width: var(--loading-disappear-size-item-width);}.var-loading__disappear-item--normal { height: calc(var(--loading-disappear-size-item-height) * 0.8); width: calc(var(--loading-disappear-size-item-width) * 0.8);}.var-loading__disappear-item--small { height: calc(var(--loading-disappear-size-item-height) * 0.6); width: calc(var(--loading-disappear-size-item-width) * 0.6);}.var-loading__disappear-item--mini { height: calc(var(--loading-disappear-size-item-height) * 0.4); width: calc(var(--loading-disappear-size-item-width) * 0.4);}@keyframes disappear { 0% { opacity: 1; } 100% { opacity: 0; }}
@@ -5,7 +5,6 @@ export function sizeValidator(size) {
5
5
  return ['normal', 'mini', 'small', 'large'].includes(size);
6
6
  }
7
7
  export var props = {
8
- // loading类型
9
8
  type: {
10
9
  type: String,
11
10
  default: 'circle',
@@ -14,13 +13,11 @@ export var props = {
14
13
  radius: {
15
14
  type: [String, Number]
16
15
  },
17
- // loading尺寸
18
16
  size: {
19
17
  type: String,
20
18
  default: 'normal',
21
19
  validator: sizeValidator
22
20
  },
23
- // loading颜色
24
21
  color: {
25
22
  type: String
26
23
  },
@@ -1,13 +1,11 @@
1
- import { useAtParentIndex, useParent } from '../utils/components.mjs';
2
- import { RADIO_GROUP_BIND_RADIO_KEY, RADIO_GROUP_COUNT_RADIO_KEY } from '../radio-group/provide.mjs';
1
+ import { useParent } from '@varlet/use';
2
+ import { RADIO_GROUP_BIND_RADIO_KEY } from '../radio-group/provide.mjs';
3
3
  export function useRadioGroup() {
4
4
  var {
5
5
  bindParent,
6
- parentProvider
7
- } = useParent(RADIO_GROUP_BIND_RADIO_KEY);
8
- var {
6
+ parentProvider,
9
7
  index
10
- } = useAtParentIndex(RADIO_GROUP_COUNT_RADIO_KEY);
8
+ } = useParent(RADIO_GROUP_BIND_RADIO_KEY);
11
9
  return {
12
10
  index,
13
11
  radioGroup: parentProvider,
@@ -1,14 +1,11 @@
1
- import { useAtChildrenCounter, useChildren } from '../utils/components.mjs';
1
+ import { useChildren } from '@varlet/use';
2
2
  export var RADIO_GROUP_BIND_RADIO_KEY = Symbol('RADIO_GROUP_BIND_RADIO_KEY');
3
- export var RADIO_GROUP_COUNT_RADIO_KEY = Symbol('RADIO_GROUP_COUNT_RADIO_KEY');
4
3
  export function useRadios() {
5
4
  var {
6
5
  bindChildren,
7
- childProviders
8
- } = useChildren(RADIO_GROUP_BIND_RADIO_KEY);
9
- var {
6
+ childProviders,
10
7
  length
11
- } = useAtChildrenCounter(RADIO_GROUP_COUNT_RADIO_KEY);
8
+ } = useChildren(RADIO_GROUP_BIND_RADIO_KEY);
12
9
  return {
13
10
  length,
14
11
  radios: childProviders,
@@ -1,14 +1,11 @@
1
- import { useAtChildrenCounter, useChildren } from '../utils/components.mjs';
1
+ import { useChildren } from '@varlet/use';
2
2
  export var ROW_BIND_COL_KEY = Symbol('ROW_BIND_COL_KEY');
3
- export var ROW_COUNT_COL_KEY = Symbol('ROW_COUNT_COL_KEY');
4
3
  export function useCols() {
5
4
  var {
6
5
  bindChildren,
7
- childProviders
8
- } = useChildren(ROW_BIND_COL_KEY);
9
- var {
6
+ childProviders,
10
7
  length
11
- } = useAtChildrenCounter(ROW_COUNT_COL_KEY);
8
+ } = useChildren(ROW_BIND_COL_KEY);
12
9
  return {
13
10
  length,
14
11
  cols: childProviders,
@@ -1,8 +1,8 @@
1
1
  import '../../styles/common.css'
2
- import '../SnackbarSfc.css'
3
2
  import '../../styles/elevation.css'
4
3
  import '../../loading/loading.css'
5
4
  import '../../button/button.css'
6
5
  import '../../icon/icon.css'
7
6
  import '../snackbar.css'
8
7
  import '../coreSfc.css'
8
+ import '../SnackbarSfc.css'