@skeletonlabs/skeleton 2.2.0-dev.2457bc93 → 2.2.0-dev.72862197

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.
@@ -25,6 +25,9 @@ export let chips = "variant-filled";
25
25
  export let invalid = "input-error";
26
26
  export let padding = "p-2";
27
27
  export let rounded = "rounded-container-token";
28
+ export let regionChipWrapper = "";
29
+ export let regionChipList = "";
30
+ export let regionInput = "";
28
31
  export let transitions = !$prefersReducedMotionStore;
29
32
  export let listTransitionIn = fly;
30
33
  export let listTransitionInParams = { duration: 150, opacity: 0, y: -20 };
@@ -35,7 +38,7 @@ export let chipTransitionInParams = { duration: 150, opacity: 0 };
35
38
  export let chipTransitionOut = scale;
36
39
  export let chipTransitionOutParams = { duration: 150, opacity: 0 };
37
40
  const cBase = "textarea cursor-pointer";
38
- const cInterface = "space-y-4";
41
+ const cChipWrapper = "space-y-4";
39
42
  const cChipList = "flex flex-wrap gap-2";
40
43
  const cInputField = "unstyled bg-transparent border-0 !ring-0 p-0 w-full";
41
44
  let inputValid = true;
@@ -105,11 +108,11 @@ $:
105
108
  $:
106
109
  classesBase = `${cBase} ${padding} ${rounded} ${$$props.class ?? ""} ${classesInvalid}`;
107
110
  $:
108
- classesInterface = `${cInterface}`;
111
+ classesChipWrapper = `${cChipWrapper} ${regionChipWrapper}`;
109
112
  $:
110
- classesChipList = `${cChipList}`;
113
+ classesChipList = `${cChipList} ${regionChipList}`;
111
114
  $:
112
- classesInputField = `${cInputField}`;
115
+ classesInput = `${cInputField} ${regionInput}`;
113
116
  $:
114
117
  chipValues = value?.map((val, i) => {
115
118
  if (chipValues[i]?.val === val)
@@ -126,15 +129,15 @@ $:
126
129
  {#each value as option}<option value={option}>{option}</option>{/each}
127
130
  </select>
128
131
  </div>
129
- <!-- Interface -->
130
- <div class="input-chip-interface {classesInterface}">
132
+ <!-- Chip Wrapper -->
133
+ <div class="input-chip-wrapper {classesChipWrapper}">
131
134
  <!-- Input Field -->
132
135
  <form on:submit={addChip}>
133
136
  <input
134
137
  type="text"
135
138
  bind:value={input}
136
139
  placeholder={$$restProps.placeholder ?? 'Enter values...'}
137
- class="input-chip-field {classesInputField}"
140
+ class="input-chip-field {classesInput}"
138
141
  on:input={onInputHandler}
139
142
  on:input
140
143
  on:focus
@@ -38,6 +38,12 @@ declare class __sveltets_Render<ListTransitionIn extends Transition = FlyTransit
38
38
  padding?: string | undefined;
39
39
  /** Provide classes to set border radius styles.*/
40
40
  rounded?: string | undefined;
41
+ /** Provide arbitrary classes to style the chip wrapper region.*/
42
+ regionChipWrapper?: string | undefined;
43
+ /** Provide arbitrary classes to style the chip list region.*/
44
+ regionChipList?: string | undefined;
45
+ /** Provide arbitrary classes to style the input field region.*/
46
+ regionInput?: string | undefined;
41
47
  /** Enable/Disable transitions*/
42
48
  transitions?: boolean | undefined;
43
49
  /** Provide the transition used in list on entry.*/
@@ -3,6 +3,7 @@
3
3
  export let value = void 0;
4
4
  export let stroke = 40;
5
5
  export let font = 56;
6
+ export let strokeLinecap = "butt";
6
7
  export let width = "w-36";
7
8
  export let meter = "stroke-surface-900 dark:stroke-surface-50";
8
9
  export let track = "stroke-surface-500/30";
@@ -12,7 +13,7 @@ const cBase = "progress-radial relative overflow-hidden";
12
13
  const cBaseTrack = "fill-transparent";
13
14
  const cBaseMeter = "fill-transparent transition-[stroke-dashoffset] duration-200 -rotate-90 origin-[50%_50%]";
14
15
  const baseSize = 512;
15
- const radius = baseSize / 2;
16
+ const radius = baseSize / 2 - stroke / 2;
16
17
  let circumference = radius;
17
18
  let dashoffset;
18
19
  function setProgress(percent) {
@@ -40,18 +41,19 @@ $:
40
41
  <!-- Draw SVG -->
41
42
  <svg viewBox="0 0 {baseSize} {baseSize}" class="rounded-full" class:animate-spin={value === undefined}>
42
43
  <!-- Track -->
43
- <circle class="progress-radial-track {cBaseTrack} {track}" stroke-width={stroke} r={baseSize / 2} cx="50%" cy="50%" />
44
+ <circle class="progress-radial-track {cBaseTrack} {track}" stroke-width={stroke} r={radius} cx="50%" cy="50%" />
44
45
 
45
46
  <!-- Meter -->
46
47
  <circle
47
48
  class="progress-radial-meter {cBaseMeter} {meter}"
48
49
  stroke-width={stroke}
49
- r={baseSize / 2}
50
+ r={radius}
50
51
  cx="50%"
51
52
  cy="50%"
52
53
  style:stroke-dasharray="{circumference}
53
54
  {circumference}"
54
55
  style:stroke-dashoffset={dashoffset}
56
+ stroke-linecap={strokeLinecap}
55
57
  />
56
58
 
57
59
  <!-- Center Text -->
@@ -8,6 +8,8 @@ declare const __propDef: {
8
8
  stroke?: number | undefined;
9
9
  /** Sets the base font size. Scales responsively.*/
10
10
  font?: number | undefined;
11
+ /** Sets the stoke-linecap value*/
12
+ strokeLinecap?: "butt" | "round" | "square" | undefined;
11
13
  /** Provide classes to set the width.*/
12
14
  width?: string | undefined;
13
15
  /** Provide classes to set meter color.*/
@@ -1,5 +1,6 @@
1
1
  <script>import { onMount } from "svelte";
2
2
  import { modeCurrent, setModeUserPrefers, setModeCurrent, setInitialClassState, getModeOsPrefers } from "./lightswitch.js";
3
+ export let title = "Toggle light or dark mode.";
3
4
  export let bgLight = "bg-surface-50";
4
5
  export let bgDark = "bg-surface-900";
5
6
  export let fillLight = "fill-surface-50";
@@ -64,7 +65,7 @@ $:
64
65
  role="switch"
65
66
  aria-label="Light Switch"
66
67
  aria-checked={$modeCurrent}
67
- title="Toggle {$modeCurrent === true ? 'Dark' : 'Light'} Mode"
68
+ {title}
68
69
  tabindex="0"
69
70
  >
70
71
  <!-- Thumb -->
@@ -2,6 +2,8 @@ import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
4
  [x: string]: any;
5
+ /** Customize the `title` attribute for the component.*/
6
+ title?: string | undefined;
5
7
  /** Provide classes to set the light background color.*/
6
8
  bgLight?: string | undefined;
7
9
  /** Provide classes to set the dark background color.*/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skeletonlabs/skeleton",
3
- "version": "2.2.0-dev.2457bc93",
3
+ "version": "2.2.0-dev.72862197",
4
4
  "description": "A SvelteKit component library.",
5
5
  "author": "endigo9740 <chris@skeletonlabs.dev>",
6
6
  "repository": {